@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,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.OtpInput = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _primitives = require("@cdx-ui/primitives");
|
|
9
|
+
var _utils = require("@cdx-ui/utils");
|
|
10
|
+
var _HStack = require("../Stack/HStack");
|
|
11
|
+
var _Input = require("../Input");
|
|
12
|
+
var _styles = require("./styles");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
const SCOPE = 'OTP_INPUT';
|
|
15
|
+
const OtpRoot = (0, _utils.withStyleContext)(_HStack.HStack, SCOPE);
|
|
16
|
+
const useOtpInputStyleContext = () => (0, _utils.useStyleContext)(SCOPE);
|
|
17
|
+
const OtpStyledCell = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
18
|
+
className,
|
|
19
|
+
children,
|
|
20
|
+
...props
|
|
21
|
+
}, ref) => {
|
|
22
|
+
const {
|
|
23
|
+
size,
|
|
24
|
+
variant
|
|
25
|
+
} = useOtpInputStyleContext();
|
|
26
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.Input, {
|
|
27
|
+
ref: ref,
|
|
28
|
+
variant: variant,
|
|
29
|
+
size: size,
|
|
30
|
+
className: (0, _utils.cn)((0, _styles.otpCellVariants)({
|
|
31
|
+
size
|
|
32
|
+
}), className),
|
|
33
|
+
...props,
|
|
34
|
+
children: children
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
OtpStyledCell.displayName = 'OtpInput.Cell';
|
|
38
|
+
const OtpStyledField = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
39
|
+
className,
|
|
40
|
+
...props
|
|
41
|
+
}, ref) => {
|
|
42
|
+
const {
|
|
43
|
+
size
|
|
44
|
+
} = useOtpInputStyleContext();
|
|
45
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.Input.Field, {
|
|
46
|
+
ref: ref,
|
|
47
|
+
className: (0, _utils.cn)((0, _styles.otpFieldVariants)({
|
|
48
|
+
size
|
|
49
|
+
}), className),
|
|
50
|
+
...props
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
OtpStyledField.displayName = 'OtpInput.Field';
|
|
54
|
+
const OtpPrimitive = (0, _primitives.createOtpInput)({
|
|
55
|
+
Root: OtpRoot,
|
|
56
|
+
Cell: OtpStyledCell,
|
|
57
|
+
Field: OtpStyledField
|
|
58
|
+
});
|
|
59
|
+
const OtpInput = exports.OtpInput = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
60
|
+
variant = 'outline',
|
|
61
|
+
size = 'default',
|
|
62
|
+
fullWidth = true,
|
|
63
|
+
className,
|
|
64
|
+
style,
|
|
65
|
+
...rest
|
|
66
|
+
}, ref) => {
|
|
67
|
+
const rootClassName = (0, _utils.cn)((0, _styles.otpRootVariants)({
|
|
68
|
+
size,
|
|
69
|
+
fullWidth
|
|
70
|
+
}), className);
|
|
71
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(OtpPrimitive, {
|
|
72
|
+
ref: ref,
|
|
73
|
+
className: rootClassName,
|
|
74
|
+
style: style,
|
|
75
|
+
context: {
|
|
76
|
+
variant,
|
|
77
|
+
size
|
|
78
|
+
},
|
|
79
|
+
...rest
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
OtpInput.displayName = 'OtpInput';
|
|
83
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_primitives","_utils","_HStack","_Input","_styles","_jsxRuntime","SCOPE","OtpRoot","withStyleContext","HStack","useOtpInputStyleContext","useStyleContext","OtpStyledCell","forwardRef","className","children","props","ref","size","variant","jsx","Input","cn","otpCellVariants","displayName","OtpStyledField","Field","otpFieldVariants","OtpPrimitive","createOtpInput","Root","Cell","OtpInput","exports","fullWidth","style","rest","rootClassName","otpRootVariants","context"],"sourceRoot":"../../../../src","sources":["components/OtpInput/index.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAEA,IAAAK,OAAA,GAAAL,OAAA;AAKkB,IAAAM,WAAA,GAAAN,OAAA;AAElB,MAAMO,KAAK,GAAG,WAAW;AAEzB,MAAMC,OAAO,GAAG,IAAAC,uBAAgB,EAACC,cAAM,EAAEH,KAAK,CAAC;AAE/C,MAAMI,uBAAuB,GAAGA,CAAA,KAAM,IAAAC,sBAAe,EAACL,KAAK,CAAsB;AAEjF,MAAMM,aAAa,gBAAG,IAAAC,iBAAU,EAC9B,CAAC;EAAEC,SAAS;EAAEC,QAAQ;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAuB,KAAK;EAC9D,MAAM;IAAEC,IAAI;IAAEC;EAAQ,CAAC,GAAGT,uBAAuB,CAAC,CAAC;EACnD,oBACE,IAAAL,WAAA,CAAAe,GAAA,EAACjB,MAAA,CAAAkB,KAAK;IACJJ,GAAG,EAAEA,GAAI;IACTE,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,CAAC;EAEzE,oBACE,IAAAT,WAAA,CAAAe,GAAA,EAACQ,YAAY;IACXX,GAAG,EAAEA,GAAI;IACTH,SAAS,EAAEuB,aAAc;IACzBF,KAAK,EAAEA,KAAM;IACbI,OAAO,EAAE;MAAEpB,OAAO;MAAED;IAAK,CAAE;IAAA,GACvBkB;EAAI,CACT,CAAC;AAEN,CACF,CAAC;AAEDJ,QAAQ,CAACR,WAAW,GAAG,UAAU","ignoreList":[]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.otpRootVariants = exports.otpFieldVariants = exports.otpCellVariants = void 0;
|
|
7
|
+
var _classVarianceAuthority = require("class-variance-authority");
|
|
8
|
+
const otpRootVariants = exports.otpRootVariants = (0, _classVarianceAuthority.cva)('flex-row items-stretch gap-2.5', {
|
|
9
|
+
variants: {
|
|
10
|
+
size: {
|
|
11
|
+
default: '',
|
|
12
|
+
small: ''
|
|
13
|
+
},
|
|
14
|
+
fullWidth: {
|
|
15
|
+
true: 'w-full self-stretch justify-center',
|
|
16
|
+
false: 'self-start'
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
size: 'default',
|
|
21
|
+
fullWidth: true
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
/** Narrow cell chrome: overrides Input root `w-full` / wide horizontal padding for one digit. */
|
|
26
|
+
const otpCellVariants = exports.otpCellVariants = (0, _classVarianceAuthority.cva)('shrink-0 justify-center', {
|
|
27
|
+
variants: {
|
|
28
|
+
size: {
|
|
29
|
+
default: 'w-12 min-w-12 max-w-12 px-1',
|
|
30
|
+
small: 'w-10 min-w-10 max-w-10 px-0.5'
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
defaultVariants: {
|
|
34
|
+
size: 'default'
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
const otpFieldVariants = exports.otpFieldVariants = (0, _classVarianceAuthority.cva)('min-w-0 w-full text-center tabular-nums', {
|
|
38
|
+
variants: {
|
|
39
|
+
size: {
|
|
40
|
+
default: 'text-xl leading-6',
|
|
41
|
+
small: 'text-base leading-5'
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
defaultVariants: {
|
|
45
|
+
size: 'default'
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_classVarianceAuthority","require","otpRootVariants","exports","cva","variants","size","default","small","fullWidth","true","false","defaultVariants","otpCellVariants","otpFieldVariants"],"sourceRoot":"../../../../src","sources":["components/OtpInput/styles.ts"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,OAAA;AAEO,MAAMC,eAAe,GAAAC,OAAA,CAAAD,eAAA,GAAG,IAAAE,2BAAG,EAAC,gCAAgC,EAAE;EACnEC,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,OAAO,EAAE,EAAE;MACXC,KAAK,EAAE;IACT,CAAC;IACDC,SAAS,EAAE;MACTC,IAAI,EAAE,oCAAoC;MAC1CC,KAAK,EAAE;IACT;EACF,CAAC;EACDC,eAAe,EAAE;IACfN,IAAI,EAAE,SAAS;IACfG,SAAS,EAAE;EACb;AACF,CAAC,CAAC;;AAEF;AACO,MAAMI,eAAe,GAAAV,OAAA,CAAAU,eAAA,GAAG,IAAAT,2BAAG,EAAC,yBAAyB,EAAE;EAC5DC,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,OAAO,EAAE,6BAA6B;MACtCC,KAAK,EAAE;IACT;EACF,CAAC;EACDI,eAAe,EAAE;IACfN,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAEK,MAAMQ,gBAAgB,GAAAX,OAAA,CAAAW,gBAAA,GAAG,IAAAV,2BAAG,EAAC,yCAAyC,EAAE;EAC7EC,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,OAAO,EAAE,mBAAmB;MAC5BC,KAAK,EAAE;IACT;EACF,CAAC;EACDI,eAAe,EAAE;IACfN,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ProgressBar = 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 _styles = require("./styles");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
const ProgressPrimitive = (0, _primitives.createProgress)({
|
|
14
|
+
Root: _reactNative.View,
|
|
15
|
+
Indicator: _reactNative.View
|
|
16
|
+
});
|
|
17
|
+
const ProgressBarRoot = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
18
|
+
className,
|
|
19
|
+
style,
|
|
20
|
+
...props
|
|
21
|
+
}, ref) => {
|
|
22
|
+
const trackClass = (0, _utils.cn)((0, _styles.progressBarTrackVariants)(), className);
|
|
23
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ProgressPrimitive, {
|
|
24
|
+
ref: ref,
|
|
25
|
+
className: trackClass,
|
|
26
|
+
style: style,
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
ProgressBarRoot.displayName = 'ProgressBar';
|
|
31
|
+
const ProgressBarIndicator = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
32
|
+
className,
|
|
33
|
+
style,
|
|
34
|
+
...props
|
|
35
|
+
}, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(ProgressPrimitive.Indicator, {
|
|
36
|
+
ref: ref,
|
|
37
|
+
className: (0, _utils.cn)((0, _styles.progressBarIndicatorVariants)(), className),
|
|
38
|
+
style: style,
|
|
39
|
+
...props
|
|
40
|
+
}));
|
|
41
|
+
ProgressBarIndicator.displayName = 'ProgressBar.Indicator';
|
|
42
|
+
const ProgressBar = exports.ProgressBar = Object.assign(ProgressBarRoot, {
|
|
43
|
+
Indicator: ProgressBarIndicator
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_primitives","_utils","_styles","_jsxRuntime","ProgressPrimitive","createProgress","Root","View","Indicator","ProgressBarRoot","forwardRef","className","style","props","ref","trackClass","cn","progressBarTrackVariants","jsx","displayName","ProgressBarIndicator","progressBarIndicatorVariants","ProgressBar","exports","Object","assign"],"sourceRoot":"../../../../src","sources":["components/ProgressBar/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAIkB,IAAAK,WAAA,GAAAL,OAAA;AAElB,MAAMM,iBAAiB,GAAG,IAAAC,0BAAc,EAAC;EACvCC,IAAI,EAAEC,iBAAI;EACVC,SAAS,EAAED;AACb,CAAC,CAAC;AAUF,MAAME,eAAe,gBAAG,IAAAC,iBAAU,EAChC,CAAC;EAAEC,SAAS;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACvC,MAAMC,UAAU,GAAG,IAAAC,SAAE,EAAC,IAAAC,gCAAwB,EAAC,CAAC,EAAEN,SAAS,CAAC;EAE5D,oBAAO,IAAAR,WAAA,CAAAe,GAAA,EAACd,iBAAiB;IAACU,GAAG,EAAEA,GAAI;IAACH,SAAS,EAAEI,UAAW;IAACH,KAAK,EAAEA,KAAM;IAAA,GAAKC;EAAK,CAAG,CAAC;AACxF,CACF,CAAC;AAEDJ,eAAe,CAACU,WAAW,GAAG,aAAa;AAE3C,MAAMC,oBAAoB,gBAAG,IAAAV,iBAAU,EACrC,CAAC;EAAEC,SAAS;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,kBAClC,IAAAX,WAAA,CAAAe,GAAA,EAACd,iBAAiB,CAACI,SAAS;EAC1BM,GAAG,EAAEA,GAAI;EACTH,SAAS,EAAE,IAAAK,SAAE,EAAC,IAAAK,oCAA4B,EAAC,CAAC,EAAEV,SAAS,CAAE;EACzDC,KAAK,EAAEA,KAAM;EAAA,GACTC;AAAK,CACV,CAEL,CAAC;AAEDO,oBAAoB,CAACD,WAAW,GAAG,uBAAuB;AAMnD,MAAMG,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAGE,MAAM,CAACC,MAAM,CAAChB,eAAe,EAAE;EACxDD,SAAS,EAAEY;AACb,CAAC,CAAiC","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.progressBarTrackVariants = exports.progressBarIndicatorVariants = void 0;
|
|
7
|
+
var _classVarianceAuthority = require("class-variance-authority");
|
|
8
|
+
const progressBarTrackVariants = exports.progressBarTrackVariants = (0, _classVarianceAuthority.cva)(['w-full flex-row overflow-hidden rounded-full bg-surface-action-tint h-1']);
|
|
9
|
+
const progressBarIndicatorVariants = exports.progressBarIndicatorVariants = (0, _classVarianceAuthority.cva)(['rounded-full bg-surface-action-strong']);
|
|
10
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_classVarianceAuthority","require","progressBarTrackVariants","exports","cva","progressBarIndicatorVariants"],"sourceRoot":"../../../../src","sources":["components/ProgressBar/styles.ts"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,OAAA;AAEO,MAAMC,wBAAwB,GAAAC,OAAA,CAAAD,wBAAA,GAAG,IAAAE,2BAAG,EAAC,CAC1C,yEAAyE,CAC1E,CAAC;AAEK,MAAMC,4BAA4B,GAAAF,OAAA,CAAAE,4BAAA,GAAG,IAAAD,2BAAG,EAAC,CAAC,uCAAuC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ProgressSegmented = 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 ProgressSegmented = exports.ProgressSegmented = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
13
|
+
step,
|
|
14
|
+
total = 5,
|
|
15
|
+
isStepComplete = false,
|
|
16
|
+
getAccessibilityText,
|
|
17
|
+
className,
|
|
18
|
+
accessibilityLabel = 'Progress',
|
|
19
|
+
...props
|
|
20
|
+
}, ref) => {
|
|
21
|
+
const clampedStep = Math.max(0, Math.min(step, total));
|
|
22
|
+
const segments = (0, _react.useMemo)(() => {
|
|
23
|
+
return Array.from({
|
|
24
|
+
length: total
|
|
25
|
+
}, (_, index) => {
|
|
26
|
+
const segmentIndex = index + 1;
|
|
27
|
+
let state = 'incomplete';
|
|
28
|
+
if (segmentIndex < clampedStep || isStepComplete && segmentIndex === clampedStep) {
|
|
29
|
+
state = 'complete';
|
|
30
|
+
} else if (segmentIndex === clampedStep) {
|
|
31
|
+
state = 'inprogress';
|
|
32
|
+
}
|
|
33
|
+
return state;
|
|
34
|
+
});
|
|
35
|
+
}, [total, clampedStep, isStepComplete]);
|
|
36
|
+
let accessibilityText = `Step ${String(clampedStep)} of ${String(total)}`;
|
|
37
|
+
if (getAccessibilityText) {
|
|
38
|
+
accessibilityText = getAccessibilityText(clampedStep, total, isStepComplete);
|
|
39
|
+
} else if (isStepComplete) {
|
|
40
|
+
accessibilityText = `Step ${String(clampedStep)} of ${String(total)}, completed`;
|
|
41
|
+
}
|
|
42
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
43
|
+
ref: ref,
|
|
44
|
+
accessibilityRole: "progressbar",
|
|
45
|
+
accessibilityLabel: accessibilityLabel,
|
|
46
|
+
accessibilityValue: {
|
|
47
|
+
min: 0,
|
|
48
|
+
max: total,
|
|
49
|
+
now: clampedStep,
|
|
50
|
+
text: accessibilityText
|
|
51
|
+
},
|
|
52
|
+
className: (0, _utils.cn)((0, _styles.progressSegmentedVariants)(), className),
|
|
53
|
+
...props,
|
|
54
|
+
children: segments.map((state, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
55
|
+
className: (0, _utils.cn)((0, _styles.segmentVariants)({
|
|
56
|
+
state
|
|
57
|
+
}))
|
|
58
|
+
}, index))
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
ProgressSegmented.displayName = 'ProgressSegmented';
|
|
62
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_utils","_styles","_jsxRuntime","ProgressSegmented","exports","forwardRef","step","total","isStepComplete","getAccessibilityText","className","accessibilityLabel","props","ref","clampedStep","Math","max","min","segments","useMemo","Array","from","length","_","index","segmentIndex","state","accessibilityText","String","jsx","View","accessibilityRole","accessibilityValue","now","text","cn","progressSegmentedVariants","children","map","segmentVariants","displayName"],"sourceRoot":"../../../../src","sources":["components/ProgressSegmented/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH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MAAM,CAACrB,KAAK,CAAC,aAAa;EAClF;EAEA,oBACE,IAAAL,WAAA,CAAA2B,GAAA,EAAC9B,YAAA,CAAA+B,IAAI;IACHjB,GAAG,EAAEA,GAAI;IACTkB,iBAAiB,EAAC,aAAa;IAC/BpB,kBAAkB,EAAEA,kBAAmB;IACvCqB,kBAAkB,EAAE;MAClBf,GAAG,EAAE,CAAC;MACND,GAAG,EAAET,KAAK;MACV0B,GAAG,EAAEnB,WAAW;MAChBoB,IAAI,EAAEP;IACR,CAAE;IACFjB,SAAS,EAAE,IAAAyB,SAAE,EAAC,IAAAC,iCAAyB,EAAC,CAAC,EAAE1B,SAAS,CAAE;IAAA,GAClDE,KAAK;IAAAyB,QAAA,EAERnB,QAAQ,CAACoB,GAAG,CAAC,CAACZ,KAAK,EAAEF,KAAK,kBACzB,IAAAtB,WAAA,CAAA2B,GAAA,EAAC9B,YAAA,CAAA+B,IAAI;MAAapB,SAAS,EAAE,IAAAyB,SAAE,EAAC,IAAAI,uBAAe,EAAC;QAAEb;MAAM,CAAC,CAAC;IAAE,GAAjDF,KAAmD,CAC/D;EAAC,CACE,CAAC;AAEX,CACF,CAAC;AAEDrB,iBAAiB,CAACqC,WAAW,GAAG,mBAAmB","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.segmentVariants = exports.progressSegmentedVariants = void 0;
|
|
7
|
+
var _classVarianceAuthority = require("class-variance-authority");
|
|
8
|
+
const progressSegmentedVariants = exports.progressSegmentedVariants = (0, _classVarianceAuthority.cva)(['flex-row gap-1 w-full rounded overflow-hidden']);
|
|
9
|
+
const segmentVariants = exports.segmentVariants = (0, _classVarianceAuthority.cva)(['flex-1 h-1'], {
|
|
10
|
+
variants: {
|
|
11
|
+
state: {
|
|
12
|
+
complete: 'bg-surface-action-strong',
|
|
13
|
+
incomplete: 'bg-surface-action-tint',
|
|
14
|
+
inprogress: 'bg-gradient-to-r from-surface-action-strong from-50% to-surface-action-tint to-50%'
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: {
|
|
18
|
+
state: 'incomplete'
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_classVarianceAuthority","require","progressSegmentedVariants","exports","cva","segmentVariants","variants","state","complete","incomplete","inprogress","defaultVariants"],"sourceRoot":"../../../../src","sources":["components/ProgressSegmented/styles.ts"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,OAAA;AAEO,MAAMC,yBAAyB,GAAAC,OAAA,CAAAD,yBAAA,GAAG,IAAAE,2BAAG,EAAC,CAAC,+CAA+C,CAAC,CAAC;AAExF,MAAMC,eAAe,GAAAF,OAAA,CAAAE,eAAA,GAAG,IAAAD,2BAAG,EAAC,CAAC,YAAY,CAAC,EAAE;EACjDE,QAAQ,EAAE;IACRC,KAAK,EAAE;MACLC,QAAQ,EAAE,0BAA0B;MACpCC,UAAU,EAAE,wBAAwB;MACpCC,UAAU,EACR;IACJ;EACF,CAAC;EACDC,eAAe,EAAE;IACfJ,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SelectTriggerHost = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
/** Native: `Pressable`. Web: `SelectTriggerHost.web` uses `<button>` so `<label htmlFor>` works. */
|
|
9
|
+
const SelectTriggerHost = exports.SelectTriggerHost = _reactNative.Pressable;
|
|
10
|
+
//# sourceMappingURL=SelectTriggerHost.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","SelectTriggerHost","exports","Pressable"],"sourceRoot":"../../../../src","sources":["components/Select/SelectTriggerHost.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA;AACO,MAAMC,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAGE,sBAAS","ignoreList":[]}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SelectTriggerHost = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
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); }
|
|
11
|
+
/** Props that must not be forwarded to a DOM `<button>`. */
|
|
12
|
+
const OMIT = new Set(['hitSlop', 'pressRetentionOffset', 'android_ripple', 'android_disableSound', 'unstable_pressDelay', 'onLongPress', 'delayLongPress', 'onPress', 'onPressIn', 'onPressOut', 'onHoverIn', 'onHoverOut', 'disabled', 'style', 'className', 'testID', 'children', 'accessible', 'accessibilityActions', 'accessibilityElementsHidden', 'accessibilityHint', 'accessibilityIgnoresInvertColors', 'accessibilityLabel', 'accessibilityLabelledBy', 'accessibilityLiveRegion', 'accessibilityRole', 'accessibilityState', 'accessibilityValue', 'accessibilityViewIsModal', 'importantForAccessibility', 'needsOffscreenAlphaCompositing', 'collapsable', 'shouldRasterizeIOS', 'removeClippedSubviews', 'onAccessibilityAction', 'onAccessibilityEscape', 'onAccessibilityTap']);
|
|
13
|
+
function resolveChildren(children) {
|
|
14
|
+
if (typeof children === 'function') {
|
|
15
|
+
return children({
|
|
16
|
+
pressed: false
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return children;
|
|
20
|
+
}
|
|
21
|
+
function filterDomProps(rest) {
|
|
22
|
+
const entries = Object.entries(rest).filter(([key]) => !OMIT.has(key));
|
|
23
|
+
return Object.fromEntries(entries);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** UA `<button>` defaults (centered text, inline sizing) fight our flex + `justify-between` layout. */
|
|
27
|
+
const webButtonLayoutStyle = {
|
|
28
|
+
display: 'flex',
|
|
29
|
+
flexDirection: 'row',
|
|
30
|
+
alignItems: 'center',
|
|
31
|
+
justifyContent: 'space-between',
|
|
32
|
+
width: '100%',
|
|
33
|
+
minWidth: 0,
|
|
34
|
+
textAlign: 'start',
|
|
35
|
+
boxSizing: 'border-box',
|
|
36
|
+
margin: 0,
|
|
37
|
+
font: 'inherit',
|
|
38
|
+
lineHeight: 'normal',
|
|
39
|
+
WebkitAppearance: 'none',
|
|
40
|
+
appearance: 'none'
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Native `<button type="button">` so the trigger is HTML-labelable (`<label htmlFor>` focuses it).
|
|
45
|
+
* `Pressable` on web is a non-labelable div; no extra refs are needed for label association.
|
|
46
|
+
*/
|
|
47
|
+
const SelectTriggerHost = exports.SelectTriggerHost = /*#__PURE__*/(0, _react.forwardRef)(function SelectTriggerHost(props, ref) {
|
|
48
|
+
const {
|
|
49
|
+
children,
|
|
50
|
+
onPress,
|
|
51
|
+
onPressIn,
|
|
52
|
+
onPressOut,
|
|
53
|
+
onHoverIn,
|
|
54
|
+
onHoverOut,
|
|
55
|
+
disabled,
|
|
56
|
+
style,
|
|
57
|
+
className,
|
|
58
|
+
testID,
|
|
59
|
+
...rest
|
|
60
|
+
} = props;
|
|
61
|
+
const domProps = filterDomProps(rest);
|
|
62
|
+
const flattened = _reactNative.StyleSheet.flatten(style);
|
|
63
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
64
|
+
ref: ref,
|
|
65
|
+
...domProps,
|
|
66
|
+
type: "button",
|
|
67
|
+
disabled: !!disabled,
|
|
68
|
+
className: typeof className === 'string' ? className : undefined,
|
|
69
|
+
style: {
|
|
70
|
+
...webButtonLayoutStyle,
|
|
71
|
+
...(flattened ?? {})
|
|
72
|
+
},
|
|
73
|
+
"data-testid": testID,
|
|
74
|
+
onClick: e => {
|
|
75
|
+
if (!disabled) {
|
|
76
|
+
onPress?.(e);
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
onPointerDown: e => {
|
|
80
|
+
onPressIn?.(e);
|
|
81
|
+
},
|
|
82
|
+
onPointerUp: e => {
|
|
83
|
+
onPressOut?.(e);
|
|
84
|
+
},
|
|
85
|
+
onPointerCancel: e => {
|
|
86
|
+
onPressOut?.(e);
|
|
87
|
+
},
|
|
88
|
+
onMouseEnter: e => {
|
|
89
|
+
onHoverIn?.(e);
|
|
90
|
+
},
|
|
91
|
+
onMouseLeave: e => {
|
|
92
|
+
onHoverOut?.(e);
|
|
93
|
+
},
|
|
94
|
+
children: resolveChildren(children)
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
SelectTriggerHost.displayName = 'SelectTriggerHost';
|
|
98
|
+
//# sourceMappingURL=SelectTriggerHost.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","OMIT","Set","resolveChildren","children","pressed","filterDomProps","rest","entries","filter","key","fromEntries","webButtonLayoutStyle","display","flexDirection","alignItems","justifyContent","width","minWidth","textAlign","boxSizing","margin","font","lineHeight","WebkitAppearance","appearance","SelectTriggerHost","exports","forwardRef","props","ref","onPress","onPressIn","onPressOut","onHoverIn","onHoverOut","disabled","style","className","testID","domProps","flattened","StyleSheet","flatten","jsx","type","undefined","onClick","onPointerDown","onPointerUp","onPointerCancel","onMouseEnter","onMouseLeave","displayName"],"sourceRoot":"../../../../src","sources":["components/Select/SelectTriggerHost.web.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAA0C,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,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,IA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tF,CAAE;IACFmE,WAAW,EAAGnE,CAAC,IAAK;MAClBmD,UAAU,GAAGnD,CAAwE,CAAC;IACxF,CAAE;IACFoE,eAAe,EAAGpE,CAAC,IAAK;MACtBmD,UAAU,GAAGnD,CAAwE,CAAC;IACxF,CAAE;IACFqE,YAAY,EAAGrE,CAAC,IAAK;MACnBoD,SAAS,GAAGpD,CAAuE,CAAC;IACtF,CAAE;IACFsE,YAAY,EAAGtE,CAAC,IAAK;MACnBqD,UAAU,GAAGrD,CAAwE,CAAC;IACxF,CAAE;IAAAsB,QAAA,EAEDD,eAAe,CAACC,QAAQ;EAAC,CACpB,CAAC;AAEb,CACF,CAAC;AAEDsB,iBAAiB,CAAC2B,WAAW,GAAG,mBAAmB","ignoreList":[]}
|
|
@@ -6,8 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.Select = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
+
var _icons = require("@cdx-ui/icons");
|
|
9
10
|
var _primitives = require("@cdx-ui/primitives");
|
|
10
11
|
var _utils = require("@cdx-ui/utils");
|
|
12
|
+
var _Icon = require("../Icon");
|
|
13
|
+
var _SelectTriggerHost = require("./SelectTriggerHost");
|
|
11
14
|
var _styles = require("./styles");
|
|
12
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
16
|
const SCOPE = 'SELECT';
|
|
@@ -15,7 +18,7 @@ const Root = (0, _utils.withStyleContext)(_reactNative.View, SCOPE);
|
|
|
15
18
|
const useSelectStyleContext = () => (0, _utils.useStyleContext)(SCOPE);
|
|
16
19
|
const SelectPrimitive = (0, _primitives.createSelect)({
|
|
17
20
|
Root,
|
|
18
|
-
Trigger:
|
|
21
|
+
Trigger: _SelectTriggerHost.SelectTriggerHost,
|
|
19
22
|
Value: _reactNative.Text,
|
|
20
23
|
Icon: _reactNative.View,
|
|
21
24
|
Content: _reactNative.View,
|
|
@@ -29,7 +32,7 @@ const SelectPrimitive = (0, _primitives.createSelect)({
|
|
|
29
32
|
|
|
30
33
|
const SelectRoot = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
31
34
|
variant = 'outline',
|
|
32
|
-
size = '
|
|
35
|
+
size = 'default',
|
|
33
36
|
className,
|
|
34
37
|
children,
|
|
35
38
|
style,
|
|
@@ -67,12 +70,14 @@ const SelectTrigger = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
67
70
|
variant,
|
|
68
71
|
size
|
|
69
72
|
}), className);
|
|
70
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
73
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(SelectPrimitive.Trigger, {
|
|
71
74
|
ref: ref,
|
|
72
75
|
className: computedClassName,
|
|
73
76
|
style: style,
|
|
74
77
|
...props,
|
|
75
|
-
children: children
|
|
78
|
+
children: [children, /*#__PURE__*/(0, _jsxRuntime.jsx)(SelectIcon, {
|
|
79
|
+
as: _icons.ArrowDropDown
|
|
80
|
+
})]
|
|
76
81
|
});
|
|
77
82
|
});
|
|
78
83
|
SelectTrigger.displayName = 'Select.Trigger';
|
|
@@ -87,11 +92,9 @@ const SelectValue = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
87
92
|
...props
|
|
88
93
|
}, ref) => {
|
|
89
94
|
const {
|
|
90
|
-
variant,
|
|
91
95
|
size
|
|
92
96
|
} = useSelectStyleContext();
|
|
93
97
|
const computedClassName = (0, _utils.cn)((0, _styles.selectValueVariants)({
|
|
94
|
-
variant,
|
|
95
98
|
size
|
|
96
99
|
}), className);
|
|
97
100
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(SelectPrimitive.Value, {
|
|
@@ -107,26 +110,23 @@ SelectValue.displayName = 'Select.Value';
|
|
|
107
110
|
// STYLED ICON COMPONENT
|
|
108
111
|
// =============================================================================
|
|
109
112
|
|
|
110
|
-
const SelectIcon =
|
|
113
|
+
const SelectIcon = ({
|
|
111
114
|
className,
|
|
112
115
|
style,
|
|
113
116
|
...props
|
|
114
|
-
}
|
|
117
|
+
}) => {
|
|
115
118
|
const {
|
|
116
|
-
variant,
|
|
117
119
|
size
|
|
118
120
|
} = useSelectStyleContext();
|
|
119
121
|
const computedClassName = (0, _utils.cn)((0, _styles.selectIconVariants)({
|
|
120
|
-
variant,
|
|
121
122
|
size
|
|
122
123
|
}), className);
|
|
123
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
124
|
-
ref: ref,
|
|
124
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
125
125
|
className: computedClassName,
|
|
126
126
|
style: style,
|
|
127
127
|
...props
|
|
128
128
|
});
|
|
129
|
-
}
|
|
129
|
+
};
|
|
130
130
|
SelectIcon.displayName = 'Select.Icon';
|
|
131
131
|
|
|
132
132
|
// =============================================================================
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_primitives","_utils","_styles","_jsxRuntime","SCOPE","Root","withStyleContext","View","useSelectStyleContext","useStyleContext","SelectPrimitive","createSelect","Trigger","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_icons","_primitives","_utils","_Icon","_SelectTriggerHost","_styles","_jsxRuntime","SCOPE","Root","withStyleContext","View","useSelectStyleContext","useStyleContext","SelectPrimitive","createSelect","Trigger","SelectTriggerHost","Value","Text","Icon","Content","Item","Pressable","ItemLabel","SelectRoot","forwardRef","variant","size","className","children","style","props","ref","jsx","context","displayName","SelectTrigger","computedClassName","cn","selectTriggerVariants","jsxs","SelectIcon","as","ArrowDropDown","SelectValue","selectValueVariants","selectIconVariants","SelectContent","selectContentVariants","SelectItem","selectItemVariants","SelectItemLabel","selectItemLabelVariants","Select","exports","Object","assign"],"sourceRoot":"../../../../src","sources":["components/Select/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,WAA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