@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 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","View","cn","cardContentVariants","cardFooterVariants","cardHeaderVariants","cardRootVariants","jsx","_jsx","CardRoot","className","children","style","props","ref","computedClassName","displayName","CardHeader","CardContent","CardFooter","Card","Header","Content","Footer"],"sourceRoot":"../../../../src","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EC,QAAQ;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACjD,MAAMC,iBAAiB,GAAGb,EAAE,CAACC,mBAAmB,CAAC,CAAC,EAAEO,SAAS,CAAC;EAE9D,oBACEF,IAAA,CAACP,IAAI;IAACa,GAAG,EAAEA,GAAI;IAACJ,SAAS,EAAEK,iBAAkB;IAACH,KAAK,EAAEA,KAAM;IAAA,GAAKC,KAAK;IAAAF,QAAA,EAClEA;EAAQ,CACL,CAAC;AAEX,CACF,CAAC;AAEDO,WAAW,CAACF,WAAW,GAAG,cAAc;;AAExC;AACA;AACA;;AAOA,MAAMG,UAAU,gBAAGnB,UAAU,CAC3B,CAAC;EAAEU,SAAS;EAAEC,QAAQ;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACjD,MAAMC,iBAAiB,GAAGb,EAAE,CAACE,kBAAkB,CAAC,CAAC,EAAEM,SAAS,CAAC;EAE7D,oBACEF,IAAA,CAACP,IAAI;IAACa,GAAG,EAAEA,GAAI;IAACJ,SAAS,EAAEK,iBAAkB;IAACH,KAAK,EAAEA,KAAM;IAAA,GAAKC,KAAK;IAAAF,QAAA,EAClEA;EAAQ,CACL,CAAC;AAEX,CACF,CAAC;AAEDQ,UAAU,CAACH,WAAW,GAAG,aAAa;;AAEtC;AACA;AACA;;AAQA,OAAO,MAAMI,IAAI,GAAGX,QAAiC;AAErDW,IAAI,CAACC,MAAM,GAAGJ,UAAU;AACxBG,IAAI,CAACE,OAAO,GAAGJ,WAAW;AAC1BE,IAAI,CAACG,MAAM,GAAGJ,UAAU","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { COLOR_BG_PRIMARY, COLOR_BORDER_DEFAULT, COLOR_TEXT_PRIMARY, RADIUS_SM, SHADOW_SM } from '../../styles/primitives';
|
|
5
|
+
|
|
6
|
+
// ── Root ────────────────────────────────────────────────────
|
|
7
|
+
|
|
8
|
+
export const cardRootVariants = cva([COLOR_BG_PRIMARY, `border ${COLOR_BORDER_DEFAULT}`, RADIUS_SM, SHADOW_SM, 'overflow-hidden']);
|
|
9
|
+
|
|
10
|
+
// ── Header ──────────────────────────────────────────────────
|
|
11
|
+
|
|
12
|
+
export const cardHeaderVariants = cva(['flex-row items-center justify-between p-4 border-b border-t-8', COLOR_BORDER_DEFAULT]);
|
|
13
|
+
|
|
14
|
+
// ── Title ───────────────────────────────────────────────────
|
|
15
|
+
|
|
16
|
+
export const cardTitleVariants = cva(['flex-1']);
|
|
17
|
+
|
|
18
|
+
// ── Content ─────────────────────────────────────────────────
|
|
19
|
+
|
|
20
|
+
export const cardContentVariants = cva([COLOR_TEXT_PRIMARY, 'p-4']);
|
|
21
|
+
|
|
22
|
+
// ── Footer ──────────────────────────────────────────────────
|
|
23
|
+
|
|
24
|
+
export const cardFooterVariants = cva(['p-4 border-t', COLOR_BORDER_DEFAULT, 'flex-row items-center gap-2']);
|
|
25
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["cva","COLOR_BG_PRIMARY","COLOR_BORDER_DEFAULT","COLOR_TEXT_PRIMARY","RADIUS_SM","SHADOW_SM","cardRootVariants","cardHeaderVariants","cardTitleVariants","cardContentVariants","cardFooterVariants"],"sourceRoot":"../../../../src","sources":["components/Card/styles.ts"],"mappings":";;AAAA,SAASA,GAAG,QAAQ,0BAA0B;AAC9C,SACEC,gBAAgB,EAChBC,oBAAoB,EACpBC,kBAAkB,EAClBC,SAAS,EACTC,SAAS,QACJ,yBAAyB;;AAEhC;;AAEA,OAAO,MAAMC,gBAAgB,GAAGN,GAAG,CAAC,CAClCC,gBAAgB,EAChB,UAAUC,oBAAoB,EAAE,EAChCE,SAAS,EACTC,SAAS,EACT,iBAAiB,CAClB,CAAC;;AAEF;;AAEA,OAAO,MAAME,kBAAkB,GAAGP,GAAG,CAAC,CACpC,+DAA+D,EAC/DE,oBAAoB,CACrB,CAAC;;AAEF;;AAEA,OAAO,MAAMM,iBAAiB,GAAGR,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;;AAEhD;;AAEA,OAAO,MAAMS,mBAAmB,GAAGT,GAAG,CAAC,CAACG,kBAAkB,EAAE,KAAK,CAAC,CAAC;;AAEnE;;AAEA,OAAO,MAAMO,kBAAkB,GAAGV,GAAG,CAAC,CACpC,cAAc,EACdE,oBAAoB,EACpB,6BAA6B,CAC9B,CAAC","ignoreList":[]}
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import { Pressable, Text, View } from 'react-native';
|
|
5
|
+
import { Check, CheckIndeterminateSmall } from '@cdx-ui/icons';
|
|
5
6
|
import { createCheckbox } from '@cdx-ui/primitives';
|
|
6
7
|
import { cn, useStyleContext, withStyleContext } from '@cdx-ui/utils';
|
|
8
|
+
import { Icon } from '../Icon';
|
|
7
9
|
import { checkboxGroupVariants, checkboxIconVariants, checkboxIndicatorVariants, checkboxLabelVariants, checkboxRootVariants } from './styles';
|
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
11
|
const SCOPE = 'CHECKBOX';
|
|
10
12
|
const Root = withStyleContext(Pressable, SCOPE);
|
|
11
13
|
const useCheckboxStyleContext = () => useStyleContext(SCOPE);
|
|
@@ -22,8 +24,9 @@ const CheckboxPrimitive = createCheckbox({
|
|
|
22
24
|
// =============================================================================
|
|
23
25
|
|
|
24
26
|
const CheckboxRoot = /*#__PURE__*/forwardRef(({
|
|
25
|
-
size = '
|
|
27
|
+
size = 'default',
|
|
26
28
|
className,
|
|
29
|
+
isIndeterminate,
|
|
27
30
|
children,
|
|
28
31
|
style,
|
|
29
32
|
...props
|
|
@@ -31,15 +34,22 @@ const CheckboxRoot = /*#__PURE__*/forwardRef(({
|
|
|
31
34
|
const computedClassName = cn(checkboxRootVariants({
|
|
32
35
|
size
|
|
33
36
|
}), className);
|
|
34
|
-
return /*#__PURE__*/
|
|
37
|
+
return /*#__PURE__*/_jsxs(CheckboxPrimitive, {
|
|
35
38
|
ref: ref,
|
|
36
39
|
className: computedClassName,
|
|
40
|
+
isIndeterminate: isIndeterminate,
|
|
37
41
|
style: style,
|
|
38
42
|
context: {
|
|
39
43
|
size
|
|
40
44
|
},
|
|
41
45
|
...props,
|
|
42
|
-
children:
|
|
46
|
+
children: [/*#__PURE__*/_jsx(CheckboxIndicator, {
|
|
47
|
+
children: /*#__PURE__*/_jsx(CheckboxPrimitive.Icon, {
|
|
48
|
+
children: /*#__PURE__*/_jsx(CheckboxIcon, {
|
|
49
|
+
as: isIndeterminate ? CheckIndeterminateSmall : Check
|
|
50
|
+
})
|
|
51
|
+
})
|
|
52
|
+
}), children]
|
|
43
53
|
});
|
|
44
54
|
});
|
|
45
55
|
CheckboxRoot.displayName = 'Checkbox';
|
|
@@ -74,26 +84,23 @@ CheckboxIndicator.displayName = 'Checkbox.Indicator';
|
|
|
74
84
|
// CHECKBOX ICON
|
|
75
85
|
// =============================================================================
|
|
76
86
|
|
|
77
|
-
const CheckboxIcon =
|
|
87
|
+
const CheckboxIcon = ({
|
|
78
88
|
className,
|
|
79
|
-
children,
|
|
80
89
|
style,
|
|
81
90
|
...props
|
|
82
|
-
}
|
|
91
|
+
}) => {
|
|
83
92
|
const {
|
|
84
93
|
size
|
|
85
94
|
} = useCheckboxStyleContext();
|
|
86
95
|
const computedClassName = cn(checkboxIconVariants({
|
|
87
96
|
size
|
|
88
97
|
}), className);
|
|
89
|
-
return /*#__PURE__*/_jsx(
|
|
90
|
-
ref: ref,
|
|
98
|
+
return /*#__PURE__*/_jsx(Icon, {
|
|
91
99
|
className: computedClassName,
|
|
92
100
|
style: style,
|
|
93
|
-
...props
|
|
94
|
-
children: children
|
|
101
|
+
...props
|
|
95
102
|
});
|
|
96
|
-
}
|
|
103
|
+
};
|
|
97
104
|
CheckboxIcon.displayName = 'Checkbox.Icon';
|
|
98
105
|
|
|
99
106
|
// =============================================================================
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","Pressable","Text","View","createCheckbox","cn","useStyleContext","withStyleContext","checkboxGroupVariants","checkboxIconVariants","checkboxIndicatorVariants","checkboxLabelVariants","checkboxRootVariants","jsx","_jsx","SCOPE","Root","useCheckboxStyleContext","CheckboxPrimitive","Indicator","
|
|
1
|
+
{"version":3,"names":["forwardRef","Pressable","Text","View","Check","CheckIndeterminateSmall","createCheckbox","cn","useStyleContext","withStyleContext","Icon","checkboxGroupVariants","checkboxIconVariants","checkboxIndicatorVariants","checkboxLabelVariants","checkboxRootVariants","jsx","_jsx","jsxs","_jsxs","SCOPE","Root","useCheckboxStyleContext","CheckboxPrimitive","Indicator","Label","Group","CheckboxRoot","size","className","isIndeterminate","children","style","props","ref","computedClassName","context","CheckboxIndicator","CheckboxIcon","as","displayName","CheckboxLabel","CheckboxGroup","direction","value","onChange","isDisabled","isInvalid","isReadOnly","viewProps","Checkbox","Object","assign"],"sourceRoot":"../../../../src","sources":["components/Checkbox/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAwB,OAAO;AAClD,SAASC,SAAS,EAAEC,IAAI,EAAkBC,IAAI,QAAwB,cAAc;AACpF,SAASC,KAAK,EAAEC,uBAAuB,QAAQ,eAAe;AAC9D,SAASC,cAAc,QAA6B,oBAAoB;AACxE,SAASC,EAAE,EAAEC,eAAe,EAAEC,gBAAgB,QAAQ,eAAe;AACrE,SAASC,IAAI,QAAmB,SAAS;AACzC,SAEEC,qBAAqB,EACrBC,oBAAoB,EACpBC,yBAAyB,EACzBC,qBAAqB,EACrBC,oBAAoB,QACf,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAElB,MAAMC,KAAK,GAAG,UAAU;AAExB,MAAMC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
4
|
import { cva } from 'class-variance-authority';
|
|
5
|
-
|
|
5
|
+
import { COLOR_BG_PRIMARY, COLOR_BORDER_STRONG, COLOR_TEXT_PRIMARY, DISABLED_CURSOR, DISABLED_OPACITY, TRANSITION_COLORS } from '../../styles/primitives';
|
|
6
|
+
export const checkboxRootVariants = cva(['flex-row items-center', DISABLED_OPACITY, DISABLED_CURSOR], {
|
|
6
7
|
variants: {
|
|
7
8
|
size: {
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
small: 'gap-2',
|
|
10
|
+
default: 'gap-2.5'
|
|
10
11
|
}
|
|
11
12
|
},
|
|
12
13
|
defaultVariants: {
|
|
13
|
-
size: '
|
|
14
|
+
size: 'default'
|
|
14
15
|
}
|
|
15
16
|
});
|
|
16
|
-
export const checkboxIndicatorVariants = cva(['items-center justify-center', 'rounded', 'border-2
|
|
17
|
-
web: [
|
|
17
|
+
export const checkboxIndicatorVariants = cva(['items-center justify-center', 'rounded', 'border-2', COLOR_BORDER_STRONG, COLOR_BG_PRIMARY, 'data-[checked=true]:bg-slate-900 data-[checked=true]:border-slate-900', 'data-[indeterminate=true]:bg-slate-900 data-[indeterminate=true]:border-slate-900', 'data-[disabled=true]:opacity-50', 'data-[invalid=true]:border-red-500', 'data-[checked=true]:data-[invalid=true]:bg-red-500 data-[checked=true]:data-[invalid=true]:border-red-500', 'data-[indeterminate=true]:data-[invalid=true]:bg-red-500 data-[indeterminate=true]:data-[invalid=true]:border-red-500', Platform.select({
|
|
18
|
+
web: [TRANSITION_COLORS, 'data-[hover=true]:data-[checked=false]:data-[indeterminate=false]:border-slate-400 data-[hover=true]:data-[checked=false]:data-[indeterminate=false]:bg-slate-50', 'data-[focus-visible=true]:ring-2 data-[focus-visible=true]:ring-slate-400/50 data-[focus-visible=true]:ring-offset-2', 'data-[invalid=true]:data-[hover=true]:border-red-400', 'data-[invalid=true]:data-[focus-visible=true]:ring-red-400/50'].join(' '),
|
|
18
19
|
default: ''
|
|
19
20
|
})], {
|
|
20
21
|
variants: {
|
|
21
22
|
size: {
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
small: 'h-4 w-4',
|
|
24
|
+
default: 'h-5 w-5'
|
|
24
25
|
}
|
|
25
26
|
},
|
|
26
27
|
defaultVariants: {
|
|
27
|
-
size: '
|
|
28
|
+
size: 'default'
|
|
28
29
|
}
|
|
29
30
|
});
|
|
30
31
|
export const checkboxIconVariants = cva(['text-white'], {
|
|
31
32
|
variants: {
|
|
32
33
|
size: {
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
small: 'h-3 w-3',
|
|
35
|
+
default: 'h-3.5 w-3.5'
|
|
35
36
|
}
|
|
36
37
|
},
|
|
37
38
|
defaultVariants: {
|
|
38
|
-
size: '
|
|
39
|
+
size: 'default'
|
|
39
40
|
}
|
|
40
41
|
});
|
|
41
|
-
export const checkboxLabelVariants = cva([
|
|
42
|
+
export const checkboxLabelVariants = cva([COLOR_TEXT_PRIMARY, 'data-[disabled=true]:text-slate-400'], {
|
|
42
43
|
variants: {
|
|
43
44
|
size: {
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
small: 'text-sm',
|
|
46
|
+
default: 'text-base'
|
|
46
47
|
}
|
|
47
48
|
},
|
|
48
49
|
defaultVariants: {
|
|
49
|
-
size: '
|
|
50
|
+
size: 'default'
|
|
50
51
|
}
|
|
51
52
|
});
|
|
52
53
|
export const checkboxGroupVariants = cva([], {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","cva","checkboxRootVariants","variants","size","
|
|
1
|
+
{"version":3,"names":["Platform","cva","COLOR_BG_PRIMARY","COLOR_BORDER_STRONG","COLOR_TEXT_PRIMARY","DISABLED_CURSOR","DISABLED_OPACITY","TRANSITION_COLORS","checkboxRootVariants","variants","size","small","default","defaultVariants","checkboxIndicatorVariants","select","web","join","checkboxIconVariants","checkboxLabelVariants","checkboxGroupVariants","direction","column","row"],"sourceRoot":"../../../../src","sources":["components/Checkbox/styles.ts"],"mappings":";;A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MS,qBAAqB,GAAGlB,GAAG,CACtC,CAACG,kBAAkB,EAAE,qCAAqC,CAAC,EAC3D;EACEK,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,KAAK,EAAE,SAAS;MAChBC,OAAO,EAAE;IACX;EACF,CAAC;EACDC,eAAe,EAAE;IACfH,IAAI,EAAE;EACR;AACF,CACF,CAAC;AAED,OAAO,MAAMU,qBAAqB,GAAGnB,GAAG,CAAC,EAAE,EAAE;EAC3CQ,QAAQ,EAAE;IACRY,SAAS,EAAE;MACTC,MAAM,EAAE,OAAO;MACfC,GAAG,EAAE;IACP;EACF,CAAC;EACDV,eAAe,EAAE;IACfQ,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { View, Text as RNText } from 'react-native';
|
|
5
|
+
import { cn, useStyleContext, withStyleContext } from '@cdx-ui/utils';
|
|
6
|
+
import { Icon } from '../Icon';
|
|
7
|
+
import { chipRootVariants, chipLabelVariants, chipIconVariants } from './styles';
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
const SCOPE = 'CHIP';
|
|
10
|
+
const Root = withStyleContext(View, SCOPE);
|
|
11
|
+
const useChipStyleContext = () => useStyleContext(SCOPE);
|
|
12
|
+
|
|
13
|
+
// =============================================================================
|
|
14
|
+
// STYLED ROOT COMPONENT
|
|
15
|
+
// =============================================================================
|
|
16
|
+
|
|
17
|
+
const ChipRoot = /*#__PURE__*/forwardRef(({
|
|
18
|
+
children,
|
|
19
|
+
color = 'default',
|
|
20
|
+
className,
|
|
21
|
+
style,
|
|
22
|
+
...props
|
|
23
|
+
}, ref) => {
|
|
24
|
+
const computedClassName = cn(chipRootVariants({
|
|
25
|
+
color
|
|
26
|
+
}), className);
|
|
27
|
+
return /*#__PURE__*/_jsx(Root, {
|
|
28
|
+
ref: ref,
|
|
29
|
+
className: computedClassName,
|
|
30
|
+
style: style,
|
|
31
|
+
context: {
|
|
32
|
+
color
|
|
33
|
+
},
|
|
34
|
+
...props,
|
|
35
|
+
children: children
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
ChipRoot.displayName = 'Chip';
|
|
39
|
+
|
|
40
|
+
// =============================================================================
|
|
41
|
+
// STYLED LABEL COMPONENT
|
|
42
|
+
// =============================================================================
|
|
43
|
+
|
|
44
|
+
const ChipLabel = /*#__PURE__*/forwardRef(({
|
|
45
|
+
className,
|
|
46
|
+
children,
|
|
47
|
+
style,
|
|
48
|
+
...props
|
|
49
|
+
}, ref) => {
|
|
50
|
+
const {
|
|
51
|
+
color
|
|
52
|
+
} = useChipStyleContext();
|
|
53
|
+
const computedClassName = cn(chipLabelVariants({
|
|
54
|
+
color
|
|
55
|
+
}), className);
|
|
56
|
+
return /*#__PURE__*/_jsx(RNText, {
|
|
57
|
+
ref: ref,
|
|
58
|
+
className: computedClassName,
|
|
59
|
+
style: style,
|
|
60
|
+
...props,
|
|
61
|
+
children: children
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
ChipLabel.displayName = 'Chip.Label';
|
|
65
|
+
|
|
66
|
+
// =============================================================================
|
|
67
|
+
// STYLED ICON COMPONENT
|
|
68
|
+
// =============================================================================
|
|
69
|
+
|
|
70
|
+
const ChipIcon = ({
|
|
71
|
+
className,
|
|
72
|
+
style,
|
|
73
|
+
as,
|
|
74
|
+
...props
|
|
75
|
+
}) => {
|
|
76
|
+
const {
|
|
77
|
+
color
|
|
78
|
+
} = useChipStyleContext();
|
|
79
|
+
const computedClassName = cn(chipIconVariants({
|
|
80
|
+
color
|
|
81
|
+
}), className);
|
|
82
|
+
return /*#__PURE__*/_jsx(Icon, {
|
|
83
|
+
as: as,
|
|
84
|
+
className: computedClassName,
|
|
85
|
+
style: style,
|
|
86
|
+
...props
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
ChipIcon.displayName = 'Chip.Icon';
|
|
90
|
+
|
|
91
|
+
// =============================================================================
|
|
92
|
+
// COMPOUND COMPONENT EXPORT
|
|
93
|
+
// =============================================================================
|
|
94
|
+
|
|
95
|
+
export const Chip = Object.assign(ChipRoot, {
|
|
96
|
+
Label: ChipLabel,
|
|
97
|
+
Icon: ChipIcon
|
|
98
|
+
});
|
|
99
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","View","Text","RNText","cn","useStyleContext","withStyleContext","Icon","chipRootVariants","chipLabelVariants","chipIconVariants","jsx","_jsx","SCOPE","Root","useChipStyleContext","ChipRoot","children","color","className","style","props","ref","computedClassName","context","displayName","ChipLabel","ChipIcon","as","Chip","Object","assign","Label"],"sourceRoot":"../../../../src","sources":["components/Chip/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAwB,OAAO;AAClD,SAASC,IAAI,EAAEC,IAAI,IAAIC,MAAM,QAAwC,cAAc;AACnF,SAASC,EAAE,EAAEC,eAAe,EAAEC,gBAAgB,QAAQ,eAAe;AACrE,SAASC,IAAI,QAAwB,SAAS;AAC9C,SAASC,gBAAgB,EAAEC,iBAAiB,EAAEC,gBAAgB,QAAsB,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE/F,MAAMC,KAAK,GAAG,MAAM;AAEpB,MAAMC,IAAI,GAAGR,gBAAgB,CAACL,IAAI,EAAEY,KAAK,CAAC;AAE1C,MAAME,mBAAmB,GAAGA,CAAA,KAAMV,eAAe,CAACQ,KAAK,CAAiB;;AAExE;AACA;AACA;;AAOA,MAAMG,QAAQ,gBAAGhB,UAAU,CACzB,CAAC;EAAEiB,QAAQ;EAAEC,KAAK,GAAG,SAAS;EAAEC,SAAS;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACpE,MAAMC,iBAAiB,GAAGnB,EAAE,CAACI,gBAAgB,CAAC;IAAEU;EAAM,CAAC,CAAC,EA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C;EAAK,CAAG,CAAC;AAChF,CAAC;AAEDM,QAAQ,CAACF,WAAW,GAAG,WAAW;;AAElC;AACA;AACA;;AAOA,OAAO,MAAMI,IAAI,GAAGC,MAAM,CAACC,MAAM,CAACf,QAAQ,EAAE;EAC1CgB,KAAK,EAAEN,SAAS;EAChBnB,IAAI,EAAEoB;AACR,CAAC,CAA0B","ignoreList":[]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
export const chipRootVariants = cva(['flex-row items-center justify-center rounded-full px-2 py-1 gap-1.5 self-start'], {
|
|
5
|
+
variants: {
|
|
6
|
+
color: {
|
|
7
|
+
default: 'bg-surface-neutral-tint',
|
|
8
|
+
error: 'bg-surface-danger-tint',
|
|
9
|
+
info: 'bg-surface-info-tint',
|
|
10
|
+
success: 'bg-surface-success-tint',
|
|
11
|
+
warning: 'bg-surface-warning-tint'
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
color: 'default'
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
// TODO: letter-spacing values (tracking-wider) are not working on web, but the font-mono-medium is.
|
|
20
|
+
export const chipLabelVariants = cva(['label-sm font-mono-medium'], {
|
|
21
|
+
variants: {
|
|
22
|
+
color: {
|
|
23
|
+
default: 'text-content-primary',
|
|
24
|
+
error: 'text-content-primary',
|
|
25
|
+
info: 'text-content-primary',
|
|
26
|
+
success: 'text-content-primary',
|
|
27
|
+
warning: 'text-content-primary'
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
color: 'default'
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
export const chipIconVariants = cva(['size-4'], {
|
|
35
|
+
variants: {
|
|
36
|
+
color: {
|
|
37
|
+
default: 'text-content-primary',
|
|
38
|
+
error: 'text-content-danger',
|
|
39
|
+
info: 'text-content-info',
|
|
40
|
+
success: 'text-content-success',
|
|
41
|
+
warning: 'text-content-warning'
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
defaultVariants: {
|
|
45
|
+
color: 'default'
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["cva","chipRootVariants","variants","color","default","error","info","success","warning","defaultVariants","chipLabelVariants","chipIconVariants"],"sourceRoot":"../../../../src","sources":["components/Chip/styles.ts"],"mappings":";;AAAA,SAASA,GAAG,QAA2B,0BAA0B;AAEjE,OAAO,MAAMC,gBAAgB,GAAGD,GAAG,CACjC,CAAC,gFAAgF,CAAC,EAClF;EACEE,QAAQ,EAAE;IACRC,KAAK,EAAE;MACLC,OAAO,EAAE,yBAAyB;MAClCC,KAAK,EAAE,wBAAwB;MAC/BC,IAAI,EAAE,sBAAsB;MAC5BC,OAAO,EAAE,yBAAyB;MAClCC,OAAO,EAAE;IACX;EACF,CAAC;EACDC,eAAe,EAAE;IACfN,KAAK,EAAE;EACT;AACF,CACF,CAAC;;AAED;AACA,OAAO,MAAMO,iBAAiB,GAAGV,GAAG,CAAC,CAAC,2BAA2B,CAAC,EAAE;EAClEE,QAAQ,EAAE;IACRC,KAAK,EAAE;MACLC,OAAO,EAAE,sBAAsB;MAC/BC,KAAK,EAAE,sBAAsB;MAC7BC,IAAI,EAAE,sBAAsB;MAC5BC,OAAO,EAAE,sBAAsB;MAC/BC,OAAO,EAAE;IACX;EACF,CAAC;EACDC,eAAe,EAAE;IACfN,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAEF,OAAO,MAAMQ,gBAAgB,GAAGX,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE;EAC9CE,QAAQ,EAAE;IACRC,KAAK,EAAE;MACLC,OAAO,EAAE,sBAAsB;MAC/BC,KAAK,EAAE,qBAAqB;MAC5BC,IAAI,EAAE,mBAAmB;MACzBC,OAAO,EAAE,sBAAsB;MAC/BC,OAAO,EAAE;IACX;EACF,CAAC;EACDC,eAAe,EAAE;IACfN,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { Pressable, Text, View } from 'react-native';
|
|
5
|
+
import { Close as CloseIcon } from '@cdx-ui/icons';
|
|
6
|
+
import { createDialog } from '@cdx-ui/primitives';
|
|
7
|
+
import { cn, useStyleContext, withStyleContext } from '@cdx-ui/utils';
|
|
8
|
+
import { Icon } from '../Icon';
|
|
9
|
+
import { dialogBodyVariants, dialogCloseIconVariants, dialogCloseVariants, dialogContentVariants, dialogDescriptionVariants, dialogFooterVariants, dialogHeaderVariants, dialogOverlayVariants, dialogTitleVariants } from './styles';
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
export { useDialog } from '@cdx-ui/primitives';
|
|
12
|
+
|
|
13
|
+
// =============================================================================
|
|
14
|
+
// STYLE CONTEXT
|
|
15
|
+
// =============================================================================
|
|
16
|
+
|
|
17
|
+
const SCOPE = 'DIALOG';
|
|
18
|
+
const Root = withStyleContext(View, SCOPE);
|
|
19
|
+
const useDialogStyleContext = () => useStyleContext(SCOPE);
|
|
20
|
+
|
|
21
|
+
// =============================================================================
|
|
22
|
+
// STYLED OVERLAY (internal — not consumer-facing)
|
|
23
|
+
// =============================================================================
|
|
24
|
+
|
|
25
|
+
const StyledOverlay = /*#__PURE__*/forwardRef(({
|
|
26
|
+
className,
|
|
27
|
+
...props
|
|
28
|
+
}, ref) => /*#__PURE__*/_jsx(Pressable, {
|
|
29
|
+
ref: ref,
|
|
30
|
+
className: cn(dialogOverlayVariants(), className),
|
|
31
|
+
...props
|
|
32
|
+
}));
|
|
33
|
+
StyledOverlay.displayName = 'Dialog.Overlay';
|
|
34
|
+
|
|
35
|
+
// =============================================================================
|
|
36
|
+
// CREATE DIALOG PRIMITIVE
|
|
37
|
+
// =============================================================================
|
|
38
|
+
|
|
39
|
+
const DialogPrimitive = createDialog({
|
|
40
|
+
Root,
|
|
41
|
+
Trigger: Pressable,
|
|
42
|
+
Overlay: StyledOverlay,
|
|
43
|
+
Content: View,
|
|
44
|
+
Header: View,
|
|
45
|
+
Title: Text,
|
|
46
|
+
Description: Text,
|
|
47
|
+
Body: View,
|
|
48
|
+
Footer: View,
|
|
49
|
+
Close: Pressable
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
// =============================================================================
|
|
53
|
+
// STYLED ROOT
|
|
54
|
+
// =============================================================================
|
|
55
|
+
|
|
56
|
+
const DialogRoot = /*#__PURE__*/forwardRef(({
|
|
57
|
+
size = 'md',
|
|
58
|
+
className,
|
|
59
|
+
children,
|
|
60
|
+
style,
|
|
61
|
+
...props
|
|
62
|
+
}, ref) => /*#__PURE__*/_jsx(DialogPrimitive, {
|
|
63
|
+
ref: ref,
|
|
64
|
+
className: className,
|
|
65
|
+
style: style,
|
|
66
|
+
context: {
|
|
67
|
+
size
|
|
68
|
+
},
|
|
69
|
+
...props,
|
|
70
|
+
children: children
|
|
71
|
+
}));
|
|
72
|
+
DialogRoot.displayName = 'Dialog';
|
|
73
|
+
|
|
74
|
+
// =============================================================================
|
|
75
|
+
// STYLED TRIGGER
|
|
76
|
+
// =============================================================================
|
|
77
|
+
|
|
78
|
+
const DialogTrigger = /*#__PURE__*/forwardRef(({
|
|
79
|
+
className,
|
|
80
|
+
children,
|
|
81
|
+
style,
|
|
82
|
+
...props
|
|
83
|
+
}, ref) => /*#__PURE__*/_jsx(DialogPrimitive.Trigger, {
|
|
84
|
+
ref: ref,
|
|
85
|
+
className: className,
|
|
86
|
+
style: style,
|
|
87
|
+
...props,
|
|
88
|
+
children: children
|
|
89
|
+
}));
|
|
90
|
+
DialogTrigger.displayName = 'Dialog.Trigger';
|
|
91
|
+
|
|
92
|
+
// =============================================================================
|
|
93
|
+
// STYLED CONTENT
|
|
94
|
+
// =============================================================================
|
|
95
|
+
|
|
96
|
+
const DialogContent = /*#__PURE__*/forwardRef(({
|
|
97
|
+
size: sizeProp,
|
|
98
|
+
className,
|
|
99
|
+
children,
|
|
100
|
+
style,
|
|
101
|
+
...props
|
|
102
|
+
}, ref) => {
|
|
103
|
+
const {
|
|
104
|
+
size: contextSize
|
|
105
|
+
} = useDialogStyleContext();
|
|
106
|
+
const size = sizeProp ?? contextSize;
|
|
107
|
+
const computedClassName = cn(dialogContentVariants({
|
|
108
|
+
size
|
|
109
|
+
}), className);
|
|
110
|
+
return /*#__PURE__*/_jsx(DialogPrimitive.Content, {
|
|
111
|
+
ref: ref,
|
|
112
|
+
className: computedClassName,
|
|
113
|
+
style: style,
|
|
114
|
+
...props,
|
|
115
|
+
children: children
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
DialogContent.displayName = 'Dialog.Content';
|
|
119
|
+
|
|
120
|
+
// =============================================================================
|
|
121
|
+
// STYLED HEADER
|
|
122
|
+
// =============================================================================
|
|
123
|
+
|
|
124
|
+
const DialogHeader = /*#__PURE__*/forwardRef(({
|
|
125
|
+
className,
|
|
126
|
+
children,
|
|
127
|
+
style,
|
|
128
|
+
...props
|
|
129
|
+
}, ref) => {
|
|
130
|
+
const computedClassName = cn(dialogHeaderVariants(), className);
|
|
131
|
+
return /*#__PURE__*/_jsx(DialogPrimitive.Header, {
|
|
132
|
+
ref: ref,
|
|
133
|
+
className: computedClassName,
|
|
134
|
+
style: style,
|
|
135
|
+
...props,
|
|
136
|
+
children: children
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
DialogHeader.displayName = 'Dialog.Header';
|
|
140
|
+
|
|
141
|
+
// =============================================================================
|
|
142
|
+
// STYLED TITLE
|
|
143
|
+
// =============================================================================
|
|
144
|
+
|
|
145
|
+
const DialogTitle = /*#__PURE__*/forwardRef(({
|
|
146
|
+
className,
|
|
147
|
+
children,
|
|
148
|
+
style,
|
|
149
|
+
...props
|
|
150
|
+
}, ref) => {
|
|
151
|
+
const computedClassName = cn(dialogTitleVariants(), className);
|
|
152
|
+
return /*#__PURE__*/_jsx(DialogPrimitive.Title, {
|
|
153
|
+
ref: ref,
|
|
154
|
+
className: computedClassName,
|
|
155
|
+
style: style,
|
|
156
|
+
...props,
|
|
157
|
+
children: children
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
DialogTitle.displayName = 'Dialog.Title';
|
|
161
|
+
|
|
162
|
+
// =============================================================================
|
|
163
|
+
// STYLED DESCRIPTION
|
|
164
|
+
// =============================================================================
|
|
165
|
+
|
|
166
|
+
const DialogDescription = /*#__PURE__*/forwardRef(({
|
|
167
|
+
className,
|
|
168
|
+
children,
|
|
169
|
+
style,
|
|
170
|
+
...props
|
|
171
|
+
}, ref) => {
|
|
172
|
+
const computedClassName = cn(dialogDescriptionVariants(), className);
|
|
173
|
+
return /*#__PURE__*/_jsx(DialogPrimitive.Description, {
|
|
174
|
+
ref: ref,
|
|
175
|
+
className: computedClassName,
|
|
176
|
+
style: style,
|
|
177
|
+
...props,
|
|
178
|
+
children: children
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
DialogDescription.displayName = 'Dialog.Description';
|
|
182
|
+
|
|
183
|
+
// =============================================================================
|
|
184
|
+
// STYLED BODY
|
|
185
|
+
// =============================================================================
|
|
186
|
+
|
|
187
|
+
const DialogBody = /*#__PURE__*/forwardRef(({
|
|
188
|
+
className,
|
|
189
|
+
children,
|
|
190
|
+
style,
|
|
191
|
+
...props
|
|
192
|
+
}, ref) => {
|
|
193
|
+
const computedClassName = cn(dialogBodyVariants(), className);
|
|
194
|
+
return /*#__PURE__*/_jsx(DialogPrimitive.Body, {
|
|
195
|
+
ref: ref,
|
|
196
|
+
className: computedClassName,
|
|
197
|
+
style: style,
|
|
198
|
+
...props,
|
|
199
|
+
children: children
|
|
200
|
+
});
|
|
201
|
+
});
|
|
202
|
+
DialogBody.displayName = 'Dialog.Body';
|
|
203
|
+
|
|
204
|
+
// =============================================================================
|
|
205
|
+
// STYLED FOOTER
|
|
206
|
+
// =============================================================================
|
|
207
|
+
|
|
208
|
+
const DialogFooter = /*#__PURE__*/forwardRef(({
|
|
209
|
+
className,
|
|
210
|
+
children,
|
|
211
|
+
style,
|
|
212
|
+
...props
|
|
213
|
+
}, ref) => {
|
|
214
|
+
const computedClassName = cn(dialogFooterVariants(), className);
|
|
215
|
+
return /*#__PURE__*/_jsx(DialogPrimitive.Footer, {
|
|
216
|
+
ref: ref,
|
|
217
|
+
className: computedClassName,
|
|
218
|
+
style: style,
|
|
219
|
+
...props,
|
|
220
|
+
children: children
|
|
221
|
+
});
|
|
222
|
+
});
|
|
223
|
+
DialogFooter.displayName = 'Dialog.Footer';
|
|
224
|
+
|
|
225
|
+
// =============================================================================
|
|
226
|
+
// STYLED CLOSE
|
|
227
|
+
// =============================================================================
|
|
228
|
+
|
|
229
|
+
const DialogClose = /*#__PURE__*/forwardRef(({
|
|
230
|
+
className,
|
|
231
|
+
accessibilityLabel = 'Close',
|
|
232
|
+
children,
|
|
233
|
+
style,
|
|
234
|
+
...props
|
|
235
|
+
}, ref) => {
|
|
236
|
+
const computedClassName = cn(dialogCloseVariants(), className);
|
|
237
|
+
return /*#__PURE__*/_jsx(DialogPrimitive.Close, {
|
|
238
|
+
ref: ref,
|
|
239
|
+
className: computedClassName,
|
|
240
|
+
style: style,
|
|
241
|
+
hitSlop: 12,
|
|
242
|
+
accessibilityRole: "button",
|
|
243
|
+
accessibilityLabel: accessibilityLabel,
|
|
244
|
+
...props,
|
|
245
|
+
children: children ?? /*#__PURE__*/_jsx(Icon, {
|
|
246
|
+
as: CloseIcon,
|
|
247
|
+
className: dialogCloseIconVariants()
|
|
248
|
+
})
|
|
249
|
+
});
|
|
250
|
+
});
|
|
251
|
+
DialogClose.displayName = 'Dialog.Close';
|
|
252
|
+
|
|
253
|
+
// =============================================================================
|
|
254
|
+
// COMPOUND COMPONENT
|
|
255
|
+
// =============================================================================
|
|
256
|
+
|
|
257
|
+
export const Dialog = Object.assign(DialogRoot, {
|
|
258
|
+
Trigger: DialogTrigger,
|
|
259
|
+
Content: DialogContent,
|
|
260
|
+
Header: DialogHeader,
|
|
261
|
+
Title: DialogTitle,
|
|
262
|
+
Description: DialogDescription,
|
|
263
|
+
Body: DialogBody,
|
|
264
|
+
Footer: DialogFooter,
|
|
265
|
+
Close: DialogClose
|
|
266
|
+
});
|
|
267
|
+
//# sourceMappingURL=index.js.map
|