@cdx-ui/components 0.0.1-alpha.3 → 0.0.1-alpha.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -2
- package/lib/commonjs/components/AlertDialog/index.js +117 -0
- package/lib/commonjs/components/AlertDialog/index.js.map +1 -0
- package/lib/commonjs/components/Avatar/index.js +156 -0
- package/lib/commonjs/components/Avatar/index.js.map +1 -0
- package/lib/commonjs/components/Avatar/styles.js +80 -0
- package/lib/commonjs/components/Avatar/styles.js.map +1 -0
- package/lib/commonjs/components/BottomSheet/index.js +248 -0
- package/lib/commonjs/components/BottomSheet/index.js.map +1 -0
- package/lib/commonjs/components/BottomSheet/styles.js +61 -0
- package/lib/commonjs/components/BottomSheet/styles.js.map +1 -0
- package/lib/commonjs/components/Box/Box.js +1 -0
- package/lib/commonjs/components/Box/Box.js.map +1 -1
- package/lib/commonjs/components/Button/buttonSharedVariants.js +200 -0
- package/lib/commonjs/components/Button/buttonSharedVariants.js.map +1 -0
- package/lib/commonjs/components/Button/index.js +31 -13
- package/lib/commonjs/components/Button/index.js.map +1 -1
- package/lib/commonjs/components/Button/styles.js +170 -187
- package/lib/commonjs/components/Button/styles.js.map +1 -1
- package/lib/commonjs/components/Card/index.js +104 -0
- package/lib/commonjs/components/Card/index.js.map +1 -0
- package/lib/commonjs/components/Card/styles.js +28 -0
- package/lib/commonjs/components/Card/styles.js.map +1 -0
- package/lib/commonjs/components/Checkbox/index.js +180 -0
- package/lib/commonjs/components/Checkbox/index.js.map +1 -0
- package/lib/commonjs/components/Checkbox/styles.js +68 -0
- package/lib/commonjs/components/Checkbox/styles.js.map +1 -0
- package/lib/commonjs/components/Chip/index.js +103 -0
- package/lib/commonjs/components/Chip/index.js.map +1 -0
- package/lib/commonjs/components/Chip/styles.js +50 -0
- package/lib/commonjs/components/Chip/styles.js.map +1 -0
- package/lib/commonjs/components/Dialog/index.js +275 -0
- package/lib/commonjs/components/Dialog/index.js.map +1 -0
- package/lib/commonjs/components/Dialog/styles.js +63 -0
- package/lib/commonjs/components/Dialog/styles.js.map +1 -0
- package/lib/commonjs/components/Form/FormLabelRoot.js +33 -0
- package/lib/commonjs/components/Form/FormLabelRoot.js.map +1 -0
- package/lib/commonjs/components/Form/FormLabelRoot.web.js +18 -0
- package/lib/commonjs/components/Form/FormLabelRoot.web.js.map +1 -0
- package/lib/commonjs/components/Form/FormRoot.js +25 -0
- package/lib/commonjs/components/Form/FormRoot.js.map +1 -0
- package/lib/commonjs/components/Form/FormRoot.web.js +17 -0
- package/lib/commonjs/components/Form/FormRoot.web.js.map +1 -0
- package/lib/commonjs/components/Form/index.js +255 -0
- package/lib/commonjs/components/Form/index.js.map +1 -0
- package/lib/commonjs/components/Form/styles.js +57 -0
- package/lib/commonjs/components/Form/styles.js.map +1 -0
- package/lib/commonjs/components/Heading/index.js +35 -0
- package/lib/commonjs/components/Heading/index.js.map +1 -0
- package/lib/commonjs/components/Heading/styles.js +24 -0
- package/lib/commonjs/components/Heading/styles.js.map +1 -0
- package/lib/commonjs/components/Icon/index.js +61 -0
- package/lib/commonjs/components/Icon/index.js.map +1 -0
- package/lib/commonjs/components/IconButton/index.js +80 -0
- package/lib/commonjs/components/IconButton/index.js.map +1 -0
- package/lib/commonjs/components/IconButton/styles.js +91 -0
- package/lib/commonjs/components/IconButton/styles.js.map +1 -0
- package/lib/commonjs/components/Image/Image.js +69 -0
- package/lib/commonjs/components/Image/Image.js.map +1 -0
- package/lib/commonjs/components/Image/index.js +13 -0
- package/lib/commonjs/components/Image/index.js.map +1 -0
- package/lib/commonjs/components/Input/BaseInput.android.js +20 -0
- package/lib/commonjs/components/Input/BaseInput.android.js.map +1 -0
- package/lib/commonjs/components/Input/index.js +10 -16
- package/lib/commonjs/components/Input/index.js.map +1 -1
- package/lib/commonjs/components/Input/styles.js +16 -30
- package/lib/commonjs/components/Input/styles.js.map +1 -1
- package/lib/commonjs/components/Link/index.js +94 -0
- package/lib/commonjs/components/Link/index.js.map +1 -0
- package/lib/commonjs/components/Link/styles.js +16 -0
- package/lib/commonjs/components/Link/styles.js.map +1 -0
- package/lib/commonjs/components/ProgressSegmented/index.js +62 -0
- package/lib/commonjs/components/ProgressSegmented/index.js.map +1 -0
- package/lib/commonjs/components/ProgressSegmented/styles.js +21 -0
- package/lib/commonjs/components/ProgressSegmented/styles.js.map +1 -0
- package/lib/commonjs/components/Select/SelectTriggerHost.js +10 -0
- package/lib/commonjs/components/Select/SelectTriggerHost.js.map +1 -0
- package/lib/commonjs/components/Select/SelectTriggerHost.web.js +98 -0
- package/lib/commonjs/components/Select/SelectTriggerHost.web.js.map +1 -0
- package/lib/commonjs/components/Select/index.js +13 -13
- package/lib/commonjs/components/Select/index.js.map +1 -1
- package/lib/commonjs/components/Select/styles.js +29 -53
- package/lib/commonjs/components/Select/styles.js.map +1 -1
- package/lib/commonjs/components/Stack/HStack.js +8 -21
- package/lib/commonjs/components/Stack/HStack.js.map +1 -1
- package/lib/commonjs/components/Stack/VStack.js +8 -21
- package/lib/commonjs/components/Stack/VStack.js.map +1 -1
- package/lib/commonjs/components/Stack/styles.js +39 -0
- package/lib/commonjs/components/Stack/styles.js.map +1 -0
- package/lib/commonjs/components/Switch/BaseSwitch.js +46 -0
- package/lib/commonjs/components/Switch/BaseSwitch.js.map +1 -0
- package/lib/commonjs/components/Switch/BaseSwitch.web.js +56 -0
- package/lib/commonjs/components/Switch/BaseSwitch.web.js.map +1 -0
- package/lib/commonjs/components/Switch/index.js +13 -0
- package/lib/commonjs/components/Switch/index.js.map +1 -0
- package/lib/commonjs/components/Switch/styles.js +128 -0
- package/lib/commonjs/components/Switch/styles.js.map +1 -0
- package/lib/commonjs/components/Text/index.js +18 -9
- package/lib/commonjs/components/Text/index.js.map +1 -1
- package/lib/commonjs/components/Text/styles.js +24 -0
- package/lib/commonjs/components/Text/styles.js.map +1 -0
- package/lib/commonjs/components/VirtualizedList/index.js +19 -0
- package/lib/commonjs/components/VirtualizedList/index.js.map +1 -0
- package/lib/commonjs/components/index.js +192 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/index.js +40 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/metro/withCdxMetroConfig.js +24 -0
- package/lib/commonjs/metro/withCdxMetroConfig.js.map +1 -0
- package/lib/commonjs/styles/index.js +17 -0
- package/lib/commonjs/styles/index.js.map +1 -0
- package/lib/commonjs/styles/primitives.js +123 -0
- package/lib/commonjs/styles/primitives.js.map +1 -0
- package/lib/module/components/AlertDialog/index.js +112 -0
- package/lib/module/components/AlertDialog/index.js.map +1 -0
- package/lib/module/components/Avatar/index.js +152 -0
- package/lib/module/components/Avatar/index.js.map +1 -0
- package/lib/module/components/Avatar/styles.js +77 -0
- package/lib/module/components/Avatar/styles.js.map +1 -0
- package/lib/module/components/BottomSheet/index.js +242 -0
- package/lib/module/components/BottomSheet/index.js.map +1 -0
- package/lib/module/components/BottomSheet/styles.js +58 -0
- package/lib/module/components/BottomSheet/styles.js.map +1 -0
- package/lib/module/components/Box/Box.js +1 -0
- package/lib/module/components/Box/Box.js.map +1 -1
- package/lib/module/components/Button/buttonSharedVariants.js +195 -0
- package/lib/module/components/Button/buttonSharedVariants.js.map +1 -0
- package/lib/module/components/Button/index.js +32 -14
- package/lib/module/components/Button/index.js.map +1 -1
- package/lib/module/components/Button/styles.js +168 -186
- package/lib/module/components/Button/styles.js.map +1 -1
- package/lib/module/components/Card/index.js +100 -0
- package/lib/module/components/Card/index.js.map +1 -0
- package/lib/module/components/Card/styles.js +25 -0
- package/lib/module/components/Card/styles.js.map +1 -0
- package/lib/module/components/Checkbox/index.js +176 -0
- package/lib/module/components/Checkbox/index.js.map +1 -0
- package/lib/module/components/Checkbox/styles.js +64 -0
- package/lib/module/components/Checkbox/styles.js.map +1 -0
- package/lib/module/components/Chip/index.js +99 -0
- package/lib/module/components/Chip/index.js.map +1 -0
- package/lib/module/components/Chip/styles.js +46 -0
- package/lib/module/components/Chip/styles.js.map +1 -0
- package/lib/module/components/Dialog/index.js +267 -0
- package/lib/module/components/Dialog/index.js.map +1 -0
- package/lib/module/components/Dialog/styles.js +60 -0
- package/lib/module/components/Dialog/styles.js.map +1 -0
- package/lib/module/components/Form/FormLabelRoot.js +29 -0
- package/lib/module/components/Form/FormLabelRoot.js.map +1 -0
- package/lib/module/components/Form/FormLabelRoot.web.js +13 -0
- package/lib/module/components/Form/FormLabelRoot.web.js.map +1 -0
- package/lib/module/components/Form/FormRoot.js +21 -0
- package/lib/module/components/Form/FormRoot.js.map +1 -0
- package/lib/module/components/Form/FormRoot.web.js +12 -0
- package/lib/module/components/Form/FormRoot.web.js.map +1 -0
- package/lib/module/components/Form/index.js +252 -0
- package/lib/module/components/Form/index.js.map +1 -0
- package/lib/module/components/Form/styles.js +53 -0
- package/lib/module/components/Form/styles.js.map +1 -0
- package/lib/module/components/Heading/index.js +31 -0
- package/lib/module/components/Heading/index.js.map +1 -0
- package/lib/module/components/Heading/styles.js +20 -0
- package/lib/module/components/Heading/styles.js.map +1 -0
- package/lib/module/components/Icon/index.js +57 -0
- package/lib/module/components/Icon/index.js.map +1 -0
- package/lib/module/components/IconButton/index.js +76 -0
- package/lib/module/components/IconButton/index.js.map +1 -0
- package/lib/module/components/IconButton/styles.js +87 -0
- package/lib/module/components/IconButton/styles.js.map +1 -0
- package/lib/module/components/Image/Image.js +67 -0
- package/lib/module/components/Image/Image.js.map +1 -0
- package/lib/module/components/Image/index.js +4 -0
- package/lib/module/components/Image/index.js.map +1 -0
- package/lib/module/components/Input/BaseInput.android.js +16 -0
- package/lib/module/components/Input/BaseInput.android.js.map +1 -0
- package/lib/module/components/Input/index.js +10 -16
- package/lib/module/components/Input/index.js.map +1 -1
- package/lib/module/components/Input/styles.js +16 -30
- package/lib/module/components/Input/styles.js.map +1 -1
- package/lib/module/components/Link/index.js +85 -0
- package/lib/module/components/Link/index.js.map +1 -0
- package/lib/module/components/Link/styles.js +12 -0
- package/lib/module/components/Link/styles.js.map +1 -0
- package/lib/module/components/ProgressSegmented/index.js +58 -0
- package/lib/module/components/ProgressSegmented/index.js.map +1 -0
- package/lib/module/components/ProgressSegmented/styles.js +17 -0
- package/lib/module/components/ProgressSegmented/styles.js.map +1 -0
- package/lib/module/components/Select/SelectTriggerHost.js +7 -0
- package/lib/module/components/Select/SelectTriggerHost.js.map +1 -0
- package/lib/module/components/Select/SelectTriggerHost.web.js +93 -0
- package/lib/module/components/Select/SelectTriggerHost.web.js.map +1 -0
- package/lib/module/components/Select/index.js +14 -14
- package/lib/module/components/Select/index.js.map +1 -1
- package/lib/module/components/Select/styles.js +29 -53
- package/lib/module/components/Select/styles.js.map +1 -1
- package/lib/module/components/Stack/HStack.js +8 -21
- package/lib/module/components/Stack/HStack.js.map +1 -1
- package/lib/module/components/Stack/VStack.js +8 -21
- package/lib/module/components/Stack/VStack.js.map +1 -1
- package/lib/module/components/Stack/styles.js +35 -0
- package/lib/module/components/Stack/styles.js.map +1 -0
- package/lib/module/components/Switch/BaseSwitch.js +42 -0
- package/lib/module/components/Switch/BaseSwitch.js.map +1 -0
- package/lib/module/components/Switch/BaseSwitch.web.js +52 -0
- package/lib/module/components/Switch/BaseSwitch.web.js.map +1 -0
- package/lib/module/components/Switch/index.js +9 -0
- package/lib/module/components/Switch/index.js.map +1 -0
- package/lib/module/components/Switch/styles.js +125 -0
- package/lib/module/components/Switch/styles.js.map +1 -0
- package/lib/module/components/Text/index.js +19 -1
- package/lib/module/components/Text/index.js.map +1 -1
- package/lib/module/components/Text/styles.js +20 -0
- package/lib/module/components/Text/styles.js.map +1 -0
- package/lib/module/components/VirtualizedList/index.js +15 -0
- package/lib/module/components/VirtualizedList/index.js.map +1 -0
- package/lib/module/components/index.js +16 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/metro/withCdxMetroConfig.js +20 -0
- package/lib/module/metro/withCdxMetroConfig.js.map +1 -0
- package/lib/module/styles/index.js +4 -0
- package/lib/module/styles/index.js.map +1 -0
- package/lib/module/styles/primitives.js +119 -0
- package/lib/module/styles/primitives.js.map +1 -0
- package/lib/typescript/components/AlertDialog/index.d.ts +30 -0
- package/lib/typescript/components/AlertDialog/index.d.ts.map +1 -0
- package/lib/typescript/components/Avatar/index.d.ts +40 -0
- package/lib/typescript/components/Avatar/index.d.ts.map +1 -0
- package/lib/typescript/components/Avatar/styles.d.ts +16 -0
- package/lib/typescript/components/Avatar/styles.d.ts.map +1 -0
- package/lib/typescript/components/BottomSheet/index.d.ts +61 -0
- package/lib/typescript/components/BottomSheet/index.d.ts.map +1 -0
- package/lib/typescript/components/BottomSheet/styles.d.ts +16 -0
- package/lib/typescript/components/BottomSheet/styles.d.ts.map +1 -0
- package/lib/typescript/components/Box/Box.d.ts +1 -0
- package/lib/typescript/components/Box/Box.d.ts.map +1 -1
- package/lib/typescript/components/Button/buttonSharedVariants.d.ts +29 -0
- package/lib/typescript/components/Button/buttonSharedVariants.d.ts.map +1 -0
- package/lib/typescript/components/Button/index.d.ts +6 -3
- package/lib/typescript/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/components/Button/styles.d.ts +14 -8
- package/lib/typescript/components/Button/styles.d.ts.map +1 -1
- package/lib/typescript/components/Card/index.d.ts +30 -0
- package/lib/typescript/components/Card/index.d.ts.map +1 -0
- package/lib/typescript/components/Card/styles.d.ts +6 -0
- package/lib/typescript/components/Card/styles.d.ts.map +1 -0
- package/lib/typescript/components/Checkbox/index.d.ts +46 -0
- package/lib/typescript/components/Checkbox/index.d.ts.map +1 -0
- package/lib/typescript/components/Checkbox/styles.d.ts +18 -0
- package/lib/typescript/components/Checkbox/styles.d.ts.map +1 -0
- package/lib/typescript/components/Chip/index.d.ts +27 -0
- package/lib/typescript/components/Chip/index.d.ts.map +1 -0
- package/lib/typescript/components/Chip/styles.d.ts +12 -0
- package/lib/typescript/components/Chip/styles.d.ts.map +1 -0
- package/lib/typescript/components/Dialog/index.d.ts +61 -0
- package/lib/typescript/components/Dialog/index.d.ts.map +1 -0
- package/lib/typescript/components/Dialog/styles.d.ts +14 -0
- package/lib/typescript/components/Dialog/styles.d.ts.map +1 -0
- package/lib/typescript/components/Form/FormLabelRoot.d.ts +18 -0
- package/lib/typescript/components/Form/FormLabelRoot.d.ts.map +1 -0
- package/lib/typescript/components/Form/FormLabelRoot.web.d.ts +20 -0
- package/lib/typescript/components/Form/FormLabelRoot.web.d.ts.map +1 -0
- package/lib/typescript/components/Form/FormRoot.d.ts +12 -0
- package/lib/typescript/components/Form/FormRoot.d.ts.map +1 -0
- package/lib/typescript/components/Form/FormRoot.web.d.ts +10 -0
- package/lib/typescript/components/Form/FormRoot.web.d.ts.map +1 -0
- package/lib/typescript/components/Form/index.d.ts +64 -0
- package/lib/typescript/components/Form/index.d.ts.map +1 -0
- package/lib/typescript/components/Form/styles.d.ts +22 -0
- package/lib/typescript/components/Form/styles.d.ts.map +1 -0
- package/lib/typescript/components/Heading/index.d.ts +10 -0
- package/lib/typescript/components/Heading/index.d.ts.map +1 -0
- package/lib/typescript/components/Heading/styles.d.ts +6 -0
- package/lib/typescript/components/Heading/styles.d.ts.map +1 -0
- package/lib/typescript/components/Icon/index.d.ts +27 -0
- package/lib/typescript/components/Icon/index.d.ts.map +1 -0
- package/lib/typescript/components/IconButton/index.d.ts +15 -0
- package/lib/typescript/components/IconButton/index.d.ts.map +1 -0
- package/lib/typescript/components/IconButton/styles.d.ts +16 -0
- package/lib/typescript/components/IconButton/styles.d.ts.map +1 -0
- package/lib/typescript/components/Image/Image.d.ts +47 -0
- package/lib/typescript/components/Image/Image.d.ts.map +1 -0
- package/lib/typescript/components/Image/index.d.ts +2 -0
- package/lib/typescript/components/Image/index.d.ts.map +1 -0
- package/lib/typescript/components/Input/BaseInput.android.d.ts +3 -0
- package/lib/typescript/components/Input/BaseInput.android.d.ts.map +1 -0
- package/lib/typescript/components/Input/index.d.ts +7 -5
- package/lib/typescript/components/Input/index.d.ts.map +1 -1
- package/lib/typescript/components/Input/styles.d.ts +5 -7
- package/lib/typescript/components/Input/styles.d.ts.map +1 -1
- package/lib/typescript/components/Link/index.d.ts +26 -0
- package/lib/typescript/components/Link/index.d.ts.map +1 -0
- package/lib/typescript/components/Link/styles.d.ts +4 -0
- package/lib/typescript/components/Link/styles.d.ts.map +1 -0
- package/lib/typescript/components/ProgressSegmented/index.d.ts +15 -0
- package/lib/typescript/components/ProgressSegmented/index.d.ts.map +1 -0
- package/lib/typescript/components/ProgressSegmented/styles.d.ts +8 -0
- package/lib/typescript/components/ProgressSegmented/styles.d.ts.map +1 -0
- package/lib/typescript/components/Select/SelectTriggerHost.d.ts +3 -0
- package/lib/typescript/components/Select/SelectTriggerHost.d.ts.map +1 -0
- package/lib/typescript/components/Select/SelectTriggerHost.web.d.ts +13 -0
- package/lib/typescript/components/Select/SelectTriggerHost.web.d.ts.map +1 -0
- package/lib/typescript/components/Select/index.d.ts +7 -4
- package/lib/typescript/components/Select/index.d.ts.map +1 -1
- package/lib/typescript/components/Select/styles.d.ts +6 -8
- package/lib/typescript/components/Select/styles.d.ts.map +1 -1
- package/lib/typescript/components/Stack/HStack.d.ts +1 -12
- package/lib/typescript/components/Stack/HStack.d.ts.map +1 -1
- package/lib/typescript/components/Stack/VStack.d.ts +1 -12
- package/lib/typescript/components/Stack/VStack.d.ts.map +1 -1
- package/lib/typescript/components/Stack/styles.d.ts +10 -0
- package/lib/typescript/components/Stack/styles.d.ts.map +1 -0
- package/lib/typescript/components/Switch/BaseSwitch.d.ts +9 -0
- package/lib/typescript/components/Switch/BaseSwitch.d.ts.map +1 -0
- package/lib/typescript/components/Switch/BaseSwitch.web.d.ts +15 -0
- package/lib/typescript/components/Switch/BaseSwitch.web.d.ts.map +1 -0
- package/lib/typescript/components/Switch/index.d.ts +7 -0
- package/lib/typescript/components/Switch/index.d.ts.map +1 -0
- package/lib/typescript/components/Switch/styles.d.ts +26 -0
- package/lib/typescript/components/Switch/styles.d.ts.map +1 -0
- package/lib/typescript/components/Text/index.d.ts +9 -1
- package/lib/typescript/components/Text/index.d.ts.map +1 -1
- package/lib/typescript/components/Text/styles.d.ts +6 -0
- package/lib/typescript/components/Text/styles.d.ts.map +1 -0
- package/lib/typescript/components/VirtualizedList/index.d.ts +8 -0
- package/lib/typescript/components/VirtualizedList/index.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +16 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +3 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/metro/withCdxMetroConfig.d.ts +19 -0
- package/lib/typescript/metro/withCdxMetroConfig.d.ts.map +1 -0
- package/lib/typescript/styles/index.d.ts +2 -0
- package/lib/typescript/styles/index.d.ts.map +1 -0
- package/lib/typescript/styles/primitives.d.ts +85 -0
- package/lib/typescript/styles/primitives.d.ts.map +1 -0
- package/package.json +23 -16
- package/src/components/AlertDialog/index.tsx +124 -0
- package/src/components/Avatar/index.tsx +172 -0
- package/src/components/Avatar/styles.ts +83 -0
- package/src/components/BottomSheet/index.tsx +316 -0
- package/src/components/BottomSheet/styles.ts +79 -0
- package/src/components/Box/Box.tsx +1 -0
- package/src/components/Button/buttonSharedVariants.ts +281 -0
- package/src/components/Button/index.tsx +24 -15
- package/src/components/Button/styles.ts +195 -229
- package/src/components/Card/index.tsx +115 -0
- package/src/components/Card/styles.ts +41 -0
- package/src/components/Checkbox/index.tsx +207 -0
- package/src/components/Checkbox/styles.ts +103 -0
- package/src/components/Chip/index.tsx +91 -0
- package/src/components/Chip/styles.ts +51 -0
- package/src/components/Dialog/index.tsx +304 -0
- package/src/components/Dialog/styles.ts +88 -0
- package/src/components/Form/FormLabelRoot.tsx +33 -0
- package/src/components/Form/FormLabelRoot.web.tsx +18 -0
- package/src/components/Form/FormRoot.tsx +19 -0
- package/src/components/Form/FormRoot.web.tsx +12 -0
- package/src/components/Form/index.tsx +272 -0
- package/src/components/Form/styles.ts +75 -0
- package/src/components/Heading/index.tsx +36 -0
- package/src/components/Heading/styles.tsx +26 -0
- package/src/components/Icon/index.tsx +54 -0
- package/src/components/IconButton/index.tsx +93 -0
- package/src/components/IconButton/styles.ts +131 -0
- package/src/components/Image/Image.tsx +77 -0
- package/src/components/Image/index.ts +1 -0
- package/src/components/Input/BaseInput.android.tsx +13 -0
- package/src/components/Input/index.tsx +9 -22
- package/src/components/Input/styles.ts +42 -37
- package/src/components/Link/index.tsx +83 -0
- package/src/components/Link/styles.ts +20 -0
- package/src/components/ProgressSegmented/index.tsx +81 -0
- package/src/components/ProgressSegmented/styles.ts +19 -0
- package/src/components/Select/SelectTriggerHost.tsx +4 -0
- package/src/components/Select/SelectTriggerHost.web.tsx +136 -0
- package/src/components/Select/index.tsx +14 -14
- package/src/components/Select/styles.ts +68 -75
- package/src/components/Stack/HStack.tsx +8 -19
- package/src/components/Stack/VStack.tsx +8 -23
- package/src/components/Stack/styles.ts +37 -0
- package/src/components/Switch/BaseSwitch.tsx +38 -0
- package/src/components/Switch/BaseSwitch.web.tsx +69 -0
- package/src/components/Switch/index.tsx +11 -0
- package/src/components/Switch/styles.ts +120 -0
- package/src/components/Text/index.tsx +16 -0
- package/src/components/Text/styles.tsx +26 -0
- package/src/components/VirtualizedList/index.tsx +19 -0
- package/src/components/index.ts +16 -0
- package/src/index.ts +3 -0
- package/src/metro/withCdxMetroConfig.ts +29 -0
- package/src/styles/index.ts +1 -0
- package/src/styles/primitives.ts +107 -0
- package/lib/commonjs/components/Text/Text.js +0 -30
- package/lib/commonjs/components/Text/Text.js.map +0 -1
- package/lib/module/components/Text/Text.js +0 -26
- package/lib/module/components/Text/Text.js.map +0 -1
- package/lib/typescript/components/Text/Text.d.ts +0 -11
- package/lib/typescript/components/Text/Text.d.ts.map +0 -1
- package/src/components/Text/Text.tsx +0 -58
- package/src/components/Text/index.ts +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","OMIT","Set","resolveChildren","children","pressed","filterDomProps","rest","entries","filter","key","fromEntries","webButtonLayoutStyle","display","flexDirection","alignItems","justifyContent","width","minWidth","textAlign","boxSizing","margin","font","lineHeight","WebkitAppearance","appearance","SelectTriggerHost","exports","forwardRef","props","ref","onPress","onPressIn","onPressOut","onHoverIn","onHoverOut","disabled","style","className","testID","domProps","flattened","StyleSheet","flatten","jsx","type","undefined","onClick","onPointerDown","onPointerUp","onPointerCancel","onMouseEnter","onMouseLeave","displayName"],"sourceRoot":"../../../../src","sources":["components/Select/SelectTriggerHost.web.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAA0C,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA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,GAAGjD,CAAqE,CAAC;MAClF;IACF,CAAE;IACFkE,aAAa,EAAGlE,CAAC,IAAK;MACpBkD,SAAS,GAAGlD,CAAuE,CAAC;IACtF,CAAE;IACFmE,WAAW,EAAGnE,CAAC,IAAK;MAClBmD,UAAU,GAAGnD,CAAwE,CAAC;IACxF,CAAE;IACFoE,eAAe,EAAGpE,CAAC,IAAK;MACtBmD,UAAU,GAAGnD,CAAwE,CAAC;IACxF,CAAE;IACFqE,YAAY,EAAGrE,CAAC,IAAK;MACnBoD,SAAS,GAAGpD,CAAuE,CAAC;IACtF,CAAE;IACFsE,YAAY,EAAGtE,CAAC,IAAK;MACnBqD,UAAU,GAAGrD,CAAwE,CAAC;IACxF,CAAE;IAAAsB,QAAA,EAEDD,eAAe,CAACC,QAAQ;EAAC,CACpB,CAAC;AAEb,CACF,CAAC;AAEDsB,iBAAiB,CAAC2B,WAAW,GAAG,mBAAmB","ignoreList":[]}
|
|
@@ -6,8 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.Select = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
+
var _icons = require("@cdx-ui/icons");
|
|
9
10
|
var _primitives = require("@cdx-ui/primitives");
|
|
10
11
|
var _utils = require("@cdx-ui/utils");
|
|
12
|
+
var _Icon = require("../Icon");
|
|
13
|
+
var _SelectTriggerHost = require("./SelectTriggerHost");
|
|
11
14
|
var _styles = require("./styles");
|
|
12
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
16
|
const SCOPE = 'SELECT';
|
|
@@ -15,7 +18,7 @@ const Root = (0, _utils.withStyleContext)(_reactNative.View, SCOPE);
|
|
|
15
18
|
const useSelectStyleContext = () => (0, _utils.useStyleContext)(SCOPE);
|
|
16
19
|
const SelectPrimitive = (0, _primitives.createSelect)({
|
|
17
20
|
Root,
|
|
18
|
-
Trigger:
|
|
21
|
+
Trigger: _SelectTriggerHost.SelectTriggerHost,
|
|
19
22
|
Value: _reactNative.Text,
|
|
20
23
|
Icon: _reactNative.View,
|
|
21
24
|
Content: _reactNative.View,
|
|
@@ -29,7 +32,7 @@ const SelectPrimitive = (0, _primitives.createSelect)({
|
|
|
29
32
|
|
|
30
33
|
const SelectRoot = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
31
34
|
variant = 'outline',
|
|
32
|
-
size = '
|
|
35
|
+
size = 'default',
|
|
33
36
|
className,
|
|
34
37
|
children,
|
|
35
38
|
style,
|
|
@@ -67,12 +70,14 @@ const SelectTrigger = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
67
70
|
variant,
|
|
68
71
|
size
|
|
69
72
|
}), className);
|
|
70
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
73
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(SelectPrimitive.Trigger, {
|
|
71
74
|
ref: ref,
|
|
72
75
|
className: computedClassName,
|
|
73
76
|
style: style,
|
|
74
77
|
...props,
|
|
75
|
-
children: children
|
|
78
|
+
children: [children, /*#__PURE__*/(0, _jsxRuntime.jsx)(SelectIcon, {
|
|
79
|
+
as: _icons.ArrowDropDown
|
|
80
|
+
})]
|
|
76
81
|
});
|
|
77
82
|
});
|
|
78
83
|
SelectTrigger.displayName = 'Select.Trigger';
|
|
@@ -87,11 +92,9 @@ const SelectValue = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
87
92
|
...props
|
|
88
93
|
}, ref) => {
|
|
89
94
|
const {
|
|
90
|
-
variant,
|
|
91
95
|
size
|
|
92
96
|
} = useSelectStyleContext();
|
|
93
97
|
const computedClassName = (0, _utils.cn)((0, _styles.selectValueVariants)({
|
|
94
|
-
variant,
|
|
95
98
|
size
|
|
96
99
|
}), className);
|
|
97
100
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(SelectPrimitive.Value, {
|
|
@@ -107,26 +110,23 @@ SelectValue.displayName = 'Select.Value';
|
|
|
107
110
|
// STYLED ICON COMPONENT
|
|
108
111
|
// =============================================================================
|
|
109
112
|
|
|
110
|
-
const SelectIcon =
|
|
113
|
+
const SelectIcon = ({
|
|
111
114
|
className,
|
|
112
115
|
style,
|
|
113
116
|
...props
|
|
114
|
-
}
|
|
117
|
+
}) => {
|
|
115
118
|
const {
|
|
116
|
-
variant,
|
|
117
119
|
size
|
|
118
120
|
} = useSelectStyleContext();
|
|
119
121
|
const computedClassName = (0, _utils.cn)((0, _styles.selectIconVariants)({
|
|
120
|
-
variant,
|
|
121
122
|
size
|
|
122
123
|
}), className);
|
|
123
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
124
|
-
ref: ref,
|
|
124
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
125
125
|
className: computedClassName,
|
|
126
126
|
style: style,
|
|
127
127
|
...props
|
|
128
128
|
});
|
|
129
|
-
}
|
|
129
|
+
};
|
|
130
130
|
SelectIcon.displayName = 'Select.Icon';
|
|
131
131
|
|
|
132
132
|
// =============================================================================
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_primitives","_utils","_styles","_jsxRuntime","SCOPE","Root","withStyleContext","View","useSelectStyleContext","useStyleContext","SelectPrimitive","createSelect","Trigger","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_icons","_primitives","_utils","_Icon","_SelectTriggerHost","_styles","_jsxRuntime","SCOPE","Root","withStyleContext","View","useSelectStyleContext","useStyleContext","SelectPrimitive","createSelect","Trigger","SelectTriggerHost","Value","Text","Icon","Content","Item","Pressable","ItemLabel","SelectRoot","forwardRef","variant","size","className","children","style","props","ref","jsx","context","displayName","SelectTrigger","computedClassName","cn","selectTriggerVariants","jsxs","SelectIcon","as","ArrowDropDown","SelectValue","selectValueVariants","selectIconVariants","SelectContent","selectContentVariants","SelectItem","selectItemVariants","SelectItemLabel","selectItemLabelVariants","Select","exports","Object","assign"],"sourceRoot":"../../../../src","sources":["components/Select/index.tsx"],"mappings":";;;;;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@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.selectValueVariants = exports.selectTriggerVariants = exports.selectItemVariants = exports.selectItemLabelVariants = exports.selectIconVariants = exports.selectContentVariants = void 0;
|
|
7
7
|
var _reactNative = require("react-native");
|
|
8
8
|
var _classVarianceAuthority = require("class-variance-authority");
|
|
9
|
+
var _primitives = require("../../styles/primitives");
|
|
9
10
|
// ── Trigger ─────────────────────────────────────────────────
|
|
10
11
|
|
|
11
|
-
const selectTriggerVariants = exports.selectTriggerVariants = (0, _classVarianceAuthority.cva)(['flex-row items-center justify-between
|
|
12
|
+
const selectTriggerVariants = exports.selectTriggerVariants = (0, _classVarianceAuthority.cva)(['flex w-full min-w-0 flex-row items-center justify-between text-start', _primitives.RADIUS_SM, _primitives.SHADOW_SM, _primitives.TRANSITION_COLORS, _primitives.COLOR_BG_PRIMARY, `border ${_primitives.COLOR_BORDER_DEFAULT}`, _primitives.DISABLED_OPACITY, _primitives.DISABLED_CURSOR, 'data-[readonly=true]:cursor-default', 'data-[state=open]:border-slate-900', 'data-[invalid=true]:border-red-500', 'data-[readonly=true]:bg-slate-50', _reactNative.Platform.select({
|
|
13
|
+
default: 'data-[active=true]:border-slate-300',
|
|
14
|
+
web: ['data-[hover=true]:border-slate-300 data-[active=true]:data-[hover=true]:border-slate-400', 'data-[focus-visible=true]:ring-2 data-[focus-visible=true]:ring-slate-400/50 data-[focus-visible=true]:ring-offset-2', 'data-[state=open]:ring-2 data-[state=open]:ring-slate-400/50'].join(' ')
|
|
15
|
+
})], {
|
|
12
16
|
variants: {
|
|
13
17
|
variant: {
|
|
14
|
-
outline: [
|
|
15
|
-
default: 'data-[active=true]:border-gray-400',
|
|
16
|
-
web: 'data-[hover=true]:border-gray-400 data-[active=true]:data-[hover=true]:border-gray-500'
|
|
17
|
-
}), 'data-[state=open]:data-[invalid=false]:border-blue-500', 'data-[invalid=true]:border-red-500', 'data-[readonly=true]:bg-gray-50'],
|
|
18
|
-
filled: ['bg-gray-100 border border-transparent', _reactNative.Platform.select({
|
|
19
|
-
default: 'data-[active=true]:bg-gray-200',
|
|
20
|
-
web: 'data-[hover=true]:bg-gray-200 data-[active=true]:data-[hover=true]:bg-gray-300'
|
|
21
|
-
}), 'data-[state=open]:border-blue-500', 'data-[invalid=true]:border-red-500 data-[invalid=true]:border', 'data-[readonly=true]:bg-gray-200'],
|
|
22
|
-
ghost: ['bg-transparent border border-transparent', _reactNative.Platform.select({
|
|
23
|
-
default: 'data-[active=true]:bg-gray-100',
|
|
24
|
-
web: 'data-[hover=true]:bg-gray-50 data-[active=true]:data-[hover=true]:bg-gray-100'
|
|
25
|
-
}), 'data-[invalid=true]:border-red-500 data-[invalid=true]:border']
|
|
18
|
+
outline: []
|
|
26
19
|
},
|
|
27
20
|
size: {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
lg: 'h-12 px-4 gap-2.5'
|
|
21
|
+
default: `${_primitives.SIZE_SCALE.default.height} ${_primitives.SIZE_SCALE.default.px} ${_primitives.SIZE_SCALE.default.gap}`,
|
|
22
|
+
small: `${_primitives.SIZE_SCALE.small.height} ${_primitives.SIZE_SCALE.small.px} ${_primitives.SIZE_SCALE.small.gap}`
|
|
31
23
|
}
|
|
32
24
|
},
|
|
33
25
|
defaultVariants: {
|
|
34
26
|
variant: 'outline',
|
|
35
|
-
size: '
|
|
27
|
+
size: 'default'
|
|
36
28
|
}
|
|
37
29
|
});
|
|
38
30
|
|
|
39
31
|
// ── Value ───────────────────────────────────────────────────
|
|
40
32
|
|
|
41
|
-
const selectValueVariants = exports.selectValueVariants = (0, _classVarianceAuthority.cva)(['flex-1', 'data-[placeholder=true]:text-
|
|
33
|
+
const selectValueVariants = exports.selectValueVariants = (0, _classVarianceAuthority.cva)(['min-w-0 flex-1 text-start', 'data-[placeholder=true]:text-slate-400', 'data-[invalid=true]:text-red-600', _primitives.COLOR_TEXT_PRIMARY], {
|
|
42
34
|
variants: {
|
|
43
|
-
variant: {
|
|
44
|
-
outline: 'text-gray-900',
|
|
45
|
-
filled: 'text-gray-900',
|
|
46
|
-
ghost: 'text-gray-900'
|
|
47
|
-
},
|
|
48
35
|
size: {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
lg: 'text-lg'
|
|
36
|
+
default: _primitives.SIZE_SCALE.default.text,
|
|
37
|
+
small: _primitives.SIZE_SCALE.small.text
|
|
52
38
|
}
|
|
53
39
|
},
|
|
54
40
|
defaultVariants: {
|
|
55
|
-
|
|
56
|
-
size: 'md'
|
|
41
|
+
size: 'default'
|
|
57
42
|
}
|
|
58
43
|
});
|
|
59
44
|
|
|
60
45
|
// ── Icon ────────────────────────────────────────────────────
|
|
61
46
|
|
|
62
|
-
const selectIconVariants = exports.selectIconVariants = (0, _classVarianceAuthority.cva)(['items-center justify-center', 'data-[invalid=true]:text-red-500'], {
|
|
47
|
+
const selectIconVariants = exports.selectIconVariants = (0, _classVarianceAuthority.cva)(['shrink-0 items-center justify-center self-center', _primitives.COLOR_TEXT_MUTED, 'data-[invalid=true]:text-red-500'], {
|
|
63
48
|
variants: {
|
|
64
|
-
variant: {
|
|
65
|
-
outline: 'text-gray-500',
|
|
66
|
-
filled: 'text-gray-500',
|
|
67
|
-
ghost: 'text-gray-400'
|
|
68
|
-
},
|
|
69
49
|
size: {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
lg: 'h-6 w-6'
|
|
50
|
+
default: 'h-5 w-5',
|
|
51
|
+
small: 'h-4 w-4'
|
|
73
52
|
}
|
|
74
53
|
},
|
|
75
54
|
defaultVariants: {
|
|
76
|
-
|
|
77
|
-
size: 'md'
|
|
55
|
+
size: 'default'
|
|
78
56
|
}
|
|
79
57
|
});
|
|
80
58
|
|
|
81
59
|
// ── Content ─────────────────────────────────────────────────
|
|
82
60
|
|
|
83
|
-
const selectContentVariants = exports.selectContentVariants = (0, _classVarianceAuthority.cva)([
|
|
84
|
-
web:
|
|
61
|
+
const selectContentVariants = exports.selectContentVariants = (0, _classVarianceAuthority.cva)([_primitives.COLOR_BG_PRIMARY, `border ${_primitives.COLOR_BORDER_DEFAULT}`, 'overflow-hidden', _primitives.RADIUS_MD, _reactNative.Platform.select({
|
|
62
|
+
web: _primitives.SHADOW_MD,
|
|
85
63
|
default: ''
|
|
86
64
|
}), 'max-h-60', 'py-1']);
|
|
87
65
|
|
|
88
66
|
// ── Item ────────────────────────────────────────────────────
|
|
89
67
|
|
|
90
|
-
const selectItemVariants = exports.selectItemVariants = (0, _classVarianceAuthority.cva)(['flex-row items-center', 'transition-colors duration-100', 'data-[disabled=true]:opacity-50 data-[disabled=true]:pointer-events-none', 'data-[state=checked]:bg-
|
|
91
|
-
default: 'data-[active=true]:bg-
|
|
92
|
-
web: 'data-[hover=true]:bg-
|
|
68
|
+
const selectItemVariants = exports.selectItemVariants = (0, _classVarianceAuthority.cva)(['flex-row items-center', 'transition-colors duration-100', 'data-[disabled=true]:opacity-50 data-[disabled=true]:pointer-events-none', 'data-[state=checked]:bg-slate-50 data-[state=checked]:font-medium', _reactNative.Platform.select({
|
|
69
|
+
default: 'data-[active=true]:bg-slate-100',
|
|
70
|
+
web: 'data-[hover=true]:bg-slate-50 data-[active=true]:data-[hover=true]:bg-slate-100 data-[highlighted=true]:bg-slate-50'
|
|
93
71
|
})], {
|
|
94
72
|
variants: {
|
|
95
73
|
size: {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
lg: 'px-4 py-2.5'
|
|
74
|
+
default: 'px-3 py-2',
|
|
75
|
+
small: 'px-2.5 py-1.5'
|
|
99
76
|
}
|
|
100
77
|
},
|
|
101
78
|
defaultVariants: {
|
|
102
|
-
size: '
|
|
79
|
+
size: 'default'
|
|
103
80
|
}
|
|
104
81
|
});
|
|
105
82
|
|
|
106
83
|
// ── ItemLabel ───────────────────────────────────────────────
|
|
107
84
|
|
|
108
|
-
const selectItemLabelVariants = exports.selectItemLabelVariants = (0, _classVarianceAuthority.cva)([
|
|
85
|
+
const selectItemLabelVariants = exports.selectItemLabelVariants = (0, _classVarianceAuthority.cva)([_primitives.COLOR_TEXT_PRIMARY, 'data-[state=checked]:font-medium'], {
|
|
109
86
|
variants: {
|
|
110
87
|
size: {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
lg: 'text-lg'
|
|
88
|
+
default: _primitives.SIZE_SCALE.default.text,
|
|
89
|
+
small: _primitives.SIZE_SCALE.small.text
|
|
114
90
|
}
|
|
115
91
|
},
|
|
116
92
|
defaultVariants: {
|
|
117
|
-
size: '
|
|
93
|
+
size: 'default'
|
|
118
94
|
}
|
|
119
95
|
});
|
|
120
96
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_classVarianceAuthority","selectTriggerVariants","exports","cva","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_classVarianceAuthority","_primitives","selectTriggerVariants","exports","cva","RADIUS_SM","SHADOW_SM","TRANSITION_COLORS","COLOR_BG_PRIMARY","COLOR_BORDER_DEFAULT","DISABLED_OPACITY","DISABLED_CURSOR","Platform","select","default","web","join","variants","variant","outline","size","SIZE_SCALE","height","px","gap","small","defaultVariants","selectValueVariants","COLOR_TEXT_PRIMARY","text","selectIconVariants","COLOR_TEXT_MUTED","selectContentVariants","RADIUS_MD","SHADOW_MD","selectItemVariants","selectItemLabelVariants"],"sourceRoot":"../../../../src","sources":["components/Select/styles.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAeA;;AAEO,MAAMG,qBAAqB,GAAAC,OAAA,CAAAD,qBAAA,GAAG,IAAAE,2BAAG,EACtC,CACE,sEAAsE,EACtEC,qBAAS,EACTC,qBAAS,EACTC,6BAAiB,EACjBC,4BAAgB,EAChB,UAAUC,gCAAoB,EAAE,EAChCC,4BAAgB,EAChBC,2BAAe,EACf,qCAAqC,EACrC,oCAAoC,EACpC,oCAAoC,EACpC,kCAAkC,EAClCC,qBAAQ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;EACDC,eAAe,EAAE;IACfN,IAAI,EAAE;EACR;AACF,CACF,CAAC;;AAED;;AAEO,MAAMY,qBAAqB,GAAA7B,OAAA,CAAA6B,qBAAA,GAAG,IAAA5B,2BAAG,EAAC,CACvCI,4BAAgB,EAChB,UAAUC,gCAAoB,EAAE,EAChC,iBAAiB,EACjBwB,qBAAS,EACTrB,qBAAQ,CAACC,MAAM,CAAC;EACdE,GAAG,EAAEmB,qBAAS;EACdpB,OAAO,EAAE;AACX,CAAC,CAAC,EACF,UAAU,EACV,MAAM,CACP,CAAC;;AAEF;;AAEO,MAAMqB,kBAAkB,GAAAhC,OAAA,CAAAgC,kBAAA,GAAG,IAAA/B,2BAAG,EACnC,CACE,uBAAuB,EACvB,gCAAgC,EAChC,0EAA0E,EAC1E,mEAAmE,EACnEQ,qBAAQ,CAACC,MAAM,CAAC;EACdC,OAAO,EAAE,iCAAiC;EAC1CC,GAAG,EAAE;AACP,CAAC,CAAC,CACH,EACD;EACEE,QAAQ,EAAE;IACRG,IAAI,EAAE;MACJN,OAAO,EAAE,WAAW;MACpBW,KAAK,EAAE;IACT;EACF,CAAC;EACDC,eAAe,EAAE;IACfN,IAAI,EAAE;EACR;AACF,CACF,CAAC;;AAED;;AAEO,MAAMgB,uBAAuB,GAAAjC,OAAA,CAAAiC,uBAAA,GAAG,IAAAhC,2BAAG,EACxC,CAACwB,8BAAkB,EAAE,kCAAkC,CAAC,EACxD;EACEX,QAAQ,EAAE;IACRG,IAAI,EAAE;MACJN,OAAO,EAAEO,sBAAU,CAACP,OAAO,CAACe,IAAI;MAChCJ,KAAK,EAAEJ,sBAAU,CAACI,KAAK,CAACI;IAC1B;EACF,CAAC;EACDH,eAAe,EAAE;IACfN,IAAI,EAAE;EACR;AACF,CACF,CAAC","ignoreList":[]}
|
|
@@ -6,37 +6,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.HStack = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
+
var _utils = require("@cdx-ui/utils");
|
|
10
|
+
var _styles = require("./styles");
|
|
9
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
// import { spacing } from '@cdx-ui/tokens';
|
|
11
|
-
|
|
12
|
-
// TODO: Integrate with tokens (multiply by spacing)
|
|
13
|
-
const spaceScale = {
|
|
14
|
-
xs: 1,
|
|
15
|
-
sm: 2,
|
|
16
|
-
md: 3,
|
|
17
|
-
lg: 4,
|
|
18
|
-
xl: 5,
|
|
19
|
-
'2xl': 6,
|
|
20
|
-
'3xl': 7,
|
|
21
|
-
'4xl': 8
|
|
22
|
-
};
|
|
23
12
|
const HStack = exports.HStack = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
13
|
+
reversed = false,
|
|
24
14
|
space,
|
|
25
|
-
reversed,
|
|
26
15
|
style,
|
|
27
16
|
className,
|
|
28
17
|
children,
|
|
29
18
|
...restProps
|
|
30
19
|
}, ref) => {
|
|
31
|
-
const gap = space ? spaceScale[space] : undefined;
|
|
32
20
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
33
21
|
ref: ref,
|
|
34
|
-
className:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
} : null, style],
|
|
22
|
+
className: (0, _utils.cn)((0, _styles.hStackRootVariants)({
|
|
23
|
+
reversed,
|
|
24
|
+
space
|
|
25
|
+
}), className),
|
|
26
|
+
style: style,
|
|
40
27
|
...restProps,
|
|
41
28
|
children: children
|
|
42
29
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_utils","_styles","_jsxRuntime","HStack","exports","forwardRef","reversed","space","style","className","children","restProps","ref","jsx","View","cn","hStackRootVariants","displayName"],"sourceRoot":"../../../../src","sources":["components/Stack/HStack.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAA+D,IAAAI,WAAA,GAAAJ,OAAA;AAQxD,MAAMK,MAAM,GAAAC,OAAA,CAAAD,MAAA,gBAAG,IAAAE,iBAAU,EAC9B,CACE;EAAEC,QAAQ,GAAG,KAAK;EAAEC,KAAK;EAAEC,KAAK;EAAEC,SAAS;EAAEC,QAAQ;EAAE,GAAGC;AAAU,CAAC,EACrEC,GAAuB,KACpB;EACH,oBACE,IAAAV,WAAA,CAAAW,GAAA,EAACd,YAAA,CAAAe,IAAI;IACHF,GAAG,EAAEA,GAAI;IACTH,SAAS,EAAE,IAAAM,SAAE,EAAC,IAAAC,0BAAkB,EAAC;MAAEV,QAAQ;MAAEC;IAAM,CAAC,CAAC,EAAEE,SAAS,CAAE;IAClED,KAAK,EAAEA,KAAM;IAAA,GACTG,SAAS;IAAAD,QAAA,EAEZA;EAAQ,CACL,CAAC;AAEX,CACF,CAAC;AAEDP,MAAM,CAACc,WAAW,GAAG,QAAQ","ignoreList":[]}
|
|
@@ -6,37 +6,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.VStack = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
+
var _utils = require("@cdx-ui/utils");
|
|
10
|
+
var _styles = require("./styles");
|
|
9
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
// import { spacing } from '@cdx-ui/tokens';
|
|
11
|
-
|
|
12
|
-
// TODO: Integrate with tokens (multiply by spacing)
|
|
13
|
-
const spaceScale = {
|
|
14
|
-
xs: 1,
|
|
15
|
-
sm: 2,
|
|
16
|
-
md: 3,
|
|
17
|
-
lg: 4,
|
|
18
|
-
xl: 5,
|
|
19
|
-
'2xl': 6,
|
|
20
|
-
'3xl': 7,
|
|
21
|
-
'4xl': 8
|
|
22
|
-
};
|
|
23
12
|
const VStack = exports.VStack = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
13
|
+
reversed = false,
|
|
24
14
|
space,
|
|
25
|
-
reversed,
|
|
26
15
|
style,
|
|
27
16
|
className,
|
|
28
17
|
children,
|
|
29
18
|
...restProps
|
|
30
19
|
}, ref) => {
|
|
31
|
-
const gap = space ? spaceScale[space] : undefined;
|
|
32
20
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
33
21
|
ref: ref,
|
|
34
|
-
className:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
} : null, style],
|
|
22
|
+
className: (0, _utils.cn)((0, _styles.vStackRootVariants)({
|
|
23
|
+
reversed,
|
|
24
|
+
space
|
|
25
|
+
}), className),
|
|
26
|
+
style: style,
|
|
40
27
|
...restProps,
|
|
41
28
|
children: children
|
|
42
29
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_utils","_styles","_jsxRuntime","VStack","exports","forwardRef","reversed","space","style","className","children","restProps","ref","jsx","View","cn","vStackRootVariants","displayName"],"sourceRoot":"../../../../src","sources":["components/Stack/VStack.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAA+D,IAAAI,WAAA,GAAAJ,OAAA;AAQxD,MAAMK,MAAM,GAAAC,OAAA,CAAAD,MAAA,gBAAG,IAAAE,iBAAU,EAC9B,CACE;EAAEC,QAAQ,GAAG,KAAK;EAAEC,KAAK;EAAEC,KAAK;EAAEC,SAAS;EAAEC,QAAQ;EAAE,GAAGC;AAAU,CAAC,EACrEC,GAAuB,KACpB;EACH,oBACE,IAAAV,WAAA,CAAAW,GAAA,EAACd,YAAA,CAAAe,IAAI;IACHF,GAAG,EAAEA,GAAI;IACTH,SAAS,EAAE,IAAAM,SAAE,EAAC,IAAAC,0BAAkB,EAAC;MAAEV,QAAQ;MAAEC;IAAM,CAAC,CAAC,EAAEE,SAAS,CAAE;IAClED,KAAK,EAAEA,KAAM;IAAA,GACTG,SAAS;IAAAD,QAAA,EAEZA;EAAQ,CACL,CAAC;AAEX,CACF,CAAC;AAEDP,MAAM,CAACc,WAAW,GAAG,QAAQ","ignoreList":[]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.vStackRootVariants = exports.hStackRootVariants = void 0;
|
|
7
|
+
var _classVarianceAuthority = require("class-variance-authority");
|
|
8
|
+
const spaceMap = {
|
|
9
|
+
xs: 'gap-1',
|
|
10
|
+
sm: 'gap-2',
|
|
11
|
+
md: 'gap-3',
|
|
12
|
+
lg: 'gap-4',
|
|
13
|
+
xl: 'gap-5'
|
|
14
|
+
};
|
|
15
|
+
const hStackRootVariants = exports.hStackRootVariants = (0, _classVarianceAuthority.cva)([], {
|
|
16
|
+
variants: {
|
|
17
|
+
reversed: {
|
|
18
|
+
true: 'flex-row-reverse',
|
|
19
|
+
false: 'flex-row'
|
|
20
|
+
},
|
|
21
|
+
space: spaceMap
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: {
|
|
24
|
+
reversed: false
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
const vStackRootVariants = exports.vStackRootVariants = (0, _classVarianceAuthority.cva)([], {
|
|
28
|
+
variants: {
|
|
29
|
+
reversed: {
|
|
30
|
+
true: 'flex-col-reverse',
|
|
31
|
+
false: 'flex-col'
|
|
32
|
+
},
|
|
33
|
+
space: spaceMap
|
|
34
|
+
},
|
|
35
|
+
defaultVariants: {
|
|
36
|
+
reversed: false
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_classVarianceAuthority","require","spaceMap","xs","sm","md","lg","xl","hStackRootVariants","exports","cva","variants","reversed","true","false","space","defaultVariants","vStackRootVariants"],"sourceRoot":"../../../../src","sources":["components/Stack/styles.ts"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,OAAA;AAIA,MAAMC,QAAQ,GAAG;EACfC,EAAE,EAAE,OAAO;EACXC,EAAE,EAAE,OAAO;EACXC,EAAE,EAAE,OAAO;EACXC,EAAE,EAAE,OAAO;EACXC,EAAE,EAAE;AACN,CAA+C;AAExC,MAAMC,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,GAAG,IAAAE,2BAAG,EAAC,EAAE,EAAE;EACxCC,QAAQ,EAAE;IACRC,QAAQ,EAAE;MACRC,IAAI,EAAE,kBAAkB;MACxBC,KAAK,EAAE;IACT,CAAC;IACDC,KAAK,EAAEb;EACT,CAAC;EACDc,eAAe,EAAE;IACfJ,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAEK,MAAMK,kBAAkB,GAAAR,OAAA,CAAAQ,kBAAA,GAAG,IAAAP,2BAAG,EAAC,EAAE,EAAE;EACxCC,QAAQ,EAAE;IACRC,QAAQ,EAAE;MACRC,IAAI,EAAE,kBAAkB;MACxBC,KAAK,EAAE;IACT,CAAC;IACDC,KAAK,EAAEb;EACT,CAAC;EACDc,eAAe,EAAE;IACfJ,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BaseSwitch = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _utils = require("@cdx-ui/utils");
|
|
10
|
+
var _styles = require("./styles");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
const BaseSwitch = exports.BaseSwitch = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
13
|
+
states,
|
|
14
|
+
className,
|
|
15
|
+
disabled,
|
|
16
|
+
value,
|
|
17
|
+
...props
|
|
18
|
+
}, ref) => {
|
|
19
|
+
const isChecked = value ?? states?.checked ?? false;
|
|
20
|
+
const isDisabled = disabled ?? states?.disabled ?? false;
|
|
21
|
+
const isInvalid = states?.invalid ?? false;
|
|
22
|
+
const uniwindProps = {
|
|
23
|
+
className,
|
|
24
|
+
thumbColorClassName: (0, _utils.cn)((0, _styles.switchThumbColorVariants)({
|
|
25
|
+
isDisabled
|
|
26
|
+
})),
|
|
27
|
+
trackColorOnClassName: (0, _utils.cn)((0, _styles.switchTrackOnVariants)({
|
|
28
|
+
isInvalid
|
|
29
|
+
})),
|
|
30
|
+
trackColorOffClassName: (0, _utils.cn)((0, _styles.switchTrackOffVariants)({
|
|
31
|
+
isInvalid
|
|
32
|
+
})),
|
|
33
|
+
ios_backgroundColorClassName: (0, _utils.cn)((0, _styles.switchIosBgVariants)({
|
|
34
|
+
isInvalid
|
|
35
|
+
}))
|
|
36
|
+
};
|
|
37
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Switch, {
|
|
38
|
+
ref: ref,
|
|
39
|
+
value: isChecked,
|
|
40
|
+
disabled: isDisabled,
|
|
41
|
+
...uniwindProps,
|
|
42
|
+
...props
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
BaseSwitch.displayName = 'BaseSwitch';
|
|
46
|
+
//# sourceMappingURL=BaseSwitch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_utils","_styles","_jsxRuntime","BaseSwitch","exports","forwardRef","states","className","disabled","value","props","ref","isChecked","checked","isDisabled","isInvalid","invalid","uniwindProps","thumbColorClassName","cn","switchThumbColorVariants","trackColorOnClassName","switchTrackOnVariants","trackColorOffClassName","switchTrackOffVariants","ios_backgroundColorClassName","switchIosBgVariants","jsx","Switch","displayName"],"sourceRoot":"../../../../src","sources":["components/Switch/BaseSwitch.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAKkB,IAAAI,WAAA,GAAAJ,OAAA;AASX,MAAMK,UAAU,GAAAC,OAAA,CAAAD,UAAA,gBAAG,IAAAE,iBAAU,EAClC,CAAC;EAAEC,MAAM;EAAEC,SAAS;EAAEC,QAAQ;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACzD,MAAMC,SAAS,GAAGH,KAAK,IAAIH,MAAM,EAAEO,OAAO,IAAI,KAAK;EACnD,MAAMC,UAAU,GAAGN,QAAQ,IAAIF,MAAM,EAAEE,QAAQ,IAAI,KAAK;EACxD,MAAMO,SAAS,GAAGT,MAAM,EAAEU,OAAO,IAAI,KAAK;EAE1C,MAAMC,YAAgD,GAAG;IACvDV,SAAS;IACTW,mBAAmB,EAAE,IAAAC,SAAE,EAAC,IAAAC,gCAAwB,EAAC;MAAEN;IAAW,CAAC,CAAC,CAAC;IACjEO,qBAAqB,EAAE,IAAAF,SAAE,EAAC,IAAAG,6BAAqB,EAAC;MAAEP;IAAU,CAAC,CAAC,CAAC;IAC/DQ,sBAAsB,EAAE,IAAAJ,SAAE,EAAC,IAAAK,8BAAsB,EAAC;MAAET;IAAU,CAAC,CAAC,CAAC;IACjEU,4BAA4B,EAAE,IAAAN,SAAE,EAAC,IAAAO,2BAAmB,EAAC;MAAEX;IAAU,CAAC,CAAC;EACrE,CAAC;EAED,oBACE,IAAAb,WAAA,CAAAyB,GAAA,EAAC5B,YAAA,CAAA6B,MAAQ;IAACjB,GAAG,EAAEA,GAAI;IAACF,KAAK,EAAEG,SAAU;IAACJ,QAAQ,EAAEM,UAAW;IAAA,GAAKG,YAAY;IAAA,GAAMP;EAAK,CAAG,CAAC;AAE/F,CACF,CAAC;AAEDP,UAAU,CAAC0B,WAAW,GAAG,YAAY","ignoreList":[]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BaseSwitch = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _utils = require("@cdx-ui/utils");
|
|
10
|
+
var _styles = require("./styles");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
const BaseSwitch = exports.BaseSwitch = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
13
|
+
value,
|
|
14
|
+
onValueChange,
|
|
15
|
+
disabled,
|
|
16
|
+
states,
|
|
17
|
+
dataSet,
|
|
18
|
+
className,
|
|
19
|
+
size = 'md',
|
|
20
|
+
onFocus,
|
|
21
|
+
onBlur,
|
|
22
|
+
...props
|
|
23
|
+
}, ref) => {
|
|
24
|
+
const isChecked = value ?? states?.checked ?? false;
|
|
25
|
+
const isDisabled = disabled ?? states?.disabled ?? false;
|
|
26
|
+
const isInvalid = states?.invalid ?? false;
|
|
27
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
28
|
+
ref: ref,
|
|
29
|
+
role: "switch",
|
|
30
|
+
"aria-checked": isChecked,
|
|
31
|
+
"aria-disabled": isDisabled,
|
|
32
|
+
disabled: isDisabled,
|
|
33
|
+
onPress: () => onValueChange?.(!isChecked),
|
|
34
|
+
onFocus: onFocus,
|
|
35
|
+
onBlur: onBlur,
|
|
36
|
+
tabIndex: 0,
|
|
37
|
+
className: (0, _utils.cn)((0, _styles.switchTrackVariants)({
|
|
38
|
+
size
|
|
39
|
+
}), (0, _styles.switchWebTrackColorVariants)({
|
|
40
|
+
isChecked,
|
|
41
|
+
isInvalid
|
|
42
|
+
}), className)
|
|
43
|
+
// @ts-expect-error dataSet is a RNW/Uniwind prop not in Pressable types
|
|
44
|
+
,
|
|
45
|
+
dataSet: dataSet,
|
|
46
|
+
...props,
|
|
47
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
48
|
+
className: (0, _utils.cn)((0, _styles.switchThumbVariants)({
|
|
49
|
+
size,
|
|
50
|
+
isChecked
|
|
51
|
+
}))
|
|
52
|
+
})
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
BaseSwitch.displayName = 'BaseSwitch';
|
|
56
|
+
//# sourceMappingURL=BaseSwitch.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_utils","_styles","_jsxRuntime","BaseSwitch","exports","forwardRef","value","onValueChange","disabled","states","dataSet","className","size","onFocus","onBlur","props","ref","isChecked","checked","isDisabled","isInvalid","invalid","jsx","Pressable","role","onPress","tabIndex","cn","switchTrackVariants","switchWebTrackColorVariants","children","View","switchThumbVariants","displayName"],"sourceRoot":"../../../../src","sources":["components/Switch/BaseSwitch.web.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAKkB,IAAAI,WAAA,GAAAJ,OAAA;AAcX,MAAMK,UAAU,GAAAC,OAAA,CAAAD,UAAA,gBAAG,IAAAE,iBAAU,EAClC,CACE;EACEC,KAAK;EACLC,aAAa;EACbC,QAAQ;EACRC,MAAM;EACNC,OAAO;EACPC,SAAS;EACTC,IAAI,GAAG,IAAI;EACXC,OAAO;EACPC,MAAM;EACN,GAAGC;AACL,CAAC,EACDC,GAAG,KACA;EACH,MAAMC,SAAS,GAAGX,KAAK,IAAIG,MAAM,EAAES,OAAO,IAAI,KAAK;EACnD,MAAMC,UAAU,GAAGX,QAAQ,IAAIC,MAAM,EAAED,QAAQ,IAAI,KAAK;EACxD,MAAMY,SAAS,GAAGX,MAAM,EAAEY,OAAO,IAAI,KAAK;EAE1C,oBACE,IAAAnB,WAAA,CAAAoB,GAAA,EAACvB,YAAA,CAAAwB,SAAS;IACRP,GAAG,EAAEA,GAAI;IACTQ,IAAI,EAAC,QAAQ;IACb,gBAAcP,SAAU;IACxB,iBAAeE,UAAW;IAC1BX,QAAQ,EAAEW,UAAW;IACrBM,OAAO,EAAEA,CAAA,KAAMlB,aAAa,GAAG,CAACU,SAAS,CAAE;IAC3CJ,OAAO,EAAEA,OAAQ;IACjBC,MAAM,EAAEA,MAAO;IACfY,QAAQ,EAAE,CAAE;IACZf,SAAS,EAAE,IAAAgB,SAAE,EACX,IAAAC,2BAAmB,EAAC;MAAEhB;IAAK,CAAC,CAAC,EAC7B,IAAAiB,mCAA2B,EAAC;MAAEZ,SAAS;MAAEG;IAAU,CAAC,CAAC,EACrDT,SACF;IACA;IAAA;IACAD,OAAO,EAAEA,OAAQ;IAAA,GACbK,KAAK;IAAAe,QAAA,eAET,IAAA5B,WAAA,CAAAoB,GAAA,EAACvB,YAAA,CAAAgC,IAAI;MAACpB,SAAS,EAAE,IAAAgB,SAAE,EAAC,IAAAK,2BAAmB,EAAC;QAAEpB,IAAI;QAAEK;MAAU,CAAC,CAAC;IAAE,CAAE;EAAC,CACxD,CAAC;AAEhB,CACF,CAAC;AAEDd,UAAU,CAAC8B,WAAW,GAAG,YAAY","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Switch = void 0;
|
|
7
|
+
var _primitives = require("@cdx-ui/primitives");
|
|
8
|
+
var _BaseSwitch = require("./BaseSwitch");
|
|
9
|
+
const SwitchPrimitive = (0, _primitives.createSwitch)({
|
|
10
|
+
Root: _BaseSwitch.BaseSwitch
|
|
11
|
+
});
|
|
12
|
+
const Switch = exports.Switch = SwitchPrimitive;
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_primitives","require","_BaseSwitch","SwitchPrimitive","createSwitch","Root","BaseSwitch","Switch","exports"],"sourceRoot":"../../../../src","sources":["components/Switch/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAGA,MAAME,eAAe,GAAG,IAAAC,wBAAY,EAAC;EAAEC,IAAI,EAAEC;AAAW,CAAC,CAAC;AAMnD,MAAMC,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAGJ,eAAe","ignoreList":[]}
|