@seed-design/figma 1.3.2 β 1.3.4
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/lib/codegen/index.cjs +32 -11
- package/lib/codegen/index.d.ts +2 -1
- package/lib/codegen/index.d.ts.map +1 -1
- package/lib/codegen/index.js +32 -11
- package/lib/codegen/targets/react/index.cjs +159 -16
- package/lib/codegen/targets/react/index.d.ts.map +1 -1
- package/lib/codegen/targets/react/index.js +159 -16
- package/lib/index.cjs +8 -9
- package/lib/index.js +8 -9
- package/package.json +3 -3
- package/src/codegen/component-properties.ts +16 -0
- package/src/codegen/core/codegen.ts +22 -0
- package/src/codegen/skip-components.ts +7 -0
- package/src/codegen/targets/figma/pipeline.ts +2 -0
- package/src/codegen/targets/react/component/handlers/action-button.ts +3 -1
- package/src/codegen/targets/react/component/handlers/app-bar.ts +17 -0
- package/src/codegen/targets/react/component/handlers/image-frame.ts +134 -0
- package/src/codegen/targets/react/component/handlers/index.ts +1 -0
- package/src/codegen/targets/react/component/handlers/switch.ts +0 -4
- package/src/codegen/targets/react/pipeline.ts +2 -0
- package/src/entities/data/__generated__/component-sets/index.d.ts +8 -9
- package/src/entities/data/__generated__/component-sets/index.mjs +7 -8
- package/src/entities/data/__generated__/components/index.d.ts +5 -5
- package/src/entities/data/__generated__/components/index.mjs +5 -5
package/lib/codegen/index.js
CHANGED
|
@@ -429,11 +429,20 @@ function applyInferredLayout(parentNode, result) {
|
|
|
429
429
|
};
|
|
430
430
|
}
|
|
431
431
|
|
|
432
|
-
function createCodeGenerator({ frameTransformer, textTransformer, rectangleTransformer, instanceTransformer, vectorTransformer, booleanOperationTransformer, shouldInferAutoLayout }) {
|
|
432
|
+
function createCodeGenerator({ frameTransformer, textTransformer, rectangleTransformer, instanceTransformer, vectorTransformer, booleanOperationTransformer, shouldInferAutoLayout, skipComponentKeys }) {
|
|
433
|
+
function isSkippedInstance(node) {
|
|
434
|
+
if (!skipComponentKeys || skipComponentKeys.size === 0) return false;
|
|
435
|
+
if (node.type !== "INSTANCE") return false;
|
|
436
|
+
const { componentKey, componentSetKey } = node;
|
|
437
|
+
return skipComponentKeys.has(componentKey) || !!componentSetKey && skipComponentKeys.has(componentSetKey);
|
|
438
|
+
}
|
|
433
439
|
function traverse(node) {
|
|
434
440
|
if ("visible" in node && !node.visible) {
|
|
435
441
|
return;
|
|
436
442
|
}
|
|
443
|
+
if (isSkippedInstance(node)) {
|
|
444
|
+
return;
|
|
445
|
+
}
|
|
437
446
|
const result = match(node).with({
|
|
438
447
|
type: "FRAME"
|
|
439
448
|
}, (node)=>shouldInferAutoLayout ? frameTransformer(applyInferredLayout(node, inferLayout(node)), traverse) : frameTransformer(node, traverse)).with({
|
|
@@ -461,6 +470,12 @@ function createCodeGenerator({ frameTransformer, textTransformer, rectangleTrans
|
|
|
461
470
|
return traverse(node);
|
|
462
471
|
}
|
|
463
472
|
function generateCode(node, options) {
|
|
473
|
+
if (isSkippedInstance(node)) {
|
|
474
|
+
return {
|
|
475
|
+
imports: "",
|
|
476
|
+
jsx: "// This component is intentionally excluded from codegen"
|
|
477
|
+
};
|
|
478
|
+
}
|
|
464
479
|
const jsxTree = generateJsxTree(node);
|
|
465
480
|
if (!jsxTree) {
|
|
466
481
|
return undefined;
|
|
@@ -18632,8 +18647,8 @@ const FIGMA_VARIABLES = {
|
|
|
18632
18647
|
}
|
|
18633
18648
|
};
|
|
18634
18649
|
|
|
18635
|
-
const
|
|
18636
|
-
"name": "
|
|
18650
|
+
const privateTemplateAttachmentField = {
|
|
18651
|
+
"name": "privateTemplateAttachmentField",
|
|
18637
18652
|
"key": "5ba20e248e9cd0292fc285488b2ed3b3145d37b0",
|
|
18638
18653
|
"componentPropertyDefinitions": {
|
|
18639
18654
|
"Show Header#40606:8": {
|
|
@@ -20638,11 +20653,11 @@ const componentBottomSheet = {
|
|
|
20638
20653
|
"Header Layout": {
|
|
20639
20654
|
"type": "VARIANT",
|
|
20640
20655
|
"variantOptions": [
|
|
20656
|
+
"Top Left",
|
|
20657
|
+
"Top Center",
|
|
20641
20658
|
"Bottom Left",
|
|
20642
|
-
"None",
|
|
20643
20659
|
"Bottom Center",
|
|
20644
|
-
"
|
|
20645
|
-
"Top Left"
|
|
20660
|
+
"None"
|
|
20646
20661
|
]
|
|
20647
20662
|
}
|
|
20648
20663
|
}
|
|
@@ -21190,7 +21205,7 @@ const componentImageFrame = {
|
|
|
21190
21205
|
"80",
|
|
21191
21206
|
"96",
|
|
21192
21207
|
"120",
|
|
21193
|
-
"
|
|
21208
|
+
"Free"
|
|
21194
21209
|
]
|
|
21195
21210
|
},
|
|
21196
21211
|
"Rounded": {
|
|
@@ -22049,8 +22064,7 @@ const componentSwitch = {
|
|
|
22049
22064
|
"type": "VARIANT",
|
|
22050
22065
|
"variantOptions": [
|
|
22051
22066
|
"Label Last",
|
|
22052
|
-
"Label First"
|
|
22053
|
-
"π«[Switch Mark μ¬μ©] Switch Only"
|
|
22067
|
+
"Label First"
|
|
22054
22068
|
]
|
|
22055
22069
|
}
|
|
22056
22070
|
}
|
|
@@ -22863,7 +22877,7 @@ var FIGMA_COMPONENTS = {
|
|
|
22863
22877
|
privateComponentUnderlineTextInputInputReadOnly: privateComponentUnderlineTextInputInputReadOnly,
|
|
22864
22878
|
privateComponentUnderlineTextInputPrefix: privateComponentUnderlineTextInputPrefix,
|
|
22865
22879
|
privateComponentUnderlineTextInputSuffix: privateComponentUnderlineTextInputSuffix,
|
|
22866
|
-
|
|
22880
|
+
privateTemplateAttachmentField: privateTemplateAttachmentField,
|
|
22867
22881
|
privateTemplateChipGroup: privateTemplateChipGroup,
|
|
22868
22882
|
privateTemplateChipGroupField: privateTemplateChipGroupField,
|
|
22869
22883
|
privateTemplatePhoneNumberField: privateTemplatePhoneNumberField,
|
|
@@ -23040,6 +23054,12 @@ const variableService = createVariableService({
|
|
|
23040
23054
|
}
|
|
23041
23055
|
});
|
|
23042
23056
|
|
|
23057
|
+
const SKIP_COMPONENT_KEYS = new Set([
|
|
23058
|
+
componentOsBottomIndicatorFigmaOnly.key,
|
|
23059
|
+
componentOsKeyboardFigmaOnly.key,
|
|
23060
|
+
componentOsStatusBarFigmaOnly.key
|
|
23061
|
+
]);
|
|
23062
|
+
|
|
23043
23063
|
function createFrameTransformer({ propsConverters }) {
|
|
23044
23064
|
return defineElementTransformer((node, traverse)=>{
|
|
23045
23065
|
const children = node.children;
|
|
@@ -23362,7 +23382,8 @@ function createPipeline(options = {}) {
|
|
|
23362
23382
|
instanceTransformer,
|
|
23363
23383
|
vectorTransformer,
|
|
23364
23384
|
booleanOperationTransformer,
|
|
23365
|
-
shouldInferAutoLayout
|
|
23385
|
+
shouldInferAutoLayout,
|
|
23386
|
+
skipComponentKeys: SKIP_COMPONENT_KEYS
|
|
23366
23387
|
});
|
|
23367
23388
|
return codegenTransformer;
|
|
23368
23389
|
}
|
|
@@ -436,11 +436,20 @@ function applyInferredLayout(parentNode, result) {
|
|
|
436
436
|
};
|
|
437
437
|
}
|
|
438
438
|
|
|
439
|
-
function createCodeGenerator({ frameTransformer, textTransformer, rectangleTransformer, instanceTransformer, vectorTransformer, booleanOperationTransformer, shouldInferAutoLayout }) {
|
|
439
|
+
function createCodeGenerator({ frameTransformer, textTransformer, rectangleTransformer, instanceTransformer, vectorTransformer, booleanOperationTransformer, shouldInferAutoLayout, skipComponentKeys }) {
|
|
440
|
+
function isSkippedInstance(node) {
|
|
441
|
+
if (!skipComponentKeys || skipComponentKeys.size === 0) return false;
|
|
442
|
+
if (node.type !== "INSTANCE") return false;
|
|
443
|
+
const { componentKey, componentSetKey } = node;
|
|
444
|
+
return skipComponentKeys.has(componentKey) || !!componentSetKey && skipComponentKeys.has(componentSetKey);
|
|
445
|
+
}
|
|
440
446
|
function traverse(node) {
|
|
441
447
|
if ("visible" in node && !node.visible) {
|
|
442
448
|
return;
|
|
443
449
|
}
|
|
450
|
+
if (isSkippedInstance(node)) {
|
|
451
|
+
return;
|
|
452
|
+
}
|
|
444
453
|
const result = tsPattern.match(node).with({
|
|
445
454
|
type: "FRAME"
|
|
446
455
|
}, (node)=>shouldInferAutoLayout ? frameTransformer(applyInferredLayout(node, inferLayout(node)), traverse) : frameTransformer(node, traverse)).with({
|
|
@@ -468,6 +477,12 @@ function createCodeGenerator({ frameTransformer, textTransformer, rectangleTrans
|
|
|
468
477
|
return traverse(node);
|
|
469
478
|
}
|
|
470
479
|
function generateCode(node, options) {
|
|
480
|
+
if (isSkippedInstance(node)) {
|
|
481
|
+
return {
|
|
482
|
+
imports: "",
|
|
483
|
+
jsx: "// This component is intentionally excluded from codegen"
|
|
484
|
+
};
|
|
485
|
+
}
|
|
471
486
|
const jsxTree = generateJsxTree(node);
|
|
472
487
|
if (!jsxTree) {
|
|
473
488
|
return undefined;
|
|
@@ -5296,8 +5311,8 @@ var archivedHandlers = {
|
|
|
5296
5311
|
createToggleButtonHandler: createToggleButtonHandler$1
|
|
5297
5312
|
};
|
|
5298
5313
|
|
|
5299
|
-
const
|
|
5300
|
-
"name": "
|
|
5314
|
+
const privateTemplateAttachmentField = {
|
|
5315
|
+
"name": "privateTemplateAttachmentField",
|
|
5301
5316
|
"key": "5ba20e248e9cd0292fc285488b2ed3b3145d37b0",
|
|
5302
5317
|
"componentPropertyDefinitions": {
|
|
5303
5318
|
"Show Header#40606:8": {
|
|
@@ -7302,11 +7317,11 @@ const componentBottomSheet = {
|
|
|
7302
7317
|
"Header Layout": {
|
|
7303
7318
|
"type": "VARIANT",
|
|
7304
7319
|
"variantOptions": [
|
|
7320
|
+
"Top Left",
|
|
7321
|
+
"Top Center",
|
|
7305
7322
|
"Bottom Left",
|
|
7306
|
-
"None",
|
|
7307
7323
|
"Bottom Center",
|
|
7308
|
-
"
|
|
7309
|
-
"Top Left"
|
|
7324
|
+
"None"
|
|
7310
7325
|
]
|
|
7311
7326
|
}
|
|
7312
7327
|
}
|
|
@@ -7854,7 +7869,7 @@ const componentImageFrame = {
|
|
|
7854
7869
|
"80",
|
|
7855
7870
|
"96",
|
|
7856
7871
|
"120",
|
|
7857
|
-
"
|
|
7872
|
+
"Free"
|
|
7858
7873
|
]
|
|
7859
7874
|
},
|
|
7860
7875
|
"Rounded": {
|
|
@@ -8713,8 +8728,7 @@ const componentSwitch = {
|
|
|
8713
8728
|
"type": "VARIANT",
|
|
8714
8729
|
"variantOptions": [
|
|
8715
8730
|
"Label Last",
|
|
8716
|
-
"Label First"
|
|
8717
|
-
"π«[Switch Mark μ¬μ©] Switch Only"
|
|
8731
|
+
"Label First"
|
|
8718
8732
|
]
|
|
8719
8733
|
}
|
|
8720
8734
|
}
|
|
@@ -9527,7 +9541,7 @@ var FIGMA_COMPONENTS = {
|
|
|
9527
9541
|
privateComponentUnderlineTextInputInputReadOnly: privateComponentUnderlineTextInputInputReadOnly,
|
|
9528
9542
|
privateComponentUnderlineTextInputPrefix: privateComponentUnderlineTextInputPrefix,
|
|
9529
9543
|
privateComponentUnderlineTextInputSuffix: privateComponentUnderlineTextInputSuffix,
|
|
9530
|
-
|
|
9544
|
+
privateTemplateAttachmentField: privateTemplateAttachmentField,
|
|
9531
9545
|
privateTemplateChipGroup: privateTemplateChipGroup,
|
|
9532
9546
|
privateTemplateChipGroupField: privateTemplateChipGroupField,
|
|
9533
9547
|
privateTemplatePhoneNumberField: privateTemplatePhoneNumberField,
|
|
@@ -9551,7 +9565,7 @@ var FIGMA_COMPONENTS = {
|
|
|
9551
9565
|
};
|
|
9552
9566
|
|
|
9553
9567
|
const { createLocalSnippetElement: createLocalSnippetElement$A } = createLocalSnippetHelper("action-button");
|
|
9554
|
-
const createActionButtonHandler = (ctx)=>defineComponentHandler(componentActionButton.key, ({ componentProperties: props })=>{
|
|
9568
|
+
const createActionButtonHandler = (ctx)=>defineComponentHandler(componentActionButton.key, ({ componentProperties: props, layoutGrow })=>{
|
|
9555
9569
|
const states = props.State.value.split("-");
|
|
9556
9570
|
const { layout, children } = tsPattern.match(props.Layout.value).with("Icon Only", ()=>({
|
|
9557
9571
|
layout: "iconOnly",
|
|
@@ -9589,7 +9603,10 @@ const createActionButtonHandler = (ctx)=>defineComponentHandler(componentActionB
|
|
|
9589
9603
|
},
|
|
9590
9604
|
size: handleSizeProp(props.Size.value),
|
|
9591
9605
|
variant: changeCase.camelCase(props.Variant.value),
|
|
9592
|
-
layout
|
|
9606
|
+
layout,
|
|
9607
|
+
...layoutGrow === 1 && {
|
|
9608
|
+
flexGrow: true
|
|
9609
|
+
}
|
|
9593
9610
|
};
|
|
9594
9611
|
return createLocalSnippetElement$A("ActionButton", commonProps, children);
|
|
9595
9612
|
});
|
|
@@ -9646,6 +9663,9 @@ const createActionButtonGhostHandler = (ctx)=>defineComponentHandler(componentAc
|
|
|
9646
9663
|
...props.Bleed.value === "true" && {
|
|
9647
9664
|
bleedX: "asPadding",
|
|
9648
9665
|
bleedY: "asPadding"
|
|
9666
|
+
},
|
|
9667
|
+
...node.layoutGrow === 1 && {
|
|
9668
|
+
flexGrow: true
|
|
9649
9669
|
}
|
|
9650
9670
|
};
|
|
9651
9671
|
return createLocalSnippetElement$A("ActionButton", commonProps, children);
|
|
@@ -9734,6 +9754,13 @@ const privateComponentTopNavigationLeftIconButton = {
|
|
|
9734
9754
|
"key": "c3e708bab11d8ea90a909b4539b6ba6b2a4e7b9c"};
|
|
9735
9755
|
const componentChipSuffixIcon = {
|
|
9736
9756
|
"key": "2f79e3c5a78315c854d7bd4499d142cfcc94548f"};
|
|
9757
|
+
const componentImageFrameBadge = {
|
|
9758
|
+
"key": "6a1feb47139040d6f7522528f7c91bf4fe7bcc84"
|
|
9759
|
+
};
|
|
9760
|
+
const componentImageFrameIcon = {
|
|
9761
|
+
"key": "4f495448eeda5d10f41e6195e16b4eff49aaec17"};
|
|
9762
|
+
const componentImageFrameOverlayIndicator = {
|
|
9763
|
+
"key": "e3e3596f8c535facae4d23c21bc1d62dd721fe23"};
|
|
9737
9764
|
const componentListItemPrefixAvatar = {
|
|
9738
9765
|
"key": "27e33754113178be97e07195528c4ea020b3d3b7"
|
|
9739
9766
|
};
|
|
@@ -9870,6 +9897,19 @@ const createAppBarHandler = (ctx)=>{
|
|
|
9870
9897
|
});
|
|
9871
9898
|
});
|
|
9872
9899
|
};
|
|
9900
|
+
const createAppBarPresetHandler = (ctx)=>{
|
|
9901
|
+
const appBarHandler = createAppBarHandler(ctx);
|
|
9902
|
+
return defineComponentHandler(templateTopNavigationPreset.key, (node, traverse)=>{
|
|
9903
|
+
const [appBarNode] = findAllInstances({
|
|
9904
|
+
node,
|
|
9905
|
+
key: componentTopNavigation.key
|
|
9906
|
+
});
|
|
9907
|
+
if (!appBarNode) {
|
|
9908
|
+
return createLocalSnippetElement$y("AppBar");
|
|
9909
|
+
}
|
|
9910
|
+
return appBarHandler.transform(appBarNode, traverse);
|
|
9911
|
+
});
|
|
9912
|
+
};
|
|
9873
9913
|
|
|
9874
9914
|
// hardcoded since this lives in a different figma file
|
|
9875
9915
|
const IDENTITY_PLACEHOLDER_KEY = "b3563b6f16ba4cfe4240c9b33eef7edad4c304eb";
|
|
@@ -10478,6 +10518,99 @@ const createHelpBubbleHandler = (_ctx)=>defineComponentHandler(componentHelpBubb
|
|
|
10478
10518
|
});
|
|
10479
10519
|
});
|
|
10480
10520
|
|
|
10521
|
+
const CORNER_CONFIGS = [
|
|
10522
|
+
{
|
|
10523
|
+
showKey: "γ΄ Left Top#58686:165",
|
|
10524
|
+
placement: "top-start"
|
|
10525
|
+
},
|
|
10526
|
+
{
|
|
10527
|
+
showKey: "γ΄ Right Top#58686:198",
|
|
10528
|
+
placement: "top-end"
|
|
10529
|
+
},
|
|
10530
|
+
{
|
|
10531
|
+
showKey: "γ΄ Left Bottom#58686:231",
|
|
10532
|
+
placement: "bottom-start"
|
|
10533
|
+
},
|
|
10534
|
+
{
|
|
10535
|
+
showKey: "γ΄ Right Bottom#58686:264",
|
|
10536
|
+
placement: "bottom-end"
|
|
10537
|
+
}
|
|
10538
|
+
];
|
|
10539
|
+
function formatRatio(ratioStr) {
|
|
10540
|
+
const [w, h] = ratioStr.split(":");
|
|
10541
|
+
return `${w} / ${h}`;
|
|
10542
|
+
}
|
|
10543
|
+
const createImageFrameBadgeHandler = (ctx)=>{
|
|
10544
|
+
const badgeHandler = createBadgeHandler();
|
|
10545
|
+
return defineComponentHandler(componentImageFrameBadge.key, (node, traverse)=>{
|
|
10546
|
+
const [badge] = findAllInstances({
|
|
10547
|
+
node,
|
|
10548
|
+
key: badgeHandler.key
|
|
10549
|
+
});
|
|
10550
|
+
if (!badge) throw new Error("Badge component not found within ImageFrameBadge");
|
|
10551
|
+
return {
|
|
10552
|
+
...badgeHandler.transform(badge, traverse),
|
|
10553
|
+
tag: "ImageFrameBadge"
|
|
10554
|
+
};
|
|
10555
|
+
});
|
|
10556
|
+
};
|
|
10557
|
+
const createImageFrameReactionButtonHandler = (_ctx)=>{
|
|
10558
|
+
return defineComponentHandler(componentImageFrameReactionButton.key, ({ componentProperties: props })=>{
|
|
10559
|
+
return createSeedReactElement("ImageFrameReactionButton", {
|
|
10560
|
+
...props.Selected.value === "True" && {
|
|
10561
|
+
defaultPressed: true
|
|
10562
|
+
}
|
|
10563
|
+
});
|
|
10564
|
+
});
|
|
10565
|
+
};
|
|
10566
|
+
const createImageFrameOverlayIndicatorHandler = (_ctx)=>{
|
|
10567
|
+
return defineComponentHandler(componentImageFrameOverlayIndicator.key, ({ componentProperties: props })=>{
|
|
10568
|
+
return createSeedReactElement("ImageFrameIndicator", undefined, props["Text#58708:0"].value);
|
|
10569
|
+
});
|
|
10570
|
+
};
|
|
10571
|
+
const createImageFrameIconHandler = (ctx)=>{
|
|
10572
|
+
return defineComponentHandler(componentImageFrameIcon.key, ({ componentProperties: props })=>{
|
|
10573
|
+
return createSeedReactElement("ImageFrameIcon", {
|
|
10574
|
+
svg: ctx.iconHandler.transform(props["Icon#58686:297"])
|
|
10575
|
+
});
|
|
10576
|
+
});
|
|
10577
|
+
};
|
|
10578
|
+
const createImageFrameHandler = (ctx)=>{
|
|
10579
|
+
return defineComponentHandler(componentImageFrame.key, (node, traverse)=>{
|
|
10580
|
+
const props = node.componentProperties;
|
|
10581
|
+
const floaters = [];
|
|
10582
|
+
for (const { showKey, placement } of CORNER_CONFIGS){
|
|
10583
|
+
if (!props[showKey].value) continue;
|
|
10584
|
+
const slotName = showKey.split("#")[0];
|
|
10585
|
+
const slotNode = findOne(node, (n)=>"name" in n && n.name === slotName);
|
|
10586
|
+
if (!slotNode) continue;
|
|
10587
|
+
const child = traverse(slotNode);
|
|
10588
|
+
if (!child) continue;
|
|
10589
|
+
floaters.push(createSeedReactElement("ImageFrameFloater", {
|
|
10590
|
+
placement
|
|
10591
|
+
}, child));
|
|
10592
|
+
}
|
|
10593
|
+
const commonProps = {
|
|
10594
|
+
src: `https://placehold.co/${node.absoluteBoundingBox?.width ?? 100}x${node.absoluteBoundingBox?.height ?? 100}`,
|
|
10595
|
+
alt: "",
|
|
10596
|
+
ratio: formatRatio(props.Ratio.value),
|
|
10597
|
+
...props.Rounded.value === "True" && {
|
|
10598
|
+
borderRadius: ctx.valueResolver.getFormattedValue.topLeftRadius(node)
|
|
10599
|
+
},
|
|
10600
|
+
...node.layoutGrow === 1 ? {
|
|
10601
|
+
flexGrow: true
|
|
10602
|
+
} : node.layoutAlign === "STRETCH" ? {
|
|
10603
|
+
alignSelf: "stretch"
|
|
10604
|
+
} : {
|
|
10605
|
+
width: ctx.valueResolver.getFormattedValue.width(node)
|
|
10606
|
+
}
|
|
10607
|
+
};
|
|
10608
|
+
return createSeedReactElement("ImageFrame", commonProps, props["Show Overlay#58686:33"].value && floaters.length > 0 ? floaters : undefined, {
|
|
10609
|
+
comment: "alt ν
μ€νΈλ₯Ό μ 곡ν΄μΌ ν©λλ€."
|
|
10610
|
+
});
|
|
10611
|
+
});
|
|
10612
|
+
};
|
|
10613
|
+
|
|
10481
10614
|
const { createLocalSnippetElement: createLocalSnippetElement$l } = createLocalSnippetHelper("select-box");
|
|
10482
10615
|
const createLegacySelectBoxHandler = (_ctx)=>defineComponentHandler(componentDeprecatedSelectBox.key, ({ componentProperties: props })=>{
|
|
10483
10616
|
const tag = tsPattern.match(props.Control.value).with("Checkbox", ()=>"CheckSelectBox").with("Radio", ()=>"RadioSelectBoxItem").exhaustive();
|
|
@@ -11459,9 +11592,6 @@ const createSwitchHandler = (_ctx)=>defineComponentHandler(componentSwitch.key,
|
|
|
11459
11592
|
tone,
|
|
11460
11593
|
size: props.Size.value
|
|
11461
11594
|
};
|
|
11462
|
-
if (props["Layout(Figma Only)"].value === "π«[Switch Mark μ¬μ©] Switch Only") {
|
|
11463
|
-
return createLocalSnippetElement$4("Switchmark", commonProps);
|
|
11464
|
-
}
|
|
11465
11595
|
return createLocalSnippetElement$4("Switch", {
|
|
11466
11596
|
...commonProps,
|
|
11467
11597
|
label: props["Label#36578:0"].value,
|
|
@@ -11939,6 +12069,7 @@ var currentHandlers = {
|
|
|
11939
12069
|
createAddressFieldHandler: createAddressFieldHandler,
|
|
11940
12070
|
createAlertDialogHandler: createAlertDialogHandler,
|
|
11941
12071
|
createAppBarHandler: createAppBarHandler,
|
|
12072
|
+
createAppBarPresetHandler: createAppBarPresetHandler,
|
|
11942
12073
|
createAvatarHandler: createAvatarHandler,
|
|
11943
12074
|
createAvatarStackHandler: createAvatarStackHandler,
|
|
11944
12075
|
createBadgeHandler: createBadgeHandler,
|
|
@@ -11955,6 +12086,11 @@ var currentHandlers = {
|
|
|
11955
12086
|
createFloatingActionButtonHandler: createFloatingActionButtonHandler,
|
|
11956
12087
|
createHelpBubbleHandler: createHelpBubbleHandler,
|
|
11957
12088
|
createIdentityPlaceholderHandler: createIdentityPlaceholderHandler,
|
|
12089
|
+
createImageFrameBadgeHandler: createImageFrameBadgeHandler,
|
|
12090
|
+
createImageFrameHandler: createImageFrameHandler,
|
|
12091
|
+
createImageFrameIconHandler: createImageFrameIconHandler,
|
|
12092
|
+
createImageFrameOverlayIndicatorHandler: createImageFrameOverlayIndicatorHandler,
|
|
12093
|
+
createImageFrameReactionButtonHandler: createImageFrameReactionButtonHandler,
|
|
11958
12094
|
createLegacyMultilineTextFieldHandler: createLegacyMultilineTextFieldHandler,
|
|
11959
12095
|
createLegacySelectBoxGroupHandler: createLegacySelectBoxGroupHandler,
|
|
11960
12096
|
createLegacyTextFieldHandler: createLegacyTextFieldHandler,
|
|
@@ -31501,6 +31637,12 @@ const iconService = createIconService({
|
|
|
31501
31637
|
iconRepository
|
|
31502
31638
|
});
|
|
31503
31639
|
|
|
31640
|
+
const SKIP_COMPONENT_KEYS = new Set([
|
|
31641
|
+
componentOsBottomIndicatorFigmaOnly.key,
|
|
31642
|
+
componentOsKeyboardFigmaOnly.key,
|
|
31643
|
+
componentOsStatusBarFigmaOnly.key
|
|
31644
|
+
]);
|
|
31645
|
+
|
|
31504
31646
|
const defaultIconNameFormatter = ({ name, weight })=>changeCase.pascalCase(`${name}${weight ? weight : ""}`);
|
|
31505
31647
|
function createIconHandler({ iconService, iconNameFormatter = defaultIconNameFormatter }) {
|
|
31506
31648
|
function isIconInstance(node) {
|
|
@@ -31667,7 +31809,8 @@ function createPipeline(options = {}) {
|
|
|
31667
31809
|
instanceTransformer,
|
|
31668
31810
|
vectorTransformer,
|
|
31669
31811
|
booleanOperationTransformer,
|
|
31670
|
-
shouldInferAutoLayout
|
|
31812
|
+
shouldInferAutoLayout,
|
|
31813
|
+
skipComponentKeys: SKIP_COMPONENT_KEYS
|
|
31671
31814
|
});
|
|
31672
31815
|
return codeGenerator;
|
|
31673
31816
|
}
|