sellmate-design-system-react 0.1.9 → 0.1.10
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/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/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/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/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 +36 -17
- package/dist/components/SFilePicker/SFilePicker.cjs.map +1 -1
- package/dist/components/SFilePicker/SFilePicker.d.ts +1 -1
- package/dist/components/SFilePicker/SFilePicker.js +35 -17
- 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 +43 -22
- package/dist/components/SKeyValueTable/SKeyValueTable.cjs.map +1 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.js +43 -22
- 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 +72 -50
- package/dist/components/SLoadingModal/SLoadingModal.cjs.map +1 -1
- package/dist/components/SLoadingModal/SLoadingModal.d.ts +3 -1
- package/dist/components/SLoadingModal/SLoadingModal.js +72 -50
- package/dist/components/SLoadingModal/SLoadingModal.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/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 +8 -4
- package/dist/components/SSelect/SSelect.cjs.map +1 -1
- package/dist/components/SSelect/SSelect.js +8 -4
- package/dist/components/SSelect/SSelect.js.map +1 -1
- package/dist/components/STable/STable.cjs +82 -56
- package/dist/components/STable/STable.cjs.map +1 -1
- package/dist/components/STable/STable.js +82 -56
- package/dist/components/STable/STable.js.map +1 -1
- 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/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 +120 -74
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +120 -74
- package/dist/index.js.map +1 -1
- package/dist/styles.css +62 -21
- 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;
|
|
@@ -3148,12 +3148,35 @@ var COLOR_MAP = {
|
|
|
3148
3148
|
};
|
|
3149
3149
|
var clamp = (v) => Number.isFinite(v) ? Math.max(0, Math.min(100, v)) : 0;
|
|
3150
3150
|
var SCircleProgress = forwardRef(
|
|
3151
|
-
function SCircleProgress2({
|
|
3151
|
+
function SCircleProgress2({
|
|
3152
|
+
value = 0,
|
|
3153
|
+
type = "primary",
|
|
3154
|
+
indeterminate = false,
|
|
3155
|
+
label,
|
|
3156
|
+
innerValue = false,
|
|
3157
|
+
className,
|
|
3158
|
+
style
|
|
3159
|
+
}, ref) {
|
|
3152
3160
|
const v = clamp(value);
|
|
3153
3161
|
const colors = COLOR_MAP[type];
|
|
3154
3162
|
const c = VIEWBOX / 2;
|
|
3155
3163
|
const percentColor = v === 0 ? "var(--sys-color-fg-tertiary, #888888)" : colors.arc;
|
|
3156
3164
|
const filled = v / 100 * CIRCUMFERENCE;
|
|
3165
|
+
const showPercent = !indeterminate;
|
|
3166
|
+
const percentNode = /* @__PURE__ */ jsxs(
|
|
3167
|
+
"span",
|
|
3168
|
+
{
|
|
3169
|
+
className: cn(
|
|
3170
|
+
"text-center text-[16px] font-bold leading-[26px]",
|
|
3171
|
+
innerValue && "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"
|
|
3172
|
+
),
|
|
3173
|
+
style: { color: percentColor },
|
|
3174
|
+
children: [
|
|
3175
|
+
Math.round(v),
|
|
3176
|
+
"%"
|
|
3177
|
+
]
|
|
3178
|
+
}
|
|
3179
|
+
);
|
|
3157
3180
|
return /* @__PURE__ */ jsxs(
|
|
3158
3181
|
"div",
|
|
3159
3182
|
{
|
|
@@ -3164,57 +3187,53 @@ var SCircleProgress = forwardRef(
|
|
|
3164
3187
|
),
|
|
3165
3188
|
style,
|
|
3166
3189
|
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
|
-
}
|
|
3190
|
+
/* @__PURE__ */ jsxs("div", { className: cn(innerValue && "relative"), children: [
|
|
3191
|
+
/* @__PURE__ */ jsxs(
|
|
3192
|
+
"svg",
|
|
3193
|
+
{
|
|
3194
|
+
viewBox: `0 0 ${VIEWBOX} ${VIEWBOX}`,
|
|
3195
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3196
|
+
className: cn(
|
|
3197
|
+
"h-[80px] w-[80px]",
|
|
3198
|
+
indeterminate && "origin-center animate-circle-spin"
|
|
3184
3199
|
),
|
|
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 }
|
|
3200
|
+
children: [
|
|
3201
|
+
/* @__PURE__ */ jsx(
|
|
3202
|
+
"circle",
|
|
3203
|
+
{
|
|
3204
|
+
cx: c,
|
|
3205
|
+
cy: c,
|
|
3206
|
+
r: RADIUS,
|
|
3207
|
+
fill: "none",
|
|
3208
|
+
strokeWidth: STROKE,
|
|
3209
|
+
style: { stroke: colors.track }
|
|
3201
3210
|
}
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3211
|
+
),
|
|
3212
|
+
/* @__PURE__ */ jsx(
|
|
3213
|
+
"circle",
|
|
3214
|
+
{
|
|
3215
|
+
cx: c,
|
|
3216
|
+
cy: c,
|
|
3217
|
+
r: RADIUS,
|
|
3218
|
+
fill: "none",
|
|
3219
|
+
strokeWidth: STROKE,
|
|
3220
|
+
strokeLinecap: "round",
|
|
3221
|
+
className: cn(
|
|
3222
|
+
"origin-center",
|
|
3223
|
+
indeterminate ? "animate-circle-arc" : "-rotate-90 transition-[stroke-dasharray] duration-[400ms] ease-linear"
|
|
3224
|
+
),
|
|
3225
|
+
style: {
|
|
3226
|
+
stroke: colors.arc,
|
|
3227
|
+
...indeterminate ? {} : { strokeDasharray: `${filled} ${CIRCUMFERENCE}`, strokeDashoffset: 0 }
|
|
3228
|
+
}
|
|
3229
|
+
}
|
|
3230
|
+
)
|
|
3231
|
+
]
|
|
3232
|
+
}
|
|
3233
|
+
),
|
|
3234
|
+
showPercent && innerValue && percentNode
|
|
3235
|
+
] }),
|
|
3236
|
+
showPercent && !innerValue && percentNode,
|
|
3218
3237
|
label && /* @__PURE__ */ jsx("span", { className: "text-center text-[12px] font-normal leading-[20px] text-[color:var(--cmp-progress-color-label)]", children: label })
|
|
3219
3238
|
]
|
|
3220
3239
|
}
|
|
@@ -3398,6 +3417,7 @@ var DEFAULT_BUTTON_LABEL = {
|
|
|
3398
3417
|
function SLoadingModal({
|
|
3399
3418
|
open,
|
|
3400
3419
|
onOpenChange,
|
|
3420
|
+
onClose,
|
|
3401
3421
|
persistent,
|
|
3402
3422
|
state = "loading",
|
|
3403
3423
|
progress,
|
|
@@ -3416,6 +3436,8 @@ function SLoadingModal({
|
|
|
3416
3436
|
{
|
|
3417
3437
|
open,
|
|
3418
3438
|
onOpenChange,
|
|
3439
|
+
onClose,
|
|
3440
|
+
showClose: state === "error",
|
|
3419
3441
|
persistent,
|
|
3420
3442
|
ariaTitle: lines[0] || "\uB85C\uB529 \uC911",
|
|
3421
3443
|
width,
|