@cdx-ui/components 0.0.1-alpha.9 → 0.0.1-beta.10
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 +59 -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 +27 -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/ListItem/index.js +283 -0
- package/lib/commonjs/components/ListItem/index.js.map +1 -0
- package/lib/commonjs/components/ListItem/styles.js +130 -0
- package/lib/commonjs/components/ListItem/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 +216 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/figma/Button.figma.js +69 -0
- package/lib/commonjs/figma/Button.figma.js.map +1 -0
- 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 +122 -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 +24 -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/ListItem/index.js +226 -0
- package/lib/module/components/ListItem/index.js.map +1 -0
- package/lib/module/components/ListItem/styles.js +127 -0
- package/lib/module/components/ListItem/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 +18 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/figma/Button.figma.js +63 -0
- package/lib/module/figma/Button.figma.js.map +1 -0
- 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 +118 -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/ListItem/index.d.ts +49 -0
- package/lib/typescript/components/ListItem/index.d.ts.map +1 -0
- package/lib/typescript/components/ListItem/styles.d.ts +30 -0
- package/lib/typescript/components/ListItem/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 +18 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/figma/Button.figma.d.ts +8 -0
- package/lib/typescript/figma/Button.figma.d.ts.map +1 -0
- 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 +34 -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.ts +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/ListItem/index.tsx +285 -0
- package/src/components/ListItem/styles.ts +160 -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.ts +25 -0
- package/src/components/VirtualizedList/index.tsx +19 -0
- package/src/components/index.ts +18 -0
- package/src/index.ts +3 -0
- package/src/styles/index.ts +1 -0
- package/src/styles/primitives.ts +106 -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,267 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { Pressable, Text, View } from 'react-native';
|
|
5
|
+
import { Close as CloseIcon } from '@cdx-ui/icons';
|
|
6
|
+
import { createDialog } from '@cdx-ui/primitives';
|
|
7
|
+
import { cn, useStyleContext, withStyleContext } from '@cdx-ui/utils';
|
|
8
|
+
import { Icon } from '../Icon';
|
|
9
|
+
import { dialogBodyVariants, dialogCloseIconVariants, dialogCloseVariants, dialogContentVariants, dialogDescriptionVariants, dialogFooterVariants, dialogHeaderVariants, dialogOverlayVariants, dialogTitleVariants } from './styles';
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
export { useDialog } from '@cdx-ui/primitives';
|
|
12
|
+
|
|
13
|
+
// =============================================================================
|
|
14
|
+
// STYLE CONTEXT
|
|
15
|
+
// =============================================================================
|
|
16
|
+
|
|
17
|
+
const SCOPE = 'DIALOG';
|
|
18
|
+
const Root = withStyleContext(View, SCOPE);
|
|
19
|
+
const useDialogStyleContext = () => useStyleContext(SCOPE);
|
|
20
|
+
|
|
21
|
+
// =============================================================================
|
|
22
|
+
// STYLED OVERLAY (internal — not consumer-facing)
|
|
23
|
+
// =============================================================================
|
|
24
|
+
|
|
25
|
+
const StyledOverlay = /*#__PURE__*/forwardRef(({
|
|
26
|
+
className,
|
|
27
|
+
...props
|
|
28
|
+
}, ref) => /*#__PURE__*/_jsx(Pressable, {
|
|
29
|
+
ref: ref,
|
|
30
|
+
className: cn(dialogOverlayVariants(), className),
|
|
31
|
+
...props
|
|
32
|
+
}));
|
|
33
|
+
StyledOverlay.displayName = 'Dialog.Overlay';
|
|
34
|
+
|
|
35
|
+
// =============================================================================
|
|
36
|
+
// CREATE DIALOG PRIMITIVE
|
|
37
|
+
// =============================================================================
|
|
38
|
+
|
|
39
|
+
const DialogPrimitive = createDialog({
|
|
40
|
+
Root,
|
|
41
|
+
Trigger: Pressable,
|
|
42
|
+
Overlay: StyledOverlay,
|
|
43
|
+
Content: View,
|
|
44
|
+
Header: View,
|
|
45
|
+
Title: Text,
|
|
46
|
+
Description: Text,
|
|
47
|
+
Body: View,
|
|
48
|
+
Footer: View,
|
|
49
|
+
Close: Pressable
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
// =============================================================================
|
|
53
|
+
// STYLED ROOT
|
|
54
|
+
// =============================================================================
|
|
55
|
+
|
|
56
|
+
const DialogRoot = /*#__PURE__*/forwardRef(({
|
|
57
|
+
size = 'md',
|
|
58
|
+
className,
|
|
59
|
+
children,
|
|
60
|
+
style,
|
|
61
|
+
...props
|
|
62
|
+
}, ref) => /*#__PURE__*/_jsx(DialogPrimitive, {
|
|
63
|
+
ref: ref,
|
|
64
|
+
className: className,
|
|
65
|
+
style: style,
|
|
66
|
+
context: {
|
|
67
|
+
size
|
|
68
|
+
},
|
|
69
|
+
...props,
|
|
70
|
+
children: children
|
|
71
|
+
}));
|
|
72
|
+
DialogRoot.displayName = 'Dialog';
|
|
73
|
+
|
|
74
|
+
// =============================================================================
|
|
75
|
+
// STYLED TRIGGER
|
|
76
|
+
// =============================================================================
|
|
77
|
+
|
|
78
|
+
const DialogTrigger = /*#__PURE__*/forwardRef(({
|
|
79
|
+
className,
|
|
80
|
+
children,
|
|
81
|
+
style,
|
|
82
|
+
...props
|
|
83
|
+
}, ref) => /*#__PURE__*/_jsx(DialogPrimitive.Trigger, {
|
|
84
|
+
ref: ref,
|
|
85
|
+
className: className,
|
|
86
|
+
style: style,
|
|
87
|
+
...props,
|
|
88
|
+
children: children
|
|
89
|
+
}));
|
|
90
|
+
DialogTrigger.displayName = 'Dialog.Trigger';
|
|
91
|
+
|
|
92
|
+
// =============================================================================
|
|
93
|
+
// STYLED CONTENT
|
|
94
|
+
// =============================================================================
|
|
95
|
+
|
|
96
|
+
const DialogContent = /*#__PURE__*/forwardRef(({
|
|
97
|
+
size: sizeProp,
|
|
98
|
+
className,
|
|
99
|
+
children,
|
|
100
|
+
style,
|
|
101
|
+
...props
|
|
102
|
+
}, ref) => {
|
|
103
|
+
const {
|
|
104
|
+
size: contextSize
|
|
105
|
+
} = useDialogStyleContext();
|
|
106
|
+
const size = sizeProp ?? contextSize;
|
|
107
|
+
const computedClassName = cn(dialogContentVariants({
|
|
108
|
+
size
|
|
109
|
+
}), className);
|
|
110
|
+
return /*#__PURE__*/_jsx(DialogPrimitive.Content, {
|
|
111
|
+
ref: ref,
|
|
112
|
+
className: computedClassName,
|
|
113
|
+
style: style,
|
|
114
|
+
...props,
|
|
115
|
+
children: children
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
DialogContent.displayName = 'Dialog.Content';
|
|
119
|
+
|
|
120
|
+
// =============================================================================
|
|
121
|
+
// STYLED HEADER
|
|
122
|
+
// =============================================================================
|
|
123
|
+
|
|
124
|
+
const DialogHeader = /*#__PURE__*/forwardRef(({
|
|
125
|
+
className,
|
|
126
|
+
children,
|
|
127
|
+
style,
|
|
128
|
+
...props
|
|
129
|
+
}, ref) => {
|
|
130
|
+
const computedClassName = cn(dialogHeaderVariants(), className);
|
|
131
|
+
return /*#__PURE__*/_jsx(DialogPrimitive.Header, {
|
|
132
|
+
ref: ref,
|
|
133
|
+
className: computedClassName,
|
|
134
|
+
style: style,
|
|
135
|
+
...props,
|
|
136
|
+
children: children
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
DialogHeader.displayName = 'Dialog.Header';
|
|
140
|
+
|
|
141
|
+
// =============================================================================
|
|
142
|
+
// STYLED TITLE
|
|
143
|
+
// =============================================================================
|
|
144
|
+
|
|
145
|
+
const DialogTitle = /*#__PURE__*/forwardRef(({
|
|
146
|
+
className,
|
|
147
|
+
children,
|
|
148
|
+
style,
|
|
149
|
+
...props
|
|
150
|
+
}, ref) => {
|
|
151
|
+
const computedClassName = cn(dialogTitleVariants(), className);
|
|
152
|
+
return /*#__PURE__*/_jsx(DialogPrimitive.Title, {
|
|
153
|
+
ref: ref,
|
|
154
|
+
className: computedClassName,
|
|
155
|
+
style: style,
|
|
156
|
+
...props,
|
|
157
|
+
children: children
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
DialogTitle.displayName = 'Dialog.Title';
|
|
161
|
+
|
|
162
|
+
// =============================================================================
|
|
163
|
+
// STYLED DESCRIPTION
|
|
164
|
+
// =============================================================================
|
|
165
|
+
|
|
166
|
+
const DialogDescription = /*#__PURE__*/forwardRef(({
|
|
167
|
+
className,
|
|
168
|
+
children,
|
|
169
|
+
style,
|
|
170
|
+
...props
|
|
171
|
+
}, ref) => {
|
|
172
|
+
const computedClassName = cn(dialogDescriptionVariants(), className);
|
|
173
|
+
return /*#__PURE__*/_jsx(DialogPrimitive.Description, {
|
|
174
|
+
ref: ref,
|
|
175
|
+
className: computedClassName,
|
|
176
|
+
style: style,
|
|
177
|
+
...props,
|
|
178
|
+
children: children
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
DialogDescription.displayName = 'Dialog.Description';
|
|
182
|
+
|
|
183
|
+
// =============================================================================
|
|
184
|
+
// STYLED BODY
|
|
185
|
+
// =============================================================================
|
|
186
|
+
|
|
187
|
+
const DialogBody = /*#__PURE__*/forwardRef(({
|
|
188
|
+
className,
|
|
189
|
+
children,
|
|
190
|
+
style,
|
|
191
|
+
...props
|
|
192
|
+
}, ref) => {
|
|
193
|
+
const computedClassName = cn(dialogBodyVariants(), className);
|
|
194
|
+
return /*#__PURE__*/_jsx(DialogPrimitive.Body, {
|
|
195
|
+
ref: ref,
|
|
196
|
+
className: computedClassName,
|
|
197
|
+
style: style,
|
|
198
|
+
...props,
|
|
199
|
+
children: children
|
|
200
|
+
});
|
|
201
|
+
});
|
|
202
|
+
DialogBody.displayName = 'Dialog.Body';
|
|
203
|
+
|
|
204
|
+
// =============================================================================
|
|
205
|
+
// STYLED FOOTER
|
|
206
|
+
// =============================================================================
|
|
207
|
+
|
|
208
|
+
const DialogFooter = /*#__PURE__*/forwardRef(({
|
|
209
|
+
className,
|
|
210
|
+
children,
|
|
211
|
+
style,
|
|
212
|
+
...props
|
|
213
|
+
}, ref) => {
|
|
214
|
+
const computedClassName = cn(dialogFooterVariants(), className);
|
|
215
|
+
return /*#__PURE__*/_jsx(DialogPrimitive.Footer, {
|
|
216
|
+
ref: ref,
|
|
217
|
+
className: computedClassName,
|
|
218
|
+
style: style,
|
|
219
|
+
...props,
|
|
220
|
+
children: children
|
|
221
|
+
});
|
|
222
|
+
});
|
|
223
|
+
DialogFooter.displayName = 'Dialog.Footer';
|
|
224
|
+
|
|
225
|
+
// =============================================================================
|
|
226
|
+
// STYLED CLOSE
|
|
227
|
+
// =============================================================================
|
|
228
|
+
|
|
229
|
+
const DialogClose = /*#__PURE__*/forwardRef(({
|
|
230
|
+
className,
|
|
231
|
+
accessibilityLabel = 'Close',
|
|
232
|
+
children,
|
|
233
|
+
style,
|
|
234
|
+
...props
|
|
235
|
+
}, ref) => {
|
|
236
|
+
const computedClassName = cn(dialogCloseVariants(), className);
|
|
237
|
+
return /*#__PURE__*/_jsx(DialogPrimitive.Close, {
|
|
238
|
+
ref: ref,
|
|
239
|
+
className: computedClassName,
|
|
240
|
+
style: style,
|
|
241
|
+
hitSlop: 12,
|
|
242
|
+
accessibilityRole: "button",
|
|
243
|
+
accessibilityLabel: accessibilityLabel,
|
|
244
|
+
...props,
|
|
245
|
+
children: children ?? /*#__PURE__*/_jsx(Icon, {
|
|
246
|
+
as: CloseIcon,
|
|
247
|
+
className: dialogCloseIconVariants()
|
|
248
|
+
})
|
|
249
|
+
});
|
|
250
|
+
});
|
|
251
|
+
DialogClose.displayName = 'Dialog.Close';
|
|
252
|
+
|
|
253
|
+
// =============================================================================
|
|
254
|
+
// COMPOUND COMPONENT
|
|
255
|
+
// =============================================================================
|
|
256
|
+
|
|
257
|
+
export const Dialog = Object.assign(DialogRoot, {
|
|
258
|
+
Trigger: DialogTrigger,
|
|
259
|
+
Content: DialogContent,
|
|
260
|
+
Header: DialogHeader,
|
|
261
|
+
Title: DialogTitle,
|
|
262
|
+
Description: DialogDescription,
|
|
263
|
+
Body: DialogBody,
|
|
264
|
+
Footer: DialogFooter,
|
|
265
|
+
Close: DialogClose
|
|
266
|
+
});
|
|
267
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","Pressable","Text","View","Close","CloseIcon","createDialog","cn","useStyleContext","withStyleContext","Icon","dialogBodyVariants","dialogCloseIconVariants","dialogCloseVariants","dialogContentVariants","dialogDescriptionVariants","dialogFooterVariants","dialogHeaderVariants","dialogOverlayVariants","dialogTitleVariants","jsx","_jsx","useDialog","SCOPE","Root","useDialogStyleContext","StyledOverlay","className","props","ref","displayName","DialogPrimitive","Trigger","Overlay","Content","Header","Title","Description","Body","Footer","DialogRoot","size","children","style","context","DialogTrigger","DialogContent","sizeProp","contextSize","computedClassName","DialogHeader","DialogTitle","DialogDescription","DialogBody","DialogFooter","DialogClose","accessibilityLabel","hitSlop","accessibilityRole","as","Dialog","Object","assign"],"sourceRoot":"../../../../src","sources":["components/Dialog/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAwB,OAAO;AAClD,SAASC,SAAS,EAAEC,IAAI,EAAEC,IAAI,QA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";
|
|
2
|
+
|
|
3
|
+
import { Platform } from 'react-native';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
import { COLOR_BG_INVERSE, COLOR_BG_PRIMARY, COLOR_BORDER_DEFAULT, COLOR_TEXT_PRIMARY, COLOR_TEXT_SECONDARY, RADIUS_MD, SHADOW_MD, TRANSITION_COLORS } from '../../styles/primitives';
|
|
6
|
+
|
|
7
|
+
// ── Overlay ─────────────────────────────────────────────────
|
|
8
|
+
|
|
9
|
+
export const dialogOverlayVariants = cva(['absolute inset-0', COLOR_BG_INVERSE, 'opacity-50']);
|
|
10
|
+
|
|
11
|
+
// ── Content ─────────────────────────────────────────────────
|
|
12
|
+
|
|
13
|
+
export const dialogContentVariants = cva([COLOR_BG_PRIMARY, `border ${COLOR_BORDER_DEFAULT}`, RADIUS_MD, Platform.select({
|
|
14
|
+
web: SHADOW_MD,
|
|
15
|
+
default: ''
|
|
16
|
+
}), 'max-h-[85vh] overflow-hidden'], {
|
|
17
|
+
variants: {
|
|
18
|
+
size: {
|
|
19
|
+
sm: 'w-[90%] max-w-sm',
|
|
20
|
+
md: 'w-[90%] max-w-md',
|
|
21
|
+
lg: 'w-[90%] max-w-lg',
|
|
22
|
+
full: 'w-full mx-4'
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: {
|
|
26
|
+
size: 'md'
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// ── Header ──────────────────────────────────────────────────
|
|
31
|
+
|
|
32
|
+
export const dialogHeaderVariants = cva(['flex-row items-center justify-between shrink-0', 'px-6 pt-6 pb-2']);
|
|
33
|
+
|
|
34
|
+
// ── Title ───────────────────────────────────────────────────
|
|
35
|
+
|
|
36
|
+
export const dialogTitleVariants = cva(['text-lg font-semibold', COLOR_TEXT_PRIMARY]);
|
|
37
|
+
|
|
38
|
+
// ── Description ─────────────────────────────────────────────
|
|
39
|
+
|
|
40
|
+
export const dialogDescriptionVariants = cva(['text-sm mt-1', COLOR_TEXT_SECONDARY]);
|
|
41
|
+
|
|
42
|
+
// ── Body ────────────────────────────────────────────────────
|
|
43
|
+
|
|
44
|
+
export const dialogBodyVariants = cva(['px-6 py-4 shrink min-h-0']);
|
|
45
|
+
|
|
46
|
+
// ── Footer ──────────────────────────────────────────────────
|
|
47
|
+
|
|
48
|
+
export const dialogFooterVariants = cva(['flex-row items-center justify-end shrink-0', 'gap-3 px-6 pt-2 pb-6']);
|
|
49
|
+
|
|
50
|
+
// ── Close ───────────────────────────────────────────────────
|
|
51
|
+
|
|
52
|
+
export const dialogCloseVariants = cva(['p-1 -m-1 rounded-full', TRANSITION_COLORS, Platform.select({
|
|
53
|
+
default: 'data-[active=true]:opacity-70',
|
|
54
|
+
web: ['data-[hover=true]:bg-slate-100', 'data-[active=true]:bg-slate-200', 'data-[focus-visible=true]:ring-2 data-[focus-visible=true]:ring-slate-400/50 data-[focus-visible=true]:ring-offset-2'].join(' ')
|
|
55
|
+
})]);
|
|
56
|
+
|
|
57
|
+
// ── Close Icon ──────────────────────────────────────────────
|
|
58
|
+
|
|
59
|
+
export const dialogCloseIconVariants = cva(['size-5 text-slate-500']);
|
|
60
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Platform","cva","COLOR_BG_INVERSE","COLOR_BG_PRIMARY","COLOR_BORDER_DEFAULT","COLOR_TEXT_PRIMARY","COLOR_TEXT_SECONDARY","RADIUS_MD","SHADOW_MD","TRANSITION_COLORS","dialogOverlayVariants","dialogContentVariants","select","web","default","variants","size","sm","md","lg","full","defaultVariants","dialogHeaderVariants","dialogTitleVariants","dialogDescriptionVariants","dialogBodyVariants","dialogFooterVariants","dialogCloseVariants","join","dialogCloseIconVariants"],"sourceRoot":"../../../../src","sources":["components/Dialog/styles.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,GAAG,QAA2B,0BAA0B;AACjE,SACEC,gBAAgB,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iBAAiB,EACjBT,QAAQ,CAACY,MAAM,CAAC;EACdE,OAAO,EAAE,+BAA+B;EACxCD,GAAG,EAAE,CACH,gCAAgC,EAChC,iCAAiC,EACjC,sHAAsH,CACvH,CAACe,IAAI,CAAC,GAAG;AACZ,CAAC,CAAC,CACH,CAAC;;AAEF;;AAEA,OAAO,MAAMC,uBAAuB,GAAG5B,GAAG,CAAC,CAAC,uBAAuB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { Text } from 'react-native';
|
|
5
|
+
import { composeEventHandlers, useFormControlContext } from '@cdx-ui/utils';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
/**
|
|
8
|
+
* Native: `Text` label row — tap focuses the field input via form context
|
|
9
|
+
* (parity with `<label htmlFor>` on web).
|
|
10
|
+
*/
|
|
11
|
+
export const BaseFieldLabel = /*#__PURE__*/forwardRef(({
|
|
12
|
+
htmlFor: _omitHtmlFor,
|
|
13
|
+
onPress,
|
|
14
|
+
...props
|
|
15
|
+
}, ref) => {
|
|
16
|
+
void _omitHtmlFor;
|
|
17
|
+
const {
|
|
18
|
+
focusInput,
|
|
19
|
+
isDisabled
|
|
20
|
+
} = useFormControlContext();
|
|
21
|
+
return /*#__PURE__*/_jsx(Text, {
|
|
22
|
+
ref: ref,
|
|
23
|
+
...props,
|
|
24
|
+
disabled: Boolean(isDisabled),
|
|
25
|
+
onPress: composeEventHandlers(onPress, () => focusInput?.())
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
BaseFieldLabel.displayName = 'BaseFieldLabel';
|
|
29
|
+
//# sourceMappingURL=FieldLabel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","Text","composeEventHandlers","useFormControlContext","jsx","_jsx","BaseFieldLabel","htmlFor","_omitHtmlFor","onPress","props","ref","focusInput","isDisabled","disabled","Boolean","displayName"],"sourceRoot":"../../../../src","sources":["components/Field/FieldLabel.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,IAAI,QAA+C,cAAc;AAC1E,SAASC,oBAAoB,EAAEC,qBAAqB,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAS5E;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,gBAAGN,UAAU,CACtC,CAAC;EAAEO,OAAO,EAAEC,YAAY;EAAEC,OAAO;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACrD,KAAKH,YAAY;EAEjB,MAAM;IAAEI,UAAU;IAAEC;EAAW,CAAC,GAAGV,qBAAqB,CAAC,CAAC;EAE1D,oBACEE,IAAA,CAACJ,IAAI;IACHU,GAAG,EAAEA,GAAI;IAAA,GACLD,KAAK;IACTI,QAAQ,EAAEC,OAAO,CAACF,UAAU,CAAE;IAC9BJ,OAAO,EAAEP,oBAAoB,CAACO,OAAO,EAAE,MAAMG,UAAU,GAAG,CAAC;EAAE,CAC9D,CAAC;AAEN,CACF,CAAC;AAEDN,cAAc,CAACU,WAAW,GAAG,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { forwardRef } from 'react';
|
|
4
|
+
|
|
5
|
+
// TODO: Why does dataSet need to be decomposed into individual data attributes?
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
/** Real `<label>` so clicking the label focuses the associated control (`htmlFor` → input `id`). */
|
|
8
|
+
export const BaseFieldLabel = /*#__PURE__*/forwardRef((props, ref) => {
|
|
9
|
+
return /*#__PURE__*/_jsx("label", {
|
|
10
|
+
ref: ref,
|
|
11
|
+
...props,
|
|
12
|
+
"data-invalid": props.dataSet?.invalid,
|
|
13
|
+
"data-required": props.dataSet?.required
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
BaseFieldLabel.displayName = 'BaseFieldLabel';
|
|
17
|
+
//# sourceMappingURL=FieldLabel.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","forwardRef","jsx","_jsx","BaseFieldLabel","props","ref","dataSet","invalid","required","displayName"],"sourceRoot":"../../../../src","sources":["components/Field/FieldLabel.web.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAwB,OAAO;;AAGzD;AAAA,SAAAC,GAAA,IAAAC,IAAA;AASA;AACA,OAAO,MAAMC,cAAc,gBAAGH,UAAU,CAAwC,CAACI,KAAK,EAAEC,GAAG,KAAK;EAC9F,oBACEH,IAAA;IACEG,GAAG,EAAEA,GAAI;IAAA,GACJD,KAAK;IACV,gBAAcA,KAAK,CAACE,OAAO,EAAEC,OAAQ;IACrC,iBAAeH,KAAK,CAACE,OAAO,EAAEE;EAAS,CACxC,CAAC;AAEN,CAAC,CAAC;AAEFL,cAAc,CAACM,WAAW,GAAG,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { Text, View } from 'react-native';
|
|
5
|
+
import { ErrorIcon } from '@cdx-ui/icons';
|
|
6
|
+
import { createField } from '@cdx-ui/primitives';
|
|
7
|
+
import { cn } from '@cdx-ui/utils';
|
|
8
|
+
import { Icon } from '../Icon';
|
|
9
|
+
import { BaseFieldLabel } from './FieldLabel';
|
|
10
|
+
import { fieldErrorIconVariants, fieldErrorTextVariants, fieldErrorVariants, fieldHelperVariants, fieldHelperTextVariants, fieldLabelVariants, fieldRootVariants } from './styles';
|
|
11
|
+
|
|
12
|
+
// =============================================================================
|
|
13
|
+
// PRIMITIVE
|
|
14
|
+
// =============================================================================
|
|
15
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
const FieldPrimitive = createField({
|
|
17
|
+
Root: View,
|
|
18
|
+
Label: BaseFieldLabel,
|
|
19
|
+
Helper: View,
|
|
20
|
+
HelperText: Text,
|
|
21
|
+
Error: View,
|
|
22
|
+
ErrorText: Text,
|
|
23
|
+
ErrorIcon: View
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
// =============================================================================
|
|
27
|
+
// FIELD ROOT
|
|
28
|
+
// =============================================================================
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Field wrapper + context. For **initial focus**, pass `autoFocus` on `Input.Field` (not here).
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
const FieldRoot = /*#__PURE__*/forwardRef(({
|
|
35
|
+
className,
|
|
36
|
+
children,
|
|
37
|
+
style,
|
|
38
|
+
...props
|
|
39
|
+
}, ref) => {
|
|
40
|
+
const computedClassName = cn(fieldRootVariants(), className);
|
|
41
|
+
return /*#__PURE__*/_jsx(FieldPrimitive, {
|
|
42
|
+
ref: ref,
|
|
43
|
+
className: computedClassName,
|
|
44
|
+
style: style,
|
|
45
|
+
...props,
|
|
46
|
+
children: children
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
FieldRoot.displayName = 'Field';
|
|
50
|
+
|
|
51
|
+
// =============================================================================
|
|
52
|
+
// FIELD LABEL
|
|
53
|
+
// =============================================================================
|
|
54
|
+
|
|
55
|
+
const FieldLabel = /*#__PURE__*/forwardRef(({
|
|
56
|
+
className,
|
|
57
|
+
children,
|
|
58
|
+
style,
|
|
59
|
+
htmlFor,
|
|
60
|
+
...props
|
|
61
|
+
}, ref) => {
|
|
62
|
+
const labelClassName = cn(fieldLabelVariants(), className);
|
|
63
|
+
return /*#__PURE__*/_jsx(FieldPrimitive.Label, {
|
|
64
|
+
ref: ref,
|
|
65
|
+
className: labelClassName,
|
|
66
|
+
style: style,
|
|
67
|
+
htmlFor: htmlFor,
|
|
68
|
+
requiredIndicator: /*#__PURE__*/_jsx(Text, {
|
|
69
|
+
className: "text-red-500",
|
|
70
|
+
"aria-hidden": true,
|
|
71
|
+
children: ' *'
|
|
72
|
+
}),
|
|
73
|
+
...props,
|
|
74
|
+
children: children
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
FieldLabel.displayName = 'Field.Label';
|
|
78
|
+
|
|
79
|
+
// =============================================================================
|
|
80
|
+
// FIELD HELPER
|
|
81
|
+
// =============================================================================
|
|
82
|
+
|
|
83
|
+
const FieldHelper = /*#__PURE__*/forwardRef(({
|
|
84
|
+
className,
|
|
85
|
+
children,
|
|
86
|
+
style,
|
|
87
|
+
...props
|
|
88
|
+
}, ref) => {
|
|
89
|
+
const containerClassName = cn(fieldHelperVariants(), className);
|
|
90
|
+
const textClassName = cn(fieldHelperTextVariants());
|
|
91
|
+
return /*#__PURE__*/_jsx(FieldPrimitive.Helper, {
|
|
92
|
+
ref: ref,
|
|
93
|
+
className: containerClassName,
|
|
94
|
+
style: style,
|
|
95
|
+
...props,
|
|
96
|
+
children: /*#__PURE__*/_jsx(FieldPrimitive.HelperText, {
|
|
97
|
+
className: textClassName,
|
|
98
|
+
children: children
|
|
99
|
+
})
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
FieldHelper.displayName = 'Field.Helper';
|
|
103
|
+
|
|
104
|
+
// =============================================================================
|
|
105
|
+
// FIELD ERROR (internal icon + text composition)
|
|
106
|
+
// =============================================================================
|
|
107
|
+
|
|
108
|
+
const FieldErrorIcon = ({
|
|
109
|
+
className,
|
|
110
|
+
style,
|
|
111
|
+
...props
|
|
112
|
+
}) => {
|
|
113
|
+
const computedClassName = cn(fieldErrorIconVariants(), className);
|
|
114
|
+
return /*#__PURE__*/_jsx(Icon, {
|
|
115
|
+
as: ErrorIcon,
|
|
116
|
+
className: computedClassName,
|
|
117
|
+
style: style,
|
|
118
|
+
"aria-hidden": true,
|
|
119
|
+
...props
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
FieldErrorIcon.displayName = 'Field.ErrorIcon';
|
|
123
|
+
const FieldError = /*#__PURE__*/forwardRef(({
|
|
124
|
+
className,
|
|
125
|
+
children,
|
|
126
|
+
style,
|
|
127
|
+
...props
|
|
128
|
+
}, ref) => {
|
|
129
|
+
const containerClassName = cn(fieldErrorVariants(), className);
|
|
130
|
+
const textClassName = cn(fieldErrorTextVariants());
|
|
131
|
+
return /*#__PURE__*/_jsxs(FieldPrimitive.Error, {
|
|
132
|
+
ref: ref,
|
|
133
|
+
className: containerClassName,
|
|
134
|
+
style: style,
|
|
135
|
+
...props,
|
|
136
|
+
children: [/*#__PURE__*/_jsx(FieldPrimitive.ErrorIcon, {
|
|
137
|
+
children: /*#__PURE__*/_jsx(FieldErrorIcon, {})
|
|
138
|
+
}), /*#__PURE__*/_jsx(FieldPrimitive.ErrorText, {
|
|
139
|
+
className: textClassName,
|
|
140
|
+
children: children
|
|
141
|
+
})]
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
FieldError.displayName = 'Field.Error';
|
|
145
|
+
|
|
146
|
+
// =============================================================================
|
|
147
|
+
// COMPOUND EXPORT
|
|
148
|
+
// =============================================================================
|
|
149
|
+
|
|
150
|
+
export const Field = Object.assign(FieldRoot, {
|
|
151
|
+
Label: FieldLabel,
|
|
152
|
+
Helper: FieldHelper,
|
|
153
|
+
Error: FieldError
|
|
154
|
+
});
|
|
155
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","Text","View","ErrorIcon","createField","cn","Icon","BaseFieldLabel","fieldErrorIconVariants","fieldErrorTextVariants","fieldErrorVariants","fieldHelperVariants","fieldHelperTextVariants","fieldLabelVariants","fieldRootVariants","jsx","_jsx","jsxs","_jsxs","FieldPrimitive","Root","Label","Helper","HelperText","Error","ErrorText","FieldRoot","className","children","style","props","ref","computedClassName","displayName","FieldLabel","htmlFor","labelClassName","requiredIndicator","FieldHelper","containerClassName","textClassName","FieldErrorIcon","as","FieldError","Field","Object","assign"],"sourceRoot":"../../../../src","sources":["components/Field/index.tsx"],"mapp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B,WAAW;EACnBd,KAAK,EAAEmB;AACT,CAAC,CAA2B","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { DISABLED_OPACITY } from '../../styles/primitives';
|
|
5
|
+
export const fieldRootVariants = cva(['flex-col gap-2', 'web:last:mb-0', DISABLED_OPACITY]);
|
|
6
|
+
export const fieldLabelVariants = cva(['body-md', 'font-medium', 'text-content-primary', 'flex-row items-center', DISABLED_OPACITY, 'web:cursor-pointer', 'data-[invalid=true]:text-content-danger']);
|
|
7
|
+
export const fieldHelperVariants = cva(['flex-row items-center']);
|
|
8
|
+
export const fieldHelperTextVariants = cva(['body-sm', 'text-content-tertiary']);
|
|
9
|
+
export const fieldErrorVariants = cva(['flex-row items-center gap-1']);
|
|
10
|
+
export const fieldErrorTextVariants = cva(['body-sm', 'text-content-danger']);
|
|
11
|
+
export const fieldErrorIconVariants = cva(['size-3.5', 'text-content-danger']);
|
|
12
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["cva","DISABLED_OPACITY","fieldRootVariants","fieldLabelVariants","fieldHelperVariants","fieldHelperTextVariants","fieldErrorVariants","fieldErrorTextVariants","fieldErrorIconVariants"],"sourceRoot":"../../../../src","sources":["components/Field/styles.ts"],"mappings":";;AAAA,SAASA,GAAG,QAA2B,0BAA0B;AACjE,SAASC,gBAAgB,QAAQ,yBAAyB;AAE1D,OAAO,MAAMC,iBAAiB,GAAGF,GAAG,CAAC,CAAC,gBAAgB,EAAE,eAAe,EAAEC,gBAAgB,CAAC,CAAC;AAE3F,OAAO,MAAME,kBAAkB,GAAGH,GAAG,CAAC,CACpC,SAAS,EACT,aAAa,EACb,sBAAsB,EACtB,uBAAuB,EACvBC,gBAAgB,EAChB,oBAAoB,EACpB,yCAAyC,CAC1C,CAAC;AAEF,OAAO,MAAMG,mBAAmB,GAAGJ,GAAG,CAAC,CAAC,uBAAuB,CAAC,CAAC;AAEjE,OAAO,MAAMK,uBAAuB,GAAGL,GAAG,CAAC,CAAC,SAAS,EAAE,uBAAuB,CAAC,CAAC;AAEhF,OAAO,MAAMM,kBAAkB,GAAGN,GAAG,CAAC,CAAC,6BAA6B,CAAC,CAAC;AAEtE,OAAO,MAAMO,sBAAsB,GAAGP,GAAG,CAAC,CAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC;AAE7E,OAAO,MAAMQ,sBAAsB,GAAGR,GAAG,CAAC,CAAC,UAAU,EAAE,qBAAqB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { View } from 'react-native';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
export const BaseFormRoot = /*#__PURE__*/forwardRef(({
|
|
7
|
+
onSubmit: _onSubmit,
|
|
8
|
+
action: _action,
|
|
9
|
+
method: _method,
|
|
10
|
+
...props
|
|
11
|
+
}, ref) => {
|
|
12
|
+
void _onSubmit;
|
|
13
|
+
void _action;
|
|
14
|
+
void _method;
|
|
15
|
+
return /*#__PURE__*/_jsx(View, {
|
|
16
|
+
ref: ref,
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
BaseFormRoot.displayName = 'BaseFormRoot';
|
|
21
|
+
//# sourceMappingURL=FormRoot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","View","jsx","_jsx","BaseFormRoot","onSubmit","_onSubmit","action","_action","method","_method","props","ref","displayName"],"sourceRoot":"../../../../src","sources":["components/Form/FormRoot.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,IAAI,QAAwB,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AASpD,OAAO,MAAMC,YAAY,gBAAGJ,UAAU,CACpC,CAAC;EAAEK,QAAQ,EAAEC,SAAS;EAAEC,MAAM,EAAEC,OAAO;EAAEC,MAAM,EAAEC,OAAO;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EAC5E,KAAKN,SAAS;EACd,KAAKE,OAAO;EACZ,KAAKE,OAAO;EACZ,oBAAOP,IAAA,CAACF,IAAI;IAACW,GAAG,EAAEA,GAAI;IAAA,GAAKD;EAAK,CAAG,CAAC;AACtC,CACF,CAAC;AAEDP,YAAY,CAACS,WAAW,GAAG,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { forwardRef } from 'react';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
export const BaseFormRoot = /*#__PURE__*/forwardRef((props, ref) => {
|
|
6
|
+
return /*#__PURE__*/_jsx("form", {
|
|
7
|
+
ref: ref,
|
|
8
|
+
...props
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
BaseFormRoot.displayName = 'BaseFormRoot';
|
|
12
|
+
//# sourceMappingURL=FormRoot.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","forwardRef","jsx","_jsx","BaseFormRoot","props","ref","displayName"],"sourceRoot":"../../../../src","sources":["components/Form/FormRoot.web.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAO1C,OAAO,MAAMC,YAAY,gBAAGH,UAAU,CAAqC,CAACI,KAAK,EAAEC,GAAG,KAAK;EACzF,oBAAOH,IAAA;IAAMG,GAAG,EAAEA,GAAI;IAAA,GAAKD;EAAK,CAAG,CAAC;AACtC,CAAC,CAAC;AAEFD,YAAY,CAACG,WAAW,GAAG,cAAc","ignoreList":[]}
|