sellmate-design-system-react 0.1.7 → 0.1.9
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 +11 -3
- package/dist/components/SActionModal/SActionModal.cjs.map +1 -1
- package/dist/components/SActionModal/SActionModal.js +11 -3
- package/dist/components/SActionModal/SActionModal.js.map +1 -1
- package/dist/components/SBarcodeInput/SBarcodeInput.cjs +226 -209
- package/dist/components/SBarcodeInput/SBarcodeInput.cjs.map +1 -1
- package/dist/components/SBarcodeInput/SBarcodeInput.js +226 -209
- package/dist/components/SBarcodeInput/SBarcodeInput.js.map +1 -1
- package/dist/components/SCalendar/SCalendar.cjs +9 -1
- package/dist/components/SCalendar/SCalendar.cjs.map +1 -1
- package/dist/components/SCalendar/SCalendar.js +9 -1
- package/dist/components/SCalendar/SCalendar.js.map +1 -1
- package/dist/components/SChip/SChip.cjs +9 -1
- package/dist/components/SChip/SChip.cjs.map +1 -1
- package/dist/components/SChip/SChip.d.ts +1 -1
- package/dist/components/SChip/SChip.js +9 -1
- package/dist/components/SChip/SChip.js.map +1 -1
- package/dist/components/SChipInput/SChipInput.cjs +260 -235
- package/dist/components/SChipInput/SChipInput.cjs.map +1 -1
- package/dist/components/SChipInput/SChipInput.js +259 -235
- package/dist/components/SChipInput/SChipInput.js.map +1 -1
- package/dist/components/SCircleProgress/SCircleProgress.cjs +56 -58
- package/dist/components/SCircleProgress/SCircleProgress.cjs.map +1 -1
- package/dist/components/SCircleProgress/SCircleProgress.js +56 -58
- package/dist/components/SCircleProgress/SCircleProgress.js.map +1 -1
- package/dist/components/SConfirmModal/SConfirmModal.cjs +9 -1
- package/dist/components/SConfirmModal/SConfirmModal.cjs.map +1 -1
- package/dist/components/SConfirmModal/SConfirmModal.js +9 -1
- package/dist/components/SConfirmModal/SConfirmModal.js.map +1 -1
- package/dist/components/SDatePicker/SDatePicker.cjs +247 -221
- package/dist/components/SDatePicker/SDatePicker.cjs.map +1 -1
- package/dist/components/SDatePicker/SDatePicker.js +247 -221
- package/dist/components/SDatePicker/SDatePicker.js.map +1 -1
- package/dist/components/SDateRangePicker/SDateRangePicker.cjs +308 -256
- package/dist/components/SDateRangePicker/SDateRangePicker.cjs.map +1 -1
- package/dist/components/SDateRangePicker/SDateRangePicker.js +308 -256
- package/dist/components/SDateRangePicker/SDateRangePicker.js.map +1 -1
- package/dist/components/SDropdownButton/SDropdownButton.cjs +51 -4
- package/dist/components/SDropdownButton/SDropdownButton.cjs.map +1 -1
- package/dist/components/SDropdownButton/SDropdownButton.js +52 -5
- package/dist/components/SDropdownButton/SDropdownButton.js.map +1 -1
- package/dist/components/SField/SField.cjs +226 -21
- package/dist/components/SField/SField.cjs.map +1 -1
- package/dist/components/SField/SField.d.ts +11 -0
- package/dist/components/SField/SField.js +226 -21
- package/dist/components/SField/SField.js.map +1 -1
- package/dist/components/SFilePicker/SFilePicker.cjs +306 -278
- package/dist/components/SFilePicker/SFilePicker.cjs.map +1 -1
- package/dist/components/SFilePicker/SFilePicker.d.ts +4 -2
- package/dist/components/SFilePicker/SFilePicker.js +306 -278
- package/dist/components/SFilePicker/SFilePicker.js.map +1 -1
- package/dist/components/SGhostButton/SGhostButton.cjs +8 -0
- package/dist/components/SGhostButton/SGhostButton.cjs.map +1 -1
- package/dist/components/SGhostButton/SGhostButton.js +8 -0
- package/dist/components/SGhostButton/SGhostButton.js.map +1 -1
- package/dist/components/SGuide/SGuide.cjs +12 -1
- package/dist/components/SGuide/SGuide.cjs.map +1 -1
- package/dist/components/SGuide/SGuide.js +12 -1
- package/dist/components/SGuide/SGuide.js.map +1 -1
- package/dist/components/SInput/SInput.cjs +226 -209
- package/dist/components/SInput/SInput.cjs.map +1 -1
- package/dist/components/SInput/SInput.js +226 -209
- package/dist/components/SInput/SInput.js.map +1 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.cjs +640 -453
- package/dist/components/SKeyValueTable/SKeyValueTable.cjs.map +1 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.d.ts +3 -1
- package/dist/components/SKeyValueTable/SKeyValueTable.js +640 -453
- package/dist/components/SKeyValueTable/SKeyValueTable.js.map +1 -1
- package/dist/components/SLoadingContainer/SLoadingContainer.cjs +64 -58
- package/dist/components/SLoadingContainer/SLoadingContainer.cjs.map +1 -1
- package/dist/components/SLoadingContainer/SLoadingContainer.js +64 -58
- package/dist/components/SLoadingContainer/SLoadingContainer.js.map +1 -1
- package/dist/components/SLoadingContainer/loading.cjs +64 -58
- package/dist/components/SLoadingContainer/loading.cjs.map +1 -1
- package/dist/components/SLoadingContainer/loading.js +64 -58
- package/dist/components/SLoadingContainer/loading.js.map +1 -1
- package/dist/components/SLoadingModal/SLoadingModal.cjs +68 -61
- package/dist/components/SLoadingModal/SLoadingModal.cjs.map +1 -1
- package/dist/components/SLoadingModal/SLoadingModal.js +68 -61
- package/dist/components/SLoadingModal/SLoadingModal.js.map +1 -1
- package/dist/components/SModalContainer/SModalContainer.cjs +9 -1
- package/dist/components/SModalContainer/SModalContainer.cjs.map +1 -1
- package/dist/components/SModalContainer/SModalContainer.js +9 -1
- package/dist/components/SModalContainer/SModalContainer.js.map +1 -1
- package/dist/components/SNumberInput/SNumberInput.cjs +334 -50
- package/dist/components/SNumberInput/SNumberInput.cjs.map +1 -1
- package/dist/components/SNumberInput/SNumberInput.d.ts +2 -0
- package/dist/components/SNumberInput/SNumberInput.js +334 -50
- package/dist/components/SNumberInput/SNumberInput.js.map +1 -1
- package/dist/components/SPagination/SPagination.cjs +1 -1
- package/dist/components/SPagination/SPagination.cjs.map +1 -1
- package/dist/components/SPagination/SPagination.js +1 -1
- package/dist/components/SPagination/SPagination.js.map +1 -1
- package/dist/components/SPopover/SPopover.cjs +20 -3
- package/dist/components/SPopover/SPopover.cjs.map +1 -1
- package/dist/components/SPopover/SPopover.js +20 -4
- package/dist/components/SPopover/SPopover.js.map +1 -1
- package/dist/components/SPopup/SPopup.cjs +2 -2
- package/dist/components/SPopup/SPopup.cjs.map +1 -1
- package/dist/components/SPopup/SPopup.js +2 -2
- package/dist/components/SPopup/SPopup.js.map +1 -1
- package/dist/components/SPortal/SPortal.cjs +8 -0
- package/dist/components/SPortal/SPortal.cjs.map +1 -1
- package/dist/components/SPortal/SPortal.js +8 -0
- package/dist/components/SPortal/SPortal.js.map +1 -1
- package/dist/components/SSelect/SSelect.cjs +76 -32
- package/dist/components/SSelect/SSelect.cjs.map +1 -1
- package/dist/components/SSelect/SSelect.js +76 -32
- package/dist/components/SSelect/SSelect.js.map +1 -1
- package/dist/components/STable/STable.cjs +133 -91
- package/dist/components/STable/STable.cjs.map +1 -1
- package/dist/components/STable/STable.js +133 -91
- package/dist/components/STable/STable.js.map +1 -1
- package/dist/components/STextLink/STextLink.cjs +137 -3
- package/dist/components/STextLink/STextLink.cjs.map +1 -1
- package/dist/components/STextLink/STextLink.d.ts +1 -1
- package/dist/components/STextLink/STextLink.js +118 -4
- package/dist/components/STextLink/STextLink.js.map +1 -1
- package/dist/components/STextarea/STextarea.cjs +226 -21
- package/dist/components/STextarea/STextarea.cjs.map +1 -1
- package/dist/components/STextarea/STextarea.js +226 -21
- package/dist/components/STextarea/STextarea.js.map +1 -1
- package/dist/components/SToast/SToast.cjs +8 -0
- package/dist/components/SToast/SToast.cjs.map +1 -1
- package/dist/components/SToast/SToast.js +8 -0
- package/dist/components/SToast/SToast.js.map +1 -1
- package/dist/components/SToast/SToastContainer.cjs +11 -3
- package/dist/components/SToast/SToastContainer.cjs.map +1 -1
- package/dist/components/SToast/SToastContainer.js +11 -3
- package/dist/components/SToast/SToastContainer.js.map +1 -1
- package/dist/components/STooltip/STooltip.cjs +217 -14
- package/dist/components/STooltip/STooltip.cjs.map +1 -1
- package/dist/components/STooltip/STooltip.js +217 -14
- package/dist/components/STooltip/STooltip.js.map +1 -1
- package/dist/index.cjs +532 -300
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +531 -300
- package/dist/index.js.map +1 -1
- package/dist/lib/floating-anim.cjs +8 -0
- package/dist/lib/floating-anim.cjs.map +1 -1
- package/dist/lib/floating-anim.d.ts +5 -1
- package/dist/lib/floating-anim.js +8 -0
- package/dist/lib/floating-anim.js.map +1 -1
- package/dist/styles.css +175 -66
- package/dist/theme.css +49 -22
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -6,6 +6,7 @@ var react = require('react');
|
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var reactDom = require('react-dom');
|
|
8
8
|
var client = require('react-dom/client');
|
|
9
|
+
var RTooltip = require('@radix-ui/react-tooltip');
|
|
9
10
|
var RDropdown = require('@radix-ui/react-dropdown-menu');
|
|
10
11
|
var RPopover2 = require('@radix-ui/react-popover');
|
|
11
12
|
var RSwitch = require('@radix-ui/react-switch');
|
|
@@ -31,6 +32,7 @@ function _interopNamespace(e) {
|
|
|
31
32
|
return Object.freeze(n);
|
|
32
33
|
}
|
|
33
34
|
|
|
35
|
+
var RTooltip__namespace = /*#__PURE__*/_interopNamespace(RTooltip);
|
|
34
36
|
var RDropdown__namespace = /*#__PURE__*/_interopNamespace(RDropdown);
|
|
35
37
|
var RPopover2__namespace = /*#__PURE__*/_interopNamespace(RPopover2);
|
|
36
38
|
var RSwitch__namespace = /*#__PURE__*/_interopNamespace(RSwitch);
|
|
@@ -3318,11 +3320,11 @@ var RADIUS = 34;
|
|
|
3318
3320
|
var STROKE = 12;
|
|
3319
3321
|
var CIRCUMFERENCE = 2 * Math.PI * RADIUS;
|
|
3320
3322
|
var COLOR_MAP = {
|
|
3321
|
-
primary: { arc: "var(--cmp-
|
|
3323
|
+
primary: { arc: "var(--cmp-progress-active-color)", track: "var(--cmp-progress-color-track)" },
|
|
3322
3324
|
// inverse: 어두운 배경용 — arc 흰색, track 은 흰색 40%(회색 링)
|
|
3323
3325
|
inverse: { arc: "var(--color-white)", track: "rgba(255,255,255,0.4)" },
|
|
3324
|
-
error: { arc: "var(--color-red-75)", track: "var(--cmp-
|
|
3325
|
-
complete: { arc: "#01BB4B", track: "var(--cmp-
|
|
3326
|
+
error: { arc: "var(--color-red-75)", track: "var(--cmp-progress-color-track)" },
|
|
3327
|
+
complete: { arc: "#01BB4B", track: "var(--cmp-progress-color-track)" }
|
|
3326
3328
|
};
|
|
3327
3329
|
var clamp2 = (v) => Number.isFinite(v) ? Math.max(0, Math.min(100, v)) : 0;
|
|
3328
3330
|
var SCircleProgress = react.forwardRef(
|
|
@@ -3336,65 +3338,63 @@ var SCircleProgress = react.forwardRef(
|
|
|
3336
3338
|
"div",
|
|
3337
3339
|
{
|
|
3338
3340
|
ref,
|
|
3339
|
-
className: cn(
|
|
3341
|
+
className: cn(
|
|
3342
|
+
"inline-flex flex-col items-center gap-[var(--cmp-progress-circular-gap)]",
|
|
3343
|
+
className
|
|
3344
|
+
),
|
|
3340
3345
|
style,
|
|
3341
3346
|
children: [
|
|
3342
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
{
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3347
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3348
|
+
"svg",
|
|
3349
|
+
{
|
|
3350
|
+
viewBox: `0 0 ${VIEWBOX} ${VIEWBOX}`,
|
|
3351
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3352
|
+
className: cn("h-[80px] w-[80px]", indeterminate && "origin-center animate-circle-spin"),
|
|
3353
|
+
children: [
|
|
3354
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3355
|
+
"circle",
|
|
3356
|
+
{
|
|
3357
|
+
cx: c,
|
|
3358
|
+
cy: c,
|
|
3359
|
+
r: RADIUS,
|
|
3360
|
+
fill: "none",
|
|
3361
|
+
strokeWidth: STROKE,
|
|
3362
|
+
style: { stroke: colors.track }
|
|
3363
|
+
}
|
|
3351
3364
|
),
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
cy: c,
|
|
3369
|
-
r: RADIUS,
|
|
3370
|
-
fill: "none",
|
|
3371
|
-
strokeWidth: STROKE,
|
|
3372
|
-
strokeLinecap: "round",
|
|
3373
|
-
className: cn(
|
|
3374
|
-
"origin-center",
|
|
3375
|
-
indeterminate ? "animate-circle-arc" : "-rotate-90 transition-[stroke-dasharray] duration-[400ms] ease-linear"
|
|
3376
|
-
),
|
|
3377
|
-
style: {
|
|
3378
|
-
stroke: colors.arc,
|
|
3379
|
-
...indeterminate ? {} : { strokeDasharray: `${filled} ${CIRCUMFERENCE}`, strokeDashoffset: 0 }
|
|
3380
|
-
}
|
|
3365
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3366
|
+
"circle",
|
|
3367
|
+
{
|
|
3368
|
+
cx: c,
|
|
3369
|
+
cy: c,
|
|
3370
|
+
r: RADIUS,
|
|
3371
|
+
fill: "none",
|
|
3372
|
+
strokeWidth: STROKE,
|
|
3373
|
+
strokeLinecap: "round",
|
|
3374
|
+
className: cn(
|
|
3375
|
+
"origin-center",
|
|
3376
|
+
indeterminate ? "animate-circle-arc" : "-rotate-90 transition-[stroke-dasharray] duration-[400ms] ease-linear"
|
|
3377
|
+
),
|
|
3378
|
+
style: {
|
|
3379
|
+
stroke: colors.arc,
|
|
3380
|
+
...indeterminate ? {} : { strokeDasharray: `${filled} ${CIRCUMFERENCE}`, strokeDashoffset: 0 }
|
|
3381
3381
|
}
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3382
|
+
}
|
|
3383
|
+
)
|
|
3384
|
+
]
|
|
3385
|
+
}
|
|
3386
|
+
),
|
|
3387
|
+
!indeterminate && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3388
|
+
"span",
|
|
3389
|
+
{
|
|
3390
|
+
className: "text-center text-[16px] font-bold leading-[26px]",
|
|
3391
|
+
style: { color: percentColor },
|
|
3392
|
+
children: [
|
|
3393
|
+
Math.round(v),
|
|
3394
|
+
"%"
|
|
3395
|
+
]
|
|
3396
|
+
}
|
|
3397
|
+
),
|
|
3398
3398
|
label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-center text-[12px] font-normal leading-[20px] text-[color:var(--cmp-progress-color-label)]", children: label })
|
|
3399
3399
|
]
|
|
3400
3400
|
}
|
|
@@ -3405,6 +3405,14 @@ var SLoadingContainer = react.forwardRef(
|
|
|
3405
3405
|
function SLoadingContainer2({ open = false, message, zIndex = 1200, className, style }, ref) {
|
|
3406
3406
|
const [mounted2, setMounted] = react.useState(false);
|
|
3407
3407
|
react.useEffect(() => setMounted(true), []);
|
|
3408
|
+
react.useEffect(() => {
|
|
3409
|
+
if (!open) return;
|
|
3410
|
+
const prev = document.body.style.overflow;
|
|
3411
|
+
document.body.style.overflow = "hidden";
|
|
3412
|
+
return () => {
|
|
3413
|
+
document.body.style.overflow = prev;
|
|
3414
|
+
};
|
|
3415
|
+
}, [open]);
|
|
3408
3416
|
const innerRef = react.useRef(null);
|
|
3409
3417
|
const setRef = react.useCallback(
|
|
3410
3418
|
(node) => {
|
|
@@ -3485,6 +3493,31 @@ var loading = {
|
|
|
3485
3493
|
setState({ open: false });
|
|
3486
3494
|
}
|
|
3487
3495
|
};
|
|
3496
|
+
|
|
3497
|
+
// src/lib/floating-anim.ts
|
|
3498
|
+
var FLOATING_SLIDE_ANIM = [
|
|
3499
|
+
"data-[state=open]:data-[side=top]:animate-floating-in-top",
|
|
3500
|
+
"data-[state=delayed-open]:data-[side=top]:animate-floating-in-top",
|
|
3501
|
+
"data-[state=instant-open]:data-[side=top]:animate-floating-in-top",
|
|
3502
|
+
"data-[state=closed]:data-[side=top]:animate-floating-out-top",
|
|
3503
|
+
"data-[state=open]:data-[side=bottom]:animate-floating-in-bottom",
|
|
3504
|
+
"data-[state=delayed-open]:data-[side=bottom]:animate-floating-in-bottom",
|
|
3505
|
+
"data-[state=instant-open]:data-[side=bottom]:animate-floating-in-bottom",
|
|
3506
|
+
"data-[state=closed]:data-[side=bottom]:animate-floating-out-bottom",
|
|
3507
|
+
"data-[state=open]:data-[side=left]:animate-floating-in-left",
|
|
3508
|
+
"data-[state=delayed-open]:data-[side=left]:animate-floating-in-left",
|
|
3509
|
+
"data-[state=instant-open]:data-[side=left]:animate-floating-in-left",
|
|
3510
|
+
"data-[state=closed]:data-[side=left]:animate-floating-out-left",
|
|
3511
|
+
"data-[state=open]:data-[side=right]:animate-floating-in-right",
|
|
3512
|
+
"data-[state=delayed-open]:data-[side=right]:animate-floating-in-right",
|
|
3513
|
+
"data-[state=instant-open]:data-[side=right]:animate-floating-in-right",
|
|
3514
|
+
"data-[state=closed]:data-[side=right]:animate-floating-out-right"
|
|
3515
|
+
].join(" ");
|
|
3516
|
+
var PortalContainerContext = react.createContext(null);
|
|
3517
|
+
var PortalContainerProvider = PortalContainerContext.Provider;
|
|
3518
|
+
function usePortalContainer() {
|
|
3519
|
+
return react.useContext(PortalContainerContext) ?? void 0;
|
|
3520
|
+
}
|
|
3488
3521
|
var SIZE_CONFIG = {
|
|
3489
3522
|
sm: {
|
|
3490
3523
|
gap: 4,
|
|
@@ -3518,6 +3551,7 @@ var STextLink = react.forwardRef(function STextLink2({
|
|
|
3518
3551
|
className,
|
|
3519
3552
|
onClick,
|
|
3520
3553
|
children,
|
|
3554
|
+
style,
|
|
3521
3555
|
...rest
|
|
3522
3556
|
}, ref) {
|
|
3523
3557
|
const s = SIZE_CONFIG[size];
|
|
@@ -3526,13 +3560,13 @@ var STextLink = react.forwardRef(function STextLink2({
|
|
|
3526
3560
|
const handle = () => {
|
|
3527
3561
|
if (!disabled) onClick?.();
|
|
3528
3562
|
};
|
|
3529
|
-
|
|
3563
|
+
const portalContainer = usePortalContainer();
|
|
3564
|
+
const link = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3530
3565
|
"span",
|
|
3531
3566
|
{
|
|
3532
3567
|
ref,
|
|
3533
3568
|
role: "button",
|
|
3534
3569
|
tabIndex: disabled ? -1 : 0,
|
|
3535
|
-
title: tooltipText,
|
|
3536
3570
|
onClick: handle,
|
|
3537
3571
|
onKeyDown: (e) => {
|
|
3538
3572
|
if (e.key === "Enter" || e.key === " ") {
|
|
@@ -3547,7 +3581,7 @@ var STextLink = react.forwardRef(function STextLink2({
|
|
|
3547
3581
|
disabled && "cursor-not-allowed",
|
|
3548
3582
|
className
|
|
3549
3583
|
),
|
|
3550
|
-
style: { gap: s.gap, color: contentColor },
|
|
3584
|
+
style: { gap: s.gap, color: contentColor, ...style },
|
|
3551
3585
|
...rest,
|
|
3552
3586
|
children: [
|
|
3553
3587
|
icon && /* @__PURE__ */ jsxRuntime.jsx(SIcon, { name: icon, size: s.iconSize, color: resolvedIconColor }),
|
|
@@ -3570,12 +3604,13 @@ var STextLink = react.forwardRef(function STextLink2({
|
|
|
3570
3604
|
]
|
|
3571
3605
|
}
|
|
3572
3606
|
);
|
|
3607
|
+
const text = (tooltipText ?? "").trim();
|
|
3608
|
+
if (text === "") return link;
|
|
3609
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RTooltip__namespace.Provider, { delayDuration: 200, children: /* @__PURE__ */ jsxRuntime.jsxs(RTooltip__namespace.Root, { children: [
|
|
3610
|
+
/* @__PURE__ */ jsxRuntime.jsx(RTooltip__namespace.Trigger, { asChild: true, children: link }),
|
|
3611
|
+
/* @__PURE__ */ jsxRuntime.jsx(RTooltip__namespace.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxRuntime.jsx(RTooltip__namespace.Content, { side: "top", sideOffset: 4, className: cn("z-50", FLOATING_SLIDE_ANIM), children: /* @__PURE__ */ jsxRuntime.jsx(STag, { shape: "square", size: "xs", color: "grey", label: text }) }) })
|
|
3612
|
+
] }) });
|
|
3573
3613
|
});
|
|
3574
|
-
var PortalContainerContext = react.createContext(null);
|
|
3575
|
-
var PortalContainerProvider = PortalContainerContext.Provider;
|
|
3576
|
-
function usePortalContainer() {
|
|
3577
|
-
return react.useContext(PortalContainerContext) ?? void 0;
|
|
3578
|
-
}
|
|
3579
3614
|
|
|
3580
3615
|
// src/lib/sanitize-inline-html.ts
|
|
3581
3616
|
var ALLOWED_INLINE_TAGS = /* @__PURE__ */ new Set(["A", "B", "STRONG", "I", "EM", "BR", "SPAN"]);
|
|
@@ -3646,15 +3681,15 @@ var sanitizeInlineHtml = (value) => {
|
|
|
3646
3681
|
return template.innerHTML;
|
|
3647
3682
|
};
|
|
3648
3683
|
var SIZE = {
|
|
3649
|
-
xs: { height: 24, paddingX: 8, gap: 6, arrow: 12, fontSize: 12, minWidth:
|
|
3684
|
+
xs: { height: 24, paddingX: 8, gap: 6, arrow: 12, fontSize: 12, minWidth: 64, splitMinWidth: 72 },
|
|
3650
3685
|
sm: {
|
|
3651
3686
|
height: 28,
|
|
3652
3687
|
paddingX: 12,
|
|
3653
3688
|
gap: 8,
|
|
3654
3689
|
arrow: 12,
|
|
3655
3690
|
fontSize: 12,
|
|
3656
|
-
minWidth:
|
|
3657
|
-
splitMinWidth:
|
|
3691
|
+
minWidth: 72,
|
|
3692
|
+
splitMinWidth: 88
|
|
3658
3693
|
},
|
|
3659
3694
|
md: {
|
|
3660
3695
|
height: 36,
|
|
@@ -3704,6 +3739,25 @@ var SDropdownButton = react.forwardRef(
|
|
|
3704
3739
|
}, ref) {
|
|
3705
3740
|
const portalContainer = usePortalContainer();
|
|
3706
3741
|
const [open, setOpen] = react.useState(false);
|
|
3742
|
+
const splitWrapRef = react.useRef(null);
|
|
3743
|
+
const splitToggleRef = react.useRef(null);
|
|
3744
|
+
const [splitAlignOffset, setSplitAlignOffset] = react.useState(0);
|
|
3745
|
+
const [splitWidth, setSplitWidth] = react.useState(0);
|
|
3746
|
+
react.useEffect(() => {
|
|
3747
|
+
if (!split) return;
|
|
3748
|
+
const update = () => {
|
|
3749
|
+
if (splitWrapRef.current && splitToggleRef.current) {
|
|
3750
|
+
setSplitAlignOffset(
|
|
3751
|
+
-(splitWrapRef.current.offsetWidth - splitToggleRef.current.offsetWidth)
|
|
3752
|
+
);
|
|
3753
|
+
setSplitWidth(splitWrapRef.current.offsetWidth);
|
|
3754
|
+
}
|
|
3755
|
+
};
|
|
3756
|
+
update();
|
|
3757
|
+
const ro = new ResizeObserver(update);
|
|
3758
|
+
ro.observe(splitWrapRef.current);
|
|
3759
|
+
return () => ro.disconnect();
|
|
3760
|
+
}, [split, label]);
|
|
3707
3761
|
react.useImperativeHandle(
|
|
3708
3762
|
ref,
|
|
3709
3763
|
() => ({
|
|
@@ -3741,7 +3795,13 @@ var SDropdownButton = react.forwardRef(
|
|
|
3741
3795
|
{
|
|
3742
3796
|
sideOffset: 4,
|
|
3743
3797
|
align: "start",
|
|
3744
|
-
|
|
3798
|
+
alignOffset: split ? splitAlignOffset : 0,
|
|
3799
|
+
className: cn(
|
|
3800
|
+
"z-50 overflow-hidden rounded-[var(--cmp-listBox-radius)] bg-[var(--cmp-listBox-bg)] shadow-normal-sm",
|
|
3801
|
+
!split && "min-w-[var(--radix-dropdown-menu-trigger-width)]",
|
|
3802
|
+
FLOATING_SLIDE_ANIM
|
|
3803
|
+
),
|
|
3804
|
+
style: split ? { minWidth: splitWidth } : void 0,
|
|
3745
3805
|
children: items.map((it) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3746
3806
|
RDropdown__namespace.Item,
|
|
3747
3807
|
{
|
|
@@ -3775,6 +3835,7 @@ var SDropdownButton = react.forwardRef(
|
|
|
3775
3835
|
split ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3776
3836
|
"div",
|
|
3777
3837
|
{
|
|
3838
|
+
ref: splitWrapRef,
|
|
3778
3839
|
className: cn("inline-flex items-stretch", className),
|
|
3779
3840
|
style: { minWidth: s.splitMinWidth, ...style },
|
|
3780
3841
|
children: [
|
|
@@ -3797,6 +3858,7 @@ var SDropdownButton = react.forwardRef(
|
|
|
3797
3858
|
/* @__PURE__ */ jsxRuntime.jsx(RDropdown__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3798
3859
|
"button",
|
|
3799
3860
|
{
|
|
3861
|
+
ref: splitToggleRef,
|
|
3800
3862
|
type: "button",
|
|
3801
3863
|
disabled,
|
|
3802
3864
|
"aria-label": "\uBA54\uB274 \uC5F4\uAE30",
|
|
@@ -3840,18 +3902,6 @@ var SDropdownButton = react.forwardRef(
|
|
|
3840
3902
|
}
|
|
3841
3903
|
);
|
|
3842
3904
|
SDropdownButton.displayName = "SDropdownButton";
|
|
3843
|
-
|
|
3844
|
-
// src/lib/floating-anim.ts
|
|
3845
|
-
var FLOATING_SLIDE_ANIM = [
|
|
3846
|
-
"data-[state=open]:data-[side=top]:animate-floating-in-top",
|
|
3847
|
-
"data-[state=closed]:data-[side=top]:animate-floating-out-top",
|
|
3848
|
-
"data-[state=open]:data-[side=bottom]:animate-floating-in-bottom",
|
|
3849
|
-
"data-[state=closed]:data-[side=bottom]:animate-floating-out-bottom",
|
|
3850
|
-
"data-[state=open]:data-[side=left]:animate-floating-in-left",
|
|
3851
|
-
"data-[state=closed]:data-[side=left]:animate-floating-out-left",
|
|
3852
|
-
"data-[state=open]:data-[side=right]:animate-floating-in-right",
|
|
3853
|
-
"data-[state=closed]:data-[side=right]:animate-floating-out-right"
|
|
3854
|
-
].join(" ");
|
|
3855
3905
|
var SIZE2 = {
|
|
3856
3906
|
xxs: { icon: 12, radius: "sm" },
|
|
3857
3907
|
xs: { icon: 16, radius: "sm" },
|
|
@@ -4044,7 +4094,8 @@ var HIDE_DELAY_MS = 100;
|
|
|
4044
4094
|
function useBody(content, message = []) {
|
|
4045
4095
|
if (content != null) return content;
|
|
4046
4096
|
if (message.length === 0) return null;
|
|
4047
|
-
|
|
4097
|
+
const singleLine = message.length === 1;
|
|
4098
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: message.map((line, i) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: singleLine ? "leading-[24px]" : void 0, children: line }, i)) });
|
|
4048
4099
|
}
|
|
4049
4100
|
var STooltip = react.forwardRef(function STooltip2({
|
|
4050
4101
|
content,
|
|
@@ -4102,7 +4153,7 @@ var STooltip = react.forwardRef(function STooltip2({
|
|
|
4102
4153
|
if (disabled || body == null) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: triggerNode });
|
|
4103
4154
|
const isHover = trigger === "hover";
|
|
4104
4155
|
const contentClass = cn(
|
|
4105
|
-
"z-50 max-w-xs rounded-[6px] px-[16px] py-[12px] text-[12px] leading-[20px]",
|
|
4156
|
+
"z-50 max-w-xs rounded-[6px] px-[16px] py-[12px] text-[12px] leading-[20px] shadow-[2px_2px_12px_2px_rgba(0,0,0,0.1)]",
|
|
4106
4157
|
FLOATING_SLIDE_ANIM,
|
|
4107
4158
|
className
|
|
4108
4159
|
);
|
|
@@ -4147,11 +4198,17 @@ var STooltip = react.forwardRef(function STooltip2({
|
|
|
4147
4198
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-[12px]", children: [
|
|
4148
4199
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0 flex-1", children: body }),
|
|
4149
4200
|
useClose && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4150
|
-
|
|
4201
|
+
SGhostButton,
|
|
4151
4202
|
{
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4203
|
+
icon: "close",
|
|
4204
|
+
size: "xs",
|
|
4205
|
+
intent: tooltipType === "default" ? "inverse" : "default",
|
|
4206
|
+
ariaLabel: "\uB2EB\uAE30",
|
|
4207
|
+
className: "shrink-0",
|
|
4208
|
+
onClick: () => {
|
|
4209
|
+
cancelHide();
|
|
4210
|
+
setOpen(false);
|
|
4211
|
+
}
|
|
4155
4212
|
}
|
|
4156
4213
|
)
|
|
4157
4214
|
] }),
|
|
@@ -4385,9 +4442,9 @@ var SPopup = react.forwardRef(function SPopup2({
|
|
|
4385
4442
|
useFooter && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4386
4443
|
"footer",
|
|
4387
4444
|
{
|
|
4388
|
-
className: "relative z-[1] flex h-[52px] w-full flex-shrink-0 items-center gap-[var(--cmp-
|
|
4445
|
+
className: "relative z-[1] flex h-[52px] w-full flex-shrink-0 items-center gap-[var(--cmp-overlay-footer-gap)] px-[var(--cmp-overlay-footer-paddingX)] py-[var(--cmp-overlay-footer-paddingY)]",
|
|
4389
4446
|
style: {
|
|
4390
|
-
background: "var(--cmp-
|
|
4447
|
+
background: "var(--cmp-overlay-footer-bg-default)",
|
|
4391
4448
|
boxShadow: "var(--shadow-spread-md)"
|
|
4392
4449
|
},
|
|
4393
4450
|
children: [
|
|
@@ -4466,7 +4523,10 @@ function SGuide({
|
|
|
4466
4523
|
side: "bottom",
|
|
4467
4524
|
align: "start",
|
|
4468
4525
|
sideOffset: 4,
|
|
4469
|
-
className:
|
|
4526
|
+
className: cn(
|
|
4527
|
+
"relative z-50 rounded-[var(--cmp-guide-contents-radius)] bg-[var(--color-white)]",
|
|
4528
|
+
FLOATING_SLIDE_ANIM
|
|
4529
|
+
),
|
|
4470
4530
|
style: {
|
|
4471
4531
|
width: popupWidth != null ? popupWidth : 426,
|
|
4472
4532
|
padding: "var(--cmp-guide-contents-paddingY) var(--cmp-guide-contents-paddingX)",
|
|
@@ -4575,7 +4635,7 @@ function SModalContainer({
|
|
|
4575
4635
|
]
|
|
4576
4636
|
}
|
|
4577
4637
|
) }),
|
|
4578
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { ref: setPortalContainer, className: "fixed left-0 top-0 z-[1001]" })
|
|
4638
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { ref: setPortalContainer, className: "pointer-events-auto fixed left-0 top-0 z-[1001]" })
|
|
4579
4639
|
] }) });
|
|
4580
4640
|
}
|
|
4581
4641
|
var TYPE_ICON = {
|
|
@@ -4713,9 +4773,9 @@ function SActionModal({
|
|
|
4713
4773
|
showClose: true,
|
|
4714
4774
|
width,
|
|
4715
4775
|
height,
|
|
4716
|
-
className: "w-fit min-w-[480px]",
|
|
4776
|
+
className: "w-fit min-w-[480px] min-h-[320px]",
|
|
4717
4777
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full min-h-[320px] flex-col", children: [
|
|
4718
|
-
/* @__PURE__ */ jsxRuntime.jsx("header", { className: "flex flex-shrink-0 items-center gap-[var(--cmp-
|
|
4778
|
+
/* @__PURE__ */ jsxRuntime.jsx("header", { className: "flex flex-shrink-0 items-center gap-[var(--cmp-overlay-header-gap)] py-[var(--cmp-overlay-header-paddingY)] pl-[var(--cmp-overlay-header-paddingX)] pr-[calc(var(--cmp-overlay-header-paddingX)+20px)]", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-[16px] font-bold leading-[26px] text-[color:var(--cmp-overlay-header-title-color)]", children: modalTitle }) }),
|
|
4719
4779
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-0 flex-1 overflow-auto px-[var(--cmp-modal-action-body-paddingX)] pb-[var(--cmp-modal-action-body-paddingBottom)]", children }),
|
|
4720
4780
|
button && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4721
4781
|
"footer",
|
|
@@ -4745,7 +4805,7 @@ function SActionModal({
|
|
|
4745
4805
|
);
|
|
4746
4806
|
}
|
|
4747
4807
|
var DEFAULT_MESSAGE = {
|
|
4748
|
-
loading: "",
|
|
4808
|
+
loading: "\uC791\uC5C5 \uC9C4\uD589\uC911...",
|
|
4749
4809
|
error: "\uC791\uC5C5\uC5D0 \uC2E4\uD328\uD558\uC600\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uC2DC\uB3C4\uD574 \uC8FC\uC138\uC694."
|
|
4750
4810
|
};
|
|
4751
4811
|
var DEFAULT_BUTTON_LABEL = {
|
|
@@ -4767,6 +4827,7 @@ function SLoadingModal({
|
|
|
4767
4827
|
}) {
|
|
4768
4828
|
const resolvedMessage = message ?? DEFAULT_MESSAGE[state2];
|
|
4769
4829
|
const lines = Array.isArray(resolvedMessage) ? resolvedMessage : resolvedMessage ? [resolvedMessage] : [];
|
|
4830
|
+
const showButton = useButton || state2 === "error";
|
|
4770
4831
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4771
4832
|
SModalContainer,
|
|
4772
4833
|
{
|
|
@@ -4786,7 +4847,7 @@ function SLoadingModal({
|
|
|
4786
4847
|
},
|
|
4787
4848
|
i
|
|
4788
4849
|
)) }),
|
|
4789
|
-
|
|
4850
|
+
showButton && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4790
4851
|
SButton,
|
|
4791
4852
|
{
|
|
4792
4853
|
color: "neutral",
|
|
@@ -5017,7 +5078,7 @@ function SPagination({
|
|
|
5017
5078
|
style,
|
|
5018
5079
|
children: [
|
|
5019
5080
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-w-[calc(var(--cmp-pagination-height)*2+var(--cmp-pagination-move-gap))] items-center justify-end gap-[var(--cmp-pagination-move-gap)]", children: prevButtons }),
|
|
5020
|
-
simple ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-[var(--cmp-pagination-height)] items-center gap-[var(--cmp-pagination-
|
|
5081
|
+
simple ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-[var(--cmp-pagination-height)] items-center gap-[var(--cmp-pagination-simple-gap)] px-[var(--cmp-pagination-paddingX)] text-[12px] font-medium leading-[20px] text-[color:var(--cmp-pagination-item-content-default)]", children: [
|
|
5021
5082
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-bold text-[color:var(--cmp-pagination-item-content-selected)]", children: currentPage }),
|
|
5022
5083
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "/" }),
|
|
5023
5084
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: lastPage })
|
|
@@ -5141,8 +5202,8 @@ function useFormField(field) {
|
|
|
5141
5202
|
}, [ctx, name]);
|
|
5142
5203
|
}
|
|
5143
5204
|
var FIELD_SIZE = {
|
|
5144
|
-
sm: { height: 28, radius: 4, fieldGap: 12, labelGap: 6, fontSize: 12, lineHeight: 20, icon:
|
|
5145
|
-
md: { height: 36, radius: 6, fieldGap: 16, labelGap: 8, fontSize: 14, lineHeight: 24, icon:
|
|
5205
|
+
sm: { height: 28, radius: 4, fieldGap: 12, labelGap: 6, fontSize: 12, lineHeight: 20, icon: 16 },
|
|
5206
|
+
md: { height: 36, radius: 6, fieldGap: 16, labelGap: 8, fontSize: 14, lineHeight: 24, icon: 16 }
|
|
5146
5207
|
};
|
|
5147
5208
|
var ALIGN = {
|
|
5148
5209
|
start: "flex-start",
|
|
@@ -5157,6 +5218,7 @@ var SField = react.forwardRef(function SField2({
|
|
|
5157
5218
|
labelTooltip = "",
|
|
5158
5219
|
labelTooltipProps,
|
|
5159
5220
|
labelWidth,
|
|
5221
|
+
labelHeight,
|
|
5160
5222
|
size = "sm",
|
|
5161
5223
|
addonLabel = "",
|
|
5162
5224
|
addonAlign = "start",
|
|
@@ -5171,6 +5233,7 @@ var SField = react.forwardRef(function SField2({
|
|
|
5171
5233
|
readOnly = false,
|
|
5172
5234
|
width,
|
|
5173
5235
|
multiline = false,
|
|
5236
|
+
borderless = false,
|
|
5174
5237
|
children,
|
|
5175
5238
|
className,
|
|
5176
5239
|
style,
|
|
@@ -5204,8 +5267,8 @@ var SField = react.forwardRef(function SField2({
|
|
|
5204
5267
|
const resolvedSuccess = status === "pass";
|
|
5205
5268
|
const showError = resolvedError && errorMessage !== "";
|
|
5206
5269
|
const interactive = !disabled && !readOnly;
|
|
5207
|
-
const borderColor = disabled ? "var(--color-grey-45)" : interactive && focused ? "var(--sys-color-field-border-focus)" : resolvedSuccess ? "var(--sys-color-field-border-success)" : resolvedError ? "var(--sys-color-field-border-danger)" : "var(--sys-color-field-border-default)";
|
|
5208
|
-
const bgColor = disabled ? "var(--color-grey-30)" : readOnly ? "var(--sys-color-field-bg-readOnly)" : "var(--sys-color-field-bg-default)";
|
|
5270
|
+
const borderColor = borderless ? "transparent" : disabled ? "var(--color-grey-45)" : interactive && focused ? "var(--sys-color-field-border-focus)" : resolvedSuccess ? "var(--sys-color-field-border-success)" : resolvedError ? "var(--sys-color-field-border-danger)" : "var(--sys-color-field-border-default)";
|
|
5271
|
+
const bgColor = borderless ? "transparent" : disabled ? "var(--color-grey-30)" : readOnly ? "var(--sys-color-field-bg-readOnly)" : "var(--sys-color-field-bg-default)";
|
|
5209
5272
|
const textColor = disabled ? "var(--color-grey-65)" : readOnly ? "var(--sys-color-field-text-readOnly)" : "var(--sys-color-field-text-default)";
|
|
5210
5273
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5211
5274
|
"div",
|
|
@@ -5222,7 +5285,7 @@ var SField = react.forwardRef(function SField2({
|
|
|
5222
5285
|
{
|
|
5223
5286
|
className: "flex shrink-0 items-center font-bold text-(--sys-color-field-text-default)",
|
|
5224
5287
|
style: {
|
|
5225
|
-
height: s.height,
|
|
5288
|
+
height: cssLen(labelHeight) ?? s.height,
|
|
5226
5289
|
marginRight: s.fieldGap,
|
|
5227
5290
|
width: cssLen(labelWidth),
|
|
5228
5291
|
fontSize: s.fontSize,
|
|
@@ -5248,14 +5311,14 @@ var SField = react.forwardRef(function SField2({
|
|
|
5248
5311
|
{
|
|
5249
5312
|
className: cn(
|
|
5250
5313
|
"relative box-border flex min-w-0 items-stretch overflow-hidden border border-solid border-(--field-bc)",
|
|
5251
|
-
interactive && "hover:border-(--sys-color-field-border-focus) hover:shadow-[0px_0px_4px_0px_#0071ff66] focus-within:border-(--sys-color-field-border-focus) focus-within:shadow-[0px_0px_4px_0px_#0071ff66]",
|
|
5314
|
+
interactive && !borderless && "hover:border-(--sys-color-field-border-focus) hover:shadow-[0px_0px_4px_0px_#0071ff66] focus-within:border-(--sys-color-field-border-focus) focus-within:shadow-[0px_0px_4px_0px_#0071ff66]",
|
|
5252
5315
|
disabled && "cursor-not-allowed"
|
|
5253
5316
|
),
|
|
5254
5317
|
style: {
|
|
5255
5318
|
// @ts-expect-error CSS 변수
|
|
5256
5319
|
"--field-bc": borderColor,
|
|
5257
5320
|
// focused/hovered prop이 명시된 경우 강조를 즉시 반영
|
|
5258
|
-
...interactive && focused ? { boxShadow: "0px 0px 4px 0px #0071ff66" } : {},
|
|
5321
|
+
...interactive && !borderless && focused ? { boxShadow: "0px 0px 4px 0px #0071ff66" } : {},
|
|
5259
5322
|
...multiline ? { minHeight: s.height } : { height: s.height },
|
|
5260
5323
|
"width": cssLen(width),
|
|
5261
5324
|
"borderRadius": s.radius,
|
|
@@ -5300,15 +5363,28 @@ function flattenOptions(options, depth = 1) {
|
|
|
5300
5363
|
const out = [];
|
|
5301
5364
|
for (const o of options) {
|
|
5302
5365
|
const hasChildren = Array.isArray(o.children) && o.children.length > 0;
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5366
|
+
if (hasChildren) {
|
|
5367
|
+
const childFlat = flattenOptions(o.children, depth + 1);
|
|
5368
|
+
const allChildrenDisabled = childFlat.every((c) => c.disabled);
|
|
5369
|
+
out.push({
|
|
5370
|
+
value: String(o.value),
|
|
5371
|
+
label: o.label,
|
|
5372
|
+
disabled: !!o.disabled || allChildrenDisabled,
|
|
5373
|
+
depth,
|
|
5374
|
+
isGroup: true,
|
|
5375
|
+
raw: o.value
|
|
5376
|
+
});
|
|
5377
|
+
out.push(...childFlat);
|
|
5378
|
+
} else {
|
|
5379
|
+
out.push({
|
|
5380
|
+
value: String(o.value),
|
|
5381
|
+
label: o.label,
|
|
5382
|
+
disabled: !!o.disabled,
|
|
5383
|
+
depth,
|
|
5384
|
+
isGroup: false,
|
|
5385
|
+
raw: o.value
|
|
5386
|
+
});
|
|
5387
|
+
}
|
|
5312
5388
|
}
|
|
5313
5389
|
return out;
|
|
5314
5390
|
}
|
|
@@ -5363,6 +5439,9 @@ var SSelect = react.forwardRef(function SSelect2({
|
|
|
5363
5439
|
);
|
|
5364
5440
|
const flat = react.useMemo(() => flattenOptions(options), [options]);
|
|
5365
5441
|
const selectable = react.useMemo(() => selectableOptions(flat), [flat]);
|
|
5442
|
+
const hasLeaf = react.useMemo(() => flat.some((o) => !o.isGroup), [flat]);
|
|
5443
|
+
const allOptionsDisabled = hasLeaf && selectable.length === 0;
|
|
5444
|
+
const effectiveDisabled = disabled || allOptionsDisabled;
|
|
5366
5445
|
const showSearch = useSearch && selectable.length >= SEARCH_THRESHOLD;
|
|
5367
5446
|
const labelByValue = react.useMemo(() => new Map(flat.map((o) => [o.value, o.label])), [flat]);
|
|
5368
5447
|
const rawByValue = react.useMemo(() => new Map(flat.map((o) => [o.value, o.raw])), [flat]);
|
|
@@ -5413,6 +5492,7 @@ var SSelect = react.forwardRef(function SSelect2({
|
|
|
5413
5492
|
const selectStore = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5414
5493
|
Ariakit__namespace.SelectProvider,
|
|
5415
5494
|
{
|
|
5495
|
+
animated: portalContainer == null ? 150 : false,
|
|
5416
5496
|
value: multi ? selected : selected[0] ?? "",
|
|
5417
5497
|
setValue: (v) => emit2(Array.isArray(v) ? v : v === "" ? [] : [v]),
|
|
5418
5498
|
open,
|
|
@@ -5428,10 +5508,10 @@ var SSelect = react.forwardRef(function SSelect2({
|
|
|
5428
5508
|
Ariakit__namespace.Select,
|
|
5429
5509
|
{
|
|
5430
5510
|
ref: triggerRef,
|
|
5431
|
-
disabled,
|
|
5511
|
+
disabled: effectiveDisabled,
|
|
5432
5512
|
className: "flex h-full w-full cursor-pointer items-center justify-between gap-[8px] bg-transparent px-[12px] text-left text-[12px] leading-[20px] outline-none disabled:cursor-not-allowed",
|
|
5433
5513
|
style: {
|
|
5434
|
-
color:
|
|
5514
|
+
color: effectiveDisabled ? "var(--cmp-select-text-disabled)" : isPlaceholder ? "var(--cmp-select-icon-default)" : "var(--cmp-select-text-default)"
|
|
5435
5515
|
},
|
|
5436
5516
|
children: [
|
|
5437
5517
|
isHtmlLabel(triggerText) ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5446,7 +5526,7 @@ var SSelect = react.forwardRef(function SSelect2({
|
|
|
5446
5526
|
{
|
|
5447
5527
|
name: "chevronDown",
|
|
5448
5528
|
size: 12,
|
|
5449
|
-
color:
|
|
5529
|
+
color: effectiveDisabled ? "var(--cmp-select-icon-disabled)" : "var(--cmp-select-icon-default)",
|
|
5450
5530
|
className: cn("shrink-0 transition-transform duration-200", open && "rotate-180")
|
|
5451
5531
|
}
|
|
5452
5532
|
)
|
|
@@ -5460,7 +5540,7 @@ var SSelect = react.forwardRef(function SSelect2({
|
|
|
5460
5540
|
portalElement: portalContainer,
|
|
5461
5541
|
gutter: 4,
|
|
5462
5542
|
sameWidth: !dropdownWidth,
|
|
5463
|
-
className: "z-50 overflow-auto rounded-[var(--cmp-listBox-radius)] bg-[var(--cmp-listBox-bg)]
|
|
5543
|
+
className: "z-50 overflow-auto rounded-[var(--cmp-listBox-radius)] bg-[var(--cmp-listBox-bg)] shadow-[2px_2px_12px_2px_rgba(0,0,0,0.1)] data-[enter]:animate-floating-in-bottom data-[leave]:animate-floating-out-bottom",
|
|
5464
5544
|
style: {
|
|
5465
5545
|
maxHeight: dropdownHeight,
|
|
5466
5546
|
...dropdownWidth ? { width: dropdownWidth } : {},
|
|
@@ -5501,7 +5581,7 @@ var SSelect = react.forwardRef(function SSelect2({
|
|
|
5501
5581
|
),
|
|
5502
5582
|
hasItems ? /* @__PURE__ */ jsxRuntime.jsx(ItemList, { items: filtered, multi, selected, useSearch: showSearch }) : (
|
|
5503
5583
|
// 원본 sd-select-listbox__empty (표시할 항목이 없을 때)
|
|
5504
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-[12px] py-[12px] text-
|
|
5584
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-[12px] py-[12px] text-left text-[12px] leading-[20px] text-[color:var(--cmp-listItem-content-disabled)]", children: "\uD45C\uC2DC\uD560 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4." })
|
|
5505
5585
|
)
|
|
5506
5586
|
]
|
|
5507
5587
|
}
|
|
@@ -5524,7 +5604,7 @@ var SSelect = react.forwardRef(function SSelect2({
|
|
|
5524
5604
|
error: error || ruleError !== "",
|
|
5525
5605
|
status: rules && rules.length > 0 ? ruleError !== "" ? "error" : void 0 : void 0,
|
|
5526
5606
|
errorMessage: ruleError !== "" ? ruleError : errorMessage,
|
|
5527
|
-
disabled,
|
|
5607
|
+
disabled: effectiveDisabled,
|
|
5528
5608
|
width,
|
|
5529
5609
|
className,
|
|
5530
5610
|
style,
|
|
@@ -5559,7 +5639,11 @@ function ItemList({
|
|
|
5559
5639
|
{
|
|
5560
5640
|
className: cn(
|
|
5561
5641
|
"select-none py-[4px] pr-[12px] text-[12px] leading-[20px] text-[color:var(--cmp-listItem-content-default)]",
|
|
5562
|
-
isDepth1 ? "border-t border-solid border-[color:var(--cmp-listItem-depth1-border-color)] bg-[var(--cmp-listItem-depth1-bg-default)] font-bold" : "bg-[var(--cmp-listItem-depth2-middle-bg)] font-medium"
|
|
5642
|
+
isDepth1 ? "border-t border-solid border-[color:var(--cmp-listItem-depth1-border-color)] bg-[var(--cmp-listItem-depth1-bg-default)] font-bold" : "bg-[var(--cmp-listItem-depth2-middle-bg)] font-medium",
|
|
5643
|
+
// 하위가 전부 비활성이면(select.config 에서 bubble-up) 어미 그룹도 비활성 처리:
|
|
5644
|
+
// 텍스트는 회색(#888), depth1 그룹은 파란 배경 대신 회색(#EEE)으로 (depth2 는 #F6F6F6 유지)
|
|
5645
|
+
o.disabled && "text-[color:var(--cmp-listItem-content-disabled)]",
|
|
5646
|
+
o.disabled && isDepth1 && "bg-[var(--cmp-listItem-depth1-bg-disabled)]"
|
|
5563
5647
|
),
|
|
5564
5648
|
style: { paddingLeft: padLeft },
|
|
5565
5649
|
children: o.label
|
|
@@ -5586,15 +5670,21 @@ function ItemList({
|
|
|
5586
5670
|
"span",
|
|
5587
5671
|
{
|
|
5588
5672
|
className: cn(
|
|
5589
|
-
"flex h-[16px] w-[16px] flex-shrink-0 items-center justify-center rounded-[2px] border border-solid
|
|
5590
|
-
|
|
5673
|
+
"flex h-[16px] w-[16px] flex-shrink-0 items-center justify-center rounded-[2px] border border-solid",
|
|
5674
|
+
o.disabled ? (
|
|
5675
|
+
// 비활성: 회색 채움(#E1E1E1) + 회색 테두리(#CCCCCC)
|
|
5676
|
+
"border-[color:var(--cmp-checkbox-border-disabled)] bg-[var(--cmp-checkbox-bg-disabled)]"
|
|
5677
|
+
) : cn(
|
|
5678
|
+
"group-data-[active-item]:border-[color:var(--cmp-checkbox-checked-border-inverse)]",
|
|
5679
|
+
isSelected ? "border-[color:var(--cmp-checkbox-checked-bg-default)] bg-[var(--cmp-checkbox-checked-bg-default)] group-data-[active-item]:bg-transparent" : "border-[color:var(--cmp-checkbox-unchecked-border-default)] bg-transparent"
|
|
5680
|
+
)
|
|
5591
5681
|
),
|
|
5592
5682
|
children: isSelected && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5593
5683
|
SIcon,
|
|
5594
5684
|
{
|
|
5595
5685
|
name: "checkboxCheck",
|
|
5596
5686
|
size: 12,
|
|
5597
|
-
color: "var(--cmp-checkbox-checked-icon-default)"
|
|
5687
|
+
color: o.disabled ? "var(--cmp-checkbox-checked-icon-disabled)" : "var(--cmp-checkbox-checked-icon-default)"
|
|
5598
5688
|
}
|
|
5599
5689
|
)
|
|
5600
5690
|
}
|
|
@@ -6373,8 +6463,8 @@ var STextarea = react.forwardRef(function STextarea2({
|
|
|
6373
6463
|
);
|
|
6374
6464
|
});
|
|
6375
6465
|
var PAD2 = {
|
|
6376
|
-
sm: { fontSize: 12, stepper: 20, icon: 12 },
|
|
6377
|
-
md: { fontSize: 14, stepper: 24, icon: 14 }
|
|
6466
|
+
sm: { fontSize: 12, lineHeight: 20, stepper: 20, icon: 12 },
|
|
6467
|
+
md: { fontSize: 14, lineHeight: 24, stepper: 24, icon: 14 }
|
|
6378
6468
|
};
|
|
6379
6469
|
var toNumber = (val) => {
|
|
6380
6470
|
if (val === null || val === void 0 || val === "") return null;
|
|
@@ -6392,6 +6482,38 @@ var formatWithCommas = (value) => {
|
|
|
6392
6482
|
const result = isNeg ? "-" + formatted : formatted;
|
|
6393
6483
|
return decPart !== void 0 && decPart !== "" ? result + "." + decPart : result;
|
|
6394
6484
|
};
|
|
6485
|
+
var addCommas = (value) => value.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
6486
|
+
var formatInputWithCommas = (value) => {
|
|
6487
|
+
const isNeg = value.startsWith("-");
|
|
6488
|
+
const unsigned = isNeg ? value.slice(1) : value;
|
|
6489
|
+
const hasDecimal = unsigned.includes(".");
|
|
6490
|
+
const [intPart = "", decPart = ""] = unsigned.split(".");
|
|
6491
|
+
const formattedInt = addCommas(intPart === "" ? "0" : intPart);
|
|
6492
|
+
return `${isNeg ? "-" : ""}${formattedInt}${hasDecimal ? `.${decPart}` : ""}`;
|
|
6493
|
+
};
|
|
6494
|
+
var getDecimalLimit = (useDecimal, maxDecimalLength) => {
|
|
6495
|
+
if (!useDecimal || maxDecimalLength === void 0 || !Number.isFinite(maxDecimalLength)) {
|
|
6496
|
+
return void 0;
|
|
6497
|
+
}
|
|
6498
|
+
return Math.max(0, Math.floor(maxDecimalLength));
|
|
6499
|
+
};
|
|
6500
|
+
var applyDecimalLimit = (value, decimalLimit) => {
|
|
6501
|
+
if (value === null || decimalLimit === void 0) return value;
|
|
6502
|
+
return Number(value.toFixed(decimalLimit));
|
|
6503
|
+
};
|
|
6504
|
+
var getLogicalCaret = (value, caret) => {
|
|
6505
|
+
return value.slice(0, caret ?? value.length).replace(/,/g, "").length;
|
|
6506
|
+
};
|
|
6507
|
+
var getDisplayCaret = (value, logicalCaret) => {
|
|
6508
|
+
if (logicalCaret <= 0) return 0;
|
|
6509
|
+
let seen = 0;
|
|
6510
|
+
for (let i = 0; i < value.length; i += 1) {
|
|
6511
|
+
if (value[i] === ",") continue;
|
|
6512
|
+
seen += 1;
|
|
6513
|
+
if (seen >= logicalCaret) return i + 1;
|
|
6514
|
+
}
|
|
6515
|
+
return value.length;
|
|
6516
|
+
};
|
|
6395
6517
|
var SNumberInput = react.forwardRef(function SNumberInput2({
|
|
6396
6518
|
value,
|
|
6397
6519
|
onValueChange,
|
|
@@ -6401,6 +6523,7 @@ var SNumberInput = react.forwardRef(function SNumberInput2({
|
|
|
6401
6523
|
step = 1,
|
|
6402
6524
|
useButton = false,
|
|
6403
6525
|
useDecimal = false,
|
|
6526
|
+
maxDecimalLength,
|
|
6404
6527
|
inputPrefix = "",
|
|
6405
6528
|
inputSuffix = "",
|
|
6406
6529
|
inputClass,
|
|
@@ -6432,7 +6555,8 @@ var SNumberInput = react.forwardRef(function SNumberInput2({
|
|
|
6432
6555
|
}, ref) {
|
|
6433
6556
|
const p = PAD2[size];
|
|
6434
6557
|
const padX = `var(--cmp-numberInput-${size}-paddingX)`;
|
|
6435
|
-
const
|
|
6558
|
+
const decimalLimit = getDecimalLimit(useDecimal, maxDecimalLength);
|
|
6559
|
+
const numValue = applyDecimalLimit(toNumber(value), decimalLimit);
|
|
6436
6560
|
const [display, setDisplay] = react.useState(() => formatWithCommas(numValue));
|
|
6437
6561
|
const [ruleError, setRuleError] = react.useState("");
|
|
6438
6562
|
const innerRef = react.useRef(null);
|
|
@@ -6442,8 +6566,9 @@ var SNumberInput = react.forwardRef(function SNumberInput2({
|
|
|
6442
6566
|
else if (ref) ref.current = el;
|
|
6443
6567
|
};
|
|
6444
6568
|
react.useEffect(() => {
|
|
6445
|
-
|
|
6446
|
-
|
|
6569
|
+
if (document.activeElement === innerRef.current) return;
|
|
6570
|
+
setDisplay(formatWithCommas(applyDecimalLimit(toNumber(value), decimalLimit)));
|
|
6571
|
+
}, [decimalLimit, value]);
|
|
6447
6572
|
useFormField({
|
|
6448
6573
|
name,
|
|
6449
6574
|
validate: () => {
|
|
@@ -6455,48 +6580,87 @@ var SNumberInput = react.forwardRef(function SNumberInput2({
|
|
|
6455
6580
|
});
|
|
6456
6581
|
const resolvedError = error || ruleError !== "";
|
|
6457
6582
|
const resolvedStatus = status ?? (rules && rules.length > 0 ? ruleError !== "" ? "error" : void 0 : void 0);
|
|
6458
|
-
const
|
|
6459
|
-
|
|
6460
|
-
|
|
6583
|
+
const restoreCaret = (nextDisplay, logicalCaret) => {
|
|
6584
|
+
const input = innerRef.current;
|
|
6585
|
+
if (logicalCaret === void 0 || !input || document.activeElement !== input) return;
|
|
6586
|
+
const nextCaret = getDisplayCaret(nextDisplay, logicalCaret);
|
|
6587
|
+
requestAnimationFrame(() => {
|
|
6588
|
+
if (document.activeElement !== input) return;
|
|
6589
|
+
input.setSelectionRange(nextCaret, nextCaret);
|
|
6590
|
+
});
|
|
6591
|
+
};
|
|
6592
|
+
const setDisplayWithCaret = (nextDisplay, logicalCaret) => {
|
|
6593
|
+
setDisplay(nextDisplay);
|
|
6594
|
+
restoreCaret(nextDisplay, logicalCaret);
|
|
6595
|
+
};
|
|
6596
|
+
const resetRejectedInput = (target, logicalCaret) => {
|
|
6597
|
+
target.value = display;
|
|
6598
|
+
restoreCaret(display, Math.min(logicalCaret, display.replace(/,/g, "").length));
|
|
6599
|
+
};
|
|
6600
|
+
const emit2 = (n, logicalCaret) => {
|
|
6601
|
+
const next = applyDecimalLimit(n, decimalLimit);
|
|
6602
|
+
const nextDisplay = formatWithCommas(next);
|
|
6603
|
+
setDisplayWithCaret(nextDisplay, logicalCaret);
|
|
6604
|
+
onValueChange?.(next);
|
|
6461
6605
|
};
|
|
6462
6606
|
const incDisabled = disabled || readOnly || numValue !== null && numValue >= max;
|
|
6463
6607
|
const decDisabled = disabled || readOnly || numValue !== null && numValue <= min;
|
|
6464
6608
|
const increment = () => {
|
|
6465
6609
|
if (incDisabled) return;
|
|
6466
6610
|
const cur = numValue ?? (min === Number.NEGATIVE_INFINITY ? 0 : min);
|
|
6467
|
-
const next = Math.min(cur + step, max);
|
|
6611
|
+
const next = applyDecimalLimit(Math.min(cur + step, max), decimalLimit);
|
|
6468
6612
|
if (next !== cur) emit2(next);
|
|
6469
6613
|
};
|
|
6470
6614
|
const decrement = () => {
|
|
6471
6615
|
if (decDisabled) return;
|
|
6472
6616
|
const cur = numValue ?? (min === Number.NEGATIVE_INFINITY ? 0 : min);
|
|
6473
|
-
const next = Math.max(cur - step, min);
|
|
6617
|
+
const next = applyDecimalLimit(Math.max(cur - step, min), decimalLimit);
|
|
6474
6618
|
if (next !== cur) emit2(next);
|
|
6475
6619
|
};
|
|
6476
|
-
const handleInput = (
|
|
6620
|
+
const handleInput = (event) => {
|
|
6621
|
+
const target = event.currentTarget;
|
|
6622
|
+
const raw = target.value;
|
|
6623
|
+
const logicalCaret = getLogicalCaret(raw, target.selectionStart);
|
|
6477
6624
|
if (raw === "") {
|
|
6478
|
-
|
|
6625
|
+
setDisplayWithCaret("", 0);
|
|
6479
6626
|
onValueChange?.(null);
|
|
6480
6627
|
return;
|
|
6481
6628
|
}
|
|
6482
6629
|
const cleaned = raw.replace(/,/g, "");
|
|
6483
6630
|
const decimals = (cleaned.match(/\./g) || []).length;
|
|
6484
|
-
if (decimals > 1)
|
|
6631
|
+
if (decimals > 1) {
|
|
6632
|
+
resetRejectedInput(target, logicalCaret);
|
|
6633
|
+
return;
|
|
6634
|
+
}
|
|
6485
6635
|
if (cleaned === "-" || cleaned === "." || cleaned === "-.") {
|
|
6486
|
-
|
|
6636
|
+
setDisplayWithCaret(cleaned, logicalCaret);
|
|
6637
|
+
return;
|
|
6638
|
+
}
|
|
6639
|
+
if (!useDecimal && cleaned.includes(".")) {
|
|
6640
|
+
resetRejectedInput(target, logicalCaret);
|
|
6487
6641
|
return;
|
|
6488
6642
|
}
|
|
6489
|
-
if (
|
|
6643
|
+
if (decimalLimit !== void 0 && cleaned.includes(".")) {
|
|
6644
|
+
const fraction = cleaned.split(".")[1] ?? "";
|
|
6645
|
+
if (fraction.length > decimalLimit) {
|
|
6646
|
+
resetRejectedInput(target, logicalCaret);
|
|
6647
|
+
return;
|
|
6648
|
+
}
|
|
6649
|
+
}
|
|
6490
6650
|
if (cleaned.endsWith(".") && decimals === 1) {
|
|
6491
6651
|
const parsed2 = toNumber(cleaned.slice(0, -1));
|
|
6492
6652
|
if (parsed2 !== null) {
|
|
6493
|
-
|
|
6653
|
+
setDisplayWithCaret(formatInputWithCommas(cleaned), logicalCaret);
|
|
6494
6654
|
return;
|
|
6495
6655
|
}
|
|
6496
6656
|
}
|
|
6497
6657
|
const parsed = toNumber(cleaned);
|
|
6498
|
-
if (parsed === null)
|
|
6499
|
-
|
|
6658
|
+
if (parsed === null) {
|
|
6659
|
+
resetRejectedInput(target, logicalCaret);
|
|
6660
|
+
return;
|
|
6661
|
+
}
|
|
6662
|
+
setDisplayWithCaret(formatInputWithCommas(cleaned), logicalCaret);
|
|
6663
|
+
onValueChange?.(applyDecimalLimit(parsed, decimalLimit));
|
|
6500
6664
|
};
|
|
6501
6665
|
const stepper = (dir) => {
|
|
6502
6666
|
const off = dir === "inc" ? incDisabled : decDisabled;
|
|
@@ -6509,8 +6673,8 @@ var SNumberInput = react.forwardRef(function SNumberInput2({
|
|
|
6509
6673
|
"aria-label": dir === "inc" ? "\uC99D\uAC00" : "\uAC10\uC18C",
|
|
6510
6674
|
onClick: dir === "inc" ? increment : decrement,
|
|
6511
6675
|
className: cn(
|
|
6512
|
-
"flex flex-shrink-0 items-center justify-center",
|
|
6513
|
-
off ? "cursor-not-allowed" : "cursor-pointer"
|
|
6676
|
+
"flex flex-shrink-0 items-center justify-center border border-solid border-transparent transition-colors",
|
|
6677
|
+
off ? "cursor-not-allowed" : "cursor-pointer hover:border-[var(--color-border-accentLight)]"
|
|
6514
6678
|
),
|
|
6515
6679
|
style: {
|
|
6516
6680
|
width: `var(--cmp-numberInput-stepper-${size}-size)`,
|
|
@@ -6559,24 +6723,26 @@ var SNumberInput = react.forwardRef(function SNumberInput2({
|
|
|
6559
6723
|
style: {
|
|
6560
6724
|
// 원본 sd-number-input: content gap = padding-x 토큰 (gap 토큰 아님)
|
|
6561
6725
|
gap: `var(--cmp-numberInput-${size}-paddingX)`,
|
|
6562
|
-
padding: `0 ${useButton ? padX : `calc(${padX} * 2)`}
|
|
6726
|
+
padding: `0 ${useButton ? padX : `calc(${padX} * 2)`}`,
|
|
6727
|
+
fontSize: p.fontSize,
|
|
6728
|
+
lineHeight: `${p.lineHeight}px`
|
|
6563
6729
|
},
|
|
6564
6730
|
children: [
|
|
6565
6731
|
useButton && stepper("dec"),
|
|
6566
|
-
inputPrefix !== "" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0", style: {
|
|
6732
|
+
inputPrefix !== "" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0", style: { color: affixColor }, children: inputPrefix }),
|
|
6567
6733
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6568
6734
|
"input",
|
|
6569
6735
|
{
|
|
6570
6736
|
ref: setRefs,
|
|
6571
6737
|
name,
|
|
6572
6738
|
type: "text",
|
|
6573
|
-
inputMode: "numeric",
|
|
6739
|
+
inputMode: useDecimal ? "decimal" : "numeric",
|
|
6574
6740
|
value: display,
|
|
6575
6741
|
placeholder,
|
|
6576
6742
|
disabled,
|
|
6577
6743
|
readOnly,
|
|
6578
6744
|
autoFocus,
|
|
6579
|
-
onChange:
|
|
6745
|
+
onChange: handleInput,
|
|
6580
6746
|
onKeyDown: (e) => {
|
|
6581
6747
|
if (e.key === "ArrowUp") {
|
|
6582
6748
|
e.preventDefault();
|
|
@@ -6588,26 +6754,29 @@ var SNumberInput = react.forwardRef(function SNumberInput2({
|
|
|
6588
6754
|
},
|
|
6589
6755
|
onFocus: (e) => onFocus?.(e),
|
|
6590
6756
|
onBlur: (e) => {
|
|
6591
|
-
const
|
|
6757
|
+
const cleaned = display.replace(/,/g, "");
|
|
6758
|
+
const n = toNumber(cleaned);
|
|
6592
6759
|
const clamped = n === null ? null : Math.min(Math.max(n, min), max);
|
|
6593
6760
|
if (clamped !== n) emit2(clamped);
|
|
6594
|
-
else setDisplay(
|
|
6761
|
+
else setDisplay(n === null ? "" : formatInputWithCommas(cleaned));
|
|
6595
6762
|
if (rules && rules.length > 0) setRuleError(runRules(clamped, rules));
|
|
6596
6763
|
onBlur?.(e);
|
|
6597
6764
|
},
|
|
6598
6765
|
className: cn(
|
|
6599
|
-
|
|
6766
|
+
// h-full 대신 라인박스 높이 그대로 두어 prefix/suffix 와 동일하게 flex 로 수직 센터링
|
|
6767
|
+
// (h-full 이면 input 내부 텍스트 센터링을 브라우저가 수행해 1px 어긋날 수 있음)
|
|
6768
|
+
"min-w-0 flex-1 border-0 bg-transparent p-0 outline-none placeholder:text-[color:var(--cmp-numberInput-text-placeholder)] disabled:cursor-not-allowed",
|
|
6600
6769
|
inputClass
|
|
6601
6770
|
),
|
|
6602
6771
|
style: {
|
|
6603
|
-
fontSize
|
|
6772
|
+
// fontSize/lineHeight 는 컨테이너에서 상속
|
|
6604
6773
|
textAlign: useButton ? "center" : "right",
|
|
6605
6774
|
color: disabled ? "var(--cmp-numberInput-text-disabled)" : "var(--cmp-numberInput-text-default)",
|
|
6606
6775
|
...inputStyle
|
|
6607
6776
|
}
|
|
6608
6777
|
}
|
|
6609
6778
|
),
|
|
6610
|
-
inputSuffix !== "" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0", style: {
|
|
6779
|
+
inputSuffix !== "" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0", style: { color: affixColor }, children: inputSuffix }),
|
|
6611
6780
|
useButton && stepper("inc")
|
|
6612
6781
|
]
|
|
6613
6782
|
}
|
|
@@ -6933,7 +7102,7 @@ function SCalendar({
|
|
|
6933
7102
|
"span",
|
|
6934
7103
|
{
|
|
6935
7104
|
className: cn(
|
|
6936
|
-
"flex h-[var(--cmp-datepicker-calendar-day-circle-size)] w-[var(--cmp-datepicker-calendar-day-circle-size)] items-center justify-center rounded-[var(--cmp-datepicker-calendar-day-circle-radius)] border border-solid border-transparent text-[14px]",
|
|
7105
|
+
"flex h-[var(--cmp-datepicker-calendar-day-circle-size)] w-[var(--cmp-datepicker-calendar-day-circle-size)] items-center justify-center rounded-[var(--cmp-datepicker-calendar-day-circle-radius)] border border-solid border-transparent text-[14px] leading-[var(--cmp-datepicker-calendar-day-circle-size)]",
|
|
6937
7106
|
selected ? "bg-[var(--cmp-datepicker-calendar-day-select-bg)] text-[color:var(--cmp-datepicker-calendar-day-select-text)]" : disabled ? "text-[color:var(--cmp-datepicker-calendar-day-disabled-text)]" : "text-[color:var(--cmp-datepicker-calendar-day-default-text)] hover:border-[color:var(--cmp-datepicker-calendar-day-hover-border)]",
|
|
6938
7107
|
isToday && !disabled && "font-bold"
|
|
6939
7108
|
),
|
|
@@ -7095,16 +7264,25 @@ function SDatePicker({
|
|
|
7095
7264
|
]
|
|
7096
7265
|
}
|
|
7097
7266
|
) }),
|
|
7098
|
-
/* @__PURE__ */ jsxRuntime.jsx(RPopover2__namespace.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7099
|
-
|
|
7267
|
+
/* @__PURE__ */ jsxRuntime.jsx(RPopover2__namespace.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7268
|
+
RPopover2__namespace.Content,
|
|
7100
7269
|
{
|
|
7101
|
-
|
|
7102
|
-
|
|
7103
|
-
|
|
7104
|
-
|
|
7105
|
-
|
|
7270
|
+
side: "bottom",
|
|
7271
|
+
align: "start",
|
|
7272
|
+
sideOffset: 4,
|
|
7273
|
+
className: cn("z-50", FLOATING_SLIDE_ANIM),
|
|
7274
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7275
|
+
SCalendar,
|
|
7276
|
+
{
|
|
7277
|
+
value: value ?? void 0,
|
|
7278
|
+
selectable,
|
|
7279
|
+
elevated: true,
|
|
7280
|
+
onValueChange: select,
|
|
7281
|
+
onViewChange
|
|
7282
|
+
}
|
|
7283
|
+
)
|
|
7106
7284
|
}
|
|
7107
|
-
) })
|
|
7285
|
+
) })
|
|
7108
7286
|
] })
|
|
7109
7287
|
}
|
|
7110
7288
|
);
|
|
@@ -7114,6 +7292,7 @@ function RangeCalendar({
|
|
|
7114
7292
|
selectable,
|
|
7115
7293
|
maxRange,
|
|
7116
7294
|
onSelect,
|
|
7295
|
+
onPendingStartChange,
|
|
7117
7296
|
onViewChange
|
|
7118
7297
|
}) {
|
|
7119
7298
|
const today = todayStr();
|
|
@@ -7176,9 +7355,11 @@ function RangeCalendar({
|
|
|
7176
7355
|
setStart(d);
|
|
7177
7356
|
setEnd(null);
|
|
7178
7357
|
setHover(null);
|
|
7358
|
+
onPendingStartChange?.(d);
|
|
7179
7359
|
return;
|
|
7180
7360
|
}
|
|
7181
7361
|
setEnd(d);
|
|
7362
|
+
onPendingStartChange?.(null);
|
|
7182
7363
|
onSelect([start, d]);
|
|
7183
7364
|
};
|
|
7184
7365
|
const GRID_COLS = "grid grid-cols-[repeat(7,var(--cmp-datepicker-calendar-day-width))]";
|
|
@@ -7313,8 +7494,11 @@ function SDateRangePicker({
|
|
|
7313
7494
|
const portalContainer = usePortalContainer();
|
|
7314
7495
|
const [open, setOpen] = react.useState(false);
|
|
7315
7496
|
const [ruleError, setRuleError] = react.useState("");
|
|
7497
|
+
const [pendingStart, setPendingStart] = react.useState(null);
|
|
7316
7498
|
const hasValue = value != null && value[0] !== "" && value[1] !== "";
|
|
7317
|
-
const
|
|
7499
|
+
const hasDisplay = pendingStart != null || hasValue;
|
|
7500
|
+
const startText = pendingStart ?? (hasValue ? value[0] : "");
|
|
7501
|
+
const endText = pendingStart ? "" : hasValue ? value[1] : "";
|
|
7318
7502
|
useFormField({
|
|
7319
7503
|
name,
|
|
7320
7504
|
validate: () => {
|
|
@@ -7328,6 +7512,7 @@ function SDateRangePicker({
|
|
|
7328
7512
|
const resolvedStatus = status ?? (rules && rules.length > 0 ? ruleError !== "" ? "error" : void 0 : void 0);
|
|
7329
7513
|
const dims = size === "md" ? { padX: 16, gap: 12, icon: 20, minW: 104, fontSize: 14, lineHeight: 24, radius: 6 } : { padX: 12, gap: 8, icon: 16, minW: 80, fontSize: 12, lineHeight: 20, radius: 4 };
|
|
7330
7514
|
const select = (r) => {
|
|
7515
|
+
setPendingStart(null);
|
|
7331
7516
|
onValueChange?.(r);
|
|
7332
7517
|
if (rules && rules.length > 0) setRuleError(runRules(r, rules));
|
|
7333
7518
|
setOpen(false);
|
|
@@ -7352,52 +7537,80 @@ function SDateRangePicker({
|
|
|
7352
7537
|
disabled,
|
|
7353
7538
|
className,
|
|
7354
7539
|
style,
|
|
7355
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7356
|
-
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
|
|
7361
|
-
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
|
|
7368
|
-
|
|
7369
|
-
|
|
7370
|
-
|
|
7371
|
-
|
|
7372
|
-
}
|
|
7373
|
-
|
|
7374
|
-
|
|
7375
|
-
|
|
7376
|
-
|
|
7377
|
-
|
|
7378
|
-
|
|
7379
|
-
|
|
7380
|
-
|
|
7381
|
-
|
|
7382
|
-
|
|
7383
|
-
|
|
7384
|
-
|
|
7385
|
-
|
|
7386
|
-
|
|
7387
|
-
|
|
7388
|
-
|
|
7389
|
-
|
|
7390
|
-
|
|
7391
|
-
|
|
7392
|
-
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7540
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7541
|
+
RPopover2__namespace.Root,
|
|
7542
|
+
{
|
|
7543
|
+
open,
|
|
7544
|
+
onOpenChange: (o) => {
|
|
7545
|
+
if (disabled) return;
|
|
7546
|
+
setOpen(o);
|
|
7547
|
+
if (!o) setPendingStart(null);
|
|
7548
|
+
},
|
|
7549
|
+
children: [
|
|
7550
|
+
/* @__PURE__ */ jsxRuntime.jsx(RPopover2__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7551
|
+
"button",
|
|
7552
|
+
{
|
|
7553
|
+
type: "button",
|
|
7554
|
+
name,
|
|
7555
|
+
disabled,
|
|
7556
|
+
className: "flex h-full w-full items-center overflow-hidden bg-transparent outline-none disabled:cursor-not-allowed",
|
|
7557
|
+
style: { padding: `0 ${dims.padX}px`, gap: dims.gap, borderRadius: dims.radius },
|
|
7558
|
+
children: [
|
|
7559
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7560
|
+
SIcon,
|
|
7561
|
+
{
|
|
7562
|
+
name: "date",
|
|
7563
|
+
size: dims.icon,
|
|
7564
|
+
color: disabled ? "var(--cmp-datepicker-icon-disabled)" : "var(--cmp-datepicker-icon-default)",
|
|
7565
|
+
className: "flex-shrink-0"
|
|
7566
|
+
}
|
|
7567
|
+
),
|
|
7568
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7569
|
+
"span",
|
|
7570
|
+
{
|
|
7571
|
+
className: cn(
|
|
7572
|
+
"flex-1 items-center",
|
|
7573
|
+
hasDisplay ? "flex" : "block truncate text-center"
|
|
7574
|
+
),
|
|
7575
|
+
style: {
|
|
7576
|
+
minWidth: dims.minW,
|
|
7577
|
+
fontSize: dims.fontSize,
|
|
7578
|
+
lineHeight: `${dims.lineHeight}px`,
|
|
7579
|
+
color: disabled ? "var(--cmp-datepicker-text-disabled)" : hasDisplay ? "var(--cmp-datepicker-text-default)" : "var(--cmp-field-hint-color)"
|
|
7580
|
+
},
|
|
7581
|
+
children: hasDisplay ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7582
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate text-right", children: startText }),
|
|
7583
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-[4px]", children: "~" }),
|
|
7584
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate text-left", children: endText })
|
|
7585
|
+
] }) : placeholder
|
|
7586
|
+
}
|
|
7587
|
+
)
|
|
7588
|
+
]
|
|
7589
|
+
}
|
|
7590
|
+
) }),
|
|
7591
|
+
/* @__PURE__ */ jsxRuntime.jsx(RPopover2__namespace.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7592
|
+
RPopover2__namespace.Content,
|
|
7593
|
+
{
|
|
7594
|
+
side: "bottom",
|
|
7595
|
+
align: "start",
|
|
7596
|
+
sideOffset: 4,
|
|
7597
|
+
className: cn("z-50", FLOATING_SLIDE_ANIM),
|
|
7598
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7599
|
+
RangeCalendar,
|
|
7600
|
+
{
|
|
7601
|
+
value: value ?? null,
|
|
7602
|
+
selectable,
|
|
7603
|
+
maxRange,
|
|
7604
|
+
onSelect: select,
|
|
7605
|
+
onPendingStartChange: setPendingStart,
|
|
7606
|
+
onViewChange
|
|
7607
|
+
}
|
|
7608
|
+
)
|
|
7609
|
+
}
|
|
7610
|
+
) })
|
|
7611
|
+
]
|
|
7612
|
+
}
|
|
7613
|
+
)
|
|
7401
7614
|
}
|
|
7402
7615
|
);
|
|
7403
7616
|
}
|
|
@@ -7406,7 +7619,7 @@ var SChip = react.forwardRef(function SChip2({
|
|
|
7406
7619
|
value = "",
|
|
7407
7620
|
error: errorProp = false,
|
|
7408
7621
|
disabled = false,
|
|
7409
|
-
editable =
|
|
7622
|
+
editable = false,
|
|
7410
7623
|
showRemove = true,
|
|
7411
7624
|
placeholder = "",
|
|
7412
7625
|
rules,
|
|
@@ -7559,6 +7772,7 @@ function SFilePicker({
|
|
|
7559
7772
|
hovered = false,
|
|
7560
7773
|
inline = false,
|
|
7561
7774
|
multiple = false,
|
|
7775
|
+
useMultipleListBox = false,
|
|
7562
7776
|
accept,
|
|
7563
7777
|
maxFileSize,
|
|
7564
7778
|
maxTotalSize,
|
|
@@ -7586,8 +7800,8 @@ function SFilePicker({
|
|
|
7586
7800
|
const inputRef = react.useRef(null);
|
|
7587
7801
|
const [ruleError, setRuleError] = react.useState("");
|
|
7588
7802
|
const files = multiple ? Array.isArray(value) ? value : [] : value && !Array.isArray(value) ? value : null;
|
|
7589
|
-
const
|
|
7590
|
-
const displayText =
|
|
7803
|
+
const hasFiles = multiple ? files.length > 0 : !!files;
|
|
7804
|
+
const displayText = !hasFiles ? placeholder : multiple ? files.map((f) => f.name).join(", ") : files.name;
|
|
7591
7805
|
useFormField({
|
|
7592
7806
|
name,
|
|
7593
7807
|
validate: () => {
|
|
@@ -7651,78 +7865,88 @@ function SFilePicker({
|
|
|
7651
7865
|
const padX = size === "md" ? "var(--cmp-filepicker-md-paddingX)" : "var(--cmp-filepicker-sm-paddingX)";
|
|
7652
7866
|
const iconSize = size === "md" ? 20 : 16;
|
|
7653
7867
|
const gapCls = size === "md" ? "gap-[var(--cmp-filepicker-md-gap)]" : "gap-[var(--cmp-filepicker-sm-gap)]";
|
|
7654
|
-
const
|
|
7655
|
-
|
|
7656
|
-
|
|
7657
|
-
|
|
7658
|
-
|
|
7659
|
-
|
|
7660
|
-
|
|
7661
|
-
|
|
7662
|
-
|
|
7663
|
-
|
|
7664
|
-
|
|
7665
|
-
|
|
7666
|
-
|
|
7667
|
-
|
|
7668
|
-
|
|
7669
|
-
|
|
7670
|
-
|
|
7671
|
-
|
|
7672
|
-
|
|
7673
|
-
|
|
7674
|
-
onClick: open,
|
|
7675
|
-
"aria-label": placeholder,
|
|
7676
|
-
className: cn(
|
|
7677
|
-
"flex min-w-0 flex-1 items-center bg-transparent text-left",
|
|
7678
|
-
gapCls,
|
|
7679
|
-
disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
7868
|
+
const inlinePlaceholder = inline && !disabled && !hasFiles;
|
|
7869
|
+
const content = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7870
|
+
"div",
|
|
7871
|
+
{
|
|
7872
|
+
className: cn("group/filepicker flex h-full w-full items-center", gapCls),
|
|
7873
|
+
style: { padding: inline ? 0 : `0 ${padX}` },
|
|
7874
|
+
children: [
|
|
7875
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7876
|
+
"input",
|
|
7877
|
+
{
|
|
7878
|
+
ref: inputRef,
|
|
7879
|
+
type: "file",
|
|
7880
|
+
className: "hidden",
|
|
7881
|
+
disabled,
|
|
7882
|
+
multiple,
|
|
7883
|
+
accept,
|
|
7884
|
+
name: resolvedName,
|
|
7885
|
+
onChange,
|
|
7886
|
+
"aria-label": placeholder
|
|
7887
|
+
}
|
|
7680
7888
|
),
|
|
7681
|
-
|
|
7682
|
-
|
|
7683
|
-
|
|
7684
|
-
|
|
7685
|
-
|
|
7686
|
-
|
|
7687
|
-
|
|
7688
|
-
|
|
7689
|
-
|
|
7690
|
-
|
|
7691
|
-
|
|
7692
|
-
|
|
7693
|
-
|
|
7694
|
-
|
|
7695
|
-
|
|
7696
|
-
|
|
7697
|
-
|
|
7698
|
-
|
|
7699
|
-
|
|
7700
|
-
|
|
7701
|
-
|
|
7702
|
-
|
|
7703
|
-
|
|
7704
|
-
|
|
7705
|
-
|
|
7706
|
-
|
|
7707
|
-
|
|
7708
|
-
|
|
7709
|
-
|
|
7710
|
-
|
|
7711
|
-
|
|
7712
|
-
|
|
7713
|
-
|
|
7714
|
-
|
|
7715
|
-
|
|
7716
|
-
|
|
7717
|
-
|
|
7889
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7890
|
+
"button",
|
|
7891
|
+
{
|
|
7892
|
+
type: "button",
|
|
7893
|
+
disabled,
|
|
7894
|
+
onClick: open,
|
|
7895
|
+
"aria-label": placeholder,
|
|
7896
|
+
className: cn(
|
|
7897
|
+
"flex min-w-0 flex-1 items-center bg-transparent text-left",
|
|
7898
|
+
gapCls,
|
|
7899
|
+
disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
7900
|
+
),
|
|
7901
|
+
children: [
|
|
7902
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7903
|
+
SIcon,
|
|
7904
|
+
{
|
|
7905
|
+
name: "attachFile",
|
|
7906
|
+
size: iconSize,
|
|
7907
|
+
color: disabled ? "var(--cmp-filepicker-icon-disabled)" : "var(--color-grey-65)"
|
|
7908
|
+
}
|
|
7909
|
+
),
|
|
7910
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7911
|
+
"span",
|
|
7912
|
+
{
|
|
7913
|
+
className: cn(
|
|
7914
|
+
"min-w-0 flex-1 truncate text-[12px]",
|
|
7915
|
+
inlinePlaceholder && "text-[color:var(--cmp-filepicker-text-placeholder)] transition-colors group-hover/filepicker:text-[color:var(--cmp-filepicker-text-default)]"
|
|
7916
|
+
),
|
|
7917
|
+
style: inlinePlaceholder ? void 0 : {
|
|
7918
|
+
color: disabled ? "var(--cmp-filepicker-text-disabled)" : hasFiles ? "var(--cmp-filepicker-text-default)" : "var(--cmp-filepicker-text-placeholder)"
|
|
7919
|
+
},
|
|
7920
|
+
children: displayText
|
|
7921
|
+
}
|
|
7922
|
+
)
|
|
7923
|
+
]
|
|
7924
|
+
}
|
|
7925
|
+
),
|
|
7926
|
+
!disabled && hasFiles && /* @__PURE__ */ jsxRuntime.jsx(SGhostButton, { icon: "close", size: "xxs", ariaLabel: "clear", onClick: clear })
|
|
7927
|
+
]
|
|
7928
|
+
}
|
|
7929
|
+
);
|
|
7930
|
+
const chips = multiple && files.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7931
|
+
"div",
|
|
7932
|
+
{
|
|
7933
|
+
className: cn(
|
|
7934
|
+
"mt-[8px] flex gap-[8px]",
|
|
7935
|
+
useMultipleListBox ? "box-border flex-col items-start rounded-[var(--cmp-listBox-radius)] bg-[var(--cmp-listBox-bg)] p-[8px] shadow-[2px_2px_12px_2px_rgba(0,0,0,0.1)]" : "flex-wrap"
|
|
7718
7936
|
),
|
|
7719
|
-
|
|
7720
|
-
|
|
7721
|
-
|
|
7937
|
+
style: useMultipleListBox ? {
|
|
7938
|
+
width: typeof width === "number" ? `${width}px` : width,
|
|
7939
|
+
// label 이 있으면 SField 입력 박스 시작 위치(labelWidth + fieldGap)에 맞춰 정렬
|
|
7940
|
+
marginLeft: label && labelWidth != null ? `calc(${typeof labelWidth === "number" ? `${labelWidth}px` : labelWidth} + var(--sys-space-field-${size}-gap))` : void 0
|
|
7941
|
+
} : void 0,
|
|
7942
|
+
children: files.map((f, i) => /* @__PURE__ */ jsxRuntime.jsx(SChip, { value: f.name, editable: false, onRemove: () => removeChip(i) }, i))
|
|
7943
|
+
}
|
|
7944
|
+
);
|
|
7722
7945
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, style, children: [
|
|
7723
7946
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7724
7947
|
SField,
|
|
7725
7948
|
{
|
|
7949
|
+
borderless: inline,
|
|
7726
7950
|
label,
|
|
7727
7951
|
labelWidth,
|
|
7728
7952
|
icon,
|
|
@@ -7750,6 +7974,7 @@ function SKeyValueTable({
|
|
|
7750
7974
|
fields = [],
|
|
7751
7975
|
search = false,
|
|
7752
7976
|
radius = "default",
|
|
7977
|
+
dense = false,
|
|
7753
7978
|
onChange,
|
|
7754
7979
|
onSearch,
|
|
7755
7980
|
className,
|
|
@@ -7757,6 +7982,8 @@ function SKeyValueTable({
|
|
|
7757
7982
|
}) {
|
|
7758
7983
|
if (fields.length === 0) return null;
|
|
7759
7984
|
const emit2 = (name, value) => onChange?.({ name, value });
|
|
7985
|
+
const cellHeight = dense ? "var(--cmp-table-body-dense-height)" : "var(--cmp-table-keyValue-height)";
|
|
7986
|
+
const cellPadY = dense ? "var(--cmp-table-body-dense-paddingY)" : "var(--cmp-table-keyValue-body-paddingY)";
|
|
7760
7987
|
const renderField = (f) => {
|
|
7761
7988
|
if (f.render) return f.render;
|
|
7762
7989
|
const opt = f.options ?? {};
|
|
@@ -7837,10 +8064,15 @@ function SKeyValueTable({
|
|
|
7837
8064
|
rowSpan: f.thRowSpan && f.thRowSpan > 1 ? f.thRowSpan : void 0,
|
|
7838
8065
|
colSpan: f.thColSpan && f.thColSpan > 1 ? f.thColSpan : void 0,
|
|
7839
8066
|
className: cn(
|
|
7840
|
-
"
|
|
8067
|
+
"box-border bg-[var(--cmp-table-header-bg)] px-[var(--cmp-table-header-paddingX)] text-left align-middle",
|
|
7841
8068
|
cellBorder,
|
|
7842
8069
|
f.thClass
|
|
7843
8070
|
),
|
|
8071
|
+
style: {
|
|
8072
|
+
height: cellHeight,
|
|
8073
|
+
paddingTop: cellPadY,
|
|
8074
|
+
paddingBottom: cellPadY
|
|
8075
|
+
},
|
|
7844
8076
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full w-full items-center justify-between gap-[var(--cmp-table-header-gap)]", children: [
|
|
7845
8077
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex items-center gap-[8px]", children: [
|
|
7846
8078
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[12px] font-bold leading-[20px] text-[color:var(--sys-color-fg-primary)]", children: f.label }),
|
|
@@ -7866,10 +8098,11 @@ function SKeyValueTable({
|
|
|
7866
8098
|
rowSpan: f.tdRowSpan && f.tdRowSpan > 1 ? f.tdRowSpan : void 0,
|
|
7867
8099
|
colSpan: f.tdColSpan && f.tdColSpan > 1 ? f.tdColSpan : void 0,
|
|
7868
8100
|
className: cn(
|
|
7869
|
-
"
|
|
8101
|
+
"box-border bg-[var(--sys-color-bg-frame)] px-[var(--cmp-table-keyValue-body-paddingX-default)] align-middle",
|
|
7870
8102
|
cellBorder,
|
|
7871
8103
|
f.tdClass
|
|
7872
8104
|
),
|
|
8105
|
+
style: { height: cellHeight, paddingTop: cellPadY, paddingBottom: cellPadY },
|
|
7873
8106
|
children: renderField(f)
|
|
7874
8107
|
},
|
|
7875
8108
|
`td-${r}-${c}`
|
|
@@ -7990,9 +8223,9 @@ var POS_ANCHOR = {
|
|
|
7990
8223
|
"top-left": { top: 20, left: 20 },
|
|
7991
8224
|
"top-center": { top: 20, left: "50%" },
|
|
7992
8225
|
"top-right": { top: 20, right: 20 },
|
|
7993
|
-
"bottom-left": { bottom:
|
|
7994
|
-
"bottom-center": { bottom:
|
|
7995
|
-
"bottom-right": { bottom:
|
|
8226
|
+
"bottom-left": { bottom: 100, left: 20 },
|
|
8227
|
+
"bottom-center": { bottom: 100, left: "50%" },
|
|
8228
|
+
"bottom-right": { bottom: 100, right: 20 }
|
|
7996
8229
|
};
|
|
7997
8230
|
var counter = 0;
|
|
7998
8231
|
var SToastContainer = react.forwardRef(
|
|
@@ -8352,7 +8585,7 @@ var SChipInput = react.forwardRef(function SChipInput2({
|
|
|
8352
8585
|
disabledChips = [],
|
|
8353
8586
|
size = "sm",
|
|
8354
8587
|
disabled = false,
|
|
8355
|
-
placeholder = "\uC785\uB825\
|
|
8588
|
+
placeholder = "\uD0DC\uADF8 \uC785\uB825 (Enter\uB85C \uB4F1\uB85D / \uCF64\uB9C8\uB85C \uAD6C\uBD84 / \uB744\uC5B4\uC4F0\uAE30 \uBD88\uAC00)",
|
|
8356
8589
|
name,
|
|
8357
8590
|
rules,
|
|
8358
8591
|
error,
|
|
@@ -8503,6 +8736,7 @@ var SChipInput = react.forwardRef(function SChipInput2({
|
|
|
8503
8736
|
{
|
|
8504
8737
|
label,
|
|
8505
8738
|
labelWidth,
|
|
8739
|
+
labelHeight: `calc(var(--cmp-chipInput-${size}-minHeight) + 2px)`,
|
|
8506
8740
|
icon,
|
|
8507
8741
|
labelTooltip,
|
|
8508
8742
|
labelTooltipProps,
|
|
@@ -8573,9 +8807,11 @@ var SChipInput = react.forwardRef(function SChipInput2({
|
|
|
8573
8807
|
paddingInline: isFieldFilled ? "var(--cmp-chip-paddingX)" : void 0,
|
|
8574
8808
|
borderWidth: isFieldFilled ? "var(--cmp-chip-border-width)" : void 0,
|
|
8575
8809
|
borderStyle: isFieldFilled ? "solid" : void 0,
|
|
8576
|
-
|
|
8810
|
+
// 작성중 필드는 SChip의 editable 수정중(editing) 스타일과 동일하게 —
|
|
8811
|
+
// bg/보더/글자색 모두 focus 토큰을 사용한다.
|
|
8812
|
+
borderColor: isFieldFilled ? "var(--cmp-chip-border-focus)" : void 0,
|
|
8577
8813
|
borderRadius: isFieldFilled ? "var(--cmp-chip-radius)" : 0,
|
|
8578
|
-
background: isFieldFilled ? "var(--cmp-chip-bg-
|
|
8814
|
+
background: isFieldFilled ? "var(--cmp-chip-bg-focus)" : "transparent",
|
|
8579
8815
|
overflow: "hidden"
|
|
8580
8816
|
},
|
|
8581
8817
|
children: [
|
|
@@ -8584,7 +8820,7 @@ var SChipInput = react.forwardRef(function SChipInput2({
|
|
|
8584
8820
|
{
|
|
8585
8821
|
"aria-hidden": true,
|
|
8586
8822
|
className: cn(
|
|
8587
|
-
"invisible col-start-1 row-start-1 whitespace-pre font-
|
|
8823
|
+
"invisible col-start-1 row-start-1 whitespace-pre font-normal",
|
|
8588
8824
|
size === "md" ? "text-14 leading-24" : "text-12 leading-20"
|
|
8589
8825
|
),
|
|
8590
8826
|
children: inputValue !== "" ? inputValue : values.length === 0 ? placeholder : ""
|
|
@@ -8597,12 +8833,14 @@ var SChipInput = react.forwardRef(function SChipInput2({
|
|
|
8597
8833
|
name: resolvedName,
|
|
8598
8834
|
size: 1,
|
|
8599
8835
|
className: cn(
|
|
8600
|
-
"s-chip-input__input col-start-1 row-start-1 w-full border-0 bg-transparent p-0 font-
|
|
8836
|
+
"s-chip-input__input col-start-1 row-start-1 w-full border-0 bg-transparent p-0 font-normal text-(--cmp-chip-content-focus) outline-none placeholder:text-(--cmp-chipInput-text-placeholder) disabled:cursor-not-allowed",
|
|
8601
8837
|
size === "md" ? "text-14 leading-24" : "text-12 leading-20"
|
|
8602
8838
|
),
|
|
8603
8839
|
style: {
|
|
8604
8840
|
minWidth: "1ch",
|
|
8605
|
-
height
|
|
8841
|
+
// height는 지정하지 않고 line-height(20/24px)에 맞춰 자동 크기로 둔다.
|
|
8842
|
+
// var(--cmp-chip-height)(24px)로 고정하면 네이티브 <input>이 남는 세로 여백에
|
|
8843
|
+
// 텍스트를 아래로 밀어 넣어, 확정된 chip 텍스트보다 2px 낮게 보인다.
|
|
8606
8844
|
margin: 0,
|
|
8607
8845
|
overflow: "hidden",
|
|
8608
8846
|
textOverflow: "ellipsis"
|
|
@@ -8647,7 +8885,7 @@ var SChipInput = react.forwardRef(function SChipInput2({
|
|
|
8647
8885
|
showMetaInfo && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8648
8886
|
"div",
|
|
8649
8887
|
{
|
|
8650
|
-
className: "s-chip-input__meta flex items-center gap-8",
|
|
8888
|
+
className: "s-chip-input__meta ml-auto flex items-center gap-8",
|
|
8651
8889
|
onMouseDown: (e) => e.preventDefault(),
|
|
8652
8890
|
children: [
|
|
8653
8891
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8657,17 +8895,11 @@ var SChipInput = react.forwardRef(function SChipInput2({
|
|
|
8657
8895
|
style: { width: 1, height: 12, backgroundColor: "#E1E1E1" }
|
|
8658
8896
|
}
|
|
8659
8897
|
),
|
|
8660
|
-
showMaxCount && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8661
|
-
"
|
|
8662
|
-
|
|
8663
|
-
|
|
8664
|
-
|
|
8665
|
-
"\uCD5C\uB300 ",
|
|
8666
|
-
maxCount,
|
|
8667
|
-
"\uAC1C"
|
|
8668
|
-
]
|
|
8669
|
-
}
|
|
8670
|
-
),
|
|
8898
|
+
showMaxCount && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "s-chip-input__max-count text-12 text-(--cmp-chipInput-text-placeholder)", children: [
|
|
8899
|
+
"\uCD5C\uB300 ",
|
|
8900
|
+
maxCount,
|
|
8901
|
+
"\uAC1C"
|
|
8902
|
+
] }),
|
|
8671
8903
|
showResetLink && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8672
8904
|
STextLink,
|
|
8673
8905
|
{
|