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
|
@@ -3701,7 +3701,7 @@ var SSelect = react.forwardRef(function SSelect2({
|
|
|
3701
3701
|
);
|
|
3702
3702
|
onValueChange(multi ? mapped : mapped[0] ?? (emitValue ? "" : null));
|
|
3703
3703
|
};
|
|
3704
|
-
const commitOpen = (next) => {
|
|
3704
|
+
const commitOpen = (next, valueForRules) => {
|
|
3705
3705
|
setOpen(next);
|
|
3706
3706
|
onOpenChange?.(next);
|
|
3707
3707
|
if (next) {
|
|
@@ -3710,7 +3710,8 @@ var SSelect = react.forwardRef(function SSelect2({
|
|
|
3710
3710
|
setPendingOpen(false);
|
|
3711
3711
|
setSearch("");
|
|
3712
3712
|
if (rules && rules.length > 0) {
|
|
3713
|
-
|
|
3713
|
+
const current = valueForRules ?? selectedRef.current;
|
|
3714
|
+
setRuleError(runRules(multi ? current : current[0] ?? "", rules));
|
|
3714
3715
|
}
|
|
3715
3716
|
}
|
|
3716
3717
|
};
|
|
@@ -3794,7 +3795,7 @@ var SSelect = react.forwardRef(function SSelect2({
|
|
|
3794
3795
|
return;
|
|
3795
3796
|
}
|
|
3796
3797
|
emit([nextValue]);
|
|
3797
|
-
commitOpen(false);
|
|
3798
|
+
commitOpen(false, [nextValue]);
|
|
3798
3799
|
};
|
|
3799
3800
|
const handleSelectAll = () => {
|
|
3800
3801
|
emit(allSelected ? [] : allValues);
|
|
@@ -4034,7 +4035,7 @@ var SSelect = react.forwardRef(function SSelect2({
|
|
|
4034
4035
|
if (index >= 0) setFocusedIndex(index);
|
|
4035
4036
|
}
|
|
4036
4037
|
}
|
|
4037
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-[12px] py-[12px] text-left text-[12px] leading-[20px] text-[color:var(--cmp-
|
|
4038
|
+
) : /* @__PURE__ */ jsxRuntime.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." })
|
|
4038
4039
|
]
|
|
4039
4040
|
}
|
|
4040
4041
|
)
|
|
@@ -4062,10 +4063,10 @@ function ItemList({
|
|
|
4062
4063
|
const selectedSet = react.useMemo(() => new Set(selected), [selected]);
|
|
4063
4064
|
const itemBase = cn(
|
|
4064
4065
|
"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",
|
|
4065
|
-
"text-[color:var(--cmp-
|
|
4066
|
-
"disabled:cursor-not-allowed disabled:text-[color:var(--cmp-
|
|
4066
|
+
"text-[color:var(--cmp-listBoxItem-content-default)]",
|
|
4067
|
+
"disabled:cursor-not-allowed disabled:text-[color:var(--cmp-listBoxItem-content-disabled)]"
|
|
4067
4068
|
);
|
|
4068
|
-
const activeClass = "hover:bg-[var(--cmp-
|
|
4069
|
+
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)]";
|
|
4069
4070
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { role: "listbox", "aria-multiselectable": multi || void 0, children: [
|
|
4070
4071
|
showSelectAll && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4071
4072
|
"button",
|
|
@@ -4075,7 +4076,7 @@ function ItemList({
|
|
|
4075
4076
|
"data-select-active": focusedValue === "__select_all__" ? "true" : void 0,
|
|
4076
4077
|
className: cn(
|
|
4077
4078
|
itemBase,
|
|
4078
|
-
focusedValue === "__select_all__" && "bg-[var(--cmp-
|
|
4079
|
+
focusedValue === "__select_all__" && "bg-[var(--cmp-listBoxItem-bg-hover)] text-[color:var(--cmp-listBoxItem-content-hover)]"
|
|
4079
4080
|
),
|
|
4080
4081
|
style: { paddingTop: 4, paddingBottom: 4, paddingRight: 12, paddingLeft: 12 },
|
|
4081
4082
|
onMouseEnter: () => onHoverValue("__select_all__"),
|
|
@@ -4092,7 +4093,7 @@ function ItemList({
|
|
|
4092
4093
|
const rowKey = `${o.value}-${idx}`;
|
|
4093
4094
|
if (o.isGroup) {
|
|
4094
4095
|
const isDepth1 = o.depth === 1;
|
|
4095
|
-
const groupTone = isDepth1 ? "border-t border-solid border-[color:var(--cmp-
|
|
4096
|
+
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";
|
|
4096
4097
|
if (multi) {
|
|
4097
4098
|
const leafValues = groupLeafValues.get(idx) ?? [];
|
|
4098
4099
|
const total = leafValues.length;
|
|
@@ -4110,12 +4111,12 @@ function ItemList({
|
|
|
4110
4111
|
"data-select-focused": groupFocused ? "true" : void 0,
|
|
4111
4112
|
"data-select-active": groupFocused ? "true" : void 0,
|
|
4112
4113
|
className: cn(
|
|
4113
|
-
"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-
|
|
4114
|
+
"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)]",
|
|
4114
4115
|
groupTone,
|
|
4115
|
-
groupDisabled ? "cursor-not-allowed text-[color:var(--cmp-
|
|
4116
|
-
groupDisabled && isDepth1 && "bg-[var(--cmp-
|
|
4116
|
+
groupDisabled ? "cursor-not-allowed text-[color:var(--cmp-listBoxItem-content-disabled)]" : "cursor-pointer",
|
|
4117
|
+
groupDisabled && isDepth1 && "bg-[var(--cmp-listBoxItem-depth1-bg-disabled)]",
|
|
4117
4118
|
// 포커스 하이라이트는 depth 배경보다 뒤에 둬 tailwind-merge 로 이기게 한다.
|
|
4118
|
-
groupFocused && !groupDisabled && "bg-[var(--cmp-
|
|
4119
|
+
groupFocused && !groupDisabled && "bg-[var(--cmp-listBoxItem-bg-hover)] text-[color:var(--cmp-listBoxItem-content-hover)]"
|
|
4119
4120
|
),
|
|
4120
4121
|
style: { paddingLeft: padLeft },
|
|
4121
4122
|
onMouseEnter: () => onHoverValue(`__group_${idx}__`),
|
|
@@ -4135,7 +4136,7 @@ function ItemList({
|
|
|
4135
4136
|
{
|
|
4136
4137
|
className: cn(
|
|
4137
4138
|
"shrink-0 font-medium",
|
|
4138
|
-
groupFocused ? "text-white" : "text-[color:var(--cmp-
|
|
4139
|
+
groupFocused ? "text-white" : "text-[color:var(--cmp-listBoxItem-content-disabled)]"
|
|
4139
4140
|
),
|
|
4140
4141
|
children: [
|
|
4141
4142
|
"(",
|
|
@@ -4155,12 +4156,12 @@ function ItemList({
|
|
|
4155
4156
|
"div",
|
|
4156
4157
|
{
|
|
4157
4158
|
className: cn(
|
|
4158
|
-
"select-none py-[4px] pr-[12px] text-[12px] leading-[20px] text-[color:var(--cmp-
|
|
4159
|
+
"select-none py-[4px] pr-[12px] text-[12px] leading-[20px] text-[color:var(--cmp-listBoxItem-content-default)]",
|
|
4159
4160
|
groupTone,
|
|
4160
4161
|
// 하위가 전부 비활성이면(select.config 에서 bubble-up) 어미 그룹도 비활성 처리:
|
|
4161
4162
|
// 텍스트는 회색(#888), depth1 그룹은 파란 배경 대신 회색(#EEE)으로 (depth2 는 #F6F6F6 유지)
|
|
4162
|
-
o.disabled && "cursor-not-allowed text-[color:var(--cmp-
|
|
4163
|
-
o.disabled && isDepth1 && "bg-[var(--cmp-
|
|
4163
|
+
o.disabled && "cursor-not-allowed text-[color:var(--cmp-listBoxItem-content-disabled)]",
|
|
4164
|
+
o.disabled && isDepth1 && "bg-[var(--cmp-listBoxItem-depth1-bg-disabled)]"
|
|
4164
4165
|
),
|
|
4165
4166
|
style: { paddingLeft: padLeft },
|
|
4166
4167
|
children: o.label
|
|
@@ -4180,8 +4181,8 @@ function ItemList({
|
|
|
4180
4181
|
"data-select-active": focusedValue === o.value ? "true" : void 0,
|
|
4181
4182
|
className: cn(
|
|
4182
4183
|
itemBase,
|
|
4183
|
-
isSelected && !multi && "font-bold text-[color:var(--cmp-
|
|
4184
|
-
focusedValue === o.value && "bg-[var(--cmp-
|
|
4184
|
+
isSelected && !multi && "font-bold text-[color:var(--cmp-listBoxItem-content-selected)]",
|
|
4185
|
+
focusedValue === o.value && "bg-[var(--cmp-listBoxItem-bg-hover)] text-[color:var(--cmp-listBoxItem-content-hover)]",
|
|
4185
4186
|
// 비활성 항목은 hover/focus 스타일 대상에서 제외한다.
|
|
4186
4187
|
// (:hover 는 disabled 버튼에도 매칭되므로 클래스 자체를 붙이지 않아야 한다)
|
|
4187
4188
|
!o.disabled && activeClass
|