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
|
@@ -3965,7 +3965,7 @@ var SSelect = react.forwardRef(function SSelect2({
|
|
|
3965
3965
|
);
|
|
3966
3966
|
onValueChange(multi ? mapped : mapped[0] ?? (emitValue ? "" : null));
|
|
3967
3967
|
};
|
|
3968
|
-
const commitOpen = (next) => {
|
|
3968
|
+
const commitOpen = (next, valueForRules) => {
|
|
3969
3969
|
setOpen(next);
|
|
3970
3970
|
onOpenChange?.(next);
|
|
3971
3971
|
if (next) {
|
|
@@ -3974,7 +3974,8 @@ var SSelect = react.forwardRef(function SSelect2({
|
|
|
3974
3974
|
setPendingOpen(false);
|
|
3975
3975
|
setSearch("");
|
|
3976
3976
|
if (rules && rules.length > 0) {
|
|
3977
|
-
|
|
3977
|
+
const current = valueForRules ?? selectedRef.current;
|
|
3978
|
+
setRuleError(runRules(multi ? current : current[0] ?? "", rules));
|
|
3978
3979
|
}
|
|
3979
3980
|
}
|
|
3980
3981
|
};
|
|
@@ -4058,7 +4059,7 @@ var SSelect = react.forwardRef(function SSelect2({
|
|
|
4058
4059
|
return;
|
|
4059
4060
|
}
|
|
4060
4061
|
emit([nextValue]);
|
|
4061
|
-
commitOpen(false);
|
|
4062
|
+
commitOpen(false, [nextValue]);
|
|
4062
4063
|
};
|
|
4063
4064
|
const handleSelectAll = () => {
|
|
4064
4065
|
emit(allSelected ? [] : allValues);
|
|
@@ -4298,7 +4299,7 @@ var SSelect = react.forwardRef(function SSelect2({
|
|
|
4298
4299
|
if (index >= 0) setFocusedIndex(index);
|
|
4299
4300
|
}
|
|
4300
4301
|
}
|
|
4301
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-[12px] py-[12px] text-left text-[12px] leading-[20px] text-[color:var(--cmp-
|
|
4302
|
+
) : /* @__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." })
|
|
4302
4303
|
]
|
|
4303
4304
|
}
|
|
4304
4305
|
)
|
|
@@ -4326,10 +4327,10 @@ function ItemList({
|
|
|
4326
4327
|
const selectedSet = react.useMemo(() => new Set(selected), [selected]);
|
|
4327
4328
|
const itemBase = cn(
|
|
4328
4329
|
"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",
|
|
4329
|
-
"text-[color:var(--cmp-
|
|
4330
|
-
"disabled:cursor-not-allowed disabled:text-[color:var(--cmp-
|
|
4330
|
+
"text-[color:var(--cmp-listBoxItem-content-default)]",
|
|
4331
|
+
"disabled:cursor-not-allowed disabled:text-[color:var(--cmp-listBoxItem-content-disabled)]"
|
|
4331
4332
|
);
|
|
4332
|
-
const activeClass = "hover:bg-[var(--cmp-
|
|
4333
|
+
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)]";
|
|
4333
4334
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { role: "listbox", "aria-multiselectable": multi || void 0, children: [
|
|
4334
4335
|
showSelectAll && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4335
4336
|
"button",
|
|
@@ -4339,7 +4340,7 @@ function ItemList({
|
|
|
4339
4340
|
"data-select-active": focusedValue === "__select_all__" ? "true" : void 0,
|
|
4340
4341
|
className: cn(
|
|
4341
4342
|
itemBase,
|
|
4342
|
-
focusedValue === "__select_all__" && "bg-[var(--cmp-
|
|
4343
|
+
focusedValue === "__select_all__" && "bg-[var(--cmp-listBoxItem-bg-hover)] text-[color:var(--cmp-listBoxItem-content-hover)]"
|
|
4343
4344
|
),
|
|
4344
4345
|
style: { paddingTop: 4, paddingBottom: 4, paddingRight: 12, paddingLeft: 12 },
|
|
4345
4346
|
onMouseEnter: () => onHoverValue("__select_all__"),
|
|
@@ -4356,7 +4357,7 @@ function ItemList({
|
|
|
4356
4357
|
const rowKey = `${o.value}-${idx}`;
|
|
4357
4358
|
if (o.isGroup) {
|
|
4358
4359
|
const isDepth1 = o.depth === 1;
|
|
4359
|
-
const groupTone = isDepth1 ? "border-t border-solid border-[color:var(--cmp-
|
|
4360
|
+
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";
|
|
4360
4361
|
if (multi) {
|
|
4361
4362
|
const leafValues = groupLeafValues.get(idx) ?? [];
|
|
4362
4363
|
const total = leafValues.length;
|
|
@@ -4374,12 +4375,12 @@ function ItemList({
|
|
|
4374
4375
|
"data-select-focused": groupFocused ? "true" : void 0,
|
|
4375
4376
|
"data-select-active": groupFocused ? "true" : void 0,
|
|
4376
4377
|
className: cn(
|
|
4377
|
-
"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-
|
|
4378
|
+
"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)]",
|
|
4378
4379
|
groupTone,
|
|
4379
|
-
groupDisabled ? "cursor-not-allowed text-[color:var(--cmp-
|
|
4380
|
-
groupDisabled && isDepth1 && "bg-[var(--cmp-
|
|
4380
|
+
groupDisabled ? "cursor-not-allowed text-[color:var(--cmp-listBoxItem-content-disabled)]" : "cursor-pointer",
|
|
4381
|
+
groupDisabled && isDepth1 && "bg-[var(--cmp-listBoxItem-depth1-bg-disabled)]",
|
|
4381
4382
|
// 포커스 하이라이트는 depth 배경보다 뒤에 둬 tailwind-merge 로 이기게 한다.
|
|
4382
|
-
groupFocused && !groupDisabled && "bg-[var(--cmp-
|
|
4383
|
+
groupFocused && !groupDisabled && "bg-[var(--cmp-listBoxItem-bg-hover)] text-[color:var(--cmp-listBoxItem-content-hover)]"
|
|
4383
4384
|
),
|
|
4384
4385
|
style: { paddingLeft: padLeft },
|
|
4385
4386
|
onMouseEnter: () => onHoverValue(`__group_${idx}__`),
|
|
@@ -4399,7 +4400,7 @@ function ItemList({
|
|
|
4399
4400
|
{
|
|
4400
4401
|
className: cn(
|
|
4401
4402
|
"shrink-0 font-medium",
|
|
4402
|
-
groupFocused ? "text-white" : "text-[color:var(--cmp-
|
|
4403
|
+
groupFocused ? "text-white" : "text-[color:var(--cmp-listBoxItem-content-disabled)]"
|
|
4403
4404
|
),
|
|
4404
4405
|
children: [
|
|
4405
4406
|
"(",
|
|
@@ -4419,12 +4420,12 @@ function ItemList({
|
|
|
4419
4420
|
"div",
|
|
4420
4421
|
{
|
|
4421
4422
|
className: cn(
|
|
4422
|
-
"select-none py-[4px] pr-[12px] text-[12px] leading-[20px] text-[color:var(--cmp-
|
|
4423
|
+
"select-none py-[4px] pr-[12px] text-[12px] leading-[20px] text-[color:var(--cmp-listBoxItem-content-default)]",
|
|
4423
4424
|
groupTone,
|
|
4424
4425
|
// 하위가 전부 비활성이면(select.config 에서 bubble-up) 어미 그룹도 비활성 처리:
|
|
4425
4426
|
// 텍스트는 회색(#888), depth1 그룹은 파란 배경 대신 회색(#EEE)으로 (depth2 는 #F6F6F6 유지)
|
|
4426
|
-
o.disabled && "cursor-not-allowed text-[color:var(--cmp-
|
|
4427
|
-
o.disabled && isDepth1 && "bg-[var(--cmp-
|
|
4427
|
+
o.disabled && "cursor-not-allowed text-[color:var(--cmp-listBoxItem-content-disabled)]",
|
|
4428
|
+
o.disabled && isDepth1 && "bg-[var(--cmp-listBoxItem-depth1-bg-disabled)]"
|
|
4428
4429
|
),
|
|
4429
4430
|
style: { paddingLeft: padLeft },
|
|
4430
4431
|
children: o.label
|
|
@@ -4444,8 +4445,8 @@ function ItemList({
|
|
|
4444
4445
|
"data-select-active": focusedValue === o.value ? "true" : void 0,
|
|
4445
4446
|
className: cn(
|
|
4446
4447
|
itemBase,
|
|
4447
|
-
isSelected && !multi && "font-bold text-[color:var(--cmp-
|
|
4448
|
-
focusedValue === o.value && "bg-[var(--cmp-
|
|
4448
|
+
isSelected && !multi && "font-bold text-[color:var(--cmp-listBoxItem-content-selected)]",
|
|
4449
|
+
focusedValue === o.value && "bg-[var(--cmp-listBoxItem-bg-hover)] text-[color:var(--cmp-listBoxItem-content-hover)]",
|
|
4449
4450
|
// 비활성 항목은 hover/focus 스타일 대상에서 제외한다.
|
|
4450
4451
|
// (:hover 는 disabled 버튼에도 매칭되므로 클래스 자체를 붙이지 않아야 한다)
|
|
4451
4452
|
!o.disabled && activeClass
|