@seed-design/figma 1.0.6-alpha-20251021104301 → 1.0.6

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.
@@ -998,11 +998,11 @@ const FIGMA_VARIABLE_COLLECTIONS = {
998
998
  "VariableID:1:155",
999
999
  "VariableID:1:156",
1000
1000
  "VariableID:1:164",
1001
- "VariableID:1:165",
1002
1001
  "VariableID:1:157",
1003
- "VariableID:1:171",
1002
+ "VariableID:1:165",
1004
1003
  "VariableID:238:17662",
1005
1004
  "VariableID:17544:4057",
1005
+ "VariableID:1:171",
1006
1006
  "VariableID:41186:6437",
1007
1007
  "VariableID:670:2700",
1008
1008
  "VariableID:1:158",
@@ -1079,14 +1079,14 @@ const FIGMA_VARIABLE_COLLECTIONS = {
1079
1079
  "VariableID:14609:41561",
1080
1080
  "VariableID:14609:41562",
1081
1081
  "VariableID:14609:41563",
1082
- "VariableID:29453:35711",
1083
1082
  "VariableID:12548:1440",
1083
+ "VariableID:29453:35711",
1084
1084
  "VariableID:29453:35712",
1085
1085
  "VariableID:12548:1441",
1086
1086
  "VariableID:12548:1442",
1087
1087
  "VariableID:12548:1443",
1088
- "VariableID:12548:1444",
1089
1088
  "VariableID:1:21",
1089
+ "VariableID:12548:1444",
1090
1090
  "VariableID:12548:1445",
1091
1091
  "VariableID:1:30",
1092
1092
  "VariableID:1883:92912",
@@ -1344,9 +1344,9 @@ const FIGMA_VARIABLE_COLLECTIONS = {
1344
1344
  "VariableID:289:13772",
1345
1345
  "VariableID:1886:93038",
1346
1346
  "VariableID:289:13773",
1347
- "VariableID:796:4448",
1348
1347
  "VariableID:15518:15916",
1349
1348
  "VariableID:19225:68732",
1349
+ "VariableID:796:4448",
1350
1350
  "VariableID:17955:50606",
1351
1351
  "VariableID:514:13178",
1352
1352
  "VariableID:535:1747",
@@ -4658,9 +4658,9 @@ const FIGMA_VARIABLES = {
4658
4658
  "hiddenFromPublishing": false,
4659
4659
  "valuesByMode": {
4660
4660
  "1928:7": {
4661
- "r": 1,
4662
- "g": 0.9254902005195618,
4663
- "b": 0.9215686321258545,
4661
+ "r": 0.9919999837875366,
4662
+ "g": 0.9279999732971191,
4663
+ "b": 0.9301332831382751,
4664
4664
  "a": 1
4665
4665
  },
4666
4666
  "1928:8": {
@@ -4686,9 +4686,9 @@ const FIGMA_VARIABLES = {
4686
4686
  "hiddenFromPublishing": false,
4687
4687
  "valuesByMode": {
4688
4688
  "1928:7": {
4689
- "r": 0.9529411792755127,
4690
- "g": 0.03921568766236305,
4691
- "b": 0.007843137718737125,
4689
+ "r": 0.9079999923706055,
4690
+ "g": 0.171999990940094,
4691
+ "b": 0.2701333165168762,
4692
4692
  "a": 1
4693
4693
  },
4694
4694
  "1928:8": {
@@ -8312,11 +8312,11 @@ const actionButton = {
8312
8312
  "type": "VARIANT",
8313
8313
  "variantOptions": [
8314
8314
  "Neutral Solid",
8315
- "Neutral Weak",
8316
- "Neutral Outline",
8317
8315
  "Brand Solid",
8316
+ "Critical Solid",
8317
+ "Neutral Weak",
8318
8318
  "Brand Outline",
8319
- "Critical Solid"
8319
+ "Neutral Outline"
8320
8320
  ]
8321
8321
  },
8322
8322
  "State": {
@@ -8572,9 +8572,10 @@ const callout = {
8572
8572
  "variantOptions": [
8573
8573
  "Neutral",
8574
8574
  "Informative",
8575
- "Warning",
8576
8575
  "Critical",
8577
- "Magic"
8576
+ "Warning",
8577
+ "Magic",
8578
+ "Positive"
8578
8579
  ]
8579
8580
  },
8580
8581
  "Show Title": {
@@ -9370,8 +9371,8 @@ const radio = {
9370
9371
  "Tone": {
9371
9372
  "type": "VARIANT",
9372
9373
  "variantOptions": [
9373
- "🚫[Deprecated]Brand",
9374
- "Neutral"
9374
+ "Neutral",
9375
+ "🚫[Deprecated]Brand"
9375
9376
  ]
9376
9377
  },
9377
9378
  "Weight": {
@@ -9780,6 +9781,29 @@ const tabs = {
9780
9781
  }
9781
9782
  }
9782
9783
  };
9784
+ const tagGroup = {
9785
+ "name": "tagGroup",
9786
+ "key": "30d4c37f3bc5f292633cf0aba9a0b640d31ec301",
9787
+ "componentPropertyDefinitions": {
9788
+ "Size": {
9789
+ "type": "VARIANT",
9790
+ "variantOptions": [
9791
+ "t2(12pt)",
9792
+ "t3(13pt)",
9793
+ "t4(14pt)"
9794
+ ]
9795
+ },
9796
+ "Tag Count": {
9797
+ "type": "VARIANT",
9798
+ "variantOptions": [
9799
+ "1",
9800
+ "2",
9801
+ "3",
9802
+ "4"
9803
+ ]
9804
+ }
9805
+ }
9806
+ };
9783
9807
  const textField = {
9784
9808
  "name": "textField",
9785
9809
  "key": "c49873c37a639f0dffdea4efd0eb43760d66c141",
@@ -10019,6 +10043,7 @@ var FIGMA_COMPONENTS = {
10019
10043
  superscriptChild: superscriptChild,
10020
10044
  switchMark: switchMark,
10021
10045
  tabs: tabs,
10046
+ tagGroup: tagGroup,
10022
10047
  templateBannerDetach: templateBannerDetach,
10023
10048
  templateButtonGroup: templateButtonGroup,
10024
10049
  templateChipGroup: templateChipGroup,
@@ -1267,11 +1267,11 @@ const actionButton = {
1267
1267
  "type": "VARIANT",
1268
1268
  "variantOptions": [
1269
1269
  "Neutral Solid",
1270
- "Neutral Weak",
1271
- "Neutral Outline",
1272
1270
  "Brand Solid",
1271
+ "Critical Solid",
1272
+ "Neutral Weak",
1273
1273
  "Brand Outline",
1274
- "Critical Solid"
1274
+ "Neutral Outline"
1275
1275
  ]
1276
1276
  },
1277
1277
  "State": {
@@ -1527,9 +1527,10 @@ const callout = {
1527
1527
  "variantOptions": [
1528
1528
  "Neutral",
1529
1529
  "Informative",
1530
- "Warning",
1531
1530
  "Critical",
1532
- "Magic"
1531
+ "Warning",
1532
+ "Magic",
1533
+ "Positive"
1533
1534
  ]
1534
1535
  },
1535
1536
  "Show Title": {
@@ -2325,8 +2326,8 @@ const radio = {
2325
2326
  "Tone": {
2326
2327
  "type": "VARIANT",
2327
2328
  "variantOptions": [
2328
- "🚫[Deprecated]Brand",
2329
- "Neutral"
2329
+ "Neutral",
2330
+ "🚫[Deprecated]Brand"
2330
2331
  ]
2331
2332
  },
2332
2333
  "Weight": {
@@ -2735,6 +2736,29 @@ const tabs = {
2735
2736
  }
2736
2737
  }
2737
2738
  };
2739
+ const tagGroup = {
2740
+ "name": "tagGroup",
2741
+ "key": "30d4c37f3bc5f292633cf0aba9a0b640d31ec301",
2742
+ "componentPropertyDefinitions": {
2743
+ "Size": {
2744
+ "type": "VARIANT",
2745
+ "variantOptions": [
2746
+ "t2(12pt)",
2747
+ "t3(13pt)",
2748
+ "t4(14pt)"
2749
+ ]
2750
+ },
2751
+ "Tag Count": {
2752
+ "type": "VARIANT",
2753
+ "variantOptions": [
2754
+ "1",
2755
+ "2",
2756
+ "3",
2757
+ "4"
2758
+ ]
2759
+ }
2760
+ }
2761
+ };
2738
2762
  const textField = {
2739
2763
  "name": "textField",
2740
2764
  "key": "c49873c37a639f0dffdea4efd0eb43760d66c141",
@@ -2974,6 +2998,7 @@ var FIGMA_COMPONENTS = {
2974
2998
  superscriptChild: superscriptChild,
2975
2999
  switchMark: switchMark,
2976
3000
  tabs: tabs,
3001
+ tagGroup: tagGroup,
2977
3002
  templateBannerDetach: templateBannerDetach,
2978
3003
  templateButtonGroup: templateButtonGroup,
2979
3004
  templateChipGroup: templateChipGroup,
@@ -4456,6 +4481,66 @@ const createToggleButtonHandler = (ctx)=>defineComponentHandler(toggleButton.key
4456
4481
  ]);
4457
4482
  });
4458
4483
 
4484
+ const createTagGroupHandler = (ctx)=>{
4485
+ const itemHandler = createTagGroupItemHandler(ctx);
4486
+ return defineComponentHandler(tagGroup.key, (node, traverse)=>{
4487
+ const itemNodes = findAllInstances({
4488
+ node,
4489
+ key: TAG_GROUP_ITEM_KEY
4490
+ });
4491
+ const items = itemNodes.map((itemNode)=>itemHandler.transform(itemNode, traverse));
4492
+ if (items.length === 0) {
4493
+ return createSeedReactElement("TagGroup.Root");
4494
+ }
4495
+ // if size/weight/tone are all the same among item[n].props, lift them up to TagGroup.Root
4496
+ const consistent = {
4497
+ size: items.map((item)=>item.props.size).every((size)=>size === items[0].props.size),
4498
+ weight: items.map((item)=>item.props.weight).every((weight)=>weight === items[0].props.weight),
4499
+ tone: items.map((item)=>item.props.tone).every((tone)=>tone === items[0].props.tone)
4500
+ };
4501
+ return createSeedReactElement("TagGroup.Root", {
4502
+ // lift up consistent props
4503
+ ...consistent.size && {
4504
+ size: items[0].props.size
4505
+ },
4506
+ ...consistent.weight && {
4507
+ weight: items[0].props.weight
4508
+ },
4509
+ ...consistent.tone && {
4510
+ tone: items[0].props.tone
4511
+ }
4512
+ }, items.map((item)=>({
4513
+ ...item,
4514
+ props: {
4515
+ // remove lifted props
4516
+ ...item.props,
4517
+ size: consistent.size ? undefined : item.props.size,
4518
+ weight: consistent.weight ? undefined : item.props.weight,
4519
+ tone: consistent.tone ? undefined : item.props.tone
4520
+ }
4521
+ })));
4522
+ });
4523
+ };
4524
+ const TAG_GROUP_ITEM_KEY = "a7bbc318919053f96be00e509469f6294d6bb6bb";
4525
+ const createTagGroupItemHandler = (ctx)=>defineComponentHandler(TAG_GROUP_ITEM_KEY, ({ componentProperties: props })=>{
4526
+ const size = tsPattern.match(props.Size.value).with("t2(12pt)", ()=>"t2").with("t3(13pt)", ()=>"t3").with("t4(14pt)", ()=>"t4").exhaustive();
4527
+ const commonProps = {
4528
+ size,
4529
+ weight: changeCase.camelCase(props["Weight"].value),
4530
+ tone: changeCase.camelCase(props["Tone"].value)
4531
+ };
4532
+ const children = [
4533
+ props.Layout.value === "Icon First" ? createSeedReactElement("PrefixIcon", {
4534
+ svg: ctx.iconHandler.transform(props["Prefix Icon#47948:0"])
4535
+ }) : undefined,
4536
+ props["Label#5409:0"].value,
4537
+ props.Layout.value === "Icon Last" ? createSeedReactElement("SuffixIcon", {
4538
+ svg: ctx.iconHandler.transform(props["Suffix Icon#47948:55"])
4539
+ }) : undefined
4540
+ ].filter(Boolean);
4541
+ return createSeedReactElement("TagGroup.Item", commonProps, children);
4542
+ });
4543
+
4459
4544
  function bindComponentHandler(unbound, deps) {
4460
4545
  return unbound(deps);
4461
4546
  }
@@ -4497,6 +4582,8 @@ const unboundSeedComponentHandlers = [
4497
4582
  createSwitchHandler,
4498
4583
  createSwitchMarkHandler,
4499
4584
  createTabsHandler,
4585
+ createTagGroupHandler,
4586
+ createTagGroupItemHandler,
4500
4587
  createTextFieldHandler,
4501
4588
  createToggleButtonHandler
4502
4589
  ];
@@ -8178,11 +8265,11 @@ const FIGMA_VARIABLE_COLLECTIONS = {
8178
8265
  "VariableID:1:155",
8179
8266
  "VariableID:1:156",
8180
8267
  "VariableID:1:164",
8181
- "VariableID:1:165",
8182
8268
  "VariableID:1:157",
8183
- "VariableID:1:171",
8269
+ "VariableID:1:165",
8184
8270
  "VariableID:238:17662",
8185
8271
  "VariableID:17544:4057",
8272
+ "VariableID:1:171",
8186
8273
  "VariableID:41186:6437",
8187
8274
  "VariableID:670:2700",
8188
8275
  "VariableID:1:158",
@@ -8259,14 +8346,14 @@ const FIGMA_VARIABLE_COLLECTIONS = {
8259
8346
  "VariableID:14609:41561",
8260
8347
  "VariableID:14609:41562",
8261
8348
  "VariableID:14609:41563",
8262
- "VariableID:29453:35711",
8263
8349
  "VariableID:12548:1440",
8350
+ "VariableID:29453:35711",
8264
8351
  "VariableID:29453:35712",
8265
8352
  "VariableID:12548:1441",
8266
8353
  "VariableID:12548:1442",
8267
8354
  "VariableID:12548:1443",
8268
- "VariableID:12548:1444",
8269
8355
  "VariableID:1:21",
8356
+ "VariableID:12548:1444",
8270
8357
  "VariableID:12548:1445",
8271
8358
  "VariableID:1:30",
8272
8359
  "VariableID:1883:92912",
@@ -8524,9 +8611,9 @@ const FIGMA_VARIABLE_COLLECTIONS = {
8524
8611
  "VariableID:289:13772",
8525
8612
  "VariableID:1886:93038",
8526
8613
  "VariableID:289:13773",
8527
- "VariableID:796:4448",
8528
8614
  "VariableID:15518:15916",
8529
8615
  "VariableID:19225:68732",
8616
+ "VariableID:796:4448",
8530
8617
  "VariableID:17955:50606",
8531
8618
  "VariableID:514:13178",
8532
8619
  "VariableID:535:1747",
@@ -11838,9 +11925,9 @@ const FIGMA_VARIABLES = {
11838
11925
  "hiddenFromPublishing": false,
11839
11926
  "valuesByMode": {
11840
11927
  "1928:7": {
11841
- "r": 1,
11842
- "g": 0.9254902005195618,
11843
- "b": 0.9215686321258545,
11928
+ "r": 0.9919999837875366,
11929
+ "g": 0.9279999732971191,
11930
+ "b": 0.9301332831382751,
11844
11931
  "a": 1
11845
11932
  },
11846
11933
  "1928:8": {
@@ -11866,9 +11953,9 @@ const FIGMA_VARIABLES = {
11866
11953
  "hiddenFromPublishing": false,
11867
11954
  "valuesByMode": {
11868
11955
  "1928:7": {
11869
- "r": 0.9529411792755127,
11870
- "g": 0.03921568766236305,
11871
- "b": 0.007843137718737125,
11956
+ "r": 0.9079999923706055,
11957
+ "g": 0.171999990940094,
11958
+ "b": 0.2701333165168762,
11872
11959
  "a": 1
11873
11960
  },
11874
11961
  "1928:8": {