@seed-design/figma 1.1.2 → 1.1.3
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.d.ts +133 -1
- package/lib/codegen/index.d.ts.map +1 -1
- package/lib/codegen/targets/react/index.cjs +218 -107
- package/lib/codegen/targets/react/index.d.ts.map +1 -1
- package/lib/codegen/targets/react/index.js +218 -107
- package/package.json +2 -2
- package/src/codegen/component-properties.ts +134 -0
- package/src/codegen/targets/react/component/handlers/legacy-text-field.ts +196 -0
- package/src/codegen/targets/react/component/index.ts +8 -0
|
@@ -3047,7 +3047,7 @@ function handleSizeProp(size) {
|
|
|
3047
3047
|
}
|
|
3048
3048
|
}
|
|
3049
3049
|
|
|
3050
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
3050
|
+
const { createLocalSnippetElement: createLocalSnippetElement$y } = createLocalSnippetHelper("action-button");
|
|
3051
3051
|
const createActionButtonHandler = (ctx)=>defineComponentHandler(actionButton.key, ({ componentProperties: props })=>{
|
|
3052
3052
|
const states = props.State.value.split("-");
|
|
3053
3053
|
const { layout, children } = match(props.Layout.value).with("Icon Only", ()=>({
|
|
@@ -3088,7 +3088,7 @@ const createActionButtonHandler = (ctx)=>defineComponentHandler(actionButton.key
|
|
|
3088
3088
|
variant: camelCase(props.Variant.value),
|
|
3089
3089
|
layout
|
|
3090
3090
|
};
|
|
3091
|
-
return createLocalSnippetElement$
|
|
3091
|
+
return createLocalSnippetElement$y("ActionButton", commonProps, children);
|
|
3092
3092
|
});
|
|
3093
3093
|
const ACTION_BUTTON_GHOST_BUTTON_KEY = "ea69291fb4d76217419f3d9613ae16aadafb56a5";
|
|
3094
3094
|
const createActionButtonGhostHandler = (ctx)=>defineComponentHandler(ACTION_BUTTON_GHOST_BUTTON_KEY, (node)=>{
|
|
@@ -3146,26 +3146,26 @@ const createActionButtonGhostHandler = (ctx)=>defineComponentHandler(ACTION_BUTT
|
|
|
3146
3146
|
bleedY: "asPadding"
|
|
3147
3147
|
}
|
|
3148
3148
|
};
|
|
3149
|
-
return createLocalSnippetElement$
|
|
3149
|
+
return createLocalSnippetElement$y("ActionButton", commonProps, children);
|
|
3150
3150
|
});
|
|
3151
3151
|
|
|
3152
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
3152
|
+
const { createLocalSnippetElement: createLocalSnippetElement$x } = createLocalSnippetHelper("alert-dialog");
|
|
3153
3153
|
const { createLocalSnippetElement: createLocalSnippetElementTrigger$3 } = createLocalSnippetHelper("action-button");
|
|
3154
3154
|
const ALERT_DIALOG_FOOTER_KEY = "00b1b131d67edf2875a7a1df8dfa88098d7c04be";
|
|
3155
3155
|
const createAlertDialogHandler = (_ctx)=>defineComponentHandler(alertDialog.key, (node, traverse)=>{
|
|
3156
3156
|
const props = node.componentProperties;
|
|
3157
|
-
const alertDialogHeader = createLocalSnippetElement$
|
|
3157
|
+
const alertDialogHeader = createLocalSnippetElement$x("AlertDialogHeader", undefined, [
|
|
3158
3158
|
...props["Show Title#20361:14"].value ? [
|
|
3159
|
-
createLocalSnippetElement$
|
|
3159
|
+
createLocalSnippetElement$x("AlertDialogTitle", undefined, props["Title Text#20361:0"].value)
|
|
3160
3160
|
] : [],
|
|
3161
|
-
createLocalSnippetElement$
|
|
3161
|
+
createLocalSnippetElement$x("AlertDialogDescription", undefined, props["Description Text#20361:7"].value)
|
|
3162
3162
|
]);
|
|
3163
3163
|
const footerNodes = findAllInstances({
|
|
3164
3164
|
node,
|
|
3165
3165
|
key: ALERT_DIALOG_FOOTER_KEY
|
|
3166
3166
|
});
|
|
3167
3167
|
if (footerNodes.length === 0 || footerNodes.length > 1) {
|
|
3168
|
-
return createLocalSnippetElement$
|
|
3168
|
+
return createLocalSnippetElement$x("AlertDialog", undefined, alertDialogHeader, {
|
|
3169
3169
|
comment: "Footer 영역을 확인해주세요."
|
|
3170
3170
|
});
|
|
3171
3171
|
}
|
|
@@ -3173,21 +3173,21 @@ const createAlertDialogHandler = (_ctx)=>defineComponentHandler(alertDialog.key,
|
|
|
3173
3173
|
const footerNodeProps = traverse(footerNode)?.props;
|
|
3174
3174
|
const buttons = footerNode.children.map(traverse);
|
|
3175
3175
|
const alertDialogFooterChildren = match(footerNode.componentProperties.Type.value).with("Single", ()=>buttons).with("Neutral", "Critical", ()=>createSeedReactElement("ResponsivePair", footerNodeProps, buttons)).with("Neutral (Overflow)", "Critical (Overflow)", "Nonpreferred", ()=>createSeedReactElement("VStack", footerNodeProps, buttons)).exhaustive();
|
|
3176
|
-
const alertDialogFooter = createLocalSnippetElement$
|
|
3177
|
-
return createLocalSnippetElement$
|
|
3176
|
+
const alertDialogFooter = createLocalSnippetElement$x("AlertDialogFooter", undefined, alertDialogFooterChildren);
|
|
3177
|
+
return createLocalSnippetElement$x("AlertDialogRoot", {
|
|
3178
3178
|
open: true
|
|
3179
3179
|
}, [
|
|
3180
|
-
createLocalSnippetElement$
|
|
3180
|
+
createLocalSnippetElement$x("AlertDialogTrigger", {
|
|
3181
3181
|
asChild: true
|
|
3182
3182
|
}, createLocalSnippetElementTrigger$3("ActionButton", {}, "AlertDialog 열기")),
|
|
3183
|
-
createLocalSnippetElement$
|
|
3183
|
+
createLocalSnippetElement$x("AlertDialogContent", undefined, [
|
|
3184
3184
|
alertDialogHeader,
|
|
3185
3185
|
alertDialogFooter
|
|
3186
3186
|
])
|
|
3187
3187
|
]);
|
|
3188
3188
|
});
|
|
3189
3189
|
|
|
3190
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
3190
|
+
const { createLocalSnippetElement: createLocalSnippetElement$w } = createLocalSnippetHelper("app-bar");
|
|
3191
3191
|
const APP_BAR_TITLE_KEY = "d2cc4f615b2b44098be89448ad1c573f94af0355";
|
|
3192
3192
|
const APP_BAR_LEFT_ICON_BUTTON_KEY = "5a953f7bafc0df744777517458396e9f6c915825";
|
|
3193
3193
|
const APP_BAR_RIGHT_ICON_BUTTON_KEY = "c08db793288077e53bd45ef11aa419a835e88fce";
|
|
@@ -3204,12 +3204,12 @@ const createAppBarMainHandler = (_ctx)=>{
|
|
|
3204
3204
|
subtitle: undefined
|
|
3205
3205
|
})).exhaustive();
|
|
3206
3206
|
if (title) {
|
|
3207
|
-
return createLocalSnippetElement$
|
|
3207
|
+
return createLocalSnippetElement$w("AppBarMain", {
|
|
3208
3208
|
title,
|
|
3209
3209
|
subtitle
|
|
3210
3210
|
});
|
|
3211
3211
|
}
|
|
3212
|
-
return createLocalSnippetElement$
|
|
3212
|
+
return createLocalSnippetElement$w("AppBarMain", undefined, undefined, {
|
|
3213
3213
|
comment: "AppBarMain 내부를 직접 작성해주세요."
|
|
3214
3214
|
});
|
|
3215
3215
|
});
|
|
@@ -3236,33 +3236,33 @@ const createAppBarHandler = (ctx)=>{
|
|
|
3236
3236
|
return appBarMainHandler.transform(mainNode, traverse);
|
|
3237
3237
|
})();
|
|
3238
3238
|
const leftChildren = match(props.Left.value).with("None", ()=>undefined).with("Back", ()=>[
|
|
3239
|
-
createLocalSnippetElement$
|
|
3239
|
+
createLocalSnippetElement$w("AppBarBackButton")
|
|
3240
3240
|
]).with("Close", ()=>[
|
|
3241
|
-
createLocalSnippetElement$
|
|
3241
|
+
createLocalSnippetElement$w("AppBarCloseButton")
|
|
3242
3242
|
]).with("Custom", ()=>{
|
|
3243
3243
|
const buttons = findAllInstances({
|
|
3244
3244
|
node,
|
|
3245
3245
|
key: APP_BAR_LEFT_ICON_BUTTON_KEY
|
|
3246
3246
|
});
|
|
3247
3247
|
if (buttons.length > 0) {
|
|
3248
|
-
return buttons.map((button)=>createLocalSnippetElement$
|
|
3248
|
+
return buttons.map((button)=>createLocalSnippetElement$w("AppBarIconButton", undefined, ctx.iconHandler.transform(button.componentProperties["Icon#33580:0"]), {
|
|
3249
3249
|
comment: "AppBarIconButton에 aria-label 속성을 추가해주세요."
|
|
3250
3250
|
}));
|
|
3251
3251
|
}
|
|
3252
3252
|
return undefined;
|
|
3253
3253
|
}).exhaustive();
|
|
3254
|
-
const left = leftChildren && leftChildren.length > 0 ? createLocalSnippetElement$
|
|
3254
|
+
const left = leftChildren && leftChildren.length > 0 ? createLocalSnippetElement$w("AppBarLeft", {}, leftChildren) : undefined;
|
|
3255
3255
|
const rightChildren = match(props.Right.value).with("None", ()=>undefined).with("1 Icon Button", "2 Icon Button", "3 Icon Button", ()=>{
|
|
3256
3256
|
const buttons = findAllInstances({
|
|
3257
3257
|
node,
|
|
3258
3258
|
key: APP_BAR_RIGHT_ICON_BUTTON_KEY
|
|
3259
3259
|
});
|
|
3260
|
-
return buttons.map((button)=>createLocalSnippetElement$
|
|
3260
|
+
return buttons.map((button)=>createLocalSnippetElement$w("AppBarIconButton", undefined, ctx.iconHandler.transform(button.componentProperties["Icon#6406:3"]), {
|
|
3261
3261
|
comment: "AppBarIconButton에 aria-label 속성을 추가해주세요."
|
|
3262
3262
|
}));
|
|
3263
3263
|
}).with("Text Button", ()=>undefined).exhaustive();
|
|
3264
|
-
const right = rightChildren && rightChildren.length > 0 ? createLocalSnippetElement$
|
|
3265
|
-
return createLocalSnippetElement$
|
|
3264
|
+
const right = rightChildren && rightChildren.length > 0 ? createLocalSnippetElement$w("AppBarRight", {}, rightChildren) : undefined;
|
|
3265
|
+
return createLocalSnippetElement$w("AppBar", {
|
|
3266
3266
|
theme,
|
|
3267
3267
|
tone
|
|
3268
3268
|
}, [
|
|
@@ -3276,15 +3276,15 @@ const createAppBarHandler = (ctx)=>{
|
|
|
3276
3276
|
};
|
|
3277
3277
|
|
|
3278
3278
|
const IDENTITY_PLACEHOLDER_KEY = "b3563b6f16ba4cfe4240c9b33eef7edad4c304eb";
|
|
3279
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
3279
|
+
const { createLocalSnippetElement: createLocalSnippetElement$v } = createLocalSnippetHelper("identity-placeholder");
|
|
3280
3280
|
const createIdentityPlaceholderHandler = (_ctx)=>defineComponentHandler(IDENTITY_PLACEHOLDER_KEY, ({ componentProperties: props })=>{
|
|
3281
3281
|
const commonProps = {
|
|
3282
3282
|
identity: camelCase(props.Identity.value)
|
|
3283
3283
|
};
|
|
3284
|
-
return createLocalSnippetElement$
|
|
3284
|
+
return createLocalSnippetElement$v("IdentityPlaceholder", commonProps);
|
|
3285
3285
|
});
|
|
3286
3286
|
|
|
3287
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
3287
|
+
const { createLocalSnippetElement: createLocalSnippetElement$u } = createLocalSnippetHelper("avatar");
|
|
3288
3288
|
const createAvatarHandler = (ctx)=>{
|
|
3289
3289
|
const identityPlaceholderHandler = createIdentityPlaceholderHandler();
|
|
3290
3290
|
return defineComponentHandler(avatar.key, (node, traverse)=>{
|
|
@@ -3307,7 +3307,7 @@ const createAvatarHandler = (ctx)=>{
|
|
|
3307
3307
|
},
|
|
3308
3308
|
size: props.Size.value
|
|
3309
3309
|
};
|
|
3310
|
-
return createLocalSnippetElement$
|
|
3310
|
+
return createLocalSnippetElement$u("Avatar", commonProps, props["Badge"].value === "None" ? undefined : createLocalSnippetElement$u("AvatarBadge", {
|
|
3311
3311
|
asChild: true
|
|
3312
3312
|
}, createElement("img", {
|
|
3313
3313
|
src: "https://placehold.co/20x20"
|
|
@@ -3319,7 +3319,7 @@ const createAvatarHandler = (ctx)=>{
|
|
|
3319
3319
|
});
|
|
3320
3320
|
};
|
|
3321
3321
|
|
|
3322
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
3322
|
+
const { createLocalSnippetElement: createLocalSnippetElement$t } = createLocalSnippetHelper("avatar");
|
|
3323
3323
|
const createAvatarStackHandler = (ctx)=>{
|
|
3324
3324
|
const avatarHandler = createAvatarHandler();
|
|
3325
3325
|
return defineComponentHandler(avatarStack.key, (node, traverse)=>{
|
|
@@ -3332,7 +3332,7 @@ const createAvatarStackHandler = (ctx)=>{
|
|
|
3332
3332
|
size: props.Size.value
|
|
3333
3333
|
};
|
|
3334
3334
|
const avatarStackChildren = avatarNodes.map((avatarNode)=>avatarHandler.transform(avatarNode, traverse));
|
|
3335
|
-
return createLocalSnippetElement$
|
|
3335
|
+
return createLocalSnippetElement$t("AvatarStack", commonProps, avatarStackChildren);
|
|
3336
3336
|
});
|
|
3337
3337
|
};
|
|
3338
3338
|
|
|
@@ -3345,7 +3345,7 @@ const createBadgeHandler = (_ctx)=>defineComponentHandler(badge.key, ({ componen
|
|
|
3345
3345
|
return createSeedReactElement("Badge", commonProps, props["Label#1584:0"].value);
|
|
3346
3346
|
});
|
|
3347
3347
|
|
|
3348
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
3348
|
+
const { createLocalSnippetElement: createLocalSnippetElement$s } = createLocalSnippetHelper("bottom-sheet");
|
|
3349
3349
|
const { createLocalSnippetElement: createLocalSnippetElementTrigger$2 } = createLocalSnippetHelper("action-button");
|
|
3350
3350
|
// TODO: Bottom Action Bar (WIP) handler의 키. 해당 컴포넌트(템플릿) 핸들러 작성 시 handler.transform()으로 대체
|
|
3351
3351
|
const BOTTOM_SHEET_FOOTER_KEY = "de6c65d34cc4a01c18c9a7c0ded34635170ca11f";
|
|
@@ -3365,32 +3365,32 @@ const createBottomSheetHandler = (_ctx)=>defineComponentHandler(bottomSheet.key,
|
|
|
3365
3365
|
node,
|
|
3366
3366
|
key: BOTTOM_SHEET_BODY_KEY
|
|
3367
3367
|
});
|
|
3368
|
-
const bottomSheetBody = bodyNodes.length === 1 ? createLocalSnippetElement$
|
|
3368
|
+
const bottomSheetBody = bodyNodes.length === 1 ? createLocalSnippetElement$s("BottomSheetBody", {}, bodyNodes[0].children.map(traverse)) : createLocalSnippetElement$s("BottomSheetBody", {}, createElement("div", undefined, "No content available"));
|
|
3369
3369
|
const footerNodes = findAllInstances({
|
|
3370
3370
|
node,
|
|
3371
3371
|
key: BOTTOM_SHEET_FOOTER_KEY
|
|
3372
3372
|
});
|
|
3373
|
-
const bottomSheetFooter = props["Show Footer#25162:14"] && footerNodes.length === 1 ? createLocalSnippetElement$
|
|
3374
|
-
return createLocalSnippetElement$
|
|
3373
|
+
const bottomSheetFooter = props["Show Footer#25162:14"] && footerNodes.length === 1 ? createLocalSnippetElement$s("BottomSheetFooter", {}, footerNodes[0].children.map(traverse)) : undefined;
|
|
3374
|
+
return createLocalSnippetElement$s("BottomSheetRoot", {
|
|
3375
3375
|
defaultOpen: true,
|
|
3376
3376
|
headerAlign
|
|
3377
3377
|
}, [
|
|
3378
|
-
createLocalSnippetElement$
|
|
3378
|
+
createLocalSnippetElement$s("BottomSheetTrigger", {
|
|
3379
3379
|
asChild: true
|
|
3380
3380
|
}, createLocalSnippetElementTrigger$2("ActionButton", {}, "BottomSheet 열기")),
|
|
3381
|
-
createLocalSnippetElement$
|
|
3381
|
+
createLocalSnippetElement$s("BottomSheetContent", contentProps, [
|
|
3382
3382
|
bottomSheetBody,
|
|
3383
3383
|
bottomSheetFooter
|
|
3384
3384
|
])
|
|
3385
3385
|
]);
|
|
3386
3386
|
});
|
|
3387
3387
|
|
|
3388
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
3388
|
+
const { createLocalSnippetElement: createLocalSnippetElement$r } = createLocalSnippetHelper("callout");
|
|
3389
3389
|
const createCalloutHandler = (ctx)=>defineComponentHandler(callout.key, ({ componentProperties: props, children })=>{
|
|
3390
3390
|
const tag = match(props.Interaction.value).with("Display", ()=>"Callout").with("Actionable", ()=>"ActionableCallout").with("Dismissible", ()=>"DismissibleCallout").exhaustive();
|
|
3391
3391
|
const textNode = children.find((child)=>child.type === "TEXT");
|
|
3392
3392
|
if (!textNode) {
|
|
3393
|
-
return createLocalSnippetElement$
|
|
3393
|
+
return createLocalSnippetElement$r(tag, undefined, undefined, {
|
|
3394
3394
|
comment: "내용을 제공해주세요."
|
|
3395
3395
|
});
|
|
3396
3396
|
}
|
|
@@ -3442,10 +3442,10 @@ const createCalloutHandler = (ctx)=>defineComponentHandler(callout.key, ({ compo
|
|
|
3442
3442
|
prefixIcon: ctx.iconHandler.transform(props["Prefix Icon#35087:0"])
|
|
3443
3443
|
}
|
|
3444
3444
|
};
|
|
3445
|
-
return createLocalSnippetElement$
|
|
3445
|
+
return createLocalSnippetElement$r(tag, commonProps);
|
|
3446
3446
|
});
|
|
3447
3447
|
|
|
3448
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
3448
|
+
const { createLocalSnippetElement: createLocalSnippetElement$q } = createLocalSnippetHelper("checkbox");
|
|
3449
3449
|
const createCheckboxHandler = (_ctx)=>defineComponentHandler(checkbox.key, ({ componentProperties: props })=>{
|
|
3450
3450
|
const tone = match(props.Tone.value).with("Neutral", ()=>"neutral").with("🚫[Deprecated]Brand", ()=>"brand").exhaustive();
|
|
3451
3451
|
const commonProps = {
|
|
@@ -3465,10 +3465,10 @@ const createCheckboxHandler = (_ctx)=>defineComponentHandler(checkbox.key, ({ co
|
|
|
3465
3465
|
disabled: true
|
|
3466
3466
|
}
|
|
3467
3467
|
};
|
|
3468
|
-
return createLocalSnippetElement$
|
|
3468
|
+
return createLocalSnippetElement$q("Checkbox", commonProps);
|
|
3469
3469
|
});
|
|
3470
3470
|
|
|
3471
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
3471
|
+
const { createLocalSnippetElement: createLocalSnippetElement$p } = createLocalSnippetHelper("checkbox");
|
|
3472
3472
|
const createCheckmarkHandler = (_ctx)=>defineComponentHandler(checkmark.key, ({ componentProperties: props })=>{
|
|
3473
3473
|
const tone = match(props.Tone.value).with("Neutral", ()=>"neutral").with("🚫[Deprecated]Brand", ()=>"brand").exhaustive();
|
|
3474
3474
|
const commonProps = {
|
|
@@ -3476,14 +3476,14 @@ const createCheckmarkHandler = (_ctx)=>defineComponentHandler(checkmark.key, ({
|
|
|
3476
3476
|
variant: camelCase(props.Shape.value),
|
|
3477
3477
|
size: handleSizeProp(props.Size.value)
|
|
3478
3478
|
};
|
|
3479
|
-
return createLocalSnippetElement$
|
|
3479
|
+
return createLocalSnippetElement$p("Checkmark", commonProps);
|
|
3480
3480
|
});
|
|
3481
3481
|
|
|
3482
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
3482
|
+
const { createLocalSnippetElement: createLocalSnippetElement$o } = createLocalSnippetHelper("chip");
|
|
3483
3483
|
const CHIP_ICON_SUFFIX_KEY = "27343e0e5ab2c66948e9b10fde03d58b5e037212";
|
|
3484
3484
|
const createChipIconSuffixHandler = (ctx)=>{
|
|
3485
3485
|
return defineComponentHandler(CHIP_ICON_SUFFIX_KEY, ({ componentProperties })=>{
|
|
3486
|
-
return createLocalSnippetElement$
|
|
3486
|
+
return createLocalSnippetElement$o("Chip.SuffixIcon", undefined, createSeedReactElement("Icon", {
|
|
3487
3487
|
svg: ctx.iconHandler.transform(componentProperties["Icon#33203:0"])
|
|
3488
3488
|
}));
|
|
3489
3489
|
});
|
|
@@ -3493,7 +3493,7 @@ const createChipHandler = (ctx)=>{
|
|
|
3493
3493
|
const iconSuffixHandler = createChipIconSuffixHandler(ctx);
|
|
3494
3494
|
return defineComponentHandler(chip.key, (node, traverse)=>{
|
|
3495
3495
|
const props = node.componentProperties;
|
|
3496
|
-
const prefix = match(props["Prefix Type"].value).with("None", "Image", ()=>undefined).with("Icon", ()=>createLocalSnippetElement$
|
|
3496
|
+
const prefix = match(props["Prefix Type"].value).with("None", "Image", ()=>undefined).with("Icon", ()=>createLocalSnippetElement$o("Chip.PrefixIcon", undefined, createSeedReactElement("Icon", {
|
|
3497
3497
|
svg: ctx.iconHandler.transform(props["Prefix Icon#8722:0"])
|
|
3498
3498
|
}))).with("Avatar", ()=>{
|
|
3499
3499
|
const [avatar$1] = findAllInstances({
|
|
@@ -3501,9 +3501,9 @@ const createChipHandler = (ctx)=>{
|
|
|
3501
3501
|
key: avatar.key
|
|
3502
3502
|
});
|
|
3503
3503
|
if (!avatar$1) return undefined;
|
|
3504
|
-
return createLocalSnippetElement$
|
|
3504
|
+
return createLocalSnippetElement$o("Chip.PrefixAvatar", undefined, avatarHandler.transform(avatar$1, traverse));
|
|
3505
3505
|
}).exhaustive();
|
|
3506
|
-
const label = createLocalSnippetElement$
|
|
3506
|
+
const label = createLocalSnippetElement$o("Chip.Label", undefined, props["Label#7185:0"].value);
|
|
3507
3507
|
const [suffixIcon] = findAllInstances({
|
|
3508
3508
|
node,
|
|
3509
3509
|
key: CHIP_ICON_SUFFIX_KEY
|
|
@@ -3519,7 +3519,7 @@ const createChipHandler = (ctx)=>{
|
|
|
3519
3519
|
disabled: true
|
|
3520
3520
|
}
|
|
3521
3521
|
};
|
|
3522
|
-
return createLocalSnippetElement$
|
|
3522
|
+
return createLocalSnippetElement$o("Chip.Toggle", commonProps, [
|
|
3523
3523
|
prefix,
|
|
3524
3524
|
label,
|
|
3525
3525
|
suffixIcon ? iconSuffixHandler.transform(suffixIcon, traverse) : undefined
|
|
@@ -3529,7 +3529,7 @@ const createChipHandler = (ctx)=>{
|
|
|
3529
3529
|
});
|
|
3530
3530
|
};
|
|
3531
3531
|
|
|
3532
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
3532
|
+
const { createLocalSnippetElement: createLocalSnippetElement$n } = createLocalSnippetHelper("contextual-floating-button");
|
|
3533
3533
|
const createContextualFloatingButtonHandler = (ctx)=>defineComponentHandler(contextualFloatingButton.key, ({ componentProperties: props })=>{
|
|
3534
3534
|
const states = props.State.value.split("-");
|
|
3535
3535
|
const { layout, children } = match(props.Layout.value).with("Icon Only", ()=>({
|
|
@@ -3558,7 +3558,7 @@ const createContextualFloatingButtonHandler = (ctx)=>defineComponentHandler(cont
|
|
|
3558
3558
|
variant: match(props.Variant.value).with("Solid", ()=>"solid").with("Layer", ()=>"layer").exhaustive(),
|
|
3559
3559
|
layout
|
|
3560
3560
|
};
|
|
3561
|
-
return createLocalSnippetElement$
|
|
3561
|
+
return createLocalSnippetElement$n("ContextualFloatingButton", commonProps, children);
|
|
3562
3562
|
});
|
|
3563
3563
|
|
|
3564
3564
|
const createDividerHandler = (_ctx)=>defineComponentHandler(divider.key, ({ componentProperties: props })=>{
|
|
@@ -3574,7 +3574,7 @@ const createDividerHandler = (_ctx)=>defineComponentHandler(divider.key, ({ comp
|
|
|
3574
3574
|
return createSeedReactElement("Divider", commonProps, undefined);
|
|
3575
3575
|
});
|
|
3576
3576
|
|
|
3577
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
3577
|
+
const { createLocalSnippetElement: createLocalSnippetElement$m } = createLocalSnippetHelper("error-state");
|
|
3578
3578
|
const createErrorStateHandler = (ctx)=>{
|
|
3579
3579
|
const actionButtonHandler = createActionButtonHandler(ctx);
|
|
3580
3580
|
const ghostButtonHandler = createActionButtonGhostHandler(ctx);
|
|
@@ -3605,7 +3605,7 @@ const createErrorStateHandler = (ctx)=>{
|
|
|
3605
3605
|
}
|
|
3606
3606
|
}
|
|
3607
3607
|
};
|
|
3608
|
-
return createLocalSnippetElement$
|
|
3608
|
+
return createLocalSnippetElement$m("ErrorState", commonProps);
|
|
3609
3609
|
});
|
|
3610
3610
|
};
|
|
3611
3611
|
|
|
@@ -3718,7 +3718,7 @@ const FIELD_KEYS = {
|
|
|
3718
3718
|
});
|
|
3719
3719
|
};
|
|
3720
3720
|
|
|
3721
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
3721
|
+
const { createLocalSnippetElement: createLocalSnippetElement$l } = createLocalSnippetHelper("field-button");
|
|
3722
3722
|
const INPUT_BUTTON_KEY = "965bdecb58755af9a08d60cc3c8d2d33b42e15f0";
|
|
3723
3723
|
const INPUT_BUTTON_PREFIX_KEY = "12b40c736a098298c64ba16de85702b4b460d1f1";
|
|
3724
3724
|
const INPUT_BUTTON_SUFFIX_KEY = "5dda27af9f4afafa471925c17acf97d81912877a";
|
|
@@ -3777,11 +3777,11 @@ const createFieldButtonHandler = (ctx)=>{
|
|
|
3777
3777
|
// these can be fragile but better than having 9 different handlers
|
|
3778
3778
|
const placeholder = findOne(node, (node)=>node.type === "TEXT" && node.name.toLowerCase().includes("placeholder"));
|
|
3779
3779
|
const value = findOne(node, (node)=>node.type === "TEXT" && node.name.toLowerCase().includes("value"));
|
|
3780
|
-
return createLocalSnippetElement$
|
|
3780
|
+
return createLocalSnippetElement$l("FieldButton", {
|
|
3781
3781
|
...headerProps,
|
|
3782
3782
|
...footerProps,
|
|
3783
3783
|
...commonProps
|
|
3784
|
-
}, props["Has Value"].value === "True" && value ? createLocalSnippetElement$
|
|
3784
|
+
}, props["Has Value"].value === "True" && value ? createLocalSnippetElement$l("FieldButtonValue", undefined, value.characters) : placeholder ? createLocalSnippetElement$l("FieldButtonPlaceholder", undefined, placeholder.characters) : undefined, {
|
|
3785
3785
|
comment: "buttonProps를 통해 aria-label을 제공하세요."
|
|
3786
3786
|
});
|
|
3787
3787
|
});
|
|
@@ -3828,7 +3828,7 @@ const createAddressFieldHandler = (ctx)=>{
|
|
|
3828
3828
|
});
|
|
3829
3829
|
};
|
|
3830
3830
|
|
|
3831
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
3831
|
+
const { createLocalSnippetElement: createLocalSnippetElement$k } = createLocalSnippetHelper("floating-action-button");
|
|
3832
3832
|
const BUTTON_TYPE_KEY = "8cecc85275115d653579d4c3156567ebf19f7b27";
|
|
3833
3833
|
const MENU_TYPE_KEY = "400124347392c15473f9cd2d8a6aedb64f3baf36";
|
|
3834
3834
|
const createFloatingActionButtonHandler = (ctx)=>defineComponentHandler(floatingActionButton.key, (node)=>{
|
|
@@ -3852,10 +3852,10 @@ const createFloatingActionButtonHandler = (ctx)=>defineComponentHandler(floating
|
|
|
3852
3852
|
label: menu.componentProperties["Label#29766:9"].value
|
|
3853
3853
|
};
|
|
3854
3854
|
})();
|
|
3855
|
-
return createLocalSnippetElement$
|
|
3855
|
+
return createLocalSnippetElement$k("FloatingActionButton", commonProps);
|
|
3856
3856
|
});
|
|
3857
3857
|
|
|
3858
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
3858
|
+
const { createLocalSnippetElement: createLocalSnippetElement$j } = createLocalSnippetHelper("help-bubble");
|
|
3859
3859
|
const { createLocalSnippetElement: createLocalSnippetElementTrigger$1 } = createLocalSnippetHelper("action-button");
|
|
3860
3860
|
const createHelpBubbleHandler = (_ctx)=>defineComponentHandler(helpBubble.key, ({ componentProperties: props })=>{
|
|
3861
3861
|
const placement = (()=>{
|
|
@@ -3895,20 +3895,20 @@ const createHelpBubbleHandler = (_ctx)=>defineComponentHandler(helpBubble.key, (
|
|
|
3895
3895
|
showCloseButton: props["Show Close Button#40538:0"].value,
|
|
3896
3896
|
placement
|
|
3897
3897
|
};
|
|
3898
|
-
return createLocalSnippetElement$
|
|
3898
|
+
return createLocalSnippetElement$j("HelpBubbleTrigger", commonProps, createLocalSnippetElementTrigger$1("ActionButton", {}, "HelpBubble 열기"), {
|
|
3899
3899
|
comment: "필요에 따라 HelpBubbleAnchor로 변경하여 사용하세요."
|
|
3900
3900
|
});
|
|
3901
3901
|
});
|
|
3902
3902
|
|
|
3903
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
3903
|
+
const { createLocalSnippetElement: createLocalSnippetElement$i } = createLocalSnippetHelper("list-header");
|
|
3904
3904
|
const createListHeaderHandler = (_ctx)=>defineComponentHandler(listHeader.key, ({ componentProperties: props })=>{
|
|
3905
3905
|
const commonProps = {
|
|
3906
3906
|
variant: camelCase(props["Variant"].value)
|
|
3907
3907
|
};
|
|
3908
|
-
return createLocalSnippetElement$
|
|
3908
|
+
return createLocalSnippetElement$i("ListHeader", commonProps, props["Title#28588:0"].value);
|
|
3909
3909
|
});
|
|
3910
3910
|
|
|
3911
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
3911
|
+
const { createLocalSnippetElement: createLocalSnippetElement$h } = createLocalSnippetHelper("list");
|
|
3912
3912
|
const PREFIX_KEYS = {
|
|
3913
3913
|
checkmark: "f24c9ef42ef08df79483fbae0fa7d9037e566748",
|
|
3914
3914
|
radioMark: "5a77ad37a2291989dfe77c44ddee9aa39e447f90",
|
|
@@ -4018,37 +4018,37 @@ const createListItemHandler = (ctx)=>defineComponentHandler(listItem.key, (node,
|
|
|
4018
4018
|
}
|
|
4019
4019
|
};
|
|
4020
4020
|
const comment = match(tag).with("ListItem", ()=>"목적에 따라 ListButtonItem이나 ListLinkItem으로 바꿔 사용하세요.").with("ListCheckItem", ()=>`<List as="fieldset">과 함께 사용하세요.`).with("ListRadioItem", ()=>"<RadioGroup.Root>와 함께 사용하세요.").otherwise(()=>undefined);
|
|
4021
|
-
const list = createLocalSnippetElement$
|
|
4021
|
+
const list = createLocalSnippetElement$h(tag, commonProps, undefined, {
|
|
4022
4022
|
comment
|
|
4023
4023
|
});
|
|
4024
4024
|
if (props["Divider#28441:0"].value) {
|
|
4025
4025
|
return createElement("", {}, [
|
|
4026
4026
|
list,
|
|
4027
|
-
createLocalSnippetElement$
|
|
4027
|
+
createLocalSnippetElement$h("ListDivider")
|
|
4028
4028
|
]);
|
|
4029
4029
|
}
|
|
4030
4030
|
return list;
|
|
4031
4031
|
});
|
|
4032
4032
|
|
|
4033
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
4033
|
+
const { createLocalSnippetElement: createLocalSnippetElement$g } = createLocalSnippetHelper("manner-temp-badge");
|
|
4034
4034
|
const createMannerTempBadgeHandler = (_ctx)=>defineComponentHandler(mannerTempBadge.key, ({ children })=>{
|
|
4035
4035
|
const textNode = children.find((child)=>child.type === "TEXT");
|
|
4036
4036
|
const commonProps = {
|
|
4037
4037
|
temperature: Number(textNode?.characters.replace(/[^\d.-]/g, "") ?? "-1")
|
|
4038
4038
|
};
|
|
4039
|
-
return createLocalSnippetElement$
|
|
4039
|
+
return createLocalSnippetElement$g("MannerTempBadge", commonProps);
|
|
4040
4040
|
});
|
|
4041
4041
|
|
|
4042
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
4042
|
+
const { createLocalSnippetElement: createLocalSnippetElement$f } = createLocalSnippetHelper("manner-temp");
|
|
4043
4043
|
const createMannerTempHandler = (_ctx)=>defineComponentHandler(mannerTemp.key, ({ children })=>{
|
|
4044
4044
|
const textNode = children.find((child)=>child.type === "TEXT");
|
|
4045
4045
|
const commonProps = {
|
|
4046
4046
|
temperature: Number(textNode?.characters.replace(/[^\d.-]/g, "") ?? "-1")
|
|
4047
4047
|
};
|
|
4048
|
-
return createLocalSnippetElement$
|
|
4048
|
+
return createLocalSnippetElement$f("MannerTemp", commonProps);
|
|
4049
4049
|
});
|
|
4050
4050
|
|
|
4051
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
4051
|
+
const { createLocalSnippetElement: createLocalSnippetElement$e } = createLocalSnippetHelper("menu-sheet");
|
|
4052
4052
|
const { createLocalSnippetElement: createLocalSnippetElementTrigger } = createLocalSnippetHelper("action-button");
|
|
4053
4053
|
const MENU_SHEET_ITEM_KEY = "057083e95466da59051119eec0b41d4ad5a07f8f";
|
|
4054
4054
|
const createMenuSheetItemHandler = (ctx)=>defineComponentHandler(MENU_SHEET_ITEM_KEY, ({ componentProperties: props })=>{
|
|
@@ -4059,7 +4059,7 @@ const createMenuSheetItemHandler = (ctx)=>defineComponentHandler(MENU_SHEET_ITEM
|
|
|
4059
4059
|
disabled: true
|
|
4060
4060
|
}
|
|
4061
4061
|
};
|
|
4062
|
-
return createLocalSnippetElement$
|
|
4062
|
+
return createLocalSnippetElement$e("MenuSheetItem", commonProps, [
|
|
4063
4063
|
props["Show Prefix Icon#17043:5"].value ? createSeedReactElement("PrefixIcon", {
|
|
4064
4064
|
svg: ctx.iconHandler.transform(props["Prefix Icon#55948:0"])
|
|
4065
4065
|
}) : undefined,
|
|
@@ -4075,7 +4075,7 @@ const createMenuSheetGroupHandler = (ctx)=>{
|
|
|
4075
4075
|
key: menuSheetItemHandler.key
|
|
4076
4076
|
});
|
|
4077
4077
|
const contentChildren = items.map((item)=>menuSheetItemHandler.transform(item, traverse));
|
|
4078
|
-
return createLocalSnippetElement$
|
|
4078
|
+
return createLocalSnippetElement$e("MenuSheetGroup", undefined, contentChildren);
|
|
4079
4079
|
});
|
|
4080
4080
|
};
|
|
4081
4081
|
const createMenuSheetHandler = (ctx)=>{
|
|
@@ -4095,23 +4095,23 @@ const createMenuSheetHandler = (ctx)=>{
|
|
|
4095
4095
|
})).with("Text Only", ()=>({
|
|
4096
4096
|
labelAlignment: "center"
|
|
4097
4097
|
})).exhaustive();
|
|
4098
|
-
const content = createLocalSnippetElement$
|
|
4098
|
+
const content = createLocalSnippetElement$e("MenuSheetContent", {
|
|
4099
4099
|
title,
|
|
4100
4100
|
labelAlignment
|
|
4101
4101
|
}, contentChildren, {
|
|
4102
4102
|
comment: title ? undefined : "title을 제공하지 않는 경우 aria-label이나 aria-labelledby 중 하나를 제공해야 합니다."
|
|
4103
4103
|
});
|
|
4104
|
-
const trigger = createLocalSnippetElement$
|
|
4104
|
+
const trigger = createLocalSnippetElement$e("MenuSheetTrigger", {
|
|
4105
4105
|
asChild: true
|
|
4106
4106
|
}, createLocalSnippetElementTrigger("ActionButton", {}, "MenuSheet 열기"));
|
|
4107
|
-
return createLocalSnippetElement$
|
|
4107
|
+
return createLocalSnippetElement$e("MenuSheet", undefined, [
|
|
4108
4108
|
trigger,
|
|
4109
4109
|
content
|
|
4110
4110
|
]);
|
|
4111
4111
|
});
|
|
4112
4112
|
};
|
|
4113
4113
|
|
|
4114
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
4114
|
+
const { createLocalSnippetElement: createLocalSnippetElement$d } = createLocalSnippetHelper("page-banner");
|
|
4115
4115
|
const SUFFIX_BUTTON_KEY = "7dce4e1242761ccd8e5da42278fc2d870918039c";
|
|
4116
4116
|
const createPageBannerButtonHandler = (_ctx)=>defineComponentHandler(SUFFIX_BUTTON_KEY, (node)=>{
|
|
4117
4117
|
return createElement("PageBannerButton", undefined, node.componentProperties["Label#39890:0"].value);
|
|
@@ -4145,7 +4145,7 @@ const createPageBannerHandler = (ctx)=>{
|
|
|
4145
4145
|
})).exhaustive();
|
|
4146
4146
|
const textNode = findOne(node, (child)=>child.type === "TEXT" && child.name === "Text");
|
|
4147
4147
|
if (!textNode) {
|
|
4148
|
-
return createLocalSnippetElement$
|
|
4148
|
+
return createLocalSnippetElement$d(tag, undefined, undefined, {
|
|
4149
4149
|
comment: "내용을 제공해주세요."
|
|
4150
4150
|
});
|
|
4151
4151
|
}
|
|
@@ -4178,11 +4178,11 @@ const createPageBannerHandler = (ctx)=>{
|
|
|
4178
4178
|
suffix
|
|
4179
4179
|
}
|
|
4180
4180
|
};
|
|
4181
|
-
return createLocalSnippetElement$
|
|
4181
|
+
return createLocalSnippetElement$d(tag, commonProps);
|
|
4182
4182
|
});
|
|
4183
4183
|
};
|
|
4184
4184
|
|
|
4185
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
4185
|
+
const { createLocalSnippetElement: createLocalSnippetElement$c } = createLocalSnippetHelper("progress-circle");
|
|
4186
4186
|
const createProgressCircleHandler = (_ctx)=>defineComponentHandler(progressCircle.key, ({ componentProperties: props })=>{
|
|
4187
4187
|
const { value, minValue, maxValue } = match(props.Value.value).with("Indeterminate", ()=>({
|
|
4188
4188
|
value: undefined,
|
|
@@ -4214,10 +4214,10 @@ const createProgressCircleHandler = (_ctx)=>defineComponentHandler(progressCircl
|
|
|
4214
4214
|
tone: camelCase(props.Tone.value)
|
|
4215
4215
|
}
|
|
4216
4216
|
};
|
|
4217
|
-
return createLocalSnippetElement$
|
|
4217
|
+
return createLocalSnippetElement$c("ProgressCircle", commonProps);
|
|
4218
4218
|
});
|
|
4219
4219
|
|
|
4220
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
4220
|
+
const { createLocalSnippetElement: createLocalSnippetElement$b } = createLocalSnippetHelper("radio-group");
|
|
4221
4221
|
const createRadioGroupItemHandler = (_ctx)=>defineComponentHandler(radio.key, ({ componentProperties: props })=>{
|
|
4222
4222
|
const tone = match(props.Tone.value).with("Neutral", ()=>"neutral").with("🚫[Deprecated]Brand", ()=>"brand").exhaustive();
|
|
4223
4223
|
const commonProps = {
|
|
@@ -4230,20 +4230,20 @@ const createRadioGroupItemHandler = (_ctx)=>defineComponentHandler(radio.key, ({
|
|
|
4230
4230
|
tone,
|
|
4231
4231
|
weight: camelCase(props.Weight.value)
|
|
4232
4232
|
};
|
|
4233
|
-
return createLocalSnippetElement$
|
|
4233
|
+
return createLocalSnippetElement$b("RadioGroupItem", commonProps);
|
|
4234
4234
|
});
|
|
4235
4235
|
|
|
4236
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
4236
|
+
const { createLocalSnippetElement: createLocalSnippetElement$a } = createLocalSnippetHelper("radio-group");
|
|
4237
4237
|
const createRadioMarkHandler = (_ctx)=>defineComponentHandler(radioMark.key, ({ componentProperties: props })=>{
|
|
4238
4238
|
const tone = match(props.Tone.value).with("Neutral", ()=>"neutral").with("🚫[Deprecated]Brand", ()=>"brand").exhaustive();
|
|
4239
4239
|
const commonProps = {
|
|
4240
4240
|
tone,
|
|
4241
4241
|
size: handleSizeProp(props.Size.value)
|
|
4242
4242
|
};
|
|
4243
|
-
return createLocalSnippetElement$
|
|
4243
|
+
return createLocalSnippetElement$a("RadioMark", commonProps);
|
|
4244
4244
|
});
|
|
4245
4245
|
|
|
4246
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
4246
|
+
const { createLocalSnippetElement: createLocalSnippetElement$9 } = createLocalSnippetHelper("reaction-button");
|
|
4247
4247
|
const createReactionButtonHandler = (ctx)=>defineComponentHandler(reactionButton.key, ({ componentProperties: props })=>{
|
|
4248
4248
|
const commonProps = {
|
|
4249
4249
|
size: handleSizeProp(props.Size.value),
|
|
@@ -4257,7 +4257,7 @@ const createReactionButtonHandler = (ctx)=>defineComponentHandler(reactionButton
|
|
|
4257
4257
|
defaultPressed: true
|
|
4258
4258
|
}
|
|
4259
4259
|
};
|
|
4260
|
-
return createLocalSnippetElement$
|
|
4260
|
+
return createLocalSnippetElement$9("ReactionButton", commonProps, [
|
|
4261
4261
|
createSeedReactElement("PrefixIcon", {
|
|
4262
4262
|
svg: ctx.iconHandler.transform(props["Icon#12379:0"])
|
|
4263
4263
|
}),
|
|
@@ -4266,7 +4266,7 @@ const createReactionButtonHandler = (ctx)=>defineComponentHandler(reactionButton
|
|
|
4266
4266
|
]);
|
|
4267
4267
|
});
|
|
4268
4268
|
|
|
4269
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
4269
|
+
const { createLocalSnippetElement: createLocalSnippetElement$8 } = createLocalSnippetHelper("segmented-control");
|
|
4270
4270
|
const SEGMENTED_CONTROL_ITEM_KEY = "9a7ba0d4c041ddbce84ee48881788434fd6bccc8";
|
|
4271
4271
|
const createSegmentedControlItemHandler = (_ctx)=>defineComponentHandler(SEGMENTED_CONTROL_ITEM_KEY, ({ componentProperties: props })=>{
|
|
4272
4272
|
const states = props.State.value.split("-");
|
|
@@ -4276,7 +4276,7 @@ const createSegmentedControlItemHandler = (_ctx)=>defineComponentHandler(SEGMENT
|
|
|
4276
4276
|
disabled: true
|
|
4277
4277
|
}
|
|
4278
4278
|
};
|
|
4279
|
-
return createLocalSnippetElement$
|
|
4279
|
+
return createLocalSnippetElement$8("SegmentedControlItem", commonProps, props["Label#11366:15"].value);
|
|
4280
4280
|
});
|
|
4281
4281
|
const createSegmentedControlHandler = (ctx)=>{
|
|
4282
4282
|
const segmentedControlItemHandler = createSegmentedControlItemHandler();
|
|
@@ -4292,13 +4292,13 @@ const createSegmentedControlHandler = (ctx)=>{
|
|
|
4292
4292
|
defaultValue: selectedSegment.componentProperties["Label#11366:15"].value
|
|
4293
4293
|
}
|
|
4294
4294
|
};
|
|
4295
|
-
return createLocalSnippetElement$
|
|
4295
|
+
return createLocalSnippetElement$8("SegmentedControl", commonProps, segmentedControlChildren, {
|
|
4296
4296
|
comment: "aria-label이나 aria-labelledby 중 하나를 제공해야 합니다."
|
|
4297
4297
|
});
|
|
4298
4298
|
});
|
|
4299
4299
|
};
|
|
4300
4300
|
|
|
4301
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
4301
|
+
const { createLocalSnippetElement: createLocalSnippetElement$7 } = createLocalSnippetHelper("select-box");
|
|
4302
4302
|
const createSelectBoxHandler = (_ctx)=>defineComponentHandler(selectBox.key, ({ componentProperties: props })=>{
|
|
4303
4303
|
const tag = match(props.Control.value).with("Checkbox", ()=>"CheckSelectBox").with("Radio", ()=>"RadioSelectBoxItem").exhaustive();
|
|
4304
4304
|
const commonProps = {
|
|
@@ -4313,7 +4313,7 @@ const createSelectBoxHandler = (_ctx)=>defineComponentHandler(selectBox.key, ({
|
|
|
4313
4313
|
defaultChecked: true
|
|
4314
4314
|
}
|
|
4315
4315
|
};
|
|
4316
|
-
return createLocalSnippetElement$
|
|
4316
|
+
return createLocalSnippetElement$7(tag, commonProps);
|
|
4317
4317
|
});
|
|
4318
4318
|
const createSelectBoxGroupHandler = (ctx)=>{
|
|
4319
4319
|
const selectBoxHandler = createSelectBoxHandler();
|
|
@@ -4336,7 +4336,7 @@ const createSelectBoxGroupHandler = (ctx)=>{
|
|
|
4336
4336
|
defaultValue: selectedSelectBox?.componentProperties["Label#3635:0"].value
|
|
4337
4337
|
}
|
|
4338
4338
|
};
|
|
4339
|
-
return createLocalSnippetElement$
|
|
4339
|
+
return createLocalSnippetElement$7(tag, commonProps, stack);
|
|
4340
4340
|
});
|
|
4341
4341
|
};
|
|
4342
4342
|
|
|
@@ -4350,7 +4350,7 @@ const createSkeletonHandler = (ctx)=>defineComponentHandler(skeleton.key, (node)
|
|
|
4350
4350
|
return createSeedReactElement("Skeleton", commonProps);
|
|
4351
4351
|
});
|
|
4352
4352
|
|
|
4353
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
4353
|
+
const { createLocalSnippetElement: createLocalSnippetElement$6 } = createLocalSnippetHelper("slider");
|
|
4354
4354
|
const SLIDER_TICK_KEY = "ace432ffb7a2af13bce549b19c932ac5f96a9a78";
|
|
4355
4355
|
function getSliderComment(props) {
|
|
4356
4356
|
return [
|
|
@@ -4386,7 +4386,7 @@ const createSliderFieldHandler = (ctx)=>{
|
|
|
4386
4386
|
...headerProps,
|
|
4387
4387
|
...footerProps
|
|
4388
4388
|
};
|
|
4389
|
-
return createLocalSnippetElement$
|
|
4389
|
+
return createLocalSnippetElement$6("Slider", commonProps, undefined, {
|
|
4390
4390
|
comment: getSliderComment(commonProps)
|
|
4391
4391
|
});
|
|
4392
4392
|
});
|
|
@@ -4428,13 +4428,13 @@ const createSliderHandler = (_ctx)=>{
|
|
|
4428
4428
|
disabled: true
|
|
4429
4429
|
}
|
|
4430
4430
|
};
|
|
4431
|
-
return createLocalSnippetElement$
|
|
4431
|
+
return createLocalSnippetElement$6("Slider", commonProps, undefined, {
|
|
4432
4432
|
comment: getSliderComment(commonProps)
|
|
4433
4433
|
});
|
|
4434
4434
|
});
|
|
4435
4435
|
};
|
|
4436
4436
|
|
|
4437
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
4437
|
+
const { createLocalSnippetElement: createLocalSnippetElement$5 } = createLocalSnippetHelper("snackbar");
|
|
4438
4438
|
const createSnackbarHandler = (_ctx)=>defineComponentHandler(snackbar.key, ({ componentProperties: props })=>{
|
|
4439
4439
|
const commonProps = {
|
|
4440
4440
|
message: props["Message#1528:4"].value,
|
|
@@ -4444,20 +4444,20 @@ const createSnackbarHandler = (_ctx)=>defineComponentHandler(snackbar.key, ({ co
|
|
|
4444
4444
|
}
|
|
4445
4445
|
};
|
|
4446
4446
|
// TODO: adapter.create({ render })
|
|
4447
|
-
return createLocalSnippetElement$
|
|
4447
|
+
return createLocalSnippetElement$5("Snackbar", commonProps);
|
|
4448
4448
|
});
|
|
4449
4449
|
|
|
4450
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
4450
|
+
const { createLocalSnippetElement: createLocalSnippetElement$4 } = createLocalSnippetHelper("switch");
|
|
4451
4451
|
const createSwitchMarkHandler = (_ctx)=>defineComponentHandler(switchMark.key, ({ componentProperties: props })=>{
|
|
4452
4452
|
const tone = match(props.Tone.value).with("Neutral", ()=>"neutral").with("🚫[Deprecated] Brand", ()=>"brand").exhaustive();
|
|
4453
4453
|
const commonProps = {
|
|
4454
4454
|
tone,
|
|
4455
4455
|
size: props.Size.value
|
|
4456
4456
|
};
|
|
4457
|
-
return createLocalSnippetElement$
|
|
4457
|
+
return createLocalSnippetElement$4("SwitchMark", commonProps);
|
|
4458
4458
|
});
|
|
4459
4459
|
|
|
4460
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
4460
|
+
const { createLocalSnippetElement: createLocalSnippetElement$3 } = createLocalSnippetHelper("switch");
|
|
4461
4461
|
const createSwitchHandler = (_ctx)=>defineComponentHandler(_switch.key, ({ componentProperties: props })=>{
|
|
4462
4462
|
const tone = match(props.Tone.value).with("Neutral", ()=>"neutral").with("🚫[Deprecated] Brand", ()=>"brand").exhaustive();
|
|
4463
4463
|
const commonProps = {
|
|
@@ -4465,9 +4465,9 @@ const createSwitchHandler = (_ctx)=>defineComponentHandler(_switch.key, ({ compo
|
|
|
4465
4465
|
size: props.Size.value
|
|
4466
4466
|
};
|
|
4467
4467
|
if (props["Layout(Figma Only)"].value === "🚫[Switch Mark 사용] Switch Only") {
|
|
4468
|
-
return createLocalSnippetElement$
|
|
4468
|
+
return createLocalSnippetElement$3("SwitchMark", commonProps);
|
|
4469
4469
|
}
|
|
4470
|
-
return createLocalSnippetElement$
|
|
4470
|
+
return createLocalSnippetElement$3("Switch", {
|
|
4471
4471
|
...commonProps,
|
|
4472
4472
|
label: props["Label#36578:0"].value,
|
|
4473
4473
|
...props.Selected.value === "True" && {
|
|
@@ -4688,7 +4688,7 @@ const createChipTabsTriggerHandler = (_ctx)=>defineComponentHandler(CHIP_TRIGGER
|
|
|
4688
4688
|
return createChipTabsLocalSnippetElement("ChipTabsTrigger", commonProps);
|
|
4689
4689
|
});
|
|
4690
4690
|
|
|
4691
|
-
const { createLocalSnippetElement: createLocalSnippetElement$
|
|
4691
|
+
const { createLocalSnippetElement: createLocalSnippetElement$2 } = createLocalSnippetHelper("text-field");
|
|
4692
4692
|
const TEXT_INPUT_OUTLINE_KEY = "22eebd645d310c086d9f5f69d8f179ff5c7cf7ca";
|
|
4693
4693
|
const TEXT_INPUT_OUTLINE_PREFIX_KEY = "1ab174dd51bc42a5efe530f52f1dd02255c50b18";
|
|
4694
4694
|
const TEXT_INPUT_OUTLINE_SUFFIX_KEY = "555fee288d9053760e301791665bbac31d19c43f";
|
|
@@ -4800,13 +4800,13 @@ const createTextInputFieldHandler = (ctx)=>{
|
|
|
4800
4800
|
placeholder: placeholder.characters
|
|
4801
4801
|
}
|
|
4802
4802
|
};
|
|
4803
|
-
return createLocalSnippetElement$
|
|
4803
|
+
return createLocalSnippetElement$2("TextField", {
|
|
4804
4804
|
...fieldProps,
|
|
4805
4805
|
...commonProps,
|
|
4806
4806
|
...value && {
|
|
4807
4807
|
defaultValue: value.characters
|
|
4808
4808
|
}
|
|
4809
|
-
}, createLocalSnippetElement$
|
|
4809
|
+
}, createLocalSnippetElement$2("TextFieldInput", inputProps));
|
|
4810
4810
|
});
|
|
4811
4811
|
};
|
|
4812
4812
|
const createTextareaFieldHandler = (ctx)=>{
|
|
@@ -4849,14 +4849,14 @@ const createTextareaFieldHandler = (ctx)=>{
|
|
|
4849
4849
|
defaultValue: value.characters
|
|
4850
4850
|
}
|
|
4851
4851
|
};
|
|
4852
|
-
return createLocalSnippetElement$
|
|
4852
|
+
return createLocalSnippetElement$2("TextField", {
|
|
4853
4853
|
...fieldProps,
|
|
4854
4854
|
...commonProps
|
|
4855
|
-
}, createLocalSnippetElement$
|
|
4855
|
+
}, createLocalSnippetElement$2("TextFieldTextarea", inputProps));
|
|
4856
4856
|
});
|
|
4857
4857
|
};
|
|
4858
4858
|
|
|
4859
|
-
const { createLocalSnippetElement } = createLocalSnippetHelper("toggle-button");
|
|
4859
|
+
const { createLocalSnippetElement: createLocalSnippetElement$1 } = createLocalSnippetHelper("toggle-button");
|
|
4860
4860
|
const createToggleButtonHandler = (ctx)=>defineComponentHandler(toggleButton.key, ({ componentProperties: props })=>{
|
|
4861
4861
|
const commonProps = {
|
|
4862
4862
|
variant: camelCase(props.Variant.value),
|
|
@@ -4871,7 +4871,7 @@ const createToggleButtonHandler = (ctx)=>defineComponentHandler(toggleButton.key
|
|
|
4871
4871
|
loading: true
|
|
4872
4872
|
}
|
|
4873
4873
|
};
|
|
4874
|
-
return createLocalSnippetElement("ToggleButton", commonProps, [
|
|
4874
|
+
return createLocalSnippetElement$1("ToggleButton", commonProps, [
|
|
4875
4875
|
props["Show Prefix Icon#6122:392"].value ? createSeedReactElement("PrefixIcon", {
|
|
4876
4876
|
svg: ctx.iconHandler.transform(props["Prefix Icon#6122:98"])
|
|
4877
4877
|
}) : undefined,
|
|
@@ -4942,6 +4942,115 @@ const createTagGroupItemHandler = (ctx)=>defineComponentHandler(TAG_GROUP_ITEM_K
|
|
|
4942
4942
|
return createSeedReactElement("TagGroup.Item", commonProps, children);
|
|
4943
4943
|
});
|
|
4944
4944
|
|
|
4945
|
+
const { createLocalSnippetElement } = createLocalSnippetHelper("text-field");
|
|
4946
|
+
const LEGACY_TEXT_FIELD_KEY = "c49873c37a639f0dffdea4efd0eb43760d66c141";
|
|
4947
|
+
const LEGACY_MULTILINE_TEXT_FIELD_KEY = "88b2399c930c85f9ce2972163a078bc684b84bbe";
|
|
4948
|
+
const createLegacyTextFieldHandler = (ctx)=>defineComponentHandler(LEGACY_TEXT_FIELD_KEY, ({ componentProperties: props })=>{
|
|
4949
|
+
const { Size: { value: size }, State: { value: state }, Filled: { value: filled }, "Show Header#870:0": { value: showHeader }, "Label#14964:0": { value: label }, "Show Indicator#1259:0": { value: showIndicator }, "Indicator#15327:249": { value: indicator }, "Show Prefix#958:125": { value: showPrefix }, "Show Prefix Icon#1267:50": { value: showPrefixIcon }, "Prefix Icon#1267:25": prefixIcon, "Show Prefix Text#1267:0": { value: showPrefixText }, "Prefix Text#15327:101": { value: prefix }, "Placeholder#958:0": { value: placeholder }, "Filled Text#1304:0": { value: defaultValue }, "Show Suffix#958:100": { value: showSuffix }, "Show Suffix Icon#1267:75": { value: showSuffixIcon }, "Suffix Icon #1267:100": suffixIcon, "Show Suffix Text#1267:125": { value: showSuffixText }, "Suffix Text#15327:138": { value: suffix }, "Show Footer#958:25": { value: showFooter }, "Show Description#958:50": { value: showDescription }, "Description#12626:5": { value: description }, "Show Character Count#958:75": { value: showCharacterCount }, "Character Count#15327:64": { value: _characterCount }, "Max Character Count#15327:27": { value: maxCharacterCount } } = props;
|
|
4950
|
+
const states = state.split("-");
|
|
4951
|
+
const commonProps = {
|
|
4952
|
+
size: handleSizeProp(size),
|
|
4953
|
+
// header
|
|
4954
|
+
...showHeader && {
|
|
4955
|
+
label
|
|
4956
|
+
},
|
|
4957
|
+
...showHeader && showIndicator && {
|
|
4958
|
+
indicator
|
|
4959
|
+
},
|
|
4960
|
+
// input affixes
|
|
4961
|
+
...showPrefix && showPrefixIcon && {
|
|
4962
|
+
prefixIcon: ctx.iconHandler.transform(prefixIcon)
|
|
4963
|
+
},
|
|
4964
|
+
...showPrefix && showPrefixText && {
|
|
4965
|
+
prefix
|
|
4966
|
+
},
|
|
4967
|
+
...showSuffix && showSuffixIcon && {
|
|
4968
|
+
suffixIcon: ctx.iconHandler.transform(suffixIcon)
|
|
4969
|
+
},
|
|
4970
|
+
...showSuffix && showSuffixText && {
|
|
4971
|
+
suffix
|
|
4972
|
+
},
|
|
4973
|
+
// input
|
|
4974
|
+
...filled === "True" && {
|
|
4975
|
+
defaultValue
|
|
4976
|
+
},
|
|
4977
|
+
...states.includes("Invalid") && {
|
|
4978
|
+
invalid: true
|
|
4979
|
+
},
|
|
4980
|
+
...states.includes("Disabled") && {
|
|
4981
|
+
disabled: true
|
|
4982
|
+
},
|
|
4983
|
+
...states.includes("Read Only") && {
|
|
4984
|
+
readOnly: true
|
|
4985
|
+
},
|
|
4986
|
+
// footer
|
|
4987
|
+
...showFooter && showDescription && states.includes("Invalid") && {
|
|
4988
|
+
// invalid인 경우 description을 error로 사용
|
|
4989
|
+
errorMessage: description
|
|
4990
|
+
},
|
|
4991
|
+
...showFooter && showDescription && !states.includes("Invalid") && {
|
|
4992
|
+
// invalid가 아닌 경우 description을 description으로 사용
|
|
4993
|
+
description
|
|
4994
|
+
},
|
|
4995
|
+
...showFooter && showCharacterCount && {
|
|
4996
|
+
maxGraphemeCount: Number(maxCharacterCount)
|
|
4997
|
+
}
|
|
4998
|
+
};
|
|
4999
|
+
const inputProps = {
|
|
5000
|
+
placeholder
|
|
5001
|
+
};
|
|
5002
|
+
const TextFieldChildren = createLocalSnippetElement("TextFieldInput", inputProps);
|
|
5003
|
+
return createLocalSnippetElement("TextField", commonProps, TextFieldChildren, {
|
|
5004
|
+
comment: "이 Figma 컴포넌트는 @seed-design/react@1.1보다 낮은 버전의 TextField입니다."
|
|
5005
|
+
});
|
|
5006
|
+
});
|
|
5007
|
+
const createLegacyMultilineTextFieldHandler = (_ctx)=>defineComponentHandler(LEGACY_MULTILINE_TEXT_FIELD_KEY, ({ componentProperties: props })=>{
|
|
5008
|
+
const { Size: { value: size }, State: { value: state }, Filled: { value: filled }, "Show Header#870:0": { value: showHeader }, "Label#15327:323": { value: label }, "Show Indicator#1259:0": { value: showIndicator }, "Indicator#15327:286": { value: indicator }, "Placeholder#958:0": { value: placeholder }, "Filled Text#1304:0": { value: defaultValue }, "Show Footer#958:25": { value: showFooter }, "Show Description#958:50": { value: showDescription }, "Description#15327:212": { value: description }, "Show Character count#958:75": { value: showCharacterCount }, "Character Count#15327:360": { value: _characterCount }, "Max Character Count#15327:175": { value: maxCharacterCount } } = props;
|
|
5009
|
+
const states = state.split("-");
|
|
5010
|
+
const commonProps = {
|
|
5011
|
+
size: handleSizeProp(size),
|
|
5012
|
+
// header
|
|
5013
|
+
...showHeader && {
|
|
5014
|
+
label
|
|
5015
|
+
},
|
|
5016
|
+
...showHeader && showIndicator && {
|
|
5017
|
+
indicator
|
|
5018
|
+
},
|
|
5019
|
+
// input
|
|
5020
|
+
...filled === "True" && {
|
|
5021
|
+
defaultValue
|
|
5022
|
+
},
|
|
5023
|
+
...states.includes("Invalid") && {
|
|
5024
|
+
invalid: true
|
|
5025
|
+
},
|
|
5026
|
+
...states.includes("Disabled") && {
|
|
5027
|
+
disabled: true
|
|
5028
|
+
},
|
|
5029
|
+
...states.includes("Read Only") && {
|
|
5030
|
+
readOnly: true
|
|
5031
|
+
},
|
|
5032
|
+
// footer
|
|
5033
|
+
...showFooter && showDescription && states.includes("Invalid") && {
|
|
5034
|
+
// invalid인 경우 description을 error로 사용
|
|
5035
|
+
errorMessage: description
|
|
5036
|
+
},
|
|
5037
|
+
...showFooter && showDescription && !states.includes("Invalid") && {
|
|
5038
|
+
// invalid가 아닌 경우 description을 description으로 사용
|
|
5039
|
+
description
|
|
5040
|
+
},
|
|
5041
|
+
...showFooter && showCharacterCount && {
|
|
5042
|
+
maxGraphemeCount: Number(maxCharacterCount)
|
|
5043
|
+
}
|
|
5044
|
+
};
|
|
5045
|
+
const inputProps = {
|
|
5046
|
+
placeholder
|
|
5047
|
+
};
|
|
5048
|
+
const TextFieldChildren = createLocalSnippetElement("TextFieldTextarea", inputProps);
|
|
5049
|
+
return createLocalSnippetElement("TextField", commonProps, TextFieldChildren, {
|
|
5050
|
+
comment: "이 Figma 컴포넌트는 @seed-design/react@1.1보다 낮은 버전의 TextField입니다."
|
|
5051
|
+
});
|
|
5052
|
+
});
|
|
5053
|
+
|
|
4945
5054
|
function bindComponentHandler(unbound, deps) {
|
|
4946
5055
|
return unbound(deps);
|
|
4947
5056
|
}
|
|
@@ -4950,6 +5059,8 @@ const unboundSeedComponentHandlers = [
|
|
|
4950
5059
|
createActionButtonHandler,
|
|
4951
5060
|
createTextInputFieldHandler,
|
|
4952
5061
|
createTextareaFieldHandler,
|
|
5062
|
+
createLegacyTextFieldHandler,
|
|
5063
|
+
createLegacyMultilineTextFieldHandler,
|
|
4953
5064
|
createBadgeHandler,
|
|
4954
5065
|
createChipHandler,
|
|
4955
5066
|
createCalloutHandler,
|