@cdx-ui/components 0.0.1-beta.5 → 0.0.1-beta.51
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 +28 -18
- package/lib/commonjs/components/AlertDialog/index.js +1 -1
- 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 +39 -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/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/styles.js +9 -9
- 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/Avatar.figma.js +54 -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/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/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 +29 -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 +40 -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 +1 -1
- 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 +40 -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/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/styles.js +10 -10
- 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/Avatar.figma.js +48 -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/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/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 +23 -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 +38 -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/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/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/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/Avatar.figma.d.ts +8 -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/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/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 +8 -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 +1 -1
- 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 +82 -86
- package/src/components/Chip/index.tsx +104 -27
- package/src/components/Chip/styles.ts +232 -18
- 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/styles.ts +12 -19
- 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 +55 -0
- package/src/styles/primitives.ts +43 -6
|
@@ -3,25 +3,96 @@
|
|
|
3
3
|
import { Platform } from 'react-native';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
5
|
import { DISABLED_CURSOR, TRANSITION_COLORS } from '../../styles/primitives';
|
|
6
|
-
export const iconButtonRootVariants = cva(['flex items-center justify-center', 'rounded-[var(--border-radius-round)]', 'web:outline-none web:focus:outline-none web:focus-visible:outline-none', TRANSITION_COLORS, 'data-[disabled=true]:opacity-[--opacity-disabled]', DISABLED_CURSOR, 'web:data-[focus-visible=true]:ring-2 web:data-[focus-visible=true]:ring-[--color-stroke-ring] web:data-[focus-visible=true]:ring-offset-2'], {
|
|
6
|
+
export const iconButtonRootVariants = cva(['flex items-center justify-center', 'rounded-[var(--border-radius-round)]', 'web:outline-none web:focus:outline-none web:focus-visible:outline-none', TRANSITION_COLORS, 'data-[disabled=true]:opacity-[var(--opacity-disabled)]', DISABLED_CURSOR, 'web:data-[focus-visible=true]:ring-2 web:data-[focus-visible=true]:ring-[var(--color-stroke-ring)] web:data-[focus-visible=true]:ring-offset-2'], {
|
|
7
7
|
variants: {
|
|
8
8
|
variant: {
|
|
9
|
-
solid: [
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
solid: [],
|
|
10
|
+
tint: [],
|
|
11
|
+
ghost: ['bg-transparent']
|
|
12
|
+
},
|
|
13
|
+
color: {
|
|
14
|
+
neutral: [],
|
|
15
|
+
action: [],
|
|
16
|
+
danger: []
|
|
17
17
|
},
|
|
18
18
|
size: {
|
|
19
19
|
default: 'h-11 w-11 min-w-11 shrink-0 p-2.5',
|
|
20
20
|
small: 'h-8 w-8 min-w-8 shrink-0 p-1.5'
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
|
+
compoundVariants: [
|
|
24
|
+
// ── solid × color ───────────────────────────────────────────────────
|
|
25
|
+
{
|
|
26
|
+
variant: 'solid',
|
|
27
|
+
color: 'neutral',
|
|
28
|
+
className: ['bg-surface-primary border border-stroke-secondary', Platform.select({
|
|
29
|
+
default: 'data-[active=true]:bg-surface-primary-active',
|
|
30
|
+
web: 'data-[hover=true]:bg-surface-primary-hover data-[active=true]:data-[hover=true]:bg-surface-secondary-active'
|
|
31
|
+
})]
|
|
32
|
+
}, {
|
|
33
|
+
variant: 'solid',
|
|
34
|
+
color: 'action',
|
|
35
|
+
className: ['bg-surface-action-strong', Platform.select({
|
|
36
|
+
default: 'data-[active=true]:bg-surface-action-strong-active',
|
|
37
|
+
web: 'data-[hover=true]:bg-surface-action-strong-hover data-[active=true]:data-[hover=true]:bg-surface-action-strong-active'
|
|
38
|
+
})]
|
|
39
|
+
}, {
|
|
40
|
+
variant: 'solid',
|
|
41
|
+
color: 'danger',
|
|
42
|
+
className: ['bg-surface-danger-strong', Platform.select({
|
|
43
|
+
default: 'data-[active=true]:bg-surface-danger-strong-active',
|
|
44
|
+
web: 'data-[hover=true]:bg-surface-danger-strong-hover data-[active=true]:data-[hover=true]:bg-surface-danger-strong-active'
|
|
45
|
+
})]
|
|
46
|
+
},
|
|
47
|
+
// ── tint × color ─────────────────────────────────────────────────
|
|
48
|
+
{
|
|
49
|
+
variant: 'tint',
|
|
50
|
+
color: 'neutral',
|
|
51
|
+
className: ['bg-surface-neutral-tint', Platform.select({
|
|
52
|
+
default: 'data-[active=true]:bg-surface-neutral-tint-active',
|
|
53
|
+
web: 'data-[hover=true]:bg-surface-neutral-tint-hover data-[active=true]:data-[hover=true]:bg-surface-neutral-tint-active'
|
|
54
|
+
})]
|
|
55
|
+
}, {
|
|
56
|
+
variant: 'tint',
|
|
57
|
+
color: 'action',
|
|
58
|
+
className: ['bg-surface-action-tint', Platform.select({
|
|
59
|
+
default: 'data-[active=true]:bg-surface-action-tint-active',
|
|
60
|
+
web: 'data-[hover=true]:bg-surface-action-tint-hover data-[active=true]:data-[hover=true]:bg-surface-action-tint-active'
|
|
61
|
+
})]
|
|
62
|
+
}, {
|
|
63
|
+
variant: 'tint',
|
|
64
|
+
color: 'danger',
|
|
65
|
+
className: ['bg-surface-danger-tint', Platform.select({
|
|
66
|
+
default: 'data-[active=true]:bg-surface-danger-tint-active',
|
|
67
|
+
web: 'data-[hover=true]:bg-surface-danger-tint-hover data-[active=true]:data-[hover=true]:bg-surface-danger-tint-active'
|
|
68
|
+
})]
|
|
69
|
+
},
|
|
70
|
+
// ── ghost × color ──────────────────────────────────────────────────
|
|
71
|
+
{
|
|
72
|
+
variant: 'ghost',
|
|
73
|
+
color: 'neutral',
|
|
74
|
+
className: [Platform.select({
|
|
75
|
+
default: 'data-[active=true]:bg-surface-primary-active',
|
|
76
|
+
web: 'data-[hover=true]:bg-surface-primary-hover data-[active=true]:data-[hover=true]:bg-surface-secondary-active'
|
|
77
|
+
})]
|
|
78
|
+
}, {
|
|
79
|
+
variant: 'ghost',
|
|
80
|
+
color: 'action',
|
|
81
|
+
className: [Platform.select({
|
|
82
|
+
default: 'data-[active=true]:bg-surface-action-tint-active',
|
|
83
|
+
web: 'data-[hover=true]:bg-surface-action-tint-hover data-[active=true]:data-[hover=true]:bg-surface-action-tint-active'
|
|
84
|
+
})]
|
|
85
|
+
}, {
|
|
86
|
+
variant: 'ghost',
|
|
87
|
+
color: 'danger',
|
|
88
|
+
className: [Platform.select({
|
|
89
|
+
default: 'data-[active=true]:bg-surface-danger-tint-active',
|
|
90
|
+
web: 'data-[hover=true]:bg-surface-danger-tint-hover data-[active=true]:data-[hover=true]:bg-surface-danger-tint-active'
|
|
91
|
+
})]
|
|
92
|
+
}],
|
|
23
93
|
defaultVariants: {
|
|
24
94
|
variant: 'solid',
|
|
95
|
+
color: 'neutral',
|
|
25
96
|
size: 'default'
|
|
26
97
|
}
|
|
27
98
|
});
|
|
@@ -36,5 +107,59 @@ export const iconButtonGlyphVariants = cva([], {
|
|
|
36
107
|
size: 'default'
|
|
37
108
|
}
|
|
38
109
|
});
|
|
39
|
-
export const iconButtonIconColorVariants = cva([
|
|
110
|
+
export const iconButtonIconColorVariants = cva([], {
|
|
111
|
+
variants: {
|
|
112
|
+
variant: {
|
|
113
|
+
solid: [],
|
|
114
|
+
tint: [],
|
|
115
|
+
ghost: []
|
|
116
|
+
},
|
|
117
|
+
color: {
|
|
118
|
+
neutral: [],
|
|
119
|
+
action: [],
|
|
120
|
+
danger: []
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
compoundVariants: [{
|
|
124
|
+
variant: 'solid',
|
|
125
|
+
color: 'neutral',
|
|
126
|
+
className: 'text-content-primary'
|
|
127
|
+
}, {
|
|
128
|
+
variant: 'solid',
|
|
129
|
+
color: 'action',
|
|
130
|
+
className: 'text-content-action-on-strong'
|
|
131
|
+
}, {
|
|
132
|
+
variant: 'solid',
|
|
133
|
+
color: 'danger',
|
|
134
|
+
className: 'text-content-danger-on-strong'
|
|
135
|
+
}, {
|
|
136
|
+
variant: 'tint',
|
|
137
|
+
color: 'neutral',
|
|
138
|
+
className: 'text-content-primary'
|
|
139
|
+
}, {
|
|
140
|
+
variant: 'tint',
|
|
141
|
+
color: 'action',
|
|
142
|
+
className: 'text-content-action-on-subtle'
|
|
143
|
+
}, {
|
|
144
|
+
variant: 'tint',
|
|
145
|
+
color: 'danger',
|
|
146
|
+
className: 'text-content-danger-on-subtle'
|
|
147
|
+
}, {
|
|
148
|
+
variant: 'ghost',
|
|
149
|
+
color: 'neutral',
|
|
150
|
+
className: 'text-content-primary'
|
|
151
|
+
}, {
|
|
152
|
+
variant: 'ghost',
|
|
153
|
+
color: 'action',
|
|
154
|
+
className: 'text-content-action'
|
|
155
|
+
}, {
|
|
156
|
+
variant: 'ghost',
|
|
157
|
+
color: 'danger',
|
|
158
|
+
className: 'text-content-danger'
|
|
159
|
+
}],
|
|
160
|
+
defaultVariants: {
|
|
161
|
+
variant: 'solid',
|
|
162
|
+
color: 'neutral'
|
|
163
|
+
}
|
|
164
|
+
});
|
|
40
165
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","cva","DISABLED_CURSOR","TRANSITION_COLORS","iconButtonRootVariants","variants","variant","solid","
|
|
1
|
+
{"version":3,"names":["Platform","cva","DISABLED_CURSOR","TRANSITION_COLORS","iconButtonRootVariants","variants","variant","solid","tint","ghost","color","neutral","action","danger","size","default","small","compoundVariants","className","select","web","defaultVariants","iconButtonGlyphVariants","iconButtonIconColorVariants"],"sourceRoot":"../../../../src","sources":["components/IconButton/styles.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,GAAG,QAA2B,0BAA0B;AACjE,SAASC,eAAe,EAAEC,iBAAiB,QAAQ,yBAAyB;AAE5E,OAAO,MAAMC,sBAAsB,GAAGH,GAAG,CACvC,CACE,kCAAkC,EAClC,sCAAsC,EACtC,wEAAwE,EACxEE,iBAAiB,EACjB,wDAAwD,EACxDD,eAAe,EACf,gJAAgJ,CACjJ,EACD;EACEG,QAAQ,EAAE;IACRC,OAAO,EAAE;MACPC,KAAK,EAAE,EAAE;MACTC,IAAI,EAAE,EAAE;MACRC,KAAK,EAAE,CAAC,gBAAgB;IAC1B,CAAC;IACDC,KAAK,EAAE;MACLC,OAAO,EAAE,EAAE;MACXC,MAAM,EAAE,EAAE;MACVC,MAAM,EAAE;IACV,CAAC;IACDC,IAAI,EAAE;MACJC,OAAO,EAAE,mCAAmC;MAC5CC,KAAK,EAAE;IACT;EACF,CAAC;EACDC,gBAAgB,EAAE;EAChB;EACA;IACEX,OAAO,EAAE,OAAO;IAChBI,KAAK,EAAE,SAAS;IAChBQ,SAAS,EAAE,CACT,mDAAmD,EACnDlB,QAAQ,CAACmB,MAAM,CAAC;MACdJ,OAAO,EAAE,8CAA8C;MACvDK,GAAG,EAAE;IACP,CAAC,CAAC;EAEN,CAAC,EACD;IACEd,OAAO,EAAE,OAAO;IAChBI,KAAK,EAAE,QAAQ;IACfQ,SAAS,EAAE,CACT,0BAA0B,EAC1BlB,QAAQ,CAACmB,MAAM,CAAC;MACdJ,OAAO,EAAE,oDAAoD;MAC7DK,GAAG,EAAE;IACP,CAAC,CAAC;EAEN,CAAC,EACD;IACEd,OAAO,EAAE,OAAO;IAChBI,KAA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IAAEQ,SAAS,EAAE;EAAgC,CAAC,EAChF;IAAEZ,OAAO,EAAE,OAAO;IAAEI,KAAK,EAAE,SAAS;IAAEQ,SAAS,EAAE;EAAuB,CAAC,EACzE;IAAEZ,OAAO,EAAE,OAAO;IAAEI,KAAK,EAAE,QAAQ;IAAEQ,SAAS,EAAE;EAAsB,CAAC,EACvE;IAAEZ,OAAO,EAAE,OAAO;IAAEI,KAAK,EAAE,QAAQ;IAAEQ,SAAS,EAAE;EAAsB,CAAC,CACxE;EACDG,eAAe,EAAE;IACff,OAAO,EAAE,OAAO;IAChBI,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -2,15 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
import { cva } from 'class-variance-authority';
|
|
4
4
|
import { DISABLED_CURSOR, TRANSITION_COLORS } from '../../styles/primitives';
|
|
5
|
-
export const inputRootVariants = cva(['w-full flex-row items-
|
|
5
|
+
export const inputRootVariants = cva(['w-full flex-row items-center overflow-hidden', 'bg-surface-primary', 'border-solid border-stroke-primary', 'web:border-default native:border-[length:var(--border-width-default)]', '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]:border-stroke-action', 'data-[invalid=true]:border-stroke-danger'], {
|
|
6
6
|
variants: {
|
|
7
7
|
variant: {
|
|
8
8
|
outline: []
|
|
9
9
|
},
|
|
10
10
|
size: {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
default: ['h-11 min-h-11 px-4 py-3 gap-4',
|
|
12
|
+
// Subtract one hairline from padding when focused so the wider focus border doesn’t shift layout.
|
|
13
|
+
'data-[focus=true]:px-[calc(var(--spacing-4)-var(--spacing-px))]', 'data-[focus=true]:py-[calc(var(--spacing-3)-var(--spacing-px))]'],
|
|
14
|
+
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))]']
|
|
14
15
|
}
|
|
15
16
|
},
|
|
16
17
|
defaultVariants: {
|
|
@@ -18,7 +19,7 @@ export const inputRootVariants = cva(['w-full flex-row items-stretch overflow-hi
|
|
|
18
19
|
size: 'default'
|
|
19
20
|
}
|
|
20
21
|
});
|
|
21
|
-
export const inputFieldVariants = cva(['flex-1 justify-center bg-transparent p-0', '
|
|
22
|
+
export const inputFieldVariants = cva(['flex-1 justify-center bg-transparent p-0', 'text-content-primary', 'placeholder:text-content-tertiary', 'web:outline-none', 'tracking-normal'], {
|
|
22
23
|
variants: {
|
|
23
24
|
size: {
|
|
24
25
|
default: 'text-[0.875rem]',
|
|
@@ -29,7 +30,7 @@ export const inputFieldVariants = cva(['flex-1 justify-center bg-transparent p-0
|
|
|
29
30
|
size: 'default'
|
|
30
31
|
}
|
|
31
32
|
});
|
|
32
|
-
export const inputSlotVariants = cva(['items-center justify-center self-center']);
|
|
33
|
+
export const inputSlotVariants = cva(['items-center justify-center self-center shrink-0']);
|
|
33
34
|
export const inputIconVariants = cva(['text-content-tertiary'], {
|
|
34
35
|
variants: {
|
|
35
36
|
size: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["cva","DISABLED_CURSOR","TRANSITION_COLORS","inputRootVariants","variants","variant","outline","size","default","small","defaultVariants","inputFieldVariants","inputSlotVariants","inputIconVariants","inputFieldPlaceholderVariants"],"sourceRoot":"../../../../src","sources":["components/Input/styles.ts"],"mappings":";;AAAA,SAASA,GAAG,QAA2B,0BAA0B;AACjE,SAASC,eAAe,EAAEC,iBAAiB,QAAQ,yBAAyB;AAE5E,OAAO,MAAMC,iBAAiB,GAAGH,GAAG,CAClC,CACE
|
|
1
|
+
{"version":3,"names":["cva","DISABLED_CURSOR","TRANSITION_COLORS","inputRootVariants","variants","variant","outline","size","default","small","defaultVariants","inputFieldVariants","inputSlotVariants","inputIconVariants","inputFieldPlaceholderVariants"],"sourceRoot":"../../../../src","sources":["components/Input/styles.ts"],"mappings":";;AAAA,SAASA,GAAG,QAA2B,0BAA0B;AACjE,SAASC,eAAe,EAAEC,iBAAiB,QAAQ,yBAAyB;AAE5E,OAAO,MAAMC,iBAAiB,GAAGH,GAAG,CAClC,CACE,8CAA8C,EAC9C,oBAAoB,EACpB,oCAAoC,EACpC,uEAAuE,EACvE,wCAAwC,EACxCE,iBAAiB,EACjB,2CAA2C,EAC3C,wDAAwD,EACxDD,eAAe,EACf,qCAAqC,EACrC,2CAA2C,EAC3C,mFAAmF,EACnF,+DAA+D,EAC/D,wCAAwC,EACxC,0CAA0C,CAC3C,EACD;EACEG,QAAQ,EAAE;IACRC,OAAO,EAAE;MACPC,OAAO,EAAE;IACX,CAAC;IACDC,IAAI,EAAE;MACJC,OAAO,EAAE,CACP,+BAA+B;MAC/B;MACA,iEAAiE,EACjE,iEAAiE,CAClE;MACDC,KAAK,EAAE,CACL,+BAA+B,EAC/B,iEAAiE,EACjE,iEAAiE;IAErE;EACF,CAAC;EACDC,eAAe,EAAE;IACfL,OAAO,EAAE,SAAS;IAClBE,IAAI,EAAE;EACR;AACF,CACF,CAAC;AAED,OAAO,MAAMI,kBAAkB,GAAGX,GAAG,CACnC,CACE,0CAA0C,EAC1C,sBAAsB,EACtB,mCAAmC,EACnC,kBAAkB,EAClB,iBAAiB,CAClB,EACD;EACEI,QAAQ,EAAE;IACRG,IAAI,EAAE;MACJC,OAAO,EAAE,iBAAiB;MAC1BC,KAAK,EAAE;IACT;EACF,CAAC;EACDC,eAAe,EAAE;IACfH,IAAI,EAAE;EACR;AACF,CACF,CAAC;AAED,OAAO,MAAMK,iBAAiB,GAAGZ,GAAG,CAAC,CAAC,kDAAkD,CAAC,CAAC;AAE1F,OAAO,MAAMa,iBAAiB,GAAGb,GAAG,CAAC,CAAC,uBAAuB,CAAC,EAAE;EAC9DI,QAAQ,EAAE;IACRG,IAAI,EAAE;MACJC,OAAO,EAAE,QAAQ;MACjBC,KAAK,EAAE;IACT;EACF,CAAC;EACDC,eAAe,EAAE;IACfH,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAEF,OAAO,MAAMO,6BAA6B,GAAGd,GAAG,CAAC,CAAC,yBAAyB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
|
-
import { Pressable, Text
|
|
5
|
-
import { createLink } from '@cdx-ui/primitives';
|
|
4
|
+
import { Platform, Pressable, Text, View } from 'react-native';
|
|
5
|
+
import { createLink, useLinkInteractionContext } from '@cdx-ui/primitives';
|
|
6
6
|
import { cn } from '@cdx-ui/utils';
|
|
7
7
|
import { Icon } from '../Icon';
|
|
8
|
-
import {
|
|
8
|
+
import { linkIconVariants, linkLabelVariants, linkNativeUnderlineVariants, linkRootVariants } from './styles';
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
export { LinkProvider } from '@cdx-ui/primitives';
|
|
11
11
|
const LinkPrimitive = createLink({
|
|
@@ -43,14 +43,28 @@ const LinkLabel = /*#__PURE__*/forwardRef(({
|
|
|
43
43
|
style,
|
|
44
44
|
...props
|
|
45
45
|
}, ref) => {
|
|
46
|
-
const
|
|
47
|
-
|
|
46
|
+
const {
|
|
47
|
+
visited
|
|
48
|
+
} = useLinkInteractionContext();
|
|
49
|
+
const computedClassName = cn(linkLabelVariants({
|
|
50
|
+
visited
|
|
51
|
+
}), className);
|
|
52
|
+
const textElement = /*#__PURE__*/_jsx(Text, {
|
|
48
53
|
ref: ref,
|
|
49
54
|
className: computedClassName,
|
|
50
55
|
style: style,
|
|
51
56
|
...props,
|
|
52
57
|
children: children
|
|
53
58
|
});
|
|
59
|
+
if (Platform.OS === 'web') {
|
|
60
|
+
return textElement;
|
|
61
|
+
}
|
|
62
|
+
return /*#__PURE__*/_jsx(View, {
|
|
63
|
+
className: cn(linkNativeUnderlineVariants({
|
|
64
|
+
visited
|
|
65
|
+
})),
|
|
66
|
+
children: textElement
|
|
67
|
+
});
|
|
54
68
|
});
|
|
55
69
|
LinkLabel.displayName = 'Link.Label';
|
|
56
70
|
|
|
@@ -64,7 +78,12 @@ const LinkIcon = ({
|
|
|
64
78
|
as,
|
|
65
79
|
...props
|
|
66
80
|
}) => {
|
|
67
|
-
const
|
|
81
|
+
const {
|
|
82
|
+
visited
|
|
83
|
+
} = useLinkInteractionContext();
|
|
84
|
+
const computedClassName = cn(linkIconVariants({
|
|
85
|
+
visited
|
|
86
|
+
}), className);
|
|
68
87
|
return /*#__PURE__*/_jsx(Icon, {
|
|
69
88
|
as: as,
|
|
70
89
|
className: computedClassName,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","Pressable","Text","
|
|
1
|
+
{"version":3,"names":["forwardRef","Platform","Pressable","Text","View","createLink","useLinkInteractionContext","cn","Icon","linkIconVariants","linkLabelVariants","linkNativeUnderlineVariants","linkRootVariants","jsx","_jsx","LinkProvider","LinkPrimitive","Root","LinkRoot","className","children","style","props","ref","rootClassName","displayName","LinkLabel","visited","computedClassName","textElement","OS","LinkIcon","as","Link","Object","assign","Label"],"sourceRoot":"../../../../src","sources":["components/Link/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAwB,OAAO;AAClD,SAASC,QAAQ,EAAEC,SAAS,EAAEC,IAAI,EAAEC,IAAI,QAAwB,cAAc;AAC9E,SAASC,UAAU,EAAEC,yBAAyB,QAAyB,oBAAoB;AAC3F,SAASC,EAAE,QAAQ,eAAe;AAClC,SAASC,IAAI,QAAwB,SAAS;AAC9C,SACEC,gBAAgB,EAChBC,iBAAiB,EACjBC,2BAA2B,EAC3BC,gBAA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ACe,SAAS,EAAEZ,EAAE,CAACI,2BAA2B,CAAC;MAAEgB;IAAQ,CAAC,CAAC,CAAE;IAAAP,QAAA,EAAES;EAAW,CAAO,CAAC;AAC5F,CACF,CAAC;AAEDH,SAAS,CAACD,WAAW,GAAG,YAAY;;AAEpC;AACA;AACA;;AAIA,MAAMM,QAAQ,GAAGA,CAAC;EAAEZ,SAAS;EAAEE,KAAK;EAAEW,EAAE;EAAE,GAAGV;AAAqB,CAAC,KAAK;EACtE,MAAM;IAAEK;EAAQ,CAAC,GAAGrB,yBAAyB,CAAC,CAAC;EAC/C,MAAMsB,iBAAiB,GAAGrB,EAAE,CAACE,gBAAgB,CAAC;IAAEkB;EAAQ,CAAC,CAAC,EAAER,SAAS,CAAC;EAEtE,oBAAOL,IAAA,CAACN,IAAI;IAACwB,EAAE,EAAEA,EAAG;IAACb,SAAS,EAAES,iBAAkB;IAACP,KAAK,EAAEA,KAAM;IAAA,GAAKC;EAAK,CAAG,CAAC;AAChF,CAAC;AAEDS,QAAQ,CAACN,WAAW,GAAG,WAAW;;AAElC;AACA;AACA;;AAOA,OAAO,MAAMQ,IAAI,GAAGC,MAAM,CAACC,MAAM,CAACjB,QAAQ,EAAE;EAC1CkB,KAAK,EAAEV,SAAS;EAChBlB,IAAI,EAAEuB;AACR,CAAC,CAA0B","ignoreList":[]}
|
|
@@ -1,11 +1,60 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { Platform } from 'react-native';
|
|
3
4
|
import { cva } from 'class-variance-authority';
|
|
4
5
|
import { TRANSITION_COLORS } from '../../styles/primitives';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
export const linkRootVariants = cva(['flex-row items-center gap-1', Platform.select({
|
|
7
|
+
web: 'web:inline-flex web:self-start',
|
|
8
|
+
default: ''
|
|
9
|
+
}), TRANSITION_COLORS, 'web:outline-none web:focus:outline-none web:focus-visible:outline-none', 'web:data-[focus-visible=true]:rounded-[2px]', 'web:data-[focus-visible=true]:ring-2 web:data-[focus-visible=true]:ring-stroke-focus web:data-[focus-visible=true]:ring-offset-2',
|
|
10
|
+
// Web: set color on the anchor so Label/Icon can text-inherit (incl. browser :visited).
|
|
11
|
+
'web:text-content-link', 'web:visited:text-content-link-visited', 'web:hover:text-content-primary', 'web:visited:hover:text-content-primary', 'data-[visited=true]:text-content-link-visited', 'web:data-[hover=true]:text-content-primary']);
|
|
12
|
+
export const linkLabelVariants = cva(['body-md', Platform.select({
|
|
13
|
+
web: 'underline underline-offset-4',
|
|
14
|
+
default: ''
|
|
15
|
+
}), Platform.select({
|
|
16
|
+
web: 'text-inherit',
|
|
17
|
+
default: 'text-content-link'
|
|
18
|
+
})], {
|
|
19
|
+
variants: {
|
|
20
|
+
visited: {
|
|
21
|
+
true: Platform.select({
|
|
22
|
+
web: '',
|
|
23
|
+
default: 'text-content-link-visited'
|
|
24
|
+
}),
|
|
25
|
+
false: ''
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
defaultVariants: {
|
|
29
|
+
visited: false
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
export const linkNativeUnderlineVariants = cva(['border-b border-content-link pb-0.5'], {
|
|
33
|
+
variants: {
|
|
34
|
+
visited: {
|
|
35
|
+
true: 'border-content-link-visited',
|
|
36
|
+
false: ''
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
defaultVariants: {
|
|
40
|
+
visited: false
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
export const linkIconVariants = cva(['size-4', Platform.select({
|
|
44
|
+
web: 'text-inherit',
|
|
45
|
+
default: 'text-content-link'
|
|
46
|
+
})], {
|
|
47
|
+
variants: {
|
|
48
|
+
visited: {
|
|
49
|
+
true: Platform.select({
|
|
50
|
+
web: '',
|
|
51
|
+
default: 'text-content-link-visited'
|
|
52
|
+
}),
|
|
53
|
+
false: ''
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
defaultVariants: {
|
|
57
|
+
visited: false
|
|
58
|
+
}
|
|
59
|
+
});
|
|
11
60
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["cva","TRANSITION_COLORS","linkRootVariants","linkLabelVariants","linkIconVariants"],"sourceRoot":"../../../../src","sources":["components/Link/styles.ts"],"mappings":";;AAAA,SAASA,GAAG,QAA2B,0BAA0B;AACjE,SAASC,iBAAiB,QAAQ,yBAAyB
|
|
1
|
+
{"version":3,"names":["Platform","cva","TRANSITION_COLORS","linkRootVariants","select","web","default","linkLabelVariants","variants","visited","true","false","defaultVariants","linkNativeUnderlineVariants","linkIconVariants"],"sourceRoot":"../../../../src","sources":["components/Link/styles.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,GAAG,QAA2B,0BAA0B;AACjE,SAASC,iBAAiB,QAAQ,yBAAyB;AAE3D,OAAO,MAAMC,gBAAgB,GAAGF,GAAG,CAAC,CAClC,6BAA6B,EAC7BD,QAAQ,CAACI,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,EACvEJ,iBAAiB,EACjB,wEAAwE,EACxE,6CAA6C,EAC7C,kIAAkI;AAClI;AACA,uBAAuB,EACvB,uCAAuC,EACvC,gCAAgC,EAChC,wCAAwC,EACxC,+CAA+C,EAC/C,4CAA4C,CAC7C,CAAC;AAEF,OAAO,MAAMK,iBAAiB,GAAGN,GAAG,CAClC,CACE,SAAS,EACTD,QAAQ,CAACI,MAAM,CAAC;EAAEC,GAAG,EAAE,8BAA8B;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,EACrEN,QAAQ,CAACI,MAAM,CAAC;EAAEC,GAAG,EAAE,cAAc;EAAEC,OAAO,EAAE;AAAoB,CAAC,CAAC,CACvE,EACD;EACEE,QAAQ,EAAE;IACRC,OAAO,EAAE;MACPC,IAAI,EAAEV,QAAQ,CAACI,MAAM,CAAC;QAAEC,GAAG,EAAE,EAAE;QAAEC,OAAO,EAAE;MAA4B,CAAC,CAAC;MACxEK,KAAK,EAAE;IACT;EACF,CAAC;EACDC,eAAe,EAAE;IAAEH,OAAO,EAAE;EAAM;AACpC,CACF,CAAC;AAED,OAAO,MAAMI,2BAA2B,GAAGZ,GAAG,CAAC,CAAC,qCAAqC,CAAC,EAAE;EACtFO,QAAQ,EAAE;IACRC,OAAO,EAAE;MACPC,IAAI,EAAE,6BAA6B;MACnCC,KAAK,EAAE;IACT;EACF,CAAC;EACDC,eAAe,EAAE;IAAEH,OAAO,EAAE;EAAM;AACpC,CAAC,CAAC;AAEF,OAAO,MAAMK,gBAAgB,GAAGb,GAAG,CACjC,CAAC,QAAQ,EAAED,QAAQ,CAACI,MAAM,CAAC;EAAEC,GAAG,EAAE,cAAc;EAAEC,OAAO,EAAE;AAAoB,CAAC,CAAC,CAAC,EAClF;EACEE,QAAQ,EAAE;IACRC,OAAO,EAAE;MACPC,IAAI,EAAEV,QAAQ,CAACI,MAAM,CAAC;QAAEC,GAAG,EAAE,EAAE;QAAEC,OAAO,EAAE;MAA4B,CAAC,CAAC;MACxEK,KAAK,EAAE;IACT;EACF,CAAC;EACDC,eAAe,EAAE;IAAEH,OAAO,EAAE;EAAM;AACpC,CACF,CAAC","ignoreList":[]}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
import { Platform } from 'react-native';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
|
-
import {
|
|
5
|
+
import { TRANSITION_COLORS } from '../../styles/primitives';
|
|
6
6
|
|
|
7
7
|
// ── Root (row): density, surface, separator, interactive feedback ──────────
|
|
8
8
|
|
|
9
9
|
export const listItemRootVariants = cva(['flex-row self-stretch w-full px-4', 'data-[disabled=true]:opacity-50 data-[disabled=true]:pointer-events-none', 'data-[active=true]:opacity-70', TRANSITION_COLORS, Platform.select({
|
|
10
|
-
web: ['outline-none', 'web:data-[
|
|
10
|
+
web: ['outline-none', 'web:data-[hover=true]:bg-slate-50', 'web:focus-visible:data-[disabled=false]:bg-slate-50', 'web:focus-visible:data-[disabled=false]:ring-2 web:focus-visible:data-[disabled=false]:ring-slate-400/40 web:focus-visible:data-[disabled=false]:ring-offset-2'].join(' '),
|
|
11
11
|
default: ''
|
|
12
12
|
})], {
|
|
13
13
|
variants: {
|
|
@@ -20,7 +20,7 @@ export const listItemRootVariants = cva(['flex-row self-stretch w-full px-4', 'd
|
|
|
20
20
|
negative: 'bg-red-50'
|
|
21
21
|
},
|
|
22
22
|
showSeparator: {
|
|
23
|
-
true:
|
|
23
|
+
true: 'border-b border-solid border-stroke-secondary',
|
|
24
24
|
false: 'border-b-0'
|
|
25
25
|
},
|
|
26
26
|
crossAlign: {
|
|
@@ -31,7 +31,7 @@ export const listItemRootVariants = cva(['flex-row self-stretch w-full px-4', 'd
|
|
|
31
31
|
compoundVariants: [{
|
|
32
32
|
surface: 'negative',
|
|
33
33
|
className: Platform.select({
|
|
34
|
-
web: 'web:data-[
|
|
34
|
+
web: 'web:data-[hover=true]:bg-red-100/90',
|
|
35
35
|
default: ''
|
|
36
36
|
})
|
|
37
37
|
}],
|
|
@@ -60,7 +60,7 @@ export const listItemTrailingSlotVariants = cva(['flex shrink-0 flex-row justify
|
|
|
60
60
|
|
|
61
61
|
// ── Content stack (title / description / meta) ───────────────────────────────
|
|
62
62
|
|
|
63
|
-
export const listItemContentVariants = cva(
|
|
63
|
+
export const listItemContentVariants = cva('flex min-w-0 flex-1 flex-col gap-1', {
|
|
64
64
|
variants: {
|
|
65
65
|
crossAlign: {
|
|
66
66
|
center: 'justify-center',
|
|
@@ -74,7 +74,7 @@ export const listItemContentVariants = cva(['flex min-w-0 flex-1 flex-col gap-1'
|
|
|
74
74
|
|
|
75
75
|
// ── Typography ───────────────────────────────────────────────────────────────
|
|
76
76
|
|
|
77
|
-
export const listItemTitleVariants = cva(
|
|
77
|
+
export const listItemTitleVariants = cva('text-content-primary font-medium', {
|
|
78
78
|
variants: {
|
|
79
79
|
size: {
|
|
80
80
|
default: 'text-base leading-snug',
|
|
@@ -85,7 +85,7 @@ export const listItemTitleVariants = cva([COLOR_TEXT_PRIMARY, 'font-medium'], {
|
|
|
85
85
|
size: 'default'
|
|
86
86
|
}
|
|
87
87
|
});
|
|
88
|
-
export const listItemDescriptionVariants = cva(
|
|
88
|
+
export const listItemDescriptionVariants = cva('text-content-secondary', {
|
|
89
89
|
variants: {
|
|
90
90
|
size: {
|
|
91
91
|
default: 'text-sm leading-normal',
|
|
@@ -96,7 +96,7 @@ export const listItemDescriptionVariants = cva([COLOR_TEXT_SECONDARY], {
|
|
|
96
96
|
size: 'default'
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
|
-
export const listItemMetaVariants = cva(
|
|
99
|
+
export const listItemMetaVariants = cva('text-content-tertiary', {
|
|
100
100
|
variants: {
|
|
101
101
|
size: {
|
|
102
102
|
default: 'text-xs leading-normal',
|
|
@@ -110,7 +110,7 @@ export const listItemMetaVariants = cva([COLOR_TEXT_MUTED], {
|
|
|
110
110
|
|
|
111
111
|
// ── Section header (group label row inside lists / cards) ───────────────────
|
|
112
112
|
|
|
113
|
-
export const listItemSectionHeaderVariants = cva(['flex-row items-center justify-between gap-2 border-b border-solid px-4 py-3',
|
|
113
|
+
export const listItemSectionHeaderVariants = cva(['flex-row items-center justify-between gap-2 border-b border-solid px-4 py-3', 'border-stroke-secondary'], {
|
|
114
114
|
variants: {
|
|
115
115
|
showDivider: {
|
|
116
116
|
true: ['border-t-4 border-solid border-t-surface-brand-strong/40', 'border-x-0'],
|
|
@@ -123,5 +123,5 @@ export const listItemSectionHeaderVariants = cva(['flex-row items-center justify
|
|
|
123
123
|
});
|
|
124
124
|
|
|
125
125
|
/** Default section-title typography; applied by `ListItem.SectionHeader` for string/number children. Exported for rare custom composition. */
|
|
126
|
-
export const listItemSectionHeaderLabelVariants = cva(
|
|
126
|
+
export const listItemSectionHeaderLabelVariants = cva('text-xs font-semibold uppercase tracking-wide text-content-secondary');
|
|
127
127
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","cva","
|
|
1
|
+
{"version":3,"names":["Platform","cva","TRANSITION_COLORS","listItemRootVariants","select","web","join","default","variants","size","compact","surface","negative","showSeparator","true","false","crossAlign","center","start","compoundVariants","className","defaultVariants","listItemLeadingSlotVariants","listItemTrailingSlotVariants","listItemContentVariants","listItemTitleVariants","listItemDescriptionVariants","listItemMetaVariants","listItemSectionHeaderVariants","showDivider","listItemSectionHeaderLabelVariants"],"sourceRoot":"../../../../src","sources":["components/ListItem/styles.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,GAAG,QAA2B,0BAA0B;AACjE,SAASC,iBAAiB,QAAQ,yBAAyB;;AAE3D;;AAEA,OAAO,MAAMC,oBAAoB,GAAGF,GAAG,CACrC,CACE,mCAAmC,EACnC,0EAA0E,EAC1E,+BAA+B,EAC/BC,iBAAiB,EACjBF,QAAQ,CAACI,MAAM,CAAC;EACdC,GAAG,EAAE,CACH,cAAc,EACd,mCAAmC,EACnC,qDAAqD,EACrD,gKAAgK,CACjK,CAACC,IAAI,CAAC,GAAG,CAAC;EACXC,OAAO,EAAE;AACX,CAAC,CAAC,CACH,EACD;EACEC,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJF,OAAO,EAAE,YAAY;MACrBG,OAAO,EAAE;IACX,CAAC;IACDC,OAAO,EAAE;MACPJ,OAAO,EAAE,UAAU;MACnBK,QAAQ,EAAE;IACZ,CAAC;IACDC,aAAa,EAAE;MACbC,IAAI,EAAE,+CAA+C;MACrDC,KAAK,EAAE;IACT,CAAC;IACDC,UAAU,EAAE;MACVC,MAAM,EAAE,cAAc;MACtBC,KAAK,EAAE;IACT;EACF,CAAC;EACDC,gBAAgB,EAAE,CAChB;IACER,OAAO,EAAE,UAAU;IACnBS,SAAS,EAAEpB,QAAQ,CAACI,MAAM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MkB,oBAAoB,GAAG1B,GAAG,CAAC,uBAAuB,EAAE;EAC/DO,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJF,OAAO,EAAE,wBAAwB;MACjCG,OAAO,EAAE;IACX;EACF,CAAC;EACDW,eAAe,EAAE;IACfZ,IAAI,EAAE;EACR;AACF,CAAC,CAAC;;AAEF;;AAEA,OAAO,MAAMmB,6BAA6B,GAAG3B,GAAG,CAC9C,CACE,6EAA6E,EAC7E,yBAAyB,CAC1B,EACD;EACEO,QAAQ,EAAE;IACRqB,WAAW,EAAE;MACXf,IAAI,EAAE,CAAC,0DAA0D,EAAE,YAAY,CAAC;MAChFC,KAAK,EAAE;IACT;EACF,CAAC;EACDM,eAAe,EAAE;IACfQ,WAAW,EAAE;EACf;AACF,CACF,CAAC;;AAED;AACA,OAAO,MAAMC,kCAAkC,GAAG7B,GAAG,CACnD,sEACF,CAAC","ignoreList":[]}
|
|
@@ -1,23 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { forwardRef, useMemo } from 'react';
|
|
3
|
+
import { forwardRef, useEffect, useMemo } from 'react';
|
|
4
4
|
import { View } from 'react-native';
|
|
5
5
|
import { cn } from '@cdx-ui/utils';
|
|
6
6
|
import { progressSegmentedVariants, segmentVariants } from './styles';
|
|
7
|
+
|
|
8
|
+
/* `ProgressSegmentedProps.total` remains in the public API until the next major release. */
|
|
9
|
+
/* eslint-disable @typescript-eslint/no-deprecated */
|
|
7
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
11
|
export const ProgressSegmented = /*#__PURE__*/forwardRef(({
|
|
9
12
|
step,
|
|
10
|
-
|
|
13
|
+
segments,
|
|
14
|
+
total,
|
|
11
15
|
isStepComplete = false,
|
|
12
16
|
getAccessibilityText,
|
|
13
17
|
className,
|
|
14
18
|
accessibilityLabel = 'Progress',
|
|
15
19
|
...props
|
|
16
20
|
}, ref) => {
|
|
17
|
-
const
|
|
18
|
-
|
|
21
|
+
const segmentCount = segments ?? total ?? 5;
|
|
22
|
+
|
|
23
|
+
// TODO: Remove this once the `total` prop is removed.
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && total !== undefined && segments === undefined) {
|
|
26
|
+
console.warn('[ProgressSegmented] The `total` prop is deprecated and will be removed in a future major release. Use `segments` instead.');
|
|
27
|
+
}
|
|
28
|
+
}, [total, segments]);
|
|
29
|
+
const clampedStep = Math.max(0, Math.min(step, segmentCount));
|
|
30
|
+
const segmentStates = useMemo(() => {
|
|
19
31
|
return Array.from({
|
|
20
|
-
length:
|
|
32
|
+
length: segmentCount
|
|
21
33
|
}, (_, index) => {
|
|
22
34
|
const segmentIndex = index + 1;
|
|
23
35
|
let state = 'incomplete';
|
|
@@ -28,12 +40,12 @@ export const ProgressSegmented = /*#__PURE__*/forwardRef(({
|
|
|
28
40
|
}
|
|
29
41
|
return state;
|
|
30
42
|
});
|
|
31
|
-
}, [
|
|
32
|
-
let accessibilityText = `Step ${String(clampedStep)} of ${String(
|
|
43
|
+
}, [segmentCount, clampedStep, isStepComplete]);
|
|
44
|
+
let accessibilityText = `Step ${String(clampedStep)} of ${String(segmentCount)}`;
|
|
33
45
|
if (getAccessibilityText) {
|
|
34
|
-
accessibilityText = getAccessibilityText(clampedStep,
|
|
46
|
+
accessibilityText = getAccessibilityText(clampedStep, segmentCount, isStepComplete);
|
|
35
47
|
} else if (isStepComplete) {
|
|
36
|
-
accessibilityText = `Step ${String(clampedStep)} of ${String(
|
|
48
|
+
accessibilityText = `Step ${String(clampedStep)} of ${String(segmentCount)}, completed`;
|
|
37
49
|
}
|
|
38
50
|
return /*#__PURE__*/_jsx(View, {
|
|
39
51
|
ref: ref,
|
|
@@ -41,13 +53,13 @@ export const ProgressSegmented = /*#__PURE__*/forwardRef(({
|
|
|
41
53
|
accessibilityLabel: accessibilityLabel,
|
|
42
54
|
accessibilityValue: {
|
|
43
55
|
min: 0,
|
|
44
|
-
max:
|
|
56
|
+
max: segmentCount,
|
|
45
57
|
now: clampedStep,
|
|
46
58
|
text: accessibilityText
|
|
47
59
|
},
|
|
48
60
|
className: cn(progressSegmentedVariants(), className),
|
|
49
61
|
...props,
|
|
50
|
-
children:
|
|
62
|
+
children: segmentStates.map((state, index) => /*#__PURE__*/_jsx(View, {
|
|
51
63
|
className: cn(segmentVariants({
|
|
52
64
|
state
|
|
53
65
|
}))
|
|
@@ -55,4 +67,6 @@ export const ProgressSegmented = /*#__PURE__*/forwardRef(({
|
|
|
55
67
|
});
|
|
56
68
|
});
|
|
57
69
|
ProgressSegmented.displayName = 'ProgressSegmented';
|
|
70
|
+
|
|
71
|
+
/* eslint-enable @typescript-eslint/no-deprecated */
|
|
58
72
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","useMemo","View","cn","progressSegmentedVariants","segmentVariants","jsx","_jsx","ProgressSegmented","step","total","isStepComplete","getAccessibilityText","className","accessibilityLabel","props","ref","clampedStep","Math","max","min","
|
|
1
|
+
{"version":3,"names":["forwardRef","useEffect","useMemo","View","cn","progressSegmentedVariants","segmentVariants","jsx","_jsx","ProgressSegmented","step","segments","total","isStepComplete","getAccessibilityText","className","accessibilityLabel","props","ref","segmentCount","process","env","NODE_ENV","undefined","console","warn","clampedStep","Math","max","min","segmentStates","Array","from","length","_","index","segmentIndex","state","accessibilityText","String","accessibilityRole","accessibilityValue","now","text","children","map","displayName"],"sourceRoot":"../../../../src","sources":["components/ProgressSegmented/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,SAAS,EAAEC,OAAO,QAAQ,OAAO;AACtD,SAASC,IAAI,QAAwB,cAAc;AACnD,SAASC,EAAE,QAAQ,eAAe;AAClC,SACEC,yBAAyB,EACzBC,eAAe,QAEV,UAAU;;AAEjB;AACA;AAAA,SAAAC,GAAA,IAAAC,IAAA;AA4BA,OAAO,MAAMC,iBAAiB,gBAAGT,UAAU,CACzC,CACE;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