@seed-design/figma 0.1.6 → 0.1.8
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 +746 -646
- package/lib/codegen/index.d.ts +707 -627
- package/lib/codegen/index.d.ts.map +1 -1
- package/lib/codegen/index.js +746 -646
- package/lib/codegen/targets/react/index.cjs +1170 -1180
- package/lib/codegen/targets/react/index.d.ts +20 -9
- package/lib/codegen/targets/react/index.d.ts.map +1 -1
- package/lib/codegen/targets/react/index.js +1170 -1180
- package/lib/index.cjs +883 -668
- package/lib/index.d.ts +3 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +883 -668
- package/package.json +3 -3
- package/src/codegen/component-properties.ts +283 -146
- package/src/codegen/core/component-handler.ts +9 -3
- package/src/codegen/core/jsx.ts +7 -2
- package/src/codegen/core/value-resolver.ts +35 -21
- package/src/codegen/targets/figma/pipeline.ts +4 -2
- package/src/codegen/targets/figma/value-resolver.ts +38 -2
- package/src/codegen/targets/react/component/handlers/action-button.ts +69 -5
- package/src/codegen/targets/react/component/handlers/alert-dialog.ts +81 -0
- package/src/codegen/targets/react/component/handlers/app-bar.ts +93 -128
- package/src/codegen/targets/react/component/handlers/avatar.ts +17 -8
- package/src/codegen/targets/react/component/handlers/badge.ts +0 -1
- package/src/codegen/targets/react/component/handlers/bottom-sheet.ts +71 -0
- package/src/codegen/targets/react/component/handlers/callout.ts +13 -17
- package/src/codegen/targets/react/component/handlers/chip.ts +66 -0
- package/src/codegen/targets/react/component/handlers/contextual-floating-button.ts +52 -0
- package/src/codegen/targets/react/component/handlers/divider.ts +19 -0
- package/src/codegen/targets/react/component/handlers/error-state.ts +26 -23
- package/src/codegen/targets/react/component/handlers/floating-action-button.ts +48 -0
- package/src/codegen/targets/react/component/handlers/help-bubble.ts +4 -5
- package/src/codegen/targets/react/component/handlers/identity-placeholder.ts +3 -2
- package/src/codegen/targets/react/component/handlers/inline-banner.ts +7 -14
- package/src/codegen/targets/react/component/handlers/manner-temp.ts +18 -0
- package/src/codegen/targets/react/component/handlers/menu-sheet.ts +106 -0
- package/src/codegen/targets/react/component/handlers/multiline-text-field.ts +1 -1
- package/src/codegen/targets/react/component/handlers/progress-circle.ts +3 -1
- package/src/codegen/targets/react/component/handlers/segmented-control.ts +4 -2
- package/src/codegen/targets/react/component/handlers/select-box.ts +7 -4
- package/src/codegen/targets/react/component/handlers/snackbar.ts +2 -2
- package/src/codegen/targets/react/component/handlers/tabs.ts +8 -125
- package/src/codegen/targets/react/component/index.ts +22 -19
- package/src/codegen/targets/react/instance.ts +1 -1
- package/src/codegen/targets/react/pipeline.ts +4 -2
- package/src/codegen/targets/react/props.ts +11 -4
- package/src/codegen/targets/react/value-resolver.ts +38 -3
- package/src/entities/data/__generated__/component-sets/action-button.d.ts +5 -5
- package/src/entities/data/__generated__/component-sets/action-button.mjs +5 -5
- package/src/entities/data/__generated__/component-sets/alert-dialog.d.ts +26 -0
- package/src/entities/data/__generated__/component-sets/alert-dialog.mjs +26 -0
- package/src/entities/data/__generated__/component-sets/avatar-stack.d.ts +5 -18
- package/src/entities/data/__generated__/component-sets/avatar-stack.mjs +5 -18
- package/src/entities/data/__generated__/component-sets/avatar.d.ts +11 -5
- package/src/entities/data/__generated__/component-sets/avatar.mjs +11 -5
- package/src/entities/data/__generated__/component-sets/badge.d.ts +0 -7
- package/src/entities/data/__generated__/component-sets/badge.mjs +0 -7
- package/src/entities/data/__generated__/component-sets/bottom-navigation-global.d.ts +3 -0
- package/src/entities/data/__generated__/component-sets/bottom-navigation-global.mjs +3 -0
- package/src/entities/data/__generated__/component-sets/bottom-navigation-kr.d.ts +3 -0
- package/src/entities/data/__generated__/component-sets/bottom-navigation-kr.mjs +3 -0
- package/src/entities/data/__generated__/component-sets/bottom-sheet.d.ts +53 -4
- package/src/entities/data/__generated__/component-sets/bottom-sheet.mjs +53 -4
- package/src/entities/data/__generated__/component-sets/callout.d.ts +13 -22
- package/src/entities/data/__generated__/component-sets/callout.mjs +13 -22
- package/src/entities/data/__generated__/component-sets/checkbox.d.ts +3 -3
- package/src/entities/data/__generated__/component-sets/checkbox.mjs +3 -3
- package/src/entities/data/__generated__/component-sets/checkmark.d.ts +34 -0
- package/src/entities/data/__generated__/component-sets/checkmark.mjs +34 -0
- package/src/entities/data/__generated__/component-sets/chip.d.ts +86 -0
- package/src/entities/data/__generated__/component-sets/chip.mjs +86 -0
- package/src/entities/data/__generated__/component-sets/chlid.d.ts +14 -0
- package/src/entities/data/__generated__/component-sets/chlid.mjs +14 -0
- package/src/entities/data/__generated__/component-sets/{extended-floating-action-button.d.ts → contextual-floating-button.d.ts} +12 -10
- package/src/entities/data/__generated__/component-sets/{extended-floating-action-button.mjs → contextual-floating-button.mjs} +12 -10
- package/src/entities/data/__generated__/component-sets/floating-action-button.d.ts +4 -8
- package/src/entities/data/__generated__/component-sets/floating-action-button.mjs +4 -8
- package/src/entities/data/__generated__/component-sets/help-bubble.d.ts +3 -10
- package/src/entities/data/__generated__/component-sets/help-bubble.mjs +3 -10
- package/src/entities/data/__generated__/component-sets/index.d.ts +13 -13
- package/src/entities/data/__generated__/component-sets/index.mjs +13 -13
- package/src/entities/data/__generated__/component-sets/inline-banner.d.ts +3 -3
- package/src/entities/data/__generated__/component-sets/inline-banner.mjs +3 -3
- package/src/entities/data/__generated__/component-sets/main-tab-navigation-global.d.ts +2 -2
- package/src/entities/data/__generated__/component-sets/main-tab-navigation-global.mjs +2 -2
- package/src/entities/data/__generated__/component-sets/manner-temp-badge.d.ts +2 -2
- package/src/entities/data/__generated__/component-sets/manner-temp-badge.mjs +2 -2
- package/src/entities/data/__generated__/component-sets/manner-temp.d.ts +2 -2
- package/src/entities/data/__generated__/component-sets/manner-temp.mjs +2 -2
- package/src/entities/data/__generated__/component-sets/{extended-action-sheet.d.ts → menu-sheet.d.ts} +17 -13
- package/src/entities/data/__generated__/component-sets/{extended-action-sheet.mjs → menu-sheet.mjs} +17 -13
- package/src/entities/data/__generated__/component-sets/multiline-text-field.d.ts +18 -18
- package/src/entities/data/__generated__/component-sets/multiline-text-field.mjs +18 -18
- package/src/entities/data/__generated__/component-sets/progress-circle.d.ts +2 -1
- package/src/entities/data/__generated__/component-sets/progress-circle.mjs +2 -1
- package/src/entities/data/__generated__/component-sets/radio-mark.d.ts +34 -0
- package/src/entities/data/__generated__/component-sets/radio-mark.mjs +34 -0
- package/src/entities/data/__generated__/component-sets/radio.d.ts +2 -2
- package/src/entities/data/__generated__/component-sets/radio.mjs +2 -2
- package/src/entities/data/__generated__/component-sets/reaction-button.d.ts +6 -6
- package/src/entities/data/__generated__/component-sets/reaction-button.mjs +6 -6
- package/src/entities/data/__generated__/component-sets/resizable-child.d.ts +18 -0
- package/src/entities/data/__generated__/component-sets/resizable-child.mjs +18 -0
- package/src/entities/data/__generated__/component-sets/resizable-icon.d.ts +18 -0
- package/src/entities/data/__generated__/component-sets/resizable-icon.mjs +18 -0
- package/src/entities/data/__generated__/component-sets/select-box.d.ts +4 -4
- package/src/entities/data/__generated__/component-sets/select-box.mjs +4 -4
- package/src/entities/data/__generated__/component-sets/skeleton.d.ts +7 -0
- package/src/entities/data/__generated__/component-sets/skeleton.mjs +7 -0
- package/src/entities/data/__generated__/component-sets/snackbar.d.ts +4 -4
- package/src/entities/data/__generated__/component-sets/snackbar.mjs +4 -4
- package/src/entities/data/__generated__/component-sets/switch.d.ts +1 -1
- package/src/entities/data/__generated__/component-sets/switch.mjs +1 -1
- package/src/entities/data/__generated__/component-sets/tabs.d.ts +13 -0
- package/src/entities/data/__generated__/component-sets/tabs.mjs +13 -0
- package/src/entities/data/__generated__/component-sets/template-button-group.d.ts +9 -33
- package/src/entities/data/__generated__/component-sets/template-button-group.mjs +9 -33
- package/src/entities/data/__generated__/component-sets/template-chip-group.d.ts +15 -12
- package/src/entities/data/__generated__/component-sets/template-chip-group.mjs +15 -12
- package/src/entities/data/__generated__/component-sets/template-completion.d.ts +28 -0
- package/src/entities/data/__generated__/component-sets/template-completion.mjs +28 -0
- package/src/entities/data/__generated__/component-sets/{error-state.d.ts → template-error-state.d.ts} +5 -5
- package/src/entities/data/__generated__/component-sets/{error-state.mjs → template-error-state.mjs} +5 -5
- package/src/entities/data/__generated__/component-sets/template-top-navigation.d.ts +9 -7
- package/src/entities/data/__generated__/component-sets/template-top-navigation.mjs +9 -7
- package/src/entities/data/__generated__/component-sets/text-field.d.ts +35 -36
- package/src/entities/data/__generated__/component-sets/text-field.mjs +35 -36
- package/src/entities/data/__generated__/component-sets/toggle-button.d.ts +7 -7
- package/src/entities/data/__generated__/component-sets/toggle-button.mjs +7 -7
- package/src/entities/data/__generated__/component-sets/top-navigation.d.ts +42 -0
- package/src/entities/data/__generated__/component-sets/top-navigation.mjs +42 -0
- package/src/entities/data/styles.ts +94 -0
- package/src/entities/index.ts +5 -2
- package/src/normalizer/from-plugin.ts +104 -44
- package/src/normalizer/types.ts +3 -1
- package/src/utils/figma-gradient.ts +72 -0
- package/src/utils/figma-node.ts +4 -3
- package/src/codegen/targets/react/component/handlers/action-chip.ts +0 -72
- package/src/codegen/targets/react/component/handlers/action-sheet.ts +0 -82
- package/src/codegen/targets/react/component/handlers/chip-tabs.ts +0 -57
- package/src/codegen/targets/react/component/handlers/control-chip.ts +0 -81
- package/src/codegen/targets/react/component/handlers/extended-action-sheet.ts +0 -98
- package/src/codegen/targets/react/component/handlers/extended-fab.ts +0 -25
- package/src/codegen/targets/react/component/handlers/fab.ts +0 -22
- package/src/codegen/targets/react/component/handlers/text-button.ts +0 -49
- package/src/entities/data/__generated__/component-sets/action-chip.d.ts +0 -57
- package/src/entities/data/__generated__/component-sets/action-chip.mjs +0 -57
- package/src/entities/data/__generated__/component-sets/action-sheet.d.ts +0 -40
- package/src/entities/data/__generated__/component-sets/action-sheet.mjs +0 -40
- package/src/entities/data/__generated__/component-sets/chip-tablist.d.ts +0 -24
- package/src/entities/data/__generated__/component-sets/chip-tablist.mjs +0 -24
- package/src/entities/data/__generated__/component-sets/control-chip.d.ts +0 -60
- package/src/entities/data/__generated__/component-sets/control-chip.mjs +0 -60
- package/src/entities/data/__generated__/component-sets/identity-placeholder.d.ts +0 -13
- package/src/entities/data/__generated__/component-sets/identity-placeholder.mjs +0 -13
- package/src/entities/data/__generated__/component-sets/manner-temp-bar.d.ts +0 -23
- package/src/entities/data/__generated__/component-sets/manner-temp-bar.mjs +0 -23
- package/src/entities/data/__generated__/component-sets/standard-navigation.d.ts +0 -23
- package/src/entities/data/__generated__/component-sets/standard-navigation.mjs +0 -23
- package/src/entities/data/__generated__/component-sets/tablist.d.ts +0 -29
- package/src/entities/data/__generated__/component-sets/tablist.mjs +0 -29
- package/src/entities/data/__generated__/component-sets/template-bottom-fixed-bar.d.ts +0 -42
- package/src/entities/data/__generated__/component-sets/template-bottom-fixed-bar.mjs +0 -42
- package/src/entities/data/__generated__/component-sets/text-button.d.ts +0 -45
- package/src/entities/data/__generated__/component-sets/text-button.mjs +0 -45
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seed-design/figma",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/daangn/seed-design.git",
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"lint:publish": "bun publint"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@seed-design/css": "0.1.
|
|
41
|
+
"@seed-design/css": "0.1.8",
|
|
42
42
|
"change-case": "^5.4.4",
|
|
43
43
|
"ts-pattern": "^5.7.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@figma/plugin-typings": "^1.110.0",
|
|
47
47
|
"@figma/rest-api-spec": "^0.33.0",
|
|
48
|
-
"@seed-design/figma-extractor": "^0.0.
|
|
48
|
+
"@seed-design/figma-extractor": "^0.0.5",
|
|
49
49
|
"typescript": "^5.8.3"
|
|
50
50
|
},
|
|
51
51
|
"publishConfig": {
|
|
@@ -5,28 +5,81 @@ export type ActionButtonProperties = InferComponentDefinition<
|
|
|
5
5
|
typeof metadata.actionButton.componentPropertyDefinitions
|
|
6
6
|
>;
|
|
7
7
|
|
|
8
|
-
export type
|
|
9
|
-
|
|
10
|
-
>;
|
|
11
|
-
|
|
12
|
-
export type ActionSheetProperties = InferComponentDefinition<
|
|
13
|
-
typeof metadata.actionSheet.componentPropertyDefinitions
|
|
14
|
-
>;
|
|
15
|
-
|
|
16
|
-
export type ActionSheetItemProperties = InferComponentDefinition<{
|
|
17
|
-
"Label#15420:4": {
|
|
8
|
+
export type ActionButtonGhostProperties = InferComponentDefinition<{
|
|
9
|
+
"Label#30511:2": {
|
|
18
10
|
type: "TEXT";
|
|
19
|
-
defaultValue: "
|
|
11
|
+
defaultValue: "라벨";
|
|
20
12
|
};
|
|
21
|
-
|
|
13
|
+
"Prefix Icon#30511:3": {
|
|
14
|
+
type: "INSTANCE_SWAP";
|
|
15
|
+
defaultValue: "26621:24682";
|
|
16
|
+
preferredValues: [];
|
|
17
|
+
};
|
|
18
|
+
"Suffix Icon#30525:0": {
|
|
19
|
+
type: "INSTANCE_SWAP";
|
|
20
|
+
defaultValue: "26621:23545";
|
|
21
|
+
preferredValues: [
|
|
22
|
+
{
|
|
23
|
+
type: "COMPONENT_SET";
|
|
24
|
+
key: "c8415f85843e5aea5a1d3620d03d16b643bf86cd";
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
type: "COMPONENT_SET";
|
|
28
|
+
key: "0d0a2bc648a2c4e1f06a56a30ef16299b6e91037";
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
type: "COMPONENT_SET";
|
|
32
|
+
key: "8f28ae559baf8f388d84ccc3ad65a282966e1b05";
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
type: "COMPONENT_SET";
|
|
36
|
+
key: "57341e8a9961bf31590240dd288e57c76969098d";
|
|
37
|
+
},
|
|
38
|
+
];
|
|
39
|
+
};
|
|
40
|
+
"Icon#30525:15": {
|
|
41
|
+
type: "INSTANCE_SWAP";
|
|
42
|
+
defaultValue: "34885:102336";
|
|
43
|
+
preferredValues: [];
|
|
44
|
+
};
|
|
45
|
+
Bleed: {
|
|
46
|
+
type: "VARIANT";
|
|
47
|
+
defaultValue: "true";
|
|
48
|
+
variantOptions: ["true", "false"];
|
|
49
|
+
};
|
|
50
|
+
Size: {
|
|
51
|
+
type: "VARIANT";
|
|
52
|
+
defaultValue: "Medium";
|
|
53
|
+
variantOptions: ["Xsmall", "Small", "Medium", "Large"];
|
|
54
|
+
};
|
|
55
|
+
Layout: {
|
|
22
56
|
type: "VARIANT";
|
|
23
|
-
defaultValue: "
|
|
24
|
-
variantOptions: ["
|
|
57
|
+
defaultValue: "Icon First";
|
|
58
|
+
variantOptions: ["Text Only", "Icon First", "Icon Last", "Icon Only"];
|
|
25
59
|
};
|
|
26
60
|
State: {
|
|
27
61
|
type: "VARIANT";
|
|
28
62
|
defaultValue: "Enabled";
|
|
29
|
-
variantOptions: ["Enabled", "
|
|
63
|
+
variantOptions: ["Enabled", "Pressed", "Loading", "Disabled"];
|
|
64
|
+
};
|
|
65
|
+
}>;
|
|
66
|
+
|
|
67
|
+
export type AlertDialogProperties = InferComponentDefinition<
|
|
68
|
+
typeof metadata.alertDialog.componentPropertyDefinitions
|
|
69
|
+
>;
|
|
70
|
+
|
|
71
|
+
export type AlertDialogFooterProperties = InferComponentDefinition<{
|
|
72
|
+
Type: {
|
|
73
|
+
type: "VARIANT";
|
|
74
|
+
defaultValue: "Single";
|
|
75
|
+
variantOptions: [
|
|
76
|
+
"Single",
|
|
77
|
+
"Neutral",
|
|
78
|
+
"Neutral (Overflow)",
|
|
79
|
+
"Critical",
|
|
80
|
+
"Critical (Overflow)",
|
|
81
|
+
"Nonpreferred",
|
|
82
|
+
];
|
|
30
83
|
};
|
|
31
84
|
}>;
|
|
32
85
|
|
|
@@ -42,6 +95,10 @@ export type BadgeProperties = InferComponentDefinition<
|
|
|
42
95
|
typeof metadata.badge.componentPropertyDefinitions
|
|
43
96
|
>;
|
|
44
97
|
|
|
98
|
+
export type BottomSheetProperties = InferComponentDefinition<
|
|
99
|
+
typeof metadata.bottomSheet.componentPropertyDefinitions
|
|
100
|
+
>;
|
|
101
|
+
|
|
45
102
|
export type CalloutProperties = InferComponentDefinition<
|
|
46
103
|
typeof metadata.callout.componentPropertyDefinitions
|
|
47
104
|
>;
|
|
@@ -50,47 +107,27 @@ export type CheckboxProperties = InferComponentDefinition<
|
|
|
50
107
|
typeof metadata.checkbox.componentPropertyDefinitions
|
|
51
108
|
>;
|
|
52
109
|
|
|
53
|
-
export type
|
|
54
|
-
typeof metadata.
|
|
110
|
+
export type ChipProperties = InferComponentDefinition<
|
|
111
|
+
typeof metadata.chip.componentPropertyDefinitions
|
|
55
112
|
>;
|
|
56
113
|
|
|
57
|
-
export type
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
defaultValue: "라벨";
|
|
61
|
-
};
|
|
62
|
-
Variant: {
|
|
63
|
-
type: "VARIANT";
|
|
64
|
-
defaultValue: "Neutral Solid";
|
|
65
|
-
variantOptions: ["Neutral Solid", "Brand Solid"];
|
|
66
|
-
};
|
|
67
|
-
State: {
|
|
68
|
-
type: "VARIANT";
|
|
69
|
-
defaultValue: "Enabled";
|
|
70
|
-
variantOptions: [
|
|
71
|
-
"Enabled",
|
|
72
|
-
"Enabled-Pressed",
|
|
73
|
-
"Enabled-Selected",
|
|
74
|
-
"Enabled-Selected-Pressed",
|
|
75
|
-
"Disabled",
|
|
76
|
-
"Disabled-Selected",
|
|
77
|
-
];
|
|
78
|
-
};
|
|
79
|
-
}>;
|
|
114
|
+
export type ContextualFloatingButtonProperties = InferComponentDefinition<
|
|
115
|
+
typeof metadata.contextualFloatingButton.componentPropertyDefinitions
|
|
116
|
+
>;
|
|
80
117
|
|
|
81
|
-
export type
|
|
82
|
-
typeof metadata.
|
|
118
|
+
export type DividerProperties = InferComponentDefinition<
|
|
119
|
+
typeof metadata.divider.componentPropertyDefinitions
|
|
83
120
|
>;
|
|
84
121
|
|
|
85
122
|
export type ErrorStateProperties = InferComponentDefinition<
|
|
86
|
-
typeof metadata.
|
|
123
|
+
typeof metadata.templateErrorState.componentPropertyDefinitions
|
|
87
124
|
>;
|
|
88
125
|
|
|
89
|
-
export type
|
|
90
|
-
typeof metadata.
|
|
126
|
+
export type MenuSheetProperties = InferComponentDefinition<
|
|
127
|
+
typeof metadata.menuSheet.componentPropertyDefinitions
|
|
91
128
|
>;
|
|
92
129
|
|
|
93
|
-
export type
|
|
130
|
+
export type MenuSheetGroupProperties = InferComponentDefinition<{
|
|
94
131
|
"Action Count": {
|
|
95
132
|
type: "VARIANT";
|
|
96
133
|
defaultValue: "8";
|
|
@@ -98,18 +135,18 @@ export type ExtendedActionSheetGroupProperties = InferComponentDefinition<{
|
|
|
98
135
|
};
|
|
99
136
|
}>;
|
|
100
137
|
|
|
101
|
-
export type
|
|
138
|
+
export type MenuSheetItemProperties = InferComponentDefinition<{
|
|
102
139
|
"Show Prefix Icon#17043:5": {
|
|
103
140
|
type: "BOOLEAN";
|
|
104
141
|
defaultValue: true;
|
|
105
142
|
};
|
|
106
143
|
"Label#55905:8": {
|
|
107
144
|
type: "TEXT";
|
|
108
|
-
defaultValue: "
|
|
145
|
+
defaultValue: "라벨";
|
|
109
146
|
};
|
|
110
147
|
"Prefix Icon#55948:0": {
|
|
111
148
|
type: "INSTANCE_SWAP";
|
|
112
|
-
defaultValue: "
|
|
149
|
+
defaultValue: "26621:23245";
|
|
113
150
|
preferredValues: [];
|
|
114
151
|
};
|
|
115
152
|
Tone: {
|
|
@@ -120,30 +157,88 @@ export type ExtendedActionSheetItemProperties = InferComponentDefinition<{
|
|
|
120
157
|
State: {
|
|
121
158
|
type: "VARIANT";
|
|
122
159
|
defaultValue: "Enabled";
|
|
123
|
-
variantOptions: ["Enabled", "
|
|
160
|
+
variantOptions: ["Enabled", "Pressed", "Disabled"];
|
|
161
|
+
};
|
|
162
|
+
Layout: {
|
|
163
|
+
type: "VARIANT";
|
|
164
|
+
defaultValue: "Text Only";
|
|
165
|
+
variantOptions: ["Text with Icon", "Text Only"];
|
|
124
166
|
};
|
|
125
167
|
}>;
|
|
126
168
|
|
|
127
|
-
export type
|
|
128
|
-
typeof metadata.extendedFloatingActionButton.componentPropertyDefinitions
|
|
129
|
-
>;
|
|
130
|
-
|
|
131
|
-
export type FabProperties = InferComponentDefinition<
|
|
169
|
+
export type FloatingActionButtonProperties = InferComponentDefinition<
|
|
132
170
|
typeof metadata.floatingActionButton.componentPropertyDefinitions
|
|
133
171
|
>;
|
|
134
172
|
|
|
173
|
+
export type FloatingActionButtonButtonItemProperties = InferComponentDefinition<{
|
|
174
|
+
"Icon#29766:18": {
|
|
175
|
+
type: "INSTANCE_SWAP";
|
|
176
|
+
defaultValue: "26621:24681";
|
|
177
|
+
preferredValues: [];
|
|
178
|
+
};
|
|
179
|
+
"Label#29808:0": {
|
|
180
|
+
type: "TEXT";
|
|
181
|
+
defaultValue: "라벨";
|
|
182
|
+
};
|
|
183
|
+
State: {
|
|
184
|
+
type: "VARIANT";
|
|
185
|
+
defaultValue: "Enabled";
|
|
186
|
+
variantOptions: ["Enabled", "Pressed"];
|
|
187
|
+
};
|
|
188
|
+
Extended: {
|
|
189
|
+
type: "VARIANT";
|
|
190
|
+
defaultValue: "True";
|
|
191
|
+
variantOptions: ["True", "False"];
|
|
192
|
+
};
|
|
193
|
+
}>;
|
|
194
|
+
|
|
195
|
+
export type FloatingActionButtonMenuItemProperties = InferComponentDefinition<{
|
|
196
|
+
"Icon#29766:0": {
|
|
197
|
+
type: "INSTANCE_SWAP";
|
|
198
|
+
defaultValue: "26621:24681";
|
|
199
|
+
preferredValues: [];
|
|
200
|
+
};
|
|
201
|
+
"Label#29766:9": {
|
|
202
|
+
type: "TEXT";
|
|
203
|
+
defaultValue: "라벨";
|
|
204
|
+
};
|
|
205
|
+
State: {
|
|
206
|
+
type: "VARIANT";
|
|
207
|
+
defaultValue: "Enabled";
|
|
208
|
+
variantOptions: ["Pressed", "Enabled"];
|
|
209
|
+
};
|
|
210
|
+
Extended: {
|
|
211
|
+
type: "VARIANT";
|
|
212
|
+
defaultValue: "True";
|
|
213
|
+
variantOptions: ["True", "False"];
|
|
214
|
+
};
|
|
215
|
+
Open: {
|
|
216
|
+
type: "VARIANT";
|
|
217
|
+
defaultValue: "False";
|
|
218
|
+
variantOptions: ["True", "False"];
|
|
219
|
+
};
|
|
220
|
+
}>;
|
|
221
|
+
|
|
135
222
|
export type HelpBubbleProperties = InferComponentDefinition<
|
|
136
223
|
typeof metadata.helpBubble.componentPropertyDefinitions
|
|
137
224
|
>;
|
|
138
225
|
|
|
139
|
-
export type IdentityPlaceholderProperties = InferComponentDefinition<
|
|
140
|
-
|
|
141
|
-
|
|
226
|
+
export type IdentityPlaceholderProperties = InferComponentDefinition<{
|
|
227
|
+
Identity: {
|
|
228
|
+
type: "VARIANT";
|
|
229
|
+
defaultValue: "Person";
|
|
230
|
+
variantOptions: ["Person", "Business"];
|
|
231
|
+
};
|
|
232
|
+
}>;
|
|
142
233
|
|
|
143
234
|
export type InlineBannerProperties = InferComponentDefinition<
|
|
144
235
|
typeof metadata.inlineBanner.componentPropertyDefinitions
|
|
145
236
|
>;
|
|
146
237
|
|
|
238
|
+
export type MannerTempProperties = InferComponentDefinition<
|
|
239
|
+
typeof metadata.mannerTemp.componentPropertyDefinitions
|
|
240
|
+
>;
|
|
241
|
+
|
|
147
242
|
export type MannerTempBadgeProperties = InferComponentDefinition<
|
|
148
243
|
typeof metadata.mannerTempBadge.componentPropertyDefinitions
|
|
149
244
|
>;
|
|
@@ -171,26 +266,11 @@ export type SegmentedControlItemProperties = InferComponentDefinition<{
|
|
|
171
266
|
};
|
|
172
267
|
State: {
|
|
173
268
|
type: "VARIANT";
|
|
174
|
-
defaultValue: "Enabled
|
|
175
|
-
variantOptions: [
|
|
176
|
-
"Enabled",
|
|
177
|
-
"Enabled-Selected",
|
|
178
|
-
"Enabled-Pressed",
|
|
179
|
-
"Enabled-Selected-Pressed",
|
|
180
|
-
"Disabled",
|
|
181
|
-
"Disabled-Selected",
|
|
182
|
-
];
|
|
269
|
+
defaultValue: "Enabled";
|
|
270
|
+
variantOptions: ["Enabled", "Pressed", "Selected", "Disabled", "Disabled-Selected"];
|
|
183
271
|
};
|
|
184
272
|
}>;
|
|
185
273
|
|
|
186
|
-
export type SelectBoxGroupProperties = InferComponentDefinition<
|
|
187
|
-
typeof metadata.templateSelectBoxGroup.componentPropertyDefinitions
|
|
188
|
-
>;
|
|
189
|
-
|
|
190
|
-
export type SelectBoxProperties = InferComponentDefinition<
|
|
191
|
-
typeof metadata.selectBox.componentPropertyDefinitions
|
|
192
|
-
>;
|
|
193
|
-
|
|
194
274
|
export type SkeletonProperties = InferComponentDefinition<
|
|
195
275
|
typeof metadata.skeleton.componentPropertyDefinitions
|
|
196
276
|
>;
|
|
@@ -203,78 +283,30 @@ export type SwitchProperties = InferComponentDefinition<
|
|
|
203
283
|
typeof metadata.switch.componentPropertyDefinitions
|
|
204
284
|
>;
|
|
205
285
|
|
|
206
|
-
export type
|
|
207
|
-
typeof metadata.
|
|
286
|
+
export type ToggleButtonProperties = InferComponentDefinition<
|
|
287
|
+
typeof metadata.toggleButton.componentPropertyDefinitions
|
|
208
288
|
>;
|
|
209
289
|
|
|
210
|
-
export type
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
defaultValue: "라벨";
|
|
214
|
-
};
|
|
215
|
-
Size: {
|
|
216
|
-
type: "VARIANT";
|
|
217
|
-
defaultValue: "Small";
|
|
218
|
-
variantOptions: ["Small", "Medium"];
|
|
219
|
-
};
|
|
220
|
-
Notification: {
|
|
221
|
-
type: "VARIANT";
|
|
222
|
-
defaultValue: "False";
|
|
223
|
-
variantOptions: ["True", "False"];
|
|
224
|
-
};
|
|
225
|
-
State: {
|
|
226
|
-
type: "VARIANT";
|
|
227
|
-
defaultValue: "Enabled-Selected";
|
|
228
|
-
variantOptions: ["Enabled", "Enabled-Selected", "Disabled"];
|
|
229
|
-
};
|
|
230
|
-
}>;
|
|
231
|
-
|
|
232
|
-
export type TabsFillItemProperties = InferComponentDefinition<{
|
|
233
|
-
"Label#4478:2": {
|
|
234
|
-
type: "TEXT";
|
|
235
|
-
defaultValue: "라벨";
|
|
236
|
-
};
|
|
237
|
-
Size: {
|
|
238
|
-
type: "VARIANT";
|
|
239
|
-
defaultValue: "Small";
|
|
240
|
-
variantOptions: ["Small", "Medium"];
|
|
241
|
-
};
|
|
242
|
-
Notification: {
|
|
243
|
-
type: "VARIANT";
|
|
244
|
-
defaultValue: "False";
|
|
245
|
-
variantOptions: ["True", "False"];
|
|
246
|
-
};
|
|
247
|
-
State: {
|
|
248
|
-
type: "VARIANT";
|
|
249
|
-
defaultValue: "Enabled-Selected";
|
|
250
|
-
variantOptions: ["Enabled", "Enabled-Selected", "Disabled"];
|
|
251
|
-
};
|
|
252
|
-
}>;
|
|
290
|
+
export type SelectBoxGroupProperties = InferComponentDefinition<
|
|
291
|
+
typeof metadata.templateSelectBoxGroup.componentPropertyDefinitions
|
|
292
|
+
>;
|
|
253
293
|
|
|
254
|
-
export type
|
|
255
|
-
typeof metadata.
|
|
294
|
+
export type SelectBoxProperties = InferComponentDefinition<
|
|
295
|
+
typeof metadata.selectBox.componentPropertyDefinitions
|
|
256
296
|
>;
|
|
257
297
|
|
|
258
298
|
export type TextFieldProperties = InferComponentDefinition<
|
|
259
299
|
typeof metadata.textField.componentPropertyDefinitions
|
|
260
300
|
>;
|
|
261
301
|
|
|
262
|
-
export type ToggleButtonProperties = InferComponentDefinition<
|
|
263
|
-
typeof metadata.toggleButton.componentPropertyDefinitions
|
|
264
|
-
>;
|
|
265
|
-
|
|
266
302
|
export type AppBarProperties = InferComponentDefinition<
|
|
267
|
-
typeof metadata.
|
|
303
|
+
typeof metadata.topNavigation.componentPropertyDefinitions
|
|
268
304
|
>;
|
|
269
305
|
|
|
270
306
|
export type AppBarMainProperties = InferComponentDefinition<{
|
|
271
|
-
"
|
|
272
|
-
type: "BOOLEAN";
|
|
273
|
-
defaultValue: false;
|
|
274
|
-
};
|
|
275
|
-
"Subtitle#16958:9": {
|
|
307
|
+
"Title#16944:0": {
|
|
276
308
|
type: "TEXT";
|
|
277
|
-
defaultValue: "
|
|
309
|
+
defaultValue: "타이틀";
|
|
278
310
|
};
|
|
279
311
|
"Logo#16958:5": {
|
|
280
312
|
type: "INSTANCE_SWAP";
|
|
@@ -286,33 +318,138 @@ export type AppBarMainProperties = InferComponentDefinition<{
|
|
|
286
318
|
},
|
|
287
319
|
];
|
|
288
320
|
};
|
|
289
|
-
"
|
|
321
|
+
"Subtitle#16958:9": {
|
|
322
|
+
type: "TEXT";
|
|
323
|
+
defaultValue: "서브타이틀";
|
|
324
|
+
};
|
|
325
|
+
"Show Right#16958:13": {
|
|
290
326
|
type: "BOOLEAN";
|
|
291
327
|
defaultValue: false;
|
|
292
328
|
};
|
|
293
|
-
"
|
|
294
|
-
type: "
|
|
295
|
-
defaultValue:
|
|
329
|
+
"Show Left#16958:17": {
|
|
330
|
+
type: "BOOLEAN";
|
|
331
|
+
defaultValue: false;
|
|
296
332
|
};
|
|
297
333
|
Type: {
|
|
298
334
|
type: "VARIANT";
|
|
299
335
|
defaultValue: "Title";
|
|
300
|
-
variantOptions: ["Title", "Title-Subtitle", "Logo"];
|
|
336
|
+
variantOptions: ["Title", "Title-Subtitle", "Logo (Figma Only)"];
|
|
337
|
+
};
|
|
338
|
+
}>;
|
|
339
|
+
|
|
340
|
+
export type AppBarLeftIconButtonProperties = InferComponentDefinition<{
|
|
341
|
+
"Icon#33580:0": {
|
|
342
|
+
type: "INSTANCE_SWAP";
|
|
343
|
+
defaultValue: "26621:23427";
|
|
344
|
+
preferredValues: [];
|
|
301
345
|
};
|
|
302
346
|
}>;
|
|
303
347
|
|
|
304
|
-
export type
|
|
305
|
-
|
|
348
|
+
export type AppBarRightIconButtonProperties = InferComponentDefinition<{
|
|
349
|
+
"Icon#6406:3": {
|
|
350
|
+
type: "INSTANCE_SWAP";
|
|
351
|
+
defaultValue: "34885:102301";
|
|
352
|
+
preferredValues: [
|
|
353
|
+
{
|
|
354
|
+
type: "COMPONENT_SET";
|
|
355
|
+
key: "bc7bc98e19d8ffdd9efdc94b610c6af28156f867";
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
type: "COMPONENT_SET";
|
|
359
|
+
key: "d766c026e52ee6c78cbf1a474068264e831ddfe3";
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
type: "COMPONENT_SET";
|
|
363
|
+
key: "a4cb85e4d25a320d27a48c3e8132a6c01b45ab3c";
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
type: "COMPONENT_SET";
|
|
367
|
+
key: "e262d9b447adff63d15a6f1af60ae47cbc1ca47f";
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
type: "COMPONENT_SET";
|
|
371
|
+
key: "1d3918afcac320eff3aafc2719b98cf5141afa55";
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
type: "COMPONENT_SET";
|
|
375
|
+
key: "8ed05ef62a40f2dc034ee7eb6945bd0e63ad49aa";
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
type: "COMPONENT_SET";
|
|
379
|
+
key: "98ee886122c725ac9e3e682f31efd1d1a1bec90d";
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
type: "COMPONENT_SET";
|
|
383
|
+
key: "bf71b0c5c8664149298fe1b3c58905715a523e19";
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
type: "COMPONENT_SET";
|
|
387
|
+
key: "47a8df3d59bc52aef1c584d992c05771a8125965";
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
type: "COMPONENT_SET";
|
|
391
|
+
key: "0fcbc3c123d5c7ee7a5dd20e0860ee25bdc19e30";
|
|
392
|
+
},
|
|
393
|
+
];
|
|
394
|
+
};
|
|
395
|
+
Notification: {
|
|
306
396
|
type: "VARIANT";
|
|
307
|
-
defaultValue: "
|
|
308
|
-
variantOptions: ["
|
|
397
|
+
defaultValue: "False";
|
|
398
|
+
variantOptions: ["False", "True"];
|
|
309
399
|
};
|
|
310
400
|
}>;
|
|
311
401
|
|
|
312
|
-
export type
|
|
313
|
-
|
|
402
|
+
export type TabsUnderlineHugItemProperties = InferComponentDefinition<{
|
|
403
|
+
"Label#4478:2": {
|
|
404
|
+
type: "TEXT";
|
|
405
|
+
defaultValue: "라벨";
|
|
406
|
+
};
|
|
407
|
+
"Has Notification#32892:0": {
|
|
408
|
+
type: "BOOLEAN";
|
|
409
|
+
defaultValue: false;
|
|
410
|
+
};
|
|
411
|
+
Size: {
|
|
412
|
+
type: "VARIANT";
|
|
413
|
+
defaultValue: "Small";
|
|
414
|
+
variantOptions: ["Small", "Medium"];
|
|
415
|
+
};
|
|
416
|
+
State: {
|
|
417
|
+
type: "VARIANT";
|
|
418
|
+
defaultValue: "Selected";
|
|
419
|
+
variantOptions: ["Enabled", "Selected", "Disabled"];
|
|
420
|
+
};
|
|
421
|
+
}>;
|
|
422
|
+
|
|
423
|
+
export type TabsUnderlineFillItemProperties = InferComponentDefinition<{
|
|
424
|
+
"Label#4478:2": {
|
|
425
|
+
type: "TEXT";
|
|
426
|
+
defaultValue: "라벨";
|
|
427
|
+
};
|
|
428
|
+
"Has Notification#32892:0": {
|
|
429
|
+
type: "BOOLEAN";
|
|
430
|
+
defaultValue: false;
|
|
431
|
+
};
|
|
432
|
+
Size: {
|
|
433
|
+
type: "VARIANT";
|
|
434
|
+
defaultValue: "Small";
|
|
435
|
+
variantOptions: ["Small", "Medium"];
|
|
436
|
+
};
|
|
437
|
+
State: {
|
|
438
|
+
type: "VARIANT";
|
|
439
|
+
defaultValue: "Selected";
|
|
440
|
+
variantOptions: ["Enabled", "Selected", "Disabled"];
|
|
441
|
+
};
|
|
442
|
+
}>;
|
|
443
|
+
|
|
444
|
+
export type TabsChipItemProperties = InferComponentDefinition<{
|
|
445
|
+
Size: {
|
|
446
|
+
type: "VARIANT";
|
|
447
|
+
defaultValue: "Large";
|
|
448
|
+
variantOptions: ["Medium", "Large"];
|
|
449
|
+
};
|
|
450
|
+
Variant: {
|
|
314
451
|
type: "VARIANT";
|
|
315
|
-
defaultValue: "
|
|
316
|
-
variantOptions: ["
|
|
452
|
+
defaultValue: "Solid";
|
|
453
|
+
variantOptions: ["Solid", "Outline"];
|
|
317
454
|
};
|
|
318
455
|
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NormalizedInstanceNode } from "@/normalizer";
|
|
1
|
+
import type { NormalizedInstanceNode, NormalizedSceneNode } from "@/normalizer";
|
|
2
2
|
import type { ElementNode } from "./jsx";
|
|
3
3
|
|
|
4
4
|
export interface ComponentHandler<
|
|
@@ -6,12 +6,18 @@ export interface ComponentHandler<
|
|
|
6
6
|
NormalizedInstanceNode["componentProperties"] = NormalizedInstanceNode["componentProperties"],
|
|
7
7
|
> {
|
|
8
8
|
key: string;
|
|
9
|
-
transform: (
|
|
9
|
+
transform: (
|
|
10
|
+
node: Omit<NormalizedInstanceNode, "componentProperties"> & { componentProperties: T },
|
|
11
|
+
traverse: (node: NormalizedSceneNode) => ElementNode | undefined,
|
|
12
|
+
) => ElementNode;
|
|
10
13
|
}
|
|
11
14
|
|
|
12
15
|
export function defineComponentHandler<T extends NormalizedInstanceNode["componentProperties"]>(
|
|
13
16
|
key: string,
|
|
14
|
-
transform: (
|
|
17
|
+
transform: (
|
|
18
|
+
node: Omit<NormalizedInstanceNode, "componentProperties"> & { componentProperties: T },
|
|
19
|
+
traverse: (node: NormalizedSceneNode) => ElementNode | undefined,
|
|
20
|
+
) => ElementNode,
|
|
15
21
|
): ComponentHandler<T> {
|
|
16
22
|
return { key, transform };
|
|
17
23
|
}
|
package/src/codegen/core/jsx.ts
CHANGED
|
@@ -73,10 +73,13 @@ export function stringifyElement(element: ElementNode, options: { printSource?:
|
|
|
73
73
|
|
|
74
74
|
if (importPath) {
|
|
75
75
|
const existing = importMap.get(importPath);
|
|
76
|
+
|
|
77
|
+
const [namespace] = tag.split(".");
|
|
78
|
+
|
|
76
79
|
if (existing) {
|
|
77
|
-
existing.add(
|
|
80
|
+
existing.add(namespace);
|
|
78
81
|
} else {
|
|
79
|
-
importMap.set(importPath, new Set([
|
|
82
|
+
importMap.set(importPath, new Set([namespace]));
|
|
80
83
|
}
|
|
81
84
|
}
|
|
82
85
|
|
|
@@ -98,6 +101,8 @@ export function stringifyElement(element: ElementNode, options: { printSource?:
|
|
|
98
101
|
}
|
|
99
102
|
|
|
100
103
|
if (typeof value === "boolean") {
|
|
104
|
+
if (value === true) return key;
|
|
105
|
+
|
|
101
106
|
return `${key}={${value}}`;
|
|
102
107
|
}
|
|
103
108
|
|