@seed-design/figma 1.1.17 → 1.1.18
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 +291 -58
- package/lib/codegen/index.d.ts +34 -65
- package/lib/codegen/index.d.ts.map +1 -1
- package/lib/codegen/index.js +291 -58
- package/lib/codegen/targets/react/index.cjs +389 -126
- package/lib/codegen/targets/react/index.d.ts.map +1 -1
- package/lib/codegen/targets/react/index.js +389 -126
- package/lib/index.cjs +317 -59
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +317 -59
- package/package.json +2 -2
- package/src/codegen/component-properties.ts +35 -8
- package/src/codegen/targets/react/component/handlers/{select-box.ts → legacy-select-box.ts} +23 -12
- package/src/codegen/targets/react/component/handlers/legacy-text-field.ts +4 -2
- package/src/codegen/targets/react/component/index.ts +8 -3
- package/src/entities/data/__generated__/component-sets/index.d.ts +170 -53
- package/src/entities/data/__generated__/component-sets/index.mjs +170 -53
- package/src/entities/data/__generated__/components/index.d.ts +0 -13
- package/src/entities/data/__generated__/components/index.mjs +0 -13
- package/src/entities/data/__generated__/icons/index.mjs +24 -0
- package/src/entities/data/__generated__/variable-collections/index.mjs +9 -4
- package/src/entities/data/__generated__/variables/index.mjs +111 -0
- package/src/normalizer/from-rest.ts +2 -1
|
@@ -1196,26 +1196,21 @@ const templateDisclaimer = {
|
|
|
1196
1196
|
}
|
|
1197
1197
|
}
|
|
1198
1198
|
};
|
|
1199
|
-
const
|
|
1200
|
-
"name": "
|
|
1201
|
-
"key": "
|
|
1199
|
+
const templateResultPage = {
|
|
1200
|
+
"name": "templateResultPage",
|
|
1201
|
+
"key": "4cc94782abbe7e58f0401c29ad8880a62e512ae7",
|
|
1202
1202
|
"componentPropertyDefinitions": {
|
|
1203
|
-
"
|
|
1204
|
-
"type": "
|
|
1205
|
-
"variantOptions": [
|
|
1206
|
-
"Checkbox",
|
|
1207
|
-
"Radio"
|
|
1208
|
-
]
|
|
1203
|
+
"Show Top Navigation#58717:0": {
|
|
1204
|
+
"type": "BOOLEAN"
|
|
1209
1205
|
},
|
|
1210
|
-
"
|
|
1206
|
+
"Show Bottom Action Bar#59845:0": {
|
|
1207
|
+
"type": "BOOLEAN"
|
|
1208
|
+
},
|
|
1209
|
+
"Show Bottom Action Bar": {
|
|
1211
1210
|
"type": "VARIANT",
|
|
1212
1211
|
"variantOptions": [
|
|
1213
|
-
"
|
|
1214
|
-
"
|
|
1215
|
-
"3",
|
|
1216
|
-
"4",
|
|
1217
|
-
"5",
|
|
1218
|
-
"6"
|
|
1212
|
+
"True",
|
|
1213
|
+
"False"
|
|
1219
1214
|
]
|
|
1220
1215
|
}
|
|
1221
1216
|
}
|
|
@@ -1961,6 +1956,164 @@ const helpBubble = {
|
|
|
1961
1956
|
}
|
|
1962
1957
|
}
|
|
1963
1958
|
};
|
|
1959
|
+
const imageFrame = {
|
|
1960
|
+
"name": "imageFrame",
|
|
1961
|
+
"key": "b12f0bdeb6c6a61e0d50fe7e0dfae8ecd323f0aa",
|
|
1962
|
+
"componentPropertyDefinitions": {
|
|
1963
|
+
"Has Image Contents#29729:0": {
|
|
1964
|
+
"type": "BOOLEAN"
|
|
1965
|
+
},
|
|
1966
|
+
"Left Top#58686:0": {
|
|
1967
|
+
"type": "INSTANCE_SWAP",
|
|
1968
|
+
"preferredValues": [
|
|
1969
|
+
{
|
|
1970
|
+
"type": "COMPONENT",
|
|
1971
|
+
"key": "00da9dcf0cc4e408d2e36da56d0701dce6cee6b0"
|
|
1972
|
+
},
|
|
1973
|
+
{
|
|
1974
|
+
"type": "COMPONENT",
|
|
1975
|
+
"key": "0135e13dd2ded277e5d024f2d9ccc37f9aa7cf38"
|
|
1976
|
+
},
|
|
1977
|
+
{
|
|
1978
|
+
"type": "COMPONENT",
|
|
1979
|
+
"key": "146925b01e772269f042df51f8d2cd5b4e492111"
|
|
1980
|
+
},
|
|
1981
|
+
{
|
|
1982
|
+
"type": "COMPONENT",
|
|
1983
|
+
"key": "a711c13770db66a6a9d8dfec9205b301fb4abf4d"
|
|
1984
|
+
},
|
|
1985
|
+
{
|
|
1986
|
+
"type": "COMPONENT",
|
|
1987
|
+
"key": "4907a3a324539a374a81c8255ac8ae2fc6769622"
|
|
1988
|
+
}
|
|
1989
|
+
]
|
|
1990
|
+
},
|
|
1991
|
+
"Show Overlay#58686:33": {
|
|
1992
|
+
"type": "BOOLEAN"
|
|
1993
|
+
},
|
|
1994
|
+
"Right Top#58686:66": {
|
|
1995
|
+
"type": "INSTANCE_SWAP",
|
|
1996
|
+
"preferredValues": [
|
|
1997
|
+
{
|
|
1998
|
+
"type": "COMPONENT",
|
|
1999
|
+
"key": "a711c13770db66a6a9d8dfec9205b301fb4abf4d"
|
|
2000
|
+
},
|
|
2001
|
+
{
|
|
2002
|
+
"type": "COMPONENT",
|
|
2003
|
+
"key": "00da9dcf0cc4e408d2e36da56d0701dce6cee6b0"
|
|
2004
|
+
},
|
|
2005
|
+
{
|
|
2006
|
+
"type": "COMPONENT",
|
|
2007
|
+
"key": "0135e13dd2ded277e5d024f2d9ccc37f9aa7cf38"
|
|
2008
|
+
},
|
|
2009
|
+
{
|
|
2010
|
+
"type": "COMPONENT",
|
|
2011
|
+
"key": "146925b01e772269f042df51f8d2cd5b4e492111"
|
|
2012
|
+
},
|
|
2013
|
+
{
|
|
2014
|
+
"type": "COMPONENT",
|
|
2015
|
+
"key": "4907a3a324539a374a81c8255ac8ae2fc6769622"
|
|
2016
|
+
}
|
|
2017
|
+
]
|
|
2018
|
+
},
|
|
2019
|
+
"Left Bottom#58686:99": {
|
|
2020
|
+
"type": "INSTANCE_SWAP",
|
|
2021
|
+
"preferredValues": [
|
|
2022
|
+
{
|
|
2023
|
+
"type": "COMPONENT",
|
|
2024
|
+
"key": "00da9dcf0cc4e408d2e36da56d0701dce6cee6b0"
|
|
2025
|
+
},
|
|
2026
|
+
{
|
|
2027
|
+
"type": "COMPONENT",
|
|
2028
|
+
"key": "0135e13dd2ded277e5d024f2d9ccc37f9aa7cf38"
|
|
2029
|
+
},
|
|
2030
|
+
{
|
|
2031
|
+
"type": "COMPONENT",
|
|
2032
|
+
"key": "146925b01e772269f042df51f8d2cd5b4e492111"
|
|
2033
|
+
},
|
|
2034
|
+
{
|
|
2035
|
+
"type": "COMPONENT",
|
|
2036
|
+
"key": "a711c13770db66a6a9d8dfec9205b301fb4abf4d"
|
|
2037
|
+
},
|
|
2038
|
+
{
|
|
2039
|
+
"type": "COMPONENT",
|
|
2040
|
+
"key": "4907a3a324539a374a81c8255ac8ae2fc6769622"
|
|
2041
|
+
}
|
|
2042
|
+
]
|
|
2043
|
+
},
|
|
2044
|
+
"Right Bottom#58686:132": {
|
|
2045
|
+
"type": "INSTANCE_SWAP",
|
|
2046
|
+
"preferredValues": [
|
|
2047
|
+
{
|
|
2048
|
+
"type": "COMPONENT",
|
|
2049
|
+
"key": "a711c13770db66a6a9d8dfec9205b301fb4abf4d"
|
|
2050
|
+
},
|
|
2051
|
+
{
|
|
2052
|
+
"type": "COMPONENT",
|
|
2053
|
+
"key": "00da9dcf0cc4e408d2e36da56d0701dce6cee6b0"
|
|
2054
|
+
},
|
|
2055
|
+
{
|
|
2056
|
+
"type": "COMPONENT",
|
|
2057
|
+
"key": "0135e13dd2ded277e5d024f2d9ccc37f9aa7cf38"
|
|
2058
|
+
},
|
|
2059
|
+
{
|
|
2060
|
+
"type": "COMPONENT",
|
|
2061
|
+
"key": "146925b01e772269f042df51f8d2cd5b4e492111"
|
|
2062
|
+
},
|
|
2063
|
+
{
|
|
2064
|
+
"type": "COMPONENT",
|
|
2065
|
+
"key": "4907a3a324539a374a81c8255ac8ae2fc6769622"
|
|
2066
|
+
}
|
|
2067
|
+
]
|
|
2068
|
+
},
|
|
2069
|
+
"ㄴ Left Top#58686:165": {
|
|
2070
|
+
"type": "BOOLEAN"
|
|
2071
|
+
},
|
|
2072
|
+
"ㄴ Right Top#58686:198": {
|
|
2073
|
+
"type": "BOOLEAN"
|
|
2074
|
+
},
|
|
2075
|
+
"ㄴ Left Bottom#58686:231": {
|
|
2076
|
+
"type": "BOOLEAN"
|
|
2077
|
+
},
|
|
2078
|
+
"ㄴ Right Bottom#58686:264": {
|
|
2079
|
+
"type": "BOOLEAN"
|
|
2080
|
+
},
|
|
2081
|
+
"Ratio": {
|
|
2082
|
+
"type": "VARIANT",
|
|
2083
|
+
"variantOptions": [
|
|
2084
|
+
"1:1",
|
|
2085
|
+
"2:1",
|
|
2086
|
+
"16:9",
|
|
2087
|
+
"4:3",
|
|
2088
|
+
"6:7",
|
|
2089
|
+
"4:5",
|
|
2090
|
+
"2:3"
|
|
2091
|
+
]
|
|
2092
|
+
},
|
|
2093
|
+
"Size": {
|
|
2094
|
+
"type": "VARIANT",
|
|
2095
|
+
"variantOptions": [
|
|
2096
|
+
"20",
|
|
2097
|
+
"24",
|
|
2098
|
+
"36",
|
|
2099
|
+
"42",
|
|
2100
|
+
"48",
|
|
2101
|
+
"64",
|
|
2102
|
+
"80",
|
|
2103
|
+
"96",
|
|
2104
|
+
"120",
|
|
2105
|
+
"\bFree"
|
|
2106
|
+
]
|
|
2107
|
+
},
|
|
2108
|
+
"Rounded": {
|
|
2109
|
+
"type": "VARIANT",
|
|
2110
|
+
"variantOptions": [
|
|
2111
|
+
"True",
|
|
2112
|
+
"False"
|
|
2113
|
+
]
|
|
2114
|
+
}
|
|
2115
|
+
}
|
|
2116
|
+
};
|
|
1964
2117
|
const listHeader = {
|
|
1965
2118
|
"name": "listHeader",
|
|
1966
2119
|
"key": "609f93ed0608ef0a6d9a351e47595ad631bae0fa",
|
|
@@ -2587,42 +2740,6 @@ const segmentedControl = {
|
|
|
2587
2740
|
}
|
|
2588
2741
|
}
|
|
2589
2742
|
};
|
|
2590
|
-
const selectBox = {
|
|
2591
|
-
"name": "selectBox",
|
|
2592
|
-
"key": "38722ffeb4c966256a709155e8ddac50c93d7c60",
|
|
2593
|
-
"componentPropertyDefinitions": {
|
|
2594
|
-
"Show Description#3033:0": {
|
|
2595
|
-
"type": "BOOLEAN"
|
|
2596
|
-
},
|
|
2597
|
-
"Description #3033:5": {
|
|
2598
|
-
"type": "TEXT"
|
|
2599
|
-
},
|
|
2600
|
-
"Label#3635:0": {
|
|
2601
|
-
"type": "TEXT"
|
|
2602
|
-
},
|
|
2603
|
-
"Control": {
|
|
2604
|
-
"type": "VARIANT",
|
|
2605
|
-
"variantOptions": [
|
|
2606
|
-
"Checkbox",
|
|
2607
|
-
"Radio"
|
|
2608
|
-
]
|
|
2609
|
-
},
|
|
2610
|
-
"Selected": {
|
|
2611
|
-
"type": "VARIANT",
|
|
2612
|
-
"variantOptions": [
|
|
2613
|
-
"True",
|
|
2614
|
-
"False"
|
|
2615
|
-
]
|
|
2616
|
-
},
|
|
2617
|
-
"State": {
|
|
2618
|
-
"type": "VARIANT",
|
|
2619
|
-
"variantOptions": [
|
|
2620
|
-
"Enabled",
|
|
2621
|
-
"Pressed"
|
|
2622
|
-
]
|
|
2623
|
-
}
|
|
2624
|
-
}
|
|
2625
|
-
};
|
|
2626
2743
|
const skeleton = {
|
|
2627
2744
|
"name": "skeleton",
|
|
2628
2745
|
"key": "ef22c3288722fbfa64a5ab73df397ade88f8e05a",
|
|
@@ -3022,6 +3139,7 @@ var FIGMA_COMPONENTS = {
|
|
|
3022
3139
|
divider: divider,
|
|
3023
3140
|
floatingActionButton: floatingActionButton,
|
|
3024
3141
|
helpBubble: helpBubble,
|
|
3142
|
+
imageFrame: imageFrame,
|
|
3025
3143
|
listHeader: listHeader,
|
|
3026
3144
|
listItem: listItem,
|
|
3027
3145
|
mannerTemp: mannerTemp,
|
|
@@ -3038,7 +3156,6 @@ var FIGMA_COMPONENTS = {
|
|
|
3038
3156
|
rootTopNavigationGlobal: rootTopNavigationGlobal,
|
|
3039
3157
|
rootTopNavigationKr: rootTopNavigationKr,
|
|
3040
3158
|
segmentedControl: segmentedControl,
|
|
3041
|
-
selectBox: selectBox,
|
|
3042
3159
|
skeleton: skeleton,
|
|
3043
3160
|
slider: slider,
|
|
3044
3161
|
snackbar: snackbar,
|
|
@@ -3050,7 +3167,7 @@ var FIGMA_COMPONENTS = {
|
|
|
3050
3167
|
templateChipGroup: templateChipGroup,
|
|
3051
3168
|
templateCustomPickerField: templateCustomPickerField,
|
|
3052
3169
|
templateDisclaimer: templateDisclaimer,
|
|
3053
|
-
|
|
3170
|
+
templateResultPage: templateResultPage,
|
|
3054
3171
|
templateSliderField: templateSliderField,
|
|
3055
3172
|
templateTextField: templateTextField,
|
|
3056
3173
|
templateTextareaField: templateTextareaField,
|
|
@@ -4362,48 +4479,6 @@ const createSegmentedControlHandler = (ctx)=>{
|
|
|
4362
4479
|
});
|
|
4363
4480
|
};
|
|
4364
4481
|
|
|
4365
|
-
const { createLocalSnippetElement: createLocalSnippetElement$7 } = createLocalSnippetHelper("select-box");
|
|
4366
|
-
const createSelectBoxHandler = (_ctx)=>defineComponentHandler(selectBox.key, ({ componentProperties: props })=>{
|
|
4367
|
-
const tag = match(props.Control.value).with("Checkbox", ()=>"CheckSelectBox").with("Radio", ()=>"RadioSelectBoxItem").exhaustive();
|
|
4368
|
-
const commonProps = {
|
|
4369
|
-
label: props["Label#3635:0"].value,
|
|
4370
|
-
...props["Show Description#3033:0"].value && {
|
|
4371
|
-
description: props["Description #3033:5"].value
|
|
4372
|
-
},
|
|
4373
|
-
...tag === "RadioSelectBoxItem" && {
|
|
4374
|
-
value: props["Label#3635:0"].value
|
|
4375
|
-
},
|
|
4376
|
-
...tag === "CheckSelectBox" && props.Selected.value === "True" && {
|
|
4377
|
-
defaultChecked: true
|
|
4378
|
-
}
|
|
4379
|
-
};
|
|
4380
|
-
return createLocalSnippetElement$7(tag, commonProps);
|
|
4381
|
-
});
|
|
4382
|
-
const createSelectBoxGroupHandler = (ctx)=>{
|
|
4383
|
-
const selectBoxHandler = createSelectBoxHandler();
|
|
4384
|
-
return defineComponentHandler(templateSelectBoxGroup.key, (node, traverse)=>{
|
|
4385
|
-
const props = node.componentProperties;
|
|
4386
|
-
const tag = match(props.Control.value).with("Checkbox", ()=>"CheckSelectBoxGroup").with("Radio", ()=>"RadioSelectBoxRoot").exhaustive();
|
|
4387
|
-
const selectBoxes = findAllInstances({
|
|
4388
|
-
node,
|
|
4389
|
-
key: selectBoxHandler.key
|
|
4390
|
-
});
|
|
4391
|
-
const selectedSelectBox = selectBoxes.find((selectBox)=>selectBox.componentProperties.Selected.value === "True");
|
|
4392
|
-
// traverse the container like it's a frame
|
|
4393
|
-
const vStackProps = traverse({
|
|
4394
|
-
...node,
|
|
4395
|
-
type: "FRAME"
|
|
4396
|
-
})?.props;
|
|
4397
|
-
const stack = createSeedReactElement("VStack", vStackProps, selectBoxes.map((box)=>selectBoxHandler.transform(box, traverse)));
|
|
4398
|
-
const commonProps = {
|
|
4399
|
-
...tag === "RadioSelectBoxRoot" && {
|
|
4400
|
-
defaultValue: selectedSelectBox?.componentProperties["Label#3635:0"].value
|
|
4401
|
-
}
|
|
4402
|
-
};
|
|
4403
|
-
return createLocalSnippetElement$7(tag, commonProps, stack);
|
|
4404
|
-
});
|
|
4405
|
-
};
|
|
4406
|
-
|
|
4407
4482
|
const createSkeletonHandler = (ctx)=>defineComponentHandler(skeleton.key, (node)=>{
|
|
4408
4483
|
const { componentProperties: props, layoutSizingHorizontal, layoutSizingVertical } = node;
|
|
4409
4484
|
const commonProps = {
|
|
@@ -4414,7 +4489,7 @@ const createSkeletonHandler = (ctx)=>defineComponentHandler(skeleton.key, (node)
|
|
|
4414
4489
|
return createSeedReactElement("Skeleton", commonProps);
|
|
4415
4490
|
});
|
|
4416
4491
|
|
|
4417
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
4492
|
+
const { createLocalSnippetElement: createLocalSnippetElement$7 } = createLocalSnippetHelper("slider");
|
|
4418
4493
|
const SLIDER_TICK_KEY = "ace432ffb7a2af13bce549b19c932ac5f96a9a78";
|
|
4419
4494
|
function getSliderComment(props) {
|
|
4420
4495
|
return [
|
|
@@ -4450,7 +4525,7 @@ const createSliderFieldHandler = (ctx)=>{
|
|
|
4450
4525
|
...headerProps,
|
|
4451
4526
|
...footerProps
|
|
4452
4527
|
};
|
|
4453
|
-
return createLocalSnippetElement$
|
|
4528
|
+
return createLocalSnippetElement$7("Slider", commonProps, undefined, {
|
|
4454
4529
|
comment: getSliderComment(commonProps)
|
|
4455
4530
|
});
|
|
4456
4531
|
});
|
|
@@ -4492,13 +4567,13 @@ const createSliderHandler = (_ctx)=>{
|
|
|
4492
4567
|
disabled: true
|
|
4493
4568
|
}
|
|
4494
4569
|
};
|
|
4495
|
-
return createLocalSnippetElement$
|
|
4570
|
+
return createLocalSnippetElement$7("Slider", commonProps, undefined, {
|
|
4496
4571
|
comment: getSliderComment(commonProps)
|
|
4497
4572
|
});
|
|
4498
4573
|
});
|
|
4499
4574
|
};
|
|
4500
4575
|
|
|
4501
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
4576
|
+
const { createLocalSnippetElement: createLocalSnippetElement$6 } = createLocalSnippetHelper("snackbar");
|
|
4502
4577
|
const createSnackbarHandler = (_ctx)=>defineComponentHandler(snackbar.key, ({ componentProperties: props })=>{
|
|
4503
4578
|
const commonProps = {
|
|
4504
4579
|
message: props["Message#1528:4"].value,
|
|
@@ -4508,20 +4583,20 @@ const createSnackbarHandler = (_ctx)=>defineComponentHandler(snackbar.key, ({ co
|
|
|
4508
4583
|
}
|
|
4509
4584
|
};
|
|
4510
4585
|
// TODO: adapter.create({ render })
|
|
4511
|
-
return createLocalSnippetElement$
|
|
4586
|
+
return createLocalSnippetElement$6("Snackbar", commonProps);
|
|
4512
4587
|
});
|
|
4513
4588
|
|
|
4514
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
4589
|
+
const { createLocalSnippetElement: createLocalSnippetElement$5 } = createLocalSnippetHelper("switch");
|
|
4515
4590
|
const createSwitchmarkHandler = (_ctx)=>defineComponentHandler(switchmark.key, ({ componentProperties: props })=>{
|
|
4516
4591
|
const tone = match(props.Tone.value).with("Neutral", ()=>"neutral").with("🚫[Deprecated] Brand", ()=>"brand").exhaustive();
|
|
4517
4592
|
const commonProps = {
|
|
4518
4593
|
tone,
|
|
4519
4594
|
size: props.Size.value
|
|
4520
4595
|
};
|
|
4521
|
-
return createLocalSnippetElement$
|
|
4596
|
+
return createLocalSnippetElement$5("SwitchMark", commonProps);
|
|
4522
4597
|
});
|
|
4523
4598
|
|
|
4524
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
4599
|
+
const { createLocalSnippetElement: createLocalSnippetElement$4 } = createLocalSnippetHelper("switch");
|
|
4525
4600
|
const createSwitchHandler = (_ctx)=>defineComponentHandler(_switch.key, ({ componentProperties: props })=>{
|
|
4526
4601
|
const tone = match(props.Tone.value).with("Neutral", ()=>"neutral").with("🚫[Deprecated] Brand", ()=>"brand").exhaustive();
|
|
4527
4602
|
const commonProps = {
|
|
@@ -4529,9 +4604,9 @@ const createSwitchHandler = (_ctx)=>defineComponentHandler(_switch.key, ({ compo
|
|
|
4529
4604
|
size: props.Size.value
|
|
4530
4605
|
};
|
|
4531
4606
|
if (props["Layout(Figma Only)"].value === "🚫[Switch Mark 사용] Switch Only") {
|
|
4532
|
-
return createLocalSnippetElement$
|
|
4607
|
+
return createLocalSnippetElement$4("SwitchMark", commonProps);
|
|
4533
4608
|
}
|
|
4534
|
-
return createLocalSnippetElement$
|
|
4609
|
+
return createLocalSnippetElement$4("Switch", {
|
|
4535
4610
|
...commonProps,
|
|
4536
4611
|
label: props["Label#36578:0"].value,
|
|
4537
4612
|
...props.Selected.value === "True" && {
|
|
@@ -4752,7 +4827,7 @@ const createChipTabsTriggerHandler = (_ctx)=>defineComponentHandler(CHIP_TRIGGER
|
|
|
4752
4827
|
return createChipTabsLocalSnippetElement("ChipTabsTrigger", commonProps);
|
|
4753
4828
|
});
|
|
4754
4829
|
|
|
4755
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
4830
|
+
const { createLocalSnippetElement: createLocalSnippetElement$3 } = createLocalSnippetHelper("text-field");
|
|
4756
4831
|
const TEXT_INPUT_OUTLINE_KEY = "22eebd645d310c086d9f5f69d8f179ff5c7cf7ca";
|
|
4757
4832
|
const TEXT_INPUT_OUTLINE_PREFIX_KEY = "1ab174dd51bc42a5efe530f52f1dd02255c50b18";
|
|
4758
4833
|
const TEXT_INPUT_OUTLINE_SUFFIX_KEY = "555fee288d9053760e301791665bbac31d19c43f";
|
|
@@ -4864,13 +4939,13 @@ const createTextInputFieldHandler = (ctx)=>{
|
|
|
4864
4939
|
placeholder: placeholder.characters
|
|
4865
4940
|
}
|
|
4866
4941
|
};
|
|
4867
|
-
return createLocalSnippetElement$
|
|
4942
|
+
return createLocalSnippetElement$3("TextField", {
|
|
4868
4943
|
...fieldProps,
|
|
4869
4944
|
...commonProps,
|
|
4870
4945
|
...value && {
|
|
4871
4946
|
defaultValue: value.characters
|
|
4872
4947
|
}
|
|
4873
|
-
}, createLocalSnippetElement$
|
|
4948
|
+
}, createLocalSnippetElement$3("TextFieldInput", inputProps));
|
|
4874
4949
|
});
|
|
4875
4950
|
};
|
|
4876
4951
|
const createTextareaFieldHandler = (ctx)=>{
|
|
@@ -4913,14 +4988,14 @@ const createTextareaFieldHandler = (ctx)=>{
|
|
|
4913
4988
|
defaultValue: value.characters
|
|
4914
4989
|
}
|
|
4915
4990
|
};
|
|
4916
|
-
return createLocalSnippetElement$
|
|
4991
|
+
return createLocalSnippetElement$3("TextField", {
|
|
4917
4992
|
...fieldProps,
|
|
4918
4993
|
...commonProps
|
|
4919
|
-
}, createLocalSnippetElement$
|
|
4994
|
+
}, createLocalSnippetElement$3("TextFieldTextarea", inputProps));
|
|
4920
4995
|
});
|
|
4921
4996
|
};
|
|
4922
4997
|
|
|
4923
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
4998
|
+
const { createLocalSnippetElement: createLocalSnippetElement$2 } = createLocalSnippetHelper("toggle-button");
|
|
4924
4999
|
const createToggleButtonHandler = (ctx)=>defineComponentHandler(toggleButton.key, ({ componentProperties: props })=>{
|
|
4925
5000
|
const commonProps = {
|
|
4926
5001
|
variant: camelCase(props.Variant.value),
|
|
@@ -4935,7 +5010,7 @@ const createToggleButtonHandler = (ctx)=>defineComponentHandler(toggleButton.key
|
|
|
4935
5010
|
loading: true
|
|
4936
5011
|
}
|
|
4937
5012
|
};
|
|
4938
|
-
return createLocalSnippetElement$
|
|
5013
|
+
return createLocalSnippetElement$2("ToggleButton", commonProps, [
|
|
4939
5014
|
props["Show Prefix Icon#6122:392"].value ? createSeedReactElement("PrefixIcon", {
|
|
4940
5015
|
svg: ctx.iconHandler.transform(props["Prefix Icon#6122:98"])
|
|
4941
5016
|
}) : undefined,
|
|
@@ -5006,7 +5081,7 @@ const createTagGroupItemHandler = (ctx)=>defineComponentHandler(TAG_GROUP_ITEM_K
|
|
|
5006
5081
|
return createSeedReactElement("TagGroup.Item", commonProps, children);
|
|
5007
5082
|
});
|
|
5008
5083
|
|
|
5009
|
-
const { createLocalSnippetElement } = createLocalSnippetHelper("text-field");
|
|
5084
|
+
const { createLocalSnippetElement: createLocalSnippetElement$1 } = createLocalSnippetHelper("text-field");
|
|
5010
5085
|
const LEGACY_TEXT_FIELD_KEY = "c49873c37a639f0dffdea4efd0eb43760d66c141";
|
|
5011
5086
|
const LEGACY_MULTILINE_TEXT_FIELD_KEY = "88b2399c930c85f9ce2972163a078bc684b84bbe";
|
|
5012
5087
|
const createLegacyTextFieldHandler = (ctx)=>defineComponentHandler(LEGACY_TEXT_FIELD_KEY, ({ componentProperties: props })=>{
|
|
@@ -5063,9 +5138,9 @@ const createLegacyTextFieldHandler = (ctx)=>defineComponentHandler(LEGACY_TEXT_F
|
|
|
5063
5138
|
const inputProps = {
|
|
5064
5139
|
placeholder
|
|
5065
5140
|
};
|
|
5066
|
-
const TextFieldChildren = createLocalSnippetElement("TextFieldInput", inputProps);
|
|
5067
|
-
return createLocalSnippetElement("TextField", commonProps, TextFieldChildren, {
|
|
5068
|
-
comment: "이 Figma 컴포넌트는 @seed-design/react@1.1보다 낮은 버전의 TextField입니다."
|
|
5141
|
+
const TextFieldChildren = createLocalSnippetElement$1("TextFieldInput", inputProps);
|
|
5142
|
+
return createLocalSnippetElement$1("TextField", commonProps, TextFieldChildren, {
|
|
5143
|
+
comment: "이 Figma 컴포넌트는 @seed-design/react@1.1보다 낮은 버전의 TextField입니다. 신규 컴포넌트로 교체할 수 있습니다."
|
|
5069
5144
|
});
|
|
5070
5145
|
});
|
|
5071
5146
|
const createLegacyMultilineTextFieldHandler = (_ctx)=>defineComponentHandler(LEGACY_MULTILINE_TEXT_FIELD_KEY, ({ componentProperties: props })=>{
|
|
@@ -5109,12 +5184,60 @@ const createLegacyMultilineTextFieldHandler = (_ctx)=>defineComponentHandler(LEG
|
|
|
5109
5184
|
const inputProps = {
|
|
5110
5185
|
placeholder
|
|
5111
5186
|
};
|
|
5112
|
-
const TextFieldChildren = createLocalSnippetElement("TextFieldTextarea", inputProps);
|
|
5113
|
-
return createLocalSnippetElement("TextField", commonProps, TextFieldChildren, {
|
|
5114
|
-
comment: "이 Figma 컴포넌트는 @seed-design/react@1.1보다 낮은 버전의 TextField입니다."
|
|
5187
|
+
const TextFieldChildren = createLocalSnippetElement$1("TextFieldTextarea", inputProps);
|
|
5188
|
+
return createLocalSnippetElement$1("TextField", commonProps, TextFieldChildren, {
|
|
5189
|
+
comment: "이 Figma 컴포넌트는 @seed-design/react@1.1보다 낮은 버전의 TextField입니다. 신규 컴포넌트로 교체할 수 있습니다."
|
|
5115
5190
|
});
|
|
5116
5191
|
});
|
|
5117
5192
|
|
|
5193
|
+
const { createLocalSnippetElement } = createLocalSnippetHelper("select-box");
|
|
5194
|
+
const LEGACY_SELECT_BOX_KEY = "38722ffeb4c966256a709155e8ddac50c93d7c60";
|
|
5195
|
+
const LEGACY_SELECT_BOX_GROUP_KEY = "a3d58bb8540600878742cdcf2608a4b3851667ec";
|
|
5196
|
+
const createLegacySelectBoxHandler = (_ctx)=>defineComponentHandler(LEGACY_SELECT_BOX_KEY, ({ componentProperties: props })=>{
|
|
5197
|
+
const tag = match(props.Control.value).with("Checkbox", ()=>"CheckSelectBox").with("Radio", ()=>"RadioSelectBoxItem").exhaustive();
|
|
5198
|
+
const commonProps = {
|
|
5199
|
+
label: props["Label#3635:0"].value,
|
|
5200
|
+
...props["Show Description#3033:0"].value && {
|
|
5201
|
+
description: props["Description #3033:5"].value
|
|
5202
|
+
},
|
|
5203
|
+
...tag === "RadioSelectBoxItem" && {
|
|
5204
|
+
value: props["Label#3635:0"].value
|
|
5205
|
+
},
|
|
5206
|
+
...tag === "CheckSelectBox" && props.Selected.value === "True" && {
|
|
5207
|
+
defaultChecked: true
|
|
5208
|
+
}
|
|
5209
|
+
};
|
|
5210
|
+
return createLocalSnippetElement(tag, commonProps, undefined, {
|
|
5211
|
+
comment: "이 Figma 컴포넌트는 @seed-design/react@1.2보다 낮은 버전의 SelectBox입니다. 신규 컴포넌트로 교체할 수 있습니다."
|
|
5212
|
+
});
|
|
5213
|
+
});
|
|
5214
|
+
const createLegacySelectBoxGroupHandler = (ctx)=>{
|
|
5215
|
+
const selectBoxHandler = createLegacySelectBoxHandler();
|
|
5216
|
+
return defineComponentHandler(LEGACY_SELECT_BOX_GROUP_KEY, (node, traverse)=>{
|
|
5217
|
+
const props = node.componentProperties;
|
|
5218
|
+
const tag = match(props.Control.value).with("Checkbox", ()=>"CheckSelectBoxGroup").with("Radio", ()=>"RadioSelectBoxRoot").exhaustive();
|
|
5219
|
+
const selectBoxes = findAllInstances({
|
|
5220
|
+
node,
|
|
5221
|
+
key: selectBoxHandler.key
|
|
5222
|
+
});
|
|
5223
|
+
const selectedSelectBox = selectBoxes.find((selectBox)=>selectBox.componentProperties.Selected.value === "True");
|
|
5224
|
+
// traverse the container like it's a frame
|
|
5225
|
+
const vStackProps = traverse({
|
|
5226
|
+
...node,
|
|
5227
|
+
type: "FRAME"
|
|
5228
|
+
})?.props;
|
|
5229
|
+
const stack = createSeedReactElement("VStack", vStackProps, selectBoxes.map((box)=>selectBoxHandler.transform(box, traverse)));
|
|
5230
|
+
const commonProps = {
|
|
5231
|
+
...tag === "RadioSelectBoxRoot" && {
|
|
5232
|
+
defaultValue: selectedSelectBox?.componentProperties["Label#3635:0"].value
|
|
5233
|
+
}
|
|
5234
|
+
};
|
|
5235
|
+
return createLocalSnippetElement(tag, commonProps, stack, {
|
|
5236
|
+
comment: "이 Figma 컴포넌트는 @seed-design/react@1.2보다 낮은 버전의 SelectBox입니다. 신규 컴포넌트로 교체할 수 있습니다."
|
|
5237
|
+
});
|
|
5238
|
+
});
|
|
5239
|
+
};
|
|
5240
|
+
|
|
5118
5241
|
function bindComponentHandler(unbound, deps) {
|
|
5119
5242
|
return unbound(deps);
|
|
5120
5243
|
}
|
|
@@ -5140,8 +5263,8 @@ const unboundSeedComponentHandlers = [
|
|
|
5140
5263
|
createAvatarHandler,
|
|
5141
5264
|
createAvatarStackHandler,
|
|
5142
5265
|
createSegmentedControlHandler,
|
|
5143
|
-
|
|
5144
|
-
|
|
5266
|
+
createLegacySelectBoxHandler,
|
|
5267
|
+
createLegacySelectBoxGroupHandler,
|
|
5145
5268
|
createSliderHandler,
|
|
5146
5269
|
createSliderFieldHandler,
|
|
5147
5270
|
createTabsHandler,
|
|
@@ -5743,6 +5866,16 @@ const FIGMA_ICONS = {
|
|
|
5743
5866
|
"type": "monochrome",
|
|
5744
5867
|
"weight": "Fill"
|
|
5745
5868
|
},
|
|
5869
|
+
"48d35e692e4cbeb1bfd0b0be28a800061173cf96": {
|
|
5870
|
+
"name": "icon_cart_items",
|
|
5871
|
+
"type": "monochrome",
|
|
5872
|
+
"weight": "Fill"
|
|
5873
|
+
},
|
|
5874
|
+
"15e92fded5d5306b62b634790f724a72ba8f7033": {
|
|
5875
|
+
"name": "icon_cart_items",
|
|
5876
|
+
"type": "monochrome",
|
|
5877
|
+
"weight": "Line"
|
|
5878
|
+
},
|
|
5746
5879
|
"f6be7d2997e4b139ae4850ee21869bc7e59ccc0b": {
|
|
5747
5880
|
"name": "icon_cart",
|
|
5748
5881
|
"type": "monochrome",
|
|
@@ -6308,6 +6441,16 @@ const FIGMA_ICONS = {
|
|
|
6308
6441
|
"type": "monochrome",
|
|
6309
6442
|
"weight": "Line"
|
|
6310
6443
|
},
|
|
6444
|
+
"8a20bac7b3ef03003f4395e5a5455a62fa363efc": {
|
|
6445
|
+
"name": "icon_exclamationmark_chatbubble_rectangular_center",
|
|
6446
|
+
"type": "monochrome",
|
|
6447
|
+
"weight": "Fill"
|
|
6448
|
+
},
|
|
6449
|
+
"2fe5521cf8ac4b67db3a1cd0a03847f54493583a": {
|
|
6450
|
+
"name": "icon_exclamationmark_chatbubble_rectangular_center",
|
|
6451
|
+
"type": "monochrome",
|
|
6452
|
+
"weight": "Line"
|
|
6453
|
+
},
|
|
6311
6454
|
"3e578773a3da74c255c4c9008914b247e0fc3d2b": {
|
|
6312
6455
|
"name": "icon_exclamationmark_circle",
|
|
6313
6456
|
"type": "monochrome",
|
|
@@ -8372,6 +8515,10 @@ const FIGMA_ICONS = {
|
|
|
8372
8515
|
"name": "icon_cart",
|
|
8373
8516
|
"type": "multicolor"
|
|
8374
8517
|
},
|
|
8518
|
+
"81a9d09867dbce6bbeca059a24c54ad23130a518": {
|
|
8519
|
+
"name": "icon_cart_items",
|
|
8520
|
+
"type": "multicolor"
|
|
8521
|
+
},
|
|
8375
8522
|
"51692e1d38d71ff24bbf5c7295da347d7700acbe": {
|
|
8376
8523
|
"name": "icon_cart_load",
|
|
8377
8524
|
"type": "multicolor"
|
|
@@ -9087,9 +9234,11 @@ const FIGMA_VARIABLE_COLLECTIONS = {
|
|
|
9087
9234
|
"VariableID:654:20851",
|
|
9088
9235
|
"VariableID:1:171",
|
|
9089
9236
|
"VariableID:41186:6437",
|
|
9090
|
-
"VariableID:1:158",
|
|
9091
9237
|
"VariableID:1:172",
|
|
9238
|
+
"VariableID:1:158",
|
|
9092
9239
|
"VariableID:1:161",
|
|
9240
|
+
"VariableID:59176:2",
|
|
9241
|
+
"VariableID:59176:3",
|
|
9093
9242
|
"VariableID:1:159",
|
|
9094
9243
|
"VariableID:576:22878",
|
|
9095
9244
|
"VariableID:10181:32557",
|
|
@@ -9134,8 +9283,8 @@ const FIGMA_VARIABLE_COLLECTIONS = {
|
|
|
9134
9283
|
"VariableID:12479:23364",
|
|
9135
9284
|
"VariableID:12479:23365",
|
|
9136
9285
|
"VariableID:12479:23366",
|
|
9137
|
-
"VariableID:12548:1437",
|
|
9138
9286
|
"VariableID:1:7",
|
|
9287
|
+
"VariableID:12548:1437",
|
|
9139
9288
|
"VariableID:12479:23367",
|
|
9140
9289
|
"VariableID:12479:23368",
|
|
9141
9290
|
"VariableID:12479:23371",
|
|
@@ -9486,9 +9635,9 @@ const FIGMA_VARIABLE_COLLECTIONS = {
|
|
|
9486
9635
|
"VariableID:289:13772",
|
|
9487
9636
|
"VariableID:1886:93038",
|
|
9488
9637
|
"VariableID:289:13773",
|
|
9489
|
-
"VariableID:796:4448",
|
|
9490
9638
|
"VariableID:15518:15916",
|
|
9491
9639
|
"VariableID:19225:68732",
|
|
9640
|
+
"VariableID:796:4448",
|
|
9492
9641
|
"VariableID:17955:50606",
|
|
9493
9642
|
"VariableID:514:13178",
|
|
9494
9643
|
"VariableID:535:1747",
|
|
@@ -9496,7 +9645,10 @@ const FIGMA_VARIABLE_COLLECTIONS = {
|
|
|
9496
9645
|
"VariableID:1700:4280",
|
|
9497
9646
|
"VariableID:1700:4281",
|
|
9498
9647
|
"VariableID:1700:4282",
|
|
9499
|
-
"VariableID:40279:20413"
|
|
9648
|
+
"VariableID:40279:20413",
|
|
9649
|
+
"VariableID:58766:15457",
|
|
9650
|
+
"VariableID:58766:15458",
|
|
9651
|
+
"VariableID:58766:15459"
|
|
9500
9652
|
]
|
|
9501
9653
|
},
|
|
9502
9654
|
"VariableCollectionId:6075:34487": {
|
|
@@ -10613,6 +10765,54 @@ const FIGMA_VARIABLES = {
|
|
|
10613
10765
|
],
|
|
10614
10766
|
"codeSyntax": {}
|
|
10615
10767
|
},
|
|
10768
|
+
"VariableID:59176:2": {
|
|
10769
|
+
"name": "bg/neutral-weak-alpha",
|
|
10770
|
+
"id": "VariableID:59176:2",
|
|
10771
|
+
"remote": false,
|
|
10772
|
+
"key": "082218bada1fc4e2688ad59f30a980c191caf7b7",
|
|
10773
|
+
"variableCollectionId": "VariableCollectionId:1:3",
|
|
10774
|
+
"resolvedType": "COLOR",
|
|
10775
|
+
"description": "",
|
|
10776
|
+
"hiddenFromPublishing": false,
|
|
10777
|
+
"valuesByMode": {
|
|
10778
|
+
"1928:7": {
|
|
10779
|
+
"type": "VARIABLE_ALIAS",
|
|
10780
|
+
"id": "VariableID:30894:36296"
|
|
10781
|
+
},
|
|
10782
|
+
"1928:8": {
|
|
10783
|
+
"type": "VARIABLE_ALIAS",
|
|
10784
|
+
"id": "VariableID:30894:36307"
|
|
10785
|
+
}
|
|
10786
|
+
},
|
|
10787
|
+
"scopes": [
|
|
10788
|
+
"ALL_SCOPES"
|
|
10789
|
+
],
|
|
10790
|
+
"codeSyntax": {}
|
|
10791
|
+
},
|
|
10792
|
+
"VariableID:59176:3": {
|
|
10793
|
+
"name": "bg/neutral-weak-alpha-pressed",
|
|
10794
|
+
"id": "VariableID:59176:3",
|
|
10795
|
+
"remote": false,
|
|
10796
|
+
"key": "b67dd2511e5e4f41e0e392925fcccc752c67631f",
|
|
10797
|
+
"variableCollectionId": "VariableCollectionId:1:3",
|
|
10798
|
+
"resolvedType": "COLOR",
|
|
10799
|
+
"description": "",
|
|
10800
|
+
"hiddenFromPublishing": false,
|
|
10801
|
+
"valuesByMode": {
|
|
10802
|
+
"1928:7": {
|
|
10803
|
+
"type": "VARIABLE_ALIAS",
|
|
10804
|
+
"id": "VariableID:30894:36297"
|
|
10805
|
+
},
|
|
10806
|
+
"1928:8": {
|
|
10807
|
+
"type": "VARIABLE_ALIAS",
|
|
10808
|
+
"id": "VariableID:30894:36308"
|
|
10809
|
+
}
|
|
10810
|
+
},
|
|
10811
|
+
"scopes": [
|
|
10812
|
+
"ALL_SCOPES"
|
|
10813
|
+
],
|
|
10814
|
+
"codeSyntax": {}
|
|
10815
|
+
},
|
|
10616
10816
|
"VariableID:1:161": {
|
|
10617
10817
|
"name": "bg/neutral-weak-pressed",
|
|
10618
10818
|
"id": "VariableID:1:161",
|
|
@@ -10937,6 +11137,69 @@ const FIGMA_VARIABLES = {
|
|
|
10937
11137
|
],
|
|
10938
11138
|
"codeSyntax": {}
|
|
10939
11139
|
},
|
|
11140
|
+
"VariableID:58766:15459": {
|
|
11141
|
+
"name": "Component utility (Figma Only)/Select Box/1-column",
|
|
11142
|
+
"id": "VariableID:58766:15459",
|
|
11143
|
+
"remote": false,
|
|
11144
|
+
"key": "676178acd6e038ee5fe034a25818c16a4670a5b1",
|
|
11145
|
+
"variableCollectionId": "VariableCollectionId:1:197",
|
|
11146
|
+
"resolvedType": "FLOAT",
|
|
11147
|
+
"description": "(preview-width - x3 ) / 1 값입니다.",
|
|
11148
|
+
"hiddenFromPublishing": false,
|
|
11149
|
+
"valuesByMode": {
|
|
11150
|
+
"1:5": 358,
|
|
11151
|
+
"1:6": 358,
|
|
11152
|
+
"1:7": 358,
|
|
11153
|
+
"1:8": 358,
|
|
11154
|
+
"51907:0": 358
|
|
11155
|
+
},
|
|
11156
|
+
"scopes": [
|
|
11157
|
+
"ALL_SCOPES"
|
|
11158
|
+
],
|
|
11159
|
+
"codeSyntax": {}
|
|
11160
|
+
},
|
|
11161
|
+
"VariableID:58766:15458": {
|
|
11162
|
+
"name": "Component utility (Figma Only)/Select Box/2-column",
|
|
11163
|
+
"id": "VariableID:58766:15458",
|
|
11164
|
+
"remote": false,
|
|
11165
|
+
"key": "932afae9533322f9192fc8274b77a547d42a8804",
|
|
11166
|
+
"variableCollectionId": "VariableCollectionId:1:197",
|
|
11167
|
+
"resolvedType": "FLOAT",
|
|
11168
|
+
"description": "(preview-width - x3 ) / 2 값입니다.",
|
|
11169
|
+
"hiddenFromPublishing": false,
|
|
11170
|
+
"valuesByMode": {
|
|
11171
|
+
"1:5": 173,
|
|
11172
|
+
"1:6": 173,
|
|
11173
|
+
"1:7": 173,
|
|
11174
|
+
"1:8": 173,
|
|
11175
|
+
"51907:0": 173
|
|
11176
|
+
},
|
|
11177
|
+
"scopes": [
|
|
11178
|
+
"ALL_SCOPES"
|
|
11179
|
+
],
|
|
11180
|
+
"codeSyntax": {}
|
|
11181
|
+
},
|
|
11182
|
+
"VariableID:58766:15457": {
|
|
11183
|
+
"name": "Component utility (Figma Only)/Select Box/3-column",
|
|
11184
|
+
"id": "VariableID:58766:15457",
|
|
11185
|
+
"remote": false,
|
|
11186
|
+
"key": "f2cf2dfa2088f54ceafd7206b47bc2d3dbb057b0",
|
|
11187
|
+
"variableCollectionId": "VariableCollectionId:1:197",
|
|
11188
|
+
"resolvedType": "FLOAT",
|
|
11189
|
+
"description": "(preview-width - x3 ) / 3 값입니다.",
|
|
11190
|
+
"hiddenFromPublishing": false,
|
|
11191
|
+
"valuesByMode": {
|
|
11192
|
+
"1:5": 111.33000183105469,
|
|
11193
|
+
"1:6": 111.33000183105469,
|
|
11194
|
+
"1:7": 111.33000183105469,
|
|
11195
|
+
"1:8": 111.33000183105469,
|
|
11196
|
+
"51907:0": 111.33000183105469
|
|
11197
|
+
},
|
|
11198
|
+
"scopes": [
|
|
11199
|
+
"ALL_SCOPES"
|
|
11200
|
+
],
|
|
11201
|
+
"codeSyntax": {}
|
|
11202
|
+
},
|
|
10940
11203
|
"VariableID:6421:24605": {
|
|
10941
11204
|
"name": "dimension/spacing-x/between-chips",
|
|
10942
11205
|
"id": "VariableID:6421:24605",
|