sellmate-design-system-react 2.1.0 → 2.1.2
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 +8 -2
- package/dist/components/SActionModal/SActionModal.cjs.map +1 -1
- package/dist/components/SActionModal/SActionModal.d.ts +11 -2
- package/dist/components/SActionModal/SActionModal.js +8 -2
- package/dist/components/SActionModal/SActionModal.js.map +1 -1
- package/dist/components/SChipInput/SChipInput.cjs +9 -2
- package/dist/components/SChipInput/SChipInput.cjs.map +1 -1
- package/dist/components/SChipInput/SChipInput.js +9 -2
- package/dist/components/SChipInput/SChipInput.js.map +1 -1
- package/dist/components/SConfirmModal/SConfirmModal.cjs +101 -8
- package/dist/components/SConfirmModal/SConfirmModal.cjs.map +1 -1
- package/dist/components/SConfirmModal/SConfirmModal.d.ts +4 -3
- package/dist/components/SConfirmModal/SConfirmModal.js +101 -8
- package/dist/components/SConfirmModal/SConfirmModal.js.map +1 -1
- package/dist/components/SExpansionItem/SExpansionItem.cjs +11 -11
- package/dist/components/SExpansionItem/SExpansionItem.cjs.map +1 -1
- package/dist/components/SExpansionItem/SExpansionItem.js +11 -11
- package/dist/components/SExpansionItem/SExpansionItem.js.map +1 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.cjs +20 -19
- package/dist/components/SKeyValueTable/SKeyValueTable.cjs.map +1 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.d.ts +57 -4
- package/dist/components/SKeyValueTable/SKeyValueTable.js +20 -19
- package/dist/components/SKeyValueTable/SKeyValueTable.js.map +1 -1
- package/dist/components/SLoadingModal/SLoadingModal.cjs +8 -2
- package/dist/components/SLoadingModal/SLoadingModal.cjs.map +1 -1
- package/dist/components/SLoadingModal/SLoadingModal.js +8 -2
- package/dist/components/SLoadingModal/SLoadingModal.js.map +1 -1
- package/dist/components/SModal/SModal.cjs +101 -8
- package/dist/components/SModal/SModal.cjs.map +1 -1
- package/dist/components/SModal/SModal.js +101 -8
- package/dist/components/SModal/SModal.js.map +1 -1
- package/dist/components/SModalContainer/SModalContainer.cjs +8 -2
- package/dist/components/SModalContainer/SModalContainer.cjs.map +1 -1
- package/dist/components/SModalContainer/SModalContainer.js +8 -2
- package/dist/components/SModalContainer/SModalContainer.js.map +1 -1
- package/dist/components/SSelect/SSelect.cjs +20 -19
- package/dist/components/SSelect/SSelect.cjs.map +1 -1
- package/dist/components/SSelect/SSelect.js +20 -19
- package/dist/components/SSelect/SSelect.js.map +1 -1
- package/dist/components/SStepper/SStepper.cjs +1 -1
- package/dist/components/SStepper/SStepper.cjs.map +1 -1
- package/dist/components/SStepper/SStepper.js +1 -1
- package/dist/components/SStepper/SStepper.js.map +1 -1
- package/dist/components/STable/STable.cjs +20 -19
- package/dist/components/STable/STable.cjs.map +1 -1
- package/dist/components/STable/STable.js +20 -19
- package/dist/components/STable/STable.js.map +1 -1
- package/dist/components/STimePicker/STimePicker.cjs +1 -1
- package/dist/components/STimePicker/STimePicker.cjs.map +1 -1
- package/dist/components/STimePicker/STimePicker.js +1 -1
- package/dist/components/STimePicker/STimePicker.js.map +1 -1
- package/dist/components/STimeRangePicker/STimeRangePicker.cjs +1 -1
- package/dist/components/STimeRangePicker/STimeRangePicker.cjs.map +1 -1
- package/dist/components/STimeRangePicker/STimeRangePicker.js +1 -1
- package/dist/components/STimeRangePicker/STimeRangePicker.js.map +1 -1
- package/dist/index.cjs +75 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +75 -43
- package/dist/index.js.map +1 -1
- package/dist/styles.css +303 -195
- package/dist/theme.css +229 -121
- package/package.json +1 -1
|
@@ -3679,7 +3679,7 @@ var SSelect = forwardRef(function SSelect2({
|
|
|
3679
3679
|
);
|
|
3680
3680
|
onValueChange(multi ? mapped : mapped[0] ?? (emitValue ? "" : null));
|
|
3681
3681
|
};
|
|
3682
|
-
const commitOpen = (next) => {
|
|
3682
|
+
const commitOpen = (next, valueForRules) => {
|
|
3683
3683
|
setOpen(next);
|
|
3684
3684
|
onOpenChange?.(next);
|
|
3685
3685
|
if (next) {
|
|
@@ -3688,7 +3688,8 @@ var SSelect = forwardRef(function SSelect2({
|
|
|
3688
3688
|
setPendingOpen(false);
|
|
3689
3689
|
setSearch("");
|
|
3690
3690
|
if (rules && rules.length > 0) {
|
|
3691
|
-
|
|
3691
|
+
const current = valueForRules ?? selectedRef.current;
|
|
3692
|
+
setRuleError(runRules(multi ? current : current[0] ?? "", rules));
|
|
3692
3693
|
}
|
|
3693
3694
|
}
|
|
3694
3695
|
};
|
|
@@ -3772,7 +3773,7 @@ var SSelect = forwardRef(function SSelect2({
|
|
|
3772
3773
|
return;
|
|
3773
3774
|
}
|
|
3774
3775
|
emit([nextValue]);
|
|
3775
|
-
commitOpen(false);
|
|
3776
|
+
commitOpen(false, [nextValue]);
|
|
3776
3777
|
};
|
|
3777
3778
|
const handleSelectAll = () => {
|
|
3778
3779
|
emit(allSelected ? [] : allValues);
|
|
@@ -4012,7 +4013,7 @@ var SSelect = forwardRef(function SSelect2({
|
|
|
4012
4013
|
if (index >= 0) setFocusedIndex(index);
|
|
4013
4014
|
}
|
|
4014
4015
|
}
|
|
4015
|
-
) : /* @__PURE__ */ jsx("div", { className: "px-[12px] py-[12px] text-left text-[12px] leading-[20px] text-[color:var(--cmp-
|
|
4016
|
+
) : /* @__PURE__ */ jsx("div", { className: "px-[12px] py-[12px] text-left text-[12px] leading-[20px] text-[color:var(--cmp-listBoxItem-content-disabled)]", children: "\uD45C\uC2DC\uD560 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4." })
|
|
4016
4017
|
]
|
|
4017
4018
|
}
|
|
4018
4019
|
)
|
|
@@ -4040,10 +4041,10 @@ function ItemList({
|
|
|
4040
4041
|
const selectedSet = useMemo(() => new Set(selected), [selected]);
|
|
4041
4042
|
const itemBase = cn(
|
|
4042
4043
|
"group/select-item flex w-full cursor-pointer select-none items-center gap-[8px] border-none bg-transparent text-left text-[12px] leading-[20px] outline-none",
|
|
4043
|
-
"text-[color:var(--cmp-
|
|
4044
|
-
"disabled:cursor-not-allowed disabled:text-[color:var(--cmp-
|
|
4044
|
+
"text-[color:var(--cmp-listBoxItem-content-default)]",
|
|
4045
|
+
"disabled:cursor-not-allowed disabled:text-[color:var(--cmp-listBoxItem-content-disabled)]"
|
|
4045
4046
|
);
|
|
4046
|
-
const activeClass = "hover:bg-[var(--cmp-
|
|
4047
|
+
const activeClass = "hover:bg-[var(--cmp-listBoxItem-bg-hover)] hover:text-[color:var(--cmp-listBoxItem-content-hover)] focus-visible:bg-[var(--cmp-listBoxItem-bg-hover)] focus-visible:text-[color:var(--cmp-listBoxItem-content-hover)]";
|
|
4047
4048
|
return /* @__PURE__ */ jsxs("div", { role: "listbox", "aria-multiselectable": multi || void 0, children: [
|
|
4048
4049
|
showSelectAll && /* @__PURE__ */ jsxs(
|
|
4049
4050
|
"button",
|
|
@@ -4053,7 +4054,7 @@ function ItemList({
|
|
|
4053
4054
|
"data-select-active": focusedValue === "__select_all__" ? "true" : void 0,
|
|
4054
4055
|
className: cn(
|
|
4055
4056
|
itemBase,
|
|
4056
|
-
focusedValue === "__select_all__" && "bg-[var(--cmp-
|
|
4057
|
+
focusedValue === "__select_all__" && "bg-[var(--cmp-listBoxItem-bg-hover)] text-[color:var(--cmp-listBoxItem-content-hover)]"
|
|
4057
4058
|
),
|
|
4058
4059
|
style: { paddingTop: 4, paddingBottom: 4, paddingRight: 12, paddingLeft: 12 },
|
|
4059
4060
|
onMouseEnter: () => onHoverValue("__select_all__"),
|
|
@@ -4070,7 +4071,7 @@ function ItemList({
|
|
|
4070
4071
|
const rowKey = `${o.value}-${idx}`;
|
|
4071
4072
|
if (o.isGroup) {
|
|
4072
4073
|
const isDepth1 = o.depth === 1;
|
|
4073
|
-
const groupTone = isDepth1 ? "border-t border-solid border-[color:var(--cmp-
|
|
4074
|
+
const groupTone = isDepth1 ? "border-t border-solid border-[color:var(--cmp-listBoxItem-depth1-border-color)] bg-[var(--cmp-listBoxItem-depth1-bg-default)] font-bold" : "bg-[var(--cmp-listBoxItem-depth2-middle-bg)] font-medium";
|
|
4074
4075
|
if (multi) {
|
|
4075
4076
|
const leafValues = groupLeafValues.get(idx) ?? [];
|
|
4076
4077
|
const total = leafValues.length;
|
|
@@ -4088,12 +4089,12 @@ function ItemList({
|
|
|
4088
4089
|
"data-select-focused": groupFocused ? "true" : void 0,
|
|
4089
4090
|
"data-select-active": groupFocused ? "true" : void 0,
|
|
4090
4091
|
className: cn(
|
|
4091
|
-
"flex w-full select-none items-center gap-[8px] border-none py-[4px] pr-[12px] text-left text-[12px] leading-[20px] text-[color:var(--cmp-
|
|
4092
|
+
"flex w-full select-none items-center gap-[8px] border-none py-[4px] pr-[12px] text-left text-[12px] leading-[20px] text-[color:var(--cmp-listBoxItem-content-default)]",
|
|
4092
4093
|
groupTone,
|
|
4093
|
-
groupDisabled ? "cursor-not-allowed text-[color:var(--cmp-
|
|
4094
|
-
groupDisabled && isDepth1 && "bg-[var(--cmp-
|
|
4094
|
+
groupDisabled ? "cursor-not-allowed text-[color:var(--cmp-listBoxItem-content-disabled)]" : "cursor-pointer",
|
|
4095
|
+
groupDisabled && isDepth1 && "bg-[var(--cmp-listBoxItem-depth1-bg-disabled)]",
|
|
4095
4096
|
// 포커스 하이라이트는 depth 배경보다 뒤에 둬 tailwind-merge 로 이기게 한다.
|
|
4096
|
-
groupFocused && !groupDisabled && "bg-[var(--cmp-
|
|
4097
|
+
groupFocused && !groupDisabled && "bg-[var(--cmp-listBoxItem-bg-hover)] text-[color:var(--cmp-listBoxItem-content-hover)]"
|
|
4097
4098
|
),
|
|
4098
4099
|
style: { paddingLeft: padLeft },
|
|
4099
4100
|
onMouseEnter: () => onHoverValue(`__group_${idx}__`),
|
|
@@ -4113,7 +4114,7 @@ function ItemList({
|
|
|
4113
4114
|
{
|
|
4114
4115
|
className: cn(
|
|
4115
4116
|
"shrink-0 font-medium",
|
|
4116
|
-
groupFocused ? "text-white" : "text-[color:var(--cmp-
|
|
4117
|
+
groupFocused ? "text-white" : "text-[color:var(--cmp-listBoxItem-content-disabled)]"
|
|
4117
4118
|
),
|
|
4118
4119
|
children: [
|
|
4119
4120
|
"(",
|
|
@@ -4133,12 +4134,12 @@ function ItemList({
|
|
|
4133
4134
|
"div",
|
|
4134
4135
|
{
|
|
4135
4136
|
className: cn(
|
|
4136
|
-
"select-none py-[4px] pr-[12px] text-[12px] leading-[20px] text-[color:var(--cmp-
|
|
4137
|
+
"select-none py-[4px] pr-[12px] text-[12px] leading-[20px] text-[color:var(--cmp-listBoxItem-content-default)]",
|
|
4137
4138
|
groupTone,
|
|
4138
4139
|
// 하위가 전부 비활성이면(select.config 에서 bubble-up) 어미 그룹도 비활성 처리:
|
|
4139
4140
|
// 텍스트는 회색(#888), depth1 그룹은 파란 배경 대신 회색(#EEE)으로 (depth2 는 #F6F6F6 유지)
|
|
4140
|
-
o.disabled && "cursor-not-allowed text-[color:var(--cmp-
|
|
4141
|
-
o.disabled && isDepth1 && "bg-[var(--cmp-
|
|
4141
|
+
o.disabled && "cursor-not-allowed text-[color:var(--cmp-listBoxItem-content-disabled)]",
|
|
4142
|
+
o.disabled && isDepth1 && "bg-[var(--cmp-listBoxItem-depth1-bg-disabled)]"
|
|
4142
4143
|
),
|
|
4143
4144
|
style: { paddingLeft: padLeft },
|
|
4144
4145
|
children: o.label
|
|
@@ -4158,8 +4159,8 @@ function ItemList({
|
|
|
4158
4159
|
"data-select-active": focusedValue === o.value ? "true" : void 0,
|
|
4159
4160
|
className: cn(
|
|
4160
4161
|
itemBase,
|
|
4161
|
-
isSelected && !multi && "font-bold text-[color:var(--cmp-
|
|
4162
|
-
focusedValue === o.value && "bg-[var(--cmp-
|
|
4162
|
+
isSelected && !multi && "font-bold text-[color:var(--cmp-listBoxItem-content-selected)]",
|
|
4163
|
+
focusedValue === o.value && "bg-[var(--cmp-listBoxItem-bg-hover)] text-[color:var(--cmp-listBoxItem-content-hover)]",
|
|
4163
4164
|
// 비활성 항목은 hover/focus 스타일 대상에서 제외한다.
|
|
4164
4165
|
// (:hover 는 disabled 버튼에도 매칭되므로 클래스 자체를 붙이지 않아야 한다)
|
|
4165
4166
|
!o.disabled && activeClass
|