@bestow-ui/react 1.3.0 → 1.4.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/README.md +9 -3
- package/dist/{chunk-VH7JW6N7.js → chunk-TIFI6ZQU.js} +18 -2
- package/dist/chunk-TIFI6ZQU.js.map +1 -0
- package/dist/client.js +421 -296
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +486 -330
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +52 -5
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +95 -9
- package/dist/index.d.ts +95 -9
- package/dist/shared.js +17 -1
- package/dist/shared.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-VH7JW6N7.js.map +0 -1
package/dist/client.js
CHANGED
|
@@ -18,11 +18,12 @@ import {
|
|
|
18
18
|
mergeThemes,
|
|
19
19
|
parseISODate,
|
|
20
20
|
phoneNumberMaxDigits,
|
|
21
|
+
presetRange,
|
|
21
22
|
themeClass,
|
|
22
23
|
themeToStyle,
|
|
23
24
|
toISODate,
|
|
24
25
|
visuallyHidden
|
|
25
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-TIFI6ZQU.js";
|
|
26
27
|
|
|
27
28
|
// src/theme/ThemeProvider.tsx
|
|
28
29
|
import { createContext, forwardRef, useContext, useMemo } from "react";
|
|
@@ -863,7 +864,7 @@ var AmountInput = /* @__PURE__ */ forwardRef11(
|
|
|
863
864
|
return digits;
|
|
864
865
|
};
|
|
865
866
|
const toRaw = (amount) => amount === null || amount === void 0 ? "" : String(Math.floor(Math.abs(amount)));
|
|
866
|
-
const
|
|
867
|
+
const field4 = useFormattedInput({
|
|
867
868
|
isControlled: "value" in props,
|
|
868
869
|
value: toRaw(value3),
|
|
869
870
|
defaultValue: toRaw(defaultValue),
|
|
@@ -873,7 +874,7 @@ var AmountInput = /* @__PURE__ */ forwardRef11(
|
|
|
873
874
|
isMeaningful: isDigit,
|
|
874
875
|
inputRef
|
|
875
876
|
});
|
|
876
|
-
const reading = showKoreanAmount &&
|
|
877
|
+
const reading = showKoreanAmount && field4.raw !== "" ? formatKoreanAmount(Number(field4.raw), unit2) : null;
|
|
877
878
|
return /* @__PURE__ */ jsx13(
|
|
878
879
|
TextField,
|
|
879
880
|
{
|
|
@@ -881,10 +882,10 @@ var AmountInput = /* @__PURE__ */ forwardRef11(
|
|
|
881
882
|
label: label6,
|
|
882
883
|
placeholder,
|
|
883
884
|
inputMode: "numeric",
|
|
884
|
-
value:
|
|
885
|
-
onChange:
|
|
885
|
+
value: field4.display,
|
|
886
|
+
onChange: field4.onChange,
|
|
886
887
|
onKeyDown: (event) => {
|
|
887
|
-
|
|
888
|
+
field4.onKeyDown(event);
|
|
888
889
|
onKeyDown?.(event);
|
|
889
890
|
},
|
|
890
891
|
endAdornment: unit2,
|
|
@@ -995,10 +996,10 @@ var separator = "_18t8ztt4";
|
|
|
995
996
|
|
|
996
997
|
// src/components/Breadcrumb/Breadcrumb.tsx
|
|
997
998
|
import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
998
|
-
var Breadcrumb = /* @__PURE__ */ forwardRef14(function Breadcrumb2({ items: items2, linkAs, separator:
|
|
999
|
+
var Breadcrumb = /* @__PURE__ */ forwardRef14(function Breadcrumb2({ items: items2, linkAs, separator: separator4, "aria-label": ariaLabelProp, className, ...rest }, ref) {
|
|
999
1000
|
const m = useMessages();
|
|
1000
1001
|
const ariaLabel = ariaLabelProp ?? m.breadcrumb ?? "\uC774\uB3D9 \uACBD\uB85C";
|
|
1001
|
-
const sep =
|
|
1002
|
+
const sep = separator4 ?? /* @__PURE__ */ jsx16(ChevronRightIcon, { size: 14 });
|
|
1002
1003
|
return /* @__PURE__ */ jsx16("nav", { ref, "aria-label": ariaLabel, className, ...rest, children: /* @__PURE__ */ jsx16("ol", { className: list2, children: items2.map((item9, index) => {
|
|
1003
1004
|
const isCurrent = index === items2.length - 1;
|
|
1004
1005
|
return /* @__PURE__ */ jsxs14("li", { className: item3, children: [
|
|
@@ -1035,7 +1036,7 @@ var BusinessNumberInput = /* @__PURE__ */ forwardRef15(
|
|
|
1035
1036
|
const label6 = labelProp ?? m.businessNumber ?? "\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638";
|
|
1036
1037
|
const incompleteText = m.businessNumberIncomplete ?? "10\uC790\uB9AC\uB97C \uBAA8\uB450 \uC785\uB825\uD574 \uC8FC\uC138\uC694.";
|
|
1037
1038
|
const [touched, setTouched] = useState4(false);
|
|
1038
|
-
const
|
|
1039
|
+
const field4 = useFormattedInput({
|
|
1039
1040
|
isControlled: "value" in props,
|
|
1040
1041
|
value: value3,
|
|
1041
1042
|
defaultValue,
|
|
@@ -1045,8 +1046,8 @@ var BusinessNumberInput = /* @__PURE__ */ forwardRef15(
|
|
|
1045
1046
|
isMeaningful: isDigit2,
|
|
1046
1047
|
inputRef
|
|
1047
1048
|
});
|
|
1048
|
-
const complete =
|
|
1049
|
-
const autoInvalid = validate &&
|
|
1049
|
+
const complete = field4.raw.length === 10;
|
|
1050
|
+
const autoInvalid = validate && field4.raw.length > 0 && (complete ? !isValidBusinessNumber(field4.raw) : touched);
|
|
1050
1051
|
const showAuto = autoInvalid && error === void 0;
|
|
1051
1052
|
return /* @__PURE__ */ jsx17(
|
|
1052
1053
|
TextField,
|
|
@@ -1055,10 +1056,10 @@ var BusinessNumberInput = /* @__PURE__ */ forwardRef15(
|
|
|
1055
1056
|
label: label6,
|
|
1056
1057
|
placeholder,
|
|
1057
1058
|
inputMode: "numeric",
|
|
1058
|
-
value:
|
|
1059
|
-
onChange:
|
|
1059
|
+
value: field4.display,
|
|
1060
|
+
onChange: field4.onChange,
|
|
1060
1061
|
onKeyDown: (event) => {
|
|
1061
|
-
|
|
1062
|
+
field4.onKeyDown(event);
|
|
1062
1063
|
onKeyDown?.(event);
|
|
1063
1064
|
},
|
|
1064
1065
|
onBlur: (event) => {
|
|
@@ -1680,7 +1681,7 @@ var DatePicker = /* @__PURE__ */ forwardRef19(
|
|
|
1680
1681
|
lastEmitted.current = iso;
|
|
1681
1682
|
onValueChange?.(iso);
|
|
1682
1683
|
};
|
|
1683
|
-
const
|
|
1684
|
+
const field4 = useFormattedInput({
|
|
1684
1685
|
isControlled: false,
|
|
1685
1686
|
value: void 0,
|
|
1686
1687
|
defaultValue: (isControlled ? value3 : defaultValue)?.replace(/\D/g, ""),
|
|
@@ -1693,8 +1694,8 @@ var DatePicker = /* @__PURE__ */ forwardRef19(
|
|
|
1693
1694
|
isMeaningful: isDigit3,
|
|
1694
1695
|
inputRef
|
|
1695
1696
|
});
|
|
1696
|
-
const textIso = toIso(
|
|
1697
|
-
const { setRaw } =
|
|
1697
|
+
const textIso = toIso(field4.raw);
|
|
1698
|
+
const { setRaw } = field4;
|
|
1698
1699
|
useEffect6(() => {
|
|
1699
1700
|
if (!isControlled) return;
|
|
1700
1701
|
const next = value3 ?? "";
|
|
@@ -1706,8 +1707,8 @@ var DatePicker = /* @__PURE__ */ forwardRef19(
|
|
|
1706
1707
|
setRaw(next.replace(/\D/g, ""));
|
|
1707
1708
|
}, [value3]);
|
|
1708
1709
|
const date = parseISODate(textIso);
|
|
1709
|
-
const complete =
|
|
1710
|
-
const autoError = complete ? !date ? invalidText : isUnavailable(date) ? unavailableText : null : touched &&
|
|
1710
|
+
const complete = field4.raw.length === 8;
|
|
1711
|
+
const autoError = complete ? !date ? invalidText : isUnavailable(date) ? unavailableText : null : touched && field4.raw.length > 0 ? incompleteText : null;
|
|
1711
1712
|
const showAuto = autoError !== null && error === void 0;
|
|
1712
1713
|
const selectedIso = date && !isUnavailable(date) ? textIso : "";
|
|
1713
1714
|
return /* @__PURE__ */ jsxs18(Fragment4, { children: [
|
|
@@ -1720,9 +1721,9 @@ var DatePicker = /* @__PURE__ */ forwardRef19(
|
|
|
1720
1721
|
placeholder,
|
|
1721
1722
|
inputMode: "numeric",
|
|
1722
1723
|
autoComplete: "off",
|
|
1723
|
-
value:
|
|
1724
|
-
onChange:
|
|
1725
|
-
onKeyDown:
|
|
1724
|
+
value: field4.display,
|
|
1725
|
+
onChange: field4.onChange,
|
|
1726
|
+
onKeyDown: field4.onKeyDown,
|
|
1726
1727
|
onBlur: () => setTouched(true),
|
|
1727
1728
|
error: error ?? autoError !== null,
|
|
1728
1729
|
helperText: showAuto ? autoError : helperText3,
|
|
@@ -1766,6 +1767,129 @@ var DatePicker = /* @__PURE__ */ forwardRef19(
|
|
|
1766
1767
|
}
|
|
1767
1768
|
);
|
|
1768
1769
|
|
|
1770
|
+
// src/components/DateRangePicker/DateRangePicker.tsx
|
|
1771
|
+
import { forwardRef as forwardRef20, useId as useId7, useState as useState8 } from "react";
|
|
1772
|
+
|
|
1773
|
+
// src/components/DateRangePicker/DateRangePicker.css.ts
|
|
1774
|
+
var field2 = "_17277dh3";
|
|
1775
|
+
var fields = "_17277dh2";
|
|
1776
|
+
var fieldset3 = "_17277dh0";
|
|
1777
|
+
var legend3 = "_17277dh1";
|
|
1778
|
+
var presets = "_17277dh5";
|
|
1779
|
+
var separator2 = "_17277dh4";
|
|
1780
|
+
|
|
1781
|
+
// src/components/DateRangePicker/DateRangePicker.tsx
|
|
1782
|
+
import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1783
|
+
var DateRangePicker = /* @__PURE__ */ forwardRef20(
|
|
1784
|
+
function DateRangePicker2(props, ref) {
|
|
1785
|
+
const {
|
|
1786
|
+
value: value3,
|
|
1787
|
+
defaultValue,
|
|
1788
|
+
onValueChange,
|
|
1789
|
+
label: label6,
|
|
1790
|
+
startLabel: startLabelProp,
|
|
1791
|
+
endLabel: endLabelProp,
|
|
1792
|
+
presets: presets2,
|
|
1793
|
+
min,
|
|
1794
|
+
max,
|
|
1795
|
+
isDateDisabled,
|
|
1796
|
+
isHoliday,
|
|
1797
|
+
today,
|
|
1798
|
+
helperText: helperText3,
|
|
1799
|
+
error,
|
|
1800
|
+
required,
|
|
1801
|
+
disabled,
|
|
1802
|
+
startName,
|
|
1803
|
+
endName,
|
|
1804
|
+
id,
|
|
1805
|
+
className
|
|
1806
|
+
} = props;
|
|
1807
|
+
const m = useMessages();
|
|
1808
|
+
const generatedId = useId7();
|
|
1809
|
+
const baseId = id ?? generatedId;
|
|
1810
|
+
const helperId = helperText3 ? `${baseId}-helper` : void 0;
|
|
1811
|
+
const isClient = useIsClient();
|
|
1812
|
+
const isControlled = "value" in props;
|
|
1813
|
+
const [inner, setInner] = useState8(defaultValue ?? { start: "", end: "" });
|
|
1814
|
+
const range3 = isControlled ? value3 ?? { start: "", end: "" } : inner;
|
|
1815
|
+
const update = (next) => {
|
|
1816
|
+
if (next.start === range3.start && next.end === range3.end) return;
|
|
1817
|
+
if (!isControlled) setInner(next);
|
|
1818
|
+
onValueChange?.(next);
|
|
1819
|
+
};
|
|
1820
|
+
const todayIso = () => today ?? toISODate(/* @__PURE__ */ new Date());
|
|
1821
|
+
const startLabel = startLabelProp ?? m.dateRangeStart ?? "\uC2DC\uC791\uC77C";
|
|
1822
|
+
const endLabel = endLabelProp ?? m.dateRangeEnd ?? "\uC885\uB8CC\uC77C";
|
|
1823
|
+
const common = { isDateDisabled, isHoliday, today, disabled, required, fullWidth: true };
|
|
1824
|
+
return /* @__PURE__ */ jsxs19(
|
|
1825
|
+
"fieldset",
|
|
1826
|
+
{
|
|
1827
|
+
ref,
|
|
1828
|
+
id,
|
|
1829
|
+
className: cx(fieldset3, className),
|
|
1830
|
+
"aria-describedby": helperId,
|
|
1831
|
+
"data-invalid": error || void 0,
|
|
1832
|
+
children: [
|
|
1833
|
+
label6 && /* @__PURE__ */ jsxs19("legend", { className: legend3, children: [
|
|
1834
|
+
label6,
|
|
1835
|
+
required && /* @__PURE__ */ jsx23("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
1836
|
+
] }),
|
|
1837
|
+
/* @__PURE__ */ jsxs19("div", { className: fields, children: [
|
|
1838
|
+
/* @__PURE__ */ jsx23("div", { className: field2, children: /* @__PURE__ */ jsx23(
|
|
1839
|
+
DatePicker,
|
|
1840
|
+
{
|
|
1841
|
+
...common,
|
|
1842
|
+
id: `${baseId}-start`,
|
|
1843
|
+
label: startLabel,
|
|
1844
|
+
value: range3.start,
|
|
1845
|
+
onValueChange: (start) => update({ ...range3, start }),
|
|
1846
|
+
min,
|
|
1847
|
+
max: range3.end || max,
|
|
1848
|
+
name: startName,
|
|
1849
|
+
error: error || void 0
|
|
1850
|
+
}
|
|
1851
|
+
) }),
|
|
1852
|
+
/* @__PURE__ */ jsx23("span", { className: separator2, "aria-hidden": true, children: "~" }),
|
|
1853
|
+
/* @__PURE__ */ jsx23("div", { className: field2, children: /* @__PURE__ */ jsx23(
|
|
1854
|
+
DatePicker,
|
|
1855
|
+
{
|
|
1856
|
+
...common,
|
|
1857
|
+
id: `${baseId}-end`,
|
|
1858
|
+
label: endLabel,
|
|
1859
|
+
value: range3.end,
|
|
1860
|
+
onValueChange: (end2) => update({ ...range3, end: end2 }),
|
|
1861
|
+
min: range3.start || min,
|
|
1862
|
+
max,
|
|
1863
|
+
name: endName,
|
|
1864
|
+
error: error || void 0
|
|
1865
|
+
}
|
|
1866
|
+
) })
|
|
1867
|
+
] }),
|
|
1868
|
+
presets2 && presets2.length > 0 && /* @__PURE__ */ jsx23("div", { role: "group", "aria-label": m.dateRangePresets ?? "\uBE60\uB978 \uC120\uD0DD", className: presets, children: presets2.map((preset) => {
|
|
1869
|
+
const target = isClient ? presetRange(preset, todayIso()) : null;
|
|
1870
|
+
const pressed = !!target && target.start === range3.start && target.end === range3.end;
|
|
1871
|
+
return /* @__PURE__ */ jsx23(
|
|
1872
|
+
Button,
|
|
1873
|
+
{
|
|
1874
|
+
type: "button",
|
|
1875
|
+
size: "sm",
|
|
1876
|
+
variant: pressed ? "soft" : "outline",
|
|
1877
|
+
color: pressed ? "primary" : "neutral",
|
|
1878
|
+
"aria-pressed": pressed,
|
|
1879
|
+
disabled,
|
|
1880
|
+
onClick: () => update(presetRange(preset, todayIso())),
|
|
1881
|
+
children: preset.label
|
|
1882
|
+
},
|
|
1883
|
+
preset.label
|
|
1884
|
+
);
|
|
1885
|
+
}) }),
|
|
1886
|
+
helperText3 && /* @__PURE__ */ jsx23("p", { id: helperId, className: helperText({ error }), children: helperText3 })
|
|
1887
|
+
]
|
|
1888
|
+
}
|
|
1889
|
+
);
|
|
1890
|
+
}
|
|
1891
|
+
);
|
|
1892
|
+
|
|
1769
1893
|
// src/components/Drawer/Drawer.tsx
|
|
1770
1894
|
import * as Dialog2 from "@radix-ui/react-dialog";
|
|
1771
1895
|
import { XIcon as XIcon5 } from "@bestow-ui/icons";
|
|
@@ -1783,7 +1907,7 @@ var overlay2 = "nmobyv0";
|
|
|
1783
1907
|
var title4 = "nmobyvv";
|
|
1784
1908
|
|
|
1785
1909
|
// src/components/Drawer/Drawer.tsx
|
|
1786
|
-
import { jsx as
|
|
1910
|
+
import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1787
1911
|
function Drawer({
|
|
1788
1912
|
open,
|
|
1789
1913
|
defaultOpen,
|
|
@@ -1802,11 +1926,11 @@ function Drawer({
|
|
|
1802
1926
|
const portal2 = usePortalProps();
|
|
1803
1927
|
const m = useMessages();
|
|
1804
1928
|
const focus = useReturnFocus(Boolean(trigger4));
|
|
1805
|
-
return /* @__PURE__ */
|
|
1806
|
-
trigger4 && /* @__PURE__ */
|
|
1807
|
-
/* @__PURE__ */
|
|
1808
|
-
/* @__PURE__ */
|
|
1809
|
-
/* @__PURE__ */
|
|
1929
|
+
return /* @__PURE__ */ jsxs20(Dialog2.Root, { open, defaultOpen, onOpenChange, children: [
|
|
1930
|
+
trigger4 && /* @__PURE__ */ jsx24(Dialog2.Trigger, { asChild: true, children: trigger4 }),
|
|
1931
|
+
/* @__PURE__ */ jsxs20(Dialog2.Portal, { children: [
|
|
1932
|
+
/* @__PURE__ */ jsx24(Dialog2.Overlay, { className: cx(portal2.className, overlay2), style: portal2.style }),
|
|
1933
|
+
/* @__PURE__ */ jsxs20(
|
|
1810
1934
|
Dialog2.Content,
|
|
1811
1935
|
{
|
|
1812
1936
|
className: cx(portal2.className, content8({ side, size }), className),
|
|
@@ -1817,15 +1941,15 @@ function Drawer({
|
|
|
1817
1941
|
onCloseAutoFocus: focus.onCloseAutoFocus,
|
|
1818
1942
|
...description7 ? {} : { "aria-describedby": void 0 },
|
|
1819
1943
|
children: [
|
|
1820
|
-
/* @__PURE__ */
|
|
1821
|
-
/* @__PURE__ */
|
|
1822
|
-
/* @__PURE__ */
|
|
1823
|
-
description7 && /* @__PURE__ */
|
|
1944
|
+
/* @__PURE__ */ jsxs20("div", { className: header5, children: [
|
|
1945
|
+
/* @__PURE__ */ jsxs20("div", { className: headings2, children: [
|
|
1946
|
+
/* @__PURE__ */ jsx24(Dialog2.Title, { className: title4, children: title6 }),
|
|
1947
|
+
description7 && /* @__PURE__ */ jsx24(Dialog2.Description, { className: description3, children: description7 })
|
|
1824
1948
|
] }),
|
|
1825
|
-
!hideCloseButton && /* @__PURE__ */
|
|
1949
|
+
!hideCloseButton && /* @__PURE__ */ jsx24(Dialog2.Close, { asChild: true, children: /* @__PURE__ */ jsx24(IconButton, { "aria-label": m.close ?? "\uB2EB\uAE30", size: "sm", className: closeButton4, children: /* @__PURE__ */ jsx24(XIcon5, {}) }) })
|
|
1826
1950
|
] }),
|
|
1827
|
-
children && /* @__PURE__ */
|
|
1828
|
-
footer5 && /* @__PURE__ */
|
|
1951
|
+
children && /* @__PURE__ */ jsx24("div", { className: body2, children }),
|
|
1952
|
+
footer5 && /* @__PURE__ */ jsx24("div", { className: footer2, children: footer5 })
|
|
1829
1953
|
]
|
|
1830
1954
|
}
|
|
1831
1955
|
)
|
|
@@ -1835,7 +1959,7 @@ function Drawer({
|
|
|
1835
1959
|
var DrawerClose = Dialog2.Close;
|
|
1836
1960
|
|
|
1837
1961
|
// src/components/ErrorSummary/ErrorSummary.tsx
|
|
1838
|
-
import { forwardRef as
|
|
1962
|
+
import { forwardRef as forwardRef21, useEffect as useEffect7, useId as useId8, useRef as useRef10 } from "react";
|
|
1839
1963
|
|
|
1840
1964
|
// src/components/ErrorSummary/ErrorSummary.css.ts
|
|
1841
1965
|
var link3 = "_1cdophv2";
|
|
@@ -1843,17 +1967,17 @@ var list3 = "_1cdophv1";
|
|
|
1843
1967
|
var root7 = "_1cdophv0";
|
|
1844
1968
|
|
|
1845
1969
|
// src/components/ErrorSummary/ErrorSummary.tsx
|
|
1846
|
-
import { jsx as
|
|
1847
|
-
var ErrorSummary = /* @__PURE__ */
|
|
1970
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1971
|
+
var ErrorSummary = /* @__PURE__ */ forwardRef21(function ErrorSummary2({ errors: errors2, title: title6, focusKey, className, ...rest }, ref) {
|
|
1848
1972
|
const m = useMessages();
|
|
1849
|
-
const titleId =
|
|
1973
|
+
const titleId = useId8();
|
|
1850
1974
|
const rootRef = useRef10(null);
|
|
1851
1975
|
const hasErrors = errors2.length > 0;
|
|
1852
1976
|
useEffect7(() => {
|
|
1853
1977
|
if (hasErrors) rootRef.current?.focus();
|
|
1854
1978
|
}, [focusKey, hasErrors]);
|
|
1855
1979
|
if (!hasErrors) return null;
|
|
1856
|
-
return /* @__PURE__ */
|
|
1980
|
+
return /* @__PURE__ */ jsx25(
|
|
1857
1981
|
"div",
|
|
1858
1982
|
{
|
|
1859
1983
|
ref: mergeRefs(ref, rootRef),
|
|
@@ -1861,12 +1985,12 @@ var ErrorSummary = /* @__PURE__ */ forwardRef20(function ErrorSummary2({ errors:
|
|
|
1861
1985
|
"aria-labelledby": titleId,
|
|
1862
1986
|
className: cx(root7, className),
|
|
1863
1987
|
...rest,
|
|
1864
|
-
children: /* @__PURE__ */
|
|
1988
|
+
children: /* @__PURE__ */ jsx25(
|
|
1865
1989
|
Alert,
|
|
1866
1990
|
{
|
|
1867
1991
|
color: "danger",
|
|
1868
|
-
title: /* @__PURE__ */
|
|
1869
|
-
children: /* @__PURE__ */
|
|
1992
|
+
title: /* @__PURE__ */ jsx25("span", { id: titleId, children: title6 ?? m.errorSummaryTitle?.(errors2.length) ?? `\uC785\uB825\uD55C \uB0B4\uC6A9\uC5D0 \uACE0\uCE60 \uACF3\uC774 ${errors2.length}\uAC1C \uC788\uC5B4\uC694` }),
|
|
1993
|
+
children: /* @__PURE__ */ jsx25("ul", { className: list3, children: errors2.map((error) => /* @__PURE__ */ jsx25("li", { children: /* @__PURE__ */ jsx25(
|
|
1870
1994
|
"a",
|
|
1871
1995
|
{
|
|
1872
1996
|
href: `#${error.id}`,
|
|
@@ -1884,7 +2008,7 @@ var ErrorSummary = /* @__PURE__ */ forwardRef20(function ErrorSummary2({ errors:
|
|
|
1884
2008
|
});
|
|
1885
2009
|
|
|
1886
2010
|
// src/components/FileUpload/FileUpload.tsx
|
|
1887
|
-
import { forwardRef as
|
|
2011
|
+
import { forwardRef as forwardRef22, useEffect as useEffect8, useId as useId9, useRef as useRef11, useState as useState9 } from "react";
|
|
1888
2012
|
import { FileIcon, UploadIcon, XIcon as XIcon6 } from "@bestow-ui/icons";
|
|
1889
2013
|
|
|
1890
2014
|
// src/components/FileUpload/FileUpload.css.ts
|
|
@@ -1900,7 +2024,7 @@ var list4 = "r2jefr4";
|
|
|
1900
2024
|
var root8 = "r2jefr0";
|
|
1901
2025
|
|
|
1902
2026
|
// src/components/FileUpload/FileUpload.tsx
|
|
1903
|
-
import { jsx as
|
|
2027
|
+
import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1904
2028
|
function formatSize(bytes) {
|
|
1905
2029
|
if (bytes < 1024) return `${bytes} B`;
|
|
1906
2030
|
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(bytes < 10 * 1024 ? 1 : 0)} KB`;
|
|
@@ -1916,7 +2040,7 @@ function matchesAccept(file, accept) {
|
|
|
1916
2040
|
}
|
|
1917
2041
|
var NO_FILES = [];
|
|
1918
2042
|
var sameFile = (a, b) => a.name === b.name && a.size === b.size && a.lastModified === b.lastModified;
|
|
1919
|
-
var FileUpload = /* @__PURE__ */
|
|
2043
|
+
var FileUpload = /* @__PURE__ */ forwardRef22(function FileUpload2(props, ref) {
|
|
1920
2044
|
const {
|
|
1921
2045
|
value: value3,
|
|
1922
2046
|
defaultValue,
|
|
@@ -1937,12 +2061,12 @@ var FileUpload = /* @__PURE__ */ forwardRef21(function FileUpload2(props, ref) {
|
|
|
1937
2061
|
} = props;
|
|
1938
2062
|
const m = useMessages();
|
|
1939
2063
|
const isControlled = "value" in props;
|
|
1940
|
-
const [innerFiles, setInnerFiles] =
|
|
2064
|
+
const [innerFiles, setInnerFiles] = useState9(defaultValue ?? []);
|
|
1941
2065
|
const files = isControlled ? value3 ?? NO_FILES : innerFiles;
|
|
1942
|
-
const [rejections, setRejections] =
|
|
1943
|
-
const [announcement, setAnnouncement] =
|
|
1944
|
-
const [dragging, setDragging] =
|
|
1945
|
-
const generatedId =
|
|
2066
|
+
const [rejections, setRejections] = useState9([]);
|
|
2067
|
+
const [announcement, setAnnouncement] = useState9("");
|
|
2068
|
+
const [dragging, setDragging] = useState9(false);
|
|
2069
|
+
const generatedId = useId9();
|
|
1946
2070
|
const baseId = id ?? generatedId;
|
|
1947
2071
|
const labelId = label6 ? `${baseId}-label` : void 0;
|
|
1948
2072
|
const helperId = helperText3 ? `${baseId}-helper` : void 0;
|
|
@@ -2013,12 +2137,12 @@ var FileUpload = /* @__PURE__ */ forwardRef21(function FileUpload2(props, ref) {
|
|
|
2013
2137
|
event.preventDefault();
|
|
2014
2138
|
setDragging(over);
|
|
2015
2139
|
};
|
|
2016
|
-
return /* @__PURE__ */
|
|
2017
|
-
label6 && /* @__PURE__ */
|
|
2140
|
+
return /* @__PURE__ */ jsxs21("div", { ref, className: cx(field, root8, className), children: [
|
|
2141
|
+
label6 && /* @__PURE__ */ jsxs21("span", { id: labelId, className: label, children: [
|
|
2018
2142
|
label6,
|
|
2019
|
-
required && /* @__PURE__ */
|
|
2143
|
+
required && /* @__PURE__ */ jsx26("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
2020
2144
|
] }),
|
|
2021
|
-
/* @__PURE__ */
|
|
2145
|
+
/* @__PURE__ */ jsxs21(
|
|
2022
2146
|
"div",
|
|
2023
2147
|
{
|
|
2024
2148
|
role: "group",
|
|
@@ -2038,8 +2162,8 @@ var FileUpload = /* @__PURE__ */ forwardRef21(function FileUpload2(props, ref) {
|
|
|
2038
2162
|
if (!disabled) addFiles(Array.from(event.dataTransfer.files));
|
|
2039
2163
|
},
|
|
2040
2164
|
children: [
|
|
2041
|
-
/* @__PURE__ */
|
|
2042
|
-
/* @__PURE__ */
|
|
2165
|
+
/* @__PURE__ */ jsx26("span", { className: dropIcon, "aria-hidden": true, children: /* @__PURE__ */ jsx26(UploadIcon, { size: 24 }) }),
|
|
2166
|
+
/* @__PURE__ */ jsx26(
|
|
2043
2167
|
Button,
|
|
2044
2168
|
{
|
|
2045
2169
|
ref: selectButtonRef,
|
|
@@ -2052,8 +2176,8 @@ var FileUpload = /* @__PURE__ */ forwardRef21(function FileUpload2(props, ref) {
|
|
|
2052
2176
|
children: selectLabel
|
|
2053
2177
|
}
|
|
2054
2178
|
),
|
|
2055
|
-
/* @__PURE__ */
|
|
2056
|
-
/* @__PURE__ */
|
|
2179
|
+
/* @__PURE__ */ jsx26("span", { className: dropHint, children: m.fileDropHint ?? "\uB610\uB294 \uC5EC\uAE30\uB85C \uB04C\uC5B4\uB2E4 \uB193\uC73C\uC138\uC694" }),
|
|
2180
|
+
/* @__PURE__ */ jsx26(
|
|
2057
2181
|
"input",
|
|
2058
2182
|
{
|
|
2059
2183
|
ref: inputRef,
|
|
@@ -2076,11 +2200,11 @@ var FileUpload = /* @__PURE__ */ forwardRef21(function FileUpload2(props, ref) {
|
|
|
2076
2200
|
]
|
|
2077
2201
|
}
|
|
2078
2202
|
),
|
|
2079
|
-
files.length > 0 && /* @__PURE__ */
|
|
2080
|
-
/* @__PURE__ */
|
|
2081
|
-
/* @__PURE__ */
|
|
2082
|
-
/* @__PURE__ */
|
|
2083
|
-
/* @__PURE__ */
|
|
2203
|
+
files.length > 0 && /* @__PURE__ */ jsx26("ul", { "aria-label": m.fileList ?? "\uC120\uD0DD\uD55C \uD30C\uC77C", className: list4, children: files.map((file, index) => /* @__PURE__ */ jsxs21("li", { className: item5, children: [
|
|
2204
|
+
/* @__PURE__ */ jsx26("span", { className: fileIcon, "aria-hidden": true, children: /* @__PURE__ */ jsx26(FileIcon, { size: 16 }) }),
|
|
2205
|
+
/* @__PURE__ */ jsx26("span", { className: fileName, children: file.name }),
|
|
2206
|
+
/* @__PURE__ */ jsx26("span", { className: fileSize, children: formatSize(file.size) }),
|
|
2207
|
+
/* @__PURE__ */ jsx26(
|
|
2084
2208
|
IconButton,
|
|
2085
2209
|
{
|
|
2086
2210
|
ref: (node) => {
|
|
@@ -2090,20 +2214,20 @@ var FileUpload = /* @__PURE__ */ forwardRef21(function FileUpload2(props, ref) {
|
|
|
2090
2214
|
"aria-label": m.fileRemove?.(file.name) ?? `${file.name} \uC0AD\uC81C`,
|
|
2091
2215
|
disabled,
|
|
2092
2216
|
onClick: () => removeAt(index),
|
|
2093
|
-
children: /* @__PURE__ */
|
|
2217
|
+
children: /* @__PURE__ */ jsx26(XIcon6, {})
|
|
2094
2218
|
}
|
|
2095
2219
|
)
|
|
2096
2220
|
] }, `${file.name}-${file.size}-${file.lastModified}`)) }),
|
|
2097
|
-
rejections.length > 0 && /* @__PURE__ */
|
|
2098
|
-
helperText3 && /* @__PURE__ */
|
|
2099
|
-
/* @__PURE__ */
|
|
2221
|
+
rejections.length > 0 && /* @__PURE__ */ jsx26("ul", { id: errorsId, className: errors, children: [...new Set(rejections.map(reasonText))].map((text3) => /* @__PURE__ */ jsx26("li", { children: text3 }, text3)) }),
|
|
2222
|
+
helperText3 && /* @__PURE__ */ jsx26("p", { id: helperId, className: helperText({ error }), children: helperText3 }),
|
|
2223
|
+
/* @__PURE__ */ jsx26("div", { role: "status", className: visuallyHidden, children: announcement })
|
|
2100
2224
|
] });
|
|
2101
2225
|
});
|
|
2102
2226
|
|
|
2103
2227
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
2104
2228
|
import * as RadixMenu from "@radix-ui/react-dropdown-menu";
|
|
2105
2229
|
import { CheckIcon as CheckIcon2, ChevronRightIcon as ChevronRightIcon3, MinusIcon } from "@bestow-ui/icons";
|
|
2106
|
-
import { forwardRef as
|
|
2230
|
+
import { forwardRef as forwardRef23 } from "react";
|
|
2107
2231
|
|
|
2108
2232
|
// src/components/DropdownMenu/DropdownMenu.css.ts
|
|
2109
2233
|
var content9 = "_1d7ahux0";
|
|
@@ -2114,20 +2238,20 @@ var indicatorInner = "_1d7ahux8";
|
|
|
2114
2238
|
var item6 = "_1d7ahux1";
|
|
2115
2239
|
var label2 = "_1d7ahux5";
|
|
2116
2240
|
var radioDot = "_1d7ahux9";
|
|
2117
|
-
var
|
|
2241
|
+
var separator3 = "_1d7ahux6";
|
|
2118
2242
|
var shortcut = "_1d7ahux4";
|
|
2119
2243
|
var subChevron = "_1d7ahuxb";
|
|
2120
2244
|
var subTrigger = "_1d7ahuxa";
|
|
2121
2245
|
|
|
2122
2246
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
2123
|
-
import { jsx as
|
|
2247
|
+
import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2124
2248
|
var DropdownMenu = RadixMenu.Root;
|
|
2125
2249
|
var DropdownMenuTrigger = RadixMenu.Trigger;
|
|
2126
2250
|
var DropdownMenuGroup = RadixMenu.Group;
|
|
2127
|
-
var DropdownMenuContent = /* @__PURE__ */
|
|
2251
|
+
var DropdownMenuContent = /* @__PURE__ */ forwardRef23(
|
|
2128
2252
|
function DropdownMenuContent2({ className, style, side = "bottom", align = "start", sideOffset = 4, collisionPadding = 8, ...rest }, ref) {
|
|
2129
2253
|
const portal2 = usePortalProps();
|
|
2130
|
-
return /* @__PURE__ */
|
|
2254
|
+
return /* @__PURE__ */ jsx27(RadixMenu.Portal, { children: /* @__PURE__ */ jsx27(
|
|
2131
2255
|
RadixMenu.Content,
|
|
2132
2256
|
{
|
|
2133
2257
|
ref,
|
|
@@ -2142,56 +2266,56 @@ var DropdownMenuContent = /* @__PURE__ */ forwardRef22(
|
|
|
2142
2266
|
) });
|
|
2143
2267
|
}
|
|
2144
2268
|
);
|
|
2145
|
-
var DropdownMenuItem = /* @__PURE__ */
|
|
2269
|
+
var DropdownMenuItem = /* @__PURE__ */ forwardRef23(
|
|
2146
2270
|
function DropdownMenuItem2({ icon: icon6, shortcut: shortcut2, color = "neutral", className, children, ...rest }, ref) {
|
|
2147
|
-
return /* @__PURE__ */
|
|
2148
|
-
icon6 && /* @__PURE__ */
|
|
2271
|
+
return /* @__PURE__ */ jsxs22(RadixMenu.Item, { ref, className: cx(item6, color === "danger" && danger, className), ...rest, children: [
|
|
2272
|
+
icon6 && /* @__PURE__ */ jsx27("span", { className: icon4, "aria-hidden": true, children: icon6 }),
|
|
2149
2273
|
children,
|
|
2150
|
-
shortcut2 && /* @__PURE__ */
|
|
2274
|
+
shortcut2 && /* @__PURE__ */ jsx27("span", { className: shortcut, "aria-hidden": true, children: shortcut2 })
|
|
2151
2275
|
] });
|
|
2152
2276
|
}
|
|
2153
2277
|
);
|
|
2154
|
-
var DropdownMenuLabel = /* @__PURE__ */
|
|
2278
|
+
var DropdownMenuLabel = /* @__PURE__ */ forwardRef23(
|
|
2155
2279
|
function DropdownMenuLabel2({ className, ...rest }, ref) {
|
|
2156
|
-
return /* @__PURE__ */
|
|
2280
|
+
return /* @__PURE__ */ jsx27(RadixMenu.Label, { ref, className: cx(label2, className), ...rest });
|
|
2157
2281
|
}
|
|
2158
2282
|
);
|
|
2159
|
-
var DropdownMenuSeparator = /* @__PURE__ */
|
|
2283
|
+
var DropdownMenuSeparator = /* @__PURE__ */ forwardRef23(
|
|
2160
2284
|
function DropdownMenuSeparator2({ className, ...rest }, ref) {
|
|
2161
|
-
return /* @__PURE__ */
|
|
2285
|
+
return /* @__PURE__ */ jsx27(RadixMenu.Separator, { ref, className: cx(separator3, className), ...rest });
|
|
2162
2286
|
}
|
|
2163
2287
|
);
|
|
2164
|
-
var DropdownMenuCheckboxItem = /* @__PURE__ */
|
|
2288
|
+
var DropdownMenuCheckboxItem = /* @__PURE__ */ forwardRef23(
|
|
2165
2289
|
function DropdownMenuCheckboxItem2({ className, children, ...rest }, ref) {
|
|
2166
|
-
return /* @__PURE__ */
|
|
2167
|
-
/* @__PURE__ */
|
|
2290
|
+
return /* @__PURE__ */ jsxs22(RadixMenu.CheckboxItem, { ref, className: cx(item6, className), ...rest, children: [
|
|
2291
|
+
/* @__PURE__ */ jsx27("span", { className: indicator, "aria-hidden": true, children: /* @__PURE__ */ jsx27(RadixMenu.ItemIndicator, { className: indicatorInner, children: rest.checked === "indeterminate" ? /* @__PURE__ */ jsx27(MinusIcon, { size: 16 }) : /* @__PURE__ */ jsx27(CheckIcon2, { size: 16 }) }) }),
|
|
2168
2292
|
children
|
|
2169
2293
|
] });
|
|
2170
2294
|
}
|
|
2171
2295
|
);
|
|
2172
2296
|
var DropdownMenuRadioGroup = RadixMenu.RadioGroup;
|
|
2173
|
-
var DropdownMenuRadioItem = /* @__PURE__ */
|
|
2297
|
+
var DropdownMenuRadioItem = /* @__PURE__ */ forwardRef23(
|
|
2174
2298
|
function DropdownMenuRadioItem2({ className, children, ...rest }, ref) {
|
|
2175
|
-
return /* @__PURE__ */
|
|
2176
|
-
/* @__PURE__ */
|
|
2299
|
+
return /* @__PURE__ */ jsxs22(RadixMenu.RadioItem, { ref, className: cx(item6, className), ...rest, children: [
|
|
2300
|
+
/* @__PURE__ */ jsx27("span", { className: indicator, "aria-hidden": true, children: /* @__PURE__ */ jsx27(RadixMenu.ItemIndicator, { className: indicatorInner, children: /* @__PURE__ */ jsx27("span", { className: radioDot }) }) }),
|
|
2177
2301
|
children
|
|
2178
2302
|
] });
|
|
2179
2303
|
}
|
|
2180
2304
|
);
|
|
2181
2305
|
var DropdownMenuSub = RadixMenu.Sub;
|
|
2182
|
-
var DropdownMenuSubTrigger = /* @__PURE__ */
|
|
2306
|
+
var DropdownMenuSubTrigger = /* @__PURE__ */ forwardRef23(
|
|
2183
2307
|
function DropdownMenuSubTrigger2({ icon: icon6, className, children, ...rest }, ref) {
|
|
2184
|
-
return /* @__PURE__ */
|
|
2185
|
-
icon6 && /* @__PURE__ */
|
|
2308
|
+
return /* @__PURE__ */ jsxs22(RadixMenu.SubTrigger, { ref, className: cx(item6, subTrigger, className), ...rest, children: [
|
|
2309
|
+
icon6 && /* @__PURE__ */ jsx27("span", { className: icon4, "aria-hidden": true, children: icon6 }),
|
|
2186
2310
|
children,
|
|
2187
|
-
/* @__PURE__ */
|
|
2311
|
+
/* @__PURE__ */ jsx27("span", { className: subChevron, "aria-hidden": true, children: /* @__PURE__ */ jsx27(ChevronRightIcon3, { size: 16 }) })
|
|
2188
2312
|
] });
|
|
2189
2313
|
}
|
|
2190
2314
|
);
|
|
2191
|
-
var DropdownMenuSubContent = /* @__PURE__ */
|
|
2315
|
+
var DropdownMenuSubContent = /* @__PURE__ */ forwardRef23(
|
|
2192
2316
|
function DropdownMenuSubContent2({ className, style, sideOffset = 4, alignOffset = -5, collisionPadding = 8, ...rest }, ref) {
|
|
2193
2317
|
const portal2 = usePortalProps();
|
|
2194
|
-
return /* @__PURE__ */
|
|
2318
|
+
return /* @__PURE__ */ jsx27(RadixMenu.Portal, { children: /* @__PURE__ */ jsx27(
|
|
2195
2319
|
RadixMenu.SubContent,
|
|
2196
2320
|
{
|
|
2197
2321
|
ref,
|
|
@@ -2207,7 +2331,7 @@ var DropdownMenuSubContent = /* @__PURE__ */ forwardRef22(
|
|
|
2207
2331
|
);
|
|
2208
2332
|
|
|
2209
2333
|
// src/components/NumberInput/NumberInput.tsx
|
|
2210
|
-
import { forwardRef as
|
|
2334
|
+
import { forwardRef as forwardRef24, useEffect as useEffect9, useId as useId10, useRef as useRef12 } from "react";
|
|
2211
2335
|
import { MinusIcon as MinusIcon2, PlusIcon } from "@bestow-ui/icons";
|
|
2212
2336
|
|
|
2213
2337
|
// src/components/NumberInput/NumberInput.css.ts
|
|
@@ -2218,12 +2342,12 @@ var stepper = /* @__PURE__ */ _7a46811({ defaultClassName: "_1vq2qhv3", variantC
|
|
|
2218
2342
|
var unit = "_1vq2qhv2";
|
|
2219
2343
|
|
|
2220
2344
|
// src/components/NumberInput/NumberInput.tsx
|
|
2221
|
-
import { Fragment as Fragment5, jsx as
|
|
2345
|
+
import { Fragment as Fragment5, jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2222
2346
|
var MAX_DIGITS2 = 15;
|
|
2223
2347
|
var isMeaningful = (char) => /[\d.-]/.test(char);
|
|
2224
2348
|
var decimalsOf = (n) => Number.isFinite(n) ? String(n).split(".")[1]?.length ?? 0 : 0;
|
|
2225
2349
|
var parse = (raw) => /\d/.test(raw) ? Number(raw) : null;
|
|
2226
|
-
var NumberInput = /* @__PURE__ */
|
|
2350
|
+
var NumberInput = /* @__PURE__ */ forwardRef24(
|
|
2227
2351
|
function NumberInput2(props, ref) {
|
|
2228
2352
|
const {
|
|
2229
2353
|
value: value3,
|
|
@@ -2250,7 +2374,7 @@ var NumberInput = /* @__PURE__ */ forwardRef23(
|
|
|
2250
2374
|
const isControlled = "value" in props;
|
|
2251
2375
|
const m = useMessages();
|
|
2252
2376
|
const inputRef = useRef12(null);
|
|
2253
|
-
const generatedId =
|
|
2377
|
+
const generatedId = useId10();
|
|
2254
2378
|
const inputId = id ?? generatedId;
|
|
2255
2379
|
const precision = Math.max(0, precisionProp ?? decimalsOf(step2));
|
|
2256
2380
|
const allowNegative = min === void 0 || min < 0;
|
|
@@ -2276,7 +2400,7 @@ var NumberInput = /* @__PURE__ */ forwardRef23(
|
|
|
2276
2400
|
lastEmitted.current = next;
|
|
2277
2401
|
onValueChange?.(next);
|
|
2278
2402
|
};
|
|
2279
|
-
const
|
|
2403
|
+
const field4 = useFormattedInput({
|
|
2280
2404
|
isControlled: false,
|
|
2281
2405
|
value: void 0,
|
|
2282
2406
|
defaultValue: toRaw(isControlled ? value3 : defaultValue),
|
|
@@ -2286,14 +2410,14 @@ var NumberInput = /* @__PURE__ */ forwardRef23(
|
|
|
2286
2410
|
isMeaningful,
|
|
2287
2411
|
inputRef
|
|
2288
2412
|
});
|
|
2289
|
-
const { setRaw } =
|
|
2413
|
+
const { setRaw } = field4;
|
|
2290
2414
|
useEffect9(() => {
|
|
2291
2415
|
if (!isControlled) return;
|
|
2292
2416
|
const next = value3 ?? null;
|
|
2293
2417
|
lastEmitted.current = next;
|
|
2294
|
-
if (parse(
|
|
2418
|
+
if (parse(field4.raw) !== next) setRaw(toRaw(next));
|
|
2295
2419
|
}, [value3]);
|
|
2296
|
-
const current2 = parse(
|
|
2420
|
+
const current2 = parse(field4.raw);
|
|
2297
2421
|
const setValue = (next) => {
|
|
2298
2422
|
setRaw(toRaw(next));
|
|
2299
2423
|
emit(next);
|
|
@@ -2323,10 +2447,10 @@ var NumberInput = /* @__PURE__ */ forwardRef23(
|
|
|
2323
2447
|
event.preventDefault();
|
|
2324
2448
|
setValue(max);
|
|
2325
2449
|
} else {
|
|
2326
|
-
|
|
2450
|
+
field4.onKeyDown(event);
|
|
2327
2451
|
}
|
|
2328
2452
|
};
|
|
2329
|
-
const stepper2 = (direction) => /* @__PURE__ */
|
|
2453
|
+
const stepper2 = (direction) => /* @__PURE__ */ jsx28(
|
|
2330
2454
|
IconButton,
|
|
2331
2455
|
{
|
|
2332
2456
|
size: "sm",
|
|
@@ -2337,11 +2461,11 @@ var NumberInput = /* @__PURE__ */ forwardRef23(
|
|
|
2337
2461
|
onMouseDown: (event) => event.preventDefault(),
|
|
2338
2462
|
onClick: () => stepBy(direction * step2),
|
|
2339
2463
|
className: stepper({ size }),
|
|
2340
|
-
children: direction < 0 ? /* @__PURE__ */
|
|
2464
|
+
children: direction < 0 ? /* @__PURE__ */ jsx28(MinusIcon2, {}) : /* @__PURE__ */ jsx28(PlusIcon, {})
|
|
2341
2465
|
}
|
|
2342
2466
|
);
|
|
2343
|
-
return /* @__PURE__ */
|
|
2344
|
-
/* @__PURE__ */
|
|
2467
|
+
return /* @__PURE__ */ jsxs23(Fragment5, { children: [
|
|
2468
|
+
/* @__PURE__ */ jsx28(
|
|
2345
2469
|
TextField,
|
|
2346
2470
|
{
|
|
2347
2471
|
ref: mergeRefs(ref, inputRef),
|
|
@@ -2352,35 +2476,35 @@ var NumberInput = /* @__PURE__ */ forwardRef23(
|
|
|
2352
2476
|
"aria-valuenow": current2 ?? void 0,
|
|
2353
2477
|
"aria-valuemin": min,
|
|
2354
2478
|
"aria-valuemax": max,
|
|
2355
|
-
"aria-valuetext": current2 === null ? void 0 : `${
|
|
2356
|
-
value:
|
|
2357
|
-
onChange:
|
|
2479
|
+
"aria-valuetext": current2 === null ? void 0 : `${field4.display}${unit2 ?? ""}`,
|
|
2480
|
+
value: field4.display,
|
|
2481
|
+
onChange: field4.onChange,
|
|
2358
2482
|
onKeyDown: handleKeyDown,
|
|
2359
2483
|
onBlur: (event) => {
|
|
2360
2484
|
if (current2 !== null && clamp(current2) !== current2) setValue(clamp(current2));
|
|
2361
|
-
else if (current2 === null &&
|
|
2485
|
+
else if (current2 === null && field4.raw !== "") setRaw("");
|
|
2362
2486
|
onBlur?.(event);
|
|
2363
2487
|
},
|
|
2364
2488
|
size,
|
|
2365
2489
|
disabled,
|
|
2366
2490
|
readOnly,
|
|
2367
2491
|
startAdornment: hideStepper ? void 0 : stepper2(-1),
|
|
2368
|
-
endAdornment: unit2 || !hideStepper ? /* @__PURE__ */
|
|
2369
|
-
unit2 && /* @__PURE__ */
|
|
2492
|
+
endAdornment: unit2 || !hideStepper ? /* @__PURE__ */ jsxs23("span", { className: end, children: [
|
|
2493
|
+
unit2 && /* @__PURE__ */ jsx28("span", { className: unit, children: unit2 }),
|
|
2370
2494
|
!hideStepper && stepper2(1)
|
|
2371
2495
|
] }) : void 0,
|
|
2372
2496
|
className: cx(input4, className),
|
|
2373
2497
|
...rest
|
|
2374
2498
|
}
|
|
2375
2499
|
),
|
|
2376
|
-
name && /* @__PURE__ */
|
|
2500
|
+
name && /* @__PURE__ */ jsx28("input", { type: "hidden", name, value: current2 === null ? "" : String(current2) })
|
|
2377
2501
|
] });
|
|
2378
2502
|
}
|
|
2379
2503
|
);
|
|
2380
2504
|
|
|
2381
2505
|
// src/components/Pagination/Pagination.tsx
|
|
2382
2506
|
import { ChevronLeftIcon as ChevronLeftIcon2, ChevronRightIcon as ChevronRightIcon4 } from "@bestow-ui/icons";
|
|
2383
|
-
import { forwardRef as
|
|
2507
|
+
import { forwardRef as forwardRef25, useState as useState10 } from "react";
|
|
2384
2508
|
|
|
2385
2509
|
// src/components/Pagination/getPaginationItems.ts
|
|
2386
2510
|
var range = (start, end2) => end2 < start ? [] : Array.from({ length: end2 - start + 1 }, (_, i) => start + i);
|
|
@@ -2413,8 +2537,8 @@ var item7 = /* @__PURE__ */ _7a46812({ defaultClassName: "_1iraoak1", variantCla
|
|
|
2413
2537
|
var list5 = "_1iraoak0";
|
|
2414
2538
|
|
|
2415
2539
|
// src/components/Pagination/Pagination.tsx
|
|
2416
|
-
import { jsx as
|
|
2417
|
-
var Pagination = /* @__PURE__ */
|
|
2540
|
+
import { jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2541
|
+
var Pagination = /* @__PURE__ */ forwardRef25(function Pagination2({
|
|
2418
2542
|
totalPages,
|
|
2419
2543
|
page: pageProp,
|
|
2420
2544
|
defaultPage = 1,
|
|
@@ -2427,7 +2551,7 @@ var Pagination = /* @__PURE__ */ forwardRef24(function Pagination2({
|
|
|
2427
2551
|
"aria-label": ariaLabelProp,
|
|
2428
2552
|
...rest
|
|
2429
2553
|
}, ref) {
|
|
2430
|
-
const [uncontrolledPage, setUncontrolledPage] =
|
|
2554
|
+
const [uncontrolledPage, setUncontrolledPage] = useState10(defaultPage);
|
|
2431
2555
|
const m = useMessages();
|
|
2432
2556
|
const ariaLabel = ariaLabelProp ?? m.pagination ?? "\uD398\uC774\uC9C0 \uD0D0\uC0C9";
|
|
2433
2557
|
const getItemLabel = getItemLabelProp ?? ((type, n) => type === "previous" ? m.paginationPrevious ?? "\uC774\uC804 \uD398\uC774\uC9C0" : type === "next" ? m.paginationNext ?? "\uB2E4\uC74C \uD398\uC774\uC9C0" : m.paginationPage?.(n) ?? `${n} \uD398\uC774\uC9C0`);
|
|
@@ -2439,8 +2563,8 @@ var Pagination = /* @__PURE__ */ forwardRef24(function Pagination2({
|
|
|
2439
2563
|
onPageChange?.(next);
|
|
2440
2564
|
};
|
|
2441
2565
|
const itemClass = item7({ size });
|
|
2442
|
-
return /* @__PURE__ */
|
|
2443
|
-
/* @__PURE__ */
|
|
2566
|
+
return /* @__PURE__ */ jsx29("nav", { ref, "aria-label": ariaLabel, className, ...rest, children: /* @__PURE__ */ jsxs24("ul", { className: list5, children: [
|
|
2567
|
+
/* @__PURE__ */ jsx29("li", { children: /* @__PURE__ */ jsx29(
|
|
2444
2568
|
"button",
|
|
2445
2569
|
{
|
|
2446
2570
|
type: "button",
|
|
@@ -2448,11 +2572,11 @@ var Pagination = /* @__PURE__ */ forwardRef24(function Pagination2({
|
|
|
2448
2572
|
"aria-label": getItemLabel("previous", page - 1),
|
|
2449
2573
|
disabled: page <= 1,
|
|
2450
2574
|
onClick: () => goTo(page - 1),
|
|
2451
|
-
children: /* @__PURE__ */
|
|
2575
|
+
children: /* @__PURE__ */ jsx29(ChevronLeftIcon2, { size: 16 })
|
|
2452
2576
|
}
|
|
2453
2577
|
) }),
|
|
2454
2578
|
getPaginationItems(page, totalPages, siblingCount, boundaryCount).map(
|
|
2455
|
-
(item9) => typeof item9 === "number" ? /* @__PURE__ */
|
|
2579
|
+
(item9) => typeof item9 === "number" ? /* @__PURE__ */ jsx29("li", { children: /* @__PURE__ */ jsx29(
|
|
2456
2580
|
"button",
|
|
2457
2581
|
{
|
|
2458
2582
|
type: "button",
|
|
@@ -2462,9 +2586,9 @@ var Pagination = /* @__PURE__ */ forwardRef24(function Pagination2({
|
|
|
2462
2586
|
onClick: () => goTo(item9),
|
|
2463
2587
|
children: item9
|
|
2464
2588
|
}
|
|
2465
|
-
) }, item9) : /* @__PURE__ */
|
|
2589
|
+
) }, item9) : /* @__PURE__ */ jsx29("li", { "aria-hidden": true, className: cx(itemClass, ellipsis), children: "\u2026" }, item9)
|
|
2466
2590
|
),
|
|
2467
|
-
/* @__PURE__ */
|
|
2591
|
+
/* @__PURE__ */ jsx29("li", { children: /* @__PURE__ */ jsx29(
|
|
2468
2592
|
"button",
|
|
2469
2593
|
{
|
|
2470
2594
|
type: "button",
|
|
@@ -2472,21 +2596,21 @@ var Pagination = /* @__PURE__ */ forwardRef24(function Pagination2({
|
|
|
2472
2596
|
"aria-label": getItemLabel("next", page + 1),
|
|
2473
2597
|
disabled: page >= totalPages,
|
|
2474
2598
|
onClick: () => goTo(page + 1),
|
|
2475
|
-
children: /* @__PURE__ */
|
|
2599
|
+
children: /* @__PURE__ */ jsx29(ChevronRightIcon4, { size: 16 })
|
|
2476
2600
|
}
|
|
2477
2601
|
) })
|
|
2478
2602
|
] }) });
|
|
2479
2603
|
});
|
|
2480
2604
|
|
|
2481
2605
|
// src/components/PhoneNumberInput/PhoneNumberInput.tsx
|
|
2482
|
-
import { forwardRef as
|
|
2483
|
-
import { jsx as
|
|
2606
|
+
import { forwardRef as forwardRef26, useRef as useRef13 } from "react";
|
|
2607
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
2484
2608
|
var sanitize3 = (input6) => {
|
|
2485
2609
|
const digits = input6.replace(/\D/g, "");
|
|
2486
2610
|
return digits.slice(0, phoneNumberMaxDigits(digits));
|
|
2487
2611
|
};
|
|
2488
2612
|
var isDigit4 = (char) => /\d/.test(char);
|
|
2489
|
-
var PhoneNumberInput = /* @__PURE__ */
|
|
2613
|
+
var PhoneNumberInput = /* @__PURE__ */ forwardRef26(
|
|
2490
2614
|
function PhoneNumberInput2(props, ref) {
|
|
2491
2615
|
const {
|
|
2492
2616
|
value: value3,
|
|
@@ -2500,7 +2624,7 @@ var PhoneNumberInput = /* @__PURE__ */ forwardRef25(
|
|
|
2500
2624
|
const inputRef = useRef13(null);
|
|
2501
2625
|
const m = useMessages();
|
|
2502
2626
|
const label6 = labelProp ?? m.phoneNumber ?? "\uD734\uB300\uD3F0 \uBC88\uD638";
|
|
2503
|
-
const
|
|
2627
|
+
const field4 = useFormattedInput({
|
|
2504
2628
|
isControlled: "value" in props,
|
|
2505
2629
|
value: value3,
|
|
2506
2630
|
defaultValue,
|
|
@@ -2510,7 +2634,7 @@ var PhoneNumberInput = /* @__PURE__ */ forwardRef25(
|
|
|
2510
2634
|
isMeaningful: isDigit4,
|
|
2511
2635
|
inputRef
|
|
2512
2636
|
});
|
|
2513
|
-
return /* @__PURE__ */
|
|
2637
|
+
return /* @__PURE__ */ jsx30(
|
|
2514
2638
|
TextField,
|
|
2515
2639
|
{
|
|
2516
2640
|
ref: mergeRefs(ref, inputRef),
|
|
@@ -2519,10 +2643,10 @@ var PhoneNumberInput = /* @__PURE__ */ forwardRef25(
|
|
|
2519
2643
|
type: "tel",
|
|
2520
2644
|
inputMode: "tel",
|
|
2521
2645
|
autoComplete: "tel-national",
|
|
2522
|
-
value:
|
|
2523
|
-
onChange:
|
|
2646
|
+
value: field4.display,
|
|
2647
|
+
onChange: field4.onChange,
|
|
2524
2648
|
onKeyDown: (event) => {
|
|
2525
|
-
|
|
2649
|
+
field4.onKeyDown(event);
|
|
2526
2650
|
onKeyDown?.(event);
|
|
2527
2651
|
},
|
|
2528
2652
|
...rest
|
|
@@ -2532,7 +2656,7 @@ var PhoneNumberInput = /* @__PURE__ */ forwardRef25(
|
|
|
2532
2656
|
);
|
|
2533
2657
|
|
|
2534
2658
|
// src/components/RadioGroup/RadioGroup.tsx
|
|
2535
|
-
import { forwardRef as
|
|
2659
|
+
import { forwardRef as forwardRef27, useId as useId11, useState as useState11 } from "react";
|
|
2536
2660
|
|
|
2537
2661
|
// src/components/RadioGroup/RadioGroup.css.ts
|
|
2538
2662
|
import { createRuntimeFn as _7a46813 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
@@ -2545,8 +2669,8 @@ var radio = /* @__PURE__ */ _7a46813({ defaultClassName: "_1w9iwjm7", variantCla
|
|
|
2545
2669
|
var text = "_1w9iwjma";
|
|
2546
2670
|
|
|
2547
2671
|
// src/components/RadioGroup/RadioGroup.tsx
|
|
2548
|
-
import { jsx as
|
|
2549
|
-
var RadioGroup2 = /* @__PURE__ */
|
|
2672
|
+
import { jsx as jsx31, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2673
|
+
var RadioGroup2 = /* @__PURE__ */ forwardRef27(function RadioGroup3(props, ref) {
|
|
2550
2674
|
const {
|
|
2551
2675
|
options,
|
|
2552
2676
|
value: value3,
|
|
@@ -2565,9 +2689,9 @@ var RadioGroup2 = /* @__PURE__ */ forwardRef26(function RadioGroup3(props, ref)
|
|
|
2565
2689
|
className
|
|
2566
2690
|
} = props;
|
|
2567
2691
|
const isControlled = "value" in props;
|
|
2568
|
-
const [innerValue, setInnerValue] =
|
|
2692
|
+
const [innerValue, setInnerValue] = useState11(defaultValue ?? "");
|
|
2569
2693
|
const current2 = isControlled ? value3 ?? "" : innerValue;
|
|
2570
|
-
const generatedId =
|
|
2694
|
+
const generatedId = useId11();
|
|
2571
2695
|
const baseId = id ?? generatedId;
|
|
2572
2696
|
const labelId = label6 ? `${baseId}-label` : void 0;
|
|
2573
2697
|
const helperId = helperText3 ? `${baseId}-helper` : void 0;
|
|
@@ -2578,12 +2702,12 @@ var RadioGroup2 = /* @__PURE__ */ forwardRef26(function RadioGroup3(props, ref)
|
|
|
2578
2702
|
if (!isControlled) setInnerValue(next);
|
|
2579
2703
|
onValueChange?.(next);
|
|
2580
2704
|
};
|
|
2581
|
-
return /* @__PURE__ */
|
|
2582
|
-
label6 && /* @__PURE__ */
|
|
2705
|
+
return /* @__PURE__ */ jsxs25("div", { className: cx(field, className), children: [
|
|
2706
|
+
label6 && /* @__PURE__ */ jsxs25("span", { id: labelId, className: cx(label, groupLabel), children: [
|
|
2583
2707
|
label6,
|
|
2584
|
-
required && /* @__PURE__ */
|
|
2708
|
+
required && /* @__PURE__ */ jsx31("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
2585
2709
|
] }),
|
|
2586
|
-
/* @__PURE__ */
|
|
2710
|
+
/* @__PURE__ */ jsx31(
|
|
2587
2711
|
"div",
|
|
2588
2712
|
{
|
|
2589
2713
|
ref,
|
|
@@ -2601,8 +2725,8 @@ var RadioGroup2 = /* @__PURE__ */ forwardRef26(function RadioGroup3(props, ref)
|
|
|
2601
2725
|
const descriptionId = option2.description ? `${itemId}-description` : void 0;
|
|
2602
2726
|
const itemDisabled = disabled || option2.disabled;
|
|
2603
2727
|
const checked = option2.value === current2;
|
|
2604
|
-
return /* @__PURE__ */
|
|
2605
|
-
/* @__PURE__ */
|
|
2728
|
+
return /* @__PURE__ */ jsxs25("div", { className: option({ size }), "data-disabled": itemDisabled || void 0, children: [
|
|
2729
|
+
/* @__PURE__ */ jsx31(
|
|
2606
2730
|
"input",
|
|
2607
2731
|
{
|
|
2608
2732
|
type: "radio",
|
|
@@ -2619,20 +2743,20 @@ var RadioGroup2 = /* @__PURE__ */ forwardRef26(function RadioGroup3(props, ref)
|
|
|
2619
2743
|
className: radio({ size })
|
|
2620
2744
|
}
|
|
2621
2745
|
),
|
|
2622
|
-
/* @__PURE__ */
|
|
2623
|
-
/* @__PURE__ */
|
|
2624
|
-
option2.description && /* @__PURE__ */
|
|
2746
|
+
/* @__PURE__ */ jsxs25("span", { className: text, children: [
|
|
2747
|
+
/* @__PURE__ */ jsx31("label", { htmlFor: itemId, className: labelText, children: option2.label }),
|
|
2748
|
+
option2.description && /* @__PURE__ */ jsx31("span", { id: descriptionId, className: description4, children: option2.description })
|
|
2625
2749
|
] })
|
|
2626
2750
|
] }, option2.value);
|
|
2627
2751
|
})
|
|
2628
2752
|
}
|
|
2629
2753
|
),
|
|
2630
|
-
helperText3 && /* @__PURE__ */
|
|
2754
|
+
helperText3 && /* @__PURE__ */ jsx31("p", { id: helperId, className: helperText({ error }), children: helperText3 })
|
|
2631
2755
|
] });
|
|
2632
2756
|
});
|
|
2633
2757
|
|
|
2634
2758
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
2635
|
-
import { forwardRef as
|
|
2759
|
+
import { forwardRef as forwardRef28, useId as useId12, useRef as useRef14, useState as useState12 } from "react";
|
|
2636
2760
|
|
|
2637
2761
|
// src/components/SegmentedControl/SegmentedControl.css.ts
|
|
2638
2762
|
import { createRuntimeFn as _7a46814 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
@@ -2641,9 +2765,9 @@ var item8 = /* @__PURE__ */ _7a46814({ defaultClassName: "_1h65mmo2", variantCla
|
|
|
2641
2765
|
var root9 = /* @__PURE__ */ _7a46814({ defaultClassName: "_1h65mmo0", variantClassNames: { fullWidth: { true: "_1h65mmo1" } }, defaultVariants: {}, compoundVariants: [] });
|
|
2642
2766
|
|
|
2643
2767
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
2644
|
-
import { jsx as
|
|
2768
|
+
import { jsx as jsx32, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2645
2769
|
var NEXT_KEYS = { ArrowRight: 1, ArrowDown: 1, ArrowLeft: -1, ArrowUp: -1 };
|
|
2646
|
-
var SegmentedControl = /* @__PURE__ */
|
|
2770
|
+
var SegmentedControl = /* @__PURE__ */ forwardRef28(
|
|
2647
2771
|
function SegmentedControl2(props, ref) {
|
|
2648
2772
|
const {
|
|
2649
2773
|
options,
|
|
@@ -2660,9 +2784,9 @@ var SegmentedControl = /* @__PURE__ */ forwardRef27(
|
|
|
2660
2784
|
className
|
|
2661
2785
|
} = props;
|
|
2662
2786
|
const isControlled = "value" in props;
|
|
2663
|
-
const [innerValue, setInnerValue] =
|
|
2787
|
+
const [innerValue, setInnerValue] = useState12(defaultValue ?? "");
|
|
2664
2788
|
const current2 = isControlled ? value3 ?? "" : innerValue;
|
|
2665
|
-
const generatedId =
|
|
2789
|
+
const generatedId = useId12();
|
|
2666
2790
|
const labelId = label6 ? `${id ?? generatedId}-label` : void 0;
|
|
2667
2791
|
const itemRefs = useRef14([]);
|
|
2668
2792
|
const isEnabled = (index) => !disabled && !options[index]?.disabled;
|
|
@@ -2695,7 +2819,7 @@ var SegmentedControl = /* @__PURE__ */ forwardRef27(
|
|
|
2695
2819
|
itemRefs.current[target]?.focus();
|
|
2696
2820
|
select(target);
|
|
2697
2821
|
};
|
|
2698
|
-
const group = /* @__PURE__ */
|
|
2822
|
+
const group = /* @__PURE__ */ jsxs26(
|
|
2699
2823
|
"div",
|
|
2700
2824
|
{
|
|
2701
2825
|
ref,
|
|
@@ -2708,7 +2832,7 @@ var SegmentedControl = /* @__PURE__ */ forwardRef27(
|
|
|
2708
2832
|
children: [
|
|
2709
2833
|
options.map((option2, index) => {
|
|
2710
2834
|
const checked = index === checkedIndex;
|
|
2711
|
-
return /* @__PURE__ */
|
|
2835
|
+
return /* @__PURE__ */ jsxs26(
|
|
2712
2836
|
"button",
|
|
2713
2837
|
{
|
|
2714
2838
|
ref: (node) => {
|
|
@@ -2725,20 +2849,20 @@ var SegmentedControl = /* @__PURE__ */ forwardRef27(
|
|
|
2725
2849
|
onClick: () => select(index),
|
|
2726
2850
|
onKeyDown: (event) => handleKeyDown(event, index),
|
|
2727
2851
|
children: [
|
|
2728
|
-
option2.icon && /* @__PURE__ */
|
|
2852
|
+
option2.icon && /* @__PURE__ */ jsx32("span", { "aria-hidden": true, className: icon5, children: option2.icon }),
|
|
2729
2853
|
option2.label
|
|
2730
2854
|
]
|
|
2731
2855
|
},
|
|
2732
2856
|
option2.value
|
|
2733
2857
|
);
|
|
2734
2858
|
}),
|
|
2735
|
-
name && /* @__PURE__ */
|
|
2859
|
+
name && /* @__PURE__ */ jsx32("input", { type: "hidden", name, value: current2 })
|
|
2736
2860
|
]
|
|
2737
2861
|
}
|
|
2738
2862
|
);
|
|
2739
2863
|
if (!label6) return group;
|
|
2740
|
-
return /* @__PURE__ */
|
|
2741
|
-
/* @__PURE__ */
|
|
2864
|
+
return /* @__PURE__ */ jsxs26("div", { className: cx(field, className), children: [
|
|
2865
|
+
/* @__PURE__ */ jsx32("span", { id: labelId, className: label, children: label6 }),
|
|
2742
2866
|
group
|
|
2743
2867
|
] });
|
|
2744
2868
|
}
|
|
@@ -2746,10 +2870,10 @@ var SegmentedControl = /* @__PURE__ */ forwardRef27(
|
|
|
2746
2870
|
|
|
2747
2871
|
// src/components/Select/Select.tsx
|
|
2748
2872
|
import * as RadixSelect from "@radix-ui/react-select";
|
|
2749
|
-
import { forwardRef as
|
|
2873
|
+
import { forwardRef as forwardRef29, useId as useId13 } from "react";
|
|
2750
2874
|
import { CheckIcon as CheckIcon3, ChevronDownIcon as ChevronDownIcon4 } from "@bestow-ui/icons";
|
|
2751
|
-
import { jsx as
|
|
2752
|
-
var Select = /* @__PURE__ */
|
|
2875
|
+
import { jsx as jsx33, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2876
|
+
var Select = /* @__PURE__ */ forwardRef29(function Select2(props, ref) {
|
|
2753
2877
|
const {
|
|
2754
2878
|
options,
|
|
2755
2879
|
value: value3,
|
|
@@ -2769,16 +2893,16 @@ var Select = /* @__PURE__ */ forwardRef28(function Select2(props, ref) {
|
|
|
2769
2893
|
className
|
|
2770
2894
|
} = props;
|
|
2771
2895
|
const isControlled = "value" in props;
|
|
2772
|
-
const generatedId =
|
|
2896
|
+
const generatedId = useId13();
|
|
2773
2897
|
const triggerId = id ?? generatedId;
|
|
2774
2898
|
const helperId = helperText3 ? `${triggerId}-helper` : void 0;
|
|
2775
2899
|
const portal2 = usePortalProps();
|
|
2776
|
-
return /* @__PURE__ */
|
|
2777
|
-
label6 && /* @__PURE__ */
|
|
2900
|
+
return /* @__PURE__ */ jsxs27("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
|
|
2901
|
+
label6 && /* @__PURE__ */ jsxs27("label", { htmlFor: triggerId, className: label, children: [
|
|
2778
2902
|
label6,
|
|
2779
|
-
required && /* @__PURE__ */
|
|
2903
|
+
required && /* @__PURE__ */ jsx33("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
2780
2904
|
] }),
|
|
2781
|
-
/* @__PURE__ */
|
|
2905
|
+
/* @__PURE__ */ jsxs27(
|
|
2782
2906
|
RadixSelect.Root,
|
|
2783
2907
|
{
|
|
2784
2908
|
value: isControlled ? value3 ?? "" : void 0,
|
|
@@ -2788,7 +2912,7 @@ var Select = /* @__PURE__ */ forwardRef28(function Select2(props, ref) {
|
|
|
2788
2912
|
required,
|
|
2789
2913
|
name,
|
|
2790
2914
|
children: [
|
|
2791
|
-
/* @__PURE__ */
|
|
2915
|
+
/* @__PURE__ */ jsxs27(
|
|
2792
2916
|
RadixSelect.Trigger,
|
|
2793
2917
|
{
|
|
2794
2918
|
ref,
|
|
@@ -2799,12 +2923,12 @@ var Select = /* @__PURE__ */ forwardRef28(function Select2(props, ref) {
|
|
|
2799
2923
|
"data-invalid": error || void 0,
|
|
2800
2924
|
className: cx(root3({ size, fullWidth }), trigger2, className),
|
|
2801
2925
|
children: [
|
|
2802
|
-
/* @__PURE__ */
|
|
2803
|
-
/* @__PURE__ */
|
|
2926
|
+
/* @__PURE__ */ jsx33("span", { className: value, children: /* @__PURE__ */ jsx33(RadixSelect.Value, { placeholder }) }),
|
|
2927
|
+
/* @__PURE__ */ jsx33(RadixSelect.Icon, { className: icon3, children: /* @__PURE__ */ jsx33(ChevronDownIcon4, { size: 16 }) })
|
|
2804
2928
|
]
|
|
2805
2929
|
}
|
|
2806
2930
|
),
|
|
2807
|
-
/* @__PURE__ */
|
|
2931
|
+
/* @__PURE__ */ jsx33(RadixSelect.Portal, { children: /* @__PURE__ */ jsx33(
|
|
2808
2932
|
RadixSelect.Content,
|
|
2809
2933
|
{
|
|
2810
2934
|
position: "popper",
|
|
@@ -2812,15 +2936,15 @@ var Select = /* @__PURE__ */ forwardRef28(function Select2(props, ref) {
|
|
|
2812
2936
|
collisionPadding: 8,
|
|
2813
2937
|
className: cx(portal2.className, content5),
|
|
2814
2938
|
style: portal2.style,
|
|
2815
|
-
children: /* @__PURE__ */
|
|
2939
|
+
children: /* @__PURE__ */ jsx33(RadixSelect.Viewport, { className: viewport, children: options.map((option2) => /* @__PURE__ */ jsxs27(
|
|
2816
2940
|
RadixSelect.Item,
|
|
2817
2941
|
{
|
|
2818
2942
|
value: option2.value,
|
|
2819
2943
|
disabled: option2.disabled,
|
|
2820
2944
|
className: item4,
|
|
2821
2945
|
children: [
|
|
2822
|
-
/* @__PURE__ */
|
|
2823
|
-
/* @__PURE__ */
|
|
2946
|
+
/* @__PURE__ */ jsx33(RadixSelect.ItemText, { children: option2.label }),
|
|
2947
|
+
/* @__PURE__ */ jsx33(RadixSelect.ItemIndicator, { className: itemIndicator, children: /* @__PURE__ */ jsx33(CheckIcon3, { size: 16 }) })
|
|
2824
2948
|
]
|
|
2825
2949
|
},
|
|
2826
2950
|
option2.value
|
|
@@ -2830,19 +2954,19 @@ var Select = /* @__PURE__ */ forwardRef28(function Select2(props, ref) {
|
|
|
2830
2954
|
]
|
|
2831
2955
|
}
|
|
2832
2956
|
),
|
|
2833
|
-
helperText3 && /* @__PURE__ */
|
|
2957
|
+
helperText3 && /* @__PURE__ */ jsx33("p", { id: helperId, className: helperText({ error }), children: helperText3 })
|
|
2834
2958
|
] });
|
|
2835
2959
|
});
|
|
2836
2960
|
|
|
2837
2961
|
// src/components/SkipLink/SkipLink.tsx
|
|
2838
|
-
import { forwardRef as
|
|
2962
|
+
import { forwardRef as forwardRef30 } from "react";
|
|
2839
2963
|
|
|
2840
2964
|
// src/components/SkipLink/SkipLink.css.ts
|
|
2841
2965
|
var skipLink = "_1t9jaar0";
|
|
2842
2966
|
|
|
2843
2967
|
// src/components/SkipLink/SkipLink.tsx
|
|
2844
|
-
import { jsx as
|
|
2845
|
-
var SkipLink = /* @__PURE__ */
|
|
2968
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
2969
|
+
var SkipLink = /* @__PURE__ */ forwardRef30(function SkipLink2({ href = "#main", className, children, onClick, ...rest }, ref) {
|
|
2846
2970
|
const m = useMessages();
|
|
2847
2971
|
const handleClick = (event) => {
|
|
2848
2972
|
onClick?.(event);
|
|
@@ -2854,16 +2978,16 @@ var SkipLink = /* @__PURE__ */ forwardRef29(function SkipLink2({ href = "#main",
|
|
|
2854
2978
|
target.focus();
|
|
2855
2979
|
target.scrollIntoView?.({ block: "start" });
|
|
2856
2980
|
};
|
|
2857
|
-
return /* @__PURE__ */
|
|
2981
|
+
return /* @__PURE__ */ jsx34("a", { ref, href, className: cx(skipLink, className), onClick: handleClick, ...rest, children: children ?? m.skipToContent ?? "\uBCF8\uBB38 \uBC14\uB85C\uAC00\uAE30" });
|
|
2858
2982
|
});
|
|
2859
2983
|
|
|
2860
2984
|
// src/components/Slider/Slider.tsx
|
|
2861
2985
|
import * as RadixSlider from "@radix-ui/react-slider";
|
|
2862
|
-
import { forwardRef as
|
|
2986
|
+
import { forwardRef as forwardRef31, useId as useId14, useState as useState13 } from "react";
|
|
2863
2987
|
|
|
2864
2988
|
// src/components/Slider/Slider.css.ts
|
|
2865
2989
|
import { createRuntimeFn as _7a46815 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
2866
|
-
var
|
|
2990
|
+
var field3 = "_126mzjm0";
|
|
2867
2991
|
var header6 = "_126mzjm1";
|
|
2868
2992
|
var helperText2 = "_126mzjm4";
|
|
2869
2993
|
var label3 = "_126mzjm2";
|
|
@@ -2874,8 +2998,8 @@ var track = /* @__PURE__ */ _7a46815({ defaultClassName: "_126mzjm8", variantCla
|
|
|
2874
2998
|
var value2 = "_126mzjm3";
|
|
2875
2999
|
|
|
2876
3000
|
// src/components/Slider/Slider.tsx
|
|
2877
|
-
import { jsx as
|
|
2878
|
-
var Slider = /* @__PURE__ */
|
|
3001
|
+
import { jsx as jsx35, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3002
|
+
var Slider = /* @__PURE__ */ forwardRef31(function Slider2(props, ref) {
|
|
2879
3003
|
const {
|
|
2880
3004
|
value: value3,
|
|
2881
3005
|
defaultValue,
|
|
@@ -2896,12 +3020,12 @@ var Slider = /* @__PURE__ */ forwardRef30(function Slider2(props, ref) {
|
|
|
2896
3020
|
} = props;
|
|
2897
3021
|
const m = useMessages();
|
|
2898
3022
|
const thumbLabels = thumbLabelsProp ?? [m.rangeStart ?? "\uCD5C\uC18C", m.rangeEnd ?? "\uCD5C\uB300"];
|
|
2899
|
-
const generatedId =
|
|
3023
|
+
const generatedId = useId14();
|
|
2900
3024
|
const baseId = id ?? generatedId;
|
|
2901
3025
|
const labelId = `${baseId}-label`;
|
|
2902
3026
|
const helperId = `${baseId}-helper`;
|
|
2903
3027
|
const isControlled = "value" in props;
|
|
2904
|
-
const [innerValue, setInnerValue] =
|
|
3028
|
+
const [innerValue, setInnerValue] = useState13(defaultValue ?? [min]);
|
|
2905
3029
|
const current2 = isControlled ? value3 ?? [min] : innerValue;
|
|
2906
3030
|
const isRange = current2.length > 1;
|
|
2907
3031
|
const handleChange = (next) => {
|
|
@@ -2909,12 +3033,12 @@ var Slider = /* @__PURE__ */ forwardRef30(function Slider2(props, ref) {
|
|
|
2909
3033
|
onValueChange?.(next);
|
|
2910
3034
|
};
|
|
2911
3035
|
const valueText = current2.map(formatValue).join(" \u2013 ");
|
|
2912
|
-
return /* @__PURE__ */
|
|
2913
|
-
(label6 || showValue) && /* @__PURE__ */
|
|
2914
|
-
label6 && /* @__PURE__ */
|
|
2915
|
-
showValue && /* @__PURE__ */
|
|
3036
|
+
return /* @__PURE__ */ jsxs28("div", { className: cx(field3, className), children: [
|
|
3037
|
+
(label6 || showValue) && /* @__PURE__ */ jsxs28("div", { className: header6, children: [
|
|
3038
|
+
label6 && /* @__PURE__ */ jsx35("span", { id: labelId, className: label3, children: label6 }),
|
|
3039
|
+
showValue && /* @__PURE__ */ jsx35("span", { className: value2, "aria-hidden": true, children: valueText })
|
|
2916
3040
|
] }),
|
|
2917
|
-
/* @__PURE__ */
|
|
3041
|
+
/* @__PURE__ */ jsxs28(
|
|
2918
3042
|
RadixSlider.Root,
|
|
2919
3043
|
{
|
|
2920
3044
|
ref,
|
|
@@ -2927,10 +3051,10 @@ var Slider = /* @__PURE__ */ forwardRef30(function Slider2(props, ref) {
|
|
|
2927
3051
|
className: root10({ size }),
|
|
2928
3052
|
...rest,
|
|
2929
3053
|
children: [
|
|
2930
|
-
/* @__PURE__ */
|
|
3054
|
+
/* @__PURE__ */ jsx35(RadixSlider.Track, { className: track({ size }), children: /* @__PURE__ */ jsx35(RadixSlider.Range, { className: range2 }) }),
|
|
2931
3055
|
current2.map((thumbValue, index) => {
|
|
2932
3056
|
const thumbLabelId = `${baseId}-thumb-${index}`;
|
|
2933
|
-
return /* @__PURE__ */
|
|
3057
|
+
return /* @__PURE__ */ jsx35(
|
|
2934
3058
|
RadixSlider.Thumb,
|
|
2935
3059
|
{
|
|
2936
3060
|
className: thumb({ size }),
|
|
@@ -2945,16 +3069,16 @@ var Slider = /* @__PURE__ */ forwardRef30(function Slider2(props, ref) {
|
|
|
2945
3069
|
]
|
|
2946
3070
|
}
|
|
2947
3071
|
),
|
|
2948
|
-
isRange && current2.map((_, index) => /* @__PURE__ */
|
|
3072
|
+
isRange && current2.map((_, index) => /* @__PURE__ */ jsxs28("span", { id: `${baseId}-thumb-${index}`, hidden: true, children: [
|
|
2949
3073
|
label6 ? "" : ariaLabel ? `${ariaLabel} ` : "",
|
|
2950
3074
|
thumbLabels[index] ?? `${index + 1}`
|
|
2951
3075
|
] }, index)),
|
|
2952
|
-
helperText3 && /* @__PURE__ */
|
|
3076
|
+
helperText3 && /* @__PURE__ */ jsx35("span", { id: helperId, className: helperText2, children: helperText3 })
|
|
2953
3077
|
] });
|
|
2954
3078
|
});
|
|
2955
3079
|
|
|
2956
3080
|
// src/components/Stepper/Stepper.tsx
|
|
2957
|
-
import { forwardRef as
|
|
3081
|
+
import { forwardRef as forwardRef32 } from "react";
|
|
2958
3082
|
import { CheckIcon as CheckIcon4 } from "@bestow-ui/icons";
|
|
2959
3083
|
|
|
2960
3084
|
// src/components/Stepper/Stepper.css.ts
|
|
@@ -2967,10 +3091,10 @@ var step = /* @__PURE__ */ _7a46816({ defaultClassName: "kervhm3", variantClassN
|
|
|
2967
3091
|
var text2 = /* @__PURE__ */ _7a46816({ defaultClassName: "kervhma", variantClassNames: { orientation: { horizontal: "kervhmb", vertical: "kervhmc" } }, defaultVariants: {}, compoundVariants: [] });
|
|
2968
3092
|
|
|
2969
3093
|
// src/components/Stepper/Stepper.tsx
|
|
2970
|
-
import { jsx as
|
|
2971
|
-
var Stepper = /* @__PURE__ */
|
|
3094
|
+
import { jsx as jsx36, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3095
|
+
var Stepper = /* @__PURE__ */ forwardRef32(function Stepper2({ steps, current: current2, orientation = "horizontal", "aria-label": ariaLabel, className, ...rest }, ref) {
|
|
2972
3096
|
const m = useMessages();
|
|
2973
|
-
return /* @__PURE__ */
|
|
3097
|
+
return /* @__PURE__ */ jsx36(
|
|
2974
3098
|
"ol",
|
|
2975
3099
|
{
|
|
2976
3100
|
ref,
|
|
@@ -2979,24 +3103,24 @@ var Stepper = /* @__PURE__ */ forwardRef31(function Stepper2({ steps, current: c
|
|
|
2979
3103
|
...rest,
|
|
2980
3104
|
children: steps.map((step2, index) => {
|
|
2981
3105
|
const status = index < current2 ? "complete" : index === current2 ? "current" : "upcoming";
|
|
2982
|
-
return /* @__PURE__ */
|
|
3106
|
+
return /* @__PURE__ */ jsxs29(
|
|
2983
3107
|
"li",
|
|
2984
3108
|
{
|
|
2985
3109
|
className: step({ orientation }),
|
|
2986
3110
|
"data-status": status,
|
|
2987
3111
|
"aria-current": status === "current" ? "step" : void 0,
|
|
2988
3112
|
children: [
|
|
2989
|
-
/* @__PURE__ */
|
|
2990
|
-
/* @__PURE__ */
|
|
2991
|
-
/* @__PURE__ */
|
|
3113
|
+
/* @__PURE__ */ jsx36("span", { className: indicator2({ status }), "aria-hidden": true, children: status === "complete" ? /* @__PURE__ */ jsx36(CheckIcon4, { size: 16, strokeWidth: 2.5 }) : index + 1 }),
|
|
3114
|
+
/* @__PURE__ */ jsxs29("span", { className: text2({ orientation }), children: [
|
|
3115
|
+
/* @__PURE__ */ jsxs29("span", { className: label4({ status }), children: [
|
|
2992
3116
|
step2.label,
|
|
2993
|
-
status === "complete" && /* @__PURE__ */
|
|
3117
|
+
status === "complete" && /* @__PURE__ */ jsxs29("span", { className: visuallyHidden, children: [
|
|
2994
3118
|
" (",
|
|
2995
3119
|
m.stepCompleted ?? "\uC644\uB8CC",
|
|
2996
3120
|
")"
|
|
2997
3121
|
] })
|
|
2998
3122
|
] }),
|
|
2999
|
-
step2.description && /* @__PURE__ */
|
|
3123
|
+
step2.description && /* @__PURE__ */ jsx36("span", { className: description5, children: step2.description })
|
|
3000
3124
|
] })
|
|
3001
3125
|
]
|
|
3002
3126
|
},
|
|
@@ -3009,7 +3133,7 @@ var Stepper = /* @__PURE__ */ forwardRef31(function Stepper2({ steps, current: c
|
|
|
3009
3133
|
|
|
3010
3134
|
// src/components/Switch/Switch.tsx
|
|
3011
3135
|
import * as RadixSwitch from "@radix-ui/react-switch";
|
|
3012
|
-
import { forwardRef as
|
|
3136
|
+
import { forwardRef as forwardRef33, useId as useId15 } from "react";
|
|
3013
3137
|
|
|
3014
3138
|
// src/components/Switch/Switch.css.ts
|
|
3015
3139
|
import { createRuntimeFn as _7a46817 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
@@ -3019,12 +3143,12 @@ var thumb2 = /* @__PURE__ */ _7a46817({ defaultClassName: "o33ul26", variantClas
|
|
|
3019
3143
|
var track2 = /* @__PURE__ */ _7a46817({ defaultClassName: "o33ul23", variantClassNames: { size: { sm: "o33ul24", md: "o33ul25" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
3020
3144
|
|
|
3021
3145
|
// src/components/Switch/Switch.tsx
|
|
3022
|
-
import { jsx as
|
|
3023
|
-
var Switch = /* @__PURE__ */
|
|
3024
|
-
const generatedId =
|
|
3146
|
+
import { jsx as jsx37, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3147
|
+
var Switch = /* @__PURE__ */ forwardRef33(function Switch2({ label: label6, size, id, className, disabled, "aria-label": ariaLabel, ...rest }, ref) {
|
|
3148
|
+
const generatedId = useId15();
|
|
3025
3149
|
const switchId = id ?? generatedId;
|
|
3026
|
-
return /* @__PURE__ */
|
|
3027
|
-
/* @__PURE__ */
|
|
3150
|
+
return /* @__PURE__ */ jsxs30("span", { className: cx(root12({ size }), className), "data-disabled": disabled || void 0, children: [
|
|
3151
|
+
/* @__PURE__ */ jsx37(
|
|
3028
3152
|
RadixSwitch.Root,
|
|
3029
3153
|
{
|
|
3030
3154
|
ref,
|
|
@@ -3033,19 +3157,19 @@ var Switch = /* @__PURE__ */ forwardRef32(function Switch2({ label: label6, size
|
|
|
3033
3157
|
"aria-label": ariaLabel,
|
|
3034
3158
|
className: track2({ size }),
|
|
3035
3159
|
...rest,
|
|
3036
|
-
children: /* @__PURE__ */
|
|
3160
|
+
children: /* @__PURE__ */ jsx37(RadixSwitch.Thumb, { className: thumb2({ size }) })
|
|
3037
3161
|
}
|
|
3038
3162
|
),
|
|
3039
|
-
label6 && /* @__PURE__ */
|
|
3163
|
+
label6 && /* @__PURE__ */ jsx37("label", { htmlFor: switchId, className: label5, children: label6 })
|
|
3040
3164
|
] });
|
|
3041
3165
|
});
|
|
3042
3166
|
|
|
3043
3167
|
// src/components/Table/Table.tsx
|
|
3044
3168
|
import {
|
|
3045
3169
|
createContext as createContext3,
|
|
3046
|
-
forwardRef as
|
|
3170
|
+
forwardRef as forwardRef34,
|
|
3047
3171
|
useContext as useContext3,
|
|
3048
|
-
useId as
|
|
3172
|
+
useId as useId16
|
|
3049
3173
|
} from "react";
|
|
3050
3174
|
import { ArrowDownIcon, ArrowUpIcon } from "@bestow-ui/icons";
|
|
3051
3175
|
|
|
@@ -3069,10 +3193,10 @@ var striped = "l3ploy6";
|
|
|
3069
3193
|
var table = "l3ploy1";
|
|
3070
3194
|
|
|
3071
3195
|
// src/components/Table/Table.tsx
|
|
3072
|
-
import { Fragment as Fragment6, jsx as
|
|
3196
|
+
import { Fragment as Fragment6, jsx as jsx38, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3073
3197
|
var TableSizeContext = /* @__PURE__ */ createContext3("md");
|
|
3074
3198
|
var TableSectionContext = /* @__PURE__ */ createContext3("body");
|
|
3075
|
-
var Table = /* @__PURE__ */
|
|
3199
|
+
var Table = /* @__PURE__ */ forwardRef34(function Table2({
|
|
3076
3200
|
size = "md",
|
|
3077
3201
|
striped: striped2,
|
|
3078
3202
|
stickyHeader: stickyHeader2,
|
|
@@ -3084,8 +3208,8 @@ var Table = /* @__PURE__ */ forwardRef33(function Table2({
|
|
|
3084
3208
|
children,
|
|
3085
3209
|
...rest
|
|
3086
3210
|
}, ref) {
|
|
3087
|
-
const captionId =
|
|
3088
|
-
return /* @__PURE__ */
|
|
3211
|
+
const captionId = useId16();
|
|
3212
|
+
return /* @__PURE__ */ jsx38(TableSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsx38(
|
|
3089
3213
|
"div",
|
|
3090
3214
|
{
|
|
3091
3215
|
className: cx(container, containerClassName),
|
|
@@ -3094,7 +3218,7 @@ var Table = /* @__PURE__ */ forwardRef33(function Table2({
|
|
|
3094
3218
|
role: "region",
|
|
3095
3219
|
"aria-labelledby": caption2 ? captionId : void 0,
|
|
3096
3220
|
"aria-label": caption2 ? void 0 : ariaLabel,
|
|
3097
|
-
children: /* @__PURE__ */
|
|
3221
|
+
children: /* @__PURE__ */ jsxs31(
|
|
3098
3222
|
"table",
|
|
3099
3223
|
{
|
|
3100
3224
|
ref,
|
|
@@ -3102,7 +3226,7 @@ var Table = /* @__PURE__ */ forwardRef33(function Table2({
|
|
|
3102
3226
|
"aria-label": caption2 ? void 0 : ariaLabel,
|
|
3103
3227
|
...rest,
|
|
3104
3228
|
children: [
|
|
3105
|
-
caption2 && /* @__PURE__ */
|
|
3229
|
+
caption2 && /* @__PURE__ */ jsx38("caption", { id: captionId, className: caption, children: caption2 }),
|
|
3106
3230
|
children
|
|
3107
3231
|
]
|
|
3108
3232
|
}
|
|
@@ -3110,31 +3234,31 @@ var Table = /* @__PURE__ */ forwardRef33(function Table2({
|
|
|
3110
3234
|
}
|
|
3111
3235
|
) });
|
|
3112
3236
|
});
|
|
3113
|
-
var TableHeader = /* @__PURE__ */
|
|
3237
|
+
var TableHeader = /* @__PURE__ */ forwardRef34(
|
|
3114
3238
|
function TableHeader2({ className, ...rest }, ref) {
|
|
3115
|
-
return /* @__PURE__ */
|
|
3239
|
+
return /* @__PURE__ */ jsx38(TableSectionContext.Provider, { value: "header", children: /* @__PURE__ */ jsx38("thead", { ref, className: cx(header7, className), ...rest }) });
|
|
3116
3240
|
}
|
|
3117
3241
|
);
|
|
3118
|
-
var TableBody = /* @__PURE__ */
|
|
3242
|
+
var TableBody = /* @__PURE__ */ forwardRef34(
|
|
3119
3243
|
function TableBody2({ className, ...rest }, ref) {
|
|
3120
|
-
return /* @__PURE__ */
|
|
3244
|
+
return /* @__PURE__ */ jsx38(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ jsx38("tbody", { ref, className: cx(body3, className), ...rest }) });
|
|
3121
3245
|
}
|
|
3122
3246
|
);
|
|
3123
|
-
var TableFooter = /* @__PURE__ */
|
|
3247
|
+
var TableFooter = /* @__PURE__ */ forwardRef34(
|
|
3124
3248
|
function TableFooter2({ className, ...rest }, ref) {
|
|
3125
|
-
return /* @__PURE__ */
|
|
3249
|
+
return /* @__PURE__ */ jsx38(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ jsx38("tfoot", { ref, className: cx(footer3, className), ...rest }) });
|
|
3126
3250
|
}
|
|
3127
3251
|
);
|
|
3128
|
-
var TableRow = /* @__PURE__ */
|
|
3129
|
-
return /* @__PURE__ */
|
|
3252
|
+
var TableRow = /* @__PURE__ */ forwardRef34(function TableRow2({ selected, className, ...rest }, ref) {
|
|
3253
|
+
return /* @__PURE__ */ jsx38("tr", { ref, className: cx(row3, className), "data-state": selected ? "selected" : void 0, ...rest });
|
|
3130
3254
|
});
|
|
3131
|
-
var TableHead = /* @__PURE__ */
|
|
3255
|
+
var TableHead = /* @__PURE__ */ forwardRef34(function TableHead2({ align, sortDirection, onSort, scope, className, children, ...rest }, ref) {
|
|
3132
3256
|
const size = useContext3(TableSizeContext);
|
|
3133
3257
|
const section = useContext3(TableSectionContext);
|
|
3134
3258
|
const sortable = onSort !== void 0;
|
|
3135
3259
|
const direction = sortDirection ?? "none";
|
|
3136
3260
|
const SortIcon = direction === "descending" ? ArrowDownIcon : ArrowUpIcon;
|
|
3137
|
-
return /* @__PURE__ */
|
|
3261
|
+
return /* @__PURE__ */ jsx38(
|
|
3138
3262
|
"th",
|
|
3139
3263
|
{
|
|
3140
3264
|
ref,
|
|
@@ -3146,17 +3270,17 @@ var TableHead = /* @__PURE__ */ forwardRef33(function TableHead2({ align, sortDi
|
|
|
3146
3270
|
className
|
|
3147
3271
|
),
|
|
3148
3272
|
...rest,
|
|
3149
|
-
children: sortable ? /* @__PURE__ */
|
|
3273
|
+
children: sortable ? /* @__PURE__ */ jsxs31("button", { type: "button", className: sortButton, onClick: onSort, children: [
|
|
3150
3274
|
children,
|
|
3151
|
-
/* @__PURE__ */
|
|
3275
|
+
/* @__PURE__ */ jsx38(SortIcon, { size: 14, className: sortIcon, "data-active": direction !== "none", "aria-hidden": true })
|
|
3152
3276
|
] }) : children
|
|
3153
3277
|
}
|
|
3154
3278
|
);
|
|
3155
3279
|
});
|
|
3156
|
-
var TableCell = /* @__PURE__ */
|
|
3280
|
+
var TableCell = /* @__PURE__ */ forwardRef34(function TableCell2({ align, className, ...rest }, ref) {
|
|
3157
3281
|
const size = useContext3(TableSizeContext);
|
|
3158
3282
|
const section = useContext3(TableSectionContext);
|
|
3159
|
-
return /* @__PURE__ */
|
|
3283
|
+
return /* @__PURE__ */ jsx38(
|
|
3160
3284
|
"td",
|
|
3161
3285
|
{
|
|
3162
3286
|
ref,
|
|
@@ -3165,17 +3289,17 @@ var TableCell = /* @__PURE__ */ forwardRef33(function TableCell2({ align, classN
|
|
|
3165
3289
|
}
|
|
3166
3290
|
);
|
|
3167
3291
|
});
|
|
3168
|
-
var TableEmpty = /* @__PURE__ */
|
|
3169
|
-
return /* @__PURE__ */
|
|
3292
|
+
var TableEmpty = /* @__PURE__ */ forwardRef34(function TableEmpty2({ colSpan, className, children, ...rest }, ref) {
|
|
3293
|
+
return /* @__PURE__ */ jsx38(TableRow, { children: /* @__PURE__ */ jsx38(TableCell, { ref, colSpan, className: cx(emptyCell, className), ...rest, children: /* @__PURE__ */ jsx38("div", { className: emptyContent, children }) }) });
|
|
3170
3294
|
});
|
|
3171
3295
|
function TableSkeleton({ rows = 5, columns }) {
|
|
3172
|
-
return /* @__PURE__ */
|
|
3296
|
+
return /* @__PURE__ */ jsx38(Fragment6, { children: Array.from({ length: rows }, (_, row5) => /* @__PURE__ */ jsx38(TableRow, { "aria-hidden": true, children: Array.from({ length: columns }, (_2, column) => /* @__PURE__ */ jsx38(TableCell, { children: /* @__PURE__ */ jsx38(Skeleton, { width: column === 0 ? "60%" : "80%" }) }, column)) }, row5)) });
|
|
3173
3297
|
}
|
|
3174
3298
|
|
|
3175
3299
|
// src/components/Table/useTableSelection.ts
|
|
3176
|
-
import { useCallback, useState as
|
|
3300
|
+
import { useCallback, useState as useState14 } from "react";
|
|
3177
3301
|
function useTableSelection(initial = []) {
|
|
3178
|
-
const [selected, setSelected] =
|
|
3302
|
+
const [selected, setSelected] = useState14(initial);
|
|
3179
3303
|
const isSelected = useCallback((id) => selected.includes(id), [selected]);
|
|
3180
3304
|
const toggle3 = useCallback((id, checked) => {
|
|
3181
3305
|
setSelected((prev) => {
|
|
@@ -3205,7 +3329,7 @@ function useTableSelection(initial = []) {
|
|
|
3205
3329
|
|
|
3206
3330
|
// src/components/Tabs/Tabs.tsx
|
|
3207
3331
|
import * as RadixTabs from "@radix-ui/react-tabs";
|
|
3208
|
-
import { createContext as createContext4, forwardRef as
|
|
3332
|
+
import { createContext as createContext4, forwardRef as forwardRef35, useContext as useContext4 } from "react";
|
|
3209
3333
|
|
|
3210
3334
|
// src/components/Tabs/Tabs.css.ts
|
|
3211
3335
|
import { createRuntimeFn as _7a46819 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
@@ -3215,31 +3339,31 @@ var root13 = "fvhbtd0";
|
|
|
3215
3339
|
var trigger3 = /* @__PURE__ */ _7a46819({ defaultClassName: "fvhbtd4", variantClassNames: { variant: { line: "fvhbtd5", soft: "fvhbtd6" }, size: { sm: "fvhbtd7", md: "fvhbtd8" } }, defaultVariants: { variant: "line", size: "md" }, compoundVariants: [[{ variant: "soft", size: "sm" }, "fvhbtd9"], [{ variant: "soft", size: "md" }, "fvhbtda"]] });
|
|
3216
3340
|
|
|
3217
3341
|
// src/components/Tabs/Tabs.tsx
|
|
3218
|
-
import { jsx as
|
|
3342
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
3219
3343
|
var TabsStyleContext = /* @__PURE__ */ createContext4({ variant: "line", size: "md" });
|
|
3220
|
-
var Tabs = /* @__PURE__ */
|
|
3344
|
+
var Tabs = /* @__PURE__ */ forwardRef35(function Tabs2({ variant = "line", size = "md", className, ...props }, ref) {
|
|
3221
3345
|
const controlled = "value" in props ? { value: props.value ?? "" } : {};
|
|
3222
|
-
return /* @__PURE__ */
|
|
3346
|
+
return /* @__PURE__ */ jsx39(TabsStyleContext.Provider, { value: { variant, size }, children: /* @__PURE__ */ jsx39(RadixTabs.Root, { ref, className: cx(root13, className), ...props, ...controlled }) });
|
|
3223
3347
|
});
|
|
3224
|
-
var TabsList = /* @__PURE__ */
|
|
3348
|
+
var TabsList = /* @__PURE__ */ forwardRef35(function TabsList2({ className, ...rest }, ref) {
|
|
3225
3349
|
const { variant } = useContext4(TabsStyleContext);
|
|
3226
|
-
return /* @__PURE__ */
|
|
3350
|
+
return /* @__PURE__ */ jsx39(RadixTabs.List, { ref, className: cx(list6({ variant }), className), ...rest });
|
|
3227
3351
|
});
|
|
3228
|
-
var TabsTrigger = /* @__PURE__ */
|
|
3352
|
+
var TabsTrigger = /* @__PURE__ */ forwardRef35(function TabsTrigger2({ className, ...rest }, ref) {
|
|
3229
3353
|
const { variant, size } = useContext4(TabsStyleContext);
|
|
3230
|
-
return /* @__PURE__ */
|
|
3354
|
+
return /* @__PURE__ */ jsx39(RadixTabs.Trigger, { ref, className: cx(trigger3({ variant, size }), className), ...rest });
|
|
3231
3355
|
});
|
|
3232
|
-
var TabsContent = /* @__PURE__ */
|
|
3233
|
-
return /* @__PURE__ */
|
|
3356
|
+
var TabsContent = /* @__PURE__ */ forwardRef35(function TabsContent2({ className, ...rest }, ref) {
|
|
3357
|
+
return /* @__PURE__ */ jsx39(RadixTabs.Content, { ref, className: cx(content10, className), ...rest });
|
|
3234
3358
|
});
|
|
3235
3359
|
|
|
3236
3360
|
// src/components/Textarea/Textarea.tsx
|
|
3237
3361
|
import {
|
|
3238
|
-
forwardRef as
|
|
3362
|
+
forwardRef as forwardRef36,
|
|
3239
3363
|
useCallback as useCallback2,
|
|
3240
|
-
useId as
|
|
3364
|
+
useId as useId17,
|
|
3241
3365
|
useRef as useRef15,
|
|
3242
|
-
useState as
|
|
3366
|
+
useState as useState15
|
|
3243
3367
|
} from "react";
|
|
3244
3368
|
|
|
3245
3369
|
// src/components/Textarea/Textarea.css.ts
|
|
@@ -3251,8 +3375,8 @@ var footer4 = "_1koawa8";
|
|
|
3251
3375
|
var textarea = /* @__PURE__ */ _7a46820({ defaultClassName: "_1koawa0", variantClassNames: { size: { sm: "_1koawa1", md: "_1koawa2", lg: "_1koawa3" }, resize: { none: "_1koawa4", vertical: "_1koawa5", both: "_1koawa6" } }, defaultVariants: { size: "md", resize: "vertical" }, compoundVariants: [] });
|
|
3252
3376
|
|
|
3253
3377
|
// src/components/Textarea/Textarea.tsx
|
|
3254
|
-
import { jsx as
|
|
3255
|
-
var Textarea = /* @__PURE__ */
|
|
3378
|
+
import { jsx as jsx40, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3379
|
+
var Textarea = /* @__PURE__ */ forwardRef36(function Textarea2({
|
|
3256
3380
|
label: label6,
|
|
3257
3381
|
helperText: helperText3,
|
|
3258
3382
|
error,
|
|
@@ -3273,11 +3397,11 @@ var Textarea = /* @__PURE__ */ forwardRef35(function Textarea2({
|
|
|
3273
3397
|
"aria-describedby": ariaDescribedBy,
|
|
3274
3398
|
...rest
|
|
3275
3399
|
}, ref) {
|
|
3276
|
-
const generatedId =
|
|
3400
|
+
const generatedId = useId17();
|
|
3277
3401
|
const textareaId = id ?? generatedId;
|
|
3278
3402
|
const helperId = helperText3 ? `${textareaId}-helper` : void 0;
|
|
3279
3403
|
const innerRef = useRef15(null);
|
|
3280
|
-
const [uncontrolledLength, setUncontrolledLength] =
|
|
3404
|
+
const [uncontrolledLength, setUncontrolledLength] = useState15(() => String(defaultValue ?? "").length);
|
|
3281
3405
|
const length = value3 !== void 0 ? String(value3).length : uncontrolledLength;
|
|
3282
3406
|
const fitHeight = useCallback2(() => {
|
|
3283
3407
|
const el = innerRef.current;
|
|
@@ -3292,12 +3416,12 @@ var Textarea = /* @__PURE__ */ forwardRef35(function Textarea2({
|
|
|
3292
3416
|
fitHeight();
|
|
3293
3417
|
onChange?.(event);
|
|
3294
3418
|
};
|
|
3295
|
-
return /* @__PURE__ */
|
|
3296
|
-
label6 && /* @__PURE__ */
|
|
3419
|
+
return /* @__PURE__ */ jsxs32("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
|
|
3420
|
+
label6 && /* @__PURE__ */ jsxs32("label", { htmlFor: textareaId, className: label, children: [
|
|
3297
3421
|
label6,
|
|
3298
|
-
required && /* @__PURE__ */
|
|
3422
|
+
required && /* @__PURE__ */ jsx40("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
3299
3423
|
] }),
|
|
3300
|
-
/* @__PURE__ */
|
|
3424
|
+
/* @__PURE__ */ jsx40(
|
|
3301
3425
|
"textarea",
|
|
3302
3426
|
{
|
|
3303
3427
|
ref: mergeRefs(innerRef, ref),
|
|
@@ -3319,16 +3443,16 @@ var Textarea = /* @__PURE__ */ forwardRef35(function Textarea2({
|
|
|
3319
3443
|
...rest
|
|
3320
3444
|
}
|
|
3321
3445
|
),
|
|
3322
|
-
(helperText3 || showCount) && /* @__PURE__ */
|
|
3323
|
-
helperText3 && /* @__PURE__ */
|
|
3324
|
-
showCount && /* @__PURE__ */
|
|
3446
|
+
(helperText3 || showCount) && /* @__PURE__ */ jsxs32("div", { className: footer4, children: [
|
|
3447
|
+
helperText3 && /* @__PURE__ */ jsx40("p", { id: helperId, className: helperText({ error }), children: helperText3 }),
|
|
3448
|
+
showCount && /* @__PURE__ */ jsx40("span", { className: cx(count, maxLength !== void 0 && length >= maxLength && countOver), children: maxLength !== void 0 ? `${length}/${maxLength}` : length })
|
|
3325
3449
|
] })
|
|
3326
3450
|
] });
|
|
3327
3451
|
});
|
|
3328
3452
|
|
|
3329
3453
|
// src/components/Toast/Toast.tsx
|
|
3330
3454
|
import * as RadixToast from "@radix-ui/react-toast";
|
|
3331
|
-
import { createContext as createContext5, useCallback as useCallback3, useContext as useContext5, useMemo as useMemo4, useRef as useRef16, useState as
|
|
3455
|
+
import { createContext as createContext5, useCallback as useCallback3, useContext as useContext5, useMemo as useMemo4, useRef as useRef16, useState as useState16 } from "react";
|
|
3332
3456
|
import { XIcon as XIcon7 } from "@bestow-ui/icons";
|
|
3333
3457
|
|
|
3334
3458
|
// src/components/Toast/Toast.css.ts
|
|
@@ -3341,13 +3465,13 @@ var toast = /* @__PURE__ */ _7a46821({ defaultClassName: "_1g11zvx1", variantCla
|
|
|
3341
3465
|
var viewport2 = "_1g11zvx0";
|
|
3342
3466
|
|
|
3343
3467
|
// src/components/Toast/Toast.tsx
|
|
3344
|
-
import { jsx as
|
|
3468
|
+
import { jsx as jsx41, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3345
3469
|
var REMOVE_DELAY = 500;
|
|
3346
3470
|
var ToastContext = /* @__PURE__ */ createContext5(null);
|
|
3347
3471
|
function ToastProvider({ children, duration = 5e3, label: labelProp }) {
|
|
3348
3472
|
const m = useMessages();
|
|
3349
3473
|
const label6 = labelProp ?? m.notifications ?? "\uC54C\uB9BC";
|
|
3350
|
-
const [toasts, setToasts] =
|
|
3474
|
+
const [toasts, setToasts] = useState16([]);
|
|
3351
3475
|
const nextId = useRef16(0);
|
|
3352
3476
|
const portal2 = usePortalProps();
|
|
3353
3477
|
const toast2 = useCallback3((options) => {
|
|
@@ -3361,9 +3485,9 @@ function ToastProvider({ children, duration = 5e3, label: labelProp }) {
|
|
|
3361
3485
|
setTimeout(() => setToasts((prev) => prev.filter((t) => t.open || !isTarget(t))), REMOVE_DELAY);
|
|
3362
3486
|
}, []);
|
|
3363
3487
|
const value3 = useMemo4(() => ({ toast: toast2, dismiss }), [toast2, dismiss]);
|
|
3364
|
-
return /* @__PURE__ */
|
|
3488
|
+
return /* @__PURE__ */ jsx41(ToastContext.Provider, { value: value3, children: /* @__PURE__ */ jsxs33(RadixToast.Provider, { duration, label: label6, swipeDirection: "right", children: [
|
|
3365
3489
|
children,
|
|
3366
|
-
toasts.map(({ id, open, title: title6, description: description7, color, duration: itemDuration, action: action3 }) => /* @__PURE__ */
|
|
3490
|
+
toasts.map(({ id, open, title: title6, description: description7, color, duration: itemDuration, action: action3 }) => /* @__PURE__ */ jsxs33(
|
|
3367
3491
|
RadixToast.Root,
|
|
3368
3492
|
{
|
|
3369
3493
|
open,
|
|
@@ -3373,15 +3497,15 @@ function ToastProvider({ children, duration = 5e3, label: labelProp }) {
|
|
|
3373
3497
|
},
|
|
3374
3498
|
className: toast({ color }),
|
|
3375
3499
|
children: [
|
|
3376
|
-
/* @__PURE__ */
|
|
3377
|
-
description7 && /* @__PURE__ */
|
|
3378
|
-
action3 && /* @__PURE__ */
|
|
3379
|
-
/* @__PURE__ */
|
|
3500
|
+
/* @__PURE__ */ jsx41(RadixToast.Title, { className: title5, children: title6 }),
|
|
3501
|
+
description7 && /* @__PURE__ */ jsx41(RadixToast.Description, { className: description6, children: description7 }),
|
|
3502
|
+
action3 && /* @__PURE__ */ jsx41(RadixToast.Action, { asChild: true, altText: action3.altText ?? action3.label, className: action2, children: /* @__PURE__ */ jsx41(Button, { size: "sm", variant: "soft", color: "neutral", onClick: action3.onClick, children: action3.label }) }),
|
|
3503
|
+
/* @__PURE__ */ jsx41(RadixToast.Close, { className: close, "aria-label": m.close ?? "\uB2EB\uAE30", children: /* @__PURE__ */ jsx41(XIcon7, { size: 16 }) })
|
|
3380
3504
|
]
|
|
3381
3505
|
},
|
|
3382
3506
|
id
|
|
3383
3507
|
)),
|
|
3384
|
-
/* @__PURE__ */
|
|
3508
|
+
/* @__PURE__ */ jsx41(RadixToast.Viewport, { className: cx(portal2.className, viewport2), style: portal2.style })
|
|
3385
3509
|
] }) });
|
|
3386
3510
|
}
|
|
3387
3511
|
function useToast() {
|
|
@@ -3398,7 +3522,7 @@ var arrow2 = "z7rufs1";
|
|
|
3398
3522
|
var content11 = "z7rufs0";
|
|
3399
3523
|
|
|
3400
3524
|
// src/components/Tooltip/Tooltip.tsx
|
|
3401
|
-
import { jsx as
|
|
3525
|
+
import { jsx as jsx42, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
3402
3526
|
function Tooltip({
|
|
3403
3527
|
content: content12,
|
|
3404
3528
|
children,
|
|
@@ -3413,9 +3537,9 @@ function Tooltip({
|
|
|
3413
3537
|
}) {
|
|
3414
3538
|
const portal2 = usePortalProps();
|
|
3415
3539
|
if (disabled || content12 == null || content12 === "") return children;
|
|
3416
|
-
return /* @__PURE__ */
|
|
3417
|
-
/* @__PURE__ */
|
|
3418
|
-
/* @__PURE__ */
|
|
3540
|
+
return /* @__PURE__ */ jsx42(RadixTooltip.Provider, { delayDuration: delay, children: /* @__PURE__ */ jsxs34(RadixTooltip.Root, { open, defaultOpen, onOpenChange, children: [
|
|
3541
|
+
/* @__PURE__ */ jsx42(RadixTooltip.Trigger, { asChild: true, children }),
|
|
3542
|
+
/* @__PURE__ */ jsx42(RadixTooltip.Portal, { children: /* @__PURE__ */ jsxs34(
|
|
3419
3543
|
RadixTooltip.Content,
|
|
3420
3544
|
{
|
|
3421
3545
|
side,
|
|
@@ -3426,7 +3550,7 @@ function Tooltip({
|
|
|
3426
3550
|
style: portal2.style,
|
|
3427
3551
|
children: [
|
|
3428
3552
|
content12,
|
|
3429
|
-
/* @__PURE__ */
|
|
3553
|
+
/* @__PURE__ */ jsx42(RadixTooltip.Arrow, { className: arrow2, width: 10, height: 5 })
|
|
3430
3554
|
]
|
|
3431
3555
|
}
|
|
3432
3556
|
) })
|
|
@@ -3434,7 +3558,7 @@ function Tooltip({
|
|
|
3434
3558
|
}
|
|
3435
3559
|
|
|
3436
3560
|
// src/components/VerificationCodeInput/VerificationCodeInput.tsx
|
|
3437
|
-
import { forwardRef as
|
|
3561
|
+
import { forwardRef as forwardRef37, useEffect as useEffect10, useId as useId18, useRef as useRef17, useState as useState17 } from "react";
|
|
3438
3562
|
|
|
3439
3563
|
// src/components/VerificationCodeInput/VerificationCodeInput.css.ts
|
|
3440
3564
|
var input5 = "ea01812";
|
|
@@ -3444,9 +3568,9 @@ var slots = "ea01811";
|
|
|
3444
3568
|
var timer = "ea01814";
|
|
3445
3569
|
|
|
3446
3570
|
// src/components/VerificationCodeInput/VerificationCodeInput.tsx
|
|
3447
|
-
import { jsx as
|
|
3571
|
+
import { jsx as jsx43, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
3448
3572
|
var formatTime = (seconds) => `${String(Math.floor(seconds / 60)).padStart(2, "0")}:${String(seconds % 60).padStart(2, "0")}`;
|
|
3449
|
-
var VerificationCodeInput = /* @__PURE__ */
|
|
3573
|
+
var VerificationCodeInput = /* @__PURE__ */ forwardRef37(
|
|
3450
3574
|
function VerificationCodeInput2(props, ref) {
|
|
3451
3575
|
const {
|
|
3452
3576
|
length = 6,
|
|
@@ -3473,17 +3597,17 @@ var VerificationCodeInput = /* @__PURE__ */ forwardRef36(
|
|
|
3473
3597
|
const label6 = labelProp ?? m.verificationCode ?? "\uC778\uC99D\uBC88\uD638";
|
|
3474
3598
|
const resendText = resendTextProp ?? m.resend ?? "\uC7AC\uC804\uC1A1";
|
|
3475
3599
|
const expiredText = expiredTextProp ?? m.verificationExpired ?? "\uC778\uC99D \uC2DC\uAC04\uC774 \uC9C0\uB0AC\uC5B4\uC694. \uC7AC\uC804\uC1A1\uD574 \uC8FC\uC138\uC694.";
|
|
3476
|
-
const generatedId =
|
|
3600
|
+
const generatedId = useId18();
|
|
3477
3601
|
const inputId = id ?? generatedId;
|
|
3478
3602
|
const helperId = `${inputId}-helper`;
|
|
3479
3603
|
const statusId = `${inputId}-status`;
|
|
3480
3604
|
const inputRef = useRef17(null);
|
|
3481
3605
|
const isControlled = "value" in props;
|
|
3482
|
-
const [innerValue, setInnerValue] =
|
|
3606
|
+
const [innerValue, setInnerValue] = useState17(defaultValue ?? "");
|
|
3483
3607
|
const code = (isControlled ? value3 ?? "" : innerValue).slice(0, length);
|
|
3484
|
-
const [focused, setFocused] =
|
|
3485
|
-
const [endAt, setEndAt] =
|
|
3486
|
-
const [remaining, setRemaining] =
|
|
3608
|
+
const [focused, setFocused] = useState17(false);
|
|
3609
|
+
const [endAt, setEndAt] = useState17(() => expiresIn ? Date.now() + expiresIn * 1e3 : null);
|
|
3610
|
+
const [remaining, setRemaining] = useState17(expiresIn ?? 0);
|
|
3487
3611
|
const expired = expiresIn !== void 0 && remaining <= 0;
|
|
3488
3612
|
const onExpireRef = useRef17(onExpire);
|
|
3489
3613
|
useEffect10(() => {
|
|
@@ -3524,17 +3648,17 @@ var VerificationCodeInput = /* @__PURE__ */ forwardRef36(
|
|
|
3524
3648
|
};
|
|
3525
3649
|
const description7 = helperText3 ?? m.verificationCodeHint?.(length, type) ?? `${length}\uC790\uB9AC ${type === "numeric" ? "\uC22B\uC790" : "\uBB38\uC790"}\uB97C \uC785\uB825\uD558\uC138\uC694.`;
|
|
3526
3650
|
const activeIndex = Math.min(code.length, length - 1);
|
|
3527
|
-
return /* @__PURE__ */
|
|
3651
|
+
return /* @__PURE__ */ jsxs35(
|
|
3528
3652
|
"div",
|
|
3529
3653
|
{
|
|
3530
3654
|
className: cx(field, className),
|
|
3531
3655
|
"data-invalid": error || void 0,
|
|
3532
3656
|
"data-disabled": disabled || void 0,
|
|
3533
3657
|
children: [
|
|
3534
|
-
/* @__PURE__ */
|
|
3535
|
-
/* @__PURE__ */
|
|
3536
|
-
/* @__PURE__ */
|
|
3537
|
-
/* @__PURE__ */
|
|
3658
|
+
/* @__PURE__ */ jsx43("label", { htmlFor: inputId, className: label, children: label6 }),
|
|
3659
|
+
/* @__PURE__ */ jsxs35("div", { className: row4, children: [
|
|
3660
|
+
/* @__PURE__ */ jsxs35("div", { className: slots, children: [
|
|
3661
|
+
/* @__PURE__ */ jsx43(
|
|
3538
3662
|
"input",
|
|
3539
3663
|
{
|
|
3540
3664
|
ref: mergeRefs(ref, inputRef),
|
|
@@ -3554,7 +3678,7 @@ var VerificationCodeInput = /* @__PURE__ */ forwardRef36(
|
|
|
3554
3678
|
className: input5
|
|
3555
3679
|
}
|
|
3556
3680
|
),
|
|
3557
|
-
Array.from({ length }, (_, index) => /* @__PURE__ */
|
|
3681
|
+
Array.from({ length }, (_, index) => /* @__PURE__ */ jsx43(
|
|
3558
3682
|
"div",
|
|
3559
3683
|
{
|
|
3560
3684
|
className: slot,
|
|
@@ -3565,12 +3689,12 @@ var VerificationCodeInput = /* @__PURE__ */ forwardRef36(
|
|
|
3565
3689
|
index
|
|
3566
3690
|
))
|
|
3567
3691
|
] }),
|
|
3568
|
-
expiresIn !== void 0 && /* @__PURE__ */
|
|
3569
|
-
onResend && /* @__PURE__ */
|
|
3692
|
+
expiresIn !== void 0 && /* @__PURE__ */ jsx43("span", { role: "timer", className: timer, children: formatTime(remaining) }),
|
|
3693
|
+
onResend && /* @__PURE__ */ jsx43(Button, { size: "sm", variant: "outline", color: "neutral", onClick: resend, disabled, children: resendText })
|
|
3570
3694
|
] }),
|
|
3571
|
-
/* @__PURE__ */
|
|
3572
|
-
/* @__PURE__ */
|
|
3573
|
-
name && /* @__PURE__ */
|
|
3695
|
+
/* @__PURE__ */ jsx43("p", { id: helperId, className: helperText({ error }), children: description7 }),
|
|
3696
|
+
/* @__PURE__ */ jsx43("p", { id: statusId, role: "status", className: helperText({ error: true }), children: expired ? expiredText : "" }),
|
|
3697
|
+
name && /* @__PURE__ */ jsx43("input", { type: "hidden", name, value: code })
|
|
3574
3698
|
]
|
|
3575
3699
|
}
|
|
3576
3700
|
);
|
|
@@ -3591,6 +3715,7 @@ export {
|
|
|
3591
3715
|
Checkbox,
|
|
3592
3716
|
Combobox,
|
|
3593
3717
|
DatePicker,
|
|
3718
|
+
DateRangePicker,
|
|
3594
3719
|
Drawer,
|
|
3595
3720
|
DrawerClose,
|
|
3596
3721
|
DropdownMenu,
|