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
|
@@ -4452,7 +4452,7 @@ var SSelect = react.forwardRef(function SSelect2({
|
|
|
4452
4452
|
);
|
|
4453
4453
|
onValueChange(multi ? mapped : mapped[0] ?? (emitValue ? "" : null));
|
|
4454
4454
|
};
|
|
4455
|
-
const commitOpen = (next) => {
|
|
4455
|
+
const commitOpen = (next, valueForRules) => {
|
|
4456
4456
|
setOpen(next);
|
|
4457
4457
|
onOpenChange?.(next);
|
|
4458
4458
|
if (next) {
|
|
@@ -4461,7 +4461,8 @@ var SSelect = react.forwardRef(function SSelect2({
|
|
|
4461
4461
|
setPendingOpen(false);
|
|
4462
4462
|
setSearch("");
|
|
4463
4463
|
if (rules && rules.length > 0) {
|
|
4464
|
-
|
|
4464
|
+
const current = valueForRules ?? selectedRef.current;
|
|
4465
|
+
setRuleError(runRules(multi ? current : current[0] ?? "", rules));
|
|
4465
4466
|
}
|
|
4466
4467
|
}
|
|
4467
4468
|
};
|
|
@@ -4545,7 +4546,7 @@ var SSelect = react.forwardRef(function SSelect2({
|
|
|
4545
4546
|
return;
|
|
4546
4547
|
}
|
|
4547
4548
|
emit([nextValue]);
|
|
4548
|
-
commitOpen(false);
|
|
4549
|
+
commitOpen(false, [nextValue]);
|
|
4549
4550
|
};
|
|
4550
4551
|
const handleSelectAll = () => {
|
|
4551
4552
|
emit(allSelected ? [] : allValues);
|
|
@@ -4785,7 +4786,7 @@ var SSelect = react.forwardRef(function SSelect2({
|
|
|
4785
4786
|
if (index >= 0) setFocusedIndex(index);
|
|
4786
4787
|
}
|
|
4787
4788
|
}
|
|
4788
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-[12px] py-[12px] text-left text-[12px] leading-[20px] text-[color:var(--cmp-
|
|
4789
|
+
) : /* @__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." })
|
|
4789
4790
|
]
|
|
4790
4791
|
}
|
|
4791
4792
|
)
|
|
@@ -4813,10 +4814,10 @@ function ItemList({
|
|
|
4813
4814
|
const selectedSet = react.useMemo(() => new Set(selected), [selected]);
|
|
4814
4815
|
const itemBase = cn(
|
|
4815
4816
|
"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",
|
|
4816
|
-
"text-[color:var(--cmp-
|
|
4817
|
-
"disabled:cursor-not-allowed disabled:text-[color:var(--cmp-
|
|
4817
|
+
"text-[color:var(--cmp-listBoxItem-content-default)]",
|
|
4818
|
+
"disabled:cursor-not-allowed disabled:text-[color:var(--cmp-listBoxItem-content-disabled)]"
|
|
4818
4819
|
);
|
|
4819
|
-
const activeClass = "hover:bg-[var(--cmp-
|
|
4820
|
+
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)]";
|
|
4820
4821
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { role: "listbox", "aria-multiselectable": multi || void 0, children: [
|
|
4821
4822
|
showSelectAll && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4822
4823
|
"button",
|
|
@@ -4826,7 +4827,7 @@ function ItemList({
|
|
|
4826
4827
|
"data-select-active": focusedValue === "__select_all__" ? "true" : void 0,
|
|
4827
4828
|
className: cn(
|
|
4828
4829
|
itemBase,
|
|
4829
|
-
focusedValue === "__select_all__" && "bg-[var(--cmp-
|
|
4830
|
+
focusedValue === "__select_all__" && "bg-[var(--cmp-listBoxItem-bg-hover)] text-[color:var(--cmp-listBoxItem-content-hover)]"
|
|
4830
4831
|
),
|
|
4831
4832
|
style: { paddingTop: 4, paddingBottom: 4, paddingRight: 12, paddingLeft: 12 },
|
|
4832
4833
|
onMouseEnter: () => onHoverValue("__select_all__"),
|
|
@@ -4843,7 +4844,7 @@ function ItemList({
|
|
|
4843
4844
|
const rowKey = `${o.value}-${idx}`;
|
|
4844
4845
|
if (o.isGroup) {
|
|
4845
4846
|
const isDepth1 = o.depth === 1;
|
|
4846
|
-
const groupTone = isDepth1 ? "border-t border-solid border-[color:var(--cmp-
|
|
4847
|
+
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";
|
|
4847
4848
|
if (multi) {
|
|
4848
4849
|
const leafValues = groupLeafValues.get(idx) ?? [];
|
|
4849
4850
|
const total = leafValues.length;
|
|
@@ -4861,12 +4862,12 @@ function ItemList({
|
|
|
4861
4862
|
"data-select-focused": groupFocused ? "true" : void 0,
|
|
4862
4863
|
"data-select-active": groupFocused ? "true" : void 0,
|
|
4863
4864
|
className: cn(
|
|
4864
|
-
"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-
|
|
4865
|
+
"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)]",
|
|
4865
4866
|
groupTone,
|
|
4866
|
-
groupDisabled ? "cursor-not-allowed text-[color:var(--cmp-
|
|
4867
|
-
groupDisabled && isDepth1 && "bg-[var(--cmp-
|
|
4867
|
+
groupDisabled ? "cursor-not-allowed text-[color:var(--cmp-listBoxItem-content-disabled)]" : "cursor-pointer",
|
|
4868
|
+
groupDisabled && isDepth1 && "bg-[var(--cmp-listBoxItem-depth1-bg-disabled)]",
|
|
4868
4869
|
// 포커스 하이라이트는 depth 배경보다 뒤에 둬 tailwind-merge 로 이기게 한다.
|
|
4869
|
-
groupFocused && !groupDisabled && "bg-[var(--cmp-
|
|
4870
|
+
groupFocused && !groupDisabled && "bg-[var(--cmp-listBoxItem-bg-hover)] text-[color:var(--cmp-listBoxItem-content-hover)]"
|
|
4870
4871
|
),
|
|
4871
4872
|
style: { paddingLeft: padLeft },
|
|
4872
4873
|
onMouseEnter: () => onHoverValue(`__group_${idx}__`),
|
|
@@ -4886,7 +4887,7 @@ function ItemList({
|
|
|
4886
4887
|
{
|
|
4887
4888
|
className: cn(
|
|
4888
4889
|
"shrink-0 font-medium",
|
|
4889
|
-
groupFocused ? "text-white" : "text-[color:var(--cmp-
|
|
4890
|
+
groupFocused ? "text-white" : "text-[color:var(--cmp-listBoxItem-content-disabled)]"
|
|
4890
4891
|
),
|
|
4891
4892
|
children: [
|
|
4892
4893
|
"(",
|
|
@@ -4906,12 +4907,12 @@ function ItemList({
|
|
|
4906
4907
|
"div",
|
|
4907
4908
|
{
|
|
4908
4909
|
className: cn(
|
|
4909
|
-
"select-none py-[4px] pr-[12px] text-[12px] leading-[20px] text-[color:var(--cmp-
|
|
4910
|
+
"select-none py-[4px] pr-[12px] text-[12px] leading-[20px] text-[color:var(--cmp-listBoxItem-content-default)]",
|
|
4910
4911
|
groupTone,
|
|
4911
4912
|
// 하위가 전부 비활성이면(select.config 에서 bubble-up) 어미 그룹도 비활성 처리:
|
|
4912
4913
|
// 텍스트는 회색(#888), depth1 그룹은 파란 배경 대신 회색(#EEE)으로 (depth2 는 #F6F6F6 유지)
|
|
4913
|
-
o.disabled && "cursor-not-allowed text-[color:var(--cmp-
|
|
4914
|
-
o.disabled && isDepth1 && "bg-[var(--cmp-
|
|
4914
|
+
o.disabled && "cursor-not-allowed text-[color:var(--cmp-listBoxItem-content-disabled)]",
|
|
4915
|
+
o.disabled && isDepth1 && "bg-[var(--cmp-listBoxItem-depth1-bg-disabled)]"
|
|
4915
4916
|
),
|
|
4916
4917
|
style: { paddingLeft: padLeft },
|
|
4917
4918
|
children: o.label
|
|
@@ -4931,8 +4932,8 @@ function ItemList({
|
|
|
4931
4932
|
"data-select-active": focusedValue === o.value ? "true" : void 0,
|
|
4932
4933
|
className: cn(
|
|
4933
4934
|
itemBase,
|
|
4934
|
-
isSelected && !multi && "font-bold text-[color:var(--cmp-
|
|
4935
|
-
focusedValue === o.value && "bg-[var(--cmp-
|
|
4935
|
+
isSelected && !multi && "font-bold text-[color:var(--cmp-listBoxItem-content-selected)]",
|
|
4936
|
+
focusedValue === o.value && "bg-[var(--cmp-listBoxItem-bg-hover)] text-[color:var(--cmp-listBoxItem-content-hover)]",
|
|
4936
4937
|
// 비활성 항목은 hover/focus 스타일 대상에서 제외한다.
|
|
4937
4938
|
// (:hover 는 disabled 버튼에도 매칭되므로 클래스 자체를 붙이지 않아야 한다)
|
|
4938
4939
|
!o.disabled && activeClass
|