sellmate-design-system-react 9.0.0-beta.20 → 9.0.0-beta.21
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/AGENTS.md +27 -3
- package/dist/components/SCard/README.md +16 -0
- package/dist/components/SCard/SCard.d.ts +17 -2
- package/dist/components/SFooter/README.md +4 -0
- package/dist/components/SFooter/SFooter.d.ts +4 -3
- package/dist/components/SSectionHeaderCard/README.md +5 -0
- package/dist/components/SSectionHeaderCard/SSectionHeaderCard.d.ts +10 -0
- package/dist/components/SSelect/README.md +0 -2
- package/dist/index.cjs +244 -219
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +244 -219
- package/dist/index.js.map +1 -1
- package/dist/llms-full.txt +44 -4
- package/dist/llms.txt +27 -3
- package/dist/styles.css +12 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3414,8 +3414,224 @@ var SBadge = /* @__PURE__ */ forwardRef(function SBadge2({ color = "blue", class
|
|
|
3414
3414
|
}
|
|
3415
3415
|
) });
|
|
3416
3416
|
});
|
|
3417
|
-
|
|
3418
|
-
|
|
3417
|
+
|
|
3418
|
+
// src/components/SButton/button.config.ts
|
|
3419
|
+
var BUTTON_COLORS = ["primary", "secondary", "neutral", "danger"];
|
|
3420
|
+
var BUTTON_SIZES = ["xs", "sm", "md", "lg"];
|
|
3421
|
+
var V = (path) => `var(--cmp-button-${path})`;
|
|
3422
|
+
function buttonPreset(color, outline) {
|
|
3423
|
+
switch (color) {
|
|
3424
|
+
case "primary":
|
|
3425
|
+
return outline ? {
|
|
3426
|
+
bg: V("brand-outline-bg-default"),
|
|
3427
|
+
bgHover: V("brand-outline-bg-hover"),
|
|
3428
|
+
text: V("brand-outline-content"),
|
|
3429
|
+
icon: V("brand-outline-content"),
|
|
3430
|
+
border: V("brand-outline-border")
|
|
3431
|
+
} : {
|
|
3432
|
+
bg: V("brand-strong-bg-default"),
|
|
3433
|
+
bgHover: V("brand-strong-bg-hover"),
|
|
3434
|
+
text: V("brand-strong-content"),
|
|
3435
|
+
icon: V("brand-strong-content"),
|
|
3436
|
+
border: "transparent"
|
|
3437
|
+
};
|
|
3438
|
+
case "secondary":
|
|
3439
|
+
return {
|
|
3440
|
+
bg: V("brand-subtle-bg-default"),
|
|
3441
|
+
bgHover: V("brand-subtle-bg-hover"),
|
|
3442
|
+
text: V("brand-subtle-content"),
|
|
3443
|
+
icon: V("brand-subtle-content"),
|
|
3444
|
+
border: "transparent"
|
|
3445
|
+
};
|
|
3446
|
+
case "neutral":
|
|
3447
|
+
return {
|
|
3448
|
+
bg: V("neutral-outline-bg-default"),
|
|
3449
|
+
bgHover: V("neutral-outline-bg-hover"),
|
|
3450
|
+
text: V("neutral-outline-text"),
|
|
3451
|
+
icon: V("neutral-outline-icon"),
|
|
3452
|
+
border: outline ? V("neutral-outline-border") : "transparent"
|
|
3453
|
+
};
|
|
3454
|
+
case "danger":
|
|
3455
|
+
return outline ? {
|
|
3456
|
+
bg: V("danger-outline-bg-default"),
|
|
3457
|
+
bgHover: V("danger-outline-bg-hover"),
|
|
3458
|
+
text: V("danger-outline-content"),
|
|
3459
|
+
icon: V("danger-outline-content"),
|
|
3460
|
+
border: V("danger-outline-border")
|
|
3461
|
+
} : {
|
|
3462
|
+
bg: V("danger-strong-bg-default"),
|
|
3463
|
+
bgHover: V("danger-strong-bg-hover"),
|
|
3464
|
+
text: V("danger-strong-content"),
|
|
3465
|
+
icon: V("danger-strong-content"),
|
|
3466
|
+
border: "transparent"
|
|
3467
|
+
};
|
|
3468
|
+
}
|
|
3469
|
+
}
|
|
3470
|
+
var BUTTON_SIZE_CONFIG = {
|
|
3471
|
+
xs: {
|
|
3472
|
+
height: "var(--cmp-button-xs-height)",
|
|
3473
|
+
paddingX: "var(--cmp-button-xs-paddingX)",
|
|
3474
|
+
gap: "var(--cmp-button-xs-gap)",
|
|
3475
|
+
iconSize: 12,
|
|
3476
|
+
fontSize: 12,
|
|
3477
|
+
fontWeight: 500,
|
|
3478
|
+
radius: "var(--cmp-button-radius-sm)",
|
|
3479
|
+
minWidth: 36
|
|
3480
|
+
},
|
|
3481
|
+
sm: {
|
|
3482
|
+
height: "var(--cmp-button-sm-height)",
|
|
3483
|
+
paddingX: "var(--cmp-button-sm-paddingX)",
|
|
3484
|
+
gap: "var(--cmp-button-sm-gap)",
|
|
3485
|
+
iconSize: 16,
|
|
3486
|
+
fontSize: 12,
|
|
3487
|
+
fontWeight: 500,
|
|
3488
|
+
radius: "var(--cmp-button-radius-sm)",
|
|
3489
|
+
minWidth: 70
|
|
3490
|
+
},
|
|
3491
|
+
md: {
|
|
3492
|
+
height: "var(--cmp-button-md-height)",
|
|
3493
|
+
paddingX: "var(--cmp-button-md-paddingX)",
|
|
3494
|
+
gap: "var(--cmp-button-md-gap)",
|
|
3495
|
+
iconSize: 20,
|
|
3496
|
+
fontSize: 16,
|
|
3497
|
+
fontWeight: 500,
|
|
3498
|
+
radius: "var(--cmp-button-radius-md)",
|
|
3499
|
+
minWidth: 100
|
|
3500
|
+
},
|
|
3501
|
+
lg: {
|
|
3502
|
+
height: "var(--cmp-button-lg-height)",
|
|
3503
|
+
paddingX: "var(--cmp-button-lg-paddingX)",
|
|
3504
|
+
gap: "var(--cmp-button-lg-gap)",
|
|
3505
|
+
iconSize: 24,
|
|
3506
|
+
fontSize: 18,
|
|
3507
|
+
fontWeight: 500,
|
|
3508
|
+
radius: "var(--cmp-button-radius-md)",
|
|
3509
|
+
minWidth: 120
|
|
3510
|
+
}
|
|
3511
|
+
};
|
|
3512
|
+
var BUTTON_FOCUS_RING = "var(--sys-color-border-accent)";
|
|
3513
|
+
var BUTTON_DISABLED_BG = "var(--cmp-button-bg-disabled, #E1E1E1)";
|
|
3514
|
+
var BUTTON_DISABLED_BORDER = "var(--cmp-button-border-disabled, #CCCCCC)";
|
|
3515
|
+
var BUTTON_DISABLED_TEXT = "var(--cmp-button-text-disabled, #888888)";
|
|
3516
|
+
var BUTTON_DISABLED_ICON = "var(--cmp-button-icon-disabled, #BBBBBB)";
|
|
3517
|
+
var SButton = /* @__PURE__ */ forwardRef(function SButton2({
|
|
3518
|
+
color = "primary",
|
|
3519
|
+
outline = false,
|
|
3520
|
+
size = "sm",
|
|
3521
|
+
icon,
|
|
3522
|
+
rightIcon,
|
|
3523
|
+
label,
|
|
3524
|
+
className,
|
|
3525
|
+
style,
|
|
3526
|
+
type = "button",
|
|
3527
|
+
disabled = false,
|
|
3528
|
+
"aria-label": ariaLabel,
|
|
3529
|
+
...props
|
|
3530
|
+
}, ref) {
|
|
3531
|
+
const preset = buttonPreset(color, outline);
|
|
3532
|
+
const s = BUTTON_SIZE_CONFIG[size];
|
|
3533
|
+
const hasLabel = label != null && label !== "";
|
|
3534
|
+
const iconOnly = !hasLabel && Boolean(icon) !== Boolean(rightIcon);
|
|
3535
|
+
if (color === "secondary" && outline && typeof console !== "undefined") {
|
|
3536
|
+
console.warn(
|
|
3537
|
+
'[SButton] color="secondary" \uB294 outline \uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. solid \uB85C \uB80C\uB354\uB429\uB2C8\uB2E4.'
|
|
3538
|
+
);
|
|
3539
|
+
}
|
|
3540
|
+
if (iconOnly && !ariaLabel && typeof console !== "undefined") {
|
|
3541
|
+
console.warn(`[SButton] \uC544\uC774\uCF58 \uC804\uC6A9 \uBC84\uD2BC\uC740 aria-label \uC774 \uD544\uC694\uD569\uB2C8\uB2E4. (color="${color}")`);
|
|
3542
|
+
}
|
|
3543
|
+
const iconColor = disabled ? BUTTON_DISABLED_ICON : preset.icon;
|
|
3544
|
+
const iconNode = icon ? /* @__PURE__ */ jsx(SIcon, { name: icon, size: s.iconSize, color: iconColor }) : null;
|
|
3545
|
+
const rightIconNode = rightIcon ? /* @__PURE__ */ jsx(SIcon, { name: rightIcon, size: s.iconSize, color: iconColor }) : null;
|
|
3546
|
+
const cssVars = {
|
|
3547
|
+
"--btn-bg": disabled ? BUTTON_DISABLED_BG : preset.bg,
|
|
3548
|
+
"--btn-bg-hover": preset.bgHover,
|
|
3549
|
+
"--btn-border": disabled ? BUTTON_DISABLED_BORDER : preset.border,
|
|
3550
|
+
"--btn-ring": BUTTON_FOCUS_RING,
|
|
3551
|
+
"minHeight": s.height,
|
|
3552
|
+
"minWidth": iconOnly ? s.height : hasLabel ? s.minWidth : void 0,
|
|
3553
|
+
"padding": iconOnly ? 0 : `0 ${s.paddingX}`,
|
|
3554
|
+
"borderRadius": s.radius,
|
|
3555
|
+
"gap": s.gap,
|
|
3556
|
+
"fontSize": s.fontSize,
|
|
3557
|
+
"fontWeight": s.fontWeight,
|
|
3558
|
+
"color": disabled ? BUTTON_DISABLED_TEXT : preset.text,
|
|
3559
|
+
...style
|
|
3560
|
+
};
|
|
3561
|
+
return /* @__PURE__ */ jsxs(
|
|
3562
|
+
"button",
|
|
3563
|
+
{
|
|
3564
|
+
ref,
|
|
3565
|
+
type,
|
|
3566
|
+
disabled,
|
|
3567
|
+
"aria-label": ariaLabel,
|
|
3568
|
+
className: cn(
|
|
3569
|
+
"inline-flex items-center justify-center whitespace-nowrap border border-solid leading-none transition-colors",
|
|
3570
|
+
"border-[color:var(--btn-border)] bg-[var(--btn-bg)]",
|
|
3571
|
+
"outline-none focus-visible:shadow-[0_0_0_2px_var(--btn-ring)]",
|
|
3572
|
+
disabled ? "cursor-not-allowed" : "cursor-pointer hover:bg-[var(--btn-bg-hover)]",
|
|
3573
|
+
className
|
|
3574
|
+
),
|
|
3575
|
+
style: cssVars,
|
|
3576
|
+
...props,
|
|
3577
|
+
children: [
|
|
3578
|
+
iconNode,
|
|
3579
|
+
hasLabel && /* @__PURE__ */ jsx("span", { className: "inline-flex items-center justify-center", children: label }),
|
|
3580
|
+
rightIconNode
|
|
3581
|
+
]
|
|
3582
|
+
}
|
|
3583
|
+
);
|
|
3584
|
+
});
|
|
3585
|
+
function SFooter({
|
|
3586
|
+
bg = "white",
|
|
3587
|
+
left,
|
|
3588
|
+
button,
|
|
3589
|
+
children,
|
|
3590
|
+
className,
|
|
3591
|
+
leftClassName,
|
|
3592
|
+
style
|
|
3593
|
+
}) {
|
|
3594
|
+
const isGrey = bg === "grey";
|
|
3595
|
+
const hasSlot = left != null || children != null;
|
|
3596
|
+
const hasButton = button != null;
|
|
3597
|
+
return /* @__PURE__ */ jsxs(
|
|
3598
|
+
"footer",
|
|
3599
|
+
{
|
|
3600
|
+
className: cn(
|
|
3601
|
+
"relative flex w-full flex-shrink-0 items-center justify-end gap-[var(--cmp-overlay-footer-gap)] overflow-hidden px-[var(--cmp-overlay-footer-paddingX)] py-[var(--cmp-overlay-footer-paddingY)]",
|
|
3602
|
+
isGrey ? "bg-[var(--cmp-overlay-footer-bg-neutral)] border-t border-solid border-[color:var(--sys-color-border-default)]" : "bg-[var(--cmp-overlay-footer-bg-default)] shadow-[var(--shadow-spread-md)]",
|
|
3603
|
+
className
|
|
3604
|
+
),
|
|
3605
|
+
style,
|
|
3606
|
+
children: [
|
|
3607
|
+
hasSlot && /* @__PURE__ */ jsxs(
|
|
3608
|
+
"div",
|
|
3609
|
+
{
|
|
3610
|
+
className: cn("flex min-w-px flex-[1_0_0] items-center justify-between", leftClassName),
|
|
3611
|
+
children: [
|
|
3612
|
+
left,
|
|
3613
|
+
children
|
|
3614
|
+
]
|
|
3615
|
+
}
|
|
3616
|
+
),
|
|
3617
|
+
hasButton && /* @__PURE__ */ jsx(
|
|
3618
|
+
SButton,
|
|
3619
|
+
{
|
|
3620
|
+
color: button.color ?? "primary",
|
|
3621
|
+
outline: button.outline,
|
|
3622
|
+
size: button.size ?? "md",
|
|
3623
|
+
disabled: button.disabled,
|
|
3624
|
+
onClick: () => button.onClick?.(),
|
|
3625
|
+
label: button.label ?? "\uD655\uC778"
|
|
3626
|
+
}
|
|
3627
|
+
)
|
|
3628
|
+
]
|
|
3629
|
+
}
|
|
3630
|
+
);
|
|
3631
|
+
}
|
|
3632
|
+
var SCard = /* @__PURE__ */ forwardRef(function SCard2({ bordered = false, footerLeft, button, footerClassName, className, children, ...rest }, ref) {
|
|
3633
|
+
const hasFooter = footerLeft != null || button != null;
|
|
3634
|
+
return /* @__PURE__ */ jsxs(
|
|
3419
3635
|
"div",
|
|
3420
3636
|
{
|
|
3421
3637
|
ref,
|
|
@@ -3425,7 +3641,18 @@ var SCard = /* @__PURE__ */ forwardRef(function SCard2({ bordered = false, class
|
|
|
3425
3641
|
className
|
|
3426
3642
|
),
|
|
3427
3643
|
...rest,
|
|
3428
|
-
children
|
|
3644
|
+
children: [
|
|
3645
|
+
children,
|
|
3646
|
+
hasFooter && /* @__PURE__ */ jsx(
|
|
3647
|
+
SFooter,
|
|
3648
|
+
{
|
|
3649
|
+
bg: "grey",
|
|
3650
|
+
left: footerLeft,
|
|
3651
|
+
button,
|
|
3652
|
+
className: cn("px-(--sys-space-panel-padding-default)", footerClassName)
|
|
3653
|
+
}
|
|
3654
|
+
)
|
|
3655
|
+
]
|
|
3429
3656
|
}
|
|
3430
3657
|
);
|
|
3431
3658
|
});
|
|
@@ -5540,11 +5767,15 @@ var SSectionHeaderCardRootImpl = /* @__PURE__ */ forwardRef(
|
|
|
5540
5767
|
headerClassName,
|
|
5541
5768
|
padding,
|
|
5542
5769
|
background,
|
|
5770
|
+
footerLeft,
|
|
5771
|
+
button,
|
|
5772
|
+
footerClassName,
|
|
5543
5773
|
className,
|
|
5544
5774
|
children,
|
|
5545
5775
|
...rest
|
|
5546
5776
|
}, ref) {
|
|
5547
5777
|
const hasHeader = title != null;
|
|
5778
|
+
const hasFooter = footerLeft != null || button != null;
|
|
5548
5779
|
return /* @__PURE__ */ jsxs(
|
|
5549
5780
|
"div",
|
|
5550
5781
|
{
|
|
@@ -5569,7 +5800,16 @@ var SSectionHeaderCardRootImpl = /* @__PURE__ */ forwardRef(
|
|
|
5569
5800
|
className: headerClassName
|
|
5570
5801
|
}
|
|
5571
5802
|
),
|
|
5572
|
-
/* @__PURE__ */ jsx(SSectionHeaderCardBodyImpl, { padding, background, children })
|
|
5803
|
+
/* @__PURE__ */ jsx(SSectionHeaderCardBodyImpl, { padding, background, children }),
|
|
5804
|
+
hasFooter && /* @__PURE__ */ jsx(
|
|
5805
|
+
SFooter,
|
|
5806
|
+
{
|
|
5807
|
+
bg: "grey",
|
|
5808
|
+
left: footerLeft,
|
|
5809
|
+
button,
|
|
5810
|
+
className: cn("px-(--cmp-sectionHeaderCard-header-paddingX)", footerClassName)
|
|
5811
|
+
}
|
|
5812
|
+
)
|
|
5573
5813
|
]
|
|
5574
5814
|
}
|
|
5575
5815
|
);
|
|
@@ -5842,174 +6082,6 @@ var SSplitter2 = /* @__PURE__ */ Object.assign(SSplitterRoot, {
|
|
|
5842
6082
|
Before: SSplitterBefore2,
|
|
5843
6083
|
After: SSplitterAfter2
|
|
5844
6084
|
});
|
|
5845
|
-
|
|
5846
|
-
// src/components/SButton/button.config.ts
|
|
5847
|
-
var BUTTON_COLORS = ["primary", "secondary", "neutral", "danger"];
|
|
5848
|
-
var BUTTON_SIZES = ["xs", "sm", "md", "lg"];
|
|
5849
|
-
var V = (path) => `var(--cmp-button-${path})`;
|
|
5850
|
-
function buttonPreset(color, outline) {
|
|
5851
|
-
switch (color) {
|
|
5852
|
-
case "primary":
|
|
5853
|
-
return outline ? {
|
|
5854
|
-
bg: V("brand-outline-bg-default"),
|
|
5855
|
-
bgHover: V("brand-outline-bg-hover"),
|
|
5856
|
-
text: V("brand-outline-content"),
|
|
5857
|
-
icon: V("brand-outline-content"),
|
|
5858
|
-
border: V("brand-outline-border")
|
|
5859
|
-
} : {
|
|
5860
|
-
bg: V("brand-strong-bg-default"),
|
|
5861
|
-
bgHover: V("brand-strong-bg-hover"),
|
|
5862
|
-
text: V("brand-strong-content"),
|
|
5863
|
-
icon: V("brand-strong-content"),
|
|
5864
|
-
border: "transparent"
|
|
5865
|
-
};
|
|
5866
|
-
case "secondary":
|
|
5867
|
-
return {
|
|
5868
|
-
bg: V("brand-subtle-bg-default"),
|
|
5869
|
-
bgHover: V("brand-subtle-bg-hover"),
|
|
5870
|
-
text: V("brand-subtle-content"),
|
|
5871
|
-
icon: V("brand-subtle-content"),
|
|
5872
|
-
border: "transparent"
|
|
5873
|
-
};
|
|
5874
|
-
case "neutral":
|
|
5875
|
-
return {
|
|
5876
|
-
bg: V("neutral-outline-bg-default"),
|
|
5877
|
-
bgHover: V("neutral-outline-bg-hover"),
|
|
5878
|
-
text: V("neutral-outline-text"),
|
|
5879
|
-
icon: V("neutral-outline-icon"),
|
|
5880
|
-
border: outline ? V("neutral-outline-border") : "transparent"
|
|
5881
|
-
};
|
|
5882
|
-
case "danger":
|
|
5883
|
-
return outline ? {
|
|
5884
|
-
bg: V("danger-outline-bg-default"),
|
|
5885
|
-
bgHover: V("danger-outline-bg-hover"),
|
|
5886
|
-
text: V("danger-outline-content"),
|
|
5887
|
-
icon: V("danger-outline-content"),
|
|
5888
|
-
border: V("danger-outline-border")
|
|
5889
|
-
} : {
|
|
5890
|
-
bg: V("danger-strong-bg-default"),
|
|
5891
|
-
bgHover: V("danger-strong-bg-hover"),
|
|
5892
|
-
text: V("danger-strong-content"),
|
|
5893
|
-
icon: V("danger-strong-content"),
|
|
5894
|
-
border: "transparent"
|
|
5895
|
-
};
|
|
5896
|
-
}
|
|
5897
|
-
}
|
|
5898
|
-
var BUTTON_SIZE_CONFIG = {
|
|
5899
|
-
xs: {
|
|
5900
|
-
height: "var(--cmp-button-xs-height)",
|
|
5901
|
-
paddingX: "var(--cmp-button-xs-paddingX)",
|
|
5902
|
-
gap: "var(--cmp-button-xs-gap)",
|
|
5903
|
-
iconSize: 12,
|
|
5904
|
-
fontSize: 12,
|
|
5905
|
-
fontWeight: 500,
|
|
5906
|
-
radius: "var(--cmp-button-radius-sm)",
|
|
5907
|
-
minWidth: 36
|
|
5908
|
-
},
|
|
5909
|
-
sm: {
|
|
5910
|
-
height: "var(--cmp-button-sm-height)",
|
|
5911
|
-
paddingX: "var(--cmp-button-sm-paddingX)",
|
|
5912
|
-
gap: "var(--cmp-button-sm-gap)",
|
|
5913
|
-
iconSize: 16,
|
|
5914
|
-
fontSize: 12,
|
|
5915
|
-
fontWeight: 500,
|
|
5916
|
-
radius: "var(--cmp-button-radius-sm)",
|
|
5917
|
-
minWidth: 70
|
|
5918
|
-
},
|
|
5919
|
-
md: {
|
|
5920
|
-
height: "var(--cmp-button-md-height)",
|
|
5921
|
-
paddingX: "var(--cmp-button-md-paddingX)",
|
|
5922
|
-
gap: "var(--cmp-button-md-gap)",
|
|
5923
|
-
iconSize: 20,
|
|
5924
|
-
fontSize: 16,
|
|
5925
|
-
fontWeight: 500,
|
|
5926
|
-
radius: "var(--cmp-button-radius-md)",
|
|
5927
|
-
minWidth: 100
|
|
5928
|
-
},
|
|
5929
|
-
lg: {
|
|
5930
|
-
height: "var(--cmp-button-lg-height)",
|
|
5931
|
-
paddingX: "var(--cmp-button-lg-paddingX)",
|
|
5932
|
-
gap: "var(--cmp-button-lg-gap)",
|
|
5933
|
-
iconSize: 24,
|
|
5934
|
-
fontSize: 18,
|
|
5935
|
-
fontWeight: 500,
|
|
5936
|
-
radius: "var(--cmp-button-radius-md)",
|
|
5937
|
-
minWidth: 120
|
|
5938
|
-
}
|
|
5939
|
-
};
|
|
5940
|
-
var BUTTON_FOCUS_RING = "var(--sys-color-border-accent)";
|
|
5941
|
-
var BUTTON_DISABLED_BG = "var(--cmp-button-bg-disabled, #E1E1E1)";
|
|
5942
|
-
var BUTTON_DISABLED_BORDER = "var(--cmp-button-border-disabled, #CCCCCC)";
|
|
5943
|
-
var BUTTON_DISABLED_TEXT = "var(--cmp-button-text-disabled, #888888)";
|
|
5944
|
-
var BUTTON_DISABLED_ICON = "var(--cmp-button-icon-disabled, #BBBBBB)";
|
|
5945
|
-
var SButton = /* @__PURE__ */ forwardRef(function SButton2({
|
|
5946
|
-
color = "primary",
|
|
5947
|
-
outline = false,
|
|
5948
|
-
size = "sm",
|
|
5949
|
-
icon,
|
|
5950
|
-
rightIcon,
|
|
5951
|
-
label,
|
|
5952
|
-
className,
|
|
5953
|
-
style,
|
|
5954
|
-
type = "button",
|
|
5955
|
-
disabled = false,
|
|
5956
|
-
"aria-label": ariaLabel,
|
|
5957
|
-
...props
|
|
5958
|
-
}, ref) {
|
|
5959
|
-
const preset = buttonPreset(color, outline);
|
|
5960
|
-
const s = BUTTON_SIZE_CONFIG[size];
|
|
5961
|
-
const hasLabel = label != null && label !== "";
|
|
5962
|
-
const iconOnly = !hasLabel && Boolean(icon) !== Boolean(rightIcon);
|
|
5963
|
-
if (color === "secondary" && outline && typeof console !== "undefined") {
|
|
5964
|
-
console.warn(
|
|
5965
|
-
'[SButton] color="secondary" \uB294 outline \uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. solid \uB85C \uB80C\uB354\uB429\uB2C8\uB2E4.'
|
|
5966
|
-
);
|
|
5967
|
-
}
|
|
5968
|
-
if (iconOnly && !ariaLabel && typeof console !== "undefined") {
|
|
5969
|
-
console.warn(`[SButton] \uC544\uC774\uCF58 \uC804\uC6A9 \uBC84\uD2BC\uC740 aria-label \uC774 \uD544\uC694\uD569\uB2C8\uB2E4. (color="${color}")`);
|
|
5970
|
-
}
|
|
5971
|
-
const iconColor = disabled ? BUTTON_DISABLED_ICON : preset.icon;
|
|
5972
|
-
const iconNode = icon ? /* @__PURE__ */ jsx(SIcon, { name: icon, size: s.iconSize, color: iconColor }) : null;
|
|
5973
|
-
const rightIconNode = rightIcon ? /* @__PURE__ */ jsx(SIcon, { name: rightIcon, size: s.iconSize, color: iconColor }) : null;
|
|
5974
|
-
const cssVars = {
|
|
5975
|
-
"--btn-bg": disabled ? BUTTON_DISABLED_BG : preset.bg,
|
|
5976
|
-
"--btn-bg-hover": preset.bgHover,
|
|
5977
|
-
"--btn-border": disabled ? BUTTON_DISABLED_BORDER : preset.border,
|
|
5978
|
-
"--btn-ring": BUTTON_FOCUS_RING,
|
|
5979
|
-
"minHeight": s.height,
|
|
5980
|
-
"minWidth": iconOnly ? s.height : hasLabel ? s.minWidth : void 0,
|
|
5981
|
-
"padding": iconOnly ? 0 : `0 ${s.paddingX}`,
|
|
5982
|
-
"borderRadius": s.radius,
|
|
5983
|
-
"gap": s.gap,
|
|
5984
|
-
"fontSize": s.fontSize,
|
|
5985
|
-
"fontWeight": s.fontWeight,
|
|
5986
|
-
"color": disabled ? BUTTON_DISABLED_TEXT : preset.text,
|
|
5987
|
-
...style
|
|
5988
|
-
};
|
|
5989
|
-
return /* @__PURE__ */ jsxs(
|
|
5990
|
-
"button",
|
|
5991
|
-
{
|
|
5992
|
-
ref,
|
|
5993
|
-
type,
|
|
5994
|
-
disabled,
|
|
5995
|
-
"aria-label": ariaLabel,
|
|
5996
|
-
className: cn(
|
|
5997
|
-
"inline-flex items-center justify-center whitespace-nowrap border border-solid leading-none transition-colors",
|
|
5998
|
-
"border-[color:var(--btn-border)] bg-[var(--btn-bg)]",
|
|
5999
|
-
"outline-none focus-visible:shadow-[0_0_0_2px_var(--btn-ring)]",
|
|
6000
|
-
disabled ? "cursor-not-allowed" : "cursor-pointer hover:bg-[var(--btn-bg-hover)]",
|
|
6001
|
-
className
|
|
6002
|
-
),
|
|
6003
|
-
style: cssVars,
|
|
6004
|
-
...props,
|
|
6005
|
-
children: [
|
|
6006
|
-
iconNode,
|
|
6007
|
-
hasLabel && /* @__PURE__ */ jsx("span", { className: "inline-flex items-center justify-center", children: label }),
|
|
6008
|
-
rightIconNode
|
|
6009
|
-
]
|
|
6010
|
-
}
|
|
6011
|
-
);
|
|
6012
|
-
});
|
|
6013
6085
|
var DANGER_TITLE_LABEL = "\uC8FC\uC758\uC0AC\uD56D";
|
|
6014
6086
|
function renderItems(message, depth = 1) {
|
|
6015
6087
|
const out = [];
|
|
@@ -6853,53 +6925,6 @@ function SPortal({
|
|
|
6853
6925
|
}
|
|
6854
6926
|
);
|
|
6855
6927
|
}
|
|
6856
|
-
function SFooter({
|
|
6857
|
-
bg = "white",
|
|
6858
|
-
left,
|
|
6859
|
-
button,
|
|
6860
|
-
children,
|
|
6861
|
-
className,
|
|
6862
|
-
leftClassName,
|
|
6863
|
-
style
|
|
6864
|
-
}) {
|
|
6865
|
-
const isGrey = bg === "grey";
|
|
6866
|
-
const hasSlot = left != null || children != null;
|
|
6867
|
-
const hasButton = button != null;
|
|
6868
|
-
return /* @__PURE__ */ jsxs(
|
|
6869
|
-
"footer",
|
|
6870
|
-
{
|
|
6871
|
-
className: cn(
|
|
6872
|
-
"relative flex w-full flex-shrink-0 items-center justify-end gap-[var(--cmp-overlay-footer-gap)] overflow-hidden px-[var(--cmp-overlay-footer-paddingX)] py-[var(--cmp-overlay-footer-paddingY)]",
|
|
6873
|
-
isGrey ? "bg-[var(--cmp-overlay-footer-bg-neutral)] border-t border-solid border-[color:var(--sys-color-border-default)]" : "bg-[var(--cmp-overlay-footer-bg-default)] shadow-[var(--shadow-spread-md)]",
|
|
6874
|
-
className
|
|
6875
|
-
),
|
|
6876
|
-
style,
|
|
6877
|
-
children: [
|
|
6878
|
-
hasSlot && /* @__PURE__ */ jsxs(
|
|
6879
|
-
"div",
|
|
6880
|
-
{
|
|
6881
|
-
className: cn("flex min-w-px flex-[1_0_0] items-center justify-between", leftClassName),
|
|
6882
|
-
children: [
|
|
6883
|
-
left,
|
|
6884
|
-
children
|
|
6885
|
-
]
|
|
6886
|
-
}
|
|
6887
|
-
),
|
|
6888
|
-
hasButton && /* @__PURE__ */ jsx(
|
|
6889
|
-
SButton,
|
|
6890
|
-
{
|
|
6891
|
-
color: button.color ?? "primary",
|
|
6892
|
-
outline: button.outline,
|
|
6893
|
-
size: button.size ?? "md",
|
|
6894
|
-
disabled: button.disabled,
|
|
6895
|
-
onClick: () => button.onClick?.(),
|
|
6896
|
-
label: button.label ?? "\uD655\uC778"
|
|
6897
|
-
}
|
|
6898
|
-
)
|
|
6899
|
-
]
|
|
6900
|
-
}
|
|
6901
|
-
);
|
|
6902
|
-
}
|
|
6903
6928
|
var SPopup = /* @__PURE__ */ forwardRef(function SPopup2({
|
|
6904
6929
|
popupTitle = "",
|
|
6905
6930
|
type = "default",
|