@cdx-ui/components 0.0.1-beta.7 → 0.0.1-beta.71
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/QuickActionButton/index.js +133 -0
- package/lib/commonjs/components/QuickActionButton/index.js.map +1 -0
- package/lib/commonjs/components/QuickActionButton/styles.js +17 -0
- package/lib/commonjs/components/QuickActionButton/styles.js.map +1 -0
- 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 +60 -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/QuickActionButton.figma.js +38 -0
- package/lib/commonjs/figma/QuickActionButton.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/QuickActionButton/index.js +129 -0
- package/lib/module/components/QuickActionButton/index.js.map +1 -0
- package/lib/module/components/QuickActionButton/styles.js +13 -0
- package/lib/module/components/QuickActionButton/styles.js.map +1 -0
- 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 +5 -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/QuickActionButton.figma.js +32 -0
- package/lib/module/figma/QuickActionButton.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/QuickActionButton/index.d.ts +41 -0
- package/lib/typescript/components/QuickActionButton/index.d.ts.map +1 -0
- package/lib/typescript/components/QuickActionButton/styles.d.ts +7 -0
- package/lib/typescript/components/QuickActionButton/styles.d.ts.map +1 -0
- 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 +5 -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/QuickActionButton.figma.d.ts +8 -0
- package/lib/typescript/figma/QuickActionButton.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/QuickActionButton/index.tsx +161 -0
- package/src/components/QuickActionButton/styles.ts +42 -0
- 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 +5 -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
|
@@ -1,44 +1,32 @@
|
|
|
1
|
-
import { forwardRef } from 'react';
|
|
2
|
-
import { Text, View } from 'react-native';
|
|
1
|
+
import { forwardRef, useEffect, type ReactNode } from 'react';
|
|
2
|
+
import { Text, type TextProps, View, type ViewProps } from 'react-native';
|
|
3
3
|
import { ErrorIcon } from '@cdx-ui/icons';
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
FieldLabel as FieldLabelPrimitive,
|
|
6
|
+
FieldRoot as FieldRootPrimitive,
|
|
7
|
+
Slot,
|
|
8
|
+
dataAttributes,
|
|
9
|
+
mergeDataAttributes,
|
|
10
|
+
useFormControlContext,
|
|
11
|
+
type FieldLabelProps as FieldLabelPrimitiveProps,
|
|
12
|
+
type FieldRootProps as FieldRootPrimitiveProps,
|
|
10
13
|
} from '@cdx-ui/primitives';
|
|
11
14
|
import { cn } from '@cdx-ui/utils';
|
|
12
15
|
import { Icon } from '../Icon';
|
|
13
|
-
import { BaseFieldLabel } from './FieldLabel';
|
|
14
16
|
import {
|
|
15
17
|
fieldErrorIconVariants,
|
|
16
18
|
fieldErrorTextVariants,
|
|
17
19
|
fieldErrorVariants,
|
|
18
|
-
fieldHelperVariants,
|
|
19
20
|
fieldHelperTextVariants,
|
|
21
|
+
fieldHelperVariants,
|
|
20
22
|
fieldLabelVariants,
|
|
21
23
|
fieldRootVariants,
|
|
22
|
-
type FieldRootVariantProps,
|
|
23
|
-
type FieldLabelVariantProps,
|
|
24
|
-
type FieldHelperVariantProps,
|
|
25
24
|
type FieldErrorVariantProps,
|
|
25
|
+
type FieldHelperVariantProps,
|
|
26
|
+
type FieldLabelVariantProps,
|
|
27
|
+
type FieldRootVariantProps,
|
|
26
28
|
} from './styles';
|
|
27
29
|
|
|
28
|
-
// =============================================================================
|
|
29
|
-
// PRIMITIVE
|
|
30
|
-
// =============================================================================
|
|
31
|
-
|
|
32
|
-
const FieldPrimitive = createField({
|
|
33
|
-
Root: View,
|
|
34
|
-
Label: BaseFieldLabel,
|
|
35
|
-
Helper: View,
|
|
36
|
-
HelperText: Text,
|
|
37
|
-
Error: View,
|
|
38
|
-
ErrorText: Text,
|
|
39
|
-
ErrorIcon: View,
|
|
40
|
-
});
|
|
41
|
-
|
|
42
30
|
// =============================================================================
|
|
43
31
|
// FIELD ROOT
|
|
44
32
|
// =============================================================================
|
|
@@ -46,16 +34,22 @@ const FieldPrimitive = createField({
|
|
|
46
34
|
/**
|
|
47
35
|
* Field wrapper + context. For **initial focus**, pass `autoFocus` on `Input.Field` (not here).
|
|
48
36
|
*/
|
|
49
|
-
export interface FieldRootProps extends
|
|
37
|
+
export interface FieldRootProps extends FieldRootPrimitiveProps, FieldRootVariantProps {}
|
|
50
38
|
|
|
51
39
|
const FieldRoot = forwardRef<View, FieldRootProps>(
|
|
52
40
|
({ className, children, style, ...props }, ref) => {
|
|
53
41
|
const computedClassName = cn(fieldRootVariants(), className);
|
|
54
42
|
|
|
55
43
|
return (
|
|
56
|
-
<
|
|
44
|
+
<FieldRootPrimitive
|
|
45
|
+
ref={ref}
|
|
46
|
+
className={computedClassName}
|
|
47
|
+
style={style}
|
|
48
|
+
{...props}
|
|
49
|
+
{...mergeDataAttributes(props, dataAttributes({ slot: 'field' }))}
|
|
50
|
+
>
|
|
57
51
|
{children}
|
|
58
|
-
</
|
|
52
|
+
</FieldRootPrimitive>
|
|
59
53
|
);
|
|
60
54
|
},
|
|
61
55
|
);
|
|
@@ -66,27 +60,35 @@ FieldRoot.displayName = 'Field';
|
|
|
66
60
|
// FIELD LABEL
|
|
67
61
|
// =============================================================================
|
|
68
62
|
|
|
69
|
-
export interface FieldLabelProps extends
|
|
63
|
+
export interface FieldLabelProps extends FieldLabelPrimitiveProps, FieldLabelVariantProps {}
|
|
70
64
|
|
|
71
65
|
const FieldLabel = forwardRef<View, FieldLabelProps>(
|
|
72
66
|
({ className, children, style, htmlFor, ...props }, ref) => {
|
|
73
|
-
const
|
|
67
|
+
const { isLabelFocused, isInvalid } = useFormControlContext();
|
|
68
|
+
// Native: inject text-content-action via context (group-has CSS handles web).
|
|
69
|
+
// native: prefix keeps this class inert on web so it never conflicts with text-content-primary.
|
|
70
|
+
const labelClassName = cn(
|
|
71
|
+
fieldLabelVariants(),
|
|
72
|
+
isLabelFocused && !isInvalid && 'native:text-content-action',
|
|
73
|
+
className,
|
|
74
|
+
);
|
|
74
75
|
|
|
75
76
|
return (
|
|
76
|
-
<
|
|
77
|
+
<FieldLabelPrimitive
|
|
77
78
|
ref={ref}
|
|
78
79
|
className={labelClassName}
|
|
79
80
|
style={style}
|
|
80
81
|
htmlFor={htmlFor}
|
|
81
82
|
requiredIndicator={
|
|
82
|
-
<Text className="text-
|
|
83
|
+
<Text className="text-content-danger" aria-hidden>
|
|
83
84
|
{' *'}
|
|
84
85
|
</Text>
|
|
85
86
|
}
|
|
86
87
|
{...props}
|
|
88
|
+
{...mergeDataAttributes(props, dataAttributes({ slot: 'field-label' }))}
|
|
87
89
|
>
|
|
88
90
|
{children}
|
|
89
|
-
</
|
|
91
|
+
</FieldLabelPrimitive>
|
|
90
92
|
);
|
|
91
93
|
},
|
|
92
94
|
);
|
|
@@ -94,20 +96,50 @@ const FieldLabel = forwardRef<View, FieldLabelProps>(
|
|
|
94
96
|
FieldLabel.displayName = 'Field.Label';
|
|
95
97
|
|
|
96
98
|
// =============================================================================
|
|
97
|
-
// FIELD HELPER
|
|
99
|
+
// FIELD HELPER (styled-only — reads form context directly)
|
|
98
100
|
// =============================================================================
|
|
99
101
|
|
|
100
|
-
export interface FieldHelperProps extends
|
|
102
|
+
export interface FieldHelperProps extends ViewProps, FieldHelperVariantProps {
|
|
103
|
+
asChild?: boolean;
|
|
104
|
+
className?: string;
|
|
105
|
+
children?: ReactNode;
|
|
106
|
+
}
|
|
101
107
|
|
|
102
108
|
const FieldHelper = forwardRef<View, FieldHelperProps>(
|
|
103
|
-
({ className, children, style, ...props }, ref) => {
|
|
109
|
+
({ asChild, className, children, style, ...props }, ref) => {
|
|
110
|
+
const { helpTextId, setHasHelpText, isInvalid } = useFormControlContext();
|
|
111
|
+
|
|
112
|
+
useEffect(() => {
|
|
113
|
+
if (isInvalid) {
|
|
114
|
+
setHasHelpText?.(false);
|
|
115
|
+
return undefined;
|
|
116
|
+
}
|
|
117
|
+
setHasHelpText?.(true);
|
|
118
|
+
return () => {
|
|
119
|
+
setHasHelpText?.(false);
|
|
120
|
+
};
|
|
121
|
+
}, [setHasHelpText, isInvalid]);
|
|
122
|
+
|
|
123
|
+
if (isInvalid) {
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
|
|
104
127
|
const containerClassName = cn(fieldHelperVariants(), className);
|
|
105
128
|
const textClassName = cn(fieldHelperTextVariants());
|
|
129
|
+
const Comp = asChild ? Slot : View;
|
|
106
130
|
|
|
107
131
|
return (
|
|
108
|
-
<
|
|
109
|
-
|
|
110
|
-
|
|
132
|
+
<Comp
|
|
133
|
+
ref={ref}
|
|
134
|
+
className={containerClassName}
|
|
135
|
+
style={style}
|
|
136
|
+
{...props}
|
|
137
|
+
{...mergeDataAttributes(props, dataAttributes({ slot: 'field-helper' }))}
|
|
138
|
+
>
|
|
139
|
+
<Text id={helpTextId} className={textClassName}>
|
|
140
|
+
{children}
|
|
141
|
+
</Text>
|
|
142
|
+
</Comp>
|
|
111
143
|
);
|
|
112
144
|
},
|
|
113
145
|
);
|
|
@@ -115,10 +147,17 @@ const FieldHelper = forwardRef<View, FieldHelperProps>(
|
|
|
115
147
|
FieldHelper.displayName = 'Field.Helper';
|
|
116
148
|
|
|
117
149
|
// =============================================================================
|
|
118
|
-
// FIELD ERROR (
|
|
150
|
+
// FIELD ERROR (styled-only — reads form context directly)
|
|
119
151
|
// =============================================================================
|
|
120
152
|
|
|
121
|
-
const FieldErrorIcon = ({
|
|
153
|
+
const FieldErrorIcon = ({
|
|
154
|
+
className,
|
|
155
|
+
style,
|
|
156
|
+
...props
|
|
157
|
+
}: {
|
|
158
|
+
className?: string;
|
|
159
|
+
style?: TextProps['style'];
|
|
160
|
+
}) => {
|
|
122
161
|
const computedClassName = cn(fieldErrorIconVariants(), className);
|
|
123
162
|
|
|
124
163
|
return (
|
|
@@ -128,26 +167,58 @@ const FieldErrorIcon = ({ className, style, ...props }: { className?: string; st
|
|
|
128
167
|
style={style}
|
|
129
168
|
aria-hidden={true}
|
|
130
169
|
{...props}
|
|
170
|
+
{...mergeDataAttributes(props, dataAttributes({ slot: 'field-error-icon' }))}
|
|
131
171
|
/>
|
|
132
172
|
);
|
|
133
173
|
};
|
|
134
174
|
|
|
135
175
|
FieldErrorIcon.displayName = 'Field.ErrorIcon';
|
|
136
176
|
|
|
137
|
-
export interface FieldErrorProps extends
|
|
177
|
+
export interface FieldErrorProps extends ViewProps, FieldErrorVariantProps {
|
|
178
|
+
asChild?: boolean;
|
|
179
|
+
className?: string;
|
|
180
|
+
children?: ReactNode;
|
|
181
|
+
}
|
|
138
182
|
|
|
139
183
|
const FieldError = forwardRef<View, FieldErrorProps>(
|
|
140
|
-
({ className, children, style, ...props }, ref) => {
|
|
184
|
+
({ asChild, className, children, style, ...props }, ref) => {
|
|
185
|
+
const { isInvalid, feedbackId, setHasFeedbackText } = useFormControlContext();
|
|
186
|
+
|
|
187
|
+
const visible = Boolean(isInvalid && children);
|
|
188
|
+
|
|
189
|
+
useEffect(() => {
|
|
190
|
+
if (!visible) {
|
|
191
|
+
setHasFeedbackText?.(false);
|
|
192
|
+
return undefined;
|
|
193
|
+
}
|
|
194
|
+
setHasFeedbackText?.(true);
|
|
195
|
+
return () => {
|
|
196
|
+
setHasFeedbackText?.(false);
|
|
197
|
+
};
|
|
198
|
+
}, [setHasFeedbackText, visible]);
|
|
199
|
+
|
|
200
|
+
if (!visible) {
|
|
201
|
+
return null;
|
|
202
|
+
}
|
|
203
|
+
|
|
141
204
|
const containerClassName = cn(fieldErrorVariants(), className);
|
|
142
205
|
const textClassName = cn(fieldErrorTextVariants());
|
|
206
|
+
const Comp = asChild ? Slot : View;
|
|
143
207
|
|
|
144
208
|
return (
|
|
145
|
-
<
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
209
|
+
<Comp
|
|
210
|
+
ref={ref}
|
|
211
|
+
id={feedbackId}
|
|
212
|
+
accessibilityRole="alert"
|
|
213
|
+
accessibilityLiveRegion="assertive"
|
|
214
|
+
className={containerClassName}
|
|
215
|
+
style={style}
|
|
216
|
+
{...props}
|
|
217
|
+
{...mergeDataAttributes(props, dataAttributes({ slot: 'field-error' }))}
|
|
218
|
+
>
|
|
219
|
+
<FieldErrorIcon />
|
|
220
|
+
<Text className={textClassName}>{children}</Text>
|
|
221
|
+
</Comp>
|
|
151
222
|
);
|
|
152
223
|
},
|
|
153
224
|
);
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import { cva, type VariantProps } from 'class-variance-authority';
|
|
2
2
|
import { DISABLED_OPACITY } from '../../styles/primitives';
|
|
3
3
|
|
|
4
|
-
export const fieldRootVariants = cva(['flex-col gap-2', 'web:last:mb-0', DISABLED_OPACITY]);
|
|
4
|
+
export const fieldRootVariants = cva(['group flex-col gap-2', 'web:last:mb-0', DISABLED_OPACITY]);
|
|
5
5
|
|
|
6
6
|
export const fieldLabelVariants = cva([
|
|
7
7
|
'body-md',
|
|
8
8
|
'font-medium',
|
|
9
9
|
'text-content-primary',
|
|
10
10
|
'flex-row items-center',
|
|
11
|
-
|
|
11
|
+
'overflow-hidden',
|
|
12
12
|
'web:cursor-pointer',
|
|
13
|
+
'web:group-has-[[data-focus=true]]:data-[invalid=false]:text-content-action',
|
|
13
14
|
'data-[invalid=true]:text-content-danger',
|
|
14
15
|
]);
|
|
15
16
|
|
|
16
|
-
export const fieldHelperVariants = cva(['flex-row items-center']);
|
|
17
|
+
export const fieldHelperVariants = cva(['flex-row items-center min-h-4']);
|
|
17
18
|
|
|
18
19
|
export const fieldHelperTextVariants = cva(['body-sm', 'text-content-tertiary']);
|
|
19
20
|
|
|
20
|
-
export const fieldErrorVariants = cva(['flex-row items-center gap-
|
|
21
|
+
export const fieldErrorVariants = cva(['flex-row items-center gap-0.5 min-h-4']);
|
|
21
22
|
|
|
22
23
|
export const fieldErrorTextVariants = cva(['body-sm', 'text-content-danger']);
|
|
23
24
|
|
|
@@ -1,31 +1,35 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { forwardRef } from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
FormRoot as FormRootPrimitive,
|
|
5
|
+
dataAttributes,
|
|
6
|
+
mergeDataAttributes,
|
|
7
|
+
type FormRootProps,
|
|
8
|
+
} from '@cdx-ui/primitives';
|
|
4
9
|
import { cn } from '@cdx-ui/utils';
|
|
5
|
-
import { BaseFormRoot, type BaseFormRootProps } from './FormRoot';
|
|
6
10
|
import { formRootVariants } from './styles';
|
|
7
11
|
|
|
8
|
-
// =============================================================================
|
|
9
|
-
// PRIMITIVE
|
|
10
|
-
// =============================================================================
|
|
11
|
-
|
|
12
|
-
const FormPrimitive = createForm({ Root: BaseFormRoot });
|
|
13
|
-
|
|
14
|
-
FormPrimitive.displayName = 'FormPrimitive';
|
|
15
|
-
|
|
16
12
|
// =============================================================================
|
|
17
13
|
// FORM ROOT (container — <form> on web, <View> on RN)
|
|
18
14
|
// =============================================================================
|
|
19
15
|
|
|
20
|
-
export interface FormProps extends
|
|
16
|
+
export interface FormProps extends FormRootProps {
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
21
19
|
|
|
22
20
|
const FormRoot = forwardRef<View, FormProps>(({ className, children, style, ...props }, ref) => {
|
|
23
21
|
const computedClassName = cn(formRootVariants(), className);
|
|
24
22
|
|
|
25
23
|
return (
|
|
26
|
-
<
|
|
24
|
+
<FormRootPrimitive
|
|
25
|
+
ref={ref}
|
|
26
|
+
className={computedClassName}
|
|
27
|
+
style={style}
|
|
28
|
+
{...props}
|
|
29
|
+
{...mergeDataAttributes(props, dataAttributes({ slot: 'form' }))}
|
|
30
|
+
>
|
|
27
31
|
{children}
|
|
28
|
-
</
|
|
32
|
+
</FormRootPrimitive>
|
|
29
33
|
);
|
|
30
34
|
});
|
|
31
35
|
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { withUniwind } from 'uniwind';
|
|
2
2
|
import { cn } from '@cdx-ui/utils';
|
|
3
|
-
import type {
|
|
4
|
-
import { COLOR_TEXT_PRIMARY } from '../../styles/primitives';
|
|
3
|
+
import type { ForgeIcon, ForgeIconProps } from '@cdx-ui/icons';
|
|
5
4
|
|
|
6
|
-
export type IconProps =
|
|
5
|
+
export type IconProps = ForgeIconProps & {
|
|
7
6
|
className?: string; // TODO: Why does this need to specified manually?
|
|
8
|
-
as:
|
|
7
|
+
as: ForgeIcon;
|
|
9
8
|
};
|
|
10
9
|
|
|
11
10
|
function IconImpl({ as: IconComponent, ...props }: IconProps) {
|
|
@@ -38,16 +37,16 @@ const StyledIcon = withUniwind(IconImpl, {
|
|
|
38
37
|
* <Icon as={ArrowRight} className="text-red-500 size-4" />
|
|
39
38
|
* ```
|
|
40
39
|
*
|
|
41
|
-
* @param {
|
|
40
|
+
* @param {ForgeIcon} as - The Forge icon component to render.
|
|
42
41
|
* @param {string} className - Utility classes to style the icon using Uniwind.
|
|
43
42
|
* @param {number} size - Icon size (overrides the size class).
|
|
44
|
-
* @param {...
|
|
43
|
+
* @param {...ForgeIconProps} ...props - Additional icon props passed to the "as" icon.
|
|
45
44
|
*/
|
|
46
45
|
export function Icon({ as: IconComponent, className, ...props }: IconProps) {
|
|
47
46
|
return (
|
|
48
47
|
<StyledIcon
|
|
49
48
|
as={IconComponent}
|
|
50
|
-
className={cn(
|
|
49
|
+
className={cn('text-content-primary size-5', className)}
|
|
51
50
|
{...props}
|
|
52
51
|
/>
|
|
53
52
|
);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { View, type PressableProps } from 'react-native';
|
|
3
3
|
import {
|
|
4
|
-
|
|
4
|
+
ButtonRoot,
|
|
5
5
|
dataAttributes,
|
|
6
|
+
mergeDataAttributes,
|
|
6
7
|
type IButtonProps,
|
|
7
|
-
useButtonContext,
|
|
8
8
|
} from '@cdx-ui/primitives';
|
|
9
|
-
import type {
|
|
9
|
+
import type { ForgeIcon } from '@cdx-ui/icons';
|
|
10
10
|
import { cn } from '@cdx-ui/utils';
|
|
11
11
|
import { Icon, type IconProps } from '../Icon';
|
|
12
12
|
import {
|
|
@@ -16,35 +16,10 @@ import {
|
|
|
16
16
|
iconButtonRootVariants,
|
|
17
17
|
} from './styles';
|
|
18
18
|
|
|
19
|
-
const IconButtonPrimitive = createButton({
|
|
20
|
-
Root: Pressable,
|
|
21
|
-
Text,
|
|
22
|
-
Group: View,
|
|
23
|
-
Spinner: ActivityIndicator,
|
|
24
|
-
Icon: View,
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
function IconButtonGlyph({ as: IconComponent, className }: { as: CdxIcon; className: string }) {
|
|
28
|
-
const { hover, focus, active, disabled, focusVisible } = useButtonContext();
|
|
29
|
-
return (
|
|
30
|
-
<Icon
|
|
31
|
-
as={IconComponent}
|
|
32
|
-
className={className}
|
|
33
|
-
{...dataAttributes({
|
|
34
|
-
hover,
|
|
35
|
-
focus,
|
|
36
|
-
active,
|
|
37
|
-
disabled,
|
|
38
|
-
focusVisible,
|
|
39
|
-
})}
|
|
40
|
-
/>
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
19
|
export interface IconButtonProps extends PressableProps, IButtonProps, IconButtonVariantProps {
|
|
45
20
|
className?: string;
|
|
46
|
-
/**
|
|
47
|
-
as:
|
|
21
|
+
/** Forge icon component to render (icon-only control). */
|
|
22
|
+
as: ForgeIcon;
|
|
48
23
|
/** Passed through to the underlying `Icon`. */
|
|
49
24
|
iconClassName?: IconProps['className'];
|
|
50
25
|
}
|
|
@@ -53,6 +28,7 @@ const IconButtonRoot = forwardRef<View, IconButtonProps>(
|
|
|
53
28
|
(
|
|
54
29
|
{
|
|
55
30
|
variant = 'solid',
|
|
31
|
+
color = 'neutral',
|
|
56
32
|
size = 'default',
|
|
57
33
|
className,
|
|
58
34
|
style,
|
|
@@ -63,24 +39,25 @@ const IconButtonRoot = forwardRef<View, IconButtonProps>(
|
|
|
63
39
|
},
|
|
64
40
|
ref,
|
|
65
41
|
) => {
|
|
66
|
-
const rootClassName = cn(iconButtonRootVariants({ variant, size }), className);
|
|
42
|
+
const rootClassName = cn(iconButtonRootVariants({ variant, color, size }), className);
|
|
67
43
|
|
|
68
44
|
const glyphClassName = cn(
|
|
69
45
|
iconButtonGlyphVariants({ size }),
|
|
70
|
-
iconButtonIconColorVariants(),
|
|
46
|
+
iconButtonIconColorVariants({ variant, color }),
|
|
71
47
|
iconClassName,
|
|
72
48
|
);
|
|
73
49
|
|
|
74
50
|
return (
|
|
75
|
-
<
|
|
51
|
+
<ButtonRoot
|
|
76
52
|
ref={ref}
|
|
77
53
|
accessibilityRole={accessibilityRole}
|
|
78
54
|
className={rootClassName}
|
|
79
55
|
style={style}
|
|
80
56
|
{...props}
|
|
57
|
+
{...mergeDataAttributes(props, dataAttributes({ slot: 'icon-button' }))}
|
|
81
58
|
>
|
|
82
|
-
<
|
|
83
|
-
</
|
|
59
|
+
<Icon as={IconComponent} className={glyphClassName} />
|
|
60
|
+
</ButtonRoot>
|
|
84
61
|
);
|
|
85
62
|
},
|
|
86
63
|
);
|
|
@@ -8,35 +8,133 @@ export const iconButtonRootVariants = cva(
|
|
|
8
8
|
'rounded-[var(--border-radius-round)]',
|
|
9
9
|
'web:outline-none web:focus:outline-none web:focus-visible:outline-none',
|
|
10
10
|
TRANSITION_COLORS,
|
|
11
|
-
'data-[disabled=true]:opacity-[--opacity-disabled]',
|
|
11
|
+
'data-[disabled=true]:opacity-[var(--opacity-disabled)]',
|
|
12
12
|
DISABLED_CURSOR,
|
|
13
|
-
'web:data-[focus-visible=true]:ring-2 web:data-[focus-visible=true]:ring-[--color-stroke-ring] web:data-[focus-visible=true]:ring-offset-2',
|
|
13
|
+
'web:data-[focus-visible=true]:ring-2 web:data-[focus-visible=true]:ring-[var(--color-stroke-ring)] web:data-[focus-visible=true]:ring-offset-2',
|
|
14
14
|
],
|
|
15
15
|
{
|
|
16
16
|
variants: {
|
|
17
17
|
variant: {
|
|
18
|
-
solid: [
|
|
18
|
+
solid: [],
|
|
19
|
+
tint: [],
|
|
20
|
+
ghost: ['bg-transparent'],
|
|
21
|
+
},
|
|
22
|
+
color: {
|
|
23
|
+
neutral: [],
|
|
24
|
+
action: [],
|
|
25
|
+
danger: [],
|
|
26
|
+
},
|
|
27
|
+
size: {
|
|
28
|
+
default: 'h-11 w-11 min-w-11 shrink-0 p-2.5',
|
|
29
|
+
small: 'h-8 w-8 min-w-8 shrink-0 p-1.5',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
compoundVariants: [
|
|
33
|
+
// ── solid × color ───────────────────────────────────────────────────
|
|
34
|
+
{
|
|
35
|
+
variant: 'solid',
|
|
36
|
+
color: 'neutral',
|
|
37
|
+
className: [
|
|
19
38
|
'bg-surface-primary border border-stroke-secondary',
|
|
20
39
|
Platform.select({
|
|
21
40
|
default: 'data-[active=true]:bg-surface-primary-active',
|
|
22
41
|
web: 'data-[hover=true]:bg-surface-primary-hover data-[active=true]:data-[hover=true]:bg-surface-secondary-active',
|
|
23
42
|
}),
|
|
24
43
|
],
|
|
25
|
-
|
|
26
|
-
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
variant: 'solid',
|
|
47
|
+
color: 'action',
|
|
48
|
+
className: [
|
|
49
|
+
'bg-surface-action-strong',
|
|
50
|
+
Platform.select({
|
|
51
|
+
default: 'data-[active=true]:bg-surface-action-strong-active',
|
|
52
|
+
web: 'data-[hover=true]:bg-surface-action-strong-hover data-[active=true]:data-[hover=true]:bg-surface-action-strong-active',
|
|
53
|
+
}),
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
variant: 'solid',
|
|
58
|
+
color: 'danger',
|
|
59
|
+
className: [
|
|
60
|
+
'bg-surface-danger-strong',
|
|
61
|
+
Platform.select({
|
|
62
|
+
default: 'data-[active=true]:bg-surface-danger-strong-active',
|
|
63
|
+
web: 'data-[hover=true]:bg-surface-danger-strong-hover data-[active=true]:data-[hover=true]:bg-surface-danger-strong-active',
|
|
64
|
+
}),
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
// ── tint × color ─────────────────────────────────────────────────
|
|
69
|
+
{
|
|
70
|
+
variant: 'tint',
|
|
71
|
+
color: 'neutral',
|
|
72
|
+
className: [
|
|
73
|
+
'bg-surface-neutral-tint',
|
|
74
|
+
Platform.select({
|
|
75
|
+
default: 'data-[active=true]:bg-surface-neutral-tint-active',
|
|
76
|
+
web: 'data-[hover=true]:bg-surface-neutral-tint-hover data-[active=true]:data-[hover=true]:bg-surface-neutral-tint-active',
|
|
77
|
+
}),
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
variant: 'tint',
|
|
82
|
+
color: 'action',
|
|
83
|
+
className: [
|
|
84
|
+
'bg-surface-action-tint',
|
|
85
|
+
Platform.select({
|
|
86
|
+
default: 'data-[active=true]:bg-surface-action-tint-active',
|
|
87
|
+
web: 'data-[hover=true]:bg-surface-action-tint-hover data-[active=true]:data-[hover=true]:bg-surface-action-tint-active',
|
|
88
|
+
}),
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
variant: 'tint',
|
|
93
|
+
color: 'danger',
|
|
94
|
+
className: [
|
|
95
|
+
'bg-surface-danger-tint',
|
|
96
|
+
Platform.select({
|
|
97
|
+
default: 'data-[active=true]:bg-surface-danger-tint-active',
|
|
98
|
+
web: 'data-[hover=true]:bg-surface-danger-tint-hover data-[active=true]:data-[hover=true]:bg-surface-danger-tint-active',
|
|
99
|
+
}),
|
|
100
|
+
],
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
// ── ghost × color ──────────────────────────────────────────────────
|
|
104
|
+
{
|
|
105
|
+
variant: 'ghost',
|
|
106
|
+
color: 'neutral',
|
|
107
|
+
className: [
|
|
27
108
|
Platform.select({
|
|
28
109
|
default: 'data-[active=true]:bg-surface-primary-active',
|
|
29
110
|
web: 'data-[hover=true]:bg-surface-primary-hover data-[active=true]:data-[hover=true]:bg-surface-secondary-active',
|
|
30
111
|
}),
|
|
31
112
|
],
|
|
32
113
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
114
|
+
{
|
|
115
|
+
variant: 'ghost',
|
|
116
|
+
color: 'action',
|
|
117
|
+
className: [
|
|
118
|
+
Platform.select({
|
|
119
|
+
default: 'data-[active=true]:bg-surface-action-tint-active',
|
|
120
|
+
web: 'data-[hover=true]:bg-surface-action-tint-hover data-[active=true]:data-[hover=true]:bg-surface-action-tint-active',
|
|
121
|
+
}),
|
|
122
|
+
],
|
|
36
123
|
},
|
|
37
|
-
|
|
124
|
+
{
|
|
125
|
+
variant: 'ghost',
|
|
126
|
+
color: 'danger',
|
|
127
|
+
className: [
|
|
128
|
+
Platform.select({
|
|
129
|
+
default: 'data-[active=true]:bg-surface-danger-tint-active',
|
|
130
|
+
web: 'data-[hover=true]:bg-surface-danger-tint-hover data-[active=true]:data-[hover=true]:bg-surface-danger-tint-active',
|
|
131
|
+
}),
|
|
132
|
+
],
|
|
133
|
+
},
|
|
134
|
+
],
|
|
38
135
|
defaultVariants: {
|
|
39
136
|
variant: 'solid',
|
|
137
|
+
color: 'neutral',
|
|
40
138
|
size: 'default',
|
|
41
139
|
},
|
|
42
140
|
},
|
|
@@ -54,6 +152,34 @@ export const iconButtonGlyphVariants = cva([], {
|
|
|
54
152
|
},
|
|
55
153
|
});
|
|
56
154
|
|
|
57
|
-
export const iconButtonIconColorVariants = cva([
|
|
155
|
+
export const iconButtonIconColorVariants = cva([], {
|
|
156
|
+
variants: {
|
|
157
|
+
variant: {
|
|
158
|
+
solid: [],
|
|
159
|
+
tint: [],
|
|
160
|
+
ghost: [],
|
|
161
|
+
},
|
|
162
|
+
color: {
|
|
163
|
+
neutral: [],
|
|
164
|
+
action: [],
|
|
165
|
+
danger: [],
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
compoundVariants: [
|
|
169
|
+
{ variant: 'solid', color: 'neutral', className: 'text-content-primary' },
|
|
170
|
+
{ variant: 'solid', color: 'action', className: 'text-content-action-on-strong' },
|
|
171
|
+
{ variant: 'solid', color: 'danger', className: 'text-content-danger-on-strong' },
|
|
172
|
+
{ variant: 'tint', color: 'neutral', className: 'text-content-primary' },
|
|
173
|
+
{ variant: 'tint', color: 'action', className: 'text-content-action-on-subtle' },
|
|
174
|
+
{ variant: 'tint', color: 'danger', className: 'text-content-danger-on-subtle' },
|
|
175
|
+
{ variant: 'ghost', color: 'neutral', className: 'text-content-primary' },
|
|
176
|
+
{ variant: 'ghost', color: 'action', className: 'text-content-action' },
|
|
177
|
+
{ variant: 'ghost', color: 'danger', className: 'text-content-danger' },
|
|
178
|
+
],
|
|
179
|
+
defaultVariants: {
|
|
180
|
+
variant: 'solid',
|
|
181
|
+
color: 'neutral',
|
|
182
|
+
},
|
|
183
|
+
});
|
|
58
184
|
|
|
59
185
|
export type IconButtonVariantProps = VariantProps<typeof iconButtonRootVariants>;
|