@cdx-ui/components 0.0.1-alpha.9 → 0.0.1-beta.2
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 +53 -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/index.js +20 -9
- package/lib/commonjs/components/Button/index.js.map +1 -1
- package/lib/commonjs/components/Button/styles.js +182 -163
- 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 +18 -11
- package/lib/commonjs/components/Checkbox/index.js.map +1 -1
- package/lib/commonjs/components/Checkbox/styles.js +17 -16
- package/lib/commonjs/components/Checkbox/styles.js.map +1 -1
- 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 +52 -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/Field/FieldLabel.js +33 -0
- package/lib/commonjs/components/Field/FieldLabel.js.map +1 -0
- package/lib/commonjs/components/Field/FieldLabel.web.js +22 -0
- package/lib/commonjs/components/Field/FieldLabel.web.js.map +1 -0
- package/lib/commonjs/components/Field/index.js +158 -0
- package/lib/commonjs/components/Field/index.js.map +1 -0
- package/lib/commonjs/components/Field/styles.js +16 -0
- package/lib/commonjs/components/Field/styles.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 +48 -0
- package/lib/commonjs/components/Form/index.js.map +1 -0
- package/lib/commonjs/components/Form/styles.js +9 -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 +23 -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 +75 -0
- package/lib/commonjs/components/IconButton/index.js.map +1 -0
- package/lib/commonjs/components/IconButton/styles.js +44 -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 +17 -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 +14 -0
- package/lib/commonjs/components/Link/styles.js.map +1 -0
- package/lib/commonjs/components/OtpInput/index.js +83 -0
- package/lib/commonjs/components/OtpInput/index.js.map +1 -0
- package/lib/commonjs/components/OtpInput/styles.js +48 -0
- package/lib/commonjs/components/OtpInput/styles.js.map +1 -0
- package/lib/commonjs/components/ProgressBar/index.js +45 -0
- package/lib/commonjs/components/ProgressBar/index.js.map +1 -0
- package/lib/commonjs/components/ProgressBar/styles.js +10 -0
- package/lib/commonjs/components/ProgressBar/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 +44 -0
- package/lib/commonjs/components/Stack/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 +23 -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 +204 -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/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/index.js +21 -10
- package/lib/module/components/Button/index.js.map +1 -1
- package/lib/module/components/Button/styles.js +181 -162
- 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 +19 -12
- package/lib/module/components/Checkbox/index.js.map +1 -1
- package/lib/module/components/Checkbox/styles.js +17 -16
- package/lib/module/components/Checkbox/styles.js.map +1 -1
- 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 +48 -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/Field/FieldLabel.js +29 -0
- package/lib/module/components/Field/FieldLabel.js.map +1 -0
- package/lib/module/components/Field/FieldLabel.web.js +17 -0
- package/lib/module/components/Field/FieldLabel.web.js.map +1 -0
- package/lib/module/components/Field/index.js +155 -0
- package/lib/module/components/Field/index.js.map +1 -0
- package/lib/module/components/Field/styles.js +12 -0
- package/lib/module/components/Field/styles.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 +44 -0
- package/lib/module/components/Form/index.js.map +1 -0
- package/lib/module/components/Form/styles.js +5 -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 +19 -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 +71 -0
- package/lib/module/components/IconButton/index.js.map +1 -0
- package/lib/module/components/IconButton/styles.js +40 -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 +17 -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 +11 -0
- package/lib/module/components/Link/styles.js.map +1 -0
- package/lib/module/components/OtpInput/index.js +79 -0
- package/lib/module/components/OtpInput/index.js.map +1 -0
- package/lib/module/components/OtpInput/styles.js +44 -0
- package/lib/module/components/OtpInput/styles.js.map +1 -0
- package/lib/module/components/ProgressBar/index.js +41 -0
- package/lib/module/components/ProgressBar/index.js.map +1 -0
- package/lib/module/components/ProgressBar/styles.js +6 -0
- package/lib/module/components/ProgressBar/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 +40 -0
- package/lib/module/components/Stack/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 +19 -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 +17 -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/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/index.d.ts +6 -3
- package/lib/typescript/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/components/Button/styles.d.ts +11 -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 +7 -5
- package/lib/typescript/components/Checkbox/index.d.ts.map +1 -1
- package/lib/typescript/components/Checkbox/styles.d.ts +4 -4
- package/lib/typescript/components/Checkbox/styles.d.ts.map +1 -1
- 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/Field/FieldLabel.d.ts +18 -0
- package/lib/typescript/components/Field/FieldLabel.d.ts.map +1 -0
- package/lib/typescript/components/Field/FieldLabel.web.d.ts +16 -0
- package/lib/typescript/components/Field/FieldLabel.web.d.ts.map +1 -0
- package/lib/typescript/components/Field/index.d.ts +26 -0
- package/lib/typescript/components/Field/index.d.ts.map +1 -0
- package/lib/typescript/components/Field/styles.d.ts +16 -0
- package/lib/typescript/components/Field/styles.d.ts.map +1 -0
- package/lib/typescript/components/Form/FormRoot.d.ts +14 -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 +7 -0
- package/lib/typescript/components/Form/index.d.ts.map +1 -0
- package/lib/typescript/components/Form/styles.d.ts +2 -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 +11 -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 +6 -0
- package/lib/typescript/components/Link/styles.d.ts.map +1 -0
- package/lib/typescript/components/OtpInput/index.d.ts +11 -0
- package/lib/typescript/components/OtpInput/index.d.ts.map +1 -0
- package/lib/typescript/components/OtpInput/styles.d.ts +14 -0
- package/lib/typescript/components/OtpInput/styles.d.ts.map +1 -0
- package/lib/typescript/components/ProgressBar/index.d.ts +17 -0
- package/lib/typescript/components/ProgressBar/index.d.ts.map +1 -0
- package/lib/typescript/components/ProgressBar/styles.d.ts +5 -0
- package/lib/typescript/components/ProgressBar/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 +23 -0
- package/lib/typescript/components/Stack/styles.d.ts.map +1 -0
- package/lib/typescript/components/Switch/index.d.ts +0 -1
- package/lib/typescript/components/Switch/index.d.ts.map +1 -1
- 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 +17 -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/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 +15 -6
- 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/index.tsx +14 -9
- package/src/components/Button/styles.ts +159 -209
- package/src/components/Card/index.tsx +115 -0
- package/src/components/Card/styles.ts +41 -0
- package/src/components/Checkbox/index.tsx +15 -23
- package/src/components/Checkbox/styles.ts +33 -24
- package/src/components/Chip/index.tsx +91 -0
- package/src/components/Chip/styles.ts +52 -0
- package/src/components/Dialog/index.tsx +304 -0
- package/src/components/Dialog/styles.ts +88 -0
- package/src/components/Field/FieldLabel.tsx +33 -0
- package/src/components/Field/FieldLabel.web.tsx +25 -0
- package/src/components/Field/index.tsx +171 -0
- package/src/components/Field/styles.ts +32 -0
- package/src/components/Form/FormRoot.tsx +20 -0
- package/src/components/Form/FormRoot.web.tsx +12 -0
- package/src/components/Form/index.tsx +38 -0
- package/src/components/Form/styles.ts +3 -0
- package/src/components/Heading/index.tsx +36 -0
- package/src/components/Heading/styles.tsx +25 -0
- package/src/components/Icon/index.tsx +54 -0
- package/src/components/IconButton/index.tsx +92 -0
- package/src/components/IconButton/styles.ts +59 -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 +36 -40
- package/src/components/Link/index.tsx +83 -0
- package/src/components/Link/styles.ts +21 -0
- package/src/components/OtpInput/index.tsx +79 -0
- package/src/components/OtpInput/styles.ts +45 -0
- package/src/components/ProgressBar/index.tsx +53 -0
- package/src/components/ProgressBar/styles.ts +9 -0
- package/src/components/ProgressSegmented/index.tsx +81 -0
- package/src/components/ProgressSegmented/styles.ts +20 -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 +42 -0
- package/src/components/Switch/index.tsx +0 -2
- package/src/components/Text/index.tsx +16 -0
- package/src/components/Text/styles.tsx +25 -0
- package/src/components/VirtualizedList/index.tsx +19 -0
- package/src/components/index.ts +17 -0
- package/src/index.ts +3 -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,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,YAA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","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 rounded overflow-hidden']);
|
|
5
|
+
export const segmentVariants = cva(['flex-1 h-1'], {
|
|
6
|
+
variants: {
|
|
7
|
+
state: {
|
|
8
|
+
complete: 'bg-surface-action-strong',
|
|
9
|
+
incomplete: 'bg-surface-action-tint',
|
|
10
|
+
inprogress: 'bg-gradient-to-r from-surface-action-strong from-50% to-surface-action-tint 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,+CAA+C,CAAC,CAAC;AAE/F,OAAO,MAAME,eAAe,GAAGF,GAAG,CAAC,CAAC,YAAY,CAAC,EAAE;EACjDG,QAAQ,EAAE;IACRC,KAAK,EAAE;MACLC,QAAQ,EAAE,0BAA0B;MACpCC,UAAU,EAAE,wBAAwB;MACpCC,UAAU,EACR;IACJ;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,EACn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GhC;EACL,CAAC,GAAGsB,KAAK;EAET,MAAMW,QAAQ,GAAGlC,cAAc,CAACC,IAAI,CAAC;EACrC,MAAMkC,SAAS,GAAG3C,UAAU,CAAC4C,OAAO,CAACL,KAAK,CAAoC;EAE9E,oBACErC,IAAA;IACE8B,GAAG,EAAEA,GAAI;IAAA,GACLU,QAAQ;IACZG,IAAI,EAAC,QAAQ;IACbP,QAAQ,EAAE,CAAC,CAACA,QAAS;IACrBE,SAAS,EAAE,OAAOA,SAAS,KAAK,QAAQ,GAAGA,SAAS,GAAGM,SAAU;IACjEP,KAAK,EAAE;MAAE,GAAGvB,oBAAoB;MAAE,IAAI2B,SAAS,IAAI,CAAC,CAAC;IAAE,CAAE;IACzD,eAAaF,MAAO;IACpBM,OAAO,EAAGC,CAAC,IAAK;MACd,IAAI,CAACV,QAAQ,EAAE;QACbL,OAAO,GAAGe,CAAqE,CAAC;MAClF;IACF,CAAE;IACFC,aAAa,EAAGD,CAAC,IAAK;MACpBd,SAAS,GAAGc,CAAuE,CAAC;IACtF,CAAE;IACFE,WAAW,EAAGF,CAAC,IAAK;MAClBb,UAAU,GAAGa,CAAwE,CAAC;IACxF,CAAE;IACFG,eAAe,EAAGH,CAAC,IAAK;MACtBb,UAAU,GAAGa,CAAwE,CAAC;IACxF,CAAE;IACFI,YAAY,EAAGJ,CAAC,IAAK;MACnBZ,SAAS,GAAGY,CAAuE,CAAC;IACtF,CAAE;IACFK,YAAY,EAAGL,CAAC,IAAK;MACnBX,UAAU,GAAGW,CAAwE,CAAC;IACxF,CAAE;IAAA1C,QAAA,EAEDD,eAAe,CAACC,QAAQ;EAAC,CACpB,CAAC;AAEb,CACF,CAAC;AAEDwB,iBAAiB,CAACwB,WAAW,GAAG,mBAAmB","ignoreList":[]}
|
|
@@ -2,16 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import { Pressable, Text, View } from 'react-native';
|
|
5
|
+
import { ArrowDropDown } from '@cdx-ui/icons';
|
|
5
6
|
import { createSelect } from '@cdx-ui/primitives';
|
|
6
7
|
import { cn, useStyleContext, withStyleContext } from '@cdx-ui/utils';
|
|
8
|
+
import { Icon } from '../Icon';
|
|
9
|
+
import { SelectTriggerHost } from './SelectTriggerHost';
|
|
7
10
|
import { selectContentVariants, selectIconVariants, selectItemLabelVariants, selectItemVariants, selectTriggerVariants, selectValueVariants } from './styles';
|
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
12
|
const SCOPE = 'SELECT';
|
|
10
13
|
const Root = withStyleContext(View, SCOPE);
|
|
11
14
|
const useSelectStyleContext = () => useStyleContext(SCOPE);
|
|
12
15
|
const SelectPrimitive = createSelect({
|
|
13
16
|
Root,
|
|
14
|
-
Trigger:
|
|
17
|
+
Trigger: SelectTriggerHost,
|
|
15
18
|
Value: Text,
|
|
16
19
|
Icon: View,
|
|
17
20
|
Content: View,
|
|
@@ -25,7 +28,7 @@ const SelectPrimitive = createSelect({
|
|
|
25
28
|
|
|
26
29
|
const SelectRoot = /*#__PURE__*/forwardRef(({
|
|
27
30
|
variant = 'outline',
|
|
28
|
-
size = '
|
|
31
|
+
size = 'default',
|
|
29
32
|
className,
|
|
30
33
|
children,
|
|
31
34
|
style,
|
|
@@ -63,12 +66,14 @@ const SelectTrigger = /*#__PURE__*/forwardRef(({
|
|
|
63
66
|
variant,
|
|
64
67
|
size
|
|
65
68
|
}), className);
|
|
66
|
-
return /*#__PURE__*/
|
|
69
|
+
return /*#__PURE__*/_jsxs(SelectPrimitive.Trigger, {
|
|
67
70
|
ref: ref,
|
|
68
71
|
className: computedClassName,
|
|
69
72
|
style: style,
|
|
70
73
|
...props,
|
|
71
|
-
children: children
|
|
74
|
+
children: [children, /*#__PURE__*/_jsx(SelectIcon, {
|
|
75
|
+
as: ArrowDropDown
|
|
76
|
+
})]
|
|
72
77
|
});
|
|
73
78
|
});
|
|
74
79
|
SelectTrigger.displayName = 'Select.Trigger';
|
|
@@ -83,11 +88,9 @@ const SelectValue = /*#__PURE__*/forwardRef(({
|
|
|
83
88
|
...props
|
|
84
89
|
}, ref) => {
|
|
85
90
|
const {
|
|
86
|
-
variant,
|
|
87
91
|
size
|
|
88
92
|
} = useSelectStyleContext();
|
|
89
93
|
const computedClassName = cn(selectValueVariants({
|
|
90
|
-
variant,
|
|
91
94
|
size
|
|
92
95
|
}), className);
|
|
93
96
|
return /*#__PURE__*/_jsx(SelectPrimitive.Value, {
|
|
@@ -103,26 +106,23 @@ SelectValue.displayName = 'Select.Value';
|
|
|
103
106
|
// STYLED ICON COMPONENT
|
|
104
107
|
// =============================================================================
|
|
105
108
|
|
|
106
|
-
const SelectIcon =
|
|
109
|
+
const SelectIcon = ({
|
|
107
110
|
className,
|
|
108
111
|
style,
|
|
109
112
|
...props
|
|
110
|
-
}
|
|
113
|
+
}) => {
|
|
111
114
|
const {
|
|
112
|
-
variant,
|
|
113
115
|
size
|
|
114
116
|
} = useSelectStyleContext();
|
|
115
117
|
const computedClassName = cn(selectIconVariants({
|
|
116
|
-
variant,
|
|
117
118
|
size
|
|
118
119
|
}), className);
|
|
119
|
-
return /*#__PURE__*/_jsx(
|
|
120
|
-
ref: ref,
|
|
120
|
+
return /*#__PURE__*/_jsx(Icon, {
|
|
121
121
|
className: computedClassName,
|
|
122
122
|
style: style,
|
|
123
123
|
...props
|
|
124
124
|
});
|
|
125
|
-
}
|
|
125
|
+
};
|
|
126
126
|
SelectIcon.displayName = 'Select.Icon';
|
|
127
127
|
|
|
128
128
|
// =============================================================================
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","Pressable","Text","View","createSelect","cn","useStyleContext","withStyleContext","selectContentVariants","selectIconVariants","selectItemLabelVariants","selectItemVariants","selectTriggerVariants","selectValueVariants","jsx","_jsx","SCOPE","Root","useSelectStyleContext","SelectPrimitive","Trigger","Value","
|
|
1
|
+
{"version":3,"names":["forwardRef","Pressable","Text","View","ArrowDropDown","createSelect","cn","useStyleContext","withStyleContext","Icon","SelectTriggerHost","selectContentVariants","selectIconVariants","selectItemLabelVariants","selectItemVariants","selectTriggerVariants","selectValueVariants","jsx","_jsx","jsxs","_jsxs","SCOPE","Root","useSelectStyleContext","SelectPrimitive","Trigger","Value","Content","Item","ItemLabel","SelectRoot","variant","size","className","children","style","props","ref","context","displayName","SelectTrigger","computedClassName","SelectIcon","as","SelectValue","SelectContent","SelectItem","SelectItemLabel","Select","Object","assign"],"sourceRoot":"../../../../src","sources":["components/Select/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAwB,OAAO;AAClD,SAASC,SAAS,EAAEC,IAAI,EAAkBC,IAAI,QAAwB,cAAc;AACpF,SAASC,aAAa,QAAQ,eAAe;AAC7C,SACEC,YAAY,QAOP,oBAAoB;AAC3B,SAASC,EAAE,EAAEC,eAAe,EAAEC,gBAAgB,QAAQ,eAAe;AACrE,SAASC,IAAI,QAAmB,SAAS;AACzC,SAASC,iBAAiB,QAAQ,qBAAqB;AACvD,SAEEC,qBAAqB,EACrBC,kBAAkB,EAClBC,uBAAuB,EACvBC,kBAAkB,EAClBC,qBAAqB,EACrBC,mBAAmB,QACd,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAElB,MAAMC,KAAK,GAAG,QAAQ;AAEtB,MAAMC,IAAI,GAAGd,gBAAgB,CAACL,IAAI,EAAEkB,KAAK,CAAC;AAE1C,MAAME,qBAAqB,GAAGA,CAAA,KAAMhB,eAAe,CAACc,KAAK,CAAuB;AAEhF,MAAMG,eAAe,GAAGnB,YAAY,CAAC;EACnCiB,IAAI;EACJG,OAAO,EAAEf,iBAAiB;EAC1BgB,KAAK,EAAExB,IAAI;EACXO,IAAI,EAAEN,IAAI;EACVwB,OAAO,EAAExB,IAAI;EACbyB,IAAI,EAAE3B,SAAS;EACf4B,SAAS,EAAE3B;AACb,CAAC,CAAC;;AAEF;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EAAEe,aAAa;EACtBd,KAAK,EAAEkB,WAAW;EAClBnC,IAAI,EAAEiC,UAAU;EAChBf,OAAO,EAAEkB,aAAa;EACtBjB,IAAI,EAAEkB,UAAU;EAChBjB,SAAS,EAAEkB;AACb,CAAC,CAA4B","ignoreList":[]}
|
|
@@ -2,116 +2,92 @@
|
|
|
2
2
|
|
|
3
3
|
import { Platform } from 'react-native';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
|
+
import { COLOR_BG_PRIMARY, COLOR_BORDER_DEFAULT, COLOR_TEXT_MUTED, COLOR_TEXT_PRIMARY, DISABLED_CURSOR, DISABLED_OPACITY, RADIUS_SM, RADIUS_MD, SHADOW_SM, SHADOW_MD, SIZE_SCALE, TRANSITION_COLORS } from '../../styles/primitives';
|
|
5
6
|
|
|
6
7
|
// ── Trigger ─────────────────────────────────────────────────
|
|
7
8
|
|
|
8
|
-
export const selectTriggerVariants = cva(['flex-row items-center justify-between
|
|
9
|
+
export const selectTriggerVariants = cva(['flex w-full min-w-0 flex-row items-center justify-between text-start', RADIUS_SM, SHADOW_SM, TRANSITION_COLORS, COLOR_BG_PRIMARY, `border ${COLOR_BORDER_DEFAULT}`, DISABLED_OPACITY, 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', Platform.select({
|
|
10
|
+
default: 'data-[active=true]:border-slate-300',
|
|
11
|
+
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(' ')
|
|
12
|
+
})], {
|
|
9
13
|
variants: {
|
|
10
14
|
variant: {
|
|
11
|
-
outline: [
|
|
12
|
-
default: 'data-[active=true]:border-gray-400',
|
|
13
|
-
web: 'data-[hover=true]:border-gray-400 data-[active=true]:data-[hover=true]:border-gray-500'
|
|
14
|
-
}), 'data-[state=open]:data-[invalid=false]:border-blue-500', 'data-[invalid=true]:border-red-500', 'data-[readonly=true]:bg-gray-50'],
|
|
15
|
-
filled: ['bg-gray-100 border border-transparent', Platform.select({
|
|
16
|
-
default: 'data-[active=true]:bg-gray-200',
|
|
17
|
-
web: 'data-[hover=true]:bg-gray-200 data-[active=true]:data-[hover=true]:bg-gray-300'
|
|
18
|
-
}), 'data-[state=open]:border-blue-500', 'data-[invalid=true]:border-red-500 data-[invalid=true]:border', 'data-[readonly=true]:bg-gray-200'],
|
|
19
|
-
ghost: ['bg-transparent border border-transparent', Platform.select({
|
|
20
|
-
default: 'data-[active=true]:bg-gray-100',
|
|
21
|
-
web: 'data-[hover=true]:bg-gray-50 data-[active=true]:data-[hover=true]:bg-gray-100'
|
|
22
|
-
}), 'data-[invalid=true]:border-red-500 data-[invalid=true]:border']
|
|
15
|
+
outline: []
|
|
23
16
|
},
|
|
24
17
|
size: {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
lg: 'h-12 px-4 gap-2.5'
|
|
18
|
+
default: `${SIZE_SCALE.default.height} ${SIZE_SCALE.default.px} ${SIZE_SCALE.default.gap}`,
|
|
19
|
+
small: `${SIZE_SCALE.small.height} ${SIZE_SCALE.small.px} ${SIZE_SCALE.small.gap}`
|
|
28
20
|
}
|
|
29
21
|
},
|
|
30
22
|
defaultVariants: {
|
|
31
23
|
variant: 'outline',
|
|
32
|
-
size: '
|
|
24
|
+
size: 'default'
|
|
33
25
|
}
|
|
34
26
|
});
|
|
35
27
|
|
|
36
28
|
// ── Value ───────────────────────────────────────────────────
|
|
37
29
|
|
|
38
|
-
export const selectValueVariants = cva(['flex-1', 'data-[placeholder=true]:text-
|
|
30
|
+
export const selectValueVariants = cva(['min-w-0 flex-1 text-start', 'data-[placeholder=true]:text-slate-400', 'data-[invalid=true]:text-red-600', COLOR_TEXT_PRIMARY], {
|
|
39
31
|
variants: {
|
|
40
|
-
variant: {
|
|
41
|
-
outline: 'text-gray-900',
|
|
42
|
-
filled: 'text-gray-900',
|
|
43
|
-
ghost: 'text-gray-900'
|
|
44
|
-
},
|
|
45
32
|
size: {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
lg: 'text-lg'
|
|
33
|
+
default: SIZE_SCALE.default.text,
|
|
34
|
+
small: SIZE_SCALE.small.text
|
|
49
35
|
}
|
|
50
36
|
},
|
|
51
37
|
defaultVariants: {
|
|
52
|
-
|
|
53
|
-
size: 'md'
|
|
38
|
+
size: 'default'
|
|
54
39
|
}
|
|
55
40
|
});
|
|
56
41
|
|
|
57
42
|
// ── Icon ────────────────────────────────────────────────────
|
|
58
43
|
|
|
59
|
-
export const selectIconVariants = cva(['items-center justify-center', 'data-[invalid=true]:text-red-500'], {
|
|
44
|
+
export const selectIconVariants = cva(['shrink-0 items-center justify-center self-center', COLOR_TEXT_MUTED, 'data-[invalid=true]:text-red-500'], {
|
|
60
45
|
variants: {
|
|
61
|
-
variant: {
|
|
62
|
-
outline: 'text-gray-500',
|
|
63
|
-
filled: 'text-gray-500',
|
|
64
|
-
ghost: 'text-gray-400'
|
|
65
|
-
},
|
|
66
46
|
size: {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
lg: 'h-6 w-6'
|
|
47
|
+
default: 'h-5 w-5',
|
|
48
|
+
small: 'h-4 w-4'
|
|
70
49
|
}
|
|
71
50
|
},
|
|
72
51
|
defaultVariants: {
|
|
73
|
-
|
|
74
|
-
size: 'md'
|
|
52
|
+
size: 'default'
|
|
75
53
|
}
|
|
76
54
|
});
|
|
77
55
|
|
|
78
56
|
// ── Content ─────────────────────────────────────────────────
|
|
79
57
|
|
|
80
|
-
export const selectContentVariants = cva([
|
|
81
|
-
web:
|
|
58
|
+
export const selectContentVariants = cva([COLOR_BG_PRIMARY, `border ${COLOR_BORDER_DEFAULT}`, 'overflow-hidden', RADIUS_MD, Platform.select({
|
|
59
|
+
web: SHADOW_MD,
|
|
82
60
|
default: ''
|
|
83
61
|
}), 'max-h-60', 'py-1']);
|
|
84
62
|
|
|
85
63
|
// ── Item ────────────────────────────────────────────────────
|
|
86
64
|
|
|
87
|
-
export const selectItemVariants = cva(['flex-row items-center', 'transition-colors duration-100', 'data-[disabled=true]:opacity-50 data-[disabled=true]:pointer-events-none', 'data-[state=checked]:bg-
|
|
88
|
-
default: 'data-[active=true]:bg-
|
|
89
|
-
web: 'data-[hover=true]:bg-
|
|
65
|
+
export const selectItemVariants = 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', Platform.select({
|
|
66
|
+
default: 'data-[active=true]:bg-slate-100',
|
|
67
|
+
web: 'data-[hover=true]:bg-slate-50 data-[active=true]:data-[hover=true]:bg-slate-100 data-[highlighted=true]:bg-slate-50'
|
|
90
68
|
})], {
|
|
91
69
|
variants: {
|
|
92
70
|
size: {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
lg: 'px-4 py-2.5'
|
|
71
|
+
default: 'px-3 py-2',
|
|
72
|
+
small: 'px-2.5 py-1.5'
|
|
96
73
|
}
|
|
97
74
|
},
|
|
98
75
|
defaultVariants: {
|
|
99
|
-
size: '
|
|
76
|
+
size: 'default'
|
|
100
77
|
}
|
|
101
78
|
});
|
|
102
79
|
|
|
103
80
|
// ── ItemLabel ───────────────────────────────────────────────
|
|
104
81
|
|
|
105
|
-
export const selectItemLabelVariants = cva([
|
|
82
|
+
export const selectItemLabelVariants = cva([COLOR_TEXT_PRIMARY, 'data-[state=checked]:font-medium'], {
|
|
106
83
|
variants: {
|
|
107
84
|
size: {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
lg: 'text-lg'
|
|
85
|
+
default: SIZE_SCALE.default.text,
|
|
86
|
+
small: SIZE_SCALE.small.text
|
|
111
87
|
}
|
|
112
88
|
},
|
|
113
89
|
defaultVariants: {
|
|
114
|
-
size: '
|
|
90
|
+
size: 'default'
|
|
115
91
|
}
|
|
116
92
|
});
|
|
117
93
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","cva","
|
|
1
|
+
{"version":3,"names":["Platform","cva","COLOR_BG_PRIMARY","COLOR_BORDER_DEFAULT","COLOR_TEXT_MUTED","COLOR_TEXT_PRIMARY","DISABLED_CURSOR","DISABLED_OPACITY","RADIUS_SM","RADIUS_MD","SHADOW_SM","SHADOW_MD","SIZE_SCALE","TRANSITION_COLORS","selectTriggerVariants","select","default","web","join","variants","variant","outline","size","height","px","gap","small","defaultVariants","selectValueVariants","text","selectIconVariants","selectContentVariants","selectItemVariants","selectItemLabelVariants"],"sourceRoot":"../../../../src","sources":["components/Select/styles.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,GAAG,QAA2B,0BAA0B;AACjE,SACEC,gBAAgB,EAChBC,oBAAoB,EACpBC,gBAAgB,EAChBC,kBAAkB,EAClBC,eAAe,EACfC,gBAAgB,EAChBC,SAAS,EACTC,SAAS,EACTC,SAAS,EACTC,SAAS,EACTC,UAAU,EACVC,iBAAiB,QACZ,yBAAyB;;AAEhC;;AAEA,OAAO,MAAMC,qBAAqB,GAAGb,GAAG,CACtC,CACE,sEAAsE,EACtEO,SAAS,EACTE,SAAS,EACTG,iBAAiB,EACjBX,gBAAgB,EAChB,UAAUC,oBAAoB,EAAE,EAChCI,gBAAgB,EAChBD,eAAe,EACf,qCAAqC,EACrC,oCAAoC,EACpC,oCAAoC,EACpC,kCAAkC,EAClCN,QAAQ,CAACe,MAAM,CAAC;EACdC,OAAO,EAAE,qCAAqC;EAC9CC,GAAG,EAAE,CACH,0FAA0F,EAC1F,sHAAsH,EACtH,8DAA8D,CAC/D,CAACC,IAAI,CAAC,GAAG;AACZ,CAAC,CAAC,CACH,EACD;EACEC,QAAQ,EAAE;IACRC,OAAO,EAAE;MACPC,OAAO,EAAE;IACX,CAAC;IACDC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AAEF;;AAEA,OAAO,MAAMgB,kBAAkB,GAAG/B,GAAG,CACnC,CACE,uBAAuB,EACvB,gCAAgC,EAChC,0EAA0E,EAC1E,mEAAmE,EACnED,QAAQ,CAACe,MAAM,CAAC;EACdC,OAAO,EAAE,iCAAiC;EAC1CC,GAAG,EAAE;AACP,CAAC,CAAC,CACH,EACD;EACEE,QAAQ,EAAE;IACRG,IAAI,EAAE;MACJN,OAAO,EAAE,WAAW;MACpBU,KAAK,EAAE;IACT;EACF,CAAC;EACDC,eAAe,EAAE;IACfL,IAAI,EAAE;EACR;AACF,CACF,CAAC;;AAED;;AAEA,OAAO,MAAMW,uBAAuB,GAAGhC,GAAG,CACxC,CAACI,kBAAkB,EAAE,kCAAkC,CAAC,EACxD;EACEc,QAAQ,EAAE;IACRG,IAAI,EAAE;MACJN,OAAO,EAAEJ,UAAU,CAACI,OAAO,CAACa,IAAI;MAChCH,KAAK,EAAEd,UAAU,CAACc,KAAK,CAACG;IAC1B;EACF,CAAC;EACDF,eAAe,EAAE;IACfL,IAAI,EAAE;EACR;AACF,CACF,CAAC","ignoreList":[]}
|
|
@@ -2,37 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import { View } from 'react-native';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
// TODO: Integrate with tokens (multiply by spacing)
|
|
5
|
+
import { cn } from '@cdx-ui/utils';
|
|
6
|
+
import { hStackRootVariants } from './styles';
|
|
8
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
const spaceScale = {
|
|
10
|
-
xs: 1,
|
|
11
|
-
sm: 2,
|
|
12
|
-
md: 3,
|
|
13
|
-
lg: 4,
|
|
14
|
-
xl: 5,
|
|
15
|
-
'2xl': 6,
|
|
16
|
-
'3xl': 7,
|
|
17
|
-
'4xl': 8
|
|
18
|
-
};
|
|
19
8
|
export const HStack = /*#__PURE__*/forwardRef(({
|
|
9
|
+
reversed = false,
|
|
20
10
|
space,
|
|
21
|
-
reversed,
|
|
22
11
|
style,
|
|
23
12
|
className,
|
|
24
13
|
children,
|
|
25
14
|
...restProps
|
|
26
15
|
}, ref) => {
|
|
27
|
-
const gap = space ? spaceScale[space] : undefined;
|
|
28
16
|
return /*#__PURE__*/_jsx(View, {
|
|
29
17
|
ref: ref,
|
|
30
|
-
className:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
} : null, style],
|
|
18
|
+
className: cn(hStackRootVariants({
|
|
19
|
+
reversed,
|
|
20
|
+
space
|
|
21
|
+
}), className),
|
|
22
|
+
style: style,
|
|
36
23
|
...restProps,
|
|
37
24
|
children: children
|
|
38
25
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","View","
|
|
1
|
+
{"version":3,"names":["forwardRef","View","cn","hStackRootVariants","jsx","_jsx","HStack","reversed","space","style","className","children","restProps","ref","displayName"],"sourceRoot":"../../../../src","sources":["components/Stack/HStack.tsx"],"mappings":";;AACA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,IAAI,QAAwB,cAAc;AACnD,SAASC,EAAE,QAAQ,eAAe;AAClC,SAASC,kBAAkB,QAAyB,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAQ/D,OAAO,MAAMC,MAAM,gBAAGN,UAAU,CAC9B,CACE;EAAEO,QAAQ,GAAG,KAAK;EAAEC,KAAK;EAAEC,KAAK;EAAEC,SAAS;EAAEC,QAAQ;EAAE,GAAGC;AAAU,CAAC,EACrEC,GAAuB,KACpB;EACH,oBACER,IAAA,CAACJ,IAAI;IACHY,GAAG,EAAEA,GAAI;IACTH,SAAS,EAAER,EAAE,CAACC,kBAAkB,CAAC;MAAEI,QAAQ;MAAEC;IAAM,CAAC,CAAC,EAAEE,SAAS,CAAE;IAClED,KAAK,EAAEA,KAAM;IAAA,GACTG,SAAS;IAAAD,QAAA,EAEZA;EAAQ,CACL,CAAC;AAEX,CACF,CAAC;AAEDL,MAAM,CAACQ,WAAW,GAAG,QAAQ","ignoreList":[]}
|
|
@@ -2,37 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import { View } from 'react-native';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
// TODO: Integrate with tokens (multiply by spacing)
|
|
5
|
+
import { cn } from '@cdx-ui/utils';
|
|
6
|
+
import { vStackRootVariants } from './styles';
|
|
8
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
const spaceScale = {
|
|
10
|
-
xs: 1,
|
|
11
|
-
sm: 2,
|
|
12
|
-
md: 3,
|
|
13
|
-
lg: 4,
|
|
14
|
-
xl: 5,
|
|
15
|
-
'2xl': 6,
|
|
16
|
-
'3xl': 7,
|
|
17
|
-
'4xl': 8
|
|
18
|
-
};
|
|
19
8
|
export const VStack = /*#__PURE__*/forwardRef(({
|
|
9
|
+
reversed = false,
|
|
20
10
|
space,
|
|
21
|
-
reversed,
|
|
22
11
|
style,
|
|
23
12
|
className,
|
|
24
13
|
children,
|
|
25
14
|
...restProps
|
|
26
15
|
}, ref) => {
|
|
27
|
-
const gap = space ? spaceScale[space] : undefined;
|
|
28
16
|
return /*#__PURE__*/_jsx(View, {
|
|
29
17
|
ref: ref,
|
|
30
|
-
className:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
} : null, style],
|
|
18
|
+
className: cn(vStackRootVariants({
|
|
19
|
+
reversed,
|
|
20
|
+
space
|
|
21
|
+
}), className),
|
|
22
|
+
style: style,
|
|
36
23
|
...restProps,
|
|
37
24
|
children: children
|
|
38
25
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","View","
|
|
1
|
+
{"version":3,"names":["forwardRef","View","cn","vStackRootVariants","jsx","_jsx","VStack","reversed","space","style","className","children","restProps","ref","displayName"],"sourceRoot":"../../../../src","sources":["components/Stack/VStack.tsx"],"mappings":";;AACA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,IAAI,QAAwB,cAAc;AACnD,SAASC,EAAE,QAAQ,eAAe;AAClC,SAASC,kBAAkB,QAAyB,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAQ/D,OAAO,MAAMC,MAAM,gBAAGN,UAAU,CAC9B,CACE;EAAEO,QAAQ,GAAG,KAAK;EAAEC,KAAK;EAAEC,KAAK;EAAEC,SAAS;EAAEC,QAAQ;EAAE,GAAGC;AAAU,CAAC,EACrEC,GAAuB,KACpB;EACH,oBACER,IAAA,CAACJ,IAAI;IACHY,GAAG,EAAEA,GAAI;IACTH,SAAS,EAAER,EAAE,CAACC,kBAAkB,CAAC;MAAEI,QAAQ;MAAEC;IAAM,CAAC,CAAC,EAAEE,SAAS,CAAE;IAClED,KAAK,EAAEA,KAAM;IAAA,GACTG,SAAS;IAAAD,QAAA,EAEZA;EAAQ,CACL,CAAC;AAEX,CACF,CAAC;AAEDL,MAAM,CAACQ,WAAW,GAAG,QAAQ","ignoreList":[]}
|