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AAT,CAAkB9B,OAAlB,EAAyC;IACvC,OAAO6B,qCAAe,CAAC7B,OAAD,CAAf,GAA2B,eAA3B,GAA6CA,OAAO,GAAG,SAAH,GAAe,WAA1E,CAAA;CACD;AAED,MAAMpB,yCAAI,GAAGF,yCAAb,AAAA;AACA,MAAMG,yCAAS,GAAGF,yCAAlB,AAAA;;AD3NA","sources":["packages/react/checkbox/src/index.ts","packages/react/checkbox/src/Checkbox.tsx"],"sourcesContent":["export {\n createCheckboxScope,\n //\n Checkbox,\n CheckboxIndicator,\n //\n Root,\n Indicator,\n} from './Checkbox';\nexport type { CheckboxProps, CheckboxIndicatorProps } from './Checkbox';\n","import * as React from 'react';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { usePrevious } from '@radix-ui/react-use-previous';\nimport { useSize } from '@radix-ui/react-use-size';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\n\nimport type * as Radix from '@radix-ui/react-primitive';\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Checkbox\n * -----------------------------------------------------------------------------------------------*/\n\nconst CHECKBOX_NAME = 'Checkbox';\n\ntype ScopedProps
= P & { __scopeCheckbox?: Scope };\nconst [createCheckboxContext, createCheckboxScope] = createContextScope(CHECKBOX_NAME);\n\ntype CheckedState = boolean | 'indeterminate';\n\ntype CheckboxContextValue = {\n state: CheckedState;\n disabled?: boolean;\n};\n\nconst [CheckboxProvider, useCheckboxContext] =\n createCheckboxContext