sellmate-design-system-react 0.12.0 → 1.1.0
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 +3 -3
- package/dist/components/SActionModal/SActionModal.cjs.map +1 -1
- package/dist/components/SActionModal/SActionModal.js +3 -3
- package/dist/components/SActionModal/SActionModal.js.map +1 -1
- package/dist/components/SBarcodeInput/SBarcodeInput.cjs +1 -1
- package/dist/components/SBarcodeInput/SBarcodeInput.cjs.map +1 -1
- package/dist/components/SBarcodeInput/SBarcodeInput.js +1 -1
- package/dist/components/SBarcodeInput/SBarcodeInput.js.map +1 -1
- package/dist/components/SChipInput/SChipInput.cjs +1 -1
- package/dist/components/SChipInput/SChipInput.cjs.map +1 -1
- package/dist/components/SChipInput/SChipInput.js +1 -1
- package/dist/components/SChipInput/SChipInput.js.map +1 -1
- package/dist/components/SConfirmModal/SConfirmModal.cjs +4 -4
- package/dist/components/SConfirmModal/SConfirmModal.cjs.map +1 -1
- package/dist/components/SConfirmModal/SConfirmModal.js +4 -4
- package/dist/components/SConfirmModal/SConfirmModal.js.map +1 -1
- package/dist/components/SDatePicker/SDatePicker.cjs +1 -1
- package/dist/components/SDatePicker/SDatePicker.cjs.map +1 -1
- package/dist/components/SDatePicker/SDatePicker.js +1 -1
- package/dist/components/SDatePicker/SDatePicker.js.map +1 -1
- package/dist/components/SDateRangePicker/SDateRangePicker.cjs +1 -1
- package/dist/components/SDateRangePicker/SDateRangePicker.cjs.map +1 -1
- package/dist/components/SDateRangePicker/SDateRangePicker.js +1 -1
- package/dist/components/SDateRangePicker/SDateRangePicker.js.map +1 -1
- package/dist/components/SExpansionItem/SExpansionItem.cjs +42 -12
- package/dist/components/SExpansionItem/SExpansionItem.cjs.map +1 -1
- package/dist/components/SExpansionItem/SExpansionItem.d.ts +2 -0
- package/dist/components/SExpansionItem/SExpansionItem.js +43 -13
- package/dist/components/SExpansionItem/SExpansionItem.js.map +1 -1
- package/dist/components/SField/SField.cjs +1 -1
- package/dist/components/SField/SField.cjs.map +1 -1
- package/dist/components/SField/SField.js +1 -1
- package/dist/components/SField/SField.js.map +1 -1
- package/dist/components/SFilePicker/SFilePicker.cjs +1 -1
- package/dist/components/SFilePicker/SFilePicker.cjs.map +1 -1
- package/dist/components/SFilePicker/SFilePicker.js +1 -1
- package/dist/components/SFilePicker/SFilePicker.js.map +1 -1
- package/dist/components/SInput/SInput.cjs +1 -1
- package/dist/components/SInput/SInput.cjs.map +1 -1
- package/dist/components/SInput/SInput.js +1 -1
- package/dist/components/SInput/SInput.js.map +1 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.cjs +1 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.cjs.map +1 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.js +1 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.js.map +1 -1
- package/dist/components/SLoadingModal/SLoadingModal.cjs +3 -3
- package/dist/components/SLoadingModal/SLoadingModal.cjs.map +1 -1
- package/dist/components/SLoadingModal/SLoadingModal.js +3 -3
- package/dist/components/SLoadingModal/SLoadingModal.js.map +1 -1
- package/dist/components/SModal/SModal.cjs +31 -37
- package/dist/components/SModal/SModal.cjs.map +1 -1
- package/dist/components/SModal/SModal.d.ts +38 -19
- package/dist/components/SModal/SModal.js +31 -37
- package/dist/components/SModal/SModal.js.map +1 -1
- package/dist/components/SModalContainer/SModalContainer.cjs +1 -1
- package/dist/components/SModalContainer/SModalContainer.cjs.map +1 -1
- package/dist/components/SModalContainer/SModalContainer.js +1 -1
- package/dist/components/SModalContainer/SModalContainer.js.map +1 -1
- package/dist/components/SNumberInput/SNumberInput.cjs +1 -1
- package/dist/components/SNumberInput/SNumberInput.cjs.map +1 -1
- package/dist/components/SNumberInput/SNumberInput.js +1 -1
- package/dist/components/SNumberInput/SNumberInput.js.map +1 -1
- package/dist/components/SSelect/SSelect.cjs +1 -1
- package/dist/components/SSelect/SSelect.cjs.map +1 -1
- package/dist/components/SSelect/SSelect.js +1 -1
- package/dist/components/SSelect/SSelect.js.map +1 -1
- package/dist/components/STable/STable.cjs +2 -2
- package/dist/components/STable/STable.cjs.map +1 -1
- package/dist/components/STable/STable.d.ts +2 -1
- package/dist/components/STable/STable.js +2 -2
- package/dist/components/STable/STable.js.map +1 -1
- package/dist/components/STableBar/STableBar.cjs +93 -0
- package/dist/components/STableBar/STableBar.cjs.map +1 -0
- package/dist/components/STableBar/STableBar.d.ts +17 -0
- package/dist/components/STableBar/STableBar.js +91 -0
- package/dist/components/STableBar/STableBar.js.map +1 -0
- package/dist/components/STableBar/index.d.ts +1 -0
- package/dist/components/STextarea/STextarea.cjs +1 -1
- package/dist/components/STextarea/STextarea.cjs.map +1 -1
- package/dist/components/STextarea/STextarea.js +1 -1
- package/dist/components/STextarea/STextarea.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/components/STooltip/STooltip.cjs +1 -1
- package/dist/components/STooltip/STooltip.cjs.map +1 -1
- package/dist/components/STooltip/STooltip.js +1 -1
- package/dist/components/STooltip/STooltip.js.map +1 -1
- package/dist/index.cjs +133 -53
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +134 -55
- package/dist/index.js.map +1 -1
- package/dist/styles.css +117 -32
- package/package.json +1 -1
|
@@ -3135,7 +3135,7 @@ function SModalContainer({
|
|
|
3135
3135
|
"div",
|
|
3136
3136
|
{
|
|
3137
3137
|
className: cn(
|
|
3138
|
-
"relative overflow-hidden rounded-[var(--cmp-modal-radius)] bg-[var(--cmp-modal-bg)] shadow-normal-md",
|
|
3138
|
+
"relative flex max-h-[calc(100dvh-48px)] flex-col overflow-hidden rounded-[var(--cmp-modal-radius)] bg-[var(--cmp-modal-bg)] shadow-normal-md",
|
|
3139
3139
|
shaking && "animate-modal-shake",
|
|
3140
3140
|
className
|
|
3141
3141
|
),
|
|
@@ -3393,8 +3393,8 @@ function SConfirmModal({
|
|
|
3393
3393
|
showClose: true,
|
|
3394
3394
|
onClose,
|
|
3395
3395
|
className: "w-fit min-w-[520px]",
|
|
3396
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-[40px] px-[32px] py-[40px]", children: [
|
|
3397
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full flex-col items-center gap-[20px]", children: [
|
|
3396
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-0 flex-auto flex-col items-center gap-[40px] px-[32px] py-[40px]", children: [
|
|
3397
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full min-h-0 flex-col items-center gap-[20px] overflow-y-auto", children: [
|
|
3398
3398
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-[12px]", children: [
|
|
3399
3399
|
iconName && /* @__PURE__ */ jsxRuntime.jsx(SIcon, { name: iconName, size: 32, color: TYPE_ICON_COLOR[type] }),
|
|
3400
3400
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3416,7 +3416,7 @@ function SConfirmModal({
|
|
|
3416
3416
|
optionNode != null && optionNode
|
|
3417
3417
|
] })
|
|
3418
3418
|
] }),
|
|
3419
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-[8px]", children: [
|
|
3419
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-shrink-0 gap-[8px]", children: [
|
|
3420
3420
|
subButtonLabel && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3421
3421
|
SButton,
|
|
3422
3422
|
{
|
|
@@ -3592,7 +3592,7 @@ function SLoadingModal({
|
|
|
3592
3592
|
ariaTitle: lines[0] || "\uB85C\uB529 \uC911",
|
|
3593
3593
|
width,
|
|
3594
3594
|
height,
|
|
3595
|
-
children: /* @__PURE__ */ jsxRuntime.
|
|
3595
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-h-0 flex-auto flex-col overflow-y-auto px-[32px]", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "m-auto flex flex-col items-center gap-[20px]", children: [
|
|
3596
3596
|
state === "loading" ? progress !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(SCircleProgress, { value: progress }) : /* @__PURE__ */ jsxRuntime.jsx(SCircleProgress, { indeterminate: true }) : /* @__PURE__ */ jsxRuntime.jsx(SIcon, { name: "warningOutline", size: 80, color: "var(--cmp-modal-confirm-negative-icon)" }),
|
|
3597
3597
|
lines.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-[2px]", children: lines.map((m, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3598
3598
|
"p",
|
|
@@ -3615,7 +3615,7 @@ function SLoadingModal({
|
|
|
3615
3615
|
label: buttonLabel ?? DEFAULT_BUTTON_LABEL[state]
|
|
3616
3616
|
}
|
|
3617
3617
|
)
|
|
3618
|
-
] })
|
|
3618
|
+
] }) })
|
|
3619
3619
|
}
|
|
3620
3620
|
);
|
|
3621
3621
|
}
|
|
@@ -3698,6 +3698,10 @@ var SModalRefImpl = class {
|
|
|
3698
3698
|
this.root = root;
|
|
3699
3699
|
this.host = host;
|
|
3700
3700
|
}
|
|
3701
|
+
/** @internal create 의 마운트 검사용 host 조회 */
|
|
3702
|
+
_getHost() {
|
|
3703
|
+
return this.host;
|
|
3704
|
+
}
|
|
3701
3705
|
/** @internal 닫힘 시작 표시 — 컴포넌트 버튼·백드롭·ESC 닫힘 경로가 호출(중복 트리거 방지) */
|
|
3702
3706
|
_markDismissed() {
|
|
3703
3707
|
this.dismissRequested = true;
|
|
@@ -3793,46 +3797,35 @@ function LoadingMount({ options, refImpl }) {
|
|
|
3793
3797
|
}
|
|
3794
3798
|
);
|
|
3795
3799
|
}
|
|
3800
|
+
function warnIfNotModal(host, component) {
|
|
3801
|
+
if (typeof process !== "undefined" && process?.env?.NODE_ENV === "production") return;
|
|
3802
|
+
if (!host || host.childElementCount === 0) return;
|
|
3803
|
+
const name = component?.name || "component";
|
|
3804
|
+
console.warn(
|
|
3805
|
+
`[SModal.create] ${name} \uC774(\uAC00) \uBAA8\uB2EC\uC744 \uB744\uC6B0\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. create \uB294 \uCEE8\uD14C\uC774\uB108\uB97C \uB367\uC50C\uC6B0\uC9C0 \uC54A\uC73C\uBBC0\uB85C component \uB294 \uB8E8\uD2B8\uC5D0 SActionModal \uC744 \uB80C\uB354\uD558\uACE0, \uC8FC\uC785\uBC1B\uC740 open/onOpenChange/onClose \uB97C \uADF8\uB300\uB85C \uC804\uB2EC\uD574\uC57C \uD569\uB2C8\uB2E4. \uD655\uC778/\uCDE8\uC18C\uB294 SModal.confirm, \uB85C\uB529\uC740 SModal.loading \uC744 \uC0AC\uC6A9\uD558\uC138\uC694.`
|
|
3806
|
+
);
|
|
3807
|
+
}
|
|
3796
3808
|
function CreateMount({ options, refImpl }) {
|
|
3797
|
-
const {
|
|
3798
|
-
component: Component,
|
|
3799
|
-
componentProps,
|
|
3800
|
-
persistent,
|
|
3801
|
-
showClose,
|
|
3802
|
-
width,
|
|
3803
|
-
height,
|
|
3804
|
-
className,
|
|
3805
|
-
ariaTitle
|
|
3806
|
-
} = options;
|
|
3809
|
+
const { component: Component, componentProps } = options;
|
|
3807
3810
|
const [open, setOpen] = react.useState(true);
|
|
3808
3811
|
react.useEffect(() => {
|
|
3809
3812
|
refImpl._bindClose(() => setOpen(false));
|
|
3810
3813
|
refImpl._bindUpdate(() => {
|
|
3811
3814
|
});
|
|
3812
|
-
|
|
3815
|
+
warnIfNotModal(refImpl._getHost(), Component);
|
|
3816
|
+
}, [refImpl, Component]);
|
|
3813
3817
|
useExitTeardown(open, refImpl);
|
|
3814
3818
|
const componentAllProps = {
|
|
3815
3819
|
...componentProps,
|
|
3820
|
+
open,
|
|
3821
|
+
onOpenChange: (o) => {
|
|
3822
|
+
if (!o) refImpl._markDismissed();
|
|
3823
|
+
setOpen(o);
|
|
3824
|
+
},
|
|
3825
|
+
onClose: () => refImpl._emitClose(),
|
|
3816
3826
|
modalRef: refImpl
|
|
3817
3827
|
};
|
|
3818
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3819
|
-
SModalContainer,
|
|
3820
|
-
{
|
|
3821
|
-
open,
|
|
3822
|
-
onOpenChange: (o) => {
|
|
3823
|
-
if (!o) refImpl._markDismissed();
|
|
3824
|
-
setOpen(o);
|
|
3825
|
-
},
|
|
3826
|
-
persistent,
|
|
3827
|
-
showClose,
|
|
3828
|
-
onClose: () => refImpl.close(),
|
|
3829
|
-
ariaTitle,
|
|
3830
|
-
width,
|
|
3831
|
-
height,
|
|
3832
|
-
className,
|
|
3833
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Component, { ...componentAllProps })
|
|
3834
|
-
}
|
|
3835
|
-
);
|
|
3828
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Component, { ...componentAllProps });
|
|
3836
3829
|
}
|
|
3837
3830
|
function mount(render) {
|
|
3838
3831
|
const host = document.createElement("div");
|
|
@@ -3856,8 +3849,9 @@ var SModal = {
|
|
|
3856
3849
|
return mount((refImpl) => /* @__PURE__ */ jsxRuntime.jsx(LoadingMount, { options: { persistent: true, ...options }, refImpl }));
|
|
3857
3850
|
},
|
|
3858
3851
|
/**
|
|
3859
|
-
*
|
|
3860
|
-
*
|
|
3852
|
+
* SActionModal 을 루트로 렌더하는 컴포넌트를 띄운다. 컨테이너를 덧씌우지 않고 표시 제어
|
|
3853
|
+
* (open/onOpenChange/onClose)와 modalRef 만 주입하며, 닫힘 애니메이션 종료 후 자동으로
|
|
3854
|
+
* 언마운트한다. 컴포넌트가 모달을 띄우지 않으면 개발 모드에서 경고한다.
|
|
3861
3855
|
*/
|
|
3862
3856
|
create(options) {
|
|
3863
3857
|
return mount((refImpl) => /* @__PURE__ */ jsxRuntime.jsx(CreateMount, { options, refImpl }));
|