@seed-design/figma 0.1.8 → 0.1.10
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 +192 -141
- package/lib/codegen/index.d.ts +75 -36
- package/lib/codegen/index.d.ts.map +1 -1
- package/lib/codegen/index.js +192 -141
- package/lib/codegen/targets/react/index.cjs +301 -232
- package/lib/codegen/targets/react/index.d.ts +3 -2
- package/lib/codegen/targets/react/index.d.ts.map +1 -1
- package/lib/codegen/targets/react/index.js +301 -232
- package/lib/index.cjs +193 -141
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +193 -141
- package/package.json +2 -2
- package/src/codegen/component-properties.ts +8 -0
- package/src/codegen/targets/figma/props.ts +1 -1
- package/src/codegen/targets/react/component/handlers/avatar-stack.ts +17 -12
- package/src/codegen/targets/react/component/handlers/checkbox.ts +3 -5
- package/src/codegen/targets/react/component/handlers/chip.ts +35 -14
- package/src/codegen/targets/react/component/handlers/identity-placeholder.ts +4 -2
- package/src/codegen/targets/react/component/handlers/manner-temp.ts +1 -1
- package/src/codegen/targets/react/component/handlers/progress-circle.ts +1 -1
- package/src/codegen/targets/react/component/handlers/reaction-button.ts +3 -5
- package/src/codegen/targets/react/component/handlers/select-box.ts +6 -8
- package/src/codegen/targets/react/component/handlers/switch.ts +4 -11
- package/src/codegen/targets/react/component/handlers/toggle-button.ts +3 -5
- package/src/codegen/targets/react/instance.ts +15 -1
- package/src/codegen/targets/react/props.ts +6 -5
- package/src/entities/data/__generated__/component-sets/checkbox.d.ts +9 -7
- package/src/entities/data/__generated__/component-sets/checkbox.mjs +9 -7
- package/src/entities/data/__generated__/component-sets/checkmark.d.ts +9 -7
- package/src/entities/data/__generated__/component-sets/checkmark.mjs +9 -7
- package/src/entities/data/__generated__/component-sets/chip.d.ts +11 -7
- package/src/entities/data/__generated__/component-sets/chip.mjs +11 -7
- package/src/entities/data/__generated__/component-sets/index.d.ts +1 -0
- package/src/entities/data/__generated__/component-sets/index.mjs +1 -0
- package/src/entities/data/__generated__/component-sets/progress-circle.d.ts +1 -1
- package/src/entities/data/__generated__/component-sets/progress-circle.mjs +1 -1
- package/src/entities/data/__generated__/component-sets/radio-mark.d.ts +4 -10
- package/src/entities/data/__generated__/component-sets/radio-mark.mjs +4 -10
- package/src/entities/data/__generated__/component-sets/radio.d.ts +8 -4
- package/src/entities/data/__generated__/component-sets/radio.mjs +8 -4
- package/src/entities/data/__generated__/component-sets/reaction-button.d.ts +8 -5
- package/src/entities/data/__generated__/component-sets/reaction-button.mjs +8 -5
- package/src/entities/data/__generated__/component-sets/select-box.d.ts +8 -3
- package/src/entities/data/__generated__/component-sets/select-box.mjs +8 -3
- package/src/entities/data/__generated__/component-sets/superscript-child.d.ts +18 -0
- package/src/entities/data/__generated__/component-sets/superscript-child.mjs +18 -0
- package/src/entities/data/__generated__/component-sets/switch.d.ts +21 -7
- package/src/entities/data/__generated__/component-sets/switch.mjs +21 -7
- package/src/entities/data/__generated__/component-sets/toggle-button.d.ts +8 -5
- package/src/entities/data/__generated__/component-sets/toggle-button.mjs +8 -5
- package/src/normalizer/from-plugin.ts +1 -0
- package/src/normalizer/types.ts +2 -0
package/lib/codegen/index.d.ts
CHANGED
|
@@ -58,6 +58,7 @@ interface NormalizedInstanceNode extends NormalizedFrameTrait {
|
|
|
58
58
|
};
|
|
59
59
|
componentKey: string;
|
|
60
60
|
componentSetKey?: string;
|
|
61
|
+
overrides?: FigmaRestSpec.InstanceNode["overrides"];
|
|
61
62
|
children: NormalizedSceneNode[];
|
|
62
63
|
}
|
|
63
64
|
interface NormalizedVectorNode extends NormalizedDefaultShapeTrait, NormalizedCornerTrait {
|
|
@@ -637,18 +638,20 @@ declare const metadata$k: {
|
|
|
637
638
|
"Stronger"
|
|
638
639
|
]
|
|
639
640
|
},
|
|
641
|
+
"Selected": {
|
|
642
|
+
"type": "VARIANT",
|
|
643
|
+
"variantOptions": [
|
|
644
|
+
"True",
|
|
645
|
+
"False",
|
|
646
|
+
"Indeterminate"
|
|
647
|
+
]
|
|
648
|
+
},
|
|
640
649
|
"State": {
|
|
641
650
|
"type": "VARIANT",
|
|
642
651
|
"variantOptions": [
|
|
643
652
|
"Enabled",
|
|
644
653
|
"Pressed",
|
|
645
|
-
"Disabled"
|
|
646
|
-
"Selected",
|
|
647
|
-
"Selected-Pressed",
|
|
648
|
-
"Selected-Disabled",
|
|
649
|
-
"Indeterminate",
|
|
650
|
-
"Indeterminate-Pressed",
|
|
651
|
-
"Indeterminate-Disabled"
|
|
654
|
+
"Disabled"
|
|
652
655
|
]
|
|
653
656
|
}
|
|
654
657
|
}
|
|
@@ -692,6 +695,10 @@ declare const metadata$j: {
|
|
|
692
695
|
{
|
|
693
696
|
"type": "COMPONENT_SET",
|
|
694
697
|
"key": "df43b92004c850e7c6d2869e7a4ba1ef9a2d7db6"
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
"type": "COMPONENT_SET",
|
|
701
|
+
"key": "19923052d4152393ecdc6e2f5853ea0359849127"
|
|
695
702
|
}
|
|
696
703
|
]
|
|
697
704
|
},
|
|
@@ -714,19 +721,19 @@ declare const metadata$j: {
|
|
|
714
721
|
"Small"
|
|
715
722
|
]
|
|
716
723
|
},
|
|
717
|
-
"
|
|
724
|
+
"Selected": {
|
|
718
725
|
"type": "VARIANT",
|
|
719
726
|
"variantOptions": [
|
|
720
|
-
"
|
|
721
|
-
"
|
|
722
|
-
"Disabled"
|
|
727
|
+
"False",
|
|
728
|
+
"True"
|
|
723
729
|
]
|
|
724
730
|
},
|
|
725
|
-
"
|
|
731
|
+
"State": {
|
|
726
732
|
"type": "VARIANT",
|
|
727
733
|
"variantOptions": [
|
|
728
|
-
"
|
|
729
|
-
"
|
|
734
|
+
"Enabled",
|
|
735
|
+
"Pressed",
|
|
736
|
+
"Disabled"
|
|
730
737
|
]
|
|
731
738
|
},
|
|
732
739
|
"Prefix Type": {
|
|
@@ -1039,7 +1046,7 @@ declare const metadata$9: {
|
|
|
1039
1046
|
"Neutral",
|
|
1040
1047
|
"Brand",
|
|
1041
1048
|
"Static White",
|
|
1042
|
-
"Custom"
|
|
1049
|
+
"Custom(inherit)"
|
|
1043
1050
|
]
|
|
1044
1051
|
},
|
|
1045
1052
|
"Value": {
|
|
@@ -1079,17 +1086,20 @@ declare const metadata$8: {
|
|
|
1079
1086
|
"Small"
|
|
1080
1087
|
]
|
|
1081
1088
|
},
|
|
1089
|
+
"Selected": {
|
|
1090
|
+
"type": "VARIANT",
|
|
1091
|
+
"variantOptions": [
|
|
1092
|
+
"True",
|
|
1093
|
+
"False"
|
|
1094
|
+
]
|
|
1095
|
+
},
|
|
1082
1096
|
"State": {
|
|
1083
1097
|
"type": "VARIANT",
|
|
1084
1098
|
"variantOptions": [
|
|
1085
1099
|
"Enabled",
|
|
1086
1100
|
"Pressed",
|
|
1087
1101
|
"Loading",
|
|
1088
|
-
"
|
|
1089
|
-
"Selected-Pressed",
|
|
1090
|
-
"Selected-Loading",
|
|
1091
|
-
"Disabled",
|
|
1092
|
-
"Disabled-Selected"
|
|
1102
|
+
"Disabled"
|
|
1093
1103
|
]
|
|
1094
1104
|
}
|
|
1095
1105
|
}
|
|
@@ -1139,13 +1149,18 @@ declare const metadata$6: {
|
|
|
1139
1149
|
"Radio"
|
|
1140
1150
|
]
|
|
1141
1151
|
},
|
|
1152
|
+
"Selected": {
|
|
1153
|
+
"type": "VARIANT",
|
|
1154
|
+
"variantOptions": [
|
|
1155
|
+
"True",
|
|
1156
|
+
"False"
|
|
1157
|
+
]
|
|
1158
|
+
},
|
|
1142
1159
|
"State": {
|
|
1143
1160
|
"type": "VARIANT",
|
|
1144
1161
|
"variantOptions": [
|
|
1145
1162
|
"Enabled",
|
|
1146
|
-
"Pressed"
|
|
1147
|
-
"Selected",
|
|
1148
|
-
"Selected-Pressed"
|
|
1163
|
+
"Pressed"
|
|
1149
1164
|
]
|
|
1150
1165
|
}
|
|
1151
1166
|
}
|
|
@@ -1200,25 +1215,39 @@ declare const metadata$4: {
|
|
|
1200
1215
|
|
|
1201
1216
|
declare const metadata$3: {
|
|
1202
1217
|
"name": "🟢 Switch",
|
|
1203
|
-
"key": "
|
|
1218
|
+
"key": "65e0e7ba1a0c13b42e5fd0ceb17d5f756128dd6b",
|
|
1204
1219
|
"componentPropertyDefinitions": {
|
|
1205
|
-
"Label#
|
|
1220
|
+
"Label#36578:0": {
|
|
1206
1221
|
"type": "TEXT"
|
|
1207
1222
|
},
|
|
1208
1223
|
"Size": {
|
|
1209
1224
|
"type": "VARIANT",
|
|
1210
1225
|
"variantOptions": [
|
|
1211
|
-
"
|
|
1212
|
-
"
|
|
1226
|
+
"16",
|
|
1227
|
+
"24",
|
|
1228
|
+
"32"
|
|
1229
|
+
]
|
|
1230
|
+
},
|
|
1231
|
+
"Selected": {
|
|
1232
|
+
"type": "VARIANT",
|
|
1233
|
+
"variantOptions": [
|
|
1234
|
+
"True",
|
|
1235
|
+
"False"
|
|
1213
1236
|
]
|
|
1214
1237
|
},
|
|
1215
1238
|
"State": {
|
|
1216
1239
|
"type": "VARIANT",
|
|
1217
1240
|
"variantOptions": [
|
|
1218
1241
|
"Enabled",
|
|
1219
|
-
"
|
|
1220
|
-
|
|
1221
|
-
|
|
1242
|
+
"Disabled"
|
|
1243
|
+
]
|
|
1244
|
+
},
|
|
1245
|
+
"Label Layout(Figma Only)": {
|
|
1246
|
+
"type": "VARIANT",
|
|
1247
|
+
"variantOptions": [
|
|
1248
|
+
"None",
|
|
1249
|
+
"Right",
|
|
1250
|
+
"Left"
|
|
1222
1251
|
]
|
|
1223
1252
|
}
|
|
1224
1253
|
}
|
|
@@ -1359,17 +1388,20 @@ declare const metadata$1: {
|
|
|
1359
1388
|
"Brand Solid"
|
|
1360
1389
|
]
|
|
1361
1390
|
},
|
|
1391
|
+
"Selected": {
|
|
1392
|
+
"type": "VARIANT",
|
|
1393
|
+
"variantOptions": [
|
|
1394
|
+
"True",
|
|
1395
|
+
"False"
|
|
1396
|
+
]
|
|
1397
|
+
},
|
|
1362
1398
|
"State": {
|
|
1363
1399
|
"type": "VARIANT",
|
|
1364
1400
|
"variantOptions": [
|
|
1365
1401
|
"Enabled",
|
|
1366
1402
|
"Pressed",
|
|
1367
1403
|
"Loading",
|
|
1368
|
-
"
|
|
1369
|
-
"Selected-Pressed",
|
|
1370
|
-
"Selected-Loading",
|
|
1371
|
-
"Disabled",
|
|
1372
|
-
"Disabled-Selected"
|
|
1404
|
+
"Disabled"
|
|
1373
1405
|
]
|
|
1374
1406
|
}
|
|
1375
1407
|
}
|
|
@@ -1499,6 +1531,13 @@ type BottomSheetProperties = InferComponentDefinition<typeof metadata$m.componen
|
|
|
1499
1531
|
type CalloutProperties = InferComponentDefinition<typeof metadata$l.componentPropertyDefinitions>;
|
|
1500
1532
|
type CheckboxProperties = InferComponentDefinition<typeof metadata$k.componentPropertyDefinitions>;
|
|
1501
1533
|
type ChipProperties = InferComponentDefinition<typeof metadata$j.componentPropertyDefinitions>;
|
|
1534
|
+
type ChipIconSuffixProperties = InferComponentDefinition<{
|
|
1535
|
+
"Icon#33203:0": {
|
|
1536
|
+
type: "INSTANCE_SWAP";
|
|
1537
|
+
defaultValue: "26621:23250";
|
|
1538
|
+
preferredValues: [];
|
|
1539
|
+
};
|
|
1540
|
+
}>;
|
|
1502
1541
|
type ContextualFloatingButtonProperties = InferComponentDefinition<typeof metadata$i.componentPropertyDefinitions>;
|
|
1503
1542
|
type DividerProperties = InferComponentDefinition<typeof metadata$h.componentPropertyDefinitions>;
|
|
1504
1543
|
type ErrorStateProperties = InferComponentDefinition<typeof metadata$t.componentPropertyDefinitions>;
|
|
@@ -1920,5 +1959,5 @@ declare namespace index {
|
|
|
1920
1959
|
}
|
|
1921
1960
|
|
|
1922
1961
|
export { cloneElement, createCodeGenerator, createElement, createPropsConverter, createValueResolver, defineComponentHandler, defineElementTransformer, definePropsConverter, index as figma, inferLayout };
|
|
1923
|
-
export type { ActionButtonGhostProperties, ActionButtonProperties, AlertDialogFooterProperties, AlertDialogProperties, AppBarLeftIconButtonProperties, AppBarMainProperties, AppBarProperties, AppBarRightIconButtonProperties, AvatarProperties, AvatarStackProperties, BadgeProperties, BottomSheetProperties, CalloutProperties, CheckboxProperties, ChipProperties, CodeGeneratorDeps, ComponentHandler, ComponentPropertyDefinition, ContextualFloatingButtonProperties, DividerProperties, ElementNode, ElementTransformer, ErrorStateProperties, FloatingActionButtonButtonItemProperties, FloatingActionButtonMenuItemProperties, FloatingActionButtonProperties, HelpBubbleProperties, IdentityPlaceholderProperties, InferComponentDefinition, InferComponentPropertyType, InlineBannerProperties, MannerTempBadgeProperties, MannerTempProperties, MenuSheetGroupProperties, MenuSheetItemProperties, MenuSheetProperties, MultilineTextFieldProperties, ProgressCircleProperties, PropsConverter, ReactionButtonProperties, SegmentedControlItemProperties, SegmentedControlProperties, SelectBoxGroupProperties, SelectBoxProperties, SkeletonProperties, SnackbarProperties, SwitchProperties, TabsChipItemProperties, TabsUnderlineFillItemProperties, TabsUnderlineHugItemProperties, TextFieldProperties, ToggleButtonProperties, ValueResolver };
|
|
1962
|
+
export type { ActionButtonGhostProperties, ActionButtonProperties, AlertDialogFooterProperties, AlertDialogProperties, AppBarLeftIconButtonProperties, AppBarMainProperties, AppBarProperties, AppBarRightIconButtonProperties, AvatarProperties, AvatarStackProperties, BadgeProperties, BottomSheetProperties, CalloutProperties, CheckboxProperties, ChipIconSuffixProperties, ChipProperties, CodeGeneratorDeps, ComponentHandler, ComponentPropertyDefinition, ContextualFloatingButtonProperties, DividerProperties, ElementNode, ElementTransformer, ErrorStateProperties, FloatingActionButtonButtonItemProperties, FloatingActionButtonMenuItemProperties, FloatingActionButtonProperties, HelpBubbleProperties, IdentityPlaceholderProperties, InferComponentDefinition, InferComponentPropertyType, InlineBannerProperties, MannerTempBadgeProperties, MannerTempProperties, MenuSheetGroupProperties, MenuSheetItemProperties, MenuSheetProperties, MultilineTextFieldProperties, ProgressCircleProperties, PropsConverter, ReactionButtonProperties, SegmentedControlItemProperties, SegmentedControlProperties, SelectBoxGroupProperties, SelectBoxProperties, SkeletonProperties, SnackbarProperties, SwitchProperties, TabsChipItemProperties, TabsUnderlineFillItemProperties, TabsUnderlineHugItemProperties, TextFieldProperties, ToggleButtonProperties, ValueResolver };
|
|
1924
1963
|
//# sourceMappingURL=index.d.ts.map
|