sellmate-design-system-react 0.1.8 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/SActionModal/SActionModal.cjs +1 -1
- package/dist/components/SActionModal/SActionModal.cjs.map +1 -1
- package/dist/components/SActionModal/SActionModal.js +1 -1
- package/dist/components/SActionModal/SActionModal.js.map +1 -1
- package/dist/components/SBarcodeInput/SBarcodeInput.cjs +217 -208
- package/dist/components/SBarcodeInput/SBarcodeInput.cjs.map +1 -1
- package/dist/components/SBarcodeInput/SBarcodeInput.js +217 -208
- package/dist/components/SBarcodeInput/SBarcodeInput.js.map +1 -1
- package/dist/components/SCalendar/SCalendar.cjs +1 -1
- package/dist/components/SCalendar/SCalendar.cjs.map +1 -1
- package/dist/components/SCalendar/SCalendar.js +1 -1
- package/dist/components/SCalendar/SCalendar.js.map +1 -1
- package/dist/components/SChip/SChip.cjs +1 -1
- package/dist/components/SChip/SChip.cjs.map +1 -1
- package/dist/components/SChip/SChip.d.ts +1 -1
- package/dist/components/SChip/SChip.js +1 -1
- package/dist/components/SChip/SChip.js.map +1 -1
- package/dist/components/SChipInput/SChipInput.cjs +234 -220
- package/dist/components/SChipInput/SChipInput.cjs.map +1 -1
- package/dist/components/SChipInput/SChipInput.js +234 -220
- package/dist/components/SChipInput/SChipInput.js.map +1 -1
- package/dist/components/SCircleProgress/SCircleProgress.cjs +31 -14
- package/dist/components/SCircleProgress/SCircleProgress.cjs.map +1 -1
- package/dist/components/SCircleProgress/SCircleProgress.d.ts +2 -0
- package/dist/components/SCircleProgress/SCircleProgress.js +31 -14
- package/dist/components/SCircleProgress/SCircleProgress.js.map +1 -1
- package/dist/components/SDatePicker/SDatePicker.cjs +222 -213
- package/dist/components/SDatePicker/SDatePicker.cjs.map +1 -1
- package/dist/components/SDatePicker/SDatePicker.js +222 -213
- package/dist/components/SDatePicker/SDatePicker.js.map +1 -1
- package/dist/components/SDateRangePicker/SDateRangePicker.cjs +297 -262
- package/dist/components/SDateRangePicker/SDateRangePicker.cjs.map +1 -1
- package/dist/components/SDateRangePicker/SDateRangePicker.js +297 -262
- package/dist/components/SDateRangePicker/SDateRangePicker.js.map +1 -1
- package/dist/components/SDropdownButton/SDropdownButton.cjs +4 -4
- package/dist/components/SDropdownButton/SDropdownButton.cjs.map +1 -1
- package/dist/components/SDropdownButton/SDropdownButton.js +4 -4
- package/dist/components/SDropdownButton/SDropdownButton.js.map +1 -1
- package/dist/components/SField/SField.cjs +217 -20
- package/dist/components/SField/SField.cjs.map +1 -1
- package/dist/components/SField/SField.d.ts +11 -0
- package/dist/components/SField/SField.js +217 -20
- package/dist/components/SField/SField.js.map +1 -1
- package/dist/components/SFilePicker/SFilePicker.cjs +315 -276
- package/dist/components/SFilePicker/SFilePicker.cjs.map +1 -1
- package/dist/components/SFilePicker/SFilePicker.d.ts +4 -2
- package/dist/components/SFilePicker/SFilePicker.js +314 -276
- package/dist/components/SFilePicker/SFilePicker.js.map +1 -1
- package/dist/components/SInput/SInput.cjs +217 -208
- package/dist/components/SInput/SInput.cjs.map +1 -1
- package/dist/components/SInput/SInput.js +217 -208
- package/dist/components/SInput/SInput.js.map +1 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.cjs +631 -450
- package/dist/components/SKeyValueTable/SKeyValueTable.cjs.map +1 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.d.ts +3 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.js +631 -450
- package/dist/components/SKeyValueTable/SKeyValueTable.js.map +1 -1
- package/dist/components/SLoadingContainer/SLoadingContainer.cjs +39 -14
- package/dist/components/SLoadingContainer/SLoadingContainer.cjs.map +1 -1
- package/dist/components/SLoadingContainer/SLoadingContainer.js +39 -14
- package/dist/components/SLoadingContainer/SLoadingContainer.js.map +1 -1
- package/dist/components/SLoadingContainer/loading.cjs +39 -14
- package/dist/components/SLoadingContainer/loading.cjs.map +1 -1
- package/dist/components/SLoadingContainer/loading.js +39 -14
- package/dist/components/SLoadingContainer/loading.js.map +1 -1
- package/dist/components/SLoadingModal/SLoadingModal.cjs +37 -16
- package/dist/components/SLoadingModal/SLoadingModal.cjs.map +1 -1
- package/dist/components/SLoadingModal/SLoadingModal.d.ts +3 -1
- package/dist/components/SLoadingModal/SLoadingModal.js +37 -16
- package/dist/components/SLoadingModal/SLoadingModal.js.map +1 -1
- package/dist/components/SNumberInput/SNumberInput.cjs +325 -49
- package/dist/components/SNumberInput/SNumberInput.cjs.map +1 -1
- package/dist/components/SNumberInput/SNumberInput.d.ts +2 -0
- package/dist/components/SNumberInput/SNumberInput.js +325 -49
- package/dist/components/SNumberInput/SNumberInput.js.map +1 -1
- package/dist/components/SPagination/SPagination.cjs +1 -1
- package/dist/components/SPagination/SPagination.cjs.map +1 -1
- package/dist/components/SPagination/SPagination.js +1 -1
- package/dist/components/SPagination/SPagination.js.map +1 -1
- package/dist/components/SRadio/SRadioGroup.cjs +1 -1
- package/dist/components/SRadio/SRadioGroup.cjs.map +1 -1
- package/dist/components/SRadio/SRadioGroup.js +1 -1
- package/dist/components/SRadio/SRadioGroup.js.map +1 -1
- package/dist/components/SSelect/SSelect.cjs +71 -32
- package/dist/components/SSelect/SSelect.cjs.map +1 -1
- package/dist/components/SSelect/SSelect.js +71 -32
- package/dist/components/SSelect/SSelect.js.map +1 -1
- package/dist/components/STable/STable.cjs +108 -49
- package/dist/components/STable/STable.cjs.map +1 -1
- package/dist/components/STable/STable.js +108 -49
- package/dist/components/STable/STable.js.map +1 -1
- package/dist/components/STextarea/STextarea.cjs +217 -20
- package/dist/components/STextarea/STextarea.cjs.map +1 -1
- package/dist/components/STextarea/STextarea.js +217 -20
- package/dist/components/STextarea/STextarea.js.map +1 -1
- package/dist/components/SToast/SToastContainer.cjs +3 -3
- package/dist/components/SToast/SToastContainer.cjs.map +1 -1
- package/dist/components/SToast/SToastContainer.js +3 -3
- package/dist/components/SToast/SToastContainer.js.map +1 -1
- package/dist/components/STooltip/STooltip.cjs +208 -13
- package/dist/components/STooltip/STooltip.cjs.map +1 -1
- package/dist/components/STooltip/STooltip.js +208 -13
- package/dist/components/STooltip/STooltip.js.map +1 -1
- package/dist/index.cjs +439 -221
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +439 -221
- package/dist/index.js.map +1 -1
- package/dist/styles.css +113 -48
- package/dist/theme.css +49 -23
- package/package.json +1 -1
|
@@ -2935,20 +2935,46 @@ var COLOR_MAP = {
|
|
|
2935
2935
|
};
|
|
2936
2936
|
var clamp = (v) => Number.isFinite(v) ? Math.max(0, Math.min(100, v)) : 0;
|
|
2937
2937
|
var SCircleProgress = forwardRef(
|
|
2938
|
-
function SCircleProgress2({
|
|
2938
|
+
function SCircleProgress2({
|
|
2939
|
+
value = 0,
|
|
2940
|
+
type = "primary",
|
|
2941
|
+
indeterminate = false,
|
|
2942
|
+
label,
|
|
2943
|
+
innerValue = false,
|
|
2944
|
+
className,
|
|
2945
|
+
style
|
|
2946
|
+
}, ref) {
|
|
2939
2947
|
const v = clamp(value);
|
|
2940
2948
|
const colors = COLOR_MAP[type];
|
|
2941
2949
|
const c = VIEWBOX / 2;
|
|
2942
2950
|
const percentColor = v === 0 ? "var(--sys-color-fg-tertiary, #888888)" : colors.arc;
|
|
2943
2951
|
const filled = v / 100 * CIRCUMFERENCE;
|
|
2952
|
+
const showPercent = !indeterminate;
|
|
2953
|
+
const percentNode = /* @__PURE__ */ jsxs(
|
|
2954
|
+
"span",
|
|
2955
|
+
{
|
|
2956
|
+
className: cn(
|
|
2957
|
+
"text-center text-[16px] font-bold leading-[26px]",
|
|
2958
|
+
innerValue && "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"
|
|
2959
|
+
),
|
|
2960
|
+
style: { color: percentColor },
|
|
2961
|
+
children: [
|
|
2962
|
+
Math.round(v),
|
|
2963
|
+
"%"
|
|
2964
|
+
]
|
|
2965
|
+
}
|
|
2966
|
+
);
|
|
2944
2967
|
return /* @__PURE__ */ jsxs(
|
|
2945
2968
|
"div",
|
|
2946
2969
|
{
|
|
2947
2970
|
ref,
|
|
2948
|
-
className: cn(
|
|
2971
|
+
className: cn(
|
|
2972
|
+
"inline-flex flex-col items-center gap-[var(--cmp-progress-circular-gap)]",
|
|
2973
|
+
className
|
|
2974
|
+
),
|
|
2949
2975
|
style,
|
|
2950
2976
|
children: [
|
|
2951
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
2977
|
+
/* @__PURE__ */ jsxs("div", { className: cn(innerValue && "relative"), children: [
|
|
2952
2978
|
/* @__PURE__ */ jsxs(
|
|
2953
2979
|
"svg",
|
|
2954
2980
|
{
|
|
@@ -2992,18 +3018,9 @@ var SCircleProgress = forwardRef(
|
|
|
2992
3018
|
]
|
|
2993
3019
|
}
|
|
2994
3020
|
),
|
|
2995
|
-
|
|
2996
|
-
"span",
|
|
2997
|
-
{
|
|
2998
|
-
className: "absolute inset-0 flex items-center justify-center text-[16px] font-bold leading-[26px]",
|
|
2999
|
-
style: { color: percentColor },
|
|
3000
|
-
children: [
|
|
3001
|
-
Math.round(v),
|
|
3002
|
-
"%"
|
|
3003
|
-
]
|
|
3004
|
-
}
|
|
3005
|
-
)
|
|
3021
|
+
showPercent && innerValue && percentNode
|
|
3006
3022
|
] }),
|
|
3023
|
+
showPercent && !innerValue && percentNode,
|
|
3007
3024
|
label && /* @__PURE__ */ jsx("span", { className: "text-center text-[12px] font-normal leading-[20px] text-[color:var(--cmp-progress-color-label)]", children: label })
|
|
3008
3025
|
]
|
|
3009
3026
|
}
|
|
@@ -3066,7 +3083,7 @@ function SPagination({
|
|
|
3066
3083
|
style,
|
|
3067
3084
|
children: [
|
|
3068
3085
|
/* @__PURE__ */ jsx("div", { className: "flex min-w-[calc(var(--cmp-pagination-height)*2+var(--cmp-pagination-move-gap))] items-center justify-end gap-[var(--cmp-pagination-move-gap)]", children: prevButtons }),
|
|
3069
|
-
simple ? /* @__PURE__ */ jsxs("div", { className: "flex h-[var(--cmp-pagination-height)] items-center gap-[var(--cmp-pagination-
|
|
3086
|
+
simple ? /* @__PURE__ */ jsxs("div", { className: "flex h-[var(--cmp-pagination-height)] items-center gap-[var(--cmp-pagination-simple-gap)] px-[var(--cmp-pagination-paddingX)] text-[12px] font-medium leading-[20px] text-[color:var(--cmp-pagination-item-content-default)]", children: [
|
|
3070
3087
|
/* @__PURE__ */ jsx("span", { className: "font-bold text-[color:var(--cmp-pagination-item-content-selected)]", children: currentPage }),
|
|
3071
3088
|
/* @__PURE__ */ jsx("span", { children: "/" }),
|
|
3072
3089
|
/* @__PURE__ */ jsx("span", { children: lastPage })
|
|
@@ -3310,7 +3327,8 @@ var HIDE_DELAY_MS = 100;
|
|
|
3310
3327
|
function useBody(content, message = []) {
|
|
3311
3328
|
if (content != null) return content;
|
|
3312
3329
|
if (message.length === 0) return null;
|
|
3313
|
-
|
|
3330
|
+
const singleLine = message.length === 1;
|
|
3331
|
+
return /* @__PURE__ */ jsx(Fragment, { children: message.map((line, i) => /* @__PURE__ */ jsx("div", { className: singleLine ? "leading-[24px]" : void 0, children: line }, i)) });
|
|
3314
3332
|
}
|
|
3315
3333
|
var STooltip = forwardRef(function STooltip2({
|
|
3316
3334
|
content,
|
|
@@ -3413,11 +3431,17 @@ var STooltip = forwardRef(function STooltip2({
|
|
|
3413
3431
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-[12px]", children: [
|
|
3414
3432
|
/* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1", children: body }),
|
|
3415
3433
|
useClose && /* @__PURE__ */ jsx(
|
|
3416
|
-
|
|
3434
|
+
SGhostButton,
|
|
3417
3435
|
{
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3436
|
+
icon: "close",
|
|
3437
|
+
size: "xs",
|
|
3438
|
+
intent: tooltipType === "default" ? "inverse" : "default",
|
|
3439
|
+
ariaLabel: "\uB2EB\uAE30",
|
|
3440
|
+
className: "shrink-0",
|
|
3441
|
+
onClick: () => {
|
|
3442
|
+
cancelHide();
|
|
3443
|
+
setOpen(false);
|
|
3444
|
+
}
|
|
3421
3445
|
}
|
|
3422
3446
|
)
|
|
3423
3447
|
] }),
|
|
@@ -3455,8 +3479,8 @@ function useFormField(field) {
|
|
|
3455
3479
|
}, [ctx, name]);
|
|
3456
3480
|
}
|
|
3457
3481
|
var FIELD_SIZE = {
|
|
3458
|
-
sm: { height: 28, radius: 4, fieldGap: 12, labelGap: 6, fontSize: 12, lineHeight: 20, icon:
|
|
3459
|
-
md: { height: 36, radius: 6, fieldGap: 16, labelGap: 8, fontSize: 14, lineHeight: 24, icon:
|
|
3482
|
+
sm: { height: 28, radius: 4, fieldGap: 12, labelGap: 6, fontSize: 12, lineHeight: 20, icon: 16 },
|
|
3483
|
+
md: { height: 36, radius: 6, fieldGap: 16, labelGap: 8, fontSize: 14, lineHeight: 24, icon: 16 }
|
|
3460
3484
|
};
|
|
3461
3485
|
var ALIGN = {
|
|
3462
3486
|
start: "flex-start",
|
|
@@ -3471,6 +3495,7 @@ var SField = forwardRef(function SField2({
|
|
|
3471
3495
|
labelTooltip = "",
|
|
3472
3496
|
labelTooltipProps,
|
|
3473
3497
|
labelWidth,
|
|
3498
|
+
labelHeight,
|
|
3474
3499
|
size = "sm",
|
|
3475
3500
|
addonLabel = "",
|
|
3476
3501
|
addonAlign = "start",
|
|
@@ -3485,6 +3510,7 @@ var SField = forwardRef(function SField2({
|
|
|
3485
3510
|
readOnly = false,
|
|
3486
3511
|
width,
|
|
3487
3512
|
multiline = false,
|
|
3513
|
+
borderless = false,
|
|
3488
3514
|
children,
|
|
3489
3515
|
className,
|
|
3490
3516
|
style,
|
|
@@ -3518,8 +3544,8 @@ var SField = forwardRef(function SField2({
|
|
|
3518
3544
|
const resolvedSuccess = status === "pass";
|
|
3519
3545
|
const showError = resolvedError && errorMessage !== "";
|
|
3520
3546
|
const interactive = !disabled && !readOnly;
|
|
3521
|
-
const borderColor = disabled ? "var(--color-grey-45)" : interactive && focused ? "var(--sys-color-field-border-focus)" : resolvedSuccess ? "var(--sys-color-field-border-success)" : resolvedError ? "var(--sys-color-field-border-danger)" : "var(--sys-color-field-border-default)";
|
|
3522
|
-
const bgColor = disabled ? "var(--color-grey-30)" : readOnly ? "var(--sys-color-field-bg-readOnly)" : "var(--sys-color-field-bg-default)";
|
|
3547
|
+
const borderColor = borderless ? "transparent" : disabled ? "var(--color-grey-45)" : interactive && focused ? "var(--sys-color-field-border-focus)" : resolvedSuccess ? "var(--sys-color-field-border-success)" : resolvedError ? "var(--sys-color-field-border-danger)" : "var(--sys-color-field-border-default)";
|
|
3548
|
+
const bgColor = borderless ? "transparent" : disabled ? "var(--color-grey-30)" : readOnly ? "var(--sys-color-field-bg-readOnly)" : "var(--sys-color-field-bg-default)";
|
|
3523
3549
|
const textColor = disabled ? "var(--color-grey-65)" : readOnly ? "var(--sys-color-field-text-readOnly)" : "var(--sys-color-field-text-default)";
|
|
3524
3550
|
return /* @__PURE__ */ jsx(
|
|
3525
3551
|
"div",
|
|
@@ -3536,7 +3562,7 @@ var SField = forwardRef(function SField2({
|
|
|
3536
3562
|
{
|
|
3537
3563
|
className: "flex shrink-0 items-center font-bold text-(--sys-color-field-text-default)",
|
|
3538
3564
|
style: {
|
|
3539
|
-
height: s.height,
|
|
3565
|
+
height: cssLen(labelHeight) ?? s.height,
|
|
3540
3566
|
marginRight: s.fieldGap,
|
|
3541
3567
|
width: cssLen(labelWidth),
|
|
3542
3568
|
fontSize: s.fontSize,
|
|
@@ -3562,14 +3588,14 @@ var SField = forwardRef(function SField2({
|
|
|
3562
3588
|
{
|
|
3563
3589
|
className: cn(
|
|
3564
3590
|
"relative box-border flex min-w-0 items-stretch overflow-hidden border border-solid border-(--field-bc)",
|
|
3565
|
-
interactive && "hover:border-(--sys-color-field-border-focus) hover:shadow-[0px_0px_4px_0px_#0071ff66] focus-within:border-(--sys-color-field-border-focus) focus-within:shadow-[0px_0px_4px_0px_#0071ff66]",
|
|
3591
|
+
interactive && !borderless && "hover:border-(--sys-color-field-border-focus) hover:shadow-[0px_0px_4px_0px_#0071ff66] focus-within:border-(--sys-color-field-border-focus) focus-within:shadow-[0px_0px_4px_0px_#0071ff66]",
|
|
3566
3592
|
disabled && "cursor-not-allowed"
|
|
3567
3593
|
),
|
|
3568
3594
|
style: {
|
|
3569
3595
|
// @ts-expect-error CSS 변수
|
|
3570
3596
|
"--field-bc": borderColor,
|
|
3571
3597
|
// focused/hovered prop이 명시된 경우 강조를 즉시 반영
|
|
3572
|
-
...interactive && focused ? { boxShadow: "0px 0px 4px 0px #0071ff66" } : {},
|
|
3598
|
+
...interactive && !borderless && focused ? { boxShadow: "0px 0px 4px 0px #0071ff66" } : {},
|
|
3573
3599
|
...multiline ? { minHeight: s.height } : { height: s.height },
|
|
3574
3600
|
"width": cssLen(width),
|
|
3575
3601
|
"borderRadius": s.radius,
|
|
@@ -3614,15 +3640,28 @@ function flattenOptions(options, depth = 1) {
|
|
|
3614
3640
|
const out = [];
|
|
3615
3641
|
for (const o of options) {
|
|
3616
3642
|
const hasChildren = Array.isArray(o.children) && o.children.length > 0;
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3643
|
+
if (hasChildren) {
|
|
3644
|
+
const childFlat = flattenOptions(o.children, depth + 1);
|
|
3645
|
+
const allChildrenDisabled = childFlat.every((c) => c.disabled);
|
|
3646
|
+
out.push({
|
|
3647
|
+
value: String(o.value),
|
|
3648
|
+
label: o.label,
|
|
3649
|
+
disabled: !!o.disabled || allChildrenDisabled,
|
|
3650
|
+
depth,
|
|
3651
|
+
isGroup: true,
|
|
3652
|
+
raw: o.value
|
|
3653
|
+
});
|
|
3654
|
+
out.push(...childFlat);
|
|
3655
|
+
} else {
|
|
3656
|
+
out.push({
|
|
3657
|
+
value: String(o.value),
|
|
3658
|
+
label: o.label,
|
|
3659
|
+
disabled: !!o.disabled,
|
|
3660
|
+
depth,
|
|
3661
|
+
isGroup: false,
|
|
3662
|
+
raw: o.value
|
|
3663
|
+
});
|
|
3664
|
+
}
|
|
3626
3665
|
}
|
|
3627
3666
|
return out;
|
|
3628
3667
|
}
|
|
@@ -3746,6 +3785,9 @@ var SSelect = forwardRef(function SSelect2({
|
|
|
3746
3785
|
);
|
|
3747
3786
|
const flat = useMemo(() => flattenOptions(options), [options]);
|
|
3748
3787
|
const selectable = useMemo(() => selectableOptions(flat), [flat]);
|
|
3788
|
+
const hasLeaf = useMemo(() => flat.some((o) => !o.isGroup), [flat]);
|
|
3789
|
+
const allOptionsDisabled = hasLeaf && selectable.length === 0;
|
|
3790
|
+
const effectiveDisabled = disabled || allOptionsDisabled;
|
|
3749
3791
|
const showSearch = useSearch && selectable.length >= SEARCH_THRESHOLD;
|
|
3750
3792
|
const labelByValue = useMemo(() => new Map(flat.map((o) => [o.value, o.label])), [flat]);
|
|
3751
3793
|
const rawByValue = useMemo(() => new Map(flat.map((o) => [o.value, o.raw])), [flat]);
|
|
@@ -3812,10 +3854,10 @@ var SSelect = forwardRef(function SSelect2({
|
|
|
3812
3854
|
Ariakit.Select,
|
|
3813
3855
|
{
|
|
3814
3856
|
ref: triggerRef,
|
|
3815
|
-
disabled,
|
|
3857
|
+
disabled: effectiveDisabled,
|
|
3816
3858
|
className: "flex h-full w-full cursor-pointer items-center justify-between gap-[8px] bg-transparent px-[12px] text-left text-[12px] leading-[20px] outline-none disabled:cursor-not-allowed",
|
|
3817
3859
|
style: {
|
|
3818
|
-
color:
|
|
3860
|
+
color: effectiveDisabled ? "var(--cmp-select-text-disabled)" : isPlaceholder ? "var(--cmp-select-icon-default)" : "var(--cmp-select-text-default)"
|
|
3819
3861
|
},
|
|
3820
3862
|
children: [
|
|
3821
3863
|
isHtmlLabel(triggerText) ? /* @__PURE__ */ jsx(
|
|
@@ -3830,7 +3872,7 @@ var SSelect = forwardRef(function SSelect2({
|
|
|
3830
3872
|
{
|
|
3831
3873
|
name: "chevronDown",
|
|
3832
3874
|
size: 12,
|
|
3833
|
-
color:
|
|
3875
|
+
color: effectiveDisabled ? "var(--cmp-select-icon-disabled)" : "var(--cmp-select-icon-default)",
|
|
3834
3876
|
className: cn("shrink-0 transition-transform duration-200", open && "rotate-180")
|
|
3835
3877
|
}
|
|
3836
3878
|
)
|
|
@@ -3844,7 +3886,7 @@ var SSelect = forwardRef(function SSelect2({
|
|
|
3844
3886
|
portalElement: portalContainer,
|
|
3845
3887
|
gutter: 4,
|
|
3846
3888
|
sameWidth: !dropdownWidth,
|
|
3847
|
-
className: "z-50 overflow-auto rounded-[var(--cmp-listBox-radius)] bg-[var(--cmp-listBox-bg)]
|
|
3889
|
+
className: "z-50 overflow-auto rounded-[var(--cmp-listBox-radius)] bg-[var(--cmp-listBox-bg)] shadow-[2px_2px_12px_2px_rgba(0,0,0,0.1)] data-[enter]:animate-floating-in-bottom data-[leave]:animate-floating-out-bottom",
|
|
3848
3890
|
style: {
|
|
3849
3891
|
maxHeight: dropdownHeight,
|
|
3850
3892
|
...dropdownWidth ? { width: dropdownWidth } : {},
|
|
@@ -3885,7 +3927,7 @@ var SSelect = forwardRef(function SSelect2({
|
|
|
3885
3927
|
),
|
|
3886
3928
|
hasItems ? /* @__PURE__ */ jsx(ItemList, { items: filtered, multi, selected, useSearch: showSearch }) : (
|
|
3887
3929
|
// 원본 sd-select-listbox__empty (표시할 항목이 없을 때)
|
|
3888
|
-
/* @__PURE__ */ jsx("div", { className: "px-[12px] py-[12px] text-
|
|
3930
|
+
/* @__PURE__ */ jsx("div", { className: "px-[12px] py-[12px] text-left text-[12px] leading-[20px] text-[color:var(--cmp-listItem-content-disabled)]", children: "\uD45C\uC2DC\uD560 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4." })
|
|
3889
3931
|
)
|
|
3890
3932
|
]
|
|
3891
3933
|
}
|
|
@@ -3908,7 +3950,7 @@ var SSelect = forwardRef(function SSelect2({
|
|
|
3908
3950
|
error: error || ruleError !== "",
|
|
3909
3951
|
status: rules && rules.length > 0 ? ruleError !== "" ? "error" : void 0 : void 0,
|
|
3910
3952
|
errorMessage: ruleError !== "" ? ruleError : errorMessage,
|
|
3911
|
-
disabled,
|
|
3953
|
+
disabled: effectiveDisabled,
|
|
3912
3954
|
width,
|
|
3913
3955
|
className,
|
|
3914
3956
|
style,
|
|
@@ -3943,7 +3985,11 @@ function ItemList({
|
|
|
3943
3985
|
{
|
|
3944
3986
|
className: cn(
|
|
3945
3987
|
"select-none py-[4px] pr-[12px] text-[12px] leading-[20px] text-[color:var(--cmp-listItem-content-default)]",
|
|
3946
|
-
isDepth1 ? "border-t border-solid border-[color:var(--cmp-listItem-depth1-border-color)] bg-[var(--cmp-listItem-depth1-bg-default)] font-bold" : "bg-[var(--cmp-listItem-depth2-middle-bg)] font-medium"
|
|
3988
|
+
isDepth1 ? "border-t border-solid border-[color:var(--cmp-listItem-depth1-border-color)] bg-[var(--cmp-listItem-depth1-bg-default)] font-bold" : "bg-[var(--cmp-listItem-depth2-middle-bg)] font-medium",
|
|
3989
|
+
// 하위가 전부 비활성이면(select.config 에서 bubble-up) 어미 그룹도 비활성 처리:
|
|
3990
|
+
// 텍스트는 회색(#888), depth1 그룹은 파란 배경 대신 회색(#EEE)으로 (depth2 는 #F6F6F6 유지)
|
|
3991
|
+
o.disabled && "cursor-not-allowed text-[color:var(--cmp-listItem-content-disabled)]",
|
|
3992
|
+
o.disabled && isDepth1 && "bg-[var(--cmp-listItem-depth1-bg-disabled)]"
|
|
3947
3993
|
),
|
|
3948
3994
|
style: { paddingLeft: padLeft },
|
|
3949
3995
|
children: o.label
|
|
@@ -3957,10 +4003,14 @@ function ItemList({
|
|
|
3957
4003
|
{
|
|
3958
4004
|
value: o.value,
|
|
3959
4005
|
disabled: o.disabled,
|
|
4006
|
+
accessibleWhenDisabled: true,
|
|
3960
4007
|
className: cn(
|
|
3961
4008
|
itemBase,
|
|
3962
4009
|
isSelected && !multi && "font-bold text-[color:var(--cmp-listItem-content-selected)]",
|
|
3963
|
-
|
|
4010
|
+
// Ariakit은 disabled 항목도 hover 시 active(data-active-item) 처리하므로,
|
|
4011
|
+
// 비활성 항목에는 hover 하이라이트를 적용하지 않아 회색 비활성 스타일을 유지한다.
|
|
4012
|
+
// (원본 Stencil의 `--focused...:not(--disabled)` 규칙과 동일한 의도)
|
|
4013
|
+
!o.disabled && activeClass
|
|
3964
4014
|
),
|
|
3965
4015
|
style: { paddingTop: 4, paddingBottom: 4, paddingRight: 12, paddingLeft: padLeft },
|
|
3966
4016
|
render: useSearch ? /* @__PURE__ */ jsx(Ariakit.ComboboxItem, {}) : void 0,
|
|
@@ -3970,15 +4020,21 @@ function ItemList({
|
|
|
3970
4020
|
"span",
|
|
3971
4021
|
{
|
|
3972
4022
|
className: cn(
|
|
3973
|
-
"flex h-[16px] w-[16px] flex-shrink-0 items-center justify-center rounded-[2px] border border-solid
|
|
3974
|
-
|
|
4023
|
+
"flex h-[16px] w-[16px] flex-shrink-0 items-center justify-center rounded-[2px] border border-solid",
|
|
4024
|
+
o.disabled ? (
|
|
4025
|
+
// 비활성: 회색 채움(#E1E1E1) + 회색 테두리(#CCCCCC)
|
|
4026
|
+
"cursor-not-allowed border-[color:var(--cmp-checkbox-border-disabled)] bg-[var(--cmp-checkbox-bg-disabled)]"
|
|
4027
|
+
) : cn(
|
|
4028
|
+
"group-data-[active-item]:border-[color:var(--cmp-checkbox-checked-border-inverse)]",
|
|
4029
|
+
isSelected ? "border-[color:var(--cmp-checkbox-checked-bg-default)] bg-[var(--cmp-checkbox-checked-bg-default)] group-data-[active-item]:bg-transparent" : "border-[color:var(--cmp-checkbox-unchecked-border-default)] bg-transparent"
|
|
4030
|
+
)
|
|
3975
4031
|
),
|
|
3976
4032
|
children: isSelected && /* @__PURE__ */ jsx(
|
|
3977
4033
|
SIcon,
|
|
3978
4034
|
{
|
|
3979
4035
|
name: "checkboxCheck",
|
|
3980
4036
|
size: 12,
|
|
3981
|
-
color: "var(--cmp-checkbox-checked-icon-default)"
|
|
4037
|
+
color: o.disabled ? "var(--cmp-checkbox-checked-icon-disabled)" : "var(--cmp-checkbox-checked-icon-default)"
|
|
3982
4038
|
}
|
|
3983
4039
|
)
|
|
3984
4040
|
}
|
|
@@ -4269,7 +4325,8 @@ var STable = forwardRef(function STable2({
|
|
|
4269
4325
|
else onSelectedChange?.([...selected, row]);
|
|
4270
4326
|
};
|
|
4271
4327
|
const radiusClass = radius === "full" ? "rounded-none" : radius === "useTop" ? "rounded-b-[var(--cmp-table-radius)] rounded-t-none" : "rounded-[var(--cmp-table-radius)]";
|
|
4272
|
-
const cellPadY = dense ? "var(--cmp-table-body-dense
|
|
4328
|
+
const cellPadY = dense ? "var(--cmp-table-body-paddingY-dense)" : "var(--cmp-table-body-paddingY-default)";
|
|
4329
|
+
const cellPadX = dense ? "var(--cmp-table-body-paddingX-default)" : "var(--cmp-table-body-paddingX-wide)";
|
|
4273
4330
|
const rowH = dense ? "var(--cmp-table-body-dense-height)" : "var(--cmp-table-body-default-height)";
|
|
4274
4331
|
const totalColSpan = visibleCols.length + (selectable ? 1 : 0);
|
|
4275
4332
|
const stickyInfo = (i) => {
|
|
@@ -4444,13 +4501,15 @@ var STable = forwardRef(function STable2({
|
|
|
4444
4501
|
className: cn(
|
|
4445
4502
|
// 원본 .td: 컬럼 폭에 맞춰 내용 말줄임(overflow hidden + ellipsis) + 행 구분선(border-b)
|
|
4446
4503
|
// 셀 배경은 흰색으로 채워 뒤 배경이 비치지 않게 하고, hover 시 행 배경(grey_05)을 따른다.
|
|
4447
|
-
"overflow-hidden text-ellipsis whitespace-nowrap border-b border-solid border-[color:var(--cmp-table-border-color)]
|
|
4504
|
+
"overflow-hidden text-ellipsis whitespace-nowrap border-b border-solid border-[color:var(--cmp-table-border-color)] text-[12px] leading-[20px] text-[color:var(--sys-color-fg-primary)]",
|
|
4448
4505
|
rowBg,
|
|
4449
4506
|
"group-hover:bg-[var(--color-grey-05)]",
|
|
4450
4507
|
stickyShadowClass(i),
|
|
4451
4508
|
col.tdClass
|
|
4452
4509
|
),
|
|
4453
4510
|
style: {
|
|
4511
|
+
paddingLeft: cellPadX,
|
|
4512
|
+
paddingRight: cellPadX,
|
|
4454
4513
|
paddingTop: cellPadY,
|
|
4455
4514
|
paddingBottom: cellPadY,
|
|
4456
4515
|
textAlign: col.align ?? "left",
|