@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","forwardRef","StyleSheet","jsx","_jsx","OMIT","Set","resolveChildren","children","pressed","filterDomProps","rest","entries","Object","filter","key","has","fromEntries","webButtonLayoutStyle","display","flexDirection","alignItems","justifyContent","width","minWidth","textAlign","boxSizing","margin","font","lineHeight","WebkitAppearance","appearance","SelectTriggerHost","props","ref","onPress","onPressIn","onPressOut","onHoverIn","onHoverOut","disabled","style","className","testID","domProps","flattened","flatten","type","undefined","onClick","e","onPointerDown","onPointerUp","onPointerCancel","onMouseEnter","onMouseLeave","displayName"],"sourceRoot":"../../../../src","sources":["components/Select/SelectTriggerHost.web.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAASC,UAAU,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;
|
|
1
|
+
{"version":3,"names":["React","forwardRef","StyleSheet","domDataAttributes","jsx","_jsx","OMIT","Set","resolveChildren","children","pressed","filterDomProps","rest","entries","Object","filter","key","has","fromEntries","webButtonLayoutStyle","display","flexDirection","alignItems","justifyContent","width","minWidth","textAlign","boxSizing","margin","font","lineHeight","WebkitAppearance","appearance","SelectTriggerHost","props","ref","onPress","onPressIn","onPressOut","onHoverIn","onHoverOut","disabled","style","className","testID","dataSet","domProps","dataAttrs","flattened","flatten","type","undefined","onClick","e","onPointerDown","onPointerUp","onPointerCancel","onMouseEnter","onMouseLeave","displayName"],"sourceRoot":"../../../../src","sources":["components/Select/SelectTriggerHost.web.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAASC,UAAU,QAAQ,cAAc;AAEzC,SAASC,iBAAiB,QAAoC,oBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAOnF;AACA,MAAMC,IAAI,GAAG,IAAIC,GAAG,CAAS,CAC3B,SAAS,EACT,sBAAsB,EACtB,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,UAAU,EACV,OAAO,EACP,WAAW,EACX,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,sBAAsB,EACtB,6BAA6B,EAC7B,mBAAmB,EACnB,kCAAkC,EAClC,oBAAoB,EACpB,yBAAyB,EACzB,yBAAyB,EACzB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,0BAA0B,EAC1B,2BAA2B,EAC3B,gCAAgC,EAChC,aAAa,EACb,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,CACrB,CAAC;AAEF,SAASC,eAAeA,CAACC,QAAoC,EAAmB;EAC9E,IAAI,OAAOA,QAAQ,KAAK,UAAU,EAAE;IAClC,OAAOA,QAAQ,CAAC;MAAEC,OAAO,EAAE;IAAM,CAAC,CAAC;EACrC;EACA,OAAOD,QAAQ;AACjB;AAEA,SAASE,cAAcA,CAACC,IAAY,EAAiD;EACnF,MAAMC,OAAO,GAAGC,MAAM,CAACD,OAAO,CAACD,IAAI,CAAC,CAACG,MAAM,CAAC,CAAC,CAACC,GAAG,CAAC,KAAK,CAACV,IAAI,CAACW,GAAG,CAACD,GAAG,CAAC,CAAC;EACtE,OAAOF,MAAM,CAACI,WAAW,CAACL,OAAO,CAAC;AACpC;;AAEA;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IAAI,CAACZ,QAAQ,EAAE;QACbL,OAAO,GAAGiB,CAAqE,CAAC;MAClF;IACF,CAAE;IACFC,aAAa,EAAGD,CAAC,IAAK;MACpBhB,SAAS,GAAGgB,CAAuE,CAAC;IACtF,CAAE;IACFE,WAAW,EAAGF,CAAC,IAAK;MAClBf,UAAU,GAAGe,CAAwE,CAAC;IACxF,CAAE;IACFG,eAAe,EAAGH,CAAC,IAAK;MACtBf,UAAU,GAAGe,CAAwE,CAAC;IACxF,CAAE;IACFI,YAAY,EAAGJ,CAAC,IAAK;MACnBd,SAAS,GAAGc,CAAuE,CAAC;IACtF,CAAE;IACFK,YAAY,EAAGL,CAAC,IAAK;MACnBb,UAAU,GAAGa,CAAwE,CAAC;IACxF,CAAE;IAAA5C,QAAA,EAEDD,eAAe,CAACC,QAAQ;EAAC,CACpB,CAAC;AAEb,CACF,CAAC;AAEDwB,iBAAiB,CAAC0B,WAAW,GAAG,mBAAmB","ignoreList":[]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import { Pressable, Text, View } from 'react-native';
|
|
5
|
-
import {
|
|
5
|
+
import { KeyboardArrowDown } from '@cdx-ui/icons';
|
|
6
6
|
import { createSelect } from '@cdx-ui/primitives';
|
|
7
7
|
import { cn, useStyleContext, withStyleContext } from '@cdx-ui/utils';
|
|
8
8
|
import { Icon } from '../Icon';
|
|
@@ -72,7 +72,7 @@ const SelectTrigger = /*#__PURE__*/forwardRef(({
|
|
|
72
72
|
style: style,
|
|
73
73
|
...props,
|
|
74
74
|
children: [children, /*#__PURE__*/_jsx(SelectIcon, {
|
|
75
|
-
as:
|
|
75
|
+
as: KeyboardArrowDown
|
|
76
76
|
})]
|
|
77
77
|
});
|
|
78
78
|
});
|
|
@@ -109,6 +109,7 @@ SelectValue.displayName = 'Select.Value';
|
|
|
109
109
|
const SelectIcon = ({
|
|
110
110
|
className,
|
|
111
111
|
style,
|
|
112
|
+
as: IconComponent,
|
|
112
113
|
...props
|
|
113
114
|
}) => {
|
|
114
115
|
const {
|
|
@@ -117,10 +118,15 @@ const SelectIcon = ({
|
|
|
117
118
|
const computedClassName = cn(selectIconVariants({
|
|
118
119
|
size
|
|
119
120
|
}), className);
|
|
120
|
-
|
|
121
|
+
const iconSizeClass = size === 'small' ? 'size-4' : 'size-5';
|
|
122
|
+
return /*#__PURE__*/_jsx(SelectPrimitive.Icon, {
|
|
121
123
|
className: computedClassName,
|
|
122
124
|
style: style,
|
|
123
|
-
|
|
125
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
126
|
+
as: IconComponent,
|
|
127
|
+
className: iconSizeClass,
|
|
128
|
+
...props
|
|
129
|
+
})
|
|
124
130
|
});
|
|
125
131
|
};
|
|
126
132
|
SelectIcon.displayName = 'Select.Icon';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","Pressable","Text","View","
|
|
1
|
+
{"version":3,"names":["forwardRef","Pressable","Text","View","KeyboardArrowDown","createSelect","cn","useStyleContext","withStyleContext","Icon","SelectTriggerHost","selectContentVariants","selectIconVariants","selectItemLabelVariants","selectItemVariants","selectTriggerVariants","selectValueVariants","jsx","_jsx","jsxs","_jsxs","SCOPE","Root","useSelectStyleContext","SelectPrimitive","Trigger","Value","Content","Item","ItemLabel","SelectRoot","variant","size","className","children","style","props","ref","context","displayName","SelectTrigger","computedClassName","SelectIcon","as","SelectValue","IconComponent","iconSizeClass","SelectContent","SelectItem","SelectItemLabel","Select","Object","assign"],"sourceRoot":"../../../../src","sources":["components/Select/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAwB,OAAO;AAClD,SAASC,SAAS,EAAEC,IAAI,EAAkBC,IAAI,QAAwB,cAAc;AACpF,SAASC,iBAAiB,QAAQ,eAAe;AACjD,SACEC,YAAY,QAOP,oBAAoB;AAC3B,SAASC,EAAE,EAAEC,eAAe,EAAEC,gBAAgB,QAAQ,eAAe;AACrE,SAASC,IAAI,QA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,IAAA,CAACM,eAAe,CAACI,IAAI;IAACS,GAAG,EAAEA,GAAI;IAACJ,SAAS,EAAEQ,iBAAkB;IAACN,KAAK,EAAEA,KAAM;IAAA,GAAKC,KAAK;IAAAF,QAAA,EAClFA;EAAQ,CACW,CAAC;AAE3B,CACF,CAAC;AAEDc,UAAU,CAACT,WAAW,GAAG,aAAa;;AAEtC;AACA;AACA;;AAMA,MAAMU,eAAe,gBAAGjD,UAAU,CAChC,CAAC;EAAEiC,SAAS;EAAEE,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACvC,MAAM;IAAEL;EAAK,CAAC,GAAGT,qBAAqB,CAAC,CAAC;EAExC,MAAMkB,iBAAiB,GAAGnC,EAAE,CAACO,uBAAuB,CAAC;IAAEmB;EAAK,CAAC,CAAC,EAAEC,SAAS,CAAC;EAE1E,oBACEf,IAAA,CAACM,eAAe,CAACK,SAAS;IAACQ,GAAG,EAAEA,GAAI;IAACJ,SAAS,EAAEQ,iBAAkB;IAACN,KAAK,EAAEA,KAAM;IAAA,GAAKC;EAAK,CAAG,CAAC;AAElG,CACF,CAAC;AAEDa,eAAe,CAACV,WAAW,GAAG,kBAAkB;;AAEhD;AACA;AACA;;AAWA,OAAO,MAAMW,MAAM,GAAGC,MAAM,CAACC,MAAM,CAACtB,UAAU,EAAE;EAC9CL,OAAO,EAAEe,aAAa;EACtBd,KAAK,EAAEkB,WAAW;EAClBnC,IAAI,EAAEiC,UAAU;EAChBf,OAAO,EAAEoB,aAAa;EACtBnB,IAAI,EAAEoB,UAAU;EAChBnB,SAAS,EAAEoB;AACb,CAAC,CAA4B","ignoreList":[]}
|
|
@@ -2,21 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
import { Platform } from 'react-native';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
|
-
import {
|
|
5
|
+
import { DISABLED_CURSOR, TRANSITION_COLORS } from '../../styles/primitives';
|
|
6
6
|
|
|
7
7
|
// ── Trigger ─────────────────────────────────────────────────
|
|
8
8
|
|
|
9
|
-
export const selectTriggerVariants = cva(['flex w-full min-w-0 flex-row items-center justify-between text-start',
|
|
10
|
-
default: 'data-[active=true]:border-slate-300',
|
|
11
|
-
web: ['data-[hover=true]:border-slate-300 data-[active=true]:data-[hover=true]:border-slate-400', 'data-[focus-visible=true]:ring-2 data-[focus-visible=true]:ring-slate-400/50 data-[focus-visible=true]:ring-offset-2', 'data-[state=open]:ring-2 data-[state=open]:ring-slate-400/50'].join(' ')
|
|
12
|
-
})], {
|
|
9
|
+
export const selectTriggerVariants = cva(['flex w-full min-w-0 flex-row items-center justify-between text-start', 'bg-surface-primary', 'border border-stroke-primary', 'rounded-[var(--border-radius-default)]', TRANSITION_COLORS, 'data-[disabled=true]:bg-surface-secondary', 'data-[disabled=true]:opacity-[var(--opacity-disabled)]', DISABLED_CURSOR, 'data-[readonly=true]:cursor-default', 'data-[readonly=true]:bg-surface-secondary', 'web:data-[hover=true]:data-[focus=false]:data-[invalid=false]:border-stroke-hover', 'data-[focus=true]:border-[length:var(--border-width-focused)]', 'data-[focus=true]:data-[invalid=false]:border-stroke-action', 'data-[focus=true]:data-[invalid=true]:border-stroke-danger', 'data-[state=open]:border-[length:var(--border-width-focused)]', 'data-[state=open]:data-[invalid=false]:border-stroke-action', 'data-[state=open]:data-[invalid=true]:border-stroke-danger', 'data-[invalid=true]:border-stroke-danger'], {
|
|
13
10
|
variants: {
|
|
14
11
|
variant: {
|
|
15
12
|
outline: []
|
|
16
13
|
},
|
|
17
14
|
size: {
|
|
18
|
-
default:
|
|
19
|
-
small:
|
|
15
|
+
default: ['h-11 min-h-11 px-4 py-3 gap-4', 'data-[focus=true]:px-[calc(var(--spacing-4)-var(--spacing-px))]', 'data-[focus=true]:py-[calc(var(--spacing-3)-var(--spacing-px))]', 'data-[state=open]:px-[calc(var(--spacing-4)-var(--spacing-px))]', 'data-[state=open]:py-[calc(var(--spacing-3)-var(--spacing-px))]'],
|
|
16
|
+
small: ['h-8 min-h-8 px-3 py-2 gap-1.5', 'data-[focus=true]:px-[calc(var(--spacing-3)-var(--spacing-px))]', 'data-[focus=true]:py-[calc(var(--spacing-2)-var(--spacing-px))]', 'data-[state=open]:px-[calc(var(--spacing-3)-var(--spacing-px))]', 'data-[state=open]:py-[calc(var(--spacing-2)-var(--spacing-px))]']
|
|
20
17
|
}
|
|
21
18
|
},
|
|
22
19
|
defaultVariants: {
|
|
@@ -27,11 +24,11 @@ export const selectTriggerVariants = cva(['flex w-full min-w-0 flex-row items-ce
|
|
|
27
24
|
|
|
28
25
|
// ── Value ───────────────────────────────────────────────────
|
|
29
26
|
|
|
30
|
-
export const selectValueVariants = cva(['min-w-0 flex-1 text-start', 'data-[placeholder=true]:text-
|
|
27
|
+
export const selectValueVariants = cva(['min-w-0 flex-1 text-start', 'text-content-primary', 'data-[placeholder=true]:text-content-tertiary', 'data-[invalid=true]:text-content-danger'], {
|
|
31
28
|
variants: {
|
|
32
29
|
size: {
|
|
33
|
-
default:
|
|
34
|
-
small:
|
|
30
|
+
default: 'text-[0.875rem]',
|
|
31
|
+
small: 'text-[0.75rem]'
|
|
35
32
|
}
|
|
36
33
|
},
|
|
37
34
|
defaultVariants: {
|
|
@@ -41,11 +38,11 @@ export const selectValueVariants = cva(['min-w-0 flex-1 text-start', 'data-[plac
|
|
|
41
38
|
|
|
42
39
|
// ── Icon ────────────────────────────────────────────────────
|
|
43
40
|
|
|
44
|
-
export const selectIconVariants = cva(['shrink-0 items-center justify-center self-center',
|
|
41
|
+
export const selectIconVariants = cva(['shrink-0 items-center justify-center self-center', 'text-content-tertiary', 'data-[invalid=true]:text-content-danger', 'data-[state=open]:rotate-180'], {
|
|
45
42
|
variants: {
|
|
46
43
|
size: {
|
|
47
|
-
default: '
|
|
48
|
-
small: '
|
|
44
|
+
default: 'size-5',
|
|
45
|
+
small: 'size-4'
|
|
49
46
|
}
|
|
50
47
|
},
|
|
51
48
|
defaultVariants: {
|
|
@@ -55,16 +52,16 @@ export const selectIconVariants = cva(['shrink-0 items-center justify-center sel
|
|
|
55
52
|
|
|
56
53
|
// ── Content ─────────────────────────────────────────────────
|
|
57
54
|
|
|
58
|
-
export const selectContentVariants = cva([
|
|
59
|
-
web:
|
|
55
|
+
export const selectContentVariants = cva(['bg-surface-primary', 'border border-stroke-secondary', 'overflow-hidden', 'rounded-xl', Platform.select({
|
|
56
|
+
web: 'shadow-sm',
|
|
60
57
|
default: ''
|
|
61
58
|
}), 'max-h-60', 'py-1']);
|
|
62
59
|
|
|
63
60
|
// ── Item ────────────────────────────────────────────────────
|
|
64
61
|
|
|
65
|
-
export const selectItemVariants = cva(['flex-row items-center', 'transition-colors duration-100', 'data-[disabled=true]:opacity-50 data-[disabled=true]:pointer-events-none', 'data-[state=checked]:bg-
|
|
66
|
-
default: 'data-[active=true]:bg-
|
|
67
|
-
web: 'data-[hover=true]:bg-
|
|
62
|
+
export const selectItemVariants = cva(['flex-row items-center', 'transition-colors duration-100', 'data-[disabled=true]:opacity-50 data-[disabled=true]:pointer-events-none', 'data-[state=checked]:bg-surface-action-tint data-[state=checked]:font-medium', Platform.select({
|
|
63
|
+
default: 'data-[active=true]:bg-surface-action-tint-active',
|
|
64
|
+
web: 'data-[hover=true]:bg-surface-action-tint-hover data-[active=true]:data-[hover=true]:bg-surface-action-tint-active data-[highlighted=true]:bg-surface-action-tint-hover'
|
|
68
65
|
})], {
|
|
69
66
|
variants: {
|
|
70
67
|
size: {
|
|
@@ -79,11 +76,11 @@ export const selectItemVariants = cva(['flex-row items-center', 'transition-colo
|
|
|
79
76
|
|
|
80
77
|
// ── ItemLabel ───────────────────────────────────────────────
|
|
81
78
|
|
|
82
|
-
export const selectItemLabelVariants = cva([
|
|
79
|
+
export const selectItemLabelVariants = cva(['text-content-primary', 'data-[state=checked]:font-medium'], {
|
|
83
80
|
variants: {
|
|
84
81
|
size: {
|
|
85
|
-
default:
|
|
86
|
-
small:
|
|
82
|
+
default: 'text-[0.875rem]',
|
|
83
|
+
small: 'text-[0.75rem]'
|
|
87
84
|
}
|
|
88
85
|
},
|
|
89
86
|
defaultVariants: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","cva","
|
|
1
|
+
{"version":3,"names":["Platform","cva","DISABLED_CURSOR","TRANSITION_COLORS","selectTriggerVariants","variants","variant","outline","size","default","small","defaultVariants","selectValueVariants","selectIconVariants","selectContentVariants","select","web","selectItemVariants","selectItemLabelVariants"],"sourceRoot":"../../../../src","sources":["components/Select/styles.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,GAAG,QAA2B,0BAA0B;AACjE,SAASC,eAAe,EAAEC,iBAAiB,QAAQ,yBAAyB;;AAE5E;;AAEA,OAAO,MAAMC,qBAAqB,GAAGH,GAAG,CACtC,CACE,sEAAsE,EACtE,oBAAoB,EACpB,8BAA8B,EAC9B,wCAAwC,EACxCE,iBAAiB,EACjB,2CAA2C,EAC3C,wDAAwD,EACxDD,eAAe,EACf,qCAAqC,EACrC,2CAA2C,EAC3C,mFAAmF,EACnF,+DAA+D,EAC/D,6DAA6D,EAC7D,4DAA4D,EAC5D,+DAA+D,EAC/D,6DAA6D,EAC7D,4DAA4D,EAC5D,0CAA0C,CAC3C,EACD;EACEG,QAAQ,EAAE;IACRC,OAAO,EAAE;MACPC,OAAO,EAAE;IACX,CAAC;IACDC,IAAI,EAAE;MACJC,OAAO,EAAE,CACP,+BAA+B,EAC/B,iEAAiE,EACjE,iEAAiE,EACjE,iEAAiE,EACjE,iEAAiE,CAClE;MACDC,KAAK,EAAE,CACL,+BAA+B,EAC/B,iEAAiE,EACjE,iEAAiE,EACjE,iEAAiE,EACjE,iEAAiE;IAErE;EACF,CAAC;EACDC,eAAe,EAAE;IACfL,OAAO,EAAE,SAAS;IAClBE,IAAI,EAAE;EACR;AACF,CACF,CAAC;;AAED;;AAEA,OAAO,MAAMI,mBAAmB,GAAGX,GAAG,CACpC,CACE,2BAA2B,EAC3B,sBAAsB,EACtB,+CA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AiB;MAC1BC,KAAK,EAAE;IACT;EACF,CAAC;EACDC,eAAe,EAAE;IACfH,IAAI,EAAE;EACR;AACF,CACF,CAAC","ignoreList":[]}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { Platform } from 'react-native';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
|
-
export const textStyle = cva([
|
|
6
|
-
web: 'font-
|
|
5
|
+
export const textStyle = cva(['text-content-primary', Platform.select({
|
|
6
|
+
web: 'font-body my-0 bg-transparent no-underline',
|
|
7
7
|
default: ''
|
|
8
8
|
})], {
|
|
9
9
|
variants: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","cva","textStyle","select","web","default","variants","size","xl","lg","md","sm","xs"],"sourceRoot":"../../../../src","sources":["components/Text/styles.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,GAAG,QAA2B,0BAA0B;AAEjE,OAAO,MAAMC,SAAS,GAAGD,GAAG,CAC1B,CACE,
|
|
1
|
+
{"version":3,"names":["Platform","cva","textStyle","select","web","default","variants","size","xl","lg","md","sm","xs"],"sourceRoot":"../../../../src","sources":["components/Text/styles.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,GAAG,QAA2B,0BAA0B;AAEjE,OAAO,MAAMC,SAAS,GAAGD,GAAG,CAC1B,CACE,sBAAsB,EACtBD,QAAQ,CAACG,MAAM,CAAC;EACdC,GAAG,EAAE,4CAA4C;EACjDC,OAAO,EAAE;AACX,CAAC,CAAC,CACH,EACD;EACEC,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE,SAAS;MACbC,EAAE,EAAE;IACN;EACF;AACF,CACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { Pressable, Text, View } from 'react-native';
|
|
5
|
+
import { createTile, useTileContext } from '@cdx-ui/primitives';
|
|
6
|
+
import { Check } from '@cdx-ui/icons';
|
|
7
|
+
import { dataAttributes } from '@cdx-ui/primitives';
|
|
8
|
+
import { cn, useStyleContext, withStyleContext } from '@cdx-ui/utils';
|
|
9
|
+
import { checkboxIndicatorVariants, checkboxIconVariants } from '../Checkbox/styles';
|
|
10
|
+
import { Icon } from '../Icon';
|
|
11
|
+
import { radioIndicatorVariants, radioInnerDotVariants } from '../Radio/styles';
|
|
12
|
+
import { tileContentVariants, tileDescriptionVariants, tileGroupVariants, tileIndicatorVariants, tileLeadingSlotVariants, tileRootVariants, tileTitleVariants, tileTrailingSlotVariants } from './styles';
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
const TILE_SCOPE = 'TILE';
|
|
15
|
+
const TILE_GROUP_SCOPE = 'TILE_GROUP';
|
|
16
|
+
const RootPressable = withStyleContext(Pressable, TILE_SCOPE);
|
|
17
|
+
const GroupView = withStyleContext(View, TILE_GROUP_SCOPE);
|
|
18
|
+
const useTileGroupStyleContext = () => {
|
|
19
|
+
// `useStyleContext` types the result as a `Record`, but at runtime the value is
|
|
20
|
+
// `undefined` when no provider is in scope (e.g. standalone Tile). Cast through
|
|
21
|
+
// `unknown` to acknowledge that.
|
|
22
|
+
const ctx = useStyleContext(TILE_GROUP_SCOPE);
|
|
23
|
+
return ctx ?? {};
|
|
24
|
+
};
|
|
25
|
+
const TilePrimitive = createTile({
|
|
26
|
+
Pressable: RootPressable,
|
|
27
|
+
Group: GroupView,
|
|
28
|
+
LeadingSlot: View,
|
|
29
|
+
Content: View,
|
|
30
|
+
Title: Text,
|
|
31
|
+
Description: Text,
|
|
32
|
+
Indicator: View,
|
|
33
|
+
TrailingSlot: View
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// =============================================================================
|
|
37
|
+
// TILE GROUP
|
|
38
|
+
// =============================================================================
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Discriminated union mirroring `ITileGroupProps`, with `className` and layout variants added at
|
|
42
|
+
* the styled layer. Distributing the intersection across each branch keeps `interface … extends`
|
|
43
|
+
* ergonomics and avoids tripping `@typescript-eslint` on `(union) & { ... }`.
|
|
44
|
+
*
|
|
45
|
+
* `direction` and `spacing` constrain the group layout to the three supported patterns:
|
|
46
|
+
* - `direction="column"` + `spacing="default"` — vertical stack with gaps (default).
|
|
47
|
+
* - `direction="column"` + `spacing="none"` — tight vertical stack (rows touch).
|
|
48
|
+
* - `direction="row"` + `spacing="default"` — side-by-side horizontal layout.
|
|
49
|
+
*
|
|
50
|
+
* `shape` (when set) is propagated to child `Tile`s via `withStyleContext`, matching the
|
|
51
|
+
* Avatar size-propagation pattern. A per-tile `shape` prop overrides the inherited value.
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
const TileGroup = /*#__PURE__*/forwardRef(({
|
|
55
|
+
className,
|
|
56
|
+
style,
|
|
57
|
+
children,
|
|
58
|
+
direction,
|
|
59
|
+
spacing,
|
|
60
|
+
shape,
|
|
61
|
+
...props
|
|
62
|
+
}, ref) => /*#__PURE__*/_jsx(TilePrimitive.Group, {
|
|
63
|
+
ref: ref,
|
|
64
|
+
className: cn(tileGroupVariants({
|
|
65
|
+
direction,
|
|
66
|
+
spacing
|
|
67
|
+
}), className),
|
|
68
|
+
style: style,
|
|
69
|
+
context: {
|
|
70
|
+
shape
|
|
71
|
+
},
|
|
72
|
+
...props,
|
|
73
|
+
children: children
|
|
74
|
+
}));
|
|
75
|
+
TileGroup.displayName = 'Tile.Group';
|
|
76
|
+
|
|
77
|
+
// =============================================================================
|
|
78
|
+
// TILE ROOT
|
|
79
|
+
// =============================================================================
|
|
80
|
+
|
|
81
|
+
const TileRoot = /*#__PURE__*/forwardRef(({
|
|
82
|
+
shape: shapeProp,
|
|
83
|
+
showSeparator,
|
|
84
|
+
className,
|
|
85
|
+
style,
|
|
86
|
+
context,
|
|
87
|
+
...props
|
|
88
|
+
}, ref) => {
|
|
89
|
+
const {
|
|
90
|
+
shape: inheritedShape
|
|
91
|
+
} = useTileGroupStyleContext();
|
|
92
|
+
const shape = shapeProp ?? inheritedShape ?? 'card';
|
|
93
|
+
const computedClassName = cn(tileRootVariants({
|
|
94
|
+
shape,
|
|
95
|
+
showSeparator
|
|
96
|
+
}), className);
|
|
97
|
+
return /*#__PURE__*/_jsx(TilePrimitive, {
|
|
98
|
+
ref: ref,
|
|
99
|
+
className: computedClassName,
|
|
100
|
+
context: {
|
|
101
|
+
...context,
|
|
102
|
+
shape
|
|
103
|
+
},
|
|
104
|
+
style: style,
|
|
105
|
+
...props
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
TileRoot.displayName = 'Tile';
|
|
109
|
+
|
|
110
|
+
// =============================================================================
|
|
111
|
+
// SLOTS
|
|
112
|
+
// =============================================================================
|
|
113
|
+
|
|
114
|
+
const TileLeadingSlot = /*#__PURE__*/forwardRef(({
|
|
115
|
+
className,
|
|
116
|
+
style,
|
|
117
|
+
...props
|
|
118
|
+
}, ref) => /*#__PURE__*/_jsx(TilePrimitive.LeadingSlot, {
|
|
119
|
+
ref: ref,
|
|
120
|
+
className: cn(tileLeadingSlotVariants(), className),
|
|
121
|
+
style: style,
|
|
122
|
+
...props
|
|
123
|
+
}));
|
|
124
|
+
TileLeadingSlot.displayName = 'Tile.LeadingSlot';
|
|
125
|
+
const TileContent = /*#__PURE__*/forwardRef(({
|
|
126
|
+
className,
|
|
127
|
+
style,
|
|
128
|
+
...props
|
|
129
|
+
}, ref) => /*#__PURE__*/_jsx(TilePrimitive.Content, {
|
|
130
|
+
ref: ref,
|
|
131
|
+
className: cn(tileContentVariants(), className),
|
|
132
|
+
style: style,
|
|
133
|
+
...props
|
|
134
|
+
}));
|
|
135
|
+
TileContent.displayName = 'Tile.Content';
|
|
136
|
+
const TileTitle = /*#__PURE__*/forwardRef(({
|
|
137
|
+
className,
|
|
138
|
+
style,
|
|
139
|
+
numberOfLines = 1,
|
|
140
|
+
...props
|
|
141
|
+
}, ref) => /*#__PURE__*/_jsx(TilePrimitive.Title, {
|
|
142
|
+
ref: ref,
|
|
143
|
+
className: cn(tileTitleVariants(), className),
|
|
144
|
+
style: style,
|
|
145
|
+
numberOfLines: numberOfLines,
|
|
146
|
+
...props
|
|
147
|
+
}));
|
|
148
|
+
TileTitle.displayName = 'Tile.Title';
|
|
149
|
+
const TileDescription = /*#__PURE__*/forwardRef(({
|
|
150
|
+
className,
|
|
151
|
+
style,
|
|
152
|
+
...props
|
|
153
|
+
}, ref) => /*#__PURE__*/_jsx(TilePrimitive.Description, {
|
|
154
|
+
ref: ref,
|
|
155
|
+
className: cn(tileDescriptionVariants(), className),
|
|
156
|
+
style: style,
|
|
157
|
+
...props
|
|
158
|
+
}));
|
|
159
|
+
TileDescription.displayName = 'Tile.Description';
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Decorative selection affordance. Renders pure CVA-styled Views — no interactive hooks,
|
|
163
|
+
* no nested Pressable, zero runtime overhead. The Tile root owns the press target and
|
|
164
|
+
* ARIA role; this subtree is `aria-hidden` via `createTileIndicator`.
|
|
165
|
+
*
|
|
166
|
+
* The visual is inferred from the tile context: `single` (radio semantics) → radio ring,
|
|
167
|
+
* `multiple` (checkbox semantics) → checkbox square. An explicit `indicatorType` prop
|
|
168
|
+
* overrides — primarily for standalone tiles that want a radio-style visual.
|
|
169
|
+
*/
|
|
170
|
+
function TileIndicatorVisual({
|
|
171
|
+
indicatorType
|
|
172
|
+
}) {
|
|
173
|
+
const {
|
|
174
|
+
isSelected,
|
|
175
|
+
isDisabled,
|
|
176
|
+
selectionType
|
|
177
|
+
} = useTileContext();
|
|
178
|
+
const effectiveType = indicatorType ?? (selectionType === 'single' ? 'radio' : 'checkbox');
|
|
179
|
+
const stateAttrs = dataAttributes({
|
|
180
|
+
checked: isSelected,
|
|
181
|
+
disabled: isDisabled
|
|
182
|
+
});
|
|
183
|
+
if (effectiveType === 'radio') {
|
|
184
|
+
return /*#__PURE__*/_jsx(View, {
|
|
185
|
+
className: radioIndicatorVariants(),
|
|
186
|
+
...stateAttrs,
|
|
187
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
188
|
+
className: radioInnerDotVariants(),
|
|
189
|
+
...dataAttributes({
|
|
190
|
+
checked: isSelected,
|
|
191
|
+
invalid: false
|
|
192
|
+
})
|
|
193
|
+
})
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
return /*#__PURE__*/_jsx(View, {
|
|
197
|
+
className: cn(checkboxIndicatorVariants()),
|
|
198
|
+
...stateAttrs,
|
|
199
|
+
children: isSelected && /*#__PURE__*/_jsx(Icon, {
|
|
200
|
+
as: Check,
|
|
201
|
+
className: checkboxIconVariants()
|
|
202
|
+
})
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
const TileIndicator = /*#__PURE__*/forwardRef(({
|
|
206
|
+
className,
|
|
207
|
+
children,
|
|
208
|
+
style,
|
|
209
|
+
indicatorType,
|
|
210
|
+
...props
|
|
211
|
+
}, ref) => /*#__PURE__*/_jsx(TilePrimitive.Indicator, {
|
|
212
|
+
ref: ref,
|
|
213
|
+
className: cn(tileIndicatorVariants(), className),
|
|
214
|
+
style: style,
|
|
215
|
+
indicatorType: indicatorType,
|
|
216
|
+
...props,
|
|
217
|
+
children: children ?? /*#__PURE__*/_jsx(TileIndicatorVisual, {
|
|
218
|
+
indicatorType: indicatorType
|
|
219
|
+
})
|
|
220
|
+
}));
|
|
221
|
+
TileIndicator.displayName = 'Tile.Indicator';
|
|
222
|
+
const TileTrailingSlot = /*#__PURE__*/forwardRef(({
|
|
223
|
+
className,
|
|
224
|
+
style,
|
|
225
|
+
...props
|
|
226
|
+
}, ref) => /*#__PURE__*/_jsx(TilePrimitive.TrailingSlot, {
|
|
227
|
+
ref: ref,
|
|
228
|
+
className: cn(tileTrailingSlotVariants(), className),
|
|
229
|
+
style: style,
|
|
230
|
+
...props
|
|
231
|
+
}));
|
|
232
|
+
TileTrailingSlot.displayName = 'Tile.TrailingSlot';
|
|
233
|
+
export const Tile = Object.assign(TileRoot, {
|
|
234
|
+
Group: TileGroup,
|
|
235
|
+
LeadingSlot: TileLeadingSlot,
|
|
236
|
+
Content: TileContent,
|
|
237
|
+
Title: TileTitle,
|
|
238
|
+
Description: TileDescription,
|
|
239
|
+
Indicator: TileIndicator,
|
|
240
|
+
TrailingSlot: TileTrailingSlot
|
|
241
|
+
});
|
|
242
|
+
export { useTileContext };
|
|
243
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","Pressable","Text","View","createTile","useTileContext","Check","dataAttributes","cn","useStyleContext","withStyleContext","checkboxIndicatorVariants","checkboxIconVariants","Icon","radioIndicatorVariants","radioInnerDotVariants","tileContentVariants","tileDescriptionVariants","tileGroupVariants","tileIndicatorVariants","tileLeadingSlotVariants","tileRootVariants","tileTitleVariants","tileTrailingSlotVariants","jsx","_jsx","TILE_SCOPE","TILE_GROUP_SCOPE","RootPressable","GroupView","useTileGroupStyleContext","ctx","TilePrimitive","Group","LeadingSlot","Content","Title","Description","Indicator","TrailingSlot","TileGroup","className","style","children","direction","spacing","shape","props","ref","context","displayName","TileRoot","shapeProp","showSeparator","inheritedShape","computedClassName","TileLeadingSlot","TileContent","TileTitle","numberOfLines","TileDescription","TileIndicatorVisual","indicatorType","isSelected","isDisabled","selectionType","effectiveType","stateAttrs","checked","disabled","invalid","as","TileIndicator","TileTrailingSlot","Tile","Object","assign"],"sourceRoot":"../../../../src","sources":["components/Tile/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAwB,OAAO;AAClD,SAASC,SAAS,EAAEC,IAAI,EAAEC,IAAI,QAAwC,cAAc;AACpF,SACEC,UAAU,EAOVC,cAAc,QACT,oBAAoB;AAC3B,SAASC,KAAK,QAAQ,eAAe;AACrC,SAASC,cAAc,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,aAAa;EAAE,GAAGf;AAAM,CAAC,EAAEC,GAAG,kBAC3DvB,IAAA,CAACO,aAAa,CAACM,SAAS;EACtBU,GAAG,EAAEA,GAAa;EAClBP,SAAS,EAAEjC,EAAE,CAACW,qBAAqB,CAAC,CAAC,EAAEsB,SAAS,CAAE;EAClDC,KAAK,EAAEA,KAAM;EACboB,aAAa,EAAEA,aAAc;EAAA,GACzBf,KAAK;EAAAJ,QAAA,EAERA,QAAQ,iBAAIlB,IAAA,CAACoC,mBAAmB;IAACC,aAAa,EAAEA;EAAc,CAAE;AAAC,CAC3C,CAE7B,CAAC;AAEDU,aAAa,CAACtB,WAAW,GAAG,gBAAgB;AAM5C,MAAMuB,gBAAgB,gBAAGzE,UAAU,CACjC,CAAC;EAAEyC,SAAS;EAAEC,KAAK;EAAE,GAAGK;AAAM,CAAC,EAAEC,GAAG,kBAClCvB,IAAA,CAACO,aAAa,CAACO,YAAY;EACzBS,GAAG,EAAEA,GAAa;EAClBP,SAAS,EAAEjC,EAAE,CAACe,wBAAwB,CAAC,CAAC,EAAEkB,SAAS,CAAE;EACrDC,KAAK,EAAEA,KAAM;EAAA,GACTK;AAAK,CACV,CAEL,CAAC;AAED0B,gBAAgB,CAACvB,WAAW,GAAG,mBAAmB;AAYlD,OAAO,MAAMwB,IAAI,GAAGC,MAAM,CAACC,MAAM,CAACzB,QAAQ,EAAE;EAC1ClB,KAAK,EAAEO,SAAS;EAChBN,WAAW,EAAEsB,eAAe;EAC5BrB,OAAO,EAAEsB,WAAW;EACpBrB,KAAK,EAAEsB,SAAS;EAChBrB,WAAW,EAAEuB,eAAe;EAC5BtB,SAAS,EAAEkC,aAAa;EACxBjC,YAAY,EAAEkC;AAChB,CAAC,CAAiB;AAElB,SAASpE,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Platform } from 'react-native';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
import { TRANSITION_COLORS } from '../../styles/primitives';
|
|
6
|
+
export const tileGroupVariants = cva(['flex w-full'], {
|
|
7
|
+
variants: {
|
|
8
|
+
direction: {
|
|
9
|
+
column: 'flex-col',
|
|
10
|
+
row: 'flex-row'
|
|
11
|
+
},
|
|
12
|
+
spacing: {
|
|
13
|
+
default: 'gap-2',
|
|
14
|
+
none: 'gap-0'
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: {
|
|
18
|
+
direction: 'column',
|
|
19
|
+
spacing: 'default'
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
export const tileRootVariants = cva(['flex-row self-stretch gap-3 px-4 py-3', 'data-[disabled=true]:opacity-50', TRANSITION_COLORS, Platform.select({
|
|
23
|
+
web: ['outline-none', 'data-[hover=true]:data-[disabled=false]:bg-surface-action-tint-hover', 'data-[active=true]:data-[disabled=false]:data-[hover=true]:bg-surface-action-tint-active', 'data-[hover=true]:data-[disabled=false]:data-[state=unselected]:border-stroke-action', 'focus-visible:data-[disabled=false]:ring-2 focus-visible:data-[disabled=false]:ring-stroke-focus focus-visible:data-[disabled=false]:ring-offset-2'].join(' '),
|
|
24
|
+
default: ['data-[active=true]:bg-surface-action-tint-hover', 'data-[active=true]:border-stroke-action'].join(' ')
|
|
25
|
+
})], {
|
|
26
|
+
variants: {
|
|
27
|
+
shape: {
|
|
28
|
+
flat: 'rounded-none border-0 bg-transparent',
|
|
29
|
+
card: ['rounded-[var(--border-radius-default)] border-1 border-solid', 'border-stroke-secondary', 'bg-surface-primary', 'data-[state=selected]:border-stroke-action', 'data-[state=selected]:border-1.5', 'data-[state=selected]:bg-surface-action-tint'].join(' ')
|
|
30
|
+
},
|
|
31
|
+
showSeparator: {
|
|
32
|
+
true: ['border-b border-solid border-stroke-secondary! native:data-[active=true]:border-stroke-secondary' // Override border-stroke-action on hover
|
|
33
|
+
],
|
|
34
|
+
false: ''
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
defaultVariants: {
|
|
38
|
+
shape: 'card',
|
|
39
|
+
showSeparator: false
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
export const tileLeadingSlotVariants = cva(['flex shrink-0 items-center justify-center']);
|
|
43
|
+
export const tileTrailingSlotVariants = cva(['flex shrink-0 items-center justify-center']);
|
|
44
|
+
export const tileContentVariants = cva(['min-w-0 flex-1 flex-col gap-0.5 no-underline']);
|
|
45
|
+
export const tileTitleVariants = cva(['text-base font-medium text-content-primary no-underline']);
|
|
46
|
+
export const tileDescriptionVariants = cva(['text-sm text-content-secondary no-underline']);
|
|
47
|
+
export const tileIndicatorVariants = cva(['flex shrink-0 items-center justify-center']);
|
|
48
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Platform","cva","TRANSITION_COLORS","tileGroupVariants","variants","direction","column","row","spacing","default","none","defaultVariants","tileRootVariants","select","web","join","shape","flat","card","showSeparator","true","false","tileLeadingSlotVariants","tileTrailingSlotVariants","tileContentVariants","tileTitleVariants","tileDescriptionVariants","tileIndicatorVariants"],"sourceRoot":"../../../../src","sources":["components/Tile/styles.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,GAAG,QAA2B,0BAA0B;AACjE,SAASC,iBAAiB,QAAQ,yBAAyB;AAE3D,OAAO,MAAMC,iBAAiB,GAAGF,GAAG,CAAC,CAAC,aAAa,CAAC,EAAE;EACpDG,QAAQ,EAAE;IACRC,SAAS,EAAE;MACTC,MAAM,EAAE,UAAU;MAClBC,GAAG,EAAE;IACP,CAAC;IACDC,OAAO,EAAE;MACPC,OAAO,EAAE,OAAO;MAChBC,IAAI,EAAE;IACR;EACF,CAAC;EACDC,eAAe,EAAE;IACfN,SAAS,EAAE,QAAQ;IACnBG,OAAO,EAAE;EACX;AACF,CAAC,CAAC;AAIF,OAAO,MAAMI,gBAAgB,GAAGX,GAAG,CACjC,CACE,uCAAuC,EACvC,iCAAiC,EAC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|
|
20
20
|
export * from './ProgressSegmented';
|
|
21
|
+
export * from './Radio';
|
|
22
|
+
export * from './ScopedTheme';
|
|
21
23
|
export * from './Select';
|
|
22
24
|
export * from './VirtualizedList';
|
|
23
25
|
export * from './Switch';
|
|
26
|
+
export * from './Tile';
|
|
24
27
|
export { HStack, VStack } from './Stack';
|
|
25
28
|
export * from './Heading';
|
|
26
29
|
export * from './Text';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["HStack","VStack"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;AAAA,cAAc,eAAe;AAC7B,cAAc,UAAU;AACxB,cAAc,eAAe;AAC7B,cAAc,OAAO;AACrB,cAAc,UAAU;AACxB,cAAc,QAAQ;AACtB,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,cAAc,YAAY;AAC1B,cAAc,eAAe;AAC7B,cAAc,qBAAqB;AACnC,cAAc,UAAU;AACxB,cAAc,mBAAmB;AACjC,cAAc,UAAU;AACxB,SAASA,MAAM,EAAEC,MAAM,QAAQ,SAAS;AACxC,cAAc,WAAW;AACzB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,cAAc","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["HStack","VStack"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;AAAA,cAAc,eAAe;AAC7B,cAAc,UAAU;AACxB,cAAc,eAAe;AAC7B,cAAc,OAAO;AACrB,cAAc,UAAU;AACxB,cAAc,QAAQ;AACtB,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,cAAc,YAAY;AAC1B,cAAc,eAAe;AAC7B,cAAc,qBAAqB;AACnC,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B,cAAc,UAAU;AACxB,cAAc,mBAAmB;AACjC,cAAc,UAAU;AACxB,cAAc,QAAQ;AACtB,SAASA,MAAM,EAAEC,MAAM,QAAQ,SAAS;AACxC,cAAc,WAAW;AACzB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--Components?node-id=4821-871
|
|
4
|
+
// source=packages/components/src/components/AlertDialog/index.tsx
|
|
5
|
+
// component=AlertDialog.Description
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
const description = instance.findText('{description}').textContent;
|
|
9
|
+
export default {
|
|
10
|
+
id: 'alert-dialog-description',
|
|
11
|
+
imports: ["import { AlertDialog } from '@cdx-ui/components'"],
|
|
12
|
+
example: figma.code`<AlertDialog.Description>${description}</AlertDialog.Description>`
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=AlertDialog.Description.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","description","findText","textContent","id","imports","example","code"],"sourceRoot":"../../../src","sources":["figma/AlertDialog.Description.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;AAEvC,MAAMC,WAAW,GAAIF,QAAQ,CAACG,QAAQ,CAAC,eAAe,CAAC,CAAgCC,WAAW;AAElG,eAAe;EACbC,EAAE,EAAE,0BAA0B;EAC9BC,OAAO,EAAE,CAAC,kDAAkD,CAAC;EAC7DC,OAAO,EAAER,KAAK,CAACS,IAAI,4BAA4BN,WAAW;AAC5D,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--Components?node-id=4821-964
|
|
4
|
+
// source=packages/components/src/components/AlertDialog/index.tsx
|
|
5
|
+
// component=AlertDialog.Footer
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
|
|
9
|
+
// Viewport is excluded (Figma-only framing).
|
|
10
|
+
const buttons = instance.getEnum('Buttons', {
|
|
11
|
+
'1': '1',
|
|
12
|
+
'2': '2',
|
|
13
|
+
'3': '3'
|
|
14
|
+
});
|
|
15
|
+
const cancelLabel = buttons !== '1' ? instance.findText('Button.Label', {
|
|
16
|
+
traverseInstances: true,
|
|
17
|
+
path: ['AlertDialog.Cancel']
|
|
18
|
+
}).textContent : null;
|
|
19
|
+
const secondaryInstance = buttons === '3' ? instance.findInstance('Button (Secondary)') : null;
|
|
20
|
+
const secondarySnippet = secondaryInstance?.type === 'INSTANCE' ? secondaryInstance.executeTemplate().example : null;
|
|
21
|
+
const actionLabel = instance.findText('Button.Label', {
|
|
22
|
+
traverseInstances: true,
|
|
23
|
+
path: ['AlertDialog.Action']
|
|
24
|
+
}).textContent;
|
|
25
|
+
export default {
|
|
26
|
+
id: 'alert-dialog-footer',
|
|
27
|
+
imports: ["import { AlertDialog } from '@cdx-ui/components'"],
|
|
28
|
+
example: figma.code`
|
|
29
|
+
<AlertDialog.Footer>
|
|
30
|
+
${buttons !== '1' ? figma.code`<AlertDialog.Cancel>${cancelLabel}</AlertDialog.Cancel>` : null}
|
|
31
|
+
${secondarySnippet}
|
|
32
|
+
<AlertDialog.Action>${actionLabel}</AlertDialog.Action>
|
|
33
|
+
</AlertDialog.Footer>`
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=AlertDialog.Footer.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","buttons","getEnum","cancelLabel","findText","traverseInstances","path","textContent","secondaryInstance","findInstance","secondarySnippet","type","executeTemplate","example","actionLabel","id","imports","code"],"sourceRoot":"../../../src","sources":["figma/AlertDialog.Footer.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;;AAEvC;AACA,MAAMC,OAAO,GAAGF,QAAQ,CAACG,OAAO,CAAC,SAAS,EAAE;EAC1C,GAAG,EAAE,GAAG;EACR,GAAG,EAAE,GAAG;EACR,GAAG,EAAE;AACP,CAAC,CAAC;AAEF,MAAMC,WAAW,GACfF,OAAO,KAAK,GAAG,GAETF,QAAQ,CAACK,QAAQ,CAAC,cAAc,EAAE;EAChCC,iBAAiB,EAAE,IAAI;EACvBC,IAAI,EAAE,CAAC,oBAAoB;AAC7B,CAAC,CAAC,CACFC,WAAW,GACb,IAAI;AAEV,MAAMC,iBAAiB,GAAGP,OAAO,KAAK,GAAG,GAAGF,QAAQ,CAACU,YAAY,CAAC,oBAAoB,CAAC,GAAG,IAAI;AAC9F,MAAMC,gBAAgB,GACpBF,iBAAiB,EAAEG,IAAI,KAAK,UAAU,GAAGH,iBAAiB,CAACI,eAAe,CAAC,CAAC,CAACC,OAAO,GAAG,IAAI;AAE7F,MAAMC,WAAW,GACff,QAAQ,CAACK,QAAQ,CAAC,cAAc,EAAE;EAChCC,iBAAiB,EAAE,IAAI;EACvBC,IAAI,EAAE,CAAC,oBAAoB;AAC7B,CAAC,CAAC,CACFC,WAAW;AAEb,eAAe;EACbQ,EAAE,EAAE,qBAAqB;EACzBC,OAAO,EAAE,CAAC,kDAAkD,CAAC;EAC7DH,OAAO,EAAEf,KAAK,CAACmB,IAAI;AACrB;AACA,IAAIhB,OAAO,KAAK,GAAG,GAAGH,KAAK,CAACmB,IAAI,uBAAuBd,WAAW,uBAAuB,GAAG,IAAI;AAChG,IAAIO,gBAAgB;AACpB,wBAAwBI,WAAW;AACnC;AACA,CAAC","ignoreList":[]}
|