@cdx-ui/components 0.0.1-beta.6 → 0.0.1-beta.61
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
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
import { forwardRef, type ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
Pressable,
|
|
4
|
+
Text,
|
|
5
|
+
View,
|
|
6
|
+
type PressableProps,
|
|
7
|
+
type TextProps,
|
|
8
|
+
type ViewProps,
|
|
9
|
+
} from 'react-native';
|
|
10
|
+
import { CheckCircle, Close as CloseIcon, EmergencyHome, Warning } from '@cdx-ui/icons';
|
|
4
11
|
import {
|
|
5
12
|
createDialog,
|
|
6
|
-
type IDialogBodyProps,
|
|
7
13
|
type IDialogCloseProps,
|
|
8
14
|
type IDialogContentProps,
|
|
9
15
|
type IDialogDescriptionProps,
|
|
10
16
|
type IDialogFooterProps,
|
|
11
17
|
type IDialogHeaderProps,
|
|
18
|
+
type IDialogPopupProps,
|
|
12
19
|
type IDialogRootProps,
|
|
13
20
|
type IDialogTitleProps,
|
|
14
21
|
type IDialogTriggerProps,
|
|
@@ -16,8 +23,8 @@ import {
|
|
|
16
23
|
import { cn, useStyleContext, withStyleContext } from '@cdx-ui/utils';
|
|
17
24
|
import { Icon } from '../Icon';
|
|
18
25
|
import {
|
|
26
|
+
type DialogTitleVariantProps,
|
|
19
27
|
type DialogVariantProps,
|
|
20
|
-
dialogBodyVariants,
|
|
21
28
|
dialogCloseIconVariants,
|
|
22
29
|
dialogCloseVariants,
|
|
23
30
|
dialogContentVariants,
|
|
@@ -25,6 +32,9 @@ import {
|
|
|
25
32
|
dialogFooterVariants,
|
|
26
33
|
dialogHeaderVariants,
|
|
27
34
|
dialogOverlayVariants,
|
|
35
|
+
dialogPopupVariants,
|
|
36
|
+
dialogTextVariants,
|
|
37
|
+
dialogTitleIconVariants,
|
|
28
38
|
dialogTitleVariants,
|
|
29
39
|
} from './styles';
|
|
30
40
|
|
|
@@ -59,11 +69,11 @@ const DialogPrimitive = createDialog({
|
|
|
59
69
|
Root,
|
|
60
70
|
Trigger: Pressable,
|
|
61
71
|
Overlay: StyledOverlay,
|
|
62
|
-
|
|
72
|
+
Popup: View,
|
|
63
73
|
Header: View,
|
|
64
74
|
Title: Text,
|
|
65
75
|
Description: Text,
|
|
66
|
-
|
|
76
|
+
Content: View,
|
|
67
77
|
Footer: View,
|
|
68
78
|
Close: Pressable,
|
|
69
79
|
});
|
|
@@ -78,8 +88,14 @@ export interface DialogRootProps
|
|
|
78
88
|
}
|
|
79
89
|
|
|
80
90
|
const DialogRoot = forwardRef<View, DialogRootProps>(
|
|
81
|
-
({ size = 'md', className, children, style, ...props }, ref) => (
|
|
82
|
-
<DialogPrimitive
|
|
91
|
+
({ size = 'md', fullBleed = false, className, children, style, ...props }, ref) => (
|
|
92
|
+
<DialogPrimitive
|
|
93
|
+
ref={ref}
|
|
94
|
+
className={className}
|
|
95
|
+
style={style}
|
|
96
|
+
context={{ size, fullBleed }}
|
|
97
|
+
{...props}
|
|
98
|
+
>
|
|
83
99
|
{children}
|
|
84
100
|
</DialogPrimitive>
|
|
85
101
|
),
|
|
@@ -107,29 +123,29 @@ const DialogTrigger = forwardRef<View, DialogTriggerProps>(
|
|
|
107
123
|
DialogTrigger.displayName = 'Dialog.Trigger';
|
|
108
124
|
|
|
109
125
|
// =============================================================================
|
|
110
|
-
// STYLED
|
|
126
|
+
// STYLED POPUP (wraps DialogPrimitive.Popup)
|
|
111
127
|
// =============================================================================
|
|
112
128
|
|
|
113
|
-
export interface
|
|
129
|
+
export interface DialogPopupProps extends IDialogPopupProps, Pick<DialogVariantProps, 'size'> {
|
|
114
130
|
className?: string;
|
|
115
131
|
children?: ReactNode;
|
|
116
132
|
}
|
|
117
133
|
|
|
118
|
-
const
|
|
134
|
+
const DialogPopup = forwardRef<View, DialogPopupProps>(
|
|
119
135
|
({ size: sizeProp, className, children, style, ...props }, ref) => {
|
|
120
136
|
const { size: contextSize } = useDialogStyleContext();
|
|
121
137
|
const size = sizeProp ?? contextSize;
|
|
122
|
-
const computedClassName = cn(
|
|
138
|
+
const computedClassName = cn(dialogPopupVariants({ size }), className);
|
|
123
139
|
|
|
124
140
|
return (
|
|
125
|
-
<DialogPrimitive.
|
|
141
|
+
<DialogPrimitive.Popup ref={ref} className={computedClassName} style={style} {...props}>
|
|
126
142
|
{children}
|
|
127
|
-
</DialogPrimitive.
|
|
143
|
+
</DialogPrimitive.Popup>
|
|
128
144
|
);
|
|
129
145
|
},
|
|
130
146
|
);
|
|
131
147
|
|
|
132
|
-
|
|
148
|
+
DialogPopup.displayName = 'Dialog.Popup';
|
|
133
149
|
|
|
134
150
|
// =============================================================================
|
|
135
151
|
// STYLED HEADER
|
|
@@ -158,14 +174,35 @@ DialogHeader.displayName = 'Dialog.Header';
|
|
|
158
174
|
// STYLED TITLE
|
|
159
175
|
// =============================================================================
|
|
160
176
|
|
|
161
|
-
|
|
177
|
+
const APPEARANCE_ICON_MAP = {
|
|
178
|
+
danger: EmergencyHome,
|
|
179
|
+
warning: Warning,
|
|
180
|
+
success: CheckCircle,
|
|
181
|
+
} as const;
|
|
182
|
+
|
|
183
|
+
export interface DialogTitleProps extends IDialogTitleProps, DialogTitleVariantProps {
|
|
162
184
|
className?: string;
|
|
163
185
|
children?: ReactNode;
|
|
164
186
|
}
|
|
165
187
|
|
|
166
188
|
const DialogTitle = forwardRef<Text, DialogTitleProps>(
|
|
167
|
-
({ className, children, style, ...props }, ref) => {
|
|
168
|
-
const computedClassName = cn(dialogTitleVariants(), className);
|
|
189
|
+
({ appearance = 'default', className, children, style, ...props }, ref) => {
|
|
190
|
+
const computedClassName = cn(dialogTitleVariants({ appearance }), className);
|
|
191
|
+
const IconComponent =
|
|
192
|
+
appearance && appearance in APPEARANCE_ICON_MAP
|
|
193
|
+
? APPEARANCE_ICON_MAP[appearance as keyof typeof APPEARANCE_ICON_MAP]
|
|
194
|
+
: null;
|
|
195
|
+
|
|
196
|
+
if (IconComponent) {
|
|
197
|
+
return (
|
|
198
|
+
<View className="flex-row items-center gap-1">
|
|
199
|
+
<Icon as={IconComponent} className={dialogTitleIconVariants({ appearance })} />
|
|
200
|
+
<DialogPrimitive.Title ref={ref} className={computedClassName} style={style} {...props}>
|
|
201
|
+
{children}
|
|
202
|
+
</DialogPrimitive.Title>
|
|
203
|
+
</View>
|
|
204
|
+
);
|
|
205
|
+
}
|
|
169
206
|
|
|
170
207
|
return (
|
|
171
208
|
<DialogPrimitive.Title ref={ref} className={computedClassName} style={style} {...props}>
|
|
@@ -201,27 +238,54 @@ const DialogDescription = forwardRef<Text, DialogDescriptionProps>(
|
|
|
201
238
|
DialogDescription.displayName = 'Dialog.Description';
|
|
202
239
|
|
|
203
240
|
// =============================================================================
|
|
204
|
-
// STYLED
|
|
241
|
+
// STYLED CONTENT (wraps DialogPrimitive.Content)
|
|
242
|
+
// =============================================================================
|
|
243
|
+
|
|
244
|
+
export interface DialogContentProps extends IDialogContentProps {
|
|
245
|
+
className?: string;
|
|
246
|
+
children?: ReactNode;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
const DialogContent = forwardRef<View, DialogContentProps>(
|
|
250
|
+
({ className, children, style, ...props }, ref) => {
|
|
251
|
+
const { fullBleed } = useDialogStyleContext();
|
|
252
|
+
const computedClassName = cn(
|
|
253
|
+
dialogContentVariants({ fullBleed: fullBleed ?? false }),
|
|
254
|
+
className,
|
|
255
|
+
);
|
|
256
|
+
|
|
257
|
+
return (
|
|
258
|
+
<DialogPrimitive.Content ref={ref} className={computedClassName} style={style} {...props}>
|
|
259
|
+
{children}
|
|
260
|
+
</DialogPrimitive.Content>
|
|
261
|
+
);
|
|
262
|
+
},
|
|
263
|
+
);
|
|
264
|
+
|
|
265
|
+
DialogContent.displayName = 'Dialog.Content';
|
|
266
|
+
|
|
267
|
+
// =============================================================================
|
|
268
|
+
// STYLED TEXT
|
|
205
269
|
// =============================================================================
|
|
206
270
|
|
|
207
|
-
export interface
|
|
271
|
+
export interface DialogTextProps extends TextProps {
|
|
208
272
|
className?: string;
|
|
209
273
|
children?: ReactNode;
|
|
210
274
|
}
|
|
211
275
|
|
|
212
|
-
const
|
|
276
|
+
const DialogText = forwardRef<Text, DialogTextProps>(
|
|
213
277
|
({ className, children, style, ...props }, ref) => {
|
|
214
|
-
const computedClassName = cn(
|
|
278
|
+
const computedClassName = cn(dialogTextVariants(), className);
|
|
215
279
|
|
|
216
280
|
return (
|
|
217
|
-
<
|
|
281
|
+
<Text ref={ref} className={computedClassName} style={style} {...props}>
|
|
218
282
|
{children}
|
|
219
|
-
</
|
|
283
|
+
</Text>
|
|
220
284
|
);
|
|
221
285
|
},
|
|
222
286
|
);
|
|
223
287
|
|
|
224
|
-
|
|
288
|
+
DialogText.displayName = 'Dialog.Text';
|
|
225
289
|
|
|
226
290
|
// =============================================================================
|
|
227
291
|
// STYLED FOOTER
|
|
@@ -283,22 +347,24 @@ DialogClose.displayName = 'Dialog.Close';
|
|
|
283
347
|
|
|
284
348
|
type DialogCompoundComponent = typeof DialogRoot & {
|
|
285
349
|
Trigger: typeof DialogTrigger;
|
|
286
|
-
|
|
350
|
+
Popup: typeof DialogPopup;
|
|
287
351
|
Header: typeof DialogHeader;
|
|
288
352
|
Title: typeof DialogTitle;
|
|
289
353
|
Description: typeof DialogDescription;
|
|
290
|
-
|
|
354
|
+
Content: typeof DialogContent;
|
|
355
|
+
Text: typeof DialogText;
|
|
291
356
|
Footer: typeof DialogFooter;
|
|
292
357
|
Close: typeof DialogClose;
|
|
293
358
|
};
|
|
294
359
|
|
|
295
360
|
export const Dialog = Object.assign(DialogRoot, {
|
|
296
361
|
Trigger: DialogTrigger,
|
|
297
|
-
|
|
362
|
+
Popup: DialogPopup,
|
|
298
363
|
Header: DialogHeader,
|
|
299
364
|
Title: DialogTitle,
|
|
300
365
|
Description: DialogDescription,
|
|
301
|
-
|
|
366
|
+
Content: DialogContent,
|
|
367
|
+
Text: DialogText,
|
|
302
368
|
Footer: DialogFooter,
|
|
303
369
|
Close: DialogClose,
|
|
304
370
|
}) as DialogCompoundComponent;
|
|
@@ -1,36 +1,28 @@
|
|
|
1
1
|
import { Platform } from 'react-native';
|
|
2
2
|
import { cva, type VariantProps } from 'class-variance-authority';
|
|
3
|
-
import {
|
|
4
|
-
COLOR_BG_INVERSE,
|
|
5
|
-
COLOR_BG_PRIMARY,
|
|
6
|
-
COLOR_BORDER_DEFAULT,
|
|
7
|
-
COLOR_TEXT_PRIMARY,
|
|
8
|
-
COLOR_TEXT_SECONDARY,
|
|
9
|
-
RADIUS_MD,
|
|
10
|
-
SHADOW_MD,
|
|
11
|
-
TRANSITION_COLORS,
|
|
12
|
-
} from '../../styles/primitives';
|
|
3
|
+
import { TRANSITION_COLORS } from '../../styles/primitives';
|
|
13
4
|
|
|
14
5
|
// ── Overlay ─────────────────────────────────────────────────
|
|
15
6
|
|
|
16
|
-
export const dialogOverlayVariants = cva(['absolute inset-0',
|
|
7
|
+
export const dialogOverlayVariants = cva(['absolute inset-0', 'bg-surface-backdrop']);
|
|
17
8
|
|
|
18
|
-
// ──
|
|
9
|
+
// ── Popup (renamed from dialogContentVariants) ──────────────
|
|
19
10
|
|
|
20
|
-
export const
|
|
11
|
+
export const dialogPopupVariants = cva(
|
|
21
12
|
[
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
Platform.select({ web: SHADOW_MD, default: '' }),
|
|
13
|
+
'bg-surface-primary',
|
|
14
|
+
'rounded-lg',
|
|
15
|
+
Platform.select({ web: 'shadow-lg', default: '' }),
|
|
26
16
|
'max-h-[85vh] overflow-hidden',
|
|
27
17
|
],
|
|
28
18
|
{
|
|
29
19
|
variants: {
|
|
30
20
|
size: {
|
|
21
|
+
xs: 'w-[90%] max-w-xs',
|
|
31
22
|
sm: 'w-[90%] max-w-sm',
|
|
32
23
|
md: 'w-[90%] max-w-md',
|
|
33
24
|
lg: 'w-[90%] max-w-lg',
|
|
25
|
+
xl: 'w-[90%] max-w-xl',
|
|
34
26
|
full: 'w-full mx-4',
|
|
35
27
|
},
|
|
36
28
|
},
|
|
@@ -43,46 +35,96 @@ export const dialogContentVariants = cva(
|
|
|
43
35
|
// ── Header ──────────────────────────────────────────────────
|
|
44
36
|
|
|
45
37
|
export const dialogHeaderVariants = cva([
|
|
46
|
-
'flex-
|
|
47
|
-
'
|
|
38
|
+
'flex-col items-start justify-between shrink-0',
|
|
39
|
+
'pl-6 pr-14 py-4',
|
|
48
40
|
]);
|
|
49
41
|
|
|
50
42
|
// ── Title ───────────────────────────────────────────────────
|
|
51
43
|
|
|
52
|
-
export const dialogTitleVariants = cva(['
|
|
44
|
+
export const dialogTitleVariants = cva(['heading-sm', 'text-content-primary'], {
|
|
45
|
+
variants: {
|
|
46
|
+
appearance: {
|
|
47
|
+
default: '',
|
|
48
|
+
danger: '',
|
|
49
|
+
warning: '',
|
|
50
|
+
success: '',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
defaultVariants: {
|
|
54
|
+
appearance: 'default',
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
// ── Title Icon ──────────────────────────────────────────────
|
|
59
|
+
|
|
60
|
+
export const dialogTitleIconVariants = cva(['size-5'], {
|
|
61
|
+
variants: {
|
|
62
|
+
appearance: {
|
|
63
|
+
default: '',
|
|
64
|
+
danger: 'text-content-danger',
|
|
65
|
+
warning: 'text-content-warning',
|
|
66
|
+
success: 'text-content-success',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
defaultVariants: {
|
|
70
|
+
appearance: 'default',
|
|
71
|
+
},
|
|
72
|
+
});
|
|
53
73
|
|
|
54
74
|
// ── Description ─────────────────────────────────────────────
|
|
55
75
|
|
|
56
|
-
export const dialogDescriptionVariants = cva(['
|
|
76
|
+
export const dialogDescriptionVariants = cva(['body-sm mt-1', 'text-content-secondary']);
|
|
77
|
+
|
|
78
|
+
// ── Content (renamed from dialogBodyVariants) ───────────────
|
|
79
|
+
|
|
80
|
+
export const dialogContentVariants = cva(['px-6 py-0 gap-2 shrink min-h-0'], {
|
|
81
|
+
variants: {
|
|
82
|
+
fullBleed: {
|
|
83
|
+
true: 'px-0',
|
|
84
|
+
false: '',
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
defaultVariants: {
|
|
88
|
+
fullBleed: false,
|
|
89
|
+
},
|
|
90
|
+
});
|
|
57
91
|
|
|
58
|
-
// ──
|
|
92
|
+
// ── Text ────────────────────────────────────────────────────
|
|
59
93
|
|
|
60
|
-
export const
|
|
94
|
+
export const dialogTextVariants = cva(['body-md', 'text-content-primary']);
|
|
61
95
|
|
|
62
96
|
// ── Footer ──────────────────────────────────────────────────
|
|
63
97
|
|
|
64
98
|
export const dialogFooterVariants = cva([
|
|
65
99
|
'flex-row items-center justify-end shrink-0',
|
|
66
|
-
'gap-
|
|
100
|
+
'gap-2 px-6 pt-4 pb-6',
|
|
67
101
|
]);
|
|
68
102
|
|
|
69
103
|
// ── Close ───────────────────────────────────────────────────
|
|
70
104
|
|
|
71
105
|
export const dialogCloseVariants = cva([
|
|
72
|
-
'
|
|
106
|
+
'absolute right-[14px] top-[14px]',
|
|
107
|
+
'min-w-[32px] min-h-[32px] items-center justify-center',
|
|
108
|
+
'p-[6px] rounded-full',
|
|
73
109
|
TRANSITION_COLORS,
|
|
74
110
|
Platform.select({
|
|
75
111
|
default: 'data-[active=true]:opacity-70',
|
|
76
112
|
web: [
|
|
77
|
-
'data-[hover=true]:bg-
|
|
78
|
-
'data-[active=true]:bg-
|
|
79
|
-
'data-[focus-visible=true]:ring-2 data-[focus-visible=true]:ring-
|
|
113
|
+
'data-[hover=true]:bg-surface-primary-hover',
|
|
114
|
+
'data-[active=true]:bg-surface-primary-active',
|
|
115
|
+
'data-[focus-visible=true]:ring-2 data-[focus-visible=true]:ring-stroke-focus data-[focus-visible=true]:ring-offset-2',
|
|
80
116
|
].join(' '),
|
|
81
117
|
}),
|
|
82
118
|
]);
|
|
83
119
|
|
|
84
120
|
// ── Close Icon ──────────────────────────────────────────────
|
|
85
121
|
|
|
86
|
-
export const dialogCloseIconVariants = cva(['size-5 text-
|
|
122
|
+
export const dialogCloseIconVariants = cva(['size-5 text-content-tertiary']);
|
|
123
|
+
|
|
124
|
+
// ── Exported types ──────────────────────────────────────────
|
|
125
|
+
|
|
126
|
+
export type DialogVariantProps = VariantProps<typeof dialogPopupVariants> & {
|
|
127
|
+
fullBleed?: boolean;
|
|
128
|
+
};
|
|
87
129
|
|
|
88
|
-
export type
|
|
130
|
+
export type DialogTitleVariantProps = VariantProps<typeof dialogTitleVariants>;
|
|
@@ -7,7 +7,7 @@ export type BaseFieldLabelProps = ViewProps & {
|
|
|
7
7
|
htmlFor?: string;
|
|
8
8
|
children?: ReactNode;
|
|
9
9
|
/** @platform native — ignored on DOM `<label>`; set by form primitive for Uniwind. */
|
|
10
|
-
dataSet?: Record<string, string>;
|
|
10
|
+
dataSet?: Record<string, boolean | string>;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
/** Real `<label>` so clicking the label focuses the associated control (`htmlFor` → input `id`). */
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
IFieldLabelProps,
|
|
9
9
|
type IFieldRootProps,
|
|
10
10
|
} from '@cdx-ui/primitives';
|
|
11
|
-
import { cn } from '@cdx-ui/utils';
|
|
11
|
+
import { cn, useFormControlContext } from '@cdx-ui/utils';
|
|
12
12
|
import { Icon } from '../Icon';
|
|
13
13
|
import { BaseFieldLabel } from './FieldLabel';
|
|
14
14
|
import {
|
|
@@ -70,7 +70,14 @@ export interface FieldLabelProps extends IFieldLabelProps, FieldLabelVariantProp
|
|
|
70
70
|
|
|
71
71
|
const FieldLabel = forwardRef<View, FieldLabelProps>(
|
|
72
72
|
({ className, children, style, htmlFor, ...props }, ref) => {
|
|
73
|
-
const
|
|
73
|
+
const { isLabelFocused, isInvalid } = useFormControlContext();
|
|
74
|
+
// Native: inject text-content-action via context (group-has CSS handles web).
|
|
75
|
+
// native: prefix keeps this class inert on web so it never conflicts with text-content-primary.
|
|
76
|
+
const labelClassName = cn(
|
|
77
|
+
fieldLabelVariants(),
|
|
78
|
+
isLabelFocused && !isInvalid && 'native:text-content-action',
|
|
79
|
+
className,
|
|
80
|
+
);
|
|
74
81
|
|
|
75
82
|
return (
|
|
76
83
|
<FieldPrimitive.Label
|
|
@@ -79,7 +86,7 @@ const FieldLabel = forwardRef<View, FieldLabelProps>(
|
|
|
79
86
|
style={style}
|
|
80
87
|
htmlFor={htmlFor}
|
|
81
88
|
requiredIndicator={
|
|
82
|
-
<Text className="text-
|
|
89
|
+
<Text className="text-content-danger" aria-hidden>
|
|
83
90
|
{' *'}
|
|
84
91
|
</Text>
|
|
85
92
|
}
|
|
@@ -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,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
|
);
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
type IButtonProps,
|
|
7
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 {
|
|
@@ -24,7 +24,7 @@ const IconButtonPrimitive = createButton({
|
|
|
24
24
|
Icon: View,
|
|
25
25
|
});
|
|
26
26
|
|
|
27
|
-
function IconButtonGlyph({ as: IconComponent, className }: { as:
|
|
27
|
+
function IconButtonGlyph({ as: IconComponent, className }: { as: ForgeIcon; className: string }) {
|
|
28
28
|
const { hover, focus, active, disabled, focusVisible } = useButtonContext();
|
|
29
29
|
return (
|
|
30
30
|
<Icon
|
|
@@ -43,8 +43,8 @@ function IconButtonGlyph({ as: IconComponent, className }: { as: CdxIcon; classN
|
|
|
43
43
|
|
|
44
44
|
export interface IconButtonProps extends PressableProps, IButtonProps, IconButtonVariantProps {
|
|
45
45
|
className?: string;
|
|
46
|
-
/**
|
|
47
|
-
as:
|
|
46
|
+
/** Forge icon component to render (icon-only control). */
|
|
47
|
+
as: ForgeIcon;
|
|
48
48
|
/** Passed through to the underlying `Icon`. */
|
|
49
49
|
iconClassName?: IconProps['className'];
|
|
50
50
|
}
|
|
@@ -53,6 +53,7 @@ const IconButtonRoot = forwardRef<View, IconButtonProps>(
|
|
|
53
53
|
(
|
|
54
54
|
{
|
|
55
55
|
variant = 'solid',
|
|
56
|
+
color = 'neutral',
|
|
56
57
|
size = 'default',
|
|
57
58
|
className,
|
|
58
59
|
style,
|
|
@@ -63,11 +64,11 @@ const IconButtonRoot = forwardRef<View, IconButtonProps>(
|
|
|
63
64
|
},
|
|
64
65
|
ref,
|
|
65
66
|
) => {
|
|
66
|
-
const rootClassName = cn(iconButtonRootVariants({ variant, size }), className);
|
|
67
|
+
const rootClassName = cn(iconButtonRootVariants({ variant, color, size }), className);
|
|
67
68
|
|
|
68
69
|
const glyphClassName = cn(
|
|
69
70
|
iconButtonGlyphVariants({ size }),
|
|
70
|
-
iconButtonIconColorVariants(),
|
|
71
|
+
iconButtonIconColorVariants({ variant, color }),
|
|
71
72
|
iconClassName,
|
|
72
73
|
);
|
|
73
74
|
|