@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
package/lib/index.js
CHANGED
|
@@ -90,7 +90,8 @@ export * from './codegen/index.js';
|
|
|
90
90
|
const effects = (node.effects ?? []).filter((effect)=>effect.visible !== false && (effect.type === "DROP_SHADOW" || effect.type === "INNER_SHADOW")).map((effect)=>{
|
|
91
91
|
const { type, color, offset, radius, spread, boundVariables } = effect;
|
|
92
92
|
return {
|
|
93
|
-
|
|
93
|
+
// remove fallback when resolved: https://github.com/figma/rest-api-spec/issues/84
|
|
94
|
+
type: type ?? "INNER_SHADOW",
|
|
94
95
|
color,
|
|
95
96
|
offset,
|
|
96
97
|
radius,
|
|
@@ -1509,6 +1510,16 @@ const FIGMA_ICONS = {
|
|
|
1509
1510
|
"type": "monochrome",
|
|
1510
1511
|
"weight": "Fill"
|
|
1511
1512
|
},
|
|
1513
|
+
"48d35e692e4cbeb1bfd0b0be28a800061173cf96": {
|
|
1514
|
+
"name": "icon_cart_items",
|
|
1515
|
+
"type": "monochrome",
|
|
1516
|
+
"weight": "Fill"
|
|
1517
|
+
},
|
|
1518
|
+
"15e92fded5d5306b62b634790f724a72ba8f7033": {
|
|
1519
|
+
"name": "icon_cart_items",
|
|
1520
|
+
"type": "monochrome",
|
|
1521
|
+
"weight": "Line"
|
|
1522
|
+
},
|
|
1512
1523
|
"f6be7d2997e4b139ae4850ee21869bc7e59ccc0b": {
|
|
1513
1524
|
"name": "icon_cart",
|
|
1514
1525
|
"type": "monochrome",
|
|
@@ -2074,6 +2085,16 @@ const FIGMA_ICONS = {
|
|
|
2074
2085
|
"type": "monochrome",
|
|
2075
2086
|
"weight": "Line"
|
|
2076
2087
|
},
|
|
2088
|
+
"8a20bac7b3ef03003f4395e5a5455a62fa363efc": {
|
|
2089
|
+
"name": "icon_exclamationmark_chatbubble_rectangular_center",
|
|
2090
|
+
"type": "monochrome",
|
|
2091
|
+
"weight": "Fill"
|
|
2092
|
+
},
|
|
2093
|
+
"2fe5521cf8ac4b67db3a1cd0a03847f54493583a": {
|
|
2094
|
+
"name": "icon_exclamationmark_chatbubble_rectangular_center",
|
|
2095
|
+
"type": "monochrome",
|
|
2096
|
+
"weight": "Line"
|
|
2097
|
+
},
|
|
2077
2098
|
"3e578773a3da74c255c4c9008914b247e0fc3d2b": {
|
|
2078
2099
|
"name": "icon_exclamationmark_circle",
|
|
2079
2100
|
"type": "monochrome",
|
|
@@ -4138,6 +4159,10 @@ const FIGMA_ICONS = {
|
|
|
4138
4159
|
"name": "icon_cart",
|
|
4139
4160
|
"type": "multicolor"
|
|
4140
4161
|
},
|
|
4162
|
+
"81a9d09867dbce6bbeca059a24c54ad23130a518": {
|
|
4163
|
+
"name": "icon_cart_items",
|
|
4164
|
+
"type": "multicolor"
|
|
4165
|
+
},
|
|
4141
4166
|
"51692e1d38d71ff24bbf5c7295da347d7700acbe": {
|
|
4142
4167
|
"name": "icon_cart_load",
|
|
4143
4168
|
"type": "multicolor"
|
|
@@ -4853,9 +4878,11 @@ const FIGMA_VARIABLE_COLLECTIONS = {
|
|
|
4853
4878
|
"VariableID:654:20851",
|
|
4854
4879
|
"VariableID:1:171",
|
|
4855
4880
|
"VariableID:41186:6437",
|
|
4856
|
-
"VariableID:1:158",
|
|
4857
4881
|
"VariableID:1:172",
|
|
4882
|
+
"VariableID:1:158",
|
|
4858
4883
|
"VariableID:1:161",
|
|
4884
|
+
"VariableID:59176:2",
|
|
4885
|
+
"VariableID:59176:3",
|
|
4859
4886
|
"VariableID:1:159",
|
|
4860
4887
|
"VariableID:576:22878",
|
|
4861
4888
|
"VariableID:10181:32557",
|
|
@@ -4900,8 +4927,8 @@ const FIGMA_VARIABLE_COLLECTIONS = {
|
|
|
4900
4927
|
"VariableID:12479:23364",
|
|
4901
4928
|
"VariableID:12479:23365",
|
|
4902
4929
|
"VariableID:12479:23366",
|
|
4903
|
-
"VariableID:12548:1437",
|
|
4904
4930
|
"VariableID:1:7",
|
|
4931
|
+
"VariableID:12548:1437",
|
|
4905
4932
|
"VariableID:12479:23367",
|
|
4906
4933
|
"VariableID:12479:23368",
|
|
4907
4934
|
"VariableID:12479:23371",
|
|
@@ -5252,9 +5279,9 @@ const FIGMA_VARIABLE_COLLECTIONS = {
|
|
|
5252
5279
|
"VariableID:289:13772",
|
|
5253
5280
|
"VariableID:1886:93038",
|
|
5254
5281
|
"VariableID:289:13773",
|
|
5255
|
-
"VariableID:796:4448",
|
|
5256
5282
|
"VariableID:15518:15916",
|
|
5257
5283
|
"VariableID:19225:68732",
|
|
5284
|
+
"VariableID:796:4448",
|
|
5258
5285
|
"VariableID:17955:50606",
|
|
5259
5286
|
"VariableID:514:13178",
|
|
5260
5287
|
"VariableID:535:1747",
|
|
@@ -5262,7 +5289,10 @@ const FIGMA_VARIABLE_COLLECTIONS = {
|
|
|
5262
5289
|
"VariableID:1700:4280",
|
|
5263
5290
|
"VariableID:1700:4281",
|
|
5264
5291
|
"VariableID:1700:4282",
|
|
5265
|
-
"VariableID:40279:20413"
|
|
5292
|
+
"VariableID:40279:20413",
|
|
5293
|
+
"VariableID:58766:15457",
|
|
5294
|
+
"VariableID:58766:15458",
|
|
5295
|
+
"VariableID:58766:15459"
|
|
5266
5296
|
]
|
|
5267
5297
|
},
|
|
5268
5298
|
"VariableCollectionId:6075:34487": {
|
|
@@ -6379,6 +6409,54 @@ const FIGMA_VARIABLES = {
|
|
|
6379
6409
|
],
|
|
6380
6410
|
"codeSyntax": {}
|
|
6381
6411
|
},
|
|
6412
|
+
"VariableID:59176:2": {
|
|
6413
|
+
"name": "bg/neutral-weak-alpha",
|
|
6414
|
+
"id": "VariableID:59176:2",
|
|
6415
|
+
"remote": false,
|
|
6416
|
+
"key": "082218bada1fc4e2688ad59f30a980c191caf7b7",
|
|
6417
|
+
"variableCollectionId": "VariableCollectionId:1:3",
|
|
6418
|
+
"resolvedType": "COLOR",
|
|
6419
|
+
"description": "",
|
|
6420
|
+
"hiddenFromPublishing": false,
|
|
6421
|
+
"valuesByMode": {
|
|
6422
|
+
"1928:7": {
|
|
6423
|
+
"type": "VARIABLE_ALIAS",
|
|
6424
|
+
"id": "VariableID:30894:36296"
|
|
6425
|
+
},
|
|
6426
|
+
"1928:8": {
|
|
6427
|
+
"type": "VARIABLE_ALIAS",
|
|
6428
|
+
"id": "VariableID:30894:36307"
|
|
6429
|
+
}
|
|
6430
|
+
},
|
|
6431
|
+
"scopes": [
|
|
6432
|
+
"ALL_SCOPES"
|
|
6433
|
+
],
|
|
6434
|
+
"codeSyntax": {}
|
|
6435
|
+
},
|
|
6436
|
+
"VariableID:59176:3": {
|
|
6437
|
+
"name": "bg/neutral-weak-alpha-pressed",
|
|
6438
|
+
"id": "VariableID:59176:3",
|
|
6439
|
+
"remote": false,
|
|
6440
|
+
"key": "b67dd2511e5e4f41e0e392925fcccc752c67631f",
|
|
6441
|
+
"variableCollectionId": "VariableCollectionId:1:3",
|
|
6442
|
+
"resolvedType": "COLOR",
|
|
6443
|
+
"description": "",
|
|
6444
|
+
"hiddenFromPublishing": false,
|
|
6445
|
+
"valuesByMode": {
|
|
6446
|
+
"1928:7": {
|
|
6447
|
+
"type": "VARIABLE_ALIAS",
|
|
6448
|
+
"id": "VariableID:30894:36297"
|
|
6449
|
+
},
|
|
6450
|
+
"1928:8": {
|
|
6451
|
+
"type": "VARIABLE_ALIAS",
|
|
6452
|
+
"id": "VariableID:30894:36308"
|
|
6453
|
+
}
|
|
6454
|
+
},
|
|
6455
|
+
"scopes": [
|
|
6456
|
+
"ALL_SCOPES"
|
|
6457
|
+
],
|
|
6458
|
+
"codeSyntax": {}
|
|
6459
|
+
},
|
|
6382
6460
|
"VariableID:1:161": {
|
|
6383
6461
|
"name": "bg/neutral-weak-pressed",
|
|
6384
6462
|
"id": "VariableID:1:161",
|
|
@@ -6703,6 +6781,69 @@ const FIGMA_VARIABLES = {
|
|
|
6703
6781
|
],
|
|
6704
6782
|
"codeSyntax": {}
|
|
6705
6783
|
},
|
|
6784
|
+
"VariableID:58766:15459": {
|
|
6785
|
+
"name": "Component utility (Figma Only)/Select Box/1-column",
|
|
6786
|
+
"id": "VariableID:58766:15459",
|
|
6787
|
+
"remote": false,
|
|
6788
|
+
"key": "676178acd6e038ee5fe034a25818c16a4670a5b1",
|
|
6789
|
+
"variableCollectionId": "VariableCollectionId:1:197",
|
|
6790
|
+
"resolvedType": "FLOAT",
|
|
6791
|
+
"description": "(preview-width - x3 ) / 1 값입니다.",
|
|
6792
|
+
"hiddenFromPublishing": false,
|
|
6793
|
+
"valuesByMode": {
|
|
6794
|
+
"1:5": 358,
|
|
6795
|
+
"1:6": 358,
|
|
6796
|
+
"1:7": 358,
|
|
6797
|
+
"1:8": 358,
|
|
6798
|
+
"51907:0": 358
|
|
6799
|
+
},
|
|
6800
|
+
"scopes": [
|
|
6801
|
+
"ALL_SCOPES"
|
|
6802
|
+
],
|
|
6803
|
+
"codeSyntax": {}
|
|
6804
|
+
},
|
|
6805
|
+
"VariableID:58766:15458": {
|
|
6806
|
+
"name": "Component utility (Figma Only)/Select Box/2-column",
|
|
6807
|
+
"id": "VariableID:58766:15458",
|
|
6808
|
+
"remote": false,
|
|
6809
|
+
"key": "932afae9533322f9192fc8274b77a547d42a8804",
|
|
6810
|
+
"variableCollectionId": "VariableCollectionId:1:197",
|
|
6811
|
+
"resolvedType": "FLOAT",
|
|
6812
|
+
"description": "(preview-width - x3 ) / 2 값입니다.",
|
|
6813
|
+
"hiddenFromPublishing": false,
|
|
6814
|
+
"valuesByMode": {
|
|
6815
|
+
"1:5": 173,
|
|
6816
|
+
"1:6": 173,
|
|
6817
|
+
"1:7": 173,
|
|
6818
|
+
"1:8": 173,
|
|
6819
|
+
"51907:0": 173
|
|
6820
|
+
},
|
|
6821
|
+
"scopes": [
|
|
6822
|
+
"ALL_SCOPES"
|
|
6823
|
+
],
|
|
6824
|
+
"codeSyntax": {}
|
|
6825
|
+
},
|
|
6826
|
+
"VariableID:58766:15457": {
|
|
6827
|
+
"name": "Component utility (Figma Only)/Select Box/3-column",
|
|
6828
|
+
"id": "VariableID:58766:15457",
|
|
6829
|
+
"remote": false,
|
|
6830
|
+
"key": "f2cf2dfa2088f54ceafd7206b47bc2d3dbb057b0",
|
|
6831
|
+
"variableCollectionId": "VariableCollectionId:1:197",
|
|
6832
|
+
"resolvedType": "FLOAT",
|
|
6833
|
+
"description": "(preview-width - x3 ) / 3 값입니다.",
|
|
6834
|
+
"hiddenFromPublishing": false,
|
|
6835
|
+
"valuesByMode": {
|
|
6836
|
+
"1:5": 111.33000183105469,
|
|
6837
|
+
"1:6": 111.33000183105469,
|
|
6838
|
+
"1:7": 111.33000183105469,
|
|
6839
|
+
"1:8": 111.33000183105469,
|
|
6840
|
+
"51907:0": 111.33000183105469
|
|
6841
|
+
},
|
|
6842
|
+
"scopes": [
|
|
6843
|
+
"ALL_SCOPES"
|
|
6844
|
+
],
|
|
6845
|
+
"codeSyntax": {}
|
|
6846
|
+
},
|
|
6706
6847
|
"VariableID:6421:24605": {
|
|
6707
6848
|
"name": "dimension/spacing-x/between-chips",
|
|
6708
6849
|
"id": "VariableID:6421:24605",
|
|
@@ -12304,26 +12445,21 @@ const templateDisclaimer = {
|
|
|
12304
12445
|
}
|
|
12305
12446
|
}
|
|
12306
12447
|
};
|
|
12307
|
-
const
|
|
12308
|
-
"name": "
|
|
12309
|
-
"key": "
|
|
12448
|
+
const templateResultPage = {
|
|
12449
|
+
"name": "templateResultPage",
|
|
12450
|
+
"key": "4cc94782abbe7e58f0401c29ad8880a62e512ae7",
|
|
12310
12451
|
"componentPropertyDefinitions": {
|
|
12311
|
-
"
|
|
12312
|
-
"type": "
|
|
12313
|
-
"variantOptions": [
|
|
12314
|
-
"Checkbox",
|
|
12315
|
-
"Radio"
|
|
12316
|
-
]
|
|
12452
|
+
"Show Top Navigation#58717:0": {
|
|
12453
|
+
"type": "BOOLEAN"
|
|
12317
12454
|
},
|
|
12318
|
-
"
|
|
12455
|
+
"Show Bottom Action Bar#59845:0": {
|
|
12456
|
+
"type": "BOOLEAN"
|
|
12457
|
+
},
|
|
12458
|
+
"Show Bottom Action Bar": {
|
|
12319
12459
|
"type": "VARIANT",
|
|
12320
12460
|
"variantOptions": [
|
|
12321
|
-
"
|
|
12322
|
-
"
|
|
12323
|
-
"3",
|
|
12324
|
-
"4",
|
|
12325
|
-
"5",
|
|
12326
|
-
"6"
|
|
12461
|
+
"True",
|
|
12462
|
+
"False"
|
|
12327
12463
|
]
|
|
12328
12464
|
}
|
|
12329
12465
|
}
|
|
@@ -13069,6 +13205,164 @@ const helpBubble = {
|
|
|
13069
13205
|
}
|
|
13070
13206
|
}
|
|
13071
13207
|
};
|
|
13208
|
+
const imageFrame = {
|
|
13209
|
+
"name": "imageFrame",
|
|
13210
|
+
"key": "b12f0bdeb6c6a61e0d50fe7e0dfae8ecd323f0aa",
|
|
13211
|
+
"componentPropertyDefinitions": {
|
|
13212
|
+
"Has Image Contents#29729:0": {
|
|
13213
|
+
"type": "BOOLEAN"
|
|
13214
|
+
},
|
|
13215
|
+
"Left Top#58686:0": {
|
|
13216
|
+
"type": "INSTANCE_SWAP",
|
|
13217
|
+
"preferredValues": [
|
|
13218
|
+
{
|
|
13219
|
+
"type": "COMPONENT",
|
|
13220
|
+
"key": "00da9dcf0cc4e408d2e36da56d0701dce6cee6b0"
|
|
13221
|
+
},
|
|
13222
|
+
{
|
|
13223
|
+
"type": "COMPONENT",
|
|
13224
|
+
"key": "0135e13dd2ded277e5d024f2d9ccc37f9aa7cf38"
|
|
13225
|
+
},
|
|
13226
|
+
{
|
|
13227
|
+
"type": "COMPONENT",
|
|
13228
|
+
"key": "146925b01e772269f042df51f8d2cd5b4e492111"
|
|
13229
|
+
},
|
|
13230
|
+
{
|
|
13231
|
+
"type": "COMPONENT",
|
|
13232
|
+
"key": "a711c13770db66a6a9d8dfec9205b301fb4abf4d"
|
|
13233
|
+
},
|
|
13234
|
+
{
|
|
13235
|
+
"type": "COMPONENT",
|
|
13236
|
+
"key": "4907a3a324539a374a81c8255ac8ae2fc6769622"
|
|
13237
|
+
}
|
|
13238
|
+
]
|
|
13239
|
+
},
|
|
13240
|
+
"Show Overlay#58686:33": {
|
|
13241
|
+
"type": "BOOLEAN"
|
|
13242
|
+
},
|
|
13243
|
+
"Right Top#58686:66": {
|
|
13244
|
+
"type": "INSTANCE_SWAP",
|
|
13245
|
+
"preferredValues": [
|
|
13246
|
+
{
|
|
13247
|
+
"type": "COMPONENT",
|
|
13248
|
+
"key": "a711c13770db66a6a9d8dfec9205b301fb4abf4d"
|
|
13249
|
+
},
|
|
13250
|
+
{
|
|
13251
|
+
"type": "COMPONENT",
|
|
13252
|
+
"key": "00da9dcf0cc4e408d2e36da56d0701dce6cee6b0"
|
|
13253
|
+
},
|
|
13254
|
+
{
|
|
13255
|
+
"type": "COMPONENT",
|
|
13256
|
+
"key": "0135e13dd2ded277e5d024f2d9ccc37f9aa7cf38"
|
|
13257
|
+
},
|
|
13258
|
+
{
|
|
13259
|
+
"type": "COMPONENT",
|
|
13260
|
+
"key": "146925b01e772269f042df51f8d2cd5b4e492111"
|
|
13261
|
+
},
|
|
13262
|
+
{
|
|
13263
|
+
"type": "COMPONENT",
|
|
13264
|
+
"key": "4907a3a324539a374a81c8255ac8ae2fc6769622"
|
|
13265
|
+
}
|
|
13266
|
+
]
|
|
13267
|
+
},
|
|
13268
|
+
"Left Bottom#58686:99": {
|
|
13269
|
+
"type": "INSTANCE_SWAP",
|
|
13270
|
+
"preferredValues": [
|
|
13271
|
+
{
|
|
13272
|
+
"type": "COMPONENT",
|
|
13273
|
+
"key": "00da9dcf0cc4e408d2e36da56d0701dce6cee6b0"
|
|
13274
|
+
},
|
|
13275
|
+
{
|
|
13276
|
+
"type": "COMPONENT",
|
|
13277
|
+
"key": "0135e13dd2ded277e5d024f2d9ccc37f9aa7cf38"
|
|
13278
|
+
},
|
|
13279
|
+
{
|
|
13280
|
+
"type": "COMPONENT",
|
|
13281
|
+
"key": "146925b01e772269f042df51f8d2cd5b4e492111"
|
|
13282
|
+
},
|
|
13283
|
+
{
|
|
13284
|
+
"type": "COMPONENT",
|
|
13285
|
+
"key": "a711c13770db66a6a9d8dfec9205b301fb4abf4d"
|
|
13286
|
+
},
|
|
13287
|
+
{
|
|
13288
|
+
"type": "COMPONENT",
|
|
13289
|
+
"key": "4907a3a324539a374a81c8255ac8ae2fc6769622"
|
|
13290
|
+
}
|
|
13291
|
+
]
|
|
13292
|
+
},
|
|
13293
|
+
"Right Bottom#58686:132": {
|
|
13294
|
+
"type": "INSTANCE_SWAP",
|
|
13295
|
+
"preferredValues": [
|
|
13296
|
+
{
|
|
13297
|
+
"type": "COMPONENT",
|
|
13298
|
+
"key": "a711c13770db66a6a9d8dfec9205b301fb4abf4d"
|
|
13299
|
+
},
|
|
13300
|
+
{
|
|
13301
|
+
"type": "COMPONENT",
|
|
13302
|
+
"key": "00da9dcf0cc4e408d2e36da56d0701dce6cee6b0"
|
|
13303
|
+
},
|
|
13304
|
+
{
|
|
13305
|
+
"type": "COMPONENT",
|
|
13306
|
+
"key": "0135e13dd2ded277e5d024f2d9ccc37f9aa7cf38"
|
|
13307
|
+
},
|
|
13308
|
+
{
|
|
13309
|
+
"type": "COMPONENT",
|
|
13310
|
+
"key": "146925b01e772269f042df51f8d2cd5b4e492111"
|
|
13311
|
+
},
|
|
13312
|
+
{
|
|
13313
|
+
"type": "COMPONENT",
|
|
13314
|
+
"key": "4907a3a324539a374a81c8255ac8ae2fc6769622"
|
|
13315
|
+
}
|
|
13316
|
+
]
|
|
13317
|
+
},
|
|
13318
|
+
"ㄴ Left Top#58686:165": {
|
|
13319
|
+
"type": "BOOLEAN"
|
|
13320
|
+
},
|
|
13321
|
+
"ㄴ Right Top#58686:198": {
|
|
13322
|
+
"type": "BOOLEAN"
|
|
13323
|
+
},
|
|
13324
|
+
"ㄴ Left Bottom#58686:231": {
|
|
13325
|
+
"type": "BOOLEAN"
|
|
13326
|
+
},
|
|
13327
|
+
"ㄴ Right Bottom#58686:264": {
|
|
13328
|
+
"type": "BOOLEAN"
|
|
13329
|
+
},
|
|
13330
|
+
"Ratio": {
|
|
13331
|
+
"type": "VARIANT",
|
|
13332
|
+
"variantOptions": [
|
|
13333
|
+
"1:1",
|
|
13334
|
+
"2:1",
|
|
13335
|
+
"16:9",
|
|
13336
|
+
"4:3",
|
|
13337
|
+
"6:7",
|
|
13338
|
+
"4:5",
|
|
13339
|
+
"2:3"
|
|
13340
|
+
]
|
|
13341
|
+
},
|
|
13342
|
+
"Size": {
|
|
13343
|
+
"type": "VARIANT",
|
|
13344
|
+
"variantOptions": [
|
|
13345
|
+
"20",
|
|
13346
|
+
"24",
|
|
13347
|
+
"36",
|
|
13348
|
+
"42",
|
|
13349
|
+
"48",
|
|
13350
|
+
"64",
|
|
13351
|
+
"80",
|
|
13352
|
+
"96",
|
|
13353
|
+
"120",
|
|
13354
|
+
"\bFree"
|
|
13355
|
+
]
|
|
13356
|
+
},
|
|
13357
|
+
"Rounded": {
|
|
13358
|
+
"type": "VARIANT",
|
|
13359
|
+
"variantOptions": [
|
|
13360
|
+
"True",
|
|
13361
|
+
"False"
|
|
13362
|
+
]
|
|
13363
|
+
}
|
|
13364
|
+
}
|
|
13365
|
+
};
|
|
13072
13366
|
const listHeader = {
|
|
13073
13367
|
"name": "listHeader",
|
|
13074
13368
|
"key": "609f93ed0608ef0a6d9a351e47595ad631bae0fa",
|
|
@@ -13695,42 +13989,6 @@ const segmentedControl = {
|
|
|
13695
13989
|
}
|
|
13696
13990
|
}
|
|
13697
13991
|
};
|
|
13698
|
-
const selectBox = {
|
|
13699
|
-
"name": "selectBox",
|
|
13700
|
-
"key": "38722ffeb4c966256a709155e8ddac50c93d7c60",
|
|
13701
|
-
"componentPropertyDefinitions": {
|
|
13702
|
-
"Show Description#3033:0": {
|
|
13703
|
-
"type": "BOOLEAN"
|
|
13704
|
-
},
|
|
13705
|
-
"Description #3033:5": {
|
|
13706
|
-
"type": "TEXT"
|
|
13707
|
-
},
|
|
13708
|
-
"Label#3635:0": {
|
|
13709
|
-
"type": "TEXT"
|
|
13710
|
-
},
|
|
13711
|
-
"Control": {
|
|
13712
|
-
"type": "VARIANT",
|
|
13713
|
-
"variantOptions": [
|
|
13714
|
-
"Checkbox",
|
|
13715
|
-
"Radio"
|
|
13716
|
-
]
|
|
13717
|
-
},
|
|
13718
|
-
"Selected": {
|
|
13719
|
-
"type": "VARIANT",
|
|
13720
|
-
"variantOptions": [
|
|
13721
|
-
"True",
|
|
13722
|
-
"False"
|
|
13723
|
-
]
|
|
13724
|
-
},
|
|
13725
|
-
"State": {
|
|
13726
|
-
"type": "VARIANT",
|
|
13727
|
-
"variantOptions": [
|
|
13728
|
-
"Enabled",
|
|
13729
|
-
"Pressed"
|
|
13730
|
-
]
|
|
13731
|
-
}
|
|
13732
|
-
}
|
|
13733
|
-
};
|
|
13734
13992
|
const skeleton = {
|
|
13735
13993
|
"name": "skeleton",
|
|
13736
13994
|
"key": "ef22c3288722fbfa64a5ab73df397ade88f8e05a",
|
|
@@ -14130,6 +14388,7 @@ var FIGMA_COMPONENTS = {
|
|
|
14130
14388
|
divider: divider,
|
|
14131
14389
|
floatingActionButton: floatingActionButton,
|
|
14132
14390
|
helpBubble: helpBubble,
|
|
14391
|
+
imageFrame: imageFrame,
|
|
14133
14392
|
listHeader: listHeader,
|
|
14134
14393
|
listItem: listItem,
|
|
14135
14394
|
mannerTemp: mannerTemp,
|
|
@@ -14146,7 +14405,6 @@ var FIGMA_COMPONENTS = {
|
|
|
14146
14405
|
rootTopNavigationGlobal: rootTopNavigationGlobal,
|
|
14147
14406
|
rootTopNavigationKr: rootTopNavigationKr,
|
|
14148
14407
|
segmentedControl: segmentedControl,
|
|
14149
|
-
selectBox: selectBox,
|
|
14150
14408
|
skeleton: skeleton,
|
|
14151
14409
|
slider: slider,
|
|
14152
14410
|
snackbar: snackbar,
|
|
@@ -14158,7 +14416,7 @@ var FIGMA_COMPONENTS = {
|
|
|
14158
14416
|
templateChipGroup: templateChipGroup,
|
|
14159
14417
|
templateCustomPickerField: templateCustomPickerField,
|
|
14160
14418
|
templateDisclaimer: templateDisclaimer,
|
|
14161
|
-
|
|
14419
|
+
templateResultPage: templateResultPage,
|
|
14162
14420
|
templateSliderField: templateSliderField,
|
|
14163
14421
|
templateTextField: templateTextField,
|
|
14164
14422
|
templateTextareaField: templateTextareaField,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seed-design/figma",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.18",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/daangn/seed-design.git",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@figma/plugin-typings": "^1.110.0",
|
|
48
48
|
"@figma/rest-api-spec": "^0.35.0",
|
|
49
|
-
"@karrotmarket/icon-data": "^1.
|
|
49
|
+
"@karrotmarket/icon-data": "^1.17.0",
|
|
50
50
|
"@seed-design/figma-extractor": "^1.0.0",
|
|
51
51
|
"typescript": "^5.9.2"
|
|
52
52
|
},
|
|
@@ -378,14 +378,6 @@ export type ToggleButtonProperties = InferComponentDefinition<
|
|
|
378
378
|
typeof sets.toggleButton.componentPropertyDefinitions
|
|
379
379
|
>;
|
|
380
380
|
|
|
381
|
-
export type SelectBoxGroupProperties = InferComponentDefinition<
|
|
382
|
-
typeof sets.templateSelectBoxGroup.componentPropertyDefinitions
|
|
383
|
-
>;
|
|
384
|
-
|
|
385
|
-
export type SelectBoxProperties = InferComponentDefinition<
|
|
386
|
-
typeof sets.selectBox.componentPropertyDefinitions
|
|
387
|
-
>;
|
|
388
|
-
|
|
389
381
|
export type AppBarProperties = InferComponentDefinition<
|
|
390
382
|
typeof sets.topNavigation.componentPropertyDefinitions
|
|
391
383
|
>;
|
|
@@ -982,3 +974,38 @@ export type LegacyMultilineTextFieldProperties = InferComponentDefinition<{
|
|
|
982
974
|
variantOptions: ["True", "False"];
|
|
983
975
|
};
|
|
984
976
|
}>;
|
|
977
|
+
|
|
978
|
+
export type LegacySelectBoxProperties = InferComponentDefinition<{
|
|
979
|
+
"Show Description#3033:0": {
|
|
980
|
+
type: "BOOLEAN";
|
|
981
|
+
};
|
|
982
|
+
"Description #3033:5": {
|
|
983
|
+
type: "TEXT";
|
|
984
|
+
};
|
|
985
|
+
"Label#3635:0": {
|
|
986
|
+
type: "TEXT";
|
|
987
|
+
};
|
|
988
|
+
Control: {
|
|
989
|
+
type: "VARIANT";
|
|
990
|
+
variantOptions: ["Checkbox", "Radio"];
|
|
991
|
+
};
|
|
992
|
+
Selected: {
|
|
993
|
+
type: "VARIANT";
|
|
994
|
+
variantOptions: ["True", "False"];
|
|
995
|
+
};
|
|
996
|
+
State: {
|
|
997
|
+
type: "VARIANT";
|
|
998
|
+
variantOptions: ["Enabled", "Pressed"];
|
|
999
|
+
};
|
|
1000
|
+
}>;
|
|
1001
|
+
|
|
1002
|
+
export type LegacySelectBoxGroupProperties = InferComponentDefinition<{
|
|
1003
|
+
Control: {
|
|
1004
|
+
type: "VARIANT";
|
|
1005
|
+
variantOptions: ["Checkbox", "Radio"];
|
|
1006
|
+
};
|
|
1007
|
+
"Item Count": {
|
|
1008
|
+
type: "VARIANT";
|
|
1009
|
+
variantOptions: ["1", "2", "3", "4", "5", "6"];
|
|
1010
|
+
};
|
|
1011
|
+
}>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
LegacySelectBoxGroupProperties,
|
|
3
|
+
LegacySelectBoxProperties,
|
|
4
|
+
} from "@/codegen/component-properties";
|
|
2
5
|
import { defineComponentHandler } from "@/codegen/core";
|
|
3
|
-
import * as metadata from "@/entities/data/__generated__/component-sets";
|
|
4
6
|
import { findAllInstances } from "@/utils/figma-node";
|
|
5
7
|
import { match } from "ts-pattern";
|
|
6
8
|
import { createLocalSnippetHelper, createSeedReactElement } from "../../element-factories";
|
|
@@ -8,9 +10,12 @@ import type { ComponentHandlerDeps } from "../deps.interface";
|
|
|
8
10
|
|
|
9
11
|
const { createLocalSnippetElement } = createLocalSnippetHelper("select-box");
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
const LEGACY_SELECT_BOX_KEY = "38722ffeb4c966256a709155e8ddac50c93d7c60";
|
|
14
|
+
const LEGACY_SELECT_BOX_GROUP_KEY = "a3d58bb8540600878742cdcf2608a4b3851667ec";
|
|
15
|
+
|
|
16
|
+
export const createLegacySelectBoxHandler = (_ctx: ComponentHandlerDeps) =>
|
|
17
|
+
defineComponentHandler<LegacySelectBoxProperties>(
|
|
18
|
+
LEGACY_SELECT_BOX_KEY,
|
|
14
19
|
({ componentProperties: props }) => {
|
|
15
20
|
const tag = match(props.Control.value)
|
|
16
21
|
.with("Checkbox", () => "CheckSelectBox")
|
|
@@ -31,15 +36,18 @@ export const createSelectBoxHandler = (_ctx: ComponentHandlerDeps) =>
|
|
|
31
36
|
}),
|
|
32
37
|
};
|
|
33
38
|
|
|
34
|
-
return createLocalSnippetElement(tag, commonProps
|
|
39
|
+
return createLocalSnippetElement(tag, commonProps, undefined, {
|
|
40
|
+
comment:
|
|
41
|
+
"이 Figma 컴포넌트는 @seed-design/react@1.2보다 낮은 버전의 SelectBox입니다. 신규 컴포넌트로 교체할 수 있습니다.",
|
|
42
|
+
});
|
|
35
43
|
},
|
|
36
44
|
);
|
|
37
45
|
|
|
38
|
-
export const
|
|
39
|
-
const selectBoxHandler =
|
|
46
|
+
export const createLegacySelectBoxGroupHandler = (ctx: ComponentHandlerDeps) => {
|
|
47
|
+
const selectBoxHandler = createLegacySelectBoxHandler(ctx);
|
|
40
48
|
|
|
41
|
-
return defineComponentHandler<
|
|
42
|
-
|
|
49
|
+
return defineComponentHandler<LegacySelectBoxGroupProperties>(
|
|
50
|
+
LEGACY_SELECT_BOX_GROUP_KEY,
|
|
43
51
|
(node, traverse) => {
|
|
44
52
|
const props = node.componentProperties;
|
|
45
53
|
|
|
@@ -48,7 +56,7 @@ export const createSelectBoxGroupHandler = (ctx: ComponentHandlerDeps) => {
|
|
|
48
56
|
.with("Radio", () => "RadioSelectBoxRoot")
|
|
49
57
|
.exhaustive();
|
|
50
58
|
|
|
51
|
-
const selectBoxes = findAllInstances<
|
|
59
|
+
const selectBoxes = findAllInstances<LegacySelectBoxProperties>({
|
|
52
60
|
node,
|
|
53
61
|
key: selectBoxHandler.key,
|
|
54
62
|
});
|
|
@@ -72,7 +80,10 @@ export const createSelectBoxGroupHandler = (ctx: ComponentHandlerDeps) => {
|
|
|
72
80
|
}),
|
|
73
81
|
};
|
|
74
82
|
|
|
75
|
-
return createLocalSnippetElement(tag, commonProps, stack
|
|
83
|
+
return createLocalSnippetElement(tag, commonProps, stack, {
|
|
84
|
+
comment:
|
|
85
|
+
"이 Figma 컴포넌트는 @seed-design/react@1.2보다 낮은 버전의 SelectBox입니다. 신규 컴포넌트로 교체할 수 있습니다.",
|
|
86
|
+
});
|
|
76
87
|
},
|
|
77
88
|
);
|
|
78
89
|
};
|
|
@@ -112,7 +112,8 @@ export const createLegacyTextFieldHandler = (ctx: ComponentHandlerDeps) =>
|
|
|
112
112
|
const TextFieldChildren = createLocalSnippetElement("TextFieldInput", inputProps);
|
|
113
113
|
|
|
114
114
|
return createLocalSnippetElement("TextField", commonProps, TextFieldChildren, {
|
|
115
|
-
comment:
|
|
115
|
+
comment:
|
|
116
|
+
"이 Figma 컴포넌트는 @seed-design/react@1.1보다 낮은 버전의 TextField입니다. 신규 컴포넌트로 교체할 수 있습니다.",
|
|
116
117
|
});
|
|
117
118
|
},
|
|
118
119
|
);
|
|
@@ -190,7 +191,8 @@ export const createLegacyMultilineTextFieldHandler = (_ctx: ComponentHandlerDeps
|
|
|
190
191
|
const TextFieldChildren = createLocalSnippetElement("TextFieldTextarea", inputProps);
|
|
191
192
|
|
|
192
193
|
return createLocalSnippetElement("TextField", commonProps, TextFieldChildren, {
|
|
193
|
-
comment:
|
|
194
|
+
comment:
|
|
195
|
+
"이 Figma 컴포넌트는 @seed-design/react@1.1보다 낮은 버전의 TextField입니다. 신규 컴포넌트로 교체할 수 있습니다.",
|
|
194
196
|
});
|
|
195
197
|
},
|
|
196
198
|
);
|
|
@@ -40,7 +40,6 @@ import { createRadiomarkHandler } from "@/codegen/targets/react/component/handle
|
|
|
40
40
|
import { createReactionButtonHandler } from "./handlers/reaction-button";
|
|
41
41
|
import { createResultSectionHandler } from "./handlers/result-section";
|
|
42
42
|
import { createSegmentedControlHandler } from "./handlers/segmented-control";
|
|
43
|
-
import { createSelectBoxGroupHandler, createSelectBoxHandler } from "./handlers/select-box";
|
|
44
43
|
import { createSkeletonHandler } from "./handlers/skeleton";
|
|
45
44
|
import {
|
|
46
45
|
createSliderHandler,
|
|
@@ -60,6 +59,10 @@ import {
|
|
|
60
59
|
createLegacyTextFieldHandler,
|
|
61
60
|
createLegacyMultilineTextFieldHandler,
|
|
62
61
|
} from "./handlers/legacy-text-field";
|
|
62
|
+
import {
|
|
63
|
+
createLegacySelectBoxHandler,
|
|
64
|
+
createLegacySelectBoxGroupHandler,
|
|
65
|
+
} from "./handlers/legacy-select-box";
|
|
63
66
|
|
|
64
67
|
export type { ComponentHandlerDeps };
|
|
65
68
|
export type UnboundComponentHandler<T extends NormalizedInstanceNode["componentProperties"]> = (
|
|
@@ -97,8 +100,10 @@ export const unboundSeedComponentHandlers: Array<UnboundComponentHandler<any>> =
|
|
|
97
100
|
createAvatarHandler,
|
|
98
101
|
createAvatarStackHandler,
|
|
99
102
|
createSegmentedControlHandler,
|
|
100
|
-
|
|
101
|
-
|
|
103
|
+
|
|
104
|
+
createLegacySelectBoxHandler,
|
|
105
|
+
createLegacySelectBoxGroupHandler,
|
|
106
|
+
|
|
102
107
|
createSliderHandler,
|
|
103
108
|
createSliderFieldHandler,
|
|
104
109
|
createTabsHandler,
|