@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
|
@@ -1,44 +1,36 @@
|
|
|
1
1
|
import { Platform } from 'react-native';
|
|
2
2
|
import { cva, type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { DISABLED_CURSOR, TRANSITION_COLORS } from '../../styles/primitives';
|
|
3
4
|
|
|
4
|
-
// TODO:
|
|
5
|
-
// TODO: Create cva wrapper
|
|
5
|
+
// TODO: Validate that `dark:` syntax works with Uniwind `ScopedTheme`
|
|
6
6
|
|
|
7
7
|
export const buttonRootVariants = cva(
|
|
8
8
|
[
|
|
9
9
|
'flex-row items-center justify-center',
|
|
10
|
-
'rounded-
|
|
10
|
+
'rounded-[var(--border-radius-button)]',
|
|
11
11
|
'web:outline-none web:focus:outline-none web:focus-visible:outline-none',
|
|
12
|
-
|
|
13
|
-
'data-[disabled=true]:opacity-
|
|
14
|
-
|
|
12
|
+
TRANSITION_COLORS,
|
|
13
|
+
'data-[disabled=true]:opacity-[--opacity-disabled]',
|
|
14
|
+
DISABLED_CURSOR,
|
|
15
|
+
'web:data-[focus-visible=true]:ring-2 web:data-[focus-visible=true]:ring-[--color-stroke-focus] web:data-[focus-visible=true]:ring-offset-2',
|
|
15
16
|
],
|
|
16
17
|
{
|
|
17
18
|
variants: {
|
|
18
19
|
variant: {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
'bg-transparent border border-neutral-border-strong',
|
|
23
|
-
'data-[hover=true]:bg-neutral-background',
|
|
24
|
-
'data-[active=true]:bg-neutral-border',
|
|
25
|
-
],
|
|
26
|
-
ghost: [
|
|
27
|
-
'bg-transparent',
|
|
28
|
-
'data-[hover=true]:bg-neutral-background',
|
|
29
|
-
'data-[active=true]:bg-neutral-border',
|
|
30
|
-
],
|
|
20
|
+
strong: ['border-b-1 border-black/75'], // TODO: Replace with token
|
|
21
|
+
outline: ['bg-transparent', 'border border-stroke-primary'],
|
|
22
|
+
ghost: ['bg-transparent'],
|
|
31
23
|
},
|
|
32
24
|
color: {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
25
|
+
action: [],
|
|
26
|
+
danger: [],
|
|
27
|
+
warning: [],
|
|
28
|
+
success: [],
|
|
29
|
+
info: [],
|
|
37
30
|
},
|
|
38
31
|
size: {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
lg: 'h-12 px-6 gap-2.5',
|
|
32
|
+
default: 'h-10 px-4 gap-2',
|
|
33
|
+
small: 'h-8 px-3 gap-1.5',
|
|
42
34
|
},
|
|
43
35
|
fullWidth: {
|
|
44
36
|
true: 'w-full',
|
|
@@ -46,161 +38,148 @@ export const buttonRootVariants = cva(
|
|
|
46
38
|
},
|
|
47
39
|
},
|
|
48
40
|
compoundVariants: [
|
|
41
|
+
// ── strong × color (filled surface) ──────────────────────────────
|
|
49
42
|
{
|
|
50
|
-
variant: '
|
|
51
|
-
color: '
|
|
43
|
+
variant: 'strong',
|
|
44
|
+
color: 'action',
|
|
52
45
|
className: [
|
|
53
|
-
'bg-
|
|
46
|
+
'bg-surface-action-strong',
|
|
54
47
|
Platform.select({
|
|
55
|
-
default: 'data-[active=true]:bg-
|
|
56
|
-
web: 'data-[hover=true]:bg-
|
|
48
|
+
default: 'data-[active=true]:bg-surface-action-strong-active',
|
|
49
|
+
web: 'data-[hover=true]:bg-surface-action-strong-hover data-[active=true]:data-[hover=true]:bg-surface-action-strong-active',
|
|
57
50
|
}),
|
|
58
51
|
],
|
|
59
52
|
},
|
|
60
53
|
{
|
|
61
|
-
variant: '
|
|
62
|
-
color: '
|
|
63
|
-
className: [
|
|
64
|
-
'bg-amber-500',
|
|
65
|
-
Platform.select({
|
|
66
|
-
default: 'data-[active=true]:bg-amber-700',
|
|
67
|
-
web: 'data-[hover=true]:bg-amber-600 data-[active=true]:data-[hover=true]:bg-amber-700',
|
|
68
|
-
}),
|
|
69
|
-
],
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
variant: 'solid',
|
|
73
|
-
color: 'success',
|
|
54
|
+
variant: 'strong',
|
|
55
|
+
color: 'danger',
|
|
74
56
|
className: [
|
|
75
|
-
'bg-
|
|
57
|
+
'bg-surface-danger-strong',
|
|
76
58
|
Platform.select({
|
|
77
|
-
default: 'data-[active=true]:bg-
|
|
78
|
-
web: 'data-[hover=true]:bg-
|
|
59
|
+
default: 'data-[active=true]:bg-surface-danger-strong-active',
|
|
60
|
+
web: 'data-[hover=true]:bg-surface-danger-strong-hover data-[active=true]:data-[hover=true]:bg-surface-danger-strong-active',
|
|
79
61
|
}),
|
|
80
62
|
],
|
|
81
63
|
},
|
|
82
64
|
{
|
|
83
|
-
variant: '
|
|
84
|
-
color: '
|
|
65
|
+
variant: 'strong',
|
|
66
|
+
color: 'warning',
|
|
85
67
|
className: [
|
|
86
|
-
'bg-
|
|
68
|
+
'bg-surface-warning-strong',
|
|
87
69
|
Platform.select({
|
|
88
|
-
default: 'data-[active=true]:bg-
|
|
89
|
-
web: 'data-[hover=true]:bg-
|
|
70
|
+
default: 'data-[active=true]:bg-amber-600',
|
|
71
|
+
web: 'data-[hover=true]:bg-amber-500 data-[active=true]:data-[hover=true]:bg-amber-600',
|
|
90
72
|
}),
|
|
91
73
|
],
|
|
92
74
|
},
|
|
93
75
|
{
|
|
94
|
-
variant: '
|
|
95
|
-
color: '
|
|
76
|
+
variant: 'strong',
|
|
77
|
+
color: 'success',
|
|
96
78
|
className: [
|
|
97
|
-
'bg-
|
|
79
|
+
'bg-surface-success-strong',
|
|
98
80
|
Platform.select({
|
|
99
|
-
default: 'data-[active=true]:bg-
|
|
100
|
-
web: 'data-[hover=true]:bg-
|
|
81
|
+
default: 'data-[active=true]:bg-green-800',
|
|
82
|
+
web: 'data-[hover=true]:bg-green-700 data-[active=true]:data-[hover=true]:bg-green-800',
|
|
101
83
|
}),
|
|
102
84
|
],
|
|
103
85
|
},
|
|
104
86
|
{
|
|
105
|
-
variant: '
|
|
106
|
-
color: '
|
|
87
|
+
variant: 'strong',
|
|
88
|
+
color: 'info',
|
|
107
89
|
className: [
|
|
108
|
-
'bg-
|
|
90
|
+
'bg-surface-info-strong',
|
|
109
91
|
Platform.select({
|
|
110
|
-
default: 'data-[active=true]:bg-
|
|
111
|
-
web: 'data-[hover=true]:bg-
|
|
92
|
+
default: 'data-[active=true]:bg-sky-700',
|
|
93
|
+
web: 'data-[hover=true]:bg-sky-600 data-[active=true]:data-[hover=true]:bg-sky-700',
|
|
112
94
|
}),
|
|
113
95
|
],
|
|
114
96
|
},
|
|
97
|
+
|
|
98
|
+
// ── outline × color (border + hover/active surface) ─────────────
|
|
115
99
|
{
|
|
116
|
-
variant: '
|
|
117
|
-
color: '
|
|
100
|
+
variant: 'outline',
|
|
101
|
+
color: 'action',
|
|
118
102
|
className: [
|
|
119
|
-
'
|
|
103
|
+
'border-stroke-action',
|
|
120
104
|
Platform.select({
|
|
121
|
-
default: 'data-[active=true]:bg-
|
|
122
|
-
web: 'data-[hover=true]:bg-
|
|
105
|
+
default: 'data-[active=true]:bg-surface-action-subtle-active',
|
|
106
|
+
web: 'data-[hover=true]:bg-surface-action-tint-hover data-[active=true]:data-[hover=true]:bg-surface-action-subtle-active',
|
|
123
107
|
}),
|
|
124
108
|
],
|
|
125
109
|
},
|
|
126
110
|
{
|
|
127
|
-
variant: '
|
|
111
|
+
variant: 'outline',
|
|
128
112
|
color: 'danger',
|
|
129
113
|
className: [
|
|
130
|
-
'
|
|
114
|
+
'border-stroke-danger',
|
|
131
115
|
Platform.select({
|
|
132
|
-
default: 'data-[active=true]:bg-
|
|
133
|
-
web: 'data-[hover=true]:bg-
|
|
116
|
+
default: 'data-[active=true]:bg-surface-danger-subtle-active',
|
|
117
|
+
web: 'data-[hover=true]:bg-surface-danger-tint-hover data-[active=true]:data-[hover=true]:bg-surface-danger-subtle-active',
|
|
134
118
|
}),
|
|
135
119
|
],
|
|
136
120
|
},
|
|
137
121
|
{
|
|
138
122
|
variant: 'outline',
|
|
139
|
-
color: '
|
|
123
|
+
color: 'warning',
|
|
140
124
|
className: [
|
|
141
|
-
'border-
|
|
142
|
-
'data-[focus-visible=true]:border-blue-500',
|
|
125
|
+
'border-stroke-warning',
|
|
143
126
|
Platform.select({
|
|
144
|
-
default: 'data-[active=true]:
|
|
145
|
-
web: 'data-[hover=true]:
|
|
127
|
+
default: 'data-[active=true]:bg-surface-warning-subtle',
|
|
128
|
+
web: 'data-[hover=true]:bg-surface-warning-tint data-[active=true]:data-[hover=true]:bg-surface-warning-subtle',
|
|
146
129
|
}),
|
|
147
130
|
],
|
|
148
131
|
},
|
|
149
132
|
{
|
|
150
133
|
variant: 'outline',
|
|
151
|
-
color: '
|
|
134
|
+
color: 'success',
|
|
152
135
|
className: [
|
|
153
|
-
'border-
|
|
154
|
-
'data-[focus-visible=true]:border-amber-500',
|
|
136
|
+
'border-stroke-success',
|
|
155
137
|
Platform.select({
|
|
156
|
-
default: 'data-[active=true]:
|
|
157
|
-
web: 'data-[hover=true]:
|
|
138
|
+
default: 'data-[active=true]:bg-surface-success-subtle',
|
|
139
|
+
web: 'data-[hover=true]:bg-surface-success-tint data-[active=true]:data-[hover=true]:bg-surface-success-subtle',
|
|
158
140
|
}),
|
|
159
141
|
],
|
|
160
142
|
},
|
|
161
143
|
{
|
|
162
144
|
variant: 'outline',
|
|
163
|
-
color: '
|
|
145
|
+
color: 'info',
|
|
164
146
|
className: [
|
|
165
|
-
'border-
|
|
166
|
-
'data-[focus-visible=true]:border-green-500',
|
|
147
|
+
'border-stroke-info',
|
|
167
148
|
Platform.select({
|
|
168
|
-
default: 'data-[active=true]:
|
|
169
|
-
web: 'data-[hover=true]:
|
|
149
|
+
default: 'data-[active=true]:bg-surface-info-subtle',
|
|
150
|
+
web: 'data-[hover=true]:bg-surface-info-tint data-[active=true]:data-[hover=true]:bg-surface-info-subtle',
|
|
170
151
|
}),
|
|
171
152
|
],
|
|
172
153
|
},
|
|
154
|
+
|
|
155
|
+
// ── ghost × color (hover/active surface fills) ──────────────────
|
|
173
156
|
{
|
|
174
|
-
variant: '
|
|
175
|
-
color: '
|
|
157
|
+
variant: 'ghost',
|
|
158
|
+
color: 'action',
|
|
176
159
|
className: [
|
|
177
|
-
'border-red-500',
|
|
178
|
-
'data-[focus-visible=true]:border-red-500',
|
|
179
160
|
Platform.select({
|
|
180
|
-
default: 'data-[active=true]:
|
|
181
|
-
web: 'data-[hover=true]:
|
|
161
|
+
default: 'data-[active=true]:bg-surface-action-subtle-active',
|
|
162
|
+
web: 'data-[hover=true]:bg-surface-action-tint-hover data-[active=true]:data-[hover=true]:bg-surface-action-subtle-active',
|
|
182
163
|
}),
|
|
183
164
|
],
|
|
184
165
|
},
|
|
185
166
|
{
|
|
186
167
|
variant: 'ghost',
|
|
187
|
-
color: '
|
|
168
|
+
color: 'danger',
|
|
188
169
|
className: [
|
|
189
|
-
'bg-transparent',
|
|
190
170
|
Platform.select({
|
|
191
|
-
default: 'data-[active=true]:bg-
|
|
192
|
-
web: 'data-[hover=true]:bg-
|
|
171
|
+
default: 'data-[active=true]:bg-surface-danger-subtle-active',
|
|
172
|
+
web: 'data-[hover=true]:bg-surface-danger-tint-hover data-[active=true]:data-[hover=true]:bg-surface-danger-subtle-active',
|
|
193
173
|
}),
|
|
194
174
|
],
|
|
195
175
|
},
|
|
196
176
|
{
|
|
197
177
|
variant: 'ghost',
|
|
198
|
-
color: '
|
|
178
|
+
color: 'warning',
|
|
199
179
|
className: [
|
|
200
|
-
'bg-transparent',
|
|
201
180
|
Platform.select({
|
|
202
|
-
default: 'data-[active=true]:bg-
|
|
203
|
-
web: 'data-[hover=true]:bg-
|
|
181
|
+
default: 'data-[active=true]:bg-surface-warning-subtle',
|
|
182
|
+
web: 'data-[hover=true]:bg-surface-warning-tint data-[active=true]:data-[hover=true]:bg-surface-warning-subtle',
|
|
204
183
|
}),
|
|
205
184
|
],
|
|
206
185
|
},
|
|
@@ -208,29 +187,27 @@ export const buttonRootVariants = cva(
|
|
|
208
187
|
variant: 'ghost',
|
|
209
188
|
color: 'success',
|
|
210
189
|
className: [
|
|
211
|
-
'bg-transparent',
|
|
212
190
|
Platform.select({
|
|
213
|
-
default: 'data-[active=true]:bg-
|
|
214
|
-
web: 'data-[hover=true]:bg-
|
|
191
|
+
default: 'data-[active=true]:bg-surface-success-subtle',
|
|
192
|
+
web: 'data-[hover=true]:bg-surface-success-tint data-[active=true]:data-[hover=true]:bg-surface-success-subtle',
|
|
215
193
|
}),
|
|
216
194
|
],
|
|
217
195
|
},
|
|
218
196
|
{
|
|
219
197
|
variant: 'ghost',
|
|
220
|
-
color: '
|
|
198
|
+
color: 'info',
|
|
221
199
|
className: [
|
|
222
|
-
'bg-transparent',
|
|
223
200
|
Platform.select({
|
|
224
|
-
default: 'data-[active=true]:bg-
|
|
225
|
-
web: 'data-[hover=true]:bg-
|
|
201
|
+
default: 'data-[active=true]:bg-surface-info-subtle',
|
|
202
|
+
web: 'data-[hover=true]:bg-surface-info-tint data-[active=true]:data-[hover=true]:bg-surface-info-subtle',
|
|
226
203
|
}),
|
|
227
204
|
],
|
|
228
205
|
},
|
|
229
206
|
],
|
|
230
207
|
defaultVariants: {
|
|
231
|
-
variant: '
|
|
232
|
-
color: '
|
|
233
|
-
size: '
|
|
208
|
+
variant: 'strong',
|
|
209
|
+
color: 'action',
|
|
210
|
+
size: 'default',
|
|
234
211
|
fullWidth: false,
|
|
235
212
|
},
|
|
236
213
|
},
|
|
@@ -239,156 +216,117 @@ export const buttonRootVariants = cva(
|
|
|
239
216
|
export const buttonTextVariants = cva(['font-medium', 'text-center'], {
|
|
240
217
|
variants: {
|
|
241
218
|
variant: {
|
|
242
|
-
|
|
243
|
-
subtle: [],
|
|
219
|
+
strong: [],
|
|
244
220
|
outline: [],
|
|
245
221
|
ghost: [],
|
|
246
222
|
},
|
|
247
223
|
color: {
|
|
248
|
-
|
|
249
|
-
secondary: [],
|
|
250
|
-
success: [],
|
|
224
|
+
action: [],
|
|
251
225
|
danger: [],
|
|
226
|
+
warning: [],
|
|
227
|
+
success: [],
|
|
228
|
+
info: [],
|
|
252
229
|
},
|
|
253
230
|
size: {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
lg: 'text-lg',
|
|
231
|
+
default: 'text-base',
|
|
232
|
+
small: 'text-sm',
|
|
257
233
|
},
|
|
258
234
|
},
|
|
259
235
|
compoundVariants: [
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
className: 'text-green-950',
|
|
274
|
-
},
|
|
275
|
-
{
|
|
276
|
-
variant: 'subtle',
|
|
277
|
-
color: 'danger',
|
|
278
|
-
className: 'text-red-950',
|
|
279
|
-
},
|
|
280
|
-
{
|
|
281
|
-
variant: ['outline', 'ghost'],
|
|
282
|
-
color: 'primary',
|
|
283
|
-
className: [
|
|
284
|
-
'text-blue-500',
|
|
285
|
-
Platform.select({
|
|
286
|
-
default: 'data-[active=true]:text-blue-700',
|
|
287
|
-
web: 'data-[hover=true]:text-blue-600 data-[active=true]:data-[hover=true]:text-blue-700',
|
|
288
|
-
}),
|
|
289
|
-
],
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
variant: ['outline', 'ghost'],
|
|
293
|
-
color: 'secondary',
|
|
294
|
-
className: [
|
|
295
|
-
'text-amber-600',
|
|
296
|
-
Platform.select({
|
|
297
|
-
default: 'data-[active=true]:text-amber-800',
|
|
298
|
-
web: 'data-[hover=true]:text-amber-700 data-[active=true]:data-[hover=true]:text-amber-800',
|
|
299
|
-
}),
|
|
300
|
-
],
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
variant: ['outline', 'ghost'],
|
|
304
|
-
color: 'success',
|
|
305
|
-
className: [
|
|
306
|
-
'text-green-600',
|
|
307
|
-
Platform.select({
|
|
308
|
-
default: 'data-[active=true]:text-green-800',
|
|
309
|
-
web: 'data-[hover=true]:text-green-700 data-[active=true]:data-[hover=true]:text-green-800',
|
|
310
|
-
}),
|
|
311
|
-
],
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
variant: ['outline', 'ghost'],
|
|
315
|
-
color: 'danger',
|
|
316
|
-
className: [
|
|
317
|
-
'text-red-500',
|
|
318
|
-
Platform.select({
|
|
319
|
-
default: 'data-[active=true]:text-red-700',
|
|
320
|
-
web: 'data-[hover=true]:text-red-600 data-[active=true]:data-[hover=true]:text-red-700',
|
|
321
|
-
}),
|
|
322
|
-
],
|
|
323
|
-
},
|
|
236
|
+
// ── strong × color (filled foreground text) ──────────────────────
|
|
237
|
+
{ variant: 'strong', color: 'action', className: 'text-content-action-on-strong' },
|
|
238
|
+
{ variant: 'strong', color: 'danger', className: 'text-content-danger-on-strong' },
|
|
239
|
+
{ variant: 'strong', color: 'warning', className: 'text-content-warning-on-strong' },
|
|
240
|
+
{ variant: 'strong', color: 'success', className: 'text-content-success-on-strong' },
|
|
241
|
+
{ variant: 'strong', color: 'info', className: 'text-content-info-on-strong' },
|
|
242
|
+
|
|
243
|
+
// ── outline/ghost × color (transparent foreground text) ──────────
|
|
244
|
+
{ variant: ['outline', 'ghost'], color: 'action', className: 'text-content-action' },
|
|
245
|
+
{ variant: ['outline', 'ghost'], color: 'danger', className: 'text-content-danger' },
|
|
246
|
+
{ variant: ['outline', 'ghost'], color: 'warning', className: 'text-content-warning' },
|
|
247
|
+
{ variant: ['outline', 'ghost'], color: 'success', className: 'text-content-success' },
|
|
248
|
+
{ variant: ['outline', 'ghost'], color: 'info', className: 'text-content-info' },
|
|
324
249
|
],
|
|
325
250
|
defaultVariants: {
|
|
326
|
-
variant: '
|
|
327
|
-
color: '
|
|
328
|
-
size: '
|
|
251
|
+
variant: 'strong',
|
|
252
|
+
color: 'action',
|
|
253
|
+
size: 'default',
|
|
329
254
|
},
|
|
330
255
|
});
|
|
331
256
|
|
|
332
257
|
export const buttonSpinnerVariants = cva([], {
|
|
333
258
|
variants: {
|
|
334
259
|
variant: {
|
|
335
|
-
|
|
336
|
-
subtle: [],
|
|
260
|
+
strong: [],
|
|
337
261
|
outline: [],
|
|
338
262
|
ghost: [],
|
|
339
263
|
},
|
|
340
264
|
color: {
|
|
341
|
-
|
|
342
|
-
secondary: [],
|
|
343
|
-
success: [],
|
|
265
|
+
action: [],
|
|
344
266
|
danger: [],
|
|
267
|
+
warning: [],
|
|
268
|
+
success: [],
|
|
269
|
+
info: [],
|
|
345
270
|
},
|
|
346
271
|
},
|
|
347
272
|
compoundVariants: [
|
|
273
|
+
// ── strong × color ───────────────────────────────────────────────
|
|
348
274
|
{
|
|
349
|
-
variant: '
|
|
350
|
-
color: '
|
|
351
|
-
className: 'accent-
|
|
275
|
+
variant: 'strong',
|
|
276
|
+
color: 'action',
|
|
277
|
+
className: 'accent-[var(--color-content-action-on-strong)]',
|
|
352
278
|
},
|
|
353
279
|
{
|
|
354
|
-
variant: '
|
|
355
|
-
color: '
|
|
356
|
-
className: 'accent-
|
|
280
|
+
variant: 'strong',
|
|
281
|
+
color: 'danger',
|
|
282
|
+
className: 'accent-[var(--color-content-danger-on-strong)]',
|
|
357
283
|
},
|
|
358
284
|
{
|
|
359
|
-
variant: '
|
|
285
|
+
variant: 'strong',
|
|
286
|
+
color: 'warning',
|
|
287
|
+
className: 'accent-[var(--color-content-warning-on-strong)]',
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
variant: 'strong',
|
|
360
291
|
color: 'success',
|
|
361
|
-
className: 'accent-
|
|
292
|
+
className: 'accent-[var(--color-content-success-on-strong)]',
|
|
362
293
|
},
|
|
363
294
|
{
|
|
364
|
-
variant: '
|
|
365
|
-
color: '
|
|
366
|
-
className: 'accent-
|
|
295
|
+
variant: 'strong',
|
|
296
|
+
color: 'info',
|
|
297
|
+
className: 'accent-[var(--color-content-info-on-strong)]',
|
|
367
298
|
},
|
|
299
|
+
|
|
300
|
+
// ── outline/ghost × color ────────────────────────────────────────
|
|
368
301
|
{
|
|
369
302
|
variant: ['outline', 'ghost'],
|
|
370
|
-
color: '
|
|
371
|
-
className: 'accent-
|
|
303
|
+
color: 'action',
|
|
304
|
+
className: 'accent-[var(--color-content-action)]',
|
|
372
305
|
},
|
|
373
306
|
{
|
|
374
307
|
variant: ['outline', 'ghost'],
|
|
375
|
-
color: '
|
|
376
|
-
className: 'accent-
|
|
308
|
+
color: 'danger',
|
|
309
|
+
className: 'accent-[var(--color-content-danger)]',
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
variant: ['outline', 'ghost'],
|
|
313
|
+
color: 'warning',
|
|
314
|
+
className: 'accent-[var(--color-content-warning)]',
|
|
377
315
|
},
|
|
378
316
|
{
|
|
379
317
|
variant: ['outline', 'ghost'],
|
|
380
318
|
color: 'success',
|
|
381
|
-
className: 'accent-
|
|
319
|
+
className: 'accent-[var(--color-content-success)]',
|
|
382
320
|
},
|
|
383
321
|
{
|
|
384
322
|
variant: ['outline', 'ghost'],
|
|
385
|
-
color: '
|
|
386
|
-
className: 'accent-
|
|
323
|
+
color: 'info',
|
|
324
|
+
className: 'accent-[var(--color-content-info)]',
|
|
387
325
|
},
|
|
388
326
|
],
|
|
389
327
|
defaultVariants: {
|
|
390
|
-
variant: '
|
|
391
|
-
color: '
|
|
328
|
+
variant: 'strong',
|
|
329
|
+
color: 'action',
|
|
392
330
|
},
|
|
393
331
|
});
|
|
394
332
|
|
|
@@ -411,5 +349,17 @@ export const buttonGroupVariants = cva([], {
|
|
|
411
349
|
},
|
|
412
350
|
});
|
|
413
351
|
|
|
352
|
+
export const buttonIconVariants = cva([], {
|
|
353
|
+
variants: {
|
|
354
|
+
size: {
|
|
355
|
+
default: 'size-5',
|
|
356
|
+
small: 'size-4',
|
|
357
|
+
},
|
|
358
|
+
},
|
|
359
|
+
defaultVariants: {
|
|
360
|
+
size: 'default',
|
|
361
|
+
},
|
|
362
|
+
});
|
|
363
|
+
|
|
414
364
|
export type ButtonVariantProps = VariantProps<typeof buttonRootVariants>;
|
|
415
365
|
export type ButtonGroupVariantProps = VariantProps<typeof buttonGroupVariants>;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { forwardRef, type ReactNode } from 'react';
|
|
2
|
+
import { View, type ViewProps } from 'react-native';
|
|
3
|
+
import { cn } from '@cdx-ui/utils';
|
|
4
|
+
import {
|
|
5
|
+
cardContentVariants,
|
|
6
|
+
cardFooterVariants,
|
|
7
|
+
cardHeaderVariants,
|
|
8
|
+
cardRootVariants,
|
|
9
|
+
} from './styles';
|
|
10
|
+
|
|
11
|
+
// =============================================================================
|
|
12
|
+
// STYLED ROOT COMPONENT
|
|
13
|
+
// =============================================================================
|
|
14
|
+
|
|
15
|
+
export interface CardProps extends ViewProps {
|
|
16
|
+
className?: string;
|
|
17
|
+
children?: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const CardRoot = forwardRef<View, CardProps>(({ className, children, style, ...props }, ref) => {
|
|
21
|
+
const computedClassName = cn(cardRootVariants(), className);
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<View ref={ref} className={computedClassName} style={style} {...props}>
|
|
25
|
+
{children}
|
|
26
|
+
</View>
|
|
27
|
+
);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
CardRoot.displayName = 'Card';
|
|
31
|
+
|
|
32
|
+
// =============================================================================
|
|
33
|
+
// STYLED HEADER COMPONENT
|
|
34
|
+
// =============================================================================
|
|
35
|
+
|
|
36
|
+
export interface CardHeaderProps extends ViewProps {
|
|
37
|
+
className?: string;
|
|
38
|
+
children?: ReactNode;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const CardHeader = forwardRef<View, CardHeaderProps>(
|
|
42
|
+
({ className, children, style, ...props }, ref) => {
|
|
43
|
+
const computedClassName = cn(cardHeaderVariants(), className);
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<View ref={ref} className={computedClassName} style={style} {...props}>
|
|
47
|
+
{children}
|
|
48
|
+
</View>
|
|
49
|
+
);
|
|
50
|
+
},
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
CardHeader.displayName = 'Card.Header';
|
|
54
|
+
|
|
55
|
+
// =============================================================================
|
|
56
|
+
// STYLED CONTENT COMPONENT
|
|
57
|
+
// =============================================================================
|
|
58
|
+
|
|
59
|
+
export interface CardContentProps extends ViewProps {
|
|
60
|
+
className?: string;
|
|
61
|
+
children?: ReactNode;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const CardContent = forwardRef<View, CardContentProps>(
|
|
65
|
+
({ className, children, style, ...props }, ref) => {
|
|
66
|
+
const computedClassName = cn(cardContentVariants(), className);
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<View ref={ref} className={computedClassName} style={style} {...props}>
|
|
70
|
+
{children}
|
|
71
|
+
</View>
|
|
72
|
+
);
|
|
73
|
+
},
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
CardContent.displayName = 'Card.Content';
|
|
77
|
+
|
|
78
|
+
// =============================================================================
|
|
79
|
+
// STYLED FOOTER COMPONENT
|
|
80
|
+
// =============================================================================
|
|
81
|
+
|
|
82
|
+
export interface CardFooterProps extends ViewProps {
|
|
83
|
+
className?: string;
|
|
84
|
+
children?: ReactNode;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const CardFooter = forwardRef<View, CardFooterProps>(
|
|
88
|
+
({ className, children, style, ...props }, ref) => {
|
|
89
|
+
const computedClassName = cn(cardFooterVariants(), className);
|
|
90
|
+
|
|
91
|
+
return (
|
|
92
|
+
<View ref={ref} className={computedClassName} style={style} {...props}>
|
|
93
|
+
{children}
|
|
94
|
+
</View>
|
|
95
|
+
);
|
|
96
|
+
},
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
CardFooter.displayName = 'Card.Footer';
|
|
100
|
+
|
|
101
|
+
// =============================================================================
|
|
102
|
+
// COMPOUND COMPONENT
|
|
103
|
+
// =============================================================================
|
|
104
|
+
|
|
105
|
+
type CardCompoundComponent = typeof CardRoot & {
|
|
106
|
+
Header: typeof CardHeader;
|
|
107
|
+
Content: typeof CardContent;
|
|
108
|
+
Footer: typeof CardFooter;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export const Card = CardRoot as CardCompoundComponent;
|
|
112
|
+
|
|
113
|
+
Card.Header = CardHeader;
|
|
114
|
+
Card.Content = CardContent;
|
|
115
|
+
Card.Footer = CardFooter;
|