@cdx-ui/components 0.0.1-alpha.9 → 0.0.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -2
- package/lib/commonjs/components/AlertDialog/index.js +117 -0
- package/lib/commonjs/components/AlertDialog/index.js.map +1 -0
- package/lib/commonjs/components/Avatar/index.js +156 -0
- package/lib/commonjs/components/Avatar/index.js.map +1 -0
- package/lib/commonjs/components/Avatar/styles.js +80 -0
- package/lib/commonjs/components/Avatar/styles.js.map +1 -0
- package/lib/commonjs/components/BottomSheet/index.js +248 -0
- package/lib/commonjs/components/BottomSheet/index.js.map +1 -0
- package/lib/commonjs/components/BottomSheet/styles.js +61 -0
- package/lib/commonjs/components/BottomSheet/styles.js.map +1 -0
- package/lib/commonjs/components/Box/Box.js +1 -0
- package/lib/commonjs/components/Box/Box.js.map +1 -1
- package/lib/commonjs/components/Button/index.js +20 -9
- package/lib/commonjs/components/Button/index.js.map +1 -1
- package/lib/commonjs/components/Button/styles.js +182 -163
- package/lib/commonjs/components/Button/styles.js.map +1 -1
- package/lib/commonjs/components/Card/index.js +104 -0
- package/lib/commonjs/components/Card/index.js.map +1 -0
- package/lib/commonjs/components/Card/styles.js +28 -0
- package/lib/commonjs/components/Card/styles.js.map +1 -0
- package/lib/commonjs/components/Checkbox/index.js +18 -11
- package/lib/commonjs/components/Checkbox/index.js.map +1 -1
- package/lib/commonjs/components/Checkbox/styles.js +17 -16
- package/lib/commonjs/components/Checkbox/styles.js.map +1 -1
- package/lib/commonjs/components/Chip/index.js +103 -0
- package/lib/commonjs/components/Chip/index.js.map +1 -0
- package/lib/commonjs/components/Chip/styles.js +52 -0
- package/lib/commonjs/components/Chip/styles.js.map +1 -0
- package/lib/commonjs/components/Dialog/index.js +275 -0
- package/lib/commonjs/components/Dialog/index.js.map +1 -0
- package/lib/commonjs/components/Dialog/styles.js +63 -0
- package/lib/commonjs/components/Dialog/styles.js.map +1 -0
- package/lib/commonjs/components/Field/FieldLabel.js +33 -0
- package/lib/commonjs/components/Field/FieldLabel.js.map +1 -0
- package/lib/commonjs/components/Field/FieldLabel.web.js +22 -0
- package/lib/commonjs/components/Field/FieldLabel.web.js.map +1 -0
- package/lib/commonjs/components/Field/index.js +158 -0
- package/lib/commonjs/components/Field/index.js.map +1 -0
- package/lib/commonjs/components/Field/styles.js +16 -0
- package/lib/commonjs/components/Field/styles.js.map +1 -0
- package/lib/commonjs/components/Form/FormRoot.js +25 -0
- package/lib/commonjs/components/Form/FormRoot.js.map +1 -0
- package/lib/commonjs/components/Form/FormRoot.web.js +17 -0
- package/lib/commonjs/components/Form/FormRoot.web.js.map +1 -0
- package/lib/commonjs/components/Form/index.js +48 -0
- package/lib/commonjs/components/Form/index.js.map +1 -0
- package/lib/commonjs/components/Form/styles.js +9 -0
- package/lib/commonjs/components/Form/styles.js.map +1 -0
- package/lib/commonjs/components/Heading/index.js +35 -0
- package/lib/commonjs/components/Heading/index.js.map +1 -0
- package/lib/commonjs/components/Heading/styles.js +23 -0
- package/lib/commonjs/components/Heading/styles.js.map +1 -0
- package/lib/commonjs/components/Icon/index.js +61 -0
- package/lib/commonjs/components/Icon/index.js.map +1 -0
- package/lib/commonjs/components/IconButton/index.js +75 -0
- package/lib/commonjs/components/IconButton/index.js.map +1 -0
- package/lib/commonjs/components/IconButton/styles.js +44 -0
- package/lib/commonjs/components/IconButton/styles.js.map +1 -0
- package/lib/commonjs/components/Image/Image.js +69 -0
- package/lib/commonjs/components/Image/Image.js.map +1 -0
- package/lib/commonjs/components/Image/index.js +13 -0
- package/lib/commonjs/components/Image/index.js.map +1 -0
- package/lib/commonjs/components/Input/BaseInput.android.js +20 -0
- package/lib/commonjs/components/Input/BaseInput.android.js.map +1 -0
- package/lib/commonjs/components/Input/index.js +10 -16
- package/lib/commonjs/components/Input/index.js.map +1 -1
- package/lib/commonjs/components/Input/styles.js +17 -30
- package/lib/commonjs/components/Input/styles.js.map +1 -1
- package/lib/commonjs/components/Link/index.js +94 -0
- package/lib/commonjs/components/Link/index.js.map +1 -0
- package/lib/commonjs/components/Link/styles.js +14 -0
- package/lib/commonjs/components/Link/styles.js.map +1 -0
- package/lib/commonjs/components/OtpInput/index.js +83 -0
- package/lib/commonjs/components/OtpInput/index.js.map +1 -0
- package/lib/commonjs/components/OtpInput/styles.js +48 -0
- package/lib/commonjs/components/OtpInput/styles.js.map +1 -0
- package/lib/commonjs/components/ProgressBar/index.js +45 -0
- package/lib/commonjs/components/ProgressBar/index.js.map +1 -0
- package/lib/commonjs/components/ProgressBar/styles.js +10 -0
- package/lib/commonjs/components/ProgressBar/styles.js.map +1 -0
- package/lib/commonjs/components/ProgressSegmented/index.js +62 -0
- package/lib/commonjs/components/ProgressSegmented/index.js.map +1 -0
- package/lib/commonjs/components/ProgressSegmented/styles.js +21 -0
- package/lib/commonjs/components/ProgressSegmented/styles.js.map +1 -0
- package/lib/commonjs/components/Select/SelectTriggerHost.js +10 -0
- package/lib/commonjs/components/Select/SelectTriggerHost.js.map +1 -0
- package/lib/commonjs/components/Select/SelectTriggerHost.web.js +98 -0
- package/lib/commonjs/components/Select/SelectTriggerHost.web.js.map +1 -0
- package/lib/commonjs/components/Select/index.js +13 -13
- package/lib/commonjs/components/Select/index.js.map +1 -1
- package/lib/commonjs/components/Select/styles.js +29 -53
- package/lib/commonjs/components/Select/styles.js.map +1 -1
- package/lib/commonjs/components/Stack/HStack.js +8 -21
- package/lib/commonjs/components/Stack/HStack.js.map +1 -1
- package/lib/commonjs/components/Stack/VStack.js +8 -21
- package/lib/commonjs/components/Stack/VStack.js.map +1 -1
- package/lib/commonjs/components/Stack/styles.js +44 -0
- package/lib/commonjs/components/Stack/styles.js.map +1 -0
- package/lib/commonjs/components/Text/index.js +18 -9
- package/lib/commonjs/components/Text/index.js.map +1 -1
- package/lib/commonjs/components/Text/styles.js +23 -0
- package/lib/commonjs/components/Text/styles.js.map +1 -0
- package/lib/commonjs/components/VirtualizedList/index.js +19 -0
- package/lib/commonjs/components/VirtualizedList/index.js.map +1 -0
- package/lib/commonjs/components/index.js +204 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/index.js +40 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/styles/index.js +17 -0
- package/lib/commonjs/styles/index.js.map +1 -0
- package/lib/commonjs/styles/primitives.js +123 -0
- package/lib/commonjs/styles/primitives.js.map +1 -0
- package/lib/module/components/AlertDialog/index.js +112 -0
- package/lib/module/components/AlertDialog/index.js.map +1 -0
- package/lib/module/components/Avatar/index.js +152 -0
- package/lib/module/components/Avatar/index.js.map +1 -0
- package/lib/module/components/Avatar/styles.js +77 -0
- package/lib/module/components/Avatar/styles.js.map +1 -0
- package/lib/module/components/BottomSheet/index.js +242 -0
- package/lib/module/components/BottomSheet/index.js.map +1 -0
- package/lib/module/components/BottomSheet/styles.js +58 -0
- package/lib/module/components/BottomSheet/styles.js.map +1 -0
- package/lib/module/components/Box/Box.js +1 -0
- package/lib/module/components/Box/Box.js.map +1 -1
- package/lib/module/components/Button/index.js +21 -10
- package/lib/module/components/Button/index.js.map +1 -1
- package/lib/module/components/Button/styles.js +181 -162
- package/lib/module/components/Button/styles.js.map +1 -1
- package/lib/module/components/Card/index.js +100 -0
- package/lib/module/components/Card/index.js.map +1 -0
- package/lib/module/components/Card/styles.js +25 -0
- package/lib/module/components/Card/styles.js.map +1 -0
- package/lib/module/components/Checkbox/index.js +19 -12
- package/lib/module/components/Checkbox/index.js.map +1 -1
- package/lib/module/components/Checkbox/styles.js +17 -16
- package/lib/module/components/Checkbox/styles.js.map +1 -1
- package/lib/module/components/Chip/index.js +99 -0
- package/lib/module/components/Chip/index.js.map +1 -0
- package/lib/module/components/Chip/styles.js +48 -0
- package/lib/module/components/Chip/styles.js.map +1 -0
- package/lib/module/components/Dialog/index.js +267 -0
- package/lib/module/components/Dialog/index.js.map +1 -0
- package/lib/module/components/Dialog/styles.js +60 -0
- package/lib/module/components/Dialog/styles.js.map +1 -0
- package/lib/module/components/Field/FieldLabel.js +29 -0
- package/lib/module/components/Field/FieldLabel.js.map +1 -0
- package/lib/module/components/Field/FieldLabel.web.js +17 -0
- package/lib/module/components/Field/FieldLabel.web.js.map +1 -0
- package/lib/module/components/Field/index.js +155 -0
- package/lib/module/components/Field/index.js.map +1 -0
- package/lib/module/components/Field/styles.js +12 -0
- package/lib/module/components/Field/styles.js.map +1 -0
- package/lib/module/components/Form/FormRoot.js +21 -0
- package/lib/module/components/Form/FormRoot.js.map +1 -0
- package/lib/module/components/Form/FormRoot.web.js +12 -0
- package/lib/module/components/Form/FormRoot.web.js.map +1 -0
- package/lib/module/components/Form/index.js +44 -0
- package/lib/module/components/Form/index.js.map +1 -0
- package/lib/module/components/Form/styles.js +5 -0
- package/lib/module/components/Form/styles.js.map +1 -0
- package/lib/module/components/Heading/index.js +31 -0
- package/lib/module/components/Heading/index.js.map +1 -0
- package/lib/module/components/Heading/styles.js +19 -0
- package/lib/module/components/Heading/styles.js.map +1 -0
- package/lib/module/components/Icon/index.js +57 -0
- package/lib/module/components/Icon/index.js.map +1 -0
- package/lib/module/components/IconButton/index.js +71 -0
- package/lib/module/components/IconButton/index.js.map +1 -0
- package/lib/module/components/IconButton/styles.js +40 -0
- package/lib/module/components/IconButton/styles.js.map +1 -0
- package/lib/module/components/Image/Image.js +67 -0
- package/lib/module/components/Image/Image.js.map +1 -0
- package/lib/module/components/Image/index.js +4 -0
- package/lib/module/components/Image/index.js.map +1 -0
- package/lib/module/components/Input/BaseInput.android.js +16 -0
- package/lib/module/components/Input/BaseInput.android.js.map +1 -0
- package/lib/module/components/Input/index.js +10 -16
- package/lib/module/components/Input/index.js.map +1 -1
- package/lib/module/components/Input/styles.js +17 -30
- package/lib/module/components/Input/styles.js.map +1 -1
- package/lib/module/components/Link/index.js +85 -0
- package/lib/module/components/Link/index.js.map +1 -0
- package/lib/module/components/Link/styles.js +11 -0
- package/lib/module/components/Link/styles.js.map +1 -0
- package/lib/module/components/OtpInput/index.js +79 -0
- package/lib/module/components/OtpInput/index.js.map +1 -0
- package/lib/module/components/OtpInput/styles.js +44 -0
- package/lib/module/components/OtpInput/styles.js.map +1 -0
- package/lib/module/components/ProgressBar/index.js +41 -0
- package/lib/module/components/ProgressBar/index.js.map +1 -0
- package/lib/module/components/ProgressBar/styles.js +6 -0
- package/lib/module/components/ProgressBar/styles.js.map +1 -0
- package/lib/module/components/ProgressSegmented/index.js +58 -0
- package/lib/module/components/ProgressSegmented/index.js.map +1 -0
- package/lib/module/components/ProgressSegmented/styles.js +17 -0
- package/lib/module/components/ProgressSegmented/styles.js.map +1 -0
- package/lib/module/components/Select/SelectTriggerHost.js +7 -0
- package/lib/module/components/Select/SelectTriggerHost.js.map +1 -0
- package/lib/module/components/Select/SelectTriggerHost.web.js +93 -0
- package/lib/module/components/Select/SelectTriggerHost.web.js.map +1 -0
- package/lib/module/components/Select/index.js +14 -14
- package/lib/module/components/Select/index.js.map +1 -1
- package/lib/module/components/Select/styles.js +29 -53
- package/lib/module/components/Select/styles.js.map +1 -1
- package/lib/module/components/Stack/HStack.js +8 -21
- package/lib/module/components/Stack/HStack.js.map +1 -1
- package/lib/module/components/Stack/VStack.js +8 -21
- package/lib/module/components/Stack/VStack.js.map +1 -1
- package/lib/module/components/Stack/styles.js +40 -0
- package/lib/module/components/Stack/styles.js.map +1 -0
- package/lib/module/components/Text/index.js +19 -1
- package/lib/module/components/Text/index.js.map +1 -1
- package/lib/module/components/Text/styles.js +19 -0
- package/lib/module/components/Text/styles.js.map +1 -0
- package/lib/module/components/VirtualizedList/index.js +15 -0
- package/lib/module/components/VirtualizedList/index.js.map +1 -0
- package/lib/module/components/index.js +17 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/styles/index.js +4 -0
- package/lib/module/styles/index.js.map +1 -0
- package/lib/module/styles/primitives.js +119 -0
- package/lib/module/styles/primitives.js.map +1 -0
- package/lib/typescript/components/AlertDialog/index.d.ts +30 -0
- package/lib/typescript/components/AlertDialog/index.d.ts.map +1 -0
- package/lib/typescript/components/Avatar/index.d.ts +40 -0
- package/lib/typescript/components/Avatar/index.d.ts.map +1 -0
- package/lib/typescript/components/Avatar/styles.d.ts +16 -0
- package/lib/typescript/components/Avatar/styles.d.ts.map +1 -0
- package/lib/typescript/components/BottomSheet/index.d.ts +61 -0
- package/lib/typescript/components/BottomSheet/index.d.ts.map +1 -0
- package/lib/typescript/components/BottomSheet/styles.d.ts +16 -0
- package/lib/typescript/components/BottomSheet/styles.d.ts.map +1 -0
- package/lib/typescript/components/Box/Box.d.ts +1 -0
- package/lib/typescript/components/Box/Box.d.ts.map +1 -1
- package/lib/typescript/components/Button/index.d.ts +6 -3
- package/lib/typescript/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/components/Button/styles.d.ts +11 -8
- package/lib/typescript/components/Button/styles.d.ts.map +1 -1
- package/lib/typescript/components/Card/index.d.ts +30 -0
- package/lib/typescript/components/Card/index.d.ts.map +1 -0
- package/lib/typescript/components/Card/styles.d.ts +6 -0
- package/lib/typescript/components/Card/styles.d.ts.map +1 -0
- package/lib/typescript/components/Checkbox/index.d.ts +7 -5
- package/lib/typescript/components/Checkbox/index.d.ts.map +1 -1
- package/lib/typescript/components/Checkbox/styles.d.ts +4 -4
- package/lib/typescript/components/Checkbox/styles.d.ts.map +1 -1
- package/lib/typescript/components/Chip/index.d.ts +27 -0
- package/lib/typescript/components/Chip/index.d.ts.map +1 -0
- package/lib/typescript/components/Chip/styles.d.ts +12 -0
- package/lib/typescript/components/Chip/styles.d.ts.map +1 -0
- package/lib/typescript/components/Dialog/index.d.ts +61 -0
- package/lib/typescript/components/Dialog/index.d.ts.map +1 -0
- package/lib/typescript/components/Dialog/styles.d.ts +14 -0
- package/lib/typescript/components/Dialog/styles.d.ts.map +1 -0
- package/lib/typescript/components/Field/FieldLabel.d.ts +18 -0
- package/lib/typescript/components/Field/FieldLabel.d.ts.map +1 -0
- package/lib/typescript/components/Field/FieldLabel.web.d.ts +16 -0
- package/lib/typescript/components/Field/FieldLabel.web.d.ts.map +1 -0
- package/lib/typescript/components/Field/index.d.ts +26 -0
- package/lib/typescript/components/Field/index.d.ts.map +1 -0
- package/lib/typescript/components/Field/styles.d.ts +16 -0
- package/lib/typescript/components/Field/styles.d.ts.map +1 -0
- package/lib/typescript/components/Form/FormRoot.d.ts +14 -0
- package/lib/typescript/components/Form/FormRoot.d.ts.map +1 -0
- package/lib/typescript/components/Form/FormRoot.web.d.ts +10 -0
- package/lib/typescript/components/Form/FormRoot.web.d.ts.map +1 -0
- package/lib/typescript/components/Form/index.d.ts +7 -0
- package/lib/typescript/components/Form/index.d.ts.map +1 -0
- package/lib/typescript/components/Form/styles.d.ts +2 -0
- package/lib/typescript/components/Form/styles.d.ts.map +1 -0
- package/lib/typescript/components/Heading/index.d.ts +10 -0
- package/lib/typescript/components/Heading/index.d.ts.map +1 -0
- package/lib/typescript/components/Heading/styles.d.ts +6 -0
- package/lib/typescript/components/Heading/styles.d.ts.map +1 -0
- package/lib/typescript/components/Icon/index.d.ts +27 -0
- package/lib/typescript/components/Icon/index.d.ts.map +1 -0
- package/lib/typescript/components/IconButton/index.d.ts +15 -0
- package/lib/typescript/components/IconButton/index.d.ts.map +1 -0
- package/lib/typescript/components/IconButton/styles.d.ts +11 -0
- package/lib/typescript/components/IconButton/styles.d.ts.map +1 -0
- package/lib/typescript/components/Image/Image.d.ts +47 -0
- package/lib/typescript/components/Image/Image.d.ts.map +1 -0
- package/lib/typescript/components/Image/index.d.ts +2 -0
- package/lib/typescript/components/Image/index.d.ts.map +1 -0
- package/lib/typescript/components/Input/BaseInput.android.d.ts +3 -0
- package/lib/typescript/components/Input/BaseInput.android.d.ts.map +1 -0
- package/lib/typescript/components/Input/index.d.ts +7 -5
- package/lib/typescript/components/Input/index.d.ts.map +1 -1
- package/lib/typescript/components/Input/styles.d.ts +5 -7
- package/lib/typescript/components/Input/styles.d.ts.map +1 -1
- package/lib/typescript/components/Link/index.d.ts +26 -0
- package/lib/typescript/components/Link/index.d.ts.map +1 -0
- package/lib/typescript/components/Link/styles.d.ts +6 -0
- package/lib/typescript/components/Link/styles.d.ts.map +1 -0
- package/lib/typescript/components/OtpInput/index.d.ts +11 -0
- package/lib/typescript/components/OtpInput/index.d.ts.map +1 -0
- package/lib/typescript/components/OtpInput/styles.d.ts +14 -0
- package/lib/typescript/components/OtpInput/styles.d.ts.map +1 -0
- package/lib/typescript/components/ProgressBar/index.d.ts +17 -0
- package/lib/typescript/components/ProgressBar/index.d.ts.map +1 -0
- package/lib/typescript/components/ProgressBar/styles.d.ts +5 -0
- package/lib/typescript/components/ProgressBar/styles.d.ts.map +1 -0
- package/lib/typescript/components/ProgressSegmented/index.d.ts +15 -0
- package/lib/typescript/components/ProgressSegmented/index.d.ts.map +1 -0
- package/lib/typescript/components/ProgressSegmented/styles.d.ts +8 -0
- package/lib/typescript/components/ProgressSegmented/styles.d.ts.map +1 -0
- package/lib/typescript/components/Select/SelectTriggerHost.d.ts +3 -0
- package/lib/typescript/components/Select/SelectTriggerHost.d.ts.map +1 -0
- package/lib/typescript/components/Select/SelectTriggerHost.web.d.ts +13 -0
- package/lib/typescript/components/Select/SelectTriggerHost.web.d.ts.map +1 -0
- package/lib/typescript/components/Select/index.d.ts +7 -4
- package/lib/typescript/components/Select/index.d.ts.map +1 -1
- package/lib/typescript/components/Select/styles.d.ts +6 -8
- package/lib/typescript/components/Select/styles.d.ts.map +1 -1
- package/lib/typescript/components/Stack/HStack.d.ts +1 -12
- package/lib/typescript/components/Stack/HStack.d.ts.map +1 -1
- package/lib/typescript/components/Stack/VStack.d.ts +1 -12
- package/lib/typescript/components/Stack/VStack.d.ts.map +1 -1
- package/lib/typescript/components/Stack/styles.d.ts +23 -0
- package/lib/typescript/components/Stack/styles.d.ts.map +1 -0
- package/lib/typescript/components/Switch/index.d.ts +0 -1
- package/lib/typescript/components/Switch/index.d.ts.map +1 -1
- package/lib/typescript/components/Text/index.d.ts +9 -1
- package/lib/typescript/components/Text/index.d.ts.map +1 -1
- package/lib/typescript/components/Text/styles.d.ts +6 -0
- package/lib/typescript/components/Text/styles.d.ts.map +1 -0
- package/lib/typescript/components/VirtualizedList/index.d.ts +8 -0
- package/lib/typescript/components/VirtualizedList/index.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +17 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +3 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/styles/index.d.ts +2 -0
- package/lib/typescript/styles/index.d.ts.map +1 -0
- package/lib/typescript/styles/primitives.d.ts +85 -0
- package/lib/typescript/styles/primitives.d.ts.map +1 -0
- package/package.json +15 -6
- package/src/components/AlertDialog/index.tsx +124 -0
- package/src/components/Avatar/index.tsx +172 -0
- package/src/components/Avatar/styles.ts +83 -0
- package/src/components/BottomSheet/index.tsx +316 -0
- package/src/components/BottomSheet/styles.ts +79 -0
- package/src/components/Box/Box.tsx +1 -0
- package/src/components/Button/index.tsx +14 -9
- package/src/components/Button/styles.ts +159 -209
- package/src/components/Card/index.tsx +115 -0
- package/src/components/Card/styles.ts +41 -0
- package/src/components/Checkbox/index.tsx +15 -23
- package/src/components/Checkbox/styles.ts +33 -24
- package/src/components/Chip/index.tsx +91 -0
- package/src/components/Chip/styles.ts +52 -0
- package/src/components/Dialog/index.tsx +304 -0
- package/src/components/Dialog/styles.ts +88 -0
- package/src/components/Field/FieldLabel.tsx +33 -0
- package/src/components/Field/FieldLabel.web.tsx +25 -0
- package/src/components/Field/index.tsx +171 -0
- package/src/components/Field/styles.ts +32 -0
- package/src/components/Form/FormRoot.tsx +20 -0
- package/src/components/Form/FormRoot.web.tsx +12 -0
- package/src/components/Form/index.tsx +38 -0
- package/src/components/Form/styles.ts +3 -0
- package/src/components/Heading/index.tsx +36 -0
- package/src/components/Heading/styles.tsx +25 -0
- package/src/components/Icon/index.tsx +54 -0
- package/src/components/IconButton/index.tsx +92 -0
- package/src/components/IconButton/styles.ts +59 -0
- package/src/components/Image/Image.tsx +77 -0
- package/src/components/Image/index.ts +1 -0
- package/src/components/Input/BaseInput.android.tsx +13 -0
- package/src/components/Input/index.tsx +9 -22
- package/src/components/Input/styles.ts +36 -40
- package/src/components/Link/index.tsx +83 -0
- package/src/components/Link/styles.ts +21 -0
- package/src/components/OtpInput/index.tsx +79 -0
- package/src/components/OtpInput/styles.ts +45 -0
- package/src/components/ProgressBar/index.tsx +53 -0
- package/src/components/ProgressBar/styles.ts +9 -0
- package/src/components/ProgressSegmented/index.tsx +81 -0
- package/src/components/ProgressSegmented/styles.ts +20 -0
- package/src/components/Select/SelectTriggerHost.tsx +4 -0
- package/src/components/Select/SelectTriggerHost.web.tsx +136 -0
- package/src/components/Select/index.tsx +14 -14
- package/src/components/Select/styles.ts +68 -75
- package/src/components/Stack/HStack.tsx +8 -19
- package/src/components/Stack/VStack.tsx +8 -23
- package/src/components/Stack/styles.ts +42 -0
- package/src/components/Switch/index.tsx +0 -2
- package/src/components/Text/index.tsx +16 -0
- package/src/components/Text/styles.tsx +25 -0
- package/src/components/VirtualizedList/index.tsx +19 -0
- package/src/components/index.ts +17 -0
- package/src/index.ts +3 -0
- package/src/styles/index.ts +1 -0
- package/src/styles/primitives.ts +107 -0
- package/lib/commonjs/components/Text/Text.js +0 -30
- package/lib/commonjs/components/Text/Text.js.map +0 -1
- package/lib/module/components/Text/Text.js +0 -26
- package/lib/module/components/Text/Text.js.map +0 -1
- package/lib/typescript/components/Text/Text.d.ts +0 -11
- package/lib/typescript/components/Text/Text.d.ts.map +0 -1
- package/src/components/Text/Text.tsx +0 -58
- package/src/components/Text/index.ts +0 -1
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Dialog = void 0;
|
|
7
|
+
Object.defineProperty(exports, "useDialog", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _primitives.useDialog;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _react = require("react");
|
|
14
|
+
var _reactNative = require("react-native");
|
|
15
|
+
var _icons = require("@cdx-ui/icons");
|
|
16
|
+
var _primitives = require("@cdx-ui/primitives");
|
|
17
|
+
var _utils = require("@cdx-ui/utils");
|
|
18
|
+
var _Icon = require("../Icon");
|
|
19
|
+
var _styles = require("./styles");
|
|
20
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
+
// =============================================================================
|
|
22
|
+
// STYLE CONTEXT
|
|
23
|
+
// =============================================================================
|
|
24
|
+
|
|
25
|
+
const SCOPE = 'DIALOG';
|
|
26
|
+
const Root = (0, _utils.withStyleContext)(_reactNative.View, SCOPE);
|
|
27
|
+
const useDialogStyleContext = () => (0, _utils.useStyleContext)(SCOPE);
|
|
28
|
+
|
|
29
|
+
// =============================================================================
|
|
30
|
+
// STYLED OVERLAY (internal — not consumer-facing)
|
|
31
|
+
// =============================================================================
|
|
32
|
+
|
|
33
|
+
const StyledOverlay = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
34
|
+
className,
|
|
35
|
+
...props
|
|
36
|
+
}, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
37
|
+
ref: ref,
|
|
38
|
+
className: (0, _utils.cn)((0, _styles.dialogOverlayVariants)(), className),
|
|
39
|
+
...props
|
|
40
|
+
}));
|
|
41
|
+
StyledOverlay.displayName = 'Dialog.Overlay';
|
|
42
|
+
|
|
43
|
+
// =============================================================================
|
|
44
|
+
// CREATE DIALOG PRIMITIVE
|
|
45
|
+
// =============================================================================
|
|
46
|
+
|
|
47
|
+
const DialogPrimitive = (0, _primitives.createDialog)({
|
|
48
|
+
Root,
|
|
49
|
+
Trigger: _reactNative.Pressable,
|
|
50
|
+
Overlay: StyledOverlay,
|
|
51
|
+
Content: _reactNative.View,
|
|
52
|
+
Header: _reactNative.View,
|
|
53
|
+
Title: _reactNative.Text,
|
|
54
|
+
Description: _reactNative.Text,
|
|
55
|
+
Body: _reactNative.View,
|
|
56
|
+
Footer: _reactNative.View,
|
|
57
|
+
Close: _reactNative.Pressable
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
// =============================================================================
|
|
61
|
+
// STYLED ROOT
|
|
62
|
+
// =============================================================================
|
|
63
|
+
|
|
64
|
+
const DialogRoot = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
65
|
+
size = 'md',
|
|
66
|
+
className,
|
|
67
|
+
children,
|
|
68
|
+
style,
|
|
69
|
+
...props
|
|
70
|
+
}, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(DialogPrimitive, {
|
|
71
|
+
ref: ref,
|
|
72
|
+
className: className,
|
|
73
|
+
style: style,
|
|
74
|
+
context: {
|
|
75
|
+
size
|
|
76
|
+
},
|
|
77
|
+
...props,
|
|
78
|
+
children: children
|
|
79
|
+
}));
|
|
80
|
+
DialogRoot.displayName = 'Dialog';
|
|
81
|
+
|
|
82
|
+
// =============================================================================
|
|
83
|
+
// STYLED TRIGGER
|
|
84
|
+
// =============================================================================
|
|
85
|
+
|
|
86
|
+
const DialogTrigger = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
87
|
+
className,
|
|
88
|
+
children,
|
|
89
|
+
style,
|
|
90
|
+
...props
|
|
91
|
+
}, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(DialogPrimitive.Trigger, {
|
|
92
|
+
ref: ref,
|
|
93
|
+
className: className,
|
|
94
|
+
style: style,
|
|
95
|
+
...props,
|
|
96
|
+
children: children
|
|
97
|
+
}));
|
|
98
|
+
DialogTrigger.displayName = 'Dialog.Trigger';
|
|
99
|
+
|
|
100
|
+
// =============================================================================
|
|
101
|
+
// STYLED CONTENT
|
|
102
|
+
// =============================================================================
|
|
103
|
+
|
|
104
|
+
const DialogContent = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
105
|
+
size: sizeProp,
|
|
106
|
+
className,
|
|
107
|
+
children,
|
|
108
|
+
style,
|
|
109
|
+
...props
|
|
110
|
+
}, ref) => {
|
|
111
|
+
const {
|
|
112
|
+
size: contextSize
|
|
113
|
+
} = useDialogStyleContext();
|
|
114
|
+
const size = sizeProp ?? contextSize;
|
|
115
|
+
const computedClassName = (0, _utils.cn)((0, _styles.dialogContentVariants)({
|
|
116
|
+
size
|
|
117
|
+
}), className);
|
|
118
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(DialogPrimitive.Content, {
|
|
119
|
+
ref: ref,
|
|
120
|
+
className: computedClassName,
|
|
121
|
+
style: style,
|
|
122
|
+
...props,
|
|
123
|
+
children: children
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
DialogContent.displayName = 'Dialog.Content';
|
|
127
|
+
|
|
128
|
+
// =============================================================================
|
|
129
|
+
// STYLED HEADER
|
|
130
|
+
// =============================================================================
|
|
131
|
+
|
|
132
|
+
const DialogHeader = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
133
|
+
className,
|
|
134
|
+
children,
|
|
135
|
+
style,
|
|
136
|
+
...props
|
|
137
|
+
}, ref) => {
|
|
138
|
+
const computedClassName = (0, _utils.cn)((0, _styles.dialogHeaderVariants)(), className);
|
|
139
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(DialogPrimitive.Header, {
|
|
140
|
+
ref: ref,
|
|
141
|
+
className: computedClassName,
|
|
142
|
+
style: style,
|
|
143
|
+
...props,
|
|
144
|
+
children: children
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
DialogHeader.displayName = 'Dialog.Header';
|
|
148
|
+
|
|
149
|
+
// =============================================================================
|
|
150
|
+
// STYLED TITLE
|
|
151
|
+
// =============================================================================
|
|
152
|
+
|
|
153
|
+
const DialogTitle = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
154
|
+
className,
|
|
155
|
+
children,
|
|
156
|
+
style,
|
|
157
|
+
...props
|
|
158
|
+
}, ref) => {
|
|
159
|
+
const computedClassName = (0, _utils.cn)((0, _styles.dialogTitleVariants)(), className);
|
|
160
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(DialogPrimitive.Title, {
|
|
161
|
+
ref: ref,
|
|
162
|
+
className: computedClassName,
|
|
163
|
+
style: style,
|
|
164
|
+
...props,
|
|
165
|
+
children: children
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
DialogTitle.displayName = 'Dialog.Title';
|
|
169
|
+
|
|
170
|
+
// =============================================================================
|
|
171
|
+
// STYLED DESCRIPTION
|
|
172
|
+
// =============================================================================
|
|
173
|
+
|
|
174
|
+
const DialogDescription = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
175
|
+
className,
|
|
176
|
+
children,
|
|
177
|
+
style,
|
|
178
|
+
...props
|
|
179
|
+
}, ref) => {
|
|
180
|
+
const computedClassName = (0, _utils.cn)((0, _styles.dialogDescriptionVariants)(), className);
|
|
181
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(DialogPrimitive.Description, {
|
|
182
|
+
ref: ref,
|
|
183
|
+
className: computedClassName,
|
|
184
|
+
style: style,
|
|
185
|
+
...props,
|
|
186
|
+
children: children
|
|
187
|
+
});
|
|
188
|
+
});
|
|
189
|
+
DialogDescription.displayName = 'Dialog.Description';
|
|
190
|
+
|
|
191
|
+
// =============================================================================
|
|
192
|
+
// STYLED BODY
|
|
193
|
+
// =============================================================================
|
|
194
|
+
|
|
195
|
+
const DialogBody = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
196
|
+
className,
|
|
197
|
+
children,
|
|
198
|
+
style,
|
|
199
|
+
...props
|
|
200
|
+
}, ref) => {
|
|
201
|
+
const computedClassName = (0, _utils.cn)((0, _styles.dialogBodyVariants)(), className);
|
|
202
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(DialogPrimitive.Body, {
|
|
203
|
+
ref: ref,
|
|
204
|
+
className: computedClassName,
|
|
205
|
+
style: style,
|
|
206
|
+
...props,
|
|
207
|
+
children: children
|
|
208
|
+
});
|
|
209
|
+
});
|
|
210
|
+
DialogBody.displayName = 'Dialog.Body';
|
|
211
|
+
|
|
212
|
+
// =============================================================================
|
|
213
|
+
// STYLED FOOTER
|
|
214
|
+
// =============================================================================
|
|
215
|
+
|
|
216
|
+
const DialogFooter = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
217
|
+
className,
|
|
218
|
+
children,
|
|
219
|
+
style,
|
|
220
|
+
...props
|
|
221
|
+
}, ref) => {
|
|
222
|
+
const computedClassName = (0, _utils.cn)((0, _styles.dialogFooterVariants)(), className);
|
|
223
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(DialogPrimitive.Footer, {
|
|
224
|
+
ref: ref,
|
|
225
|
+
className: computedClassName,
|
|
226
|
+
style: style,
|
|
227
|
+
...props,
|
|
228
|
+
children: children
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
DialogFooter.displayName = 'Dialog.Footer';
|
|
232
|
+
|
|
233
|
+
// =============================================================================
|
|
234
|
+
// STYLED CLOSE
|
|
235
|
+
// =============================================================================
|
|
236
|
+
|
|
237
|
+
const DialogClose = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
238
|
+
className,
|
|
239
|
+
accessibilityLabel = 'Close',
|
|
240
|
+
children,
|
|
241
|
+
style,
|
|
242
|
+
...props
|
|
243
|
+
}, ref) => {
|
|
244
|
+
const computedClassName = (0, _utils.cn)((0, _styles.dialogCloseVariants)(), className);
|
|
245
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(DialogPrimitive.Close, {
|
|
246
|
+
ref: ref,
|
|
247
|
+
className: computedClassName,
|
|
248
|
+
style: style,
|
|
249
|
+
hitSlop: 12,
|
|
250
|
+
accessibilityRole: "button",
|
|
251
|
+
accessibilityLabel: accessibilityLabel,
|
|
252
|
+
...props,
|
|
253
|
+
children: children ?? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
254
|
+
as: _icons.Close,
|
|
255
|
+
className: (0, _styles.dialogCloseIconVariants)()
|
|
256
|
+
})
|
|
257
|
+
});
|
|
258
|
+
});
|
|
259
|
+
DialogClose.displayName = 'Dialog.Close';
|
|
260
|
+
|
|
261
|
+
// =============================================================================
|
|
262
|
+
// COMPOUND COMPONENT
|
|
263
|
+
// =============================================================================
|
|
264
|
+
|
|
265
|
+
const Dialog = exports.Dialog = Object.assign(DialogRoot, {
|
|
266
|
+
Trigger: DialogTrigger,
|
|
267
|
+
Content: DialogContent,
|
|
268
|
+
Header: DialogHeader,
|
|
269
|
+
Title: DialogTitle,
|
|
270
|
+
Description: DialogDescription,
|
|
271
|
+
Body: DialogBody,
|
|
272
|
+
Footer: DialogFooter,
|
|
273
|
+
Close: DialogClose
|
|
274
|
+
});
|
|
275
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_icons","_primitives","_utils","_Icon","_styles","_jsxRuntime","SCOPE","Root","withStyleContext","View","useDialogStyleContext","useStyleContext","StyledOverlay","forwardRef","className","props","ref","jsx","Pressable","cn","dialogOverlayVariants","displayName","DialogPrimitive","createDialog","Trigger","Overlay","Content","Header","Title","Text","Description","Body","Footer","Close","DialogRoot","size","children","style","context","DialogTrigger","DialogContent","sizeProp","contextSize","computedClassName","dialogContentVariants","DialogHeader","dialogHeaderVariants","DialogTitle","dialogTitleVariants","DialogDescription","dialogDescriptionVariants","DialogBody","dialogBodyVariants","DialogFooter","dialogFooterVariants","DialogClose","accessibilityLabel","dialogCloseVariants","hitSlop","accessibilityRole","Icon","as","CloseIcon","dialogCloseIconVariants","Dialog","exports","Object","assign"],"sourceRoot":"../../../../src","sources":["components/Dialog/index.tsx"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAYA,IAAAI,MAA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,YAAY;EACpBjB,KAAK,EAAEmB,WAAW;EAClBjB,WAAW,EAAEmB,iBAAiB;EAC9BlB,IAAI,EAAEoB,UAAU;EAChBnB,MAAM,EAAEqB,YAAY;EACpBpB,KAAK,EAAEsB;AACT,CAAC,CAA4B","ignoreList":[]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.dialogTitleVariants = exports.dialogOverlayVariants = exports.dialogHeaderVariants = exports.dialogFooterVariants = exports.dialogDescriptionVariants = exports.dialogContentVariants = exports.dialogCloseVariants = exports.dialogCloseIconVariants = exports.dialogBodyVariants = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _classVarianceAuthority = require("class-variance-authority");
|
|
9
|
+
var _primitives = require("../../styles/primitives");
|
|
10
|
+
// ── Overlay ─────────────────────────────────────────────────
|
|
11
|
+
|
|
12
|
+
const dialogOverlayVariants = exports.dialogOverlayVariants = (0, _classVarianceAuthority.cva)(['absolute inset-0', _primitives.COLOR_BG_INVERSE, 'opacity-50']);
|
|
13
|
+
|
|
14
|
+
// ── Content ─────────────────────────────────────────────────
|
|
15
|
+
|
|
16
|
+
const dialogContentVariants = exports.dialogContentVariants = (0, _classVarianceAuthority.cva)([_primitives.COLOR_BG_PRIMARY, `border ${_primitives.COLOR_BORDER_DEFAULT}`, _primitives.RADIUS_MD, _reactNative.Platform.select({
|
|
17
|
+
web: _primitives.SHADOW_MD,
|
|
18
|
+
default: ''
|
|
19
|
+
}), 'max-h-[85vh] overflow-hidden'], {
|
|
20
|
+
variants: {
|
|
21
|
+
size: {
|
|
22
|
+
sm: 'w-[90%] max-w-sm',
|
|
23
|
+
md: 'w-[90%] max-w-md',
|
|
24
|
+
lg: 'w-[90%] max-w-lg',
|
|
25
|
+
full: 'w-full mx-4'
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
defaultVariants: {
|
|
29
|
+
size: 'md'
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// ── Header ──────────────────────────────────────────────────
|
|
34
|
+
|
|
35
|
+
const dialogHeaderVariants = exports.dialogHeaderVariants = (0, _classVarianceAuthority.cva)(['flex-row items-center justify-between shrink-0', 'px-6 pt-6 pb-2']);
|
|
36
|
+
|
|
37
|
+
// ── Title ───────────────────────────────────────────────────
|
|
38
|
+
|
|
39
|
+
const dialogTitleVariants = exports.dialogTitleVariants = (0, _classVarianceAuthority.cva)(['text-lg font-semibold', _primitives.COLOR_TEXT_PRIMARY]);
|
|
40
|
+
|
|
41
|
+
// ── Description ─────────────────────────────────────────────
|
|
42
|
+
|
|
43
|
+
const dialogDescriptionVariants = exports.dialogDescriptionVariants = (0, _classVarianceAuthority.cva)(['text-sm mt-1', _primitives.COLOR_TEXT_SECONDARY]);
|
|
44
|
+
|
|
45
|
+
// ── Body ────────────────────────────────────────────────────
|
|
46
|
+
|
|
47
|
+
const dialogBodyVariants = exports.dialogBodyVariants = (0, _classVarianceAuthority.cva)(['px-6 py-4 shrink min-h-0']);
|
|
48
|
+
|
|
49
|
+
// ── Footer ──────────────────────────────────────────────────
|
|
50
|
+
|
|
51
|
+
const dialogFooterVariants = exports.dialogFooterVariants = (0, _classVarianceAuthority.cva)(['flex-row items-center justify-end shrink-0', 'gap-3 px-6 pt-2 pb-6']);
|
|
52
|
+
|
|
53
|
+
// ── Close ───────────────────────────────────────────────────
|
|
54
|
+
|
|
55
|
+
const dialogCloseVariants = exports.dialogCloseVariants = (0, _classVarianceAuthority.cva)(['p-1 -m-1 rounded-full', _primitives.TRANSITION_COLORS, _reactNative.Platform.select({
|
|
56
|
+
default: 'data-[active=true]:opacity-70',
|
|
57
|
+
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(' ')
|
|
58
|
+
})]);
|
|
59
|
+
|
|
60
|
+
// ── Close Icon ──────────────────────────────────────────────
|
|
61
|
+
|
|
62
|
+
const dialogCloseIconVariants = exports.dialogCloseIconVariants = (0, _classVarianceAuthority.cva)(['size-5 text-slate-500']);
|
|
63
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_classVarianceAuthority","_primitives","dialogOverlayVariants","exports","cva","COLOR_BG_INVERSE","dialogContentVariants","COLOR_BG_PRIMARY","COLOR_BORDER_DEFAULT","RADIUS_MD","Platform","select","web","SHADOW_MD","default","variants","size","sm","md","lg","full","defaultVariants","dialogHeaderVariants","dialogTitleVariants","COLOR_TEXT_PRIMARY","dialogDescriptionVariants","COLOR_TEXT_SECONDARY","dialogBodyVariants","dialogFooterVariants","dialogCloseVariants","TRANSITION_COLORS","join","dialogCloseIconVariants"],"sourceRoot":"../../../../src","sources":["components/Dialog/styles.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAWA;;AAEO,MAAMG,qBAAqB,GAAAC,OAAA,CAAAD,qBAAA,GAAG,IAAAE,2BAAG,EAAC,CAAC,kBAAkB,EAAEC,4BAAgB,EAAE,YAAY,CAAC,CAAC;;AAE9F;;AAEO,MAAMC,qBAAqB,GAAAH,OAAA,CAAAG,qBAAA,GAAG,IAAAF,2BAAG,EACtC,CACEG,4BAAgB,EAChB,UAAUC,gCAAoB,EAAE,EAChCC,qBAAS,EACTC,qBAAQ,CAACC,MAAM,CAAC;EAAEC,GAAG,EAAEC,qBAAS;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,EAChD,8BAA8B,CAC/B,EACD;EACEC,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,EAAE,EAAE,kBAAkB;MACtBC,EAAE,EAAE,kBAAkB;MACtBC,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
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BaseFieldLabel = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _utils = require("@cdx-ui/utils");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
/**
|
|
12
|
+
* Native: `Text` label row — tap focuses the field input via form context
|
|
13
|
+
* (parity with `<label htmlFor>` on web).
|
|
14
|
+
*/
|
|
15
|
+
const BaseFieldLabel = exports.BaseFieldLabel = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
16
|
+
htmlFor: _omitHtmlFor,
|
|
17
|
+
onPress,
|
|
18
|
+
...props
|
|
19
|
+
}, ref) => {
|
|
20
|
+
void _omitHtmlFor;
|
|
21
|
+
const {
|
|
22
|
+
focusInput,
|
|
23
|
+
isDisabled
|
|
24
|
+
} = (0, _utils.useFormControlContext)();
|
|
25
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
26
|
+
ref: ref,
|
|
27
|
+
...props,
|
|
28
|
+
disabled: Boolean(isDisabled),
|
|
29
|
+
onPress: (0, _utils.composeEventHandlers)(onPress, () => focusInput?.())
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
BaseFieldLabel.displayName = 'BaseFieldLabel';
|
|
33
|
+
//# sourceMappingURL=FieldLabel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_utils","_jsxRuntime","BaseFieldLabel","exports","forwardRef","htmlFor","_omitHtmlFor","onPress","props","ref","focusInput","isDisabled","useFormControlContext","jsx","Text","disabled","Boolean","composeEventHandlers","displayName"],"sourceRoot":"../../../../src","sources":["components/Field/FieldLabel.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAA4E,IAAAG,WAAA,GAAAH,OAAA;AAS5E;AACA;AACA;AACA;AACO,MAAMI,cAAc,GAAAC,OAAA,CAAAD,cAAA,gBAAG,IAAAE,iBAAU,EACtC,CAAC;EAAEC,OAAO,EAAEC,YAAY;EAAEC,OAAO;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACrD,KAAKH,YAAY;EAEjB,MAAM;IAAEI,UAAU;IAAEC;EAAW,CAAC,GAAG,IAAAC,4BAAqB,EAAC,CAAC;EAE1D,oBACE,IAAAX,WAAA,CAAAY,GAAA,EAACd,YAAA,CAAAe,IAAI;IACHL,GAAG,EAAEA,GAAI;IAAA,GACLD,KAAK;IACTO,QAAQ,EAAEC,OAAO,CAACL,UAAU,CAAE;IAC9BJ,OAAO,EAAE,IAAAU,2BAAoB,EAACV,OAAO,EAAE,MAAMG,UAAU,GAAG,CAAC;EAAE,CAC9D,CAAC;AAEN,CACF,CAAC;AAEDR,cAAc,CAACgB,WAAW,GAAG,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BaseFieldLabel = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
10
|
+
// TODO: Why does dataSet need to be decomposed into individual data attributes?
|
|
11
|
+
|
|
12
|
+
/** Real `<label>` so clicking the label focuses the associated control (`htmlFor` → input `id`). */
|
|
13
|
+
const BaseFieldLabel = exports.BaseFieldLabel = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
14
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
15
|
+
ref: ref,
|
|
16
|
+
...props,
|
|
17
|
+
"data-invalid": props.dataSet?.invalid,
|
|
18
|
+
"data-required": props.dataSet?.required
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
BaseFieldLabel.displayName = 'BaseFieldLabel';
|
|
22
|
+
//# sourceMappingURL=FieldLabel.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","BaseFieldLabel","exports","forwardRef","props","ref","jsx","dataSet","invalid","required","displayName"],"sourceRoot":"../../../../src","sources":["components/Field/FieldLabel.web.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA0D,IAAAC,WAAA,GAAAD,OAAA;AAAA,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAG1D;;AASA;AACO,MAAMkB,cAAc,GAAAC,OAAA,CAAAD,cAAA,gBAAG,IAAAE,iBAAU,EAAwC,CAACC,KAAK,EAAEC,GAAG,KAAK;EAC9F,oBACE,IAAAxB,WAAA,CAAAyB,GAAA;IACED,GAAG,EAAEA,GAAI;IAAA,GACJD,KAAK;IACV,gBAAcA,KAAK,CAACG,OAAO,EAAEC,OAAQ;IACrC,iBAAeJ,KAAK,CAACG,OAAO,EAAEE;EAAS,CACxC,CAAC;AAEN,CAAC,CAAC;AAEFR,cAAc,CAACS,WAAW,GAAG,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Field = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _icons = require("@cdx-ui/icons");
|
|
10
|
+
var _primitives = require("@cdx-ui/primitives");
|
|
11
|
+
var _utils = require("@cdx-ui/utils");
|
|
12
|
+
var _Icon = require("../Icon");
|
|
13
|
+
var _FieldLabel = require("./FieldLabel");
|
|
14
|
+
var _styles = require("./styles");
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
// =============================================================================
|
|
17
|
+
// PRIMITIVE
|
|
18
|
+
// =============================================================================
|
|
19
|
+
const FieldPrimitive = (0, _primitives.createField)({
|
|
20
|
+
Root: _reactNative.View,
|
|
21
|
+
Label: _FieldLabel.BaseFieldLabel,
|
|
22
|
+
Helper: _reactNative.View,
|
|
23
|
+
HelperText: _reactNative.Text,
|
|
24
|
+
Error: _reactNative.View,
|
|
25
|
+
ErrorText: _reactNative.Text,
|
|
26
|
+
ErrorIcon: _reactNative.View
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
// =============================================================================
|
|
30
|
+
// FIELD ROOT
|
|
31
|
+
// =============================================================================
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Field wrapper + context. For **initial focus**, pass `autoFocus` on `Input.Field` (not here).
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
const FieldRoot = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
38
|
+
className,
|
|
39
|
+
children,
|
|
40
|
+
style,
|
|
41
|
+
...props
|
|
42
|
+
}, ref) => {
|
|
43
|
+
const computedClassName = (0, _utils.cn)((0, _styles.fieldRootVariants)(), className);
|
|
44
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(FieldPrimitive, {
|
|
45
|
+
ref: ref,
|
|
46
|
+
className: computedClassName,
|
|
47
|
+
style: style,
|
|
48
|
+
...props,
|
|
49
|
+
children: children
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
FieldRoot.displayName = 'Field';
|
|
53
|
+
|
|
54
|
+
// =============================================================================
|
|
55
|
+
// FIELD LABEL
|
|
56
|
+
// =============================================================================
|
|
57
|
+
|
|
58
|
+
const FieldLabel = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
59
|
+
className,
|
|
60
|
+
children,
|
|
61
|
+
style,
|
|
62
|
+
htmlFor,
|
|
63
|
+
...props
|
|
64
|
+
}, ref) => {
|
|
65
|
+
const labelClassName = (0, _utils.cn)((0, _styles.fieldLabelVariants)(), className);
|
|
66
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(FieldPrimitive.Label, {
|
|
67
|
+
ref: ref,
|
|
68
|
+
className: labelClassName,
|
|
69
|
+
style: style,
|
|
70
|
+
htmlFor: htmlFor,
|
|
71
|
+
requiredIndicator: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
72
|
+
className: "text-red-500",
|
|
73
|
+
"aria-hidden": true,
|
|
74
|
+
children: ' *'
|
|
75
|
+
}),
|
|
76
|
+
...props,
|
|
77
|
+
children: children
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
FieldLabel.displayName = 'Field.Label';
|
|
81
|
+
|
|
82
|
+
// =============================================================================
|
|
83
|
+
// FIELD HELPER
|
|
84
|
+
// =============================================================================
|
|
85
|
+
|
|
86
|
+
const FieldHelper = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
87
|
+
className,
|
|
88
|
+
children,
|
|
89
|
+
style,
|
|
90
|
+
...props
|
|
91
|
+
}, ref) => {
|
|
92
|
+
const containerClassName = (0, _utils.cn)((0, _styles.fieldHelperVariants)(), className);
|
|
93
|
+
const textClassName = (0, _utils.cn)((0, _styles.fieldHelperTextVariants)());
|
|
94
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(FieldPrimitive.Helper, {
|
|
95
|
+
ref: ref,
|
|
96
|
+
className: containerClassName,
|
|
97
|
+
style: style,
|
|
98
|
+
...props,
|
|
99
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(FieldPrimitive.HelperText, {
|
|
100
|
+
className: textClassName,
|
|
101
|
+
children: children
|
|
102
|
+
})
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
FieldHelper.displayName = 'Field.Helper';
|
|
106
|
+
|
|
107
|
+
// =============================================================================
|
|
108
|
+
// FIELD ERROR (internal icon + text composition)
|
|
109
|
+
// =============================================================================
|
|
110
|
+
|
|
111
|
+
const FieldErrorIcon = ({
|
|
112
|
+
className,
|
|
113
|
+
style,
|
|
114
|
+
...props
|
|
115
|
+
}) => {
|
|
116
|
+
const computedClassName = (0, _utils.cn)((0, _styles.fieldErrorIconVariants)(), className);
|
|
117
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
118
|
+
as: _icons.ErrorIcon,
|
|
119
|
+
className: computedClassName,
|
|
120
|
+
style: style,
|
|
121
|
+
"aria-hidden": true,
|
|
122
|
+
...props
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
FieldErrorIcon.displayName = 'Field.ErrorIcon';
|
|
126
|
+
const FieldError = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
127
|
+
className,
|
|
128
|
+
children,
|
|
129
|
+
style,
|
|
130
|
+
...props
|
|
131
|
+
}, ref) => {
|
|
132
|
+
const containerClassName = (0, _utils.cn)((0, _styles.fieldErrorVariants)(), className);
|
|
133
|
+
const textClassName = (0, _utils.cn)((0, _styles.fieldErrorTextVariants)());
|
|
134
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(FieldPrimitive.Error, {
|
|
135
|
+
ref: ref,
|
|
136
|
+
className: containerClassName,
|
|
137
|
+
style: style,
|
|
138
|
+
...props,
|
|
139
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(FieldPrimitive.ErrorIcon, {
|
|
140
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(FieldErrorIcon, {})
|
|
141
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(FieldPrimitive.ErrorText, {
|
|
142
|
+
className: textClassName,
|
|
143
|
+
children: children
|
|
144
|
+
})]
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
FieldError.displayName = 'Field.Error';
|
|
148
|
+
|
|
149
|
+
// =============================================================================
|
|
150
|
+
// COMPOUND EXPORT
|
|
151
|
+
// =============================================================================
|
|
152
|
+
|
|
153
|
+
const Field = exports.Field = Object.assign(FieldRoot, {
|
|
154
|
+
Label: FieldLabel,
|
|
155
|
+
Helper: FieldHelper,
|
|
156
|
+
Error: FieldError
|
|
157
|
+
});
|
|
158
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_icons","_primitives","_utils","_Icon","_FieldLabel","_styles","_jsxRuntime","FieldPrimitive","createField","Root","View","Label","BaseFieldLabel","Helper","HelperText","Text","Error","ErrorText","ErrorIcon","FieldRoot","forwardRef","className","children","style","props","ref","computedClassName","cn","fieldRootVariants","jsx","displayName","FieldLabel","htmlFor","labelClassName","fieldLabelVariants","requiredIndicator","FieldHelper","containerClassName","fieldHelperVariants","textClassName","fieldHelperTextVariants","FieldErrorIcon","fieldErrorIconVariants","Icon","as","FieldError","fieldErrorVariants","fieldErrorTextVariants","jsxs","Field","exports","Object","assign"],"sourceRoot":"../../../../src","sources":["components/Field/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAOA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AAYkB,IAAAQ,WAAA,GAAAR,OAAA;AAElB;AACA;AACA;AAEA,MAAMS,cAAc,GAAG,IAAAC,uBAAW,EAAC;EACjCC,IAAI,EAAEC,iBAAI;EACVC,KAAK,EAAEC,0BAAc;EACrBC,MAAM,EAAEH,iBAAI;EACZI,UAAU,EAAEC,iBAAI;EAChBC,KAAK,EAAEN,iBAAI;EACXO,SAAS,EAAEF,iBAAI;EACfG,SAAS,EAAER;AACb,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S;EAAEC,QAAQ;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACjD,MAAMY,kBAAkB,GAAG,IAAAV,SAAE,EAAC,IAAAmB,0BAAkB,EAAC,CAAC,EAAEzB,SAAS,CAAC;EAC9D,MAAMkB,aAAa,GAAG,IAAAZ,SAAE,EAAC,IAAAoB,8BAAsB,EAAC,CAAC,CAAC;EAElD,oBACE,IAAAzC,WAAA,CAAA0C,IAAA,EAACzC,cAAc,CAACS,KAAK;IAACS,GAAG,EAAEA,GAAI;IAACJ,SAAS,EAAEgB,kBAAmB;IAACd,KAAK,EAAEA,KAAM;IAAA,GAAKC,KAAK;IAAAF,QAAA,gBACpF,IAAAhB,WAAA,CAAAuB,GAAA,EAACtB,cAAc,CAACW,SAAS;MAAAI,QAAA,eACvB,IAAAhB,WAAA,CAAAuB,GAAA,EAACY,cAAc,IAAE;IAAC,CACM,CAAC,eAC3B,IAAAnC,WAAA,CAAAuB,GAAA,EAACtB,cAAc,CAACU,SAAS;MAACI,SAAS,EAAEkB,aAAc;MAAAjB,QAAA,EAAEA;IAAQ,CAA2B,CAAC;EAAA,CACrE,CAAC;AAE3B,CACF,CAAC;AAEDuB,UAAU,CAACf,WAAW,GAAG,aAAa;;AAEtC;AACA;AACA;;AAQO,MAAMmB,KAAK,GAAAC,OAAA,CAAAD,KAAA,GAAGE,MAAM,CAACC,MAAM,CAACjC,SAAS,EAAE;EAC5CR,KAAK,EAAEoB,UAAU;EACjBlB,MAAM,EAAEuB,WAAW;EACnBpB,KAAK,EAAE6B;AACT,CAAC,CAA2B","ignoreList":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.fieldRootVariants = exports.fieldLabelVariants = exports.fieldHelperVariants = exports.fieldHelperTextVariants = exports.fieldErrorVariants = exports.fieldErrorTextVariants = exports.fieldErrorIconVariants = void 0;
|
|
7
|
+
var _classVarianceAuthority = require("class-variance-authority");
|
|
8
|
+
var _primitives = require("../../styles/primitives");
|
|
9
|
+
const fieldRootVariants = exports.fieldRootVariants = (0, _classVarianceAuthority.cva)(['flex-col gap-2', 'web:last:mb-0', _primitives.DISABLED_OPACITY]);
|
|
10
|
+
const fieldLabelVariants = exports.fieldLabelVariants = (0, _classVarianceAuthority.cva)(['body-md', 'font-medium', 'text-content-primary', 'flex-row items-center', _primitives.DISABLED_OPACITY, 'web:cursor-pointer', 'data-[invalid=true]:text-content-danger']);
|
|
11
|
+
const fieldHelperVariants = exports.fieldHelperVariants = (0, _classVarianceAuthority.cva)(['flex-row items-center']);
|
|
12
|
+
const fieldHelperTextVariants = exports.fieldHelperTextVariants = (0, _classVarianceAuthority.cva)(['body-sm', 'text-content-tertiary']);
|
|
13
|
+
const fieldErrorVariants = exports.fieldErrorVariants = (0, _classVarianceAuthority.cva)(['flex-row items-center gap-1']);
|
|
14
|
+
const fieldErrorTextVariants = exports.fieldErrorTextVariants = (0, _classVarianceAuthority.cva)(['body-sm', 'text-content-danger']);
|
|
15
|
+
const fieldErrorIconVariants = exports.fieldErrorIconVariants = (0, _classVarianceAuthority.cva)(['size-3.5', 'text-content-danger']);
|
|
16
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_classVarianceAuthority","require","_primitives","fieldRootVariants","exports","cva","DISABLED_OPACITY","fieldLabelVariants","fieldHelperVariants","fieldHelperTextVariants","fieldErrorVariants","fieldErrorTextVariants","fieldErrorIconVariants"],"sourceRoot":"../../../../src","sources":["components/Field/styles.ts"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEO,MAAME,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,IAAAE,2BAAG,EAAC,CAAC,gBAAgB,EAAE,eAAe,EAAEC,4BAAgB,CAAC,CAAC;AAEpF,MAAMC,kBAAkB,GAAAH,OAAA,CAAAG,kBAAA,GAAG,IAAAF,2BAAG,EAAC,CACpC,SAAS,EACT,aAAa,EACb,sBAAsB,EACtB,uBAAuB,EACvBC,4BAAgB,EAChB,oBAAoB,EACpB,yCAAyC,CAC1C,CAAC;AAEK,MAAME,mBAAmB,GAAAJ,OAAA,CAAAI,mBAAA,GAAG,IAAAH,2BAAG,EAAC,CAAC,uBAAuB,CAAC,CAAC;AAE1D,MAAMI,uBAAuB,GAAAL,OAAA,CAAAK,uBAAA,GAAG,IAAAJ,2BAAG,EAAC,CAAC,SAAS,EAAE,uBAAuB,CAAC,CAAC;AAEzE,MAAMK,kBAAkB,GAAAN,OAAA,CAAAM,kBAAA,GAAG,IAAAL,2BAAG,EAAC,CAAC,6BAA6B,CAAC,CAAC;AAE/D,MAAMM,sBAAsB,GAAAP,OAAA,CAAAO,sBAAA,GAAG,IAAAN,2BAAG,EAAC,CAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC;AAEtE,MAAMO,sBAAsB,GAAAR,OAAA,CAAAQ,sBAAA,GAAG,IAAAP,2BAAG,EAAC,CAAC,UAAU,EAAE,qBAAqB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BaseFormRoot = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
const BaseFormRoot = exports.BaseFormRoot = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
11
|
+
onSubmit: _onSubmit,
|
|
12
|
+
action: _action,
|
|
13
|
+
method: _method,
|
|
14
|
+
...props
|
|
15
|
+
}, ref) => {
|
|
16
|
+
void _onSubmit;
|
|
17
|
+
void _action;
|
|
18
|
+
void _method;
|
|
19
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
20
|
+
ref: ref,
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
BaseFormRoot.displayName = 'BaseFormRoot';
|
|
25
|
+
//# sourceMappingURL=FormRoot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_jsxRuntime","BaseFormRoot","exports","forwardRef","onSubmit","_onSubmit","action","_action","method","_method","props","ref","jsx","View","displayName"],"sourceRoot":"../../../../src","sources":["components/Form/FormRoot.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAoD,IAAAE,WAAA,GAAAF,OAAA;AAS7C,MAAMG,YAAY,GAAAC,OAAA,CAAAD,YAAA,gBAAG,IAAAE,iBAAU,EACpC,CAAC;EAAEC,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,oBAAO,IAAAT,WAAA,CAAAY,GAAA,EAACb,YAAA,CAAAc,IAAI;IAACF,GAAG,EAAEA,GAAI;IAAA,GAAKD;EAAK,CAAG,CAAC;AACtC,CACF,CAAC;AAEDT,YAAY,CAACa,WAAW,GAAG,cAAc","ignoreList":[]}
|