@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.
- package/lib/codegen/index.cjs +43 -18
- package/lib/codegen/index.d.ts +71 -9
- package/lib/codegen/index.d.ts.map +1 -1
- package/lib/codegen/index.js +43 -18
- package/lib/codegen/targets/react/index.cjs +105 -18
- package/lib/codegen/targets/react/index.d.ts.map +1 -1
- package/lib/codegen/targets/react/index.js +105 -18
- package/lib/index.cjs +43 -18
- package/lib/index.js +43 -18
- package/package.json +2 -2
- package/src/codegen/component-properties.ts +42 -1
- package/src/codegen/targets/react/component/handlers/tag-group.ts +92 -0
- package/src/codegen/targets/react/component/index.ts +6 -0
- package/src/entities/data/__generated__/component-sets/index.d.ts +33 -8
- package/src/entities/data/__generated__/component-sets/index.mjs +32 -7
- package/src/entities/data/__generated__/variable-collections/index.mjs +5 -5
- package/src/entities/data/__generated__/variables/index.mjs +6 -6
package/lib/index.cjs
CHANGED
|
@@ -4281,11 +4281,11 @@ const FIGMA_VARIABLE_COLLECTIONS = {
|
|
|
4281
4281
|
"VariableID:1:155",
|
|
4282
4282
|
"VariableID:1:156",
|
|
4283
4283
|
"VariableID:1:164",
|
|
4284
|
-
"VariableID:1:165",
|
|
4285
4284
|
"VariableID:1:157",
|
|
4286
|
-
"VariableID:1:
|
|
4285
|
+
"VariableID:1:165",
|
|
4287
4286
|
"VariableID:238:17662",
|
|
4288
4287
|
"VariableID:17544:4057",
|
|
4288
|
+
"VariableID:1:171",
|
|
4289
4289
|
"VariableID:41186:6437",
|
|
4290
4290
|
"VariableID:670:2700",
|
|
4291
4291
|
"VariableID:1:158",
|
|
@@ -4362,14 +4362,14 @@ const FIGMA_VARIABLE_COLLECTIONS = {
|
|
|
4362
4362
|
"VariableID:14609:41561",
|
|
4363
4363
|
"VariableID:14609:41562",
|
|
4364
4364
|
"VariableID:14609:41563",
|
|
4365
|
-
"VariableID:29453:35711",
|
|
4366
4365
|
"VariableID:12548:1440",
|
|
4366
|
+
"VariableID:29453:35711",
|
|
4367
4367
|
"VariableID:29453:35712",
|
|
4368
4368
|
"VariableID:12548:1441",
|
|
4369
4369
|
"VariableID:12548:1442",
|
|
4370
4370
|
"VariableID:12548:1443",
|
|
4371
|
-
"VariableID:12548:1444",
|
|
4372
4371
|
"VariableID:1:21",
|
|
4372
|
+
"VariableID:12548:1444",
|
|
4373
4373
|
"VariableID:12548:1445",
|
|
4374
4374
|
"VariableID:1:30",
|
|
4375
4375
|
"VariableID:1883:92912",
|
|
@@ -4627,9 +4627,9 @@ const FIGMA_VARIABLE_COLLECTIONS = {
|
|
|
4627
4627
|
"VariableID:289:13772",
|
|
4628
4628
|
"VariableID:1886:93038",
|
|
4629
4629
|
"VariableID:289:13773",
|
|
4630
|
-
"VariableID:796:4448",
|
|
4631
4630
|
"VariableID:15518:15916",
|
|
4632
4631
|
"VariableID:19225:68732",
|
|
4632
|
+
"VariableID:796:4448",
|
|
4633
4633
|
"VariableID:17955:50606",
|
|
4634
4634
|
"VariableID:514:13178",
|
|
4635
4635
|
"VariableID:535:1747",
|
|
@@ -7941,9 +7941,9 @@ const FIGMA_VARIABLES = {
|
|
|
7941
7941
|
"hiddenFromPublishing": false,
|
|
7942
7942
|
"valuesByMode": {
|
|
7943
7943
|
"1928:7": {
|
|
7944
|
-
"r":
|
|
7945
|
-
"g": 0.
|
|
7946
|
-
"b": 0.
|
|
7944
|
+
"r": 0.9919999837875366,
|
|
7945
|
+
"g": 0.9279999732971191,
|
|
7946
|
+
"b": 0.9301332831382751,
|
|
7947
7947
|
"a": 1
|
|
7948
7948
|
},
|
|
7949
7949
|
"1928:8": {
|
|
@@ -7969,9 +7969,9 @@ const FIGMA_VARIABLES = {
|
|
|
7969
7969
|
"hiddenFromPublishing": false,
|
|
7970
7970
|
"valuesByMode": {
|
|
7971
7971
|
"1928:7": {
|
|
7972
|
-
"r": 0.
|
|
7973
|
-
"g": 0.
|
|
7974
|
-
"b": 0.
|
|
7972
|
+
"r": 0.9079999923706055,
|
|
7973
|
+
"g": 0.171999990940094,
|
|
7974
|
+
"b": 0.2701333165168762,
|
|
7975
7975
|
"a": 1
|
|
7976
7976
|
},
|
|
7977
7977
|
"1928:8": {
|
|
@@ -11595,11 +11595,11 @@ const actionButton = {
|
|
|
11595
11595
|
"type": "VARIANT",
|
|
11596
11596
|
"variantOptions": [
|
|
11597
11597
|
"Neutral Solid",
|
|
11598
|
-
"Neutral Weak",
|
|
11599
|
-
"Neutral Outline",
|
|
11600
11598
|
"Brand Solid",
|
|
11599
|
+
"Critical Solid",
|
|
11600
|
+
"Neutral Weak",
|
|
11601
11601
|
"Brand Outline",
|
|
11602
|
-
"
|
|
11602
|
+
"Neutral Outline"
|
|
11603
11603
|
]
|
|
11604
11604
|
},
|
|
11605
11605
|
"State": {
|
|
@@ -11855,9 +11855,10 @@ const callout = {
|
|
|
11855
11855
|
"variantOptions": [
|
|
11856
11856
|
"Neutral",
|
|
11857
11857
|
"Informative",
|
|
11858
|
-
"Warning",
|
|
11859
11858
|
"Critical",
|
|
11860
|
-
"
|
|
11859
|
+
"Warning",
|
|
11860
|
+
"Magic",
|
|
11861
|
+
"Positive"
|
|
11861
11862
|
]
|
|
11862
11863
|
},
|
|
11863
11864
|
"Show Title": {
|
|
@@ -12653,8 +12654,8 @@ const radio = {
|
|
|
12653
12654
|
"Tone": {
|
|
12654
12655
|
"type": "VARIANT",
|
|
12655
12656
|
"variantOptions": [
|
|
12656
|
-
"
|
|
12657
|
-
"
|
|
12657
|
+
"Neutral",
|
|
12658
|
+
"🚫[Deprecated]Brand"
|
|
12658
12659
|
]
|
|
12659
12660
|
},
|
|
12660
12661
|
"Weight": {
|
|
@@ -13063,6 +13064,29 @@ const tabs = {
|
|
|
13063
13064
|
}
|
|
13064
13065
|
}
|
|
13065
13066
|
};
|
|
13067
|
+
const tagGroup = {
|
|
13068
|
+
"name": "tagGroup",
|
|
13069
|
+
"key": "30d4c37f3bc5f292633cf0aba9a0b640d31ec301",
|
|
13070
|
+
"componentPropertyDefinitions": {
|
|
13071
|
+
"Size": {
|
|
13072
|
+
"type": "VARIANT",
|
|
13073
|
+
"variantOptions": [
|
|
13074
|
+
"t2(12pt)",
|
|
13075
|
+
"t3(13pt)",
|
|
13076
|
+
"t4(14pt)"
|
|
13077
|
+
]
|
|
13078
|
+
},
|
|
13079
|
+
"Tag Count": {
|
|
13080
|
+
"type": "VARIANT",
|
|
13081
|
+
"variantOptions": [
|
|
13082
|
+
"1",
|
|
13083
|
+
"2",
|
|
13084
|
+
"3",
|
|
13085
|
+
"4"
|
|
13086
|
+
]
|
|
13087
|
+
}
|
|
13088
|
+
}
|
|
13089
|
+
};
|
|
13066
13090
|
const textField = {
|
|
13067
13091
|
"name": "textField",
|
|
13068
13092
|
"key": "c49873c37a639f0dffdea4efd0eb43760d66c141",
|
|
@@ -13302,6 +13326,7 @@ var FIGMA_COMPONENTS = {
|
|
|
13302
13326
|
superscriptChild: superscriptChild,
|
|
13303
13327
|
switchMark: switchMark,
|
|
13304
13328
|
tabs: tabs,
|
|
13329
|
+
tagGroup: tagGroup,
|
|
13305
13330
|
templateBannerDetach: templateBannerDetach,
|
|
13306
13331
|
templateButtonGroup: templateButtonGroup,
|
|
13307
13332
|
templateChipGroup: templateChipGroup,
|
package/lib/index.js
CHANGED
|
@@ -4281,11 +4281,11 @@ const FIGMA_VARIABLE_COLLECTIONS = {
|
|
|
4281
4281
|
"VariableID:1:155",
|
|
4282
4282
|
"VariableID:1:156",
|
|
4283
4283
|
"VariableID:1:164",
|
|
4284
|
-
"VariableID:1:165",
|
|
4285
4284
|
"VariableID:1:157",
|
|
4286
|
-
"VariableID:1:
|
|
4285
|
+
"VariableID:1:165",
|
|
4287
4286
|
"VariableID:238:17662",
|
|
4288
4287
|
"VariableID:17544:4057",
|
|
4288
|
+
"VariableID:1:171",
|
|
4289
4289
|
"VariableID:41186:6437",
|
|
4290
4290
|
"VariableID:670:2700",
|
|
4291
4291
|
"VariableID:1:158",
|
|
@@ -4362,14 +4362,14 @@ const FIGMA_VARIABLE_COLLECTIONS = {
|
|
|
4362
4362
|
"VariableID:14609:41561",
|
|
4363
4363
|
"VariableID:14609:41562",
|
|
4364
4364
|
"VariableID:14609:41563",
|
|
4365
|
-
"VariableID:29453:35711",
|
|
4366
4365
|
"VariableID:12548:1440",
|
|
4366
|
+
"VariableID:29453:35711",
|
|
4367
4367
|
"VariableID:29453:35712",
|
|
4368
4368
|
"VariableID:12548:1441",
|
|
4369
4369
|
"VariableID:12548:1442",
|
|
4370
4370
|
"VariableID:12548:1443",
|
|
4371
|
-
"VariableID:12548:1444",
|
|
4372
4371
|
"VariableID:1:21",
|
|
4372
|
+
"VariableID:12548:1444",
|
|
4373
4373
|
"VariableID:12548:1445",
|
|
4374
4374
|
"VariableID:1:30",
|
|
4375
4375
|
"VariableID:1883:92912",
|
|
@@ -4627,9 +4627,9 @@ const FIGMA_VARIABLE_COLLECTIONS = {
|
|
|
4627
4627
|
"VariableID:289:13772",
|
|
4628
4628
|
"VariableID:1886:93038",
|
|
4629
4629
|
"VariableID:289:13773",
|
|
4630
|
-
"VariableID:796:4448",
|
|
4631
4630
|
"VariableID:15518:15916",
|
|
4632
4631
|
"VariableID:19225:68732",
|
|
4632
|
+
"VariableID:796:4448",
|
|
4633
4633
|
"VariableID:17955:50606",
|
|
4634
4634
|
"VariableID:514:13178",
|
|
4635
4635
|
"VariableID:535:1747",
|
|
@@ -7941,9 +7941,9 @@ const FIGMA_VARIABLES = {
|
|
|
7941
7941
|
"hiddenFromPublishing": false,
|
|
7942
7942
|
"valuesByMode": {
|
|
7943
7943
|
"1928:7": {
|
|
7944
|
-
"r":
|
|
7945
|
-
"g": 0.
|
|
7946
|
-
"b": 0.
|
|
7944
|
+
"r": 0.9919999837875366,
|
|
7945
|
+
"g": 0.9279999732971191,
|
|
7946
|
+
"b": 0.9301332831382751,
|
|
7947
7947
|
"a": 1
|
|
7948
7948
|
},
|
|
7949
7949
|
"1928:8": {
|
|
@@ -7969,9 +7969,9 @@ const FIGMA_VARIABLES = {
|
|
|
7969
7969
|
"hiddenFromPublishing": false,
|
|
7970
7970
|
"valuesByMode": {
|
|
7971
7971
|
"1928:7": {
|
|
7972
|
-
"r": 0.
|
|
7973
|
-
"g": 0.
|
|
7974
|
-
"b": 0.
|
|
7972
|
+
"r": 0.9079999923706055,
|
|
7973
|
+
"g": 0.171999990940094,
|
|
7974
|
+
"b": 0.2701333165168762,
|
|
7975
7975
|
"a": 1
|
|
7976
7976
|
},
|
|
7977
7977
|
"1928:8": {
|
|
@@ -11595,11 +11595,11 @@ const actionButton = {
|
|
|
11595
11595
|
"type": "VARIANT",
|
|
11596
11596
|
"variantOptions": [
|
|
11597
11597
|
"Neutral Solid",
|
|
11598
|
-
"Neutral Weak",
|
|
11599
|
-
"Neutral Outline",
|
|
11600
11598
|
"Brand Solid",
|
|
11599
|
+
"Critical Solid",
|
|
11600
|
+
"Neutral Weak",
|
|
11601
11601
|
"Brand Outline",
|
|
11602
|
-
"
|
|
11602
|
+
"Neutral Outline"
|
|
11603
11603
|
]
|
|
11604
11604
|
},
|
|
11605
11605
|
"State": {
|
|
@@ -11855,9 +11855,10 @@ const callout = {
|
|
|
11855
11855
|
"variantOptions": [
|
|
11856
11856
|
"Neutral",
|
|
11857
11857
|
"Informative",
|
|
11858
|
-
"Warning",
|
|
11859
11858
|
"Critical",
|
|
11860
|
-
"
|
|
11859
|
+
"Warning",
|
|
11860
|
+
"Magic",
|
|
11861
|
+
"Positive"
|
|
11861
11862
|
]
|
|
11862
11863
|
},
|
|
11863
11864
|
"Show Title": {
|
|
@@ -12653,8 +12654,8 @@ const radio = {
|
|
|
12653
12654
|
"Tone": {
|
|
12654
12655
|
"type": "VARIANT",
|
|
12655
12656
|
"variantOptions": [
|
|
12656
|
-
"
|
|
12657
|
-
"
|
|
12657
|
+
"Neutral",
|
|
12658
|
+
"🚫[Deprecated]Brand"
|
|
12658
12659
|
]
|
|
12659
12660
|
},
|
|
12660
12661
|
"Weight": {
|
|
@@ -13063,6 +13064,29 @@ const tabs = {
|
|
|
13063
13064
|
}
|
|
13064
13065
|
}
|
|
13065
13066
|
};
|
|
13067
|
+
const tagGroup = {
|
|
13068
|
+
"name": "tagGroup",
|
|
13069
|
+
"key": "30d4c37f3bc5f292633cf0aba9a0b640d31ec301",
|
|
13070
|
+
"componentPropertyDefinitions": {
|
|
13071
|
+
"Size": {
|
|
13072
|
+
"type": "VARIANT",
|
|
13073
|
+
"variantOptions": [
|
|
13074
|
+
"t2(12pt)",
|
|
13075
|
+
"t3(13pt)",
|
|
13076
|
+
"t4(14pt)"
|
|
13077
|
+
]
|
|
13078
|
+
},
|
|
13079
|
+
"Tag Count": {
|
|
13080
|
+
"type": "VARIANT",
|
|
13081
|
+
"variantOptions": [
|
|
13082
|
+
"1",
|
|
13083
|
+
"2",
|
|
13084
|
+
"3",
|
|
13085
|
+
"4"
|
|
13086
|
+
]
|
|
13087
|
+
}
|
|
13088
|
+
}
|
|
13089
|
+
};
|
|
13066
13090
|
const textField = {
|
|
13067
13091
|
"name": "textField",
|
|
13068
13092
|
"key": "c49873c37a639f0dffdea4efd0eb43760d66c141",
|
|
@@ -13302,6 +13326,7 @@ var FIGMA_COMPONENTS = {
|
|
|
13302
13326
|
superscriptChild: superscriptChild,
|
|
13303
13327
|
switchMark: switchMark,
|
|
13304
13328
|
tabs: tabs,
|
|
13329
|
+
tagGroup: tagGroup,
|
|
13305
13330
|
templateBannerDetach: templateBannerDetach,
|
|
13306
13331
|
templateButtonGroup: templateButtonGroup,
|
|
13307
13332
|
templateChipGroup: templateChipGroup,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seed-design/figma",
|
|
3
|
-
"version": "1.0.6
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/daangn/seed-design.git",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"sync-entities": "rm -rf src/entities/data/__generated__ && bun figma-extractor src/entities/data/__generated__"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@seed-design/css": "1.0.6
|
|
42
|
+
"@seed-design/css": "1.0.6",
|
|
43
43
|
"change-case": "^5.4.4",
|
|
44
44
|
"ts-pattern": "^5.7.0"
|
|
45
45
|
},
|
|
@@ -527,7 +527,7 @@ export type TabsChipWrapperProperties = InferComponentDefinition<{
|
|
|
527
527
|
}>;
|
|
528
528
|
|
|
529
529
|
export type ChipTabsTriggerProperties = InferComponentDefinition<{
|
|
530
|
-
|
|
530
|
+
Size: {
|
|
531
531
|
type: "VARIANT";
|
|
532
532
|
defaultValue: "Medium";
|
|
533
533
|
variantOptions: ["Medium", "Large"];
|
|
@@ -548,3 +548,44 @@ export type ChipTabsTriggerProperties = InferComponentDefinition<{
|
|
|
548
548
|
variantOptions: ["False", "True"];
|
|
549
549
|
};
|
|
550
550
|
}>;
|
|
551
|
+
|
|
552
|
+
export type TagGroupProperties = InferComponentDefinition<
|
|
553
|
+
typeof metadata.tagGroup.componentPropertyDefinitions
|
|
554
|
+
>;
|
|
555
|
+
|
|
556
|
+
export type TagGroupItemProperties = InferComponentDefinition<{
|
|
557
|
+
"Label#5409:0": {
|
|
558
|
+
type: "TEXT";
|
|
559
|
+
defaultValue: "라벨";
|
|
560
|
+
};
|
|
561
|
+
"Prefix Icon#47948:0": {
|
|
562
|
+
type: "INSTANCE_SWAP";
|
|
563
|
+
defaultValue: "26621:23540";
|
|
564
|
+
preferredValues: [];
|
|
565
|
+
};
|
|
566
|
+
"Suffix Icon#47948:55": {
|
|
567
|
+
type: "INSTANCE_SWAP";
|
|
568
|
+
defaultValue: "27053:2268";
|
|
569
|
+
preferredValues: [];
|
|
570
|
+
};
|
|
571
|
+
Size: {
|
|
572
|
+
type: "VARIANT";
|
|
573
|
+
defaultValue: "t2(12pt)";
|
|
574
|
+
variantOptions: ["t2(12pt)", "t3(13pt)", "t4(14pt)"];
|
|
575
|
+
};
|
|
576
|
+
Layout: {
|
|
577
|
+
type: "VARIANT";
|
|
578
|
+
defaultValue: "Text Only";
|
|
579
|
+
variantOptions: ["Text Only", "Icon First", "Icon Last"];
|
|
580
|
+
};
|
|
581
|
+
Tone: {
|
|
582
|
+
type: "VARIANT";
|
|
583
|
+
defaultValue: "Neutral Subtle";
|
|
584
|
+
variantOptions: ["Neutral Subtle", "Brand", "Neutral"];
|
|
585
|
+
};
|
|
586
|
+
Weight: {
|
|
587
|
+
type: "VARIANT";
|
|
588
|
+
defaultValue: "Regular";
|
|
589
|
+
variantOptions: ["Regular", "Bold"];
|
|
590
|
+
};
|
|
591
|
+
}>;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { TagGroupItemProperties, TagGroupProperties } from "@/codegen/component-properties";
|
|
2
|
+
import { defineComponentHandler, type ElementNode } from "@/codegen/core";
|
|
3
|
+
import * as metadata from "@/entities/data/__generated__/component-sets";
|
|
4
|
+
import { createSeedReactElement } from "../../element-factories";
|
|
5
|
+
import type { ComponentHandlerDeps } from "../deps.interface";
|
|
6
|
+
import { camelCase } from "change-case";
|
|
7
|
+
import { match } from "ts-pattern";
|
|
8
|
+
import { findAllInstances } from "@/utils/figma-node";
|
|
9
|
+
|
|
10
|
+
export const createTagGroupHandler = (ctx: ComponentHandlerDeps) => {
|
|
11
|
+
const itemHandler = createTagGroupItemHandler(ctx);
|
|
12
|
+
|
|
13
|
+
return defineComponentHandler<TagGroupProperties>(metadata.tagGroup.key, (node, traverse) => {
|
|
14
|
+
const itemNodes = findAllInstances<TagGroupItemProperties>({ node, key: TAG_GROUP_ITEM_KEY });
|
|
15
|
+
|
|
16
|
+
const items = itemNodes.map((itemNode) =>
|
|
17
|
+
itemHandler.transform(itemNode, traverse),
|
|
18
|
+
) as (ElementNode & {
|
|
19
|
+
props: { size?: string; weight?: string; tone?: string };
|
|
20
|
+
})[];
|
|
21
|
+
|
|
22
|
+
if (items.length === 0) {
|
|
23
|
+
return createSeedReactElement("TagGroup.Root");
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// if size/weight/tone are all the same among item[n].props, lift them up to TagGroup.Root
|
|
27
|
+
|
|
28
|
+
const consistent = {
|
|
29
|
+
size: items.map((item) => item.props.size).every((size) => size === items[0].props.size),
|
|
30
|
+
weight: items
|
|
31
|
+
.map((item) => item.props.weight)
|
|
32
|
+
.every((weight) => weight === items[0].props.weight),
|
|
33
|
+
tone: items.map((item) => item.props.tone).every((tone) => tone === items[0].props.tone),
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return createSeedReactElement(
|
|
37
|
+
"TagGroup.Root",
|
|
38
|
+
{
|
|
39
|
+
// lift up consistent props
|
|
40
|
+
...(consistent.size && { size: items[0].props.size }),
|
|
41
|
+
...(consistent.weight && { weight: items[0].props.weight }),
|
|
42
|
+
...(consistent.tone && { tone: items[0].props.tone }),
|
|
43
|
+
},
|
|
44
|
+
items.map((item) => ({
|
|
45
|
+
...item,
|
|
46
|
+
props: {
|
|
47
|
+
// remove lifted props
|
|
48
|
+
...item.props,
|
|
49
|
+
size: consistent.size ? undefined : item.props.size,
|
|
50
|
+
weight: consistent.weight ? undefined : item.props.weight,
|
|
51
|
+
tone: consistent.tone ? undefined : item.props.tone,
|
|
52
|
+
},
|
|
53
|
+
})),
|
|
54
|
+
);
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const TAG_GROUP_ITEM_KEY = "a7bbc318919053f96be00e509469f6294d6bb6bb";
|
|
59
|
+
|
|
60
|
+
export const createTagGroupItemHandler = (ctx: ComponentHandlerDeps) =>
|
|
61
|
+
defineComponentHandler<TagGroupItemProperties>(
|
|
62
|
+
TAG_GROUP_ITEM_KEY,
|
|
63
|
+
({ componentProperties: props }) => {
|
|
64
|
+
const size = match(props.Size.value)
|
|
65
|
+
.with("t2(12pt)", () => "t2")
|
|
66
|
+
.with("t3(13pt)", () => "t3")
|
|
67
|
+
.with("t4(14pt)", () => "t4")
|
|
68
|
+
.exhaustive();
|
|
69
|
+
|
|
70
|
+
const commonProps = {
|
|
71
|
+
size,
|
|
72
|
+
weight: camelCase(props["Weight"].value),
|
|
73
|
+
tone: camelCase(props["Tone"].value),
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const children = [
|
|
77
|
+
props.Layout.value === "Icon First"
|
|
78
|
+
? createSeedReactElement("PrefixIcon", {
|
|
79
|
+
svg: ctx.iconHandler.transform(props["Prefix Icon#47948:0"]),
|
|
80
|
+
})
|
|
81
|
+
: undefined,
|
|
82
|
+
props["Label#5409:0"].value,
|
|
83
|
+
props.Layout.value === "Icon Last"
|
|
84
|
+
? createSeedReactElement("SuffixIcon", {
|
|
85
|
+
svg: ctx.iconHandler.transform(props["Suffix Icon#47948:55"]),
|
|
86
|
+
})
|
|
87
|
+
: undefined,
|
|
88
|
+
].filter(Boolean);
|
|
89
|
+
|
|
90
|
+
return createSeedReactElement("TagGroup.Item", commonProps, children);
|
|
91
|
+
},
|
|
92
|
+
);
|
|
@@ -42,6 +42,10 @@ import { createSwitchHandler } from "./handlers/switch";
|
|
|
42
42
|
import { createTabsHandler } from "@/codegen/targets/react/component/handlers/tabs";
|
|
43
43
|
import { createTextFieldHandler } from "./handlers/text-field";
|
|
44
44
|
import { createToggleButtonHandler } from "./handlers/toggle-button";
|
|
45
|
+
import {
|
|
46
|
+
createTagGroupHandler,
|
|
47
|
+
createTagGroupItemHandler,
|
|
48
|
+
} from "@/codegen/targets/react/component/handlers/tag-group";
|
|
45
49
|
|
|
46
50
|
export type { ComponentHandlerDeps };
|
|
47
51
|
export type UnboundComponentHandler<T extends NormalizedInstanceNode["componentProperties"]> = (
|
|
@@ -93,6 +97,8 @@ export const unboundSeedComponentHandlers: Array<UnboundComponentHandler<any>> =
|
|
|
93
97
|
createSwitchHandler,
|
|
94
98
|
createSwitchMarkHandler,
|
|
95
99
|
createTabsHandler,
|
|
100
|
+
createTagGroupHandler,
|
|
101
|
+
createTagGroupItemHandler,
|
|
96
102
|
createTextFieldHandler,
|
|
97
103
|
createToggleButtonHandler,
|
|
98
104
|
];
|
|
@@ -235,11 +235,11 @@ export declare const actionButton: {
|
|
|
235
235
|
"type": "VARIANT",
|
|
236
236
|
"variantOptions": [
|
|
237
237
|
"Neutral Solid",
|
|
238
|
-
"Neutral Weak",
|
|
239
|
-
"Neutral Outline",
|
|
240
238
|
"Brand Solid",
|
|
239
|
+
"Critical Solid",
|
|
240
|
+
"Neutral Weak",
|
|
241
241
|
"Brand Outline",
|
|
242
|
-
"
|
|
242
|
+
"Neutral Outline"
|
|
243
243
|
]
|
|
244
244
|
},
|
|
245
245
|
"State": {
|
|
@@ -503,9 +503,10 @@ export declare const callout: {
|
|
|
503
503
|
"variantOptions": [
|
|
504
504
|
"Neutral",
|
|
505
505
|
"Informative",
|
|
506
|
-
"Warning",
|
|
507
506
|
"Critical",
|
|
508
|
-
"
|
|
507
|
+
"Warning",
|
|
508
|
+
"Magic",
|
|
509
|
+
"Positive"
|
|
509
510
|
]
|
|
510
511
|
},
|
|
511
512
|
"Show Title": {
|
|
@@ -1320,8 +1321,8 @@ export declare const radio: {
|
|
|
1320
1321
|
"Tone": {
|
|
1321
1322
|
"type": "VARIANT",
|
|
1322
1323
|
"variantOptions": [
|
|
1323
|
-
"
|
|
1324
|
-
"
|
|
1324
|
+
"Neutral",
|
|
1325
|
+
"🚫[Deprecated]Brand"
|
|
1325
1326
|
]
|
|
1326
1327
|
},
|
|
1327
1328
|
"Weight": {
|
|
@@ -1745,6 +1746,30 @@ export declare const tabs: {
|
|
|
1745
1746
|
}
|
|
1746
1747
|
};
|
|
1747
1748
|
|
|
1749
|
+
export declare const tagGroup: {
|
|
1750
|
+
"name": "tagGroup",
|
|
1751
|
+
"key": "30d4c37f3bc5f292633cf0aba9a0b640d31ec301",
|
|
1752
|
+
"componentPropertyDefinitions": {
|
|
1753
|
+
"Size": {
|
|
1754
|
+
"type": "VARIANT",
|
|
1755
|
+
"variantOptions": [
|
|
1756
|
+
"t2(12pt)",
|
|
1757
|
+
"t3(13pt)",
|
|
1758
|
+
"t4(14pt)"
|
|
1759
|
+
]
|
|
1760
|
+
},
|
|
1761
|
+
"Tag Count": {
|
|
1762
|
+
"type": "VARIANT",
|
|
1763
|
+
"variantOptions": [
|
|
1764
|
+
"1",
|
|
1765
|
+
"2",
|
|
1766
|
+
"3",
|
|
1767
|
+
"4"
|
|
1768
|
+
]
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
};
|
|
1772
|
+
|
|
1748
1773
|
export declare const textField: {
|
|
1749
1774
|
"name": "textField",
|
|
1750
1775
|
"key": "c49873c37a639f0dffdea4efd0eb43760d66c141",
|
|
@@ -1940,4 +1965,4 @@ export declare const topNavigation: {
|
|
|
1940
1965
|
]
|
|
1941
1966
|
}
|
|
1942
1967
|
}
|
|
1943
|
-
};
|
|
1968
|
+
};
|
|
@@ -235,11 +235,11 @@ export const actionButton = {
|
|
|
235
235
|
"type": "VARIANT",
|
|
236
236
|
"variantOptions": [
|
|
237
237
|
"Neutral Solid",
|
|
238
|
-
"Neutral Weak",
|
|
239
|
-
"Neutral Outline",
|
|
240
238
|
"Brand Solid",
|
|
239
|
+
"Critical Solid",
|
|
240
|
+
"Neutral Weak",
|
|
241
241
|
"Brand Outline",
|
|
242
|
-
"
|
|
242
|
+
"Neutral Outline"
|
|
243
243
|
]
|
|
244
244
|
},
|
|
245
245
|
"State": {
|
|
@@ -503,9 +503,10 @@ export const callout = {
|
|
|
503
503
|
"variantOptions": [
|
|
504
504
|
"Neutral",
|
|
505
505
|
"Informative",
|
|
506
|
-
"Warning",
|
|
507
506
|
"Critical",
|
|
508
|
-
"
|
|
507
|
+
"Warning",
|
|
508
|
+
"Magic",
|
|
509
|
+
"Positive"
|
|
509
510
|
]
|
|
510
511
|
},
|
|
511
512
|
"Show Title": {
|
|
@@ -1320,8 +1321,8 @@ export const radio = {
|
|
|
1320
1321
|
"Tone": {
|
|
1321
1322
|
"type": "VARIANT",
|
|
1322
1323
|
"variantOptions": [
|
|
1323
|
-
"
|
|
1324
|
-
"
|
|
1324
|
+
"Neutral",
|
|
1325
|
+
"🚫[Deprecated]Brand"
|
|
1325
1326
|
]
|
|
1326
1327
|
},
|
|
1327
1328
|
"Weight": {
|
|
@@ -1745,6 +1746,30 @@ export const tabs = {
|
|
|
1745
1746
|
}
|
|
1746
1747
|
};
|
|
1747
1748
|
|
|
1749
|
+
export const tagGroup = {
|
|
1750
|
+
"name": "tagGroup",
|
|
1751
|
+
"key": "30d4c37f3bc5f292633cf0aba9a0b640d31ec301",
|
|
1752
|
+
"componentPropertyDefinitions": {
|
|
1753
|
+
"Size": {
|
|
1754
|
+
"type": "VARIANT",
|
|
1755
|
+
"variantOptions": [
|
|
1756
|
+
"t2(12pt)",
|
|
1757
|
+
"t3(13pt)",
|
|
1758
|
+
"t4(14pt)"
|
|
1759
|
+
]
|
|
1760
|
+
},
|
|
1761
|
+
"Tag Count": {
|
|
1762
|
+
"type": "VARIANT",
|
|
1763
|
+
"variantOptions": [
|
|
1764
|
+
"1",
|
|
1765
|
+
"2",
|
|
1766
|
+
"3",
|
|
1767
|
+
"4"
|
|
1768
|
+
]
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
};
|
|
1772
|
+
|
|
1748
1773
|
export const textField = {
|
|
1749
1774
|
"name": "textField",
|
|
1750
1775
|
"key": "c49873c37a639f0dffdea4efd0eb43760d66c141",
|
|
@@ -43,11 +43,11 @@ export const FIGMA_VARIABLE_COLLECTIONS = {
|
|
|
43
43
|
"VariableID:1:155",
|
|
44
44
|
"VariableID:1:156",
|
|
45
45
|
"VariableID:1:164",
|
|
46
|
-
"VariableID:1:165",
|
|
47
46
|
"VariableID:1:157",
|
|
48
|
-
"VariableID:1:
|
|
47
|
+
"VariableID:1:165",
|
|
49
48
|
"VariableID:238:17662",
|
|
50
49
|
"VariableID:17544:4057",
|
|
50
|
+
"VariableID:1:171",
|
|
51
51
|
"VariableID:41186:6437",
|
|
52
52
|
"VariableID:670:2700",
|
|
53
53
|
"VariableID:1:158",
|
|
@@ -124,14 +124,14 @@ export const FIGMA_VARIABLE_COLLECTIONS = {
|
|
|
124
124
|
"VariableID:14609:41561",
|
|
125
125
|
"VariableID:14609:41562",
|
|
126
126
|
"VariableID:14609:41563",
|
|
127
|
-
"VariableID:29453:35711",
|
|
128
127
|
"VariableID:12548:1440",
|
|
128
|
+
"VariableID:29453:35711",
|
|
129
129
|
"VariableID:29453:35712",
|
|
130
130
|
"VariableID:12548:1441",
|
|
131
131
|
"VariableID:12548:1442",
|
|
132
132
|
"VariableID:12548:1443",
|
|
133
|
-
"VariableID:12548:1444",
|
|
134
133
|
"VariableID:1:21",
|
|
134
|
+
"VariableID:12548:1444",
|
|
135
135
|
"VariableID:12548:1445",
|
|
136
136
|
"VariableID:1:30",
|
|
137
137
|
"VariableID:1883:92912",
|
|
@@ -389,9 +389,9 @@ export const FIGMA_VARIABLE_COLLECTIONS = {
|
|
|
389
389
|
"VariableID:289:13772",
|
|
390
390
|
"VariableID:1886:93038",
|
|
391
391
|
"VariableID:289:13773",
|
|
392
|
-
"VariableID:796:4448",
|
|
393
392
|
"VariableID:15518:15916",
|
|
394
393
|
"VariableID:19225:68732",
|
|
394
|
+
"VariableID:796:4448",
|
|
395
395
|
"VariableID:17955:50606",
|
|
396
396
|
"VariableID:514:13178",
|
|
397
397
|
"VariableID:535:1747",
|
|
@@ -3270,9 +3270,9 @@ export const FIGMA_VARIABLES = {
|
|
|
3270
3270
|
"hiddenFromPublishing": false,
|
|
3271
3271
|
"valuesByMode": {
|
|
3272
3272
|
"1928:7": {
|
|
3273
|
-
"r":
|
|
3274
|
-
"g": 0.
|
|
3275
|
-
"b": 0.
|
|
3273
|
+
"r": 0.9919999837875366,
|
|
3274
|
+
"g": 0.9279999732971191,
|
|
3275
|
+
"b": 0.9301332831382751,
|
|
3276
3276
|
"a": 1
|
|
3277
3277
|
},
|
|
3278
3278
|
"1928:8": {
|
|
@@ -3298,9 +3298,9 @@ export const FIGMA_VARIABLES = {
|
|
|
3298
3298
|
"hiddenFromPublishing": false,
|
|
3299
3299
|
"valuesByMode": {
|
|
3300
3300
|
"1928:7": {
|
|
3301
|
-
"r": 0.
|
|
3302
|
-
"g": 0.
|
|
3303
|
-
"b": 0.
|
|
3301
|
+
"r": 0.9079999923706055,
|
|
3302
|
+
"g": 0.171999990940094,
|
|
3303
|
+
"b": 0.2701333165168762,
|
|
3304
3304
|
"a": 1
|
|
3305
3305
|
},
|
|
3306
3306
|
"1928:8": {
|