@cdx-ui/components 0.0.1-alpha.9 → 0.0.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -2
- package/lib/commonjs/components/AlertDialog/index.js +117 -0
- package/lib/commonjs/components/AlertDialog/index.js.map +1 -0
- package/lib/commonjs/components/Avatar/index.js +156 -0
- package/lib/commonjs/components/Avatar/index.js.map +1 -0
- package/lib/commonjs/components/Avatar/styles.js +80 -0
- package/lib/commonjs/components/Avatar/styles.js.map +1 -0
- package/lib/commonjs/components/BottomSheet/index.js +248 -0
- package/lib/commonjs/components/BottomSheet/index.js.map +1 -0
- package/lib/commonjs/components/BottomSheet/styles.js +61 -0
- package/lib/commonjs/components/BottomSheet/styles.js.map +1 -0
- package/lib/commonjs/components/Box/Box.js +1 -0
- package/lib/commonjs/components/Box/Box.js.map +1 -1
- package/lib/commonjs/components/Button/index.js +20 -9
- package/lib/commonjs/components/Button/index.js.map +1 -1
- package/lib/commonjs/components/Button/styles.js +182 -163
- package/lib/commonjs/components/Button/styles.js.map +1 -1
- package/lib/commonjs/components/Card/index.js +104 -0
- package/lib/commonjs/components/Card/index.js.map +1 -0
- package/lib/commonjs/components/Card/styles.js +28 -0
- package/lib/commonjs/components/Card/styles.js.map +1 -0
- package/lib/commonjs/components/Checkbox/index.js +18 -11
- package/lib/commonjs/components/Checkbox/index.js.map +1 -1
- package/lib/commonjs/components/Checkbox/styles.js +17 -16
- package/lib/commonjs/components/Checkbox/styles.js.map +1 -1
- package/lib/commonjs/components/Chip/index.js +103 -0
- package/lib/commonjs/components/Chip/index.js.map +1 -0
- package/lib/commonjs/components/Chip/styles.js +52 -0
- package/lib/commonjs/components/Chip/styles.js.map +1 -0
- package/lib/commonjs/components/Dialog/index.js +275 -0
- package/lib/commonjs/components/Dialog/index.js.map +1 -0
- package/lib/commonjs/components/Dialog/styles.js +63 -0
- package/lib/commonjs/components/Dialog/styles.js.map +1 -0
- package/lib/commonjs/components/Field/FieldLabel.js +33 -0
- package/lib/commonjs/components/Field/FieldLabel.js.map +1 -0
- package/lib/commonjs/components/Field/FieldLabel.web.js +22 -0
- package/lib/commonjs/components/Field/FieldLabel.web.js.map +1 -0
- package/lib/commonjs/components/Field/index.js +158 -0
- package/lib/commonjs/components/Field/index.js.map +1 -0
- package/lib/commonjs/components/Field/styles.js +16 -0
- package/lib/commonjs/components/Field/styles.js.map +1 -0
- package/lib/commonjs/components/Form/FormRoot.js +25 -0
- package/lib/commonjs/components/Form/FormRoot.js.map +1 -0
- package/lib/commonjs/components/Form/FormRoot.web.js +17 -0
- package/lib/commonjs/components/Form/FormRoot.web.js.map +1 -0
- package/lib/commonjs/components/Form/index.js +48 -0
- package/lib/commonjs/components/Form/index.js.map +1 -0
- package/lib/commonjs/components/Form/styles.js +9 -0
- package/lib/commonjs/components/Form/styles.js.map +1 -0
- package/lib/commonjs/components/Heading/index.js +35 -0
- package/lib/commonjs/components/Heading/index.js.map +1 -0
- package/lib/commonjs/components/Heading/styles.js +23 -0
- package/lib/commonjs/components/Heading/styles.js.map +1 -0
- package/lib/commonjs/components/Icon/index.js +61 -0
- package/lib/commonjs/components/Icon/index.js.map +1 -0
- package/lib/commonjs/components/IconButton/index.js +75 -0
- package/lib/commonjs/components/IconButton/index.js.map +1 -0
- package/lib/commonjs/components/IconButton/styles.js +44 -0
- package/lib/commonjs/components/IconButton/styles.js.map +1 -0
- package/lib/commonjs/components/Image/Image.js +69 -0
- package/lib/commonjs/components/Image/Image.js.map +1 -0
- package/lib/commonjs/components/Image/index.js +13 -0
- package/lib/commonjs/components/Image/index.js.map +1 -0
- package/lib/commonjs/components/Input/BaseInput.android.js +20 -0
- package/lib/commonjs/components/Input/BaseInput.android.js.map +1 -0
- package/lib/commonjs/components/Input/index.js +10 -16
- package/lib/commonjs/components/Input/index.js.map +1 -1
- package/lib/commonjs/components/Input/styles.js +17 -30
- package/lib/commonjs/components/Input/styles.js.map +1 -1
- package/lib/commonjs/components/Link/index.js +94 -0
- package/lib/commonjs/components/Link/index.js.map +1 -0
- package/lib/commonjs/components/Link/styles.js +14 -0
- package/lib/commonjs/components/Link/styles.js.map +1 -0
- package/lib/commonjs/components/OtpInput/index.js +83 -0
- package/lib/commonjs/components/OtpInput/index.js.map +1 -0
- package/lib/commonjs/components/OtpInput/styles.js +48 -0
- package/lib/commonjs/components/OtpInput/styles.js.map +1 -0
- package/lib/commonjs/components/ProgressBar/index.js +45 -0
- package/lib/commonjs/components/ProgressBar/index.js.map +1 -0
- package/lib/commonjs/components/ProgressBar/styles.js +10 -0
- package/lib/commonjs/components/ProgressBar/styles.js.map +1 -0
- package/lib/commonjs/components/ProgressSegmented/index.js +62 -0
- package/lib/commonjs/components/ProgressSegmented/index.js.map +1 -0
- package/lib/commonjs/components/ProgressSegmented/styles.js +21 -0
- package/lib/commonjs/components/ProgressSegmented/styles.js.map +1 -0
- package/lib/commonjs/components/Select/SelectTriggerHost.js +10 -0
- package/lib/commonjs/components/Select/SelectTriggerHost.js.map +1 -0
- package/lib/commonjs/components/Select/SelectTriggerHost.web.js +98 -0
- package/lib/commonjs/components/Select/SelectTriggerHost.web.js.map +1 -0
- package/lib/commonjs/components/Select/index.js +13 -13
- package/lib/commonjs/components/Select/index.js.map +1 -1
- package/lib/commonjs/components/Select/styles.js +29 -53
- package/lib/commonjs/components/Select/styles.js.map +1 -1
- package/lib/commonjs/components/Stack/HStack.js +8 -21
- package/lib/commonjs/components/Stack/HStack.js.map +1 -1
- package/lib/commonjs/components/Stack/VStack.js +8 -21
- package/lib/commonjs/components/Stack/VStack.js.map +1 -1
- package/lib/commonjs/components/Stack/styles.js +44 -0
- package/lib/commonjs/components/Stack/styles.js.map +1 -0
- package/lib/commonjs/components/Text/index.js +18 -9
- package/lib/commonjs/components/Text/index.js.map +1 -1
- package/lib/commonjs/components/Text/styles.js +23 -0
- package/lib/commonjs/components/Text/styles.js.map +1 -0
- package/lib/commonjs/components/VirtualizedList/index.js +19 -0
- package/lib/commonjs/components/VirtualizedList/index.js.map +1 -0
- package/lib/commonjs/components/index.js +204 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/index.js +40 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/styles/index.js +17 -0
- package/lib/commonjs/styles/index.js.map +1 -0
- package/lib/commonjs/styles/primitives.js +123 -0
- package/lib/commonjs/styles/primitives.js.map +1 -0
- package/lib/module/components/AlertDialog/index.js +112 -0
- package/lib/module/components/AlertDialog/index.js.map +1 -0
- package/lib/module/components/Avatar/index.js +152 -0
- package/lib/module/components/Avatar/index.js.map +1 -0
- package/lib/module/components/Avatar/styles.js +77 -0
- package/lib/module/components/Avatar/styles.js.map +1 -0
- package/lib/module/components/BottomSheet/index.js +242 -0
- package/lib/module/components/BottomSheet/index.js.map +1 -0
- package/lib/module/components/BottomSheet/styles.js +58 -0
- package/lib/module/components/BottomSheet/styles.js.map +1 -0
- package/lib/module/components/Box/Box.js +1 -0
- package/lib/module/components/Box/Box.js.map +1 -1
- package/lib/module/components/Button/index.js +21 -10
- package/lib/module/components/Button/index.js.map +1 -1
- package/lib/module/components/Button/styles.js +181 -162
- package/lib/module/components/Button/styles.js.map +1 -1
- package/lib/module/components/Card/index.js +100 -0
- package/lib/module/components/Card/index.js.map +1 -0
- package/lib/module/components/Card/styles.js +25 -0
- package/lib/module/components/Card/styles.js.map +1 -0
- package/lib/module/components/Checkbox/index.js +19 -12
- package/lib/module/components/Checkbox/index.js.map +1 -1
- package/lib/module/components/Checkbox/styles.js +17 -16
- package/lib/module/components/Checkbox/styles.js.map +1 -1
- package/lib/module/components/Chip/index.js +99 -0
- package/lib/module/components/Chip/index.js.map +1 -0
- package/lib/module/components/Chip/styles.js +48 -0
- package/lib/module/components/Chip/styles.js.map +1 -0
- package/lib/module/components/Dialog/index.js +267 -0
- package/lib/module/components/Dialog/index.js.map +1 -0
- package/lib/module/components/Dialog/styles.js +60 -0
- package/lib/module/components/Dialog/styles.js.map +1 -0
- package/lib/module/components/Field/FieldLabel.js +29 -0
- package/lib/module/components/Field/FieldLabel.js.map +1 -0
- package/lib/module/components/Field/FieldLabel.web.js +17 -0
- package/lib/module/components/Field/FieldLabel.web.js.map +1 -0
- package/lib/module/components/Field/index.js +155 -0
- package/lib/module/components/Field/index.js.map +1 -0
- package/lib/module/components/Field/styles.js +12 -0
- package/lib/module/components/Field/styles.js.map +1 -0
- package/lib/module/components/Form/FormRoot.js +21 -0
- package/lib/module/components/Form/FormRoot.js.map +1 -0
- package/lib/module/components/Form/FormRoot.web.js +12 -0
- package/lib/module/components/Form/FormRoot.web.js.map +1 -0
- package/lib/module/components/Form/index.js +44 -0
- package/lib/module/components/Form/index.js.map +1 -0
- package/lib/module/components/Form/styles.js +5 -0
- package/lib/module/components/Form/styles.js.map +1 -0
- package/lib/module/components/Heading/index.js +31 -0
- package/lib/module/components/Heading/index.js.map +1 -0
- package/lib/module/components/Heading/styles.js +19 -0
- package/lib/module/components/Heading/styles.js.map +1 -0
- package/lib/module/components/Icon/index.js +57 -0
- package/lib/module/components/Icon/index.js.map +1 -0
- package/lib/module/components/IconButton/index.js +71 -0
- package/lib/module/components/IconButton/index.js.map +1 -0
- package/lib/module/components/IconButton/styles.js +40 -0
- package/lib/module/components/IconButton/styles.js.map +1 -0
- package/lib/module/components/Image/Image.js +67 -0
- package/lib/module/components/Image/Image.js.map +1 -0
- package/lib/module/components/Image/index.js +4 -0
- package/lib/module/components/Image/index.js.map +1 -0
- package/lib/module/components/Input/BaseInput.android.js +16 -0
- package/lib/module/components/Input/BaseInput.android.js.map +1 -0
- package/lib/module/components/Input/index.js +10 -16
- package/lib/module/components/Input/index.js.map +1 -1
- package/lib/module/components/Input/styles.js +17 -30
- package/lib/module/components/Input/styles.js.map +1 -1
- package/lib/module/components/Link/index.js +85 -0
- package/lib/module/components/Link/index.js.map +1 -0
- package/lib/module/components/Link/styles.js +11 -0
- package/lib/module/components/Link/styles.js.map +1 -0
- package/lib/module/components/OtpInput/index.js +79 -0
- package/lib/module/components/OtpInput/index.js.map +1 -0
- package/lib/module/components/OtpInput/styles.js +44 -0
- package/lib/module/components/OtpInput/styles.js.map +1 -0
- package/lib/module/components/ProgressBar/index.js +41 -0
- package/lib/module/components/ProgressBar/index.js.map +1 -0
- package/lib/module/components/ProgressBar/styles.js +6 -0
- package/lib/module/components/ProgressBar/styles.js.map +1 -0
- package/lib/module/components/ProgressSegmented/index.js +58 -0
- package/lib/module/components/ProgressSegmented/index.js.map +1 -0
- package/lib/module/components/ProgressSegmented/styles.js +17 -0
- package/lib/module/components/ProgressSegmented/styles.js.map +1 -0
- package/lib/module/components/Select/SelectTriggerHost.js +7 -0
- package/lib/module/components/Select/SelectTriggerHost.js.map +1 -0
- package/lib/module/components/Select/SelectTriggerHost.web.js +93 -0
- package/lib/module/components/Select/SelectTriggerHost.web.js.map +1 -0
- package/lib/module/components/Select/index.js +14 -14
- package/lib/module/components/Select/index.js.map +1 -1
- package/lib/module/components/Select/styles.js +29 -53
- package/lib/module/components/Select/styles.js.map +1 -1
- package/lib/module/components/Stack/HStack.js +8 -21
- package/lib/module/components/Stack/HStack.js.map +1 -1
- package/lib/module/components/Stack/VStack.js +8 -21
- package/lib/module/components/Stack/VStack.js.map +1 -1
- package/lib/module/components/Stack/styles.js +40 -0
- package/lib/module/components/Stack/styles.js.map +1 -0
- package/lib/module/components/Text/index.js +19 -1
- package/lib/module/components/Text/index.js.map +1 -1
- package/lib/module/components/Text/styles.js +19 -0
- package/lib/module/components/Text/styles.js.map +1 -0
- package/lib/module/components/VirtualizedList/index.js +15 -0
- package/lib/module/components/VirtualizedList/index.js.map +1 -0
- package/lib/module/components/index.js +17 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/styles/index.js +4 -0
- package/lib/module/styles/index.js.map +1 -0
- package/lib/module/styles/primitives.js +119 -0
- package/lib/module/styles/primitives.js.map +1 -0
- package/lib/typescript/components/AlertDialog/index.d.ts +30 -0
- package/lib/typescript/components/AlertDialog/index.d.ts.map +1 -0
- package/lib/typescript/components/Avatar/index.d.ts +40 -0
- package/lib/typescript/components/Avatar/index.d.ts.map +1 -0
- package/lib/typescript/components/Avatar/styles.d.ts +16 -0
- package/lib/typescript/components/Avatar/styles.d.ts.map +1 -0
- package/lib/typescript/components/BottomSheet/index.d.ts +61 -0
- package/lib/typescript/components/BottomSheet/index.d.ts.map +1 -0
- package/lib/typescript/components/BottomSheet/styles.d.ts +16 -0
- package/lib/typescript/components/BottomSheet/styles.d.ts.map +1 -0
- package/lib/typescript/components/Box/Box.d.ts +1 -0
- package/lib/typescript/components/Box/Box.d.ts.map +1 -1
- package/lib/typescript/components/Button/index.d.ts +6 -3
- package/lib/typescript/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/components/Button/styles.d.ts +11 -8
- package/lib/typescript/components/Button/styles.d.ts.map +1 -1
- package/lib/typescript/components/Card/index.d.ts +30 -0
- package/lib/typescript/components/Card/index.d.ts.map +1 -0
- package/lib/typescript/components/Card/styles.d.ts +6 -0
- package/lib/typescript/components/Card/styles.d.ts.map +1 -0
- package/lib/typescript/components/Checkbox/index.d.ts +7 -5
- package/lib/typescript/components/Checkbox/index.d.ts.map +1 -1
- package/lib/typescript/components/Checkbox/styles.d.ts +4 -4
- package/lib/typescript/components/Checkbox/styles.d.ts.map +1 -1
- package/lib/typescript/components/Chip/index.d.ts +27 -0
- package/lib/typescript/components/Chip/index.d.ts.map +1 -0
- package/lib/typescript/components/Chip/styles.d.ts +12 -0
- package/lib/typescript/components/Chip/styles.d.ts.map +1 -0
- package/lib/typescript/components/Dialog/index.d.ts +61 -0
- package/lib/typescript/components/Dialog/index.d.ts.map +1 -0
- package/lib/typescript/components/Dialog/styles.d.ts +14 -0
- package/lib/typescript/components/Dialog/styles.d.ts.map +1 -0
- package/lib/typescript/components/Field/FieldLabel.d.ts +18 -0
- package/lib/typescript/components/Field/FieldLabel.d.ts.map +1 -0
- package/lib/typescript/components/Field/FieldLabel.web.d.ts +16 -0
- package/lib/typescript/components/Field/FieldLabel.web.d.ts.map +1 -0
- package/lib/typescript/components/Field/index.d.ts +26 -0
- package/lib/typescript/components/Field/index.d.ts.map +1 -0
- package/lib/typescript/components/Field/styles.d.ts +16 -0
- package/lib/typescript/components/Field/styles.d.ts.map +1 -0
- package/lib/typescript/components/Form/FormRoot.d.ts +14 -0
- package/lib/typescript/components/Form/FormRoot.d.ts.map +1 -0
- package/lib/typescript/components/Form/FormRoot.web.d.ts +10 -0
- package/lib/typescript/components/Form/FormRoot.web.d.ts.map +1 -0
- package/lib/typescript/components/Form/index.d.ts +7 -0
- package/lib/typescript/components/Form/index.d.ts.map +1 -0
- package/lib/typescript/components/Form/styles.d.ts +2 -0
- package/lib/typescript/components/Form/styles.d.ts.map +1 -0
- package/lib/typescript/components/Heading/index.d.ts +10 -0
- package/lib/typescript/components/Heading/index.d.ts.map +1 -0
- package/lib/typescript/components/Heading/styles.d.ts +6 -0
- package/lib/typescript/components/Heading/styles.d.ts.map +1 -0
- package/lib/typescript/components/Icon/index.d.ts +27 -0
- package/lib/typescript/components/Icon/index.d.ts.map +1 -0
- package/lib/typescript/components/IconButton/index.d.ts +15 -0
- package/lib/typescript/components/IconButton/index.d.ts.map +1 -0
- package/lib/typescript/components/IconButton/styles.d.ts +11 -0
- package/lib/typescript/components/IconButton/styles.d.ts.map +1 -0
- package/lib/typescript/components/Image/Image.d.ts +47 -0
- package/lib/typescript/components/Image/Image.d.ts.map +1 -0
- package/lib/typescript/components/Image/index.d.ts +2 -0
- package/lib/typescript/components/Image/index.d.ts.map +1 -0
- package/lib/typescript/components/Input/BaseInput.android.d.ts +3 -0
- package/lib/typescript/components/Input/BaseInput.android.d.ts.map +1 -0
- package/lib/typescript/components/Input/index.d.ts +7 -5
- package/lib/typescript/components/Input/index.d.ts.map +1 -1
- package/lib/typescript/components/Input/styles.d.ts +5 -7
- package/lib/typescript/components/Input/styles.d.ts.map +1 -1
- package/lib/typescript/components/Link/index.d.ts +26 -0
- package/lib/typescript/components/Link/index.d.ts.map +1 -0
- package/lib/typescript/components/Link/styles.d.ts +6 -0
- package/lib/typescript/components/Link/styles.d.ts.map +1 -0
- package/lib/typescript/components/OtpInput/index.d.ts +11 -0
- package/lib/typescript/components/OtpInput/index.d.ts.map +1 -0
- package/lib/typescript/components/OtpInput/styles.d.ts +14 -0
- package/lib/typescript/components/OtpInput/styles.d.ts.map +1 -0
- package/lib/typescript/components/ProgressBar/index.d.ts +17 -0
- package/lib/typescript/components/ProgressBar/index.d.ts.map +1 -0
- package/lib/typescript/components/ProgressBar/styles.d.ts +5 -0
- package/lib/typescript/components/ProgressBar/styles.d.ts.map +1 -0
- package/lib/typescript/components/ProgressSegmented/index.d.ts +15 -0
- package/lib/typescript/components/ProgressSegmented/index.d.ts.map +1 -0
- package/lib/typescript/components/ProgressSegmented/styles.d.ts +8 -0
- package/lib/typescript/components/ProgressSegmented/styles.d.ts.map +1 -0
- package/lib/typescript/components/Select/SelectTriggerHost.d.ts +3 -0
- package/lib/typescript/components/Select/SelectTriggerHost.d.ts.map +1 -0
- package/lib/typescript/components/Select/SelectTriggerHost.web.d.ts +13 -0
- package/lib/typescript/components/Select/SelectTriggerHost.web.d.ts.map +1 -0
- package/lib/typescript/components/Select/index.d.ts +7 -4
- package/lib/typescript/components/Select/index.d.ts.map +1 -1
- package/lib/typescript/components/Select/styles.d.ts +6 -8
- package/lib/typescript/components/Select/styles.d.ts.map +1 -1
- package/lib/typescript/components/Stack/HStack.d.ts +1 -12
- package/lib/typescript/components/Stack/HStack.d.ts.map +1 -1
- package/lib/typescript/components/Stack/VStack.d.ts +1 -12
- package/lib/typescript/components/Stack/VStack.d.ts.map +1 -1
- package/lib/typescript/components/Stack/styles.d.ts +23 -0
- package/lib/typescript/components/Stack/styles.d.ts.map +1 -0
- package/lib/typescript/components/Switch/index.d.ts +0 -1
- package/lib/typescript/components/Switch/index.d.ts.map +1 -1
- package/lib/typescript/components/Text/index.d.ts +9 -1
- package/lib/typescript/components/Text/index.d.ts.map +1 -1
- package/lib/typescript/components/Text/styles.d.ts +6 -0
- package/lib/typescript/components/Text/styles.d.ts.map +1 -0
- package/lib/typescript/components/VirtualizedList/index.d.ts +8 -0
- package/lib/typescript/components/VirtualizedList/index.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +17 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +3 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/styles/index.d.ts +2 -0
- package/lib/typescript/styles/index.d.ts.map +1 -0
- package/lib/typescript/styles/primitives.d.ts +85 -0
- package/lib/typescript/styles/primitives.d.ts.map +1 -0
- package/package.json +15 -6
- package/src/components/AlertDialog/index.tsx +124 -0
- package/src/components/Avatar/index.tsx +172 -0
- package/src/components/Avatar/styles.ts +83 -0
- package/src/components/BottomSheet/index.tsx +316 -0
- package/src/components/BottomSheet/styles.ts +79 -0
- package/src/components/Box/Box.tsx +1 -0
- package/src/components/Button/index.tsx +14 -9
- package/src/components/Button/styles.ts +159 -209
- package/src/components/Card/index.tsx +115 -0
- package/src/components/Card/styles.ts +41 -0
- package/src/components/Checkbox/index.tsx +15 -23
- package/src/components/Checkbox/styles.ts +33 -24
- package/src/components/Chip/index.tsx +91 -0
- package/src/components/Chip/styles.ts +52 -0
- package/src/components/Dialog/index.tsx +304 -0
- package/src/components/Dialog/styles.ts +88 -0
- package/src/components/Field/FieldLabel.tsx +33 -0
- package/src/components/Field/FieldLabel.web.tsx +25 -0
- package/src/components/Field/index.tsx +171 -0
- package/src/components/Field/styles.ts +32 -0
- package/src/components/Form/FormRoot.tsx +20 -0
- package/src/components/Form/FormRoot.web.tsx +12 -0
- package/src/components/Form/index.tsx +38 -0
- package/src/components/Form/styles.ts +3 -0
- package/src/components/Heading/index.tsx +36 -0
- package/src/components/Heading/styles.tsx +25 -0
- package/src/components/Icon/index.tsx +54 -0
- package/src/components/IconButton/index.tsx +92 -0
- package/src/components/IconButton/styles.ts +59 -0
- package/src/components/Image/Image.tsx +77 -0
- package/src/components/Image/index.ts +1 -0
- package/src/components/Input/BaseInput.android.tsx +13 -0
- package/src/components/Input/index.tsx +9 -22
- package/src/components/Input/styles.ts +36 -40
- package/src/components/Link/index.tsx +83 -0
- package/src/components/Link/styles.ts +21 -0
- package/src/components/OtpInput/index.tsx +79 -0
- package/src/components/OtpInput/styles.ts +45 -0
- package/src/components/ProgressBar/index.tsx +53 -0
- package/src/components/ProgressBar/styles.ts +9 -0
- package/src/components/ProgressSegmented/index.tsx +81 -0
- package/src/components/ProgressSegmented/styles.ts +20 -0
- package/src/components/Select/SelectTriggerHost.tsx +4 -0
- package/src/components/Select/SelectTriggerHost.web.tsx +136 -0
- package/src/components/Select/index.tsx +14 -14
- package/src/components/Select/styles.ts +68 -75
- package/src/components/Stack/HStack.tsx +8 -19
- package/src/components/Stack/VStack.tsx +8 -23
- package/src/components/Stack/styles.ts +42 -0
- package/src/components/Switch/index.tsx +0 -2
- package/src/components/Text/index.tsx +16 -0
- package/src/components/Text/styles.tsx +25 -0
- package/src/components/VirtualizedList/index.tsx +19 -0
- package/src/components/index.ts +17 -0
- package/src/index.ts +3 -0
- package/src/styles/index.ts +1 -0
- package/src/styles/primitives.ts +107 -0
- package/lib/commonjs/components/Text/Text.js +0 -30
- package/lib/commonjs/components/Text/Text.js.map +0 -1
- package/lib/module/components/Text/Text.js +0 -26
- package/lib/module/components/Text/Text.js.map +0 -1
- package/lib/typescript/components/Text/Text.d.ts +0 -11
- package/lib/typescript/components/Text/Text.d.ts.map +0 -1
- package/src/components/Text/Text.tsx +0 -58
- package/src/components/Text/index.ts +0 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Platform } from 'react-native';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
import { DISABLED_CURSOR, TRANSITION_COLORS } from '../../styles/primitives';
|
|
6
|
+
export const iconButtonRootVariants = cva(['flex items-center justify-center', 'rounded-[var(--border-radius-round)]', 'web:outline-none web:focus:outline-none web:focus-visible:outline-none', TRANSITION_COLORS, 'data-[disabled=true]:opacity-[--opacity-disabled]', DISABLED_CURSOR, 'web:data-[focus-visible=true]:ring-2 web:data-[focus-visible=true]:ring-[--color-stroke-ring] web:data-[focus-visible=true]:ring-offset-2'], {
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
solid: ['bg-surface-primary border border-stroke-secondary', Platform.select({
|
|
10
|
+
default: 'data-[active=true]:bg-surface-primary-active',
|
|
11
|
+
web: 'data-[hover=true]:bg-surface-primary-hover data-[active=true]:data-[hover=true]:bg-surface-secondary-active'
|
|
12
|
+
})],
|
|
13
|
+
ghost: ['bg-transparent', Platform.select({
|
|
14
|
+
default: 'data-[active=true]:bg-surface-primary-active',
|
|
15
|
+
web: 'data-[hover=true]:bg-surface-primary-hover data-[active=true]:data-[hover=true]:bg-surface-secondary-active'
|
|
16
|
+
})]
|
|
17
|
+
},
|
|
18
|
+
size: {
|
|
19
|
+
default: 'h-11 w-11 min-w-11 shrink-0 p-2.5',
|
|
20
|
+
small: 'h-8 w-8 min-w-8 shrink-0 p-1.5'
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: {
|
|
24
|
+
variant: 'solid',
|
|
25
|
+
size: 'default'
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
export const iconButtonGlyphVariants = cva([], {
|
|
29
|
+
variants: {
|
|
30
|
+
size: {
|
|
31
|
+
default: 'size-6',
|
|
32
|
+
small: 'size-5'
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
defaultVariants: {
|
|
36
|
+
size: 'default'
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
export const iconButtonIconColorVariants = cva(['text-content-primary']);
|
|
40
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Platform","cva","DISABLED_CURSOR","TRANSITION_COLORS","iconButtonRootVariants","variants","variant","solid","select","default","web","ghost","size","small","defaultVariants","iconButtonGlyphVariants","iconButtonIconColorVariants"],"sourceRoot":"../../../../src","sources":["components/IconButton/styles.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,GAAG,QAA2B,0BAA0B;AACjE,SAASC,eAAe,EAAEC,iBAAiB,QAAQ,yBAAyB;AAE5E,OAAO,MAAMC,sBAAsB,GAAGH,GAAG,CACvC,CACE,kCAAkC,EAClC,sCAAsC,EACtC,wEAAwE,EACxEE,iBAAiB,EACjB,mDAAmD,EACnDD,eAAe,EACf,2IAA2I,CAC5I,EACD;EACEG,QAAQ,EAAE;IACRC,OAAO,EAAE;MACPC,KAAK,EAAE,CACL,mDAAmD,EACnDP,QAAQ,CAACQ,MAAM,CAAC;QACdC,OAAO,EAAE,8CAA8C;QACvDC,GAAG,EAAE;MACP,CAAC,CAAC,CACH;MACDC,KAAK,EAAE,CACL,gBAAgB,EAChBX,QAAQ,CAACQ,MAAM,CAAC;QACdC,OAAO,EAAE,8CAA8C;QACvDC,GAAG,EAAE;MACP,CAAC,CAAC;IAEN,CAAC;IACDE,IAAI,EAAE;MACJH,OAAO,EAAE,mCAAmC;MAC5CI,KAAK,EAAE;IACT;EACF,CAAC;EACDC,eAAe,EAAE;IACfR,OAAO,EAAE,OAAO;IAChBM,IAAI,EAAE;EACR;AACF,CACF,CAAC;AAED,OAAO,MAAMG,uBAAuB,GAAGd,GAAG,CAAC,EAAE,EAAE;EAC7CI,QAAQ,EAAE;IACRO,IAAI,EAAE;MACJH,OAAO,EAAE,QAAQ;MACjBI,KAAK,EAAE;IACT;EACF,CAAC;EACDC,eAAe,EAAE;IACfF,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAEF,OAAO,MAAMI,2BAA2B,GAAGf,GAAG,CAAC,CAAC,sBAAsB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Thin wrapper around React Native's `Image`.
|
|
5
|
+
*
|
|
6
|
+
* Design-system layout (sizes, radii, loading/error UI) is intentionally
|
|
7
|
+
* NOT baked in here — use purpose-built components like `Avatar` instead.
|
|
8
|
+
*
|
|
9
|
+
* What this wrapper adds over a raw RN `Image`:
|
|
10
|
+
* - Accepts a plain URI **string** as `source` (auto-normalized to `{ uri }`).
|
|
11
|
+
* - Extends the prop surface with **web-only** HTML attributes (`sizes`,
|
|
12
|
+
* `loading`, `decoding`, etc.) for better `react-native-web` support.
|
|
13
|
+
* Props already covered by RN 0.81+ (`alt`, `srcSet`, `crossOrigin`,
|
|
14
|
+
* `referrerPolicy`) are inherited from the native typings.
|
|
15
|
+
* - All other props and `ref` are forwarded to the underlying `Image`.
|
|
16
|
+
*
|
|
17
|
+
* Inspired by Expo's html-elements Image primitive:
|
|
18
|
+
* @see https://github.com/expo/expo/blob/main/packages/html-elements/src/primitives/Image.tsx
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
import { forwardRef } from 'react';
|
|
22
|
+
import { Image as RNImage } from 'react-native';
|
|
23
|
+
|
|
24
|
+
/** Coerces a plain URI string into the `{ uri }` shape RN expects. */
|
|
25
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
26
|
+
function normalizeSource(source) {
|
|
27
|
+
if (typeof source === 'string') {
|
|
28
|
+
return {
|
|
29
|
+
uri: source
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
return source;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// ---------------------------------------------------------------------------
|
|
36
|
+
// Web-oriented props not yet covered by react-native's Image typings.
|
|
37
|
+
// Props already present in RN 0.81+ (alt, srcSet, crossOrigin,
|
|
38
|
+
// referrerPolicy) are inherited from the native Image props.
|
|
39
|
+
// ---------------------------------------------------------------------------
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* HTML-ish attributes not in RN’s core typings. Forwarded to `Image` with `...props`;
|
|
43
|
+
* **react-native-web** maps supported ones to the DOM `<img>`. On iOS/Android they are
|
|
44
|
+
* typically ignored (no visual effect).
|
|
45
|
+
*/
|
|
46
|
+
|
|
47
|
+
// ---------------------------------------------------------------------------
|
|
48
|
+
// ImageProps = native Image props (minus `source`) + WebImageProps + our overrides.
|
|
49
|
+
// `source` is re-declared to also accept a plain string.
|
|
50
|
+
// ---------------------------------------------------------------------------
|
|
51
|
+
|
|
52
|
+
// ---------------------------------------------------------------------------
|
|
53
|
+
// Component
|
|
54
|
+
// ---------------------------------------------------------------------------
|
|
55
|
+
|
|
56
|
+
export const Image = /*#__PURE__*/forwardRef(function Image({
|
|
57
|
+
source,
|
|
58
|
+
...props
|
|
59
|
+
}, ref) {
|
|
60
|
+
return /*#__PURE__*/_jsx(RNImage, {
|
|
61
|
+
source: normalizeSource(source),
|
|
62
|
+
...props,
|
|
63
|
+
ref: ref
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
Image.displayName = 'Image';
|
|
67
|
+
//# sourceMappingURL=Image.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","Image","RNImage","jsx","_jsx","normalizeSource","source","uri","props","ref","displayName"],"sourceRoot":"../../../../src","sources":["components/Image/Image.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,QAA0D,OAAO;AACpF,SAASC,KAAK,IAAIC,OAAO,QAAkC,cAAc;;AAEzE;AAAA,SAAAC,GAAA,IAAAC,IAAA;AACA,SAASC,eAAeA,CAACC,MAAoC,EAAuB;EAClF,IAAI,OAAOA,MAAM,KAAK,QAAQ,EAAE;IAC9B,OAAO;MAAEC,GAAG,EAAED;IAAO,CAAC;EACxB;EACA,OAAOA,MAAM;AACf;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAcA;AACA;AACA;AACA;;AASA;AACA;AACA;;AAEA,OAAO,MAAML,KAAK,gBAAGD,UAAU,CAA2C,SAASC,KAAKA,CACtF;EAAEK,MAAM;EAAE,GAAGE;AAAM,CAAC,EACpBC,GAAG,EACH;EACA,oBAAOL,IAAA,CAACF,OAAO;IAACI,MAAM,EAAED,eAAe,CAACC,MAAM,CAAE;IAAA,GAAKE,KAAK;IAAEC,GAAG,EAAEA;EAAI,CAAE,CAAC;AAC1E,CAAC,CAAC;AAEFR,KAAK,CAACS,WAAW,GAAG,OAAO","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Image"],"sourceRoot":"../../../../src","sources":["components/Image/index.ts"],"mappings":";;AAAA,SAASA,KAAK,QAA6C,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { TextInput } from 'react-native';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
const androidDefaults = {
|
|
7
|
+
includeFontPadding: false,
|
|
8
|
+
textAlignVertical: 'center'
|
|
9
|
+
};
|
|
10
|
+
export const BaseInput = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/_jsx(TextInput, {
|
|
11
|
+
ref: ref,
|
|
12
|
+
...props,
|
|
13
|
+
style: [androidDefaults, props.style]
|
|
14
|
+
}));
|
|
15
|
+
BaseInput.displayName = 'BaseInput';
|
|
16
|
+
//# sourceMappingURL=BaseInput.android.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","TextInput","jsx","_jsx","androidDefaults","includeFontPadding","textAlignVertical","BaseInput","props","ref","style","displayName"],"sourceRoot":"../../../../src","sources":["components/Input/BaseInput.android.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,SAAS,QAA6B,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE9D,MAAMC,eAAe,GAAG;EACtBC,kBAAkB,EAAE,KAAK;EACzBC,iBAAiB,EAAE;AACrB,CAAC;AAED,OAAO,MAAMC,SAAS,gBAAGP,UAAU,CAA4B,CAACQ,KAAK,EAAEC,GAAG,kBACxEN,IAAA,CAACF,SAAS;EAACQ,GAAG,EAAEA,GAAI;EAAA,GAAKD,KAAK;EAAEE,KAAK,EAAE,CAACN,eAAe,EAAEI,KAAK,CAACE,KAAK;AAAE,CAAE,CACzE,CAAC;AAEFH,SAAS,CAACI,WAAW,GAAG,WAAW","ignoreList":[]}
|
|
@@ -4,6 +4,7 @@ import { forwardRef } from 'react';
|
|
|
4
4
|
import { View } from 'react-native';
|
|
5
5
|
import { createInput } from '@cdx-ui/primitives';
|
|
6
6
|
import { cn, useStyleContext, withStyleContext } from '@cdx-ui/utils';
|
|
7
|
+
import { Icon } from '../Icon';
|
|
7
8
|
import { BaseInput } from './BaseInput';
|
|
8
9
|
import { inputFieldPlaceholderVariants, inputFieldVariants, inputIconVariants, inputRootVariants, inputSlotVariants } from './styles';
|
|
9
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -12,7 +13,6 @@ const Root = withStyleContext(View, SCOPE);
|
|
|
12
13
|
const useInputStyleContext = () => useStyleContext(SCOPE);
|
|
13
14
|
const InputPrimitive = createInput({
|
|
14
15
|
Root,
|
|
15
|
-
Icon: View,
|
|
16
16
|
Slot: View,
|
|
17
17
|
Field: BaseInput
|
|
18
18
|
});
|
|
@@ -23,7 +23,7 @@ const InputPrimitive = createInput({
|
|
|
23
23
|
|
|
24
24
|
const InputRoot = /*#__PURE__*/forwardRef(({
|
|
25
25
|
variant = 'outline',
|
|
26
|
-
size = '
|
|
26
|
+
size = 'default',
|
|
27
27
|
className,
|
|
28
28
|
children,
|
|
29
29
|
style,
|
|
@@ -84,12 +84,7 @@ const InputSlot = /*#__PURE__*/forwardRef(({
|
|
|
84
84
|
style,
|
|
85
85
|
...props
|
|
86
86
|
}, ref) => {
|
|
87
|
-
const
|
|
88
|
-
size
|
|
89
|
-
} = useInputStyleContext();
|
|
90
|
-
const computedClassName = cn(inputSlotVariants({
|
|
91
|
-
size
|
|
92
|
-
}), className);
|
|
87
|
+
const computedClassName = cn(inputSlotVariants(), className);
|
|
93
88
|
return /*#__PURE__*/_jsx(InputPrimitive.Slot, {
|
|
94
89
|
ref: ref,
|
|
95
90
|
className: computedClassName,
|
|
@@ -104,26 +99,25 @@ InputSlot.displayName = 'Input.Slot';
|
|
|
104
99
|
// INPUT ICON
|
|
105
100
|
// =============================================================================
|
|
106
101
|
|
|
107
|
-
const InputIcon =
|
|
102
|
+
const InputIcon = ({
|
|
108
103
|
className,
|
|
109
|
-
children,
|
|
110
104
|
style,
|
|
105
|
+
as,
|
|
111
106
|
...props
|
|
112
|
-
}
|
|
107
|
+
}) => {
|
|
113
108
|
const {
|
|
114
109
|
size
|
|
115
110
|
} = useInputStyleContext();
|
|
116
111
|
const computedClassName = cn(inputIconVariants({
|
|
117
112
|
size
|
|
118
113
|
}), className);
|
|
119
|
-
return /*#__PURE__*/_jsx(
|
|
120
|
-
|
|
114
|
+
return /*#__PURE__*/_jsx(Icon, {
|
|
115
|
+
as: as,
|
|
121
116
|
className: computedClassName,
|
|
122
117
|
style: style,
|
|
123
|
-
...props
|
|
124
|
-
children: children
|
|
118
|
+
...props
|
|
125
119
|
});
|
|
126
|
-
}
|
|
120
|
+
};
|
|
127
121
|
InputIcon.displayName = 'Input.Icon';
|
|
128
122
|
|
|
129
123
|
// =============================================================================
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","View","createInput","cn","useStyleContext","withStyleContext","BaseInput","inputFieldPlaceholderVariants","inputFieldVariants","inputIconVariants","inputRootVariants","inputSlotVariants","jsx","_jsx","SCOPE","Root","useInputStyleContext","InputPrimitive","
|
|
1
|
+
{"version":3,"names":["forwardRef","View","createInput","cn","useStyleContext","withStyleContext","Icon","BaseInput","inputFieldPlaceholderVariants","inputFieldVariants","inputIconVariants","inputRootVariants","inputSlotVariants","jsx","_jsx","SCOPE","Root","useInputStyleContext","InputPrimitive","Slot","Field","InputRoot","variant","size","className","children","style","props","ref","computedClassName","context","displayName","InputField","placeholderTextColorClassName","rest","computedPlaceholderColorClassName","InputSlot","InputIcon","as","Input","Object","assign"],"sourceRoot":"../../../../src","sources":["components/Input/index.tsx"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,58 +1,45 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { cva } from 'class-variance-authority';
|
|
4
|
-
|
|
4
|
+
import { DISABLED_CURSOR, TRANSITION_COLORS } from '../../styles/primitives';
|
|
5
|
+
export const inputRootVariants = cva(['w-full flex-row items-stretch overflow-hidden', 'bg-surface-primary', 'border-solid border-[length:var(--border-width-default)] border-stroke-primary', 'rounded-[var(--border-radius-default)]', TRANSITION_COLORS, 'data-[disabled=true]:bg-surface-secondary', 'data-[disabled=true]:opacity-[--opacity-disabled]', DISABLED_CURSOR, 'data-[readonly=true]:cursor-default', 'data-[readonly=true]:bg-surface-secondary', 'web:data-[hover=true]:data-[focus=false]:data-[invalid=false]:border-stroke-hover', 'data-[focus=true]:border-[length:var(--border-width-focused)]', 'data-[focus=true]:border-stroke-action', 'data-[invalid=true]:border-stroke-danger'], {
|
|
5
6
|
variants: {
|
|
6
7
|
variant: {
|
|
7
|
-
outline: [
|
|
8
|
-
underlined: 'rounded-none border-t-0 border-l-0 border-r-0 border-b-neutral-border data-[focus=true]:border-b-interactive-focus shadow-none'
|
|
8
|
+
outline: []
|
|
9
9
|
},
|
|
10
10
|
size: {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
// TODO: Find a cleaner approach to preventing layout shift when focus border is applied.
|
|
12
|
+
default: ['h-10 px-4 py-2 gap-2', 'data-[focus=true]:px-[15px] data-[focus=true]:py-[7px]'],
|
|
13
|
+
small: ['h-8 px-3 py-1.5 gap-1.5', 'data-[focus=true]:px-[11px] data-[focus=true]:py-[5px]']
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
defaultVariants: {
|
|
17
17
|
variant: 'outline',
|
|
18
|
-
size: '
|
|
18
|
+
size: 'default'
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
|
-
export const inputFieldVariants = cva(['flex-1 bg-transparent
|
|
21
|
+
export const inputFieldVariants = cva(['flex-1 justify-center bg-transparent p-0', 'font-body text-content-primary', 'placeholder:text-content-tertiary', 'web:outline-none', 'tracking-normal'], {
|
|
22
22
|
variants: {
|
|
23
23
|
size: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
lg: 'text-lg leading-none'
|
|
24
|
+
default: 'text-[0.875rem]',
|
|
25
|
+
small: 'text-[0.75rem]'
|
|
27
26
|
}
|
|
28
27
|
},
|
|
29
28
|
defaultVariants: {
|
|
30
|
-
size: '
|
|
29
|
+
size: 'default'
|
|
31
30
|
}
|
|
32
31
|
});
|
|
33
|
-
export const inputSlotVariants = cva(['items-center justify-center']
|
|
32
|
+
export const inputSlotVariants = cva(['items-center justify-center self-center']);
|
|
33
|
+
export const inputIconVariants = cva(['text-content-tertiary'], {
|
|
34
34
|
variants: {
|
|
35
35
|
size: {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
lg: 'h-6 w-6'
|
|
36
|
+
default: 'size-5',
|
|
37
|
+
small: 'size-4'
|
|
39
38
|
}
|
|
40
39
|
},
|
|
41
40
|
defaultVariants: {
|
|
42
|
-
size: '
|
|
41
|
+
size: 'default'
|
|
43
42
|
}
|
|
44
43
|
});
|
|
45
|
-
export const
|
|
46
|
-
variants: {
|
|
47
|
-
size: {
|
|
48
|
-
sm: 'h-4 w-4',
|
|
49
|
-
md: 'h-5 w-5',
|
|
50
|
-
lg: 'h-5 w-5'
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
defaultVariants: {
|
|
54
|
-
size: 'sm'
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
export const inputFieldPlaceholderVariants = cva(['accent-neutral-placeholder']);
|
|
44
|
+
export const inputFieldPlaceholderVariants = cva(['accent-content-tertiary']);
|
|
58
45
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["cva","
|
|
1
|
+
{"version":3,"names":["cva","DISABLED_CURSOR","TRANSITION_COLORS","inputRootVariants","variants","variant","outline","size","default","small","defaultVariants","inputFieldVariants","inputSlotVariants","inputIconVariants","inputFieldPlaceholderVariants"],"sourceRoot":"../../../../src","sources":["components/Input/styles.ts"],"mappings":";;AAAA,SAASA,GAAG,QAA2B,0BAA0B;AACjE,SAASC,eAAe,EAAEC,iBAAiB,QAAQ,yBAAyB;AAE5E,OAAO,MAAMC,iBAAiB,GAAGH,GAAG,CAClC,CACE,+CAA+C,EAC/C,oBAAoB,EACpB,gFAAgF,EAChF,wCAAwC,EACxCE,iBAAiB,EACjB,2CAA2C,EAC3C,mDAAmD,EACnDD,eAAe,EACf,qCAAqC,EACrC,2CAA2C,EAC3C,mFAAmF,EACnF,+DAA+D,EAC/D,wCAAwC,EACxC,0CAA0C,CAC3C,EACD;EACEG,QAAQ,EAAE;IACRC,OAAO,EAAE;MACPC,OAAO,EAAE;IACX,CAAC;IACDC,IAAI,EAAE;MACJ;MACAC,OAAO,EAAE,CAAC,sBAAsB,EAAE,wDAAwD,CAAC;MAC3FC,KAAK,EAAE,CACL,yBAAyB,EACzB,wDAAwD;IAE5D;EACF,CAAC;EACDC,eAAe,EAAE;IACfL,OAAO,EAAE,SAAS;IAClBE,IAAI,EAAE;EACR;AACF,CACF,CAAC;AAED,OAAO,MAAMI,kBAAkB,GAAGX,GAAG,CACnC,CACE,0CAA0C,EAC1C,gCAAgC,EAChC,mCAAmC,EACnC,kBAAkB,EAClB,iBAAiB,CAClB,EACD;EACEI,QAAQ,EAAE;IACRG,IAAI,EAAE;MACJC,OAAO,EAAE,iBAAiB;MAC1BC,KAAK,EAAE;IACT;EACF,CAAC;EACDC,eAAe,EAAE;IACfH,IAAI,EAAE;EACR;AACF,CACF,CAAC;AAED,OAAO,MAAMK,iBAAiB,GAAGZ,GAAG,CAAC,CAAC,yCAAyC,CAAC,CAAC;AAEjF,OAAO,MAAMa,iBAAiB,GAAGb,GAAG,CAAC,CAAC,uBAAuB,CAAC,EAAE;EAC9DI,QAAQ,EAAE;IACRG,IAAI,EAAE;MACJC,OAAO,EAAE,QAAQ;MACjBC,KAAK,EAAE;IACT;EACF,CAAC;EACDC,eAAe,EAAE;IACfH,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAEF,OAAO,MAAMO,6BAA6B,GAAGd,GAAG,CAAC,CAAC,yBAAyB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { Pressable, Text as RNText } from 'react-native';
|
|
5
|
+
import { createLink } from '@cdx-ui/primitives';
|
|
6
|
+
import { cn } from '@cdx-ui/utils';
|
|
7
|
+
import { Icon } from '../Icon';
|
|
8
|
+
import { linkRootVariants, linkLabelVariants, linkIconVariants } from './styles';
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
export { LinkProvider } from '@cdx-ui/primitives';
|
|
11
|
+
const LinkPrimitive = createLink({
|
|
12
|
+
Root: Pressable
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
// =============================================================================
|
|
16
|
+
// STYLED ROOT COMPONENT
|
|
17
|
+
// =============================================================================
|
|
18
|
+
|
|
19
|
+
const LinkRoot = /*#__PURE__*/forwardRef(({
|
|
20
|
+
className,
|
|
21
|
+
children,
|
|
22
|
+
style,
|
|
23
|
+
...props
|
|
24
|
+
}, ref) => {
|
|
25
|
+
const rootClassName = cn(linkRootVariants(), className);
|
|
26
|
+
return /*#__PURE__*/_jsx(LinkPrimitive, {
|
|
27
|
+
ref: ref,
|
|
28
|
+
className: rootClassName,
|
|
29
|
+
style: style,
|
|
30
|
+
...props,
|
|
31
|
+
children: children
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
LinkRoot.displayName = 'Link';
|
|
35
|
+
|
|
36
|
+
// =============================================================================
|
|
37
|
+
// STYLED LABEL COMPONENT
|
|
38
|
+
// =============================================================================
|
|
39
|
+
|
|
40
|
+
const LinkLabel = /*#__PURE__*/forwardRef(({
|
|
41
|
+
className,
|
|
42
|
+
children,
|
|
43
|
+
style,
|
|
44
|
+
...props
|
|
45
|
+
}, ref) => {
|
|
46
|
+
const computedClassName = cn(linkLabelVariants(), className);
|
|
47
|
+
return /*#__PURE__*/_jsx(RNText, {
|
|
48
|
+
ref: ref,
|
|
49
|
+
className: computedClassName,
|
|
50
|
+
style: style,
|
|
51
|
+
...props,
|
|
52
|
+
children: children
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
LinkLabel.displayName = 'Link.Label';
|
|
56
|
+
|
|
57
|
+
// =============================================================================
|
|
58
|
+
// STYLED ICON COMPONENT
|
|
59
|
+
// =============================================================================
|
|
60
|
+
|
|
61
|
+
const LinkIcon = ({
|
|
62
|
+
className,
|
|
63
|
+
style,
|
|
64
|
+
as,
|
|
65
|
+
...props
|
|
66
|
+
}) => {
|
|
67
|
+
const computedClassName = cn(linkIconVariants(), className);
|
|
68
|
+
return /*#__PURE__*/_jsx(Icon, {
|
|
69
|
+
as: as,
|
|
70
|
+
className: computedClassName,
|
|
71
|
+
style: style,
|
|
72
|
+
...props
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
LinkIcon.displayName = 'Link.Icon';
|
|
76
|
+
|
|
77
|
+
// =============================================================================
|
|
78
|
+
// COMPOUND COMPONENT EXPORT
|
|
79
|
+
// =============================================================================
|
|
80
|
+
|
|
81
|
+
export const Link = Object.assign(LinkRoot, {
|
|
82
|
+
Label: LinkLabel,
|
|
83
|
+
Icon: LinkIcon
|
|
84
|
+
});
|
|
85
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","Pressable","Text","RNText","createLink","cn","Icon","linkRootVariants","linkLabelVariants","linkIconVariants","jsx","_jsx","LinkProvider","LinkPrimitive","Root","LinkRoot","className","children","style","props","ref","rootClassName","displayName","LinkLabel","computedClassName","LinkIcon","as","Link","Object","assign","Label"],"sourceRoot":"../../../../src","sources":["components/Link/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAwB,OAAO;AAClD,SAASC,SAAS,EAAEC,IAAI,IAAIC,MAAM,QAAmC,cAAc;AACnF,SAASC,UAAU,QAAyB,oBAAoB;AAChE,SAASC,EAAE,QAAQ,eAAe;AAClC,SAASC,IAAI,QAAwB,SAAS;AAC9C,SAASC,gBAAgB,EAAEC,iBAAiB,EAAEC,gBAAgB,QAAQ,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEjF,SAASC,YAAY,QAA0C,oBAAoB;AAEnF,MAAMC,aAAa,GAAGT,UAAU,CAAC;EAC/BU,IAAI,EAAEb;AACR,CAAC,CAAC;;AAEF;AACA;AACA;;AAMA,MAAMc,QAAQ,gBAAGf,UAAU,CAAkB,CAAC;EAAEgB,SAAS;EAAEC,QAAQ;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EAC9F,MAAMC,aAAa,GAAGhB,EAAE,CAACE,gBAAgB,CAAC,CAAC,EAAES,SAAS,CAAC;EAEvD,oBACEL,IAAA,CAACE,aAAa;IAACO,GAAG,EAAEA,GAAI;IAACJ,SAAS,EAAEK,aAAc;IAACH,KAAK,EAAEA,KAAM;IAAA,GAAKC,KAAK;IAAAF,QAAA,EACvEA;EAAQ,CACI,CAAC;AAEpB,CAAC,CAAC;AAEFF,QAAQ,CAACO,WAAW,GAAG,MAAM;;AAE7B;AACA;AACA;;AAOA,MAAMC,SAAS,gBAAGvB,UAAU,CAC1B,CAAC;EAAEgB,SAAS;EAAEC,QAAQ;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACjD,MAAMI,iBAAiB,GAAGnB,EAAE,CAACG,iBAAiB,CAAC,CAAC,EAAEQ,SAAS,CAAC;EAE5D,oBACEL,IAAA,CAACR,MAAM;IAACiB,GAAG,EAAEA,GAAI;IAACJ,SAAS,EAAEQ,iBAAkB;IAACN,KAAK,EAAEA,KAAM;IAAA,GAAKC,KAAK;IAAAF,QAAA,EACpEA;EAAQ,CACH,CAAC;AAEb,CACF,CAAC;AAEDM,SAAS,CAACD,WAAW,GAAG,YAAY;;AAEpC;AACA;AACA;;AAIA,MAAMG,QAAQ,GAAGA,CAAC;EAAET,SAAS;EAAEE,KAAK;EAAEQ,EAAE;EAAE,GAAGP;AAAqB,CAAC,KAAK;EACtE,MAAMK,iBAAiB,GAAGnB,EAAE,CAACI,gBAAgB,CAAC,CAAC,EAAEO,SAAS,CAAC;EAE3D,oBAAOL,IAAA,CAACL,IAAI;IAACoB,EAAE,EAAEA,EAAG;IAACV,SAAS,EAAEQ,iBAAkB;IAACN,KAAK,EAAEA,KAAM;IAAA,GAAKC;EAAK,CAAG,CAAC;AAChF,CAAC;AAEDM,QAAQ,CAACH,WAAW,GAAG,WAAW;;AAElC;AACA;AACA;;AAOA,OAAO,MAAMK,IAAI,GAAGC,MAAM,CAACC,MAAM,CAACd,QAAQ,EAAE;EAC1Ce,KAAK,EAAEP,SAAS;EAChBjB,IAAI,EAAEmB;AACR,CAAC,CAA0B","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { TRANSITION_COLORS } from '../../styles/primitives';
|
|
5
|
+
|
|
6
|
+
// TODO: Handle visited state
|
|
7
|
+
|
|
8
|
+
export const linkRootVariants = cva(['flex-row items-center gap-1', 'web:outline-none web:focus:outline-none web:focus-visible:outline-none', TRANSITION_COLORS, 'web:data-[focus-visible=true]:ring-2 web:data-[focus-visible=true]:ring-stroke-focus web:data-[focus-visible=true]:ring-offset-2']);
|
|
9
|
+
export const linkLabelVariants = cva(['text-content-link', 'body-md', 'underline underline-offset-4']);
|
|
10
|
+
export const linkIconVariants = cva(['text-content-link', 'size-4']);
|
|
11
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["cva","TRANSITION_COLORS","linkRootVariants","linkLabelVariants","linkIconVariants"],"sourceRoot":"../../../../src","sources":["components/Link/styles.ts"],"mappings":";;AAAA,SAASA,GAAG,QAA2B,0BAA0B;AACjE,SAASC,iBAAiB,QAAQ,yBAAyB;;AAE3D;;AAEA,OAAO,MAAMC,gBAAgB,GAAGF,GAAG,CAAC,CAClC,6BAA6B,EAC7B,wEAAwE,EACxEC,iBAAiB,EACjB,kIAAkI,CACnI,CAAC;AAEF,OAAO,MAAME,iBAAiB,GAAGH,GAAG,CAAC,CACnC,mBAAmB,EACnB,SAAS,EACT,8BAA8B,CAC/B,CAAC;AAEF,OAAO,MAAMI,gBAAgB,GAAGJ,GAAG,CAAC,CAAC,mBAAmB,EAAE,QAAQ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { createOtpInput } from '@cdx-ui/primitives';
|
|
5
|
+
import { cn, useStyleContext, withStyleContext } from '@cdx-ui/utils';
|
|
6
|
+
import { HStack } from '../Stack/HStack';
|
|
7
|
+
import { Input } from '../Input';
|
|
8
|
+
import { otpCellVariants, otpFieldVariants, otpRootVariants } from './styles';
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
const SCOPE = 'OTP_INPUT';
|
|
11
|
+
const OtpRoot = withStyleContext(HStack, SCOPE);
|
|
12
|
+
const useOtpInputStyleContext = () => useStyleContext(SCOPE);
|
|
13
|
+
const OtpStyledCell = /*#__PURE__*/forwardRef(({
|
|
14
|
+
className,
|
|
15
|
+
children,
|
|
16
|
+
...props
|
|
17
|
+
}, ref) => {
|
|
18
|
+
const {
|
|
19
|
+
size,
|
|
20
|
+
variant
|
|
21
|
+
} = useOtpInputStyleContext();
|
|
22
|
+
return /*#__PURE__*/_jsx(Input, {
|
|
23
|
+
ref: ref,
|
|
24
|
+
variant: variant,
|
|
25
|
+
size: size,
|
|
26
|
+
className: cn(otpCellVariants({
|
|
27
|
+
size
|
|
28
|
+
}), className),
|
|
29
|
+
...props,
|
|
30
|
+
children: children
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
OtpStyledCell.displayName = 'OtpInput.Cell';
|
|
34
|
+
const OtpStyledField = /*#__PURE__*/forwardRef(({
|
|
35
|
+
className,
|
|
36
|
+
...props
|
|
37
|
+
}, ref) => {
|
|
38
|
+
const {
|
|
39
|
+
size
|
|
40
|
+
} = useOtpInputStyleContext();
|
|
41
|
+
return /*#__PURE__*/_jsx(Input.Field, {
|
|
42
|
+
ref: ref,
|
|
43
|
+
className: cn(otpFieldVariants({
|
|
44
|
+
size
|
|
45
|
+
}), className),
|
|
46
|
+
...props
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
OtpStyledField.displayName = 'OtpInput.Field';
|
|
50
|
+
const OtpPrimitive = createOtpInput({
|
|
51
|
+
Root: OtpRoot,
|
|
52
|
+
Cell: OtpStyledCell,
|
|
53
|
+
Field: OtpStyledField
|
|
54
|
+
});
|
|
55
|
+
export const OtpInput = /*#__PURE__*/forwardRef(({
|
|
56
|
+
variant = 'outline',
|
|
57
|
+
size = 'default',
|
|
58
|
+
fullWidth = true,
|
|
59
|
+
className,
|
|
60
|
+
style,
|
|
61
|
+
...rest
|
|
62
|
+
}, ref) => {
|
|
63
|
+
const rootClassName = cn(otpRootVariants({
|
|
64
|
+
size,
|
|
65
|
+
fullWidth
|
|
66
|
+
}), className);
|
|
67
|
+
return /*#__PURE__*/_jsx(OtpPrimitive, {
|
|
68
|
+
ref: ref,
|
|
69
|
+
className: rootClassName,
|
|
70
|
+
style: style,
|
|
71
|
+
context: {
|
|
72
|
+
variant,
|
|
73
|
+
size
|
|
74
|
+
},
|
|
75
|
+
...rest
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
OtpInput.displayName = 'OtpInput';
|
|
79
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","createOtpInput","cn","useStyleContext","withStyleContext","HStack","Input","otpCellVariants","otpFieldVariants","otpRootVariants","jsx","_jsx","SCOPE","OtpRoot","useOtpInputStyleContext","OtpStyledCell","className","children","props","ref","size","variant","displayName","OtpStyledField","Field","OtpPrimitive","Root","Cell","OtpInput","fullWidth","style","rest","rootClassName","context"],"sourceRoot":"../../../../src","sources":["components/OtpInput/index.tsx"],"mappings":";;AACA,SAASA,UAAU,QAAQ,OAAO;AAElC,SAASC,cAAc,QAAiC,oBAAoB;AAC5E,SAASC,EAAE,EAAEC,eAAe,EAAEC,gBAAgB,QAAQ,eAAe;AACrE,SAASC,MAAM,QAAQ,iBAAiB;AACxC,SAASC,KAAK,QAAyB,UAAU;AAEjD,SACEC,eAAe,EACfC,gBAAgB,EAChBC,eAAe,QAEV,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAElB,MAAMC,KAAK,GAAG,WAAW;AAEzB,MAAMC,OAAO,GAAGT,gBAAgB,CAACC,MAAM,EAAEO,KAAK,CAAC;AAE/C,MAAME,uBAAuB,GAAGA,CAAA,KAAMX,eAAe,CAACS,KAAK,CAAsB;AAEjF,MAAMG,aAAa,gBAAGf,UAAU,CAC9B,CAAC;EAAEgB,SAAS;EAAEC,QAAQ;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAuB,KAAK;EAC9D,MAAM;IAAEC,IAAI;IAAEC;EAAQ,CAAC,GAAGP,uBAAuB,CAAC,CAAC;EACnD,oBACEH,IAAA,CAACL,KAAK;IACJa,GAAG,EAAEA,GAAI;IACTE,OAAO,EAAEA,OAAQ;IACjBD,IAAI,EAAEA,IAAK;IACXJ,SAAS,EAAEd,EAAE,CAACK,eAAe,CAAC;MAAEa;IAAK,CAAC,CAAC,EAAEJ,SAAS,CAAE;IAAA,GAChDE,KAAK;IAAAD,QAAA,EAERA;EAAQ,CACJ,CAAC;AAEZ,CACF,CAAC;AAEDF,aAAa,CAACO,WAAW,GAAG,eAAe;AAE3C,MAAMC,cAAc,gBAAGvB,UAAU,CAG/B,CAAC;EAAEgB,SAAS;EAAE,GAAGE;AAAM,CAAC,EAAEC,GAAG,KAAK;EAClC,MAAM;IAAEC;EAAK,CAAC,GAAGN,uBAAuB,CAAC,CAAC;EAC1C,oBAAOH,IAAA,CAACL,KAAK,CAACkB,KAAK;IAACL,GAAG,EAAEA,GAAI;IAACH,SAAS,EAAEd,EAAE,CAACM,gBAAgB,CAAC;MAAEY;IAAK,CAAC,CAAC,EAAEJ,SAAS,CAAE;IAAA,GAAKE;EAAK,CAAG,CAAC;AACnG,CAAC,CAAC;AAEFK,cAAc,CAACD,WAAW,GAAG,gBAAgB;AAE7C,MAAMG,YAAY,GAAGxB,cAAc,CAAC;EAClCyB,IAAI,EAAEb,OAAO;EACbc,IAAI,EAAEZ,aAAa;EACnBS,KAAK,EAAED;AACT,CAAC,CAAC;AAQF,OAAO,MAAMK,QAAQ,gBAAG5B,UAAU,CAChC,CAAC;EAAEqB,OAAO,GAAG,SAAS;EAAED,IAAI,GAAG,SAAS;EAAES,SAAS,GAAG,IAAI;EAAEb,SAAS;EAAEc,KAAK;EAAE,GAAGC;AAAK,CAAC,EAAEZ,GAAG,KAAK;EAC/F,MAAMa,aAAa,GAAG9B,EAAE,CAACO,eAAe,CAAC;IAAEW,IAAI;IAAES;EAAU,CAAC,CAAC,EAAEb,SAAS,CAAC;EAEzE,oBACEL,IAAA,CAACc,YAAY;IACXN,GAAG,EAAEA,GAAI;IACTH,SAAS,EAAEgB,aAAc;IACzBF,KAAK,EAAEA,KAAM;IACbG,OAAO,EAAE;MAAEZ,OAAO;MAAED;IAAK,CAAE;IAAA,GACvBW;EAAI,CACT,CAAC;AAEN,CACF,CAAC;AAEDH,QAAQ,CAACN,WAAW,GAAG,UAAU","ignoreList":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
export const otpRootVariants = cva('flex-row items-stretch gap-2.5', {
|
|
5
|
+
variants: {
|
|
6
|
+
size: {
|
|
7
|
+
default: '',
|
|
8
|
+
small: ''
|
|
9
|
+
},
|
|
10
|
+
fullWidth: {
|
|
11
|
+
true: 'w-full self-stretch justify-center',
|
|
12
|
+
false: 'self-start'
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
size: 'default',
|
|
17
|
+
fullWidth: true
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
/** Narrow cell chrome: overrides Input root `w-full` / wide horizontal padding for one digit. */
|
|
22
|
+
export const otpCellVariants = cva('shrink-0 justify-center', {
|
|
23
|
+
variants: {
|
|
24
|
+
size: {
|
|
25
|
+
default: 'w-12 min-w-12 max-w-12 px-1',
|
|
26
|
+
small: 'w-10 min-w-10 max-w-10 px-0.5'
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
size: 'default'
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
export const otpFieldVariants = cva('min-w-0 w-full text-center tabular-nums', {
|
|
34
|
+
variants: {
|
|
35
|
+
size: {
|
|
36
|
+
default: 'text-xl leading-6',
|
|
37
|
+
small: 'text-base leading-5'
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
defaultVariants: {
|
|
41
|
+
size: 'default'
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["cva","otpRootVariants","variants","size","default","small","fullWidth","true","false","defaultVariants","otpCellVariants","otpFieldVariants"],"sourceRoot":"../../../../src","sources":["components/OtpInput/styles.ts"],"mappings":";;AAAA,SAASA,GAAG,QAA2B,0BAA0B;AAEjE,OAAO,MAAMC,eAAe,GAAGD,GAAG,CAAC,gCAAgC,EAAE;EACnEE,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,OAAO,EAAE,EAAE;MACXC,KAAK,EAAE;IACT,CAAC;IACDC,SAAS,EAAE;MACTC,IAAI,EAAE,oCAAoC;MAC1CC,KAAK,EAAE;IACT;EACF,CAAC;EACDC,eAAe,EAAE;IACfN,IAAI,EAAE,SAAS;IACfG,SAAS,EAAE;EACb;AACF,CAAC,CAAC;;AAEF;AACA,OAAO,MAAMI,eAAe,GAAGV,GAAG,CAAC,yBAAyB,EAAE;EAC5DE,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,OAAO,EAAE,6BAA6B;MACtCC,KAAK,EAAE;IACT;EACF,CAAC;EACDI,eAAe,EAAE;IACfN,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAEF,OAAO,MAAMQ,gBAAgB,GAAGX,GAAG,CAAC,yCAAyC,EAAE;EAC7EE,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,OAAO,EAAE,mBAAmB;MAC5BC,KAAK,EAAE;IACT;EACF,CAAC;EACDI,eAAe,EAAE;IACfN,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { View } from 'react-native';
|
|
5
|
+
import { createProgress } from '@cdx-ui/primitives';
|
|
6
|
+
import { cn } from '@cdx-ui/utils';
|
|
7
|
+
import { progressBarIndicatorVariants, progressBarTrackVariants } from './styles';
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
const ProgressPrimitive = createProgress({
|
|
10
|
+
Root: View,
|
|
11
|
+
Indicator: View
|
|
12
|
+
});
|
|
13
|
+
const ProgressBarRoot = /*#__PURE__*/forwardRef(({
|
|
14
|
+
className,
|
|
15
|
+
style,
|
|
16
|
+
...props
|
|
17
|
+
}, ref) => {
|
|
18
|
+
const trackClass = cn(progressBarTrackVariants(), className);
|
|
19
|
+
return /*#__PURE__*/_jsx(ProgressPrimitive, {
|
|
20
|
+
ref: ref,
|
|
21
|
+
className: trackClass,
|
|
22
|
+
style: style,
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
ProgressBarRoot.displayName = 'ProgressBar';
|
|
27
|
+
const ProgressBarIndicator = /*#__PURE__*/forwardRef(({
|
|
28
|
+
className,
|
|
29
|
+
style,
|
|
30
|
+
...props
|
|
31
|
+
}, ref) => /*#__PURE__*/_jsx(ProgressPrimitive.Indicator, {
|
|
32
|
+
ref: ref,
|
|
33
|
+
className: cn(progressBarIndicatorVariants(), className),
|
|
34
|
+
style: style,
|
|
35
|
+
...props
|
|
36
|
+
}));
|
|
37
|
+
ProgressBarIndicator.displayName = 'ProgressBar.Indicator';
|
|
38
|
+
export const ProgressBar = Object.assign(ProgressBarRoot, {
|
|
39
|
+
Indicator: ProgressBarIndicator
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","View","createProgress","cn","progressBarIndicatorVariants","progressBarTrackVariants","jsx","_jsx","ProgressPrimitive","Root","Indicator","ProgressBarRoot","className","style","props","ref","trackClass","displayName","ProgressBarIndicator","ProgressBar","Object","assign"],"sourceRoot":"../../../../src","sources":["components/ProgressBar/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,IAAI,QAAwB,cAAc;AACnD,SAASC,cAAc,QAA6B,oBAAoB;AACxE,SAASC,EAAE,QAAQ,eAAe;AAClC,SACEC,4BAA4B,EAC5BC,wBAAwB,QAEnB,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAElB,MAAMC,iBAAiB,GAAGN,cAAc,CAAC;EACvCO,IAAI,EAAER,IAAI;EACVS,SAAS,EAAET;AACb,CAAC,CAAC;AAUF,MAAMU,eAAe,gBAAGX,UAAU,CAChC,CAAC;EAAEY,SAAS;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACvC,MAAMC,UAAU,GAAGb,EAAE,CAACE,wBAAwB,CAAC,CAAC,EAAEO,SAAS,CAAC;EAE5D,oBAAOL,IAAA,CAACC,iBAAiB;IAACO,GAAG,EAAEA,GAAI;IAACH,SAAS,EAAEI,UAAW;IAACH,KAAK,EAAEA,KAAM;IAAA,GAAKC;EAAK,CAAG,CAAC;AACxF,CACF,CAAC;AAEDH,eAAe,CAACM,WAAW,GAAG,aAAa;AAE3C,MAAMC,oBAAoB,gBAAGlB,UAAU,CACrC,CAAC;EAAEY,SAAS;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,kBAClCR,IAAA,CAACC,iBAAiB,CAACE,SAAS;EAC1BK,GAAG,EAAEA,GAAI;EACTH,SAAS,EAAET,EAAE,CAACC,4BAA4B,CAAC,CAAC,EAAEQ,SAAS,CAAE;EACzDC,KAAK,EAAEA,KAAM;EAAA,GACTC;AAAK,CACV,CAEL,CAAC;AAEDI,oBAAoB,CAACD,WAAW,GAAG,uBAAuB;AAM1D,OAAO,MAAME,WAAW,GAAGC,MAAM,CAACC,MAAM,CAACV,eAAe,EAAE;EACxDD,SAAS,EAAEQ;AACb,CAAC,CAAiC","ignoreList":[]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
export const progressBarTrackVariants = cva(['w-full flex-row overflow-hidden rounded-full bg-surface-action-tint h-1']);
|
|
5
|
+
export const progressBarIndicatorVariants = cva(['rounded-full bg-surface-action-strong']);
|
|
6
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["cva","progressBarTrackVariants","progressBarIndicatorVariants"],"sourceRoot":"../../../../src","sources":["components/ProgressBar/styles.ts"],"mappings":";;AAAA,SAASA,GAAG,QAA2B,0BAA0B;AAEjE,OAAO,MAAMC,wBAAwB,GAAGD,GAAG,CAAC,CAC1C,yEAAyE,CAC1E,CAAC;AAEF,OAAO,MAAME,4BAA4B,GAAGF,GAAG,CAAC,CAAC,uCAAuC,CAAC,CAAC","ignoreList":[]}
|