@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,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Thin wrapper around React Native's `Image`.
|
|
5
|
+
*
|
|
6
|
+
* Design-system layout (sizes, radii, loading/error UI) is intentionally
|
|
7
|
+
* NOT baked in here — use purpose-built components like `Avatar` instead.
|
|
8
|
+
*
|
|
9
|
+
* What this wrapper adds over a raw RN `Image`:
|
|
10
|
+
* - Accepts a plain URI **string** as `source` (auto-normalized to `{ uri }`).
|
|
11
|
+
* - Extends the prop surface with **web-only** HTML attributes (`sizes`,
|
|
12
|
+
* `loading`, `decoding`, etc.) for better `react-native-web` support.
|
|
13
|
+
* Props already covered by RN 0.81+ (`alt`, `srcSet`, `crossOrigin`,
|
|
14
|
+
* `referrerPolicy`) are inherited from the native typings.
|
|
15
|
+
* - All other props and `ref` are forwarded to the underlying `Image`.
|
|
16
|
+
*
|
|
17
|
+
* Inspired by Expo's html-elements Image primitive:
|
|
18
|
+
* @see https://github.com/expo/expo/blob/main/packages/html-elements/src/primitives/Image.tsx
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
import { forwardRef } from 'react';
|
|
22
|
+
import { Image as RNImage } from 'react-native';
|
|
23
|
+
|
|
24
|
+
/** Coerces a plain URI string into the `{ uri }` shape RN expects. */
|
|
25
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
26
|
+
function normalizeSource(source) {
|
|
27
|
+
if (typeof source === 'string') {
|
|
28
|
+
return {
|
|
29
|
+
uri: source
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
return source;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// ---------------------------------------------------------------------------
|
|
36
|
+
// Web-oriented props not yet covered by react-native's Image typings.
|
|
37
|
+
// Props already present in RN 0.81+ (alt, srcSet, crossOrigin,
|
|
38
|
+
// referrerPolicy) are inherited from the native Image props.
|
|
39
|
+
// ---------------------------------------------------------------------------
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* HTML-ish attributes not in RN’s core typings. Forwarded to `Image` with `...props`;
|
|
43
|
+
* **react-native-web** maps supported ones to the DOM `<img>`. On iOS/Android they are
|
|
44
|
+
* typically ignored (no visual effect).
|
|
45
|
+
*/
|
|
46
|
+
|
|
47
|
+
// ---------------------------------------------------------------------------
|
|
48
|
+
// ImageProps = native Image props (minus `source`) + WebImageProps + our overrides.
|
|
49
|
+
// `source` is re-declared to also accept a plain string.
|
|
50
|
+
// ---------------------------------------------------------------------------
|
|
51
|
+
|
|
52
|
+
// ---------------------------------------------------------------------------
|
|
53
|
+
// Component
|
|
54
|
+
// ---------------------------------------------------------------------------
|
|
55
|
+
|
|
56
|
+
export const Image = /*#__PURE__*/forwardRef(function Image({
|
|
57
|
+
source,
|
|
58
|
+
...props
|
|
59
|
+
}, ref) {
|
|
60
|
+
return /*#__PURE__*/_jsx(RNImage, {
|
|
61
|
+
source: normalizeSource(source),
|
|
62
|
+
...props,
|
|
63
|
+
ref: ref
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
Image.displayName = 'Image';
|
|
67
|
+
//# sourceMappingURL=Image.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","Image","RNImage","jsx","_jsx","normalizeSource","source","uri","props","ref","displayName"],"sourceRoot":"../../../../src","sources":["components/Image/Image.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,QAA0D,OAAO;AACpF,SAASC,KAAK,IAAIC,OAAO,QAAkC,cAAc;;AAEzE;AAAA,SAAAC,GAAA,IAAAC,IAAA;AACA,SAASC,eAAeA,CAACC,MAAoC,EAAuB;EAClF,IAAI,OAAOA,MAAM,KAAK,QAAQ,EAAE;IAC9B,OAAO;MAAEC,GAAG,EAAED;IAAO,CAAC;EACxB;EACA,OAAOA,MAAM;AACf;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAcA;AACA;AACA;AACA;;AASA;AACA;AACA;;AAEA,OAAO,MAAML,KAAK,gBAAGD,UAAU,CAA2C,SAASC,KAAKA,CACtF;EAAEK,MAAM;EAAE,GAAGE;AAAM,CAAC,EACpBC,GAAG,EACH;EACA,oBAAOL,IAAA,CAACF,OAAO;IAACI,MAAM,EAAED,eAAe,CAACC,MAAM,CAAE;IAAA,GAAKE,KAAK;IAAEC,GAAG,EAAEA;EAAI,CAAE,CAAC;AAC1E,CAAC,CAAC;AAEFR,KAAK,CAACS,WAAW,GAAG,OAAO","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Image"],"sourceRoot":"../../../../src","sources":["components/Image/index.ts"],"mappings":";;AAAA,SAASA,KAAK,QAA6C,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { TextInput } from 'react-native';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
const androidDefaults = {
|
|
7
|
+
includeFontPadding: false,
|
|
8
|
+
textAlignVertical: 'center'
|
|
9
|
+
};
|
|
10
|
+
export const BaseInput = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/_jsx(TextInput, {
|
|
11
|
+
ref: ref,
|
|
12
|
+
...props,
|
|
13
|
+
style: [androidDefaults, props.style]
|
|
14
|
+
}));
|
|
15
|
+
BaseInput.displayName = 'BaseInput';
|
|
16
|
+
//# sourceMappingURL=BaseInput.android.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","TextInput","jsx","_jsx","androidDefaults","includeFontPadding","textAlignVertical","BaseInput","props","ref","style","displayName"],"sourceRoot":"../../../../src","sources":["components/Input/BaseInput.android.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,SAAS,QAA6B,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE9D,MAAMC,eAAe,GAAG;EACtBC,kBAAkB,EAAE,KAAK;EACzBC,iBAAiB,EAAE;AACrB,CAAC;AAED,OAAO,MAAMC,SAAS,gBAAGP,UAAU,CAA4B,CAACQ,KAAK,EAAEC,GAAG,kBACxEN,IAAA,CAACF,SAAS;EAACQ,GAAG,EAAEA,GAAI;EAAA,GAAKD,KAAK;EAAEE,KAAK,EAAE,CAACN,eAAe,EAAEI,KAAK,CAACE,KAAK;AAAE,CAAE,CACzE,CAAC;AAEFH,SAAS,CAACI,WAAW,GAAG,WAAW","ignoreList":[]}
|
|
@@ -4,6 +4,7 @@ import { forwardRef } from 'react';
|
|
|
4
4
|
import { View } from 'react-native';
|
|
5
5
|
import { createInput } from '@cdx-ui/primitives';
|
|
6
6
|
import { cn, useStyleContext, withStyleContext } from '@cdx-ui/utils';
|
|
7
|
+
import { Icon } from '../Icon';
|
|
7
8
|
import { BaseInput } from './BaseInput';
|
|
8
9
|
import { inputFieldPlaceholderVariants, inputFieldVariants, inputIconVariants, inputRootVariants, inputSlotVariants } from './styles';
|
|
9
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -12,7 +13,6 @@ const Root = withStyleContext(View, SCOPE);
|
|
|
12
13
|
const useInputStyleContext = () => useStyleContext(SCOPE);
|
|
13
14
|
const InputPrimitive = createInput({
|
|
14
15
|
Root,
|
|
15
|
-
Icon: View,
|
|
16
16
|
Slot: View,
|
|
17
17
|
Field: BaseInput
|
|
18
18
|
});
|
|
@@ -23,7 +23,7 @@ const InputPrimitive = createInput({
|
|
|
23
23
|
|
|
24
24
|
const InputRoot = /*#__PURE__*/forwardRef(({
|
|
25
25
|
variant = 'outline',
|
|
26
|
-
size = '
|
|
26
|
+
size = 'default',
|
|
27
27
|
className,
|
|
28
28
|
children,
|
|
29
29
|
style,
|
|
@@ -84,12 +84,7 @@ const InputSlot = /*#__PURE__*/forwardRef(({
|
|
|
84
84
|
style,
|
|
85
85
|
...props
|
|
86
86
|
}, ref) => {
|
|
87
|
-
const
|
|
88
|
-
size
|
|
89
|
-
} = useInputStyleContext();
|
|
90
|
-
const computedClassName = cn(inputSlotVariants({
|
|
91
|
-
size
|
|
92
|
-
}), className);
|
|
87
|
+
const computedClassName = cn(inputSlotVariants(), className);
|
|
93
88
|
return /*#__PURE__*/_jsx(InputPrimitive.Slot, {
|
|
94
89
|
ref: ref,
|
|
95
90
|
className: computedClassName,
|
|
@@ -104,26 +99,25 @@ InputSlot.displayName = 'Input.Slot';
|
|
|
104
99
|
// INPUT ICON
|
|
105
100
|
// =============================================================================
|
|
106
101
|
|
|
107
|
-
const InputIcon =
|
|
102
|
+
const InputIcon = ({
|
|
108
103
|
className,
|
|
109
|
-
children,
|
|
110
104
|
style,
|
|
105
|
+
as,
|
|
111
106
|
...props
|
|
112
|
-
}
|
|
107
|
+
}) => {
|
|
113
108
|
const {
|
|
114
109
|
size
|
|
115
110
|
} = useInputStyleContext();
|
|
116
111
|
const computedClassName = cn(inputIconVariants({
|
|
117
112
|
size
|
|
118
113
|
}), className);
|
|
119
|
-
return /*#__PURE__*/_jsx(
|
|
120
|
-
|
|
114
|
+
return /*#__PURE__*/_jsx(Icon, {
|
|
115
|
+
as: as,
|
|
121
116
|
className: computedClassName,
|
|
122
117
|
style: style,
|
|
123
|
-
...props
|
|
124
|
-
children: children
|
|
118
|
+
...props
|
|
125
119
|
});
|
|
126
|
-
}
|
|
120
|
+
};
|
|
127
121
|
InputIcon.displayName = 'Input.Icon';
|
|
128
122
|
|
|
129
123
|
// =============================================================================
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","View","createInput","cn","useStyleContext","withStyleContext","BaseInput","inputFieldPlaceholderVariants","inputFieldVariants","inputIconVariants","inputRootVariants","inputSlotVariants","jsx","_jsx","SCOPE","Root","useInputStyleContext","InputPrimitive","
|
|
1
|
+
{"version":3,"names":["forwardRef","View","createInput","cn","useStyleContext","withStyleContext","Icon","BaseInput","inputFieldPlaceholderVariants","inputFieldVariants","inputIconVariants","inputRootVariants","inputSlotVariants","jsx","_jsx","SCOPE","Root","useInputStyleContext","InputPrimitive","Slot","Field","InputRoot","variant","size","className","children","style","props","ref","computedClassName","context","displayName","InputField","placeholderTextColorClassName","rest","computedPlaceholderColorClassName","InputSlot","InputIcon","as","Input","Object","assign"],"sourceRoot":"../../../../src","sources":["components/Input/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAwB,OAAO;AAClD,SAAyBC,IAAI,QAAwB,cAAc;AACnE,SACEC,WAAW,QAIN,oBAAoB;AAC3B,SAASC,EAAE,EAAEC,eAAe,EAAEC,gBAAgB,QAAQ,eAAe;AACrE,SAASC,IAAI,QAAmB,SAAS;AACzC,SAASC,SAAS,QAAQ,aAAa;AACvC,SAEEC,6BAA6B,EAC7BC,kBAAkB,EAClBC,iBAAiB,EACjBC,iBAAiB,EACjBC,iBAAiB,QACZ,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAElB,MAAMC,KAAK,GAAG,OAAO;AAErB,MAAMC,IAAI,GAAGX,gBAAgB,CAACJ,IAAI,EAAEc,KAAK,CAAC;AAE1C,MAAME,oBAAoB,GAAGA,CAAA,KAAMb,eAAe,CAACW,KAAK,CAAsB;AAE9E,MAAMG,cAAc,GAAGhB,WAAW,CAAC;EACjCc,IAAI;EACJG,IAAI,EAAElB,IAAI;EACVmB,KAAK,EAAEb;AACT,CAAC,CAAC;;AAEF;AACA;AACA;;AAOA,MAAMc,SAAS,gBAAGrB,UAAU,CAC1B,CAAC;EAAEsB,OAAO,GAAG,SAAS;EAAEC,IAAI,GAAG,SAAS;EAAEC,SAAS;EAAEC,QAAQ;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACxF,MAAMC,iBAAiB,GAAG1B,EAAE,CAACQ,iBAAiB,CAAC;IAAEW,OAAO;IAAEC;EAAK,CAAC,CAAC,EAAEC,SAAS,CAAC;EAE7E,oBACEV,IAAA,CAACI,cAAc;IACbU,GAAG,EAAEA,GAAI;IACTJ,SAAS,EAAEK,iBAAkB;IAC7BH,KAAK,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AAC;AAE1B,CACF,CAAC;AAEDW,SAAS,CAACL,WAAW,GAAG,YAAY;;AAEpC;AACA;AACA;;AAIA,MAAMM,SAAS,GAAGA,CAAC;EAAEb,SAAS;EAAEE,KAAK;EAAEY,EAAE;EAAE,GAAGX;AAAsB,CAAC,KAAK;EACxE,MAAM;IAAEJ;EAAK,CAAC,GAAGN,oBAAoB,CAAC,CAAC;EAEvC,MAAMY,iBAAiB,GAAG1B,EAAE,CAACO,iBAAiB,CAAC;IAAEa;EAAK,CAAC,CAAC,EAAEC,SAAS,CAAC;EAEpE,oBAAOV,IAAA,CAACR,IAAI;IAACgC,EAAE,EAAEA,EAAG;IAACd,SAAS,EAAEK,iBAAkB;IAACH,KAAK,EAAEA,KAAM;IAAA,GAAKC;EAAK,CAAG,CAAC;AAChF,CAAC;AAEDU,SAAS,CAACN,WAAW,GAAG,YAAY;;AAEpC;AACA;AACA;;AAQA,OAAO,MAAMQ,KAAK,GAAGC,MAAM,CAACC,MAAM,CAACpB,SAAS,EAAE;EAC5CD,KAAK,EAAEY,UAAU;EACjBb,IAAI,EAAEiB,SAAS;EACf9B,IAAI,EAAE+B;AACR,CAAC,CAA2B","ignoreList":[]}
|
|
@@ -1,58 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { cva } from 'class-variance-authority';
|
|
4
|
-
|
|
4
|
+
import { COLOR_BG_PRIMARY, COLOR_BORDER_DEFAULT, COLOR_TEXT_MUTED, COLOR_TEXT_PRIMARY, DISABLED_CURSOR, DISABLED_OPACITY, RADIUS_SM, SHADOW_SM, SIZE_SCALE, TRANSITION_COLORS } from '../../styles/primitives';
|
|
5
|
+
export const inputRootVariants = cva(['w-full flex-row items-stretch border', COLOR_BG_PRIMARY, COLOR_BORDER_DEFAULT, RADIUS_SM, SHADOW_SM, TRANSITION_COLORS, DISABLED_OPACITY, DISABLED_CURSOR, 'data-[disabled=true]:bg-slate-50 data-[disabled=true]:border-slate-300', 'data-[readonly=true]:cursor-default', 'data-[readonly=true]:bg-slate-50', 'web:data-[hover=true]:data-[active=false]:border-slate-300', 'data-[focus=true]:border-slate-900', 'data-[invalid=true]:border-red-500'], {
|
|
5
6
|
variants: {
|
|
6
7
|
variant: {
|
|
7
|
-
outline: ['
|
|
8
|
-
underlined: 'rounded-none border-t-0 border-l-0 border-r-0 border-b-neutral-border data-[focus=true]:border-b-interactive-focus shadow-none'
|
|
8
|
+
outline: ['web:focus-within:border-slate-900 web:focus-within:ring-2 web:focus-within:ring-slate-400/50 web:focus-within:ring-offset-0', 'web:data-[invalid=true]:focus-within:border-red-500 web:data-[invalid=true]:focus-within:ring-2 web:data-[invalid=true]:focus-within:ring-red-400/50']
|
|
9
9
|
},
|
|
10
10
|
size: {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
lg: 'h-12 py-2'
|
|
11
|
+
default: `${SIZE_SCALE.default.height} ${SIZE_SCALE.default.px} py-2 ${SIZE_SCALE.default.gap}`,
|
|
12
|
+
small: `${SIZE_SCALE.small.height} ${SIZE_SCALE.small.px} py-1.5 ${SIZE_SCALE.small.gap}`
|
|
14
13
|
}
|
|
15
14
|
},
|
|
16
15
|
defaultVariants: {
|
|
17
16
|
variant: 'outline',
|
|
18
|
-
size: '
|
|
17
|
+
size: 'default'
|
|
19
18
|
}
|
|
20
19
|
});
|
|
21
|
-
export const inputFieldVariants = cva(['flex-1 bg-transparent
|
|
20
|
+
export const inputFieldVariants = cva(['flex-1 justify-center bg-transparent p-0', COLOR_TEXT_PRIMARY, 'placeholder:text-slate-400', 'web:outline-none'], {
|
|
22
21
|
variants: {
|
|
23
22
|
size: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
lg: 'text-lg leading-none'
|
|
23
|
+
default: 'text-[1rem]',
|
|
24
|
+
small: 'text-[0.875rem]'
|
|
27
25
|
}
|
|
28
26
|
},
|
|
29
27
|
defaultVariants: {
|
|
30
|
-
size: '
|
|
28
|
+
size: 'default'
|
|
31
29
|
}
|
|
32
30
|
});
|
|
33
|
-
export const inputSlotVariants = cva(['items-center justify-center']
|
|
31
|
+
export const inputSlotVariants = cva(['items-center justify-center self-center']);
|
|
32
|
+
export const inputIconVariants = cva([COLOR_TEXT_MUTED], {
|
|
34
33
|
variants: {
|
|
35
34
|
size: {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
lg: 'h-6 w-6'
|
|
35
|
+
default: 'size-5',
|
|
36
|
+
small: 'size-4'
|
|
39
37
|
}
|
|
40
38
|
},
|
|
41
39
|
defaultVariants: {
|
|
42
|
-
size: '
|
|
40
|
+
size: 'default'
|
|
43
41
|
}
|
|
44
42
|
});
|
|
45
|
-
export const
|
|
46
|
-
variants: {
|
|
47
|
-
size: {
|
|
48
|
-
sm: 'h-4 w-4',
|
|
49
|
-
md: 'h-5 w-5',
|
|
50
|
-
lg: 'h-5 w-5'
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
defaultVariants: {
|
|
54
|
-
size: 'sm'
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
export const inputFieldPlaceholderVariants = cva(['accent-neutral-placeholder']);
|
|
43
|
+
export const inputFieldPlaceholderVariants = cva(['accent-slate-400']);
|
|
58
44
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["cva","inputRootVariants","variants","variant","outline","
|
|
1
|
+
{"version":3,"names":["cva","COLOR_BG_PRIMARY","COLOR_BORDER_DEFAULT","COLOR_TEXT_MUTED","COLOR_TEXT_PRIMARY","DISABLED_CURSOR","DISABLED_OPACITY","RADIUS_SM","SHADOW_SM","SIZE_SCALE","TRANSITION_COLORS","inputRootVariants","variants","variant","outline","size","default","height","px","gap","small","defaultVariants","inputFieldVariants","inputSlotVariants","inputIconVariants","inputFieldPlaceholderVariants"],"sourceRoot":"../../../../src","sources":["components/Input/styles.ts"],"mappings":";;AAAA,SAASA,GAAG,QAA2B,0BAA0B;AACjE,SACEC,gBAAgB,EAChBC,oBAAoB,EACp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iBAAiB,GAAGxB,GAAG,CAAC,CAACG,gBAAgB,CAAC,EAAE;EACvDS,QAAQ,EAAE;IACRG,IAAI,EAAE;MACJC,OAAO,EAAE,QAAQ;MACjBI,KAAK,EAAE;IACT;EACF,CAAC;EACDC,eAAe,EAAE;IACfN,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAEF,OAAO,MAAMU,6BAA6B,GAAGzB,GAAG,CAAC,CAAC,kBAAkB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { Pressable, Text as RNText } from 'react-native';
|
|
5
|
+
import { createLink } from '@cdx-ui/primitives';
|
|
6
|
+
import { cn } from '@cdx-ui/utils';
|
|
7
|
+
import { Icon } from '../Icon';
|
|
8
|
+
import { linkRootVariants, linkLabelVariants, linkIconVariants } from './styles';
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
export { LinkProvider } from '@cdx-ui/primitives';
|
|
11
|
+
const LinkPrimitive = createLink({
|
|
12
|
+
Root: Pressable
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
// =============================================================================
|
|
16
|
+
// STYLED ROOT COMPONENT
|
|
17
|
+
// =============================================================================
|
|
18
|
+
|
|
19
|
+
const LinkRoot = /*#__PURE__*/forwardRef(({
|
|
20
|
+
className,
|
|
21
|
+
children,
|
|
22
|
+
style,
|
|
23
|
+
...props
|
|
24
|
+
}, ref) => {
|
|
25
|
+
const rootClassName = cn(linkRootVariants(), className);
|
|
26
|
+
return /*#__PURE__*/_jsx(LinkPrimitive, {
|
|
27
|
+
ref: ref,
|
|
28
|
+
className: rootClassName,
|
|
29
|
+
style: style,
|
|
30
|
+
...props,
|
|
31
|
+
children: children
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
LinkRoot.displayName = 'Link';
|
|
35
|
+
|
|
36
|
+
// =============================================================================
|
|
37
|
+
// STYLED LABEL COMPONENT
|
|
38
|
+
// =============================================================================
|
|
39
|
+
|
|
40
|
+
const LinkLabel = /*#__PURE__*/forwardRef(({
|
|
41
|
+
className,
|
|
42
|
+
children,
|
|
43
|
+
style,
|
|
44
|
+
...props
|
|
45
|
+
}, ref) => {
|
|
46
|
+
const computedClassName = cn(linkLabelVariants(), className);
|
|
47
|
+
return /*#__PURE__*/_jsx(RNText, {
|
|
48
|
+
ref: ref,
|
|
49
|
+
className: computedClassName,
|
|
50
|
+
style: style,
|
|
51
|
+
...props,
|
|
52
|
+
children: children
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
LinkLabel.displayName = 'Link.Label';
|
|
56
|
+
|
|
57
|
+
// =============================================================================
|
|
58
|
+
// STYLED ICON COMPONENT
|
|
59
|
+
// =============================================================================
|
|
60
|
+
|
|
61
|
+
const LinkIcon = ({
|
|
62
|
+
className,
|
|
63
|
+
style,
|
|
64
|
+
as,
|
|
65
|
+
...props
|
|
66
|
+
}) => {
|
|
67
|
+
const computedClassName = cn(linkIconVariants(), className);
|
|
68
|
+
return /*#__PURE__*/_jsx(Icon, {
|
|
69
|
+
as: as,
|
|
70
|
+
className: computedClassName,
|
|
71
|
+
style: style,
|
|
72
|
+
...props
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
LinkIcon.displayName = 'Link.Icon';
|
|
76
|
+
|
|
77
|
+
// =============================================================================
|
|
78
|
+
// COMPOUND COMPONENT EXPORT
|
|
79
|
+
// =============================================================================
|
|
80
|
+
|
|
81
|
+
export const Link = Object.assign(LinkRoot, {
|
|
82
|
+
Label: LinkLabel,
|
|
83
|
+
Icon: LinkIcon
|
|
84
|
+
});
|
|
85
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","Pressable","Text","RNText","createLink","cn","Icon","linkRootVariants","linkLabelVariants","linkIconVariants","jsx","_jsx","LinkProvider","LinkPrimitive","Root","LinkRoot","className","children","style","props","ref","rootClassName","displayName","LinkLabel","computedClassName","LinkIcon","as","Link","Object","assign","Label"],"sourceRoot":"../../../../src","sources":["components/Link/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAwB,OAAO;AAClD,SAASC,SAAS,EAAEC,IAAI,IAAIC,MAAM,QAAmC,cAAc;AACnF,SAASC,UAAU,QAAyB,oBAAoB;AAChE,SAASC,EAAE,QAAQ,eAAe;AAClC,SAASC,IAAI,QAAwB,SAAS;AAC9C,SAASC,gBAAgB,EAAEC,iBAAiB,EAAEC,gBAAgB,QAAQ,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEjF,SAASC,YAAY,QAA0C,oBAAoB;AAEnF,MAAMC,aAAa,GAAGT,UAAU,CAAC;EAC/BU,IAAI,EAAEb;AACR,CAAC,CAAC;;AAEF;AACA;AACA;;AAMA,MAAMc,QAAQ,gBAAGf,UAAU,CAAkB,CAAC;EAAEgB,SAAS;EAAEC,QAAQ;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EAC9F,MAAMC,aAAa,GAAGhB,EAAE,CAACE,gBAAgB,CAAC,CAAC,EAAES,SAAS,CAAC;EAEvD,oBACEL,IAAA,CAACE,aAAa;IAACO,GAAG,EAAEA,GAAI;IAACJ,SAAS,EAAEK,aAAc;IAACH,KAAK,EAAEA,KAAM;IAAA,GAAKC,KAAK;IAAAF,QAAA,EACvEA;EAAQ,CACI,CAAC;AAEpB,CAAC,CAAC;AAEFF,QAAQ,CAACO,WAAW,GAAG,MAAM;;AAE7B;AACA;AACA;;AAOA,MAAMC,SAAS,gBAAGvB,UAAU,CAC1B,CAAC;EAAEgB,SAAS;EAAEC,QAAQ;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACjD,MAAMI,iBAAiB,GAAGnB,EAAE,CAACG,iBAAiB,CAAC,CAAC,EAAEQ,SAAS,CAAC;EAE5D,oBACEL,IAAA,CAACR,MAAM;IAACiB,GAAG,EAAEA,GAAI;IAACJ,SAAS,EAAEQ,iBAAkB;IAACN,KAAK,EAAEA,KAAM;IAAA,GAAKC,KAAK;IAAAF,QAAA,EACpEA;EAAQ,CACH,CAAC;AAEb,CACF,CAAC;AAEDM,SAAS,CAACD,WAAW,GAAG,YAAY;;AAEpC;AACA;AACA;;AAIA,MAAMG,QAAQ,GAAGA,CAAC;EAAET,SAAS;EAAEE,KAAK;EAAEQ,EAAE;EAAE,GAAGP;AAAqB,CAAC,KAAK;EACtE,MAAMK,iBAAiB,GAAGnB,EAAE,CAACI,gBAAgB,CAAC,CAAC,EAAEO,SAAS,CAAC;EAE3D,oBAAOL,IAAA,CAACL,IAAI;IAACoB,EAAE,EAAEA,EAAG;IAACV,SAAS,EAAEQ,iBAAkB;IAACN,KAAK,EAAEA,KAAM;IAAA,GAAKC;EAAK,CAAG,CAAC;AAChF,CAAC;AAEDM,QAAQ,CAACH,WAAW,GAAG,WAAW;;AAElC;AACA;AACA;;AAOA,OAAO,MAAMK,IAAI,GAAGC,MAAM,CAACC,MAAM,CAACd,QAAQ,EAAE;EAC1Ce,KAAK,EAAEP,SAAS;EAChBjB,IAAI,EAAEmB;AACR,CAAC,CAA0B","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Platform } from 'react-native';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
import { TRANSITION_COLORS } from '../../styles/primitives';
|
|
6
|
+
export const linkRootVariants = cva(['flex-row items-center gap-1', 'web:outline-none web:focus:outline-none web:focus-visible:outline-none', 'text-blue-600', 'underline decoration-slate-300 underline-offset-4', TRANSITION_COLORS, Platform.select({
|
|
7
|
+
web: 'data-[hover=true]:decoration-slate-900',
|
|
8
|
+
default: ''
|
|
9
|
+
}), 'web:data-[focus-visible=true]:ring-2 web:data-[focus-visible=true]:ring-slate-400/50 web:data-[focus-visible=true]:ring-offset-2']);
|
|
10
|
+
export const linkLabelVariants = cva(['text-sm font-medium', 'text-blue-600']);
|
|
11
|
+
export const linkIconVariants = cva(['size-4', 'text-blue-600']);
|
|
12
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Platform","cva","TRANSITION_COLORS","linkRootVariants","select","web","default","linkLabelVariants","linkIconVariants"],"sourceRoot":"../../../../src","sources":["components/Link/styles.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,GAAG,QAAQ,0BAA0B;AAC9C,SAASC,iBAAiB,QAAQ,yBAAyB;AAE3D,OAAO,MAAMC,gBAAgB,GAAGF,GAAG,CAAC,CAClC,6BAA6B,EAC7B,wEAAwE,EACxE,eAAe,EACf,mDAAmD,EACnDC,iBAAiB,EACjBF,QAAQ,CAACI,MAAM,CAAC;EACdC,GAAG,EAAE,wCAAwC;EAC7CC,OAAO,EAAE;AACX,CAAC,CAAC,EACF,kIAAkI,CACnI,CAAC;AAEF,OAAO,MAAMC,iBAAiB,GAAGN,GAAG,CAAC,CAAC,qBAAqB,EAAE,eAAe,CAAC,CAAC;AAE9E,OAAO,MAAMO,gBAAgB,GAAGP,GAAG,CAAC,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef, useMemo } from 'react';
|
|
4
|
+
import { View } from 'react-native';
|
|
5
|
+
import { cn } from '@cdx-ui/utils';
|
|
6
|
+
import { progressSegmentedVariants, segmentVariants } from './styles';
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
export const ProgressSegmented = /*#__PURE__*/forwardRef(({
|
|
9
|
+
step,
|
|
10
|
+
total = 5,
|
|
11
|
+
isStepComplete = false,
|
|
12
|
+
getAccessibilityText,
|
|
13
|
+
className,
|
|
14
|
+
accessibilityLabel = 'Progress',
|
|
15
|
+
...props
|
|
16
|
+
}, ref) => {
|
|
17
|
+
const clampedStep = Math.max(0, Math.min(step, total));
|
|
18
|
+
const segments = useMemo(() => {
|
|
19
|
+
return Array.from({
|
|
20
|
+
length: total
|
|
21
|
+
}, (_, index) => {
|
|
22
|
+
const segmentIndex = index + 1;
|
|
23
|
+
let state = 'incomplete';
|
|
24
|
+
if (segmentIndex < clampedStep || isStepComplete && segmentIndex === clampedStep) {
|
|
25
|
+
state = 'complete';
|
|
26
|
+
} else if (segmentIndex === clampedStep) {
|
|
27
|
+
state = 'inprogress';
|
|
28
|
+
}
|
|
29
|
+
return state;
|
|
30
|
+
});
|
|
31
|
+
}, [total, clampedStep, isStepComplete]);
|
|
32
|
+
let accessibilityText = `Step ${String(clampedStep)} of ${String(total)}`;
|
|
33
|
+
if (getAccessibilityText) {
|
|
34
|
+
accessibilityText = getAccessibilityText(clampedStep, total, isStepComplete);
|
|
35
|
+
} else if (isStepComplete) {
|
|
36
|
+
accessibilityText = `Step ${String(clampedStep)} of ${String(total)}, completed`;
|
|
37
|
+
}
|
|
38
|
+
return /*#__PURE__*/_jsx(View, {
|
|
39
|
+
ref: ref,
|
|
40
|
+
accessibilityRole: "progressbar",
|
|
41
|
+
accessibilityLabel: accessibilityLabel,
|
|
42
|
+
accessibilityValue: {
|
|
43
|
+
min: 0,
|
|
44
|
+
max: total,
|
|
45
|
+
now: clampedStep,
|
|
46
|
+
text: accessibilityText
|
|
47
|
+
},
|
|
48
|
+
className: cn(progressSegmentedVariants(), className),
|
|
49
|
+
...props,
|
|
50
|
+
children: segments.map((state, index) => /*#__PURE__*/_jsx(View, {
|
|
51
|
+
className: cn(segmentVariants({
|
|
52
|
+
state
|
|
53
|
+
}))
|
|
54
|
+
}, index))
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
ProgressSegmented.displayName = 'ProgressSegmented';
|
|
58
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","useMemo","View","cn","progressSegmentedVariants","segmentVariants","jsx","_jsx","ProgressSegmented","step","total","isStepComplete","getAccessibilityText","className","accessibilityLabel","props","ref","clampedStep","Math","max","min","segments","Array","from","length","_","index","segmentIndex","state","accessibilityText","String","accessibilityRole","accessibilityValue","now","text","children","map","displayName"],"sourceRoot":"../../../../src","sources":["components/ProgressSegmented/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,OAAO,QAAQ,OAAO;AAC3C,SAASC,IAAI,QAAwB,cAAc;AACnD,SAASC,EAAE,QAAQ,eAAe;AAClC,SACEC,yBAAyB,EACzBC,eAAe,QAEV,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAclB,OAAO,MAAMC,iBAAiB,gBAAGR,UAAU,CACzC,CACE;EACES,IAAI;EACJC,KAAK,GAAG,CAAC;EACTC,cAAc,GAAG,KAAK;EACtBC,oBAAoB;EACpBC,SAAS;EACTC,kBAAkB,GAAG,UAAU;EAC/B,GAAGC;AACL,CAAC,EACDC,GAAG,KACA;EACH,MAAMC,WAAW,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAED,IAAI,CAACE,GAAG,CAACX,IAAI,EAAEC,KAAK,CAAC,CAAC;EAEtD,MAAMW,QAAQ,GAAGpB,OAAO,CAAC,MAAM;IAC7B,OAAOqB,KAAK,CAACC,IAAI,CAAC;MAAEC,MAAM,EAAEd;IAAM,CAAC,EAAE,CAACe,CAAC,EAAEC,KAAK,KAAK;MACjD,MAAMC,YAAY,GAAGD,KAAK,GAAG,CAAC;MAC9B,IAAIE,KAA+C,GAAG,YAAY;MAElE,IAAID,YAAY,GAAGV,WAAW,IAAKN,cAAc,IAAIgB,YAAY,KAAKV,WAAY,EAAE;QAClFW,KAAK,GAAG,UAAU;MACpB,CAAC,MAAM,IAAID,YAAY,KAAKV,WAAW,EAAE;QACvCW,KAAK,GAAG,YAAY;MACtB;MAEA,OAAOA,KAAK;IACd,CAAC,CAAC;EACJ,CAAC,EAAE,CAAClB,KAAK,EAAEO,WAAW,EAAEN,cAAc,CAAC,CAAC;EAExC,IAAIkB,iBAAiB,GAAG,QAAQC,MAAM,CAACb,WAAW,CAAC,OAAOa,MAAM,CAACpB,KAAK,CAAC,EAAE;EACzE,IAAIE,oBAAoB,EAAE;IACxBiB,iBAAiB,GAAGjB,oBAAoB,CAACK,WAAW,EAAEP,KAAK,EAAEC,cAAc,CAAC;EAC9E,CAAC,MAAM,IAAIA,cAAc,EAAE;IACzBkB,iBAAiB,GAAG,QAAQC,MAAM,CAACb,WAAW,CAAC,OAAOa,MAAM,CAACpB,KAAK,CAAC,aAAa;EAClF;EAEA,oBACEH,IAAA,CAACL,IAAI;IACHc,GAAG,EAAEA,GAAI;IACTe,iBAAiB,EAAC,aAAa;IAC/BjB,kBAAkB,EAAEA,kBAAmB;IACvCkB,kBAAkB,EAAE;MAClBZ,GAAG,EAAE,CAAC;MACND,GAAG,EAAET,KAAK;MACVuB,GAAG,EAAEhB,WAAW;MAChBiB,IAAI,EAAEL;IACR,CAAE;IACFhB,SAAS,EAAEV,EAAE,CAACC,yBAAyB,CAAC,CAAC,EAAES,SAAS,CAAE;IAAA,GAClDE,KAAK;IAAAoB,QAAA,EAERd,QAAQ,CAACe,GAAG,CAAC,CAACR,KAAK,EAAEF,KAAK,kBACzBnB,IAAA,CAACL,IAAI;MAAaW,SAAS,EAAEV,EAAE,CAACE,eAAe,CAAC;QAAEuB;MAAM,CAAC,CAAC;IAAE,GAAjDF,KAAmD,CAC/D;EAAC,CACE,CAAC;AAEX,CACF,CAAC;AAEDlB,iBAAiB,CAAC6B,WAAW,GAAG,mBAAmB","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
export const progressSegmentedVariants = cva(['flex-row gap-1 w-full']);
|
|
5
|
+
export const segmentVariants = cva(['flex-1 h-2 rounded'], {
|
|
6
|
+
variants: {
|
|
7
|
+
state: {
|
|
8
|
+
complete: 'bg-slate-900',
|
|
9
|
+
incomplete: 'bg-slate-300',
|
|
10
|
+
inprogress: 'bg-gradient-to-r from-slate-900 from-50% to-slate-300 to-50%'
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
defaultVariants: {
|
|
14
|
+
state: 'incomplete'
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["cva","progressSegmentedVariants","segmentVariants","variants","state","complete","incomplete","inprogress","defaultVariants"],"sourceRoot":"../../../../src","sources":["components/ProgressSegmented/styles.ts"],"mappings":";;AAAA,SAASA,GAAG,QAA2B,0BAA0B;AAEjE,OAAO,MAAMC,yBAAyB,GAAGD,GAAG,CAAC,CAAC,uBAAuB,CAAC,CAAC;AAEvE,OAAO,MAAME,eAAe,GAAGF,GAAG,CAAC,CAAC,oBAAoB,CAAC,EAAE;EACzDG,QAAQ,EAAE;IACRC,KAAK,EAAE;MACLC,QAAQ,EAAE,cAAc;MACxBC,UAAU,EAAE,cAAc;MAC1BC,UAAU,EAAE;IACd;EACF,CAAC;EACDC,eAAe,EAAE;IACfJ,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Pressable","SelectTriggerHost"],"sourceRoot":"../../../../src","sources":["components/Select/SelectTriggerHost.tsx"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,cAAc;;AAExC;AACA,OAAO,MAAMC,iBAAiB,GAAGD,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { forwardRef } from 'react';
|
|
4
|
+
import { StyleSheet } from 'react-native';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
/** Props that must not be forwarded to a DOM `<button>`. */
|
|
7
|
+
const OMIT = new Set(['hitSlop', 'pressRetentionOffset', 'android_ripple', 'android_disableSound', 'unstable_pressDelay', 'onLongPress', 'delayLongPress', 'onPress', 'onPressIn', 'onPressOut', 'onHoverIn', 'onHoverOut', 'disabled', 'style', 'className', 'testID', 'children', 'accessible', 'accessibilityActions', 'accessibilityElementsHidden', 'accessibilityHint', 'accessibilityIgnoresInvertColors', 'accessibilityLabel', 'accessibilityLabelledBy', 'accessibilityLiveRegion', 'accessibilityRole', 'accessibilityState', 'accessibilityValue', 'accessibilityViewIsModal', 'importantForAccessibility', 'needsOffscreenAlphaCompositing', 'collapsable', 'shouldRasterizeIOS', 'removeClippedSubviews', 'onAccessibilityAction', 'onAccessibilityEscape', 'onAccessibilityTap']);
|
|
8
|
+
function resolveChildren(children) {
|
|
9
|
+
if (typeof children === 'function') {
|
|
10
|
+
return children({
|
|
11
|
+
pressed: false
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return children;
|
|
15
|
+
}
|
|
16
|
+
function filterDomProps(rest) {
|
|
17
|
+
const entries = Object.entries(rest).filter(([key]) => !OMIT.has(key));
|
|
18
|
+
return Object.fromEntries(entries);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** UA `<button>` defaults (centered text, inline sizing) fight our flex + `justify-between` layout. */
|
|
22
|
+
const webButtonLayoutStyle = {
|
|
23
|
+
display: 'flex',
|
|
24
|
+
flexDirection: 'row',
|
|
25
|
+
alignItems: 'center',
|
|
26
|
+
justifyContent: 'space-between',
|
|
27
|
+
width: '100%',
|
|
28
|
+
minWidth: 0,
|
|
29
|
+
textAlign: 'start',
|
|
30
|
+
boxSizing: 'border-box',
|
|
31
|
+
margin: 0,
|
|
32
|
+
font: 'inherit',
|
|
33
|
+
lineHeight: 'normal',
|
|
34
|
+
WebkitAppearance: 'none',
|
|
35
|
+
appearance: 'none'
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Native `<button type="button">` so the trigger is HTML-labelable (`<label htmlFor>` focuses it).
|
|
40
|
+
* `Pressable` on web is a non-labelable div; no extra refs are needed for label association.
|
|
41
|
+
*/
|
|
42
|
+
export const SelectTriggerHost = /*#__PURE__*/forwardRef(function SelectTriggerHost(props, ref) {
|
|
43
|
+
const {
|
|
44
|
+
children,
|
|
45
|
+
onPress,
|
|
46
|
+
onPressIn,
|
|
47
|
+
onPressOut,
|
|
48
|
+
onHoverIn,
|
|
49
|
+
onHoverOut,
|
|
50
|
+
disabled,
|
|
51
|
+
style,
|
|
52
|
+
className,
|
|
53
|
+
testID,
|
|
54
|
+
...rest
|
|
55
|
+
} = props;
|
|
56
|
+
const domProps = filterDomProps(rest);
|
|
57
|
+
const flattened = StyleSheet.flatten(style);
|
|
58
|
+
return /*#__PURE__*/_jsx("button", {
|
|
59
|
+
ref: ref,
|
|
60
|
+
...domProps,
|
|
61
|
+
type: "button",
|
|
62
|
+
disabled: !!disabled,
|
|
63
|
+
className: typeof className === 'string' ? className : undefined,
|
|
64
|
+
style: {
|
|
65
|
+
...webButtonLayoutStyle,
|
|
66
|
+
...(flattened ?? {})
|
|
67
|
+
},
|
|
68
|
+
"data-testid": testID,
|
|
69
|
+
onClick: e => {
|
|
70
|
+
if (!disabled) {
|
|
71
|
+
onPress?.(e);
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
onPointerDown: e => {
|
|
75
|
+
onPressIn?.(e);
|
|
76
|
+
},
|
|
77
|
+
onPointerUp: e => {
|
|
78
|
+
onPressOut?.(e);
|
|
79
|
+
},
|
|
80
|
+
onPointerCancel: e => {
|
|
81
|
+
onPressOut?.(e);
|
|
82
|
+
},
|
|
83
|
+
onMouseEnter: e => {
|
|
84
|
+
onHoverIn?.(e);
|
|
85
|
+
},
|
|
86
|
+
onMouseLeave: e => {
|
|
87
|
+
onHoverOut?.(e);
|
|
88
|
+
},
|
|
89
|
+
children: resolveChildren(children)
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
SelectTriggerHost.displayName = 'SelectTriggerHost';
|
|
93
|
+
//# sourceMappingURL=SelectTriggerHost.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","forwardRef","StyleSheet","jsx","_jsx","OMIT","Set","resolveChildren","children","pressed","filterDomProps","rest","entries","Object","filter","key","has","fromEntries","webButtonLayoutStyle","display","flexDirection","alignItems","justifyContent","width","minWidth","textAlign","boxSizing","margin","font","lineHeight","WebkitAppearance","appearance","SelectTriggerHost","props","ref","onPress","onPressIn","onPressOut","onHoverIn","onHoverOut","disabled","style","className","testID","domProps","flattened","flatten","type","undefined","onClick","e","onPointerDown","onPointerUp","onPointerCancel","onMouseEnter","onMouseLeave","displayName"],"sourceRoot":"../../../../src","sources":["components/Select/SelectTriggerHost.web.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAASC,UAAU,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAK1C;AACA,MAAMC,IAAI,GAAG,IAAIC,GAAG,CAAS,CAC3B,SAAS,EACT,sBAAsB,EACtB,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,UAAU,EACV,OAAO,EACP,WAAW,EACX,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,sBAAsB,EACtB,6BAA6B,EAC7B,mBAAmB,EACnB,kCAAkC,EAClC,oBAAoB,EACpB,yBAAyB,EACzB,yBAAyB,EACzB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,0BAA0B,EAC1B,2BAA2B,EAC3B,gCAAgC,EAChC,aAAa,EACb,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,CACrB,CAAC;AAEF,SAASC,eAAeA,CAACC,QAAoC,EAAmB;EAC9E,IAAI,OAAOA,QAAQ,KA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