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.cjs
CHANGED
|
@@ -3442,8 +3442,224 @@ var SBadge = /* @__PURE__ */ react.forwardRef(function SBadge2({ color = "blue",
|
|
|
3442
3442
|
}
|
|
3443
3443
|
) });
|
|
3444
3444
|
});
|
|
3445
|
-
|
|
3446
|
-
|
|
3445
|
+
|
|
3446
|
+
// src/components/SButton/button.config.ts
|
|
3447
|
+
var BUTTON_COLORS = ["primary", "secondary", "neutral", "danger"];
|
|
3448
|
+
var BUTTON_SIZES = ["xs", "sm", "md", "lg"];
|
|
3449
|
+
var V = (path) => `var(--cmp-button-${path})`;
|
|
3450
|
+
function buttonPreset(color, outline) {
|
|
3451
|
+
switch (color) {
|
|
3452
|
+
case "primary":
|
|
3453
|
+
return outline ? {
|
|
3454
|
+
bg: V("brand-outline-bg-default"),
|
|
3455
|
+
bgHover: V("brand-outline-bg-hover"),
|
|
3456
|
+
text: V("brand-outline-content"),
|
|
3457
|
+
icon: V("brand-outline-content"),
|
|
3458
|
+
border: V("brand-outline-border")
|
|
3459
|
+
} : {
|
|
3460
|
+
bg: V("brand-strong-bg-default"),
|
|
3461
|
+
bgHover: V("brand-strong-bg-hover"),
|
|
3462
|
+
text: V("brand-strong-content"),
|
|
3463
|
+
icon: V("brand-strong-content"),
|
|
3464
|
+
border: "transparent"
|
|
3465
|
+
};
|
|
3466
|
+
case "secondary":
|
|
3467
|
+
return {
|
|
3468
|
+
bg: V("brand-subtle-bg-default"),
|
|
3469
|
+
bgHover: V("brand-subtle-bg-hover"),
|
|
3470
|
+
text: V("brand-subtle-content"),
|
|
3471
|
+
icon: V("brand-subtle-content"),
|
|
3472
|
+
border: "transparent"
|
|
3473
|
+
};
|
|
3474
|
+
case "neutral":
|
|
3475
|
+
return {
|
|
3476
|
+
bg: V("neutral-outline-bg-default"),
|
|
3477
|
+
bgHover: V("neutral-outline-bg-hover"),
|
|
3478
|
+
text: V("neutral-outline-text"),
|
|
3479
|
+
icon: V("neutral-outline-icon"),
|
|
3480
|
+
border: outline ? V("neutral-outline-border") : "transparent"
|
|
3481
|
+
};
|
|
3482
|
+
case "danger":
|
|
3483
|
+
return outline ? {
|
|
3484
|
+
bg: V("danger-outline-bg-default"),
|
|
3485
|
+
bgHover: V("danger-outline-bg-hover"),
|
|
3486
|
+
text: V("danger-outline-content"),
|
|
3487
|
+
icon: V("danger-outline-content"),
|
|
3488
|
+
border: V("danger-outline-border")
|
|
3489
|
+
} : {
|
|
3490
|
+
bg: V("danger-strong-bg-default"),
|
|
3491
|
+
bgHover: V("danger-strong-bg-hover"),
|
|
3492
|
+
text: V("danger-strong-content"),
|
|
3493
|
+
icon: V("danger-strong-content"),
|
|
3494
|
+
border: "transparent"
|
|
3495
|
+
};
|
|
3496
|
+
}
|
|
3497
|
+
}
|
|
3498
|
+
var BUTTON_SIZE_CONFIG = {
|
|
3499
|
+
xs: {
|
|
3500
|
+
height: "var(--cmp-button-xs-height)",
|
|
3501
|
+
paddingX: "var(--cmp-button-xs-paddingX)",
|
|
3502
|
+
gap: "var(--cmp-button-xs-gap)",
|
|
3503
|
+
iconSize: 12,
|
|
3504
|
+
fontSize: 12,
|
|
3505
|
+
fontWeight: 500,
|
|
3506
|
+
radius: "var(--cmp-button-radius-sm)",
|
|
3507
|
+
minWidth: 36
|
|
3508
|
+
},
|
|
3509
|
+
sm: {
|
|
3510
|
+
height: "var(--cmp-button-sm-height)",
|
|
3511
|
+
paddingX: "var(--cmp-button-sm-paddingX)",
|
|
3512
|
+
gap: "var(--cmp-button-sm-gap)",
|
|
3513
|
+
iconSize: 16,
|
|
3514
|
+
fontSize: 12,
|
|
3515
|
+
fontWeight: 500,
|
|
3516
|
+
radius: "var(--cmp-button-radius-sm)",
|
|
3517
|
+
minWidth: 70
|
|
3518
|
+
},
|
|
3519
|
+
md: {
|
|
3520
|
+
height: "var(--cmp-button-md-height)",
|
|
3521
|
+
paddingX: "var(--cmp-button-md-paddingX)",
|
|
3522
|
+
gap: "var(--cmp-button-md-gap)",
|
|
3523
|
+
iconSize: 20,
|
|
3524
|
+
fontSize: 16,
|
|
3525
|
+
fontWeight: 500,
|
|
3526
|
+
radius: "var(--cmp-button-radius-md)",
|
|
3527
|
+
minWidth: 100
|
|
3528
|
+
},
|
|
3529
|
+
lg: {
|
|
3530
|
+
height: "var(--cmp-button-lg-height)",
|
|
3531
|
+
paddingX: "var(--cmp-button-lg-paddingX)",
|
|
3532
|
+
gap: "var(--cmp-button-lg-gap)",
|
|
3533
|
+
iconSize: 24,
|
|
3534
|
+
fontSize: 18,
|
|
3535
|
+
fontWeight: 500,
|
|
3536
|
+
radius: "var(--cmp-button-radius-md)",
|
|
3537
|
+
minWidth: 120
|
|
3538
|
+
}
|
|
3539
|
+
};
|
|
3540
|
+
var BUTTON_FOCUS_RING = "var(--sys-color-border-accent)";
|
|
3541
|
+
var BUTTON_DISABLED_BG = "var(--cmp-button-bg-disabled, #E1E1E1)";
|
|
3542
|
+
var BUTTON_DISABLED_BORDER = "var(--cmp-button-border-disabled, #CCCCCC)";
|
|
3543
|
+
var BUTTON_DISABLED_TEXT = "var(--cmp-button-text-disabled, #888888)";
|
|
3544
|
+
var BUTTON_DISABLED_ICON = "var(--cmp-button-icon-disabled, #BBBBBB)";
|
|
3545
|
+
var SButton = /* @__PURE__ */ react.forwardRef(function SButton2({
|
|
3546
|
+
color = "primary",
|
|
3547
|
+
outline = false,
|
|
3548
|
+
size = "sm",
|
|
3549
|
+
icon,
|
|
3550
|
+
rightIcon,
|
|
3551
|
+
label,
|
|
3552
|
+
className,
|
|
3553
|
+
style,
|
|
3554
|
+
type = "button",
|
|
3555
|
+
disabled = false,
|
|
3556
|
+
"aria-label": ariaLabel,
|
|
3557
|
+
...props
|
|
3558
|
+
}, ref) {
|
|
3559
|
+
const preset = buttonPreset(color, outline);
|
|
3560
|
+
const s = BUTTON_SIZE_CONFIG[size];
|
|
3561
|
+
const hasLabel = label != null && label !== "";
|
|
3562
|
+
const iconOnly = !hasLabel && Boolean(icon) !== Boolean(rightIcon);
|
|
3563
|
+
if (color === "secondary" && outline && typeof console !== "undefined") {
|
|
3564
|
+
console.warn(
|
|
3565
|
+
'[SButton] color="secondary" \uB294 outline \uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. solid \uB85C \uB80C\uB354\uB429\uB2C8\uB2E4.'
|
|
3566
|
+
);
|
|
3567
|
+
}
|
|
3568
|
+
if (iconOnly && !ariaLabel && typeof console !== "undefined") {
|
|
3569
|
+
console.warn(`[SButton] \uC544\uC774\uCF58 \uC804\uC6A9 \uBC84\uD2BC\uC740 aria-label \uC774 \uD544\uC694\uD569\uB2C8\uB2E4. (color="${color}")`);
|
|
3570
|
+
}
|
|
3571
|
+
const iconColor = disabled ? BUTTON_DISABLED_ICON : preset.icon;
|
|
3572
|
+
const iconNode = icon ? /* @__PURE__ */ jsxRuntime.jsx(SIcon, { name: icon, size: s.iconSize, color: iconColor }) : null;
|
|
3573
|
+
const rightIconNode = rightIcon ? /* @__PURE__ */ jsxRuntime.jsx(SIcon, { name: rightIcon, size: s.iconSize, color: iconColor }) : null;
|
|
3574
|
+
const cssVars = {
|
|
3575
|
+
"--btn-bg": disabled ? BUTTON_DISABLED_BG : preset.bg,
|
|
3576
|
+
"--btn-bg-hover": preset.bgHover,
|
|
3577
|
+
"--btn-border": disabled ? BUTTON_DISABLED_BORDER : preset.border,
|
|
3578
|
+
"--btn-ring": BUTTON_FOCUS_RING,
|
|
3579
|
+
"minHeight": s.height,
|
|
3580
|
+
"minWidth": iconOnly ? s.height : hasLabel ? s.minWidth : void 0,
|
|
3581
|
+
"padding": iconOnly ? 0 : `0 ${s.paddingX}`,
|
|
3582
|
+
"borderRadius": s.radius,
|
|
3583
|
+
"gap": s.gap,
|
|
3584
|
+
"fontSize": s.fontSize,
|
|
3585
|
+
"fontWeight": s.fontWeight,
|
|
3586
|
+
"color": disabled ? BUTTON_DISABLED_TEXT : preset.text,
|
|
3587
|
+
...style
|
|
3588
|
+
};
|
|
3589
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3590
|
+
"button",
|
|
3591
|
+
{
|
|
3592
|
+
ref,
|
|
3593
|
+
type,
|
|
3594
|
+
disabled,
|
|
3595
|
+
"aria-label": ariaLabel,
|
|
3596
|
+
className: cn(
|
|
3597
|
+
"inline-flex items-center justify-center whitespace-nowrap border border-solid leading-none transition-colors",
|
|
3598
|
+
"border-[color:var(--btn-border)] bg-[var(--btn-bg)]",
|
|
3599
|
+
"outline-none focus-visible:shadow-[0_0_0_2px_var(--btn-ring)]",
|
|
3600
|
+
disabled ? "cursor-not-allowed" : "cursor-pointer hover:bg-[var(--btn-bg-hover)]",
|
|
3601
|
+
className
|
|
3602
|
+
),
|
|
3603
|
+
style: cssVars,
|
|
3604
|
+
...props,
|
|
3605
|
+
children: [
|
|
3606
|
+
iconNode,
|
|
3607
|
+
hasLabel && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex items-center justify-center", children: label }),
|
|
3608
|
+
rightIconNode
|
|
3609
|
+
]
|
|
3610
|
+
}
|
|
3611
|
+
);
|
|
3612
|
+
});
|
|
3613
|
+
function SFooter({
|
|
3614
|
+
bg = "white",
|
|
3615
|
+
left,
|
|
3616
|
+
button,
|
|
3617
|
+
children,
|
|
3618
|
+
className,
|
|
3619
|
+
leftClassName,
|
|
3620
|
+
style
|
|
3621
|
+
}) {
|
|
3622
|
+
const isGrey = bg === "grey";
|
|
3623
|
+
const hasSlot = left != null || children != null;
|
|
3624
|
+
const hasButton = button != null;
|
|
3625
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3626
|
+
"footer",
|
|
3627
|
+
{
|
|
3628
|
+
className: cn(
|
|
3629
|
+
"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)]",
|
|
3630
|
+
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)]",
|
|
3631
|
+
className
|
|
3632
|
+
),
|
|
3633
|
+
style,
|
|
3634
|
+
children: [
|
|
3635
|
+
hasSlot && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3636
|
+
"div",
|
|
3637
|
+
{
|
|
3638
|
+
className: cn("flex min-w-px flex-[1_0_0] items-center justify-between", leftClassName),
|
|
3639
|
+
children: [
|
|
3640
|
+
left,
|
|
3641
|
+
children
|
|
3642
|
+
]
|
|
3643
|
+
}
|
|
3644
|
+
),
|
|
3645
|
+
hasButton && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3646
|
+
SButton,
|
|
3647
|
+
{
|
|
3648
|
+
color: button.color ?? "primary",
|
|
3649
|
+
outline: button.outline,
|
|
3650
|
+
size: button.size ?? "md",
|
|
3651
|
+
disabled: button.disabled,
|
|
3652
|
+
onClick: () => button.onClick?.(),
|
|
3653
|
+
label: button.label ?? "\uD655\uC778"
|
|
3654
|
+
}
|
|
3655
|
+
)
|
|
3656
|
+
]
|
|
3657
|
+
}
|
|
3658
|
+
);
|
|
3659
|
+
}
|
|
3660
|
+
var SCard = /* @__PURE__ */ react.forwardRef(function SCard2({ bordered = false, footerLeft, button, footerClassName, className, children, ...rest }, ref) {
|
|
3661
|
+
const hasFooter = footerLeft != null || button != null;
|
|
3662
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3447
3663
|
"div",
|
|
3448
3664
|
{
|
|
3449
3665
|
ref,
|
|
@@ -3453,7 +3669,18 @@ var SCard = /* @__PURE__ */ react.forwardRef(function SCard2({ bordered = false,
|
|
|
3453
3669
|
className
|
|
3454
3670
|
),
|
|
3455
3671
|
...rest,
|
|
3456
|
-
children
|
|
3672
|
+
children: [
|
|
3673
|
+
children,
|
|
3674
|
+
hasFooter && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3675
|
+
SFooter,
|
|
3676
|
+
{
|
|
3677
|
+
bg: "grey",
|
|
3678
|
+
left: footerLeft,
|
|
3679
|
+
button,
|
|
3680
|
+
className: cn("px-(--sys-space-panel-padding-default)", footerClassName)
|
|
3681
|
+
}
|
|
3682
|
+
)
|
|
3683
|
+
]
|
|
3457
3684
|
}
|
|
3458
3685
|
);
|
|
3459
3686
|
});
|
|
@@ -5568,11 +5795,15 @@ var SSectionHeaderCardRootImpl = /* @__PURE__ */ react.forwardRef(
|
|
|
5568
5795
|
headerClassName,
|
|
5569
5796
|
padding,
|
|
5570
5797
|
background,
|
|
5798
|
+
footerLeft,
|
|
5799
|
+
button,
|
|
5800
|
+
footerClassName,
|
|
5571
5801
|
className,
|
|
5572
5802
|
children,
|
|
5573
5803
|
...rest
|
|
5574
5804
|
}, ref) {
|
|
5575
5805
|
const hasHeader = title != null;
|
|
5806
|
+
const hasFooter = footerLeft != null || button != null;
|
|
5576
5807
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5577
5808
|
"div",
|
|
5578
5809
|
{
|
|
@@ -5597,7 +5828,16 @@ var SSectionHeaderCardRootImpl = /* @__PURE__ */ react.forwardRef(
|
|
|
5597
5828
|
className: headerClassName
|
|
5598
5829
|
}
|
|
5599
5830
|
),
|
|
5600
|
-
/* @__PURE__ */ jsxRuntime.jsx(SSectionHeaderCardBodyImpl, { padding, background, children })
|
|
5831
|
+
/* @__PURE__ */ jsxRuntime.jsx(SSectionHeaderCardBodyImpl, { padding, background, children }),
|
|
5832
|
+
hasFooter && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5833
|
+
SFooter,
|
|
5834
|
+
{
|
|
5835
|
+
bg: "grey",
|
|
5836
|
+
left: footerLeft,
|
|
5837
|
+
button,
|
|
5838
|
+
className: cn("px-(--cmp-sectionHeaderCard-header-paddingX)", footerClassName)
|
|
5839
|
+
}
|
|
5840
|
+
)
|
|
5601
5841
|
]
|
|
5602
5842
|
}
|
|
5603
5843
|
);
|
|
@@ -5870,174 +6110,6 @@ var SSplitter2 = /* @__PURE__ */ Object.assign(SSplitterRoot, {
|
|
|
5870
6110
|
Before: SSplitterBefore2,
|
|
5871
6111
|
After: SSplitterAfter2
|
|
5872
6112
|
});
|
|
5873
|
-
|
|
5874
|
-
// src/components/SButton/button.config.ts
|
|
5875
|
-
var BUTTON_COLORS = ["primary", "secondary", "neutral", "danger"];
|
|
5876
|
-
var BUTTON_SIZES = ["xs", "sm", "md", "lg"];
|
|
5877
|
-
var V = (path) => `var(--cmp-button-${path})`;
|
|
5878
|
-
function buttonPreset(color, outline) {
|
|
5879
|
-
switch (color) {
|
|
5880
|
-
case "primary":
|
|
5881
|
-
return outline ? {
|
|
5882
|
-
bg: V("brand-outline-bg-default"),
|
|
5883
|
-
bgHover: V("brand-outline-bg-hover"),
|
|
5884
|
-
text: V("brand-outline-content"),
|
|
5885
|
-
icon: V("brand-outline-content"),
|
|
5886
|
-
border: V("brand-outline-border")
|
|
5887
|
-
} : {
|
|
5888
|
-
bg: V("brand-strong-bg-default"),
|
|
5889
|
-
bgHover: V("brand-strong-bg-hover"),
|
|
5890
|
-
text: V("brand-strong-content"),
|
|
5891
|
-
icon: V("brand-strong-content"),
|
|
5892
|
-
border: "transparent"
|
|
5893
|
-
};
|
|
5894
|
-
case "secondary":
|
|
5895
|
-
return {
|
|
5896
|
-
bg: V("brand-subtle-bg-default"),
|
|
5897
|
-
bgHover: V("brand-subtle-bg-hover"),
|
|
5898
|
-
text: V("brand-subtle-content"),
|
|
5899
|
-
icon: V("brand-subtle-content"),
|
|
5900
|
-
border: "transparent"
|
|
5901
|
-
};
|
|
5902
|
-
case "neutral":
|
|
5903
|
-
return {
|
|
5904
|
-
bg: V("neutral-outline-bg-default"),
|
|
5905
|
-
bgHover: V("neutral-outline-bg-hover"),
|
|
5906
|
-
text: V("neutral-outline-text"),
|
|
5907
|
-
icon: V("neutral-outline-icon"),
|
|
5908
|
-
border: outline ? V("neutral-outline-border") : "transparent"
|
|
5909
|
-
};
|
|
5910
|
-
case "danger":
|
|
5911
|
-
return outline ? {
|
|
5912
|
-
bg: V("danger-outline-bg-default"),
|
|
5913
|
-
bgHover: V("danger-outline-bg-hover"),
|
|
5914
|
-
text: V("danger-outline-content"),
|
|
5915
|
-
icon: V("danger-outline-content"),
|
|
5916
|
-
border: V("danger-outline-border")
|
|
5917
|
-
} : {
|
|
5918
|
-
bg: V("danger-strong-bg-default"),
|
|
5919
|
-
bgHover: V("danger-strong-bg-hover"),
|
|
5920
|
-
text: V("danger-strong-content"),
|
|
5921
|
-
icon: V("danger-strong-content"),
|
|
5922
|
-
border: "transparent"
|
|
5923
|
-
};
|
|
5924
|
-
}
|
|
5925
|
-
}
|
|
5926
|
-
var BUTTON_SIZE_CONFIG = {
|
|
5927
|
-
xs: {
|
|
5928
|
-
height: "var(--cmp-button-xs-height)",
|
|
5929
|
-
paddingX: "var(--cmp-button-xs-paddingX)",
|
|
5930
|
-
gap: "var(--cmp-button-xs-gap)",
|
|
5931
|
-
iconSize: 12,
|
|
5932
|
-
fontSize: 12,
|
|
5933
|
-
fontWeight: 500,
|
|
5934
|
-
radius: "var(--cmp-button-radius-sm)",
|
|
5935
|
-
minWidth: 36
|
|
5936
|
-
},
|
|
5937
|
-
sm: {
|
|
5938
|
-
height: "var(--cmp-button-sm-height)",
|
|
5939
|
-
paddingX: "var(--cmp-button-sm-paddingX)",
|
|
5940
|
-
gap: "var(--cmp-button-sm-gap)",
|
|
5941
|
-
iconSize: 16,
|
|
5942
|
-
fontSize: 12,
|
|
5943
|
-
fontWeight: 500,
|
|
5944
|
-
radius: "var(--cmp-button-radius-sm)",
|
|
5945
|
-
minWidth: 70
|
|
5946
|
-
},
|
|
5947
|
-
md: {
|
|
5948
|
-
height: "var(--cmp-button-md-height)",
|
|
5949
|
-
paddingX: "var(--cmp-button-md-paddingX)",
|
|
5950
|
-
gap: "var(--cmp-button-md-gap)",
|
|
5951
|
-
iconSize: 20,
|
|
5952
|
-
fontSize: 16,
|
|
5953
|
-
fontWeight: 500,
|
|
5954
|
-
radius: "var(--cmp-button-radius-md)",
|
|
5955
|
-
minWidth: 100
|
|
5956
|
-
},
|
|
5957
|
-
lg: {
|
|
5958
|
-
height: "var(--cmp-button-lg-height)",
|
|
5959
|
-
paddingX: "var(--cmp-button-lg-paddingX)",
|
|
5960
|
-
gap: "var(--cmp-button-lg-gap)",
|
|
5961
|
-
iconSize: 24,
|
|
5962
|
-
fontSize: 18,
|
|
5963
|
-
fontWeight: 500,
|
|
5964
|
-
radius: "var(--cmp-button-radius-md)",
|
|
5965
|
-
minWidth: 120
|
|
5966
|
-
}
|
|
5967
|
-
};
|
|
5968
|
-
var BUTTON_FOCUS_RING = "var(--sys-color-border-accent)";
|
|
5969
|
-
var BUTTON_DISABLED_BG = "var(--cmp-button-bg-disabled, #E1E1E1)";
|
|
5970
|
-
var BUTTON_DISABLED_BORDER = "var(--cmp-button-border-disabled, #CCCCCC)";
|
|
5971
|
-
var BUTTON_DISABLED_TEXT = "var(--cmp-button-text-disabled, #888888)";
|
|
5972
|
-
var BUTTON_DISABLED_ICON = "var(--cmp-button-icon-disabled, #BBBBBB)";
|
|
5973
|
-
var SButton = /* @__PURE__ */ react.forwardRef(function SButton2({
|
|
5974
|
-
color = "primary",
|
|
5975
|
-
outline = false,
|
|
5976
|
-
size = "sm",
|
|
5977
|
-
icon,
|
|
5978
|
-
rightIcon,
|
|
5979
|
-
label,
|
|
5980
|
-
className,
|
|
5981
|
-
style,
|
|
5982
|
-
type = "button",
|
|
5983
|
-
disabled = false,
|
|
5984
|
-
"aria-label": ariaLabel,
|
|
5985
|
-
...props
|
|
5986
|
-
}, ref) {
|
|
5987
|
-
const preset = buttonPreset(color, outline);
|
|
5988
|
-
const s = BUTTON_SIZE_CONFIG[size];
|
|
5989
|
-
const hasLabel = label != null && label !== "";
|
|
5990
|
-
const iconOnly = !hasLabel && Boolean(icon) !== Boolean(rightIcon);
|
|
5991
|
-
if (color === "secondary" && outline && typeof console !== "undefined") {
|
|
5992
|
-
console.warn(
|
|
5993
|
-
'[SButton] color="secondary" \uB294 outline \uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. solid \uB85C \uB80C\uB354\uB429\uB2C8\uB2E4.'
|
|
5994
|
-
);
|
|
5995
|
-
}
|
|
5996
|
-
if (iconOnly && !ariaLabel && typeof console !== "undefined") {
|
|
5997
|
-
console.warn(`[SButton] \uC544\uC774\uCF58 \uC804\uC6A9 \uBC84\uD2BC\uC740 aria-label \uC774 \uD544\uC694\uD569\uB2C8\uB2E4. (color="${color}")`);
|
|
5998
|
-
}
|
|
5999
|
-
const iconColor = disabled ? BUTTON_DISABLED_ICON : preset.icon;
|
|
6000
|
-
const iconNode = icon ? /* @__PURE__ */ jsxRuntime.jsx(SIcon, { name: icon, size: s.iconSize, color: iconColor }) : null;
|
|
6001
|
-
const rightIconNode = rightIcon ? /* @__PURE__ */ jsxRuntime.jsx(SIcon, { name: rightIcon, size: s.iconSize, color: iconColor }) : null;
|
|
6002
|
-
const cssVars = {
|
|
6003
|
-
"--btn-bg": disabled ? BUTTON_DISABLED_BG : preset.bg,
|
|
6004
|
-
"--btn-bg-hover": preset.bgHover,
|
|
6005
|
-
"--btn-border": disabled ? BUTTON_DISABLED_BORDER : preset.border,
|
|
6006
|
-
"--btn-ring": BUTTON_FOCUS_RING,
|
|
6007
|
-
"minHeight": s.height,
|
|
6008
|
-
"minWidth": iconOnly ? s.height : hasLabel ? s.minWidth : void 0,
|
|
6009
|
-
"padding": iconOnly ? 0 : `0 ${s.paddingX}`,
|
|
6010
|
-
"borderRadius": s.radius,
|
|
6011
|
-
"gap": s.gap,
|
|
6012
|
-
"fontSize": s.fontSize,
|
|
6013
|
-
"fontWeight": s.fontWeight,
|
|
6014
|
-
"color": disabled ? BUTTON_DISABLED_TEXT : preset.text,
|
|
6015
|
-
...style
|
|
6016
|
-
};
|
|
6017
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6018
|
-
"button",
|
|
6019
|
-
{
|
|
6020
|
-
ref,
|
|
6021
|
-
type,
|
|
6022
|
-
disabled,
|
|
6023
|
-
"aria-label": ariaLabel,
|
|
6024
|
-
className: cn(
|
|
6025
|
-
"inline-flex items-center justify-center whitespace-nowrap border border-solid leading-none transition-colors",
|
|
6026
|
-
"border-[color:var(--btn-border)] bg-[var(--btn-bg)]",
|
|
6027
|
-
"outline-none focus-visible:shadow-[0_0_0_2px_var(--btn-ring)]",
|
|
6028
|
-
disabled ? "cursor-not-allowed" : "cursor-pointer hover:bg-[var(--btn-bg-hover)]",
|
|
6029
|
-
className
|
|
6030
|
-
),
|
|
6031
|
-
style: cssVars,
|
|
6032
|
-
...props,
|
|
6033
|
-
children: [
|
|
6034
|
-
iconNode,
|
|
6035
|
-
hasLabel && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex items-center justify-center", children: label }),
|
|
6036
|
-
rightIconNode
|
|
6037
|
-
]
|
|
6038
|
-
}
|
|
6039
|
-
);
|
|
6040
|
-
});
|
|
6041
6113
|
var DANGER_TITLE_LABEL = "\uC8FC\uC758\uC0AC\uD56D";
|
|
6042
6114
|
function renderItems(message, depth = 1) {
|
|
6043
6115
|
const out = [];
|
|
@@ -6881,53 +6953,6 @@ function SPortal({
|
|
|
6881
6953
|
}
|
|
6882
6954
|
);
|
|
6883
6955
|
}
|
|
6884
|
-
function SFooter({
|
|
6885
|
-
bg = "white",
|
|
6886
|
-
left,
|
|
6887
|
-
button,
|
|
6888
|
-
children,
|
|
6889
|
-
className,
|
|
6890
|
-
leftClassName,
|
|
6891
|
-
style
|
|
6892
|
-
}) {
|
|
6893
|
-
const isGrey = bg === "grey";
|
|
6894
|
-
const hasSlot = left != null || children != null;
|
|
6895
|
-
const hasButton = button != null;
|
|
6896
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6897
|
-
"footer",
|
|
6898
|
-
{
|
|
6899
|
-
className: cn(
|
|
6900
|
-
"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)]",
|
|
6901
|
-
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)]",
|
|
6902
|
-
className
|
|
6903
|
-
),
|
|
6904
|
-
style,
|
|
6905
|
-
children: [
|
|
6906
|
-
hasSlot && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6907
|
-
"div",
|
|
6908
|
-
{
|
|
6909
|
-
className: cn("flex min-w-px flex-[1_0_0] items-center justify-between", leftClassName),
|
|
6910
|
-
children: [
|
|
6911
|
-
left,
|
|
6912
|
-
children
|
|
6913
|
-
]
|
|
6914
|
-
}
|
|
6915
|
-
),
|
|
6916
|
-
hasButton && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6917
|
-
SButton,
|
|
6918
|
-
{
|
|
6919
|
-
color: button.color ?? "primary",
|
|
6920
|
-
outline: button.outline,
|
|
6921
|
-
size: button.size ?? "md",
|
|
6922
|
-
disabled: button.disabled,
|
|
6923
|
-
onClick: () => button.onClick?.(),
|
|
6924
|
-
label: button.label ?? "\uD655\uC778"
|
|
6925
|
-
}
|
|
6926
|
-
)
|
|
6927
|
-
]
|
|
6928
|
-
}
|
|
6929
|
-
);
|
|
6930
|
-
}
|
|
6931
6956
|
var SPopup = /* @__PURE__ */ react.forwardRef(function SPopup2({
|
|
6932
6957
|
popupTitle = "",
|
|
6933
6958
|
type = "default",
|