@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
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--React-Native-Components?node-id=444-13403
|
|
4
|
+
// source=packages/components/src/components/Chip/index.tsx
|
|
5
|
+
// component=Chip
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
const variant = instance.getEnum('variant', {
|
|
9
|
+
tint: 'tint',
|
|
10
|
+
outline: 'outline'
|
|
11
|
+
});
|
|
12
|
+
const size = instance.getEnum('size', {
|
|
13
|
+
default: 'default',
|
|
14
|
+
small: 'small',
|
|
15
|
+
xsmall: 'xsmall'
|
|
16
|
+
});
|
|
17
|
+
const color = instance.getEnum('color', {
|
|
18
|
+
default: 'default',
|
|
19
|
+
action: 'action',
|
|
20
|
+
danger: 'danger',
|
|
21
|
+
warning: 'warning',
|
|
22
|
+
success: 'success',
|
|
23
|
+
info: 'info'
|
|
24
|
+
});
|
|
25
|
+
const isDisabled = instance.getEnum('isDisabled', {
|
|
26
|
+
true: true,
|
|
27
|
+
false: undefined
|
|
28
|
+
});
|
|
29
|
+
const disabledProp = figma.helpers.react.renderProp('disabled', isDisabled);
|
|
30
|
+
const showLeadingIcon = instance.getBoolean('Show Leading Icon?');
|
|
31
|
+
const showAvatar = instance.getBoolean('Show Avatar?');
|
|
32
|
+
const showTrailingIcon = instance.getBoolean('Show Trailing Icon?');
|
|
33
|
+
|
|
34
|
+
// INSTANCE_SWAP property names from Figma (Chip.LeadingIcon / Chip.TrailingIcon).
|
|
35
|
+
const leadingIconResult = showLeadingIcon && !showAvatar ? instance.getInstanceSwap('Chip.LeadingIcon')?.executeTemplate() : undefined;
|
|
36
|
+
const trailingIconResult = showTrailingIcon ? instance.getInstanceSwap('Chip.TrailingIcon')?.executeTemplate() : undefined;
|
|
37
|
+
const leadingIconName = leadingIconResult?.metadata?.props?.componentName;
|
|
38
|
+
const trailingIconName = trailingIconResult?.metadata?.props?.componentName;
|
|
39
|
+
const leadingIconSnippet = leadingIconName ?? leadingIconResult?.example;
|
|
40
|
+
const trailingIconSnippet = trailingIconName ?? trailingIconResult?.example;
|
|
41
|
+
const label = instance.findText('Chip.Label').textContent;
|
|
42
|
+
const iconImports = [];
|
|
43
|
+
if (showLeadingIcon && !showAvatar && leadingIconName) {
|
|
44
|
+
iconImports.push(`import { ${leadingIconName} } from '@cdx-ui/icons'`);
|
|
45
|
+
}
|
|
46
|
+
if (showTrailingIcon && trailingIconName) {
|
|
47
|
+
iconImports.push(`import { ${trailingIconName} } from '@cdx-ui/icons'`);
|
|
48
|
+
}
|
|
49
|
+
const avatarImport = showAvatar ? ["import { Avatar } from '@cdx-ui/components'"] : [];
|
|
50
|
+
export default {
|
|
51
|
+
id: 'chip',
|
|
52
|
+
imports: ["import { Chip } from '@cdx-ui/components'", ...avatarImport, ...iconImports],
|
|
53
|
+
example: figma.code`
|
|
54
|
+
<Chip variant="${variant}" size="${size}" color="${color}"${disabledProp}>
|
|
55
|
+
${showAvatar ? figma.code`<Chip.Avatar>
|
|
56
|
+
<Avatar.Image source={{ uri: '...' }} />
|
|
57
|
+
</Chip.Avatar>` : showLeadingIcon ? figma.code`<Chip.Icon as={${leadingIconSnippet}} slot="leading" />` : null}
|
|
58
|
+
<Chip.Label>${label}</Chip.Label>
|
|
59
|
+
${showTrailingIcon ? figma.code`<Chip.Icon as={${trailingIconSnippet}} slot="trailing" />` : null}
|
|
60
|
+
</Chip>`
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=Chip.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","variant","getEnum","tint","outline","size","default","small","xsmall","color","action","danger","warning","success","info","isDisabled","true","false","undefined","disabledProp","helpers","react","renderProp","showLeadingIcon","getBoolean","showAvatar","showTrailingIcon","leadingIconResult","getInstanceSwap","executeTemplate","trailingIconResult","leadingIconName","metadata","props","componentName","trailingIconName","leadingIconSnippet","example","trailingIconSnippet","label","findText","textContent","iconImports","push","avatarImport","id","imports","code"],"sourceRoot":"../../../src","sources":["figma/Chip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BAAkBT,mBAAmB,sBAAsB,GAAG,IAAI;AACnG;AACA,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-CDS-V2--React-Native?node-id=409-3015
|
|
4
|
+
// source=packages/components/src/components/Field/index.tsx
|
|
5
|
+
// component=Field
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
const showLabel = instance.getBoolean('Show Label?');
|
|
9
|
+
const showHelperText = instance.getBoolean('Show Helper Text?');
|
|
10
|
+
const showErrorText = instance.getBoolean('Show Error Text?');
|
|
11
|
+
|
|
12
|
+
// Enum-as-boolean: isInvalid / isDisabled are VARIANT properties in Figma (string values "true"/"false").
|
|
13
|
+
// Map "false" to undefined so renderProp omits them from the snippet.
|
|
14
|
+
const isInvalid = instance.getEnum('isInvalid', {
|
|
15
|
+
true: true,
|
|
16
|
+
false: undefined
|
|
17
|
+
});
|
|
18
|
+
const isDisabled = instance.getEnum('isDisabled', {
|
|
19
|
+
true: true,
|
|
20
|
+
false: undefined
|
|
21
|
+
});
|
|
22
|
+
const isInvalidProp = figma.helpers.react.renderProp('isInvalid', isInvalid);
|
|
23
|
+
const isDisabledProp = figma.helpers.react.renderProp('isDisabled', isDisabled);
|
|
24
|
+
const labelText = instance.findText('{Label}', {
|
|
25
|
+
traverseInstances: true
|
|
26
|
+
}).textContent;
|
|
27
|
+
const helperText = instance.findText('{HelperText}', {
|
|
28
|
+
traverseInstances: true
|
|
29
|
+
}).textContent;
|
|
30
|
+
const errorText = instance.findText('{ErrorText}', {
|
|
31
|
+
traverseInstances: true
|
|
32
|
+
}).textContent;
|
|
33
|
+
const input = instance.findInstance('Input');
|
|
34
|
+
let inputSnippet;
|
|
35
|
+
if (input?.type === 'INSTANCE') {
|
|
36
|
+
inputSnippet = input.executeTemplate().example;
|
|
37
|
+
}
|
|
38
|
+
export default {
|
|
39
|
+
id: 'field-input',
|
|
40
|
+
// Only import Field here; the nested Input template provides its own "import { Input } …" line.
|
|
41
|
+
// Code Connect merges the two separate import statements from the same package automatically.
|
|
42
|
+
imports: ["import { Field } from '@cdx-ui/components'"],
|
|
43
|
+
example: figma.code`
|
|
44
|
+
<Field${isInvalidProp}${isDisabledProp}>
|
|
45
|
+
${showLabel ? figma.code`<Field.Label>${labelText}</Field.Label>` : null}
|
|
46
|
+
${inputSnippet}
|
|
47
|
+
${!isInvalid && showHelperText ? figma.code`<Field.Helper>${helperText}</Field.Helper>` : null}
|
|
48
|
+
${isInvalid && showErrorText ? figma.code`<Field.Error>${errorText}</Field.Error>` : null}
|
|
49
|
+
</Field>`
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=Field.Input.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","showLabel","getBoolean","showHelperText","showErrorText","isInvalid","getEnum","true","false","undefined","isDisabled","isInvalidProp","helpers","react","renderProp","isDisabledProp","labelText","findText","traverseInstances","textContent","helperText","errorText","input","findInstance","inputSnippet","type","executeTemplate","example","id","imports","code"],"sourceRoot":"../../../src","sources":["figma/Field.Input.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;AAEvC,MAAMC,SAAS,GAAGF,QAAQ,CAACG,UAAU,CAAC,aAAa,CAAC;AACpD,MAAMC,cAAc,GAAGJ,QAAQ,CAACG,UAAU,CAAC,mBAAmB,CAAC;AAC/D,MAAME,aAAa,GAAGL,QAAQ,CAACG,UAAU,CAAC,kBAAkB,CAAC;;AAE7D;AACA;AACA,MAAMG,SAAS,GAAGN,QAAQ,CAACO,OAAO,CAAC,WAAW,EAAE;EAC9CC,IAAI,EAAE,IAAI;EACVC,KAAK,EAAEC;AACT,CAAC,CAAC;AACF,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B,GAAG,IAAI;AAChG,IAAIf,SAAS,IAAID,aAAa,GAAGN,KAAK,CAACgC,IAAI,gBAAgBT,SAAS,gBAAgB,GAAG,IAAI;AAC3F;AACA,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--React-Native-Components?node-id=427-4179
|
|
4
|
+
// source=packages/components/src/components/Field/index.tsx
|
|
5
|
+
// component=Field
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
const showLabel = instance.getBoolean('Show Label?');
|
|
9
|
+
const showHelperText = instance.getBoolean('Show Helper Text?');
|
|
10
|
+
const showErrorText = instance.getBoolean('Show Error Text?');
|
|
11
|
+
|
|
12
|
+
// Enum-as-boolean: isInvalid / isDisabled are VARIANT properties in Figma (string values "true"/"false").
|
|
13
|
+
// Map "false" to undefined so renderProp omits them from the snippet.
|
|
14
|
+
const isInvalid = instance.getEnum('isInvalid', {
|
|
15
|
+
true: true,
|
|
16
|
+
false: undefined
|
|
17
|
+
});
|
|
18
|
+
const isDisabled = instance.getEnum('isDisabled', {
|
|
19
|
+
true: true,
|
|
20
|
+
false: undefined
|
|
21
|
+
});
|
|
22
|
+
const isInvalidProp = figma.helpers.react.renderProp('isInvalid', isInvalid);
|
|
23
|
+
const isDisabledProp = figma.helpers.react.renderProp('isDisabled', isDisabled);
|
|
24
|
+
const labelText = instance.findText('{Label}', {
|
|
25
|
+
traverseInstances: true
|
|
26
|
+
}).textContent;
|
|
27
|
+
const helperText = instance.findText('{HelperText}', {
|
|
28
|
+
traverseInstances: true
|
|
29
|
+
}).textContent;
|
|
30
|
+
const errorText = instance.findText('{ErrorText}', {
|
|
31
|
+
traverseInstances: true
|
|
32
|
+
}).textContent;
|
|
33
|
+
const select = instance.findInstance('Select');
|
|
34
|
+
let selectSnippet;
|
|
35
|
+
if (select?.type === 'INSTANCE') {
|
|
36
|
+
selectSnippet = select.executeTemplate().example;
|
|
37
|
+
}
|
|
38
|
+
export default {
|
|
39
|
+
id: 'field-select',
|
|
40
|
+
// Only import Field here; the nested Select template provides its own "import { Select } …" line.
|
|
41
|
+
// Code Connect merges the two separate import statements from the same package automatically.
|
|
42
|
+
imports: ["import { Field } from '@cdx-ui/components'"],
|
|
43
|
+
example: figma.code`
|
|
44
|
+
<Field${isInvalidProp}${isDisabledProp}>
|
|
45
|
+
${showLabel ? figma.code`<Field.Label>${labelText}</Field.Label>` : null}
|
|
46
|
+
${selectSnippet}
|
|
47
|
+
${!isInvalid && showHelperText ? figma.code`<Field.Helper>${helperText}</Field.Helper>` : null}
|
|
48
|
+
${isInvalid && showErrorText ? figma.code`<Field.Error>${errorText}</Field.Error>` : null}
|
|
49
|
+
</Field>`
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=Field.Select.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","showLabel","getBoolean","showHelperText","showErrorText","isInvalid","getEnum","true","false","undefined","isDisabled","isInvalidProp","helpers","react","renderProp","isDisabledProp","labelText","findText","traverseInstances","textContent","helperText","errorText","select","findInstance","selectSnippet","type","executeTemplate","example","id","imports","code"],"sourceRoot":"../../../src","sources":["figma/Field.Select.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;AAEvC,MAAMC,SAAS,GAAGF,QAAQ,CAACG,UAAU,CAAC,aAAa,CAAC;AACpD,MAAMC,cAAc,GAAGJ,QAAQ,CAACG,UAAU,CAAC,mBAAmB,CAAC;AAC/D,MAAME,aAAa,GAAGL,QAAQ,CAACG,UAAU,CAAC,kBAAkB,CAAC;;AAE7D;AACA;AACA,MAAMG,SAAS,GAAGN,QAAQ,CAACO,OAAO,CAAC,WAA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I,CAACnB,SAAS,IAAIF,cAAc,GAAGL,KAAK,CAACgC,IAAI,iBAAiBV,UAAU,iBAAiB,GAAG,IAAI;AAChG,IAAIf,SAAS,IAAID,aAAa,GAAGN,KAAK,CAACgC,IAAI,gBAAgBT,SAAS,gBAAgB,GAAG,IAAI;AAC3F;AACA,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--React-Native-Components?node-id=399-3385
|
|
4
|
+
// source=packages/components/src/components/Heading/index.tsx
|
|
5
|
+
// component=Heading
|
|
6
|
+
// Use the same branch URL as Button: Code Connect is scoped per file key; main vs branch are separate targets.
|
|
7
|
+
import figma from 'figma';
|
|
8
|
+
const instance = figma.selectedInstance;
|
|
9
|
+
|
|
10
|
+
// Figma size values are identical to code size values — no renaming needed.
|
|
11
|
+
const size = instance.getEnum('size', {
|
|
12
|
+
xl: 'xl',
|
|
13
|
+
lg: 'lg',
|
|
14
|
+
md: 'md',
|
|
15
|
+
sm: 'sm',
|
|
16
|
+
xs: 'xs'
|
|
17
|
+
});
|
|
18
|
+
const text = instance.findText('{Heading}').textContent;
|
|
19
|
+
export default {
|
|
20
|
+
id: 'heading',
|
|
21
|
+
imports: ["import { Heading } from '@cdx-ui/components'"],
|
|
22
|
+
example: figma.code`<Heading size="${size}">${text}</Heading>`
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=Heading.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","size","getEnum","xl","lg","md","sm","xs","text","findText","textContent","id","imports","example","code"],"sourceRoot":"../../../src","sources":["figma/Heading.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;;AAEvC;AACA,MAAMC,IAAI,GAAGF,QAAQ,CAACG,OAAO,CAAC,MAAM,EAAE;EACpCC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE;AACN,CAAC,CAAC;AAEF,MAAMC,IAAI,GAAIT,QAAQ,CAACU,QAAQ,CAAC,WAAW,CAAC,CAAgCC,WAAW;AAEvF,eAAe;EACbC,EAAE,EAAE,SAAS;EACbC,OAAO,EAAE,CAAC,8CAA8C,CAAC;EACzDC,OAAO,EAAEf,KAAK,CAACgB,IAAI,kBAAkBb,IAAI,KAAKO,IAAI;AACpD,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--React-Native-Components?node-id=397-33
|
|
4
|
+
// source=packages/components/src/components/Icon/index.tsx
|
|
5
|
+
// component=Icon
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
const iconSnippet = instance.getInstanceSwap('as')?.executeTemplate().example;
|
|
9
|
+
export default {
|
|
10
|
+
example: figma.code`${iconSnippet}`,
|
|
11
|
+
imports: ["import { Icon } from '@cdx-ui/components'"],
|
|
12
|
+
id: 'icon'
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=Icon.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","iconSnippet","getInstanceSwap","executeTemplate","example","code","imports","id"],"sourceRoot":"../../../src","sources":["figma/Icon.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;AAEvC,MAAMC,WAAW,GAAGF,QAAQ,CAACG,eAAe,CAAC,IAAI,CAAC,EAAEC,eAAe,CAAC,CAAC,CAACC,OAAO;AAE7E,eAAe;EACbA,OAAO,EAAEN,KAAK,CAACO,IAAI,GAAGJ,WAAW,EAAE;EACnCK,OAAO,EAAE,CAAC,2CAA2C,CAAC;EACtDC,EAAE,EAAE;AACN,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--React-Native-Components?node-id=427-5235
|
|
4
|
+
// source=packages/components/src/components/IconButton/index.tsx
|
|
5
|
+
// component=IconButton
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
const variant = instance.getEnum('variant', {
|
|
9
|
+
solid: 'solid',
|
|
10
|
+
tint: 'tint',
|
|
11
|
+
ghost: 'ghost'
|
|
12
|
+
});
|
|
13
|
+
const color = instance.getEnum('color', {
|
|
14
|
+
neutral: 'neutral',
|
|
15
|
+
action: 'action',
|
|
16
|
+
danger: 'danger'
|
|
17
|
+
});
|
|
18
|
+
const size = instance.getEnum('size', {
|
|
19
|
+
default: 'default',
|
|
20
|
+
small: 'small'
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
// Enum-as-boolean: isDisabled is a VARIANT property in Figma ("true"/"false").
|
|
24
|
+
const isDisabled = instance.getEnum('isDisabled', {
|
|
25
|
+
true: true,
|
|
26
|
+
false: undefined
|
|
27
|
+
});
|
|
28
|
+
const isDisabledProp = figma.helpers.react.renderProp('isDisabled', isDisabled);
|
|
29
|
+
|
|
30
|
+
// icon: INSTANCE_SWAP → IconButton `as` (ForgeIcon). Prefer metadata.props.componentName from icon Code Connect.
|
|
31
|
+
const iconResult = instance.getInstanceSwap('icon')?.executeTemplate();
|
|
32
|
+
const iconName = iconResult?.metadata?.props?.componentName;
|
|
33
|
+
const iconSnippet = iconName ?? iconResult?.example;
|
|
34
|
+
const iconImports = iconName ? [`import { ${iconName} } from '@cdx-ui/icons'`] : [];
|
|
35
|
+
export default {
|
|
36
|
+
id: 'icon-button',
|
|
37
|
+
imports: ["import { IconButton } from '@cdx-ui/components'", ...iconImports],
|
|
38
|
+
example: figma.code`
|
|
39
|
+
<IconButton as={${iconSnippet}} variant="${variant}" color="${color}" size="${size}"${isDisabledProp} />`
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=IconButton.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","variant","getEnum","solid","tint","ghost","color","neutral","action","danger","size","default","small","isDisabled","true","false","undefined","isDisabledProp","helpers","react","renderProp","iconResult","getInstanceSwap","executeTemplate","iconName","metadata","props","componentName","iconSnippet","example","iconImports","id","imports","code"],"sourceRoot":"../../../src","sources":["figma/IconButton.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;AAEvC,MAAMC,OAAO,GAAGF,QAAQ,CAACG,OAAO,CAAC,SAAS,EAAE;EAC1CC,KAAK,EAAE,OAAO;EACdC,IAAI,EAAE,MAAM;EACZC,KAAK,EAAE;AACT,CAAC,CAAC;AACF,MAAMC,KAAK,GAAGP,QAAQ,CAACG,OAAO,CAAC,OAAO,EAAE;EACtCK,OAAO,EAAE,SAAS;EAClBC,MAAM,EAAE,QAAQ;EAChBC,MAAM,EAAE;AACV,CAAC,CAAC;AACF,MAAMC,IAAI,GAAGX,QAAQ,CAACG,OAAO,CAAC,MAAM,EAAE;EACpCS,OAAO,EAAE,SAAS;EAClBC,KAAK,EAAE;AACT,CAAC,CAAC;;AAEF;AACA,MAAMC,UAAU,GAAGd,QAAQ,CAACG,OAAO,CAAC,YAAY,EAAE;EAChDY,IAAI,EAAE,IAAI;EACVC,KAAK,EAAEC;AACT,CAAC,CAAC;AACF,MAAMC,cAAc,GAAGnB,KAAK,CAACoB,OAAO,CAACC,KAAK,CAACC,UAAU,CAAC,YAAY,EAAEP,UAAU,CAAC;;AAE/E;AACA,MAAMQ,UAAU,GAAGtB,QAAQ,CAACuB,eAAe,CAAC,MAAM,CAAC,EAAEC,eAAe,CAAC,CAAC;AACtE,MAAMC,QAAQ,GAAGH,UAAU,EAAEI,QAAQ,EAAEC,KAAK,EAAEC,aAAmC;AACjF,MAAMC,WAAW,GAAGJ,QAAQ,IAAIH,UAAU,EAAEQ,OAAO;AAEnD,MAAMC,WAAW,GAAGN,QAAQ,GAAG,CAAC,YAAYA,QAAQ,yBAAyB,CAAC,GAAG,EAAE;AAEnF,eAAe;EACbO,EAAE,EAAE,aAAa;EACjBC,OAAO,EAAE,CAAC,iDAAiD,EAAE,GAAGF,WAAW,CAAC;EAC5ED,OAAO,EAAE/B,KAAK,CAACmC,IAAI;AACrB,kBAAkBL,WAAW,cAAc3B,OAAO,YAAYK,KAAK,WAAWI,IAAI,IAAIO,cAAc;AACpG,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-CDS-V2--React-Native?node-id=159-22
|
|
4
|
+
// source=packages/components/src/components/Input/index.tsx
|
|
5
|
+
// component=Input
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
const variant = instance.getEnum('variant', {
|
|
9
|
+
outlined: 'outline'
|
|
10
|
+
});
|
|
11
|
+
const size = instance.getEnum('size', {
|
|
12
|
+
default: 'default'
|
|
13
|
+
});
|
|
14
|
+
const isInvalid = instance.getEnum('isInvalid', {
|
|
15
|
+
true: true,
|
|
16
|
+
false: undefined
|
|
17
|
+
});
|
|
18
|
+
const isDisabled = instance.getEnum('isDisabled', {
|
|
19
|
+
true: true,
|
|
20
|
+
false: undefined
|
|
21
|
+
});
|
|
22
|
+
const isInvalidProp = figma.helpers.react.renderProp('isInvalid', isInvalid);
|
|
23
|
+
const isDisabledProp = figma.helpers.react.renderProp('isDisabled', isDisabled);
|
|
24
|
+
const showValue = instance.getEnum('Show Value?', {
|
|
25
|
+
true: true,
|
|
26
|
+
false: false
|
|
27
|
+
});
|
|
28
|
+
const showPlaceholder = instance.getEnum('Show Placeholder?', {
|
|
29
|
+
true: true,
|
|
30
|
+
false: false
|
|
31
|
+
});
|
|
32
|
+
const valueText = instance.findText('{value}', {
|
|
33
|
+
traverseInstances: true
|
|
34
|
+
}).textContent;
|
|
35
|
+
const placeholder = instance.getString('placeholder');
|
|
36
|
+
const defaultValueProp = figma.helpers.react.renderProp('defaultValue', showValue ? valueText : undefined);
|
|
37
|
+
const placeholderProp = figma.helpers.react.renderProp('placeholder', showPlaceholder ? placeholder : undefined);
|
|
38
|
+
export default {
|
|
39
|
+
id: 'input',
|
|
40
|
+
imports: ["import { Input } from '@cdx-ui/components'"],
|
|
41
|
+
example: figma.code`
|
|
42
|
+
<Input variant="${variant}" size="${size}"${isInvalidProp}${isDisabledProp}>
|
|
43
|
+
<Input.Field${defaultValueProp}${placeholderProp} />
|
|
44
|
+
</Input>`
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=Input.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","variant","getEnum","outlined","size","default","isInvalid","true","false","undefined","isDisabled","isInvalidProp","helpers","react","renderProp","isDisabledProp","showValue","showPlaceholder","valueText","findText","traverseInstances","textContent","placeholder","getString","defaultValueProp","placeholderProp","id","imports","example","code"],"sourceRoot":"../../../src","sources":["figma/Input.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;AAEvC,MAAMC,OAAO,GAAGF,QAAQ,CAACG,OAAO,CAAC,SAAS,EAAE;EAC1CC,QAAQ,EAAE;AACZ,C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AW,GAAGb,SAClC,CAAC;AAED,eAAe;EACbiB,EAAE,EAAE,OAAO;EACXC,OAAO,EAAE,CAAC,4CAA4C,CAAC;EACvDC,OAAO,EAAE9B,KAAK,CAAC+B,IAAI;AACrB,kBAAkB5B,OAAO,WAAWG,IAAI,IAAIO,aAAa,GAAGI,cAAc;AAC1E,gBAAgBS,gBAAgB,GAAGC,eAAe;AAClD;AACA,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--React-Native-Components?node-id=457-874
|
|
4
|
+
// source=packages/components/src/components/Link/index.tsx
|
|
5
|
+
// component=Link
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
|
|
9
|
+
// Enum-as-boolean: `visited` is a VARIANT property in Figma (string values "true"/"false").
|
|
10
|
+
const isVisited = instance.getEnum('visited', {
|
|
11
|
+
true: true,
|
|
12
|
+
false: undefined
|
|
13
|
+
});
|
|
14
|
+
const isVisitedProp = figma.helpers.react.renderProp('isVisited', isVisited);
|
|
15
|
+
const label = instance.findText('{link text}').textContent;
|
|
16
|
+
export default {
|
|
17
|
+
id: 'link',
|
|
18
|
+
imports: ["import { Link } from '@cdx-ui/components'"],
|
|
19
|
+
example: figma.code`
|
|
20
|
+
<Link href="/example"${isVisitedProp}>
|
|
21
|
+
<Link.Label>${label}</Link.Label>
|
|
22
|
+
</Link>`
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=Link.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","isVisited","getEnum","true","false","undefined","isVisitedProp","helpers","react","renderProp","label","findText","textContent","id","imports","example","code"],"sourceRoot":"../../../src","sources":["figma/Link.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;;AAEvC;AACA,MAAMC,SAAS,GAAGF,QAAQ,CAACG,OAAO,CAAC,SAAS,EAAE;EAC5CC,IAAI,EAAE,IAAI;EACVC,KAAK,EAAEC;AACT,CAAC,CAAC;AACF,MAAMC,aAAa,GAAGR,KAAK,CAACS,OAAO,CAACC,KAAK,CAACC,UAAU,CAAC,WAAW,EAAER,SAAS,CAAC;AAE5E,MAAMS,KAAK,GAAIX,QAAQ,CAACY,QAAQ,CAAC,aAAa,CAAC,CAAgCC,WAAW;AAE1F,eAAe;EACbC,EAAE,EAAE,MAAM;EACVC,OAAO,EAAE,CAAC,2CAA2C,CAAC;EACtDC,OAAO,EAAEjB,KAAK,CAACkB,IAAI;AACrB,uBAAuBV,aAAa;AACpC,gBAAgBI,KAAK;AACrB;AACA,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--React-Native-Components?node-id=449-449
|
|
4
|
+
// source=packages/components/src/components/ProgressSegmented/index.tsx
|
|
5
|
+
// component=ProgressSegmented
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
const segmentsCount = instance.getEnum('segments', {
|
|
9
|
+
'2': 2,
|
|
10
|
+
'3': 3,
|
|
11
|
+
'4': 4,
|
|
12
|
+
'5': 5,
|
|
13
|
+
'6': 6
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
// Figma `step=complete` maps to `isStepComplete` on the last step (all segments filled).
|
|
17
|
+
const stepRaw = instance.getEnum('step', {
|
|
18
|
+
'1': '1',
|
|
19
|
+
'2': '2',
|
|
20
|
+
'3': '3',
|
|
21
|
+
'4': '4',
|
|
22
|
+
'5': '5',
|
|
23
|
+
'6': '6',
|
|
24
|
+
complete: 'complete'
|
|
25
|
+
});
|
|
26
|
+
const isStepComplete = stepRaw === 'complete';
|
|
27
|
+
const step = isStepComplete ? segmentsCount : Number(stepRaw);
|
|
28
|
+
export default {
|
|
29
|
+
id: 'progress-segmented',
|
|
30
|
+
imports: ["import { ProgressSegmented } from '@cdx-ui/components'"],
|
|
31
|
+
example: figma.code`<ProgressSegmented segments={${segmentsCount}} step={${step}}${isStepComplete ? figma.code` isStepComplete` : figma.code``} />`
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=ProgressSegmented.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","segmentsCount","getEnum","stepRaw","complete","isStepComplete","step","Number","id","imports","example","code"],"sourceRoot":"../../../src","sources":["figma/ProgressSegmented.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;AAEvC,MAAMC,aAAa,GAAGF,QAAQ,CAACG,OAAO,CAAC,UAAU,EAAE;EACjD,GAAG,EAAE,CAAC;EACN,GAAG,EAAE,CAAC;EACN,GAAG,EAAE,CAAC;EACN,GAAG,EAAE,CAAC;EACN,GAAG,EAAE;AACP,CAAC,CAAC;;AAEF;AACA,MAAMC,OAAO,GAAGJ,QAAQ,CAACG,OAAO,CAAC,MAAM,EAAE;EACvC,GAAG,EAAE,GAAG;EACR,GAAG,EAAE,GAAG;EACR,GAAG,EAAE,GAAG;EACR,GAAG,EAAE,GAAG;EACR,GAAG,EAAE,GAAG;EACR,GAAG,EAAE,GAAG;EACRE,QAAQ,EAAE;AACZ,CAAC,CAAC;AAEF,MAAMC,cAAc,GAAGF,OAAO,KAAK,UAAU;AAC7C,MAAMG,IAAI,GAAGD,cAAc,GAAGJ,aAAa,GAAGM,MAAM,CAACJ,OAAO,CAAC;AAE7D,eAAe;EACbK,EAAE,EAAE,oBAAoB;EACxBC,OAAO,EAAE,CAAC,wDAAwD,CAAC;EACnEC,OAAO,EAAEZ,KAAK,CAACa,IAAI,gCAAgCV,aAAa,WAAWK,IAAI,IAC7ED,cAAc,GAAGP,KAAK,CAACa,IAAI,iBAAiB,GAAGb,KAAK,CAACa,IAAI,EAAE;AAE/D,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--React-Native-Components?node-id=2603-62
|
|
4
|
+
// source=packages/components/src/components/Radio/index.tsx
|
|
5
|
+
// component=Radio
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
|
|
9
|
+
// Enum-as-boolean: isDisabled and isInvalid are VARIANT properties in Figma (string values "true"/"false").
|
|
10
|
+
// Rendered via renderProp so JSX formatting matches Code Connect conventions.
|
|
11
|
+
const isDisabled = instance.getEnum('isDisabled', {
|
|
12
|
+
true: true,
|
|
13
|
+
false: false
|
|
14
|
+
});
|
|
15
|
+
const isInvalid = instance.getEnum('isInvalid', {
|
|
16
|
+
true: true,
|
|
17
|
+
false: false
|
|
18
|
+
});
|
|
19
|
+
const isDisabledProp = figma.helpers.react.renderProp('isDisabled', isDisabled);
|
|
20
|
+
const isInvalidProp = figma.helpers.react.renderProp('isInvalid', isInvalid);
|
|
21
|
+
const showLabel = instance.getEnum('Show Label?', {
|
|
22
|
+
true: true,
|
|
23
|
+
false: false
|
|
24
|
+
});
|
|
25
|
+
const labelText = instance.findText('Label').textContent;
|
|
26
|
+
export default {
|
|
27
|
+
id: 'radio',
|
|
28
|
+
imports: ["import { Radio } from '@cdx-ui/components'"],
|
|
29
|
+
example: figma.code`
|
|
30
|
+
<Radio value="option"${isDisabledProp}${isInvalidProp}>
|
|
31
|
+
${showLabel ? figma.code`<Radio.Label>${labelText}</Radio.Label>` : null}
|
|
32
|
+
</Radio>`
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=Radio.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","isDisabled","getEnum","true","false","isInvalid","isDisabledProp","helpers","react","renderProp","isInvalidProp","showLabel","labelText","findText","textContent","id","imports","example","code"],"sourceRoot":"../../../src","sources":["figma/Radio.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;;AAEvC;AACA;AACA,MAAMC,UAAU,GAAGF,QAAQ,CAACG,OAAO,CAAC,YAAY,EAAE;EAChDC,IAAI,EAAE,IAAI;EACVC,KAAK,EAAE;AACT,CAAC,CAAC;AACF,MAAMC,SAAS,GAAGN,QAAQ,CAACG,OAAO,CAAC,WAAW,EAAE;EAC9CC,IAAI,EAAE,IAAI;EACVC,KAAK,EAAE;AACT,CAAC,CAAC;AACF,MAAME,cAAc,GAAGR,KAAK,CAACS,OAAO,CAACC,KAAK,CAACC,UAAU,CAAC,YAAY,EAAER,UAAU,CAAC;AAC/E,MAAMS,aAAa,GAAGZ,KAAK,CAACS,OAAO,CAACC,KAAK,CAACC,UAAU,CAAC,WAAW,EAAEJ,SAAS,CAAC;AAE5E,MAAMM,SAAS,GAAGZ,QAAQ,CAACG,OAAO,CAAC,aAAa,EAAE;EAChDC,IAAI,EAAE,IAAI;EACVC,KAAK,EAAE;AACT,CAAC,CAAC;AAEF,MAAMQ,SAAS,GAAIb,QAAQ,CAACc,QAAQ,CAAC,OAAO,CAAC,CAAgCC,WAAW;AAExF,eAAe;EACbC,EAAE,EAAE,OAAO;EACXC,OAAO,EAAE,CAAC,4CAA4C,CAAC;EACvDC,OAAO,EAAEnB,KAAK,CAACoB,IAAI;AACrB,uBAAuBZ,cAAc,GAAGI,aAAa;AACrD,IAAIC,SAAS,GAAGb,KAAK,CAACoB,IAAI,gBAAgBN,SAAS,gBAAgB,GAAG,IAAI;AAC1E;AACA,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--React-Native-Components?node-id=427-2296
|
|
4
|
+
// source=packages/components/src/components/Select/index.tsx
|
|
5
|
+
// component=Select
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
const variant = instance.getEnum('variant', {
|
|
9
|
+
outlined: 'outline'
|
|
10
|
+
});
|
|
11
|
+
const size = instance.getEnum('size', {
|
|
12
|
+
default: 'default'
|
|
13
|
+
});
|
|
14
|
+
const isInvalid = instance.getEnum('isInvalid', {
|
|
15
|
+
true: true,
|
|
16
|
+
false: undefined
|
|
17
|
+
});
|
|
18
|
+
const isDisabled = instance.getEnum('isDisabled', {
|
|
19
|
+
true: true,
|
|
20
|
+
false: undefined
|
|
21
|
+
});
|
|
22
|
+
const isInvalidProp = figma.helpers.react.renderProp('isInvalid', isInvalid);
|
|
23
|
+
const isDisabledProp = figma.helpers.react.renderProp('isDisabled', isDisabled);
|
|
24
|
+
const showValue = instance.getEnum('Show Value?', {
|
|
25
|
+
true: true,
|
|
26
|
+
false: undefined
|
|
27
|
+
});
|
|
28
|
+
const showPlaceholder = instance.getEnum('Show Placeholder?', {
|
|
29
|
+
true: true,
|
|
30
|
+
false: undefined
|
|
31
|
+
});
|
|
32
|
+
const valueText = instance.findText('{value}', {
|
|
33
|
+
traverseInstances: true
|
|
34
|
+
}).textContent;
|
|
35
|
+
const placeholder = instance.getString('placeholder');
|
|
36
|
+
const valueProp = figma.helpers.react.renderProp('value', showValue ? 'value' : undefined);
|
|
37
|
+
export default {
|
|
38
|
+
id: 'select',
|
|
39
|
+
imports: ["import { Select } from '@cdx-ui/components'"],
|
|
40
|
+
example: figma.code`
|
|
41
|
+
<Select variant="${variant}" size="${size}" items={[{ value: 'value', label: '${valueText}' }]}${valueProp}${isInvalidProp}${isDisabledProp}>
|
|
42
|
+
<Select.Trigger>
|
|
43
|
+
${showPlaceholder ? figma.code`<Select.Value placeholder="${placeholder}" />` : figma.code`<Select.Value />`}
|
|
44
|
+
</Select.Trigger>
|
|
45
|
+
</Select>`
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=Select.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","variant","getEnum","outlined","size","default","isInvalid","true","false","undefined","isDisabled","isInvalidProp","helpers","react","renderProp","isDisabledProp","showValue","showPlaceholder","valueText","findText","traverseInstances","textContent","placeholder","getString","valueProp","id","imports","example","code"],"sourceRoot":"../../../src","sources":["figma/Select.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;AAEvC,MAAMC,OAAO,GAAGF,QAAQ,CAACG,OAAO,CAAC,SAAS,EAAE;EAC1CC,QAAQ,EAAE;AACZ,CAAC,CAAC;AACF,MAAMC,IAAI,GAAGL,QAAQ,CAACG,OAAO,CAAC,MAAM,EAAE;EACpCG,OAAO,EAAE;AACX,CAAC,CAAC;AAEF,MAAMC,SAAS,GAAGP,QAAQ,CAACG,OAAO,CAAC,WAAW,EAAE;EAC9CK,IAAI,EAAE,IAAI;EACVC,KAAK,EAAEC;AACT,CAAC,CAAC;AACF,MAAMC,UAAU,GAAGX,QAAQ,CAACG,OAAO,CAAC,YAAY,EAAE;EAChDK,IAAI,EAAE,IAAI;EACVC,KAAK,EAAEC;AACT,CAAC,CAAC;AAEF,MAAME,aAAa,GAAGb,KAAK,CAACc,OAAO,CAACC,KAAK,CAACC,UAAU,CAAC,WAAW,EAAER,SAAS,CAAC;AAC5E,MAAMS,cAAc,GAAGjB,KAAK,CAACc,OAAO,CAACC,KAAK,CAACC,UAAU,CAAC,YAAY,EAAEJ,UAAU,CAAC;AAE/E,MAAMM,SAAS,GAAGjB,QAAQ,CAACG,OAAO,CAAC,aAAa,EAAE;EAChDK,IAAI,EAAE,IAAI;EACVC,KAAK,EAAEC;AACT,CAAC,CAAC;AACF,MAAMQ,eAAe,GAAGlB,QAAQ,CAACG,OAAO,CAAC,mBAAmB,EAAE;EAC5DK,IAAI,EAAE,IAAI;EACVC,KAAK,EAAEC;AACT,CAAC,CAAC;AAEF,MAAMS,SAAS,GACbnB,QAAQ,CAACoB,QAAQ,CAAC,SAAS,EAAE;EAC3BC,iBAAiB,EAAE;AACrB,CAAC,CAAC,CACFC,WAAW;AACb,MAAMC,WAAW,GAAGvB,QAAQ,CAACwB,SAAS,CAAC,aAAa,CAAC;AAErD,MAAMC,SAAS,GAAG1B,KAAK,CAACc,OAAO,CAACC,KAAK,CAACC,UAAU,CAAC,OAAO,EAAEE,SAAS,GAAG,OAAO,GAAGP,SAAS,CAAC;AAE1F,eAAe;EACbgB,EAAE,EAAE,QAAQ;EACZC,OAAO,EAAE,CAAC,6CAA6C,CAAC;EACxDC,OAAO,EAAE7B,KAAK,CAAC8B,IAAI;AACrB,mBAAmB3B,OAAO,WAAWG,IAAI,uCAAuCc,SAAS,QAAQM,SAAS,GAAGb,aAAa,GAAGI,cAAc;AAC3I;AACA,MAAME,eAAe,GAAGnB,KAAK,CAAC8B,IAAI,8BAA8BN,WAAW,MAAM,GAAGxB,KAAK,CAAC8B,IAAI,kBAAkB;AAChH;AACA;AACA,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--React-Native-Components?node-id=400-3
|
|
4
|
+
// source=packages/components/src/components/Text/index.tsx
|
|
5
|
+
// component=Text
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
|
|
9
|
+
// Figma size values are identical to code size values — no renaming needed.
|
|
10
|
+
const size = instance.getEnum('size', {
|
|
11
|
+
xl: 'xl',
|
|
12
|
+
lg: 'lg',
|
|
13
|
+
md: 'md',
|
|
14
|
+
sm: 'sm',
|
|
15
|
+
xs: 'xs'
|
|
16
|
+
});
|
|
17
|
+
const text = instance.findText('{Text}').textContent;
|
|
18
|
+
export default {
|
|
19
|
+
id: 'text',
|
|
20
|
+
imports: ["import { Text } from '@cdx-ui/components'"],
|
|
21
|
+
example: figma.code`<Text size="${size}">${text}</Text>`
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=Text.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","size","getEnum","xl","lg","md","sm","xs","text","findText","textContent","id","imports","example","code"],"sourceRoot":"../../../src","sources":["figma/Text.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;;AAEvC;AACA,MAAMC,IAAI,GAAGF,QAAQ,CAACG,OAAO,CAAC,MAAM,EAAE;EACpCC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE;AACN,CAAC,CAAC;AAEF,MAAMC,IAAI,GAAIT,QAAQ,CAACU,QAAQ,CAAC,QAAQ,CAAC,CAAgCC,WAAW;AAEpF,eAAe;EACbC,EAAE,EAAE,MAAM;EACVC,OAAO,EAAE,CAAC,2CAA2C,CAAC;EACtDC,OAAO,EAAEf,KAAK,CAACgB,IAAI,eAAeb,IAAI,KAAKO,IAAI;AACjD,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import figma from 'figma';
|
|
4
|
+
const instance = figma.selectedInstance;
|
|
5
|
+
const name = figma.batch.name;
|
|
6
|
+
const filled = instance.getEnum('filled', {
|
|
7
|
+
true: true,
|
|
8
|
+
false: undefined
|
|
9
|
+
});
|
|
10
|
+
const filledProp = figma.helpers.react.renderProp('filled', filled);
|
|
11
|
+
export default {
|
|
12
|
+
example: figma.code`<Icon as={${name}}${filledProp} />`,
|
|
13
|
+
imports: [`import { Icon } from '@cdx-ui/components'`, `import { ${name} } from '@cdx-ui/icons'`],
|
|
14
|
+
id: figma.batch.id,
|
|
15
|
+
metadata: {
|
|
16
|
+
nestable: true,
|
|
17
|
+
props: {
|
|
18
|
+
componentName: name
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=icons.figma.batch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","name","batch","filled","getEnum","true","false","undefined","filledProp","helpers","react","renderProp","example","code","imports","id","metadata","nestable","props","componentName"],"sourceRoot":"../../../src","sources":["figma/icons.figma.batch.ts"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;AACvC,MAAMC,IAAI,GAAGH,KAAK,CAACI,KAAK,CAACD,IAAc;AACvC,MAAME,MAAM,GAAGJ,QAAQ,CAACK,OAAO,CAAC,QAAQ,EAAE;EACxCC,IAAI,EAAE,IAAI;EACVC,KAAK,EAAEC;AACT,CAAC,CAAC;AACF,MAAMC,UAAU,GAAGV,KAAK,CAACW,OAAO,CAACC,KAAK,CAACC,UAAU,CAAC,QAAQ,EAAER,MAAM,CAAC;AAEnE,eAAe;EACbS,OAAO,EAAEd,KAAK,CAACe,IAAI,aAAaZ,IAAI,IAAIO,UAAU,KAAK;EACvDM,OAAO,EAAE,CAAC,2CAA2C,EAAE,YAAYb,IAAI,yBAAyB,CAAC;EACjGc,EAAE,EAAEjB,KAAK,CAACI,KAAK,CAACa,EAAY;EAC5BC,QAAQ,EAAE;IACRC,QAAQ,EAAE,IAAI;IACdC,KAAK,EAAE;MAAEC,aAAa,EAAElB;IAAK;EAC/B;AACF,CAAC","ignoreList":[]}
|