sellmate-design-system-react 0.1.9 → 0.1.11
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 -1
- package/dist/components/SActionModal/SActionModal.cjs.map +1 -1
- package/dist/components/SActionModal/SActionModal.js +3 -1
- package/dist/components/SActionModal/SActionModal.js.map +1 -1
- package/dist/components/SBarcodeInput/SBarcodeInput.cjs +16 -3
- package/dist/components/SBarcodeInput/SBarcodeInput.cjs.map +1 -1
- package/dist/components/SBarcodeInput/SBarcodeInput.d.ts +3 -1
- package/dist/components/SBarcodeInput/SBarcodeInput.js +16 -3
- package/dist/components/SBarcodeInput/SBarcodeInput.js.map +1 -1
- package/dist/components/SCalendar/SCalendar.cjs +2 -0
- package/dist/components/SCalendar/SCalendar.cjs.map +1 -1
- package/dist/components/SCalendar/SCalendar.js +2 -0
- package/dist/components/SCalendar/SCalendar.js.map +1 -1
- package/dist/components/SChip/SChip.cjs +2 -0
- package/dist/components/SChip/SChip.cjs.map +1 -1
- package/dist/components/SChip/SChip.js +2 -0
- package/dist/components/SChip/SChip.js.map +1 -1
- package/dist/components/SChipInput/SChipInput.cjs +22 -4
- package/dist/components/SChipInput/SChipInput.cjs.map +1 -1
- package/dist/components/SChipInput/SChipInput.d.ts +5 -0
- package/dist/components/SChipInput/SChipInput.js +22 -4
- package/dist/components/SChipInput/SChipInput.js.map +1 -1
- package/dist/components/SChipInput/index.d.ts +1 -1
- package/dist/components/SCircleProgress/SCircleProgress.cjs +69 -50
- package/dist/components/SCircleProgress/SCircleProgress.cjs.map +1 -1
- package/dist/components/SCircleProgress/SCircleProgress.d.ts +2 -0
- package/dist/components/SCircleProgress/SCircleProgress.js +69 -50
- package/dist/components/SCircleProgress/SCircleProgress.js.map +1 -1
- package/dist/components/SConfirmModal/SConfirmModal.cjs +13 -10
- package/dist/components/SConfirmModal/SConfirmModal.cjs.map +1 -1
- package/dist/components/SConfirmModal/SConfirmModal.d.ts +7 -4
- package/dist/components/SConfirmModal/SConfirmModal.js +13 -10
- package/dist/components/SConfirmModal/SConfirmModal.js.map +1 -1
- package/dist/components/SDatePicker/SDatePicker.cjs +16 -3
- package/dist/components/SDatePicker/SDatePicker.cjs.map +1 -1
- package/dist/components/SDatePicker/SDatePicker.d.ts +3 -1
- package/dist/components/SDatePicker/SDatePicker.js +16 -3
- package/dist/components/SDatePicker/SDatePicker.js.map +1 -1
- package/dist/components/SDateRangePicker/SDateRangePicker.cjs +16 -3
- package/dist/components/SDateRangePicker/SDateRangePicker.cjs.map +1 -1
- package/dist/components/SDateRangePicker/SDateRangePicker.d.ts +3 -1
- package/dist/components/SDateRangePicker/SDateRangePicker.js +16 -3
- package/dist/components/SDateRangePicker/SDateRangePicker.js.map +1 -1
- package/dist/components/SDropdownButton/SDropdownButton.cjs +2 -0
- package/dist/components/SDropdownButton/SDropdownButton.cjs.map +1 -1
- package/dist/components/SDropdownButton/SDropdownButton.js +2 -0
- package/dist/components/SDropdownButton/SDropdownButton.js.map +1 -1
- package/dist/components/SField/SField.cjs +14 -3
- package/dist/components/SField/SField.cjs.map +1 -1
- package/dist/components/SField/SField.d.ts +4 -1
- package/dist/components/SField/SField.js +14 -3
- package/dist/components/SField/SField.js.map +1 -1
- package/dist/components/SFilePicker/SFilePicker.cjs +51 -19
- package/dist/components/SFilePicker/SFilePicker.cjs.map +1 -1
- package/dist/components/SFilePicker/SFilePicker.d.ts +4 -2
- package/dist/components/SFilePicker/SFilePicker.js +50 -19
- package/dist/components/SFilePicker/SFilePicker.js.map +1 -1
- package/dist/components/SGhostButton/SGhostButton.cjs +2 -0
- package/dist/components/SGhostButton/SGhostButton.cjs.map +1 -1
- package/dist/components/SGhostButton/SGhostButton.js +2 -0
- package/dist/components/SGhostButton/SGhostButton.js.map +1 -1
- package/dist/components/SGuide/SGuide.cjs +2 -0
- package/dist/components/SGuide/SGuide.cjs.map +1 -1
- package/dist/components/SGuide/SGuide.js +2 -0
- package/dist/components/SGuide/SGuide.js.map +1 -1
- package/dist/components/SInput/SInput.cjs +16 -3
- package/dist/components/SInput/SInput.cjs.map +1 -1
- package/dist/components/SInput/SInput.d.ts +4 -1
- package/dist/components/SInput/SInput.js +16 -3
- package/dist/components/SInput/SInput.js.map +1 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.cjs +530 -219
- package/dist/components/SKeyValueTable/SKeyValueTable.cjs.map +1 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.d.ts +27 -6
- package/dist/components/SKeyValueTable/SKeyValueTable.js +529 -218
- package/dist/components/SKeyValueTable/SKeyValueTable.js.map +1 -1
- package/dist/components/SLoadingContainer/SLoadingContainer.cjs +69 -50
- package/dist/components/SLoadingContainer/SLoadingContainer.cjs.map +1 -1
- package/dist/components/SLoadingContainer/SLoadingContainer.js +69 -50
- package/dist/components/SLoadingContainer/SLoadingContainer.js.map +1 -1
- package/dist/components/SLoadingContainer/loading.cjs +69 -50
- package/dist/components/SLoadingContainer/loading.cjs.map +1 -1
- package/dist/components/SLoadingContainer/loading.js +69 -50
- package/dist/components/SLoadingContainer/loading.js.map +1 -1
- package/dist/components/SLoadingModal/SLoadingModal.cjs +75 -51
- package/dist/components/SLoadingModal/SLoadingModal.cjs.map +1 -1
- package/dist/components/SLoadingModal/SLoadingModal.d.ts +3 -1
- package/dist/components/SLoadingModal/SLoadingModal.js +75 -51
- package/dist/components/SLoadingModal/SLoadingModal.js.map +1 -1
- package/dist/components/SModalContainer/SModalContainer.cjs +3 -1
- package/dist/components/SModalContainer/SModalContainer.cjs.map +1 -1
- package/dist/components/SModalContainer/SModalContainer.js +3 -1
- package/dist/components/SModalContainer/SModalContainer.js.map +1 -1
- package/dist/components/SNumberInput/SNumberInput.cjs +16 -3
- package/dist/components/SNumberInput/SNumberInput.cjs.map +1 -1
- package/dist/components/SNumberInput/SNumberInput.d.ts +2 -0
- package/dist/components/SNumberInput/SNumberInput.js +16 -3
- package/dist/components/SNumberInput/SNumberInput.js.map +1 -1
- package/dist/components/SPopover/SPopover.cjs +2 -0
- package/dist/components/SPopover/SPopover.cjs.map +1 -1
- package/dist/components/SPopover/SPopover.js +2 -0
- package/dist/components/SPopover/SPopover.js.map +1 -1
- package/dist/components/SPortal/SPortal.cjs +2 -0
- package/dist/components/SPortal/SPortal.cjs.map +1 -1
- package/dist/components/SPortal/SPortal.js +2 -0
- package/dist/components/SPortal/SPortal.js.map +1 -1
- package/dist/components/SRadio/SRadioGroup.cjs +1 -1
- package/dist/components/SRadio/SRadioGroup.cjs.map +1 -1
- package/dist/components/SRadio/SRadioGroup.js +1 -1
- package/dist/components/SRadio/SRadioGroup.js.map +1 -1
- package/dist/components/SSelect/SSelect.cjs +530 -258
- package/dist/components/SSelect/SSelect.cjs.map +1 -1
- package/dist/components/SSelect/SSelect.d.ts +4 -2
- package/dist/components/SSelect/SSelect.js +531 -258
- package/dist/components/SSelect/SSelect.js.map +1 -1
- package/dist/components/STable/STable.cjs +603 -309
- package/dist/components/STable/STable.cjs.map +1 -1
- package/dist/components/STable/STable.js +604 -309
- package/dist/components/STable/STable.js.map +1 -1
- package/dist/components/STextLink/STextLink.cjs +2 -0
- package/dist/components/STextLink/STextLink.cjs.map +1 -1
- package/dist/components/STextLink/STextLink.js +2 -0
- package/dist/components/STextLink/STextLink.js.map +1 -1
- package/dist/components/STextarea/STextarea.cjs +16 -3
- package/dist/components/STextarea/STextarea.cjs.map +1 -1
- package/dist/components/STextarea/STextarea.d.ts +2 -0
- package/dist/components/STextarea/STextarea.js +16 -3
- package/dist/components/STextarea/STextarea.js.map +1 -1
- package/dist/components/SToast/SToast.cjs +2 -0
- package/dist/components/SToast/SToast.cjs.map +1 -1
- package/dist/components/SToast/SToast.js +2 -0
- package/dist/components/SToast/SToast.js.map +1 -1
- package/dist/components/SToast/SToastContainer.cjs +2 -0
- package/dist/components/SToast/SToastContainer.cjs.map +1 -1
- package/dist/components/SToast/SToastContainer.js +2 -0
- package/dist/components/SToast/SToastContainer.js.map +1 -1
- package/dist/components/STooltip/STooltip.cjs +3 -1
- package/dist/components/STooltip/STooltip.cjs.map +1 -1
- package/dist/components/STooltip/STooltip.js +3 -1
- package/dist/components/STooltip/STooltip.js.map +1 -1
- package/dist/index.cjs +522 -248
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +523 -248
- package/dist/index.js.map +1 -1
- package/dist/lib/portal-container.d.ts +7 -0
- package/dist/styles.css +123 -58
- package/dist/theme.css +45 -21
- package/package.json +1 -1
|
@@ -2,6 +2,8 @@ export type LoadingModalState = 'loading' | 'error';
|
|
|
2
2
|
export interface SLoadingModalProps {
|
|
3
3
|
open?: boolean;
|
|
4
4
|
onOpenChange?: (open: boolean) => void;
|
|
5
|
+
/** 닫기(X) 버튼 클릭 (sdClose) — error 상태에서만 노출 */
|
|
6
|
+
onClose?: () => void;
|
|
5
7
|
/** true면 백드롭·ESC로 안 닫히고 흔들림 (sd-modal-container persistent). 로딩 중 닫힘 방지에 유용 */
|
|
6
8
|
persistent?: boolean;
|
|
7
9
|
/** 상태 (loading: 스피너, error: 경고 아이콘) */
|
|
@@ -20,4 +22,4 @@ export interface SLoadingModalProps {
|
|
|
20
22
|
height?: number | string;
|
|
21
23
|
}
|
|
22
24
|
/** SLoadingModal — sd-loading-modal 포팅. state(loading/error) + progress + 옵션 버튼. */
|
|
23
|
-
export declare function SLoadingModal({ open, onOpenChange, persistent, state, progress, message, useButton, buttonLabel, onButtonClick, width, height, }: SLoadingModalProps): import("react").JSX.Element;
|
|
25
|
+
export declare function SLoadingModal({ open, onOpenChange, onClose, persistent, state, progress, message, useButton, buttonLabel, onButtonClick, width, height, }: SLoadingModalProps): import("react").JSX.Element;
|
|
@@ -17,7 +17,9 @@ function cn(...inputs) {
|
|
|
17
17
|
return twMerge(clsx(inputs));
|
|
18
18
|
}
|
|
19
19
|
var PortalContainerContext = createContext(null);
|
|
20
|
+
var InsideModalContext = createContext(false);
|
|
20
21
|
var PortalContainerProvider = PortalContainerContext.Provider;
|
|
22
|
+
var InsideModalProvider = InsideModalContext.Provider;
|
|
21
23
|
function usePortalContainer() {
|
|
22
24
|
return useContext(PortalContainerContext) ?? void 0;
|
|
23
25
|
}
|
|
@@ -3125,7 +3127,7 @@ function SModalContainer({
|
|
|
3125
3127
|
className: "absolute right-[16px] top-[16px] z-10"
|
|
3126
3128
|
}
|
|
3127
3129
|
),
|
|
3128
|
-
/* @__PURE__ */ jsx(PortalContainerProvider, { value: portalContainer, children })
|
|
3130
|
+
/* @__PURE__ */ jsx(InsideModalProvider, { value: true, children: /* @__PURE__ */ jsx(PortalContainerProvider, { value: portalContainer, children }) })
|
|
3129
3131
|
]
|
|
3130
3132
|
}
|
|
3131
3133
|
)
|
|
@@ -3148,12 +3150,35 @@ var COLOR_MAP = {
|
|
|
3148
3150
|
};
|
|
3149
3151
|
var clamp = (v) => Number.isFinite(v) ? Math.max(0, Math.min(100, v)) : 0;
|
|
3150
3152
|
var SCircleProgress = forwardRef(
|
|
3151
|
-
function SCircleProgress2({
|
|
3153
|
+
function SCircleProgress2({
|
|
3154
|
+
value = 0,
|
|
3155
|
+
type = "primary",
|
|
3156
|
+
indeterminate = false,
|
|
3157
|
+
label,
|
|
3158
|
+
innerValue = false,
|
|
3159
|
+
className,
|
|
3160
|
+
style
|
|
3161
|
+
}, ref) {
|
|
3152
3162
|
const v = clamp(value);
|
|
3153
3163
|
const colors = COLOR_MAP[type];
|
|
3154
3164
|
const c = VIEWBOX / 2;
|
|
3155
3165
|
const percentColor = v === 0 ? "var(--sys-color-fg-tertiary, #888888)" : colors.arc;
|
|
3156
3166
|
const filled = v / 100 * CIRCUMFERENCE;
|
|
3167
|
+
const showPercent = !indeterminate;
|
|
3168
|
+
const percentNode = /* @__PURE__ */ jsxs(
|
|
3169
|
+
"span",
|
|
3170
|
+
{
|
|
3171
|
+
className: cn(
|
|
3172
|
+
"text-center text-[16px] font-bold leading-[26px]",
|
|
3173
|
+
innerValue && "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"
|
|
3174
|
+
),
|
|
3175
|
+
style: { color: percentColor },
|
|
3176
|
+
children: [
|
|
3177
|
+
Math.round(v),
|
|
3178
|
+
"%"
|
|
3179
|
+
]
|
|
3180
|
+
}
|
|
3181
|
+
);
|
|
3157
3182
|
return /* @__PURE__ */ jsxs(
|
|
3158
3183
|
"div",
|
|
3159
3184
|
{
|
|
@@ -3164,57 +3189,53 @@ var SCircleProgress = forwardRef(
|
|
|
3164
3189
|
),
|
|
3165
3190
|
style,
|
|
3166
3191
|
children: [
|
|
3167
|
-
/* @__PURE__ */ jsxs(
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
"circle"
|
|
3176
|
-
{
|
|
3177
|
-
cx: c,
|
|
3178
|
-
cy: c,
|
|
3179
|
-
r: RADIUS,
|
|
3180
|
-
fill: "none",
|
|
3181
|
-
strokeWidth: STROKE,
|
|
3182
|
-
style: { stroke: colors.track }
|
|
3183
|
-
}
|
|
3192
|
+
/* @__PURE__ */ jsxs("div", { className: cn(innerValue && "relative"), children: [
|
|
3193
|
+
/* @__PURE__ */ jsxs(
|
|
3194
|
+
"svg",
|
|
3195
|
+
{
|
|
3196
|
+
viewBox: `0 0 ${VIEWBOX} ${VIEWBOX}`,
|
|
3197
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3198
|
+
className: cn(
|
|
3199
|
+
"h-[80px] w-[80px]",
|
|
3200
|
+
indeterminate && "origin-center animate-circle-spin"
|
|
3184
3201
|
),
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
"origin-center",
|
|
3196
|
-
indeterminate ? "animate-circle-arc" : "-rotate-90 transition-[stroke-dasharray] duration-[400ms] ease-linear"
|
|
3197
|
-
),
|
|
3198
|
-
style: {
|
|
3199
|
-
stroke: colors.arc,
|
|
3200
|
-
...indeterminate ? {} : { strokeDasharray: `${filled} ${CIRCUMFERENCE}`, strokeDashoffset: 0 }
|
|
3202
|
+
children: [
|
|
3203
|
+
/* @__PURE__ */ jsx(
|
|
3204
|
+
"circle",
|
|
3205
|
+
{
|
|
3206
|
+
cx: c,
|
|
3207
|
+
cy: c,
|
|
3208
|
+
r: RADIUS,
|
|
3209
|
+
fill: "none",
|
|
3210
|
+
strokeWidth: STROKE,
|
|
3211
|
+
style: { stroke: colors.track }
|
|
3201
3212
|
}
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3213
|
+
),
|
|
3214
|
+
/* @__PURE__ */ jsx(
|
|
3215
|
+
"circle",
|
|
3216
|
+
{
|
|
3217
|
+
cx: c,
|
|
3218
|
+
cy: c,
|
|
3219
|
+
r: RADIUS,
|
|
3220
|
+
fill: "none",
|
|
3221
|
+
strokeWidth: STROKE,
|
|
3222
|
+
strokeLinecap: "round",
|
|
3223
|
+
className: cn(
|
|
3224
|
+
"origin-center",
|
|
3225
|
+
indeterminate ? "animate-circle-arc" : "-rotate-90 transition-[stroke-dasharray] duration-[400ms] ease-linear"
|
|
3226
|
+
),
|
|
3227
|
+
style: {
|
|
3228
|
+
stroke: colors.arc,
|
|
3229
|
+
...indeterminate ? {} : { strokeDasharray: `${filled} ${CIRCUMFERENCE}`, strokeDashoffset: 0 }
|
|
3230
|
+
}
|
|
3231
|
+
}
|
|
3232
|
+
)
|
|
3233
|
+
]
|
|
3234
|
+
}
|
|
3235
|
+
),
|
|
3236
|
+
showPercent && innerValue && percentNode
|
|
3237
|
+
] }),
|
|
3238
|
+
showPercent && !innerValue && percentNode,
|
|
3218
3239
|
label && /* @__PURE__ */ jsx("span", { className: "text-center text-[12px] font-normal leading-[20px] text-[color:var(--cmp-progress-color-label)]", children: label })
|
|
3219
3240
|
]
|
|
3220
3241
|
}
|
|
@@ -3398,6 +3419,7 @@ var DEFAULT_BUTTON_LABEL = {
|
|
|
3398
3419
|
function SLoadingModal({
|
|
3399
3420
|
open,
|
|
3400
3421
|
onOpenChange,
|
|
3422
|
+
onClose,
|
|
3401
3423
|
persistent,
|
|
3402
3424
|
state = "loading",
|
|
3403
3425
|
progress,
|
|
@@ -3416,6 +3438,8 @@ function SLoadingModal({
|
|
|
3416
3438
|
{
|
|
3417
3439
|
open,
|
|
3418
3440
|
onOpenChange,
|
|
3441
|
+
onClose,
|
|
3442
|
+
showClose: state === "error",
|
|
3419
3443
|
persistent,
|
|
3420
3444
|
ariaTitle: lines[0] || "\uB85C\uB529 \uC911",
|
|
3421
3445
|
width,
|