@cdx-ui/components 0.0.1-beta.7 → 0.0.1-beta.70
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 +37 -19
- package/lib/commonjs/components/AlertDialog/index.js +17 -14
- package/lib/commonjs/components/AlertDialog/index.js.map +1 -1
- package/lib/commonjs/components/Avatar/index.js +126 -26
- package/lib/commonjs/components/Avatar/index.js.map +1 -1
- package/lib/commonjs/components/Avatar/styles.js +36 -29
- package/lib/commonjs/components/Avatar/styles.js.map +1 -1
- package/lib/commonjs/components/Button/index.js +143 -29
- package/lib/commonjs/components/Button/index.js.map +1 -1
- package/lib/commonjs/components/Button/styles.js +94 -29
- package/lib/commonjs/components/Button/styles.js.map +1 -1
- package/lib/commonjs/components/CLAUDE.md +194 -0
- package/lib/commonjs/components/Card/index.js +22 -4
- package/lib/commonjs/components/Card/index.js.map +1 -1
- package/lib/commonjs/components/Card/styles.js +27 -4
- package/lib/commonjs/components/Card/styles.js.map +1 -1
- package/lib/commonjs/components/Checkbox/index.js +71 -48
- package/lib/commonjs/components/Checkbox/index.js.map +1 -1
- package/lib/commonjs/components/Checkbox/styles.js +41 -47
- package/lib/commonjs/components/Checkbox/styles.js.map +1 -1
- package/lib/commonjs/components/Chip/index.js +94 -17
- package/lib/commonjs/components/Chip/index.js.map +1 -1
- package/lib/commonjs/components/Chip/styles.js +178 -21
- package/lib/commonjs/components/Chip/styles.js.map +1 -1
- package/lib/commonjs/components/Dialog/index.js +140 -65
- package/lib/commonjs/components/Dialog/index.js.map +1 -1
- package/lib/commonjs/components/Dialog/styles.js +60 -14
- package/lib/commonjs/components/Dialog/styles.js.map +1 -1
- package/lib/commonjs/components/Field/index.js +77 -27
- package/lib/commonjs/components/Field/index.js.map +1 -1
- package/lib/commonjs/components/Field/styles.js +4 -4
- package/lib/commonjs/components/Field/styles.js.map +1 -1
- package/lib/commonjs/components/Form/index.js +5 -12
- package/lib/commonjs/components/Form/index.js.map +1 -1
- package/lib/commonjs/components/Heading/styles.js +1 -1
- package/lib/commonjs/components/Heading/styles.js.map +1 -1
- package/lib/commonjs/components/Icon/index.js +3 -4
- package/lib/commonjs/components/Icon/index.js.map +1 -1
- package/lib/commonjs/components/IconButton/index.js +11 -34
- package/lib/commonjs/components/IconButton/index.js.map +1 -1
- package/lib/commonjs/components/IconButton/styles.js +135 -10
- package/lib/commonjs/components/IconButton/styles.js.map +1 -1
- package/lib/commonjs/components/Input/index.js +50 -20
- package/lib/commonjs/components/Input/index.js.map +1 -1
- package/lib/commonjs/components/Input/styles.js +7 -6
- package/lib/commonjs/components/Input/styles.js.map +1 -1
- package/lib/commonjs/components/Link/index.js +35 -9
- package/lib/commonjs/components/Link/index.js.map +1 -1
- package/lib/commonjs/components/Link/styles.js +56 -6
- package/lib/commonjs/components/Link/styles.js.map +1 -1
- package/lib/commonjs/components/ListItem/index.js +132 -79
- package/lib/commonjs/components/ListItem/index.js.map +1 -1
- package/lib/commonjs/components/ListItem/styles.js +29 -57
- package/lib/commonjs/components/ListItem/styles.js.map +1 -1
- package/lib/commonjs/components/OtpInput/index.js +94 -28
- package/lib/commonjs/components/OtpInput/index.js.map +1 -1
- package/lib/commonjs/components/ProgressBar/index.js +8 -13
- package/lib/commonjs/components/ProgressBar/index.js.map +1 -1
- package/lib/commonjs/components/ProgressSegmented/index.js +24 -10
- package/lib/commonjs/components/ProgressSegmented/index.js.map +1 -1
- package/lib/commonjs/components/Radio/index.js +165 -0
- package/lib/commonjs/components/Radio/index.js.map +1 -0
- package/lib/commonjs/components/Radio/styles.js +31 -0
- package/lib/commonjs/components/Radio/styles.js.map +1 -0
- package/lib/commonjs/components/ScopedTheme/index.js +24 -0
- package/lib/commonjs/components/ScopedTheme/index.js.map +1 -0
- package/lib/commonjs/components/Select/index.js +111 -39
- package/lib/commonjs/components/Select/index.js.map +1 -1
- package/lib/commonjs/components/Select/styles.js +17 -20
- package/lib/commonjs/components/Select/styles.js.map +1 -1
- package/lib/commonjs/components/Skeleton/index.js +37 -0
- package/lib/commonjs/components/Skeleton/index.js.map +1 -0
- package/lib/commonjs/components/Skeleton/styles.js +9 -0
- package/lib/commonjs/components/Skeleton/styles.js.map +1 -0
- package/lib/commonjs/components/Switch/BaseSwitch.js +23 -13
- package/lib/commonjs/components/Switch/BaseSwitch.js.map +1 -1
- package/lib/commonjs/components/Switch/BaseSwitch.web.js +25 -21
- package/lib/commonjs/components/Switch/BaseSwitch.web.js.map +1 -1
- package/lib/commonjs/components/Switch/index.js +34 -3
- package/lib/commonjs/components/Switch/index.js.map +1 -1
- package/lib/commonjs/components/Text/styles.js +2 -2
- package/lib/commonjs/components/Text/styles.js.map +1 -1
- package/lib/commonjs/components/Tile/index.js +324 -0
- package/lib/commonjs/components/Tile/index.js.map +1 -0
- package/lib/commonjs/components/Tile/styles.js +52 -0
- package/lib/commonjs/components/Tile/styles.js.map +1 -0
- package/lib/commonjs/components/VirtualizedList/index.js.map +1 -1
- package/lib/commonjs/components/index.js +48 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/figma/AlertDialog.Description.figma.js +20 -0
- package/lib/commonjs/figma/AlertDialog.Description.figma.js.map +1 -0
- package/lib/commonjs/figma/AlertDialog.Footer.figma.js +41 -0
- package/lib/commonjs/figma/AlertDialog.Footer.figma.js.map +1 -0
- package/lib/commonjs/figma/AlertDialog.Header.figma.js +28 -0
- package/lib/commonjs/figma/AlertDialog.Header.figma.js.map +1 -0
- package/lib/commonjs/figma/AlertDialog.Text.figma.js +20 -0
- package/lib/commonjs/figma/AlertDialog.Text.figma.js.map +1 -0
- package/lib/commonjs/figma/AlertDialog.Title.figma.js +27 -0
- package/lib/commonjs/figma/AlertDialog.Title.figma.js.map +1 -0
- package/lib/commonjs/figma/AlertDialog.figma.js +43 -0
- package/lib/commonjs/figma/AlertDialog.figma.js.map +1 -0
- package/lib/commonjs/figma/Avatar.figma.js +57 -0
- package/lib/commonjs/figma/Avatar.figma.js.map +1 -0
- package/lib/commonjs/figma/Button.figma.js +4 -7
- package/lib/commonjs/figma/Button.figma.js.map +1 -1
- package/lib/commonjs/figma/CLAUDE.md +30 -0
- package/lib/commonjs/figma/Card.Header.figma.js +28 -0
- package/lib/commonjs/figma/Card.Header.figma.js.map +1 -0
- package/lib/commonjs/figma/Card.figma.js +42 -0
- package/lib/commonjs/figma/Card.figma.js.map +1 -0
- package/lib/commonjs/figma/Checkbox.figma.js +55 -0
- package/lib/commonjs/figma/Checkbox.figma.js.map +1 -0
- package/lib/commonjs/figma/Chip.figma.js +68 -0
- package/lib/commonjs/figma/Chip.figma.js.map +1 -0
- package/lib/commonjs/figma/Dialog.Description.figma.js +20 -0
- package/lib/commonjs/figma/Dialog.Description.figma.js.map +1 -0
- package/lib/commonjs/figma/Dialog.Footer.figma.js +30 -0
- package/lib/commonjs/figma/Dialog.Footer.figma.js.map +1 -0
- package/lib/commonjs/figma/Dialog.Header.figma.js +29 -0
- package/lib/commonjs/figma/Dialog.Header.figma.js.map +1 -0
- package/lib/commonjs/figma/Dialog.Text.figma.js +20 -0
- package/lib/commonjs/figma/Dialog.Text.figma.js.map +1 -0
- package/lib/commonjs/figma/Dialog.Title.figma.js +27 -0
- package/lib/commonjs/figma/Dialog.Title.figma.js.map +1 -0
- package/lib/commonjs/figma/Dialog.figma.js +51 -0
- package/lib/commonjs/figma/Dialog.figma.js.map +1 -0
- package/lib/commonjs/figma/Field.Input.figma.js +57 -0
- package/lib/commonjs/figma/Field.Input.figma.js.map +1 -0
- package/lib/commonjs/figma/Field.Select.figma.js +57 -0
- package/lib/commonjs/figma/Field.Select.figma.js.map +1 -0
- package/lib/commonjs/figma/Heading.figma.js +30 -0
- package/lib/commonjs/figma/Heading.figma.js.map +1 -0
- package/lib/commonjs/figma/Icon.figma.js +20 -0
- package/lib/commonjs/figma/Icon.figma.js.map +1 -0
- package/lib/commonjs/figma/IconButton.figma.js +47 -0
- package/lib/commonjs/figma/IconButton.figma.js.map +1 -0
- package/lib/commonjs/figma/Input.figma.js +52 -0
- package/lib/commonjs/figma/Input.figma.js.map +1 -0
- package/lib/commonjs/figma/Link.figma.js +30 -0
- package/lib/commonjs/figma/Link.figma.js.map +1 -0
- package/lib/commonjs/figma/ListItem.Description.figma.js +23 -0
- package/lib/commonjs/figma/ListItem.Description.figma.js.map +1 -0
- package/lib/commonjs/figma/ListItem.LeadingSlot.figma.js +24 -0
- package/lib/commonjs/figma/ListItem.LeadingSlot.figma.js.map +1 -0
- package/lib/commonjs/figma/ListItem.Meta.figma.js +23 -0
- package/lib/commonjs/figma/ListItem.Meta.figma.js.map +1 -0
- package/lib/commonjs/figma/ListItem.SectionHeader.figma.js +24 -0
- package/lib/commonjs/figma/ListItem.SectionHeader.figma.js.map +1 -0
- package/lib/commonjs/figma/ListItem.Title.figma.js +23 -0
- package/lib/commonjs/figma/ListItem.Title.figma.js.map +1 -0
- package/lib/commonjs/figma/ListItem.TrailingSlot.figma.js +24 -0
- package/lib/commonjs/figma/ListItem.TrailingSlot.figma.js.map +1 -0
- package/lib/commonjs/figma/ListItem.figma.js +50 -0
- package/lib/commonjs/figma/ListItem.figma.js.map +1 -0
- package/lib/commonjs/figma/ProgressSegmented.figma.js +39 -0
- package/lib/commonjs/figma/ProgressSegmented.figma.js.map +1 -0
- package/lib/commonjs/figma/Radio.figma.js +40 -0
- package/lib/commonjs/figma/Radio.figma.js.map +1 -0
- package/lib/commonjs/figma/Select.figma.js +53 -0
- package/lib/commonjs/figma/Select.figma.js.map +1 -0
- package/lib/commonjs/figma/Text.figma.js +32 -0
- package/lib/commonjs/figma/Text.figma.js.map +1 -0
- package/lib/commonjs/figma/icons.figma.batch.js +27 -0
- package/lib/commonjs/figma/icons.figma.batch.js.map +1 -0
- package/lib/commonjs/figma/icons.figma.batch.json +17705 -0
- package/lib/commonjs/hooks/index.js +19 -0
- package/lib/commonjs/hooks/index.js.map +1 -0
- package/lib/commonjs/hooks/useForgeBottomTabScreenOptions.js +246 -0
- package/lib/commonjs/hooks/useForgeBottomTabScreenOptions.js.map +1 -0
- package/lib/commonjs/index.js +24 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/metro/withCdxMetroConfig.js +7 -18
- package/lib/commonjs/metro/withCdxMetroConfig.js.map +1 -1
- package/lib/commonjs/metro/withForgeMetroConfig.js +24 -0
- package/lib/commonjs/metro/withForgeMetroConfig.js.map +1 -0
- package/lib/commonjs/navigation/forgeTabIcon.js +43 -0
- package/lib/commonjs/navigation/forgeTabIcon.js.map +1 -0
- package/lib/commonjs/navigation/forgeTabIcon.native.js +35 -0
- package/lib/commonjs/navigation/forgeTabIcon.native.js.map +1 -0
- package/lib/commonjs/navigation/index.js +13 -0
- package/lib/commonjs/navigation/index.js.map +1 -0
- package/lib/commonjs/navigation/types.js +38 -0
- package/lib/commonjs/navigation/types.js.map +1 -0
- package/lib/commonjs/styles/primitives.js +43 -6
- package/lib/commonjs/styles/primitives.js.map +1 -1
- package/lib/commonjs/utils/positionToDataIcon.js +41 -0
- package/lib/commonjs/utils/positionToDataIcon.js.map +1 -0
- package/lib/module/components/AlertDialog/index.js +18 -15
- package/lib/module/components/AlertDialog/index.js.map +1 -1
- package/lib/module/components/Avatar/index.js +129 -29
- package/lib/module/components/Avatar/index.js.map +1 -1
- package/lib/module/components/Avatar/styles.js +36 -29
- package/lib/module/components/Avatar/styles.js.map +1 -1
- package/lib/module/components/Button/index.js +146 -33
- package/lib/module/components/Button/index.js.map +1 -1
- package/lib/module/components/Button/styles.js +93 -28
- package/lib/module/components/Button/styles.js.map +1 -1
- package/lib/module/components/CLAUDE.md +194 -0
- package/lib/module/components/Card/index.js +23 -4
- package/lib/module/components/Card/index.js.map +1 -1
- package/lib/module/components/Card/styles.js +27 -4
- package/lib/module/components/Card/styles.js.map +1 -1
- package/lib/module/components/Checkbox/index.js +75 -52
- package/lib/module/components/Checkbox/index.js.map +1 -1
- package/lib/module/components/Checkbox/styles.js +43 -48
- package/lib/module/components/Checkbox/styles.js.map +1 -1
- package/lib/module/components/Chip/index.js +98 -21
- package/lib/module/components/Chip/index.js.map +1 -1
- package/lib/module/components/Chip/styles.js +177 -20
- package/lib/module/components/Chip/styles.js.map +1 -1
- package/lib/module/components/Dialog/index.js +147 -72
- package/lib/module/components/Dialog/index.js.map +1 -1
- package/lib/module/components/Dialog/styles.js +60 -14
- package/lib/module/components/Dialog/styles.js.map +1 -1
- package/lib/module/components/Field/index.js +81 -32
- package/lib/module/components/Field/index.js.map +1 -1
- package/lib/module/components/Field/styles.js +4 -4
- package/lib/module/components/Field/styles.js.map +1 -1
- package/lib/module/components/Form/index.js +7 -14
- package/lib/module/components/Form/index.js.map +1 -1
- package/lib/module/components/Heading/styles.js +1 -1
- package/lib/module/components/Heading/styles.js.map +1 -1
- package/lib/module/components/Icon/index.js +3 -4
- package/lib/module/components/Icon/index.js.map +1 -1
- package/lib/module/components/IconButton/index.js +12 -35
- package/lib/module/components/IconButton/index.js.map +1 -1
- package/lib/module/components/IconButton/styles.js +135 -10
- package/lib/module/components/IconButton/styles.js.map +1 -1
- package/lib/module/components/Input/index.js +53 -23
- package/lib/module/components/Input/index.js.map +1 -1
- package/lib/module/components/Input/styles.js +7 -6
- package/lib/module/components/Input/styles.js.map +1 -1
- package/lib/module/components/Link/index.js +38 -11
- package/lib/module/components/Link/index.js.map +1 -1
- package/lib/module/components/Link/styles.js +55 -6
- package/lib/module/components/Link/styles.js.map +1 -1
- package/lib/module/components/ListItem/index.js +137 -84
- package/lib/module/components/ListItem/index.js.map +1 -1
- package/lib/module/components/ListItem/styles.js +30 -58
- package/lib/module/components/ListItem/styles.js.map +1 -1
- package/lib/module/components/OtpInput/index.js +94 -28
- package/lib/module/components/OtpInput/index.js.map +1 -1
- package/lib/module/components/ProgressBar/index.js +9 -14
- package/lib/module/components/ProgressBar/index.js.map +1 -1
- package/lib/module/components/ProgressSegmented/index.js +25 -11
- package/lib/module/components/ProgressSegmented/index.js.map +1 -1
- package/lib/module/components/Radio/index.js +161 -0
- package/lib/module/components/Radio/index.js.map +1 -0
- package/lib/module/components/Radio/styles.js +27 -0
- package/lib/module/components/Radio/styles.js.map +1 -0
- package/lib/module/components/ScopedTheme/index.js +19 -0
- package/lib/module/components/ScopedTheme/index.js.map +1 -0
- package/lib/module/components/Select/index.js +117 -45
- package/lib/module/components/Select/index.js.map +1 -1
- package/lib/module/components/Select/styles.js +18 -21
- package/lib/module/components/Select/styles.js.map +1 -1
- package/lib/module/components/Skeleton/index.js +32 -0
- package/lib/module/components/Skeleton/index.js.map +1 -0
- package/lib/module/components/Skeleton/styles.js +5 -0
- package/lib/module/components/Skeleton/styles.js.map +1 -0
- package/lib/module/components/Switch/BaseSwitch.js +24 -14
- package/lib/module/components/Switch/BaseSwitch.js.map +1 -1
- package/lib/module/components/Switch/BaseSwitch.web.js +26 -22
- package/lib/module/components/Switch/BaseSwitch.web.js.map +1 -1
- package/lib/module/components/Switch/index.js +35 -4
- package/lib/module/components/Switch/index.js.map +1 -1
- package/lib/module/components/Text/styles.js +2 -2
- package/lib/module/components/Text/styles.js.map +1 -1
- package/lib/module/components/Tile/index.js +315 -0
- package/lib/module/components/Tile/index.js.map +1 -0
- package/lib/module/components/Tile/styles.js +48 -0
- package/lib/module/components/Tile/styles.js.map +1 -0
- package/lib/module/components/VirtualizedList/index.js.map +1 -1
- package/lib/module/components/index.js +4 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/figma/AlertDialog.Description.figma.js +14 -0
- package/lib/module/figma/AlertDialog.Description.figma.js.map +1 -0
- package/lib/module/figma/AlertDialog.Footer.figma.js +35 -0
- package/lib/module/figma/AlertDialog.Footer.figma.js.map +1 -0
- package/lib/module/figma/AlertDialog.Header.figma.js +22 -0
- package/lib/module/figma/AlertDialog.Header.figma.js.map +1 -0
- package/lib/module/figma/AlertDialog.Text.figma.js +14 -0
- package/lib/module/figma/AlertDialog.Text.figma.js.map +1 -0
- package/lib/module/figma/AlertDialog.Title.figma.js +21 -0
- package/lib/module/figma/AlertDialog.Title.figma.js.map +1 -0
- package/lib/module/figma/AlertDialog.figma.js +37 -0
- package/lib/module/figma/AlertDialog.figma.js.map +1 -0
- package/lib/module/figma/Avatar.figma.js +51 -0
- package/lib/module/figma/Avatar.figma.js.map +1 -0
- package/lib/module/figma/Button.figma.js +4 -7
- package/lib/module/figma/Button.figma.js.map +1 -1
- package/lib/module/figma/CLAUDE.md +30 -0
- package/lib/module/figma/Card.Header.figma.js +22 -0
- package/lib/module/figma/Card.Header.figma.js.map +1 -0
- package/lib/module/figma/Card.figma.js +36 -0
- package/lib/module/figma/Card.figma.js.map +1 -0
- package/lib/module/figma/Checkbox.figma.js +49 -0
- package/lib/module/figma/Checkbox.figma.js.map +1 -0
- package/lib/module/figma/Chip.figma.js +62 -0
- package/lib/module/figma/Chip.figma.js.map +1 -0
- package/lib/module/figma/Dialog.Description.figma.js +14 -0
- package/lib/module/figma/Dialog.Description.figma.js.map +1 -0
- package/lib/module/figma/Dialog.Footer.figma.js +24 -0
- package/lib/module/figma/Dialog.Footer.figma.js.map +1 -0
- package/lib/module/figma/Dialog.Header.figma.js +23 -0
- package/lib/module/figma/Dialog.Header.figma.js.map +1 -0
- package/lib/module/figma/Dialog.Text.figma.js +14 -0
- package/lib/module/figma/Dialog.Text.figma.js.map +1 -0
- package/lib/module/figma/Dialog.Title.figma.js +21 -0
- package/lib/module/figma/Dialog.Title.figma.js.map +1 -0
- package/lib/module/figma/Dialog.figma.js +45 -0
- package/lib/module/figma/Dialog.figma.js.map +1 -0
- package/lib/module/figma/Field.Input.figma.js +51 -0
- package/lib/module/figma/Field.Input.figma.js.map +1 -0
- package/lib/module/figma/Field.Select.figma.js +51 -0
- package/lib/module/figma/Field.Select.figma.js.map +1 -0
- package/lib/module/figma/Heading.figma.js +24 -0
- package/lib/module/figma/Heading.figma.js.map +1 -0
- package/lib/module/figma/Icon.figma.js +14 -0
- package/lib/module/figma/Icon.figma.js.map +1 -0
- package/lib/module/figma/IconButton.figma.js +41 -0
- package/lib/module/figma/IconButton.figma.js.map +1 -0
- package/lib/module/figma/Input.figma.js +46 -0
- package/lib/module/figma/Input.figma.js.map +1 -0
- package/lib/module/figma/Link.figma.js +24 -0
- package/lib/module/figma/Link.figma.js.map +1 -0
- package/lib/module/figma/ListItem.Description.figma.js +17 -0
- package/lib/module/figma/ListItem.Description.figma.js.map +1 -0
- package/lib/module/figma/ListItem.LeadingSlot.figma.js +18 -0
- package/lib/module/figma/ListItem.LeadingSlot.figma.js.map +1 -0
- package/lib/module/figma/ListItem.Meta.figma.js +17 -0
- package/lib/module/figma/ListItem.Meta.figma.js.map +1 -0
- package/lib/module/figma/ListItem.SectionHeader.figma.js +18 -0
- package/lib/module/figma/ListItem.SectionHeader.figma.js.map +1 -0
- package/lib/module/figma/ListItem.Title.figma.js +17 -0
- package/lib/module/figma/ListItem.Title.figma.js.map +1 -0
- package/lib/module/figma/ListItem.TrailingSlot.figma.js +18 -0
- package/lib/module/figma/ListItem.TrailingSlot.figma.js.map +1 -0
- package/lib/module/figma/ListItem.figma.js +44 -0
- package/lib/module/figma/ListItem.figma.js.map +1 -0
- package/lib/module/figma/ProgressSegmented.figma.js +33 -0
- package/lib/module/figma/ProgressSegmented.figma.js.map +1 -0
- package/lib/module/figma/Radio.figma.js +34 -0
- package/lib/module/figma/Radio.figma.js.map +1 -0
- package/lib/module/figma/Select.figma.js +47 -0
- package/lib/module/figma/Select.figma.js.map +1 -0
- package/lib/module/figma/Text.figma.js +26 -0
- package/lib/module/figma/Text.figma.js.map +1 -0
- package/lib/module/figma/icons.figma.batch.js +22 -0
- package/lib/module/figma/icons.figma.batch.js.map +1 -0
- package/lib/module/figma/icons.figma.batch.json +17705 -0
- package/lib/module/hooks/index.js +4 -0
- package/lib/module/hooks/index.js.map +1 -0
- package/lib/module/hooks/useForgeBottomTabScreenOptions.js +242 -0
- package/lib/module/hooks/useForgeBottomTabScreenOptions.js.map +1 -0
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/metro/withCdxMetroConfig.js +3 -17
- package/lib/module/metro/withCdxMetroConfig.js.map +1 -1
- package/lib/module/metro/withForgeMetroConfig.js +20 -0
- package/lib/module/metro/withForgeMetroConfig.js.map +1 -0
- package/lib/module/navigation/forgeTabIcon.js +39 -0
- package/lib/module/navigation/forgeTabIcon.js.map +1 -0
- package/lib/module/navigation/forgeTabIcon.native.js +31 -0
- package/lib/module/navigation/forgeTabIcon.native.js.map +1 -0
- package/lib/module/navigation/index.js +4 -0
- package/lib/module/navigation/index.js.map +1 -0
- package/lib/module/navigation/types.js +36 -0
- package/lib/module/navigation/types.js.map +1 -0
- package/lib/module/styles/primitives.js +43 -6
- package/lib/module/styles/primitives.js.map +1 -1
- package/lib/module/utils/positionToDataIcon.js +38 -0
- package/lib/module/utils/positionToDataIcon.js.map +1 -0
- package/lib/typescript/components/AlertDialog/index.d.ts +3 -2
- package/lib/typescript/components/AlertDialog/index.d.ts.map +1 -1
- package/lib/typescript/components/Avatar/index.d.ts +6 -2
- package/lib/typescript/components/Avatar/index.d.ts.map +1 -1
- package/lib/typescript/components/Avatar/styles.d.ts +4 -4
- package/lib/typescript/components/Avatar/styles.d.ts.map +1 -1
- package/lib/typescript/components/Button/index.d.ts +44 -9
- package/lib/typescript/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/components/Button/styles.d.ts +7 -4
- package/lib/typescript/components/Button/styles.d.ts.map +1 -1
- package/lib/typescript/components/Card/index.d.ts +4 -3
- package/lib/typescript/components/Card/index.d.ts.map +1 -1
- package/lib/typescript/components/Card/styles.d.ts +13 -3
- package/lib/typescript/components/Card/styles.d.ts.map +1 -1
- package/lib/typescript/components/Checkbox/index.d.ts +4 -3
- package/lib/typescript/components/Checkbox/index.d.ts.map +1 -1
- package/lib/typescript/components/Checkbox/styles.d.ts +4 -14
- package/lib/typescript/components/Checkbox/styles.d.ts.map +1 -1
- package/lib/typescript/components/Chip/index.d.ts +31 -8
- package/lib/typescript/components/Chip/index.d.ts.map +1 -1
- package/lib/typescript/components/Chip/styles.d.ts +12 -4
- package/lib/typescript/components/Chip/styles.d.ts.map +1 -1
- package/lib/typescript/components/Dialog/index.d.ts +25 -13
- package/lib/typescript/components/Dialog/index.d.ts.map +1 -1
- package/lib/typescript/components/Dialog/styles.d.ts +16 -5
- package/lib/typescript/components/Dialog/styles.d.ts.map +1 -1
- package/lib/typescript/components/Field/index.d.ts +14 -7
- package/lib/typescript/components/Field/index.d.ts.map +1 -1
- package/lib/typescript/components/Field/styles.d.ts.map +1 -1
- package/lib/typescript/components/Form/index.d.ts +4 -4
- package/lib/typescript/components/Form/index.d.ts.map +1 -1
- package/lib/typescript/components/Heading/styles.d.ts +1 -1
- package/lib/typescript/components/Icon/index.d.ts +5 -5
- package/lib/typescript/components/Icon/index.d.ts.map +1 -1
- package/lib/typescript/components/IconButton/index.d.ts +3 -3
- package/lib/typescript/components/IconButton/index.d.ts.map +1 -1
- package/lib/typescript/components/IconButton/styles.d.ts +6 -2
- package/lib/typescript/components/IconButton/styles.d.ts.map +1 -1
- package/lib/typescript/components/Input/index.d.ts +11 -3
- package/lib/typescript/components/Input/index.d.ts.map +1 -1
- package/lib/typescript/components/Input/styles.d.ts.map +1 -1
- package/lib/typescript/components/Link/index.d.ts +4 -2
- package/lib/typescript/components/Link/index.d.ts.map +1 -1
- package/lib/typescript/components/Link/styles.d.ts +9 -2
- package/lib/typescript/components/Link/styles.d.ts.map +1 -1
- package/lib/typescript/components/ListItem/index.d.ts +28 -6
- package/lib/typescript/components/ListItem/index.d.ts.map +1 -1
- package/lib/typescript/components/ListItem/styles.d.ts +3 -10
- package/lib/typescript/components/ListItem/styles.d.ts.map +1 -1
- package/lib/typescript/components/OtpInput/index.d.ts +1 -1
- package/lib/typescript/components/OtpInput/index.d.ts.map +1 -1
- package/lib/typescript/components/ProgressBar/index.d.ts +4 -4
- package/lib/typescript/components/ProgressBar/index.d.ts.map +1 -1
- package/lib/typescript/components/ProgressSegmented/index.d.ts +14 -3
- package/lib/typescript/components/ProgressSegmented/index.d.ts.map +1 -1
- package/lib/typescript/components/Radio/index.d.ts +44 -0
- package/lib/typescript/components/Radio/index.d.ts.map +1 -0
- package/lib/typescript/components/Radio/styles.d.ts +8 -0
- package/lib/typescript/components/Radio/styles.d.ts.map +1 -0
- package/lib/typescript/components/ScopedTheme/index.d.ts +16 -0
- package/lib/typescript/components/ScopedTheme/index.d.ts.map +1 -0
- package/lib/typescript/components/Select/index.d.ts +35 -2
- package/lib/typescript/components/Select/index.d.ts.map +1 -1
- package/lib/typescript/components/Select/styles.d.ts.map +1 -1
- package/lib/typescript/components/Skeleton/index.d.ts +9 -0
- package/lib/typescript/components/Skeleton/index.d.ts.map +1 -0
- package/lib/typescript/components/Skeleton/styles.d.ts +4 -0
- package/lib/typescript/components/Skeleton/styles.d.ts.map +1 -0
- package/lib/typescript/components/Stack/styles.d.ts +2 -2
- package/lib/typescript/components/Switch/BaseSwitch.d.ts +12 -5
- package/lib/typescript/components/Switch/BaseSwitch.d.ts.map +1 -1
- package/lib/typescript/components/Switch/BaseSwitch.web.d.ts +11 -5
- package/lib/typescript/components/Switch/BaseSwitch.web.d.ts.map +1 -1
- package/lib/typescript/components/Switch/index.d.ts +5 -1
- package/lib/typescript/components/Switch/index.d.ts.map +1 -1
- package/lib/typescript/components/Text/styles.d.ts +1 -1
- package/lib/typescript/components/Tile/index.d.ts +76 -0
- package/lib/typescript/components/Tile/index.d.ts.map +1 -0
- package/lib/typescript/components/Tile/styles.d.ts +18 -0
- package/lib/typescript/components/Tile/styles.d.ts.map +1 -0
- package/lib/typescript/components/VirtualizedList/index.d.ts +2 -1
- package/lib/typescript/components/VirtualizedList/index.d.ts.map +1 -1
- package/lib/typescript/components/index.d.ts +4 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/figma/AlertDialog.Description.figma.d.ts +8 -0
- package/lib/typescript/figma/AlertDialog.Description.figma.d.ts.map +1 -0
- package/lib/typescript/figma/AlertDialog.Footer.figma.d.ts +8 -0
- package/lib/typescript/figma/AlertDialog.Footer.figma.d.ts.map +1 -0
- package/lib/typescript/figma/AlertDialog.Header.figma.d.ts +8 -0
- package/lib/typescript/figma/AlertDialog.Header.figma.d.ts.map +1 -0
- package/lib/typescript/figma/AlertDialog.Text.figma.d.ts +8 -0
- package/lib/typescript/figma/AlertDialog.Text.figma.d.ts.map +1 -0
- package/lib/typescript/figma/AlertDialog.Title.figma.d.ts +8 -0
- package/lib/typescript/figma/AlertDialog.Title.figma.d.ts.map +1 -0
- package/lib/typescript/figma/AlertDialog.figma.d.ts +8 -0
- package/lib/typescript/figma/AlertDialog.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Avatar.figma.d.ts +11 -0
- package/lib/typescript/figma/Avatar.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Button.figma.d.ts.map +1 -1
- package/lib/typescript/figma/Card.Header.figma.d.ts +8 -0
- package/lib/typescript/figma/Card.Header.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Card.figma.d.ts +8 -0
- package/lib/typescript/figma/Card.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Checkbox.figma.d.ts +8 -0
- package/lib/typescript/figma/Checkbox.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Chip.figma.d.ts +8 -0
- package/lib/typescript/figma/Chip.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Dialog.Description.figma.d.ts +8 -0
- package/lib/typescript/figma/Dialog.Description.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Dialog.Footer.figma.d.ts +8 -0
- package/lib/typescript/figma/Dialog.Footer.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Dialog.Header.figma.d.ts +8 -0
- package/lib/typescript/figma/Dialog.Header.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Dialog.Text.figma.d.ts +8 -0
- package/lib/typescript/figma/Dialog.Text.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Dialog.Title.figma.d.ts +8 -0
- package/lib/typescript/figma/Dialog.Title.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Dialog.figma.d.ts +8 -0
- package/lib/typescript/figma/Dialog.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Field.Input.figma.d.ts +8 -0
- package/lib/typescript/figma/Field.Input.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Field.Select.figma.d.ts +8 -0
- package/lib/typescript/figma/Field.Select.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Heading.figma.d.ts +8 -0
- package/lib/typescript/figma/Heading.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Icon.figma.d.ts +8 -0
- package/lib/typescript/figma/Icon.figma.d.ts.map +1 -0
- package/lib/typescript/figma/IconButton.figma.d.ts +8 -0
- package/lib/typescript/figma/IconButton.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Input.figma.d.ts +8 -0
- package/lib/typescript/figma/Input.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Link.figma.d.ts +8 -0
- package/lib/typescript/figma/Link.figma.d.ts.map +1 -0
- package/lib/typescript/figma/ListItem.Description.figma.d.ts +11 -0
- package/lib/typescript/figma/ListItem.Description.figma.d.ts.map +1 -0
- package/lib/typescript/figma/ListItem.LeadingSlot.figma.d.ts +8 -0
- package/lib/typescript/figma/ListItem.LeadingSlot.figma.d.ts.map +1 -0
- package/lib/typescript/figma/ListItem.Meta.figma.d.ts +11 -0
- package/lib/typescript/figma/ListItem.Meta.figma.d.ts.map +1 -0
- package/lib/typescript/figma/ListItem.SectionHeader.figma.d.ts +8 -0
- package/lib/typescript/figma/ListItem.SectionHeader.figma.d.ts.map +1 -0
- package/lib/typescript/figma/ListItem.Title.figma.d.ts +11 -0
- package/lib/typescript/figma/ListItem.Title.figma.d.ts.map +1 -0
- package/lib/typescript/figma/ListItem.TrailingSlot.figma.d.ts +8 -0
- package/lib/typescript/figma/ListItem.TrailingSlot.figma.d.ts.map +1 -0
- package/lib/typescript/figma/ListItem.figma.d.ts +8 -0
- package/lib/typescript/figma/ListItem.figma.d.ts.map +1 -0
- package/lib/typescript/figma/ProgressSegmented.figma.d.ts +8 -0
- package/lib/typescript/figma/ProgressSegmented.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Radio.figma.d.ts +8 -0
- package/lib/typescript/figma/Radio.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Select.figma.d.ts +8 -0
- package/lib/typescript/figma/Select.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Text.figma.d.ts +11 -0
- package/lib/typescript/figma/Text.figma.d.ts.map +1 -0
- package/lib/typescript/figma/icons.figma.batch.d.ts +14 -0
- package/lib/typescript/figma/icons.figma.batch.d.ts.map +1 -0
- package/lib/typescript/hooks/index.d.ts +2 -0
- package/lib/typescript/hooks/index.d.ts.map +1 -0
- package/lib/typescript/hooks/useForgeBottomTabScreenOptions.d.ts +137 -0
- package/lib/typescript/hooks/useForgeBottomTabScreenOptions.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/metro/withCdxMetroConfig.d.ts +4 -18
- package/lib/typescript/metro/withCdxMetroConfig.d.ts.map +1 -1
- package/lib/typescript/metro/withForgeMetroConfig.d.ts +19 -0
- package/lib/typescript/metro/withForgeMetroConfig.d.ts.map +1 -0
- package/lib/typescript/navigation/forgeTabIcon.d.ts +27 -0
- package/lib/typescript/navigation/forgeTabIcon.d.ts.map +1 -0
- package/lib/typescript/navigation/forgeTabIcon.native.d.ts +15 -0
- package/lib/typescript/navigation/forgeTabIcon.native.d.ts.map +1 -0
- package/lib/typescript/navigation/index.d.ts +4 -0
- package/lib/typescript/navigation/index.d.ts.map +1 -0
- package/lib/typescript/navigation/types.d.ts +37 -0
- package/lib/typescript/navigation/types.d.ts.map +1 -0
- package/lib/typescript/styles/primitives.d.ts +38 -0
- package/lib/typescript/styles/primitives.d.ts.map +1 -1
- package/lib/typescript/utils/positionToDataIcon.d.ts +29 -0
- package/lib/typescript/utils/positionToDataIcon.d.ts.map +1 -0
- package/package.json +11 -9
- package/src/components/AlertDialog/index.tsx +21 -20
- package/src/components/Avatar/index.tsx +135 -45
- package/src/components/Avatar/styles.ts +49 -34
- package/src/components/Button/index.tsx +253 -47
- package/src/components/Button/styles.ts +78 -37
- package/src/components/CLAUDE.md +194 -0
- package/src/components/Card/index.tsx +41 -16
- package/src/components/Card/styles.ts +42 -15
- package/src/components/Checkbox/index.tsx +101 -51
- package/src/components/Checkbox/styles.ts +84 -86
- package/src/components/Chip/index.tsx +136 -32
- package/src/components/Chip/styles.ts +220 -18
- package/src/components/Dialog/index.tsx +199 -93
- package/src/components/Dialog/styles.ts +72 -30
- package/src/components/Field/index.tsx +121 -50
- package/src/components/Field/styles.ts +5 -4
- package/src/components/Form/index.tsx +18 -14
- package/src/components/Heading/styles.ts +1 -1
- package/src/components/Icon/index.tsx +6 -7
- package/src/components/IconButton/index.tsx +13 -36
- package/src/components/IconButton/styles.ts +136 -10
- package/src/components/Input/index.tsx +75 -32
- package/src/components/Input/styles.ts +15 -9
- package/src/components/Link/index.tsx +57 -18
- package/src/components/Link/styles.ts +49 -9
- package/src/components/ListItem/index.tsx +157 -87
- package/src/components/ListItem/styles.ts +50 -81
- package/src/components/OtpInput/index.tsx +126 -43
- package/src/components/ProgressBar/index.tsx +11 -16
- package/src/components/ProgressSegmented/index.tsx +50 -14
- package/src/components/Radio/index.tsx +214 -0
- package/src/components/Radio/styles.ts +59 -0
- package/src/components/ScopedTheme/index.tsx +17 -0
- package/src/components/Select/index.tsx +175 -55
- package/src/components/Select/styles.ts +48 -51
- package/src/components/Skeleton/index.tsx +42 -0
- package/src/components/Skeleton/styles.ts +5 -0
- package/src/components/Switch/BaseSwitch.tsx +38 -16
- package/src/components/Switch/BaseSwitch.web.tsx +28 -35
- package/src/components/Switch/index.tsx +51 -4
- package/src/components/Text/styles.ts +2 -2
- package/src/components/Tile/index.tsx +347 -0
- package/src/components/Tile/styles.ts +82 -0
- package/src/components/VirtualizedList/index.tsx +11 -1
- package/src/components/index.ts +4 -0
- package/src/hooks/index.ts +5 -0
- package/src/hooks/useForgeBottomTabScreenOptions.ts +245 -0
- package/src/index.ts +2 -0
- package/src/metro/withCdxMetroConfig.ts +4 -29
- package/src/metro/withForgeMetroConfig.ts +29 -0
- package/src/navigation/forgeTabIcon.native.ts +36 -0
- package/src/navigation/forgeTabIcon.ts +33 -0
- package/src/navigation/index.ts +3 -0
- package/src/navigation/types.ts +54 -0
- package/src/styles/primitives.ts +43 -6
- package/src/utils/positionToDataIcon.ts +34 -0
- package/lib/commonjs/components/Field/FieldLabel.js +0 -33
- package/lib/commonjs/components/Field/FieldLabel.js.map +0 -1
- package/lib/commonjs/components/Field/FieldLabel.web.js +0 -22
- package/lib/commonjs/components/Field/FieldLabel.web.js.map +0 -1
- package/lib/commonjs/components/Form/FormRoot.js +0 -25
- package/lib/commonjs/components/Form/FormRoot.js.map +0 -1
- package/lib/commonjs/components/Form/FormRoot.web.js +0 -17
- package/lib/commonjs/components/Form/FormRoot.web.js.map +0 -1
- package/lib/commonjs/components/Input/BaseInput.android.js +0 -20
- package/lib/commonjs/components/Input/BaseInput.android.js.map +0 -1
- package/lib/commonjs/components/Input/BaseInput.js +0 -13
- package/lib/commonjs/components/Input/BaseInput.js.map +0 -1
- package/lib/commonjs/components/Input/BaseInput.web.js +0 -50
- package/lib/commonjs/components/Input/BaseInput.web.js.map +0 -1
- package/lib/commonjs/components/Select/SelectTriggerHost.js +0 -10
- package/lib/commonjs/components/Select/SelectTriggerHost.js.map +0 -1
- package/lib/commonjs/components/Select/SelectTriggerHost.web.js +0 -98
- package/lib/commonjs/components/Select/SelectTriggerHost.web.js.map +0 -1
- package/lib/module/components/Field/FieldLabel.js +0 -29
- package/lib/module/components/Field/FieldLabel.js.map +0 -1
- package/lib/module/components/Field/FieldLabel.web.js +0 -17
- package/lib/module/components/Field/FieldLabel.web.js.map +0 -1
- package/lib/module/components/Form/FormRoot.js +0 -21
- package/lib/module/components/Form/FormRoot.js.map +0 -1
- package/lib/module/components/Form/FormRoot.web.js +0 -12
- package/lib/module/components/Form/FormRoot.web.js.map +0 -1
- package/lib/module/components/Input/BaseInput.android.js +0 -16
- package/lib/module/components/Input/BaseInput.android.js.map +0 -1
- package/lib/module/components/Input/BaseInput.js +0 -4
- package/lib/module/components/Input/BaseInput.js.map +0 -1
- package/lib/module/components/Input/BaseInput.web.js +0 -45
- package/lib/module/components/Input/BaseInput.web.js.map +0 -1
- package/lib/module/components/Select/SelectTriggerHost.js +0 -7
- package/lib/module/components/Select/SelectTriggerHost.js.map +0 -1
- package/lib/module/components/Select/SelectTriggerHost.web.js +0 -93
- package/lib/module/components/Select/SelectTriggerHost.web.js.map +0 -1
- package/lib/typescript/components/Field/FieldLabel.d.ts +0 -18
- package/lib/typescript/components/Field/FieldLabel.d.ts.map +0 -1
- package/lib/typescript/components/Field/FieldLabel.web.d.ts +0 -16
- package/lib/typescript/components/Field/FieldLabel.web.d.ts.map +0 -1
- package/lib/typescript/components/Form/FormRoot.d.ts +0 -14
- package/lib/typescript/components/Form/FormRoot.d.ts.map +0 -1
- package/lib/typescript/components/Form/FormRoot.web.d.ts +0 -10
- package/lib/typescript/components/Form/FormRoot.web.d.ts.map +0 -1
- package/lib/typescript/components/Input/BaseInput.android.d.ts +0 -3
- package/lib/typescript/components/Input/BaseInput.android.d.ts.map +0 -1
- package/lib/typescript/components/Input/BaseInput.d.ts +0 -2
- package/lib/typescript/components/Input/BaseInput.d.ts.map +0 -1
- package/lib/typescript/components/Input/BaseInput.web.d.ts +0 -3
- package/lib/typescript/components/Input/BaseInput.web.d.ts.map +0 -1
- package/lib/typescript/components/Select/SelectTriggerHost.d.ts +0 -3
- package/lib/typescript/components/Select/SelectTriggerHost.d.ts.map +0 -1
- package/lib/typescript/components/Select/SelectTriggerHost.web.d.ts +0 -13
- package/lib/typescript/components/Select/SelectTriggerHost.web.d.ts.map +0 -1
- package/src/components/Field/FieldLabel.tsx +0 -33
- package/src/components/Field/FieldLabel.web.tsx +0 -25
- package/src/components/Form/FormRoot.tsx +0 -20
- package/src/components/Form/FormRoot.web.tsx +0 -12
- package/src/components/Input/BaseInput.android.tsx +0 -13
- package/src/components/Input/BaseInput.tsx +0 -1
- package/src/components/Input/BaseInput.web.tsx +0 -41
- package/src/components/Select/SelectTriggerHost.tsx +0 -4
- package/src/components/Select/SelectTriggerHost.web.tsx +0 -136
|
@@ -10,24 +10,14 @@ var _icons = require("@cdx-ui/icons");
|
|
|
10
10
|
var _primitives = require("@cdx-ui/primitives");
|
|
11
11
|
var _utils = require("@cdx-ui/utils");
|
|
12
12
|
var _Icon = require("../Icon");
|
|
13
|
-
var
|
|
13
|
+
var _positionToDataIcon = require("../../utils/positionToDataIcon");
|
|
14
14
|
var _styles = require("./styles");
|
|
15
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
16
|
const SCOPE = 'SELECT';
|
|
17
|
-
const Root = (0, _utils.withStyleContext)(_reactNative.View, SCOPE);
|
|
18
17
|
const useSelectStyleContext = () => (0, _utils.useStyleContext)(SCOPE);
|
|
19
|
-
const SelectPrimitive = (0, _primitives.createSelect)({
|
|
20
|
-
Root,
|
|
21
|
-
Trigger: _SelectTriggerHost.SelectTriggerHost,
|
|
22
|
-
Value: _reactNative.Text,
|
|
23
|
-
Icon: _reactNative.View,
|
|
24
|
-
Content: _reactNative.View,
|
|
25
|
-
Item: _reactNative.Pressable,
|
|
26
|
-
ItemLabel: _reactNative.Text
|
|
27
|
-
});
|
|
28
18
|
|
|
29
19
|
// =============================================================================
|
|
30
|
-
// STYLED ROOT
|
|
20
|
+
// STYLED ROOT
|
|
31
21
|
// =============================================================================
|
|
32
22
|
|
|
33
23
|
const SelectRoot = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
@@ -38,121 +28,188 @@ const SelectRoot = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
38
28
|
style,
|
|
39
29
|
...props
|
|
40
30
|
}, ref) => {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
context: {
|
|
31
|
+
const parent = (0, _utils.useParentContext)();
|
|
32
|
+
const ctx = (0, _react.useMemo)(() => ({
|
|
33
|
+
...parent,
|
|
34
|
+
[SCOPE]: {
|
|
46
35
|
variant,
|
|
47
36
|
size
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
37
|
+
}
|
|
38
|
+
}), [parent, variant, size]);
|
|
39
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_utils.ParentContext.Provider, {
|
|
40
|
+
value: ctx,
|
|
41
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.SelectRoot, {
|
|
42
|
+
ref: ref,
|
|
43
|
+
className: className,
|
|
44
|
+
style: style,
|
|
45
|
+
...props,
|
|
46
|
+
...(0, _primitives.mergeDataAttributes)(props, (0, _primitives.dataAttributes)({
|
|
47
|
+
slot: 'select'
|
|
48
|
+
})),
|
|
49
|
+
children: children
|
|
50
|
+
})
|
|
51
51
|
});
|
|
52
52
|
});
|
|
53
53
|
SelectRoot.displayName = 'Select';
|
|
54
54
|
|
|
55
55
|
// =============================================================================
|
|
56
|
-
// STYLED TRIGGER
|
|
56
|
+
// STYLED TRIGGER
|
|
57
57
|
// =============================================================================
|
|
58
58
|
|
|
59
59
|
const SelectTrigger = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
60
|
+
asChild,
|
|
60
61
|
className,
|
|
61
62
|
children,
|
|
62
63
|
style,
|
|
63
64
|
...props
|
|
64
65
|
}, ref) => {
|
|
66
|
+
const {
|
|
67
|
+
open
|
|
68
|
+
} = (0, _primitives.useSelectContext)();
|
|
65
69
|
const {
|
|
66
70
|
variant,
|
|
67
71
|
size
|
|
68
72
|
} = useSelectStyleContext();
|
|
69
|
-
const computedClassName = (0, _utils.cn)((0, _styles.selectTriggerVariants)({
|
|
73
|
+
const computedClassName = asChild ? className : (0, _utils.cn)((0, _styles.selectTriggerVariants)({
|
|
70
74
|
variant,
|
|
71
75
|
size
|
|
72
76
|
}), className);
|
|
73
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
77
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.SelectTrigger, {
|
|
74
78
|
ref: ref,
|
|
79
|
+
asChild: asChild,
|
|
75
80
|
className: computedClassName,
|
|
76
81
|
style: style,
|
|
77
82
|
...props,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
})
|
|
83
|
+
...(0, _primitives.mergeDataAttributes)(props, (0, _primitives.dataAttributes)({
|
|
84
|
+
slot: 'select-trigger'
|
|
85
|
+
})),
|
|
86
|
+
children: asChild ? children : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
87
|
+
children: [children, /*#__PURE__*/(0, _jsxRuntime.jsx)(SelectIcon, {
|
|
88
|
+
as: open ? _icons.KeyboardArrowUp : _icons.KeyboardArrowDown
|
|
89
|
+
})]
|
|
90
|
+
})
|
|
81
91
|
});
|
|
82
92
|
});
|
|
83
93
|
SelectTrigger.displayName = 'Select.Trigger';
|
|
84
94
|
|
|
85
95
|
// =============================================================================
|
|
86
|
-
// STYLED VALUE
|
|
96
|
+
// STYLED VALUE (styled-only)
|
|
87
97
|
// =============================================================================
|
|
88
98
|
|
|
89
99
|
const SelectValue = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
100
|
+
asChild,
|
|
90
101
|
className,
|
|
91
102
|
style,
|
|
103
|
+
placeholder,
|
|
104
|
+
children,
|
|
92
105
|
...props
|
|
93
106
|
}, ref) => {
|
|
94
107
|
const {
|
|
95
108
|
size
|
|
96
109
|
} = useSelectStyleContext();
|
|
110
|
+
const {
|
|
111
|
+
value,
|
|
112
|
+
items,
|
|
113
|
+
invalid
|
|
114
|
+
} = (0, _primitives.useSelectContext)();
|
|
115
|
+
const hasValue = value !== undefined && value !== '';
|
|
116
|
+
const showPlaceholder = !hasValue;
|
|
117
|
+
const displayText = hasValue ? items.find(item => item.value === value)?.label : placeholder;
|
|
97
118
|
const computedClassName = (0, _utils.cn)((0, _styles.selectValueVariants)({
|
|
98
119
|
size
|
|
99
120
|
}), className);
|
|
100
|
-
|
|
121
|
+
const Comp = asChild ? _primitives.Slot : _reactNative.Text;
|
|
122
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, {
|
|
101
123
|
ref: ref,
|
|
102
124
|
className: computedClassName,
|
|
103
125
|
style: style,
|
|
104
|
-
...props
|
|
126
|
+
...props,
|
|
127
|
+
...(0, _primitives.mergeDataAttributes)(props, (0, _primitives.dataAttributes)({
|
|
128
|
+
slot: 'select-value',
|
|
129
|
+
placeholder: showPlaceholder,
|
|
130
|
+
invalid
|
|
131
|
+
})),
|
|
132
|
+
children: children ?? displayText
|
|
105
133
|
});
|
|
106
134
|
});
|
|
107
135
|
SelectValue.displayName = 'Select.Value';
|
|
108
136
|
|
|
109
137
|
// =============================================================================
|
|
110
|
-
// STYLED ICON
|
|
138
|
+
// STYLED ICON (styled-only, reads context for state=open / invalid)
|
|
111
139
|
// =============================================================================
|
|
112
140
|
|
|
113
141
|
const SelectIcon = ({
|
|
142
|
+
asChild,
|
|
114
143
|
className,
|
|
115
144
|
style,
|
|
145
|
+
as,
|
|
146
|
+
position,
|
|
116
147
|
...props
|
|
117
148
|
}) => {
|
|
118
149
|
const {
|
|
119
150
|
size
|
|
120
151
|
} = useSelectStyleContext();
|
|
152
|
+
const {
|
|
153
|
+
invalid
|
|
154
|
+
} = (0, _primitives.useSelectContext)();
|
|
121
155
|
const computedClassName = (0, _utils.cn)((0, _styles.selectIconVariants)({
|
|
122
156
|
size
|
|
123
157
|
}), className);
|
|
158
|
+
const slotData = (0, _primitives.mergeDataAttributes)(props, (0, _primitives.dataAttributes)({
|
|
159
|
+
slot: 'select-icon',
|
|
160
|
+
invalid
|
|
161
|
+
}), (0, _positionToDataIcon.positionToDataIcon)(position));
|
|
162
|
+
if (asChild) {
|
|
163
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.Slot, {
|
|
164
|
+
className: computedClassName,
|
|
165
|
+
style: style,
|
|
166
|
+
...props,
|
|
167
|
+
...slotData
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
if (!as) {
|
|
171
|
+
return null;
|
|
172
|
+
}
|
|
124
173
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
174
|
+
as: as,
|
|
125
175
|
className: computedClassName,
|
|
126
176
|
style: style,
|
|
127
|
-
...props
|
|
177
|
+
...props,
|
|
178
|
+
...slotData
|
|
128
179
|
});
|
|
129
180
|
};
|
|
130
181
|
SelectIcon.displayName = 'Select.Icon';
|
|
131
182
|
|
|
132
183
|
// =============================================================================
|
|
133
|
-
// STYLED CONTENT
|
|
184
|
+
// STYLED CONTENT
|
|
134
185
|
// =============================================================================
|
|
135
186
|
|
|
136
187
|
const SelectContent = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
188
|
+
asChild,
|
|
137
189
|
className,
|
|
138
190
|
style,
|
|
139
191
|
...props
|
|
140
192
|
}, ref) => {
|
|
141
193
|
const computedClassName = (0, _utils.cn)((0, _styles.selectContentVariants)(), className);
|
|
142
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
194
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.SelectContent, {
|
|
143
195
|
ref: ref,
|
|
196
|
+
asChild: asChild,
|
|
144
197
|
className: computedClassName,
|
|
145
198
|
style: style,
|
|
146
|
-
...props
|
|
199
|
+
...props,
|
|
200
|
+
...(0, _primitives.mergeDataAttributes)(props, (0, _primitives.dataAttributes)({
|
|
201
|
+
slot: 'select-content'
|
|
202
|
+
}))
|
|
147
203
|
});
|
|
148
204
|
});
|
|
149
205
|
SelectContent.displayName = 'Select.Content';
|
|
150
206
|
|
|
151
207
|
// =============================================================================
|
|
152
|
-
// STYLED ITEM
|
|
208
|
+
// STYLED ITEM
|
|
153
209
|
// =============================================================================
|
|
154
210
|
|
|
155
211
|
const SelectItem = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
212
|
+
asChild,
|
|
156
213
|
className,
|
|
157
214
|
children,
|
|
158
215
|
style,
|
|
@@ -164,36 +221,51 @@ const SelectItem = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
164
221
|
const computedClassName = (0, _utils.cn)((0, _styles.selectItemVariants)({
|
|
165
222
|
size
|
|
166
223
|
}), className);
|
|
167
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
224
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.SelectItem, {
|
|
168
225
|
ref: ref,
|
|
226
|
+
asChild: asChild,
|
|
169
227
|
className: computedClassName,
|
|
170
228
|
style: style,
|
|
171
229
|
...props,
|
|
230
|
+
...(0, _primitives.mergeDataAttributes)(props, (0, _primitives.dataAttributes)({
|
|
231
|
+
slot: 'select-item'
|
|
232
|
+
})),
|
|
172
233
|
children: children
|
|
173
234
|
});
|
|
174
235
|
});
|
|
175
236
|
SelectItem.displayName = 'Select.Item';
|
|
176
237
|
|
|
177
238
|
// =============================================================================
|
|
178
|
-
// STYLED ITEM LABEL
|
|
239
|
+
// STYLED ITEM LABEL (styled-only, reads item context for checked state)
|
|
179
240
|
// =============================================================================
|
|
180
241
|
|
|
181
242
|
const SelectItemLabel = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
243
|
+
asChild,
|
|
182
244
|
className,
|
|
183
245
|
style,
|
|
246
|
+
children,
|
|
184
247
|
...props
|
|
185
248
|
}, ref) => {
|
|
186
249
|
const {
|
|
187
250
|
size
|
|
188
251
|
} = useSelectStyleContext();
|
|
252
|
+
const {
|
|
253
|
+
checked
|
|
254
|
+
} = (0, _primitives.useSelectItemContext)();
|
|
189
255
|
const computedClassName = (0, _utils.cn)((0, _styles.selectItemLabelVariants)({
|
|
190
256
|
size
|
|
191
257
|
}), className);
|
|
192
|
-
|
|
258
|
+
const Comp = asChild ? _primitives.Slot : _reactNative.Text;
|
|
259
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, {
|
|
193
260
|
ref: ref,
|
|
194
261
|
className: computedClassName,
|
|
195
262
|
style: style,
|
|
196
|
-
...props
|
|
263
|
+
...props,
|
|
264
|
+
...(0, _primitives.mergeDataAttributes)(props, (0, _primitives.dataAttributes)({
|
|
265
|
+
slot: 'select-item-label',
|
|
266
|
+
state: checked ? 'checked' : 'unchecked'
|
|
267
|
+
})),
|
|
268
|
+
children: children
|
|
197
269
|
});
|
|
198
270
|
});
|
|
199
271
|
SelectItemLabel.displayName = 'Select.ItemLabel';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_icons","_primitives","_utils","_Icon","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_icons","_primitives","_utils","_Icon","_positionToDataIcon","_styles","_jsxRuntime","SCOPE","useSelectStyleContext","useStyleContext","SelectRoot","forwardRef","variant","size","className","children","style","props","ref","parent","useParentContext","ctx","useMemo","jsx","ParentContext","Provider","value","mergeDataAttributes","dataAttributes","slot","displayName","SelectTrigger","asChild","open","useSelectContext","computedClassName","cn","selectTriggerVariants","jsxs","Fragment","SelectIcon","as","KeyboardArrowUp","KeyboardArrowDown","SelectValue","placeholder","items","invalid","hasValue","undefined","showPlaceholder","displayText","find","item","label","selectValueVariants","Comp","Slot","Text","position","selectIconVariants","slotData","positionToDataIcon","Icon","SelectContent","selectContentVariants","SelectItem","selectItemVariants","SelectItemLabel","checked","useSelectItemContext","selectItemLabelVariants","state","Select","exports","Object","assign","Trigger","Value","Content","Item","ItemLabel"],"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,WAAA,GAAAH,OAAA;AAiBA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,mBAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AAQkB,IAAAQ,WAAA,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,CAAC,GAAG,IAAAC,gCAAoB,EAAC,CAAC;EAE1C,MAAMnC,iBAAiB,GAAG,IAAAC,SAAE,EAAC,IAAAmC,+BAAuB,EAAC;IAAE1D;EAAK,CAAC,CAAC,EAAEC,SAAS,CAAC;EAC1E,MAAM0C,IAAI,GAAGxB,OAAO,GAAGyB,gBAAI,GAAGC,iBAAI;EAElC,oBACE,IAAApD,WAAA,CAAAiB,GAAA,EAACiC,IAAI;IACHtC,GAAG,EAAEA,GAAI;IACTJ,SAAS,EAAEqB,iBAAkB;IAC7BnB,KAAK,EAAEA,KAAM;IAAA,GACTC,KAAK;IAAA,GACL,IAAAU,+BAAmB,EACrBV,KAAK,EACL,IAAAW,0BAAc,EAAC;MACbC,IAAI,EAAE,mBAAmB;MACzB2C,KAAK,EAAEH,OAAO,GAAG,SAAS,GAAG;IAC/B,CAAC,CACH,CAAC;IAAAtD,QAAA,EAEAA;EAAQ,CACL,CAAC;AAEX,CACF,CAAC;AAEDqD,eAAe,CAACtC,WAAW,GAAG,kBAAkB;;AAEhD;AACA;AACA;;AAWO,MAAM2C,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAGE,MAAM,CAACC,MAAM,CAAClE,UAAU,EAAE;EAC9CmE,OAAO,EAAE9C,aAAa;EACtB+C,KAAK,EAAElC,WAAW;EAClBmB,IAAI,EAAEvB,UAAU;EAChBuC,OAAO,EAAEf,aAAa;EACtBgB,IAAI,EAAEd,UAAU;EAChBe,SAAS,EAAEb;AACb,CAAC,CAA4B","ignoreList":[]}
|
|
@@ -9,17 +9,14 @@ var _classVarianceAuthority = require("class-variance-authority");
|
|
|
9
9
|
var _primitives = require("../../styles/primitives");
|
|
10
10
|
// ── Trigger ─────────────────────────────────────────────────
|
|
11
11
|
|
|
12
|
-
const selectTriggerVariants = exports.selectTriggerVariants = (0, _classVarianceAuthority.cva)(['flex w-full min-w-0 flex-row items-center justify-between text-start',
|
|
13
|
-
default: 'data-[active=true]:border-slate-300',
|
|
14
|
-
web: ['data-[hover=true]:border-slate-300 data-[active=true]:data-[hover=true]:border-slate-400', 'data-[focus-visible=true]:ring-2 data-[focus-visible=true]:ring-slate-400/50 data-[focus-visible=true]:ring-offset-2', 'data-[state=open]:ring-2 data-[state=open]:ring-slate-400/50'].join(' ')
|
|
15
|
-
})], {
|
|
12
|
+
const selectTriggerVariants = exports.selectTriggerVariants = (0, _classVarianceAuthority.cva)(['flex w-full min-w-0 flex-row items-center justify-between text-start', 'bg-surface-primary', 'border border-stroke-primary', 'rounded-[var(--border-radius-default)]', _primitives.TRANSITION_COLORS, 'data-[disabled=true]:bg-surface-secondary', 'data-[disabled=true]:opacity-[var(--opacity-disabled)]', _primitives.DISABLED_CURSOR, 'data-[readonly=true]:cursor-default', 'data-[readonly=true]:bg-surface-secondary', 'web:hover:data-[focus=false]:data-[invalid=false]:border-stroke-hover', 'data-[focus=true]:border-[length:var(--border-width-focused)]', 'data-[focus=true]:data-[invalid=false]:border-stroke-action', 'data-[focus=true]:data-[invalid=true]:border-stroke-danger', 'data-[state=open]:border-[length:var(--border-width-focused)]', 'data-[state=open]:data-[invalid=false]:border-stroke-action', 'data-[state=open]:data-[invalid=true]:border-stroke-danger', 'data-[invalid=true]:border-stroke-danger'], {
|
|
16
13
|
variants: {
|
|
17
14
|
variant: {
|
|
18
15
|
outline: []
|
|
19
16
|
},
|
|
20
17
|
size: {
|
|
21
|
-
default:
|
|
22
|
-
small:
|
|
18
|
+
default: ['h-11 min-h-11 px-4 py-3 gap-4', 'data-[focus=true]:px-[calc(var(--spacing-4)-var(--spacing-px))]', 'data-[focus=true]:py-[calc(var(--spacing-3)-var(--spacing-px))]', 'data-[state=open]:px-[calc(var(--spacing-4)-var(--spacing-px))]', 'data-[state=open]:py-[calc(var(--spacing-3)-var(--spacing-px))]'],
|
|
19
|
+
small: ['h-8 min-h-8 px-3 py-2 gap-1.5', 'data-[focus=true]:px-[calc(var(--spacing-3)-var(--spacing-px))]', 'data-[focus=true]:py-[calc(var(--spacing-2)-var(--spacing-px))]', 'data-[state=open]:px-[calc(var(--spacing-3)-var(--spacing-px))]', 'data-[state=open]:py-[calc(var(--spacing-2)-var(--spacing-px))]']
|
|
23
20
|
}
|
|
24
21
|
},
|
|
25
22
|
defaultVariants: {
|
|
@@ -30,11 +27,11 @@ const selectTriggerVariants = exports.selectTriggerVariants = (0, _classVariance
|
|
|
30
27
|
|
|
31
28
|
// ── Value ───────────────────────────────────────────────────
|
|
32
29
|
|
|
33
|
-
const selectValueVariants = exports.selectValueVariants = (0, _classVarianceAuthority.cva)(['min-w-0 flex-1 text-start', 'data-[placeholder=true]:text-
|
|
30
|
+
const selectValueVariants = exports.selectValueVariants = (0, _classVarianceAuthority.cva)(['min-w-0 flex-1 text-start', 'text-content-primary', 'data-[placeholder=true]:text-content-tertiary', 'data-[invalid=true]:text-content-danger'], {
|
|
34
31
|
variants: {
|
|
35
32
|
size: {
|
|
36
|
-
default:
|
|
37
|
-
small:
|
|
33
|
+
default: 'text-[0.875rem]',
|
|
34
|
+
small: 'text-[0.75rem]'
|
|
38
35
|
}
|
|
39
36
|
},
|
|
40
37
|
defaultVariants: {
|
|
@@ -44,11 +41,11 @@ const selectValueVariants = exports.selectValueVariants = (0, _classVarianceAuth
|
|
|
44
41
|
|
|
45
42
|
// ── Icon ────────────────────────────────────────────────────
|
|
46
43
|
|
|
47
|
-
const selectIconVariants = exports.selectIconVariants = (0, _classVarianceAuthority.cva)(['shrink-0 items-center justify-center self-center',
|
|
44
|
+
const selectIconVariants = exports.selectIconVariants = (0, _classVarianceAuthority.cva)(['shrink-0 items-center justify-center self-center', 'text-content-tertiary', 'data-[invalid=true]:text-content-danger'], {
|
|
48
45
|
variants: {
|
|
49
46
|
size: {
|
|
50
|
-
default: '
|
|
51
|
-
small: '
|
|
47
|
+
default: 'size-5',
|
|
48
|
+
small: 'size-4'
|
|
52
49
|
}
|
|
53
50
|
},
|
|
54
51
|
defaultVariants: {
|
|
@@ -58,16 +55,16 @@ const selectIconVariants = exports.selectIconVariants = (0, _classVarianceAuthor
|
|
|
58
55
|
|
|
59
56
|
// ── Content ─────────────────────────────────────────────────
|
|
60
57
|
|
|
61
|
-
const selectContentVariants = exports.selectContentVariants = (0, _classVarianceAuthority.cva)([
|
|
62
|
-
web:
|
|
58
|
+
const selectContentVariants = exports.selectContentVariants = (0, _classVarianceAuthority.cva)(['bg-surface-primary', 'border border-stroke-secondary', 'overflow-hidden', 'rounded-xl', _reactNative.Platform.select({
|
|
59
|
+
web: 'shadow-sm',
|
|
63
60
|
default: ''
|
|
64
61
|
}), 'max-h-60', 'py-1']);
|
|
65
62
|
|
|
66
63
|
// ── Item ────────────────────────────────────────────────────
|
|
67
64
|
|
|
68
|
-
const selectItemVariants = exports.selectItemVariants = (0, _classVarianceAuthority.cva)(['flex-row items-center', 'transition-colors duration-100', 'data-[disabled=true]:opacity-50 data-[disabled=true]:pointer-events-none', 'data-[state=checked]:bg-
|
|
69
|
-
default: 'data-[active=true]:bg-
|
|
70
|
-
web: 'data-[hover=true]:bg-
|
|
65
|
+
const selectItemVariants = exports.selectItemVariants = (0, _classVarianceAuthority.cva)(['flex-row items-center', 'transition-colors duration-100', 'data-[disabled=true]:opacity-50 data-[disabled=true]:pointer-events-none', 'data-[state=checked]:bg-surface-action-tint data-[state=checked]:font-medium', _reactNative.Platform.select({
|
|
66
|
+
default: 'data-[active=true]:bg-surface-action-tint-active',
|
|
67
|
+
web: 'data-[hover=true]:bg-surface-action-tint-hover data-[active=true]:data-[hover=true]:bg-surface-action-tint-active data-[highlighted=true]:bg-surface-action-tint-hover'
|
|
71
68
|
})], {
|
|
72
69
|
variants: {
|
|
73
70
|
size: {
|
|
@@ -82,11 +79,11 @@ const selectItemVariants = exports.selectItemVariants = (0, _classVarianceAuthor
|
|
|
82
79
|
|
|
83
80
|
// ── ItemLabel ───────────────────────────────────────────────
|
|
84
81
|
|
|
85
|
-
const selectItemLabelVariants = exports.selectItemLabelVariants = (0, _classVarianceAuthority.cva)([
|
|
82
|
+
const selectItemLabelVariants = exports.selectItemLabelVariants = (0, _classVarianceAuthority.cva)(['text-content-primary', 'data-[state=checked]:font-medium'], {
|
|
86
83
|
variants: {
|
|
87
84
|
size: {
|
|
88
|
-
default:
|
|
89
|
-
small:
|
|
85
|
+
default: 'text-[0.875rem]',
|
|
86
|
+
small: 'text-[0.75rem]'
|
|
90
87
|
}
|
|
91
88
|
},
|
|
92
89
|
defaultVariants: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_classVarianceAuthority","_primitives","selectTriggerVariants","exports","cva","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_classVarianceAuthority","_primitives","selectTriggerVariants","exports","cva","TRANSITION_COLORS","DISABLED_CURSOR","variants","variant","outline","size","default","small","defaultVariants","selectValueVariants","selectIconVariants","selectContentVariants","Platform","select","web","selectItemVariants","selectItemLabelVariants"],"sourceRoot":"../../../../src","sources":["components/Select/styles.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAEA;;AAEO,MAAMG,qBAAqB,GAAAC,OAAA,CAAAD,qBAAA,GAAG,IAAAE,2BAAG,EACtC,CACE,sEAAsE,EACtE,oBAAoB,EACpB,8BAA8B,EAC9B,wCAAwC,EACxCC,6BAAiB,EACjB,2CAA2C,EAC3C,wDAAwD,EACxDC,2BAAe,EACf,qCAAqC,EACrC,2CAA2C,EAC3C,uEAAuE,EACvE,+DAA+D,EAC/D,6DAA6D,EAC7D,4DAA4D,EAC5D,+DAA+D,EAC/D,6DAA6D,EAC7D,4DAA4D,EAC5D,0CAA0C,CAC3C,EACD;EACEC,QAAQ,EAAE;IACRC,OAAO,EAAE;MACPC,OAAO,EAAE;IACX,CAAC;IACDC,IAAI,EAAE;MACJC,OAAO,EAAE,CACP,+BAA+B,EAC/B,iEAAiE,EACjE,iEAAiE,EACjE,iEAAiE,EACjE,iEAAiE,CA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AM,CAAC;EACdP,OAAO,EAAE,kDAAkD;EAC3DQ,GAAG,EAAE;AACP,CAAC,CAAC,CACH,EACD;EACEZ,QAAQ,EAAE;IACRG,IAAI,EAAE;MACJC,OAAO,EAAE,WAAW;MACpBC,KAAK,EAAE;IACT;EACF,CAAC;EACDC,eAAe,EAAE;IACfH,IAAI,EAAE;EACR;AACF,CACF,CAAC;;AAED;;AAEO,MAAMW,uBAAuB,GAAAlB,OAAA,CAAAkB,uBAAA,GAAG,IAAAjB,2BAAG,EACxC,CAAC,sBAAsB,EAAE,kCAAkC,CAAC,EAC5D;EACEG,QAAQ,EAAE;IACRG,IAAI,EAAE;MACJC,OAAO,EAAE,iBAAiB;MAC1BC,KAAK,EAAE;IACT;EACF,CAAC;EACDC,eAAe,EAAE;IACfH,IAAI,EAAE;EACR;AACF,CACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Skeleton = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
9
|
+
var _utils = require("@cdx-ui/utils");
|
|
10
|
+
var _styles = require("./styles");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
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); }
|
|
13
|
+
const Skeleton = exports.Skeleton = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
14
|
+
className,
|
|
15
|
+
style,
|
|
16
|
+
duration = 1000,
|
|
17
|
+
...props
|
|
18
|
+
}, ref) => {
|
|
19
|
+
const opacity = (0, _reactNativeReanimated.useSharedValue)(1);
|
|
20
|
+
(0, _react.useEffect)(() => {
|
|
21
|
+
opacity.set((0, _reactNativeReanimated.withRepeat)((0, _reactNativeReanimated.withTiming)(0.35, {
|
|
22
|
+
duration,
|
|
23
|
+
easing: _reactNativeReanimated.Easing.inOut(_reactNativeReanimated.Easing.ease)
|
|
24
|
+
}), -1, true));
|
|
25
|
+
}, [duration, opacity]);
|
|
26
|
+
const animatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
|
27
|
+
opacity: opacity.get()
|
|
28
|
+
}));
|
|
29
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
30
|
+
ref: ref,
|
|
31
|
+
className: (0, _utils.cn)((0, _styles.skeletonVariants)(), className),
|
|
32
|
+
style: [animatedStyle, style],
|
|
33
|
+
...props
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
Skeleton.displayName = 'Skeleton';
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_interopRequireWildcard","_utils","_styles","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Skeleton","exports","forwardRef","className","style","duration","props","ref","opacity","useSharedValue","useEffect","withRepeat","withTiming","easing","Easing","inOut","ease","animatedStyle","useAnimatedStyle","jsx","View","cn","skeletonVariants","displayName"],"sourceRoot":"../../../../src","sources":["components/Skeleton/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,sBAAA,GAAAC,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AEC,GAAG,KAAK;EACxD,MAAMC,OAAO,GAAG,IAAAC,qCAAc,EAAC,CAAC,CAAC;EAEjC,IAAAC,gBAAS,EAAC,MAAM;IACdF,OAAO,CAACd,GAAG,CACT,IAAAiB,iCAAU,EAAC,IAAAC,iCAAU,EAAC,IAAI,EAAE;MAAEP,QAAQ;MAAEQ,MAAM,EAAEC,6BAAM,CAACC,KAAK,CAACD,6BAAM,CAACE,IAAI;IAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,CACxF,CAAC;EACH,CAAC,EAAE,CAACX,QAAQ,EAAEG,OAAO,CAAC,CAAC;EAEvB,MAAMS,aAAa,GAAG,IAAAC,uCAAgB,EAAC,OAAO;IAAEV,OAAO,EAAEA,OAAO,CAACf,GAAG,CAAC;EAAE,CAAC,CAAC,CAAC;EAE1E,oBACE,IAAAb,WAAA,CAAAuC,GAAA,EAAC3C,sBAAA,CAAAe,OAAQ,CAAC6B,IAAI;IACZb,GAAG,EAAEA,GAAI;IACTJ,SAAS,EAAE,IAAAkB,SAAE,EAAC,IAAAC,wBAAgB,EAAC,CAAC,EAAEnB,SAAS,CAAE;IAC7CC,KAAK,EAAE,CAACa,aAAa,EAAEb,KAAK,CAAE;IAAA,GAC1BE;EAAK,CACV,CAAC;AAEN,CACF,CAAC;AAEDN,QAAQ,CAACuB,WAAW,GAAG,UAAU","ignoreList":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.skeletonVariants = void 0;
|
|
7
|
+
var _classVarianceAuthority = require("class-variance-authority");
|
|
8
|
+
const skeletonVariants = exports.skeletonVariants = (0, _classVarianceAuthority.cva)(['bg-surface-neutral-subtle', 'rounded-md']);
|
|
9
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_classVarianceAuthority","require","skeletonVariants","exports","cva"],"sourceRoot":"../../../../src","sources":["components/Skeleton/styles.ts"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,OAAA;AAEO,MAAMC,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG,IAAAE,2BAAG,EAAC,CAAC,2BAA2B,EAAE,YAAY,CAAC,CAAC","ignoreList":[]}
|
|
@@ -6,40 +6,50 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.BaseSwitch = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
+
var _primitives = require("@cdx-ui/primitives");
|
|
9
10
|
var _utils = require("@cdx-ui/utils");
|
|
10
11
|
var _styles = require("./styles");
|
|
11
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
/**
|
|
14
|
+
* Native host for `Switch`. Renders `RNSwitch` with Uniwind className passthrough
|
|
15
|
+
* derived from the resolved interaction state in `switchState`.
|
|
16
|
+
*
|
|
17
|
+
* All state/a11y/interaction machinery lives in the `useSwitch` hook; this file
|
|
18
|
+
* is pure rendering (Standard 3: primitives must not carry styling machinery).
|
|
19
|
+
*/
|
|
12
20
|
const BaseSwitch = exports.BaseSwitch = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
13
|
-
|
|
21
|
+
switchState,
|
|
14
22
|
className,
|
|
15
|
-
|
|
16
|
-
|
|
23
|
+
size: _size,
|
|
24
|
+
onFocus,
|
|
25
|
+
onBlur,
|
|
17
26
|
...props
|
|
18
27
|
}, ref) => {
|
|
19
|
-
const isChecked = value ?? states?.checked ?? false;
|
|
20
|
-
const isDisabled = disabled ?? states?.disabled ?? false;
|
|
21
|
-
const isInvalid = states?.invalid ?? false;
|
|
22
28
|
const uniwindProps = {
|
|
23
29
|
className,
|
|
24
30
|
thumbColorClassName: (0, _utils.cn)((0, _styles.switchThumbColorVariants)({
|
|
25
|
-
isDisabled
|
|
31
|
+
isDisabled: switchState.isDisabled
|
|
26
32
|
})),
|
|
27
33
|
trackColorOnClassName: (0, _utils.cn)((0, _styles.switchTrackOnVariants)({
|
|
28
|
-
isInvalid
|
|
34
|
+
isInvalid: switchState.isInvalid
|
|
29
35
|
})),
|
|
30
36
|
trackColorOffClassName: (0, _utils.cn)((0, _styles.switchTrackOffVariants)({
|
|
31
|
-
isInvalid
|
|
37
|
+
isInvalid: switchState.isInvalid
|
|
32
38
|
})),
|
|
33
39
|
ios_backgroundColorClassName: (0, _utils.cn)((0, _styles.switchIosBgVariants)({
|
|
34
|
-
isInvalid
|
|
40
|
+
isInvalid: switchState.isInvalid
|
|
35
41
|
}))
|
|
36
42
|
};
|
|
37
43
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Switch, {
|
|
38
44
|
ref: ref,
|
|
39
|
-
value:
|
|
40
|
-
disabled: isDisabled,
|
|
45
|
+
value: switchState.checked,
|
|
46
|
+
disabled: switchState.isDisabled,
|
|
47
|
+
onValueChange: switchState.setChecked,
|
|
48
|
+
onFocus: (0, _utils.composeEventHandlers)(onFocus, switchState.focusProps.onFocus),
|
|
49
|
+
onBlur: (0, _utils.composeEventHandlers)(onBlur, switchState.focusProps.onBlur),
|
|
41
50
|
...uniwindProps,
|
|
42
|
-
...props
|
|
51
|
+
...props,
|
|
52
|
+
...(0, _primitives.mergeDataAttributes)(props, switchState.dataAttrs)
|
|
43
53
|
});
|
|
44
54
|
});
|
|
45
55
|
BaseSwitch.displayName = 'BaseSwitch';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_utils","_styles","_jsxRuntime","BaseSwitch","exports","forwardRef","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_primitives","_utils","_styles","_jsxRuntime","BaseSwitch","exports","forwardRef","switchState","className","size","_size","onFocus","onBlur","props","ref","uniwindProps","thumbColorClassName","cn","switchThumbColorVariants","isDisabled","trackColorOnClassName","switchTrackOnVariants","isInvalid","trackColorOffClassName","switchTrackOffVariants","ios_backgroundColorClassName","switchIosBgVariants","jsx","Switch","value","checked","disabled","onValueChange","setChecked","composeEventHandlers","focusProps","mergeDataAttributes","dataAttrs","displayName"],"sourceRoot":"../../../../src","sources":["components/Switch/BaseSwitch.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;AAKkB,IAAAK,WAAA,GAAAL,OAAA;AAiBlB;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMM,UAAU,GAAAC,OAAA,CAAAD,UAAA,gBAAG,IAAAE,iBAAU,EAClC,CAAC;EAAEC,WAAW;EAAEC,SAAS;EAAEC,IAAI,EAAEC,KAAK;EAAEC,OAAO;EAAEC,MAAM;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EAC3E,MAAMC,YAAgD,GAAG;IACvDP,SAAS;IACTQ,mBAAmB,EAAE,IAAAC,SAAE,EAAC,IAAAC,gCAAwB,EAAC;MAAEC,UAAU,EAAEZ,WAAW,CAACY;IAAW,CAAC,CAAC,CAAC;IACzFC,qBAAqB,EAAE,IAAAH,SAAE,EAAC,IAAAI,6BAAqB,EAAC;MAAEC,SAAS,EAAEf,WAAW,CAACe;IAAU,CAAC,CAAC,CAAC;IACtFC,sBAAsB,EAAE,IAAAN,SAAE,EAAC,IAAAO,8BAAsB,EAAC;MAAEF,SAAS,EAAEf,WAAW,CAACe;IAAU,CAAC,CAAC,CAAC;IACxFG,4BAA4B,EAAE,IAAAR,SAAE,EAAC,IAAAS,2BAAmB,EAAC;MAAEJ,SAAS,EAAEf,WAAW,CAACe;IAAU,CAAC,CAAC;EAC5F,CAAC;EAED,oBACE,IAAAnB,WAAA,CAAAwB,GAAA,EAAC5B,YAAA,CAAA6B,MAAQ;IACPd,GAAG,EAAEA,GAAI;IAC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