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
|
@@ -3942,7 +3942,7 @@ var SSelect = forwardRef(function SSelect2({
|
|
|
3942
3942
|
);
|
|
3943
3943
|
onValueChange(multi ? mapped : mapped[0] ?? (emitValue ? "" : null));
|
|
3944
3944
|
};
|
|
3945
|
-
const commitOpen = (next) => {
|
|
3945
|
+
const commitOpen = (next, valueForRules) => {
|
|
3946
3946
|
setOpen(next);
|
|
3947
3947
|
onOpenChange?.(next);
|
|
3948
3948
|
if (next) {
|
|
@@ -3951,7 +3951,8 @@ var SSelect = forwardRef(function SSelect2({
|
|
|
3951
3951
|
setPendingOpen(false);
|
|
3952
3952
|
setSearch("");
|
|
3953
3953
|
if (rules && rules.length > 0) {
|
|
3954
|
-
|
|
3954
|
+
const current = valueForRules ?? selectedRef.current;
|
|
3955
|
+
setRuleError(runRules(multi ? current : current[0] ?? "", rules));
|
|
3955
3956
|
}
|
|
3956
3957
|
}
|
|
3957
3958
|
};
|
|
@@ -4035,7 +4036,7 @@ var SSelect = forwardRef(function SSelect2({
|
|
|
4035
4036
|
return;
|
|
4036
4037
|
}
|
|
4037
4038
|
emit([nextValue]);
|
|
4038
|
-
commitOpen(false);
|
|
4039
|
+
commitOpen(false, [nextValue]);
|
|
4039
4040
|
};
|
|
4040
4041
|
const handleSelectAll = () => {
|
|
4041
4042
|
emit(allSelected ? [] : allValues);
|
|
@@ -4275,7 +4276,7 @@ var SSelect = forwardRef(function SSelect2({
|
|
|
4275
4276
|
if (index >= 0) setFocusedIndex(index);
|
|
4276
4277
|
}
|
|
4277
4278
|
}
|
|
4278
|
-
) : /* @__PURE__ */ jsx("div", { className: "px-[12px] py-[12px] text-left text-[12px] leading-[20px] text-[color:var(--cmp-
|
|
4279
|
+
) : /* @__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." })
|
|
4279
4280
|
]
|
|
4280
4281
|
}
|
|
4281
4282
|
)
|
|
@@ -4303,10 +4304,10 @@ function ItemList({
|
|
|
4303
4304
|
const selectedSet = useMemo(() => new Set(selected), [selected]);
|
|
4304
4305
|
const itemBase = cn(
|
|
4305
4306
|
"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",
|
|
4306
|
-
"text-[color:var(--cmp-
|
|
4307
|
-
"disabled:cursor-not-allowed disabled:text-[color:var(--cmp-
|
|
4307
|
+
"text-[color:var(--cmp-listBoxItem-content-default)]",
|
|
4308
|
+
"disabled:cursor-not-allowed disabled:text-[color:var(--cmp-listBoxItem-content-disabled)]"
|
|
4308
4309
|
);
|
|
4309
|
-
const activeClass = "hover:bg-[var(--cmp-
|
|
4310
|
+
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)]";
|
|
4310
4311
|
return /* @__PURE__ */ jsxs("div", { role: "listbox", "aria-multiselectable": multi || void 0, children: [
|
|
4311
4312
|
showSelectAll && /* @__PURE__ */ jsxs(
|
|
4312
4313
|
"button",
|
|
@@ -4316,7 +4317,7 @@ function ItemList({
|
|
|
4316
4317
|
"data-select-active": focusedValue === "__select_all__" ? "true" : void 0,
|
|
4317
4318
|
className: cn(
|
|
4318
4319
|
itemBase,
|
|
4319
|
-
focusedValue === "__select_all__" && "bg-[var(--cmp-
|
|
4320
|
+
focusedValue === "__select_all__" && "bg-[var(--cmp-listBoxItem-bg-hover)] text-[color:var(--cmp-listBoxItem-content-hover)]"
|
|
4320
4321
|
),
|
|
4321
4322
|
style: { paddingTop: 4, paddingBottom: 4, paddingRight: 12, paddingLeft: 12 },
|
|
4322
4323
|
onMouseEnter: () => onHoverValue("__select_all__"),
|
|
@@ -4333,7 +4334,7 @@ function ItemList({
|
|
|
4333
4334
|
const rowKey = `${o.value}-${idx}`;
|
|
4334
4335
|
if (o.isGroup) {
|
|
4335
4336
|
const isDepth1 = o.depth === 1;
|
|
4336
|
-
const groupTone = isDepth1 ? "border-t border-solid border-[color:var(--cmp-
|
|
4337
|
+
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";
|
|
4337
4338
|
if (multi) {
|
|
4338
4339
|
const leafValues = groupLeafValues.get(idx) ?? [];
|
|
4339
4340
|
const total = leafValues.length;
|
|
@@ -4351,12 +4352,12 @@ function ItemList({
|
|
|
4351
4352
|
"data-select-focused": groupFocused ? "true" : void 0,
|
|
4352
4353
|
"data-select-active": groupFocused ? "true" : void 0,
|
|
4353
4354
|
className: cn(
|
|
4354
|
-
"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-
|
|
4355
|
+
"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)]",
|
|
4355
4356
|
groupTone,
|
|
4356
|
-
groupDisabled ? "cursor-not-allowed text-[color:var(--cmp-
|
|
4357
|
-
groupDisabled && isDepth1 && "bg-[var(--cmp-
|
|
4357
|
+
groupDisabled ? "cursor-not-allowed text-[color:var(--cmp-listBoxItem-content-disabled)]" : "cursor-pointer",
|
|
4358
|
+
groupDisabled && isDepth1 && "bg-[var(--cmp-listBoxItem-depth1-bg-disabled)]",
|
|
4358
4359
|
// 포커스 하이라이트는 depth 배경보다 뒤에 둬 tailwind-merge 로 이기게 한다.
|
|
4359
|
-
groupFocused && !groupDisabled && "bg-[var(--cmp-
|
|
4360
|
+
groupFocused && !groupDisabled && "bg-[var(--cmp-listBoxItem-bg-hover)] text-[color:var(--cmp-listBoxItem-content-hover)]"
|
|
4360
4361
|
),
|
|
4361
4362
|
style: { paddingLeft: padLeft },
|
|
4362
4363
|
onMouseEnter: () => onHoverValue(`__group_${idx}__`),
|
|
@@ -4376,7 +4377,7 @@ function ItemList({
|
|
|
4376
4377
|
{
|
|
4377
4378
|
className: cn(
|
|
4378
4379
|
"shrink-0 font-medium",
|
|
4379
|
-
groupFocused ? "text-white" : "text-[color:var(--cmp-
|
|
4380
|
+
groupFocused ? "text-white" : "text-[color:var(--cmp-listBoxItem-content-disabled)]"
|
|
4380
4381
|
),
|
|
4381
4382
|
children: [
|
|
4382
4383
|
"(",
|
|
@@ -4396,12 +4397,12 @@ function ItemList({
|
|
|
4396
4397
|
"div",
|
|
4397
4398
|
{
|
|
4398
4399
|
className: cn(
|
|
4399
|
-
"select-none py-[4px] pr-[12px] text-[12px] leading-[20px] text-[color:var(--cmp-
|
|
4400
|
+
"select-none py-[4px] pr-[12px] text-[12px] leading-[20px] text-[color:var(--cmp-listBoxItem-content-default)]",
|
|
4400
4401
|
groupTone,
|
|
4401
4402
|
// 하위가 전부 비활성이면(select.config 에서 bubble-up) 어미 그룹도 비활성 처리:
|
|
4402
4403
|
// 텍스트는 회색(#888), depth1 그룹은 파란 배경 대신 회색(#EEE)으로 (depth2 는 #F6F6F6 유지)
|
|
4403
|
-
o.disabled && "cursor-not-allowed text-[color:var(--cmp-
|
|
4404
|
-
o.disabled && isDepth1 && "bg-[var(--cmp-
|
|
4404
|
+
o.disabled && "cursor-not-allowed text-[color:var(--cmp-listBoxItem-content-disabled)]",
|
|
4405
|
+
o.disabled && isDepth1 && "bg-[var(--cmp-listBoxItem-depth1-bg-disabled)]"
|
|
4405
4406
|
),
|
|
4406
4407
|
style: { paddingLeft: padLeft },
|
|
4407
4408
|
children: o.label
|
|
@@ -4421,8 +4422,8 @@ function ItemList({
|
|
|
4421
4422
|
"data-select-active": focusedValue === o.value ? "true" : void 0,
|
|
4422
4423
|
className: cn(
|
|
4423
4424
|
itemBase,
|
|
4424
|
-
isSelected && !multi && "font-bold text-[color:var(--cmp-
|
|
4425
|
-
focusedValue === o.value && "bg-[var(--cmp-
|
|
4425
|
+
isSelected && !multi && "font-bold text-[color:var(--cmp-listBoxItem-content-selected)]",
|
|
4426
|
+
focusedValue === o.value && "bg-[var(--cmp-listBoxItem-bg-hover)] text-[color:var(--cmp-listBoxItem-content-hover)]",
|
|
4426
4427
|
// 비활성 항목은 hover/focus 스타일 대상에서 제외한다.
|
|
4427
4428
|
// (:hover 는 disabled 버튼에도 매칭되므로 클래스 자체를 붙이지 않아야 한다)
|
|
4428
4429
|
!o.disabled && activeClass
|