@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,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BaseFormRoot = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
10
|
+
const BaseFormRoot = exports.BaseFormRoot = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
11
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("form", {
|
|
12
|
+
ref: ref,
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
BaseFormRoot.displayName = 'BaseFormRoot';
|
|
17
|
+
//# sourceMappingURL=FormRoot.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","BaseFormRoot","exports","forwardRef","props","ref","jsx","displayName"],"sourceRoot":"../../../../src","sources":["components/Form/FormRoot.web.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA0C,IAAAC,WAAA,GAAAD,OAAA;AAAA,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAOnC,MAAMkB,YAAY,GAAAC,OAAA,CAAAD,YAAA,gBAAG,IAAAE,iBAAU,EAAqC,CAACC,KAAK,EAAEC,GAAG,KAAK;EACzF,oBAAO,IAAAxB,WAAA,CAAAyB,GAAA;IAAMD,GAAG,EAAEA,GAAI;IAAA,GAAKD;EAAK,CAAG,CAAC;AACtC,CAAC,CAAC;AAEFH,YAAY,CAACM,WAAW,GAAG,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Form = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _primitives = require("@cdx-ui/primitives");
|
|
9
|
+
var _utils = require("@cdx-ui/utils");
|
|
10
|
+
var _FormRoot = require("./FormRoot");
|
|
11
|
+
var _styles = require("./styles");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
14
|
+
// =============================================================================
|
|
15
|
+
// PRIMITIVE
|
|
16
|
+
// =============================================================================
|
|
17
|
+
const FormPrimitive = (0, _primitives.createForm)({
|
|
18
|
+
Root: _FormRoot.BaseFormRoot
|
|
19
|
+
});
|
|
20
|
+
FormPrimitive.displayName = 'FormPrimitive';
|
|
21
|
+
|
|
22
|
+
// =============================================================================
|
|
23
|
+
// FORM ROOT (container — <form> on web, <View> on RN)
|
|
24
|
+
// =============================================================================
|
|
25
|
+
|
|
26
|
+
const FormRoot = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
27
|
+
className,
|
|
28
|
+
children,
|
|
29
|
+
style,
|
|
30
|
+
...props
|
|
31
|
+
}, ref) => {
|
|
32
|
+
const computedClassName = (0, _utils.cn)((0, _styles.formRootVariants)(), className);
|
|
33
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(FormPrimitive, {
|
|
34
|
+
ref: ref,
|
|
35
|
+
className: computedClassName,
|
|
36
|
+
style: style,
|
|
37
|
+
...props,
|
|
38
|
+
children: children
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
FormRoot.displayName = 'Form';
|
|
42
|
+
|
|
43
|
+
// =============================================================================
|
|
44
|
+
// EXPORT
|
|
45
|
+
// =============================================================================
|
|
46
|
+
|
|
47
|
+
const Form = exports.Form = FormRoot;
|
|
48
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_primitives","_utils","_FormRoot","_styles","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","FormPrimitive","createForm","Root","BaseFormRoot","displayName","FormRoot","forwardRef","className","children","style","props","ref","computedClassName","cn","formRootVariants","jsx","Form","exports"],"sourceRoot":"../../../../src","sources":["components/Form/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAA4C,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAD,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAO,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,g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});
|
|
6
|
+
exports.formRootVariants = void 0;
|
|
7
|
+
var _classVarianceAuthority = require("class-variance-authority");
|
|
8
|
+
const formRootVariants = exports.formRootVariants = (0, _classVarianceAuthority.cva)(['flex-col gap-4']);
|
|
9
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_classVarianceAuthority","require","formRootVariants","exports","cva"],"sourceRoot":"../../../../src","sources":["components/Form/styles.ts"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,OAAA;AAEO,MAAMC,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG,IAAAE,2BAAG,EAAC,CAAC,gBAAgB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Heading = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _utils = require("@cdx-ui/utils");
|
|
10
|
+
var _styles = require("./styles");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
const sizeToLevel = {
|
|
13
|
+
xl: 1,
|
|
14
|
+
lg: 2,
|
|
15
|
+
md: 3,
|
|
16
|
+
sm: 4,
|
|
17
|
+
xs: 5
|
|
18
|
+
};
|
|
19
|
+
const Heading = exports.Heading = /*#__PURE__*/(0, _react.memo)(/*#__PURE__*/(0, _react.forwardRef)(function Heading({
|
|
20
|
+
className,
|
|
21
|
+
size = 'lg',
|
|
22
|
+
...props
|
|
23
|
+
}, ref) {
|
|
24
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
25
|
+
role: "heading",
|
|
26
|
+
"aria-level": sizeToLevel[size ?? 'lg'],
|
|
27
|
+
className: (0, _utils.cn)((0, _styles.headingStyle)({
|
|
28
|
+
size
|
|
29
|
+
}), className),
|
|
30
|
+
...props,
|
|
31
|
+
ref: ref
|
|
32
|
+
});
|
|
33
|
+
}));
|
|
34
|
+
Heading.displayName = 'Heading';
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_utils","_styles","_jsxRuntime","sizeToLevel","xl","lg","md","sm","xs","Heading","exports","memo","forwardRef","className","size","props","ref","jsx","Text","role","cn","headingStyle","displayName"],"sourceRoot":"../../../../src","sources":["components/Heading/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAAkE,IAAAI,WAAA,GAAAJ,OAAA;AAElE,MAAMK,WAAW,GAAG;EAClBC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE,CAAC;EACLC,EAAE,EAAE;AACN,CAAU;AAOH,MAAMC,OAAO,GAAAC,OAAA,CAAAD,OAAA,gBAAG,IAAAE,WAAI,eACzB,IAAAC,iBAAU,EAA0C,SAASH,OAAOA,CAClE;EAAEI,SAAS;EAAEC,IAAI,GAAG,IAAI;EAAE,GAAGC;AAAM,CAAC,EACpCC,GAAG,EACH;EACA,oBACE,IAAAd,WAAA,CAAAe,GAAA,EAAClB,YAAA,CAAAmB,IAAI;IACHC,IAAI,EAAC,SAAS;IACd,cAAYhB,WAAW,CAACW,IAAI,IAAI,IAAI,CAAE;IACtCD,SAAS,EAAE,IAAAO,SAAE,EAAC,IAAAC,oBAAY,EAAC;MAAEP;IAAK,CAAC,CAAC,EAAED,SAAS,CAAE;IAAA,GAC7CE,KAAK;IACTC,GAAG,EAAEA;EAAI,CACV,CAAC;AAEN,CAAC,CACH,CAAC;AAEDP,OAAO,CAACa,WAAW,GAAG,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.headingStyle = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _classVarianceAuthority = require("class-variance-authority");
|
|
9
|
+
const headingStyle = exports.headingStyle = (0, _classVarianceAuthority.cva)([`text-content-primary my-0`, _reactNative.Platform.select({
|
|
10
|
+
web: 'bg-transparent display-inline no-underline',
|
|
11
|
+
default: ''
|
|
12
|
+
})], {
|
|
13
|
+
variants: {
|
|
14
|
+
size: {
|
|
15
|
+
xl: 'heading-xl',
|
|
16
|
+
lg: 'heading-lg',
|
|
17
|
+
md: 'heading-md',
|
|
18
|
+
sm: 'heading-sm',
|
|
19
|
+
xs: 'heading-xs'
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_classVarianceAuthority","headingStyle","exports","cva","Platform","select","web","default","variants","size","xl","lg","md","sm","xs"],"sourceRoot":"../../../../src","sources":["components/Heading/styles.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAD,OAAA;AAEO,MAAME,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,IAAAE,2BAAG,EAC7B,CACE,2BAA2B,EAC3BC,qBAAQ,CAACC,MAAM,CAAC;EACdC,GAAG,EAAE,4CAA4C;EACjDC,OAAO,EAAE;AACX,CAAC,CAAC,CACH,EACD;EACEC,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,EAAE,EAAE,YAAY;MAChBC,EAAE,EAAE,YAAY;MAChBC,EAAE,EAAE,YAAY;MAChBC,EAAE,EAAE,YAAY;MAChBC,EAAE,EAAE;IACN;EACF;AACF,CACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Icon = Icon;
|
|
7
|
+
var _uniwind = require("uniwind");
|
|
8
|
+
var _utils = require("@cdx-ui/utils");
|
|
9
|
+
var _primitives = require("../../styles/primitives");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function IconImpl({
|
|
12
|
+
as: IconComponent,
|
|
13
|
+
...props
|
|
14
|
+
}) {
|
|
15
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(IconComponent, {
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
const StyledIcon = (0, _uniwind.withUniwind)(IconImpl, {
|
|
20
|
+
size: {
|
|
21
|
+
fromClassName: 'className',
|
|
22
|
+
styleProperty: 'width'
|
|
23
|
+
},
|
|
24
|
+
color: {
|
|
25
|
+
fromClassName: 'className',
|
|
26
|
+
styleProperty: 'color'
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* A wrapper component for CDX icons with Uniwind `className` support via `withUniwind`.
|
|
32
|
+
*
|
|
33
|
+
* This component allows you to render any CDX icon while applying utility classes
|
|
34
|
+
* using `uniwind`. It avoids the need to wrap or configure each icon individually.
|
|
35
|
+
*
|
|
36
|
+
* @component
|
|
37
|
+
* @example
|
|
38
|
+
* ```tsx
|
|
39
|
+
* import { Icon } from '@cdx-ui/components';
|
|
40
|
+
* import { ArrowRight } from '@cdx-ui/icons';
|
|
41
|
+
*
|
|
42
|
+
* <Icon as={ArrowRight} className="text-red-500 size-4" />
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @param {CdxIcon} as - The CDX icon component to render.
|
|
46
|
+
* @param {string} className - Utility classes to style the icon using Uniwind.
|
|
47
|
+
* @param {number} size - Icon size (overrides the size class).
|
|
48
|
+
* @param {...CdxIconProps} ...props - Additional icon props passed to the "as" icon.
|
|
49
|
+
*/
|
|
50
|
+
function Icon({
|
|
51
|
+
as: IconComponent,
|
|
52
|
+
className,
|
|
53
|
+
...props
|
|
54
|
+
}) {
|
|
55
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledIcon, {
|
|
56
|
+
as: IconComponent,
|
|
57
|
+
className: (0, _utils.cn)(_primitives.COLOR_TEXT_PRIMARY, 'size-5', className),
|
|
58
|
+
...props
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_uniwind","require","_utils","_primitives","_jsxRuntime","IconImpl","as","IconComponent","props","jsx","StyledIcon","withUniwind","size","fromClassName","styleProperty","color","Icon","className","cn","COLOR_TEXT_PRIMARY"],"sourceRoot":"../../../../src","sources":["components/Icon/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AAA6D,IAAAG,WAAA,GAAAH,OAAA;AAO7D,SAASI,QAAQA,CAAC;EAAEC,EAAE,EAAEC,aAAa;EAAE,GAAGC;AAAiB,CAAC,EAAE;EAC5D,oBAAO,IAAAJ,WAAA,CAAAK,GAAA,EAACF,aAAa;IAAA,GAAKC;EAAK,CAAG,CAAC;AACrC;AAEA,MAAME,UAAU,GAAG,IAAAC,oBAAW,EAACN,QAAQ,EAAE;EACvCO,IAAI,EAAE;IACJC,aAAa,EAAE,WAAW;IAC1BC,aAAa,EAAE;EACjB,CAAC;EACDC,KAAK,EAAE;IACLF,aAAa,EAAE,WAAW;IAC1BC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,IAAIA,CAAC;EAAEV,EAAE,EAAEC,aAAa;EAAEU,SAAS;EAAE,GAAGT;AAAiB,CAAC,EAAE;EAC1E,oBACE,IAAAJ,WAAA,CAAAK,GAAA,EAACC,UAAU;IACTJ,EAAE,EAAEC,aAAc;IAClBU,SAAS,EAAE,IAAAC,SAAE,EAACC,8BAAkB,EAAE,QAAQ,EAAEF,SAAS,CAAE;IAAA,GACnDT;EAAK,CACV,CAAC;AAEN","ignoreList":[]}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.IconButton = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _primitives = require("@cdx-ui/primitives");
|
|
10
|
+
var _utils = require("@cdx-ui/utils");
|
|
11
|
+
var _Icon = require("../Icon");
|
|
12
|
+
var _styles = require("./styles");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
const IconButtonPrimitive = (0, _primitives.createButton)({
|
|
15
|
+
Root: _reactNative.Pressable,
|
|
16
|
+
Text: _reactNative.Text,
|
|
17
|
+
Group: _reactNative.View,
|
|
18
|
+
Spinner: _reactNative.ActivityIndicator,
|
|
19
|
+
Icon: _reactNative.View
|
|
20
|
+
});
|
|
21
|
+
function IconButtonGlyph({
|
|
22
|
+
as: IconComponent,
|
|
23
|
+
className
|
|
24
|
+
}) {
|
|
25
|
+
const {
|
|
26
|
+
hover,
|
|
27
|
+
focus,
|
|
28
|
+
active,
|
|
29
|
+
disabled,
|
|
30
|
+
focusVisible
|
|
31
|
+
} = (0, _primitives.useButtonContext)();
|
|
32
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
33
|
+
as: IconComponent,
|
|
34
|
+
className: className,
|
|
35
|
+
...(0, _primitives.dataAttributes)({
|
|
36
|
+
hover,
|
|
37
|
+
focus,
|
|
38
|
+
active,
|
|
39
|
+
disabled,
|
|
40
|
+
focusVisible
|
|
41
|
+
})
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
const IconButtonRoot = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
45
|
+
variant = 'solid',
|
|
46
|
+
size = 'default',
|
|
47
|
+
className,
|
|
48
|
+
style,
|
|
49
|
+
as: IconComponent,
|
|
50
|
+
iconClassName,
|
|
51
|
+
accessibilityRole = 'button',
|
|
52
|
+
...props
|
|
53
|
+
}, ref) => {
|
|
54
|
+
const rootClassName = (0, _utils.cn)((0, _styles.iconButtonRootVariants)({
|
|
55
|
+
variant,
|
|
56
|
+
size
|
|
57
|
+
}), className);
|
|
58
|
+
const glyphClassName = (0, _utils.cn)((0, _styles.iconButtonGlyphVariants)({
|
|
59
|
+
size
|
|
60
|
+
}), (0, _styles.iconButtonIconColorVariants)(), iconClassName);
|
|
61
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(IconButtonPrimitive, {
|
|
62
|
+
ref: ref,
|
|
63
|
+
accessibilityRole: accessibilityRole,
|
|
64
|
+
className: rootClassName,
|
|
65
|
+
style: style,
|
|
66
|
+
...props,
|
|
67
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(IconButtonGlyph, {
|
|
68
|
+
as: IconComponent,
|
|
69
|
+
className: glyphClassName
|
|
70
|
+
})
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
IconButtonRoot.displayName = 'IconButton';
|
|
74
|
+
const IconButton = exports.IconButton = IconButtonRoot;
|
|
75
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_primitives","_utils","_Icon","_styles","_jsxRuntime","IconButtonPrimitive","createButton","Root","Pressable","Text","Group","View","Spinner","ActivityIndicator","Icon","IconButtonGlyph","as","IconComponent","className","hover","focus","active","disabled","focusVisible","useButtonContext","jsx","dataAttributes","IconButtonRoot","forwardRef","variant","size","style","iconClassName","accessibilityRole","props","ref","rootClassName","cn","iconButtonRootVariants","glyphClassName","iconButtonGlyphVariants","iconButtonIconColorVariants","children","displayName","IconButton","exports"],"sourceRoot":"../../../../src","sources":["components/IconButton/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAOA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAKkB,IAAAM,WAAA,GAAAN,OAAA;AAElB,MAAMO,mBAAmB,GAAG,IAAAC,wBAAY,EAAC;EACvCC,IAAI,EAAEC,sBAAS;EACfC,IAAI,EAAJA,iBAAI;EACJC,KAAK,EAAEC,iBAAI;EACXC,OAAO,EAAEC,8BAAiB;EAC1BC,IAAI,EAAEH;AACR,CAAC,CAAC;AAEF,SAASI,eAAeA,CAAC;EAAEC,EAAE,EAAEC,aAAa;EAAEC;AAA8C,CAAC,EAAE;EAC7F,MAAM;IAAEC,KAAK;IAAEC,KAAK;IAAEC,MAAM;IAAEC,QAAQ;IAAEC;EAAa,CAAC,GAAG,IAAAC,4BAAgB,EAAC,CAAC;EAC3E,oBACE,IAAApB,WAAA,CAAAqB,GAAA,EAACvB,KAAA,CAAAY,IAAI;IACHE,EAAE,EAAEC,aAAc;IAClBC,SAAS,EAAEA,SAAU;IAAA,GACjB,IAAAQ,0BAAc,EAAC;MACjBP,KAAK;MACLC,KAAK;MACLC,MAAM;MACNC,QAAQ;MACRC;IACF,CAAC;EAAC,CACH,CAAC;AAEN;AAUA,MAAMI,cAAc,gBAAG,IAAAC,iBAAU,EAC/B,CACE;EACEC,OAAO,GAAG,OAAO;EACjBC,IAAI,GAAG,SAAS;EAChBZ,SAAS;EACTa,KAAK;EACLf,EAAE,EAAEC,aAAa;EACjBe,aAAa;EACbC,iBAAiB,GAAG,QAAQ;EAC5B,GAAGC;AACL,CAAC,EACDC,GAAG,KACA;EACH,MAAMC,aAAa,GAAG,IAAAC,SAAE,EAAC,IAAAC,8BAAsB,EAAC;IAAET,OAAO;IAAEC;EAAK,CAAC,CAAC,EAAEZ,SAAS,CAAC;EAE9E,MAAMqB,cAAc,GAAG,IAAAF,SAAE,EACvB,IAAAG,+BAAuB,EAAC;IAAEV;EAAK,CAAC,CAAC,EACjC,IAAAW,mCAA2B,EAAC,CAAC,EAC7BT,aACF,CAAC;EAED,oBACE,IAAA5B,WAAA,CAAAqB,GAAA,EAACpB,mBAAmB;IAClB8B,GAAG,EAAEA,GAAI;IACTF,iBAAiB,EAAEA,iBAAkB;IACrCf,SAAS,EAAEkB,aAAc;IACzBL,KAAK,EAAEA,KAAM;IAAA,GACTG,KAAK;IAAAQ,QAAA,eAET,IAAAtC,WAAA,CAAAqB,GAAA,EAACV,eAAe;MAACC,EAAE,EAAEC,aAAc;MAACC,SAAS,EAAEqB;IAAe,CAAE;EAAC,CAC9C,CAAC;AAE1B,CACF,CAAC;AAEDZ,cAAc,CAACgB,WAAW,GAAG,YAAY;AAElC,MAAMC,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAGjB,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.iconButtonRootVariants = exports.iconButtonIconColorVariants = exports.iconButtonGlyphVariants = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _classVarianceAuthority = require("class-variance-authority");
|
|
9
|
+
var _primitives = require("../../styles/primitives");
|
|
10
|
+
const iconButtonRootVariants = exports.iconButtonRootVariants = (0, _classVarianceAuthority.cva)(['flex items-center justify-center', 'rounded-[var(--border-radius-round)]', 'web:outline-none web:focus:outline-none web:focus-visible:outline-none', _primitives.TRANSITION_COLORS, 'data-[disabled=true]:opacity-[--opacity-disabled]', _primitives.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'], {
|
|
11
|
+
variants: {
|
|
12
|
+
variant: {
|
|
13
|
+
solid: ['bg-surface-primary border border-stroke-secondary', _reactNative.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
|
+
ghost: ['bg-transparent', _reactNative.Platform.select({
|
|
18
|
+
default: 'data-[active=true]:bg-surface-primary-active',
|
|
19
|
+
web: 'data-[hover=true]:bg-surface-primary-hover data-[active=true]:data-[hover=true]:bg-surface-secondary-active'
|
|
20
|
+
})]
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
default: 'h-11 w-11 min-w-11 shrink-0 p-2.5',
|
|
24
|
+
small: 'h-8 w-8 min-w-8 shrink-0 p-1.5'
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
defaultVariants: {
|
|
28
|
+
variant: 'solid',
|
|
29
|
+
size: 'default'
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
const iconButtonGlyphVariants = exports.iconButtonGlyphVariants = (0, _classVarianceAuthority.cva)([], {
|
|
33
|
+
variants: {
|
|
34
|
+
size: {
|
|
35
|
+
default: 'size-6',
|
|
36
|
+
small: 'size-5'
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
defaultVariants: {
|
|
40
|
+
size: 'default'
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
const iconButtonIconColorVariants = exports.iconButtonIconColorVariants = (0, _classVarianceAuthority.cva)(['text-content-primary']);
|
|
44
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_classVarianceAuthority","_primitives","iconButtonRootVariants","exports","cva","TRANSITION_COLORS","DISABLED_CURSOR","variants","variant","solid","Platform","select","default","web","ghost","size","small","defaultVariants","iconButtonGlyphVariants","iconButtonIconColorVariants"],"sourceRoot":"../../../../src","sources":["components/IconButton/styles.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAEO,MAAMG,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAG,IAAAE,2BAAG,EACvC,CACE,kCAAkC,EAClC,sCAAsC,EACtC,wEAAwE,EACxEC,6BAAiB,EACjB,mDAAmD,EACnDC,2BAAe,EACf,2IAA2I,CAC5I,EACD;EACEC,QAAQ,EAAE;IACRC,OAAO,EAAE;MACPC,KAAK,EAAE,CACL,mDAAmD,EACnDC,qBAAQ,CAACC,MAAM,CAAC;QACdC,OAAO,EAAE,8CAA8C;QACvDC,GAAG,EAAE;MACP,CAAC,CAAC,CACH;MACDC,KAAK,EAAE,CACL,gBAAgB,EAChBJ,qBAAQ,CAACC,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;IACfT,OAAO,EAAE,OAAO;IAChBO,IAAI,EAAE;EACR;AACF,CACF,CAAC;AAEM,MAAMG,uBAAuB,GAAAf,OAAA,CAAAe,uBAAA,GAAG,IAAAd,2BAAG,EAAC,EAAE,EAAE;EAC7CG,QAAQ,EAAE;IACRQ,IAAI,EAAE;MACJH,OAAO,EAAE,QAAQ;MACjBI,KAAK,EAAE;IACT;EACF,CAAC;EACDC,eAAe,EAAE;IACfF,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAEK,MAAMI,2BAA2B,GAAAhB,OAAA,CAAAgB,2BAAA,GAAG,IAAAf,2BAAG,EAAC,CAAC,sBAAsB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Image = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
/**
|
|
11
|
+
* Thin wrapper around React Native's `Image`.
|
|
12
|
+
*
|
|
13
|
+
* Design-system layout (sizes, radii, loading/error UI) is intentionally
|
|
14
|
+
* NOT baked in here — use purpose-built components like `Avatar` instead.
|
|
15
|
+
*
|
|
16
|
+
* What this wrapper adds over a raw RN `Image`:
|
|
17
|
+
* - Accepts a plain URI **string** as `source` (auto-normalized to `{ uri }`).
|
|
18
|
+
* - Extends the prop surface with **web-only** HTML attributes (`sizes`,
|
|
19
|
+
* `loading`, `decoding`, etc.) for better `react-native-web` support.
|
|
20
|
+
* Props already covered by RN 0.81+ (`alt`, `srcSet`, `crossOrigin`,
|
|
21
|
+
* `referrerPolicy`) are inherited from the native typings.
|
|
22
|
+
* - All other props and `ref` are forwarded to the underlying `Image`.
|
|
23
|
+
*
|
|
24
|
+
* Inspired by Expo's html-elements Image primitive:
|
|
25
|
+
* @see https://github.com/expo/expo/blob/main/packages/html-elements/src/primitives/Image.tsx
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/** Coerces a plain URI string into the `{ uri }` shape RN expects. */function normalizeSource(source) {
|
|
29
|
+
if (typeof source === 'string') {
|
|
30
|
+
return {
|
|
31
|
+
uri: source
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
return source;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// ---------------------------------------------------------------------------
|
|
38
|
+
// Web-oriented props not yet covered by react-native's Image typings.
|
|
39
|
+
// Props already present in RN 0.81+ (alt, srcSet, crossOrigin,
|
|
40
|
+
// referrerPolicy) are inherited from the native Image props.
|
|
41
|
+
// ---------------------------------------------------------------------------
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* HTML-ish attributes not in RN’s core typings. Forwarded to `Image` with `...props`;
|
|
45
|
+
* **react-native-web** maps supported ones to the DOM `<img>`. On iOS/Android they are
|
|
46
|
+
* typically ignored (no visual effect).
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
// ---------------------------------------------------------------------------
|
|
50
|
+
// ImageProps = native Image props (minus `source`) + WebImageProps + our overrides.
|
|
51
|
+
// `source` is re-declared to also accept a plain string.
|
|
52
|
+
// ---------------------------------------------------------------------------
|
|
53
|
+
|
|
54
|
+
// ---------------------------------------------------------------------------
|
|
55
|
+
// Component
|
|
56
|
+
// ---------------------------------------------------------------------------
|
|
57
|
+
|
|
58
|
+
const Image = exports.Image = /*#__PURE__*/(0, _react.forwardRef)(function Image({
|
|
59
|
+
source,
|
|
60
|
+
...props
|
|
61
|
+
}, ref) {
|
|
62
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
63
|
+
source: normalizeSource(source),
|
|
64
|
+
...props,
|
|
65
|
+
ref: ref
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
Image.displayName = 'Image';
|
|
69
|
+
//# sourceMappingURL=Image.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_jsxRuntime","normalizeSource","source","uri","Image","exports","forwardRef","props","ref","jsx","displayName"],"sourceRoot":"../../../../src","sources":["components/Image/Image.tsx"],"mappings":";;;;;;AAkBA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAA0E,IAAAE,WAAA,GAAAF,OAAA;AAnB1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,sEACA,SAASG,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;;AAEO,MAAME,KAAK,GAAAC,OAAA,CAAAD,KAAA,gBAAG,IAAAE,iBAAU,EAA2C,SAASF,KAAKA,CACtF;EAAEF,MAAM;EAAE,GAAGK;AAAM,CAAC,EACpBC,GAAG,EACH;EACA,oBAAO,IAAAR,WAAA,CAAAS,GAAA,EAACV,YAAA,CAAAK,KAAO;IAACF,MAAM,EAAED,eAAe,CAACC,MAAM,CAAE;IAAA,GAAKK,KAAK;IAAEC,GAAG,EAAEA;EAAI,CAAE,CAAC;AAC1E,CAAC,CAAC;AAEFJ,KAAK,CAACM,WAAW,GAAG,OAAO","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "Image", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _Image.Image;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _Image = require("./Image");
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_Image","require"],"sourceRoot":"../../../../src","sources":["components/Image/index.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BaseInput = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
const androidDefaults = {
|
|
11
|
+
includeFontPadding: false,
|
|
12
|
+
textAlignVertical: 'center'
|
|
13
|
+
};
|
|
14
|
+
const BaseInput = exports.BaseInput = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
|
|
15
|
+
ref: ref,
|
|
16
|
+
...props,
|
|
17
|
+
style: [androidDefaults, props.style]
|
|
18
|
+
}));
|
|
19
|
+
BaseInput.displayName = 'BaseInput';
|
|
20
|
+
//# sourceMappingURL=BaseInput.android.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_jsxRuntime","androidDefaults","includeFontPadding","textAlignVertical","BaseInput","exports","forwardRef","props","ref","jsx","TextInput","style","displayName"],"sourceRoot":"../../../../src","sources":["components/Input/BaseInput.android.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAA8D,IAAAE,WAAA,GAAAF,OAAA;AAE9D,MAAMG,eAAe,GAAG;EACtBC,kBAAkB,EAAE,KAAK;EACzBC,iBAAiB,EAAE;AACrB,CAAC;AAEM,MAAMC,SAAS,GAAAC,OAAA,CAAAD,SAAA,gBAAG,IAAAE,iBAAU,EAA4B,CAACC,KAAK,EAAEC,GAAG,kBACxE,IAAAR,WAAA,CAAAS,GAAA,EAACV,YAAA,CAAAW,SAAS;EAACF,GAAG,EAAEA,GAAI;EAAA,GAAKD,KAAK;EAAEI,KAAK,EAAE,CAACV,eAAe,EAAEM,KAAK,CAACI,KAAK;AAAE,CAAE,CACzE,CAAC;AAEFP,SAAS,CAACQ,WAAW,GAAG,WAAW","ignoreList":[]}
|
|
@@ -8,6 +8,7 @@ var _react = require("react");
|
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _primitives = require("@cdx-ui/primitives");
|
|
10
10
|
var _utils = require("@cdx-ui/utils");
|
|
11
|
+
var _Icon = require("../Icon");
|
|
11
12
|
var _BaseInput = require("./BaseInput");
|
|
12
13
|
var _styles = require("./styles");
|
|
13
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -16,7 +17,6 @@ const Root = (0, _utils.withStyleContext)(_reactNative.View, SCOPE);
|
|
|
16
17
|
const useInputStyleContext = () => (0, _utils.useStyleContext)(SCOPE);
|
|
17
18
|
const InputPrimitive = (0, _primitives.createInput)({
|
|
18
19
|
Root,
|
|
19
|
-
Icon: _reactNative.View,
|
|
20
20
|
Slot: _reactNative.View,
|
|
21
21
|
Field: _BaseInput.BaseInput
|
|
22
22
|
});
|
|
@@ -27,7 +27,7 @@ const InputPrimitive = (0, _primitives.createInput)({
|
|
|
27
27
|
|
|
28
28
|
const InputRoot = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
29
29
|
variant = 'outline',
|
|
30
|
-
size = '
|
|
30
|
+
size = 'default',
|
|
31
31
|
className,
|
|
32
32
|
children,
|
|
33
33
|
style,
|
|
@@ -88,12 +88,7 @@ const InputSlot = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
88
88
|
style,
|
|
89
89
|
...props
|
|
90
90
|
}, ref) => {
|
|
91
|
-
const
|
|
92
|
-
size
|
|
93
|
-
} = useInputStyleContext();
|
|
94
|
-
const computedClassName = (0, _utils.cn)((0, _styles.inputSlotVariants)({
|
|
95
|
-
size
|
|
96
|
-
}), className);
|
|
91
|
+
const computedClassName = (0, _utils.cn)((0, _styles.inputSlotVariants)(), className);
|
|
97
92
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(InputPrimitive.Slot, {
|
|
98
93
|
ref: ref,
|
|
99
94
|
className: computedClassName,
|
|
@@ -108,26 +103,25 @@ InputSlot.displayName = 'Input.Slot';
|
|
|
108
103
|
// INPUT ICON
|
|
109
104
|
// =============================================================================
|
|
110
105
|
|
|
111
|
-
const InputIcon =
|
|
106
|
+
const InputIcon = ({
|
|
112
107
|
className,
|
|
113
|
-
children,
|
|
114
108
|
style,
|
|
109
|
+
as,
|
|
115
110
|
...props
|
|
116
|
-
}
|
|
111
|
+
}) => {
|
|
117
112
|
const {
|
|
118
113
|
size
|
|
119
114
|
} = useInputStyleContext();
|
|
120
115
|
const computedClassName = (0, _utils.cn)((0, _styles.inputIconVariants)({
|
|
121
116
|
size
|
|
122
117
|
}), className);
|
|
123
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
124
|
-
|
|
118
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
119
|
+
as: as,
|
|
125
120
|
className: computedClassName,
|
|
126
121
|
style: style,
|
|
127
|
-
...props
|
|
128
|
-
children: children
|
|
122
|
+
...props
|
|
129
123
|
});
|
|
130
|
-
}
|
|
124
|
+
};
|
|
131
125
|
InputIcon.displayName = 'Input.Icon';
|
|
132
126
|
|
|
133
127
|
// =============================================================================
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_primitives","_utils","_BaseInput","_styles","_jsxRuntime","SCOPE","Root","withStyleContext","View","useInputStyleContext","useStyleContext","InputPrimitive","createInput","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_primitives","_utils","_Icon","_BaseInput","_styles","_jsxRuntime","SCOPE","Root","withStyleContext","View","useInputStyleContext","useStyleContext","InputPrimitive","createInput","Slot","Field","BaseInput","InputRoot","forwardRef","variant","size","className","children","style","props","ref","computedClassName","cn","inputRootVariants","jsx","context","displayName","InputField","placeholderTextColorClassName","rest","inputFieldVariants","computedPlaceholderColorClassName","inputFieldPlaceholderVariants","InputSlot","inputSlotVariants","InputIcon","as","inputIconVariants","Icon","Input","exports","Object","assign"],"sourceRoot":"../../../../src","sources":["components/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