sellmate-design-system-react 9.0.0-beta.20 → 9.0.0-beta.22
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 +60 -13
- package/README.md +15 -14
- package/dist/components/SCard/README.md +16 -0
- package/dist/components/SCard/SCard.d.ts +17 -2
- package/dist/components/SDivider/README.md +1 -0
- package/dist/components/SDivider/SDivider.d.ts +11 -0
- 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/components/STable/README.md +2 -3
- package/dist/components/STable/STable.d.ts +12 -12
- package/dist/index.cjs +274 -244
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +274 -244
- package/dist/index.js.map +1 -1
- package/dist/llms-full.txt +80 -17
- package/dist/llms.txt +60 -13
- package/dist/styles.css +32 -3
- package/eslint/index.mjs +4 -0
- package/eslint/rules/divider-vertical-height.mjs +137 -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
|
});
|
|
@@ -3745,7 +3972,8 @@ var SDraggableItemImpl = /* @__PURE__ */ react.forwardRef(function SDraggableIte
|
|
|
3745
3972
|
] });
|
|
3746
3973
|
});
|
|
3747
3974
|
var SDraggableItem2 = /* @__PURE__ */ withDisplayName(SDraggableItemImpl, "SDraggableItem");
|
|
3748
|
-
var SDivider = /* @__PURE__ */ react.forwardRef(function SDivider2({ vertical = false, className, style, ...rest }, ref) {
|
|
3975
|
+
var SDivider = /* @__PURE__ */ react.forwardRef(function SDivider2({ vertical = false, height, className, style, ...rest }, ref) {
|
|
3976
|
+
const fixedHeight = vertical && height !== void 0;
|
|
3749
3977
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3750
3978
|
"hr",
|
|
3751
3979
|
{
|
|
@@ -3753,10 +3981,14 @@ var SDivider = /* @__PURE__ */ react.forwardRef(function SDivider2({ vertical =
|
|
|
3753
3981
|
"aria-orientation": vertical ? "vertical" : "horizontal",
|
|
3754
3982
|
className: cn(
|
|
3755
3983
|
"shrink-0 border-0",
|
|
3756
|
-
vertical ? "inline-block
|
|
3984
|
+
vertical ? cn("inline-block w-px", fixedHeight ? "self-center" : "h-auto self-stretch") : "block h-px w-full",
|
|
3757
3985
|
className
|
|
3758
3986
|
),
|
|
3759
|
-
style: {
|
|
3987
|
+
style: {
|
|
3988
|
+
backgroundColor: "var(--sys-color-divider-default, #E1E1E1)",
|
|
3989
|
+
...fixedHeight ? { height: typeof height === "number" ? `${height}px` : height } : null,
|
|
3990
|
+
...style
|
|
3991
|
+
},
|
|
3760
3992
|
...rest
|
|
3761
3993
|
}
|
|
3762
3994
|
);
|
|
@@ -5568,11 +5800,15 @@ var SSectionHeaderCardRootImpl = /* @__PURE__ */ react.forwardRef(
|
|
|
5568
5800
|
headerClassName,
|
|
5569
5801
|
padding,
|
|
5570
5802
|
background,
|
|
5803
|
+
footerLeft,
|
|
5804
|
+
button,
|
|
5805
|
+
footerClassName,
|
|
5571
5806
|
className,
|
|
5572
5807
|
children,
|
|
5573
5808
|
...rest
|
|
5574
5809
|
}, ref) {
|
|
5575
5810
|
const hasHeader = title != null;
|
|
5811
|
+
const hasFooter = footerLeft != null || button != null;
|
|
5576
5812
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5577
5813
|
"div",
|
|
5578
5814
|
{
|
|
@@ -5597,7 +5833,16 @@ var SSectionHeaderCardRootImpl = /* @__PURE__ */ react.forwardRef(
|
|
|
5597
5833
|
className: headerClassName
|
|
5598
5834
|
}
|
|
5599
5835
|
),
|
|
5600
|
-
/* @__PURE__ */ jsxRuntime.jsx(SSectionHeaderCardBodyImpl, { padding, background, children })
|
|
5836
|
+
/* @__PURE__ */ jsxRuntime.jsx(SSectionHeaderCardBodyImpl, { padding, background, children }),
|
|
5837
|
+
hasFooter && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5838
|
+
SFooter,
|
|
5839
|
+
{
|
|
5840
|
+
bg: "grey",
|
|
5841
|
+
left: footerLeft,
|
|
5842
|
+
button,
|
|
5843
|
+
className: cn("px-(--cmp-sectionHeaderCard-header-paddingX)", footerClassName)
|
|
5844
|
+
}
|
|
5845
|
+
)
|
|
5601
5846
|
]
|
|
5602
5847
|
}
|
|
5603
5848
|
);
|
|
@@ -5870,174 +6115,6 @@ var SSplitter2 = /* @__PURE__ */ Object.assign(SSplitterRoot, {
|
|
|
5870
6115
|
Before: SSplitterBefore2,
|
|
5871
6116
|
After: SSplitterAfter2
|
|
5872
6117
|
});
|
|
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
6118
|
var DANGER_TITLE_LABEL = "\uC8FC\uC758\uC0AC\uD56D";
|
|
6042
6119
|
function renderItems(message, depth = 1) {
|
|
6043
6120
|
const out = [];
|
|
@@ -6881,53 +6958,6 @@ function SPortal({
|
|
|
6881
6958
|
}
|
|
6882
6959
|
);
|
|
6883
6960
|
}
|
|
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
6961
|
var SPopup = /* @__PURE__ */ react.forwardRef(function SPopup2({
|
|
6932
6962
|
popupTitle = "",
|
|
6933
6963
|
type = "default",
|
|
@@ -11316,7 +11346,6 @@ var STable = /* @__PURE__ */ react.forwardRef(function STable2({
|
|
|
11316
11346
|
onPageChange,
|
|
11317
11347
|
useInternalPagination = false,
|
|
11318
11348
|
useRowsPerPageSelect = false,
|
|
11319
|
-
useDensityToggle = false,
|
|
11320
11349
|
rowsPerPageOption = DEFAULT_ROWS_PER_PAGE_OPTION,
|
|
11321
11350
|
onRowsPerPageChange,
|
|
11322
11351
|
useVirtualScroll = false,
|
|
@@ -11332,10 +11361,18 @@ var STable = /* @__PURE__ */ react.forwardRef(function STable2({
|
|
|
11332
11361
|
}, ref) {
|
|
11333
11362
|
const autoId = react.useId();
|
|
11334
11363
|
const resolvedTableId = tableId ?? autoId;
|
|
11364
|
+
const [innerDense, setInnerDense] = react.useState(dense);
|
|
11365
|
+
react.useEffect(() => {
|
|
11366
|
+
setInnerDense(dense);
|
|
11367
|
+
}, [dense]);
|
|
11368
|
+
const changeDense = (next) => {
|
|
11369
|
+
setInnerDense(next);
|
|
11370
|
+
onDenseChange?.(next);
|
|
11371
|
+
};
|
|
11335
11372
|
const visibleCols = react.useMemo(() => columns.filter((c) => c.visible !== false), [columns]);
|
|
11336
11373
|
const stickyLeft = stickyColumn?.left ?? 0;
|
|
11337
11374
|
const stickyRight = stickyColumn?.right ?? 0;
|
|
11338
|
-
const effectiveRowHeight = rowHeight ?? (
|
|
11375
|
+
const effectiveRowHeight = rowHeight ?? (innerDense ? DENSE_ROW_HEIGHT : DEFAULT_ROW_HEIGHT);
|
|
11339
11376
|
const colSignature = react.useMemo(
|
|
11340
11377
|
() => visibleCols.map((c) => `${c.name}:${c.width ?? ""}:${c.autoWidth ? 1 : 0}`).join("|"),
|
|
11341
11378
|
[visibleCols]
|
|
@@ -11565,9 +11602,9 @@ var STable = /* @__PURE__ */ react.forwardRef(function STable2({
|
|
|
11565
11602
|
else onSelectedChange?.([...selected, row]);
|
|
11566
11603
|
};
|
|
11567
11604
|
const radiusClass = radius === "full" ? "rounded-none" : radius === "useTop" ? "rounded-b-[var(--cmp-table-radius)] rounded-t-none" : "rounded-[var(--cmp-table-radius)]";
|
|
11568
|
-
const cellPadY =
|
|
11605
|
+
const cellPadY = innerDense ? "var(--cmp-table-body-paddingY-dense)" : "var(--cmp-table-body-paddingY-default)";
|
|
11569
11606
|
const cellPadXOf = (col) => col.contentType === "control" ? "var(--cmp-table-body-paddingX-default)" : "var(--cmp-table-body-paddingX-wide)";
|
|
11570
|
-
const rowH =
|
|
11607
|
+
const rowH = innerDense ? "var(--cmp-table-body-dense-height)" : "var(--cmp-table-body-default-height)";
|
|
11571
11608
|
const totalColSpan = visibleCols.length + (selectable ? 1 : 0);
|
|
11572
11609
|
const stickyInfo = (i) => {
|
|
11573
11610
|
const isLeft = i < stickyLeft;
|
|
@@ -11919,10 +11956,11 @@ var STable = /* @__PURE__ */ react.forwardRef(function STable2({
|
|
|
11919
11956
|
]
|
|
11920
11957
|
}
|
|
11921
11958
|
),
|
|
11922
|
-
showPagination && // 원본 sd-table__pagination: 테이블 하단에 이어붙는 회색 바(높이 48px, margin-top:-1px로 테두리 겹침).
|
|
11959
|
+
(showPagination || dense) && // 원본 sd-table__pagination: 테이블 하단에 이어붙는 회색 바(높이 48px, margin-top:-1px로 테두리 겹침).
|
|
11923
11960
|
// SPagination은 전체 폭 기준 중앙, rows-per-page SSelect는 우측에 absolute 배치해 중앙 정렬을 유지한다.
|
|
11924
11961
|
// 루트 높이가 확정된 경우(테이블이 남은 영역을 채우는 배치) 페이지네이션 바가
|
|
11925
11962
|
// 눌리지 않도록 shrink-0으로 48px를 보장한다.
|
|
11963
|
+
// 페이지네이션이 없어도 dense 면 이 바를 그린다 — 밀도 토글이 사는 곳이 여기다.
|
|
11926
11964
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11927
11965
|
"div",
|
|
11928
11966
|
{
|
|
@@ -11932,22 +11970,20 @@ var STable = /* @__PURE__ */ react.forwardRef(function STable2({
|
|
|
11932
11970
|
bordered && "-mt-px border border-solid border-[color:var(--cmp-table-border-color)]"
|
|
11933
11971
|
),
|
|
11934
11972
|
children: [
|
|
11935
|
-
/* @__PURE__ */ jsxRuntime.jsx(SPagination, { currentPage: displayPage, lastPage, onPageChange: changePage }),
|
|
11936
|
-
(
|
|
11937
|
-
|
|
11938
|
-
// row·rowDense 는 세로 막대라 90도 돌려 가로 행으로 쓴다.
|
|
11939
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11973
|
+
showPagination && /* @__PURE__ */ jsxRuntime.jsx(SPagination, { currentPage: displayPage, lastPage, onPageChange: changePage }),
|
|
11974
|
+
(dense || useRowsPerPageSelect) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute right-[10px] top-1/2 flex -translate-y-1/2 items-center gap-[12px]", children: [
|
|
11975
|
+
dense && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11940
11976
|
STextLink,
|
|
11941
11977
|
{
|
|
11942
11978
|
size: "sm",
|
|
11943
|
-
icon:
|
|
11979
|
+
icon: innerDense ? "row" : "rowDense",
|
|
11944
11980
|
iconRotate: 90,
|
|
11945
11981
|
iconColor: "var(--sys-color-fg-quaternary)",
|
|
11946
|
-
label:
|
|
11947
|
-
onClick: () =>
|
|
11982
|
+
label: innerDense ? "\uB113\uAC8C \uBCF4\uAE30" : "\uC881\uAC8C \uBCF4\uAE30",
|
|
11983
|
+
onClick: () => changeDense(!innerDense)
|
|
11948
11984
|
}
|
|
11949
11985
|
),
|
|
11950
|
-
|
|
11986
|
+
dense && useRowsPerPageSelect && /* @__PURE__ */ jsxRuntime.jsx(SDivider, { vertical: true, className: "my-[6px]" }),
|
|
11951
11987
|
useRowsPerPageSelect && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11952
11988
|
SSelect2,
|
|
11953
11989
|
{
|
|
@@ -12010,7 +12046,7 @@ var STableBar = /* @__PURE__ */ react.forwardRef(function STableBar2({ total, se
|
|
|
12010
12046
|
SDivider,
|
|
12011
12047
|
{
|
|
12012
12048
|
vertical: true,
|
|
12013
|
-
|
|
12049
|
+
height: "var(--cmp-table-bar-divider-height)",
|
|
12014
12050
|
style: { backgroundColor: "var(--cmp-table-border-color)" }
|
|
12015
12051
|
}
|
|
12016
12052
|
),
|
|
@@ -12935,13 +12971,7 @@ function SCalendar({
|
|
|
12935
12971
|
}
|
|
12936
12972
|
)
|
|
12937
12973
|
] }),
|
|
12938
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12939
|
-
SDivider,
|
|
12940
|
-
{
|
|
12941
|
-
vertical: true,
|
|
12942
|
-
className: "h-[var(--cmp-datepicker-calendar-header-divider-height)] self-center"
|
|
12943
|
-
}
|
|
12944
|
-
),
|
|
12974
|
+
/* @__PURE__ */ jsxRuntime.jsx(SDivider, { vertical: true, height: "var(--cmp-datepicker-calendar-header-divider-height)" }),
|
|
12945
12975
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full items-center gap-[var(--cmp-datepicker-calendar-gap)]", children: [
|
|
12946
12976
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12947
12977
|
SGhostButton,
|