@cdx-ui/components 0.0.1-alpha.8 → 0.0.1-beta.1
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/Switch/BaseSwitch.js +46 -0
- package/lib/commonjs/components/Switch/BaseSwitch.js.map +1 -0
- package/lib/commonjs/components/Switch/BaseSwitch.web.js +56 -0
- package/lib/commonjs/components/Switch/BaseSwitch.web.js.map +1 -0
- package/lib/commonjs/components/Switch/index.js +13 -0
- package/lib/commonjs/components/Switch/index.js.map +1 -0
- package/lib/commonjs/components/Switch/styles.js +128 -0
- package/lib/commonjs/components/Switch/styles.js.map +1 -0
- package/lib/commonjs/components/Text/index.js +18 -9
- package/lib/commonjs/components/Text/index.js.map +1 -1
- package/lib/commonjs/components/Text/styles.js +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 +216 -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/Switch/BaseSwitch.js +42 -0
- package/lib/module/components/Switch/BaseSwitch.js.map +1 -0
- package/lib/module/components/Switch/BaseSwitch.web.js +52 -0
- package/lib/module/components/Switch/BaseSwitch.web.js.map +1 -0
- package/lib/module/components/Switch/index.js +9 -0
- package/lib/module/components/Switch/index.js.map +1 -0
- package/lib/module/components/Switch/styles.js +125 -0
- package/lib/module/components/Switch/styles.js.map +1 -0
- package/lib/module/components/Text/index.js +19 -1
- package/lib/module/components/Text/index.js.map +1 -1
- package/lib/module/components/Text/styles.js +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 +18 -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/BaseSwitch.d.ts +9 -0
- package/lib/typescript/components/Switch/BaseSwitch.d.ts.map +1 -0
- package/lib/typescript/components/Switch/BaseSwitch.web.d.ts +15 -0
- package/lib/typescript/components/Switch/BaseSwitch.web.d.ts.map +1 -0
- package/lib/typescript/components/Switch/index.d.ts +7 -0
- package/lib/typescript/components/Switch/index.d.ts.map +1 -0
- package/lib/typescript/components/Switch/styles.d.ts +26 -0
- package/lib/typescript/components/Switch/styles.d.ts.map +1 -0
- package/lib/typescript/components/Text/index.d.ts +9 -1
- package/lib/typescript/components/Text/index.d.ts.map +1 -1
- package/lib/typescript/components/Text/styles.d.ts +6 -0
- package/lib/typescript/components/Text/styles.d.ts.map +1 -0
- package/lib/typescript/components/VirtualizedList/index.d.ts +8 -0
- package/lib/typescript/components/VirtualizedList/index.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +18 -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 +13 -5
- 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/BaseSwitch.tsx +38 -0
- package/src/components/Switch/BaseSwitch.web.tsx +69 -0
- package/src/components/Switch/index.tsx +11 -0
- package/src/components/Switch/styles.ts +120 -0
- package/src/components/Text/index.tsx +16 -0
- package/src/components/Text/styles.tsx +25 -0
- package/src/components/VirtualizedList/index.tsx +19 -0
- package/src/components/index.ts +18 -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,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Stack/styles.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,QAAQ;;;;;;;;;;;CAWJ,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,QAAQ,CAAC;AAE/C,eAAO,MAAM,kBAAkB;;;8EAW7B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;8EAW7B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Switch as RNSwitch, type SwitchProps } from 'react-native';
|
|
2
|
+
export interface BaseSwitchProps extends Omit<SwitchProps, 'className'> {
|
|
3
|
+
states?: Record<string, boolean | undefined>;
|
|
4
|
+
dataSet?: Record<string, string>;
|
|
5
|
+
className?: string;
|
|
6
|
+
size?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const BaseSwitch: import("react").ForwardRefExoticComponent<BaseSwitchProps & import("react").RefAttributes<RNSwitch>>;
|
|
9
|
+
//# sourceMappingURL=BaseSwitch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseSwitch.d.ts","sourceRoot":"","sources":["../../../../src/components/Switch/BaseSwitch.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,IAAI,QAAQ,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AASpE,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC;IACrE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,UAAU,sGAkBtB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { View } from 'react-native';
|
|
2
|
+
import { type SwitchVariantProps } from './styles';
|
|
3
|
+
export interface BaseSwitchProps {
|
|
4
|
+
value?: boolean;
|
|
5
|
+
onValueChange?: (value: boolean) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
states?: Record<string, boolean | undefined>;
|
|
8
|
+
dataSet?: Record<string, string>;
|
|
9
|
+
className?: string;
|
|
10
|
+
size?: SwitchVariantProps['size'];
|
|
11
|
+
onFocus?: () => void;
|
|
12
|
+
onBlur?: () => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const BaseSwitch: import("react").ForwardRefExoticComponent<BaseSwitchProps & import("react").RefAttributes<View>>;
|
|
15
|
+
//# sourceMappingURL=BaseSwitch.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseSwitch.web.d.ts","sourceRoot":"","sources":["../../../../src/components/Switch/BaseSwitch.web.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,IAAI,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,UAAU,kGA4CtB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ISwitchProps } from '@cdx-ui/primitives';
|
|
2
|
+
import type { SwitchVariantProps } from './styles';
|
|
3
|
+
export interface SwitchProps extends ISwitchProps, SwitchVariantProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const Switch: import("@cdx-ui/primitives").ISwitchComponentType<import("./BaseSwitch").BaseSwitchProps & import("react").RefAttributes<import("react-native").Switch>, unknown>;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Switch/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAgB,MAAM,oBAAoB,CAAC;AAErE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAInD,MAAM,WAAW,WAAY,SAAQ,YAAY,EAAE,kBAAkB;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,MAAM,mKAAkB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
export declare const switchThumbColorVariants: (props?: ({
|
|
3
|
+
isDisabled?: boolean | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
export declare const switchTrackOnVariants: (props?: ({
|
|
6
|
+
isInvalid?: boolean | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
export declare const switchTrackOffVariants: (props?: ({
|
|
9
|
+
isInvalid?: boolean | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
+
export declare const switchIosBgVariants: (props?: ({
|
|
12
|
+
isInvalid?: boolean | null | undefined;
|
|
13
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
14
|
+
export declare const switchTrackVariants: (props?: ({
|
|
15
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
16
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
17
|
+
export declare const switchWebTrackColorVariants: (props?: ({
|
|
18
|
+
isChecked?: boolean | null | undefined;
|
|
19
|
+
isInvalid?: boolean | null | undefined;
|
|
20
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
21
|
+
export declare const switchThumbVariants: (props?: ({
|
|
22
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
23
|
+
isChecked?: boolean | null | undefined;
|
|
24
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
25
|
+
export type SwitchVariantProps = VariantProps<typeof switchTrackVariants>;
|
|
26
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Switch/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAMlE,eAAO,MAAM,wBAAwB;;8EAQnC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;8EAQhC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;8EAQjC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;8EAQ9B,CAAC;AAMH,eAAO,MAAM,mBAAmB;;8EAoB/B,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;8EAmBtC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;8EAwB/B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { Text as RNText } from 'react-native';
|
|
3
|
+
import { TextVariantProps } from './styles';
|
|
4
|
+
export type TextProps = TextVariantProps & ComponentPropsWithoutRef<typeof RNText> & {
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const Text: import("react").ForwardRefExoticComponent<TextVariantProps & import("react-native").TextProps & {
|
|
8
|
+
className?: string;
|
|
9
|
+
} & import("react").RefAttributes<RNText>>;
|
|
2
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Text/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Text/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,wBAAwB,EAAqB,MAAM,OAAO,CAAC;AACrF,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAa,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEvD,MAAM,MAAM,SAAS,GAAG,gBAAgB,GACtC,wBAAwB,CAAC,OAAO,MAAM,CAAC,GAAG;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnE,eAAO,MAAM,IAAI;gBAFyC,MAAM;0CAO9D,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
export declare const textStyle: (props?: ({
|
|
3
|
+
size?: "sm" | "md" | "lg" | "xl" | "xs" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
export type TextVariantProps = VariantProps<typeof textStyle>;
|
|
6
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Text/styles.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,SAAS;;8EAmBrB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ForwardedRef, ReactElement } from 'react';
|
|
2
|
+
import { type FlashListProps, type FlashListRef } from '@shopify/flash-list';
|
|
3
|
+
export type VirtualizedListRef = FlashListRef<unknown>;
|
|
4
|
+
export type VirtualizedListProps<T = unknown> = FlashListProps<T>;
|
|
5
|
+
export declare const VirtualizedList: <T>(props: VirtualizedListProps<T> & {
|
|
6
|
+
ref?: ForwardedRef<FlashListRef<T>>;
|
|
7
|
+
}) => ReactElement | null;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/VirtualizedList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAExD,OAAO,EAAa,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExF,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;AACvD,MAAM,MAAM,oBAAoB,CAAC,CAAC,GAAG,OAAO,IAAI,cAAc,CAAC,CAAC,CAAC,CAAC;AASlE,eAAO,MAAM,eAAe,EAAuC,CAAC,CAAC,EACnE,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAA;CAAE,KACrE,YAAY,GAAG,IAAI,CAAC"}
|
|
@@ -1,8 +1,26 @@
|
|
|
1
|
+
export * from './AlertDialog';
|
|
2
|
+
export * from './Avatar';
|
|
3
|
+
export * from './BottomSheet';
|
|
1
4
|
export * from './Box';
|
|
2
5
|
export * from './Button';
|
|
6
|
+
export * from './Card';
|
|
3
7
|
export * from './Checkbox';
|
|
8
|
+
export * from './Chip';
|
|
9
|
+
export * from './Dialog';
|
|
10
|
+
export * from './Field';
|
|
11
|
+
export * from './Form';
|
|
12
|
+
export * from './Image';
|
|
4
13
|
export * from './Input';
|
|
14
|
+
export * from './OtpInput';
|
|
15
|
+
export * from './Link';
|
|
16
|
+
export * from './ProgressBar';
|
|
17
|
+
export * from './ProgressSegmented';
|
|
5
18
|
export * from './Select';
|
|
19
|
+
export * from './VirtualizedList';
|
|
20
|
+
export * from './Switch';
|
|
6
21
|
export { HStack, VStack } from './Stack';
|
|
22
|
+
export * from './Heading';
|
|
7
23
|
export * from './Text';
|
|
24
|
+
export * from './Icon';
|
|
25
|
+
export * from './IconButton';
|
|
8
26
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACzC,cAAc,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACzC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC"}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
+
/// <reference types="uniwind/types" preserve="true" />
|
|
1
2
|
export * from './components';
|
|
3
|
+
export { View, ScrollView, KeyboardAvoidingView } from 'react-native';
|
|
4
|
+
export { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
2
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AACA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/styles/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
export declare const COLOR_BG_PRIMARY = "bg-white";
|
|
2
|
+
export declare const COLOR_BG_SUBTLE = "bg-slate-50";
|
|
3
|
+
export declare const COLOR_BG_MUTED = "bg-slate-100";
|
|
4
|
+
export declare const COLOR_BG_INVERSE = "bg-slate-900";
|
|
5
|
+
export declare const COLOR_BORDER_DEFAULT = "border-slate-200";
|
|
6
|
+
export declare const COLOR_BORDER_STRONG = "border-slate-300";
|
|
7
|
+
export declare const COLOR_BORDER_FOCUS = "border-slate-900";
|
|
8
|
+
export declare const COLOR_BORDER_INVALID = "border-red-500";
|
|
9
|
+
export declare const COLOR_TEXT_PRIMARY = "text-slate-900";
|
|
10
|
+
export declare const COLOR_TEXT_SECONDARY = "text-slate-500";
|
|
11
|
+
export declare const COLOR_TEXT_MUTED = "text-slate-400";
|
|
12
|
+
export declare const COLOR_TEXT_INVERSE = "text-white";
|
|
13
|
+
export declare const COLOR_TEXT_PLACEHOLDER = "text-slate-400";
|
|
14
|
+
export declare const COLOR_TEXT_INVALID = "text-red-600";
|
|
15
|
+
export declare const COLOR_BRAND_DEFAULT = "bg-slate-900";
|
|
16
|
+
export declare const COLOR_BRAND_HOVER = "bg-slate-800";
|
|
17
|
+
export declare const COLOR_BRAND_ACTIVE = "bg-slate-700";
|
|
18
|
+
export declare const COLOR_ACCENT_DEFAULT = "bg-slate-900";
|
|
19
|
+
export declare const COLOR_ACCENT_BORDER = "border-slate-900";
|
|
20
|
+
export declare const SEMANTIC_COLORS: {
|
|
21
|
+
readonly action: {
|
|
22
|
+
readonly bg: "bg-slate-900";
|
|
23
|
+
readonly bgHover: "bg-slate-800";
|
|
24
|
+
readonly bgActive: "bg-slate-700";
|
|
25
|
+
readonly border: "border-slate-900";
|
|
26
|
+
readonly text: "text-slate-900";
|
|
27
|
+
readonly ring: "ring-slate-400/50";
|
|
28
|
+
};
|
|
29
|
+
readonly danger: {
|
|
30
|
+
readonly bg: "bg-red-600";
|
|
31
|
+
readonly bgHover: "bg-red-700";
|
|
32
|
+
readonly bgActive: "bg-red-800";
|
|
33
|
+
readonly border: "border-red-600";
|
|
34
|
+
readonly text: "text-red-600";
|
|
35
|
+
readonly ring: "ring-red-400/50";
|
|
36
|
+
};
|
|
37
|
+
readonly warning: {
|
|
38
|
+
readonly bg: "bg-amber-500";
|
|
39
|
+
readonly bgHover: "bg-amber-600";
|
|
40
|
+
readonly bgActive: "bg-amber-700";
|
|
41
|
+
readonly border: "border-amber-500";
|
|
42
|
+
readonly text: "text-amber-600";
|
|
43
|
+
readonly ring: "ring-amber-400/50";
|
|
44
|
+
};
|
|
45
|
+
readonly success: {
|
|
46
|
+
readonly bg: "bg-green-600";
|
|
47
|
+
readonly bgHover: "bg-green-700";
|
|
48
|
+
readonly bgActive: "bg-green-800";
|
|
49
|
+
readonly border: "border-green-600";
|
|
50
|
+
readonly text: "text-green-600";
|
|
51
|
+
readonly ring: "ring-green-400/50";
|
|
52
|
+
};
|
|
53
|
+
readonly info: {
|
|
54
|
+
readonly bg: "bg-sky-500";
|
|
55
|
+
readonly bgHover: "bg-sky-600";
|
|
56
|
+
readonly bgActive: "bg-sky-700";
|
|
57
|
+
readonly border: "border-sky-500";
|
|
58
|
+
readonly text: "text-sky-600";
|
|
59
|
+
readonly ring: "ring-sky-400/50";
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
export declare const FOCUS_RING = "ring-2 ring-slate-400/50 ring-offset-2";
|
|
63
|
+
export declare const RADIUS_SM = "rounded-lg";
|
|
64
|
+
export declare const RADIUS_MD = "rounded-xl";
|
|
65
|
+
export declare const RADIUS_FULL = "rounded-full";
|
|
66
|
+
export declare const SHADOW_SM = "shadow-sm";
|
|
67
|
+
export declare const SHADOW_MD = "shadow-md";
|
|
68
|
+
export declare const SIZE_SCALE: {
|
|
69
|
+
readonly default: {
|
|
70
|
+
readonly height: "h-10";
|
|
71
|
+
readonly px: "px-4";
|
|
72
|
+
readonly gap: "gap-2";
|
|
73
|
+
readonly text: "text-base";
|
|
74
|
+
};
|
|
75
|
+
readonly small: {
|
|
76
|
+
readonly height: "h-8";
|
|
77
|
+
readonly px: "px-3";
|
|
78
|
+
readonly gap: "gap-1.5";
|
|
79
|
+
readonly text: "text-sm";
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
export declare const TRANSITION_COLORS = "transition-colors duration-150";
|
|
83
|
+
export declare const DISABLED_OPACITY = "data-[disabled=true]:opacity-50";
|
|
84
|
+
export declare const DISABLED_CURSOR = "data-[disabled=true]:cursor-not-allowed data-[disabled=true]:pointer-events-none";
|
|
85
|
+
//# sourceMappingURL=primitives.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../../src/styles/primitives.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB,aAAa,CAAC;AAC3C,eAAO,MAAM,eAAe,gBAAgB,CAAC;AAC7C,eAAO,MAAM,cAAc,iBAAiB,CAAC;AAC7C,eAAO,MAAM,gBAAgB,iBAAiB,CAAC;AAG/C,eAAO,MAAM,oBAAoB,qBAAqB,CAAC;AACvD,eAAO,MAAM,mBAAmB,qBAAqB,CAAC;AACtD,eAAO,MAAM,kBAAkB,qBAAqB,CAAC;AACrD,eAAO,MAAM,oBAAoB,mBAAmB,CAAC;AAGrD,eAAO,MAAM,kBAAkB,mBAAmB,CAAC;AACnD,eAAO,MAAM,oBAAoB,mBAAmB,CAAC;AACrD,eAAO,MAAM,gBAAgB,mBAAmB,CAAC;AACjD,eAAO,MAAM,kBAAkB,eAAe,CAAC;AAC/C,eAAO,MAAM,sBAAsB,mBAAmB,CAAC;AACvD,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AAGjD,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;AAClD,eAAO,MAAM,iBAAiB,iBAAiB,CAAC;AAChD,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AAGjD,eAAO,MAAM,oBAAoB,iBAAiB,CAAC;AACnD,eAAO,MAAM,mBAAmB,qBAAqB,CAAC;AAItD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyClB,CAAC;AAGX,eAAO,MAAM,UAAU,2CAA2C,CAAC;AAGnE,eAAO,MAAM,SAAS,eAAe,CAAC;AACtC,eAAO,MAAM,SAAS,eAAe,CAAC;AACtC,eAAO,MAAM,WAAW,iBAAiB,CAAC;AAG1C,eAAO,MAAM,SAAS,cAAc,CAAC;AACrC,eAAO,MAAM,SAAS,cAAc,CAAC;AAMrC,eAAO,MAAM,UAAU;;;;;;;;;;;;;CAGb,CAAC;AAGX,eAAO,MAAM,iBAAiB,mCAAmC,CAAC;AAGlE,eAAO,MAAM,gBAAgB,oCAAoC,CAAC;AAClE,eAAO,MAAM,eAAe,qFACwD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdx-ui/components",
|
|
3
|
-
"version": "0.0.1-
|
|
3
|
+
"version": "0.0.1-beta.1",
|
|
4
4
|
"main": "lib/commonjs/index.js",
|
|
5
5
|
"module": "lib/module/index.js",
|
|
6
6
|
"react-native": "src/index.ts",
|
|
@@ -41,12 +41,17 @@
|
|
|
41
41
|
]
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
+
"@shopify/flash-list": ">=2.0.0",
|
|
44
45
|
"react": "^18.2.0 || ^19.0.0",
|
|
45
46
|
"react-native": ">=0.76.0",
|
|
46
47
|
"react-native-reanimated": ">=3.0.0",
|
|
48
|
+
"react-native-safe-area-context": ">=4.0.0",
|
|
47
49
|
"react-native-web": ">=0.19.0"
|
|
48
50
|
},
|
|
49
51
|
"peerDependenciesMeta": {
|
|
52
|
+
"@shopify/flash-list": {
|
|
53
|
+
"optional": true
|
|
54
|
+
},
|
|
50
55
|
"react-native": {
|
|
51
56
|
"optional": true
|
|
52
57
|
},
|
|
@@ -58,10 +63,12 @@
|
|
|
58
63
|
}
|
|
59
64
|
},
|
|
60
65
|
"dependencies": {
|
|
66
|
+
"@gorhom/bottom-sheet": "^5.2.6",
|
|
61
67
|
"class-variance-authority": "^0.7.1",
|
|
62
|
-
"uniwind": "1.
|
|
63
|
-
"@cdx-ui/primitives": "0.0.1-
|
|
64
|
-
"@cdx-ui/
|
|
68
|
+
"uniwind": "1.6.1",
|
|
69
|
+
"@cdx-ui/primitives": "0.0.1-beta.1",
|
|
70
|
+
"@cdx-ui/icons": "0.0.1-beta.1",
|
|
71
|
+
"@cdx-ui/utils": "0.0.1-beta.1"
|
|
65
72
|
},
|
|
66
73
|
"devDependencies": {
|
|
67
74
|
"@types/react": "*",
|
|
@@ -87,6 +94,7 @@
|
|
|
87
94
|
},
|
|
88
95
|
"scripts": {
|
|
89
96
|
"build": "bob build",
|
|
90
|
-
"lint": "eslint src/"
|
|
97
|
+
"lint": "eslint src/",
|
|
98
|
+
"test": "jest --config ../../jest.config.js"
|
|
91
99
|
}
|
|
92
100
|
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { useDialog } from '@cdx-ui/primitives';
|
|
4
|
+
import { composeEventHandlers } from '@cdx-ui/utils';
|
|
5
|
+
import { Button, type ButtonProps } from '../Button';
|
|
6
|
+
import { Dialog, type DialogRootProps } from '../Dialog';
|
|
7
|
+
|
|
8
|
+
// =============================================================================
|
|
9
|
+
// ALERT DIALOG ROOT (Dialog with non-dismissible defaults + alertdialog role)
|
|
10
|
+
// =============================================================================
|
|
11
|
+
|
|
12
|
+
export interface AlertDialogRootProps extends DialogRootProps {}
|
|
13
|
+
|
|
14
|
+
const AlertDialogRoot = forwardRef<View, AlertDialogRootProps>(
|
|
15
|
+
(
|
|
16
|
+
{
|
|
17
|
+
closeOnBackdropPress = false,
|
|
18
|
+
closeOnEscKey = false,
|
|
19
|
+
role = 'alertdialog',
|
|
20
|
+
children,
|
|
21
|
+
...props
|
|
22
|
+
},
|
|
23
|
+
ref,
|
|
24
|
+
) => (
|
|
25
|
+
<Dialog
|
|
26
|
+
ref={ref}
|
|
27
|
+
closeOnBackdropPress={closeOnBackdropPress}
|
|
28
|
+
closeOnEscKey={closeOnEscKey}
|
|
29
|
+
role={role}
|
|
30
|
+
{...props}
|
|
31
|
+
>
|
|
32
|
+
{children}
|
|
33
|
+
</Dialog>
|
|
34
|
+
),
|
|
35
|
+
);
|
|
36
|
+
AlertDialogRoot.displayName = 'AlertDialog';
|
|
37
|
+
|
|
38
|
+
// =============================================================================
|
|
39
|
+
// ALERT DIALOG ACTION
|
|
40
|
+
// =============================================================================
|
|
41
|
+
|
|
42
|
+
export interface AlertDialogActionProps extends Omit<ButtonProps, 'variant'> {
|
|
43
|
+
readonly asChild?: boolean;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const AlertDialogAction = forwardRef<View, AlertDialogActionProps>(
|
|
47
|
+
({ asChild = false, children, color = 'action', className, ...props }, ref) => {
|
|
48
|
+
if (asChild && React.isValidElement(children)) {
|
|
49
|
+
return React.cloneElement(children as React.ReactElement<any>, {
|
|
50
|
+
ref,
|
|
51
|
+
className,
|
|
52
|
+
...props,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<Button ref={ref} variant="strong" color={color} className={className} {...props}>
|
|
58
|
+
<Button.Label>{children}</Button.Label>
|
|
59
|
+
</Button>
|
|
60
|
+
);
|
|
61
|
+
},
|
|
62
|
+
);
|
|
63
|
+
AlertDialogAction.displayName = 'AlertDialog.Action';
|
|
64
|
+
|
|
65
|
+
// =============================================================================
|
|
66
|
+
// ALERT DIALOG CANCEL
|
|
67
|
+
// =============================================================================
|
|
68
|
+
|
|
69
|
+
export interface AlertDialogCancelProps extends Omit<ButtonProps, 'variant'> {
|
|
70
|
+
readonly asChild?: boolean;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const AlertDialogCancel = forwardRef<View, AlertDialogCancelProps>(
|
|
74
|
+
({ asChild = false, children, onPress, className, ...props }, ref) => {
|
|
75
|
+
const { onOpenChange } = useDialog();
|
|
76
|
+
const handlePress = composeEventHandlers(onPress, () => onOpenChange(false));
|
|
77
|
+
|
|
78
|
+
if (asChild && React.isValidElement(children)) {
|
|
79
|
+
return React.cloneElement(children as React.ReactElement<any>, {
|
|
80
|
+
ref,
|
|
81
|
+
onPress: handlePress,
|
|
82
|
+
className,
|
|
83
|
+
...props,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return (
|
|
88
|
+
<Button ref={ref} variant="outline" onPress={handlePress} className={className} {...props}>
|
|
89
|
+
<Button.Label>{children}</Button.Label>
|
|
90
|
+
</Button>
|
|
91
|
+
);
|
|
92
|
+
},
|
|
93
|
+
);
|
|
94
|
+
AlertDialogCancel.displayName = 'AlertDialog.Cancel';
|
|
95
|
+
|
|
96
|
+
// =============================================================================
|
|
97
|
+
// COMPOUND EXPORT
|
|
98
|
+
// =============================================================================
|
|
99
|
+
|
|
100
|
+
type AlertDialogCompoundComponent = typeof AlertDialogRoot & {
|
|
101
|
+
Trigger: typeof Dialog.Trigger;
|
|
102
|
+
Content: typeof Dialog.Content;
|
|
103
|
+
Header: typeof Dialog.Header;
|
|
104
|
+
Title: typeof Dialog.Title;
|
|
105
|
+
Description: typeof Dialog.Description;
|
|
106
|
+
Body: typeof Dialog.Body;
|
|
107
|
+
Footer: typeof Dialog.Footer;
|
|
108
|
+
Close: typeof Dialog.Close;
|
|
109
|
+
Action: typeof AlertDialogAction;
|
|
110
|
+
Cancel: typeof AlertDialogCancel;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
export const AlertDialog = Object.assign(AlertDialogRoot, {
|
|
114
|
+
Trigger: Dialog.Trigger,
|
|
115
|
+
Content: Dialog.Content,
|
|
116
|
+
Header: Dialog.Header,
|
|
117
|
+
Title: Dialog.Title,
|
|
118
|
+
Description: Dialog.Description,
|
|
119
|
+
Body: Dialog.Body,
|
|
120
|
+
Footer: Dialog.Footer,
|
|
121
|
+
Close: Dialog.Close,
|
|
122
|
+
Action: AlertDialogAction,
|
|
123
|
+
Cancel: AlertDialogCancel,
|
|
124
|
+
}) as AlertDialogCompoundComponent;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { forwardRef, type ReactNode } from 'react';
|
|
2
|
+
import { Image, Text, View, type ImageProps, type TextProps, type ViewProps } from 'react-native';
|
|
3
|
+
import { createAvatar, type IAvatarImageProps, type IAvatarProps } from '@cdx-ui/primitives';
|
|
4
|
+
import { cn, useStyleContext, withStyleContext } from '@cdx-ui/utils';
|
|
5
|
+
import { Icon as IconComponent, type IconProps } from '../Icon';
|
|
6
|
+
import {
|
|
7
|
+
type AvatarVariantProps,
|
|
8
|
+
avatarBadgeVariants,
|
|
9
|
+
avatarIconVariants,
|
|
10
|
+
avatarTextVariants,
|
|
11
|
+
avatarImageVariants,
|
|
12
|
+
avatarRootVariants,
|
|
13
|
+
} from './styles';
|
|
14
|
+
|
|
15
|
+
const SCOPE = 'AVATAR';
|
|
16
|
+
|
|
17
|
+
const Root = withStyleContext(View, SCOPE);
|
|
18
|
+
|
|
19
|
+
const useAvatarStyleContext = () => useStyleContext(SCOPE) as AvatarVariantProps;
|
|
20
|
+
|
|
21
|
+
const AvatarPrimitive = createAvatar({
|
|
22
|
+
Root,
|
|
23
|
+
Image,
|
|
24
|
+
Text,
|
|
25
|
+
Icon: IconComponent,
|
|
26
|
+
Badge: View,
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
// =============================================================================
|
|
30
|
+
// AVATAR ROOT
|
|
31
|
+
// =============================================================================
|
|
32
|
+
|
|
33
|
+
export interface AvatarProps extends ViewProps, IAvatarProps, AvatarVariantProps {
|
|
34
|
+
className?: string;
|
|
35
|
+
children?: ReactNode;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const AvatarRoot = forwardRef<View, AvatarProps>(
|
|
39
|
+
({ size = 'lg', className, children, style, ...props }, ref) => {
|
|
40
|
+
const computedClassName = cn(avatarRootVariants({ size }), className);
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<AvatarPrimitive
|
|
44
|
+
ref={ref as never}
|
|
45
|
+
className={computedClassName}
|
|
46
|
+
style={style}
|
|
47
|
+
context={{ size }}
|
|
48
|
+
{...props}
|
|
49
|
+
>
|
|
50
|
+
{children}
|
|
51
|
+
</AvatarPrimitive>
|
|
52
|
+
);
|
|
53
|
+
},
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
AvatarRoot.displayName = 'Avatar';
|
|
57
|
+
|
|
58
|
+
// =============================================================================
|
|
59
|
+
// AVATAR IMAGE
|
|
60
|
+
// =============================================================================
|
|
61
|
+
|
|
62
|
+
export interface AvatarImageProps extends Omit<ImageProps, 'source'>, IAvatarImageProps {
|
|
63
|
+
className?: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const AvatarImage = forwardRef<Image, AvatarImageProps>(({ className, style, ...props }, ref) => {
|
|
67
|
+
const computedClassName = cn(avatarImageVariants(), className);
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<AvatarPrimitive.Image
|
|
71
|
+
ref={ref as never}
|
|
72
|
+
className={computedClassName}
|
|
73
|
+
style={style}
|
|
74
|
+
{...props}
|
|
75
|
+
/>
|
|
76
|
+
);
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
AvatarImage.displayName = 'Avatar.Image';
|
|
80
|
+
|
|
81
|
+
// =============================================================================
|
|
82
|
+
// AVATAR TEXT
|
|
83
|
+
// =============================================================================
|
|
84
|
+
|
|
85
|
+
export interface AvatarTextProps extends TextProps {
|
|
86
|
+
className?: string;
|
|
87
|
+
children?: ReactNode;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const AvatarText = forwardRef<Text, AvatarTextProps>(
|
|
91
|
+
({ className, children, style, ...props }, ref) => {
|
|
92
|
+
const { size } = useAvatarStyleContext();
|
|
93
|
+
const computedClassName = cn(avatarTextVariants({ size }), className);
|
|
94
|
+
|
|
95
|
+
return (
|
|
96
|
+
<AvatarPrimitive.Text
|
|
97
|
+
ref={ref as never}
|
|
98
|
+
className={computedClassName}
|
|
99
|
+
style={style}
|
|
100
|
+
{...props}
|
|
101
|
+
>
|
|
102
|
+
{children}
|
|
103
|
+
</AvatarPrimitive.Text>
|
|
104
|
+
);
|
|
105
|
+
},
|
|
106
|
+
);
|
|
107
|
+
|
|
108
|
+
AvatarText.displayName = 'Avatar.Text';
|
|
109
|
+
|
|
110
|
+
// =============================================================================
|
|
111
|
+
// AVATAR ICON
|
|
112
|
+
// =============================================================================
|
|
113
|
+
|
|
114
|
+
export interface AvatarIconProps extends Omit<IconProps, 'children'> {
|
|
115
|
+
className?: string;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const AvatarIcon = ({ className, style, ...props }: AvatarIconProps) => {
|
|
119
|
+
const { size } = useAvatarStyleContext();
|
|
120
|
+
const computedClassName = cn(avatarIconVariants({ size }), className);
|
|
121
|
+
|
|
122
|
+
return <AvatarPrimitive.Icon className={computedClassName} style={style} {...props} />;
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
AvatarIcon.displayName = 'Avatar.Icon';
|
|
126
|
+
|
|
127
|
+
// =============================================================================
|
|
128
|
+
// AVATAR BADGE
|
|
129
|
+
// =============================================================================
|
|
130
|
+
|
|
131
|
+
export interface AvatarBadgeProps extends ViewProps {
|
|
132
|
+
className?: string;
|
|
133
|
+
children?: ReactNode;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
const AvatarBadge = forwardRef<View, AvatarBadgeProps>(
|
|
137
|
+
({ className, children, style, ...props }, ref) => {
|
|
138
|
+
const { size } = useAvatarStyleContext();
|
|
139
|
+
const computedClassName = cn(avatarBadgeVariants({ size }), className);
|
|
140
|
+
|
|
141
|
+
return (
|
|
142
|
+
<AvatarPrimitive.Badge
|
|
143
|
+
ref={ref as never}
|
|
144
|
+
className={computedClassName}
|
|
145
|
+
style={style}
|
|
146
|
+
{...props}
|
|
147
|
+
>
|
|
148
|
+
{children}
|
|
149
|
+
</AvatarPrimitive.Badge>
|
|
150
|
+
);
|
|
151
|
+
},
|
|
152
|
+
);
|
|
153
|
+
|
|
154
|
+
AvatarBadge.displayName = 'Avatar.Badge';
|
|
155
|
+
|
|
156
|
+
// =============================================================================
|
|
157
|
+
// COMPOUND COMPONENT
|
|
158
|
+
// =============================================================================
|
|
159
|
+
|
|
160
|
+
type AvatarCompoundComponent = typeof AvatarRoot & {
|
|
161
|
+
Image: typeof AvatarImage;
|
|
162
|
+
Text: typeof AvatarText;
|
|
163
|
+
Icon: typeof AvatarIcon;
|
|
164
|
+
Badge: typeof AvatarBadge;
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
export const Avatar = Object.assign(AvatarRoot, {
|
|
168
|
+
Image: AvatarImage,
|
|
169
|
+
Text: AvatarText,
|
|
170
|
+
Icon: AvatarIcon,
|
|
171
|
+
Badge: AvatarBadge,
|
|
172
|
+
}) as AvatarCompoundComponent;
|