@cdx-ui/components 0.0.1-beta.6 → 0.0.1-beta.60
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 +36 -18
- package/lib/commonjs/components/AlertDialog/index.js +5 -4
- package/lib/commonjs/components/AlertDialog/index.js.map +1 -1
- package/lib/commonjs/components/Avatar/index.js +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 +16 -1
- package/lib/commonjs/components/Button/index.js.map +1 -1
- package/lib/commonjs/components/Button/styles.js +85 -26
- package/lib/commonjs/components/Button/styles.js.map +1 -1
- package/lib/commonjs/components/CLAUDE.md +90 -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 +5 -29
- 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 +78 -9
- package/lib/commonjs/components/Chip/index.js.map +1 -1
- package/lib/commonjs/components/Chip/styles.js +207 -21
- package/lib/commonjs/components/Chip/styles.js.map +1 -1
- package/lib/commonjs/components/Dialog/index.js +71 -16
- 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 +8 -2
- 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/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 +6 -1
- 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/styles.js +7 -6
- package/lib/commonjs/components/Input/styles.js.map +1 -1
- package/lib/commonjs/components/Link/index.js +22 -3
- 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 +3 -25
- 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/ProgressSegmented/index.js +24 -10
- package/lib/commonjs/components/ProgressSegmented/index.js.map +1 -1
- package/lib/commonjs/components/Radio/index.js +167 -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/SelectTriggerHost.web.js +4 -0
- package/lib/commonjs/components/Select/SelectTriggerHost.web.js.map +1 -1
- package/lib/commonjs/components/Select/index.js +9 -3
- 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/Text/styles.js +2 -2
- package/lib/commonjs/components/Text/styles.js.map +1 -1
- package/lib/commonjs/components/Tile/index.js +251 -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/index.js +36 -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 +28 -15
- 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/module/components/AlertDialog/index.js +5 -4
- package/lib/module/components/AlertDialog/index.js.map +1 -1
- package/lib/module/components/Avatar/index.js +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 +17 -2
- package/lib/module/components/Button/index.js.map +1 -1
- package/lib/module/components/Button/styles.js +85 -26
- package/lib/module/components/Button/styles.js.map +1 -1
- package/lib/module/components/CLAUDE.md +90 -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 +6 -30
- 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 +82 -13
- package/lib/module/components/Chip/index.js.map +1 -1
- package/lib/module/components/Chip/styles.js +206 -20
- package/lib/module/components/Chip/styles.js.map +1 -1
- package/lib/module/components/Dialog/index.js +74 -19
- 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 +9 -3
- 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/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 +6 -1
- 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/styles.js +7 -6
- package/lib/module/components/Input/styles.js.map +1 -1
- package/lib/module/components/Link/index.js +25 -6
- 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 +3 -25
- 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/ProgressSegmented/index.js +25 -11
- package/lib/module/components/ProgressSegmented/index.js.map +1 -1
- package/lib/module/components/Radio/index.js +164 -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/SelectTriggerHost.web.js +4 -0
- package/lib/module/components/Select/SelectTriggerHost.web.js.map +1 -1
- package/lib/module/components/Select/index.js +10 -4
- 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/Text/styles.js +2 -2
- package/lib/module/components/Text/styles.js.map +1 -1
- package/lib/module/components/Tile/index.js +243 -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/index.js +3 -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 +28 -15
- 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/typescript/components/AlertDialog/index.d.ts +3 -2
- package/lib/typescript/components/AlertDialog/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 +13 -1
- package/lib/typescript/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/components/Button/styles.d.ts +5 -3
- 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 +1 -2
- 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 +19 -6
- package/lib/typescript/components/Chip/index.d.ts.map +1 -1
- package/lib/typescript/components/Chip/styles.d.ts +13 -4
- package/lib/typescript/components/Chip/styles.d.ts.map +1 -1
- package/lib/typescript/components/Dialog/index.d.ts +16 -10
- 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/FieldLabel.web.d.ts +2 -2
- package/lib/typescript/components/Field/FieldLabel.web.d.ts.map +1 -1
- 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/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/styles.d.ts.map +1 -1
- package/lib/typescript/components/Link/index.d.ts +2 -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.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/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 +40 -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/SelectTriggerHost.web.d.ts +3 -0
- package/lib/typescript/components/Select/SelectTriggerHost.web.d.ts.map +1 -1
- package/lib/typescript/components/Select/index.d.ts +1 -1
- 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/Stack/styles.d.ts +2 -2
- package/lib/typescript/components/Text/styles.d.ts +1 -1
- package/lib/typescript/components/Tile/index.d.ts +70 -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/index.d.ts +3 -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/package.json +10 -8
- package/src/components/AlertDialog/index.tsx +8 -6
- package/src/components/Avatar/index.tsx +1 -1
- package/src/components/Avatar/styles.ts +49 -34
- package/src/components/Button/index.tsx +39 -5
- package/src/components/Button/styles.ts +56 -27
- package/src/components/CLAUDE.md +90 -0
- package/src/components/Card/index.tsx +41 -16
- package/src/components/Card/styles.ts +42 -15
- package/src/components/Checkbox/index.tsx +8 -19
- package/src/components/Checkbox/styles.ts +84 -86
- package/src/components/Chip/index.tsx +104 -27
- package/src/components/Chip/styles.ts +232 -18
- package/src/components/Dialog/index.tsx +95 -29
- package/src/components/Dialog/styles.ts +72 -30
- package/src/components/Field/FieldLabel.web.tsx +1 -1
- package/src/components/Field/index.tsx +10 -3
- package/src/components/Field/styles.ts +5 -4
- package/src/components/Heading/styles.ts +1 -1
- package/src/components/Icon/index.tsx +6 -7
- package/src/components/IconButton/index.tsx +7 -6
- package/src/components/IconButton/styles.ts +136 -10
- package/src/components/Input/styles.ts +15 -9
- package/src/components/Link/index.tsx +22 -9
- package/src/components/Link/styles.ts +49 -9
- package/src/components/ListItem/index.tsx +8 -23
- package/src/components/ListItem/styles.ts +50 -81
- package/src/components/ProgressSegmented/index.tsx +50 -14
- package/src/components/Radio/index.tsx +192 -0
- package/src/components/Radio/styles.ts +59 -0
- package/src/components/ScopedTheme/index.tsx +17 -0
- package/src/components/Select/SelectTriggerHost.web.tsx +8 -1
- package/src/components/Select/index.tsx +9 -4
- package/src/components/Select/styles.ts +49 -51
- package/src/components/Text/styles.ts +2 -2
- package/src/components/Tile/index.tsx +296 -0
- package/src/components/Tile/styles.ts +82 -0
- package/src/components/index.ts +3 -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
|
@@ -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>;
|
|
@@ -3,13 +3,14 @@ import { DISABLED_CURSOR, TRANSITION_COLORS } from '../../styles/primitives';
|
|
|
3
3
|
|
|
4
4
|
export const inputRootVariants = cva(
|
|
5
5
|
[
|
|
6
|
-
'w-full flex-row items-
|
|
6
|
+
'w-full flex-row items-center overflow-hidden',
|
|
7
7
|
'bg-surface-primary',
|
|
8
|
-
'border-solid border-
|
|
8
|
+
'border-solid border-stroke-primary',
|
|
9
|
+
'web:border-default native:border-[length:var(--border-width-default)]',
|
|
9
10
|
'rounded-[var(--border-radius-default)]',
|
|
10
11
|
TRANSITION_COLORS,
|
|
11
12
|
'data-[disabled=true]:bg-surface-secondary',
|
|
12
|
-
'data-[disabled=true]:opacity-[--opacity-disabled]',
|
|
13
|
+
'data-[disabled=true]:opacity-[var(--opacity-disabled)]',
|
|
13
14
|
DISABLED_CURSOR,
|
|
14
15
|
'data-[readonly=true]:cursor-default',
|
|
15
16
|
'data-[readonly=true]:bg-surface-secondary',
|
|
@@ -24,11 +25,16 @@ export const inputRootVariants = cva(
|
|
|
24
25
|
outline: [],
|
|
25
26
|
},
|
|
26
27
|
size: {
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
default: [
|
|
29
|
+
'h-11 min-h-11 px-4 py-3 gap-4',
|
|
30
|
+
// Subtract one hairline from padding when focused so the wider focus border doesn’t shift layout.
|
|
31
|
+
'data-[focus=true]:px-[calc(var(--spacing-4)-var(--spacing-px))]',
|
|
32
|
+
'data-[focus=true]:py-[calc(var(--spacing-3)-var(--spacing-px))]',
|
|
33
|
+
],
|
|
29
34
|
small: [
|
|
30
|
-
'h-8 px-3 py-
|
|
31
|
-
'data-[focus=true]:px-[
|
|
35
|
+
'h-8 min-h-8 px-3 py-2 gap-1.5',
|
|
36
|
+
'data-[focus=true]:px-[calc(var(--spacing-3)-var(--spacing-px))]',
|
|
37
|
+
'data-[focus=true]:py-[calc(var(--spacing-2)-var(--spacing-px))]',
|
|
32
38
|
],
|
|
33
39
|
},
|
|
34
40
|
},
|
|
@@ -42,7 +48,7 @@ export const inputRootVariants = cva(
|
|
|
42
48
|
export const inputFieldVariants = cva(
|
|
43
49
|
[
|
|
44
50
|
'flex-1 justify-center bg-transparent p-0',
|
|
45
|
-
'
|
|
51
|
+
'text-content-primary',
|
|
46
52
|
'placeholder:text-content-tertiary',
|
|
47
53
|
'web:outline-none',
|
|
48
54
|
'tracking-normal',
|
|
@@ -60,7 +66,7 @@ export const inputFieldVariants = cva(
|
|
|
60
66
|
},
|
|
61
67
|
);
|
|
62
68
|
|
|
63
|
-
export const inputSlotVariants = cva(['items-center justify-center self-center']);
|
|
69
|
+
export const inputSlotVariants = cva(['items-center justify-center self-center shrink-0']);
|
|
64
70
|
|
|
65
71
|
export const inputIconVariants = cva(['text-content-tertiary'], {
|
|
66
72
|
variants: {
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { forwardRef, type ReactNode } from 'react';
|
|
2
|
-
import { Pressable, Text
|
|
3
|
-
import { createLink, type ILinkProps } from '@cdx-ui/primitives';
|
|
2
|
+
import { Platform, Pressable, Text, View, type TextProps } from 'react-native';
|
|
3
|
+
import { createLink, useLinkInteractionContext, type ILinkProps } from '@cdx-ui/primitives';
|
|
4
4
|
import { cn } from '@cdx-ui/utils';
|
|
5
5
|
import { Icon, type IconProps } from '../Icon';
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
linkIconVariants,
|
|
8
|
+
linkLabelVariants,
|
|
9
|
+
linkNativeUnderlineVariants,
|
|
10
|
+
linkRootVariants,
|
|
11
|
+
} from './styles';
|
|
7
12
|
|
|
8
13
|
export { LinkProvider, type LinkConfig, type LinkAction } from '@cdx-ui/primitives';
|
|
9
14
|
|
|
@@ -40,15 +45,22 @@ export interface LinkLabelProps extends TextProps {
|
|
|
40
45
|
children?: ReactNode;
|
|
41
46
|
}
|
|
42
47
|
|
|
43
|
-
const LinkLabel = forwardRef<
|
|
48
|
+
const LinkLabel = forwardRef<Text, LinkLabelProps>(
|
|
44
49
|
({ className, children, style, ...props }, ref) => {
|
|
45
|
-
const
|
|
50
|
+
const { visited } = useLinkInteractionContext();
|
|
51
|
+
const computedClassName = cn(linkLabelVariants({ visited }), className);
|
|
46
52
|
|
|
47
|
-
|
|
48
|
-
<
|
|
53
|
+
const textElement = (
|
|
54
|
+
<Text ref={ref} className={computedClassName} style={style} {...props}>
|
|
49
55
|
{children}
|
|
50
|
-
</
|
|
56
|
+
</Text>
|
|
51
57
|
);
|
|
58
|
+
|
|
59
|
+
if (Platform.OS === 'web') {
|
|
60
|
+
return textElement;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return <View className={cn(linkNativeUnderlineVariants({ visited }))}>{textElement}</View>;
|
|
52
64
|
},
|
|
53
65
|
);
|
|
54
66
|
|
|
@@ -61,7 +73,8 @@ LinkLabel.displayName = 'Link.Label';
|
|
|
61
73
|
export interface LinkIconProps extends Omit<IconProps, 'children'> {}
|
|
62
74
|
|
|
63
75
|
const LinkIcon = ({ className, style, as, ...props }: LinkIconProps) => {
|
|
64
|
-
const
|
|
76
|
+
const { visited } = useLinkInteractionContext();
|
|
77
|
+
const computedClassName = cn(linkIconVariants({ visited }), className);
|
|
65
78
|
|
|
66
79
|
return <Icon as={as} className={computedClassName} style={style} {...props} />;
|
|
67
80
|
};
|
|
@@ -1,21 +1,61 @@
|
|
|
1
|
+
import { Platform } from 'react-native';
|
|
1
2
|
import { cva, type VariantProps } from 'class-variance-authority';
|
|
2
3
|
import { TRANSITION_COLORS } from '../../styles/primitives';
|
|
3
4
|
|
|
4
|
-
// TODO: Handle visited state
|
|
5
|
-
|
|
6
5
|
export const linkRootVariants = cva([
|
|
7
6
|
'flex-row items-center gap-1',
|
|
8
|
-
|
|
7
|
+
Platform.select({ web: 'web:inline-flex web:self-start', default: '' }),
|
|
9
8
|
TRANSITION_COLORS,
|
|
9
|
+
'web:outline-none web:focus:outline-none web:focus-visible:outline-none',
|
|
10
|
+
'web:data-[focus-visible=true]:rounded-[2px]',
|
|
10
11
|
'web:data-[focus-visible=true]:ring-2 web:data-[focus-visible=true]:ring-stroke-focus web:data-[focus-visible=true]:ring-offset-2',
|
|
12
|
+
// Web: set color on the anchor so Label/Icon can text-inherit (incl. browser :visited).
|
|
13
|
+
'web:text-content-link',
|
|
14
|
+
'web:visited:text-content-link-visited',
|
|
15
|
+
'web:hover:text-content-primary',
|
|
16
|
+
'web:visited:hover:text-content-primary',
|
|
17
|
+
'data-[visited=true]:text-content-link-visited',
|
|
18
|
+
'web:data-[hover=true]:text-content-primary',
|
|
11
19
|
]);
|
|
12
20
|
|
|
13
|
-
export const linkLabelVariants = cva(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
export const linkLabelVariants = cva(
|
|
22
|
+
[
|
|
23
|
+
'body-md',
|
|
24
|
+
Platform.select({ web: 'underline underline-offset-4', default: '' }),
|
|
25
|
+
Platform.select({ web: 'text-inherit', default: 'text-content-link' }),
|
|
26
|
+
],
|
|
27
|
+
{
|
|
28
|
+
variants: {
|
|
29
|
+
visited: {
|
|
30
|
+
true: Platform.select({ web: '', default: 'text-content-link-visited' }),
|
|
31
|
+
false: '',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
defaultVariants: { visited: false },
|
|
35
|
+
},
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
export const linkNativeUnderlineVariants = cva(['border-b border-content-link pb-0.5'], {
|
|
39
|
+
variants: {
|
|
40
|
+
visited: {
|
|
41
|
+
true: 'border-content-link-visited',
|
|
42
|
+
false: '',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
defaultVariants: { visited: false },
|
|
46
|
+
});
|
|
18
47
|
|
|
19
|
-
export const linkIconVariants = cva(
|
|
48
|
+
export const linkIconVariants = cva(
|
|
49
|
+
['size-4', Platform.select({ web: 'text-inherit', default: 'text-content-link' })],
|
|
50
|
+
{
|
|
51
|
+
variants: {
|
|
52
|
+
visited: {
|
|
53
|
+
true: Platform.select({ web: '', default: 'text-content-link-visited' }),
|
|
54
|
+
false: '',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
defaultVariants: { visited: false },
|
|
58
|
+
},
|
|
59
|
+
);
|
|
20
60
|
|
|
21
61
|
export type LinkVariantProps = VariantProps<typeof linkLabelVariants>;
|
|
@@ -38,9 +38,9 @@ const ListItemPrimitive = createListItem({
|
|
|
38
38
|
SectionHeader: View,
|
|
39
39
|
});
|
|
40
40
|
|
|
41
|
-
const useListItemStyleContext = (): Pick<ListItemVariantProps, '
|
|
41
|
+
const useListItemStyleContext = (): Pick<ListItemVariantProps, 'crossAlign'> => {
|
|
42
42
|
const ctx = useStyleContext(SCOPE) as ListItemVariantProps | undefined;
|
|
43
|
-
return {
|
|
43
|
+
return { crossAlign: ctx?.crossAlign ?? 'center' };
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
// =============================================================================
|
|
@@ -53,19 +53,11 @@ export interface ListItemProps extends IListItemProps, WithStyleContextProps {
|
|
|
53
53
|
|
|
54
54
|
const ListItemRoot = forwardRef<View, ListItemProps>(
|
|
55
55
|
(
|
|
56
|
-
{
|
|
57
|
-
size = 'default',
|
|
58
|
-
surface = 'default',
|
|
59
|
-
showSeparator = true,
|
|
60
|
-
crossAlign = 'center',
|
|
61
|
-
className,
|
|
62
|
-
style,
|
|
63
|
-
...props
|
|
64
|
-
},
|
|
56
|
+
{ size = 'default', showSeparator = true, crossAlign = 'center', className, style, ...props },
|
|
65
57
|
ref,
|
|
66
58
|
) => {
|
|
67
59
|
const computedClassName = cn(
|
|
68
|
-
listItemRootVariants({ size,
|
|
60
|
+
listItemRootVariants({ size, showSeparator, crossAlign }),
|
|
69
61
|
className,
|
|
70
62
|
);
|
|
71
63
|
|
|
@@ -73,12 +65,11 @@ const ListItemRoot = forwardRef<View, ListItemProps>(
|
|
|
73
65
|
<ListItemPrimitive
|
|
74
66
|
ref={ref as never}
|
|
75
67
|
className={computedClassName}
|
|
76
|
-
context={{
|
|
68
|
+
context={{ crossAlign }}
|
|
77
69
|
crossAlign={crossAlign}
|
|
78
70
|
showSeparator={showSeparator}
|
|
79
71
|
size={size}
|
|
80
72
|
style={style}
|
|
81
|
-
surface={surface}
|
|
82
73
|
{...props}
|
|
83
74
|
/>
|
|
84
75
|
);
|
|
@@ -135,12 +126,10 @@ export interface ListItemTitleProps extends TextProps {
|
|
|
135
126
|
|
|
136
127
|
const ListItemTitle = forwardRef<Text, ListItemTitleProps>(
|
|
137
128
|
({ className, numberOfLines = 1, style, ...props }, ref) => {
|
|
138
|
-
const { size } = useListItemStyleContext();
|
|
139
|
-
|
|
140
129
|
return (
|
|
141
130
|
<ListItemPrimitive.Title
|
|
142
131
|
ref={ref as never}
|
|
143
|
-
className={cn(listItemTitleVariants(
|
|
132
|
+
className={cn(listItemTitleVariants(), className)}
|
|
144
133
|
numberOfLines={numberOfLines}
|
|
145
134
|
style={style}
|
|
146
135
|
{...props}
|
|
@@ -157,12 +146,10 @@ export interface ListItemDescriptionProps extends TextProps {
|
|
|
157
146
|
|
|
158
147
|
const ListItemDescription = forwardRef<Text, ListItemDescriptionProps>(
|
|
159
148
|
({ className, style, ...props }, ref) => {
|
|
160
|
-
const { size } = useListItemStyleContext();
|
|
161
|
-
|
|
162
149
|
return (
|
|
163
150
|
<ListItemPrimitive.Description
|
|
164
151
|
ref={ref as never}
|
|
165
|
-
className={cn(listItemDescriptionVariants(
|
|
152
|
+
className={cn(listItemDescriptionVariants(), className)}
|
|
166
153
|
style={style}
|
|
167
154
|
{...props}
|
|
168
155
|
/>
|
|
@@ -178,12 +165,10 @@ export interface ListItemMetaProps extends TextProps {
|
|
|
178
165
|
|
|
179
166
|
const ListItemMeta = forwardRef<Text, ListItemMetaProps>(
|
|
180
167
|
({ className, numberOfLines = 1, style, ...props }, ref) => {
|
|
181
|
-
const { size } = useListItemStyleContext();
|
|
182
|
-
|
|
183
168
|
return (
|
|
184
169
|
<ListItemPrimitive.Meta
|
|
185
170
|
ref={ref as never}
|
|
186
|
-
className={cn(listItemMetaVariants(
|
|
171
|
+
className={cn(listItemMetaVariants(), className)}
|
|
187
172
|
numberOfLines={numberOfLines}
|
|
188
173
|
style={style}
|
|
189
174
|
{...props}
|
|
@@ -1,43 +1,48 @@
|
|
|
1
1
|
import { Platform } from 'react-native';
|
|
2
2
|
import { cva, type VariantProps } from 'class-variance-authority';
|
|
3
|
-
import {
|
|
4
|
-
COLOR_BORDER_DEFAULT,
|
|
5
|
-
COLOR_TEXT_MUTED,
|
|
6
|
-
COLOR_TEXT_PRIMARY,
|
|
7
|
-
COLOR_TEXT_SECONDARY,
|
|
8
|
-
TRANSITION_COLORS,
|
|
9
|
-
} from '../../styles/primitives';
|
|
3
|
+
import { TRANSITION_COLORS } from '../../styles/primitives';
|
|
10
4
|
|
|
11
|
-
// ── Root (row): density,
|
|
5
|
+
// ── Root (row): density, separator, interactive feedback ───────────────────
|
|
6
|
+
//
|
|
7
|
+
// Web hover/active/focus paint an absolutely positioned bg-content-primary overlay at
|
|
8
|
+
// --opacity-hover (8%) / --opacity-hover-overlay (20%) / --opacity-selected (12%), plus a focus
|
|
9
|
+
// ring on focus-visible. State is driven by the data attributes the primitive root emits
|
|
10
|
+
// (data-hover / data-active / data-focus-visible) — or by the composed child on `asChild`
|
|
11
|
+
// (e.g. Link emits the same attributes). Native active uses a flat tint because ::before
|
|
12
|
+
// pseudo-elements are web-only.
|
|
13
|
+
//
|
|
14
|
+
// TODO: Handle native background color hover/focus transitions
|
|
12
15
|
|
|
13
16
|
export const listItemRootVariants = cva(
|
|
14
17
|
[
|
|
15
|
-
'flex-row self-stretch w-full px-
|
|
16
|
-
'data-[disabled=true]:opacity-
|
|
17
|
-
'data-[active=true]:opacity-70',
|
|
18
|
+
'relative flex-row self-stretch w-full overflow-clip px-5 bg-transparent',
|
|
19
|
+
'data-[disabled=true]:opacity-[var(--opacity-disabled)] data-[disabled=true]:pointer-events-none',
|
|
18
20
|
TRANSITION_COLORS,
|
|
19
21
|
Platform.select({
|
|
20
22
|
web: [
|
|
21
23
|
'outline-none',
|
|
22
|
-
'
|
|
23
|
-
'
|
|
24
|
-
'
|
|
24
|
+
'before:pointer-events-none before:absolute before:inset-0 before:bg-content-primary before:opacity-0 before:content-[""]',
|
|
25
|
+
'before:transition-opacity before:duration-150 before:ease-out',
|
|
26
|
+
'data-[hover=true]:before:opacity-[var(--opacity-hover)]',
|
|
27
|
+
// Pressed wins over hover via the compound selector (higher specificity), mirroring Button.
|
|
28
|
+
'data-[active=true]:data-[hover=true]:before:opacity-[var(--opacity-hover-overlay)]',
|
|
29
|
+
'data-[focus-visible=true]:before:opacity-[var(--opacity-selected)]',
|
|
30
|
+
'data-[focus-visible=true]:ring-2 data-[focus-visible=true]:ring-stroke-focus data-[focus-visible=true]:ring-offset-2',
|
|
25
31
|
].join(' '),
|
|
26
|
-
default: '',
|
|
32
|
+
default: 'data-[active=true]:bg-surface-primary-hover',
|
|
27
33
|
}),
|
|
28
34
|
],
|
|
29
35
|
{
|
|
30
36
|
variants: {
|
|
31
37
|
size: {
|
|
32
|
-
default: 'gap-3 py-
|
|
33
|
-
compact: 'gap-
|
|
34
|
-
},
|
|
35
|
-
surface: {
|
|
36
|
-
default: 'bg-white',
|
|
37
|
-
negative: 'bg-red-50',
|
|
38
|
+
default: 'gap-3 py-3 min-h-16',
|
|
39
|
+
compact: 'gap-3 py-2 min-h-12',
|
|
38
40
|
},
|
|
39
41
|
showSeparator: {
|
|
40
|
-
true: [
|
|
42
|
+
true: [
|
|
43
|
+
'border-b border-solid border-stroke-secondary',
|
|
44
|
+
Platform.select({ web: 'before:-bottom-px', default: '' }),
|
|
45
|
+
].join(' '),
|
|
41
46
|
false: 'border-b-0',
|
|
42
47
|
},
|
|
43
48
|
crossAlign: {
|
|
@@ -45,18 +50,8 @@ export const listItemRootVariants = cva(
|
|
|
45
50
|
start: 'items-start',
|
|
46
51
|
},
|
|
47
52
|
},
|
|
48
|
-
compoundVariants: [
|
|
49
|
-
{
|
|
50
|
-
surface: 'negative',
|
|
51
|
-
className: Platform.select({
|
|
52
|
-
web: 'web:data-[hovered=true]:bg-red-100/90',
|
|
53
|
-
default: '',
|
|
54
|
-
}),
|
|
55
|
-
},
|
|
56
|
-
],
|
|
57
53
|
defaultVariants: {
|
|
58
54
|
size: 'default',
|
|
59
|
-
surface: 'default',
|
|
60
55
|
showSeparator: true,
|
|
61
56
|
crossAlign: 'center',
|
|
62
57
|
},
|
|
@@ -65,23 +60,28 @@ export const listItemRootVariants = cva(
|
|
|
65
60
|
|
|
66
61
|
// ── Leading / trailing slots ─────────────────────────────────────────────────
|
|
67
62
|
|
|
68
|
-
export const listItemLeadingSlotVariants = cva([
|
|
63
|
+
export const listItemLeadingSlotVariants = cva([
|
|
64
|
+
'relative z-10 flex shrink-0 items-center justify-center',
|
|
65
|
+
]);
|
|
69
66
|
|
|
70
|
-
export const listItemTrailingSlotVariants = cva(
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
67
|
+
export const listItemTrailingSlotVariants = cva(
|
|
68
|
+
['relative z-10 flex shrink-0 flex-row justify-end gap-2'],
|
|
69
|
+
{
|
|
70
|
+
variants: {
|
|
71
|
+
crossAlign: {
|
|
72
|
+
center: 'items-center',
|
|
73
|
+
start: 'items-start self-start',
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
defaultVariants: {
|
|
77
|
+
crossAlign: 'center',
|
|
75
78
|
},
|
|
76
79
|
},
|
|
77
|
-
|
|
78
|
-
crossAlign: 'center',
|
|
79
|
-
},
|
|
80
|
-
});
|
|
80
|
+
);
|
|
81
81
|
|
|
82
82
|
// ── Content stack (title / description / meta) ───────────────────────────────
|
|
83
83
|
|
|
84
|
-
export const listItemContentVariants = cva(
|
|
84
|
+
export const listItemContentVariants = cva('relative z-10 flex min-w-0 flex-1 flex-col gap-1', {
|
|
85
85
|
variants: {
|
|
86
86
|
crossAlign: {
|
|
87
87
|
center: 'justify-center',
|
|
@@ -95,48 +95,18 @@ export const listItemContentVariants = cva(['flex min-w-0 flex-1 flex-col gap-1'
|
|
|
95
95
|
|
|
96
96
|
// ── Typography ───────────────────────────────────────────────────────────────
|
|
97
97
|
|
|
98
|
-
export const listItemTitleVariants = cva(
|
|
99
|
-
variants: {
|
|
100
|
-
size: {
|
|
101
|
-
default: 'text-base leading-snug',
|
|
102
|
-
compact: 'text-sm leading-snug',
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
defaultVariants: {
|
|
106
|
-
size: 'default',
|
|
107
|
-
},
|
|
108
|
-
});
|
|
98
|
+
export const listItemTitleVariants = cva('body-md font-medium text-content-primary');
|
|
109
99
|
|
|
110
|
-
export const listItemDescriptionVariants = cva(
|
|
111
|
-
variants: {
|
|
112
|
-
size: {
|
|
113
|
-
default: 'text-sm leading-normal',
|
|
114
|
-
compact: 'text-xs leading-normal',
|
|
115
|
-
},
|
|
116
|
-
},
|
|
117
|
-
defaultVariants: {
|
|
118
|
-
size: 'default',
|
|
119
|
-
},
|
|
120
|
-
});
|
|
100
|
+
export const listItemDescriptionVariants = cva('body-sm text-content-secondary');
|
|
121
101
|
|
|
122
|
-
export const listItemMetaVariants = cva(
|
|
123
|
-
variants: {
|
|
124
|
-
size: {
|
|
125
|
-
default: 'text-xs leading-normal',
|
|
126
|
-
compact: 'text-[11px] leading-normal',
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
defaultVariants: {
|
|
130
|
-
size: 'default',
|
|
131
|
-
},
|
|
132
|
-
});
|
|
102
|
+
export const listItemMetaVariants = cva('body-sm text-content-tertiary');
|
|
133
103
|
|
|
134
104
|
// ── Section header (group label row inside lists / cards) ───────────────────
|
|
135
105
|
|
|
136
106
|
export const listItemSectionHeaderVariants = cva(
|
|
137
107
|
[
|
|
138
108
|
'flex-row items-center justify-between gap-2 border-b border-solid px-4 py-3',
|
|
139
|
-
|
|
109
|
+
'border-stroke-secondary',
|
|
140
110
|
],
|
|
141
111
|
{
|
|
142
112
|
variants: {
|
|
@@ -152,9 +122,8 @@ export const listItemSectionHeaderVariants = cva(
|
|
|
152
122
|
);
|
|
153
123
|
|
|
154
124
|
/** Default section-title typography; applied by `ListItem.SectionHeader` for string/number children. Exported for rare custom composition. */
|
|
155
|
-
export const listItemSectionHeaderLabelVariants = cva(
|
|
156
|
-
'text-xs font-semibold uppercase tracking-wide',
|
|
157
|
-
|
|
158
|
-
]);
|
|
125
|
+
export const listItemSectionHeaderLabelVariants = cva(
|
|
126
|
+
'text-xs font-semibold uppercase tracking-wide text-content-secondary',
|
|
127
|
+
);
|
|
159
128
|
|
|
160
129
|
export type ListItemVariantProps = VariantProps<typeof listItemRootVariants>;
|