@bestow-ui/react 1.6.0 → 1.6.1
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 +3 -0
- package/dist/client.js +196 -177
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +216 -197
- package/dist/index.cjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1794,12 +1794,26 @@ var Breadcrumb = /* @__PURE__ */ (0, import_react27.forwardRef)(function Breadcr
|
|
|
1794
1794
|
});
|
|
1795
1795
|
|
|
1796
1796
|
// src/components/BusinessNumberInput/BusinessNumberInput.tsx
|
|
1797
|
-
var
|
|
1797
|
+
var import_react29 = require("react");
|
|
1798
1798
|
var import_korean_utils4 = require("@bestow-ui/korean-utils");
|
|
1799
|
+
|
|
1800
|
+
// src/utils/useDelayedAnnouncement.ts
|
|
1801
|
+
var import_react28 = require("react");
|
|
1802
|
+
var ANNOUNCE_DELAY = 800;
|
|
1803
|
+
function useDelayedAnnouncement(message, delay = ANNOUNCE_DELAY) {
|
|
1804
|
+
const [announced, setAnnounced] = (0, import_react28.useState)("");
|
|
1805
|
+
(0, import_react28.useEffect)(() => {
|
|
1806
|
+
const timer2 = setTimeout(() => setAnnounced(message), message ? delay : 0);
|
|
1807
|
+
return () => clearTimeout(timer2);
|
|
1808
|
+
}, [message, delay]);
|
|
1809
|
+
return message && announced === message ? message : "";
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
// src/components/BusinessNumberInput/BusinessNumberInput.tsx
|
|
1799
1813
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1800
1814
|
var sanitize = (input6) => input6.replace(/\D/g, "").slice(0, 10);
|
|
1801
1815
|
var isDigit2 = (char) => /\d/.test(char);
|
|
1802
|
-
var BusinessNumberInput = /* @__PURE__ */ (0,
|
|
1816
|
+
var BusinessNumberInput = /* @__PURE__ */ (0, import_react29.forwardRef)(
|
|
1803
1817
|
function BusinessNumberInput2(props, ref) {
|
|
1804
1818
|
const {
|
|
1805
1819
|
value: value4,
|
|
@@ -1815,12 +1829,12 @@ var BusinessNumberInput = /* @__PURE__ */ (0, import_react28.forwardRef)(
|
|
|
1815
1829
|
onKeyDown,
|
|
1816
1830
|
...rest
|
|
1817
1831
|
} = props;
|
|
1818
|
-
const inputRef = (0,
|
|
1832
|
+
const inputRef = (0, import_react29.useRef)(null);
|
|
1819
1833
|
const m = useMessages();
|
|
1820
1834
|
const invalidText = invalidTextProp ?? m.businessNumberInvalid ?? "\uC62C\uBC14\uB978 \uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638\uAC00 \uC544\uB2C8\uC5D0\uC694. \uBC88\uD638\uB97C \uB2E4\uC2DC \uD655\uC778\uD574 \uC8FC\uC138\uC694.";
|
|
1821
1835
|
const label7 = labelProp ?? m.businessNumber ?? "\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638";
|
|
1822
1836
|
const incompleteText = m.businessNumberIncomplete ?? "10\uC790\uB9AC\uB97C \uBAA8\uB450 \uC785\uB825\uD574 \uC8FC\uC138\uC694.";
|
|
1823
|
-
const [touched, setTouched] = (0,
|
|
1837
|
+
const [touched, setTouched] = (0, import_react29.useState)(false);
|
|
1824
1838
|
const field4 = useFormattedInput({
|
|
1825
1839
|
isControlled: "value" in props,
|
|
1826
1840
|
value: value4,
|
|
@@ -1834,42 +1848,46 @@ var BusinessNumberInput = /* @__PURE__ */ (0, import_react28.forwardRef)(
|
|
|
1834
1848
|
const complete = field4.raw.length === 10;
|
|
1835
1849
|
const autoInvalid = validate && field4.raw.length > 0 && (complete ? !(0, import_korean_utils4.isValidBusinessNumber)(field4.raw) : touched);
|
|
1836
1850
|
const showAuto = autoInvalid && error === void 0;
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
field4.
|
|
1848
|
-
onKeyDown
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
onBlur
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1851
|
+
const announcement = useDelayedAnnouncement(showAuto && complete ? invalidText : "");
|
|
1852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
1853
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1854
|
+
TextField,
|
|
1855
|
+
{
|
|
1856
|
+
ref: mergeRefs(ref, inputRef),
|
|
1857
|
+
label: label7,
|
|
1858
|
+
placeholder,
|
|
1859
|
+
inputMode: "numeric",
|
|
1860
|
+
value: field4.display,
|
|
1861
|
+
onChange: field4.onChange,
|
|
1862
|
+
onKeyDown: (event) => {
|
|
1863
|
+
field4.onKeyDown(event);
|
|
1864
|
+
onKeyDown?.(event);
|
|
1865
|
+
},
|
|
1866
|
+
onBlur: (event) => {
|
|
1867
|
+
setTouched(true);
|
|
1868
|
+
onBlur?.(event);
|
|
1869
|
+
},
|
|
1870
|
+
error: error ?? autoInvalid,
|
|
1871
|
+
helperText: showAuto ? complete ? invalidText : incompleteText : helperText3,
|
|
1872
|
+
...rest
|
|
1873
|
+
}
|
|
1874
|
+
),
|
|
1875
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { role: "status", className: visuallyHidden, children: announcement })
|
|
1876
|
+
] });
|
|
1859
1877
|
}
|
|
1860
1878
|
);
|
|
1861
1879
|
|
|
1862
1880
|
// src/components/Calendar/Calendar.tsx
|
|
1863
|
-
var
|
|
1881
|
+
var import_react32 = require("react");
|
|
1864
1882
|
var import_icons9 = require("@bestow-ui/icons");
|
|
1865
1883
|
var import_korean_utils5 = require("@bestow-ui/korean-utils");
|
|
1866
1884
|
|
|
1867
1885
|
// src/utils/useIsClient.ts
|
|
1868
|
-
var
|
|
1886
|
+
var import_react30 = require("react");
|
|
1869
1887
|
var subscribeNothing = () => () => {
|
|
1870
1888
|
};
|
|
1871
1889
|
function useIsClient() {
|
|
1872
|
-
return (0,
|
|
1890
|
+
return (0, import_react30.useSyncExternalStore)(
|
|
1873
1891
|
subscribeNothing,
|
|
1874
1892
|
() => true,
|
|
1875
1893
|
() => false
|
|
@@ -1877,7 +1895,7 @@ function useIsClient() {
|
|
|
1877
1895
|
}
|
|
1878
1896
|
|
|
1879
1897
|
// src/components/IconButton/IconButton.tsx
|
|
1880
|
-
var
|
|
1898
|
+
var import_react31 = require("react");
|
|
1881
1899
|
|
|
1882
1900
|
// src/components/IconButton/IconButton.css.ts
|
|
1883
1901
|
var import_createRuntimeFn17 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
@@ -1885,7 +1903,7 @@ var iconButton = /* @__PURE__ */ (0, import_createRuntimeFn17.createRuntimeFn)({
|
|
|
1885
1903
|
|
|
1886
1904
|
// src/components/IconButton/IconButton.tsx
|
|
1887
1905
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1888
|
-
var IconButton = /* @__PURE__ */ (0,
|
|
1906
|
+
var IconButton = /* @__PURE__ */ (0, import_react31.forwardRef)(function IconButton2({ variant = "ghost", color = "neutral", size, loading: loading2, className, children, ...rest }, ref) {
|
|
1889
1907
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1890
1908
|
Button,
|
|
1891
1909
|
{
|
|
@@ -1912,7 +1930,7 @@ var weekday = "_1qyq67b4";
|
|
|
1912
1930
|
|
|
1913
1931
|
// src/components/Calendar/Calendar.tsx
|
|
1914
1932
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1915
|
-
var Calendar = /* @__PURE__ */ (0,
|
|
1933
|
+
var Calendar = /* @__PURE__ */ (0, import_react32.forwardRef)(function Calendar2(props, ref) {
|
|
1916
1934
|
const {
|
|
1917
1935
|
value: value4,
|
|
1918
1936
|
defaultValue,
|
|
@@ -1932,10 +1950,10 @@ var Calendar = /* @__PURE__ */ (0, import_react31.forwardRef)(function Calendar2
|
|
|
1932
1950
|
const nextMonthLabel = nextMonthLabelProp ?? m.nextMonth ?? "\uB2E4\uC74C \uB2EC";
|
|
1933
1951
|
const weekdaysShort = m.weekdaysShort ?? import_korean_utils5.KOREAN_WEEKDAYS;
|
|
1934
1952
|
const weekdaysLong = m.weekdaysLong ?? import_korean_utils5.KOREAN_WEEKDAYS.map((name) => `${name}\uC694\uC77C`);
|
|
1935
|
-
const headingId = (0,
|
|
1936
|
-
const gridRef = (0,
|
|
1953
|
+
const headingId = (0, import_react32.useId)();
|
|
1954
|
+
const gridRef = (0, import_react32.useRef)(null);
|
|
1937
1955
|
const isControlled = "value" in props;
|
|
1938
|
-
const [innerValue, setInnerValue] = (0,
|
|
1956
|
+
const [innerValue, setInnerValue] = (0, import_react32.useState)(defaultValue ?? "");
|
|
1939
1957
|
const selected = parseISODate(isControlled ? value4 : innerValue);
|
|
1940
1958
|
const isClient = useIsClient();
|
|
1941
1959
|
const today = parseISODate(todayProp) ?? (isClient ? /* @__PURE__ */ new Date() : null);
|
|
@@ -1947,16 +1965,16 @@ var Calendar = /* @__PURE__ */ (0, import_react31.forwardRef)(function Calendar2
|
|
|
1947
1965
|
return date;
|
|
1948
1966
|
};
|
|
1949
1967
|
const isDisabled = (date) => minDate !== null && compareDays(date, minDate) < 0 || maxDate !== null && compareDays(date, maxDate) > 0 || !!isDateDisabled?.(date);
|
|
1950
|
-
const [focusedState, setFocused] = (0,
|
|
1968
|
+
const [focusedState, setFocused] = (0, import_react32.useState)(null);
|
|
1951
1969
|
const base = selected ?? today;
|
|
1952
1970
|
const focused = focusedState ?? (base ? clamp(base) : null);
|
|
1953
|
-
const moveFocus = (0,
|
|
1971
|
+
const moveFocus = (0, import_react32.useRef)(initialFocus ?? false);
|
|
1954
1972
|
const selectedIso = selected ? toISODate(selected) : "";
|
|
1955
|
-
(0,
|
|
1973
|
+
(0, import_react32.useEffect)(() => {
|
|
1956
1974
|
const date = parseISODate(selectedIso);
|
|
1957
1975
|
if (date) setFocused((prev) => isSameDay(prev, date) ? prev : date);
|
|
1958
1976
|
}, [selectedIso]);
|
|
1959
|
-
(0,
|
|
1977
|
+
(0, import_react32.useEffect)(() => {
|
|
1960
1978
|
if (!moveFocus.current || !focused) return;
|
|
1961
1979
|
moveFocus.current = false;
|
|
1962
1980
|
gridRef.current?.querySelector(`[data-date="${toISODate(focused)}"]`)?.focus();
|
|
@@ -2060,7 +2078,7 @@ var Calendar = /* @__PURE__ */ (0, import_react31.forwardRef)(function Calendar2
|
|
|
2060
2078
|
|
|
2061
2079
|
// src/components/Combobox/Combobox.tsx
|
|
2062
2080
|
var Popover = __toESM(require("@radix-ui/react-popover"), 1);
|
|
2063
|
-
var
|
|
2081
|
+
var import_react33 = require("react");
|
|
2064
2082
|
var import_icons10 = require("@bestow-ui/icons");
|
|
2065
2083
|
|
|
2066
2084
|
// src/components/Select/Select.css.ts
|
|
@@ -2080,9 +2098,8 @@ var toggle2 = "c2pbq71 c2pbq70";
|
|
|
2080
2098
|
|
|
2081
2099
|
// src/components/Combobox/Combobox.tsx
|
|
2082
2100
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2083
|
-
var NO_RESULTS_ANNOUNCE_DELAY = 800;
|
|
2084
2101
|
var defaultFilter = (option2, query) => option2.label.toLowerCase().includes(query.trim().toLowerCase());
|
|
2085
|
-
var Combobox = /* @__PURE__ */ (0,
|
|
2102
|
+
var Combobox = /* @__PURE__ */ (0, import_react33.forwardRef)(function Combobox2(props, ref) {
|
|
2086
2103
|
const {
|
|
2087
2104
|
options,
|
|
2088
2105
|
value: value4,
|
|
@@ -2110,23 +2127,23 @@ var Combobox = /* @__PURE__ */ (0, import_react32.forwardRef)(function Combobox2
|
|
|
2110
2127
|
const emptyMessage = emptyMessageProp ?? m.noResults ?? "\uACB0\uACFC\uAC00 \uC5C6\uC5B4\uC694";
|
|
2111
2128
|
const toggleLabel = toggleLabelProp ?? m.openList ?? "\uBAA9\uB85D \uC5F4\uAE30";
|
|
2112
2129
|
const clearLabel = clearLabelProp ?? m.clearSelection ?? "\uC120\uD0DD \uC9C0\uC6B0\uAE30";
|
|
2113
|
-
const generatedId = (0,
|
|
2130
|
+
const generatedId = (0, import_react33.useId)();
|
|
2114
2131
|
const inputId = id ?? generatedId;
|
|
2115
2132
|
const labelId = `${inputId}-label`;
|
|
2116
2133
|
const listId = `${inputId}-listbox`;
|
|
2117
2134
|
const helperId = helperText3 ? `${inputId}-helper` : void 0;
|
|
2118
2135
|
const optionId = (index) => `${inputId}-option-${index}`;
|
|
2119
2136
|
const portal2 = usePortalProps();
|
|
2120
|
-
const inputRef = (0,
|
|
2121
|
-
const anchorRef = (0,
|
|
2137
|
+
const inputRef = (0, import_react33.useRef)(null);
|
|
2138
|
+
const anchorRef = (0, import_react33.useRef)(null);
|
|
2122
2139
|
const isControlled = "value" in props;
|
|
2123
|
-
const [innerValue, setInnerValue] = (0,
|
|
2140
|
+
const [innerValue, setInnerValue] = (0, import_react33.useState)(defaultValue);
|
|
2124
2141
|
const selectedValue = isControlled ? value4 : innerValue;
|
|
2125
2142
|
const selectedOption = options.find((o) => o.value === selectedValue);
|
|
2126
|
-
const [open, setOpen] = (0,
|
|
2127
|
-
const [query, setQuery] = (0,
|
|
2128
|
-
const [activeIndex, setActiveIndex] = (0,
|
|
2129
|
-
const filtered = (0,
|
|
2143
|
+
const [open, setOpen] = (0, import_react33.useState)(false);
|
|
2144
|
+
const [query, setQuery] = (0, import_react33.useState)(null);
|
|
2145
|
+
const [activeIndex, setActiveIndex] = (0, import_react33.useState)(-1);
|
|
2146
|
+
const filtered = (0, import_react33.useMemo)(() => query ? options.filter((o) => filter(o, query)) : options, [options, filter, query]);
|
|
2130
2147
|
const inputText = query ?? selectedOption?.label ?? "";
|
|
2131
2148
|
const firstEnabled = (list7, from = 0, step2 = 1) => {
|
|
2132
2149
|
for (let i = from; i >= 0 && i < list7.length; i += step2) if (!list7[i].disabled) return i;
|
|
@@ -2201,16 +2218,16 @@ var Combobox = /* @__PURE__ */ (0, import_react32.forwardRef)(function Combobox2
|
|
|
2201
2218
|
break;
|
|
2202
2219
|
}
|
|
2203
2220
|
};
|
|
2204
|
-
(0,
|
|
2221
|
+
(0, import_react33.useEffect)(() => {
|
|
2205
2222
|
if (!open || activeIndex < 0) return;
|
|
2206
2223
|
document.getElementById(optionId(activeIndex))?.scrollIntoView?.({ block: "nearest" });
|
|
2207
2224
|
}, [open, activeIndex]);
|
|
2208
2225
|
const hasOptions = filtered.length > 0;
|
|
2209
2226
|
const noResults = open && !disabled && !hasOptions;
|
|
2210
|
-
const [announcedFor, setAnnouncedFor] = (0,
|
|
2211
|
-
(0,
|
|
2227
|
+
const [announcedFor, setAnnouncedFor] = (0, import_react33.useState)(void 0);
|
|
2228
|
+
(0, import_react33.useEffect)(() => {
|
|
2212
2229
|
if (!noResults) return;
|
|
2213
|
-
const timer2 = setTimeout(() => setAnnouncedFor(query),
|
|
2230
|
+
const timer2 = setTimeout(() => setAnnouncedFor(query), ANNOUNCE_DELAY);
|
|
2214
2231
|
return () => clearTimeout(timer2);
|
|
2215
2232
|
}, [noResults, query]);
|
|
2216
2233
|
const announceNoResults = noResults && announcedFor === query;
|
|
@@ -2357,13 +2374,13 @@ var Combobox = /* @__PURE__ */ (0, import_react32.forwardRef)(function Combobox2
|
|
|
2357
2374
|
});
|
|
2358
2375
|
|
|
2359
2376
|
// src/components/DatePicker/DatePicker.tsx
|
|
2360
|
-
var
|
|
2377
|
+
var import_react35 = require("react");
|
|
2361
2378
|
var import_icons12 = require("@bestow-ui/icons");
|
|
2362
2379
|
|
|
2363
2380
|
// src/components/Popover/Popover.tsx
|
|
2364
2381
|
var RadixPopover = __toESM(require("@radix-ui/react-popover"), 1);
|
|
2365
2382
|
var import_icons11 = require("@bestow-ui/icons");
|
|
2366
|
-
var
|
|
2383
|
+
var import_react34 = require("react");
|
|
2367
2384
|
|
|
2368
2385
|
// src/components/Popover/Popover.css.ts
|
|
2369
2386
|
var arrow = "_1j99p8x4";
|
|
@@ -2393,7 +2410,7 @@ function Popover2({
|
|
|
2393
2410
|
}) {
|
|
2394
2411
|
const portal2 = usePortalProps();
|
|
2395
2412
|
const m = useMessages();
|
|
2396
|
-
const titleId = (0,
|
|
2413
|
+
const titleId = (0, import_react34.useId)();
|
|
2397
2414
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(RadixPopover.Root, { open, defaultOpen, onOpenChange, modal, children: [
|
|
2398
2415
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(RadixPopover.Trigger, { asChild: true, children }),
|
|
2399
2416
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(RadixPopover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
@@ -2427,7 +2444,7 @@ var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
|
2427
2444
|
var sanitize2 = (input6) => input6.replace(/\D/g, "").slice(0, 8);
|
|
2428
2445
|
var format = (digits) => digits.length <= 4 ? digits : digits.length <= 6 ? `${digits.slice(0, 4)}-${digits.slice(4)}` : `${digits.slice(0, 4)}-${digits.slice(4, 6)}-${digits.slice(6)}`;
|
|
2429
2446
|
var isDigit3 = (char) => /\d/.test(char);
|
|
2430
|
-
var DatePicker = /* @__PURE__ */ (0,
|
|
2447
|
+
var DatePicker = /* @__PURE__ */ (0, import_react35.forwardRef)(
|
|
2431
2448
|
function DatePicker2(props, ref) {
|
|
2432
2449
|
const {
|
|
2433
2450
|
value: value4,
|
|
@@ -2453,17 +2470,17 @@ var DatePicker = /* @__PURE__ */ (0, import_react34.forwardRef)(
|
|
|
2453
2470
|
id,
|
|
2454
2471
|
className
|
|
2455
2472
|
} = props;
|
|
2456
|
-
const inputRef = (0,
|
|
2473
|
+
const inputRef = (0, import_react35.useRef)(null);
|
|
2457
2474
|
const m = useMessages();
|
|
2458
2475
|
const label7 = labelProp ?? m.date ?? "\uB0A0\uC9DC";
|
|
2459
2476
|
const calendarLabel = calendarLabelProp ?? m.openCalendar ?? "\uB2EC\uB825 \uC5F4\uAE30";
|
|
2460
2477
|
const invalidText = invalidTextProp ?? m.dateInvalid ?? "\uC62C\uBC14\uB978 \uB0A0\uC9DC\uAC00 \uC544\uB2C8\uC5D0\uC694.";
|
|
2461
2478
|
const unavailableText = unavailableTextProp ?? m.dateUnavailable ?? "\uACE0\uB97C \uC218 \uC5C6\uB294 \uB0A0\uC9DC\uC608\uC694.";
|
|
2462
2479
|
const incompleteText = incompleteTextProp ?? m.dateIncomplete ?? "\uB0A0\uC9DC\uB97C YYYY-MM-DD \uD615\uC2DD\uC73C\uB85C \uC785\uB825\uD574 \uC8FC\uC138\uC694.";
|
|
2463
|
-
const [open, setOpen] = (0,
|
|
2464
|
-
const [touched, setTouched] = (0,
|
|
2480
|
+
const [open, setOpen] = (0, import_react35.useState)(false);
|
|
2481
|
+
const [touched, setTouched] = (0, import_react35.useState)(false);
|
|
2465
2482
|
const isControlled = "value" in props;
|
|
2466
|
-
const lastEmitted = (0,
|
|
2483
|
+
const lastEmitted = (0, import_react35.useRef)(isControlled ? value4 ?? "" : defaultValue ?? "");
|
|
2467
2484
|
const minDate = parseISODate(min);
|
|
2468
2485
|
const maxDate = parseISODate(max);
|
|
2469
2486
|
const toIso = (digits) => digits.length === 8 ? `${digits.slice(0, 4)}-${digits.slice(4, 6)}-${digits.slice(6)}` : "";
|
|
@@ -2488,7 +2505,7 @@ var DatePicker = /* @__PURE__ */ (0, import_react34.forwardRef)(
|
|
|
2488
2505
|
});
|
|
2489
2506
|
const textIso = toIso(field4.raw);
|
|
2490
2507
|
const { setRaw } = field4;
|
|
2491
|
-
(0,
|
|
2508
|
+
(0, import_react35.useEffect)(() => {
|
|
2492
2509
|
if (!isControlled) return;
|
|
2493
2510
|
const next = value4 ?? "";
|
|
2494
2511
|
lastEmitted.current = next;
|
|
@@ -2502,6 +2519,7 @@ var DatePicker = /* @__PURE__ */ (0, import_react34.forwardRef)(
|
|
|
2502
2519
|
const complete = field4.raw.length === 8;
|
|
2503
2520
|
const autoError = complete ? !date ? invalidText : isUnavailable(date) ? unavailableText : null : touched && field4.raw.length > 0 ? incompleteText : null;
|
|
2504
2521
|
const showAuto = autoError !== null && error === void 0;
|
|
2522
|
+
const announcement = useDelayedAnnouncement(showAuto && complete ? autoError ?? "" : "");
|
|
2505
2523
|
const selectedIso = date && !isUnavailable(date) ? textIso : "";
|
|
2506
2524
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
|
|
2507
2525
|
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
@@ -2554,13 +2572,14 @@ var DatePicker = /* @__PURE__ */ (0, import_react34.forwardRef)(
|
|
|
2554
2572
|
)
|
|
2555
2573
|
}
|
|
2556
2574
|
),
|
|
2575
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { role: "status", className: visuallyHidden, children: announcement }),
|
|
2557
2576
|
name && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("input", { type: "hidden", name, value: selectedIso })
|
|
2558
2577
|
] });
|
|
2559
2578
|
}
|
|
2560
2579
|
);
|
|
2561
2580
|
|
|
2562
2581
|
// src/components/DateRangePicker/DateRangePicker.tsx
|
|
2563
|
-
var
|
|
2582
|
+
var import_react36 = require("react");
|
|
2564
2583
|
|
|
2565
2584
|
// src/components/DateRangePicker/DateRangePicker.css.ts
|
|
2566
2585
|
var field2 = "_17277dh3";
|
|
@@ -2572,7 +2591,7 @@ var separator2 = "_17277dh4";
|
|
|
2572
2591
|
|
|
2573
2592
|
// src/components/DateRangePicker/DateRangePicker.tsx
|
|
2574
2593
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2575
|
-
var DateRangePicker = /* @__PURE__ */ (0,
|
|
2594
|
+
var DateRangePicker = /* @__PURE__ */ (0, import_react36.forwardRef)(
|
|
2576
2595
|
function DateRangePicker2(props, ref) {
|
|
2577
2596
|
const {
|
|
2578
2597
|
value: value4,
|
|
@@ -2597,12 +2616,12 @@ var DateRangePicker = /* @__PURE__ */ (0, import_react35.forwardRef)(
|
|
|
2597
2616
|
className
|
|
2598
2617
|
} = props;
|
|
2599
2618
|
const m = useMessages();
|
|
2600
|
-
const generatedId = (0,
|
|
2619
|
+
const generatedId = (0, import_react36.useId)();
|
|
2601
2620
|
const baseId = id ?? generatedId;
|
|
2602
2621
|
const helperId = helperText3 ? `${baseId}-helper` : void 0;
|
|
2603
2622
|
const isClient = useIsClient();
|
|
2604
2623
|
const isControlled = "value" in props;
|
|
2605
|
-
const [inner, setInner] = (0,
|
|
2624
|
+
const [inner, setInner] = (0, import_react36.useState)(defaultValue ?? { start: "", end: "" });
|
|
2606
2625
|
const range3 = isControlled ? value4 ?? { start: "", end: "" } : inner;
|
|
2607
2626
|
const update = (next) => {
|
|
2608
2627
|
if (next.start === range3.start && next.end === range3.end) return;
|
|
@@ -2751,7 +2770,7 @@ function Drawer({
|
|
|
2751
2770
|
var DrawerClose = Dialog2.Close;
|
|
2752
2771
|
|
|
2753
2772
|
// src/components/ErrorSummary/ErrorSummary.tsx
|
|
2754
|
-
var
|
|
2773
|
+
var import_react37 = require("react");
|
|
2755
2774
|
|
|
2756
2775
|
// src/components/ErrorSummary/ErrorSummary.css.ts
|
|
2757
2776
|
var link3 = "_1cdophv2";
|
|
@@ -2760,12 +2779,12 @@ var root9 = "_1cdophv0";
|
|
|
2760
2779
|
|
|
2761
2780
|
// src/components/ErrorSummary/ErrorSummary.tsx
|
|
2762
2781
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2763
|
-
var ErrorSummary = /* @__PURE__ */ (0,
|
|
2782
|
+
var ErrorSummary = /* @__PURE__ */ (0, import_react37.forwardRef)(function ErrorSummary2({ errors: errors2, title: title6, focusKey, className, ...rest }, ref) {
|
|
2764
2783
|
const m = useMessages();
|
|
2765
|
-
const titleId = (0,
|
|
2766
|
-
const rootRef = (0,
|
|
2784
|
+
const titleId = (0, import_react37.useId)();
|
|
2785
|
+
const rootRef = (0, import_react37.useRef)(null);
|
|
2767
2786
|
const hasErrors = errors2.length > 0;
|
|
2768
|
-
(0,
|
|
2787
|
+
(0, import_react37.useEffect)(() => {
|
|
2769
2788
|
if (hasErrors) rootRef.current?.focus();
|
|
2770
2789
|
}, [focusKey, hasErrors]);
|
|
2771
2790
|
if (!hasErrors) return null;
|
|
@@ -2800,7 +2819,7 @@ var ErrorSummary = /* @__PURE__ */ (0, import_react36.forwardRef)(function Error
|
|
|
2800
2819
|
});
|
|
2801
2820
|
|
|
2802
2821
|
// src/components/FileUpload/FileUpload.tsx
|
|
2803
|
-
var
|
|
2822
|
+
var import_react38 = require("react");
|
|
2804
2823
|
var import_icons14 = require("@bestow-ui/icons");
|
|
2805
2824
|
|
|
2806
2825
|
// src/components/FileUpload/FileUpload.css.ts
|
|
@@ -2833,7 +2852,7 @@ function matchesAccept(file, accept) {
|
|
|
2833
2852
|
}
|
|
2834
2853
|
var NO_FILES = [];
|
|
2835
2854
|
var sameFile = (a, b) => a.name === b.name && a.size === b.size && a.lastModified === b.lastModified;
|
|
2836
|
-
var FileUpload = /* @__PURE__ */ (0,
|
|
2855
|
+
var FileUpload = /* @__PURE__ */ (0, import_react38.forwardRef)(function FileUpload2(props, ref) {
|
|
2837
2856
|
const {
|
|
2838
2857
|
value: value4,
|
|
2839
2858
|
defaultValue,
|
|
@@ -2854,22 +2873,22 @@ var FileUpload = /* @__PURE__ */ (0, import_react37.forwardRef)(function FileUpl
|
|
|
2854
2873
|
} = props;
|
|
2855
2874
|
const m = useMessages();
|
|
2856
2875
|
const isControlled = "value" in props;
|
|
2857
|
-
const [innerFiles, setInnerFiles] = (0,
|
|
2876
|
+
const [innerFiles, setInnerFiles] = (0, import_react38.useState)(defaultValue ?? []);
|
|
2858
2877
|
const files = isControlled ? value4 ?? NO_FILES : innerFiles;
|
|
2859
|
-
const [rejections, setRejections] = (0,
|
|
2860
|
-
const [announcement, setAnnouncement] = (0,
|
|
2861
|
-
const [dragging, setDragging] = (0,
|
|
2862
|
-
const generatedId = (0,
|
|
2878
|
+
const [rejections, setRejections] = (0, import_react38.useState)([]);
|
|
2879
|
+
const [announcement, setAnnouncement] = (0, import_react38.useState)("");
|
|
2880
|
+
const [dragging, setDragging] = (0, import_react38.useState)(false);
|
|
2881
|
+
const generatedId = (0, import_react38.useId)();
|
|
2863
2882
|
const baseId = id ?? generatedId;
|
|
2864
2883
|
const labelId = label7 ? `${baseId}-label` : void 0;
|
|
2865
2884
|
const helperId = helperText3 ? `${baseId}-helper` : void 0;
|
|
2866
2885
|
const errorsId = rejections.length > 0 ? `${baseId}-errors` : void 0;
|
|
2867
|
-
const inputRef = (0,
|
|
2868
|
-
const selectButtonRef = (0,
|
|
2869
|
-
const removeButtonRefs = (0,
|
|
2870
|
-
const focusAfterRemove = (0,
|
|
2871
|
-
const announceTimer = (0,
|
|
2872
|
-
(0,
|
|
2886
|
+
const inputRef = (0, import_react38.useRef)(null);
|
|
2887
|
+
const selectButtonRef = (0, import_react38.useRef)(null);
|
|
2888
|
+
const removeButtonRefs = (0, import_react38.useRef)([]);
|
|
2889
|
+
const focusAfterRemove = (0, import_react38.useRef)(null);
|
|
2890
|
+
const announceTimer = (0, import_react38.useRef)(void 0);
|
|
2891
|
+
(0, import_react38.useEffect)(() => () => clearTimeout(announceTimer.current), []);
|
|
2873
2892
|
const selectLabel = m.fileSelect ?? "\uD30C\uC77C \uC120\uD0DD";
|
|
2874
2893
|
const reasonText = (rejection) => {
|
|
2875
2894
|
const fileName2 = rejection.file.name;
|
|
@@ -2917,13 +2936,13 @@ var FileUpload = /* @__PURE__ */ (0, import_react37.forwardRef)(function FileUpl
|
|
|
2917
2936
|
setRejections([]);
|
|
2918
2937
|
commit(next, m.fileRemoved?.(removed.name) ?? `${removed.name} \uC0AD\uC81C\uB428`, REMOVED_ANNOUNCE_DELAY);
|
|
2919
2938
|
};
|
|
2920
|
-
(0,
|
|
2939
|
+
(0, import_react38.useEffect)(() => {
|
|
2921
2940
|
if (focusAfterRemove.current === null) return;
|
|
2922
2941
|
const target = focusAfterRemove.current;
|
|
2923
2942
|
focusAfterRemove.current = null;
|
|
2924
2943
|
(target >= 0 ? removeButtonRefs.current[target] : selectButtonRef.current)?.focus();
|
|
2925
2944
|
}, [files]);
|
|
2926
|
-
(0,
|
|
2945
|
+
(0, import_react38.useEffect)(() => {
|
|
2927
2946
|
const input6 = inputRef.current;
|
|
2928
2947
|
if (!name || !input6 || typeof DataTransfer === "undefined") return;
|
|
2929
2948
|
try {
|
|
@@ -3029,7 +3048,7 @@ var FileUpload = /* @__PURE__ */ (0, import_react37.forwardRef)(function FileUpl
|
|
|
3029
3048
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
3030
3049
|
var RadixMenu = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
|
|
3031
3050
|
var import_icons15 = require("@bestow-ui/icons");
|
|
3032
|
-
var
|
|
3051
|
+
var import_react39 = require("react");
|
|
3033
3052
|
|
|
3034
3053
|
// src/components/DropdownMenu/DropdownMenu.css.ts
|
|
3035
3054
|
var content9 = "_1d7ahux0";
|
|
@@ -3050,7 +3069,7 @@ var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
|
3050
3069
|
var DropdownMenu = RadixMenu.Root;
|
|
3051
3070
|
var DropdownMenuTrigger = RadixMenu.Trigger;
|
|
3052
3071
|
var DropdownMenuGroup = RadixMenu.Group;
|
|
3053
|
-
var DropdownMenuContent = /* @__PURE__ */ (0,
|
|
3072
|
+
var DropdownMenuContent = /* @__PURE__ */ (0, import_react39.forwardRef)(
|
|
3054
3073
|
function DropdownMenuContent2({ className, style, side = "bottom", align = "start", sideOffset = 4, collisionPadding = 8, ...rest }, ref) {
|
|
3055
3074
|
const portal2 = usePortalProps();
|
|
3056
3075
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(RadixMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
@@ -3068,7 +3087,7 @@ var DropdownMenuContent = /* @__PURE__ */ (0, import_react38.forwardRef)(
|
|
|
3068
3087
|
) });
|
|
3069
3088
|
}
|
|
3070
3089
|
);
|
|
3071
|
-
var DropdownMenuItem = /* @__PURE__ */ (0,
|
|
3090
|
+
var DropdownMenuItem = /* @__PURE__ */ (0, import_react39.forwardRef)(
|
|
3072
3091
|
function DropdownMenuItem2({ icon: icon8, shortcut: shortcut2, color = "neutral", className, children, ...rest }, ref) {
|
|
3073
3092
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(RadixMenu.Item, { ref, className: cx(item7, color === "danger" && danger, className), ...rest, children: [
|
|
3074
3093
|
icon8 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: icon5, "aria-hidden": true, children: icon8 }),
|
|
@@ -3077,17 +3096,17 @@ var DropdownMenuItem = /* @__PURE__ */ (0, import_react38.forwardRef)(
|
|
|
3077
3096
|
] });
|
|
3078
3097
|
}
|
|
3079
3098
|
);
|
|
3080
|
-
var DropdownMenuLabel = /* @__PURE__ */ (0,
|
|
3099
|
+
var DropdownMenuLabel = /* @__PURE__ */ (0, import_react39.forwardRef)(
|
|
3081
3100
|
function DropdownMenuLabel2({ className, ...rest }, ref) {
|
|
3082
3101
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(RadixMenu.Label, { ref, className: cx(label3, className), ...rest });
|
|
3083
3102
|
}
|
|
3084
3103
|
);
|
|
3085
|
-
var DropdownMenuSeparator = /* @__PURE__ */ (0,
|
|
3104
|
+
var DropdownMenuSeparator = /* @__PURE__ */ (0, import_react39.forwardRef)(
|
|
3086
3105
|
function DropdownMenuSeparator2({ className, ...rest }, ref) {
|
|
3087
3106
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(RadixMenu.Separator, { ref, className: cx(separator3, className), ...rest });
|
|
3088
3107
|
}
|
|
3089
3108
|
);
|
|
3090
|
-
var DropdownMenuCheckboxItem = /* @__PURE__ */ (0,
|
|
3109
|
+
var DropdownMenuCheckboxItem = /* @__PURE__ */ (0, import_react39.forwardRef)(
|
|
3091
3110
|
function DropdownMenuCheckboxItem2({ className, children, ...rest }, ref) {
|
|
3092
3111
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(RadixMenu.CheckboxItem, { ref, className: cx(item7, className), ...rest, children: [
|
|
3093
3112
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: indicator2, "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(RadixMenu.ItemIndicator, { className: indicatorInner, children: rest.checked === "indeterminate" ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons15.MinusIcon, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons15.CheckIcon, { size: 16 }) }) }),
|
|
@@ -3096,7 +3115,7 @@ var DropdownMenuCheckboxItem = /* @__PURE__ */ (0, import_react38.forwardRef)(
|
|
|
3096
3115
|
}
|
|
3097
3116
|
);
|
|
3098
3117
|
var DropdownMenuRadioGroup = RadixMenu.RadioGroup;
|
|
3099
|
-
var DropdownMenuRadioItem = /* @__PURE__ */ (0,
|
|
3118
|
+
var DropdownMenuRadioItem = /* @__PURE__ */ (0, import_react39.forwardRef)(
|
|
3100
3119
|
function DropdownMenuRadioItem2({ className, children, ...rest }, ref) {
|
|
3101
3120
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(RadixMenu.RadioItem, { ref, className: cx(item7, className), ...rest, children: [
|
|
3102
3121
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: indicator2, "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(RadixMenu.ItemIndicator, { className: indicatorInner, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: radioDot }) }) }),
|
|
@@ -3105,7 +3124,7 @@ var DropdownMenuRadioItem = /* @__PURE__ */ (0, import_react38.forwardRef)(
|
|
|
3105
3124
|
}
|
|
3106
3125
|
);
|
|
3107
3126
|
var DropdownMenuSub = RadixMenu.Sub;
|
|
3108
|
-
var DropdownMenuSubTrigger = /* @__PURE__ */ (0,
|
|
3127
|
+
var DropdownMenuSubTrigger = /* @__PURE__ */ (0, import_react39.forwardRef)(
|
|
3109
3128
|
function DropdownMenuSubTrigger2({ icon: icon8, className, children, ...rest }, ref) {
|
|
3110
3129
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(RadixMenu.SubTrigger, { ref, className: cx(item7, subTrigger, className), ...rest, children: [
|
|
3111
3130
|
icon8 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: icon5, "aria-hidden": true, children: icon8 }),
|
|
@@ -3114,7 +3133,7 @@ var DropdownMenuSubTrigger = /* @__PURE__ */ (0, import_react38.forwardRef)(
|
|
|
3114
3133
|
] });
|
|
3115
3134
|
}
|
|
3116
3135
|
);
|
|
3117
|
-
var DropdownMenuSubContent = /* @__PURE__ */ (0,
|
|
3136
|
+
var DropdownMenuSubContent = /* @__PURE__ */ (0, import_react39.forwardRef)(
|
|
3118
3137
|
function DropdownMenuSubContent2({ className, style, sideOffset = 4, alignOffset = -5, collisionPadding = 8, ...rest }, ref) {
|
|
3119
3138
|
const portal2 = usePortalProps();
|
|
3120
3139
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(RadixMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
@@ -3133,7 +3152,7 @@ var DropdownMenuSubContent = /* @__PURE__ */ (0, import_react38.forwardRef)(
|
|
|
3133
3152
|
);
|
|
3134
3153
|
|
|
3135
3154
|
// src/components/NumberInput/NumberInput.tsx
|
|
3136
|
-
var
|
|
3155
|
+
var import_react40 = require("react");
|
|
3137
3156
|
var import_icons16 = require("@bestow-ui/icons");
|
|
3138
3157
|
|
|
3139
3158
|
// src/components/NumberInput/NumberInput.css.ts
|
|
@@ -3149,7 +3168,7 @@ var MAX_DIGITS2 = 15;
|
|
|
3149
3168
|
var isMeaningful = (char) => /[\d.-]/.test(char);
|
|
3150
3169
|
var decimalsOf = (n) => Number.isFinite(n) ? String(n).split(".")[1]?.length ?? 0 : 0;
|
|
3151
3170
|
var parse = (raw) => /\d/.test(raw) ? Number(raw) : null;
|
|
3152
|
-
var NumberInput = /* @__PURE__ */ (0,
|
|
3171
|
+
var NumberInput = /* @__PURE__ */ (0, import_react40.forwardRef)(
|
|
3153
3172
|
function NumberInput2(props, ref) {
|
|
3154
3173
|
const {
|
|
3155
3174
|
value: value4,
|
|
@@ -3175,8 +3194,8 @@ var NumberInput = /* @__PURE__ */ (0, import_react39.forwardRef)(
|
|
|
3175
3194
|
} = props;
|
|
3176
3195
|
const isControlled = "value" in props;
|
|
3177
3196
|
const m = useMessages();
|
|
3178
|
-
const inputRef = (0,
|
|
3179
|
-
const generatedId = (0,
|
|
3197
|
+
const inputRef = (0, import_react40.useRef)(null);
|
|
3198
|
+
const generatedId = (0, import_react40.useId)();
|
|
3180
3199
|
const inputId = id ?? generatedId;
|
|
3181
3200
|
const precision = Math.max(0, precisionProp ?? decimalsOf(step2));
|
|
3182
3201
|
const allowNegative = min === void 0 || min < 0;
|
|
@@ -3196,7 +3215,7 @@ var NumberInput = /* @__PURE__ */ (0, import_react39.forwardRef)(
|
|
|
3196
3215
|
const [, sign = "", int = "", rest2 = ""] = raw.match(/^(-?)(\d*)(.*)$/) ?? [];
|
|
3197
3216
|
return `${sign}${int ? Number(int).toLocaleString("ko-KR") : ""}${rest2}`;
|
|
3198
3217
|
};
|
|
3199
|
-
const lastEmitted = (0,
|
|
3218
|
+
const lastEmitted = (0, import_react40.useRef)(parse(toRaw(isControlled ? value4 : defaultValue)));
|
|
3200
3219
|
const emit = (next) => {
|
|
3201
3220
|
if (next === lastEmitted.current) return;
|
|
3202
3221
|
lastEmitted.current = next;
|
|
@@ -3213,7 +3232,7 @@ var NumberInput = /* @__PURE__ */ (0, import_react39.forwardRef)(
|
|
|
3213
3232
|
inputRef
|
|
3214
3233
|
});
|
|
3215
3234
|
const { setRaw } = field4;
|
|
3216
|
-
(0,
|
|
3235
|
+
(0, import_react40.useEffect)(() => {
|
|
3217
3236
|
if (!isControlled) return;
|
|
3218
3237
|
const next = value4 ?? null;
|
|
3219
3238
|
lastEmitted.current = next;
|
|
@@ -3221,7 +3240,7 @@ var NumberInput = /* @__PURE__ */ (0, import_react39.forwardRef)(
|
|
|
3221
3240
|
}, [value4]);
|
|
3222
3241
|
const current2 = parse(field4.raw);
|
|
3223
3242
|
const valueText = (n) => `${format2(toRaw(n))}${unit2 ?? ""}`;
|
|
3224
|
-
const [announcement, setAnnouncement] = (0,
|
|
3243
|
+
const [announcement, setAnnouncement] = (0, import_react40.useState)("");
|
|
3225
3244
|
const setValue = (next, announce = true) => {
|
|
3226
3245
|
setRaw(toRaw(next));
|
|
3227
3246
|
emit(next);
|
|
@@ -3314,7 +3333,7 @@ var NumberInput = /* @__PURE__ */ (0, import_react39.forwardRef)(
|
|
|
3314
3333
|
|
|
3315
3334
|
// src/components/Pagination/Pagination.tsx
|
|
3316
3335
|
var import_icons17 = require("@bestow-ui/icons");
|
|
3317
|
-
var
|
|
3336
|
+
var import_react41 = require("react");
|
|
3318
3337
|
|
|
3319
3338
|
// src/components/Pagination/getPaginationItems.ts
|
|
3320
3339
|
var range = (start, end2) => end2 < start ? [] : Array.from({ length: end2 - start + 1 }, (_, i) => start + i);
|
|
@@ -3348,7 +3367,7 @@ var list5 = "_1iraoak0";
|
|
|
3348
3367
|
|
|
3349
3368
|
// src/components/Pagination/Pagination.tsx
|
|
3350
3369
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3351
|
-
var Pagination = /* @__PURE__ */ (0,
|
|
3370
|
+
var Pagination = /* @__PURE__ */ (0, import_react41.forwardRef)(function Pagination2({
|
|
3352
3371
|
totalPages,
|
|
3353
3372
|
page: pageProp,
|
|
3354
3373
|
defaultPage = 1,
|
|
@@ -3361,7 +3380,7 @@ var Pagination = /* @__PURE__ */ (0, import_react40.forwardRef)(function Paginat
|
|
|
3361
3380
|
"aria-label": ariaLabelProp,
|
|
3362
3381
|
...rest
|
|
3363
3382
|
}, ref) {
|
|
3364
|
-
const [uncontrolledPage, setUncontrolledPage] = (0,
|
|
3383
|
+
const [uncontrolledPage, setUncontrolledPage] = (0, import_react41.useState)(defaultPage);
|
|
3365
3384
|
const m = useMessages();
|
|
3366
3385
|
const ariaLabel = ariaLabelProp ?? m.pagination ?? "\uD398\uC774\uC9C0 \uD0D0\uC0C9";
|
|
3367
3386
|
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`);
|
|
@@ -3413,7 +3432,7 @@ var Pagination = /* @__PURE__ */ (0, import_react40.forwardRef)(function Paginat
|
|
|
3413
3432
|
});
|
|
3414
3433
|
|
|
3415
3434
|
// src/components/PhoneNumberInput/PhoneNumberInput.tsx
|
|
3416
|
-
var
|
|
3435
|
+
var import_react42 = require("react");
|
|
3417
3436
|
var import_korean_utils6 = require("@bestow-ui/korean-utils");
|
|
3418
3437
|
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3419
3438
|
var sanitize3 = (input6) => {
|
|
@@ -3421,7 +3440,7 @@ var sanitize3 = (input6) => {
|
|
|
3421
3440
|
return digits.slice(0, (0, import_korean_utils6.phoneNumberMaxDigits)(digits));
|
|
3422
3441
|
};
|
|
3423
3442
|
var isDigit4 = (char) => /\d/.test(char);
|
|
3424
|
-
var PhoneNumberInput = /* @__PURE__ */ (0,
|
|
3443
|
+
var PhoneNumberInput = /* @__PURE__ */ (0, import_react42.forwardRef)(
|
|
3425
3444
|
function PhoneNumberInput2(props, ref) {
|
|
3426
3445
|
const {
|
|
3427
3446
|
value: value4,
|
|
@@ -3432,7 +3451,7 @@ var PhoneNumberInput = /* @__PURE__ */ (0, import_react41.forwardRef)(
|
|
|
3432
3451
|
onKeyDown,
|
|
3433
3452
|
...rest
|
|
3434
3453
|
} = props;
|
|
3435
|
-
const inputRef = (0,
|
|
3454
|
+
const inputRef = (0, import_react42.useRef)(null);
|
|
3436
3455
|
const m = useMessages();
|
|
3437
3456
|
const label7 = labelProp ?? m.phoneNumber ?? "\uD734\uB300\uD3F0 \uBC88\uD638";
|
|
3438
3457
|
const field4 = useFormattedInput({
|
|
@@ -3467,7 +3486,7 @@ var PhoneNumberInput = /* @__PURE__ */ (0, import_react41.forwardRef)(
|
|
|
3467
3486
|
);
|
|
3468
3487
|
|
|
3469
3488
|
// src/components/RadioGroup/RadioGroup.tsx
|
|
3470
|
-
var
|
|
3489
|
+
var import_react43 = require("react");
|
|
3471
3490
|
|
|
3472
3491
|
// src/components/RadioGroup/RadioGroup.css.ts
|
|
3473
3492
|
var import_createRuntimeFn21 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
@@ -3481,7 +3500,7 @@ var text = "_1w9iwjma";
|
|
|
3481
3500
|
|
|
3482
3501
|
// src/components/RadioGroup/RadioGroup.tsx
|
|
3483
3502
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3484
|
-
var RadioGroup2 = /* @__PURE__ */ (0,
|
|
3503
|
+
var RadioGroup2 = /* @__PURE__ */ (0, import_react43.forwardRef)(function RadioGroup3(props, ref) {
|
|
3485
3504
|
const {
|
|
3486
3505
|
options,
|
|
3487
3506
|
value: value4,
|
|
@@ -3500,9 +3519,9 @@ var RadioGroup2 = /* @__PURE__ */ (0, import_react42.forwardRef)(function RadioG
|
|
|
3500
3519
|
className
|
|
3501
3520
|
} = props;
|
|
3502
3521
|
const isControlled = "value" in props;
|
|
3503
|
-
const [innerValue, setInnerValue] = (0,
|
|
3522
|
+
const [innerValue, setInnerValue] = (0, import_react43.useState)(defaultValue ?? "");
|
|
3504
3523
|
const current2 = isControlled ? value4 ?? "" : innerValue;
|
|
3505
|
-
const generatedId = (0,
|
|
3524
|
+
const generatedId = (0, import_react43.useId)();
|
|
3506
3525
|
const baseId = id ?? generatedId;
|
|
3507
3526
|
const labelId = label7 ? `${baseId}-label` : void 0;
|
|
3508
3527
|
const helperId = helperText3 ? `${baseId}-helper` : void 0;
|
|
@@ -3567,7 +3586,7 @@ var RadioGroup2 = /* @__PURE__ */ (0, import_react42.forwardRef)(function RadioG
|
|
|
3567
3586
|
});
|
|
3568
3587
|
|
|
3569
3588
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
3570
|
-
var
|
|
3589
|
+
var import_react44 = require("react");
|
|
3571
3590
|
|
|
3572
3591
|
// src/components/SegmentedControl/SegmentedControl.css.ts
|
|
3573
3592
|
var import_createRuntimeFn22 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
@@ -3578,7 +3597,7 @@ var root11 = /* @__PURE__ */ (0, import_createRuntimeFn22.createRuntimeFn)({ def
|
|
|
3578
3597
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
3579
3598
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3580
3599
|
var NEXT_KEYS = { ArrowRight: 1, ArrowDown: 1, ArrowLeft: -1, ArrowUp: -1 };
|
|
3581
|
-
var SegmentedControl = /* @__PURE__ */ (0,
|
|
3600
|
+
var SegmentedControl = /* @__PURE__ */ (0, import_react44.forwardRef)(
|
|
3582
3601
|
function SegmentedControl2(props, ref) {
|
|
3583
3602
|
const {
|
|
3584
3603
|
options,
|
|
@@ -3595,11 +3614,11 @@ var SegmentedControl = /* @__PURE__ */ (0, import_react43.forwardRef)(
|
|
|
3595
3614
|
className
|
|
3596
3615
|
} = props;
|
|
3597
3616
|
const isControlled = "value" in props;
|
|
3598
|
-
const [innerValue, setInnerValue] = (0,
|
|
3617
|
+
const [innerValue, setInnerValue] = (0, import_react44.useState)(defaultValue ?? "");
|
|
3599
3618
|
const current2 = isControlled ? value4 ?? "" : innerValue;
|
|
3600
|
-
const generatedId = (0,
|
|
3619
|
+
const generatedId = (0, import_react44.useId)();
|
|
3601
3620
|
const labelId = label7 ? `${id ?? generatedId}-label` : void 0;
|
|
3602
|
-
const itemRefs = (0,
|
|
3621
|
+
const itemRefs = (0, import_react44.useRef)([]);
|
|
3603
3622
|
const isEnabled = (index) => !disabled && !options[index]?.disabled;
|
|
3604
3623
|
const select2 = (index) => {
|
|
3605
3624
|
const next = options[index].value;
|
|
@@ -3680,7 +3699,7 @@ var SegmentedControl = /* @__PURE__ */ (0, import_react43.forwardRef)(
|
|
|
3680
3699
|
);
|
|
3681
3700
|
|
|
3682
3701
|
// src/components/NativeSelect/NativeSelect.tsx
|
|
3683
|
-
var
|
|
3702
|
+
var import_react45 = require("react");
|
|
3684
3703
|
var import_icons18 = require("@bestow-ui/icons");
|
|
3685
3704
|
|
|
3686
3705
|
// src/components/NativeSelect/NativeSelect.css.ts
|
|
@@ -3691,7 +3710,7 @@ var wrapper = "_5silym0";
|
|
|
3691
3710
|
|
|
3692
3711
|
// src/components/NativeSelect/NativeSelect.tsx
|
|
3693
3712
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3694
|
-
var NativeSelect = /* @__PURE__ */ (0,
|
|
3713
|
+
var NativeSelect = /* @__PURE__ */ (0, import_react45.forwardRef)(function NativeSelect2({
|
|
3695
3714
|
options,
|
|
3696
3715
|
onValueChange,
|
|
3697
3716
|
onChange,
|
|
@@ -3711,7 +3730,7 @@ var NativeSelect = /* @__PURE__ */ (0, import_react44.forwardRef)(function Nativ
|
|
|
3711
3730
|
"aria-describedby": ariaDescribedBy,
|
|
3712
3731
|
...rest
|
|
3713
3732
|
}, ref) {
|
|
3714
|
-
const generatedId = (0,
|
|
3733
|
+
const generatedId = (0, import_react45.useId)();
|
|
3715
3734
|
const selectId = id ?? generatedId;
|
|
3716
3735
|
const helperId = helperText3 ? `${selectId}-helper` : void 0;
|
|
3717
3736
|
const handleChange = (event) => {
|
|
@@ -3760,10 +3779,10 @@ var NativeSelect = /* @__PURE__ */ (0, import_react44.forwardRef)(function Nativ
|
|
|
3760
3779
|
|
|
3761
3780
|
// src/components/Select/Select.tsx
|
|
3762
3781
|
var RadixSelect = __toESM(require("@radix-ui/react-select"), 1);
|
|
3763
|
-
var
|
|
3782
|
+
var import_react46 = require("react");
|
|
3764
3783
|
var import_icons19 = require("@bestow-ui/icons");
|
|
3765
3784
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3766
|
-
var Select = /* @__PURE__ */ (0,
|
|
3785
|
+
var Select = /* @__PURE__ */ (0, import_react46.forwardRef)(function Select2(props, ref) {
|
|
3767
3786
|
const {
|
|
3768
3787
|
options,
|
|
3769
3788
|
value: value4,
|
|
@@ -3783,7 +3802,7 @@ var Select = /* @__PURE__ */ (0, import_react45.forwardRef)(function Select2(pro
|
|
|
3783
3802
|
className
|
|
3784
3803
|
} = props;
|
|
3785
3804
|
const isControlled = "value" in props;
|
|
3786
|
-
const generatedId = (0,
|
|
3805
|
+
const generatedId = (0, import_react46.useId)();
|
|
3787
3806
|
const triggerId = id ?? generatedId;
|
|
3788
3807
|
const helperId = helperText3 ? `${triggerId}-helper` : void 0;
|
|
3789
3808
|
const portal2 = usePortalProps();
|
|
@@ -3849,14 +3868,14 @@ var Select = /* @__PURE__ */ (0, import_react45.forwardRef)(function Select2(pro
|
|
|
3849
3868
|
});
|
|
3850
3869
|
|
|
3851
3870
|
// src/components/SkipLink/SkipLink.tsx
|
|
3852
|
-
var
|
|
3871
|
+
var import_react47 = require("react");
|
|
3853
3872
|
|
|
3854
3873
|
// src/components/SkipLink/SkipLink.css.ts
|
|
3855
3874
|
var skipLink = "_1t9jaar0";
|
|
3856
3875
|
|
|
3857
3876
|
// src/components/SkipLink/SkipLink.tsx
|
|
3858
3877
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3859
|
-
var SkipLink = /* @__PURE__ */ (0,
|
|
3878
|
+
var SkipLink = /* @__PURE__ */ (0, import_react47.forwardRef)(function SkipLink2({ href = "#main", className, children, onClick, ...rest }, ref) {
|
|
3860
3879
|
const m = useMessages();
|
|
3861
3880
|
const handleClick = (event) => {
|
|
3862
3881
|
onClick?.(event);
|
|
@@ -3873,7 +3892,7 @@ var SkipLink = /* @__PURE__ */ (0, import_react46.forwardRef)(function SkipLink2
|
|
|
3873
3892
|
|
|
3874
3893
|
// src/components/Slider/Slider.tsx
|
|
3875
3894
|
var RadixSlider = __toESM(require("@radix-ui/react-slider"), 1);
|
|
3876
|
-
var
|
|
3895
|
+
var import_react48 = require("react");
|
|
3877
3896
|
|
|
3878
3897
|
// src/components/Slider/Slider.css.ts
|
|
3879
3898
|
var import_createRuntimeFn24 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
@@ -3889,7 +3908,7 @@ var value3 = "_126mzjm3";
|
|
|
3889
3908
|
|
|
3890
3909
|
// src/components/Slider/Slider.tsx
|
|
3891
3910
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3892
|
-
var Slider = /* @__PURE__ */ (0,
|
|
3911
|
+
var Slider = /* @__PURE__ */ (0, import_react48.forwardRef)(function Slider2(props, ref) {
|
|
3893
3912
|
const {
|
|
3894
3913
|
value: value4,
|
|
3895
3914
|
defaultValue,
|
|
@@ -3910,12 +3929,12 @@ var Slider = /* @__PURE__ */ (0, import_react47.forwardRef)(function Slider2(pro
|
|
|
3910
3929
|
} = props;
|
|
3911
3930
|
const m = useMessages();
|
|
3912
3931
|
const thumbLabels = thumbLabelsProp ?? [m.rangeStart ?? "\uCD5C\uC18C", m.rangeEnd ?? "\uCD5C\uB300"];
|
|
3913
|
-
const generatedId = (0,
|
|
3932
|
+
const generatedId = (0, import_react48.useId)();
|
|
3914
3933
|
const baseId = id ?? generatedId;
|
|
3915
3934
|
const labelId = `${baseId}-label`;
|
|
3916
3935
|
const helperId = `${baseId}-helper`;
|
|
3917
3936
|
const isControlled = "value" in props;
|
|
3918
|
-
const [innerValue, setInnerValue] = (0,
|
|
3937
|
+
const [innerValue, setInnerValue] = (0, import_react48.useState)(defaultValue ?? [min]);
|
|
3919
3938
|
const current2 = isControlled ? value4 ?? [min] : innerValue;
|
|
3920
3939
|
const isRange = current2.length > 1;
|
|
3921
3940
|
const handleChange = (next) => {
|
|
@@ -3968,7 +3987,7 @@ var Slider = /* @__PURE__ */ (0, import_react47.forwardRef)(function Slider2(pro
|
|
|
3968
3987
|
});
|
|
3969
3988
|
|
|
3970
3989
|
// src/components/Stepper/Stepper.tsx
|
|
3971
|
-
var
|
|
3990
|
+
var import_react49 = require("react");
|
|
3972
3991
|
var import_icons20 = require("@bestow-ui/icons");
|
|
3973
3992
|
|
|
3974
3993
|
// src/components/Stepper/Stepper.css.ts
|
|
@@ -3982,7 +4001,7 @@ var text2 = /* @__PURE__ */ (0, import_createRuntimeFn25.createRuntimeFn)({ defa
|
|
|
3982
4001
|
|
|
3983
4002
|
// src/components/Stepper/Stepper.tsx
|
|
3984
4003
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3985
|
-
var Stepper = /* @__PURE__ */ (0,
|
|
4004
|
+
var Stepper = /* @__PURE__ */ (0, import_react49.forwardRef)(function Stepper2({ steps, current: current2, orientation = "horizontal", "aria-label": ariaLabel, className, ...rest }, ref) {
|
|
3986
4005
|
const m = useMessages();
|
|
3987
4006
|
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3988
4007
|
"ol",
|
|
@@ -4022,7 +4041,7 @@ var Stepper = /* @__PURE__ */ (0, import_react48.forwardRef)(function Stepper2({
|
|
|
4022
4041
|
});
|
|
4023
4042
|
|
|
4024
4043
|
// src/components/Switch/Switch.tsx
|
|
4025
|
-
var
|
|
4044
|
+
var import_react50 = require("react");
|
|
4026
4045
|
|
|
4027
4046
|
// src/components/Switch/Switch.css.ts
|
|
4028
4047
|
var import_createRuntimeFn26 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
@@ -4037,7 +4056,7 @@ var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
|
4037
4056
|
function setNativeChecked(input6, checked) {
|
|
4038
4057
|
Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "checked")?.set?.call(input6, checked);
|
|
4039
4058
|
}
|
|
4040
|
-
var Switch = /* @__PURE__ */ (0,
|
|
4059
|
+
var Switch = /* @__PURE__ */ (0, import_react50.forwardRef)(function Switch2({
|
|
4041
4060
|
label: label7,
|
|
4042
4061
|
size,
|
|
4043
4062
|
id,
|
|
@@ -4051,22 +4070,22 @@ var Switch = /* @__PURE__ */ (0, import_react49.forwardRef)(function Switch2({
|
|
|
4051
4070
|
onCheckedChange,
|
|
4052
4071
|
"aria-label": ariaLabel
|
|
4053
4072
|
}, ref) {
|
|
4054
|
-
const generatedId = (0,
|
|
4073
|
+
const generatedId = (0, import_react50.useId)();
|
|
4055
4074
|
const switchId = id ?? generatedId;
|
|
4056
|
-
const [uncontrolled, setUncontrolled] = (0,
|
|
4075
|
+
const [uncontrolled, setUncontrolled] = (0, import_react50.useState)(defaultChecked ?? false);
|
|
4057
4076
|
const isControlled = checkedProp !== void 0;
|
|
4058
4077
|
const checked = isControlled ? checkedProp : uncontrolled;
|
|
4059
|
-
const buttonRef = (0,
|
|
4060
|
-
const inputRef = (0,
|
|
4061
|
-
const [inForm, setInForm] = (0,
|
|
4062
|
-
const userToggled = (0,
|
|
4078
|
+
const buttonRef = (0, import_react50.useRef)(null);
|
|
4079
|
+
const inputRef = (0, import_react50.useRef)(null);
|
|
4080
|
+
const [inForm, setInForm] = (0, import_react50.useState)(true);
|
|
4081
|
+
const userToggled = (0, import_react50.useRef)(false);
|
|
4063
4082
|
const setChecked = (next) => {
|
|
4064
4083
|
if (!isControlled) setUncontrolled(next);
|
|
4065
4084
|
if (next !== checked) onCheckedChange?.(next);
|
|
4066
4085
|
};
|
|
4067
|
-
const setCheckedRef = (0,
|
|
4086
|
+
const setCheckedRef = (0, import_react50.useRef)(setChecked);
|
|
4068
4087
|
setCheckedRef.current = setChecked;
|
|
4069
|
-
(0,
|
|
4088
|
+
(0, import_react50.useEffect)(() => {
|
|
4070
4089
|
const form = buttonRef.current?.form;
|
|
4071
4090
|
setInForm(!!form);
|
|
4072
4091
|
if (!form) return;
|
|
@@ -4075,7 +4094,7 @@ var Switch = /* @__PURE__ */ (0, import_react49.forwardRef)(function Switch2({
|
|
|
4075
4094
|
form.addEventListener("reset", onReset);
|
|
4076
4095
|
return () => form.removeEventListener("reset", onReset);
|
|
4077
4096
|
}, []);
|
|
4078
|
-
(0,
|
|
4097
|
+
(0, import_react50.useEffect)(() => {
|
|
4079
4098
|
const input6 = inputRef.current;
|
|
4080
4099
|
if (!input6 || input6.checked === checked) return;
|
|
4081
4100
|
setNativeChecked(input6, checked);
|
|
@@ -4128,7 +4147,7 @@ var Switch = /* @__PURE__ */ (0, import_react49.forwardRef)(function Switch2({
|
|
|
4128
4147
|
});
|
|
4129
4148
|
|
|
4130
4149
|
// src/components/Table/Table.tsx
|
|
4131
|
-
var
|
|
4150
|
+
var import_react51 = require("react");
|
|
4132
4151
|
var import_icons21 = require("@bestow-ui/icons");
|
|
4133
4152
|
|
|
4134
4153
|
// src/components/Table/Table.css.ts
|
|
@@ -4152,9 +4171,9 @@ var table = "l3ploy1";
|
|
|
4152
4171
|
|
|
4153
4172
|
// src/components/Table/Table.tsx
|
|
4154
4173
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
4155
|
-
var TableSizeContext = /* @__PURE__ */ (0,
|
|
4156
|
-
var TableSectionContext = /* @__PURE__ */ (0,
|
|
4157
|
-
var Table = /* @__PURE__ */ (0,
|
|
4174
|
+
var TableSizeContext = /* @__PURE__ */ (0, import_react51.createContext)("md");
|
|
4175
|
+
var TableSectionContext = /* @__PURE__ */ (0, import_react51.createContext)("body");
|
|
4176
|
+
var Table = /* @__PURE__ */ (0, import_react51.forwardRef)(function Table2({
|
|
4158
4177
|
size = "md",
|
|
4159
4178
|
striped: striped2,
|
|
4160
4179
|
stickyHeader: stickyHeader2,
|
|
@@ -4166,7 +4185,7 @@ var Table = /* @__PURE__ */ (0, import_react50.forwardRef)(function Table2({
|
|
|
4166
4185
|
children,
|
|
4167
4186
|
...rest
|
|
4168
4187
|
}, ref) {
|
|
4169
|
-
const captionId = (0,
|
|
4188
|
+
const captionId = (0, import_react51.useId)();
|
|
4170
4189
|
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4171
4190
|
"div",
|
|
4172
4191
|
{
|
|
@@ -4192,27 +4211,27 @@ var Table = /* @__PURE__ */ (0, import_react50.forwardRef)(function Table2({
|
|
|
4192
4211
|
}
|
|
4193
4212
|
) });
|
|
4194
4213
|
});
|
|
4195
|
-
var TableHeader = /* @__PURE__ */ (0,
|
|
4214
|
+
var TableHeader = /* @__PURE__ */ (0, import_react51.forwardRef)(
|
|
4196
4215
|
function TableHeader2({ className, ...rest }, ref) {
|
|
4197
4216
|
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableSectionContext.Provider, { value: "header", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("thead", { ref, className: cx(header9, className), ...rest }) });
|
|
4198
4217
|
}
|
|
4199
4218
|
);
|
|
4200
|
-
var TableBody = /* @__PURE__ */ (0,
|
|
4219
|
+
var TableBody = /* @__PURE__ */ (0, import_react51.forwardRef)(
|
|
4201
4220
|
function TableBody2({ className, ...rest }, ref) {
|
|
4202
4221
|
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("tbody", { ref, className: cx(body4, className), ...rest }) });
|
|
4203
4222
|
}
|
|
4204
4223
|
);
|
|
4205
|
-
var TableFooter = /* @__PURE__ */ (0,
|
|
4224
|
+
var TableFooter = /* @__PURE__ */ (0, import_react51.forwardRef)(
|
|
4206
4225
|
function TableFooter2({ className, ...rest }, ref) {
|
|
4207
4226
|
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("tfoot", { ref, className: cx(footer4, className), ...rest }) });
|
|
4208
4227
|
}
|
|
4209
4228
|
);
|
|
4210
|
-
var TableRow = /* @__PURE__ */ (0,
|
|
4229
|
+
var TableRow = /* @__PURE__ */ (0, import_react51.forwardRef)(function TableRow2({ selected, className, ...rest }, ref) {
|
|
4211
4230
|
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("tr", { ref, className: cx(row3, className), "data-state": selected ? "selected" : void 0, ...rest });
|
|
4212
4231
|
});
|
|
4213
|
-
var TableHead = /* @__PURE__ */ (0,
|
|
4214
|
-
const size = (0,
|
|
4215
|
-
const section = (0,
|
|
4232
|
+
var TableHead = /* @__PURE__ */ (0, import_react51.forwardRef)(function TableHead2({ align, sortDirection, onSort, scope, className, children, ...rest }, ref) {
|
|
4233
|
+
const size = (0, import_react51.useContext)(TableSizeContext);
|
|
4234
|
+
const section = (0, import_react51.useContext)(TableSectionContext);
|
|
4216
4235
|
const sortable = onSort !== void 0;
|
|
4217
4236
|
const direction = sortDirection ?? "none";
|
|
4218
4237
|
const SortIcon = direction === "descending" ? import_icons21.ArrowDownIcon : import_icons21.ArrowUpIcon;
|
|
@@ -4235,9 +4254,9 @@ var TableHead = /* @__PURE__ */ (0, import_react50.forwardRef)(function TableHea
|
|
|
4235
4254
|
}
|
|
4236
4255
|
);
|
|
4237
4256
|
});
|
|
4238
|
-
var TableCell = /* @__PURE__ */ (0,
|
|
4239
|
-
const size = (0,
|
|
4240
|
-
const section = (0,
|
|
4257
|
+
var TableCell = /* @__PURE__ */ (0, import_react51.forwardRef)(function TableCell2({ align, className, ...rest }, ref) {
|
|
4258
|
+
const size = (0, import_react51.useContext)(TableSizeContext);
|
|
4259
|
+
const section = (0, import_react51.useContext)(TableSectionContext);
|
|
4241
4260
|
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4242
4261
|
"td",
|
|
4243
4262
|
{
|
|
@@ -4247,7 +4266,7 @@ var TableCell = /* @__PURE__ */ (0, import_react50.forwardRef)(function TableCel
|
|
|
4247
4266
|
}
|
|
4248
4267
|
);
|
|
4249
4268
|
});
|
|
4250
|
-
var TableEmpty = /* @__PURE__ */ (0,
|
|
4269
|
+
var TableEmpty = /* @__PURE__ */ (0, import_react51.forwardRef)(function TableEmpty2({ colSpan, className, children, ...rest }, ref) {
|
|
4251
4270
|
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableCell, { ref, colSpan, className: cx(emptyCell, className), ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: emptyContent, children }) }) });
|
|
4252
4271
|
});
|
|
4253
4272
|
function TableSkeleton({ rows = 5, columns }) {
|
|
@@ -4255,18 +4274,18 @@ function TableSkeleton({ rows = 5, columns }) {
|
|
|
4255
4274
|
}
|
|
4256
4275
|
|
|
4257
4276
|
// src/components/Table/useTableSelection.ts
|
|
4258
|
-
var
|
|
4277
|
+
var import_react52 = require("react");
|
|
4259
4278
|
function useTableSelection(initial = []) {
|
|
4260
|
-
const [selected, setSelected] = (0,
|
|
4261
|
-
const isSelected = (0,
|
|
4262
|
-
const toggle3 = (0,
|
|
4279
|
+
const [selected, setSelected] = (0, import_react52.useState)(initial);
|
|
4280
|
+
const isSelected = (0, import_react52.useCallback)((id) => selected.includes(id), [selected]);
|
|
4281
|
+
const toggle3 = (0, import_react52.useCallback)((id, checked) => {
|
|
4263
4282
|
setSelected((prev) => {
|
|
4264
4283
|
const on = checked ?? !prev.includes(id);
|
|
4265
4284
|
if (on) return prev.includes(id) ? prev : [...prev, id];
|
|
4266
4285
|
return prev.filter((value4) => value4 !== id);
|
|
4267
4286
|
});
|
|
4268
4287
|
}, []);
|
|
4269
|
-
const clear2 = (0,
|
|
4288
|
+
const clear2 = (0, import_react52.useCallback)(() => setSelected([]), []);
|
|
4270
4289
|
const selectAllProps = (pageIds) => {
|
|
4271
4290
|
const all2 = pageIds.length > 0 && pageIds.every((id) => selected.includes(id));
|
|
4272
4291
|
const some = pageIds.some((id) => selected.includes(id));
|
|
@@ -4287,7 +4306,7 @@ function useTableSelection(initial = []) {
|
|
|
4287
4306
|
|
|
4288
4307
|
// src/components/Tabs/Tabs.tsx
|
|
4289
4308
|
var RadixTabs = __toESM(require("@radix-ui/react-tabs"), 1);
|
|
4290
|
-
var
|
|
4309
|
+
var import_react53 = require("react");
|
|
4291
4310
|
|
|
4292
4311
|
// src/components/Tabs/Tabs.css.ts
|
|
4293
4312
|
var import_createRuntimeFn28 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
@@ -4298,25 +4317,25 @@ var trigger3 = /* @__PURE__ */ (0, import_createRuntimeFn28.createRuntimeFn)({ d
|
|
|
4298
4317
|
|
|
4299
4318
|
// src/components/Tabs/Tabs.tsx
|
|
4300
4319
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
4301
|
-
var TabsStyleContext = /* @__PURE__ */ (0,
|
|
4302
|
-
var Tabs = /* @__PURE__ */ (0,
|
|
4320
|
+
var TabsStyleContext = /* @__PURE__ */ (0, import_react53.createContext)({ variant: "line", size: "md" });
|
|
4321
|
+
var Tabs = /* @__PURE__ */ (0, import_react53.forwardRef)(function Tabs2({ variant = "line", size = "md", className, ...props }, ref) {
|
|
4303
4322
|
const controlled = "value" in props ? { value: props.value ?? "" } : {};
|
|
4304
4323
|
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TabsStyleContext.Provider, { value: { variant, size }, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(RadixTabs.Root, { ref, className: cx(root15, className), ...props, ...controlled }) });
|
|
4305
4324
|
});
|
|
4306
|
-
var TabsList = /* @__PURE__ */ (0,
|
|
4307
|
-
const { variant } = (0,
|
|
4325
|
+
var TabsList = /* @__PURE__ */ (0, import_react53.forwardRef)(function TabsList2({ className, ...rest }, ref) {
|
|
4326
|
+
const { variant } = (0, import_react53.useContext)(TabsStyleContext);
|
|
4308
4327
|
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(RadixTabs.List, { ref, className: cx(list6({ variant }), className), ...rest });
|
|
4309
4328
|
});
|
|
4310
|
-
var TabsTrigger = /* @__PURE__ */ (0,
|
|
4311
|
-
const { variant, size } = (0,
|
|
4329
|
+
var TabsTrigger = /* @__PURE__ */ (0, import_react53.forwardRef)(function TabsTrigger2({ className, ...rest }, ref) {
|
|
4330
|
+
const { variant, size } = (0, import_react53.useContext)(TabsStyleContext);
|
|
4312
4331
|
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(RadixTabs.Trigger, { ref, className: cx(trigger3({ variant, size }), className), ...rest });
|
|
4313
4332
|
});
|
|
4314
|
-
var TabsContent = /* @__PURE__ */ (0,
|
|
4333
|
+
var TabsContent = /* @__PURE__ */ (0, import_react53.forwardRef)(function TabsContent2({ className, ...rest }, ref) {
|
|
4315
4334
|
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(RadixTabs.Content, { ref, className: cx(content10, className), ...rest });
|
|
4316
4335
|
});
|
|
4317
4336
|
|
|
4318
4337
|
// src/components/Textarea/Textarea.tsx
|
|
4319
|
-
var
|
|
4338
|
+
var import_react54 = require("react");
|
|
4320
4339
|
|
|
4321
4340
|
// src/components/Textarea/Textarea.css.ts
|
|
4322
4341
|
var import_createRuntimeFn29 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
@@ -4328,7 +4347,7 @@ var textarea = /* @__PURE__ */ (0, import_createRuntimeFn29.createRuntimeFn)({ d
|
|
|
4328
4347
|
|
|
4329
4348
|
// src/components/Textarea/Textarea.tsx
|
|
4330
4349
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
4331
|
-
var Textarea = /* @__PURE__ */ (0,
|
|
4350
|
+
var Textarea = /* @__PURE__ */ (0, import_react54.forwardRef)(function Textarea2({
|
|
4332
4351
|
label: label7,
|
|
4333
4352
|
helperText: helperText3,
|
|
4334
4353
|
error,
|
|
@@ -4349,13 +4368,13 @@ var Textarea = /* @__PURE__ */ (0, import_react53.forwardRef)(function Textarea2
|
|
|
4349
4368
|
"aria-describedby": ariaDescribedBy,
|
|
4350
4369
|
...rest
|
|
4351
4370
|
}, ref) {
|
|
4352
|
-
const generatedId = (0,
|
|
4371
|
+
const generatedId = (0, import_react54.useId)();
|
|
4353
4372
|
const textareaId = id ?? generatedId;
|
|
4354
4373
|
const helperId = helperText3 ? `${textareaId}-helper` : void 0;
|
|
4355
|
-
const innerRef = (0,
|
|
4356
|
-
const [uncontrolledLength, setUncontrolledLength] = (0,
|
|
4374
|
+
const innerRef = (0, import_react54.useRef)(null);
|
|
4375
|
+
const [uncontrolledLength, setUncontrolledLength] = (0, import_react54.useState)(() => String(defaultValue ?? "").length);
|
|
4357
4376
|
const length = value4 !== void 0 ? String(value4).length : uncontrolledLength;
|
|
4358
|
-
const fitHeight = (0,
|
|
4377
|
+
const fitHeight = (0, import_react54.useCallback)(() => {
|
|
4359
4378
|
const el = innerRef.current;
|
|
4360
4379
|
if (!autoResize || !el) return;
|
|
4361
4380
|
el.style.height = "auto";
|
|
@@ -4404,7 +4423,7 @@ var Textarea = /* @__PURE__ */ (0, import_react53.forwardRef)(function Textarea2
|
|
|
4404
4423
|
|
|
4405
4424
|
// src/components/Toast/Toast.tsx
|
|
4406
4425
|
var RadixToast = __toESM(require("@radix-ui/react-toast"), 1);
|
|
4407
|
-
var
|
|
4426
|
+
var import_react55 = require("react");
|
|
4408
4427
|
var import_icons22 = require("@bestow-ui/icons");
|
|
4409
4428
|
|
|
4410
4429
|
// src/components/Toast/Toast.css.ts
|
|
@@ -4419,24 +4438,24 @@ var viewport2 = "_1g11zvx0";
|
|
|
4419
4438
|
// src/components/Toast/Toast.tsx
|
|
4420
4439
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
4421
4440
|
var REMOVE_DELAY = 500;
|
|
4422
|
-
var ToastContext = /* @__PURE__ */ (0,
|
|
4441
|
+
var ToastContext = /* @__PURE__ */ (0, import_react55.createContext)(null);
|
|
4423
4442
|
function ToastProvider({ children, duration = 5e3, label: labelProp }) {
|
|
4424
4443
|
const m = useMessages();
|
|
4425
4444
|
const label7 = labelProp ?? m.notifications ?? "\uC54C\uB9BC";
|
|
4426
|
-
const [toasts, setToasts] = (0,
|
|
4427
|
-
const nextId = (0,
|
|
4445
|
+
const [toasts, setToasts] = (0, import_react55.useState)([]);
|
|
4446
|
+
const nextId = (0, import_react55.useRef)(0);
|
|
4428
4447
|
const portal2 = usePortalProps();
|
|
4429
|
-
const toast2 = (0,
|
|
4448
|
+
const toast2 = (0, import_react55.useCallback)((options) => {
|
|
4430
4449
|
const id = nextId.current++;
|
|
4431
4450
|
setToasts((prev) => [...prev, { ...options, id, open: true }]);
|
|
4432
4451
|
return id;
|
|
4433
4452
|
}, []);
|
|
4434
|
-
const dismiss = (0,
|
|
4453
|
+
const dismiss = (0, import_react55.useCallback)((id) => {
|
|
4435
4454
|
const isTarget = (t) => id === void 0 || t.id === id;
|
|
4436
4455
|
setToasts((prev) => prev.map((t) => isTarget(t) ? { ...t, open: false } : t));
|
|
4437
4456
|
setTimeout(() => setToasts((prev) => prev.filter((t) => t.open || !isTarget(t))), REMOVE_DELAY);
|
|
4438
4457
|
}, []);
|
|
4439
|
-
const value4 = (0,
|
|
4458
|
+
const value4 = (0, import_react55.useMemo)(() => ({ toast: toast2, dismiss }), [toast2, dismiss]);
|
|
4440
4459
|
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ToastContext.Provider, { value: value4, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(RadixToast.Provider, { duration, label: label7, swipeDirection: "right", children: [
|
|
4441
4460
|
children,
|
|
4442
4461
|
toasts.map(({ id, open, title: title6, description: description8, color, duration: itemDuration, action: action3 }) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
@@ -4461,7 +4480,7 @@ function ToastProvider({ children, duration = 5e3, label: labelProp }) {
|
|
|
4461
4480
|
] }) });
|
|
4462
4481
|
}
|
|
4463
4482
|
function useToast() {
|
|
4464
|
-
const context = (0,
|
|
4483
|
+
const context = (0, import_react55.useContext)(ToastContext);
|
|
4465
4484
|
if (!context) throw new Error("useToast \uB294 ToastProvider \uC548\uC5D0\uC11C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4.");
|
|
4466
4485
|
return context;
|
|
4467
4486
|
}
|
|
@@ -4510,7 +4529,7 @@ function Tooltip({
|
|
|
4510
4529
|
}
|
|
4511
4530
|
|
|
4512
4531
|
// src/components/VerificationCodeInput/VerificationCodeInput.tsx
|
|
4513
|
-
var
|
|
4532
|
+
var import_react56 = require("react");
|
|
4514
4533
|
|
|
4515
4534
|
// src/components/VerificationCodeInput/VerificationCodeInput.css.ts
|
|
4516
4535
|
var input5 = "ea01812";
|
|
@@ -4522,7 +4541,7 @@ var timer = "ea01814";
|
|
|
4522
4541
|
// src/components/VerificationCodeInput/VerificationCodeInput.tsx
|
|
4523
4542
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
4524
4543
|
var formatTime = (seconds) => `${String(Math.floor(seconds / 60)).padStart(2, "0")}:${String(seconds % 60).padStart(2, "0")}`;
|
|
4525
|
-
var VerificationCodeInput = /* @__PURE__ */ (0,
|
|
4544
|
+
var VerificationCodeInput = /* @__PURE__ */ (0, import_react56.forwardRef)(
|
|
4526
4545
|
function VerificationCodeInput2(props, ref) {
|
|
4527
4546
|
const {
|
|
4528
4547
|
length = 6,
|
|
@@ -4549,23 +4568,23 @@ var VerificationCodeInput = /* @__PURE__ */ (0, import_react55.forwardRef)(
|
|
|
4549
4568
|
const label7 = labelProp ?? m.verificationCode ?? "\uC778\uC99D\uBC88\uD638";
|
|
4550
4569
|
const resendText = resendTextProp ?? m.resend ?? "\uC7AC\uC804\uC1A1";
|
|
4551
4570
|
const expiredText = expiredTextProp ?? m.verificationExpired ?? "\uC778\uC99D \uC2DC\uAC04\uC774 \uC9C0\uB0AC\uC5B4\uC694. \uC7AC\uC804\uC1A1\uD574 \uC8FC\uC138\uC694.";
|
|
4552
|
-
const generatedId = (0,
|
|
4571
|
+
const generatedId = (0, import_react56.useId)();
|
|
4553
4572
|
const inputId = id ?? generatedId;
|
|
4554
4573
|
const helperId = `${inputId}-helper`;
|
|
4555
4574
|
const statusId = `${inputId}-status`;
|
|
4556
|
-
const inputRef = (0,
|
|
4575
|
+
const inputRef = (0, import_react56.useRef)(null);
|
|
4557
4576
|
const isControlled = "value" in props;
|
|
4558
|
-
const [innerValue, setInnerValue] = (0,
|
|
4577
|
+
const [innerValue, setInnerValue] = (0, import_react56.useState)(defaultValue ?? "");
|
|
4559
4578
|
const code = (isControlled ? value4 ?? "" : innerValue).slice(0, length);
|
|
4560
|
-
const [focused, setFocused] = (0,
|
|
4561
|
-
const [endAt, setEndAt] = (0,
|
|
4562
|
-
const [remaining, setRemaining] = (0,
|
|
4579
|
+
const [focused, setFocused] = (0, import_react56.useState)(false);
|
|
4580
|
+
const [endAt, setEndAt] = (0, import_react56.useState)(() => expiresIn ? Date.now() + expiresIn * 1e3 : null);
|
|
4581
|
+
const [remaining, setRemaining] = (0, import_react56.useState)(expiresIn ?? 0);
|
|
4563
4582
|
const expired = expiresIn !== void 0 && remaining <= 0;
|
|
4564
|
-
const onExpireRef = (0,
|
|
4565
|
-
(0,
|
|
4583
|
+
const onExpireRef = (0, import_react56.useRef)(onExpire);
|
|
4584
|
+
(0, import_react56.useEffect)(() => {
|
|
4566
4585
|
onExpireRef.current = onExpire;
|
|
4567
4586
|
});
|
|
4568
|
-
(0,
|
|
4587
|
+
(0, import_react56.useEffect)(() => {
|
|
4569
4588
|
if (endAt === null) return;
|
|
4570
4589
|
const tick = () => {
|
|
4571
4590
|
const left = Math.max(0, Math.ceil((endAt - Date.now()) / 1e3));
|