@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/index.cjs
CHANGED
|
@@ -50,6 +50,7 @@ __export(src_exports, {
|
|
|
50
50
|
Checkbox: () => Checkbox,
|
|
51
51
|
Combobox: () => Combobox,
|
|
52
52
|
DatePicker: () => DatePicker,
|
|
53
|
+
DateRangePicker: () => DateRangePicker,
|
|
53
54
|
DescriptionList: () => DescriptionList,
|
|
54
55
|
Divider: () => Divider,
|
|
55
56
|
Drawer: () => Drawer,
|
|
@@ -116,6 +117,7 @@ __export(src_exports, {
|
|
|
116
117
|
contrastRatio: () => contrastRatio,
|
|
117
118
|
createIntentColors: () => createIntentColors,
|
|
118
119
|
createTheme: () => createTheme,
|
|
120
|
+
dateRangePresets: () => dateRangePresets,
|
|
119
121
|
en: () => en,
|
|
120
122
|
focusField: () => focusField,
|
|
121
123
|
formatBusinessNumber: () => formatBusinessNumber,
|
|
@@ -126,6 +128,8 @@ __export(src_exports, {
|
|
|
126
128
|
isValidBusinessNumber: () => isValidBusinessNumber,
|
|
127
129
|
kakaoPostcodeProvider: () => kakaoPostcodeProvider,
|
|
128
130
|
parseISODate: () => parseISODate,
|
|
131
|
+
presetRange: () => presetRange,
|
|
132
|
+
strongInputBorders: () => strongInputBorders,
|
|
129
133
|
themeClass: () => themeClass,
|
|
130
134
|
toISODate: () => toISODate,
|
|
131
135
|
useMessages: () => useMessages,
|
|
@@ -139,7 +143,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
139
143
|
|
|
140
144
|
// src/theme/contract.css.ts
|
|
141
145
|
var themeClass = { light: "tkagtb0", dark: "tkagtb1" };
|
|
142
|
-
var vars = { space: { "0": "var(--bestow-space-0)", "1": "var(--bestow-space-1)", "2": "var(--bestow-space-2)", "3": "var(--bestow-space-3)", "4": "var(--bestow-space-4)", "5": "var(--bestow-space-5)", "6": "var(--bestow-space-6)", "8": "var(--bestow-space-8)", "10": "var(--bestow-space-10)", "12": "var(--bestow-space-12)", "16": "var(--bestow-space-16)" }, radius: { none: "var(--bestow-radius-none)", sm: "var(--bestow-radius-sm)", md: "var(--bestow-radius-md)", lg: "var(--bestow-radius-lg)", xl: "var(--bestow-radius-xl)", full: "var(--bestow-radius-full)" }, font: { family: { sans: "var(--bestow-font-family-sans)", mono: "var(--bestow-font-family-mono)" }, size: { xs: "var(--bestow-font-size-xs)", sm: "var(--bestow-font-size-sm)", md: "var(--bestow-font-size-md)", lg: "var(--bestow-font-size-lg)", xl: "var(--bestow-font-size-xl)", "2xl": "var(--bestow-font-size-2xl)", "3xl": "var(--bestow-font-size-3xl)", "4xl": "var(--bestow-font-size-4xl)" }, weight: { regular: "var(--bestow-font-weight-regular)", medium: "var(--bestow-font-weight-medium)", semibold: "var(--bestow-font-weight-semibold)", bold: "var(--bestow-font-weight-bold)" }, lineHeight: { tight: "var(--bestow-font-line-height-tight)", normal: "var(--bestow-font-line-height-normal)", relaxed: "var(--bestow-font-line-height-relaxed)" } }, duration: { fast: "var(--bestow-duration-fast)", normal: "var(--bestow-duration-normal)", slow: "var(--bestow-duration-slow)" }, zIndex: { overlay: "var(--bestow-z-index-overlay)", modal: "var(--bestow-z-index-modal)", dropdown: "var(--bestow-z-index-dropdown)", toast: "var(--bestow-z-index-toast)", tooltip: "var(--bestow-z-index-tooltip)" }, color: { bg: { "default": "var(--bestow-color-bg-default)", subtle: "var(--bestow-color-bg-subtle)", muted: "var(--bestow-color-bg-muted)", inverse: "var(--bestow-color-bg-inverse)", overlay: "var(--bestow-color-bg-overlay)" }, fg: { "default": "var(--bestow-color-fg-default)", muted: "var(--bestow-color-fg-muted)", subtle: "var(--bestow-color-fg-subtle)", inverse: "var(--bestow-color-fg-inverse)" }, border: { "default": "var(--bestow-color-border-default)", strong: "var(--bestow-color-border-strong)", focus: "var(--bestow-color-border-focus)" }, primary: { solid: "var(--bestow-color-primary-solid)", solidHover: "var(--bestow-color-primary-solid-hover)", contrast: "var(--bestow-color-primary-contrast)", subtle: "var(--bestow-color-primary-subtle)", subtleHover: "var(--bestow-color-primary-subtle-hover)", text: "var(--bestow-color-primary-text)" }, neutral: { solid: "var(--bestow-color-neutral-solid)", solidHover: "var(--bestow-color-neutral-solid-hover)", contrast: "var(--bestow-color-neutral-contrast)", subtle: "var(--bestow-color-neutral-subtle)", subtleHover: "var(--bestow-color-neutral-subtle-hover)", text: "var(--bestow-color-neutral-text)" }, danger: { solid: "var(--bestow-color-danger-solid)", solidHover: "var(--bestow-color-danger-solid-hover)", contrast: "var(--bestow-color-danger-contrast)", subtle: "var(--bestow-color-danger-subtle)", subtleHover: "var(--bestow-color-danger-subtle-hover)", text: "var(--bestow-color-danger-text)" }, success: { solid: "var(--bestow-color-success-solid)", solidHover: "var(--bestow-color-success-solid-hover)", contrast: "var(--bestow-color-success-contrast)", subtle: "var(--bestow-color-success-subtle)", subtleHover: "var(--bestow-color-success-subtle-hover)", text: "var(--bestow-color-success-text)" }, warning: { solid: "var(--bestow-color-warning-solid)", solidHover: "var(--bestow-color-warning-solid-hover)", contrast: "var(--bestow-color-warning-contrast)", subtle: "var(--bestow-color-warning-subtle)", subtleHover: "var(--bestow-color-warning-subtle-hover)", text: "var(--bestow-color-warning-text)" } }, shadow: { sm: "var(--bestow-shadow-sm)", md: "var(--bestow-shadow-md)", lg: "var(--bestow-shadow-lg)" } };
|
|
146
|
+
var vars = { space: { "0": "var(--bestow-space-0)", "1": "var(--bestow-space-1)", "2": "var(--bestow-space-2)", "3": "var(--bestow-space-3)", "4": "var(--bestow-space-4)", "5": "var(--bestow-space-5)", "6": "var(--bestow-space-6)", "8": "var(--bestow-space-8)", "10": "var(--bestow-space-10)", "12": "var(--bestow-space-12)", "16": "var(--bestow-space-16)" }, radius: { none: "var(--bestow-radius-none)", sm: "var(--bestow-radius-sm)", md: "var(--bestow-radius-md)", lg: "var(--bestow-radius-lg)", xl: "var(--bestow-radius-xl)", full: "var(--bestow-radius-full)" }, font: { family: { sans: "var(--bestow-font-family-sans)", mono: "var(--bestow-font-family-mono)" }, size: { xs: "var(--bestow-font-size-xs)", sm: "var(--bestow-font-size-sm)", md: "var(--bestow-font-size-md)", lg: "var(--bestow-font-size-lg)", xl: "var(--bestow-font-size-xl)", "2xl": "var(--bestow-font-size-2xl)", "3xl": "var(--bestow-font-size-3xl)", "4xl": "var(--bestow-font-size-4xl)" }, weight: { regular: "var(--bestow-font-weight-regular)", medium: "var(--bestow-font-weight-medium)", semibold: "var(--bestow-font-weight-semibold)", bold: "var(--bestow-font-weight-bold)" }, lineHeight: { tight: "var(--bestow-font-line-height-tight)", normal: "var(--bestow-font-line-height-normal)", relaxed: "var(--bestow-font-line-height-relaxed)" } }, duration: { fast: "var(--bestow-duration-fast)", normal: "var(--bestow-duration-normal)", slow: "var(--bestow-duration-slow)" }, zIndex: { overlay: "var(--bestow-z-index-overlay)", modal: "var(--bestow-z-index-modal)", dropdown: "var(--bestow-z-index-dropdown)", toast: "var(--bestow-z-index-toast)", tooltip: "var(--bestow-z-index-tooltip)" }, color: { bg: { "default": "var(--bestow-color-bg-default)", subtle: "var(--bestow-color-bg-subtle)", muted: "var(--bestow-color-bg-muted)", inverse: "var(--bestow-color-bg-inverse)", overlay: "var(--bestow-color-bg-overlay)" }, fg: { "default": "var(--bestow-color-fg-default)", muted: "var(--bestow-color-fg-muted)", subtle: "var(--bestow-color-fg-subtle)", inverse: "var(--bestow-color-fg-inverse)" }, border: { "default": "var(--bestow-color-border-default)", strong: "var(--bestow-color-border-strong)", focus: "var(--bestow-color-border-focus)", input: "var(--bestow-color-border-input)", inputHover: "var(--bestow-color-border-input-hover)" }, primary: { solid: "var(--bestow-color-primary-solid)", solidHover: "var(--bestow-color-primary-solid-hover)", contrast: "var(--bestow-color-primary-contrast)", subtle: "var(--bestow-color-primary-subtle)", subtleHover: "var(--bestow-color-primary-subtle-hover)", text: "var(--bestow-color-primary-text)" }, neutral: { solid: "var(--bestow-color-neutral-solid)", solidHover: "var(--bestow-color-neutral-solid-hover)", contrast: "var(--bestow-color-neutral-contrast)", subtle: "var(--bestow-color-neutral-subtle)", subtleHover: "var(--bestow-color-neutral-subtle-hover)", text: "var(--bestow-color-neutral-text)" }, danger: { solid: "var(--bestow-color-danger-solid)", solidHover: "var(--bestow-color-danger-solid-hover)", contrast: "var(--bestow-color-danger-contrast)", subtle: "var(--bestow-color-danger-subtle)", subtleHover: "var(--bestow-color-danger-subtle-hover)", text: "var(--bestow-color-danger-text)" }, success: { solid: "var(--bestow-color-success-solid)", solidHover: "var(--bestow-color-success-solid-hover)", contrast: "var(--bestow-color-success-contrast)", subtle: "var(--bestow-color-success-subtle)", subtleHover: "var(--bestow-color-success-subtle-hover)", text: "var(--bestow-color-success-text)" }, warning: { solid: "var(--bestow-color-warning-solid)", solidHover: "var(--bestow-color-warning-solid-hover)", contrast: "var(--bestow-color-warning-contrast)", subtle: "var(--bestow-color-warning-subtle)", subtleHover: "var(--bestow-color-warning-subtle-hover)", text: "var(--bestow-color-warning-text)" } }, shadow: { sm: "var(--bestow-shadow-sm)", md: "var(--bestow-shadow-md)", lg: "var(--bestow-shadow-lg)" } };
|
|
143
147
|
|
|
144
148
|
// src/theme/color.ts
|
|
145
149
|
var import_tokens = require("@bestow-ui/tokens");
|
|
@@ -319,6 +323,14 @@ function themeToStyle(theme, mode) {
|
|
|
319
323
|
return Object.keys(map).length ? (0, import_dynamic.assignInlineVars)(map) : void 0;
|
|
320
324
|
}
|
|
321
325
|
|
|
326
|
+
// src/theme/presets.ts
|
|
327
|
+
var strongInputBorders = /* @__PURE__ */ Object.freeze({
|
|
328
|
+
// 라이트: gray600 / gray700 — 흰 배경 5.18:1, bg.subtle(gray50) 4.91:1
|
|
329
|
+
light: { color: { border: { input: "#666e76", inputHover: "#495057" } } },
|
|
330
|
+
// 다크: gray500 / gray300 — gray600 은 bg.subtle(gray900) 위에서 2.98:1 이라 한 단계 밝게. bg.default 8.57:1, bg.subtle 7.43:1
|
|
331
|
+
dark: { color: { border: { input: "#adb5bd", inputHover: "#dee2e6" } } }
|
|
332
|
+
});
|
|
333
|
+
|
|
322
334
|
// src/i18n/en.ts
|
|
323
335
|
var WEEKDAYS_LONG = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
|
|
324
336
|
var MONTHS = [
|
|
@@ -362,6 +374,9 @@ var en = {
|
|
|
362
374
|
fileTooLarge: (name, maxSize) => `${name}: files must be ${maxSize} or smaller.`,
|
|
363
375
|
fileTypeNotAllowed: (name) => `${name}: this file type is not allowed.`,
|
|
364
376
|
fileTooMany: (maxFiles) => `You can upload up to ${maxFiles} files.`,
|
|
377
|
+
dateRangeStart: "Start date",
|
|
378
|
+
dateRangeEnd: "End date",
|
|
379
|
+
dateRangePresets: "Quick select",
|
|
365
380
|
errorSummaryTitle: (count2) => `There ${count2 === 1 ? "is 1 problem" : `are ${count2} problems`} with your answers`,
|
|
366
381
|
rangeStart: "minimum",
|
|
367
382
|
rangeEnd: "maximum",
|
|
@@ -632,6 +647,20 @@ var DescriptionList = /* @__PURE__ */ (0, import_react3.forwardRef)(
|
|
|
632
647
|
}
|
|
633
648
|
);
|
|
634
649
|
|
|
650
|
+
// src/components/DateRangePicker/presets.ts
|
|
651
|
+
var dateRangePresets = [
|
|
652
|
+
{ label: "\uC624\uB298", days: 0 },
|
|
653
|
+
{ label: "1\uC8FC\uC77C", days: 7 },
|
|
654
|
+
{ label: "1\uAC1C\uC6D4", months: 1 },
|
|
655
|
+
{ label: "3\uAC1C\uC6D4", months: 3 }
|
|
656
|
+
];
|
|
657
|
+
function presetRange(preset, today) {
|
|
658
|
+
const end2 = parseISODate(today);
|
|
659
|
+
if (!end2) return { start: "", end: "" };
|
|
660
|
+
const start = preset.months !== void 0 ? addMonths(end2, -preset.months) : addDays(end2, -(preset.days ?? 0));
|
|
661
|
+
return { start: toISODate(start), end: today };
|
|
662
|
+
}
|
|
663
|
+
|
|
635
664
|
// src/components/Divider/Divider.tsx
|
|
636
665
|
var import_react4 = require("react");
|
|
637
666
|
|
|
@@ -1680,7 +1709,7 @@ var AmountInput = /* @__PURE__ */ (0, import_react24.forwardRef)(
|
|
|
1680
1709
|
return digits;
|
|
1681
1710
|
};
|
|
1682
1711
|
const toRaw = (amount) => amount === null || amount === void 0 ? "" : String(Math.floor(Math.abs(amount)));
|
|
1683
|
-
const
|
|
1712
|
+
const field4 = useFormattedInput({
|
|
1684
1713
|
isControlled: "value" in props,
|
|
1685
1714
|
value: toRaw(value4),
|
|
1686
1715
|
defaultValue: toRaw(defaultValue),
|
|
@@ -1690,7 +1719,7 @@ var AmountInput = /* @__PURE__ */ (0, import_react24.forwardRef)(
|
|
|
1690
1719
|
isMeaningful: isDigit,
|
|
1691
1720
|
inputRef
|
|
1692
1721
|
});
|
|
1693
|
-
const reading = showKoreanAmount &&
|
|
1722
|
+
const reading = showKoreanAmount && field4.raw !== "" ? formatKoreanAmount(Number(field4.raw), unit2) : null;
|
|
1694
1723
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1695
1724
|
TextField,
|
|
1696
1725
|
{
|
|
@@ -1698,10 +1727,10 @@ var AmountInput = /* @__PURE__ */ (0, import_react24.forwardRef)(
|
|
|
1698
1727
|
label: label7,
|
|
1699
1728
|
placeholder,
|
|
1700
1729
|
inputMode: "numeric",
|
|
1701
|
-
value:
|
|
1702
|
-
onChange:
|
|
1730
|
+
value: field4.display,
|
|
1731
|
+
onChange: field4.onChange,
|
|
1703
1732
|
onKeyDown: (event) => {
|
|
1704
|
-
|
|
1733
|
+
field4.onKeyDown(event);
|
|
1705
1734
|
onKeyDown?.(event);
|
|
1706
1735
|
},
|
|
1707
1736
|
endAdornment: unit2,
|
|
@@ -1812,10 +1841,10 @@ var separator = "_18t8ztt4";
|
|
|
1812
1841
|
|
|
1813
1842
|
// src/components/Breadcrumb/Breadcrumb.tsx
|
|
1814
1843
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1815
|
-
var Breadcrumb = /* @__PURE__ */ (0, import_react27.forwardRef)(function Breadcrumb2({ items: items2, linkAs, separator:
|
|
1844
|
+
var Breadcrumb = /* @__PURE__ */ (0, import_react27.forwardRef)(function Breadcrumb2({ items: items2, linkAs, separator: separator4, "aria-label": ariaLabelProp, className, ...rest }, ref) {
|
|
1816
1845
|
const m = useMessages();
|
|
1817
1846
|
const ariaLabel = ariaLabelProp ?? m.breadcrumb ?? "\uC774\uB3D9 \uACBD\uB85C";
|
|
1818
|
-
const sep =
|
|
1847
|
+
const sep = separator4 ?? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_icons8.ChevronRightIcon, { size: 14 });
|
|
1819
1848
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("nav", { ref, "aria-label": ariaLabel, className, ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("ol", { className: list2, children: items2.map((item10, index) => {
|
|
1820
1849
|
const isCurrent = index === items2.length - 1;
|
|
1821
1850
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("li", { className: item4, children: [
|
|
@@ -1852,7 +1881,7 @@ var BusinessNumberInput = /* @__PURE__ */ (0, import_react28.forwardRef)(
|
|
|
1852
1881
|
const label7 = labelProp ?? m.businessNumber ?? "\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638";
|
|
1853
1882
|
const incompleteText = m.businessNumberIncomplete ?? "10\uC790\uB9AC\uB97C \uBAA8\uB450 \uC785\uB825\uD574 \uC8FC\uC138\uC694.";
|
|
1854
1883
|
const [touched, setTouched] = (0, import_react28.useState)(false);
|
|
1855
|
-
const
|
|
1884
|
+
const field4 = useFormattedInput({
|
|
1856
1885
|
isControlled: "value" in props,
|
|
1857
1886
|
value: value4,
|
|
1858
1887
|
defaultValue,
|
|
@@ -1862,8 +1891,8 @@ var BusinessNumberInput = /* @__PURE__ */ (0, import_react28.forwardRef)(
|
|
|
1862
1891
|
isMeaningful: isDigit2,
|
|
1863
1892
|
inputRef
|
|
1864
1893
|
});
|
|
1865
|
-
const complete =
|
|
1866
|
-
const autoInvalid = validate &&
|
|
1894
|
+
const complete = field4.raw.length === 10;
|
|
1895
|
+
const autoInvalid = validate && field4.raw.length > 0 && (complete ? !isValidBusinessNumber(field4.raw) : touched);
|
|
1867
1896
|
const showAuto = autoInvalid && error === void 0;
|
|
1868
1897
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1869
1898
|
TextField,
|
|
@@ -1872,10 +1901,10 @@ var BusinessNumberInput = /* @__PURE__ */ (0, import_react28.forwardRef)(
|
|
|
1872
1901
|
label: label7,
|
|
1873
1902
|
placeholder,
|
|
1874
1903
|
inputMode: "numeric",
|
|
1875
|
-
value:
|
|
1876
|
-
onChange:
|
|
1904
|
+
value: field4.display,
|
|
1905
|
+
onChange: field4.onChange,
|
|
1877
1906
|
onKeyDown: (event) => {
|
|
1878
|
-
|
|
1907
|
+
field4.onKeyDown(event);
|
|
1879
1908
|
onKeyDown?.(event);
|
|
1880
1909
|
},
|
|
1881
1910
|
onBlur: (event) => {
|
|
@@ -2490,7 +2519,7 @@ var DatePicker = /* @__PURE__ */ (0, import_react34.forwardRef)(
|
|
|
2490
2519
|
lastEmitted.current = iso;
|
|
2491
2520
|
onValueChange?.(iso);
|
|
2492
2521
|
};
|
|
2493
|
-
const
|
|
2522
|
+
const field4 = useFormattedInput({
|
|
2494
2523
|
isControlled: false,
|
|
2495
2524
|
value: void 0,
|
|
2496
2525
|
defaultValue: (isControlled ? value4 : defaultValue)?.replace(/\D/g, ""),
|
|
@@ -2503,8 +2532,8 @@ var DatePicker = /* @__PURE__ */ (0, import_react34.forwardRef)(
|
|
|
2503
2532
|
isMeaningful: isDigit3,
|
|
2504
2533
|
inputRef
|
|
2505
2534
|
});
|
|
2506
|
-
const textIso = toIso(
|
|
2507
|
-
const { setRaw } =
|
|
2535
|
+
const textIso = toIso(field4.raw);
|
|
2536
|
+
const { setRaw } = field4;
|
|
2508
2537
|
(0, import_react34.useEffect)(() => {
|
|
2509
2538
|
if (!isControlled) return;
|
|
2510
2539
|
const next = value4 ?? "";
|
|
@@ -2516,8 +2545,8 @@ var DatePicker = /* @__PURE__ */ (0, import_react34.forwardRef)(
|
|
|
2516
2545
|
setRaw(next.replace(/\D/g, ""));
|
|
2517
2546
|
}, [value4]);
|
|
2518
2547
|
const date = parseISODate(textIso);
|
|
2519
|
-
const complete =
|
|
2520
|
-
const autoError = complete ? !date ? invalidText : isUnavailable(date) ? unavailableText : null : touched &&
|
|
2548
|
+
const complete = field4.raw.length === 8;
|
|
2549
|
+
const autoError = complete ? !date ? invalidText : isUnavailable(date) ? unavailableText : null : touched && field4.raw.length > 0 ? incompleteText : null;
|
|
2521
2550
|
const showAuto = autoError !== null && error === void 0;
|
|
2522
2551
|
const selectedIso = date && !isUnavailable(date) ? textIso : "";
|
|
2523
2552
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
|
|
@@ -2530,9 +2559,9 @@ var DatePicker = /* @__PURE__ */ (0, import_react34.forwardRef)(
|
|
|
2530
2559
|
placeholder,
|
|
2531
2560
|
inputMode: "numeric",
|
|
2532
2561
|
autoComplete: "off",
|
|
2533
|
-
value:
|
|
2534
|
-
onChange:
|
|
2535
|
-
onKeyDown:
|
|
2562
|
+
value: field4.display,
|
|
2563
|
+
onChange: field4.onChange,
|
|
2564
|
+
onKeyDown: field4.onKeyDown,
|
|
2536
2565
|
onBlur: () => setTouched(true),
|
|
2537
2566
|
error: error ?? autoError !== null,
|
|
2538
2567
|
helperText: showAuto ? autoError : helperText3,
|
|
@@ -2576,6 +2605,129 @@ var DatePicker = /* @__PURE__ */ (0, import_react34.forwardRef)(
|
|
|
2576
2605
|
}
|
|
2577
2606
|
);
|
|
2578
2607
|
|
|
2608
|
+
// src/components/DateRangePicker/DateRangePicker.tsx
|
|
2609
|
+
var import_react35 = require("react");
|
|
2610
|
+
|
|
2611
|
+
// src/components/DateRangePicker/DateRangePicker.css.ts
|
|
2612
|
+
var field2 = "_17277dh3";
|
|
2613
|
+
var fields = "_17277dh2";
|
|
2614
|
+
var fieldset3 = "_17277dh0";
|
|
2615
|
+
var legend3 = "_17277dh1";
|
|
2616
|
+
var presets = "_17277dh5";
|
|
2617
|
+
var separator2 = "_17277dh4";
|
|
2618
|
+
|
|
2619
|
+
// src/components/DateRangePicker/DateRangePicker.tsx
|
|
2620
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2621
|
+
var DateRangePicker = /* @__PURE__ */ (0, import_react35.forwardRef)(
|
|
2622
|
+
function DateRangePicker2(props, ref) {
|
|
2623
|
+
const {
|
|
2624
|
+
value: value4,
|
|
2625
|
+
defaultValue,
|
|
2626
|
+
onValueChange,
|
|
2627
|
+
label: label7,
|
|
2628
|
+
startLabel: startLabelProp,
|
|
2629
|
+
endLabel: endLabelProp,
|
|
2630
|
+
presets: presets2,
|
|
2631
|
+
min,
|
|
2632
|
+
max,
|
|
2633
|
+
isDateDisabled,
|
|
2634
|
+
isHoliday,
|
|
2635
|
+
today,
|
|
2636
|
+
helperText: helperText3,
|
|
2637
|
+
error,
|
|
2638
|
+
required,
|
|
2639
|
+
disabled,
|
|
2640
|
+
startName,
|
|
2641
|
+
endName,
|
|
2642
|
+
id,
|
|
2643
|
+
className
|
|
2644
|
+
} = props;
|
|
2645
|
+
const m = useMessages();
|
|
2646
|
+
const generatedId = (0, import_react35.useId)();
|
|
2647
|
+
const baseId = id ?? generatedId;
|
|
2648
|
+
const helperId = helperText3 ? `${baseId}-helper` : void 0;
|
|
2649
|
+
const isClient = useIsClient();
|
|
2650
|
+
const isControlled = "value" in props;
|
|
2651
|
+
const [inner, setInner] = (0, import_react35.useState)(defaultValue ?? { start: "", end: "" });
|
|
2652
|
+
const range3 = isControlled ? value4 ?? { start: "", end: "" } : inner;
|
|
2653
|
+
const update = (next) => {
|
|
2654
|
+
if (next.start === range3.start && next.end === range3.end) return;
|
|
2655
|
+
if (!isControlled) setInner(next);
|
|
2656
|
+
onValueChange?.(next);
|
|
2657
|
+
};
|
|
2658
|
+
const todayIso = () => today ?? toISODate(/* @__PURE__ */ new Date());
|
|
2659
|
+
const startLabel = startLabelProp ?? m.dateRangeStart ?? "\uC2DC\uC791\uC77C";
|
|
2660
|
+
const endLabel = endLabelProp ?? m.dateRangeEnd ?? "\uC885\uB8CC\uC77C";
|
|
2661
|
+
const common = { isDateDisabled, isHoliday, today, disabled, required, fullWidth: true };
|
|
2662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2663
|
+
"fieldset",
|
|
2664
|
+
{
|
|
2665
|
+
ref,
|
|
2666
|
+
id,
|
|
2667
|
+
className: cx(fieldset3, className),
|
|
2668
|
+
"aria-describedby": helperId,
|
|
2669
|
+
"data-invalid": error || void 0,
|
|
2670
|
+
children: [
|
|
2671
|
+
label7 && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("legend", { className: legend3, children: [
|
|
2672
|
+
label7,
|
|
2673
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
2674
|
+
] }),
|
|
2675
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: fields, children: [
|
|
2676
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: field2, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2677
|
+
DatePicker,
|
|
2678
|
+
{
|
|
2679
|
+
...common,
|
|
2680
|
+
id: `${baseId}-start`,
|
|
2681
|
+
label: startLabel,
|
|
2682
|
+
value: range3.start,
|
|
2683
|
+
onValueChange: (start) => update({ ...range3, start }),
|
|
2684
|
+
min,
|
|
2685
|
+
max: range3.end || max,
|
|
2686
|
+
name: startName,
|
|
2687
|
+
error: error || void 0
|
|
2688
|
+
}
|
|
2689
|
+
) }),
|
|
2690
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: separator2, "aria-hidden": true, children: "~" }),
|
|
2691
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: field2, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2692
|
+
DatePicker,
|
|
2693
|
+
{
|
|
2694
|
+
...common,
|
|
2695
|
+
id: `${baseId}-end`,
|
|
2696
|
+
label: endLabel,
|
|
2697
|
+
value: range3.end,
|
|
2698
|
+
onValueChange: (end2) => update({ ...range3, end: end2 }),
|
|
2699
|
+
min: range3.start || min,
|
|
2700
|
+
max,
|
|
2701
|
+
name: endName,
|
|
2702
|
+
error: error || void 0
|
|
2703
|
+
}
|
|
2704
|
+
) })
|
|
2705
|
+
] }),
|
|
2706
|
+
presets2 && presets2.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { role: "group", "aria-label": m.dateRangePresets ?? "\uBE60\uB978 \uC120\uD0DD", className: presets, children: presets2.map((preset) => {
|
|
2707
|
+
const target = isClient ? presetRange(preset, todayIso()) : null;
|
|
2708
|
+
const pressed = !!target && target.start === range3.start && target.end === range3.end;
|
|
2709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2710
|
+
Button,
|
|
2711
|
+
{
|
|
2712
|
+
type: "button",
|
|
2713
|
+
size: "sm",
|
|
2714
|
+
variant: pressed ? "soft" : "outline",
|
|
2715
|
+
color: pressed ? "primary" : "neutral",
|
|
2716
|
+
"aria-pressed": pressed,
|
|
2717
|
+
disabled,
|
|
2718
|
+
onClick: () => update(presetRange(preset, todayIso())),
|
|
2719
|
+
children: preset.label
|
|
2720
|
+
},
|
|
2721
|
+
preset.label
|
|
2722
|
+
);
|
|
2723
|
+
}) }),
|
|
2724
|
+
helperText3 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { id: helperId, className: helperText({ error }), children: helperText3 })
|
|
2725
|
+
]
|
|
2726
|
+
}
|
|
2727
|
+
);
|
|
2728
|
+
}
|
|
2729
|
+
);
|
|
2730
|
+
|
|
2579
2731
|
// src/components/Drawer/Drawer.tsx
|
|
2580
2732
|
var Dialog2 = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
2581
2733
|
var import_icons13 = require("@bestow-ui/icons");
|
|
@@ -2593,7 +2745,7 @@ var overlay2 = "nmobyv0";
|
|
|
2593
2745
|
var title4 = "nmobyvv";
|
|
2594
2746
|
|
|
2595
2747
|
// src/components/Drawer/Drawer.tsx
|
|
2596
|
-
var
|
|
2748
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2597
2749
|
function Drawer({
|
|
2598
2750
|
open,
|
|
2599
2751
|
defaultOpen,
|
|
@@ -2612,11 +2764,11 @@ function Drawer({
|
|
|
2612
2764
|
const portal2 = usePortalProps();
|
|
2613
2765
|
const m = useMessages();
|
|
2614
2766
|
const focus = useReturnFocus(Boolean(trigger4));
|
|
2615
|
-
return /* @__PURE__ */ (0,
|
|
2616
|
-
trigger4 && /* @__PURE__ */ (0,
|
|
2617
|
-
/* @__PURE__ */ (0,
|
|
2618
|
-
/* @__PURE__ */ (0,
|
|
2619
|
-
/* @__PURE__ */ (0,
|
|
2767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Dialog2.Root, { open, defaultOpen, onOpenChange, children: [
|
|
2768
|
+
trigger4 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Dialog2.Trigger, { asChild: true, children: trigger4 }),
|
|
2769
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(Dialog2.Portal, { children: [
|
|
2770
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Dialog2.Overlay, { className: cx(portal2.className, overlay2), style: portal2.style }),
|
|
2771
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2620
2772
|
Dialog2.Content,
|
|
2621
2773
|
{
|
|
2622
2774
|
className: cx(portal2.className, content8({ side, size }), className),
|
|
@@ -2627,15 +2779,15 @@ function Drawer({
|
|
|
2627
2779
|
onCloseAutoFocus: focus.onCloseAutoFocus,
|
|
2628
2780
|
...description8 ? {} : { "aria-describedby": void 0 },
|
|
2629
2781
|
children: [
|
|
2630
|
-
/* @__PURE__ */ (0,
|
|
2631
|
-
/* @__PURE__ */ (0,
|
|
2632
|
-
/* @__PURE__ */ (0,
|
|
2633
|
-
description8 && /* @__PURE__ */ (0,
|
|
2782
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: header7, children: [
|
|
2783
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: headings2, children: [
|
|
2784
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Dialog2.Title, { className: title4, children: title6 }),
|
|
2785
|
+
description8 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Dialog2.Description, { className: description4, children: description8 })
|
|
2634
2786
|
] }),
|
|
2635
|
-
!hideCloseButton && /* @__PURE__ */ (0,
|
|
2787
|
+
!hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Dialog2.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(IconButton, { "aria-label": m.close ?? "\uB2EB\uAE30", size: "sm", className: closeButton4, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_icons13.XIcon, {}) }) })
|
|
2636
2788
|
] }),
|
|
2637
|
-
children && /* @__PURE__ */ (0,
|
|
2638
|
-
footer6 && /* @__PURE__ */ (0,
|
|
2789
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: body3, children }),
|
|
2790
|
+
footer6 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: footer3, children: footer6 })
|
|
2639
2791
|
]
|
|
2640
2792
|
}
|
|
2641
2793
|
)
|
|
@@ -2645,7 +2797,7 @@ function Drawer({
|
|
|
2645
2797
|
var DrawerClose = Dialog2.Close;
|
|
2646
2798
|
|
|
2647
2799
|
// src/components/ErrorSummary/ErrorSummary.tsx
|
|
2648
|
-
var
|
|
2800
|
+
var import_react36 = require("react");
|
|
2649
2801
|
|
|
2650
2802
|
// src/components/ErrorSummary/ErrorSummary.css.ts
|
|
2651
2803
|
var link3 = "_1cdophv2";
|
|
@@ -2653,17 +2805,17 @@ var list3 = "_1cdophv1";
|
|
|
2653
2805
|
var root9 = "_1cdophv0";
|
|
2654
2806
|
|
|
2655
2807
|
// src/components/ErrorSummary/ErrorSummary.tsx
|
|
2656
|
-
var
|
|
2657
|
-
var ErrorSummary = /* @__PURE__ */ (0,
|
|
2808
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2809
|
+
var ErrorSummary = /* @__PURE__ */ (0, import_react36.forwardRef)(function ErrorSummary2({ errors: errors2, title: title6, focusKey, className, ...rest }, ref) {
|
|
2658
2810
|
const m = useMessages();
|
|
2659
|
-
const titleId = (0,
|
|
2660
|
-
const rootRef = (0,
|
|
2811
|
+
const titleId = (0, import_react36.useId)();
|
|
2812
|
+
const rootRef = (0, import_react36.useRef)(null);
|
|
2661
2813
|
const hasErrors = errors2.length > 0;
|
|
2662
|
-
(0,
|
|
2814
|
+
(0, import_react36.useEffect)(() => {
|
|
2663
2815
|
if (hasErrors) rootRef.current?.focus();
|
|
2664
2816
|
}, [focusKey, hasErrors]);
|
|
2665
2817
|
if (!hasErrors) return null;
|
|
2666
|
-
return /* @__PURE__ */ (0,
|
|
2818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2667
2819
|
"div",
|
|
2668
2820
|
{
|
|
2669
2821
|
ref: mergeRefs(ref, rootRef),
|
|
@@ -2671,12 +2823,12 @@ var ErrorSummary = /* @__PURE__ */ (0, import_react35.forwardRef)(function Error
|
|
|
2671
2823
|
"aria-labelledby": titleId,
|
|
2672
2824
|
className: cx(root9, className),
|
|
2673
2825
|
...rest,
|
|
2674
|
-
children: /* @__PURE__ */ (0,
|
|
2826
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2675
2827
|
Alert,
|
|
2676
2828
|
{
|
|
2677
2829
|
color: "danger",
|
|
2678
|
-
title: /* @__PURE__ */ (0,
|
|
2679
|
-
children: /* @__PURE__ */ (0,
|
|
2830
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("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` }),
|
|
2831
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("ul", { className: list3, children: errors2.map((error) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2680
2832
|
"a",
|
|
2681
2833
|
{
|
|
2682
2834
|
href: `#${error.id}`,
|
|
@@ -2694,7 +2846,7 @@ var ErrorSummary = /* @__PURE__ */ (0, import_react35.forwardRef)(function Error
|
|
|
2694
2846
|
});
|
|
2695
2847
|
|
|
2696
2848
|
// src/components/FileUpload/FileUpload.tsx
|
|
2697
|
-
var
|
|
2849
|
+
var import_react37 = require("react");
|
|
2698
2850
|
var import_icons14 = require("@bestow-ui/icons");
|
|
2699
2851
|
|
|
2700
2852
|
// src/components/FileUpload/FileUpload.css.ts
|
|
@@ -2710,7 +2862,7 @@ var list4 = "r2jefr4";
|
|
|
2710
2862
|
var root10 = "r2jefr0";
|
|
2711
2863
|
|
|
2712
2864
|
// src/components/FileUpload/FileUpload.tsx
|
|
2713
|
-
var
|
|
2865
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2714
2866
|
function formatSize(bytes) {
|
|
2715
2867
|
if (bytes < 1024) return `${bytes} B`;
|
|
2716
2868
|
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(bytes < 10 * 1024 ? 1 : 0)} KB`;
|
|
@@ -2726,7 +2878,7 @@ function matchesAccept(file, accept) {
|
|
|
2726
2878
|
}
|
|
2727
2879
|
var NO_FILES = [];
|
|
2728
2880
|
var sameFile = (a, b) => a.name === b.name && a.size === b.size && a.lastModified === b.lastModified;
|
|
2729
|
-
var FileUpload = /* @__PURE__ */ (0,
|
|
2881
|
+
var FileUpload = /* @__PURE__ */ (0, import_react37.forwardRef)(function FileUpload2(props, ref) {
|
|
2730
2882
|
const {
|
|
2731
2883
|
value: value4,
|
|
2732
2884
|
defaultValue,
|
|
@@ -2747,20 +2899,20 @@ var FileUpload = /* @__PURE__ */ (0, import_react36.forwardRef)(function FileUpl
|
|
|
2747
2899
|
} = props;
|
|
2748
2900
|
const m = useMessages();
|
|
2749
2901
|
const isControlled = "value" in props;
|
|
2750
|
-
const [innerFiles, setInnerFiles] = (0,
|
|
2902
|
+
const [innerFiles, setInnerFiles] = (0, import_react37.useState)(defaultValue ?? []);
|
|
2751
2903
|
const files = isControlled ? value4 ?? NO_FILES : innerFiles;
|
|
2752
|
-
const [rejections, setRejections] = (0,
|
|
2753
|
-
const [announcement, setAnnouncement] = (0,
|
|
2754
|
-
const [dragging, setDragging] = (0,
|
|
2755
|
-
const generatedId = (0,
|
|
2904
|
+
const [rejections, setRejections] = (0, import_react37.useState)([]);
|
|
2905
|
+
const [announcement, setAnnouncement] = (0, import_react37.useState)("");
|
|
2906
|
+
const [dragging, setDragging] = (0, import_react37.useState)(false);
|
|
2907
|
+
const generatedId = (0, import_react37.useId)();
|
|
2756
2908
|
const baseId = id ?? generatedId;
|
|
2757
2909
|
const labelId = label7 ? `${baseId}-label` : void 0;
|
|
2758
2910
|
const helperId = helperText3 ? `${baseId}-helper` : void 0;
|
|
2759
2911
|
const errorsId = rejections.length > 0 ? `${baseId}-errors` : void 0;
|
|
2760
|
-
const inputRef = (0,
|
|
2761
|
-
const selectButtonRef = (0,
|
|
2762
|
-
const removeButtonRefs = (0,
|
|
2763
|
-
const focusAfterRemove = (0,
|
|
2912
|
+
const inputRef = (0, import_react37.useRef)(null);
|
|
2913
|
+
const selectButtonRef = (0, import_react37.useRef)(null);
|
|
2914
|
+
const removeButtonRefs = (0, import_react37.useRef)([]);
|
|
2915
|
+
const focusAfterRemove = (0, import_react37.useRef)(null);
|
|
2764
2916
|
const selectLabel = m.fileSelect ?? "\uD30C\uC77C \uC120\uD0DD";
|
|
2765
2917
|
const reasonText = (rejection) => {
|
|
2766
2918
|
const fileName2 = rejection.file.name;
|
|
@@ -2802,13 +2954,13 @@ var FileUpload = /* @__PURE__ */ (0, import_react36.forwardRef)(function FileUpl
|
|
|
2802
2954
|
setRejections([]);
|
|
2803
2955
|
commit(next, m.fileRemoved?.(removed.name) ?? `${removed.name} \uC0AD\uC81C\uB428`);
|
|
2804
2956
|
};
|
|
2805
|
-
(0,
|
|
2957
|
+
(0, import_react37.useEffect)(() => {
|
|
2806
2958
|
if (focusAfterRemove.current === null) return;
|
|
2807
2959
|
const target = focusAfterRemove.current;
|
|
2808
2960
|
focusAfterRemove.current = null;
|
|
2809
2961
|
(target >= 0 ? removeButtonRefs.current[target] : selectButtonRef.current)?.focus();
|
|
2810
2962
|
}, [files]);
|
|
2811
|
-
(0,
|
|
2963
|
+
(0, import_react37.useEffect)(() => {
|
|
2812
2964
|
const input6 = inputRef.current;
|
|
2813
2965
|
if (!name || !input6 || typeof DataTransfer === "undefined") return;
|
|
2814
2966
|
try {
|
|
@@ -2823,12 +2975,12 @@ var FileUpload = /* @__PURE__ */ (0, import_react36.forwardRef)(function FileUpl
|
|
|
2823
2975
|
event.preventDefault();
|
|
2824
2976
|
setDragging(over);
|
|
2825
2977
|
};
|
|
2826
|
-
return /* @__PURE__ */ (0,
|
|
2827
|
-
label7 && /* @__PURE__ */ (0,
|
|
2978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { ref, className: cx(field, root10, className), children: [
|
|
2979
|
+
label7 && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { id: labelId, className: label2, children: [
|
|
2828
2980
|
label7,
|
|
2829
|
-
required && /* @__PURE__ */ (0,
|
|
2981
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
2830
2982
|
] }),
|
|
2831
|
-
/* @__PURE__ */ (0,
|
|
2983
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
2832
2984
|
"div",
|
|
2833
2985
|
{
|
|
2834
2986
|
role: "group",
|
|
@@ -2848,8 +3000,8 @@ var FileUpload = /* @__PURE__ */ (0, import_react36.forwardRef)(function FileUpl
|
|
|
2848
3000
|
if (!disabled) addFiles(Array.from(event.dataTransfer.files));
|
|
2849
3001
|
},
|
|
2850
3002
|
children: [
|
|
2851
|
-
/* @__PURE__ */ (0,
|
|
2852
|
-
/* @__PURE__ */ (0,
|
|
3003
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: dropIcon, "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons14.UploadIcon, { size: 24 }) }),
|
|
3004
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2853
3005
|
Button,
|
|
2854
3006
|
{
|
|
2855
3007
|
ref: selectButtonRef,
|
|
@@ -2862,8 +3014,8 @@ var FileUpload = /* @__PURE__ */ (0, import_react36.forwardRef)(function FileUpl
|
|
|
2862
3014
|
children: selectLabel
|
|
2863
3015
|
}
|
|
2864
3016
|
),
|
|
2865
|
-
/* @__PURE__ */ (0,
|
|
2866
|
-
/* @__PURE__ */ (0,
|
|
3017
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: dropHint, children: m.fileDropHint ?? "\uB610\uB294 \uC5EC\uAE30\uB85C \uB04C\uC5B4\uB2E4 \uB193\uC73C\uC138\uC694" }),
|
|
3018
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2867
3019
|
"input",
|
|
2868
3020
|
{
|
|
2869
3021
|
ref: inputRef,
|
|
@@ -2886,11 +3038,11 @@ var FileUpload = /* @__PURE__ */ (0, import_react36.forwardRef)(function FileUpl
|
|
|
2886
3038
|
]
|
|
2887
3039
|
}
|
|
2888
3040
|
),
|
|
2889
|
-
files.length > 0 && /* @__PURE__ */ (0,
|
|
2890
|
-
/* @__PURE__ */ (0,
|
|
2891
|
-
/* @__PURE__ */ (0,
|
|
2892
|
-
/* @__PURE__ */ (0,
|
|
2893
|
-
/* @__PURE__ */ (0,
|
|
3041
|
+
files.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("ul", { "aria-label": m.fileList ?? "\uC120\uD0DD\uD55C \uD30C\uC77C", className: list4, children: files.map((file, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("li", { className: item6, children: [
|
|
3042
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: fileIcon, "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons14.FileIcon, { size: 16 }) }),
|
|
3043
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: fileName, children: file.name }),
|
|
3044
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: fileSize, children: formatSize(file.size) }),
|
|
3045
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2894
3046
|
IconButton,
|
|
2895
3047
|
{
|
|
2896
3048
|
ref: (node) => {
|
|
@@ -2900,20 +3052,20 @@ var FileUpload = /* @__PURE__ */ (0, import_react36.forwardRef)(function FileUpl
|
|
|
2900
3052
|
"aria-label": m.fileRemove?.(file.name) ?? `${file.name} \uC0AD\uC81C`,
|
|
2901
3053
|
disabled,
|
|
2902
3054
|
onClick: () => removeAt(index),
|
|
2903
|
-
children: /* @__PURE__ */ (0,
|
|
3055
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_icons14.XIcon, {})
|
|
2904
3056
|
}
|
|
2905
3057
|
)
|
|
2906
3058
|
] }, `${file.name}-${file.size}-${file.lastModified}`)) }),
|
|
2907
|
-
rejections.length > 0 && /* @__PURE__ */ (0,
|
|
2908
|
-
helperText3 && /* @__PURE__ */ (0,
|
|
2909
|
-
/* @__PURE__ */ (0,
|
|
3059
|
+
rejections.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("ul", { id: errorsId, className: errors, children: [...new Set(rejections.map(reasonText))].map((text3) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("li", { children: text3 }, text3)) }),
|
|
3060
|
+
helperText3 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { id: helperId, className: helperText({ error }), children: helperText3 }),
|
|
3061
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { role: "status", className: visuallyHidden, children: announcement })
|
|
2910
3062
|
] });
|
|
2911
3063
|
});
|
|
2912
3064
|
|
|
2913
3065
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
2914
3066
|
var RadixMenu = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
|
|
2915
3067
|
var import_icons15 = require("@bestow-ui/icons");
|
|
2916
|
-
var
|
|
3068
|
+
var import_react38 = require("react");
|
|
2917
3069
|
|
|
2918
3070
|
// src/components/DropdownMenu/DropdownMenu.css.ts
|
|
2919
3071
|
var content9 = "_1d7ahux0";
|
|
@@ -2924,20 +3076,20 @@ var indicatorInner = "_1d7ahux8";
|
|
|
2924
3076
|
var item7 = "_1d7ahux1";
|
|
2925
3077
|
var label3 = "_1d7ahux5";
|
|
2926
3078
|
var radioDot = "_1d7ahux9";
|
|
2927
|
-
var
|
|
3079
|
+
var separator3 = "_1d7ahux6";
|
|
2928
3080
|
var shortcut = "_1d7ahux4";
|
|
2929
3081
|
var subChevron = "_1d7ahuxb";
|
|
2930
3082
|
var subTrigger = "_1d7ahuxa";
|
|
2931
3083
|
|
|
2932
3084
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
2933
|
-
var
|
|
3085
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2934
3086
|
var DropdownMenu = RadixMenu.Root;
|
|
2935
3087
|
var DropdownMenuTrigger = RadixMenu.Trigger;
|
|
2936
3088
|
var DropdownMenuGroup = RadixMenu.Group;
|
|
2937
|
-
var DropdownMenuContent = /* @__PURE__ */ (0,
|
|
3089
|
+
var DropdownMenuContent = /* @__PURE__ */ (0, import_react38.forwardRef)(
|
|
2938
3090
|
function DropdownMenuContent2({ className, style, side = "bottom", align = "start", sideOffset = 4, collisionPadding = 8, ...rest }, ref) {
|
|
2939
3091
|
const portal2 = usePortalProps();
|
|
2940
|
-
return /* @__PURE__ */ (0,
|
|
3092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(RadixMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2941
3093
|
RadixMenu.Content,
|
|
2942
3094
|
{
|
|
2943
3095
|
ref,
|
|
@@ -2952,56 +3104,56 @@ var DropdownMenuContent = /* @__PURE__ */ (0, import_react37.forwardRef)(
|
|
|
2952
3104
|
) });
|
|
2953
3105
|
}
|
|
2954
3106
|
);
|
|
2955
|
-
var DropdownMenuItem = /* @__PURE__ */ (0,
|
|
3107
|
+
var DropdownMenuItem = /* @__PURE__ */ (0, import_react38.forwardRef)(
|
|
2956
3108
|
function DropdownMenuItem2({ icon: icon7, shortcut: shortcut2, color = "neutral", className, children, ...rest }, ref) {
|
|
2957
|
-
return /* @__PURE__ */ (0,
|
|
2958
|
-
icon7 && /* @__PURE__ */ (0,
|
|
3109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(RadixMenu.Item, { ref, className: cx(item7, color === "danger" && danger, className), ...rest, children: [
|
|
3110
|
+
icon7 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: icon5, "aria-hidden": true, children: icon7 }),
|
|
2959
3111
|
children,
|
|
2960
|
-
shortcut2 && /* @__PURE__ */ (0,
|
|
3112
|
+
shortcut2 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: shortcut, "aria-hidden": true, children: shortcut2 })
|
|
2961
3113
|
] });
|
|
2962
3114
|
}
|
|
2963
3115
|
);
|
|
2964
|
-
var DropdownMenuLabel = /* @__PURE__ */ (0,
|
|
3116
|
+
var DropdownMenuLabel = /* @__PURE__ */ (0, import_react38.forwardRef)(
|
|
2965
3117
|
function DropdownMenuLabel2({ className, ...rest }, ref) {
|
|
2966
|
-
return /* @__PURE__ */ (0,
|
|
3118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(RadixMenu.Label, { ref, className: cx(label3, className), ...rest });
|
|
2967
3119
|
}
|
|
2968
3120
|
);
|
|
2969
|
-
var DropdownMenuSeparator = /* @__PURE__ */ (0,
|
|
3121
|
+
var DropdownMenuSeparator = /* @__PURE__ */ (0, import_react38.forwardRef)(
|
|
2970
3122
|
function DropdownMenuSeparator2({ className, ...rest }, ref) {
|
|
2971
|
-
return /* @__PURE__ */ (0,
|
|
3123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(RadixMenu.Separator, { ref, className: cx(separator3, className), ...rest });
|
|
2972
3124
|
}
|
|
2973
3125
|
);
|
|
2974
|
-
var DropdownMenuCheckboxItem = /* @__PURE__ */ (0,
|
|
3126
|
+
var DropdownMenuCheckboxItem = /* @__PURE__ */ (0, import_react38.forwardRef)(
|
|
2975
3127
|
function DropdownMenuCheckboxItem2({ className, children, ...rest }, ref) {
|
|
2976
|
-
return /* @__PURE__ */ (0,
|
|
2977
|
-
/* @__PURE__ */ (0,
|
|
3128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(RadixMenu.CheckboxItem, { ref, className: cx(item7, className), ...rest, children: [
|
|
3129
|
+
/* @__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 }) }) }),
|
|
2978
3130
|
children
|
|
2979
3131
|
] });
|
|
2980
3132
|
}
|
|
2981
3133
|
);
|
|
2982
3134
|
var DropdownMenuRadioGroup = RadixMenu.RadioGroup;
|
|
2983
|
-
var DropdownMenuRadioItem = /* @__PURE__ */ (0,
|
|
3135
|
+
var DropdownMenuRadioItem = /* @__PURE__ */ (0, import_react38.forwardRef)(
|
|
2984
3136
|
function DropdownMenuRadioItem2({ className, children, ...rest }, ref) {
|
|
2985
|
-
return /* @__PURE__ */ (0,
|
|
2986
|
-
/* @__PURE__ */ (0,
|
|
3137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(RadixMenu.RadioItem, { ref, className: cx(item7, className), ...rest, children: [
|
|
3138
|
+
/* @__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 }) }) }),
|
|
2987
3139
|
children
|
|
2988
3140
|
] });
|
|
2989
3141
|
}
|
|
2990
3142
|
);
|
|
2991
3143
|
var DropdownMenuSub = RadixMenu.Sub;
|
|
2992
|
-
var DropdownMenuSubTrigger = /* @__PURE__ */ (0,
|
|
3144
|
+
var DropdownMenuSubTrigger = /* @__PURE__ */ (0, import_react38.forwardRef)(
|
|
2993
3145
|
function DropdownMenuSubTrigger2({ icon: icon7, className, children, ...rest }, ref) {
|
|
2994
|
-
return /* @__PURE__ */ (0,
|
|
2995
|
-
icon7 && /* @__PURE__ */ (0,
|
|
3146
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(RadixMenu.SubTrigger, { ref, className: cx(item7, subTrigger, className), ...rest, children: [
|
|
3147
|
+
icon7 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: icon5, "aria-hidden": true, children: icon7 }),
|
|
2996
3148
|
children,
|
|
2997
|
-
/* @__PURE__ */ (0,
|
|
3149
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: subChevron, "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons15.ChevronRightIcon, { size: 16 }) })
|
|
2998
3150
|
] });
|
|
2999
3151
|
}
|
|
3000
3152
|
);
|
|
3001
|
-
var DropdownMenuSubContent = /* @__PURE__ */ (0,
|
|
3153
|
+
var DropdownMenuSubContent = /* @__PURE__ */ (0, import_react38.forwardRef)(
|
|
3002
3154
|
function DropdownMenuSubContent2({ className, style, sideOffset = 4, alignOffset = -5, collisionPadding = 8, ...rest }, ref) {
|
|
3003
3155
|
const portal2 = usePortalProps();
|
|
3004
|
-
return /* @__PURE__ */ (0,
|
|
3156
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(RadixMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3005
3157
|
RadixMenu.SubContent,
|
|
3006
3158
|
{
|
|
3007
3159
|
ref,
|
|
@@ -3017,7 +3169,7 @@ var DropdownMenuSubContent = /* @__PURE__ */ (0, import_react37.forwardRef)(
|
|
|
3017
3169
|
);
|
|
3018
3170
|
|
|
3019
3171
|
// src/components/NumberInput/NumberInput.tsx
|
|
3020
|
-
var
|
|
3172
|
+
var import_react39 = require("react");
|
|
3021
3173
|
var import_icons16 = require("@bestow-ui/icons");
|
|
3022
3174
|
|
|
3023
3175
|
// src/components/NumberInput/NumberInput.css.ts
|
|
@@ -3028,12 +3180,12 @@ var stepper = /* @__PURE__ */ (0, import_createRuntimeFn19.createRuntimeFn)({ de
|
|
|
3028
3180
|
var unit = "_1vq2qhv2";
|
|
3029
3181
|
|
|
3030
3182
|
// src/components/NumberInput/NumberInput.tsx
|
|
3031
|
-
var
|
|
3183
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3032
3184
|
var MAX_DIGITS2 = 15;
|
|
3033
3185
|
var isMeaningful = (char) => /[\d.-]/.test(char);
|
|
3034
3186
|
var decimalsOf = (n) => Number.isFinite(n) ? String(n).split(".")[1]?.length ?? 0 : 0;
|
|
3035
3187
|
var parse = (raw) => /\d/.test(raw) ? Number(raw) : null;
|
|
3036
|
-
var NumberInput = /* @__PURE__ */ (0,
|
|
3188
|
+
var NumberInput = /* @__PURE__ */ (0, import_react39.forwardRef)(
|
|
3037
3189
|
function NumberInput2(props, ref) {
|
|
3038
3190
|
const {
|
|
3039
3191
|
value: value4,
|
|
@@ -3059,8 +3211,8 @@ var NumberInput = /* @__PURE__ */ (0, import_react38.forwardRef)(
|
|
|
3059
3211
|
} = props;
|
|
3060
3212
|
const isControlled = "value" in props;
|
|
3061
3213
|
const m = useMessages();
|
|
3062
|
-
const inputRef = (0,
|
|
3063
|
-
const generatedId = (0,
|
|
3214
|
+
const inputRef = (0, import_react39.useRef)(null);
|
|
3215
|
+
const generatedId = (0, import_react39.useId)();
|
|
3064
3216
|
const inputId = id ?? generatedId;
|
|
3065
3217
|
const precision = Math.max(0, precisionProp ?? decimalsOf(step2));
|
|
3066
3218
|
const allowNegative = min === void 0 || min < 0;
|
|
@@ -3080,13 +3232,13 @@ var NumberInput = /* @__PURE__ */ (0, import_react38.forwardRef)(
|
|
|
3080
3232
|
const [, sign = "", int = "", rest2 = ""] = raw.match(/^(-?)(\d*)(.*)$/) ?? [];
|
|
3081
3233
|
return `${sign}${int ? Number(int).toLocaleString("ko-KR") : ""}${rest2}`;
|
|
3082
3234
|
};
|
|
3083
|
-
const lastEmitted = (0,
|
|
3235
|
+
const lastEmitted = (0, import_react39.useRef)(parse(toRaw(isControlled ? value4 : defaultValue)));
|
|
3084
3236
|
const emit = (next) => {
|
|
3085
3237
|
if (next === lastEmitted.current) return;
|
|
3086
3238
|
lastEmitted.current = next;
|
|
3087
3239
|
onValueChange?.(next);
|
|
3088
3240
|
};
|
|
3089
|
-
const
|
|
3241
|
+
const field4 = useFormattedInput({
|
|
3090
3242
|
isControlled: false,
|
|
3091
3243
|
value: void 0,
|
|
3092
3244
|
defaultValue: toRaw(isControlled ? value4 : defaultValue),
|
|
@@ -3096,14 +3248,14 @@ var NumberInput = /* @__PURE__ */ (0, import_react38.forwardRef)(
|
|
|
3096
3248
|
isMeaningful,
|
|
3097
3249
|
inputRef
|
|
3098
3250
|
});
|
|
3099
|
-
const { setRaw } =
|
|
3100
|
-
(0,
|
|
3251
|
+
const { setRaw } = field4;
|
|
3252
|
+
(0, import_react39.useEffect)(() => {
|
|
3101
3253
|
if (!isControlled) return;
|
|
3102
3254
|
const next = value4 ?? null;
|
|
3103
3255
|
lastEmitted.current = next;
|
|
3104
|
-
if (parse(
|
|
3256
|
+
if (parse(field4.raw) !== next) setRaw(toRaw(next));
|
|
3105
3257
|
}, [value4]);
|
|
3106
|
-
const current2 = parse(
|
|
3258
|
+
const current2 = parse(field4.raw);
|
|
3107
3259
|
const setValue = (next) => {
|
|
3108
3260
|
setRaw(toRaw(next));
|
|
3109
3261
|
emit(next);
|
|
@@ -3133,10 +3285,10 @@ var NumberInput = /* @__PURE__ */ (0, import_react38.forwardRef)(
|
|
|
3133
3285
|
event.preventDefault();
|
|
3134
3286
|
setValue(max);
|
|
3135
3287
|
} else {
|
|
3136
|
-
|
|
3288
|
+
field4.onKeyDown(event);
|
|
3137
3289
|
}
|
|
3138
3290
|
};
|
|
3139
|
-
const stepper2 = (direction) => /* @__PURE__ */ (0,
|
|
3291
|
+
const stepper2 = (direction) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3140
3292
|
IconButton,
|
|
3141
3293
|
{
|
|
3142
3294
|
size: "sm",
|
|
@@ -3147,11 +3299,11 @@ var NumberInput = /* @__PURE__ */ (0, import_react38.forwardRef)(
|
|
|
3147
3299
|
onMouseDown: (event) => event.preventDefault(),
|
|
3148
3300
|
onClick: () => stepBy(direction * step2),
|
|
3149
3301
|
className: stepper({ size }),
|
|
3150
|
-
children: direction < 0 ? /* @__PURE__ */ (0,
|
|
3302
|
+
children: direction < 0 ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_icons16.MinusIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_icons16.PlusIcon, {})
|
|
3151
3303
|
}
|
|
3152
3304
|
);
|
|
3153
|
-
return /* @__PURE__ */ (0,
|
|
3154
|
-
/* @__PURE__ */ (0,
|
|
3305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
|
|
3306
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3155
3307
|
TextField,
|
|
3156
3308
|
{
|
|
3157
3309
|
ref: mergeRefs(ref, inputRef),
|
|
@@ -3162,35 +3314,35 @@ var NumberInput = /* @__PURE__ */ (0, import_react38.forwardRef)(
|
|
|
3162
3314
|
"aria-valuenow": current2 ?? void 0,
|
|
3163
3315
|
"aria-valuemin": min,
|
|
3164
3316
|
"aria-valuemax": max,
|
|
3165
|
-
"aria-valuetext": current2 === null ? void 0 : `${
|
|
3166
|
-
value:
|
|
3167
|
-
onChange:
|
|
3317
|
+
"aria-valuetext": current2 === null ? void 0 : `${field4.display}${unit2 ?? ""}`,
|
|
3318
|
+
value: field4.display,
|
|
3319
|
+
onChange: field4.onChange,
|
|
3168
3320
|
onKeyDown: handleKeyDown,
|
|
3169
3321
|
onBlur: (event) => {
|
|
3170
3322
|
if (current2 !== null && clamp(current2) !== current2) setValue(clamp(current2));
|
|
3171
|
-
else if (current2 === null &&
|
|
3323
|
+
else if (current2 === null && field4.raw !== "") setRaw("");
|
|
3172
3324
|
onBlur?.(event);
|
|
3173
3325
|
},
|
|
3174
3326
|
size,
|
|
3175
3327
|
disabled,
|
|
3176
3328
|
readOnly,
|
|
3177
3329
|
startAdornment: hideStepper ? void 0 : stepper2(-1),
|
|
3178
|
-
endAdornment: unit2 || !hideStepper ? /* @__PURE__ */ (0,
|
|
3179
|
-
unit2 && /* @__PURE__ */ (0,
|
|
3330
|
+
endAdornment: unit2 || !hideStepper ? /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: end, children: [
|
|
3331
|
+
unit2 && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: unit, children: unit2 }),
|
|
3180
3332
|
!hideStepper && stepper2(1)
|
|
3181
3333
|
] }) : void 0,
|
|
3182
3334
|
className: cx(input4, className),
|
|
3183
3335
|
...rest
|
|
3184
3336
|
}
|
|
3185
3337
|
),
|
|
3186
|
-
name && /* @__PURE__ */ (0,
|
|
3338
|
+
name && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("input", { type: "hidden", name, value: current2 === null ? "" : String(current2) })
|
|
3187
3339
|
] });
|
|
3188
3340
|
}
|
|
3189
3341
|
);
|
|
3190
3342
|
|
|
3191
3343
|
// src/components/Pagination/Pagination.tsx
|
|
3192
3344
|
var import_icons17 = require("@bestow-ui/icons");
|
|
3193
|
-
var
|
|
3345
|
+
var import_react40 = require("react");
|
|
3194
3346
|
|
|
3195
3347
|
// src/components/Pagination/getPaginationItems.ts
|
|
3196
3348
|
var range = (start, end2) => end2 < start ? [] : Array.from({ length: end2 - start + 1 }, (_, i) => start + i);
|
|
@@ -3223,8 +3375,8 @@ var item8 = /* @__PURE__ */ (0, import_createRuntimeFn20.createRuntimeFn)({ defa
|
|
|
3223
3375
|
var list5 = "_1iraoak0";
|
|
3224
3376
|
|
|
3225
3377
|
// src/components/Pagination/Pagination.tsx
|
|
3226
|
-
var
|
|
3227
|
-
var Pagination = /* @__PURE__ */ (0,
|
|
3378
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3379
|
+
var Pagination = /* @__PURE__ */ (0, import_react40.forwardRef)(function Pagination2({
|
|
3228
3380
|
totalPages,
|
|
3229
3381
|
page: pageProp,
|
|
3230
3382
|
defaultPage = 1,
|
|
@@ -3237,7 +3389,7 @@ var Pagination = /* @__PURE__ */ (0, import_react39.forwardRef)(function Paginat
|
|
|
3237
3389
|
"aria-label": ariaLabelProp,
|
|
3238
3390
|
...rest
|
|
3239
3391
|
}, ref) {
|
|
3240
|
-
const [uncontrolledPage, setUncontrolledPage] = (0,
|
|
3392
|
+
const [uncontrolledPage, setUncontrolledPage] = (0, import_react40.useState)(defaultPage);
|
|
3241
3393
|
const m = useMessages();
|
|
3242
3394
|
const ariaLabel = ariaLabelProp ?? m.pagination ?? "\uD398\uC774\uC9C0 \uD0D0\uC0C9";
|
|
3243
3395
|
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`);
|
|
@@ -3249,8 +3401,8 @@ var Pagination = /* @__PURE__ */ (0, import_react39.forwardRef)(function Paginat
|
|
|
3249
3401
|
onPageChange?.(next);
|
|
3250
3402
|
};
|
|
3251
3403
|
const itemClass = item8({ size });
|
|
3252
|
-
return /* @__PURE__ */ (0,
|
|
3253
|
-
/* @__PURE__ */ (0,
|
|
3404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("nav", { ref, "aria-label": ariaLabel, className, ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("ul", { className: list5, children: [
|
|
3405
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3254
3406
|
"button",
|
|
3255
3407
|
{
|
|
3256
3408
|
type: "button",
|
|
@@ -3258,11 +3410,11 @@ var Pagination = /* @__PURE__ */ (0, import_react39.forwardRef)(function Paginat
|
|
|
3258
3410
|
"aria-label": getItemLabel("previous", page - 1),
|
|
3259
3411
|
disabled: page <= 1,
|
|
3260
3412
|
onClick: () => goTo(page - 1),
|
|
3261
|
-
children: /* @__PURE__ */ (0,
|
|
3413
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_icons17.ChevronLeftIcon, { size: 16 })
|
|
3262
3414
|
}
|
|
3263
3415
|
) }),
|
|
3264
3416
|
getPaginationItems(page, totalPages, siblingCount, boundaryCount).map(
|
|
3265
|
-
(item10) => typeof item10 === "number" ? /* @__PURE__ */ (0,
|
|
3417
|
+
(item10) => typeof item10 === "number" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3266
3418
|
"button",
|
|
3267
3419
|
{
|
|
3268
3420
|
type: "button",
|
|
@@ -3272,9 +3424,9 @@ var Pagination = /* @__PURE__ */ (0, import_react39.forwardRef)(function Paginat
|
|
|
3272
3424
|
onClick: () => goTo(item10),
|
|
3273
3425
|
children: item10
|
|
3274
3426
|
}
|
|
3275
|
-
) }, item10) : /* @__PURE__ */ (0,
|
|
3427
|
+
) }, item10) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("li", { "aria-hidden": true, className: cx(itemClass, ellipsis), children: "\u2026" }, item10)
|
|
3276
3428
|
),
|
|
3277
|
-
/* @__PURE__ */ (0,
|
|
3429
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3278
3430
|
"button",
|
|
3279
3431
|
{
|
|
3280
3432
|
type: "button",
|
|
@@ -3282,21 +3434,21 @@ var Pagination = /* @__PURE__ */ (0, import_react39.forwardRef)(function Paginat
|
|
|
3282
3434
|
"aria-label": getItemLabel("next", page + 1),
|
|
3283
3435
|
disabled: page >= totalPages,
|
|
3284
3436
|
onClick: () => goTo(page + 1),
|
|
3285
|
-
children: /* @__PURE__ */ (0,
|
|
3437
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_icons17.ChevronRightIcon, { size: 16 })
|
|
3286
3438
|
}
|
|
3287
3439
|
) })
|
|
3288
3440
|
] }) });
|
|
3289
3441
|
});
|
|
3290
3442
|
|
|
3291
3443
|
// src/components/PhoneNumberInput/PhoneNumberInput.tsx
|
|
3292
|
-
var
|
|
3293
|
-
var
|
|
3444
|
+
var import_react41 = require("react");
|
|
3445
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3294
3446
|
var sanitize3 = (input6) => {
|
|
3295
3447
|
const digits = input6.replace(/\D/g, "");
|
|
3296
3448
|
return digits.slice(0, phoneNumberMaxDigits(digits));
|
|
3297
3449
|
};
|
|
3298
3450
|
var isDigit4 = (char) => /\d/.test(char);
|
|
3299
|
-
var PhoneNumberInput = /* @__PURE__ */ (0,
|
|
3451
|
+
var PhoneNumberInput = /* @__PURE__ */ (0, import_react41.forwardRef)(
|
|
3300
3452
|
function PhoneNumberInput2(props, ref) {
|
|
3301
3453
|
const {
|
|
3302
3454
|
value: value4,
|
|
@@ -3307,10 +3459,10 @@ var PhoneNumberInput = /* @__PURE__ */ (0, import_react40.forwardRef)(
|
|
|
3307
3459
|
onKeyDown,
|
|
3308
3460
|
...rest
|
|
3309
3461
|
} = props;
|
|
3310
|
-
const inputRef = (0,
|
|
3462
|
+
const inputRef = (0, import_react41.useRef)(null);
|
|
3311
3463
|
const m = useMessages();
|
|
3312
3464
|
const label7 = labelProp ?? m.phoneNumber ?? "\uD734\uB300\uD3F0 \uBC88\uD638";
|
|
3313
|
-
const
|
|
3465
|
+
const field4 = useFormattedInput({
|
|
3314
3466
|
isControlled: "value" in props,
|
|
3315
3467
|
value: value4,
|
|
3316
3468
|
defaultValue,
|
|
@@ -3320,7 +3472,7 @@ var PhoneNumberInput = /* @__PURE__ */ (0, import_react40.forwardRef)(
|
|
|
3320
3472
|
isMeaningful: isDigit4,
|
|
3321
3473
|
inputRef
|
|
3322
3474
|
});
|
|
3323
|
-
return /* @__PURE__ */ (0,
|
|
3475
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3324
3476
|
TextField,
|
|
3325
3477
|
{
|
|
3326
3478
|
ref: mergeRefs(ref, inputRef),
|
|
@@ -3329,10 +3481,10 @@ var PhoneNumberInput = /* @__PURE__ */ (0, import_react40.forwardRef)(
|
|
|
3329
3481
|
type: "tel",
|
|
3330
3482
|
inputMode: "tel",
|
|
3331
3483
|
autoComplete: "tel-national",
|
|
3332
|
-
value:
|
|
3333
|
-
onChange:
|
|
3484
|
+
value: field4.display,
|
|
3485
|
+
onChange: field4.onChange,
|
|
3334
3486
|
onKeyDown: (event) => {
|
|
3335
|
-
|
|
3487
|
+
field4.onKeyDown(event);
|
|
3336
3488
|
onKeyDown?.(event);
|
|
3337
3489
|
},
|
|
3338
3490
|
...rest
|
|
@@ -3342,7 +3494,7 @@ var PhoneNumberInput = /* @__PURE__ */ (0, import_react40.forwardRef)(
|
|
|
3342
3494
|
);
|
|
3343
3495
|
|
|
3344
3496
|
// src/components/RadioGroup/RadioGroup.tsx
|
|
3345
|
-
var
|
|
3497
|
+
var import_react42 = require("react");
|
|
3346
3498
|
|
|
3347
3499
|
// src/components/RadioGroup/RadioGroup.css.ts
|
|
3348
3500
|
var import_createRuntimeFn21 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
@@ -3355,8 +3507,8 @@ var radio = /* @__PURE__ */ (0, import_createRuntimeFn21.createRuntimeFn)({ defa
|
|
|
3355
3507
|
var text = "_1w9iwjma";
|
|
3356
3508
|
|
|
3357
3509
|
// src/components/RadioGroup/RadioGroup.tsx
|
|
3358
|
-
var
|
|
3359
|
-
var RadioGroup2 = /* @__PURE__ */ (0,
|
|
3510
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3511
|
+
var RadioGroup2 = /* @__PURE__ */ (0, import_react42.forwardRef)(function RadioGroup3(props, ref) {
|
|
3360
3512
|
const {
|
|
3361
3513
|
options,
|
|
3362
3514
|
value: value4,
|
|
@@ -3375,9 +3527,9 @@ var RadioGroup2 = /* @__PURE__ */ (0, import_react41.forwardRef)(function RadioG
|
|
|
3375
3527
|
className
|
|
3376
3528
|
} = props;
|
|
3377
3529
|
const isControlled = "value" in props;
|
|
3378
|
-
const [innerValue, setInnerValue] = (0,
|
|
3530
|
+
const [innerValue, setInnerValue] = (0, import_react42.useState)(defaultValue ?? "");
|
|
3379
3531
|
const current2 = isControlled ? value4 ?? "" : innerValue;
|
|
3380
|
-
const generatedId = (0,
|
|
3532
|
+
const generatedId = (0, import_react42.useId)();
|
|
3381
3533
|
const baseId = id ?? generatedId;
|
|
3382
3534
|
const labelId = label7 ? `${baseId}-label` : void 0;
|
|
3383
3535
|
const helperId = helperText3 ? `${baseId}-helper` : void 0;
|
|
@@ -3388,12 +3540,12 @@ var RadioGroup2 = /* @__PURE__ */ (0, import_react41.forwardRef)(function RadioG
|
|
|
3388
3540
|
if (!isControlled) setInnerValue(next);
|
|
3389
3541
|
onValueChange?.(next);
|
|
3390
3542
|
};
|
|
3391
|
-
return /* @__PURE__ */ (0,
|
|
3392
|
-
label7 && /* @__PURE__ */ (0,
|
|
3543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: cx(field, className), children: [
|
|
3544
|
+
label7 && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { id: labelId, className: cx(label2, groupLabel), children: [
|
|
3393
3545
|
label7,
|
|
3394
|
-
required && /* @__PURE__ */ (0,
|
|
3546
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
3395
3547
|
] }),
|
|
3396
|
-
/* @__PURE__ */ (0,
|
|
3548
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3397
3549
|
"div",
|
|
3398
3550
|
{
|
|
3399
3551
|
ref,
|
|
@@ -3411,8 +3563,8 @@ var RadioGroup2 = /* @__PURE__ */ (0, import_react41.forwardRef)(function RadioG
|
|
|
3411
3563
|
const descriptionId = option2.description ? `${itemId}-description` : void 0;
|
|
3412
3564
|
const itemDisabled = disabled || option2.disabled;
|
|
3413
3565
|
const checked = option2.value === current2;
|
|
3414
|
-
return /* @__PURE__ */ (0,
|
|
3415
|
-
/* @__PURE__ */ (0,
|
|
3566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: option({ size }), "data-disabled": itemDisabled || void 0, children: [
|
|
3567
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3416
3568
|
"input",
|
|
3417
3569
|
{
|
|
3418
3570
|
type: "radio",
|
|
@@ -3429,20 +3581,20 @@ var RadioGroup2 = /* @__PURE__ */ (0, import_react41.forwardRef)(function RadioG
|
|
|
3429
3581
|
className: radio({ size })
|
|
3430
3582
|
}
|
|
3431
3583
|
),
|
|
3432
|
-
/* @__PURE__ */ (0,
|
|
3433
|
-
/* @__PURE__ */ (0,
|
|
3434
|
-
option2.description && /* @__PURE__ */ (0,
|
|
3584
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { className: text, children: [
|
|
3585
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("label", { htmlFor: itemId, className: labelText, children: option2.label }),
|
|
3586
|
+
option2.description && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { id: descriptionId, className: description5, children: option2.description })
|
|
3435
3587
|
] })
|
|
3436
3588
|
] }, option2.value);
|
|
3437
3589
|
})
|
|
3438
3590
|
}
|
|
3439
3591
|
),
|
|
3440
|
-
helperText3 && /* @__PURE__ */ (0,
|
|
3592
|
+
helperText3 && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { id: helperId, className: helperText({ error }), children: helperText3 })
|
|
3441
3593
|
] });
|
|
3442
3594
|
});
|
|
3443
3595
|
|
|
3444
3596
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
3445
|
-
var
|
|
3597
|
+
var import_react43 = require("react");
|
|
3446
3598
|
|
|
3447
3599
|
// src/components/SegmentedControl/SegmentedControl.css.ts
|
|
3448
3600
|
var import_createRuntimeFn22 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
@@ -3451,9 +3603,9 @@ var item9 = /* @__PURE__ */ (0, import_createRuntimeFn22.createRuntimeFn)({ defa
|
|
|
3451
3603
|
var root11 = /* @__PURE__ */ (0, import_createRuntimeFn22.createRuntimeFn)({ defaultClassName: "_1h65mmo0", variantClassNames: { fullWidth: { true: "_1h65mmo1" } }, defaultVariants: {}, compoundVariants: [] });
|
|
3452
3604
|
|
|
3453
3605
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
3454
|
-
var
|
|
3606
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3455
3607
|
var NEXT_KEYS = { ArrowRight: 1, ArrowDown: 1, ArrowLeft: -1, ArrowUp: -1 };
|
|
3456
|
-
var SegmentedControl = /* @__PURE__ */ (0,
|
|
3608
|
+
var SegmentedControl = /* @__PURE__ */ (0, import_react43.forwardRef)(
|
|
3457
3609
|
function SegmentedControl2(props, ref) {
|
|
3458
3610
|
const {
|
|
3459
3611
|
options,
|
|
@@ -3470,11 +3622,11 @@ var SegmentedControl = /* @__PURE__ */ (0, import_react42.forwardRef)(
|
|
|
3470
3622
|
className
|
|
3471
3623
|
} = props;
|
|
3472
3624
|
const isControlled = "value" in props;
|
|
3473
|
-
const [innerValue, setInnerValue] = (0,
|
|
3625
|
+
const [innerValue, setInnerValue] = (0, import_react43.useState)(defaultValue ?? "");
|
|
3474
3626
|
const current2 = isControlled ? value4 ?? "" : innerValue;
|
|
3475
|
-
const generatedId = (0,
|
|
3627
|
+
const generatedId = (0, import_react43.useId)();
|
|
3476
3628
|
const labelId = label7 ? `${id ?? generatedId}-label` : void 0;
|
|
3477
|
-
const itemRefs = (0,
|
|
3629
|
+
const itemRefs = (0, import_react43.useRef)([]);
|
|
3478
3630
|
const isEnabled = (index) => !disabled && !options[index]?.disabled;
|
|
3479
3631
|
const select = (index) => {
|
|
3480
3632
|
const next = options[index].value;
|
|
@@ -3505,7 +3657,7 @@ var SegmentedControl = /* @__PURE__ */ (0, import_react42.forwardRef)(
|
|
|
3505
3657
|
itemRefs.current[target]?.focus();
|
|
3506
3658
|
select(target);
|
|
3507
3659
|
};
|
|
3508
|
-
const group = /* @__PURE__ */ (0,
|
|
3660
|
+
const group = /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
3509
3661
|
"div",
|
|
3510
3662
|
{
|
|
3511
3663
|
ref,
|
|
@@ -3518,7 +3670,7 @@ var SegmentedControl = /* @__PURE__ */ (0, import_react42.forwardRef)(
|
|
|
3518
3670
|
children: [
|
|
3519
3671
|
options.map((option2, index) => {
|
|
3520
3672
|
const checked = index === checkedIndex;
|
|
3521
|
-
return /* @__PURE__ */ (0,
|
|
3673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
3522
3674
|
"button",
|
|
3523
3675
|
{
|
|
3524
3676
|
ref: (node) => {
|
|
@@ -3535,20 +3687,20 @@ var SegmentedControl = /* @__PURE__ */ (0, import_react42.forwardRef)(
|
|
|
3535
3687
|
onClick: () => select(index),
|
|
3536
3688
|
onKeyDown: (event) => handleKeyDown(event, index),
|
|
3537
3689
|
children: [
|
|
3538
|
-
option2.icon && /* @__PURE__ */ (0,
|
|
3690
|
+
option2.icon && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { "aria-hidden": true, className: icon6, children: option2.icon }),
|
|
3539
3691
|
option2.label
|
|
3540
3692
|
]
|
|
3541
3693
|
},
|
|
3542
3694
|
option2.value
|
|
3543
3695
|
);
|
|
3544
3696
|
}),
|
|
3545
|
-
name && /* @__PURE__ */ (0,
|
|
3697
|
+
name && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("input", { type: "hidden", name, value: current2 })
|
|
3546
3698
|
]
|
|
3547
3699
|
}
|
|
3548
3700
|
);
|
|
3549
3701
|
if (!label7) return group;
|
|
3550
|
-
return /* @__PURE__ */ (0,
|
|
3551
|
-
/* @__PURE__ */ (0,
|
|
3702
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: cx(field, className), children: [
|
|
3703
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { id: labelId, className: label2, children: label7 }),
|
|
3552
3704
|
group
|
|
3553
3705
|
] });
|
|
3554
3706
|
}
|
|
@@ -3556,10 +3708,10 @@ var SegmentedControl = /* @__PURE__ */ (0, import_react42.forwardRef)(
|
|
|
3556
3708
|
|
|
3557
3709
|
// src/components/Select/Select.tsx
|
|
3558
3710
|
var RadixSelect = __toESM(require("@radix-ui/react-select"), 1);
|
|
3559
|
-
var
|
|
3711
|
+
var import_react44 = require("react");
|
|
3560
3712
|
var import_icons18 = require("@bestow-ui/icons");
|
|
3561
|
-
var
|
|
3562
|
-
var Select = /* @__PURE__ */ (0,
|
|
3713
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3714
|
+
var Select = /* @__PURE__ */ (0, import_react44.forwardRef)(function Select2(props, ref) {
|
|
3563
3715
|
const {
|
|
3564
3716
|
options,
|
|
3565
3717
|
value: value4,
|
|
@@ -3579,16 +3731,16 @@ var Select = /* @__PURE__ */ (0, import_react43.forwardRef)(function Select2(pro
|
|
|
3579
3731
|
className
|
|
3580
3732
|
} = props;
|
|
3581
3733
|
const isControlled = "value" in props;
|
|
3582
|
-
const generatedId = (0,
|
|
3734
|
+
const generatedId = (0, import_react44.useId)();
|
|
3583
3735
|
const triggerId = id ?? generatedId;
|
|
3584
3736
|
const helperId = helperText3 ? `${triggerId}-helper` : void 0;
|
|
3585
3737
|
const portal2 = usePortalProps();
|
|
3586
|
-
return /* @__PURE__ */ (0,
|
|
3587
|
-
label7 && /* @__PURE__ */ (0,
|
|
3738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
|
|
3739
|
+
label7 && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("label", { htmlFor: triggerId, className: label2, children: [
|
|
3588
3740
|
label7,
|
|
3589
|
-
required && /* @__PURE__ */ (0,
|
|
3741
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
3590
3742
|
] }),
|
|
3591
|
-
/* @__PURE__ */ (0,
|
|
3743
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
3592
3744
|
RadixSelect.Root,
|
|
3593
3745
|
{
|
|
3594
3746
|
value: isControlled ? value4 ?? "" : void 0,
|
|
@@ -3598,7 +3750,7 @@ var Select = /* @__PURE__ */ (0, import_react43.forwardRef)(function Select2(pro
|
|
|
3598
3750
|
required,
|
|
3599
3751
|
name,
|
|
3600
3752
|
children: [
|
|
3601
|
-
/* @__PURE__ */ (0,
|
|
3753
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
3602
3754
|
RadixSelect.Trigger,
|
|
3603
3755
|
{
|
|
3604
3756
|
ref,
|
|
@@ -3609,12 +3761,12 @@ var Select = /* @__PURE__ */ (0, import_react43.forwardRef)(function Select2(pro
|
|
|
3609
3761
|
"data-invalid": error || void 0,
|
|
3610
3762
|
className: cx(root5({ size, fullWidth }), trigger2, className),
|
|
3611
3763
|
children: [
|
|
3612
|
-
/* @__PURE__ */ (0,
|
|
3613
|
-
/* @__PURE__ */ (0,
|
|
3764
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: value2, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(RadixSelect.Value, { placeholder }) }),
|
|
3765
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(RadixSelect.Icon, { className: icon4, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_icons18.ChevronDownIcon, { size: 16 }) })
|
|
3614
3766
|
]
|
|
3615
3767
|
}
|
|
3616
3768
|
),
|
|
3617
|
-
/* @__PURE__ */ (0,
|
|
3769
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(RadixSelect.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3618
3770
|
RadixSelect.Content,
|
|
3619
3771
|
{
|
|
3620
3772
|
position: "popper",
|
|
@@ -3622,15 +3774,15 @@ var Select = /* @__PURE__ */ (0, import_react43.forwardRef)(function Select2(pro
|
|
|
3622
3774
|
collisionPadding: 8,
|
|
3623
3775
|
className: cx(portal2.className, content5),
|
|
3624
3776
|
style: portal2.style,
|
|
3625
|
-
children: /* @__PURE__ */ (0,
|
|
3777
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(RadixSelect.Viewport, { className: viewport, children: options.map((option2) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
3626
3778
|
RadixSelect.Item,
|
|
3627
3779
|
{
|
|
3628
3780
|
value: option2.value,
|
|
3629
3781
|
disabled: option2.disabled,
|
|
3630
3782
|
className: item5,
|
|
3631
3783
|
children: [
|
|
3632
|
-
/* @__PURE__ */ (0,
|
|
3633
|
-
/* @__PURE__ */ (0,
|
|
3784
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(RadixSelect.ItemText, { children: option2.label }),
|
|
3785
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(RadixSelect.ItemIndicator, { className: itemIndicator, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_icons18.CheckIcon, { size: 16 }) })
|
|
3634
3786
|
]
|
|
3635
3787
|
},
|
|
3636
3788
|
option2.value
|
|
@@ -3640,19 +3792,19 @@ var Select = /* @__PURE__ */ (0, import_react43.forwardRef)(function Select2(pro
|
|
|
3640
3792
|
]
|
|
3641
3793
|
}
|
|
3642
3794
|
),
|
|
3643
|
-
helperText3 && /* @__PURE__ */ (0,
|
|
3795
|
+
helperText3 && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { id: helperId, className: helperText({ error }), children: helperText3 })
|
|
3644
3796
|
] });
|
|
3645
3797
|
});
|
|
3646
3798
|
|
|
3647
3799
|
// src/components/SkipLink/SkipLink.tsx
|
|
3648
|
-
var
|
|
3800
|
+
var import_react45 = require("react");
|
|
3649
3801
|
|
|
3650
3802
|
// src/components/SkipLink/SkipLink.css.ts
|
|
3651
3803
|
var skipLink = "_1t9jaar0";
|
|
3652
3804
|
|
|
3653
3805
|
// src/components/SkipLink/SkipLink.tsx
|
|
3654
|
-
var
|
|
3655
|
-
var SkipLink = /* @__PURE__ */ (0,
|
|
3806
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3807
|
+
var SkipLink = /* @__PURE__ */ (0, import_react45.forwardRef)(function SkipLink2({ href = "#main", className, children, onClick, ...rest }, ref) {
|
|
3656
3808
|
const m = useMessages();
|
|
3657
3809
|
const handleClick = (event) => {
|
|
3658
3810
|
onClick?.(event);
|
|
@@ -3664,16 +3816,16 @@ var SkipLink = /* @__PURE__ */ (0, import_react44.forwardRef)(function SkipLink2
|
|
|
3664
3816
|
target.focus();
|
|
3665
3817
|
target.scrollIntoView?.({ block: "start" });
|
|
3666
3818
|
};
|
|
3667
|
-
return /* @__PURE__ */ (0,
|
|
3819
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("a", { ref, href, className: cx(skipLink, className), onClick: handleClick, ...rest, children: children ?? m.skipToContent ?? "\uBCF8\uBB38 \uBC14\uB85C\uAC00\uAE30" });
|
|
3668
3820
|
});
|
|
3669
3821
|
|
|
3670
3822
|
// src/components/Slider/Slider.tsx
|
|
3671
3823
|
var RadixSlider = __toESM(require("@radix-ui/react-slider"), 1);
|
|
3672
|
-
var
|
|
3824
|
+
var import_react46 = require("react");
|
|
3673
3825
|
|
|
3674
3826
|
// src/components/Slider/Slider.css.ts
|
|
3675
3827
|
var import_createRuntimeFn23 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
3676
|
-
var
|
|
3828
|
+
var field3 = "_126mzjm0";
|
|
3677
3829
|
var header8 = "_126mzjm1";
|
|
3678
3830
|
var helperText2 = "_126mzjm4";
|
|
3679
3831
|
var label4 = "_126mzjm2";
|
|
@@ -3684,8 +3836,8 @@ var track2 = /* @__PURE__ */ (0, import_createRuntimeFn23.createRuntimeFn)({ def
|
|
|
3684
3836
|
var value3 = "_126mzjm3";
|
|
3685
3837
|
|
|
3686
3838
|
// src/components/Slider/Slider.tsx
|
|
3687
|
-
var
|
|
3688
|
-
var Slider = /* @__PURE__ */ (0,
|
|
3839
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3840
|
+
var Slider = /* @__PURE__ */ (0, import_react46.forwardRef)(function Slider2(props, ref) {
|
|
3689
3841
|
const {
|
|
3690
3842
|
value: value4,
|
|
3691
3843
|
defaultValue,
|
|
@@ -3706,12 +3858,12 @@ var Slider = /* @__PURE__ */ (0, import_react45.forwardRef)(function Slider2(pro
|
|
|
3706
3858
|
} = props;
|
|
3707
3859
|
const m = useMessages();
|
|
3708
3860
|
const thumbLabels = thumbLabelsProp ?? [m.rangeStart ?? "\uCD5C\uC18C", m.rangeEnd ?? "\uCD5C\uB300"];
|
|
3709
|
-
const generatedId = (0,
|
|
3861
|
+
const generatedId = (0, import_react46.useId)();
|
|
3710
3862
|
const baseId = id ?? generatedId;
|
|
3711
3863
|
const labelId = `${baseId}-label`;
|
|
3712
3864
|
const helperId = `${baseId}-helper`;
|
|
3713
3865
|
const isControlled = "value" in props;
|
|
3714
|
-
const [innerValue, setInnerValue] = (0,
|
|
3866
|
+
const [innerValue, setInnerValue] = (0, import_react46.useState)(defaultValue ?? [min]);
|
|
3715
3867
|
const current2 = isControlled ? value4 ?? [min] : innerValue;
|
|
3716
3868
|
const isRange = current2.length > 1;
|
|
3717
3869
|
const handleChange = (next) => {
|
|
@@ -3719,12 +3871,12 @@ var Slider = /* @__PURE__ */ (0, import_react45.forwardRef)(function Slider2(pro
|
|
|
3719
3871
|
onValueChange?.(next);
|
|
3720
3872
|
};
|
|
3721
3873
|
const valueText = current2.map(formatValue).join(" \u2013 ");
|
|
3722
|
-
return /* @__PURE__ */ (0,
|
|
3723
|
-
(label7 || showValue) && /* @__PURE__ */ (0,
|
|
3724
|
-
label7 && /* @__PURE__ */ (0,
|
|
3725
|
-
showValue && /* @__PURE__ */ (0,
|
|
3874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: cx(field3, className), children: [
|
|
3875
|
+
(label7 || showValue) && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: header8, children: [
|
|
3876
|
+
label7 && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { id: labelId, className: label4, children: label7 }),
|
|
3877
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: value3, "aria-hidden": true, children: valueText })
|
|
3726
3878
|
] }),
|
|
3727
|
-
/* @__PURE__ */ (0,
|
|
3879
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
3728
3880
|
RadixSlider.Root,
|
|
3729
3881
|
{
|
|
3730
3882
|
ref,
|
|
@@ -3737,10 +3889,10 @@ var Slider = /* @__PURE__ */ (0, import_react45.forwardRef)(function Slider2(pro
|
|
|
3737
3889
|
className: root12({ size }),
|
|
3738
3890
|
...rest,
|
|
3739
3891
|
children: [
|
|
3740
|
-
/* @__PURE__ */ (0,
|
|
3892
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(RadixSlider.Track, { className: track2({ size }), children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(RadixSlider.Range, { className: range2 }) }),
|
|
3741
3893
|
current2.map((thumbValue, index) => {
|
|
3742
3894
|
const thumbLabelId = `${baseId}-thumb-${index}`;
|
|
3743
|
-
return /* @__PURE__ */ (0,
|
|
3895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3744
3896
|
RadixSlider.Thumb,
|
|
3745
3897
|
{
|
|
3746
3898
|
className: thumb({ size }),
|
|
@@ -3755,16 +3907,16 @@ var Slider = /* @__PURE__ */ (0, import_react45.forwardRef)(function Slider2(pro
|
|
|
3755
3907
|
]
|
|
3756
3908
|
}
|
|
3757
3909
|
),
|
|
3758
|
-
isRange && current2.map((_, index) => /* @__PURE__ */ (0,
|
|
3910
|
+
isRange && current2.map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("span", { id: `${baseId}-thumb-${index}`, hidden: true, children: [
|
|
3759
3911
|
label7 ? "" : ariaLabel ? `${ariaLabel} ` : "",
|
|
3760
3912
|
thumbLabels[index] ?? `${index + 1}`
|
|
3761
3913
|
] }, index)),
|
|
3762
|
-
helperText3 && /* @__PURE__ */ (0,
|
|
3914
|
+
helperText3 && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { id: helperId, className: helperText2, children: helperText3 })
|
|
3763
3915
|
] });
|
|
3764
3916
|
});
|
|
3765
3917
|
|
|
3766
3918
|
// src/components/Stepper/Stepper.tsx
|
|
3767
|
-
var
|
|
3919
|
+
var import_react47 = require("react");
|
|
3768
3920
|
var import_icons19 = require("@bestow-ui/icons");
|
|
3769
3921
|
|
|
3770
3922
|
// src/components/Stepper/Stepper.css.ts
|
|
@@ -3777,10 +3929,10 @@ var step = /* @__PURE__ */ (0, import_createRuntimeFn24.createRuntimeFn)({ defau
|
|
|
3777
3929
|
var text2 = /* @__PURE__ */ (0, import_createRuntimeFn24.createRuntimeFn)({ defaultClassName: "kervhma", variantClassNames: { orientation: { horizontal: "kervhmb", vertical: "kervhmc" } }, defaultVariants: {}, compoundVariants: [] });
|
|
3778
3930
|
|
|
3779
3931
|
// src/components/Stepper/Stepper.tsx
|
|
3780
|
-
var
|
|
3781
|
-
var Stepper = /* @__PURE__ */ (0,
|
|
3932
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3933
|
+
var Stepper = /* @__PURE__ */ (0, import_react47.forwardRef)(function Stepper2({ steps, current: current2, orientation = "horizontal", "aria-label": ariaLabel, className, ...rest }, ref) {
|
|
3782
3934
|
const m = useMessages();
|
|
3783
|
-
return /* @__PURE__ */ (0,
|
|
3935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3784
3936
|
"ol",
|
|
3785
3937
|
{
|
|
3786
3938
|
ref,
|
|
@@ -3789,24 +3941,24 @@ var Stepper = /* @__PURE__ */ (0, import_react46.forwardRef)(function Stepper2({
|
|
|
3789
3941
|
...rest,
|
|
3790
3942
|
children: steps.map((step2, index) => {
|
|
3791
3943
|
const status = index < current2 ? "complete" : index === current2 ? "current" : "upcoming";
|
|
3792
|
-
return /* @__PURE__ */ (0,
|
|
3944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
3793
3945
|
"li",
|
|
3794
3946
|
{
|
|
3795
3947
|
className: step({ orientation }),
|
|
3796
3948
|
"data-status": status,
|
|
3797
3949
|
"aria-current": status === "current" ? "step" : void 0,
|
|
3798
3950
|
children: [
|
|
3799
|
-
/* @__PURE__ */ (0,
|
|
3800
|
-
/* @__PURE__ */ (0,
|
|
3801
|
-
/* @__PURE__ */ (0,
|
|
3951
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: indicator3({ status }), "aria-hidden": true, children: status === "complete" ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_icons19.CheckIcon, { size: 16, strokeWidth: 2.5 }) : index + 1 }),
|
|
3952
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { className: text2({ orientation }), children: [
|
|
3953
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { className: label5({ status }), children: [
|
|
3802
3954
|
step2.label,
|
|
3803
|
-
status === "complete" && /* @__PURE__ */ (0,
|
|
3955
|
+
status === "complete" && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { className: visuallyHidden, children: [
|
|
3804
3956
|
" (",
|
|
3805
3957
|
m.stepCompleted ?? "\uC644\uB8CC",
|
|
3806
3958
|
")"
|
|
3807
3959
|
] })
|
|
3808
3960
|
] }),
|
|
3809
|
-
step2.description && /* @__PURE__ */ (0,
|
|
3961
|
+
step2.description && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: description6, children: step2.description })
|
|
3810
3962
|
] })
|
|
3811
3963
|
]
|
|
3812
3964
|
},
|
|
@@ -3819,7 +3971,7 @@ var Stepper = /* @__PURE__ */ (0, import_react46.forwardRef)(function Stepper2({
|
|
|
3819
3971
|
|
|
3820
3972
|
// src/components/Switch/Switch.tsx
|
|
3821
3973
|
var RadixSwitch = __toESM(require("@radix-ui/react-switch"), 1);
|
|
3822
|
-
var
|
|
3974
|
+
var import_react48 = require("react");
|
|
3823
3975
|
|
|
3824
3976
|
// src/components/Switch/Switch.css.ts
|
|
3825
3977
|
var import_createRuntimeFn25 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
@@ -3829,12 +3981,12 @@ var thumb2 = /* @__PURE__ */ (0, import_createRuntimeFn25.createRuntimeFn)({ def
|
|
|
3829
3981
|
var track3 = /* @__PURE__ */ (0, import_createRuntimeFn25.createRuntimeFn)({ defaultClassName: "o33ul23", variantClassNames: { size: { sm: "o33ul24", md: "o33ul25" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
3830
3982
|
|
|
3831
3983
|
// src/components/Switch/Switch.tsx
|
|
3832
|
-
var
|
|
3833
|
-
var Switch = /* @__PURE__ */ (0,
|
|
3834
|
-
const generatedId = (0,
|
|
3984
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3985
|
+
var Switch = /* @__PURE__ */ (0, import_react48.forwardRef)(function Switch2({ label: label7, size, id, className, disabled, "aria-label": ariaLabel, ...rest }, ref) {
|
|
3986
|
+
const generatedId = (0, import_react48.useId)();
|
|
3835
3987
|
const switchId = id ?? generatedId;
|
|
3836
|
-
return /* @__PURE__ */ (0,
|
|
3837
|
-
/* @__PURE__ */ (0,
|
|
3988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: cx(root14({ size }), className), "data-disabled": disabled || void 0, children: [
|
|
3989
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3838
3990
|
RadixSwitch.Root,
|
|
3839
3991
|
{
|
|
3840
3992
|
ref,
|
|
@@ -3843,15 +3995,15 @@ var Switch = /* @__PURE__ */ (0, import_react47.forwardRef)(function Switch2({ l
|
|
|
3843
3995
|
"aria-label": ariaLabel,
|
|
3844
3996
|
className: track3({ size }),
|
|
3845
3997
|
...rest,
|
|
3846
|
-
children: /* @__PURE__ */ (0,
|
|
3998
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(RadixSwitch.Thumb, { className: thumb2({ size }) })
|
|
3847
3999
|
}
|
|
3848
4000
|
),
|
|
3849
|
-
label7 && /* @__PURE__ */ (0,
|
|
4001
|
+
label7 && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("label", { htmlFor: switchId, className: label6, children: label7 })
|
|
3850
4002
|
] });
|
|
3851
4003
|
});
|
|
3852
4004
|
|
|
3853
4005
|
// src/components/Table/Table.tsx
|
|
3854
|
-
var
|
|
4006
|
+
var import_react49 = require("react");
|
|
3855
4007
|
var import_icons20 = require("@bestow-ui/icons");
|
|
3856
4008
|
|
|
3857
4009
|
// src/components/Table/Table.css.ts
|
|
@@ -3874,10 +4026,10 @@ var striped = "l3ploy6";
|
|
|
3874
4026
|
var table = "l3ploy1";
|
|
3875
4027
|
|
|
3876
4028
|
// src/components/Table/Table.tsx
|
|
3877
|
-
var
|
|
3878
|
-
var TableSizeContext = /* @__PURE__ */ (0,
|
|
3879
|
-
var TableSectionContext = /* @__PURE__ */ (0,
|
|
3880
|
-
var Table = /* @__PURE__ */ (0,
|
|
4029
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
4030
|
+
var TableSizeContext = /* @__PURE__ */ (0, import_react49.createContext)("md");
|
|
4031
|
+
var TableSectionContext = /* @__PURE__ */ (0, import_react49.createContext)("body");
|
|
4032
|
+
var Table = /* @__PURE__ */ (0, import_react49.forwardRef)(function Table2({
|
|
3881
4033
|
size = "md",
|
|
3882
4034
|
striped: striped2,
|
|
3883
4035
|
stickyHeader: stickyHeader2,
|
|
@@ -3889,8 +4041,8 @@ var Table = /* @__PURE__ */ (0, import_react48.forwardRef)(function Table2({
|
|
|
3889
4041
|
children,
|
|
3890
4042
|
...rest
|
|
3891
4043
|
}, ref) {
|
|
3892
|
-
const captionId = (0,
|
|
3893
|
-
return /* @__PURE__ */ (0,
|
|
4044
|
+
const captionId = (0, import_react49.useId)();
|
|
4045
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3894
4046
|
"div",
|
|
3895
4047
|
{
|
|
3896
4048
|
className: cx(container, containerClassName),
|
|
@@ -3899,7 +4051,7 @@ var Table = /* @__PURE__ */ (0, import_react48.forwardRef)(function Table2({
|
|
|
3899
4051
|
role: "region",
|
|
3900
4052
|
"aria-labelledby": caption2 ? captionId : void 0,
|
|
3901
4053
|
"aria-label": caption2 ? void 0 : ariaLabel,
|
|
3902
|
-
children: /* @__PURE__ */ (0,
|
|
4054
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
3903
4055
|
"table",
|
|
3904
4056
|
{
|
|
3905
4057
|
ref,
|
|
@@ -3907,7 +4059,7 @@ var Table = /* @__PURE__ */ (0, import_react48.forwardRef)(function Table2({
|
|
|
3907
4059
|
"aria-label": caption2 ? void 0 : ariaLabel,
|
|
3908
4060
|
...rest,
|
|
3909
4061
|
children: [
|
|
3910
|
-
caption2 && /* @__PURE__ */ (0,
|
|
4062
|
+
caption2 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("caption", { id: captionId, className: caption, children: caption2 }),
|
|
3911
4063
|
children
|
|
3912
4064
|
]
|
|
3913
4065
|
}
|
|
@@ -3915,31 +4067,31 @@ var Table = /* @__PURE__ */ (0, import_react48.forwardRef)(function Table2({
|
|
|
3915
4067
|
}
|
|
3916
4068
|
) });
|
|
3917
4069
|
});
|
|
3918
|
-
var TableHeader = /* @__PURE__ */ (0,
|
|
4070
|
+
var TableHeader = /* @__PURE__ */ (0, import_react49.forwardRef)(
|
|
3919
4071
|
function TableHeader2({ className, ...rest }, ref) {
|
|
3920
|
-
return /* @__PURE__ */ (0,
|
|
4072
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableSectionContext.Provider, { value: "header", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("thead", { ref, className: cx(header9, className), ...rest }) });
|
|
3921
4073
|
}
|
|
3922
4074
|
);
|
|
3923
|
-
var TableBody = /* @__PURE__ */ (0,
|
|
4075
|
+
var TableBody = /* @__PURE__ */ (0, import_react49.forwardRef)(
|
|
3924
4076
|
function TableBody2({ className, ...rest }, ref) {
|
|
3925
|
-
return /* @__PURE__ */ (0,
|
|
4077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("tbody", { ref, className: cx(body4, className), ...rest }) });
|
|
3926
4078
|
}
|
|
3927
4079
|
);
|
|
3928
|
-
var TableFooter = /* @__PURE__ */ (0,
|
|
4080
|
+
var TableFooter = /* @__PURE__ */ (0, import_react49.forwardRef)(
|
|
3929
4081
|
function TableFooter2({ className, ...rest }, ref) {
|
|
3930
|
-
return /* @__PURE__ */ (0,
|
|
4082
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("tfoot", { ref, className: cx(footer4, className), ...rest }) });
|
|
3931
4083
|
}
|
|
3932
4084
|
);
|
|
3933
|
-
var TableRow = /* @__PURE__ */ (0,
|
|
3934
|
-
return /* @__PURE__ */ (0,
|
|
4085
|
+
var TableRow = /* @__PURE__ */ (0, import_react49.forwardRef)(function TableRow2({ selected, className, ...rest }, ref) {
|
|
4086
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("tr", { ref, className: cx(row3, className), "data-state": selected ? "selected" : void 0, ...rest });
|
|
3935
4087
|
});
|
|
3936
|
-
var TableHead = /* @__PURE__ */ (0,
|
|
3937
|
-
const size = (0,
|
|
3938
|
-
const section = (0,
|
|
4088
|
+
var TableHead = /* @__PURE__ */ (0, import_react49.forwardRef)(function TableHead2({ align, sortDirection, onSort, scope, className, children, ...rest }, ref) {
|
|
4089
|
+
const size = (0, import_react49.useContext)(TableSizeContext);
|
|
4090
|
+
const section = (0, import_react49.useContext)(TableSectionContext);
|
|
3939
4091
|
const sortable = onSort !== void 0;
|
|
3940
4092
|
const direction = sortDirection ?? "none";
|
|
3941
4093
|
const SortIcon = direction === "descending" ? import_icons20.ArrowDownIcon : import_icons20.ArrowUpIcon;
|
|
3942
|
-
return /* @__PURE__ */ (0,
|
|
4094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3943
4095
|
"th",
|
|
3944
4096
|
{
|
|
3945
4097
|
ref,
|
|
@@ -3951,17 +4103,17 @@ var TableHead = /* @__PURE__ */ (0, import_react48.forwardRef)(function TableHea
|
|
|
3951
4103
|
className
|
|
3952
4104
|
),
|
|
3953
4105
|
...rest,
|
|
3954
|
-
children: sortable ? /* @__PURE__ */ (0,
|
|
4106
|
+
children: sortable ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("button", { type: "button", className: sortButton, onClick: onSort, children: [
|
|
3955
4107
|
children,
|
|
3956
|
-
/* @__PURE__ */ (0,
|
|
4108
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SortIcon, { size: 14, className: sortIcon, "data-active": direction !== "none", "aria-hidden": true })
|
|
3957
4109
|
] }) : children
|
|
3958
4110
|
}
|
|
3959
4111
|
);
|
|
3960
4112
|
});
|
|
3961
|
-
var TableCell = /* @__PURE__ */ (0,
|
|
3962
|
-
const size = (0,
|
|
3963
|
-
const section = (0,
|
|
3964
|
-
return /* @__PURE__ */ (0,
|
|
4113
|
+
var TableCell = /* @__PURE__ */ (0, import_react49.forwardRef)(function TableCell2({ align, className, ...rest }, ref) {
|
|
4114
|
+
const size = (0, import_react49.useContext)(TableSizeContext);
|
|
4115
|
+
const section = (0, import_react49.useContext)(TableSectionContext);
|
|
4116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3965
4117
|
"td",
|
|
3966
4118
|
{
|
|
3967
4119
|
ref,
|
|
@@ -3970,26 +4122,26 @@ var TableCell = /* @__PURE__ */ (0, import_react48.forwardRef)(function TableCel
|
|
|
3970
4122
|
}
|
|
3971
4123
|
);
|
|
3972
4124
|
});
|
|
3973
|
-
var TableEmpty = /* @__PURE__ */ (0,
|
|
3974
|
-
return /* @__PURE__ */ (0,
|
|
4125
|
+
var TableEmpty = /* @__PURE__ */ (0, import_react49.forwardRef)(function TableEmpty2({ colSpan, className, children, ...rest }, ref) {
|
|
4126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableCell, { ref, colSpan, className: cx(emptyCell, className), ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: emptyContent, children }) }) });
|
|
3975
4127
|
});
|
|
3976
4128
|
function TableSkeleton({ rows = 5, columns }) {
|
|
3977
|
-
return /* @__PURE__ */ (0,
|
|
4129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, { children: Array.from({ length: rows }, (_, row5) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableRow, { "aria-hidden": true, children: Array.from({ length: columns }, (_2, column) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Skeleton, { width: column === 0 ? "60%" : "80%" }) }, column)) }, row5)) });
|
|
3978
4130
|
}
|
|
3979
4131
|
|
|
3980
4132
|
// src/components/Table/useTableSelection.ts
|
|
3981
|
-
var
|
|
4133
|
+
var import_react50 = require("react");
|
|
3982
4134
|
function useTableSelection(initial = []) {
|
|
3983
|
-
const [selected, setSelected] = (0,
|
|
3984
|
-
const isSelected = (0,
|
|
3985
|
-
const toggle3 = (0,
|
|
4135
|
+
const [selected, setSelected] = (0, import_react50.useState)(initial);
|
|
4136
|
+
const isSelected = (0, import_react50.useCallback)((id) => selected.includes(id), [selected]);
|
|
4137
|
+
const toggle3 = (0, import_react50.useCallback)((id, checked) => {
|
|
3986
4138
|
setSelected((prev) => {
|
|
3987
4139
|
const on = checked ?? !prev.includes(id);
|
|
3988
4140
|
if (on) return prev.includes(id) ? prev : [...prev, id];
|
|
3989
4141
|
return prev.filter((value4) => value4 !== id);
|
|
3990
4142
|
});
|
|
3991
4143
|
}, []);
|
|
3992
|
-
const clear2 = (0,
|
|
4144
|
+
const clear2 = (0, import_react50.useCallback)(() => setSelected([]), []);
|
|
3993
4145
|
const selectAllProps = (pageIds) => {
|
|
3994
4146
|
const all2 = pageIds.length > 0 && pageIds.every((id) => selected.includes(id));
|
|
3995
4147
|
const some = pageIds.some((id) => selected.includes(id));
|
|
@@ -4010,7 +4162,7 @@ function useTableSelection(initial = []) {
|
|
|
4010
4162
|
|
|
4011
4163
|
// src/components/Tabs/Tabs.tsx
|
|
4012
4164
|
var RadixTabs = __toESM(require("@radix-ui/react-tabs"), 1);
|
|
4013
|
-
var
|
|
4165
|
+
var import_react51 = require("react");
|
|
4014
4166
|
|
|
4015
4167
|
// src/components/Tabs/Tabs.css.ts
|
|
4016
4168
|
var import_createRuntimeFn27 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
@@ -4020,26 +4172,26 @@ var root15 = "fvhbtd0";
|
|
|
4020
4172
|
var trigger3 = /* @__PURE__ */ (0, import_createRuntimeFn27.createRuntimeFn)({ 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"]] });
|
|
4021
4173
|
|
|
4022
4174
|
// src/components/Tabs/Tabs.tsx
|
|
4023
|
-
var
|
|
4024
|
-
var TabsStyleContext = /* @__PURE__ */ (0,
|
|
4025
|
-
var Tabs = /* @__PURE__ */ (0,
|
|
4175
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
4176
|
+
var TabsStyleContext = /* @__PURE__ */ (0, import_react51.createContext)({ variant: "line", size: "md" });
|
|
4177
|
+
var Tabs = /* @__PURE__ */ (0, import_react51.forwardRef)(function Tabs2({ variant = "line", size = "md", className, ...props }, ref) {
|
|
4026
4178
|
const controlled = "value" in props ? { value: props.value ?? "" } : {};
|
|
4027
|
-
return /* @__PURE__ */ (0,
|
|
4179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TabsStyleContext.Provider, { value: { variant, size }, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(RadixTabs.Root, { ref, className: cx(root15, className), ...props, ...controlled }) });
|
|
4028
4180
|
});
|
|
4029
|
-
var TabsList = /* @__PURE__ */ (0,
|
|
4030
|
-
const { variant } = (0,
|
|
4031
|
-
return /* @__PURE__ */ (0,
|
|
4181
|
+
var TabsList = /* @__PURE__ */ (0, import_react51.forwardRef)(function TabsList2({ className, ...rest }, ref) {
|
|
4182
|
+
const { variant } = (0, import_react51.useContext)(TabsStyleContext);
|
|
4183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(RadixTabs.List, { ref, className: cx(list6({ variant }), className), ...rest });
|
|
4032
4184
|
});
|
|
4033
|
-
var TabsTrigger = /* @__PURE__ */ (0,
|
|
4034
|
-
const { variant, size } = (0,
|
|
4035
|
-
return /* @__PURE__ */ (0,
|
|
4185
|
+
var TabsTrigger = /* @__PURE__ */ (0, import_react51.forwardRef)(function TabsTrigger2({ className, ...rest }, ref) {
|
|
4186
|
+
const { variant, size } = (0, import_react51.useContext)(TabsStyleContext);
|
|
4187
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(RadixTabs.Trigger, { ref, className: cx(trigger3({ variant, size }), className), ...rest });
|
|
4036
4188
|
});
|
|
4037
|
-
var TabsContent = /* @__PURE__ */ (0,
|
|
4038
|
-
return /* @__PURE__ */ (0,
|
|
4189
|
+
var TabsContent = /* @__PURE__ */ (0, import_react51.forwardRef)(function TabsContent2({ className, ...rest }, ref) {
|
|
4190
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(RadixTabs.Content, { ref, className: cx(content10, className), ...rest });
|
|
4039
4191
|
});
|
|
4040
4192
|
|
|
4041
4193
|
// src/components/Textarea/Textarea.tsx
|
|
4042
|
-
var
|
|
4194
|
+
var import_react52 = require("react");
|
|
4043
4195
|
|
|
4044
4196
|
// src/components/Textarea/Textarea.css.ts
|
|
4045
4197
|
var import_createRuntimeFn28 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
@@ -4050,8 +4202,8 @@ var footer5 = "_1koawa8";
|
|
|
4050
4202
|
var textarea = /* @__PURE__ */ (0, import_createRuntimeFn28.createRuntimeFn)({ defaultClassName: "_1koawa0", variantClassNames: { size: { sm: "_1koawa1", md: "_1koawa2", lg: "_1koawa3" }, resize: { none: "_1koawa4", vertical: "_1koawa5", both: "_1koawa6" } }, defaultVariants: { size: "md", resize: "vertical" }, compoundVariants: [] });
|
|
4051
4203
|
|
|
4052
4204
|
// src/components/Textarea/Textarea.tsx
|
|
4053
|
-
var
|
|
4054
|
-
var Textarea = /* @__PURE__ */ (0,
|
|
4205
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
4206
|
+
var Textarea = /* @__PURE__ */ (0, import_react52.forwardRef)(function Textarea2({
|
|
4055
4207
|
label: label7,
|
|
4056
4208
|
helperText: helperText3,
|
|
4057
4209
|
error,
|
|
@@ -4072,13 +4224,13 @@ var Textarea = /* @__PURE__ */ (0, import_react51.forwardRef)(function Textarea2
|
|
|
4072
4224
|
"aria-describedby": ariaDescribedBy,
|
|
4073
4225
|
...rest
|
|
4074
4226
|
}, ref) {
|
|
4075
|
-
const generatedId = (0,
|
|
4227
|
+
const generatedId = (0, import_react52.useId)();
|
|
4076
4228
|
const textareaId = id ?? generatedId;
|
|
4077
4229
|
const helperId = helperText3 ? `${textareaId}-helper` : void 0;
|
|
4078
|
-
const innerRef = (0,
|
|
4079
|
-
const [uncontrolledLength, setUncontrolledLength] = (0,
|
|
4230
|
+
const innerRef = (0, import_react52.useRef)(null);
|
|
4231
|
+
const [uncontrolledLength, setUncontrolledLength] = (0, import_react52.useState)(() => String(defaultValue ?? "").length);
|
|
4080
4232
|
const length = value4 !== void 0 ? String(value4).length : uncontrolledLength;
|
|
4081
|
-
const fitHeight = (0,
|
|
4233
|
+
const fitHeight = (0, import_react52.useCallback)(() => {
|
|
4082
4234
|
const el = innerRef.current;
|
|
4083
4235
|
if (!autoResize || !el) return;
|
|
4084
4236
|
el.style.height = "auto";
|
|
@@ -4091,12 +4243,12 @@ var Textarea = /* @__PURE__ */ (0, import_react51.forwardRef)(function Textarea2
|
|
|
4091
4243
|
fitHeight();
|
|
4092
4244
|
onChange?.(event);
|
|
4093
4245
|
};
|
|
4094
|
-
return /* @__PURE__ */ (0,
|
|
4095
|
-
label7 && /* @__PURE__ */ (0,
|
|
4246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
|
|
4247
|
+
label7 && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("label", { htmlFor: textareaId, className: label2, children: [
|
|
4096
4248
|
label7,
|
|
4097
|
-
required && /* @__PURE__ */ (0,
|
|
4249
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
4098
4250
|
] }),
|
|
4099
|
-
/* @__PURE__ */ (0,
|
|
4251
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4100
4252
|
"textarea",
|
|
4101
4253
|
{
|
|
4102
4254
|
ref: mergeRefs(innerRef, ref),
|
|
@@ -4118,16 +4270,16 @@ var Textarea = /* @__PURE__ */ (0, import_react51.forwardRef)(function Textarea2
|
|
|
4118
4270
|
...rest
|
|
4119
4271
|
}
|
|
4120
4272
|
),
|
|
4121
|
-
(helperText3 || showCount) && /* @__PURE__ */ (0,
|
|
4122
|
-
helperText3 && /* @__PURE__ */ (0,
|
|
4123
|
-
showCount && /* @__PURE__ */ (0,
|
|
4273
|
+
(helperText3 || showCount) && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: footer5, children: [
|
|
4274
|
+
helperText3 && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { id: helperId, className: helperText({ error }), children: helperText3 }),
|
|
4275
|
+
showCount && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: cx(count, maxLength !== void 0 && length >= maxLength && countOver), children: maxLength !== void 0 ? `${length}/${maxLength}` : length })
|
|
4124
4276
|
] })
|
|
4125
4277
|
] });
|
|
4126
4278
|
});
|
|
4127
4279
|
|
|
4128
4280
|
// src/components/Toast/Toast.tsx
|
|
4129
4281
|
var RadixToast = __toESM(require("@radix-ui/react-toast"), 1);
|
|
4130
|
-
var
|
|
4282
|
+
var import_react53 = require("react");
|
|
4131
4283
|
var import_icons21 = require("@bestow-ui/icons");
|
|
4132
4284
|
|
|
4133
4285
|
// src/components/Toast/Toast.css.ts
|
|
@@ -4140,29 +4292,29 @@ var toast = /* @__PURE__ */ (0, import_createRuntimeFn29.createRuntimeFn)({ defa
|
|
|
4140
4292
|
var viewport2 = "_1g11zvx0";
|
|
4141
4293
|
|
|
4142
4294
|
// src/components/Toast/Toast.tsx
|
|
4143
|
-
var
|
|
4295
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
4144
4296
|
var REMOVE_DELAY = 500;
|
|
4145
|
-
var ToastContext = /* @__PURE__ */ (0,
|
|
4297
|
+
var ToastContext = /* @__PURE__ */ (0, import_react53.createContext)(null);
|
|
4146
4298
|
function ToastProvider({ children, duration = 5e3, label: labelProp }) {
|
|
4147
4299
|
const m = useMessages();
|
|
4148
4300
|
const label7 = labelProp ?? m.notifications ?? "\uC54C\uB9BC";
|
|
4149
|
-
const [toasts, setToasts] = (0,
|
|
4150
|
-
const nextId = (0,
|
|
4301
|
+
const [toasts, setToasts] = (0, import_react53.useState)([]);
|
|
4302
|
+
const nextId = (0, import_react53.useRef)(0);
|
|
4151
4303
|
const portal2 = usePortalProps();
|
|
4152
|
-
const toast2 = (0,
|
|
4304
|
+
const toast2 = (0, import_react53.useCallback)((options) => {
|
|
4153
4305
|
const id = nextId.current++;
|
|
4154
4306
|
setToasts((prev) => [...prev, { ...options, id, open: true }]);
|
|
4155
4307
|
return id;
|
|
4156
4308
|
}, []);
|
|
4157
|
-
const dismiss = (0,
|
|
4309
|
+
const dismiss = (0, import_react53.useCallback)((id) => {
|
|
4158
4310
|
const isTarget = (t) => id === void 0 || t.id === id;
|
|
4159
4311
|
setToasts((prev) => prev.map((t) => isTarget(t) ? { ...t, open: false } : t));
|
|
4160
4312
|
setTimeout(() => setToasts((prev) => prev.filter((t) => t.open || !isTarget(t))), REMOVE_DELAY);
|
|
4161
4313
|
}, []);
|
|
4162
|
-
const value4 = (0,
|
|
4163
|
-
return /* @__PURE__ */ (0,
|
|
4314
|
+
const value4 = (0, import_react53.useMemo)(() => ({ toast: toast2, dismiss }), [toast2, dismiss]);
|
|
4315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ToastContext.Provider, { value: value4, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(RadixToast.Provider, { duration, label: label7, swipeDirection: "right", children: [
|
|
4164
4316
|
children,
|
|
4165
|
-
toasts.map(({ id, open, title: title6, description: description8, color, duration: itemDuration, action: action3 }) => /* @__PURE__ */ (0,
|
|
4317
|
+
toasts.map(({ id, open, title: title6, description: description8, color, duration: itemDuration, action: action3 }) => /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
4166
4318
|
RadixToast.Root,
|
|
4167
4319
|
{
|
|
4168
4320
|
open,
|
|
@@ -4172,19 +4324,19 @@ function ToastProvider({ children, duration = 5e3, label: labelProp }) {
|
|
|
4172
4324
|
},
|
|
4173
4325
|
className: toast({ color }),
|
|
4174
4326
|
children: [
|
|
4175
|
-
/* @__PURE__ */ (0,
|
|
4176
|
-
description8 && /* @__PURE__ */ (0,
|
|
4177
|
-
action3 && /* @__PURE__ */ (0,
|
|
4178
|
-
/* @__PURE__ */ (0,
|
|
4327
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(RadixToast.Title, { className: title5, children: title6 }),
|
|
4328
|
+
description8 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(RadixToast.Description, { className: description7, children: description8 }),
|
|
4329
|
+
action3 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(RadixToast.Action, { asChild: true, altText: action3.altText ?? action3.label, className: action2, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Button, { size: "sm", variant: "soft", color: "neutral", onClick: action3.onClick, children: action3.label }) }),
|
|
4330
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(RadixToast.Close, { className: close, "aria-label": m.close ?? "\uB2EB\uAE30", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_icons21.XIcon, { size: 16 }) })
|
|
4179
4331
|
]
|
|
4180
4332
|
},
|
|
4181
4333
|
id
|
|
4182
4334
|
)),
|
|
4183
|
-
/* @__PURE__ */ (0,
|
|
4335
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(RadixToast.Viewport, { className: cx(portal2.className, viewport2), style: portal2.style })
|
|
4184
4336
|
] }) });
|
|
4185
4337
|
}
|
|
4186
4338
|
function useToast() {
|
|
4187
|
-
const context = (0,
|
|
4339
|
+
const context = (0, import_react53.useContext)(ToastContext);
|
|
4188
4340
|
if (!context) throw new Error("useToast \uB294 ToastProvider \uC548\uC5D0\uC11C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4.");
|
|
4189
4341
|
return context;
|
|
4190
4342
|
}
|
|
@@ -4197,7 +4349,7 @@ var arrow2 = "z7rufs1";
|
|
|
4197
4349
|
var content11 = "z7rufs0";
|
|
4198
4350
|
|
|
4199
4351
|
// src/components/Tooltip/Tooltip.tsx
|
|
4200
|
-
var
|
|
4352
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
4201
4353
|
function Tooltip({
|
|
4202
4354
|
content: content12,
|
|
4203
4355
|
children,
|
|
@@ -4212,9 +4364,9 @@ function Tooltip({
|
|
|
4212
4364
|
}) {
|
|
4213
4365
|
const portal2 = usePortalProps();
|
|
4214
4366
|
if (disabled || content12 == null || content12 === "") return children;
|
|
4215
|
-
return /* @__PURE__ */ (0,
|
|
4216
|
-
/* @__PURE__ */ (0,
|
|
4217
|
-
/* @__PURE__ */ (0,
|
|
4367
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(RadixTooltip.Provider, { delayDuration: delay, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(RadixTooltip.Root, { open, defaultOpen, onOpenChange, children: [
|
|
4368
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(RadixTooltip.Trigger, { asChild: true, children }),
|
|
4369
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(RadixTooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
4218
4370
|
RadixTooltip.Content,
|
|
4219
4371
|
{
|
|
4220
4372
|
side,
|
|
@@ -4225,7 +4377,7 @@ function Tooltip({
|
|
|
4225
4377
|
style: portal2.style,
|
|
4226
4378
|
children: [
|
|
4227
4379
|
content12,
|
|
4228
|
-
/* @__PURE__ */ (0,
|
|
4380
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(RadixTooltip.Arrow, { className: arrow2, width: 10, height: 5 })
|
|
4229
4381
|
]
|
|
4230
4382
|
}
|
|
4231
4383
|
) })
|
|
@@ -4233,7 +4385,7 @@ function Tooltip({
|
|
|
4233
4385
|
}
|
|
4234
4386
|
|
|
4235
4387
|
// src/components/VerificationCodeInput/VerificationCodeInput.tsx
|
|
4236
|
-
var
|
|
4388
|
+
var import_react54 = require("react");
|
|
4237
4389
|
|
|
4238
4390
|
// src/components/VerificationCodeInput/VerificationCodeInput.css.ts
|
|
4239
4391
|
var input5 = "ea01812";
|
|
@@ -4243,9 +4395,9 @@ var slots = "ea01811";
|
|
|
4243
4395
|
var timer = "ea01814";
|
|
4244
4396
|
|
|
4245
4397
|
// src/components/VerificationCodeInput/VerificationCodeInput.tsx
|
|
4246
|
-
var
|
|
4398
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
4247
4399
|
var formatTime = (seconds) => `${String(Math.floor(seconds / 60)).padStart(2, "0")}:${String(seconds % 60).padStart(2, "0")}`;
|
|
4248
|
-
var VerificationCodeInput = /* @__PURE__ */ (0,
|
|
4400
|
+
var VerificationCodeInput = /* @__PURE__ */ (0, import_react54.forwardRef)(
|
|
4249
4401
|
function VerificationCodeInput2(props, ref) {
|
|
4250
4402
|
const {
|
|
4251
4403
|
length = 6,
|
|
@@ -4272,23 +4424,23 @@ var VerificationCodeInput = /* @__PURE__ */ (0, import_react53.forwardRef)(
|
|
|
4272
4424
|
const label7 = labelProp ?? m.verificationCode ?? "\uC778\uC99D\uBC88\uD638";
|
|
4273
4425
|
const resendText = resendTextProp ?? m.resend ?? "\uC7AC\uC804\uC1A1";
|
|
4274
4426
|
const expiredText = expiredTextProp ?? m.verificationExpired ?? "\uC778\uC99D \uC2DC\uAC04\uC774 \uC9C0\uB0AC\uC5B4\uC694. \uC7AC\uC804\uC1A1\uD574 \uC8FC\uC138\uC694.";
|
|
4275
|
-
const generatedId = (0,
|
|
4427
|
+
const generatedId = (0, import_react54.useId)();
|
|
4276
4428
|
const inputId = id ?? generatedId;
|
|
4277
4429
|
const helperId = `${inputId}-helper`;
|
|
4278
4430
|
const statusId = `${inputId}-status`;
|
|
4279
|
-
const inputRef = (0,
|
|
4431
|
+
const inputRef = (0, import_react54.useRef)(null);
|
|
4280
4432
|
const isControlled = "value" in props;
|
|
4281
|
-
const [innerValue, setInnerValue] = (0,
|
|
4433
|
+
const [innerValue, setInnerValue] = (0, import_react54.useState)(defaultValue ?? "");
|
|
4282
4434
|
const code = (isControlled ? value4 ?? "" : innerValue).slice(0, length);
|
|
4283
|
-
const [focused, setFocused] = (0,
|
|
4284
|
-
const [endAt, setEndAt] = (0,
|
|
4285
|
-
const [remaining, setRemaining] = (0,
|
|
4435
|
+
const [focused, setFocused] = (0, import_react54.useState)(false);
|
|
4436
|
+
const [endAt, setEndAt] = (0, import_react54.useState)(() => expiresIn ? Date.now() + expiresIn * 1e3 : null);
|
|
4437
|
+
const [remaining, setRemaining] = (0, import_react54.useState)(expiresIn ?? 0);
|
|
4286
4438
|
const expired = expiresIn !== void 0 && remaining <= 0;
|
|
4287
|
-
const onExpireRef = (0,
|
|
4288
|
-
(0,
|
|
4439
|
+
const onExpireRef = (0, import_react54.useRef)(onExpire);
|
|
4440
|
+
(0, import_react54.useEffect)(() => {
|
|
4289
4441
|
onExpireRef.current = onExpire;
|
|
4290
4442
|
});
|
|
4291
|
-
(0,
|
|
4443
|
+
(0, import_react54.useEffect)(() => {
|
|
4292
4444
|
if (endAt === null) return;
|
|
4293
4445
|
const tick = () => {
|
|
4294
4446
|
const left = Math.max(0, Math.ceil((endAt - Date.now()) / 1e3));
|
|
@@ -4323,17 +4475,17 @@ var VerificationCodeInput = /* @__PURE__ */ (0, import_react53.forwardRef)(
|
|
|
4323
4475
|
};
|
|
4324
4476
|
const description8 = helperText3 ?? m.verificationCodeHint?.(length, type) ?? `${length}\uC790\uB9AC ${type === "numeric" ? "\uC22B\uC790" : "\uBB38\uC790"}\uB97C \uC785\uB825\uD558\uC138\uC694.`;
|
|
4325
4477
|
const activeIndex = Math.min(code.length, length - 1);
|
|
4326
|
-
return /* @__PURE__ */ (0,
|
|
4478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
4327
4479
|
"div",
|
|
4328
4480
|
{
|
|
4329
4481
|
className: cx(field, className),
|
|
4330
4482
|
"data-invalid": error || void 0,
|
|
4331
4483
|
"data-disabled": disabled || void 0,
|
|
4332
4484
|
children: [
|
|
4333
|
-
/* @__PURE__ */ (0,
|
|
4334
|
-
/* @__PURE__ */ (0,
|
|
4335
|
-
/* @__PURE__ */ (0,
|
|
4336
|
-
/* @__PURE__ */ (0,
|
|
4485
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("label", { htmlFor: inputId, className: label2, children: label7 }),
|
|
4486
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: row4, children: [
|
|
4487
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: slots, children: [
|
|
4488
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4337
4489
|
"input",
|
|
4338
4490
|
{
|
|
4339
4491
|
ref: mergeRefs(ref, inputRef),
|
|
@@ -4353,7 +4505,7 @@ var VerificationCodeInput = /* @__PURE__ */ (0, import_react53.forwardRef)(
|
|
|
4353
4505
|
className: input5
|
|
4354
4506
|
}
|
|
4355
4507
|
),
|
|
4356
|
-
Array.from({ length }, (_, index) => /* @__PURE__ */ (0,
|
|
4508
|
+
Array.from({ length }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4357
4509
|
"div",
|
|
4358
4510
|
{
|
|
4359
4511
|
className: slot,
|
|
@@ -4364,12 +4516,12 @@ var VerificationCodeInput = /* @__PURE__ */ (0, import_react53.forwardRef)(
|
|
|
4364
4516
|
index
|
|
4365
4517
|
))
|
|
4366
4518
|
] }),
|
|
4367
|
-
expiresIn !== void 0 && /* @__PURE__ */ (0,
|
|
4368
|
-
onResend && /* @__PURE__ */ (0,
|
|
4519
|
+
expiresIn !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { role: "timer", className: timer, children: formatTime(remaining) }),
|
|
4520
|
+
onResend && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Button, { size: "sm", variant: "outline", color: "neutral", onClick: resend, disabled, children: resendText })
|
|
4369
4521
|
] }),
|
|
4370
|
-
/* @__PURE__ */ (0,
|
|
4371
|
-
/* @__PURE__ */ (0,
|
|
4372
|
-
name && /* @__PURE__ */ (0,
|
|
4522
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { id: helperId, className: helperText({ error }), children: description8 }),
|
|
4523
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { id: statusId, role: "status", className: helperText({ error: true }), children: expired ? expiredText : "" }),
|
|
4524
|
+
name && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("input", { type: "hidden", name, value: code })
|
|
4373
4525
|
]
|
|
4374
4526
|
}
|
|
4375
4527
|
);
|
|
@@ -4396,6 +4548,7 @@ var VerificationCodeInput = /* @__PURE__ */ (0, import_react53.forwardRef)(
|
|
|
4396
4548
|
Checkbox,
|
|
4397
4549
|
Combobox,
|
|
4398
4550
|
DatePicker,
|
|
4551
|
+
DateRangePicker,
|
|
4399
4552
|
DescriptionList,
|
|
4400
4553
|
Divider,
|
|
4401
4554
|
Drawer,
|
|
@@ -4462,6 +4615,7 @@ var VerificationCodeInput = /* @__PURE__ */ (0, import_react53.forwardRef)(
|
|
|
4462
4615
|
contrastRatio,
|
|
4463
4616
|
createIntentColors,
|
|
4464
4617
|
createTheme,
|
|
4618
|
+
dateRangePresets,
|
|
4465
4619
|
en,
|
|
4466
4620
|
focusField,
|
|
4467
4621
|
formatBusinessNumber,
|
|
@@ -4472,6 +4626,8 @@ var VerificationCodeInput = /* @__PURE__ */ (0, import_react53.forwardRef)(
|
|
|
4472
4626
|
isValidBusinessNumber,
|
|
4473
4627
|
kakaoPostcodeProvider,
|
|
4474
4628
|
parseISODate,
|
|
4629
|
+
presetRange,
|
|
4630
|
+
strongInputBorders,
|
|
4475
4631
|
themeClass,
|
|
4476
4632
|
toISODate,
|
|
4477
4633
|
useMessages,
|