@cdx-ui/components 0.0.1-beta.2 → 0.0.1-beta.21
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 +18 -11
- package/lib/commonjs/components/Button/styles.js +1 -1
- package/lib/commonjs/components/Button/styles.js.map +1 -1
- package/lib/commonjs/components/Card/index.js +15 -3
- package/lib/commonjs/components/Card/index.js.map +1 -1
- package/lib/commonjs/components/Card/styles.js +17 -5
- package/lib/commonjs/components/Card/styles.js.map +1 -1
- package/lib/commonjs/components/Checkbox/styles.js +1 -1
- package/lib/commonjs/components/Checkbox/styles.js.map +1 -1
- package/lib/commonjs/components/Heading/styles.js.map +1 -1
- package/lib/commonjs/components/IconButton/styles.js +1 -1
- package/lib/commonjs/components/IconButton/styles.js.map +1 -1
- package/lib/commonjs/components/Input/styles.js +1 -1
- package/lib/commonjs/components/Input/styles.js.map +1 -1
- package/lib/commonjs/components/ListItem/index.js +283 -0
- package/lib/commonjs/components/ListItem/index.js.map +1 -0
- package/lib/commonjs/components/ListItem/styles.js +130 -0
- package/lib/commonjs/components/ListItem/styles.js.map +1 -0
- package/lib/commonjs/components/Radio/index.js +165 -0
- package/lib/commonjs/components/Radio/index.js.map +1 -0
- package/lib/commonjs/components/Radio/styles.js +30 -0
- package/lib/commonjs/components/Radio/styles.js.map +1 -0
- 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/Button.figma.js +70 -0
- package/lib/commonjs/figma/Button.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/Radio.figma.js +38 -0
- package/lib/commonjs/figma/Radio.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/styles/primitives.js +36 -3
- package/lib/commonjs/styles/primitives.js.map +1 -1
- package/lib/module/components/Button/styles.js +1 -1
- package/lib/module/components/Button/styles.js.map +1 -1
- package/lib/module/components/Card/index.js +16 -3
- package/lib/module/components/Card/index.js.map +1 -1
- package/lib/module/components/Card/styles.js +17 -5
- package/lib/module/components/Card/styles.js.map +1 -1
- package/lib/module/components/Checkbox/styles.js +2 -2
- package/lib/module/components/Checkbox/styles.js.map +1 -1
- package/lib/module/components/Heading/styles.js.map +1 -1
- package/lib/module/components/IconButton/styles.js +1 -1
- package/lib/module/components/IconButton/styles.js.map +1 -1
- package/lib/module/components/Input/styles.js +1 -1
- package/lib/module/components/Input/styles.js.map +1 -1
- package/lib/module/components/ListItem/index.js +226 -0
- package/lib/module/components/ListItem/index.js.map +1 -0
- package/lib/module/components/ListItem/styles.js +127 -0
- package/lib/module/components/ListItem/styles.js.map +1 -0
- package/lib/module/components/Radio/index.js +162 -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/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/Button.figma.js +64 -0
- package/lib/module/figma/Button.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/Radio.figma.js +32 -0
- package/lib/module/figma/Radio.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/styles/primitives.js +36 -3
- package/lib/module/styles/primitives.js.map +1 -1
- package/lib/typescript/components/Card/index.d.ts +3 -2
- package/lib/typescript/components/Card/index.d.ts.map +1 -1
- package/lib/typescript/components/Card/styles.d.ts +9 -2
- package/lib/typescript/components/Card/styles.d.ts.map +1 -1
- package/lib/typescript/components/Checkbox/styles.d.ts.map +1 -1
- package/lib/typescript/components/Heading/styles.d.ts.map +1 -1
- package/lib/typescript/components/ListItem/index.d.ts +49 -0
- package/lib/typescript/components/ListItem/index.d.ts.map +1 -0
- package/lib/typescript/components/ListItem/styles.d.ts +30 -0
- package/lib/typescript/components/ListItem/styles.d.ts.map +1 -0
- 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/Text/styles.d.ts.map +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/Button.figma.d.ts +8 -0
- package/lib/typescript/figma/Button.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/Radio.figma.d.ts +8 -0
- package/lib/typescript/figma/Radio.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/styles/primitives.d.ts +35 -0
- package/lib/typescript/styles/primitives.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/components/Button/styles.ts +1 -1
- package/src/components/Card/index.tsx +33 -13
- package/src/components/Card/styles.ts +31 -23
- package/src/components/Checkbox/styles.ts +7 -9
- package/src/components/IconButton/styles.ts +1 -1
- package/src/components/Input/styles.ts +1 -1
- package/src/components/ListItem/index.tsx +285 -0
- package/src/components/ListItem/styles.ts +153 -0
- package/src/components/Radio/index.tsx +191 -0
- package/src/components/Radio/styles.ts +59 -0
- package/src/components/Text/{styles.tsx → 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/styles/primitives.ts +36 -3
- /package/src/components/Heading/{styles.tsx → styles.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Platform","cva","TRANSITION_COLORS","tileGroupVariants","variants","direction","column","row","spacing","default","none","defaultVariants","tileRootVariants","select","web","join","shape","flat","card","showSeparator","true","false","tileLeadingSlotVariants","tileTrailingSlotVariants","tileContentVariants","tileTitleVariants","tileDescriptionVariants","tileIndicatorVariants"],"sourceRoot":"../../../../src","sources":["components/Tile/styles.ts"],"mappings":";;AAAA,SAASA,QAA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CAAC;AAEzF,OAAO,MAAMsB,wBAAwB,GAAGtB,GAAG,CAAC,CAAC,2CAA2C,CAAC,CAAC;AAE1F,OAAO,MAAMuB,mBAAmB,GAAGvB,GAAG,CAAC,CAAC,8CAA8C,CAAC,CAAC;AAExF,OAAO,MAAMwB,iBAAiB,GAAGxB,GAAG,CAAC,CAAC,yDAAyD,CAAC,CAAC;AAEjG,OAAO,MAAMyB,uBAAuB,GAAGzB,GAAG,CAAC,CAAC,6CAA6C,CAAC,CAAC;AAE3F,OAAO,MAAM0B,qBAAqB,GAAG1B,GAAG,CAAC,CAAC,2CAA2C,CAAC,CAAC","ignoreList":[]}
|
|
@@ -15,11 +15,14 @@ export * from './Image';
|
|
|
15
15
|
export * from './Input';
|
|
16
16
|
export * from './OtpInput';
|
|
17
17
|
export * from './Link';
|
|
18
|
+
export * from './ListItem';
|
|
18
19
|
export * from './ProgressBar';
|
|
19
20
|
export * from './ProgressSegmented';
|
|
21
|
+
export * from './Radio';
|
|
20
22
|
export * from './Select';
|
|
21
23
|
export * from './VirtualizedList';
|
|
22
24
|
export * from './Switch';
|
|
25
|
+
export * from './Tile';
|
|
23
26
|
export { HStack, VStack } from './Stack';
|
|
24
27
|
export * from './Heading';
|
|
25
28
|
export * from './Text';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["HStack","VStack"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;AAAA,cAAc,eAAe;AAC7B,cAAc,UAAU;AACxB,cAAc,eAAe;AAC7B,cAAc,OAAO;AACrB,cAAc,UAAU;AACxB,cAAc,QAAQ;AACtB,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,cAAc,eAAe;AAC7B,cAAc,qBAAqB;AACnC,cAAc,UAAU;AACxB,cAAc,mBAAmB;AACjC,cAAc,UAAU;AACxB,SAASA,MAAM,EAAEC,MAAM,QAAQ,SAAS;AACxC,cAAc,WAAW;AACzB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,cAAc","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["HStack","VStack"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;AAAA,cAAc,eAAe;AAC7B,cAAc,UAAU;AACxB,cAAc,eAAe;AAC7B,cAAc,OAAO;AACrB,cAAc,UAAU;AACxB,cAAc,QAAQ;AACtB,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,cAAc,YAAY;AAC1B,cAAc,eAAe;AAC7B,cAAc,qBAAqB;AACnC,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,mBAAmB;AACjC,cAAc,UAAU;AACxB,cAAc,QAAQ;AACtB,SAASA,MAAM,EAAEC,MAAM,QAAQ,SAAS;AACxC,cAAc,WAAW;AACzB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// url=https://www.figma.com/design/0lEVMVlLj8ZS4fgItr3pmd/%E2%AD%90-Forge-DS--React-Native-Components?node-id=119-72
|
|
4
|
+
// source=packages/components/src/components/Button/index.tsx
|
|
5
|
+
// component=Button
|
|
6
|
+
import figma from 'figma';
|
|
7
|
+
const instance = figma.selectedInstance;
|
|
8
|
+
|
|
9
|
+
// Variant rename: Figma uses "solid" but code uses "strong" for the filled/primary style.
|
|
10
|
+
// This divergence exists because "strong" better communicates visual weight in the code API
|
|
11
|
+
// while "solid" is the conventional Figma naming.
|
|
12
|
+
const variant = instance.getEnum('variant', {
|
|
13
|
+
solid: 'strong',
|
|
14
|
+
outline: 'outline',
|
|
15
|
+
ghost: 'ghost'
|
|
16
|
+
});
|
|
17
|
+
const color = instance.getEnum('color', {
|
|
18
|
+
action: 'action',
|
|
19
|
+
danger: 'danger'
|
|
20
|
+
});
|
|
21
|
+
const size = instance.getEnum('size', {
|
|
22
|
+
default: 'default',
|
|
23
|
+
small: 'small'
|
|
24
|
+
});
|
|
25
|
+
// Enum-as-boolean: isDisabled is a VARIANT property in Figma (string values "true"/"false")
|
|
26
|
+
// rather than a true BOOLEAN. Map "false" to undefined so the prop is omitted when not disabled.
|
|
27
|
+
const isDisabled = instance.getEnum('isDisabled', {
|
|
28
|
+
true: true,
|
|
29
|
+
false: undefined
|
|
30
|
+
});
|
|
31
|
+
const isDisabledProp = figma.helpers.react.renderProp('isDisabled', isDisabled);
|
|
32
|
+
const showLeadingIcon = instance.getBoolean('Show Leading Icon?');
|
|
33
|
+
const showTrailingIcon = instance.getBoolean('Show Trailing Icon?');
|
|
34
|
+
|
|
35
|
+
// Icon slots: Prefer metadata.props.componentName exposed by icon Code Connect templates,
|
|
36
|
+
// which yields a clean identifier (e.g. "Check"). Fall back to executeTemplate().example
|
|
37
|
+
// (renders a placeholder pill when the icon lacks Code Connect).
|
|
38
|
+
const leadingIconResult = instance.getInstanceSwap('Leading Icon')?.executeTemplate();
|
|
39
|
+
const trailingIconResult = instance.getInstanceSwap('Trailing Icon')?.executeTemplate();
|
|
40
|
+
const leadingIconName = leadingIconResult?.metadata?.props?.componentName;
|
|
41
|
+
const trailingIconName = trailingIconResult?.metadata?.props?.componentName;
|
|
42
|
+
const leadingIconSnippet = leadingIconName ?? leadingIconResult?.example;
|
|
43
|
+
const trailingIconSnippet = trailingIconName ?? trailingIconResult?.example;
|
|
44
|
+
const label = instance.findText('Button.Label').textContent;
|
|
45
|
+
|
|
46
|
+
// Include icon imports when resolved via metadata.props (propagated from icon Code Connect)
|
|
47
|
+
const iconImports = [];
|
|
48
|
+
if (showLeadingIcon && leadingIconName) {
|
|
49
|
+
iconImports.push(`import { ${leadingIconName} } from '@cdx-ui/icons'`);
|
|
50
|
+
}
|
|
51
|
+
if (showTrailingIcon && trailingIconName) {
|
|
52
|
+
iconImports.push(`import { ${trailingIconName} } from '@cdx-ui/icons'`);
|
|
53
|
+
}
|
|
54
|
+
export default {
|
|
55
|
+
id: 'button',
|
|
56
|
+
imports: ["import { Button } from '@cdx-ui/components'", ...iconImports],
|
|
57
|
+
example: figma.code`
|
|
58
|
+
<Button variant="${variant}" color="${color}" size="${size}"${isDisabledProp}>
|
|
59
|
+
${showLeadingIcon ? figma.code`<Button.Icon as={${leadingIconSnippet}} />` : null}
|
|
60
|
+
<Button.Label>${label}</Button.Label>
|
|
61
|
+
${showTrailingIcon ? figma.code`<Button.Icon as={${trailingIconSnippet}} />` : null}
|
|
62
|
+
</Button>`
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=Button.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","variant","getEnum","solid","outline","ghost","color","action","danger","size","default","small","isDisabled","true","false","undefined","isDisabledProp","helpers","react","renderProp","showLeadingIcon","getBoolean","showTrailingIcon","leadingIconResult","getInstanceSwap","executeTemplate","trailingIconResult","leadingIconName","metadata","props","componentName","trailingIconName","leadingIconSnippet","example","trailingIconSnippet","label","findText","textContent","iconImports","push","id","imports","code"],"sourceRoot":"../../../src","sources":["figma/Button.figma.ts"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAEzB,MAAMC,QAAQ,GAAGD,KAAK,CAACE,gBAAgB;;AAEvC;AACA;AACA;AACA,MAAMC,OAAO,GAAGF,QAAQ,CAACG,OAAO,CAAC,SAAS,EAAE;EAC1CC,KAAK,EAAE,QAAQ;EACfC,OAAO,EAAE,SAAS;EAClBC,KAAK,EAAE;AACT,CAAC,CAAC;AACF,MAAMC,KAAK,GAAGP,QAAQ,CAACG,OAAO,C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E;EACtCW,WAAW,CAACC,IAAI,CAAC,YAAYZ,eAAe,yBAAyB,CAAC;AACxE;AACA,IAAIL,gBAAgB,IAAIS,gBAAgB,EAAE;EACxCO,WAAW,CAACC,IAAI,CAAC,YAAYR,gBAAgB,yBAAyB,CAAC;AACzE;AAEA,eAAe;EACbS,EAAE,EAAE,QAAQ;EACZC,OAAO,EAAE,CAAC,6CAA6C,EAAE,GAAGH,WAAW,CAAC;EACxEL,OAAO,EAAEnC,KAAK,CAAC4C,IAAI;AACrB,mBAAmBzC,OAAO,YAAYK,KAAK,WAAWG,IAAI,IAAIO,cAAc;AAC5E,IAAII,eAAe,GAAGtB,KAAK,CAAC4C,IAAI,oBAAoBV,kBAAkB,MAAM,GAAG,IAAI;AACnF,kBAAkBG,KAAK;AACvB,IAAIb,gBAAgB,GAAGxB,KAAK,CAAC4C,IAAI,oBAAoBR,mBAAmB,MAAM,GAAG,IAAI;AACrF;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,32 @@
|
|
|
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.
|
|
10
|
+
// Map "false" to undefined so the prop is omitted when not set.
|
|
11
|
+
const isDisabled = instance.getEnum('isDisabled', {
|
|
12
|
+
true: true,
|
|
13
|
+
false: undefined
|
|
14
|
+
});
|
|
15
|
+
const isInvalid = instance.getEnum('isInvalid', {
|
|
16
|
+
true: true,
|
|
17
|
+
false: undefined
|
|
18
|
+
});
|
|
19
|
+
const showLabel = instance.getEnum('Show Label?', {
|
|
20
|
+
true: true,
|
|
21
|
+
false: false
|
|
22
|
+
});
|
|
23
|
+
const labelText = instance.findText('Label').textContent;
|
|
24
|
+
export default {
|
|
25
|
+
id: 'radio',
|
|
26
|
+
imports: ["import { Radio } from '@cdx-ui/components'"],
|
|
27
|
+
example: figma.code`
|
|
28
|
+
<Radio value="option" isDisabled={${isDisabled}} isInvalid={${isInvalid}}>
|
|
29
|
+
${showLabel ? figma.code`<Radio.Label>${labelText}</Radio.Label>` : null}
|
|
30
|
+
</Radio>`
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=Radio.figma.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["figma","instance","selectedInstance","isDisabled","getEnum","true","false","undefined","isInvalid","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,EAAEC;AACT,CAAC,CAAC;AACF,MAAMC,SAAS,GAAGP,QAAQ,CAACG,OAAO,CAAC,WAAW,EAAE;EAC9CC,IAAI,EAAE,IAAI;EACVC,KAAK,EAAEC;AACT,CAAC,CAAC;AAEF,MAAME,SAAS,GAAGR,QAAQ,CAACG,OAAO,CAAC,aAAa,EAAE;EAChDC,IAAI,EAAE,IAAI;EACVC,KAAK,EAAE;AACT,CAAC,CAAC;AAEF,MAAMI,SAAS,GAAIT,QAAQ,CAACU,QAAQ,CAAC,OAAO,CAAC,CAAgCC,WAAW;AAExF,eAAe;EACbC,EAAE,EAAE,OAAO;EACXC,OAAO,EAAE,CAAC,4CAA4C,CAAC;EACvDC,OAAO,EAAEf,KAAK,CAACgB,IAAI;AACrB,oCAAoCb,UAAU,gBAAgBK,SAAS;AACvE,IAAIC,SAAS,GAAGT,KAAK,CAACgB,IAAI,gBAAgBN,SAAS,gBAAgB,GAAG,IAAI;AAC1E;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":[]}
|