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
|
@@ -2959,20 +2959,46 @@ var COLOR_MAP = {
|
|
|
2959
2959
|
};
|
|
2960
2960
|
var clamp = (v) => Number.isFinite(v) ? Math.max(0, Math.min(100, v)) : 0;
|
|
2961
2961
|
var SCircleProgress = react.forwardRef(
|
|
2962
|
-
function SCircleProgress2({
|
|
2962
|
+
function SCircleProgress2({
|
|
2963
|
+
value = 0,
|
|
2964
|
+
type = "primary",
|
|
2965
|
+
indeterminate = false,
|
|
2966
|
+
label,
|
|
2967
|
+
innerValue = false,
|
|
2968
|
+
className,
|
|
2969
|
+
style
|
|
2970
|
+
}, ref) {
|
|
2963
2971
|
const v = clamp(value);
|
|
2964
2972
|
const colors = COLOR_MAP[type];
|
|
2965
2973
|
const c = VIEWBOX / 2;
|
|
2966
2974
|
const percentColor = v === 0 ? "var(--sys-color-fg-tertiary, #888888)" : colors.arc;
|
|
2967
2975
|
const filled = v / 100 * CIRCUMFERENCE;
|
|
2976
|
+
const showPercent = !indeterminate;
|
|
2977
|
+
const percentNode = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2978
|
+
"span",
|
|
2979
|
+
{
|
|
2980
|
+
className: cn(
|
|
2981
|
+
"text-center text-[16px] font-bold leading-[26px]",
|
|
2982
|
+
innerValue && "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"
|
|
2983
|
+
),
|
|
2984
|
+
style: { color: percentColor },
|
|
2985
|
+
children: [
|
|
2986
|
+
Math.round(v),
|
|
2987
|
+
"%"
|
|
2988
|
+
]
|
|
2989
|
+
}
|
|
2990
|
+
);
|
|
2968
2991
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2969
2992
|
"div",
|
|
2970
2993
|
{
|
|
2971
2994
|
ref,
|
|
2972
|
-
className: cn(
|
|
2995
|
+
className: cn(
|
|
2996
|
+
"inline-flex flex-col items-center gap-[var(--cmp-progress-circular-gap)]",
|
|
2997
|
+
className
|
|
2998
|
+
),
|
|
2973
2999
|
style,
|
|
2974
3000
|
children: [
|
|
2975
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
3001
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(innerValue && "relative"), children: [
|
|
2976
3002
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2977
3003
|
"svg",
|
|
2978
3004
|
{
|
|
@@ -3016,18 +3042,9 @@ var SCircleProgress = react.forwardRef(
|
|
|
3016
3042
|
]
|
|
3017
3043
|
}
|
|
3018
3044
|
),
|
|
3019
|
-
|
|
3020
|
-
"span",
|
|
3021
|
-
{
|
|
3022
|
-
className: "absolute inset-0 flex items-center justify-center text-[16px] font-bold leading-[26px]",
|
|
3023
|
-
style: { color: percentColor },
|
|
3024
|
-
children: [
|
|
3025
|
-
Math.round(v),
|
|
3026
|
-
"%"
|
|
3027
|
-
]
|
|
3028
|
-
}
|
|
3029
|
-
)
|
|
3045
|
+
showPercent && innerValue && percentNode
|
|
3030
3046
|
] }),
|
|
3047
|
+
showPercent && !innerValue && percentNode,
|
|
3031
3048
|
label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-center text-[12px] font-normal leading-[20px] text-[color:var(--cmp-progress-color-label)]", children: label })
|
|
3032
3049
|
]
|
|
3033
3050
|
}
|
|
@@ -3090,7 +3107,7 @@ function SPagination({
|
|
|
3090
3107
|
style,
|
|
3091
3108
|
children: [
|
|
3092
3109
|
/* @__PURE__ */ jsxRuntime.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 }),
|
|
3093
|
-
simple ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-[var(--cmp-pagination-height)] items-center gap-[var(--cmp-pagination-
|
|
3110
|
+
simple ? /* @__PURE__ */ jsxRuntime.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: [
|
|
3094
3111
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-bold text-[color:var(--cmp-pagination-item-content-selected)]", children: currentPage }),
|
|
3095
3112
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "/" }),
|
|
3096
3113
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: lastPage })
|
|
@@ -3334,7 +3351,8 @@ var HIDE_DELAY_MS = 100;
|
|
|
3334
3351
|
function useBody(content, message = []) {
|
|
3335
3352
|
if (content != null) return content;
|
|
3336
3353
|
if (message.length === 0) return null;
|
|
3337
|
-
|
|
3354
|
+
const singleLine = message.length === 1;
|
|
3355
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: message.map((line, i) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: singleLine ? "leading-[24px]" : void 0, children: line }, i)) });
|
|
3338
3356
|
}
|
|
3339
3357
|
var STooltip = react.forwardRef(function STooltip2({
|
|
3340
3358
|
content,
|
|
@@ -3437,11 +3455,17 @@ var STooltip = react.forwardRef(function STooltip2({
|
|
|
3437
3455
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-[12px]", children: [
|
|
3438
3456
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0 flex-1", children: body }),
|
|
3439
3457
|
useClose && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3440
|
-
|
|
3458
|
+
SGhostButton,
|
|
3441
3459
|
{
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3460
|
+
icon: "close",
|
|
3461
|
+
size: "xs",
|
|
3462
|
+
intent: tooltipType === "default" ? "inverse" : "default",
|
|
3463
|
+
ariaLabel: "\uB2EB\uAE30",
|
|
3464
|
+
className: "shrink-0",
|
|
3465
|
+
onClick: () => {
|
|
3466
|
+
cancelHide();
|
|
3467
|
+
setOpen(false);
|
|
3468
|
+
}
|
|
3445
3469
|
}
|
|
3446
3470
|
)
|
|
3447
3471
|
] }),
|
|
@@ -3479,8 +3503,8 @@ function useFormField(field) {
|
|
|
3479
3503
|
}, [ctx, name]);
|
|
3480
3504
|
}
|
|
3481
3505
|
var FIELD_SIZE = {
|
|
3482
|
-
sm: { height: 28, radius: 4, fieldGap: 12, labelGap: 6, fontSize: 12, lineHeight: 20, icon:
|
|
3483
|
-
md: { height: 36, radius: 6, fieldGap: 16, labelGap: 8, fontSize: 14, lineHeight: 24, icon:
|
|
3506
|
+
sm: { height: 28, radius: 4, fieldGap: 12, labelGap: 6, fontSize: 12, lineHeight: 20, icon: 16 },
|
|
3507
|
+
md: { height: 36, radius: 6, fieldGap: 16, labelGap: 8, fontSize: 14, lineHeight: 24, icon: 16 }
|
|
3484
3508
|
};
|
|
3485
3509
|
var ALIGN = {
|
|
3486
3510
|
start: "flex-start",
|
|
@@ -3495,6 +3519,7 @@ var SField = react.forwardRef(function SField2({
|
|
|
3495
3519
|
labelTooltip = "",
|
|
3496
3520
|
labelTooltipProps,
|
|
3497
3521
|
labelWidth,
|
|
3522
|
+
labelHeight,
|
|
3498
3523
|
size = "sm",
|
|
3499
3524
|
addonLabel = "",
|
|
3500
3525
|
addonAlign = "start",
|
|
@@ -3509,6 +3534,7 @@ var SField = react.forwardRef(function SField2({
|
|
|
3509
3534
|
readOnly = false,
|
|
3510
3535
|
width,
|
|
3511
3536
|
multiline = false,
|
|
3537
|
+
borderless = false,
|
|
3512
3538
|
children,
|
|
3513
3539
|
className,
|
|
3514
3540
|
style,
|
|
@@ -3542,8 +3568,8 @@ var SField = react.forwardRef(function SField2({
|
|
|
3542
3568
|
const resolvedSuccess = status === "pass";
|
|
3543
3569
|
const showError = resolvedError && errorMessage !== "";
|
|
3544
3570
|
const interactive = !disabled && !readOnly;
|
|
3545
|
-
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)";
|
|
3546
|
-
const bgColor = disabled ? "var(--color-grey-30)" : readOnly ? "var(--sys-color-field-bg-readOnly)" : "var(--sys-color-field-bg-default)";
|
|
3571
|
+
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)";
|
|
3572
|
+
const bgColor = borderless ? "transparent" : disabled ? "var(--color-grey-30)" : readOnly ? "var(--sys-color-field-bg-readOnly)" : "var(--sys-color-field-bg-default)";
|
|
3547
3573
|
const textColor = disabled ? "var(--color-grey-65)" : readOnly ? "var(--sys-color-field-text-readOnly)" : "var(--sys-color-field-text-default)";
|
|
3548
3574
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3549
3575
|
"div",
|
|
@@ -3560,7 +3586,7 @@ var SField = react.forwardRef(function SField2({
|
|
|
3560
3586
|
{
|
|
3561
3587
|
className: "flex shrink-0 items-center font-bold text-(--sys-color-field-text-default)",
|
|
3562
3588
|
style: {
|
|
3563
|
-
height: s.height,
|
|
3589
|
+
height: cssLen(labelHeight) ?? s.height,
|
|
3564
3590
|
marginRight: s.fieldGap,
|
|
3565
3591
|
width: cssLen(labelWidth),
|
|
3566
3592
|
fontSize: s.fontSize,
|
|
@@ -3586,14 +3612,14 @@ var SField = react.forwardRef(function SField2({
|
|
|
3586
3612
|
{
|
|
3587
3613
|
className: cn(
|
|
3588
3614
|
"relative box-border flex min-w-0 items-stretch overflow-hidden border border-solid border-(--field-bc)",
|
|
3589
|
-
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]",
|
|
3615
|
+
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]",
|
|
3590
3616
|
disabled && "cursor-not-allowed"
|
|
3591
3617
|
),
|
|
3592
3618
|
style: {
|
|
3593
3619
|
// @ts-expect-error CSS 변수
|
|
3594
3620
|
"--field-bc": borderColor,
|
|
3595
3621
|
// focused/hovered prop이 명시된 경우 강조를 즉시 반영
|
|
3596
|
-
...interactive && focused ? { boxShadow: "0px 0px 4px 0px #0071ff66" } : {},
|
|
3622
|
+
...interactive && !borderless && focused ? { boxShadow: "0px 0px 4px 0px #0071ff66" } : {},
|
|
3597
3623
|
...multiline ? { minHeight: s.height } : { height: s.height },
|
|
3598
3624
|
"width": cssLen(width),
|
|
3599
3625
|
"borderRadius": s.radius,
|
|
@@ -3638,15 +3664,28 @@ function flattenOptions(options, depth = 1) {
|
|
|
3638
3664
|
const out = [];
|
|
3639
3665
|
for (const o of options) {
|
|
3640
3666
|
const hasChildren = Array.isArray(o.children) && o.children.length > 0;
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3667
|
+
if (hasChildren) {
|
|
3668
|
+
const childFlat = flattenOptions(o.children, depth + 1);
|
|
3669
|
+
const allChildrenDisabled = childFlat.every((c) => c.disabled);
|
|
3670
|
+
out.push({
|
|
3671
|
+
value: String(o.value),
|
|
3672
|
+
label: o.label,
|
|
3673
|
+
disabled: !!o.disabled || allChildrenDisabled,
|
|
3674
|
+
depth,
|
|
3675
|
+
isGroup: true,
|
|
3676
|
+
raw: o.value
|
|
3677
|
+
});
|
|
3678
|
+
out.push(...childFlat);
|
|
3679
|
+
} else {
|
|
3680
|
+
out.push({
|
|
3681
|
+
value: String(o.value),
|
|
3682
|
+
label: o.label,
|
|
3683
|
+
disabled: !!o.disabled,
|
|
3684
|
+
depth,
|
|
3685
|
+
isGroup: false,
|
|
3686
|
+
raw: o.value
|
|
3687
|
+
});
|
|
3688
|
+
}
|
|
3650
3689
|
}
|
|
3651
3690
|
return out;
|
|
3652
3691
|
}
|
|
@@ -3770,6 +3809,9 @@ var SSelect = react.forwardRef(function SSelect2({
|
|
|
3770
3809
|
);
|
|
3771
3810
|
const flat = react.useMemo(() => flattenOptions(options), [options]);
|
|
3772
3811
|
const selectable = react.useMemo(() => selectableOptions(flat), [flat]);
|
|
3812
|
+
const hasLeaf = react.useMemo(() => flat.some((o) => !o.isGroup), [flat]);
|
|
3813
|
+
const allOptionsDisabled = hasLeaf && selectable.length === 0;
|
|
3814
|
+
const effectiveDisabled = disabled || allOptionsDisabled;
|
|
3773
3815
|
const showSearch = useSearch && selectable.length >= SEARCH_THRESHOLD;
|
|
3774
3816
|
const labelByValue = react.useMemo(() => new Map(flat.map((o) => [o.value, o.label])), [flat]);
|
|
3775
3817
|
const rawByValue = react.useMemo(() => new Map(flat.map((o) => [o.value, o.raw])), [flat]);
|
|
@@ -3836,10 +3878,10 @@ var SSelect = react.forwardRef(function SSelect2({
|
|
|
3836
3878
|
Ariakit__namespace.Select,
|
|
3837
3879
|
{
|
|
3838
3880
|
ref: triggerRef,
|
|
3839
|
-
disabled,
|
|
3881
|
+
disabled: effectiveDisabled,
|
|
3840
3882
|
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",
|
|
3841
3883
|
style: {
|
|
3842
|
-
color:
|
|
3884
|
+
color: effectiveDisabled ? "var(--cmp-select-text-disabled)" : isPlaceholder ? "var(--cmp-select-icon-default)" : "var(--cmp-select-text-default)"
|
|
3843
3885
|
},
|
|
3844
3886
|
children: [
|
|
3845
3887
|
isHtmlLabel(triggerText) ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3854,7 +3896,7 @@ var SSelect = react.forwardRef(function SSelect2({
|
|
|
3854
3896
|
{
|
|
3855
3897
|
name: "chevronDown",
|
|
3856
3898
|
size: 12,
|
|
3857
|
-
color:
|
|
3899
|
+
color: effectiveDisabled ? "var(--cmp-select-icon-disabled)" : "var(--cmp-select-icon-default)",
|
|
3858
3900
|
className: cn("shrink-0 transition-transform duration-200", open && "rotate-180")
|
|
3859
3901
|
}
|
|
3860
3902
|
)
|
|
@@ -3868,7 +3910,7 @@ var SSelect = react.forwardRef(function SSelect2({
|
|
|
3868
3910
|
portalElement: portalContainer,
|
|
3869
3911
|
gutter: 4,
|
|
3870
3912
|
sameWidth: !dropdownWidth,
|
|
3871
|
-
className: "z-50 overflow-auto rounded-[var(--cmp-listBox-radius)] bg-[var(--cmp-listBox-bg)]
|
|
3913
|
+
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",
|
|
3872
3914
|
style: {
|
|
3873
3915
|
maxHeight: dropdownHeight,
|
|
3874
3916
|
...dropdownWidth ? { width: dropdownWidth } : {},
|
|
@@ -3909,7 +3951,7 @@ var SSelect = react.forwardRef(function SSelect2({
|
|
|
3909
3951
|
),
|
|
3910
3952
|
hasItems ? /* @__PURE__ */ jsxRuntime.jsx(ItemList, { items: filtered, multi, selected, useSearch: showSearch }) : (
|
|
3911
3953
|
// 원본 sd-select-listbox__empty (표시할 항목이 없을 때)
|
|
3912
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-[12px] py-[12px] text-
|
|
3954
|
+
/* @__PURE__ */ jsxRuntime.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." })
|
|
3913
3955
|
)
|
|
3914
3956
|
]
|
|
3915
3957
|
}
|
|
@@ -3932,7 +3974,7 @@ var SSelect = react.forwardRef(function SSelect2({
|
|
|
3932
3974
|
error: error || ruleError !== "",
|
|
3933
3975
|
status: rules && rules.length > 0 ? ruleError !== "" ? "error" : void 0 : void 0,
|
|
3934
3976
|
errorMessage: ruleError !== "" ? ruleError : errorMessage,
|
|
3935
|
-
disabled,
|
|
3977
|
+
disabled: effectiveDisabled,
|
|
3936
3978
|
width,
|
|
3937
3979
|
className,
|
|
3938
3980
|
style,
|
|
@@ -3967,7 +4009,11 @@ function ItemList({
|
|
|
3967
4009
|
{
|
|
3968
4010
|
className: cn(
|
|
3969
4011
|
"select-none py-[4px] pr-[12px] text-[12px] leading-[20px] text-[color:var(--cmp-listItem-content-default)]",
|
|
3970
|
-
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"
|
|
4012
|
+
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",
|
|
4013
|
+
// 하위가 전부 비활성이면(select.config 에서 bubble-up) 어미 그룹도 비활성 처리:
|
|
4014
|
+
// 텍스트는 회색(#888), depth1 그룹은 파란 배경 대신 회색(#EEE)으로 (depth2 는 #F6F6F6 유지)
|
|
4015
|
+
o.disabled && "cursor-not-allowed text-[color:var(--cmp-listItem-content-disabled)]",
|
|
4016
|
+
o.disabled && isDepth1 && "bg-[var(--cmp-listItem-depth1-bg-disabled)]"
|
|
3971
4017
|
),
|
|
3972
4018
|
style: { paddingLeft: padLeft },
|
|
3973
4019
|
children: o.label
|
|
@@ -3981,10 +4027,14 @@ function ItemList({
|
|
|
3981
4027
|
{
|
|
3982
4028
|
value: o.value,
|
|
3983
4029
|
disabled: o.disabled,
|
|
4030
|
+
accessibleWhenDisabled: true,
|
|
3984
4031
|
className: cn(
|
|
3985
4032
|
itemBase,
|
|
3986
4033
|
isSelected && !multi && "font-bold text-[color:var(--cmp-listItem-content-selected)]",
|
|
3987
|
-
|
|
4034
|
+
// Ariakit은 disabled 항목도 hover 시 active(data-active-item) 처리하므로,
|
|
4035
|
+
// 비활성 항목에는 hover 하이라이트를 적용하지 않아 회색 비활성 스타일을 유지한다.
|
|
4036
|
+
// (원본 Stencil의 `--focused...:not(--disabled)` 규칙과 동일한 의도)
|
|
4037
|
+
!o.disabled && activeClass
|
|
3988
4038
|
),
|
|
3989
4039
|
style: { paddingTop: 4, paddingBottom: 4, paddingRight: 12, paddingLeft: padLeft },
|
|
3990
4040
|
render: useSearch ? /* @__PURE__ */ jsxRuntime.jsx(Ariakit__namespace.ComboboxItem, {}) : void 0,
|
|
@@ -3994,15 +4044,21 @@ function ItemList({
|
|
|
3994
4044
|
"span",
|
|
3995
4045
|
{
|
|
3996
4046
|
className: cn(
|
|
3997
|
-
"flex h-[16px] w-[16px] flex-shrink-0 items-center justify-center rounded-[2px] border border-solid
|
|
3998
|
-
|
|
4047
|
+
"flex h-[16px] w-[16px] flex-shrink-0 items-center justify-center rounded-[2px] border border-solid",
|
|
4048
|
+
o.disabled ? (
|
|
4049
|
+
// 비활성: 회색 채움(#E1E1E1) + 회색 테두리(#CCCCCC)
|
|
4050
|
+
"cursor-not-allowed border-[color:var(--cmp-checkbox-border-disabled)] bg-[var(--cmp-checkbox-bg-disabled)]"
|
|
4051
|
+
) : cn(
|
|
4052
|
+
"group-data-[active-item]:border-[color:var(--cmp-checkbox-checked-border-inverse)]",
|
|
4053
|
+
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"
|
|
4054
|
+
)
|
|
3999
4055
|
),
|
|
4000
4056
|
children: isSelected && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4001
4057
|
SIcon,
|
|
4002
4058
|
{
|
|
4003
4059
|
name: "checkboxCheck",
|
|
4004
4060
|
size: 12,
|
|
4005
|
-
color: "var(--cmp-checkbox-checked-icon-default)"
|
|
4061
|
+
color: o.disabled ? "var(--cmp-checkbox-checked-icon-disabled)" : "var(--cmp-checkbox-checked-icon-default)"
|
|
4006
4062
|
}
|
|
4007
4063
|
)
|
|
4008
4064
|
}
|
|
@@ -4293,7 +4349,8 @@ var STable = react.forwardRef(function STable2({
|
|
|
4293
4349
|
else onSelectedChange?.([...selected, row]);
|
|
4294
4350
|
};
|
|
4295
4351
|
const radiusClass = radius === "full" ? "rounded-none" : radius === "useTop" ? "rounded-b-[var(--cmp-table-radius)] rounded-t-none" : "rounded-[var(--cmp-table-radius)]";
|
|
4296
|
-
const cellPadY = dense ? "var(--cmp-table-body-dense
|
|
4352
|
+
const cellPadY = dense ? "var(--cmp-table-body-paddingY-dense)" : "var(--cmp-table-body-paddingY-default)";
|
|
4353
|
+
const cellPadX = dense ? "var(--cmp-table-body-paddingX-default)" : "var(--cmp-table-body-paddingX-wide)";
|
|
4297
4354
|
const rowH = dense ? "var(--cmp-table-body-dense-height)" : "var(--cmp-table-body-default-height)";
|
|
4298
4355
|
const totalColSpan = visibleCols.length + (selectable ? 1 : 0);
|
|
4299
4356
|
const stickyInfo = (i) => {
|
|
@@ -4468,13 +4525,15 @@ var STable = react.forwardRef(function STable2({
|
|
|
4468
4525
|
className: cn(
|
|
4469
4526
|
// 원본 .td: 컬럼 폭에 맞춰 내용 말줄임(overflow hidden + ellipsis) + 행 구분선(border-b)
|
|
4470
4527
|
// 셀 배경은 흰색으로 채워 뒤 배경이 비치지 않게 하고, hover 시 행 배경(grey_05)을 따른다.
|
|
4471
|
-
"overflow-hidden text-ellipsis whitespace-nowrap border-b border-solid border-[color:var(--cmp-table-border-color)]
|
|
4528
|
+
"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)]",
|
|
4472
4529
|
rowBg,
|
|
4473
4530
|
"group-hover:bg-[var(--color-grey-05)]",
|
|
4474
4531
|
stickyShadowClass(i),
|
|
4475
4532
|
col.tdClass
|
|
4476
4533
|
),
|
|
4477
4534
|
style: {
|
|
4535
|
+
paddingLeft: cellPadX,
|
|
4536
|
+
paddingRight: cellPadX,
|
|
4478
4537
|
paddingTop: cellPadY,
|
|
4479
4538
|
paddingBottom: cellPadY,
|
|
4480
4539
|
textAlign: col.align ?? "left",
|