@seed-design/figma 0.1.8 β 0.1.9
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 +19 -6
- package/lib/codegen/index.d.ts +27 -7
- package/lib/codegen/index.d.ts.map +1 -1
- package/lib/codegen/index.js +19 -6
- package/lib/codegen/targets/react/index.cjs +74 -48
- package/lib/codegen/targets/react/index.d.ts +2 -2
- package/lib/codegen/targets/react/index.d.ts.map +1 -1
- package/lib/codegen/targets/react/index.js +74 -48
- package/lib/index.cjs +19 -6
- package/lib/index.js +19 -6
- package/package.json +2 -2
- package/src/codegen/component-properties.ts +8 -0
- package/src/codegen/targets/react/component/handlers/chip.ts +34 -12
- package/src/codegen/targets/react/component/handlers/identity-placeholder.ts +4 -2
- package/src/codegen/targets/react/component/handlers/manner-temp.ts +1 -1
- package/src/codegen/targets/react/component/handlers/progress-circle.ts +1 -1
- package/src/codegen/targets/react/component/handlers/select-box.ts +4 -4
- package/src/codegen/targets/react/component/handlers/switch.ts +2 -7
- package/src/codegen/targets/react/props.ts +5 -5
- package/src/entities/data/__generated__/component-sets/chip.d.ts +4 -0
- package/src/entities/data/__generated__/component-sets/chip.mjs +4 -0
- package/src/entities/data/__generated__/component-sets/progress-circle.d.ts +1 -1
- package/src/entities/data/__generated__/component-sets/progress-circle.mjs +1 -1
- package/src/entities/data/__generated__/component-sets/switch.d.ts +14 -5
- package/src/entities/data/__generated__/component-sets/switch.mjs +14 -5
package/lib/codegen/index.js
CHANGED
|
@@ -8246,6 +8246,10 @@ const metadata$t = {
|
|
|
8246
8246
|
{
|
|
8247
8247
|
"type": "COMPONENT_SET",
|
|
8248
8248
|
"key": "df43b92004c850e7c6d2869e7a4ba1ef9a2d7db6"
|
|
8249
|
+
},
|
|
8250
|
+
{
|
|
8251
|
+
"type": "COMPONENT_SET",
|
|
8252
|
+
"key": "19923052d4152393ecdc6e2f5853ea0359849127"
|
|
8249
8253
|
}
|
|
8250
8254
|
]
|
|
8251
8255
|
},
|
|
@@ -8659,7 +8663,7 @@ const metadata$g = {
|
|
|
8659
8663
|
"Neutral",
|
|
8660
8664
|
"Brand",
|
|
8661
8665
|
"Static White",
|
|
8662
|
-
"Custom"
|
|
8666
|
+
"Custom(inherit)"
|
|
8663
8667
|
]
|
|
8664
8668
|
},
|
|
8665
8669
|
"Value": {
|
|
@@ -8985,26 +8989,35 @@ const metadata$5 = {
|
|
|
8985
8989
|
|
|
8986
8990
|
const metadata$4 = {
|
|
8987
8991
|
"name": "π’ Switch",
|
|
8988
|
-
"key": "
|
|
8992
|
+
"key": "65e0e7ba1a0c13b42e5fd0ceb17d5f756128dd6b",
|
|
8989
8993
|
"componentPropertyDefinitions": {
|
|
8990
|
-
"Label#
|
|
8994
|
+
"Label#36578:0": {
|
|
8991
8995
|
"type": "TEXT"
|
|
8992
8996
|
},
|
|
8993
8997
|
"Size": {
|
|
8994
8998
|
"type": "VARIANT",
|
|
8995
8999
|
"variantOptions": [
|
|
8996
|
-
"
|
|
8997
|
-
"
|
|
9000
|
+
"16",
|
|
9001
|
+
"24",
|
|
9002
|
+
"32"
|
|
8998
9003
|
]
|
|
8999
9004
|
},
|
|
9000
9005
|
"State": {
|
|
9001
9006
|
"type": "VARIANT",
|
|
9002
9007
|
"variantOptions": [
|
|
9003
9008
|
"Enabled",
|
|
9004
|
-
"Selected",
|
|
9005
9009
|
"Disabled",
|
|
9010
|
+
"Selected",
|
|
9006
9011
|
"Selected-Disabled"
|
|
9007
9012
|
]
|
|
9013
|
+
},
|
|
9014
|
+
"Label Layout(Figma Only)": {
|
|
9015
|
+
"type": "VARIANT",
|
|
9016
|
+
"variantOptions": [
|
|
9017
|
+
"None",
|
|
9018
|
+
"Right",
|
|
9019
|
+
"Left"
|
|
9020
|
+
]
|
|
9008
9021
|
}
|
|
9009
9022
|
}
|
|
9010
9023
|
};
|
|
@@ -745,7 +745,7 @@ function createContainerLayoutPropsConverter(valueResolver) {
|
|
|
745
745
|
function createSelfLayoutPropsConverter(valueResolver) {
|
|
746
746
|
return createPropsConverter({
|
|
747
747
|
handlers: {
|
|
748
|
-
|
|
748
|
+
flexGrow: ({ layoutGrow })=>layoutGrow === 1 ? true : layoutGrow,
|
|
749
749
|
alignSelf: ({ layoutAlign })=>tsPattern.match(layoutAlign).with("STRETCH", ()=>"stretch").with("INHERIT", ()=>undefined).with("MIN", ()=>undefined) // Deprecated in Figma
|
|
750
750
|
.with("CENTER", ()=>undefined) // Deprecated in Figma
|
|
751
751
|
.with("MAX", ()=>undefined) // Deprecated in Figma
|
|
@@ -758,7 +758,7 @@ function createSelfLayoutPropsConverter(valueResolver) {
|
|
|
758
758
|
maxWidth: (node)=>node.layoutSizingHorizontal === "HUG" ? valueResolver.getFormattedValue.maxWidth(node) : undefined
|
|
759
759
|
},
|
|
760
760
|
defaults: {
|
|
761
|
-
|
|
761
|
+
flexGrow: 0
|
|
762
762
|
}
|
|
763
763
|
});
|
|
764
764
|
}
|
|
@@ -865,7 +865,7 @@ function createVectorChildrenFillPropsConverter(valueResolver) {
|
|
|
865
865
|
function createStrokePropsConverter(valueResolver) {
|
|
866
866
|
return definePropsConverter((node)=>{
|
|
867
867
|
const borderColor = valueResolver.getFormattedValue.stroke(node);
|
|
868
|
-
const borderWidth = borderColor ? node.strokeWeight : undefined;
|
|
868
|
+
const borderWidth = borderColor && node.strokeWeight ? `${node.strokeWeight}` : undefined;
|
|
869
869
|
return {
|
|
870
870
|
borderColor,
|
|
871
871
|
borderWidth
|
|
@@ -1628,6 +1628,10 @@ const metadata$t = {
|
|
|
1628
1628
|
{
|
|
1629
1629
|
"type": "COMPONENT_SET",
|
|
1630
1630
|
"key": "df43b92004c850e7c6d2869e7a4ba1ef9a2d7db6"
|
|
1631
|
+
},
|
|
1632
|
+
{
|
|
1633
|
+
"type": "COMPONENT_SET",
|
|
1634
|
+
"key": "19923052d4152393ecdc6e2f5853ea0359849127"
|
|
1631
1635
|
}
|
|
1632
1636
|
]
|
|
1633
1637
|
},
|
|
@@ -2041,7 +2045,7 @@ const metadata$g = {
|
|
|
2041
2045
|
"Neutral",
|
|
2042
2046
|
"Brand",
|
|
2043
2047
|
"Static White",
|
|
2044
|
-
"Custom"
|
|
2048
|
+
"Custom(inherit)"
|
|
2045
2049
|
]
|
|
2046
2050
|
},
|
|
2047
2051
|
"Value": {
|
|
@@ -2367,26 +2371,35 @@ const metadata$5 = {
|
|
|
2367
2371
|
|
|
2368
2372
|
const metadata$4 = {
|
|
2369
2373
|
"name": "π’ Switch",
|
|
2370
|
-
"key": "
|
|
2374
|
+
"key": "65e0e7ba1a0c13b42e5fd0ceb17d5f756128dd6b",
|
|
2371
2375
|
"componentPropertyDefinitions": {
|
|
2372
|
-
"Label#
|
|
2376
|
+
"Label#36578:0": {
|
|
2373
2377
|
"type": "TEXT"
|
|
2374
2378
|
},
|
|
2375
2379
|
"Size": {
|
|
2376
2380
|
"type": "VARIANT",
|
|
2377
2381
|
"variantOptions": [
|
|
2378
|
-
"
|
|
2379
|
-
"
|
|
2382
|
+
"16",
|
|
2383
|
+
"24",
|
|
2384
|
+
"32"
|
|
2380
2385
|
]
|
|
2381
2386
|
},
|
|
2382
2387
|
"State": {
|
|
2383
2388
|
"type": "VARIANT",
|
|
2384
2389
|
"variantOptions": [
|
|
2385
2390
|
"Enabled",
|
|
2386
|
-
"Selected",
|
|
2387
2391
|
"Disabled",
|
|
2392
|
+
"Selected",
|
|
2388
2393
|
"Selected-Disabled"
|
|
2389
2394
|
]
|
|
2395
|
+
},
|
|
2396
|
+
"Label Layout(Figma Only)": {
|
|
2397
|
+
"type": "VARIANT",
|
|
2398
|
+
"variantOptions": [
|
|
2399
|
+
"None",
|
|
2400
|
+
"Right",
|
|
2401
|
+
"Left"
|
|
2402
|
+
]
|
|
2390
2403
|
}
|
|
2391
2404
|
}
|
|
2392
2405
|
};
|
|
@@ -2668,7 +2681,7 @@ function handleSizeProp(size) {
|
|
|
2668
2681
|
}
|
|
2669
2682
|
}
|
|
2670
2683
|
|
|
2671
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
2684
|
+
const { createLocalSnippetElement: createLocalSnippetElement$q } = createLocalSnippetHelper("action-button");
|
|
2672
2685
|
const createActionButtonHandler = (ctx)=>defineComponentHandler(metadata$E.key, ({ componentProperties: props })=>{
|
|
2673
2686
|
const states = props.State.value.split("-");
|
|
2674
2687
|
const { layout, children } = tsPattern.match(props.Layout.value).with("Icon Only", ()=>({
|
|
@@ -2709,7 +2722,7 @@ const createActionButtonHandler = (ctx)=>defineComponentHandler(metadata$E.key,
|
|
|
2709
2722
|
variant: changeCase.camelCase(props.Variant.value),
|
|
2710
2723
|
layout
|
|
2711
2724
|
};
|
|
2712
|
-
return createLocalSnippetElement$
|
|
2725
|
+
return createLocalSnippetElement$q("ActionButton", commonProps, children);
|
|
2713
2726
|
});
|
|
2714
2727
|
const ACTION_BUTTON_GHOST_BUTTON_KEY = "ea69291fb4d76217419f3d9613ae16aadafb56a5";
|
|
2715
2728
|
const createActionButtonGhostHandler = (ctx)=>defineComponentHandler(ACTION_BUTTON_GHOST_BUTTON_KEY, ({ componentProperties: props })=>{
|
|
@@ -2756,26 +2769,26 @@ const createActionButtonGhostHandler = (ctx)=>defineComponentHandler(ACTION_BUTT
|
|
|
2756
2769
|
bleedY: "asPadding"
|
|
2757
2770
|
}
|
|
2758
2771
|
};
|
|
2759
|
-
return createLocalSnippetElement$
|
|
2772
|
+
return createLocalSnippetElement$q("ActionButton", commonProps, children);
|
|
2760
2773
|
});
|
|
2761
2774
|
|
|
2762
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
2775
|
+
const { createLocalSnippetElement: createLocalSnippetElement$p } = createLocalSnippetHelper("alert-dialog");
|
|
2763
2776
|
const { createLocalSnippetElement: createLocalSnippetElementTrigger$3 } = createLocalSnippetHelper("action-button");
|
|
2764
2777
|
const ALERT_DIALOG_FOOTER_KEY = "00b1b131d67edf2875a7a1df8dfa88098d7c04be";
|
|
2765
2778
|
const createAlertDialogHandler = (_ctx)=>defineComponentHandler(metadata$D.key, (node, traverse)=>{
|
|
2766
2779
|
const props = node.componentProperties;
|
|
2767
|
-
const alertDialogHeader = createLocalSnippetElement$
|
|
2780
|
+
const alertDialogHeader = createLocalSnippetElement$p("AlertDialogHeader", undefined, [
|
|
2768
2781
|
...props["Show Title#20361:14"].value ? [
|
|
2769
|
-
createLocalSnippetElement$
|
|
2782
|
+
createLocalSnippetElement$p("AlertDialogTitle", undefined, props["Title Text#20361:0"].value)
|
|
2770
2783
|
] : [],
|
|
2771
|
-
createLocalSnippetElement$
|
|
2784
|
+
createLocalSnippetElement$p("AlertDialogDescription", undefined, props["Description Text#20361:7"].value)
|
|
2772
2785
|
]);
|
|
2773
2786
|
const footerNodes = findAllInstances({
|
|
2774
2787
|
node,
|
|
2775
2788
|
key: ALERT_DIALOG_FOOTER_KEY
|
|
2776
2789
|
});
|
|
2777
2790
|
if (footerNodes.length === 0 || footerNodes.length > 1) {
|
|
2778
|
-
return createLocalSnippetElement$
|
|
2791
|
+
return createLocalSnippetElement$p("AlertDialog", undefined, alertDialogHeader, {
|
|
2779
2792
|
comment: "Footer μμμ νμΈν΄μ£ΌμΈμ."
|
|
2780
2793
|
});
|
|
2781
2794
|
}
|
|
@@ -2783,21 +2796,21 @@ const createAlertDialogHandler = (_ctx)=>defineComponentHandler(metadata$D.key,
|
|
|
2783
2796
|
const footerNodeProps = traverse(footerNode)?.props;
|
|
2784
2797
|
const buttons = footerNode.children.map(traverse);
|
|
2785
2798
|
const alertDialogFooterChildren = tsPattern.match(footerNode.componentProperties.Type.value).with("Single", ()=>buttons).with("Neutral", "Critical", ()=>createSeedReactElement("ResponsivePair", footerNodeProps, buttons)).with("Neutral (Overflow)", "Critical (Overflow)", "Nonpreferred", ()=>createSeedReactElement("VStack", footerNodeProps, buttons)).exhaustive();
|
|
2786
|
-
const alertDialogFooter = createLocalSnippetElement$
|
|
2787
|
-
return createLocalSnippetElement$
|
|
2799
|
+
const alertDialogFooter = createLocalSnippetElement$p("AlertDialogFooter", undefined, alertDialogFooterChildren);
|
|
2800
|
+
return createLocalSnippetElement$p("AlertDialogRoot", {
|
|
2788
2801
|
open: true
|
|
2789
2802
|
}, [
|
|
2790
|
-
createLocalSnippetElement$
|
|
2803
|
+
createLocalSnippetElement$p("AlertDialogTrigger", {
|
|
2791
2804
|
asChild: true
|
|
2792
2805
|
}, createLocalSnippetElementTrigger$3("ActionButton", {}, "AlertDialog μ΄κΈ°")),
|
|
2793
|
-
createLocalSnippetElement$
|
|
2806
|
+
createLocalSnippetElement$p("AlertDialogContent", undefined, [
|
|
2794
2807
|
alertDialogHeader,
|
|
2795
2808
|
alertDialogFooter
|
|
2796
2809
|
])
|
|
2797
2810
|
]);
|
|
2798
2811
|
});
|
|
2799
2812
|
|
|
2800
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
2813
|
+
const { createLocalSnippetElement: createLocalSnippetElement$o } = createLocalSnippetHelper("app-bar");
|
|
2801
2814
|
const APP_BAR_TITLE_KEY = "d2cc4f615b2b44098be89448ad1c573f94af0355";
|
|
2802
2815
|
const APP_BAR_LEFT_ICON_BUTTON_KEY = "5a953f7bafc0df744777517458396e9f6c915825";
|
|
2803
2816
|
const APP_BAR_RIGHT_ICON_BUTTON_KEY = "c08db793288077e53bd45ef11aa419a835e88fce";
|
|
@@ -2814,12 +2827,12 @@ const createAppBarMainHandler = (_ctx)=>{
|
|
|
2814
2827
|
subtitle: undefined
|
|
2815
2828
|
})).exhaustive();
|
|
2816
2829
|
if (title) {
|
|
2817
|
-
return createLocalSnippetElement$
|
|
2830
|
+
return createLocalSnippetElement$o("AppBarMain", {
|
|
2818
2831
|
title,
|
|
2819
2832
|
subtitle
|
|
2820
2833
|
});
|
|
2821
2834
|
}
|
|
2822
|
-
return createLocalSnippetElement$
|
|
2835
|
+
return createLocalSnippetElement$o("AppBarMain", undefined, undefined, {
|
|
2823
2836
|
comment: "AppBarMain λ΄λΆλ₯Ό μ§μ μμ±ν΄μ£ΌμΈμ."
|
|
2824
2837
|
});
|
|
2825
2838
|
});
|
|
@@ -2846,33 +2859,33 @@ const createAppBarHandler = (ctx)=>{
|
|
|
2846
2859
|
return appBarMainHandler.transform(mainNode, traverse);
|
|
2847
2860
|
})();
|
|
2848
2861
|
const leftChildren = tsPattern.match(props.Left.value).with("None", ()=>undefined).with("Back", ()=>[
|
|
2849
|
-
createLocalSnippetElement$
|
|
2862
|
+
createLocalSnippetElement$o("AppBarBackButton")
|
|
2850
2863
|
]).with("Close", ()=>[
|
|
2851
|
-
createLocalSnippetElement$
|
|
2864
|
+
createLocalSnippetElement$o("AppBarCloseButton")
|
|
2852
2865
|
]).with("Custom", ()=>{
|
|
2853
2866
|
const buttons = findAllInstances({
|
|
2854
2867
|
node,
|
|
2855
2868
|
key: APP_BAR_LEFT_ICON_BUTTON_KEY
|
|
2856
2869
|
});
|
|
2857
2870
|
if (buttons.length > 0) {
|
|
2858
|
-
return buttons.map((button)=>createLocalSnippetElement$
|
|
2871
|
+
return buttons.map((button)=>createLocalSnippetElement$o("AppBarIconButton", undefined, ctx.iconHandler.transform(button.componentProperties["Icon#33580:0"]), {
|
|
2859
2872
|
comment: "AppBarIconButtonμ aria-label μμ±μ μΆκ°ν΄μ£ΌμΈμ."
|
|
2860
2873
|
}));
|
|
2861
2874
|
}
|
|
2862
2875
|
return undefined;
|
|
2863
2876
|
}).exhaustive();
|
|
2864
|
-
const left = leftChildren && leftChildren.length > 0 ? createLocalSnippetElement$
|
|
2877
|
+
const left = leftChildren && leftChildren.length > 0 ? createLocalSnippetElement$o("AppBarLeft", {}, leftChildren) : undefined;
|
|
2865
2878
|
const rightChildren = tsPattern.match(props.Right.value).with("None", ()=>undefined).with("1 Icon Button", "2 Icon Button", "3 Icon Button", ()=>{
|
|
2866
2879
|
const buttons = findAllInstances({
|
|
2867
2880
|
node,
|
|
2868
2881
|
key: APP_BAR_RIGHT_ICON_BUTTON_KEY
|
|
2869
2882
|
});
|
|
2870
|
-
return buttons.map((button)=>createLocalSnippetElement$
|
|
2883
|
+
return buttons.map((button)=>createLocalSnippetElement$o("AppBarIconButton", undefined, ctx.iconHandler.transform(button.componentProperties["Icon#6406:3"]), {
|
|
2871
2884
|
comment: "AppBarIconButtonμ aria-label μμ±μ μΆκ°ν΄μ£ΌμΈμ."
|
|
2872
2885
|
}));
|
|
2873
2886
|
}).with("Text Button", ()=>undefined).exhaustive();
|
|
2874
|
-
const right = rightChildren && rightChildren.length > 0 ? createLocalSnippetElement$
|
|
2875
|
-
return createLocalSnippetElement$
|
|
2887
|
+
const right = rightChildren && rightChildren.length > 0 ? createLocalSnippetElement$o("AppBarRight", {}, rightChildren) : undefined;
|
|
2888
|
+
return createLocalSnippetElement$o("AppBar", {
|
|
2876
2889
|
theme,
|
|
2877
2890
|
tone
|
|
2878
2891
|
}, [
|
|
@@ -2886,11 +2899,12 @@ const createAppBarHandler = (ctx)=>{
|
|
|
2886
2899
|
};
|
|
2887
2900
|
|
|
2888
2901
|
const IDENTITY_PLACEHOLDER_KEY = "b3563b6f16ba4cfe4240c9b33eef7edad4c304eb";
|
|
2902
|
+
const { createLocalSnippetElement: createLocalSnippetElement$n } = createLocalSnippetHelper("identity-placeholder");
|
|
2889
2903
|
const createIdentityPlaceholderHandler = (_ctx)=>defineComponentHandler(IDENTITY_PLACEHOLDER_KEY, ({ componentProperties: props })=>{
|
|
2890
2904
|
const commonProps = {
|
|
2891
2905
|
identity: changeCase.camelCase(props.Identity.value)
|
|
2892
2906
|
};
|
|
2893
|
-
return
|
|
2907
|
+
return createLocalSnippetElement$n("IdentityPlaceholder", commonProps);
|
|
2894
2908
|
});
|
|
2895
2909
|
|
|
2896
2910
|
const { createLocalSnippetElement: createLocalSnippetElement$m } = createLocalSnippetHelper("avatar");
|
|
@@ -3078,12 +3092,23 @@ const createCheckboxHandler = (_ctx)=>defineComponentHandler(metadata$v.key, ({
|
|
|
3078
3092
|
});
|
|
3079
3093
|
|
|
3080
3094
|
const { createLocalSnippetElement: createLocalSnippetElement$h } = createLocalSnippetHelper("chip");
|
|
3095
|
+
const CHIP_ICON_SUFFIX_KEY = "27343e0e5ab2c66948e9b10fde03d58b5e037212";
|
|
3096
|
+
const createChipIconSuffixHandler = (ctx)=>{
|
|
3097
|
+
return defineComponentHandler(CHIP_ICON_SUFFIX_KEY, ({ componentProperties })=>{
|
|
3098
|
+
return createLocalSnippetElement$h("Chip.SuffixIcon", undefined, createSeedReactElement("Icon", {
|
|
3099
|
+
svg: ctx.iconHandler.transform(componentProperties["Icon#33203:0"])
|
|
3100
|
+
}));
|
|
3101
|
+
});
|
|
3102
|
+
};
|
|
3081
3103
|
const createChipHandler = (ctx)=>{
|
|
3082
3104
|
const avatarHandler = createAvatarHandler();
|
|
3105
|
+
const iconSuffixHandler = createChipIconSuffixHandler(ctx);
|
|
3083
3106
|
return defineComponentHandler(metadata$t.key, (node, traverse)=>{
|
|
3084
3107
|
const props = node.componentProperties;
|
|
3085
3108
|
const states = props.State.value.split("-");
|
|
3086
|
-
const prefix = tsPattern.match(props["Prefix Type"].value).with("None", "Image", ()=>undefined).with("Icon", ()=>createLocalSnippetElement$h("Chip.PrefixIcon", undefined,
|
|
3109
|
+
const prefix = tsPattern.match(props["Prefix Type"].value).with("None", "Image", ()=>undefined).with("Icon", ()=>createLocalSnippetElement$h("Chip.PrefixIcon", undefined, createSeedReactElement("Icon", {
|
|
3110
|
+
svg: ctx.iconHandler.transform(props["Prefix Icon#8722:0"])
|
|
3111
|
+
}))).with("Avatar", ()=>{
|
|
3087
3112
|
const [avatar] = findAllInstances({
|
|
3088
3113
|
node,
|
|
3089
3114
|
key: metadata$C.key
|
|
@@ -3091,7 +3116,11 @@ const createChipHandler = (ctx)=>{
|
|
|
3091
3116
|
if (!avatar) return undefined;
|
|
3092
3117
|
return createLocalSnippetElement$h("Chip.PrefixAvatar", undefined, avatarHandler.transform(avatar, traverse));
|
|
3093
3118
|
}).exhaustive();
|
|
3094
|
-
const
|
|
3119
|
+
const label = createLocalSnippetElement$h("Chip.Label", undefined, props["Label#7185:0"].value);
|
|
3120
|
+
const [suffixIcon] = findAllInstances({
|
|
3121
|
+
node,
|
|
3122
|
+
key: CHIP_ICON_SUFFIX_KEY
|
|
3123
|
+
});
|
|
3095
3124
|
const commonProps = {
|
|
3096
3125
|
variant: changeCase.camelCase(props.Variant.value),
|
|
3097
3126
|
size: handleSizeProp(props.Size.value),
|
|
@@ -3102,10 +3131,10 @@ const createChipHandler = (ctx)=>{
|
|
|
3102
3131
|
};
|
|
3103
3132
|
return createLocalSnippetElement$h("Chip.Button", commonProps, [
|
|
3104
3133
|
prefix,
|
|
3105
|
-
|
|
3106
|
-
|
|
3134
|
+
label,
|
|
3135
|
+
suffixIcon ? iconSuffixHandler.transform(suffixIcon, traverse) : undefined
|
|
3107
3136
|
], {
|
|
3108
|
-
comment: "λͺ©μ μ λ°λΌ Chip.Toggle, Chip.RadioItem
|
|
3137
|
+
comment: "λͺ©μ μ λ°λΌ Chip.Toggle, Chip.RadioItem λ±μΌλ‘ λ°κΏ μ¬μ©νμΈμ."
|
|
3109
3138
|
});
|
|
3110
3139
|
});
|
|
3111
3140
|
};
|
|
@@ -3302,7 +3331,7 @@ const createMannerTempBadgeHandler = (_ctx)=>defineComponentHandler(metadata$j.k
|
|
|
3302
3331
|
return createLocalSnippetElement$b("MannerTempBadge", commonProps);
|
|
3303
3332
|
});
|
|
3304
3333
|
|
|
3305
|
-
const { createLocalSnippetElement: createLocalSnippetElement$a } = createLocalSnippetHelper("manner-temp
|
|
3334
|
+
const { createLocalSnippetElement: createLocalSnippetElement$a } = createLocalSnippetHelper("manner-temp");
|
|
3306
3335
|
const createMannerTempHandler = (_ctx)=>defineComponentHandler(metadata$k.key, ({ children })=>{
|
|
3307
3336
|
const textNode = children.find((child)=>child.type === "TEXT");
|
|
3308
3337
|
const commonProps = {
|
|
@@ -3448,7 +3477,7 @@ const createProgressCircleHandler = (_ctx)=>defineComponentHandler(metadata$g.ke
|
|
|
3448
3477
|
minValue,
|
|
3449
3478
|
maxValue,
|
|
3450
3479
|
size: props.Size.value,
|
|
3451
|
-
...props.Tone.value !== "Custom" && {
|
|
3480
|
+
...props.Tone.value !== "Custom(inherit)" && {
|
|
3452
3481
|
tone: changeCase.camelCase(props.Tone.value)
|
|
3453
3482
|
}
|
|
3454
3483
|
};
|
|
@@ -3513,14 +3542,14 @@ const createSegmentedControlHandler = (ctx)=>{
|
|
|
3513
3542
|
|
|
3514
3543
|
const { createLocalSnippetElement: createLocalSnippetElement$4 } = createLocalSnippetHelper("select-box");
|
|
3515
3544
|
const createSelectBoxHandler = (_ctx)=>defineComponentHandler(metadata$8.key, ({ componentProperties: props })=>{
|
|
3516
|
-
const tag = tsPattern.match(props.Control.value).with("Checkbox", ()=>"CheckSelectBox").with("Radio", ()=>"
|
|
3545
|
+
const tag = tsPattern.match(props.Control.value).with("Checkbox", ()=>"CheckSelectBox").with("Radio", ()=>"RadioSelectBoxItem").exhaustive();
|
|
3517
3546
|
const states = props.State.value.split("-");
|
|
3518
3547
|
const commonProps = {
|
|
3519
3548
|
label: props["Label#3635:0"].value,
|
|
3520
3549
|
...props["Show Description#3033:0"].value && {
|
|
3521
3550
|
description: props["Description #3033:5"].value
|
|
3522
3551
|
},
|
|
3523
|
-
...tag === "
|
|
3552
|
+
...tag === "RadioSelectBoxItem" && {
|
|
3524
3553
|
value: props["Label#3635:0"].value
|
|
3525
3554
|
},
|
|
3526
3555
|
...tag === "CheckSelectBox" && states.includes("Selected") && {
|
|
@@ -3533,7 +3562,7 @@ const createSelectBoxGroupHandler = (ctx)=>{
|
|
|
3533
3562
|
const selectBoxHandler = createSelectBoxHandler();
|
|
3534
3563
|
return defineComponentHandler(metadata$G.key, (node, traverse)=>{
|
|
3535
3564
|
const props = node.componentProperties;
|
|
3536
|
-
const tag = tsPattern.match(props.Control.value).with("Checkbox", ()=>"CheckSelectBoxGroup").with("Radio", ()=>"
|
|
3565
|
+
const tag = tsPattern.match(props.Control.value).with("Checkbox", ()=>"CheckSelectBoxGroup").with("Radio", ()=>"RadioSelectBoxRoot").exhaustive();
|
|
3537
3566
|
const selectBoxes = findAllInstances({
|
|
3538
3567
|
node,
|
|
3539
3568
|
key: selectBoxHandler.key
|
|
@@ -3546,7 +3575,7 @@ const createSelectBoxGroupHandler = (ctx)=>{
|
|
|
3546
3575
|
})?.props;
|
|
3547
3576
|
const stack = createSeedReactElement("VStack", vStackProps, selectBoxes.map((box)=>selectBoxHandler.transform(box, traverse)));
|
|
3548
3577
|
const commonProps = {
|
|
3549
|
-
...tag === "
|
|
3578
|
+
...tag === "RadioSelectBoxRoot" && {
|
|
3550
3579
|
defaultValue: selectedSelectBox?.componentProperties["Label#3635:0"].value
|
|
3551
3580
|
}
|
|
3552
3581
|
};
|
|
@@ -3580,12 +3609,9 @@ const createSnackbarHandler = (_ctx)=>defineComponentHandler(metadata$5.key, ({
|
|
|
3580
3609
|
const { createLocalSnippetElement: createLocalSnippetElement$2 } = createLocalSnippetHelper("switch");
|
|
3581
3610
|
const createSwitchHandler = (_ctx)=>defineComponentHandler(metadata$4.key, ({ componentProperties: props })=>{
|
|
3582
3611
|
const states = props.State.value.split("-");
|
|
3583
|
-
const size = handleSizeProp(props.Size.value);
|
|
3584
3612
|
const commonProps = {
|
|
3585
|
-
size,
|
|
3586
|
-
|
|
3587
|
-
label: props["Label#15191:2"].value
|
|
3588
|
-
},
|
|
3613
|
+
size: props.Size.value,
|
|
3614
|
+
label: props["Label#36578:0"].value,
|
|
3589
3615
|
...states.includes("Selected") && {
|
|
3590
3616
|
defaultChecked: true
|
|
3591
3617
|
},
|
|
@@ -170,7 +170,7 @@ interface ContainerLayoutProps {
|
|
|
170
170
|
}
|
|
171
171
|
declare function createContainerLayoutPropsConverter(valueResolver: ReactValueResolver): PropsConverter<ContainerLayoutTrait, ContainerLayoutProps>;
|
|
172
172
|
interface SelfLayoutProps {
|
|
173
|
-
|
|
173
|
+
flexGrow?: 0 | 1 | true;
|
|
174
174
|
alignSelf?: "stretch";
|
|
175
175
|
width?: string | number;
|
|
176
176
|
height?: string | number;
|
|
@@ -225,7 +225,7 @@ interface VectorChildrenFillProps {
|
|
|
225
225
|
}
|
|
226
226
|
declare function createVectorChildrenFillPropsConverter(valueResolver: ReactValueResolver): PropsConverter<ContainerLayoutTrait, VectorChildrenFillProps>;
|
|
227
227
|
interface StrokeProps {
|
|
228
|
-
borderWidth?:
|
|
228
|
+
borderWidth?: string;
|
|
229
229
|
borderColor?: string;
|
|
230
230
|
}
|
|
231
231
|
declare function createStrokePropsConverter(valueResolver: ReactValueResolver): PropsConverter<StrokeTrait, StrokeProps>;
|