sellmate-design-system-react 7.0.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +68 -3
- package/README.md +16 -1
- package/dist/components/SGnb/README.md +4 -0
- package/dist/components/SGnb/SGnb.d.ts +12 -0
- package/dist/components/SGnb/gnb.config.d.ts +13 -0
- package/dist/components/SIcon/SIcon.d.ts +1 -1
- package/dist/components/SIcon/icons.gen.d.ts +8 -3
- package/dist/components/SLayout/SLayout.d.ts +6 -0
- package/dist/components/SModal/README.md +41 -6
- package/dist/components/SModal/SModalOutlet.d.ts +18 -0
- package/dist/components/SModal/index.d.ts +1 -0
- package/dist/components/SSplitter/README.md +27 -0
- package/dist/components/SSplitter/SSplitter.d.ts +32 -0
- package/dist/components/SSplitter/index.d.ts +2 -0
- package/dist/components/SSplitter/splitter.config.d.ts +15 -0
- package/dist/components/SStepper/README.md +17 -0
- package/dist/components/SStepper/SStepper.d.ts +21 -1
- package/dist/components/SStepper/index.d.ts +1 -1
- package/dist/components/SStepper/stepper.config.d.ts +40 -0
- package/dist/components/STooltip/README.md +2 -0
- package/dist/index.cjs +1327 -255
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1326 -257
- package/dist/index.js.map +1 -1
- package/dist/lib/autofill.d.ts +29 -0
- package/dist/lib/is-dev.d.ts +2 -0
- package/dist/lib/modal-outlet.d.ts +53 -0
- package/dist/llms-full.txt +159 -9
- package/dist/llms.txt +70 -5
- package/dist/styles.css +105 -0
- package/dist/theme.css +4 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
3
|
import { extendTailwindMerge } from 'tailwind-merge';
|
|
4
|
-
import { forwardRef, useState, useRef, useEffect, createContext, useContext, useCallback, useMemo, useId, Children, cloneElement, useImperativeHandle, useLayoutEffect, Fragment as Fragment$1, isValidElement, useSyncExternalStore } from 'react';
|
|
4
|
+
import { forwardRef, useState, useRef, useEffect, createContext, useContext, useCallback, useMemo, useId, Children, cloneElement, useImperativeHandle, useLayoutEffect, Fragment as Fragment$1, isValidElement, useSyncExternalStore, Component } from 'react';
|
|
5
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
6
6
|
import { createPortal } from 'react-dom';
|
|
7
7
|
import * as RCheckbox from '@radix-ui/react-checkbox';
|
|
@@ -438,6 +438,27 @@ var Icon_arrowUp = (p) => {
|
|
|
438
438
|
}
|
|
439
439
|
);
|
|
440
440
|
};
|
|
441
|
+
var Icon_asterisk = (p) => {
|
|
442
|
+
const { size = 24, ...rest } = p;
|
|
443
|
+
return /* @__PURE__ */ jsx(
|
|
444
|
+
"svg",
|
|
445
|
+
{
|
|
446
|
+
width: size,
|
|
447
|
+
height: size,
|
|
448
|
+
viewBox: "0 0 24 24",
|
|
449
|
+
fill: "none",
|
|
450
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
451
|
+
...rest,
|
|
452
|
+
children: /* @__PURE__ */ jsx(
|
|
453
|
+
"path",
|
|
454
|
+
{
|
|
455
|
+
d: "M12.1736 2.91895C12.3072 2.91895 12.4174 3.02382 12.4236 3.15723L12.7644 10.6738L19.4461 7.21191C19.5647 7.15042 19.7112 7.19288 19.7781 7.30859L19.9519 7.61035C20.0184 7.72598 19.9822 7.87332 19.8699 7.94531L13.53 11.999L19.8699 16.0547C19.9822 16.1267 20.0184 16.274 19.9519 16.3896L19.7781 16.6914C19.7113 16.8071 19.5647 16.8496 19.4461 16.7881L12.7654 13.3252L12.4236 20.8428C12.4174 20.9762 12.3072 21.0811 12.1736 21.0811H11.8259C11.6925 21.0809 11.5831 20.9761 11.5769 20.8428L11.2341 13.3252L4.55445 16.7881C4.43582 16.8496 4.28927 16.8071 4.22242 16.6914L4.04859 16.3896C3.98202 16.2739 4.01814 16.1266 4.13063 16.0547L10.4695 12L4.13063 7.94531C4.01813 7.87336 3.98201 7.72606 4.04859 7.61035L4.22242 7.30859C4.28928 7.19292 4.43582 7.15043 4.55445 7.21191L11.2341 10.6738L11.5769 3.15723C11.5831 3.02392 11.6925 2.91909 11.8259 2.91895H12.1736Z",
|
|
456
|
+
fill: "currentColor"
|
|
457
|
+
}
|
|
458
|
+
)
|
|
459
|
+
}
|
|
460
|
+
);
|
|
461
|
+
};
|
|
441
462
|
var Icon_attachFile = (p) => {
|
|
442
463
|
const { size = 24, ...rest } = p;
|
|
443
464
|
return /* @__PURE__ */ jsx(
|
|
@@ -519,7 +540,7 @@ var Icon_barcode = (p) => {
|
|
|
519
540
|
};
|
|
520
541
|
var Icon_bell = (p) => {
|
|
521
542
|
const { size = 24, ...rest } = p;
|
|
522
|
-
return /* @__PURE__ */
|
|
543
|
+
return /* @__PURE__ */ jsx(
|
|
523
544
|
"svg",
|
|
524
545
|
{
|
|
525
546
|
width: size,
|
|
@@ -528,22 +549,15 @@ var Icon_bell = (p) => {
|
|
|
528
549
|
fill: "none",
|
|
529
550
|
xmlns: "http://www.w3.org/2000/svg",
|
|
530
551
|
...rest,
|
|
531
|
-
children:
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
"path",
|
|
541
|
-
{
|
|
542
|
-
d: "M12.0002 2C12.5525 2.00002 13.0002 2.44772 13.0002 3V4.20898C15.9941 4.69573 18.2815 7.3314 18.2815 10.5107V14.1582C18.2815 15.0811 19.1207 15.8005 19.7629 16.4531C20.4046 17.1057 19.6388 17.957 18.7307 17.957H5.26976C4.36161 17.957 3.59581 17.1057 4.23754 16.4531C4.87979 15.8005 5.71898 15.0811 5.71898 14.1582V10.5107C5.71898 7.33139 8.00632 4.69572 11.0002 4.20898V3C11.0002 2.44772 11.4479 2 12.0002 2Z",
|
|
543
|
-
fill: "currentColor"
|
|
544
|
-
}
|
|
545
|
-
)
|
|
546
|
-
]
|
|
552
|
+
children: /* @__PURE__ */ jsx(
|
|
553
|
+
"path",
|
|
554
|
+
{
|
|
555
|
+
fillRule: "evenodd",
|
|
556
|
+
clipRule: "evenodd",
|
|
557
|
+
d: "M11.9997 2C12.8281 2 13.4997 2.67157 13.4997 3.5V4.16504C16.4633 4.82344 18.6734 7.38936 18.6735 10.4561V14.1465L18.6843 14.3301C18.7846 15.2926 19.607 16.8595 20.2468 17.4785C20.9292 18.1386 20.1161 19 19.1511 19H14.9938C14.9938 19.0028 14.994 19.0059 14.9938 19.0088C14.8967 20.6781 13.5933 22 11.9997 22C10.4062 21.9998 9.10269 20.678 9.00556 19.0088C9.00539 19.0059 9.00559 19.0028 9.00556 19H4.84833L4.66962 18.9902C3.78764 18.8932 3.11313 18.0974 3.75263 17.4785C4.39237 16.8596 5.21478 15.2927 5.31513 14.3301L5.32587 14.1465V10.4561C5.32596 7.38957 7.53635 4.82365 10.4997 4.16504V3.5C10.4997 2.67167 11.1714 2.00016 11.9997 2ZM11.9997 5.5C9.0949 5.50016 6.82597 7.76554 6.82587 10.4561V14.1465C6.82577 14.9672 6.47479 15.89 6.14423 16.5703C5.99522 16.8769 5.81805 17.1956 5.6247 17.5H18.3747C18.1813 17.1956 18.0042 16.8769 17.8552 16.5703C17.5246 15.89 17.1736 14.9671 17.1735 14.1465V10.4561C17.1734 7.76545 14.9046 5.5 11.9997 5.5Z",
|
|
558
|
+
fill: "currentColor"
|
|
559
|
+
}
|
|
560
|
+
)
|
|
547
561
|
}
|
|
548
562
|
);
|
|
549
563
|
};
|
|
@@ -1627,28 +1641,7 @@ var Icon_history = (p) => {
|
|
|
1627
1641
|
}
|
|
1628
1642
|
);
|
|
1629
1643
|
};
|
|
1630
|
-
var
|
|
1631
|
-
const { size = 24, ...rest } = p;
|
|
1632
|
-
return /* @__PURE__ */ jsx(
|
|
1633
|
-
"svg",
|
|
1634
|
-
{
|
|
1635
|
-
width: size,
|
|
1636
|
-
height: size,
|
|
1637
|
-
viewBox: "0 0 24 24",
|
|
1638
|
-
fill: "none",
|
|
1639
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1640
|
-
...rest,
|
|
1641
|
-
children: /* @__PURE__ */ jsx(
|
|
1642
|
-
"path",
|
|
1643
|
-
{
|
|
1644
|
-
d: "M7.34277 10.165C7.43716 10.078 7.58268 10.0769 7.67871 10.1621L15.3535 16.9844C16.0043 17.5629 16.9817 17.575 17.6465 17.0127L22 13.3281V20C22 21.1046 21.1046 22 20 22H4C2.89543 22 2 21.1046 2 20V15.0967L7.34277 10.165ZM20 2C21.1046 2 22 2.89543 22 4V11.3633L16.6777 15.8672C16.5828 15.9475 16.4426 15.9459 16.3496 15.8633L8.67578 9.04102C8.00336 8.44333 6.98628 8.45327 6.3252 9.06348L2 13.0557V4C2 2.89543 2.89543 2 4 2H20ZM16.25 6C15.0074 6 14 7.00736 14 8.25C14 9.49264 15.0074 10.5 16.25 10.5C17.4926 10.5 18.5 9.49264 18.5 8.25C18.5 7.00736 17.4926 6 16.25 6Z",
|
|
1645
|
-
fill: "currentColor"
|
|
1646
|
-
}
|
|
1647
|
-
)
|
|
1648
|
-
}
|
|
1649
|
-
);
|
|
1650
|
-
};
|
|
1651
|
-
var Icon_imageOutline = (p) => {
|
|
1644
|
+
var Icon_image = (p) => {
|
|
1652
1645
|
const { size = 24, ...rest } = p;
|
|
1653
1646
|
return /* @__PURE__ */ jsxs(
|
|
1654
1647
|
"svg",
|
|
@@ -1665,7 +1658,7 @@ var Icon_imageOutline = (p) => {
|
|
|
1665
1658
|
{
|
|
1666
1659
|
fillRule: "evenodd",
|
|
1667
1660
|
clipRule: "evenodd",
|
|
1668
|
-
d: "
|
|
1661
|
+
d: "M16 5.25C17.5188 5.25 18.75 6.48122 18.75 8C18.75 9.51878 17.5188 10.75 16 10.75C14.4812 10.75 13.25 9.51878 13.25 8C13.25 6.48122 14.4812 5.25 16 5.25ZM16 6.75C15.3096 6.75 14.75 7.30964 14.75 8C14.75 8.69036 15.3096 9.25 16 9.25C16.6904 9.25 17.25 8.69036 17.25 8C17.25 7.30964 16.6904 6.75 16 6.75Z",
|
|
1669
1662
|
fill: "currentColor"
|
|
1670
1663
|
}
|
|
1671
1664
|
),
|
|
@@ -1674,7 +1667,7 @@ var Icon_imageOutline = (p) => {
|
|
|
1674
1667
|
{
|
|
1675
1668
|
fillRule: "evenodd",
|
|
1676
1669
|
clipRule: "evenodd",
|
|
1677
|
-
d: "M19.2002 2.0498C20.7187 2.05002 21.9501 3.28123 21.9502 4.7998V19.2002C21.95 20.7187 20.7187 21.95 19.2002 21.9502H4.7998C3.28124 21.9501 2.05001 20.7187 2.0498 19.2002V4.7998C2.0499 3.28117 3.
|
|
1670
|
+
d: "M19.2002 2.0498C20.7187 2.05002 21.9501 3.28123 21.9502 4.7998V19.2002C21.95 20.7187 20.7187 21.95 19.2002 21.9502H4.7998C3.28124 21.9501 2.05001 20.7187 2.0498 19.2002V4.7998C2.0499 3.28117 3.28116 2.0499 4.7998 2.0498H19.2002ZM4.7998 3.5498C4.10959 3.5499 3.5499 4.10959 3.5498 4.7998V11.8037L6.76465 8.70801C7.1683 8.31972 7.81224 8.33867 8.19238 8.75L14.9121 16.0293C15.2496 16.3947 15.8042 16.457 16.2139 16.1748L19.4326 13.9561C19.7591 13.731 20.1435 13.7318 20.4502 13.8867V4.7998C20.4501 4.10966 19.8903 3.55002 19.2002 3.5498H4.7998Z",
|
|
1678
1671
|
fill: "currentColor"
|
|
1679
1672
|
}
|
|
1680
1673
|
)
|
|
@@ -1793,6 +1786,36 @@ var Icon_launcher = (p) => {
|
|
|
1793
1786
|
}
|
|
1794
1787
|
);
|
|
1795
1788
|
};
|
|
1789
|
+
var Icon_leftRight = (p) => {
|
|
1790
|
+
const { size = 24, ...rest } = p;
|
|
1791
|
+
return /* @__PURE__ */ jsxs(
|
|
1792
|
+
"svg",
|
|
1793
|
+
{
|
|
1794
|
+
width: size,
|
|
1795
|
+
height: size,
|
|
1796
|
+
viewBox: "0 0 24 24",
|
|
1797
|
+
fill: "none",
|
|
1798
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1799
|
+
...rest,
|
|
1800
|
+
children: [
|
|
1801
|
+
/* @__PURE__ */ jsx(
|
|
1802
|
+
"path",
|
|
1803
|
+
{
|
|
1804
|
+
d: "M6.46594 12.5001C6.7421 12.1916 7.21587 12.1655 7.52454 12.4415C7.83288 12.7177 7.85911 13.1915 7.58313 13.5001L4.67688 16.7501H21.0001C21.4142 16.7502 21.7501 17.086 21.7501 17.5001C21.75 17.9142 21.4142 18.25 21.0001 18.2501H4.67688L7.58313 21.5001C7.859 21.8088 7.83295 22.2826 7.52454 22.5587C7.21592 22.8347 6.74212 22.8085 6.46594 22.5001L2.44153 18.0001C2.18693 17.7154 2.18693 17.2848 2.44153 17.0001L6.46594 12.5001Z",
|
|
1805
|
+
fill: "currentColor"
|
|
1806
|
+
}
|
|
1807
|
+
),
|
|
1808
|
+
/* @__PURE__ */ jsx(
|
|
1809
|
+
"path",
|
|
1810
|
+
{
|
|
1811
|
+
d: "M16.4757 1.44153C16.7844 1.16552 17.2582 1.19163 17.5343 1.50013L21.5587 6.00013C21.8132 6.28481 21.8132 6.71549 21.5587 7.00013L17.5343 11.5001C17.2582 11.8086 16.7844 11.8346 16.4757 11.5587C16.1672 11.2826 16.1411 10.8088 16.4171 10.5001L19.3234 7.25013H3.00012C2.58596 7.25013 2.2502 6.91428 2.25012 6.50013C2.25012 6.08591 2.58591 5.75013 3.00012 5.75013H19.3234L16.4171 2.50013C16.1411 2.19146 16.1672 1.71769 16.4757 1.44153Z",
|
|
1812
|
+
fill: "currentColor"
|
|
1813
|
+
}
|
|
1814
|
+
)
|
|
1815
|
+
]
|
|
1816
|
+
}
|
|
1817
|
+
);
|
|
1818
|
+
};
|
|
1796
1819
|
var Icon_line = (p) => {
|
|
1797
1820
|
const { size = 24, ...rest } = p;
|
|
1798
1821
|
return /* @__PURE__ */ jsxs(
|
|
@@ -2411,6 +2434,27 @@ var Icon_search = (p) => {
|
|
|
2411
2434
|
}
|
|
2412
2435
|
);
|
|
2413
2436
|
};
|
|
2437
|
+
var Icon_send = (p) => {
|
|
2438
|
+
const { size = 24, ...rest } = p;
|
|
2439
|
+
return /* @__PURE__ */ jsx(
|
|
2440
|
+
"svg",
|
|
2441
|
+
{
|
|
2442
|
+
width: size,
|
|
2443
|
+
height: size,
|
|
2444
|
+
viewBox: "0 0 24 24",
|
|
2445
|
+
fill: "none",
|
|
2446
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2447
|
+
...rest,
|
|
2448
|
+
children: /* @__PURE__ */ jsx(
|
|
2449
|
+
"path",
|
|
2450
|
+
{
|
|
2451
|
+
d: "M19.8551 3.15204C20.1245 3.06242 20.4219 3.13291 20.6226 3.33368C20.8233 3.53455 20.8931 3.83186 20.8033 4.10126L15.3209 20.5485C14.8017 22.1061 12.6164 22.1561 12.0269 20.6237L9.61191 14.3434L3.33261 11.9284C1.80035 11.3391 1.84967 9.15489 3.40683 8.63544L19.8551 3.15204ZM11.067 13.9479L13.4273 20.0847C13.5115 20.3036 13.8239 20.2964 13.898 20.0739L18.3756 6.64032L11.067 13.9479ZM3.88144 10.0583C3.65915 10.1325 3.65209 10.4437 3.8707 10.528L10.0064 12.8874L17.3141 5.58075L3.88144 10.0583Z",
|
|
2452
|
+
fill: "currentColor"
|
|
2453
|
+
}
|
|
2454
|
+
)
|
|
2455
|
+
}
|
|
2456
|
+
);
|
|
2457
|
+
};
|
|
2414
2458
|
var Icon_setting = (p) => {
|
|
2415
2459
|
const { size = 24, ...rest } = p;
|
|
2416
2460
|
return /* @__PURE__ */ jsx(
|
|
@@ -2432,7 +2476,7 @@ var Icon_setting = (p) => {
|
|
|
2432
2476
|
}
|
|
2433
2477
|
);
|
|
2434
2478
|
};
|
|
2435
|
-
var
|
|
2479
|
+
var Icon_settingOutline = (p) => {
|
|
2436
2480
|
const { size = 24, ...rest } = p;
|
|
2437
2481
|
return /* @__PURE__ */ jsxs(
|
|
2438
2482
|
"svg",
|
|
@@ -2447,7 +2491,9 @@ var Icon_shield = (p) => {
|
|
|
2447
2491
|
/* @__PURE__ */ jsx(
|
|
2448
2492
|
"path",
|
|
2449
2493
|
{
|
|
2450
|
-
|
|
2494
|
+
fillRule: "evenodd",
|
|
2495
|
+
clipRule: "evenodd",
|
|
2496
|
+
d: "M11.9996 8C14.2087 8 15.9996 9.79086 15.9996 12C15.9996 14.2091 14.2087 16 11.9996 16C9.79065 15.9998 7.9996 14.209 7.9996 12C7.9996 9.791 9.79065 8.00022 11.9996 8ZM11.9996 9.5C10.6191 9.50022 9.4996 10.6194 9.4996 12C9.4996 13.3806 10.6191 14.4998 11.9996 14.5C13.3803 14.5 14.4996 13.3807 14.4996 12C14.4996 10.6193 13.3803 9.5 11.9996 9.5Z",
|
|
2451
2497
|
fill: "currentColor"
|
|
2452
2498
|
}
|
|
2453
2499
|
),
|
|
@@ -2456,7 +2502,7 @@ var Icon_shield = (p) => {
|
|
|
2456
2502
|
{
|
|
2457
2503
|
fillRule: "evenodd",
|
|
2458
2504
|
clipRule: "evenodd",
|
|
2459
|
-
d: "
|
|
2505
|
+
d: "M13.1851 1C13.5085 1 13.7979 1.20161 13.9068 1.50293L14.6832 3.65527C14.9613 3.72452 15.2006 3.79367 15.4029 3.86621C15.5134 3.90579 15.64 3.95628 15.7828 4.0166L16.2613 4.22949L18.0689 3.27246C18.2163 3.19438 18.3856 3.16661 18.5504 3.19238C18.7153 3.21835 18.8676 3.29735 18.984 3.41699L20.5748 5.06152C20.7859 5.28042 20.8459 5.60054 20.7271 5.87988L19.8785 7.86719C20.0192 8.12546 20.1316 8.34655 20.2174 8.53125C20.3097 8.73243 20.4239 9.01001 20.5601 9.36719L22.5377 10.2148L22.6432 10.2695C22.8771 10.4155 23.016 10.6779 22.9986 10.9561L22.8531 13.2383L22.8375 13.3486C22.8141 13.4565 22.7672 13.5589 22.6998 13.6475L22.6266 13.7305C22.5476 13.8076 22.4523 13.8674 22.3473 13.9043L20.4752 14.5693C20.4213 14.8278 20.3647 15.0493 20.3053 15.2363L20.1519 15.666C20.0973 15.8078 20.0394 15.9488 19.9781 16.0879L20.9185 18.166L20.9586 18.2793C20.9899 18.3941 20.9942 18.5153 20.9693 18.6328L20.9351 18.7471C20.8923 18.8584 20.823 18.959 20.733 19.0391L18.9449 20.6357L18.8512 20.707C18.753 20.7705 18.6411 20.812 18.524 20.8262L18.4059 20.8311C18.2889 20.8272 18.1732 20.7964 18.0689 20.7412L16.2262 19.7647C15.9378 19.9173 15.6394 20.0519 15.3346 20.168L14.5299 20.4697L13.815 22.4502L13.7672 22.5547C13.7121 22.6552 13.6346 22.7424 13.5406 22.8096L13.442 22.8701C13.3398 22.9219 13.2264 22.9498 13.1109 22.9522L11.0211 23C10.9023 23.0031 10.7841 22.9783 10.6773 22.9287L10.5748 22.8711C10.4431 22.7831 10.3415 22.6557 10.2848 22.5078L9.44198 20.2783C9.1547 20.1801 8.86973 20.0733 8.58847 19.959C8.35848 19.8594 8.13142 19.7518 7.90878 19.6367L5.81894 20.5303L5.71347 20.5664C5.64162 20.5854 5.56705 20.594 5.49276 20.5918L5.38241 20.5801C5.27208 20.5606 5.1671 20.5175 5.07577 20.4541L4.98886 20.3838L3.44198 18.9326C3.35574 18.8519 3.28988 18.7525 3.2496 18.6426L3.21737 18.5303C3.18685 18.376 3.20586 18.2154 3.27109 18.0723L4.1705 16.1143C4.05101 15.8824 3.93933 15.6454 3.83749 15.4053C3.71871 15.1116 3.60934 14.814 3.50839 14.5137L1.53866 13.9141C1.41879 13.8777 1.31002 13.8122 1.22226 13.7246L1.14218 13.6299C1.04481 13.4941 0.994151 13.3291 0.999601 13.1621L1.07675 11.0498C1.08222 10.9121 1.1259 10.7782 1.20175 10.6631C1.25874 10.5767 1.33262 10.5026 1.41855 10.4463L1.50839 10.3965L3.57382 9.4043C3.6695 9.05348 3.75306 8.78014 3.82675 8.58106C3.9305 8.31518 4.0461 8.05376 4.17245 7.79785L3.27694 5.90625C3.20906 5.76263 3.18873 5.6004 3.21835 5.44434C3.24057 5.3276 3.2899 5.21813 3.36191 5.125L3.44198 5.03711L4.98593 3.57813C5.09409 3.47611 5.23034 3.40784 5.37655 3.38086C5.52273 3.354 5.67376 3.37002 5.81112 3.42676L7.89901 4.28906C8.12988 4.13515 8.33881 4.01023 8.52792 3.91016C8.75326 3.79034 9.05504 3.66547 9.43417 3.53027L10.1607 1.50488C10.2143 1.35699 10.3122 1.22899 10.441 1.13867C10.57 1.04839 10.7249 0.999723 10.8824 1H13.1851ZM10.8463 4.03613C10.6946 4.45908 10.3613 4.79149 9.93808 4.94238C9.5875 5.06739 9.36381 5.16528 9.23202 5.23535L9.23007 5.23633C9.09075 5.31005 8.9247 5.40801 8.73105 5.53711C8.31531 5.81413 7.78855 5.86633 7.32675 5.67578L5.67343 4.99219L4.86484 5.75586L5.52792 7.15625C5.72387 7.57031 5.71997 8.05117 5.51718 8.46192C5.41394 8.67102 5.31944 8.88459 5.23398 9.10156L5.14218 9.37598C5.10686 9.491 5.06681 9.63118 5.02109 9.79883C4.90655 10.2184 4.6153 10.5675 4.22323 10.7559L2.55917 11.5547L2.51913 12.6436L3.94491 13.0781L4.11386 13.1416C4.49659 13.3106 4.79411 13.6335 4.92929 14.0352C5.01804 14.2992 5.11534 14.5609 5.21933 14.8193L5.35507 15.126C5.40249 15.2271 5.45233 15.3275 5.50351 15.4268C5.71457 15.8364 5.72588 16.3204 5.53378 16.7393L4.85898 18.2061L5.66659 18.9639L7.31894 18.2578L7.47616 18.2012C7.84698 18.0894 8.24932 18.125 8.59726 18.3047C8.78187 18.4001 8.97024 18.4892 9.16073 18.5723C9.28594 18.6231 9.41211 18.6724 9.53866 18.7197L9.92733 18.8594L10.0816 18.9219C10.4317 19.0869 10.7069 19.382 10.8453 19.748L11.5025 21.4883L12.5748 21.4639L13.1187 19.96L13.1832 19.8096C13.3508 19.4678 13.6433 19.2005 14.0035 19.0654L14.8004 18.7666L15.1676 18.6143C15.288 18.5597 15.4071 18.5013 15.524 18.4395L15.692 18.3623C16.0928 18.2097 16.5441 18.236 16.9283 18.4395L18.3238 19.1787L19.3248 18.2842L18.6109 16.7061C18.4355 16.318 18.4336 15.8732 18.6051 15.4834C18.7075 15.2508 18.7973 15.0126 18.8775 14.7715C18.9163 14.6479 18.9608 14.4825 19.0064 14.2637L19.0582 14.0762C19.2064 13.6503 19.5409 13.3098 19.9723 13.1563L21.3873 12.6523L21.4674 11.3877L19.9703 10.7461C19.5971 10.5861 19.3035 10.2817 19.1588 9.90234C19.0283 9.56034 18.9273 9.31663 18.8541 9.15723C18.7854 9.00988 18.689 8.81973 18.5611 8.58496C18.3418 8.18212 18.3187 7.70024 18.4986 7.27832L19.1519 5.74707L18.2867 4.85352L16.9625 5.55567C16.5475 5.77509 16.0531 5.78799 15.6275 5.58984C15.2974 5.43614 15.0582 5.33606 14.8971 5.27832C14.7581 5.22851 14.5701 5.17338 14.3209 5.11133C13.8356 4.99032 13.4418 4.63455 13.2721 4.16406L12.6715 2.5H11.3971L10.8463 4.03613Z",
|
|
2460
2506
|
fill: "currentColor"
|
|
2461
2507
|
}
|
|
2462
2508
|
)
|
|
@@ -2464,9 +2510,9 @@ var Icon_shield = (p) => {
|
|
|
2464
2510
|
}
|
|
2465
2511
|
);
|
|
2466
2512
|
};
|
|
2467
|
-
var
|
|
2513
|
+
var Icon_shield = (p) => {
|
|
2468
2514
|
const { size = 24, ...rest } = p;
|
|
2469
|
-
return /* @__PURE__ */
|
|
2515
|
+
return /* @__PURE__ */ jsxs(
|
|
2470
2516
|
"svg",
|
|
2471
2517
|
{
|
|
2472
2518
|
width: size,
|
|
@@ -2475,19 +2521,28 @@ var Icon_sidebar = (p) => {
|
|
|
2475
2521
|
fill: "none",
|
|
2476
2522
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2477
2523
|
...rest,
|
|
2478
|
-
children:
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2524
|
+
children: [
|
|
2525
|
+
/* @__PURE__ */ jsx(
|
|
2526
|
+
"path",
|
|
2527
|
+
{
|
|
2528
|
+
d: "M16.2549 9.3486C16.5477 9.05582 17.0225 9.05602 17.3154 9.3486C17.6083 9.64149 17.6083 10.1163 17.3154 10.4091L12.0859 15.6386C11.6954 16.0291 11.0624 16.0291 10.6719 15.6386L7.46973 12.4365C7.17728 12.1436 7.17703 11.6687 7.46973 11.3759C7.76264 11.0833 8.23844 11.0831 8.53125 11.3759L11.3789 14.2246L16.2549 9.3486Z",
|
|
2529
|
+
fill: "currentColor"
|
|
2530
|
+
}
|
|
2531
|
+
),
|
|
2532
|
+
/* @__PURE__ */ jsx(
|
|
2533
|
+
"path",
|
|
2534
|
+
{
|
|
2535
|
+
fillRule: "evenodd",
|
|
2536
|
+
clipRule: "evenodd",
|
|
2537
|
+
d: "M11.501 1.4404C11.8718 1.27889 12.3024 1.30624 12.6533 1.52145L20.1533 6.12204C20.5238 6.34931 20.7499 6.75284 20.75 7.18747V10.5302C20.75 11.8881 20.6005 13.3051 20.0645 14.6425C19.5554 15.9124 18.7155 17.6378 17.4502 19.1894C16.1835 20.7426 14.4592 22.1581 12.1816 22.7275L12 22.7734L11.8184 22.7275C9.54076 22.1581 7.81646 20.7426 6.5498 19.1894C5.2845 17.6378 4.4446 15.9124 3.93555 14.6425C3.39949 13.3051 3.25 11.8881 3.25 10.5302V7.18747C3.25007 6.75284 3.47619 6.34931 3.84668 6.12204L11.3467 1.52145L11.501 1.4404ZM4.75 7.32712V10.5302C4.75 11.7887 4.89082 12.9929 5.32812 14.084C5.80497 15.2735 6.57635 16.8486 7.71191 18.2412C8.80911 19.5866 10.2182 20.7255 12 21.2216C13.7818 20.7255 15.1909 19.5866 16.2881 18.2412C17.4236 16.8486 18.195 15.2735 18.6719 14.084C19.1092 12.9929 19.25 11.7887 19.25 10.5302V7.32712L12 2.87985L4.75 7.32712Z",
|
|
2538
|
+
fill: "currentColor"
|
|
2539
|
+
}
|
|
2540
|
+
)
|
|
2541
|
+
]
|
|
2487
2542
|
}
|
|
2488
2543
|
);
|
|
2489
2544
|
};
|
|
2490
|
-
var
|
|
2545
|
+
var Icon_sidebar = (p) => {
|
|
2491
2546
|
const { size = 24, ...rest } = p;
|
|
2492
2547
|
return /* @__PURE__ */ jsx(
|
|
2493
2548
|
"svg",
|
|
@@ -2501,7 +2556,9 @@ var Icon_star = (p) => {
|
|
|
2501
2556
|
children: /* @__PURE__ */ jsx(
|
|
2502
2557
|
"path",
|
|
2503
2558
|
{
|
|
2504
|
-
|
|
2559
|
+
fillRule: "evenodd",
|
|
2560
|
+
clipRule: "evenodd",
|
|
2561
|
+
d: "M19 3C20.6569 3 22 4.34315 22 6V18L21.9961 18.1543C21.9184 19.6883 20.6883 20.9184 19.1543 20.9961L19 21H5L4.8457 20.9961C3.31166 20.9184 2.08163 19.6883 2.00391 18.1543L2 18V6C2 4.34315 3.34315 3 5 3H19ZM5 4.5C4.17157 4.5 3.5 5.17157 3.5 6V18C3.5 18.8284 4.17157 19.5 5 19.5H8V4.5H5ZM9.5 19.5H19C19.8284 19.5 20.5 18.8284 20.5 18V6C20.5 5.17157 19.8284 4.5 19 4.5H9.5V19.5Z",
|
|
2505
2562
|
fill: "currentColor"
|
|
2506
2563
|
}
|
|
2507
2564
|
)
|
|
@@ -2570,6 +2627,52 @@ var Icon_synchronize = (p) => {
|
|
|
2570
2627
|
}
|
|
2571
2628
|
);
|
|
2572
2629
|
};
|
|
2630
|
+
var Icon_thumbsDown = (p) => {
|
|
2631
|
+
const { size = 24, ...rest } = p;
|
|
2632
|
+
return /* @__PURE__ */ jsx(
|
|
2633
|
+
"svg",
|
|
2634
|
+
{
|
|
2635
|
+
width: size,
|
|
2636
|
+
height: size,
|
|
2637
|
+
viewBox: "0 0 24 24",
|
|
2638
|
+
fill: "none",
|
|
2639
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2640
|
+
...rest,
|
|
2641
|
+
children: /* @__PURE__ */ jsx(
|
|
2642
|
+
"path",
|
|
2643
|
+
{
|
|
2644
|
+
fillRule: "evenodd",
|
|
2645
|
+
clipRule: "evenodd",
|
|
2646
|
+
d: "M13.5 21.25C14.7426 21.25 15.75 20.2426 15.75 19V15.5C15.75 15.3619 15.8619 15.25 16 15.25H18.8936C20.7018 15.25 22.0178 13.5347 21.5498 11.7881L20.1484 6.55762C19.5504 4.3259 17.4329 2.84845 15.1318 3.05664L8.05371 3.69727C7.76261 3.13498 7.17686 2.75 6.5 2.75H4.5C3.25736 2.75 2.25 3.75736 2.25 5V13C2.25 14.2426 3.25736 15.25 4.5 15.25H8.25V15.1689C8.57271 15.4885 8.90914 15.8467 9.23438 16.2344C10.0174 17.1678 10.7037 18.2229 11.0371 19.2568C11.3509 20.2303 12.2316 21.25 13.5 21.25ZM13.5 19.75C13.1116 19.75 12.6594 19.4004 12.4648 18.7969C12.0481 17.5041 11.2278 16.2778 10.3828 15.2705C9.6516 14.3988 8.87296 13.658 8.25 13.1416V5.18555L15.2676 4.55078C16.8419 4.40844 18.2901 5.41938 18.6992 6.94629L20.1006 12.1768C20.3132 12.9706 19.7154 13.75 18.8936 13.75H16C15.0335 13.75 14.25 14.5335 14.25 15.5V19C14.25 19.4142 13.9142 19.75 13.5 19.75Z",
|
|
2647
|
+
fill: "currentColor"
|
|
2648
|
+
}
|
|
2649
|
+
)
|
|
2650
|
+
}
|
|
2651
|
+
);
|
|
2652
|
+
};
|
|
2653
|
+
var Icon_thumbsUp = (p) => {
|
|
2654
|
+
const { size = 24, ...rest } = p;
|
|
2655
|
+
return /* @__PURE__ */ jsx(
|
|
2656
|
+
"svg",
|
|
2657
|
+
{
|
|
2658
|
+
width: size,
|
|
2659
|
+
height: size,
|
|
2660
|
+
viewBox: "0 0 24 24",
|
|
2661
|
+
fill: "none",
|
|
2662
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2663
|
+
...rest,
|
|
2664
|
+
children: /* @__PURE__ */ jsx(
|
|
2665
|
+
"path",
|
|
2666
|
+
{
|
|
2667
|
+
fillRule: "evenodd",
|
|
2668
|
+
clipRule: "evenodd",
|
|
2669
|
+
d: "M13.5 2.75C14.7426 2.75 15.75 3.75736 15.75 5V8.5C15.75 8.63807 15.8619 8.75 16 8.75H18.8936C20.7018 8.75 22.0178 10.4653 21.5498 12.2119L20.1484 17.4424C19.5504 19.6741 17.4329 21.1516 15.1318 20.9434L8.05371 20.3027C7.76261 20.865 7.17686 21.25 6.5 21.25H4.5C3.25736 21.25 2.25 20.2426 2.25 19V11C2.25 9.75736 3.25736 8.75 4.5 8.75H8.25V8.83105C8.57271 8.51149 8.90914 8.15334 9.23438 7.76562C10.0174 6.83217 10.7037 5.77712 11.0371 4.74316C11.3509 3.76975 12.2316 2.75 13.5 2.75ZM13.5 4.25C13.1116 4.25 12.6594 4.59961 12.4648 5.20312C12.0481 6.49588 11.2278 7.72217 10.3828 8.72949C9.6516 9.60115 8.87296 10.342 8.25 10.8584V18.8145L15.2676 19.4492C16.8419 19.5916 18.2901 18.5806 18.6992 17.0537L20.1006 11.8232C20.3132 11.0294 19.7154 10.25 18.8936 10.25H16C15.0335 10.25 14.25 9.4665 14.25 8.5V5C14.25 4.58579 13.9142 4.25 13.5 4.25Z",
|
|
2670
|
+
fill: "currentColor"
|
|
2671
|
+
}
|
|
2672
|
+
)
|
|
2673
|
+
}
|
|
2674
|
+
);
|
|
2675
|
+
};
|
|
2573
2676
|
var Icon_updown = (p) => {
|
|
2574
2677
|
const { size = 24, ...rest } = p;
|
|
2575
2678
|
return /* @__PURE__ */ jsxs(
|
|
@@ -2621,6 +2724,50 @@ var Icon_user = (p) => {
|
|
|
2621
2724
|
}
|
|
2622
2725
|
);
|
|
2623
2726
|
};
|
|
2727
|
+
var Icon_users = (p) => {
|
|
2728
|
+
const { size = 24, ...rest } = p;
|
|
2729
|
+
return /* @__PURE__ */ jsxs(
|
|
2730
|
+
"svg",
|
|
2731
|
+
{
|
|
2732
|
+
width: size,
|
|
2733
|
+
height: size,
|
|
2734
|
+
viewBox: "0 0 24 24",
|
|
2735
|
+
fill: "none",
|
|
2736
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2737
|
+
...rest,
|
|
2738
|
+
children: [
|
|
2739
|
+
/* @__PURE__ */ jsx(
|
|
2740
|
+
"path",
|
|
2741
|
+
{
|
|
2742
|
+
d: "M11.4062 13.5C14.5 13.5 17 16 17 19.0938C17 19.5938 16.5625 20 16.0625 20H3.90625C3.40625 20 3 19.5938 3 19.0938C3 16 5.46875 13.5 8.5625 13.5H11.4062Z",
|
|
2743
|
+
fill: "currentColor"
|
|
2744
|
+
}
|
|
2745
|
+
),
|
|
2746
|
+
/* @__PURE__ */ jsx(
|
|
2747
|
+
"path",
|
|
2748
|
+
{
|
|
2749
|
+
d: "M15.4189 13.5C18.8153 13.5001 21.5 16.4402 21.5 20H20.5C20.5 16.9999 18.3097 14.6219 15.626 14.5049C15.1851 14.0929 14.6769 13.7528 14.1201 13.5H15.4189Z",
|
|
2750
|
+
fill: "currentColor"
|
|
2751
|
+
}
|
|
2752
|
+
),
|
|
2753
|
+
/* @__PURE__ */ jsx(
|
|
2754
|
+
"path",
|
|
2755
|
+
{
|
|
2756
|
+
d: "M10 4C12.1875 4 14 5.8125 14 8C14 10.2188 12.1875 12 10 12C7.78125 12 6 10.2188 6 8C6 5.8125 7.78125 4 10 4Z",
|
|
2757
|
+
fill: "currentColor"
|
|
2758
|
+
}
|
|
2759
|
+
),
|
|
2760
|
+
/* @__PURE__ */ jsx(
|
|
2761
|
+
"path",
|
|
2762
|
+
{
|
|
2763
|
+
d: "M14 4C16.1902 4 18 5.8098 18 8C18 10.2201 16.1877 12 14 12V11C15.6405 11 17 9.66273 17 8C17 6.36208 15.6379 5 14 5V4Z",
|
|
2764
|
+
fill: "currentColor"
|
|
2765
|
+
}
|
|
2766
|
+
)
|
|
2767
|
+
]
|
|
2768
|
+
}
|
|
2769
|
+
);
|
|
2770
|
+
};
|
|
2624
2771
|
var Icon_visibilityOff = (p) => {
|
|
2625
2772
|
const { size = 24, ...rest } = p;
|
|
2626
2773
|
return /* @__PURE__ */ jsx(
|
|
@@ -2840,6 +2987,7 @@ var ICONS = {
|
|
|
2840
2987
|
arrowLeft: Icon_arrowLeft,
|
|
2841
2988
|
arrowRight: Icon_arrowRight,
|
|
2842
2989
|
arrowUp: Icon_arrowUp,
|
|
2990
|
+
asterisk: Icon_asterisk,
|
|
2843
2991
|
attachFile: Icon_attachFile,
|
|
2844
2992
|
barcode: Icon_barcode,
|
|
2845
2993
|
bell: Icon_bell,
|
|
@@ -2882,10 +3030,10 @@ var ICONS = {
|
|
|
2882
3030
|
helpFill: Icon_helpFill,
|
|
2883
3031
|
helpOutline: Icon_helpOutline,
|
|
2884
3032
|
history: Icon_history,
|
|
2885
|
-
|
|
2886
|
-
imageOutline: Icon_imageOutline,
|
|
3033
|
+
image: Icon_image,
|
|
2887
3034
|
inline: Icon_inline,
|
|
2888
3035
|
launcher: Icon_launcher,
|
|
3036
|
+
leftRight: Icon_leftRight,
|
|
2889
3037
|
line: Icon_line,
|
|
2890
3038
|
location: Icon_location,
|
|
2891
3039
|
logout: Icon_logout,
|
|
@@ -2906,14 +3054,18 @@ var ICONS = {
|
|
|
2906
3054
|
row: Icon_row,
|
|
2907
3055
|
save: Icon_save,
|
|
2908
3056
|
search: Icon_search,
|
|
3057
|
+
send: Icon_send,
|
|
2909
3058
|
setting: Icon_setting,
|
|
3059
|
+
settingOutline: Icon_settingOutline,
|
|
2910
3060
|
shield: Icon_shield,
|
|
2911
3061
|
sidebar: Icon_sidebar,
|
|
2912
|
-
star: Icon_star,
|
|
2913
3062
|
store: Icon_store,
|
|
2914
3063
|
synchronize: Icon_synchronize,
|
|
3064
|
+
thumbsDown: Icon_thumbsDown,
|
|
3065
|
+
thumbsUp: Icon_thumbsUp,
|
|
2915
3066
|
updown: Icon_updown,
|
|
2916
3067
|
user: Icon_user,
|
|
3068
|
+
users: Icon_users,
|
|
2917
3069
|
visibilityOff: Icon_visibilityOff,
|
|
2918
3070
|
visibilityOn: Icon_visibilityOn,
|
|
2919
3071
|
warehouseFill: Icon_warehouseFill,
|
|
@@ -4787,7 +4939,7 @@ var SSectionHeaderCardHeaderImpl = /* @__PURE__ */ forwardRef(
|
|
|
4787
4939
|
required && /* @__PURE__ */ jsx(
|
|
4788
4940
|
SIcon,
|
|
4789
4941
|
{
|
|
4790
|
-
name: "
|
|
4942
|
+
name: "asterisk",
|
|
4791
4943
|
size: 16,
|
|
4792
4944
|
color: "var(--sys-color-fg-accent)",
|
|
4793
4945
|
className: "shrink-0"
|
|
@@ -4906,31 +5058,250 @@ var SScrollArea = /* @__PURE__ */ forwardRef(function SScrollArea2({
|
|
|
4906
5058
|
// src/components/SScrollArea/scrollArea.config.ts
|
|
4907
5059
|
var SCROLL_AREA_AXES = ["vertical", "horizontal", "both"];
|
|
4908
5060
|
|
|
4909
|
-
// src/components/
|
|
4910
|
-
var
|
|
4911
|
-
var
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
5061
|
+
// src/components/SSplitter/splitter.config.ts
|
|
5062
|
+
var SSPLITTER_UNITS = ["%", "px"];
|
|
5063
|
+
var SSPLITTER_DEFAULT_LIMITS = {
|
|
5064
|
+
"%": [10, 90],
|
|
5065
|
+
"px": [50, Infinity]
|
|
5066
|
+
};
|
|
5067
|
+
var SSPLITTER_DEFAULT_VALUE = {
|
|
5068
|
+
"%": 50,
|
|
5069
|
+
"px": 240
|
|
5070
|
+
};
|
|
5071
|
+
var SSPLITTER_KEY_STEP = {
|
|
5072
|
+
"%": { normal: 1, large: 10 },
|
|
5073
|
+
"px": { normal: 10, large: 50 }
|
|
5074
|
+
};
|
|
5075
|
+
var LINE = "var(--cmp-splitter-border-width)";
|
|
5076
|
+
var PAD = "var(--cmp-splitter-border-padding)";
|
|
5077
|
+
var HIT = `calc(${LINE} + ${PAD} * 2)`;
|
|
5078
|
+
var HIT_END = `calc(0px - ${PAD})`;
|
|
5079
|
+
var SSplitterContext = /* @__PURE__ */ createContext(null);
|
|
5080
|
+
function useSSplitterContext(who) {
|
|
5081
|
+
const ctx = useContext(SSplitterContext);
|
|
5082
|
+
if (!ctx) throw new Error(`${who} \uC740 <SSplitter> \uC548\uC5D0\uC11C\uB9CC \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.`);
|
|
5083
|
+
return ctx;
|
|
5084
|
+
}
|
|
5085
|
+
var SSplitterRoot = /* @__PURE__ */ forwardRef(function SSplitter({
|
|
5086
|
+
value,
|
|
5087
|
+
defaultValue,
|
|
5088
|
+
onValueChange,
|
|
5089
|
+
unit = "%",
|
|
5090
|
+
limits,
|
|
5091
|
+
emitImmediately = false,
|
|
5092
|
+
vertical = false,
|
|
5093
|
+
disabled = false,
|
|
5094
|
+
dividerClassName,
|
|
5095
|
+
dividerStyle,
|
|
5096
|
+
className,
|
|
5097
|
+
style,
|
|
5098
|
+
children,
|
|
5099
|
+
...rest
|
|
5100
|
+
}, ref) {
|
|
5101
|
+
const rootRef = useRef(null);
|
|
5102
|
+
const setRootRef = useCallback(
|
|
5103
|
+
(node) => {
|
|
5104
|
+
rootRef.current = node;
|
|
5105
|
+
if (typeof ref === "function") ref(node);
|
|
5106
|
+
else if (ref) ref.current = node;
|
|
5107
|
+
},
|
|
5108
|
+
[ref]
|
|
5109
|
+
);
|
|
5110
|
+
const [uncontrolledValue, setUncontrolledValue] = useState(
|
|
5111
|
+
() => defaultValue ?? SSPLITTER_DEFAULT_VALUE[unit]
|
|
5112
|
+
);
|
|
5113
|
+
const isControlled = value !== void 0;
|
|
5114
|
+
const committedValue = isControlled ? value : uncontrolledValue;
|
|
5115
|
+
const [dragValue, setDragValue] = useState(null);
|
|
5116
|
+
const currentValue = dragValue ?? committedValue;
|
|
5117
|
+
const [dragging, setDragging] = useState(false);
|
|
5118
|
+
const [minLimit, maxLimit] = limits ?? SSPLITTER_DEFAULT_LIMITS[unit];
|
|
5119
|
+
const stateRef = useRef({ committedValue, unit, vertical, minLimit, maxLimit });
|
|
5120
|
+
stateRef.current = { committedValue, unit, vertical, minLimit, maxLimit };
|
|
5121
|
+
const emitRef = useRef({ onValueChange, emitImmediately, isControlled });
|
|
5122
|
+
emitRef.current = { onValueChange, emitImmediately, isControlled };
|
|
5123
|
+
const measure = useCallback(() => {
|
|
5124
|
+
const el = rootRef.current;
|
|
5125
|
+
if (!el) return 0;
|
|
5126
|
+
return stateRef.current.vertical ? el.clientHeight : el.clientWidth;
|
|
5127
|
+
}, []);
|
|
5128
|
+
const clamp4 = useCallback((next, containerSize) => {
|
|
5129
|
+
const { unit: u, minLimit: lo, maxLimit: hi } = stateRef.current;
|
|
5130
|
+
const unitMax = u === "%" ? 100 : containerSize;
|
|
5131
|
+
return Math.min(unitMax, hi, Math.max(lo, next));
|
|
5132
|
+
}, []);
|
|
5133
|
+
const commit = useCallback((next) => {
|
|
5134
|
+
if (next === stateRef.current.committedValue) return;
|
|
5135
|
+
stateRef.current.committedValue = next;
|
|
5136
|
+
if (!emitRef.current.isControlled) setUncontrolledValue(next);
|
|
5137
|
+
emitRef.current.onValueChange?.(next);
|
|
5138
|
+
}, []);
|
|
5139
|
+
const endDragRef = useRef(null);
|
|
5140
|
+
useEffect(() => () => endDragRef.current?.(), []);
|
|
5141
|
+
const startResize = useCallback(
|
|
5142
|
+
(event) => {
|
|
5143
|
+
if (disabled || typeof document === "undefined") return;
|
|
5144
|
+
event.preventDefault();
|
|
5145
|
+
event.currentTarget.focus();
|
|
5146
|
+
const isVertical = stateRef.current.vertical;
|
|
5147
|
+
const containerSize = measure();
|
|
5148
|
+
const startPos = isVertical ? event.clientY : event.clientX;
|
|
5149
|
+
const startValue = clamp4(stateRef.current.committedValue, containerSize);
|
|
5150
|
+
const multiplier = stateRef.current.unit === "%" ? containerSize === 0 ? 0 : 100 / containerSize : 1;
|
|
5151
|
+
let latest = startValue;
|
|
5152
|
+
const { body } = document;
|
|
5153
|
+
const prevUserSelect = body.style.userSelect;
|
|
5154
|
+
const prevCursor = body.style.cursor;
|
|
5155
|
+
body.style.userSelect = "none";
|
|
5156
|
+
body.style.cursor = isVertical ? "row-resize" : "col-resize";
|
|
5157
|
+
const onMove = (moveEvent) => {
|
|
5158
|
+
const delta = (isVertical ? moveEvent.clientY : moveEvent.clientX) - startPos;
|
|
5159
|
+
latest = clamp4(startValue + multiplier * delta, containerSize);
|
|
5160
|
+
setDragValue(latest);
|
|
5161
|
+
if (emitRef.current.emitImmediately) commit(latest);
|
|
5162
|
+
};
|
|
5163
|
+
const endDrag = () => {
|
|
5164
|
+
document.removeEventListener("mousemove", onMove);
|
|
5165
|
+
document.removeEventListener("mouseup", endDrag);
|
|
5166
|
+
body.style.userSelect = prevUserSelect;
|
|
5167
|
+
body.style.cursor = prevCursor;
|
|
5168
|
+
endDragRef.current = null;
|
|
5169
|
+
setDragging(false);
|
|
5170
|
+
setDragValue(null);
|
|
5171
|
+
commit(latest);
|
|
5172
|
+
};
|
|
5173
|
+
document.addEventListener("mousemove", onMove);
|
|
5174
|
+
document.addEventListener("mouseup", endDrag);
|
|
5175
|
+
endDragRef.current = endDrag;
|
|
5176
|
+
setDragging(true);
|
|
5177
|
+
},
|
|
5178
|
+
[disabled, measure, clamp4, commit]
|
|
5179
|
+
);
|
|
5180
|
+
const handleKeyDown = useCallback(
|
|
5181
|
+
(event) => {
|
|
5182
|
+
if (disabled) return;
|
|
5183
|
+
const { unit: u, vertical: isVertical, minLimit: lo } = stateRef.current;
|
|
5184
|
+
const step = SSPLITTER_KEY_STEP[u][event.shiftKey ? "large" : "normal"];
|
|
5185
|
+
const decrease = isVertical ? "ArrowUp" : "ArrowLeft";
|
|
5186
|
+
const increase = isVertical ? "ArrowDown" : "ArrowRight";
|
|
5187
|
+
let next = null;
|
|
5188
|
+
if (event.key === decrease) next = stateRef.current.committedValue - step;
|
|
5189
|
+
else if (event.key === increase) next = stateRef.current.committedValue + step;
|
|
5190
|
+
else if (event.key === "Home") next = lo;
|
|
5191
|
+
else if (event.key === "End") next = Number.MAX_SAFE_INTEGER;
|
|
5192
|
+
if (next === null) return;
|
|
5193
|
+
event.preventDefault();
|
|
5194
|
+
commit(clamp4(next, measure()));
|
|
5195
|
+
},
|
|
5196
|
+
[disabled, measure, clamp4, commit]
|
|
5197
|
+
);
|
|
5198
|
+
const sizeCss = unit === "%" ? `${currentValue}%` : `${Math.round(currentValue)}px`;
|
|
5199
|
+
const divider = /* @__PURE__ */ jsx("div", { className: "relative z-[1] shrink-0", style: { flexBasis: LINE }, children: /* @__PURE__ */ jsx(
|
|
5200
|
+
"div",
|
|
5201
|
+
{
|
|
5202
|
+
role: "separator",
|
|
5203
|
+
"aria-orientation": vertical ? "horizontal" : "vertical",
|
|
5204
|
+
"aria-valuenow": Math.round(currentValue),
|
|
5205
|
+
"aria-valuemin": Math.round(minLimit),
|
|
5206
|
+
"aria-valuemax": Number.isFinite(maxLimit) ? Math.round(maxLimit) : void 0,
|
|
5207
|
+
"aria-valuetext": sizeCss,
|
|
5208
|
+
"aria-disabled": disabled || void 0,
|
|
5209
|
+
tabIndex: disabled ? -1 : 0,
|
|
5210
|
+
onMouseDown: startResize,
|
|
5211
|
+
onKeyDown: handleKeyDown,
|
|
5212
|
+
className: cn(
|
|
5213
|
+
"group absolute flex outline-none",
|
|
5214
|
+
vertical ? "inset-x-0 flex-col justify-center" : "inset-y-0 justify-center",
|
|
5215
|
+
disabled ? "cursor-default" : vertical ? "cursor-row-resize" : "cursor-col-resize",
|
|
5216
|
+
dividerClassName
|
|
5217
|
+
),
|
|
5218
|
+
style: {
|
|
5219
|
+
...vertical ? { bottom: HIT_END, height: HIT } : { right: HIT_END, width: HIT },
|
|
5220
|
+
...dividerStyle
|
|
5221
|
+
},
|
|
5222
|
+
children: /* @__PURE__ */ jsx(
|
|
5223
|
+
"span",
|
|
5224
|
+
{
|
|
5225
|
+
"aria-hidden": true,
|
|
5226
|
+
className: cn(
|
|
5227
|
+
// 평상시엔 자리만 잡고 칠하지 않는다 — 색이 붙는 것 자체가 조절 가능하다는 신호다.
|
|
5228
|
+
"transition-colors",
|
|
5229
|
+
vertical ? "h-(--cmp-splitter-border-width)" : "w-(--cmp-splitter-border-width)",
|
|
5230
|
+
!disabled && "group-hover:bg-(--cmp-splitter-border-color) group-focus-visible:bg-(--cmp-splitter-border-color)",
|
|
5231
|
+
!disabled && dragging && "bg-(--cmp-splitter-border-color)"
|
|
5232
|
+
)
|
|
5233
|
+
}
|
|
5234
|
+
)
|
|
5235
|
+
}
|
|
5236
|
+
) });
|
|
5237
|
+
const ctx = { vertical, sizeCss, divider };
|
|
5238
|
+
return /* @__PURE__ */ jsx(SSplitterContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx(
|
|
5239
|
+
"div",
|
|
5240
|
+
{
|
|
5241
|
+
ref: setRootRef,
|
|
5242
|
+
className: cn("flex size-full", vertical ? "flex-col" : "flex-row", className),
|
|
5243
|
+
style,
|
|
5244
|
+
...rest,
|
|
5245
|
+
children
|
|
5246
|
+
}
|
|
5247
|
+
) });
|
|
5248
|
+
});
|
|
5249
|
+
function usePane(pane, className, style) {
|
|
5250
|
+
const ctx = useSSplitterContext(`SSplitter.${pane === "before" ? "Before" : "After"}`);
|
|
5251
|
+
const isSized = pane === "before";
|
|
5252
|
+
return {
|
|
5253
|
+
divider: ctx.divider,
|
|
5254
|
+
className: cn(
|
|
5255
|
+
"min-h-0 min-w-0 overflow-auto",
|
|
5256
|
+
isSized ? "shrink-0" : "flex-1 basis-0",
|
|
5257
|
+
className
|
|
5258
|
+
),
|
|
5259
|
+
style: isSized ? { [ctx.vertical ? "height" : "width"]: ctx.sizeCss, ...style } : style
|
|
5260
|
+
};
|
|
5261
|
+
}
|
|
5262
|
+
var SSplitterBeforeImpl = /* @__PURE__ */ forwardRef(function SSplitterBefore({ className, style, children, ...rest }, ref) {
|
|
5263
|
+
const pane = usePane("before", className, style);
|
|
5264
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5265
|
+
/* @__PURE__ */ jsx("div", { ref, className: pane.className, style: pane.style, ...rest, children }),
|
|
5266
|
+
pane.divider
|
|
5267
|
+
] });
|
|
5268
|
+
});
|
|
5269
|
+
var SSplitterAfterImpl = /* @__PURE__ */ forwardRef(function SSplitterAfter({ className, style, children, ...rest }, ref) {
|
|
5270
|
+
const pane = usePane("after", className, style);
|
|
5271
|
+
return /* @__PURE__ */ jsx("div", { ref, className: pane.className, style: pane.style, ...rest, children });
|
|
5272
|
+
});
|
|
5273
|
+
var SSplitterBefore2 = /* @__PURE__ */ withDisplayName(SSplitterBeforeImpl, "SSplitter.Before");
|
|
5274
|
+
var SSplitterAfter2 = /* @__PURE__ */ withDisplayName(SSplitterAfterImpl, "SSplitter.After");
|
|
5275
|
+
var SSplitter2 = /* @__PURE__ */ Object.assign(SSplitterRoot, {
|
|
5276
|
+
Before: SSplitterBefore2,
|
|
5277
|
+
After: SSplitterAfter2
|
|
5278
|
+
});
|
|
5279
|
+
|
|
5280
|
+
// src/components/SButton/button.config.ts
|
|
5281
|
+
var BUTTON_COLORS = ["primary", "secondary", "neutral", "danger"];
|
|
5282
|
+
var BUTTON_SIZES = ["xs", "sm", "md", "lg"];
|
|
5283
|
+
var V = (path) => `var(--cmp-button-${path})`;
|
|
5284
|
+
function buttonPreset(color, outline) {
|
|
5285
|
+
switch (color) {
|
|
5286
|
+
case "primary":
|
|
5287
|
+
return outline ? {
|
|
5288
|
+
bg: V("brand-outline-bg-default"),
|
|
5289
|
+
bgHover: V("brand-outline-bg-hover"),
|
|
5290
|
+
text: V("brand-outline-content"),
|
|
5291
|
+
icon: V("brand-outline-content"),
|
|
5292
|
+
border: V("brand-outline-border")
|
|
5293
|
+
} : {
|
|
5294
|
+
bg: V("brand-strong-bg-default"),
|
|
5295
|
+
bgHover: V("brand-strong-bg-hover"),
|
|
5296
|
+
text: V("brand-strong-content"),
|
|
5297
|
+
icon: V("brand-strong-content"),
|
|
5298
|
+
border: "transparent"
|
|
5299
|
+
};
|
|
5300
|
+
case "secondary":
|
|
5301
|
+
return {
|
|
5302
|
+
bg: V("brand-subtle-bg-default"),
|
|
5303
|
+
bgHover: V("brand-subtle-bg-hover"),
|
|
5304
|
+
text: V("brand-subtle-content"),
|
|
4934
5305
|
icon: V("brand-subtle-content"),
|
|
4935
5306
|
border: "transparent"
|
|
4936
5307
|
};
|
|
@@ -6008,8 +6379,8 @@ function SFooter({
|
|
|
6008
6379
|
"footer",
|
|
6009
6380
|
{
|
|
6010
6381
|
className: cn(
|
|
6011
|
-
"relative flex w-full flex-shrink-0 items-center justify-end gap-[var(--cmp-overlay-footer-gap)] overflow-hidden px-[var(--cmp-overlay-footer-paddingX)] py-[var(--cmp-overlay-footer-paddingY)]
|
|
6012
|
-
isGrey ? "bg-[var(--cmp-overlay-footer-bg-neutral)]" : "bg-[var(--cmp-overlay-footer-bg-default)]",
|
|
6382
|
+
"relative flex w-full flex-shrink-0 items-center justify-end gap-[var(--cmp-overlay-footer-gap)] overflow-hidden px-[var(--cmp-overlay-footer-paddingX)] py-[var(--cmp-overlay-footer-paddingY)]",
|
|
6383
|
+
isGrey ? "bg-[var(--cmp-overlay-footer-bg-neutral)] border-t border-solid border-[color:var(--sys-color-border-default)]" : "bg-[var(--cmp-overlay-footer-bg-default)] shadow-[var(--shadow-spread-md)]",
|
|
6013
6384
|
className
|
|
6014
6385
|
),
|
|
6015
6386
|
style,
|
|
@@ -6894,6 +7265,72 @@ function SDrawer({
|
|
|
6894
7265
|
)
|
|
6895
7266
|
] }) }) });
|
|
6896
7267
|
}
|
|
7268
|
+
|
|
7269
|
+
// src/lib/is-dev.ts
|
|
7270
|
+
function isDev() {
|
|
7271
|
+
return typeof process === "undefined" || process?.env?.NODE_ENV !== "production";
|
|
7272
|
+
}
|
|
7273
|
+
|
|
7274
|
+
// src/lib/modal-outlet.ts
|
|
7275
|
+
var EMPTY = [];
|
|
7276
|
+
var entries2 = EMPTY;
|
|
7277
|
+
var listeners2 = /* @__PURE__ */ new Set();
|
|
7278
|
+
var outletRendered = false;
|
|
7279
|
+
var outletCount = 0;
|
|
7280
|
+
var nextId2 = 0;
|
|
7281
|
+
function emit2() {
|
|
7282
|
+
for (const listener of listeners2) listener();
|
|
7283
|
+
}
|
|
7284
|
+
function subscribeModalEntries(listener) {
|
|
7285
|
+
listeners2.add(listener);
|
|
7286
|
+
return () => {
|
|
7287
|
+
listeners2.delete(listener);
|
|
7288
|
+
};
|
|
7289
|
+
}
|
|
7290
|
+
function getModalEntries() {
|
|
7291
|
+
return entries2;
|
|
7292
|
+
}
|
|
7293
|
+
function getServerModalEntries() {
|
|
7294
|
+
return EMPTY;
|
|
7295
|
+
}
|
|
7296
|
+
function markModalOutletRendered() {
|
|
7297
|
+
outletRendered = true;
|
|
7298
|
+
}
|
|
7299
|
+
function registerModalOutlet() {
|
|
7300
|
+
outletCount += 1;
|
|
7301
|
+
outletRendered = true;
|
|
7302
|
+
return () => {
|
|
7303
|
+
outletCount -= 1;
|
|
7304
|
+
if (outletCount === 0) queueMicrotask(sweepOrphans);
|
|
7305
|
+
};
|
|
7306
|
+
}
|
|
7307
|
+
function sweepOrphans() {
|
|
7308
|
+
if (outletCount > 0) return;
|
|
7309
|
+
outletRendered = false;
|
|
7310
|
+
if (entries2 === EMPTY) return;
|
|
7311
|
+
const orphans = entries2;
|
|
7312
|
+
entries2 = EMPTY;
|
|
7313
|
+
emit2();
|
|
7314
|
+
for (const entry of orphans) entry.onOrphan();
|
|
7315
|
+
}
|
|
7316
|
+
function hasModalOutlet() {
|
|
7317
|
+
return outletRendered;
|
|
7318
|
+
}
|
|
7319
|
+
function isModalOutletMounted() {
|
|
7320
|
+
return outletCount > 0;
|
|
7321
|
+
}
|
|
7322
|
+
function addModalEntry(host, node, onOrphan) {
|
|
7323
|
+
const id = ++nextId2;
|
|
7324
|
+
entries2 = [...entries2, { id, host, node, onOrphan }];
|
|
7325
|
+
emit2();
|
|
7326
|
+
return id;
|
|
7327
|
+
}
|
|
7328
|
+
function removeModalEntry(id) {
|
|
7329
|
+
const next = entries2.filter((entry) => entry.id !== id);
|
|
7330
|
+
if (next.length === entries2.length) return;
|
|
7331
|
+
entries2 = next;
|
|
7332
|
+
emit2();
|
|
7333
|
+
}
|
|
6897
7334
|
var EXIT_DURATION = 300;
|
|
6898
7335
|
var EXIT_BUFFER = 100;
|
|
6899
7336
|
var SModalRefImpl = class {
|
|
@@ -6901,6 +7338,7 @@ var SModalRefImpl = class {
|
|
|
6901
7338
|
this.pendingClose = false;
|
|
6902
7339
|
this.pendingPatches = [];
|
|
6903
7340
|
this.dismissRequested = false;
|
|
7341
|
+
this.torndown = false;
|
|
6904
7342
|
}
|
|
6905
7343
|
onOk(fn) {
|
|
6906
7344
|
this.okFn = fn;
|
|
@@ -6932,10 +7370,10 @@ var SModalRefImpl = class {
|
|
|
6932
7370
|
return this;
|
|
6933
7371
|
}
|
|
6934
7372
|
// 닫힘 트리거 — 이미 닫힘이 시작됐으면 무시(중복 콜백 방지)
|
|
6935
|
-
settle(
|
|
7373
|
+
settle(emit3) {
|
|
6936
7374
|
if (this.dismissRequested) return;
|
|
6937
7375
|
this.dismissRequested = true;
|
|
6938
|
-
|
|
7376
|
+
emit3();
|
|
6939
7377
|
if (this.closeBinding) this.closeBinding();
|
|
6940
7378
|
else this.pendingClose = true;
|
|
6941
7379
|
}
|
|
@@ -6968,11 +7406,18 @@ var SModalRefImpl = class {
|
|
|
6968
7406
|
this.pendingPatches = [];
|
|
6969
7407
|
}
|
|
6970
7408
|
}
|
|
6971
|
-
/** @internal
|
|
6972
|
-
|
|
6973
|
-
this.root = root;
|
|
7409
|
+
/** @internal host 주입 — 렌더 전에 호출해야 마운트 검사(_getHost)가 성립한다 */
|
|
7410
|
+
_setHost(host) {
|
|
6974
7411
|
this.host = host;
|
|
6975
7412
|
}
|
|
7413
|
+
/** @internal outlet 경로 정리 대상(스토어 엔트리) 주입 */
|
|
7414
|
+
_setEntry(id) {
|
|
7415
|
+
this.entryId = id;
|
|
7416
|
+
}
|
|
7417
|
+
/** @internal 폴백(createRoot) 경로 정리 대상 주입 */
|
|
7418
|
+
_setRoot(root) {
|
|
7419
|
+
this.root = root;
|
|
7420
|
+
}
|
|
6976
7421
|
/** @internal create 의 마운트 검사용 host 조회 */
|
|
6977
7422
|
_getHost() {
|
|
6978
7423
|
return this.host;
|
|
@@ -7003,9 +7448,21 @@ var SModalRefImpl = class {
|
|
|
7003
7448
|
}
|
|
7004
7449
|
/** @internal 닫힘 애니메이션 종료 후 언마운트 */
|
|
7005
7450
|
_teardown() {
|
|
7451
|
+
if (this.torndown) return;
|
|
7452
|
+
this.torndown = true;
|
|
7453
|
+
if (this.entryId !== void 0) {
|
|
7454
|
+
removeModalEntry(this.entryId);
|
|
7455
|
+
return;
|
|
7456
|
+
}
|
|
7006
7457
|
this.root?.unmount();
|
|
7007
7458
|
this.host?.remove();
|
|
7008
7459
|
}
|
|
7460
|
+
/** @internal 렌더 실패·outlet 소멸로 모달이 사라졌을 때 — 콜백을 마무리하고 정리한다 */
|
|
7461
|
+
_fail() {
|
|
7462
|
+
this.dismissRequested = true;
|
|
7463
|
+
this._emitDismissed();
|
|
7464
|
+
this._teardown();
|
|
7465
|
+
}
|
|
7009
7466
|
};
|
|
7010
7467
|
function useExitTeardown(open, refImpl) {
|
|
7011
7468
|
const dismissedRef = useRef(false);
|
|
@@ -7072,8 +7529,15 @@ function LoadingMount({ options, refImpl }) {
|
|
|
7072
7529
|
}
|
|
7073
7530
|
);
|
|
7074
7531
|
}
|
|
7532
|
+
var outletWarned = false;
|
|
7533
|
+
var NO_OUTLET_CAUSE = "SModalOutlet \uC774 \uC571 \uD2B8\uB9AC\uC5D0 \uC5C6\uC5B4 \uC774 \uBAA8\uB2EC\uC740 \uBCC4\uB3C4 React \uB8E8\uD2B8(createRoot)\uB85C \uB9C8\uC6B4\uD2B8\uB429\uB2C8\uB2E4. React Context \uB294 DOM \uC774 \uC544\uB2C8\uB77C \uB80C\uB354 \uD2B8\uB9AC\uB97C \uD0C0\uBBC0\uB85C \uC571\uC758 Provider(QueryClient\xB7Router\xB7Theme \uB4F1)\uAC00 \uB2FF\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC571 \uBD80\uD2B8\uC2A4\uD2B8\uB7A9\uC5D0\uC11C Provider \uC548\uCABD\uC5D0 <SModalOutlet /> \uC744 \uD55C \uBC88 \uB80C\uB354\uD558\uC138\uC694.";
|
|
7534
|
+
function warnMissingOutlet() {
|
|
7535
|
+
if (!isDev() || outletWarned) return;
|
|
7536
|
+
outletWarned = true;
|
|
7537
|
+
console.warn(`[SModal] ${NO_OUTLET_CAUSE}`);
|
|
7538
|
+
}
|
|
7075
7539
|
function warnIfNotModal(host, component) {
|
|
7076
|
-
if (
|
|
7540
|
+
if (!isDev()) return;
|
|
7077
7541
|
if (!host || host.childElementCount === 0) return;
|
|
7078
7542
|
const name = component?.name || "component";
|
|
7079
7543
|
console.warn(
|
|
@@ -7081,14 +7545,14 @@ function warnIfNotModal(host, component) {
|
|
|
7081
7545
|
);
|
|
7082
7546
|
}
|
|
7083
7547
|
function CreateMount({ options, refImpl }) {
|
|
7084
|
-
const { component:
|
|
7548
|
+
const { component: Component2, componentProps } = options;
|
|
7085
7549
|
const [open, setOpen] = useState(true);
|
|
7086
7550
|
useEffect(() => {
|
|
7087
7551
|
refImpl._bindClose(() => setOpen(false));
|
|
7088
7552
|
refImpl._bindUpdate(() => {
|
|
7089
7553
|
});
|
|
7090
|
-
warnIfNotModal(refImpl._getHost(),
|
|
7091
|
-
}, [refImpl,
|
|
7554
|
+
warnIfNotModal(refImpl._getHost(), Component2);
|
|
7555
|
+
}, [refImpl, Component2]);
|
|
7092
7556
|
useExitTeardown(open, refImpl);
|
|
7093
7557
|
const componentAllProps = {
|
|
7094
7558
|
...componentProps,
|
|
@@ -7100,15 +7564,42 @@ function CreateMount({ options, refImpl }) {
|
|
|
7100
7564
|
onClose: () => refImpl._emitClose(),
|
|
7101
7565
|
modalRef: refImpl
|
|
7102
7566
|
};
|
|
7103
|
-
return /* @__PURE__ */ jsx(
|
|
7567
|
+
return /* @__PURE__ */ jsx(Component2, { ...componentAllProps });
|
|
7104
7568
|
}
|
|
7569
|
+
var ModalErrorBoundary = class extends Component {
|
|
7570
|
+
constructor() {
|
|
7571
|
+
super(...arguments);
|
|
7572
|
+
this.state = { failed: false };
|
|
7573
|
+
}
|
|
7574
|
+
static getDerivedStateFromError() {
|
|
7575
|
+
return { failed: true };
|
|
7576
|
+
}
|
|
7577
|
+
componentDidCatch(error) {
|
|
7578
|
+
console.error(
|
|
7579
|
+
this.props.standalone ? `[SModal] \uBAA8\uB2EC \uB80C\uB354\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. ${NO_OUTLET_CAUSE}` : "[SModal] \uBAA8\uB2EC \uB80C\uB354\uC5D0 \uC2E4\uD328\uD574 \uBAA8\uB2EC\uC744 \uB2EB\uC2B5\uB2C8\uB2E4.",
|
|
7580
|
+
error
|
|
7581
|
+
);
|
|
7582
|
+
setTimeout(() => this.props.onError(), 0);
|
|
7583
|
+
}
|
|
7584
|
+
render() {
|
|
7585
|
+
return this.state.failed ? null : this.props.children;
|
|
7586
|
+
}
|
|
7587
|
+
};
|
|
7105
7588
|
function mount(render) {
|
|
7106
7589
|
const host = document.createElement("div");
|
|
7107
7590
|
document.body.appendChild(host);
|
|
7108
7591
|
const refImpl = new SModalRefImpl();
|
|
7592
|
+
refImpl._setHost(host);
|
|
7593
|
+
const useOutlet = hasModalOutlet();
|
|
7594
|
+
const node = /* @__PURE__ */ jsx(ModalErrorBoundary, { standalone: !useOutlet, onError: () => refImpl._fail(), children: render(refImpl) });
|
|
7595
|
+
if (useOutlet) {
|
|
7596
|
+
refImpl._setEntry(addModalEntry(host, node, () => refImpl._fail()));
|
|
7597
|
+
return refImpl;
|
|
7598
|
+
}
|
|
7599
|
+
warnMissingOutlet();
|
|
7109
7600
|
const root = createRoot(host);
|
|
7110
|
-
refImpl.
|
|
7111
|
-
root.render(
|
|
7601
|
+
refImpl._setRoot(root);
|
|
7602
|
+
root.render(node);
|
|
7112
7603
|
return refImpl;
|
|
7113
7604
|
}
|
|
7114
7605
|
var SModal = {
|
|
@@ -7132,8 +7623,32 @@ var SModal = {
|
|
|
7132
7623
|
return mount((refImpl) => /* @__PURE__ */ jsx(CreateMount, { options, refImpl }));
|
|
7133
7624
|
}
|
|
7134
7625
|
};
|
|
7626
|
+
function SModalEntryPortal({ entry }) {
|
|
7627
|
+
useEffect(() => {
|
|
7628
|
+
if (!entry.host.isConnected) document.body.appendChild(entry.host);
|
|
7629
|
+
return () => entry.host.remove();
|
|
7630
|
+
}, [entry]);
|
|
7631
|
+
return createPortal(entry.node, entry.host);
|
|
7632
|
+
}
|
|
7633
|
+
function SModalOutlet() {
|
|
7634
|
+
markModalOutletRendered();
|
|
7635
|
+
const entries3 = useSyncExternalStore(
|
|
7636
|
+
subscribeModalEntries,
|
|
7637
|
+
getModalEntries,
|
|
7638
|
+
getServerModalEntries
|
|
7639
|
+
);
|
|
7640
|
+
useEffect(() => {
|
|
7641
|
+
if (isDev() && isModalOutletMounted()) {
|
|
7642
|
+
console.warn(
|
|
7643
|
+
"[SModalOutlet] \uC774\uBBF8 \uB80C\uB354\uB41C SModalOutlet \uC774 \uC788\uC2B5\uB2C8\uB2E4. \uC571 \uC804\uCCB4\uC5D0 \uD558\uB098\uB9CC \uB450\uC138\uC694 \u2014 \uB458 \uC774\uC0C1\uC774\uBA74 \uAC19\uC740 \uBAA8\uB2EC\uC774 \uC911\uBCF5\uC73C\uB85C \uADF8\uB824\uC9D1\uB2C8\uB2E4."
|
|
7644
|
+
);
|
|
7645
|
+
}
|
|
7646
|
+
return registerModalOutlet();
|
|
7647
|
+
}, []);
|
|
7648
|
+
return /* @__PURE__ */ jsx(PortalContainerProvider, { value: null, children: /* @__PURE__ */ jsx(InsideModalProvider, { value: false, children: entries3.map((entry) => /* @__PURE__ */ jsx(SModalEntryPortal, { entry }, entry.id)) }) });
|
|
7649
|
+
}
|
|
7135
7650
|
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
|
7136
|
-
var isSameNav = (a, b) => a === b || !!a && !!b && a.columnWidth === b.columnWidth && a.topHeight === b.topHeight && a.foldMs === b.foldMs && a.requireFullHeader === b.requireFullHeader;
|
|
7651
|
+
var isSameNav = (a, b) => a === b || !!a && !!b && a.columnWidth === b.columnWidth && a.topHeight === b.topHeight && a.foldMs === b.foldMs && a.requireFullHeader === b.requireFullHeader && a.resizing === b.resizing;
|
|
7137
7652
|
var SLayoutContext = /* @__PURE__ */ createContext(null);
|
|
7138
7653
|
var SLAYOUT_MIN_WIDTH = 1366;
|
|
7139
7654
|
var SLAYOUT_MIN_WIDTH_VAR = "--s-layout-min-width";
|
|
@@ -7193,7 +7708,8 @@ var SLayout = /* @__PURE__ */ forwardRef(function SLayout2({
|
|
|
7193
7708
|
gridTemplateRows: `${nav?.topHeight ?? "0px"} 1fr`,
|
|
7194
7709
|
// 메뉴가 미끄러지는 동안 페이지 열도 같은 길이로 따라와야 한 덩어리로 읽힌다.
|
|
7195
7710
|
// (fix 는 SGnb 가 제 폭을 직접 전환하므로 프레임이 손댈 게 없다)
|
|
7196
|
-
|
|
7711
|
+
// 단 폭을 끄는 중에는 전환을 끈다 — 그러지 않으면 열이 손보다 늦게 따라온다.
|
|
7712
|
+
transition: nav?.resizing ? "none" : `grid-template-columns ${nav?.foldMs ?? 0}ms ease-out`
|
|
7197
7713
|
} : void 0;
|
|
7198
7714
|
return /* @__PURE__ */ jsx(SLayoutContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx(
|
|
7199
7715
|
"div",
|
|
@@ -7336,6 +7852,10 @@ var GNB_RAIL_WIDTH = 68;
|
|
|
7336
7852
|
var GNB_FOLD_MS = 200;
|
|
7337
7853
|
var GNB_EXPAND_MS = 200;
|
|
7338
7854
|
var GNB_MENU_WIDTH = 240;
|
|
7855
|
+
var GNB_MENU_MIN_WIDTH = 200;
|
|
7856
|
+
var GNB_MENU_MAX_WIDTH = 300;
|
|
7857
|
+
var GNB_MENU_RESIZE_KEY_STEP = { normal: 10, large: 50 };
|
|
7858
|
+
var clampGnbMenuWidth = (width) => Math.min(GNB_MENU_MAX_WIDTH, Math.max(GNB_MENU_MIN_WIDTH, Math.round(width)));
|
|
7339
7859
|
var GNB_FULL_LOGO_WIDTH = 140;
|
|
7340
7860
|
var GNB_TOP_ICON_GAP = 8;
|
|
7341
7861
|
var GNB_TOP_ICON_SIZE = 24;
|
|
@@ -7372,6 +7892,7 @@ function findGnbAncestors(items, value) {
|
|
|
7372
7892
|
};
|
|
7373
7893
|
return walk(items, []) ?? [];
|
|
7374
7894
|
}
|
|
7895
|
+
var LABEL_TIP_HIDE_DELAY_MS = 100;
|
|
7375
7896
|
var DEPTH_PADDING_LEFT = (M, depth) => depth === 1 ? M.depth1PaddingLeft : depth === 2 ? M.depth2PaddingLeft : M.depth3PaddingLeft;
|
|
7376
7897
|
var SGnb = /* @__PURE__ */ forwardRef(function SGnb2({
|
|
7377
7898
|
type: typeProp,
|
|
@@ -7390,6 +7911,10 @@ var SGnb = /* @__PURE__ */ forwardRef(function SGnb2({
|
|
|
7390
7911
|
railFooter,
|
|
7391
7912
|
menuFooter,
|
|
7392
7913
|
foldedFooter,
|
|
7914
|
+
resizable = false,
|
|
7915
|
+
menuWidth: menuWidthProp,
|
|
7916
|
+
defaultMenuWidth,
|
|
7917
|
+
onMenuWidthChange,
|
|
7393
7918
|
ariaLabel = "global navigation",
|
|
7394
7919
|
className,
|
|
7395
7920
|
style,
|
|
@@ -7408,6 +7933,46 @@ var SGnb = /* @__PURE__ */ forwardRef(function SGnb2({
|
|
|
7408
7933
|
() => new Set(findGnbAncestors(items, value))
|
|
7409
7934
|
);
|
|
7410
7935
|
const [hoveredKey, setHoveredKey] = useState(null);
|
|
7936
|
+
const [labelTip, setLabelTip] = useState(null);
|
|
7937
|
+
const labelTipHideRef = useRef(null);
|
|
7938
|
+
const portalContainer = usePortalContainer();
|
|
7939
|
+
const labelTipAnchorRef = useMemo(
|
|
7940
|
+
() => ({
|
|
7941
|
+
current: {
|
|
7942
|
+
getBoundingClientRect: () => labelTip?.el.getBoundingClientRect() ?? new DOMRect()
|
|
7943
|
+
}
|
|
7944
|
+
}),
|
|
7945
|
+
[labelTip?.el]
|
|
7946
|
+
);
|
|
7947
|
+
const cancelLabelTipHide = () => {
|
|
7948
|
+
if (labelTipHideRef.current === null) return;
|
|
7949
|
+
clearTimeout(labelTipHideRef.current);
|
|
7950
|
+
labelTipHideRef.current = null;
|
|
7951
|
+
};
|
|
7952
|
+
const showLabelTipIfTruncated = (row, label) => {
|
|
7953
|
+
cancelLabelTipHide();
|
|
7954
|
+
const el = row.querySelector("[data-gnb-label]");
|
|
7955
|
+
if (!el || el.scrollWidth <= el.clientWidth) {
|
|
7956
|
+
setLabelTip(null);
|
|
7957
|
+
return;
|
|
7958
|
+
}
|
|
7959
|
+
setLabelTip((prev) => prev?.el === el && prev.label === label ? prev : { label, el });
|
|
7960
|
+
};
|
|
7961
|
+
const startLabelTipHide = () => {
|
|
7962
|
+
cancelLabelTipHide();
|
|
7963
|
+
labelTipHideRef.current = setTimeout(() => setLabelTip(null), LABEL_TIP_HIDE_DELAY_MS);
|
|
7964
|
+
};
|
|
7965
|
+
useEffect(() => cancelLabelTipHide, []);
|
|
7966
|
+
const rowHoverProps = (item) => ({
|
|
7967
|
+
onMouseEnter: (event) => {
|
|
7968
|
+
setHoveredKey(item.value);
|
|
7969
|
+
showLabelTipIfTruncated(event.currentTarget, item.label);
|
|
7970
|
+
},
|
|
7971
|
+
onMouseLeave: () => {
|
|
7972
|
+
setHoveredKey((prev) => prev === item.value ? null : prev);
|
|
7973
|
+
startLabelTipHide();
|
|
7974
|
+
}
|
|
7975
|
+
});
|
|
7411
7976
|
const [activeRail, setActiveRail] = useState(
|
|
7412
7977
|
() => findGnbRailValue(items, value) ?? items[0]?.value
|
|
7413
7978
|
);
|
|
@@ -7487,11 +8052,17 @@ var SGnb = /* @__PURE__ */ forwardRef(function SGnb2({
|
|
|
7487
8052
|
cursor: item.disabled ? "not-allowed" : "pointer"
|
|
7488
8053
|
},
|
|
7489
8054
|
onClick: () => handleRailClick(item),
|
|
7490
|
-
|
|
7491
|
-
onMouseLeave: () => setHoveredKey((prev) => prev === item.value ? null : prev),
|
|
8055
|
+
...rowHoverProps(item),
|
|
7492
8056
|
children: [
|
|
7493
8057
|
item.icon && /* @__PURE__ */ jsx(SIcon, { name: item.icon, size: GNB_RAIL.itemIcon, className: "shrink-0" }),
|
|
7494
|
-
/* @__PURE__ */ jsx(
|
|
8058
|
+
/* @__PURE__ */ jsx(
|
|
8059
|
+
"span",
|
|
8060
|
+
{
|
|
8061
|
+
"data-gnb-label": true,
|
|
8062
|
+
className: "w-full overflow-hidden text-ellipsis whitespace-nowrap text-center",
|
|
8063
|
+
children: item.label
|
|
8064
|
+
}
|
|
8065
|
+
)
|
|
7495
8066
|
]
|
|
7496
8067
|
}
|
|
7497
8068
|
) }, item.value);
|
|
@@ -7535,8 +8106,7 @@ var SGnb = /* @__PURE__ */ forwardRef(function SGnb2({
|
|
|
7535
8106
|
className: "box-border flex select-none items-center border-none bg-transparent text-left transition-colors duration-150",
|
|
7536
8107
|
style: itemStyle,
|
|
7537
8108
|
onClick: () => handleItemClick(item),
|
|
7538
|
-
|
|
7539
|
-
onMouseLeave: () => setHoveredKey((prev) => prev === item.value ? null : prev),
|
|
8109
|
+
...rowHoverProps(item),
|
|
7540
8110
|
children: [
|
|
7541
8111
|
depth === 1 && item.icon && /* @__PURE__ */ jsx(
|
|
7542
8112
|
SIcon,
|
|
@@ -7547,16 +8117,23 @@ var SGnb = /* @__PURE__ */ forwardRef(function SGnb2({
|
|
|
7547
8117
|
className: "shrink-0"
|
|
7548
8118
|
}
|
|
7549
8119
|
),
|
|
7550
|
-
/* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1
|
|
8120
|
+
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-1 items-center", children: [
|
|
7551
8121
|
depth > 1 && iconBranch ? /* @__PURE__ */ jsx(
|
|
7552
8122
|
"div",
|
|
7553
8123
|
{
|
|
7554
|
-
className: "w-[20px]
|
|
8124
|
+
className: "mr-[8px] flex w-[20px] shrink-0 items-center justify-center",
|
|
7555
8125
|
style: { height: M.itemLineHeight },
|
|
7556
8126
|
children: "-"
|
|
7557
8127
|
}
|
|
7558
8128
|
) : null,
|
|
7559
|
-
|
|
8129
|
+
/* @__PURE__ */ jsx(
|
|
8130
|
+
"span",
|
|
8131
|
+
{
|
|
8132
|
+
"data-gnb-label": true,
|
|
8133
|
+
className: "min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap",
|
|
8134
|
+
children: item.label
|
|
8135
|
+
}
|
|
8136
|
+
)
|
|
7560
8137
|
] }),
|
|
7561
8138
|
item.tag !== void 0 && item.tag !== "" && /* @__PURE__ */ jsx(
|
|
7562
8139
|
STag,
|
|
@@ -7608,7 +8185,14 @@ var SGnb = /* @__PURE__ */ forwardRef(function SGnb2({
|
|
|
7608
8185
|
const railItems = useRail ? items : [];
|
|
7609
8186
|
const menuItems = useRail ? items.find((item) => item.value === activeRail)?.children ?? [] : items;
|
|
7610
8187
|
const showMenu = !useRail || menuItems.length > 0;
|
|
7611
|
-
const
|
|
8188
|
+
const [uncontrolledMenuWidth, setUncontrolledMenuWidth] = useState(
|
|
8189
|
+
() => defaultMenuWidth ?? GNB_MENU_WIDTH
|
|
8190
|
+
);
|
|
8191
|
+
const [dragMenuWidth, setDragMenuWidth] = useState(null);
|
|
8192
|
+
const committedMenuWidth = menuWidthProp ?? uncontrolledMenuWidth;
|
|
8193
|
+
const menuWidth = clampGnbMenuWidth(dragMenuWidth ?? committedMenuWidth);
|
|
8194
|
+
const [resizing, setResizing] = useState(false);
|
|
8195
|
+
const bodyWidth = (useRail ? GNB_RAIL_WIDTH : 0) + (showMenu ? menuWidth : 0);
|
|
7612
8196
|
const registerNav = layout?.registerNav;
|
|
7613
8197
|
useIsomorphicLayoutEffect(() => {
|
|
7614
8198
|
if (!registerNav) return;
|
|
@@ -7616,21 +8200,109 @@ var SGnb = /* @__PURE__ */ forwardRef(function SGnb2({
|
|
|
7616
8200
|
columnWidth: bodyWidth,
|
|
7617
8201
|
topHeight: H.topHeight,
|
|
7618
8202
|
foldMs: GNB_FOLD_MS,
|
|
7619
|
-
requireFullHeader: railHasLeaf
|
|
8203
|
+
requireFullHeader: railHasLeaf,
|
|
8204
|
+
resizing
|
|
7620
8205
|
});
|
|
7621
8206
|
return () => registerNav(null);
|
|
7622
|
-
}, [registerNav, bodyWidth, H.topHeight, railHasLeaf]);
|
|
8207
|
+
}, [registerNav, bodyWidth, H.topHeight, railHasLeaf, resizing]);
|
|
8208
|
+
const canResize = resizable && showMenu && !folded;
|
|
8209
|
+
const menuWidthRef = useRef(menuWidth);
|
|
8210
|
+
menuWidthRef.current = menuWidth;
|
|
8211
|
+
const commitMenuWidth = (next) => {
|
|
8212
|
+
const clamped = clampGnbMenuWidth(next);
|
|
8213
|
+
setDragMenuWidth(null);
|
|
8214
|
+
if (menuWidthProp === void 0) setUncontrolledMenuWidth(clamped);
|
|
8215
|
+
if (clamped !== committedMenuWidth) onMenuWidthChange?.(clamped);
|
|
8216
|
+
};
|
|
8217
|
+
const endResizeRef = useRef(null);
|
|
8218
|
+
useEffect(() => () => endResizeRef.current?.(), []);
|
|
8219
|
+
const startMenuResize = (event) => {
|
|
8220
|
+
if (!canResize || typeof document === "undefined") return;
|
|
8221
|
+
event.preventDefault();
|
|
8222
|
+
event.currentTarget.focus();
|
|
8223
|
+
const startX = event.clientX;
|
|
8224
|
+
const startWidth = menuWidthRef.current;
|
|
8225
|
+
let latest = startWidth;
|
|
8226
|
+
const { body } = document;
|
|
8227
|
+
const prevUserSelect = body.style.userSelect;
|
|
8228
|
+
const prevCursor = body.style.cursor;
|
|
8229
|
+
body.style.userSelect = "none";
|
|
8230
|
+
body.style.cursor = "col-resize";
|
|
8231
|
+
const onMove = (moveEvent) => {
|
|
8232
|
+
latest = clampGnbMenuWidth(startWidth + (moveEvent.clientX - startX));
|
|
8233
|
+
setDragMenuWidth(latest);
|
|
8234
|
+
};
|
|
8235
|
+
const endResize = () => {
|
|
8236
|
+
document.removeEventListener("mousemove", onMove);
|
|
8237
|
+
document.removeEventListener("mouseup", endResize);
|
|
8238
|
+
body.style.userSelect = prevUserSelect;
|
|
8239
|
+
body.style.cursor = prevCursor;
|
|
8240
|
+
endResizeRef.current = null;
|
|
8241
|
+
setResizing(false);
|
|
8242
|
+
commitMenuWidth(latest);
|
|
8243
|
+
};
|
|
8244
|
+
document.addEventListener("mousemove", onMove);
|
|
8245
|
+
document.addEventListener("mouseup", endResize);
|
|
8246
|
+
endResizeRef.current = endResize;
|
|
8247
|
+
setResizing(true);
|
|
8248
|
+
};
|
|
8249
|
+
const handleMenuResizeKeyDown = (event) => {
|
|
8250
|
+
if (!canResize) return;
|
|
8251
|
+
const step = GNB_MENU_RESIZE_KEY_STEP[event.shiftKey ? "large" : "normal"];
|
|
8252
|
+
let next = null;
|
|
8253
|
+
if (event.key === "ArrowLeft") next = menuWidthRef.current - step;
|
|
8254
|
+
else if (event.key === "ArrowRight") next = menuWidthRef.current + step;
|
|
8255
|
+
else if (event.key === "Home") next = GNB_MENU_MIN_WIDTH;
|
|
8256
|
+
else if (event.key === "End") next = GNB_MENU_MAX_WIDTH;
|
|
8257
|
+
if (next === null) return;
|
|
8258
|
+
event.preventDefault();
|
|
8259
|
+
commitMenuWidth(next);
|
|
8260
|
+
};
|
|
7623
8261
|
const railFolded = folded && header === "fix";
|
|
7624
8262
|
const isFull = header === "full";
|
|
7625
8263
|
const isFullFrame = isFull && !!layout;
|
|
7626
8264
|
const rightBorder = color === "light" ? `1px solid ${C.topBorder}` : void 0;
|
|
8265
|
+
const resizeHitWidth = "calc(var(--cmp-splitter-border-width) + var(--cmp-splitter-border-padding) * 2)";
|
|
8266
|
+
const menuResizeHandle = canResize ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
8267
|
+
"div",
|
|
8268
|
+
{
|
|
8269
|
+
role: "separator",
|
|
8270
|
+
"aria-orientation": "vertical",
|
|
8271
|
+
"aria-label": `${ariaLabel} width`,
|
|
8272
|
+
"aria-valuenow": menuWidth,
|
|
8273
|
+
"aria-valuemin": GNB_MENU_MIN_WIDTH,
|
|
8274
|
+
"aria-valuemax": GNB_MENU_MAX_WIDTH,
|
|
8275
|
+
"aria-valuetext": `${menuWidth}px`,
|
|
8276
|
+
tabIndex: 0,
|
|
8277
|
+
onMouseDown: startMenuResize,
|
|
8278
|
+
onKeyDown: handleMenuResizeKeyDown,
|
|
8279
|
+
className: "group absolute inset-y-0 z-[1] flex cursor-col-resize justify-end outline-none",
|
|
8280
|
+
style: {
|
|
8281
|
+
width: resizeHitWidth,
|
|
8282
|
+
...isFull && !isFullFrame ? { left: `calc(${bodyWidth}px - ${resizeHitWidth})` } : { right: 0 }
|
|
8283
|
+
},
|
|
8284
|
+
children: /* @__PURE__ */ jsx(
|
|
8285
|
+
"span",
|
|
8286
|
+
{
|
|
8287
|
+
"aria-hidden": true,
|
|
8288
|
+
className: cn(
|
|
8289
|
+
// 평상시엔 자리만 잡고 칠하지 않는다 — 색이 붙는 것 자체가 조절 가능하다는 신호다.
|
|
8290
|
+
"w-(--cmp-splitter-border-width) transition-colors",
|
|
8291
|
+
"group-hover:bg-(--cmp-splitter-border-color) group-focus-visible:bg-(--cmp-splitter-border-color)",
|
|
8292
|
+
resizing && "bg-(--cmp-splitter-border-color)"
|
|
8293
|
+
)
|
|
8294
|
+
}
|
|
8295
|
+
)
|
|
8296
|
+
}
|
|
8297
|
+
) }) : null;
|
|
7627
8298
|
const rootStyle = isFullFrame ? { display: "contents", ...style } : isFull ? (
|
|
7628
8299
|
// 단독 full — 상단바가 전폭이어야 하므로 루트도 전폭이고, 배경·선은 상단바·메뉴가 각자 그린다.
|
|
7629
8300
|
{ width: "100%", ...style }
|
|
7630
8301
|
) : {
|
|
7631
8302
|
// fix 를 닫으면 48px 레일로 좁혀진다.
|
|
7632
8303
|
width: folded ? GNB_COMMON.foldWidth : bodyWidth,
|
|
7633
|
-
|
|
8304
|
+
// 폭을 끄는 중에는 전환을 끈다 — 접힘용 전환이 걸려 있으면 컬럼이 손보다 늦게 따라온다.
|
|
8305
|
+
transition: resizing ? "none" : `width ${GNB_FOLD_MS}ms ease-out`,
|
|
7634
8306
|
backgroundColor: C.panelBg,
|
|
7635
8307
|
borderRight: rightBorder,
|
|
7636
8308
|
...style
|
|
@@ -7707,7 +8379,8 @@ var SGnb = /* @__PURE__ */ forwardRef(function SGnb2({
|
|
|
7707
8379
|
ref,
|
|
7708
8380
|
className: cn(
|
|
7709
8381
|
"box-border",
|
|
7710
|
-
|
|
8382
|
+
// relative: fix 의 조절선이 루트(=GNB 컬럼) 오른쪽 끝을 기준으로 서야 상단바까지 이어진다.
|
|
8383
|
+
!isFullFrame && "relative flex h-full shrink-0 flex-col overflow-hidden",
|
|
7711
8384
|
className
|
|
7712
8385
|
),
|
|
7713
8386
|
style: rootStyle,
|
|
@@ -7745,86 +8418,106 @@ var SGnb = /* @__PURE__ */ forwardRef(function SGnb2({
|
|
|
7745
8418
|
] })
|
|
7746
8419
|
}
|
|
7747
8420
|
),
|
|
7748
|
-
/* @__PURE__ */
|
|
8421
|
+
/* @__PURE__ */ jsxs(
|
|
7749
8422
|
"div",
|
|
7750
8423
|
{
|
|
7751
|
-
className: cn("overflow-hidden", !isFullFrame && "min-h-0 flex-1"),
|
|
8424
|
+
className: cn("relative overflow-hidden", !isFullFrame && "min-h-0 flex-1"),
|
|
7752
8425
|
style: isFullFrame ? { gridArea: "nav" } : void 0,
|
|
7753
|
-
children:
|
|
7754
|
-
|
|
7755
|
-
|
|
7756
|
-
|
|
7757
|
-
|
|
7758
|
-
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
|
|
7768
|
-
|
|
7769
|
-
|
|
7770
|
-
|
|
7771
|
-
|
|
7772
|
-
|
|
7773
|
-
|
|
7774
|
-
|
|
7775
|
-
|
|
7776
|
-
|
|
7777
|
-
|
|
7778
|
-
|
|
7779
|
-
|
|
7780
|
-
|
|
7781
|
-
|
|
7782
|
-
|
|
7783
|
-
|
|
7784
|
-
|
|
7785
|
-
|
|
7786
|
-
|
|
7787
|
-
|
|
7788
|
-
|
|
7789
|
-
|
|
7790
|
-
|
|
7791
|
-
|
|
7792
|
-
|
|
7793
|
-
|
|
7794
|
-
|
|
7795
|
-
|
|
7796
|
-
|
|
7797
|
-
|
|
7798
|
-
|
|
7799
|
-
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
|
|
7803
|
-
|
|
7804
|
-
|
|
7805
|
-
|
|
7806
|
-
|
|
7807
|
-
|
|
7808
|
-
|
|
7809
|
-
|
|
7810
|
-
|
|
7811
|
-
|
|
7812
|
-
|
|
7813
|
-
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
|
|
7817
|
-
|
|
7818
|
-
|
|
7819
|
-
|
|
7820
|
-
|
|
7821
|
-
|
|
7822
|
-
|
|
7823
|
-
|
|
7824
|
-
|
|
7825
|
-
|
|
8426
|
+
children: [
|
|
8427
|
+
/* @__PURE__ */ jsxs(
|
|
8428
|
+
"div",
|
|
8429
|
+
{
|
|
8430
|
+
className: "flex h-full flex-row",
|
|
8431
|
+
style: {
|
|
8432
|
+
width: bodyWidth,
|
|
8433
|
+
transform: folded ? "translateX(-100%)" : "none",
|
|
8434
|
+
visibility: folded ? "hidden" : "visible",
|
|
8435
|
+
transition: `transform ${GNB_FOLD_MS}ms ease-out, ${hideAfterSlide(folded)}`
|
|
8436
|
+
},
|
|
8437
|
+
children: [
|
|
8438
|
+
useRail && // 레일 컬럼 — 스크롤되는 아이템 목록(nav)과 하단 고정 footer 를 한 컬럼에 담는다.
|
|
8439
|
+
// footer 는 내비게이션이 아니므로 nav(landmark) 밖에 두고, 컬럼 폭·구분선·배경은 이 래퍼가
|
|
8440
|
+
// 전체 높이에 걸쳐 책임진다(그래야 footer 자리까지 배경·오른쪽 선이 이어진다).
|
|
8441
|
+
/* @__PURE__ */ jsxs(
|
|
8442
|
+
"div",
|
|
8443
|
+
{
|
|
8444
|
+
className: "flex shrink-0 flex-col overflow-hidden",
|
|
8445
|
+
style: {
|
|
8446
|
+
width: GNB_RAIL_WIDTH,
|
|
8447
|
+
borderRight: `1px solid ${C.topBorder}`,
|
|
8448
|
+
backgroundColor: C.panelBg
|
|
8449
|
+
},
|
|
8450
|
+
children: [
|
|
8451
|
+
/* @__PURE__ */ jsx(
|
|
8452
|
+
"nav",
|
|
8453
|
+
{
|
|
8454
|
+
"aria-label": `${ariaLabel} rail`,
|
|
8455
|
+
className: cn(
|
|
8456
|
+
"flex min-h-0 flex-1 flex-col overflow-x-hidden overflow-y-auto",
|
|
8457
|
+
SCROLLBAR_HIDDEN_CLASS
|
|
8458
|
+
),
|
|
8459
|
+
style: { padding: GNB_RAIL.padding },
|
|
8460
|
+
children: /* @__PURE__ */ jsx("ul", { className: "m-0 flex list-none flex-col p-0", style: { gap: GNB_RAIL.gap }, children: railItems.map(renderRailItem) })
|
|
8461
|
+
}
|
|
8462
|
+
),
|
|
8463
|
+
railFooter && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: railFooter })
|
|
8464
|
+
]
|
|
8465
|
+
}
|
|
8466
|
+
),
|
|
8467
|
+
showMenu && /* @__PURE__ */ jsxs(
|
|
8468
|
+
"div",
|
|
8469
|
+
{
|
|
8470
|
+
className: "flex shrink-0 flex-col overflow-hidden",
|
|
8471
|
+
style: {
|
|
8472
|
+
width: menuWidth,
|
|
8473
|
+
backgroundColor: C.panelBg,
|
|
8474
|
+
// full 은 루트가 오른쪽 선을 못 그리므로(전폭이거나 아예 없다) 메뉴 오른쪽(페이지 경계)이 대신 그린다.
|
|
8475
|
+
borderRight: isFull ? rightBorder : void 0
|
|
8476
|
+
},
|
|
8477
|
+
children: [
|
|
8478
|
+
/* @__PURE__ */ jsx(
|
|
8479
|
+
"nav",
|
|
8480
|
+
{
|
|
8481
|
+
"aria-label": ariaLabel,
|
|
8482
|
+
className: cn(
|
|
8483
|
+
"flex min-h-0 flex-1 flex-col overflow-x-hidden overflow-y-auto",
|
|
8484
|
+
SCROLLBAR_HIDDEN_CLASS
|
|
8485
|
+
),
|
|
8486
|
+
style: {
|
|
8487
|
+
paddingTop: M.bodyPaddingY,
|
|
8488
|
+
paddingBottom: M.bodyPaddingY
|
|
8489
|
+
},
|
|
8490
|
+
children: /* @__PURE__ */ jsx("ul", { className: "m-0 flex list-none flex-col p-0", children: menuItems.map((item) => renderItem(item, 1)) })
|
|
8491
|
+
}
|
|
8492
|
+
),
|
|
8493
|
+
menuFooter && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: menuFooter })
|
|
8494
|
+
]
|
|
8495
|
+
}
|
|
8496
|
+
)
|
|
8497
|
+
]
|
|
8498
|
+
}
|
|
8499
|
+
),
|
|
8500
|
+
header === "full" && menuResizeHandle
|
|
8501
|
+
]
|
|
7826
8502
|
}
|
|
7827
8503
|
),
|
|
8504
|
+
header === "fix" && menuResizeHandle,
|
|
8505
|
+
/* @__PURE__ */ jsxs(RPopover2.Root, { open: labelTip !== null, onOpenChange: (open) => !open && setLabelTip(null), children: [
|
|
8506
|
+
/* @__PURE__ */ jsx(RPopover2.Anchor, { virtualRef: labelTipAnchorRef }),
|
|
8507
|
+
/* @__PURE__ */ jsx(RPopover2.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx(
|
|
8508
|
+
RPopover2.Content,
|
|
8509
|
+
{
|
|
8510
|
+
side: "right",
|
|
8511
|
+
sideOffset: 4,
|
|
8512
|
+
className: cn("z-50", FLOATING_SLIDE_ANIM),
|
|
8513
|
+
"aria-hidden": true,
|
|
8514
|
+
onOpenAutoFocus: (event) => event.preventDefault(),
|
|
8515
|
+
onMouseEnter: cancelLabelTipHide,
|
|
8516
|
+
onMouseLeave: startLabelTipHide,
|
|
8517
|
+
children: /* @__PURE__ */ jsx(STag, { shape: "square", size: "xs", color: "grey", label: labelTip?.label ?? "" })
|
|
8518
|
+
}
|
|
8519
|
+
) })
|
|
8520
|
+
] }),
|
|
7828
8521
|
railFolded && foldedFooter && /* @__PURE__ */ jsx("div", { className: "flex shrink-0 items-center justify-center mb-[24px]", children: foldedFooter })
|
|
7829
8522
|
]
|
|
7830
8523
|
}
|
|
@@ -8093,6 +8786,7 @@ function SPagination({
|
|
|
8093
8786
|
// src/components/SStepper/stepper.config.ts
|
|
8094
8787
|
var STEPPER_SIZES = ["sm", "lg"];
|
|
8095
8788
|
var V2 = (path) => `var(--cmp-stepper-${path})`;
|
|
8789
|
+
var VF = (path, fallback) => `var(--cmp-stepper-${path}, ${fallback})`;
|
|
8096
8790
|
var STEPPER_SIZE_CONFIG = {
|
|
8097
8791
|
sm: {
|
|
8098
8792
|
sequenceSize: V2("sm-sequence-size"),
|
|
@@ -8122,16 +8816,17 @@ var STEPPER_COLORS = {
|
|
|
8122
8816
|
sequenceBorder: {
|
|
8123
8817
|
active: V2("sequence-border-active"),
|
|
8124
8818
|
default: V2("sequence-border-default"),
|
|
8125
|
-
completed:
|
|
8819
|
+
completed: VF("sequence-border-completed", "#93C4FF")
|
|
8126
8820
|
},
|
|
8127
8821
|
sequenceBg: {
|
|
8128
8822
|
active: V2("sequence-bg-active"),
|
|
8129
8823
|
default: V2("sequence-bg-default"),
|
|
8130
|
-
completed:
|
|
8824
|
+
completed: VF("sequence-bg-completed", "#EFF6FF")
|
|
8131
8825
|
},
|
|
8132
8826
|
sequenceText: {
|
|
8133
8827
|
active: V2("sequence-text-active"),
|
|
8134
|
-
default: V2("sequence-text-default")
|
|
8828
|
+
default: V2("sequence-text-default"),
|
|
8829
|
+
completed: VF("sequence-text-completed", "#0075FF")
|
|
8135
8830
|
},
|
|
8136
8831
|
text: {
|
|
8137
8832
|
active: V2("text-active"),
|
|
@@ -8139,27 +8834,428 @@ var STEPPER_COLORS = {
|
|
|
8139
8834
|
completed: V2("text-completed")
|
|
8140
8835
|
}
|
|
8141
8836
|
};
|
|
8837
|
+
var STEPPER_HORIZONTAL_COMPLETED_COLORS = {
|
|
8838
|
+
sequenceBorder: STEPPER_COLORS.sequenceBorder.completed,
|
|
8839
|
+
sequenceBg: STEPPER_COLORS.sequenceBg.completed,
|
|
8840
|
+
sequenceIcon: STEPPER_COLORS.sequenceText.completed,
|
|
8841
|
+
text: STEPPER_COLORS.text.completed
|
|
8842
|
+
};
|
|
8843
|
+
var STEPPER_VERTICAL_LAYOUT = {
|
|
8844
|
+
width: VF("vertical-width", "240px"),
|
|
8845
|
+
itemGap: VF("vertical-item-gap", "12px"),
|
|
8846
|
+
itemPaddingX: VF("vertical-item-paddingX", "16px"),
|
|
8847
|
+
itemPaddingY: VF("vertical-item-paddingY", "8px"),
|
|
8848
|
+
titlePaddingTop: VF("vertical-title-paddingTop", "12px"),
|
|
8849
|
+
titlePaddingBottom: VF("vertical-title-paddingBottom", "4px"),
|
|
8850
|
+
titleFontSize: VF("vertical-title-font-size", "11px"),
|
|
8851
|
+
titleLineHeight: VF("vertical-title-line-height", "18px"),
|
|
8852
|
+
accentStripeWidth: VF("vertical-item-accentStripe-width", "2px"),
|
|
8853
|
+
accentStripeColor: VF("vertical-item-accentStripe-color", "#64ABFF")
|
|
8854
|
+
};
|
|
8855
|
+
var STEPPER_VERTICAL_COLORS = {
|
|
8856
|
+
itemBg: {
|
|
8857
|
+
default: VF("vertical-item-bg-default", "#FFFFFF"),
|
|
8858
|
+
hover: VF("vertical-item-bg-hover", "#F6F6F6"),
|
|
8859
|
+
selected: VF("vertical-item-bg-selected", "#EFF6FF")
|
|
8860
|
+
},
|
|
8861
|
+
titleText: VF("vertical-title-text", "#004290"),
|
|
8862
|
+
textDefault: STEPPER_COLORS.text.default,
|
|
8863
|
+
textCompleted: STEPPER_COLORS.text.completed,
|
|
8864
|
+
sequenceBorderActive: STEPPER_COLORS.sequenceBorder.active,
|
|
8865
|
+
sequenceBgActive: STEPPER_COLORS.sequenceBg.active,
|
|
8866
|
+
sequenceTextActive: STEPPER_COLORS.sequenceText.active,
|
|
8867
|
+
sequenceTextDefault: STEPPER_COLORS.sequenceText.default,
|
|
8868
|
+
sequenceBorderCompleted: VF("vertical-sequence-border-completed", "#93C4FF"),
|
|
8869
|
+
sequenceBgCompleted: VF("vertical-sequence-bg-completed", "#EFF6FF"),
|
|
8870
|
+
sequenceIconCompleted: VF("vertical-sequence-icon-completed", "#0075FF"),
|
|
8871
|
+
errorBadge: "#FB4444"
|
|
8872
|
+
};
|
|
8873
|
+
var ERROR_TOOLTIP_MESSAGE = "\uD655\uC778\uC774 \uD544\uC694\uD55C \uD56D\uBAA9\uC774 \uC788\uC2B5\uB2C8\uB2E4.";
|
|
8142
8874
|
function getItemValue(item, index) {
|
|
8143
8875
|
return item.value ?? String(index + 1);
|
|
8144
8876
|
}
|
|
8145
|
-
function
|
|
8877
|
+
function groupAdjacentItems(items) {
|
|
8878
|
+
return items.reduce(
|
|
8879
|
+
(groups, item, index) => {
|
|
8880
|
+
const currentGroup = item.group;
|
|
8881
|
+
const previous = groups[groups.length - 1];
|
|
8882
|
+
if (currentGroup && previous?.group === currentGroup) {
|
|
8883
|
+
previous.items.push(item);
|
|
8884
|
+
return groups;
|
|
8885
|
+
}
|
|
8886
|
+
groups.push({ group: currentGroup, startIndex: index, items: [item] });
|
|
8887
|
+
return groups;
|
|
8888
|
+
},
|
|
8889
|
+
[]
|
|
8890
|
+
);
|
|
8891
|
+
}
|
|
8892
|
+
var SStepper = /* @__PURE__ */ forwardRef(function SStepper2({
|
|
8146
8893
|
items,
|
|
8147
8894
|
value,
|
|
8148
8895
|
size = "sm",
|
|
8896
|
+
vertical = false,
|
|
8897
|
+
clickable,
|
|
8898
|
+
onValueChange,
|
|
8149
8899
|
ariaLabel = "\uC9C4\uD589 \uB2E8\uACC4",
|
|
8150
8900
|
className,
|
|
8151
8901
|
style
|
|
8152
|
-
}) {
|
|
8902
|
+
}, ref) {
|
|
8153
8903
|
const config = STEPPER_SIZE_CONFIG[size];
|
|
8904
|
+
const isClickable = clickable ?? vertical;
|
|
8905
|
+
const [hoveredIndex, setHoveredIndex] = useState(null);
|
|
8906
|
+
const [tooltipHoverValue, setTooltipHoverValue] = useState(null);
|
|
8907
|
+
const [customTooltipOpen, setCustomTooltipOpen] = useState(false);
|
|
8908
|
+
const [verticalAccentStripeStyle, setVerticalAccentStripeStyle] = useState({
|
|
8909
|
+
height: 0,
|
|
8910
|
+
opacity: 0,
|
|
8911
|
+
transform: "translateY(0px)"
|
|
8912
|
+
});
|
|
8913
|
+
const verticalItemRefs = useRef([]);
|
|
8154
8914
|
const activeIndex = Math.max(
|
|
8155
8915
|
0,
|
|
8156
8916
|
items.findIndex((item, index) => getItemValue(item, index) === value)
|
|
8157
8917
|
);
|
|
8158
|
-
const
|
|
8159
|
-
|
|
8918
|
+
const lastCompletedIndex = items.reduce(
|
|
8919
|
+
(lastIndex, item, index) => item.completed === true ? index : lastIndex,
|
|
8920
|
+
-1
|
|
8921
|
+
);
|
|
8922
|
+
const resolvedClickableIndex = lastCompletedIndex + 1;
|
|
8923
|
+
const [visitedMaxIndex, setVisitedMaxIndex] = useState(activeIndex);
|
|
8924
|
+
const firstErrorIndex = items.findIndex((item) => item.error === true);
|
|
8925
|
+
useImperativeHandle(
|
|
8926
|
+
ref,
|
|
8927
|
+
() => ({
|
|
8928
|
+
showItemTooltip: () => setCustomTooltipOpen(true),
|
|
8929
|
+
hideItemTooltip: () => setCustomTooltipOpen(false)
|
|
8930
|
+
}),
|
|
8931
|
+
[]
|
|
8932
|
+
);
|
|
8933
|
+
useLayoutEffect(() => {
|
|
8934
|
+
setVisitedMaxIndex((current) => Math.max(current, activeIndex));
|
|
8935
|
+
}, [activeIndex]);
|
|
8936
|
+
useLayoutEffect(() => {
|
|
8937
|
+
setCustomTooltipOpen(false);
|
|
8938
|
+
}, [activeIndex]);
|
|
8939
|
+
useLayoutEffect(() => {
|
|
8940
|
+
if (!vertical) return;
|
|
8941
|
+
const activeItem = verticalItemRefs.current[activeIndex];
|
|
8942
|
+
if (!activeItem) {
|
|
8943
|
+
setVerticalAccentStripeStyle((current) => ({ ...current, opacity: 0 }));
|
|
8944
|
+
return;
|
|
8945
|
+
}
|
|
8946
|
+
setVerticalAccentStripeStyle({
|
|
8947
|
+
height: activeItem.offsetHeight,
|
|
8948
|
+
opacity: 1,
|
|
8949
|
+
transform: `translateY(${activeItem.offsetTop}px)`
|
|
8950
|
+
});
|
|
8951
|
+
}, [activeIndex, vertical, items]);
|
|
8952
|
+
const getState = (item, index) => {
|
|
8160
8953
|
if (index === activeIndex) return "active";
|
|
8954
|
+
if (item.completed != null) return item.completed ? "completed" : "default";
|
|
8161
8955
|
return "default";
|
|
8162
8956
|
};
|
|
8957
|
+
const emitValueChange = (item, index) => {
|
|
8958
|
+
onValueChange?.(getItemValue(item, index), item, index);
|
|
8959
|
+
};
|
|
8960
|
+
const isWithinClickableIndex = (index) => index <= resolvedClickableIndex;
|
|
8961
|
+
const renderStepContent = (item, index, options = {}) => {
|
|
8962
|
+
const { isVertical = false, roleListItem = true, hovered = false } = options;
|
|
8963
|
+
const state2 = getState(item, index);
|
|
8964
|
+
const isHorizontalCompleted = !isVertical && state2 === "completed";
|
|
8965
|
+
const isVerticalCompleted = isVertical && state2 === "completed";
|
|
8966
|
+
const isVerticalLastActive = isVertical && state2 === "default" && index === visitedMaxIndex;
|
|
8967
|
+
const showsCheckIcon = state2 === "completed";
|
|
8968
|
+
const itemColor = (() => {
|
|
8969
|
+
if (isHorizontalCompleted) return STEPPER_HORIZONTAL_COMPLETED_COLORS.text;
|
|
8970
|
+
if (!isVertical) return STEPPER_COLORS.text[state2];
|
|
8971
|
+
if (state2 === "active") return STEPPER_COLORS.text.active;
|
|
8972
|
+
if (isVerticalCompleted) return STEPPER_VERTICAL_COLORS.textCompleted;
|
|
8973
|
+
return STEPPER_VERTICAL_COLORS.textDefault;
|
|
8974
|
+
})();
|
|
8975
|
+
const sequenceBorderColor = (() => {
|
|
8976
|
+
if (isVerticalCompleted) {
|
|
8977
|
+
return STEPPER_VERTICAL_COLORS.sequenceBorderCompleted;
|
|
8978
|
+
}
|
|
8979
|
+
if (isVertical && (state2 === "active" || isVerticalLastActive)) {
|
|
8980
|
+
return STEPPER_VERTICAL_COLORS.sequenceBorderActive;
|
|
8981
|
+
}
|
|
8982
|
+
if (isHorizontalCompleted) return STEPPER_HORIZONTAL_COMPLETED_COLORS.sequenceBorder;
|
|
8983
|
+
return STEPPER_COLORS.sequenceBorder[state2];
|
|
8984
|
+
})();
|
|
8985
|
+
const sequenceBg = (() => {
|
|
8986
|
+
if (isVerticalCompleted) {
|
|
8987
|
+
return STEPPER_VERTICAL_COLORS.sequenceBgCompleted;
|
|
8988
|
+
}
|
|
8989
|
+
if (isVertical && (state2 === "active" || isVerticalLastActive)) {
|
|
8990
|
+
return STEPPER_VERTICAL_COLORS.sequenceBgActive;
|
|
8991
|
+
}
|
|
8992
|
+
if (isHorizontalCompleted) return STEPPER_HORIZONTAL_COMPLETED_COLORS.sequenceBg;
|
|
8993
|
+
return STEPPER_COLORS.sequenceBg[state2];
|
|
8994
|
+
})();
|
|
8995
|
+
const sequenceColor = (() => {
|
|
8996
|
+
if (isVerticalCompleted) {
|
|
8997
|
+
return STEPPER_VERTICAL_COLORS.sequenceIconCompleted;
|
|
8998
|
+
}
|
|
8999
|
+
if (isVertical && (state2 === "active" || isVerticalLastActive)) {
|
|
9000
|
+
return STEPPER_VERTICAL_COLORS.sequenceTextActive;
|
|
9001
|
+
}
|
|
9002
|
+
if (isVertical) return STEPPER_VERTICAL_COLORS.sequenceTextDefault;
|
|
9003
|
+
if (isHorizontalCompleted) return STEPPER_HORIZONTAL_COMPLETED_COLORS.sequenceIcon;
|
|
9004
|
+
return STEPPER_COLORS.sequenceText[state2];
|
|
9005
|
+
})();
|
|
9006
|
+
const itemStyle = {
|
|
9007
|
+
gap: STEPPER_LAYOUT.itemGap,
|
|
9008
|
+
color: itemColor,
|
|
9009
|
+
fontWeight: state2 === "active" || isVertical && hovered ? config.fontWeightActive : config.fontWeightDefault
|
|
9010
|
+
};
|
|
9011
|
+
const sequenceStyle = {
|
|
9012
|
+
width: config.sequenceSize,
|
|
9013
|
+
height: config.sequenceSize,
|
|
9014
|
+
flexBasis: config.sequenceSize,
|
|
9015
|
+
borderRadius: STEPPER_LAYOUT.sequenceRadius,
|
|
9016
|
+
borderWidth: STEPPER_LAYOUT.sequenceBorderWidth,
|
|
9017
|
+
borderColor: sequenceBorderColor,
|
|
9018
|
+
background: sequenceBg,
|
|
9019
|
+
color: sequenceColor
|
|
9020
|
+
};
|
|
9021
|
+
return /* @__PURE__ */ jsxs(
|
|
9022
|
+
"span",
|
|
9023
|
+
{
|
|
9024
|
+
role: roleListItem ? "listitem" : void 0,
|
|
9025
|
+
"aria-current": roleListItem && state2 === "active" ? "step" : void 0,
|
|
9026
|
+
className: "inline-flex items-center whitespace-nowrap",
|
|
9027
|
+
style: itemStyle,
|
|
9028
|
+
children: [
|
|
9029
|
+
/* @__PURE__ */ jsx(
|
|
9030
|
+
"span",
|
|
9031
|
+
{
|
|
9032
|
+
"aria-hidden": true,
|
|
9033
|
+
className: "box-border inline-flex shrink-0 items-center justify-center border border-solid font-bold",
|
|
9034
|
+
style: sequenceStyle,
|
|
9035
|
+
children: showsCheckIcon ? /* @__PURE__ */ jsx(SIcon, { name: "check", size: STEPPER_LAYOUT.sequenceIcon, color: "currentColor" }) : index + 1
|
|
9036
|
+
}
|
|
9037
|
+
),
|
|
9038
|
+
/* @__PURE__ */ jsx("span", { children: item.label })
|
|
9039
|
+
]
|
|
9040
|
+
}
|
|
9041
|
+
);
|
|
9042
|
+
};
|
|
9043
|
+
const renderClickableStepContent = (item, index, isVertical = false) => {
|
|
9044
|
+
const isDisabled = !isWithinClickableIndex(index);
|
|
9045
|
+
return /* @__PURE__ */ jsx(
|
|
9046
|
+
"button",
|
|
9047
|
+
{
|
|
9048
|
+
type: "button",
|
|
9049
|
+
disabled: isDisabled,
|
|
9050
|
+
className: cn(
|
|
9051
|
+
"m-0 inline-flex w-full items-center border-0 bg-transparent p-0 text-left",
|
|
9052
|
+
isDisabled ? "cursor-default" : "cursor-pointer"
|
|
9053
|
+
),
|
|
9054
|
+
style: { font: "inherit", color: "inherit" },
|
|
9055
|
+
onClick: () => {
|
|
9056
|
+
if (!isDisabled) emitValueChange(item, index);
|
|
9057
|
+
},
|
|
9058
|
+
children: renderStepContent(item, index, { isVertical, roleListItem: false })
|
|
9059
|
+
}
|
|
9060
|
+
);
|
|
9061
|
+
};
|
|
9062
|
+
if (vertical) {
|
|
9063
|
+
const groups = groupAdjacentItems(items);
|
|
9064
|
+
return /* @__PURE__ */ jsxs(
|
|
9065
|
+
"div",
|
|
9066
|
+
{
|
|
9067
|
+
role: "list",
|
|
9068
|
+
"aria-label": ariaLabel,
|
|
9069
|
+
className: cn("relative inline-flex flex-col items-start", className),
|
|
9070
|
+
style: {
|
|
9071
|
+
width: STEPPER_VERTICAL_LAYOUT.width,
|
|
9072
|
+
fontSize: config.fontSize,
|
|
9073
|
+
lineHeight: config.lineHeight,
|
|
9074
|
+
...style
|
|
9075
|
+
},
|
|
9076
|
+
children: [
|
|
9077
|
+
/* @__PURE__ */ jsx(
|
|
9078
|
+
"span",
|
|
9079
|
+
{
|
|
9080
|
+
"aria-hidden": "true",
|
|
9081
|
+
"data-stepper-accent-stripe": "true",
|
|
9082
|
+
className: "pointer-events-none absolute left-0 top-0 z-[1]",
|
|
9083
|
+
style: {
|
|
9084
|
+
width: STEPPER_VERTICAL_LAYOUT.accentStripeWidth,
|
|
9085
|
+
background: STEPPER_VERTICAL_LAYOUT.accentStripeColor,
|
|
9086
|
+
transition: "transform 160ms ease, height 160ms ease, opacity 120ms ease",
|
|
9087
|
+
...verticalAccentStripeStyle
|
|
9088
|
+
}
|
|
9089
|
+
}
|
|
9090
|
+
),
|
|
9091
|
+
groups.map((group) => {
|
|
9092
|
+
const groupKey = group.group ?? getItemValue(group.items[0], group.startIndex);
|
|
9093
|
+
return /* @__PURE__ */ jsxs(
|
|
9094
|
+
"div",
|
|
9095
|
+
{
|
|
9096
|
+
className: "flex w-full flex-col items-start",
|
|
9097
|
+
children: [
|
|
9098
|
+
group.group && /* @__PURE__ */ jsx(
|
|
9099
|
+
"div",
|
|
9100
|
+
{
|
|
9101
|
+
className: "flex w-full items-center overflow-hidden",
|
|
9102
|
+
style: {
|
|
9103
|
+
gap: STEPPER_VERTICAL_LAYOUT.itemGap,
|
|
9104
|
+
paddingLeft: STEPPER_VERTICAL_LAYOUT.itemPaddingX,
|
|
9105
|
+
paddingRight: STEPPER_VERTICAL_LAYOUT.itemPaddingX,
|
|
9106
|
+
paddingTop: STEPPER_VERTICAL_LAYOUT.titlePaddingTop,
|
|
9107
|
+
paddingBottom: STEPPER_VERTICAL_LAYOUT.titlePaddingBottom,
|
|
9108
|
+
background: STEPPER_VERTICAL_COLORS.itemBg.default,
|
|
9109
|
+
color: STEPPER_VERTICAL_COLORS.titleText,
|
|
9110
|
+
fontSize: STEPPER_VERTICAL_LAYOUT.titleFontSize,
|
|
9111
|
+
lineHeight: STEPPER_VERTICAL_LAYOUT.titleLineHeight,
|
|
9112
|
+
fontWeight: 700
|
|
9113
|
+
},
|
|
9114
|
+
children: /* @__PURE__ */ jsx("span", { className: "whitespace-nowrap", children: group.group })
|
|
9115
|
+
}
|
|
9116
|
+
),
|
|
9117
|
+
group.items.map((item, itemIndex) => {
|
|
9118
|
+
const index = group.startIndex + itemIndex;
|
|
9119
|
+
const state2 = getState(item, index);
|
|
9120
|
+
const itemValue = getItemValue(item, index);
|
|
9121
|
+
const canClickItem = isClickable && isWithinClickableIndex(index);
|
|
9122
|
+
const isDisabled = !canClickItem;
|
|
9123
|
+
const isHovered = hoveredIndex === index && canClickItem && state2 !== "active";
|
|
9124
|
+
const itemContainerStyle = {
|
|
9125
|
+
gap: STEPPER_VERTICAL_LAYOUT.itemGap,
|
|
9126
|
+
paddingLeft: STEPPER_VERTICAL_LAYOUT.itemPaddingX,
|
|
9127
|
+
paddingRight: STEPPER_VERTICAL_LAYOUT.itemPaddingX,
|
|
9128
|
+
paddingTop: STEPPER_VERTICAL_LAYOUT.itemPaddingY,
|
|
9129
|
+
paddingBottom: STEPPER_VERTICAL_LAYOUT.itemPaddingY,
|
|
9130
|
+
background: state2 === "active" ? STEPPER_VERTICAL_COLORS.itemBg.selected : isHovered ? STEPPER_VERTICAL_COLORS.itemBg.hover : STEPPER_VERTICAL_COLORS.itemBg.default
|
|
9131
|
+
};
|
|
9132
|
+
const handleMouseEnter = () => {
|
|
9133
|
+
if (canClickItem) setHoveredIndex(index);
|
|
9134
|
+
};
|
|
9135
|
+
const handleMouseLeave = () => {
|
|
9136
|
+
setHoveredIndex((current) => current === index ? null : current);
|
|
9137
|
+
};
|
|
9138
|
+
const stepContent = renderStepContent(item, index, {
|
|
9139
|
+
isVertical: true,
|
|
9140
|
+
roleListItem: false,
|
|
9141
|
+
hovered: isHovered
|
|
9142
|
+
});
|
|
9143
|
+
const errorBadge = item.error ? /* @__PURE__ */ jsx(
|
|
9144
|
+
"span",
|
|
9145
|
+
{
|
|
9146
|
+
"aria-hidden": "true",
|
|
9147
|
+
"data-stepper-error-badge": "true",
|
|
9148
|
+
className: "inline-flex shrink-0 overflow-hidden rounded-full",
|
|
9149
|
+
style: {
|
|
9150
|
+
width: 6,
|
|
9151
|
+
height: 6,
|
|
9152
|
+
background: STEPPER_VERTICAL_COLORS.errorBadge
|
|
9153
|
+
}
|
|
9154
|
+
}
|
|
9155
|
+
) : null;
|
|
9156
|
+
const isTooltipHovered = tooltipHoverValue === itemValue;
|
|
9157
|
+
const isCustomTooltipOpen = customTooltipOpen && index === firstErrorIndex;
|
|
9158
|
+
const showTooltip = item.error === true && (isTooltipHovered || isCustomTooltipOpen);
|
|
9159
|
+
const handleTooltipMouseEnter = () => setTooltipHoverValue(itemValue);
|
|
9160
|
+
const handleTooltipMouseLeave = () => {
|
|
9161
|
+
setTooltipHoverValue((current) => current === itemValue ? null : current);
|
|
9162
|
+
};
|
|
9163
|
+
const labelBadge = /* @__PURE__ */ jsx(
|
|
9164
|
+
STooltip2,
|
|
9165
|
+
{
|
|
9166
|
+
trigger: "none",
|
|
9167
|
+
open: showTooltip,
|
|
9168
|
+
content: ERROR_TOOLTIP_MESSAGE,
|
|
9169
|
+
tooltipType: "danger",
|
|
9170
|
+
placement: "right",
|
|
9171
|
+
children: /* @__PURE__ */ jsxs(
|
|
9172
|
+
"span",
|
|
9173
|
+
{
|
|
9174
|
+
className: cn(
|
|
9175
|
+
"relative z-[3] inline-flex items-center",
|
|
9176
|
+
isClickable && (isDisabled ? "cursor-default" : "cursor-pointer")
|
|
9177
|
+
),
|
|
9178
|
+
style: { gap: STEPPER_VERTICAL_LAYOUT.itemGap },
|
|
9179
|
+
onMouseEnter: handleTooltipMouseEnter,
|
|
9180
|
+
onMouseLeave: handleTooltipMouseLeave,
|
|
9181
|
+
onClick: isClickable ? () => {
|
|
9182
|
+
if (!isDisabled) emitValueChange(item, index);
|
|
9183
|
+
} : void 0,
|
|
9184
|
+
children: [
|
|
9185
|
+
stepContent,
|
|
9186
|
+
errorBadge
|
|
9187
|
+
]
|
|
9188
|
+
}
|
|
9189
|
+
)
|
|
9190
|
+
}
|
|
9191
|
+
);
|
|
9192
|
+
if (isClickable) {
|
|
9193
|
+
return /* @__PURE__ */ jsxs(
|
|
9194
|
+
"div",
|
|
9195
|
+
{
|
|
9196
|
+
ref: (node) => {
|
|
9197
|
+
verticalItemRefs.current[index] = node;
|
|
9198
|
+
},
|
|
9199
|
+
role: "listitem",
|
|
9200
|
+
"aria-current": state2 === "active" ? "step" : void 0,
|
|
9201
|
+
className: cn(
|
|
9202
|
+
"relative flex w-full items-center overflow-hidden",
|
|
9203
|
+
isDisabled ? "cursor-default" : "cursor-pointer"
|
|
9204
|
+
),
|
|
9205
|
+
onMouseEnter: handleMouseEnter,
|
|
9206
|
+
onMouseLeave: handleMouseLeave,
|
|
9207
|
+
style: itemContainerStyle,
|
|
9208
|
+
children: [
|
|
9209
|
+
/* @__PURE__ */ jsx(
|
|
9210
|
+
"button",
|
|
9211
|
+
{
|
|
9212
|
+
type: "button",
|
|
9213
|
+
disabled: isDisabled,
|
|
9214
|
+
"aria-label": item.label,
|
|
9215
|
+
className: cn(
|
|
9216
|
+
"absolute inset-0 z-[2] m-0 border-0 bg-transparent p-0 text-left outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-(--sys-color-border-accent)",
|
|
9217
|
+
isDisabled ? "cursor-default" : "cursor-pointer"
|
|
9218
|
+
),
|
|
9219
|
+
onClick: () => {
|
|
9220
|
+
if (!isDisabled) emitValueChange(item, index);
|
|
9221
|
+
}
|
|
9222
|
+
}
|
|
9223
|
+
),
|
|
9224
|
+
labelBadge
|
|
9225
|
+
]
|
|
9226
|
+
},
|
|
9227
|
+
itemValue
|
|
9228
|
+
);
|
|
9229
|
+
}
|
|
9230
|
+
return /* @__PURE__ */ jsx(
|
|
9231
|
+
"div",
|
|
9232
|
+
{
|
|
9233
|
+
ref: (node) => {
|
|
9234
|
+
verticalItemRefs.current[index] = node;
|
|
9235
|
+
},
|
|
9236
|
+
role: "listitem",
|
|
9237
|
+
"aria-current": state2 === "active" ? "step" : void 0,
|
|
9238
|
+
className: cn(
|
|
9239
|
+
"relative flex w-full items-center overflow-hidden",
|
|
9240
|
+
isClickable && (canClickItem ? "cursor-pointer" : "cursor-default")
|
|
9241
|
+
),
|
|
9242
|
+
onMouseEnter: handleMouseEnter,
|
|
9243
|
+
onMouseLeave: handleMouseLeave,
|
|
9244
|
+
style: itemContainerStyle,
|
|
9245
|
+
children: labelBadge
|
|
9246
|
+
},
|
|
9247
|
+
itemValue
|
|
9248
|
+
);
|
|
9249
|
+
})
|
|
9250
|
+
]
|
|
9251
|
+
},
|
|
9252
|
+
`${groupKey}-${group.startIndex}`
|
|
9253
|
+
);
|
|
9254
|
+
})
|
|
9255
|
+
]
|
|
9256
|
+
}
|
|
9257
|
+
);
|
|
9258
|
+
}
|
|
8163
9259
|
return /* @__PURE__ */ jsx(
|
|
8164
9260
|
"div",
|
|
8165
9261
|
{
|
|
@@ -8173,43 +9269,8 @@ function SStepper({
|
|
|
8173
9269
|
...style
|
|
8174
9270
|
},
|
|
8175
9271
|
children: items.map((item, index) => {
|
|
8176
|
-
const state2 = getState(index);
|
|
8177
|
-
const
|
|
8178
|
-
gap: STEPPER_LAYOUT.itemGap,
|
|
8179
|
-
color: STEPPER_COLORS.text[state2],
|
|
8180
|
-
fontWeight: state2 === "active" ? config.fontWeightActive : config.fontWeightDefault
|
|
8181
|
-
};
|
|
8182
|
-
const sequenceStyle = {
|
|
8183
|
-
width: config.sequenceSize,
|
|
8184
|
-
height: config.sequenceSize,
|
|
8185
|
-
flexBasis: config.sequenceSize,
|
|
8186
|
-
borderRadius: STEPPER_LAYOUT.sequenceRadius,
|
|
8187
|
-
borderWidth: STEPPER_LAYOUT.sequenceBorderWidth,
|
|
8188
|
-
borderColor: STEPPER_COLORS.sequenceBorder[state2],
|
|
8189
|
-
background: STEPPER_COLORS.sequenceBg[state2],
|
|
8190
|
-
color: state2 === "completed" ? STEPPER_COLORS.text.completed : STEPPER_COLORS.sequenceText[state2]
|
|
8191
|
-
};
|
|
8192
|
-
const content = /* @__PURE__ */ jsxs(
|
|
8193
|
-
"span",
|
|
8194
|
-
{
|
|
8195
|
-
role: "listitem",
|
|
8196
|
-
"aria-current": state2 === "active" ? "step" : void 0,
|
|
8197
|
-
className: "inline-flex items-center whitespace-nowrap",
|
|
8198
|
-
style: itemStyle,
|
|
8199
|
-
children: [
|
|
8200
|
-
/* @__PURE__ */ jsx(
|
|
8201
|
-
"span",
|
|
8202
|
-
{
|
|
8203
|
-
"aria-hidden": true,
|
|
8204
|
-
className: "box-border inline-flex shrink-0 items-center justify-center border border-solid font-bold",
|
|
8205
|
-
style: sequenceStyle,
|
|
8206
|
-
children: state2 === "completed" ? /* @__PURE__ */ jsx(SIcon, { name: "check", size: STEPPER_LAYOUT.sequenceIcon, color: "currentColor" }) : index + 1
|
|
8207
|
-
}
|
|
8208
|
-
),
|
|
8209
|
-
/* @__PURE__ */ jsx("span", { children: item.label })
|
|
8210
|
-
]
|
|
8211
|
-
}
|
|
8212
|
-
);
|
|
9272
|
+
const state2 = getState(item, index);
|
|
9273
|
+
const content = isClickable ? /* @__PURE__ */ jsx("span", { role: "listitem", "aria-current": state2 === "active" ? "step" : void 0, children: renderClickableStepContent(item, index) }) : renderStepContent(item, index);
|
|
8213
9274
|
return /* @__PURE__ */ jsxs(
|
|
8214
9275
|
"span",
|
|
8215
9276
|
{
|
|
@@ -8248,7 +9309,7 @@ function SStepper({
|
|
|
8248
9309
|
})
|
|
8249
9310
|
}
|
|
8250
9311
|
);
|
|
8251
|
-
}
|
|
9312
|
+
});
|
|
8252
9313
|
function runRules(value, rules) {
|
|
8253
9314
|
if (!rules || rules.length === 0) return "";
|
|
8254
9315
|
for (const rule of rules) {
|
|
@@ -8566,7 +9627,7 @@ var SSelectImpl = /* @__PURE__ */ forwardRef(function SSelect({
|
|
|
8566
9627
|
}, [value]);
|
|
8567
9628
|
const selectedRef = useRef(selected);
|
|
8568
9629
|
selectedRef.current = selected;
|
|
8569
|
-
const
|
|
9630
|
+
const emit3 = (next) => {
|
|
8570
9631
|
if (!onValueChange) return;
|
|
8571
9632
|
const mapped = next.map(
|
|
8572
9633
|
(v) => emitValue ? rawByValue.get(v) ?? v : optionByValue.get(v) ?? { value: v, label: v }
|
|
@@ -8670,14 +9731,14 @@ var SSelectImpl = /* @__PURE__ */ forwardRef(function SSelect({
|
|
|
8670
9731
|
const handleSelect = (nextValue) => {
|
|
8671
9732
|
if (multi) {
|
|
8672
9733
|
const next = selected.includes(nextValue) ? selected.filter((v) => v !== nextValue) : [...selected, nextValue];
|
|
8673
|
-
|
|
9734
|
+
emit3(next);
|
|
8674
9735
|
return;
|
|
8675
9736
|
}
|
|
8676
|
-
|
|
9737
|
+
emit3([nextValue]);
|
|
8677
9738
|
commitOpen(false, [nextValue]);
|
|
8678
9739
|
};
|
|
8679
9740
|
const handleSelectAll = () => {
|
|
8680
|
-
|
|
9741
|
+
emit3(allSelected ? [] : allValues);
|
|
8681
9742
|
};
|
|
8682
9743
|
const handleToggleGroup = (leafValues) => {
|
|
8683
9744
|
if (leafValues.length === 0) return;
|
|
@@ -8685,9 +9746,9 @@ var SSelectImpl = /* @__PURE__ */ forwardRef(function SSelect({
|
|
|
8685
9746
|
const allSelectedInGroup = leafValues.every((v) => selectedSet.has(v));
|
|
8686
9747
|
if (allSelectedInGroup) {
|
|
8687
9748
|
const remove = new Set(leafValues);
|
|
8688
|
-
|
|
9749
|
+
emit3(selected.filter((v) => !remove.has(v)));
|
|
8689
9750
|
} else {
|
|
8690
|
-
|
|
9751
|
+
emit3([...selected, ...leafValues.filter((v) => !selectedSet.has(v))]);
|
|
8691
9752
|
}
|
|
8692
9753
|
};
|
|
8693
9754
|
useEffect(() => {
|
|
@@ -9764,6 +10825,9 @@ var STableBar = /* @__PURE__ */ forwardRef(function STableBar2({ total, selected
|
|
|
9764
10825
|
}
|
|
9765
10826
|
);
|
|
9766
10827
|
});
|
|
10828
|
+
|
|
10829
|
+
// src/lib/autofill.ts
|
|
10830
|
+
var AUTOFILL_RESET_CLASS = "autofill:[-webkit-text-fill-color:currentColor] autofill:[box-shadow:0_0_0_1000px_var(--sys-color-field-bg-default)_inset] autofill:[transition:background-color_5000s_ease-in-out_0s] [&:-webkit-autofill]:[-webkit-text-fill-color:currentColor] [&:-webkit-autofill]:[box-shadow:0_0_0_1000px_var(--sys-color-field-bg-default)_inset] [&:-webkit-autofill]:[transition:background-color_5000s_ease-in-out_0s]";
|
|
9767
10831
|
var FONT = {
|
|
9768
10832
|
sm: { fontSize: 12, lineHeight: 20, paddingX: "var(--cmp-textinput-sm-paddingX)" },
|
|
9769
10833
|
md: { fontSize: 14, lineHeight: 24, paddingX: "var(--cmp-textinput-md-paddingX)" }
|
|
@@ -9878,6 +10942,7 @@ var SInput = /* @__PURE__ */ forwardRef(function SInput2({
|
|
|
9878
10942
|
},
|
|
9879
10943
|
className: cn(
|
|
9880
10944
|
"h-full min-w-0 flex-1 border-0 bg-transparent p-0 outline-none placeholder:text-[color:var(--sys-color-field-text-placeholder)] disabled:cursor-not-allowed",
|
|
10945
|
+
AUTOFILL_RESET_CLASS,
|
|
9881
10946
|
inputClass
|
|
9882
10947
|
),
|
|
9883
10948
|
style: {
|
|
@@ -9916,7 +10981,7 @@ var SInput = /* @__PURE__ */ forwardRef(function SInput2({
|
|
|
9916
10981
|
}
|
|
9917
10982
|
);
|
|
9918
10983
|
});
|
|
9919
|
-
var
|
|
10984
|
+
var PAD2 = { fontSize: 12, paddingX: 12, paddingY: 4 };
|
|
9920
10985
|
var STextarea = /* @__PURE__ */ forwardRef(function STextarea2({
|
|
9921
10986
|
value,
|
|
9922
10987
|
onValueChange,
|
|
@@ -9948,7 +11013,7 @@ var STextarea = /* @__PURE__ */ forwardRef(function STextarea2({
|
|
|
9948
11013
|
style,
|
|
9949
11014
|
...rest
|
|
9950
11015
|
}, ref) {
|
|
9951
|
-
const p =
|
|
11016
|
+
const p = PAD2;
|
|
9952
11017
|
const [ruleError, setRuleError] = useState("");
|
|
9953
11018
|
useFormField({
|
|
9954
11019
|
name: rest.name,
|
|
@@ -10005,6 +11070,7 @@ var STextarea = /* @__PURE__ */ forwardRef(function STextarea2({
|
|
|
10005
11070
|
},
|
|
10006
11071
|
className: cn(
|
|
10007
11072
|
"w-full resize-y border-0 bg-transparent outline-none placeholder:text-[color:var(--sys-color-field-text-placeholder)] disabled:cursor-not-allowed",
|
|
11073
|
+
AUTOFILL_RESET_CLASS,
|
|
10008
11074
|
textareaClass
|
|
10009
11075
|
),
|
|
10010
11076
|
style: {
|
|
@@ -10021,7 +11087,7 @@ var STextarea = /* @__PURE__ */ forwardRef(function STextarea2({
|
|
|
10021
11087
|
}
|
|
10022
11088
|
);
|
|
10023
11089
|
});
|
|
10024
|
-
var
|
|
11090
|
+
var PAD3 = {
|
|
10025
11091
|
sm: { fontSize: 12, lineHeight: 20, stepper: 20, icon: 12 },
|
|
10026
11092
|
md: { fontSize: 14, lineHeight: 24, stepper: 24, icon: 14 }
|
|
10027
11093
|
};
|
|
@@ -10113,7 +11179,7 @@ var SNumberInput = /* @__PURE__ */ forwardRef(function SNumberInput2({
|
|
|
10113
11179
|
className,
|
|
10114
11180
|
style
|
|
10115
11181
|
}, ref) {
|
|
10116
|
-
const p =
|
|
11182
|
+
const p = PAD3[size];
|
|
10117
11183
|
const padX = `var(--cmp-numberInput-${size}-paddingX)`;
|
|
10118
11184
|
const decimalLimit = getDecimalLimit(useDecimal, maxDecimalLength);
|
|
10119
11185
|
const numValue = applyDecimalLimit(toNumber(value), decimalLimit);
|
|
@@ -10157,7 +11223,7 @@ var SNumberInput = /* @__PURE__ */ forwardRef(function SNumberInput2({
|
|
|
10157
11223
|
target.value = display;
|
|
10158
11224
|
restoreCaret(display, Math.min(logicalCaret, display.replace(/,/g, "").length));
|
|
10159
11225
|
};
|
|
10160
|
-
const
|
|
11226
|
+
const emit3 = (n, logicalCaret) => {
|
|
10161
11227
|
const next = applyDecimalLimit(n, decimalLimit);
|
|
10162
11228
|
const nextDisplay = formatWithCommas(next);
|
|
10163
11229
|
setDisplayWithCaret(nextDisplay, logicalCaret);
|
|
@@ -10169,13 +11235,13 @@ var SNumberInput = /* @__PURE__ */ forwardRef(function SNumberInput2({
|
|
|
10169
11235
|
if (incDisabled) return;
|
|
10170
11236
|
const cur = numValue ?? (min === Number.NEGATIVE_INFINITY ? 0 : min);
|
|
10171
11237
|
const next = applyDecimalLimit(Math.min(cur + step, max), decimalLimit);
|
|
10172
|
-
if (next !== cur)
|
|
11238
|
+
if (next !== cur) emit3(next);
|
|
10173
11239
|
};
|
|
10174
11240
|
const decrement = () => {
|
|
10175
11241
|
if (decDisabled) return;
|
|
10176
11242
|
const cur = numValue ?? (min === Number.NEGATIVE_INFINITY ? 0 : min);
|
|
10177
11243
|
const next = applyDecimalLimit(Math.max(cur - step, min), decimalLimit);
|
|
10178
|
-
if (next !== cur)
|
|
11244
|
+
if (next !== cur) emit3(next);
|
|
10179
11245
|
};
|
|
10180
11246
|
const handleInput = (event) => {
|
|
10181
11247
|
const target = event.currentTarget;
|
|
@@ -10318,7 +11384,7 @@ var SNumberInput = /* @__PURE__ */ forwardRef(function SNumberInput2({
|
|
|
10318
11384
|
const cleaned = display.replace(/,/g, "");
|
|
10319
11385
|
const n = toNumber(cleaned);
|
|
10320
11386
|
const clamped = n === null ? null : Math.min(Math.max(n, min), max);
|
|
10321
|
-
if (clamped !== n)
|
|
11387
|
+
if (clamped !== n) emit3(clamped);
|
|
10322
11388
|
else setDisplay(n === null ? "" : formatInputWithCommas(cleaned));
|
|
10323
11389
|
if (rules && rules.length > 0) setRuleError(runRules(clamped, rules));
|
|
10324
11390
|
onBlur?.(e);
|
|
@@ -10327,6 +11393,7 @@ var SNumberInput = /* @__PURE__ */ forwardRef(function SNumberInput2({
|
|
|
10327
11393
|
// h-full 대신 라인박스 높이 그대로 두어 prefix/suffix 와 동일하게 flex 로 수직 센터링
|
|
10328
11394
|
// (h-full 이면 input 내부 텍스트 센터링을 브라우저가 수행해 1px 어긋날 수 있음)
|
|
10329
11395
|
"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",
|
|
11396
|
+
AUTOFILL_RESET_CLASS,
|
|
10330
11397
|
inputClass
|
|
10331
11398
|
),
|
|
10332
11399
|
style: {
|
|
@@ -10927,7 +11994,7 @@ function RangeCalendar({
|
|
|
10927
11994
|
const inRange = (d) => !!(rStart && rEnd && d > rStart && d < rEnd);
|
|
10928
11995
|
const RANGE_BG = "var(--cmp-datepicker-calendar-range-bg)";
|
|
10929
11996
|
const pad = (v) => String(Number(v) || 0).padStart(2, "0");
|
|
10930
|
-
const
|
|
11997
|
+
const emit3 = (dateStart, dateEnd, time) => {
|
|
10931
11998
|
const t = time ?? { sH, sM, eH, eM };
|
|
10932
11999
|
const range = useTimePicker ? [`${dateStart} ${pad(t.sH)}:${pad(t.sM)}`, `${dateEnd} ${pad(t.eH)}:${pad(t.eM)}`] : [dateStart, dateEnd];
|
|
10933
12000
|
lastEmitted.current = JSON.stringify(range);
|
|
@@ -10950,7 +12017,7 @@ function RangeCalendar({
|
|
|
10950
12017
|
}
|
|
10951
12018
|
setEnd(d);
|
|
10952
12019
|
onPendingStartChange?.(null);
|
|
10953
|
-
|
|
12020
|
+
emit3(start, d, useTimePicker ? { sH, sM, eH: "23", eM: "59" } : void 0);
|
|
10954
12021
|
};
|
|
10955
12022
|
const changeTime = (which, part, raw) => {
|
|
10956
12023
|
const digits = raw.replace(/\D/g, "").slice(0, 2);
|
|
@@ -10963,7 +12030,7 @@ function RangeCalendar({
|
|
|
10963
12030
|
setSM(nextTime.sM);
|
|
10964
12031
|
setEH(nextTime.eH);
|
|
10965
12032
|
setEM(nextTime.eM);
|
|
10966
|
-
if (start && end)
|
|
12033
|
+
if (start && end) emit3(start, end, nextTime);
|
|
10967
12034
|
};
|
|
10968
12035
|
const blurTime = (which, part) => {
|
|
10969
12036
|
if (which === "start") {
|
|
@@ -11690,7 +12757,7 @@ function SKeyValueTable({
|
|
|
11690
12757
|
style
|
|
11691
12758
|
}) {
|
|
11692
12759
|
if (fields.length === 0) return null;
|
|
11693
|
-
const
|
|
12760
|
+
const emit3 = (name, value) => onChange?.({
|
|
11694
12761
|
name,
|
|
11695
12762
|
value,
|
|
11696
12763
|
values: { ...values, [name]: value }
|
|
@@ -11701,7 +12768,7 @@ function SKeyValueTable({
|
|
|
11701
12768
|
if (f.render) return f.render;
|
|
11702
12769
|
const opt = { ...f.options ?? {} };
|
|
11703
12770
|
if (Object.prototype.hasOwnProperty.call(values, f.name)) opt.value = values[f.name];
|
|
11704
|
-
const up = (v) =>
|
|
12771
|
+
const up = (v) => emit3(f.name, v);
|
|
11705
12772
|
switch (f.type) {
|
|
11706
12773
|
case "input":
|
|
11707
12774
|
return /* @__PURE__ */ jsx(SInput, { width: "100%", ...opt, onValueChange: up });
|
|
@@ -11790,7 +12857,7 @@ function SKeyValueTable({
|
|
|
11790
12857
|
children: /* @__PURE__ */ jsxs("div", { className: "flex h-full w-full items-center justify-between gap-[var(--cmp-table-header-gap)]", children: [
|
|
11791
12858
|
/* @__PURE__ */ jsxs("div", { className: "inline-flex items-center gap-[8px]", children: [
|
|
11792
12859
|
/* @__PURE__ */ jsx("span", { className: "text-[12px] font-bold leading-[20px] text-[color:var(--sys-color-fg-primary)]", children: f.label }),
|
|
11793
|
-
f.required && /* @__PURE__ */ jsx(SIcon, { name: "
|
|
12860
|
+
f.required && /* @__PURE__ */ jsx(SIcon, { name: "asterisk", size: 12, color: "var(--sys-color-fg-accent)" })
|
|
11794
12861
|
] }),
|
|
11795
12862
|
f.helpText && f.helpText.length > 0 && /* @__PURE__ */ jsx(
|
|
11796
12863
|
STooltip2,
|
|
@@ -12555,6 +13622,7 @@ var SChipInput = /* @__PURE__ */ forwardRef(function SChipInput2({
|
|
|
12555
13622
|
size: 1,
|
|
12556
13623
|
className: cn(
|
|
12557
13624
|
"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",
|
|
13625
|
+
AUTOFILL_RESET_CLASS,
|
|
12558
13626
|
size === "md" ? "text-14 leading-sd-24" : "text-12 leading-sd-20"
|
|
12559
13627
|
),
|
|
12560
13628
|
style: {
|
|
@@ -12847,6 +13915,7 @@ var SBarcodeInput = /* @__PURE__ */ forwardRef(
|
|
|
12847
13915
|
},
|
|
12848
13916
|
className: cn(
|
|
12849
13917
|
"h-full min-w-0 flex-1 border-0 bg-transparent p-0 outline-none placeholder:text-[color:var(--cmp-textinput-text-placeholder)] disabled:cursor-not-allowed",
|
|
13918
|
+
AUTOFILL_RESET_CLASS,
|
|
12850
13919
|
inputClass
|
|
12851
13920
|
),
|
|
12852
13921
|
style: {
|
|
@@ -13775,6 +14844,6 @@ function STimeRangePicker({
|
|
|
13775
14844
|
);
|
|
13776
14845
|
}
|
|
13777
14846
|
|
|
13778
|
-
export { BADGE_COLORS, BUTTON_COLORS, BUTTON_SIZES, COLOR_KEYS, GNB_COLORS, GNB_COMMON, GNB_FOLD_MS, GNB_FULL_LOGO_WIDTH, GNB_HEADER, GNB_MENU, GNB_MENU_WIDTH, GNB_RAIL, GNB_RAIL_WIDTH, ICONS, PAGE_BACKGROUNDS, SActionModal, SBadge, SBarcodeInput, SButton, SCROLL_AREA_AXES, SCalendar, SCallout, SCard, SCheckbox, SChip2 as SChip, SChipInput, SCircleProgress, SConfirmModal, SDatePicker, SDateRangePicker, SDivider, SDraggableGroup, SDraggableItem2 as SDraggableItem, SDraggableList, SDraggableProvider, SDrawer, SDropdownButton2 as SDropdownButton, SExpansionItem, SExpansionList2 as SExpansionList, SField, SFilePicker, SForm, SGhostButton, SGnb, SGuide, SIcon, SInput, SKeyValueTable, SLAYOUT_MIN_WIDTH, SLayout, SLayoutContext, SLinearProgress, SList2 as SList, SListItem2 as SListItem, SLoadingContainer, SLoadingModal, SLoadingViewport, SModal, SNumberInput, SPage, SPagination, SPopover, SPopup, SPortal, SRadio, SRadioButton, SRadioGroup, SScrollArea, SSectionHeaderCard2 as SSectionHeaderCard, SSelect2 as SSelect, SStepper, SSwitch, STEPPER_SIZES, STable, STableBar, STabs, STag, STextLink, STextarea, STimePicker, STimeRangePicker, SToast, SToastContainer, SToggle, STooltip2 as STooltip, STree2 as STree, STreeItem2 as STreeItem, TAG_COLORS, TAG_SHAPES, TAG_SIZES, TIMEPICKER_SIZES, TIMEPICKER_SIZE_CONFIG, buttonPreset, cn, findGnbAncestors, findGnbRailValue, isColorKey, loading, resolveColor, useSLayout };
|
|
14847
|
+
export { BADGE_COLORS, BUTTON_COLORS, BUTTON_SIZES, COLOR_KEYS, GNB_COLORS, GNB_COMMON, GNB_FOLD_MS, GNB_FULL_LOGO_WIDTH, GNB_HEADER, GNB_MENU, GNB_MENU_WIDTH, GNB_RAIL, GNB_RAIL_WIDTH, ICONS, PAGE_BACKGROUNDS, SActionModal, SBadge, SBarcodeInput, SButton, SCROLL_AREA_AXES, SCalendar, SCallout, SCard, SCheckbox, SChip2 as SChip, SChipInput, SCircleProgress, SConfirmModal, SDatePicker, SDateRangePicker, SDivider, SDraggableGroup, SDraggableItem2 as SDraggableItem, SDraggableList, SDraggableProvider, SDrawer, SDropdownButton2 as SDropdownButton, SExpansionItem, SExpansionList2 as SExpansionList, SField, SFilePicker, SForm, SGhostButton, SGnb, SGuide, SIcon, SInput, SKeyValueTable, SLAYOUT_MIN_WIDTH, SLayout, SLayoutContext, SLinearProgress, SList2 as SList, SListItem2 as SListItem, SLoadingContainer, SLoadingModal, SLoadingViewport, SModal, SModalOutlet, SNumberInput, SPage, SPagination, SPopover, SPopup, SPortal, SRadio, SRadioButton, SRadioGroup, SSPLITTER_UNITS, SScrollArea, SSectionHeaderCard2 as SSectionHeaderCard, SSelect2 as SSelect, SSplitter2 as SSplitter, SStepper, SSwitch, STEPPER_SIZES, STable, STableBar, STabs, STag, STextLink, STextarea, STimePicker, STimeRangePicker, SToast, SToastContainer, SToggle, STooltip2 as STooltip, STree2 as STree, STreeItem2 as STreeItem, TAG_COLORS, TAG_SHAPES, TAG_SIZES, TIMEPICKER_SIZES, TIMEPICKER_SIZE_CONFIG, buttonPreset, cn, findGnbAncestors, findGnbRailValue, isColorKey, loading, resolveColor, useSLayout };
|
|
13779
14848
|
//# sourceMappingURL=index.js.map
|
|
13780
14849
|
//# sourceMappingURL=index.js.map
|