@bestow-ui/react 1.2.0 → 1.3.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 +59 -69
- package/dist/{chunk-LHT64JDG.js → chunk-VH7JW6N7.js} +77 -3
- package/dist/chunk-VH7JW6N7.js.map +1 -0
- package/dist/client.js +711 -341
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +1175 -721
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +479 -107
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +210 -12
- package/dist/index.d.ts +210 -12
- package/dist/shared.js +82 -74
- package/dist/shared.js.map +1 -1
- package/package.json +21 -11
- package/dist/chunk-LHT64JDG.js.map +0 -1
package/dist/client.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
KOREAN_WEEKDAYS,
|
|
4
|
+
Skeleton,
|
|
4
5
|
addDays,
|
|
5
6
|
addMonths,
|
|
6
7
|
compareDays,
|
|
7
8
|
cx,
|
|
9
|
+
focusField,
|
|
8
10
|
formatBusinessNumber,
|
|
9
11
|
formatKoreanAmount,
|
|
10
12
|
formatPhoneNumber,
|
|
@@ -18,8 +20,9 @@ import {
|
|
|
18
20
|
phoneNumberMaxDigits,
|
|
19
21
|
themeClass,
|
|
20
22
|
themeToStyle,
|
|
21
|
-
toISODate
|
|
22
|
-
|
|
23
|
+
toISODate,
|
|
24
|
+
visuallyHidden
|
|
25
|
+
} from "./chunk-VH7JW6N7.js";
|
|
23
26
|
|
|
24
27
|
// src/theme/ThemeProvider.tsx
|
|
25
28
|
import { createContext, forwardRef, useContext, useMemo } from "react";
|
|
@@ -115,9 +118,6 @@ import { forwardRef as forwardRef4 } from "react";
|
|
|
115
118
|
import { LoaderIcon } from "@bestow-ui/icons";
|
|
116
119
|
import { forwardRef as forwardRef3 } from "react";
|
|
117
120
|
|
|
118
|
-
// src/styles/visuallyHidden.css.ts
|
|
119
|
-
var visuallyHidden = "_1kdtbw10";
|
|
120
|
-
|
|
121
121
|
// src/components/Spinner/Spinner.css.ts
|
|
122
122
|
import { createRuntimeFn as _7a468 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
123
123
|
var spinner = /* @__PURE__ */ _7a468({ defaultClassName: "_4b5tg40", variantClassNames: { color: { inherit: "_4b5tg41", primary: "_4b5tg42", neutral: "_4b5tg43", danger: "_4b5tg44" }, size: { sm: "_4b5tg45", md: "_4b5tg46", lg: "_4b5tg47" } }, defaultVariants: { color: "inherit", size: "md" }, compoundVariants: [] });
|
|
@@ -126,11 +126,11 @@ var spinner = /* @__PURE__ */ _7a468({ defaultClassName: "_4b5tg40", variantClas
|
|
|
126
126
|
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
127
127
|
var Spinner = /* @__PURE__ */ forwardRef3(function Spinner2({ size, color, label: labelProp, className, ...rest }, ref) {
|
|
128
128
|
const m = useMessages();
|
|
129
|
-
const
|
|
130
|
-
const a11y =
|
|
129
|
+
const label6 = labelProp ?? m.loading ?? "\uB85C\uB529 \uC911";
|
|
130
|
+
const a11y = label6 ? { role: "status" } : { "aria-hidden": true };
|
|
131
131
|
return /* @__PURE__ */ jsxs2("span", { ref, className: cx(spinner({ size, color }), className), ...a11y, ...rest, children: [
|
|
132
132
|
/* @__PURE__ */ jsx4(LoaderIcon, { size: "100%" }),
|
|
133
|
-
|
|
133
|
+
label6 && /* @__PURE__ */ jsx4("span", { className: visuallyHidden, children: label6 })
|
|
134
134
|
] });
|
|
135
135
|
});
|
|
136
136
|
|
|
@@ -224,13 +224,13 @@ var Input = /* @__PURE__ */ forwardRef5(function Input2({ size, invalid, fullWid
|
|
|
224
224
|
// src/components/Input/TextField.tsx
|
|
225
225
|
import { forwardRef as forwardRef6, useId } from "react";
|
|
226
226
|
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
227
|
-
var TextField = /* @__PURE__ */ forwardRef6(function TextField2({ label:
|
|
227
|
+
var TextField = /* @__PURE__ */ forwardRef6(function TextField2({ label: label6, helperText: helperText3, error, required, fullWidth, id, "aria-describedby": ariaDescribedBy, ...rest }, ref) {
|
|
228
228
|
const generatedId = useId();
|
|
229
229
|
const inputId = id ?? generatedId;
|
|
230
230
|
const helperId = helperText3 ? `${inputId}-helper` : void 0;
|
|
231
231
|
return /* @__PURE__ */ jsxs5("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
|
|
232
|
-
|
|
233
|
-
|
|
232
|
+
label6 && /* @__PURE__ */ jsxs5("label", { htmlFor: inputId, className: label, children: [
|
|
233
|
+
label6,
|
|
234
234
|
required && /* @__PURE__ */ jsx7("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
235
235
|
] }),
|
|
236
236
|
/* @__PURE__ */ jsx7(
|
|
@@ -259,7 +259,10 @@ function useReturnFocus(hasTrigger, onCloseAutoFocus) {
|
|
|
259
259
|
const returnTo = useRef(null);
|
|
260
260
|
return {
|
|
261
261
|
onOpenAutoFocus: () => {
|
|
262
|
-
|
|
262
|
+
const active = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
263
|
+
const menu = active?.closest('[role="menu"]');
|
|
264
|
+
const menuTrigger = menu?.getAttribute("aria-labelledby");
|
|
265
|
+
returnTo.current = menuTrigger && document.getElementById(menuTrigger) || active;
|
|
263
266
|
},
|
|
264
267
|
onCloseAutoFocus: (event) => {
|
|
265
268
|
onCloseAutoFocus?.(event);
|
|
@@ -293,7 +296,7 @@ function Modal({
|
|
|
293
296
|
onOpenChange,
|
|
294
297
|
trigger: trigger4,
|
|
295
298
|
title: title6,
|
|
296
|
-
description:
|
|
299
|
+
description: description7,
|
|
297
300
|
children,
|
|
298
301
|
footer: footer5,
|
|
299
302
|
size,
|
|
@@ -317,12 +320,12 @@ function Modal({
|
|
|
317
320
|
onPointerDownOutside: closeOnOverlayClick ? void 0 : (event) => event.preventDefault(),
|
|
318
321
|
onOpenAutoFocus: focus.onOpenAutoFocus,
|
|
319
322
|
onCloseAutoFocus: focus.onCloseAutoFocus,
|
|
320
|
-
...
|
|
323
|
+
...description7 ? {} : { "aria-describedby": void 0 },
|
|
321
324
|
children: [
|
|
322
325
|
/* @__PURE__ */ jsxs6("div", { className: header2, children: [
|
|
323
326
|
/* @__PURE__ */ jsxs6("div", { className: headings, children: [
|
|
324
327
|
/* @__PURE__ */ jsx8(Dialog.Title, { className: title, children: title6 }),
|
|
325
|
-
|
|
328
|
+
description7 && /* @__PURE__ */ jsx8(Dialog.Description, { className: description, children: description7 })
|
|
326
329
|
] }),
|
|
327
330
|
!hideCloseButton && /* @__PURE__ */ jsx8(Dialog.Close, { className: closeButton, "aria-label": m.close ?? "\uB2EB\uAE30", children: /* @__PURE__ */ jsx8(XIcon, { size: 16 }) })
|
|
328
331
|
] }),
|
|
@@ -400,7 +403,7 @@ var AddressInput = /* @__PURE__ */ forwardRef7(
|
|
|
400
403
|
className
|
|
401
404
|
} = props;
|
|
402
405
|
const m = useMessages();
|
|
403
|
-
const
|
|
406
|
+
const label6 = labelProp ?? m.address ?? "\uC8FC\uC18C";
|
|
404
407
|
const searchLabel = searchLabelProp ?? m.addressSearch ?? "\uC8FC\uC18C \uAC80\uC0C9";
|
|
405
408
|
const detailPlaceholder = detailPlaceholderProp ?? m.detailAddressPlaceholder ?? "\uC0C1\uC138 \uC8FC\uC18C (\uB3D9\xB7\uD638\uC218 \uB4F1)";
|
|
406
409
|
const loadErrorText = loadErrorTextProp ?? m.addressLoadError ?? "\uC8FC\uC18C \uAC80\uC0C9\uC744 \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC5B4\uC694. \uC7A0\uC2DC \uB4A4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574 \uC8FC\uC138\uC694.";
|
|
@@ -434,7 +437,7 @@ var AddressInput = /* @__PURE__ */ forwardRef7(
|
|
|
434
437
|
const fullAddress = `${current2.address}${current2.extraAddress ?? ""}`;
|
|
435
438
|
return /* @__PURE__ */ jsxs7("fieldset", { ref, className: cx(fieldset, className), disabled, "aria-describedby": helperId, children: [
|
|
436
439
|
/* @__PURE__ */ jsxs7("legend", { className: legend, children: [
|
|
437
|
-
|
|
440
|
+
label6,
|
|
438
441
|
required && /* @__PURE__ */ jsx9("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
439
442
|
] }),
|
|
440
443
|
/* @__PURE__ */ jsxs7("div", { className: row, children: [
|
|
@@ -539,7 +542,7 @@ var root4 = /* @__PURE__ */ _7a4685({ defaultClassName: "_1y7mzsn0", variantClas
|
|
|
539
542
|
|
|
540
543
|
// src/components/Checkbox/Checkbox.tsx
|
|
541
544
|
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
542
|
-
var Checkbox = /* @__PURE__ */ forwardRef8(function Checkbox2({ label:
|
|
545
|
+
var Checkbox = /* @__PURE__ */ forwardRef8(function Checkbox2({ label: label6, size, indeterminate = false, invalid, disabled, onChange, onCheckedChange, className, ...rest }, ref) {
|
|
543
546
|
const innerRef = useRef3(null);
|
|
544
547
|
useEffect2(() => {
|
|
545
548
|
if (innerRef.current) innerRef.current.indeterminate = indeterminate;
|
|
@@ -573,7 +576,7 @@ var Checkbox = /* @__PURE__ */ forwardRef8(function Checkbox2({ label: label5, s
|
|
|
573
576
|
) }),
|
|
574
577
|
/* @__PURE__ */ jsx10("svg", { className: indeterminateIcon, viewBox: "0 0 20 20", fill: "none", "aria-hidden": true, children: /* @__PURE__ */ jsx10("path", { d: "M6 10h8", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) })
|
|
575
578
|
] }),
|
|
576
|
-
|
|
579
|
+
label6
|
|
577
580
|
] });
|
|
578
581
|
});
|
|
579
582
|
|
|
@@ -599,7 +602,7 @@ var AgreementGroup = /* @__PURE__ */ forwardRef9(
|
|
|
599
602
|
value: value3,
|
|
600
603
|
defaultValue,
|
|
601
604
|
onValueChange,
|
|
602
|
-
label:
|
|
605
|
+
label: label6,
|
|
603
606
|
allLabel: allLabelProp,
|
|
604
607
|
helperText: helperText3,
|
|
605
608
|
error,
|
|
@@ -609,6 +612,7 @@ var AgreementGroup = /* @__PURE__ */ forwardRef9(
|
|
|
609
612
|
showText: showTextProp,
|
|
610
613
|
hideText: hideTextProp,
|
|
611
614
|
name,
|
|
615
|
+
id,
|
|
612
616
|
className
|
|
613
617
|
} = props;
|
|
614
618
|
const m = useMessages();
|
|
@@ -627,7 +631,7 @@ var AgreementGroup = /* @__PURE__ */ forwardRef9(
|
|
|
627
631
|
if (!isControlled) setInnerValue(next);
|
|
628
632
|
onValueChange?.(next);
|
|
629
633
|
};
|
|
630
|
-
const allValues = items2.map((
|
|
634
|
+
const allValues = items2.map((item9) => item9.value);
|
|
631
635
|
const agreedCount = allValues.filter((v) => agreed.includes(v)).length;
|
|
632
636
|
const allChecked = items2.length > 0 && agreedCount === items2.length;
|
|
633
637
|
const toggleItem = (itemValue, checked) => update(checked ? [...agreed.filter((v) => v !== itemValue), itemValue] : agreed.filter((v) => v !== itemValue));
|
|
@@ -635,12 +639,13 @@ var AgreementGroup = /* @__PURE__ */ forwardRef9(
|
|
|
635
639
|
"fieldset",
|
|
636
640
|
{
|
|
637
641
|
ref,
|
|
642
|
+
id,
|
|
638
643
|
className: cx(fieldset2, className),
|
|
639
644
|
disabled,
|
|
640
645
|
"aria-describedby": helperId,
|
|
641
646
|
"data-invalid": error || void 0,
|
|
642
647
|
children: [
|
|
643
|
-
|
|
648
|
+
label6 && /* @__PURE__ */ jsx11("legend", { className: legend2, children: label6 }),
|
|
644
649
|
/* @__PURE__ */ jsxs9("div", { className: box, children: [
|
|
645
650
|
/* @__PURE__ */ jsx11("div", { className: all, children: /* @__PURE__ */ jsx11(
|
|
646
651
|
Checkbox,
|
|
@@ -651,28 +656,28 @@ var AgreementGroup = /* @__PURE__ */ forwardRef9(
|
|
|
651
656
|
onChange: (event) => update(event.target.checked ? allValues : [])
|
|
652
657
|
}
|
|
653
658
|
) }),
|
|
654
|
-
/* @__PURE__ */ jsx11("ul", { className: list, children: items2.map((
|
|
655
|
-
const labelId = `${baseId}-${
|
|
656
|
-
const toggleTextId = `${baseId}-${
|
|
657
|
-
const contentId = `${baseId}-${
|
|
658
|
-
const isOpen = expanded.includes(
|
|
659
|
+
/* @__PURE__ */ jsx11("ul", { className: list, children: items2.map((item9) => {
|
|
660
|
+
const labelId = `${baseId}-${item9.value}-label`;
|
|
661
|
+
const toggleTextId = `${baseId}-${item9.value}-toggle`;
|
|
662
|
+
const contentId = `${baseId}-${item9.value}-content`;
|
|
663
|
+
const isOpen = expanded.includes(item9.value);
|
|
659
664
|
return /* @__PURE__ */ jsxs9("li", { className: item2, children: [
|
|
660
665
|
/* @__PURE__ */ jsxs9("div", { className: row2, children: [
|
|
661
666
|
/* @__PURE__ */ jsx11(
|
|
662
667
|
Checkbox,
|
|
663
668
|
{
|
|
664
669
|
size: "sm",
|
|
665
|
-
checked: agreed.includes(
|
|
666
|
-
invalid: error &&
|
|
667
|
-
onChange: (event) => toggleItem(
|
|
670
|
+
checked: agreed.includes(item9.value),
|
|
671
|
+
invalid: error && item9.required && !agreed.includes(item9.value),
|
|
672
|
+
onChange: (event) => toggleItem(item9.value, event.target.checked),
|
|
668
673
|
label: /* @__PURE__ */ jsxs9("span", { id: labelId, children: [
|
|
669
|
-
/* @__PURE__ */ jsx11("span", { className: tag, "data-required":
|
|
674
|
+
/* @__PURE__ */ jsx11("span", { className: tag, "data-required": item9.required || void 0, children: item9.required ? requiredText : optionalText }),
|
|
670
675
|
" ",
|
|
671
|
-
|
|
676
|
+
item9.label
|
|
672
677
|
] })
|
|
673
678
|
}
|
|
674
679
|
),
|
|
675
|
-
|
|
680
|
+
item9.content && /* @__PURE__ */ jsxs9(
|
|
676
681
|
"button",
|
|
677
682
|
{
|
|
678
683
|
type: "button",
|
|
@@ -680,7 +685,7 @@ var AgreementGroup = /* @__PURE__ */ forwardRef9(
|
|
|
680
685
|
"aria-expanded": isOpen,
|
|
681
686
|
"aria-controls": contentId,
|
|
682
687
|
"aria-labelledby": `${labelId} ${toggleTextId}`,
|
|
683
|
-
onClick: () => setExpanded((prev) => isOpen ? prev.filter((v) => v !==
|
|
688
|
+
onClick: () => setExpanded((prev) => isOpen ? prev.filter((v) => v !== item9.value) : [...prev, item9.value]),
|
|
684
689
|
children: [
|
|
685
690
|
/* @__PURE__ */ jsx11("span", { id: toggleTextId, children: isOpen ? hideText : showText }),
|
|
686
691
|
/* @__PURE__ */ jsx11(ChevronDownIcon2, { size: 14, className: chevron2 })
|
|
@@ -688,10 +693,10 @@ var AgreementGroup = /* @__PURE__ */ forwardRef9(
|
|
|
688
693
|
}
|
|
689
694
|
)
|
|
690
695
|
] }),
|
|
691
|
-
|
|
696
|
+
item9.content && isOpen && // 내용이 길면 스크롤된다 — 키보드로도 스크롤할 수 있게 포커스를 받는 이름 있는 영역으로 둔다
|
|
692
697
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
693
|
-
/* @__PURE__ */ jsx11("div", { id: contentId, role: "region", "aria-labelledby": labelId, tabIndex: 0, className: content3, children:
|
|
694
|
-
] },
|
|
698
|
+
/* @__PURE__ */ jsx11("div", { id: contentId, role: "region", "aria-labelledby": labelId, tabIndex: 0, className: content3, children: item9.content })
|
|
699
|
+
] }, item9.value);
|
|
695
700
|
}) })
|
|
696
701
|
] }),
|
|
697
702
|
name && agreed.map((v) => /* @__PURE__ */ jsx11("input", { type: "hidden", name, value: v }, v)),
|
|
@@ -808,7 +813,7 @@ function useFormattedInput({
|
|
|
808
813
|
const input6 = event.currentTarget;
|
|
809
814
|
const { selectionStart: start, selectionEnd: end2 } = input6;
|
|
810
815
|
if (start === null || start !== end2) return;
|
|
811
|
-
const countBefore = (
|
|
816
|
+
const countBefore = (text3) => [...text3].filter(isMeaningful2).length;
|
|
812
817
|
if (event.key === "Backspace" && start > 0 && !isMeaningful2(input6.value[start - 1])) {
|
|
813
818
|
const index = countBefore(input6.value.slice(0, start)) - 1;
|
|
814
819
|
if (index < 0) return;
|
|
@@ -851,7 +856,7 @@ var AmountInput = /* @__PURE__ */ forwardRef11(
|
|
|
851
856
|
const inputRef = useRef5(null);
|
|
852
857
|
const m = useMessages();
|
|
853
858
|
const unit2 = unitProp ?? m.currencyUnit ?? "\uC6D0";
|
|
854
|
-
const
|
|
859
|
+
const label6 = labelProp ?? m.amount ?? "\uAE08\uC561";
|
|
855
860
|
const sanitize4 = (input6) => {
|
|
856
861
|
let digits = input6.replace(/\D/g, "").replace(/^0+(?=\d)/, "").slice(0, MAX_DIGITS);
|
|
857
862
|
if (max !== void 0 && digits && Number(digits) > max) digits = String(Math.floor(max));
|
|
@@ -873,7 +878,7 @@ var AmountInput = /* @__PURE__ */ forwardRef11(
|
|
|
873
878
|
TextField,
|
|
874
879
|
{
|
|
875
880
|
ref: mergeRefs(ref, inputRef),
|
|
876
|
-
label:
|
|
881
|
+
label: label6,
|
|
877
882
|
placeholder,
|
|
878
883
|
inputMode: "numeric",
|
|
879
884
|
value: field3.display,
|
|
@@ -914,8 +919,8 @@ function getInitials(name) {
|
|
|
914
919
|
return (first(a) + first(b)).toUpperCase();
|
|
915
920
|
}
|
|
916
921
|
var Avatar = /* @__PURE__ */ forwardRef12(function Avatar2({ src, alt, name, fallback: fallback2, size, shape, className, ...rest }, ref) {
|
|
917
|
-
const
|
|
918
|
-
const a11y =
|
|
922
|
+
const label6 = alt ?? name;
|
|
923
|
+
const a11y = label6 ? { role: "img", "aria-label": label6 } : { "aria-hidden": true };
|
|
919
924
|
const initials = name ? getInitials(name) : "";
|
|
920
925
|
return /* @__PURE__ */ jsxs12(RadixAvatar.Root, { ref, className: cx(root5({ size, shape }), className), ...a11y, ...rest, children: [
|
|
921
926
|
src && /* @__PURE__ */ jsx14(RadixAvatar.Image, { src, alt: "", className: image }),
|
|
@@ -994,11 +999,11 @@ var Breadcrumb = /* @__PURE__ */ forwardRef14(function Breadcrumb2({ items: item
|
|
|
994
999
|
const m = useMessages();
|
|
995
1000
|
const ariaLabel = ariaLabelProp ?? m.breadcrumb ?? "\uC774\uB3D9 \uACBD\uB85C";
|
|
996
1001
|
const sep = separator3 ?? /* @__PURE__ */ jsx16(ChevronRightIcon, { size: 14 });
|
|
997
|
-
return /* @__PURE__ */ jsx16("nav", { ref, "aria-label": ariaLabel, className, ...rest, children: /* @__PURE__ */ jsx16("ol", { className: list2, children: items2.map((
|
|
1002
|
+
return /* @__PURE__ */ jsx16("nav", { ref, "aria-label": ariaLabel, className, ...rest, children: /* @__PURE__ */ jsx16("ol", { className: list2, children: items2.map((item9, index) => {
|
|
998
1003
|
const isCurrent = index === items2.length - 1;
|
|
999
1004
|
return /* @__PURE__ */ jsxs14("li", { className: item3, children: [
|
|
1000
1005
|
index > 0 && /* @__PURE__ */ jsx16("span", { className: separator, "aria-hidden": true, children: sep }),
|
|
1001
|
-
isCurrent ||
|
|
1006
|
+
isCurrent || item9.href === void 0 ? /* @__PURE__ */ jsx16("span", { className: isCurrent ? current : void 0, "aria-current": isCurrent ? "page" : void 0, children: item9.label }) : /* @__PURE__ */ jsx16(Link, { as: linkAs, href: item9.href, color: "neutral", underline: "hover", className: link2, children: item9.label })
|
|
1002
1007
|
] }, index);
|
|
1003
1008
|
}) }) });
|
|
1004
1009
|
});
|
|
@@ -1027,7 +1032,7 @@ var BusinessNumberInput = /* @__PURE__ */ forwardRef15(
|
|
|
1027
1032
|
const inputRef = useRef6(null);
|
|
1028
1033
|
const m = useMessages();
|
|
1029
1034
|
const invalidText = invalidTextProp ?? m.businessNumberInvalid ?? "\uC62C\uBC14\uB978 \uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638\uAC00 \uC544\uB2C8\uC5D0\uC694. \uBC88\uD638\uB97C \uB2E4\uC2DC \uD655\uC778\uD574 \uC8FC\uC138\uC694.";
|
|
1030
|
-
const
|
|
1035
|
+
const label6 = labelProp ?? m.businessNumber ?? "\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638";
|
|
1031
1036
|
const incompleteText = m.businessNumberIncomplete ?? "10\uC790\uB9AC\uB97C \uBAA8\uB450 \uC785\uB825\uD574 \uC8FC\uC138\uC694.";
|
|
1032
1037
|
const [touched, setTouched] = useState4(false);
|
|
1033
1038
|
const field3 = useFormattedInput({
|
|
@@ -1047,7 +1052,7 @@ var BusinessNumberInput = /* @__PURE__ */ forwardRef15(
|
|
|
1047
1052
|
TextField,
|
|
1048
1053
|
{
|
|
1049
1054
|
ref: mergeRefs(ref, inputRef),
|
|
1050
|
-
label:
|
|
1055
|
+
label: label6,
|
|
1051
1056
|
placeholder,
|
|
1052
1057
|
inputMode: "numeric",
|
|
1053
1058
|
value: field3.display,
|
|
@@ -1238,7 +1243,7 @@ var Calendar = /* @__PURE__ */ forwardRef17(function Calendar2(props, ref) {
|
|
|
1238
1243
|
const isToday = isSameDay(date, today);
|
|
1239
1244
|
const holiday = !!isHoliday?.(date);
|
|
1240
1245
|
const disabled = isDisabled(date);
|
|
1241
|
-
const
|
|
1246
|
+
const label6 = [
|
|
1242
1247
|
m.dayLabel?.(date, weekdaysLong[date.getDay()]) ?? `${date.getDate()}, ${date.getFullYear()}\uB144 ${date.getMonth() + 1}\uC6D4 ${weekdaysLong[date.getDay()]}`,
|
|
1243
1248
|
holiday && (m.holiday ?? "\uACF5\uD734\uC77C"),
|
|
1244
1249
|
isToday && (m.today ?? "\uC624\uB298")
|
|
@@ -1253,7 +1258,7 @@ var Calendar = /* @__PURE__ */ forwardRef17(function Calendar2(props, ref) {
|
|
|
1253
1258
|
"data-holiday": holiday || void 0,
|
|
1254
1259
|
"data-selected": isSelected || void 0,
|
|
1255
1260
|
tabIndex: isSameDay(date, focused) ? 0 : -1,
|
|
1256
|
-
"aria-label":
|
|
1261
|
+
"aria-label": label6,
|
|
1257
1262
|
"aria-current": isToday ? "date" : void 0,
|
|
1258
1263
|
"aria-disabled": disabled || void 0,
|
|
1259
1264
|
onClick: () => select(date),
|
|
@@ -1305,7 +1310,7 @@ var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
|
|
|
1305
1310
|
filter = defaultFilter,
|
|
1306
1311
|
emptyMessage: emptyMessageProp,
|
|
1307
1312
|
placeholder,
|
|
1308
|
-
label:
|
|
1313
|
+
label: label6,
|
|
1309
1314
|
helperText: helperText3,
|
|
1310
1315
|
error,
|
|
1311
1316
|
size,
|
|
@@ -1342,15 +1347,15 @@ var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
|
|
|
1342
1347
|
const [activeIndex, setActiveIndex] = useState6(-1);
|
|
1343
1348
|
const filtered = useMemo3(() => query ? options.filter((o) => filter(o, query)) : options, [options, filter, query]);
|
|
1344
1349
|
const inputText = query ?? selectedOption?.label ?? "";
|
|
1345
|
-
const firstEnabled = (
|
|
1346
|
-
for (let i = from; i >= 0 && i <
|
|
1350
|
+
const firstEnabled = (list7, from = 0, step2 = 1) => {
|
|
1351
|
+
for (let i = from; i >= 0 && i < list7.length; i += step2) if (!list7[i].disabled) return i;
|
|
1347
1352
|
return -1;
|
|
1348
1353
|
};
|
|
1349
|
-
const openList = (
|
|
1354
|
+
const openList = (list7 = filtered, preferLast = false) => {
|
|
1350
1355
|
setOpen(true);
|
|
1351
|
-
const selectedIndex =
|
|
1356
|
+
const selectedIndex = list7.findIndex((o) => o.value === selectedValue);
|
|
1352
1357
|
setActiveIndex(
|
|
1353
|
-
selectedIndex >= 0 && !
|
|
1358
|
+
selectedIndex >= 0 && !list7[selectedIndex].disabled ? selectedIndex : preferLast ? firstEnabled(list7, list7.length - 1, -1) : firstEnabled(list7)
|
|
1354
1359
|
);
|
|
1355
1360
|
};
|
|
1356
1361
|
const reset = () => {
|
|
@@ -1372,9 +1377,9 @@ var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
|
|
|
1372
1377
|
if (option2.value !== selectedValue) onValueChange?.(option2.value);
|
|
1373
1378
|
reset();
|
|
1374
1379
|
};
|
|
1375
|
-
const move = (
|
|
1376
|
-
const start = activeIndex < 0 ?
|
|
1377
|
-
const next = firstEnabled(filtered, start,
|
|
1380
|
+
const move = (step2) => {
|
|
1381
|
+
const start = activeIndex < 0 ? step2 === 1 ? 0 : filtered.length - 1 : activeIndex + step2;
|
|
1382
|
+
const next = firstEnabled(filtered, start, step2);
|
|
1378
1383
|
if (next >= 0) setActiveIndex(next);
|
|
1379
1384
|
};
|
|
1380
1385
|
const handleChange = (event) => {
|
|
@@ -1421,8 +1426,8 @@ var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
|
|
|
1421
1426
|
}, [open, activeIndex]);
|
|
1422
1427
|
const hasOptions = filtered.length > 0;
|
|
1423
1428
|
return /* @__PURE__ */ jsxs16("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
|
|
1424
|
-
|
|
1425
|
-
|
|
1429
|
+
label6 && /* @__PURE__ */ jsxs16("label", { id: labelId, htmlFor: inputId, className: label, children: [
|
|
1430
|
+
label6,
|
|
1426
1431
|
required && /* @__PURE__ */ jsx20("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
1427
1432
|
] }),
|
|
1428
1433
|
/* @__PURE__ */ jsxs16(Popover.Root, { open: open && !disabled, onOpenChange: (next) => next ? openList() : close2(), children: [
|
|
@@ -1445,7 +1450,7 @@ var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
|
|
|
1445
1450
|
"aria-controls": open && hasOptions ? listId : void 0,
|
|
1446
1451
|
"aria-autocomplete": "list",
|
|
1447
1452
|
"aria-activedescendant": open && activeIndex >= 0 ? optionId(activeIndex) : void 0,
|
|
1448
|
-
"aria-label":
|
|
1453
|
+
"aria-label": label6 ? void 0 : ariaLabel,
|
|
1449
1454
|
"aria-invalid": error || void 0,
|
|
1450
1455
|
"aria-required": required || void 0,
|
|
1451
1456
|
"aria-describedby": helperId,
|
|
@@ -1518,8 +1523,8 @@ var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
|
|
|
1518
1523
|
{
|
|
1519
1524
|
id: listId,
|
|
1520
1525
|
role: "listbox",
|
|
1521
|
-
"aria-labelledby":
|
|
1522
|
-
"aria-label":
|
|
1526
|
+
"aria-labelledby": label6 ? labelId : void 0,
|
|
1527
|
+
"aria-label": label6 ? void 0 : ariaLabel,
|
|
1523
1528
|
children: filtered.map((option2, index) => {
|
|
1524
1529
|
const isSelected = option2.value === selectedValue;
|
|
1525
1530
|
return (
|
|
@@ -1657,7 +1662,7 @@ var DatePicker = /* @__PURE__ */ forwardRef19(
|
|
|
1657
1662
|
} = props;
|
|
1658
1663
|
const inputRef = useRef9(null);
|
|
1659
1664
|
const m = useMessages();
|
|
1660
|
-
const
|
|
1665
|
+
const label6 = labelProp ?? m.date ?? "\uB0A0\uC9DC";
|
|
1661
1666
|
const calendarLabel = calendarLabelProp ?? m.openCalendar ?? "\uB2EC\uB825 \uC5F4\uAE30";
|
|
1662
1667
|
const invalidText = invalidTextProp ?? m.dateInvalid ?? "\uC62C\uBC14\uB978 \uB0A0\uC9DC\uAC00 \uC544\uB2C8\uC5D0\uC694.";
|
|
1663
1668
|
const unavailableText = unavailableTextProp ?? m.dateUnavailable ?? "\uACE0\uB97C \uC218 \uC5C6\uB294 \uB0A0\uC9DC\uC608\uC694.";
|
|
@@ -1711,7 +1716,7 @@ var DatePicker = /* @__PURE__ */ forwardRef19(
|
|
|
1711
1716
|
{
|
|
1712
1717
|
ref: mergeRefs(ref, inputRef),
|
|
1713
1718
|
id,
|
|
1714
|
-
label:
|
|
1719
|
+
label: label6,
|
|
1715
1720
|
placeholder,
|
|
1716
1721
|
inputMode: "numeric",
|
|
1717
1722
|
autoComplete: "off",
|
|
@@ -1785,7 +1790,7 @@ function Drawer({
|
|
|
1785
1790
|
onOpenChange,
|
|
1786
1791
|
trigger: trigger4,
|
|
1787
1792
|
title: title6,
|
|
1788
|
-
description:
|
|
1793
|
+
description: description7,
|
|
1789
1794
|
children,
|
|
1790
1795
|
footer: footer5,
|
|
1791
1796
|
side,
|
|
@@ -1810,12 +1815,12 @@ function Drawer({
|
|
|
1810
1815
|
onPointerDownOutside: closeOnOverlayClick ? void 0 : (event) => event.preventDefault(),
|
|
1811
1816
|
onOpenAutoFocus: focus.onOpenAutoFocus,
|
|
1812
1817
|
onCloseAutoFocus: focus.onCloseAutoFocus,
|
|
1813
|
-
...
|
|
1818
|
+
...description7 ? {} : { "aria-describedby": void 0 },
|
|
1814
1819
|
children: [
|
|
1815
1820
|
/* @__PURE__ */ jsxs19("div", { className: header5, children: [
|
|
1816
1821
|
/* @__PURE__ */ jsxs19("div", { className: headings2, children: [
|
|
1817
1822
|
/* @__PURE__ */ jsx23(Dialog2.Title, { className: title4, children: title6 }),
|
|
1818
|
-
|
|
1823
|
+
description7 && /* @__PURE__ */ jsx23(Dialog2.Description, { className: description3, children: description7 })
|
|
1819
1824
|
] }),
|
|
1820
1825
|
!hideCloseButton && /* @__PURE__ */ jsx23(Dialog2.Close, { asChild: true, children: /* @__PURE__ */ jsx23(IconButton, { "aria-label": m.close ?? "\uB2EB\uAE30", size: "sm", className: closeButton4, children: /* @__PURE__ */ jsx23(XIcon5, {}) }) })
|
|
1821
1826
|
] }),
|
|
@@ -1829,10 +1834,276 @@ function Drawer({
|
|
|
1829
1834
|
}
|
|
1830
1835
|
var DrawerClose = Dialog2.Close;
|
|
1831
1836
|
|
|
1837
|
+
// src/components/ErrorSummary/ErrorSummary.tsx
|
|
1838
|
+
import { forwardRef as forwardRef20, useEffect as useEffect7, useId as useId7, useRef as useRef10 } from "react";
|
|
1839
|
+
|
|
1840
|
+
// src/components/ErrorSummary/ErrorSummary.css.ts
|
|
1841
|
+
var link3 = "_1cdophv2";
|
|
1842
|
+
var list3 = "_1cdophv1";
|
|
1843
|
+
var root7 = "_1cdophv0";
|
|
1844
|
+
|
|
1845
|
+
// src/components/ErrorSummary/ErrorSummary.tsx
|
|
1846
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1847
|
+
var ErrorSummary = /* @__PURE__ */ forwardRef20(function ErrorSummary2({ errors: errors2, title: title6, focusKey, className, ...rest }, ref) {
|
|
1848
|
+
const m = useMessages();
|
|
1849
|
+
const titleId = useId7();
|
|
1850
|
+
const rootRef = useRef10(null);
|
|
1851
|
+
const hasErrors = errors2.length > 0;
|
|
1852
|
+
useEffect7(() => {
|
|
1853
|
+
if (hasErrors) rootRef.current?.focus();
|
|
1854
|
+
}, [focusKey, hasErrors]);
|
|
1855
|
+
if (!hasErrors) return null;
|
|
1856
|
+
return /* @__PURE__ */ jsx24(
|
|
1857
|
+
"div",
|
|
1858
|
+
{
|
|
1859
|
+
ref: mergeRefs(ref, rootRef),
|
|
1860
|
+
tabIndex: -1,
|
|
1861
|
+
"aria-labelledby": titleId,
|
|
1862
|
+
className: cx(root7, className),
|
|
1863
|
+
...rest,
|
|
1864
|
+
children: /* @__PURE__ */ jsx24(
|
|
1865
|
+
Alert,
|
|
1866
|
+
{
|
|
1867
|
+
color: "danger",
|
|
1868
|
+
title: /* @__PURE__ */ jsx24("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` }),
|
|
1869
|
+
children: /* @__PURE__ */ jsx24("ul", { className: list3, children: errors2.map((error) => /* @__PURE__ */ jsx24("li", { children: /* @__PURE__ */ jsx24(
|
|
1870
|
+
"a",
|
|
1871
|
+
{
|
|
1872
|
+
href: `#${error.id}`,
|
|
1873
|
+
className: link3,
|
|
1874
|
+
onClick: (event) => {
|
|
1875
|
+
if (focusField(error.id)) event.preventDefault();
|
|
1876
|
+
},
|
|
1877
|
+
children: error.message
|
|
1878
|
+
}
|
|
1879
|
+
) }, error.id)) })
|
|
1880
|
+
}
|
|
1881
|
+
)
|
|
1882
|
+
}
|
|
1883
|
+
);
|
|
1884
|
+
});
|
|
1885
|
+
|
|
1886
|
+
// src/components/FileUpload/FileUpload.tsx
|
|
1887
|
+
import { forwardRef as forwardRef21, useEffect as useEffect8, useId as useId8, useRef as useRef11, useState as useState8 } from "react";
|
|
1888
|
+
import { FileIcon, UploadIcon, XIcon as XIcon6 } from "@bestow-ui/icons";
|
|
1889
|
+
|
|
1890
|
+
// src/components/FileUpload/FileUpload.css.ts
|
|
1891
|
+
var dropHint = "r2jefr3";
|
|
1892
|
+
var dropIcon = "r2jefr2";
|
|
1893
|
+
var dropzone = "r2jefr1";
|
|
1894
|
+
var errors = "r2jefr9";
|
|
1895
|
+
var fileIcon = "r2jefr6";
|
|
1896
|
+
var fileName = "r2jefr7";
|
|
1897
|
+
var fileSize = "r2jefr8";
|
|
1898
|
+
var item5 = "r2jefr5";
|
|
1899
|
+
var list4 = "r2jefr4";
|
|
1900
|
+
var root8 = "r2jefr0";
|
|
1901
|
+
|
|
1902
|
+
// src/components/FileUpload/FileUpload.tsx
|
|
1903
|
+
import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1904
|
+
function formatSize(bytes) {
|
|
1905
|
+
if (bytes < 1024) return `${bytes} B`;
|
|
1906
|
+
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(bytes < 10 * 1024 ? 1 : 0)} KB`;
|
|
1907
|
+
return `${(bytes / 1024 / 1024).toFixed(1)} MB`;
|
|
1908
|
+
}
|
|
1909
|
+
function matchesAccept(file, accept) {
|
|
1910
|
+
if (!accept) return true;
|
|
1911
|
+
const name = file.name.toLowerCase();
|
|
1912
|
+
const type = file.type.toLowerCase();
|
|
1913
|
+
return accept.split(",").map((token) => token.trim().toLowerCase()).filter(Boolean).some(
|
|
1914
|
+
(token) => token.startsWith(".") ? name.endsWith(token) : token.endsWith("/*") ? type.startsWith(token.slice(0, -1)) : type === token
|
|
1915
|
+
);
|
|
1916
|
+
}
|
|
1917
|
+
var NO_FILES = [];
|
|
1918
|
+
var sameFile = (a, b) => a.name === b.name && a.size === b.size && a.lastModified === b.lastModified;
|
|
1919
|
+
var FileUpload = /* @__PURE__ */ forwardRef21(function FileUpload2(props, ref) {
|
|
1920
|
+
const {
|
|
1921
|
+
value: value3,
|
|
1922
|
+
defaultValue,
|
|
1923
|
+
onValueChange,
|
|
1924
|
+
onReject,
|
|
1925
|
+
accept,
|
|
1926
|
+
multiple = false,
|
|
1927
|
+
maxSize,
|
|
1928
|
+
maxFiles,
|
|
1929
|
+
label: label6,
|
|
1930
|
+
helperText: helperText3,
|
|
1931
|
+
error,
|
|
1932
|
+
required,
|
|
1933
|
+
disabled,
|
|
1934
|
+
name,
|
|
1935
|
+
id,
|
|
1936
|
+
className
|
|
1937
|
+
} = props;
|
|
1938
|
+
const m = useMessages();
|
|
1939
|
+
const isControlled = "value" in props;
|
|
1940
|
+
const [innerFiles, setInnerFiles] = useState8(defaultValue ?? []);
|
|
1941
|
+
const files = isControlled ? value3 ?? NO_FILES : innerFiles;
|
|
1942
|
+
const [rejections, setRejections] = useState8([]);
|
|
1943
|
+
const [announcement, setAnnouncement] = useState8("");
|
|
1944
|
+
const [dragging, setDragging] = useState8(false);
|
|
1945
|
+
const generatedId = useId8();
|
|
1946
|
+
const baseId = id ?? generatedId;
|
|
1947
|
+
const labelId = label6 ? `${baseId}-label` : void 0;
|
|
1948
|
+
const helperId = helperText3 ? `${baseId}-helper` : void 0;
|
|
1949
|
+
const errorsId = rejections.length > 0 ? `${baseId}-errors` : void 0;
|
|
1950
|
+
const inputRef = useRef11(null);
|
|
1951
|
+
const selectButtonRef = useRef11(null);
|
|
1952
|
+
const removeButtonRefs = useRef11([]);
|
|
1953
|
+
const focusAfterRemove = useRef11(null);
|
|
1954
|
+
const selectLabel = m.fileSelect ?? "\uD30C\uC77C \uC120\uD0DD";
|
|
1955
|
+
const reasonText = (rejection) => {
|
|
1956
|
+
const fileName2 = rejection.file.name;
|
|
1957
|
+
if (rejection.reason === "size")
|
|
1958
|
+
return m.fileTooLarge?.(fileName2, formatSize(maxSize ?? 0)) ?? `${fileName2}: ${formatSize(maxSize ?? 0)} \uC774\uD558\uB9CC \uC62C\uB9B4 \uC218 \uC788\uC5B4\uC694.`;
|
|
1959
|
+
if (rejection.reason === "type") return m.fileTypeNotAllowed?.(fileName2) ?? `${fileName2}: \uC62C\uB9B4 \uC218 \uC5C6\uB294 \uD615\uC2DD\uC774\uC5D0\uC694.`;
|
|
1960
|
+
return m.fileTooMany?.(maxFiles ?? 0) ?? `\uD30C\uC77C\uC740 ${maxFiles}\uAC1C\uAE4C\uC9C0 \uC62C\uB9B4 \uC218 \uC788\uC5B4\uC694.`;
|
|
1961
|
+
};
|
|
1962
|
+
const commit = (next, message) => {
|
|
1963
|
+
if (!isControlled) setInnerFiles(next);
|
|
1964
|
+
onValueChange?.(next);
|
|
1965
|
+
setAnnouncement(message);
|
|
1966
|
+
};
|
|
1967
|
+
const addFiles = (incoming) => {
|
|
1968
|
+
if (disabled || incoming.length === 0) return;
|
|
1969
|
+
const accepted = [];
|
|
1970
|
+
const rejected = [];
|
|
1971
|
+
const base = multiple ? files : [];
|
|
1972
|
+
for (const file of incoming) {
|
|
1973
|
+
if (!matchesAccept(file, accept)) rejected.push({ file, reason: "type" });
|
|
1974
|
+
else if (maxSize !== void 0 && file.size > maxSize) rejected.push({ file, reason: "size" });
|
|
1975
|
+
else if (!multiple && accepted.length >= 1) rejected.push({ file, reason: "count" });
|
|
1976
|
+
else if (maxFiles !== void 0 && base.length + accepted.length >= maxFiles)
|
|
1977
|
+
rejected.push({ file, reason: "count" });
|
|
1978
|
+
else if (![...base, ...accepted].some((existing) => sameFile(existing, file))) accepted.push(file);
|
|
1979
|
+
}
|
|
1980
|
+
setRejections(rejected);
|
|
1981
|
+
if (rejected.length > 0) onReject?.(rejected);
|
|
1982
|
+
const next = [...base, ...accepted];
|
|
1983
|
+
const summary = m.filesSelected?.(next.length) ?? `\uD30C\uC77C ${next.length}\uAC1C \uC120\uD0DD\uB428`;
|
|
1984
|
+
const errors2 = [...new Set(rejected.map(reasonText))].join(" ");
|
|
1985
|
+
if (accepted.length > 0) commit(next, [summary, errors2].filter(Boolean).join(" "));
|
|
1986
|
+
else setAnnouncement(errors2);
|
|
1987
|
+
};
|
|
1988
|
+
const removeAt = (index) => {
|
|
1989
|
+
const removed = files[index];
|
|
1990
|
+
const next = files.filter((_, i) => i !== index);
|
|
1991
|
+
focusAfterRemove.current = Math.min(index, next.length - 1);
|
|
1992
|
+
setRejections([]);
|
|
1993
|
+
commit(next, m.fileRemoved?.(removed.name) ?? `${removed.name} \uC0AD\uC81C\uB428`);
|
|
1994
|
+
};
|
|
1995
|
+
useEffect8(() => {
|
|
1996
|
+
if (focusAfterRemove.current === null) return;
|
|
1997
|
+
const target = focusAfterRemove.current;
|
|
1998
|
+
focusAfterRemove.current = null;
|
|
1999
|
+
(target >= 0 ? removeButtonRefs.current[target] : selectButtonRef.current)?.focus();
|
|
2000
|
+
}, [files]);
|
|
2001
|
+
useEffect8(() => {
|
|
2002
|
+
const input6 = inputRef.current;
|
|
2003
|
+
if (!name || !input6 || typeof DataTransfer === "undefined") return;
|
|
2004
|
+
try {
|
|
2005
|
+
const transfer = new DataTransfer();
|
|
2006
|
+
files.forEach((file) => transfer.items.add(file));
|
|
2007
|
+
input6.files = transfer.files;
|
|
2008
|
+
} catch {
|
|
2009
|
+
}
|
|
2010
|
+
}, [files, name]);
|
|
2011
|
+
const onDrag = (event, over) => {
|
|
2012
|
+
if (disabled) return;
|
|
2013
|
+
event.preventDefault();
|
|
2014
|
+
setDragging(over);
|
|
2015
|
+
};
|
|
2016
|
+
return /* @__PURE__ */ jsxs20("div", { ref, className: cx(field, root8, className), children: [
|
|
2017
|
+
label6 && /* @__PURE__ */ jsxs20("span", { id: labelId, className: label, children: [
|
|
2018
|
+
label6,
|
|
2019
|
+
required && /* @__PURE__ */ jsx25("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
2020
|
+
] }),
|
|
2021
|
+
/* @__PURE__ */ jsxs20(
|
|
2022
|
+
"div",
|
|
2023
|
+
{
|
|
2024
|
+
role: "group",
|
|
2025
|
+
"aria-labelledby": labelId,
|
|
2026
|
+
"aria-describedby": cx(helperId, errorsId) || void 0,
|
|
2027
|
+
className: dropzone,
|
|
2028
|
+
"data-dragging": dragging || void 0,
|
|
2029
|
+
"data-disabled": disabled || void 0,
|
|
2030
|
+
"data-invalid": error || rejections.length > 0 || void 0,
|
|
2031
|
+
onDragEnter: (event) => onDrag(event, true),
|
|
2032
|
+
onDragOver: (event) => onDrag(event, true),
|
|
2033
|
+
onDragLeave: (event) => {
|
|
2034
|
+
if (!event.currentTarget.contains(event.relatedTarget)) setDragging(false);
|
|
2035
|
+
},
|
|
2036
|
+
onDrop: (event) => {
|
|
2037
|
+
onDrag(event, false);
|
|
2038
|
+
if (!disabled) addFiles(Array.from(event.dataTransfer.files));
|
|
2039
|
+
},
|
|
2040
|
+
children: [
|
|
2041
|
+
/* @__PURE__ */ jsx25("span", { className: dropIcon, "aria-hidden": true, children: /* @__PURE__ */ jsx25(UploadIcon, { size: 24 }) }),
|
|
2042
|
+
/* @__PURE__ */ jsx25(
|
|
2043
|
+
Button,
|
|
2044
|
+
{
|
|
2045
|
+
ref: selectButtonRef,
|
|
2046
|
+
type: "button",
|
|
2047
|
+
variant: "outline",
|
|
2048
|
+
color: "neutral",
|
|
2049
|
+
size: "sm",
|
|
2050
|
+
disabled,
|
|
2051
|
+
onClick: () => inputRef.current?.click(),
|
|
2052
|
+
children: selectLabel
|
|
2053
|
+
}
|
|
2054
|
+
),
|
|
2055
|
+
/* @__PURE__ */ jsx25("span", { className: dropHint, children: m.fileDropHint ?? "\uB610\uB294 \uC5EC\uAE30\uB85C \uB04C\uC5B4\uB2E4 \uB193\uC73C\uC138\uC694" }),
|
|
2056
|
+
/* @__PURE__ */ jsx25(
|
|
2057
|
+
"input",
|
|
2058
|
+
{
|
|
2059
|
+
ref: inputRef,
|
|
2060
|
+
type: "file",
|
|
2061
|
+
id: baseId,
|
|
2062
|
+
name,
|
|
2063
|
+
accept,
|
|
2064
|
+
multiple,
|
|
2065
|
+
required: required && files.length === 0,
|
|
2066
|
+
disabled,
|
|
2067
|
+
tabIndex: -1,
|
|
2068
|
+
"aria-hidden": true,
|
|
2069
|
+
className: visuallyHidden,
|
|
2070
|
+
onChange: (event) => {
|
|
2071
|
+
addFiles(Array.from(event.target.files ?? []));
|
|
2072
|
+
if (!name) event.target.value = "";
|
|
2073
|
+
}
|
|
2074
|
+
}
|
|
2075
|
+
)
|
|
2076
|
+
]
|
|
2077
|
+
}
|
|
2078
|
+
),
|
|
2079
|
+
files.length > 0 && /* @__PURE__ */ jsx25("ul", { "aria-label": m.fileList ?? "\uC120\uD0DD\uD55C \uD30C\uC77C", className: list4, children: files.map((file, index) => /* @__PURE__ */ jsxs20("li", { className: item5, children: [
|
|
2080
|
+
/* @__PURE__ */ jsx25("span", { className: fileIcon, "aria-hidden": true, children: /* @__PURE__ */ jsx25(FileIcon, { size: 16 }) }),
|
|
2081
|
+
/* @__PURE__ */ jsx25("span", { className: fileName, children: file.name }),
|
|
2082
|
+
/* @__PURE__ */ jsx25("span", { className: fileSize, children: formatSize(file.size) }),
|
|
2083
|
+
/* @__PURE__ */ jsx25(
|
|
2084
|
+
IconButton,
|
|
2085
|
+
{
|
|
2086
|
+
ref: (node) => {
|
|
2087
|
+
removeButtonRefs.current[index] = node;
|
|
2088
|
+
},
|
|
2089
|
+
size: "sm",
|
|
2090
|
+
"aria-label": m.fileRemove?.(file.name) ?? `${file.name} \uC0AD\uC81C`,
|
|
2091
|
+
disabled,
|
|
2092
|
+
onClick: () => removeAt(index),
|
|
2093
|
+
children: /* @__PURE__ */ jsx25(XIcon6, {})
|
|
2094
|
+
}
|
|
2095
|
+
)
|
|
2096
|
+
] }, `${file.name}-${file.size}-${file.lastModified}`)) }),
|
|
2097
|
+
rejections.length > 0 && /* @__PURE__ */ jsx25("ul", { id: errorsId, className: errors, children: [...new Set(rejections.map(reasonText))].map((text3) => /* @__PURE__ */ jsx25("li", { children: text3 }, text3)) }),
|
|
2098
|
+
helperText3 && /* @__PURE__ */ jsx25("p", { id: helperId, className: helperText({ error }), children: helperText3 }),
|
|
2099
|
+
/* @__PURE__ */ jsx25("div", { role: "status", className: visuallyHidden, children: announcement })
|
|
2100
|
+
] });
|
|
2101
|
+
});
|
|
2102
|
+
|
|
1832
2103
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
1833
2104
|
import * as RadixMenu from "@radix-ui/react-dropdown-menu";
|
|
1834
2105
|
import { CheckIcon as CheckIcon2, ChevronRightIcon as ChevronRightIcon3, MinusIcon } from "@bestow-ui/icons";
|
|
1835
|
-
import { forwardRef as
|
|
2106
|
+
import { forwardRef as forwardRef22 } from "react";
|
|
1836
2107
|
|
|
1837
2108
|
// src/components/DropdownMenu/DropdownMenu.css.ts
|
|
1838
2109
|
var content9 = "_1d7ahux0";
|
|
@@ -1840,7 +2111,7 @@ var danger = "_1d7ahux2";
|
|
|
1840
2111
|
var icon4 = "_1d7ahux3";
|
|
1841
2112
|
var indicator = "_1d7ahux7";
|
|
1842
2113
|
var indicatorInner = "_1d7ahux8";
|
|
1843
|
-
var
|
|
2114
|
+
var item6 = "_1d7ahux1";
|
|
1844
2115
|
var label2 = "_1d7ahux5";
|
|
1845
2116
|
var radioDot = "_1d7ahux9";
|
|
1846
2117
|
var separator2 = "_1d7ahux6";
|
|
@@ -1849,14 +2120,14 @@ var subChevron = "_1d7ahuxb";
|
|
|
1849
2120
|
var subTrigger = "_1d7ahuxa";
|
|
1850
2121
|
|
|
1851
2122
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
1852
|
-
import { jsx as
|
|
2123
|
+
import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1853
2124
|
var DropdownMenu = RadixMenu.Root;
|
|
1854
2125
|
var DropdownMenuTrigger = RadixMenu.Trigger;
|
|
1855
2126
|
var DropdownMenuGroup = RadixMenu.Group;
|
|
1856
|
-
var DropdownMenuContent = /* @__PURE__ */
|
|
2127
|
+
var DropdownMenuContent = /* @__PURE__ */ forwardRef22(
|
|
1857
2128
|
function DropdownMenuContent2({ className, style, side = "bottom", align = "start", sideOffset = 4, collisionPadding = 8, ...rest }, ref) {
|
|
1858
2129
|
const portal2 = usePortalProps();
|
|
1859
|
-
return /* @__PURE__ */
|
|
2130
|
+
return /* @__PURE__ */ jsx26(RadixMenu.Portal, { children: /* @__PURE__ */ jsx26(
|
|
1860
2131
|
RadixMenu.Content,
|
|
1861
2132
|
{
|
|
1862
2133
|
ref,
|
|
@@ -1871,56 +2142,56 @@ var DropdownMenuContent = /* @__PURE__ */ forwardRef20(
|
|
|
1871
2142
|
) });
|
|
1872
2143
|
}
|
|
1873
2144
|
);
|
|
1874
|
-
var DropdownMenuItem = /* @__PURE__ */
|
|
2145
|
+
var DropdownMenuItem = /* @__PURE__ */ forwardRef22(
|
|
1875
2146
|
function DropdownMenuItem2({ icon: icon6, shortcut: shortcut2, color = "neutral", className, children, ...rest }, ref) {
|
|
1876
|
-
return /* @__PURE__ */
|
|
1877
|
-
icon6 && /* @__PURE__ */
|
|
2147
|
+
return /* @__PURE__ */ jsxs21(RadixMenu.Item, { ref, className: cx(item6, color === "danger" && danger, className), ...rest, children: [
|
|
2148
|
+
icon6 && /* @__PURE__ */ jsx26("span", { className: icon4, "aria-hidden": true, children: icon6 }),
|
|
1878
2149
|
children,
|
|
1879
|
-
shortcut2 && /* @__PURE__ */
|
|
2150
|
+
shortcut2 && /* @__PURE__ */ jsx26("span", { className: shortcut, "aria-hidden": true, children: shortcut2 })
|
|
1880
2151
|
] });
|
|
1881
2152
|
}
|
|
1882
2153
|
);
|
|
1883
|
-
var DropdownMenuLabel = /* @__PURE__ */
|
|
2154
|
+
var DropdownMenuLabel = /* @__PURE__ */ forwardRef22(
|
|
1884
2155
|
function DropdownMenuLabel2({ className, ...rest }, ref) {
|
|
1885
|
-
return /* @__PURE__ */
|
|
2156
|
+
return /* @__PURE__ */ jsx26(RadixMenu.Label, { ref, className: cx(label2, className), ...rest });
|
|
1886
2157
|
}
|
|
1887
2158
|
);
|
|
1888
|
-
var DropdownMenuSeparator = /* @__PURE__ */
|
|
2159
|
+
var DropdownMenuSeparator = /* @__PURE__ */ forwardRef22(
|
|
1889
2160
|
function DropdownMenuSeparator2({ className, ...rest }, ref) {
|
|
1890
|
-
return /* @__PURE__ */
|
|
2161
|
+
return /* @__PURE__ */ jsx26(RadixMenu.Separator, { ref, className: cx(separator2, className), ...rest });
|
|
1891
2162
|
}
|
|
1892
2163
|
);
|
|
1893
|
-
var DropdownMenuCheckboxItem = /* @__PURE__ */
|
|
2164
|
+
var DropdownMenuCheckboxItem = /* @__PURE__ */ forwardRef22(
|
|
1894
2165
|
function DropdownMenuCheckboxItem2({ className, children, ...rest }, ref) {
|
|
1895
|
-
return /* @__PURE__ */
|
|
1896
|
-
/* @__PURE__ */
|
|
2166
|
+
return /* @__PURE__ */ jsxs21(RadixMenu.CheckboxItem, { ref, className: cx(item6, className), ...rest, children: [
|
|
2167
|
+
/* @__PURE__ */ jsx26("span", { className: indicator, "aria-hidden": true, children: /* @__PURE__ */ jsx26(RadixMenu.ItemIndicator, { className: indicatorInner, children: rest.checked === "indeterminate" ? /* @__PURE__ */ jsx26(MinusIcon, { size: 16 }) : /* @__PURE__ */ jsx26(CheckIcon2, { size: 16 }) }) }),
|
|
1897
2168
|
children
|
|
1898
2169
|
] });
|
|
1899
2170
|
}
|
|
1900
2171
|
);
|
|
1901
2172
|
var DropdownMenuRadioGroup = RadixMenu.RadioGroup;
|
|
1902
|
-
var DropdownMenuRadioItem = /* @__PURE__ */
|
|
2173
|
+
var DropdownMenuRadioItem = /* @__PURE__ */ forwardRef22(
|
|
1903
2174
|
function DropdownMenuRadioItem2({ className, children, ...rest }, ref) {
|
|
1904
|
-
return /* @__PURE__ */
|
|
1905
|
-
/* @__PURE__ */
|
|
2175
|
+
return /* @__PURE__ */ jsxs21(RadixMenu.RadioItem, { ref, className: cx(item6, className), ...rest, children: [
|
|
2176
|
+
/* @__PURE__ */ jsx26("span", { className: indicator, "aria-hidden": true, children: /* @__PURE__ */ jsx26(RadixMenu.ItemIndicator, { className: indicatorInner, children: /* @__PURE__ */ jsx26("span", { className: radioDot }) }) }),
|
|
1906
2177
|
children
|
|
1907
2178
|
] });
|
|
1908
2179
|
}
|
|
1909
2180
|
);
|
|
1910
2181
|
var DropdownMenuSub = RadixMenu.Sub;
|
|
1911
|
-
var DropdownMenuSubTrigger = /* @__PURE__ */
|
|
2182
|
+
var DropdownMenuSubTrigger = /* @__PURE__ */ forwardRef22(
|
|
1912
2183
|
function DropdownMenuSubTrigger2({ icon: icon6, className, children, ...rest }, ref) {
|
|
1913
|
-
return /* @__PURE__ */
|
|
1914
|
-
icon6 && /* @__PURE__ */
|
|
2184
|
+
return /* @__PURE__ */ jsxs21(RadixMenu.SubTrigger, { ref, className: cx(item6, subTrigger, className), ...rest, children: [
|
|
2185
|
+
icon6 && /* @__PURE__ */ jsx26("span", { className: icon4, "aria-hidden": true, children: icon6 }),
|
|
1915
2186
|
children,
|
|
1916
|
-
/* @__PURE__ */
|
|
2187
|
+
/* @__PURE__ */ jsx26("span", { className: subChevron, "aria-hidden": true, children: /* @__PURE__ */ jsx26(ChevronRightIcon3, { size: 16 }) })
|
|
1917
2188
|
] });
|
|
1918
2189
|
}
|
|
1919
2190
|
);
|
|
1920
|
-
var DropdownMenuSubContent = /* @__PURE__ */
|
|
2191
|
+
var DropdownMenuSubContent = /* @__PURE__ */ forwardRef22(
|
|
1921
2192
|
function DropdownMenuSubContent2({ className, style, sideOffset = 4, alignOffset = -5, collisionPadding = 8, ...rest }, ref) {
|
|
1922
2193
|
const portal2 = usePortalProps();
|
|
1923
|
-
return /* @__PURE__ */
|
|
2194
|
+
return /* @__PURE__ */ jsx26(RadixMenu.Portal, { children: /* @__PURE__ */ jsx26(
|
|
1924
2195
|
RadixMenu.SubContent,
|
|
1925
2196
|
{
|
|
1926
2197
|
ref,
|
|
@@ -1936,7 +2207,7 @@ var DropdownMenuSubContent = /* @__PURE__ */ forwardRef20(
|
|
|
1936
2207
|
);
|
|
1937
2208
|
|
|
1938
2209
|
// src/components/NumberInput/NumberInput.tsx
|
|
1939
|
-
import { forwardRef as
|
|
2210
|
+
import { forwardRef as forwardRef23, useEffect as useEffect9, useId as useId9, useRef as useRef12 } from "react";
|
|
1940
2211
|
import { MinusIcon as MinusIcon2, PlusIcon } from "@bestow-ui/icons";
|
|
1941
2212
|
|
|
1942
2213
|
// src/components/NumberInput/NumberInput.css.ts
|
|
@@ -1947,12 +2218,12 @@ var stepper = /* @__PURE__ */ _7a46811({ defaultClassName: "_1vq2qhv3", variantC
|
|
|
1947
2218
|
var unit = "_1vq2qhv2";
|
|
1948
2219
|
|
|
1949
2220
|
// src/components/NumberInput/NumberInput.tsx
|
|
1950
|
-
import { Fragment as Fragment5, jsx as
|
|
2221
|
+
import { Fragment as Fragment5, jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1951
2222
|
var MAX_DIGITS2 = 15;
|
|
1952
2223
|
var isMeaningful = (char) => /[\d.-]/.test(char);
|
|
1953
2224
|
var decimalsOf = (n) => Number.isFinite(n) ? String(n).split(".")[1]?.length ?? 0 : 0;
|
|
1954
2225
|
var parse = (raw) => /\d/.test(raw) ? Number(raw) : null;
|
|
1955
|
-
var NumberInput = /* @__PURE__ */
|
|
2226
|
+
var NumberInput = /* @__PURE__ */ forwardRef23(
|
|
1956
2227
|
function NumberInput2(props, ref) {
|
|
1957
2228
|
const {
|
|
1958
2229
|
value: value3,
|
|
@@ -1960,8 +2231,8 @@ var NumberInput = /* @__PURE__ */ forwardRef21(
|
|
|
1960
2231
|
onValueChange,
|
|
1961
2232
|
min,
|
|
1962
2233
|
max,
|
|
1963
|
-
step = 1,
|
|
1964
|
-
largeStep =
|
|
2234
|
+
step: step2 = 1,
|
|
2235
|
+
largeStep = step2 * 10,
|
|
1965
2236
|
precision: precisionProp,
|
|
1966
2237
|
unit: unit2,
|
|
1967
2238
|
thousandSeparator = true,
|
|
@@ -1978,10 +2249,10 @@ var NumberInput = /* @__PURE__ */ forwardRef21(
|
|
|
1978
2249
|
} = props;
|
|
1979
2250
|
const isControlled = "value" in props;
|
|
1980
2251
|
const m = useMessages();
|
|
1981
|
-
const inputRef =
|
|
1982
|
-
const generatedId =
|
|
2252
|
+
const inputRef = useRef12(null);
|
|
2253
|
+
const generatedId = useId9();
|
|
1983
2254
|
const inputId = id ?? generatedId;
|
|
1984
|
-
const precision = Math.max(0, precisionProp ?? decimalsOf(
|
|
2255
|
+
const precision = Math.max(0, precisionProp ?? decimalsOf(step2));
|
|
1985
2256
|
const allowNegative = min === void 0 || min < 0;
|
|
1986
2257
|
const round = (n) => Number(n.toFixed(precision));
|
|
1987
2258
|
const clamp = (n) => Math.min(max ?? Infinity, Math.max(min ?? -Infinity, round(n)));
|
|
@@ -1999,7 +2270,7 @@ var NumberInput = /* @__PURE__ */ forwardRef21(
|
|
|
1999
2270
|
const [, sign = "", int = "", rest2 = ""] = raw.match(/^(-?)(\d*)(.*)$/) ?? [];
|
|
2000
2271
|
return `${sign}${int ? Number(int).toLocaleString("ko-KR") : ""}${rest2}`;
|
|
2001
2272
|
};
|
|
2002
|
-
const lastEmitted =
|
|
2273
|
+
const lastEmitted = useRef12(parse(toRaw(isControlled ? value3 : defaultValue)));
|
|
2003
2274
|
const emit = (next) => {
|
|
2004
2275
|
if (next === lastEmitted.current) return;
|
|
2005
2276
|
lastEmitted.current = next;
|
|
@@ -2016,7 +2287,7 @@ var NumberInput = /* @__PURE__ */ forwardRef21(
|
|
|
2016
2287
|
inputRef
|
|
2017
2288
|
});
|
|
2018
2289
|
const { setRaw } = field3;
|
|
2019
|
-
|
|
2290
|
+
useEffect9(() => {
|
|
2020
2291
|
if (!isControlled) return;
|
|
2021
2292
|
const next = value3 ?? null;
|
|
2022
2293
|
lastEmitted.current = next;
|
|
@@ -2037,8 +2308,8 @@ var NumberInput = /* @__PURE__ */ forwardRef21(
|
|
|
2037
2308
|
onKeyDown?.(event);
|
|
2038
2309
|
if (event.defaultPrevented) return;
|
|
2039
2310
|
const deltas = {
|
|
2040
|
-
ArrowUp:
|
|
2041
|
-
ArrowDown: -
|
|
2311
|
+
ArrowUp: step2,
|
|
2312
|
+
ArrowDown: -step2,
|
|
2042
2313
|
PageUp: largeStep,
|
|
2043
2314
|
PageDown: -largeStep
|
|
2044
2315
|
};
|
|
@@ -2055,7 +2326,7 @@ var NumberInput = /* @__PURE__ */ forwardRef21(
|
|
|
2055
2326
|
field3.onKeyDown(event);
|
|
2056
2327
|
}
|
|
2057
2328
|
};
|
|
2058
|
-
const stepper2 = (direction) => /* @__PURE__ */
|
|
2329
|
+
const stepper2 = (direction) => /* @__PURE__ */ jsx27(
|
|
2059
2330
|
IconButton,
|
|
2060
2331
|
{
|
|
2061
2332
|
size: "sm",
|
|
@@ -2064,13 +2335,13 @@ var NumberInput = /* @__PURE__ */ forwardRef21(
|
|
|
2064
2335
|
tabIndex: -1,
|
|
2065
2336
|
disabled: direction < 0 ? !canDecrement : !canIncrement,
|
|
2066
2337
|
onMouseDown: (event) => event.preventDefault(),
|
|
2067
|
-
onClick: () => stepBy(direction *
|
|
2338
|
+
onClick: () => stepBy(direction * step2),
|
|
2068
2339
|
className: stepper({ size }),
|
|
2069
|
-
children: direction < 0 ? /* @__PURE__ */
|
|
2340
|
+
children: direction < 0 ? /* @__PURE__ */ jsx27(MinusIcon2, {}) : /* @__PURE__ */ jsx27(PlusIcon, {})
|
|
2070
2341
|
}
|
|
2071
2342
|
);
|
|
2072
|
-
return /* @__PURE__ */
|
|
2073
|
-
/* @__PURE__ */
|
|
2343
|
+
return /* @__PURE__ */ jsxs22(Fragment5, { children: [
|
|
2344
|
+
/* @__PURE__ */ jsx27(
|
|
2074
2345
|
TextField,
|
|
2075
2346
|
{
|
|
2076
2347
|
ref: mergeRefs(ref, inputRef),
|
|
@@ -2094,22 +2365,22 @@ var NumberInput = /* @__PURE__ */ forwardRef21(
|
|
|
2094
2365
|
disabled,
|
|
2095
2366
|
readOnly,
|
|
2096
2367
|
startAdornment: hideStepper ? void 0 : stepper2(-1),
|
|
2097
|
-
endAdornment: unit2 || !hideStepper ? /* @__PURE__ */
|
|
2098
|
-
unit2 && /* @__PURE__ */
|
|
2368
|
+
endAdornment: unit2 || !hideStepper ? /* @__PURE__ */ jsxs22("span", { className: end, children: [
|
|
2369
|
+
unit2 && /* @__PURE__ */ jsx27("span", { className: unit, children: unit2 }),
|
|
2099
2370
|
!hideStepper && stepper2(1)
|
|
2100
2371
|
] }) : void 0,
|
|
2101
2372
|
className: cx(input4, className),
|
|
2102
2373
|
...rest
|
|
2103
2374
|
}
|
|
2104
2375
|
),
|
|
2105
|
-
name && /* @__PURE__ */
|
|
2376
|
+
name && /* @__PURE__ */ jsx27("input", { type: "hidden", name, value: current2 === null ? "" : String(current2) })
|
|
2106
2377
|
] });
|
|
2107
2378
|
}
|
|
2108
2379
|
);
|
|
2109
2380
|
|
|
2110
2381
|
// src/components/Pagination/Pagination.tsx
|
|
2111
2382
|
import { ChevronLeftIcon as ChevronLeftIcon2, ChevronRightIcon as ChevronRightIcon4 } from "@bestow-ui/icons";
|
|
2112
|
-
import { forwardRef as
|
|
2383
|
+
import { forwardRef as forwardRef24, useState as useState9 } from "react";
|
|
2113
2384
|
|
|
2114
2385
|
// src/components/Pagination/getPaginationItems.ts
|
|
2115
2386
|
var range = (start, end2) => end2 < start ? [] : Array.from({ length: end2 - start + 1 }, (_, i) => start + i);
|
|
@@ -2138,12 +2409,12 @@ function getPaginationItems(page, totalPages, siblingCount = 1, boundaryCount =
|
|
|
2138
2409
|
// src/components/Pagination/Pagination.css.ts
|
|
2139
2410
|
import { createRuntimeFn as _7a46812 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
2140
2411
|
var ellipsis = "_1iraoak4";
|
|
2141
|
-
var
|
|
2142
|
-
var
|
|
2412
|
+
var item7 = /* @__PURE__ */ _7a46812({ defaultClassName: "_1iraoak1", variantClassNames: { size: { sm: "_1iraoak2", md: "_1iraoak3" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
2413
|
+
var list5 = "_1iraoak0";
|
|
2143
2414
|
|
|
2144
2415
|
// src/components/Pagination/Pagination.tsx
|
|
2145
|
-
import { jsx as
|
|
2146
|
-
var Pagination = /* @__PURE__ */
|
|
2416
|
+
import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2417
|
+
var Pagination = /* @__PURE__ */ forwardRef24(function Pagination2({
|
|
2147
2418
|
totalPages,
|
|
2148
2419
|
page: pageProp,
|
|
2149
2420
|
defaultPage = 1,
|
|
@@ -2156,7 +2427,7 @@ var Pagination = /* @__PURE__ */ forwardRef22(function Pagination2({
|
|
|
2156
2427
|
"aria-label": ariaLabelProp,
|
|
2157
2428
|
...rest
|
|
2158
2429
|
}, ref) {
|
|
2159
|
-
const [uncontrolledPage, setUncontrolledPage] =
|
|
2430
|
+
const [uncontrolledPage, setUncontrolledPage] = useState9(defaultPage);
|
|
2160
2431
|
const m = useMessages();
|
|
2161
2432
|
const ariaLabel = ariaLabelProp ?? m.pagination ?? "\uD398\uC774\uC9C0 \uD0D0\uC0C9";
|
|
2162
2433
|
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`);
|
|
@@ -2167,9 +2438,9 @@ var Pagination = /* @__PURE__ */ forwardRef22(function Pagination2({
|
|
|
2167
2438
|
if (pageProp === void 0) setUncontrolledPage(next);
|
|
2168
2439
|
onPageChange?.(next);
|
|
2169
2440
|
};
|
|
2170
|
-
const itemClass =
|
|
2171
|
-
return /* @__PURE__ */
|
|
2172
|
-
/* @__PURE__ */
|
|
2441
|
+
const itemClass = item7({ size });
|
|
2442
|
+
return /* @__PURE__ */ jsx28("nav", { ref, "aria-label": ariaLabel, className, ...rest, children: /* @__PURE__ */ jsxs23("ul", { className: list5, children: [
|
|
2443
|
+
/* @__PURE__ */ jsx28("li", { children: /* @__PURE__ */ jsx28(
|
|
2173
2444
|
"button",
|
|
2174
2445
|
{
|
|
2175
2446
|
type: "button",
|
|
@@ -2177,23 +2448,23 @@ var Pagination = /* @__PURE__ */ forwardRef22(function Pagination2({
|
|
|
2177
2448
|
"aria-label": getItemLabel("previous", page - 1),
|
|
2178
2449
|
disabled: page <= 1,
|
|
2179
2450
|
onClick: () => goTo(page - 1),
|
|
2180
|
-
children: /* @__PURE__ */
|
|
2451
|
+
children: /* @__PURE__ */ jsx28(ChevronLeftIcon2, { size: 16 })
|
|
2181
2452
|
}
|
|
2182
2453
|
) }),
|
|
2183
2454
|
getPaginationItems(page, totalPages, siblingCount, boundaryCount).map(
|
|
2184
|
-
(
|
|
2455
|
+
(item9) => typeof item9 === "number" ? /* @__PURE__ */ jsx28("li", { children: /* @__PURE__ */ jsx28(
|
|
2185
2456
|
"button",
|
|
2186
2457
|
{
|
|
2187
2458
|
type: "button",
|
|
2188
2459
|
className: itemClass,
|
|
2189
|
-
"aria-label": getItemLabel("page",
|
|
2190
|
-
"aria-current":
|
|
2191
|
-
onClick: () => goTo(
|
|
2192
|
-
children:
|
|
2460
|
+
"aria-label": getItemLabel("page", item9),
|
|
2461
|
+
"aria-current": item9 === page ? "page" : void 0,
|
|
2462
|
+
onClick: () => goTo(item9),
|
|
2463
|
+
children: item9
|
|
2193
2464
|
}
|
|
2194
|
-
) },
|
|
2465
|
+
) }, item9) : /* @__PURE__ */ jsx28("li", { "aria-hidden": true, className: cx(itemClass, ellipsis), children: "\u2026" }, item9)
|
|
2195
2466
|
),
|
|
2196
|
-
/* @__PURE__ */
|
|
2467
|
+
/* @__PURE__ */ jsx28("li", { children: /* @__PURE__ */ jsx28(
|
|
2197
2468
|
"button",
|
|
2198
2469
|
{
|
|
2199
2470
|
type: "button",
|
|
@@ -2201,21 +2472,21 @@ var Pagination = /* @__PURE__ */ forwardRef22(function Pagination2({
|
|
|
2201
2472
|
"aria-label": getItemLabel("next", page + 1),
|
|
2202
2473
|
disabled: page >= totalPages,
|
|
2203
2474
|
onClick: () => goTo(page + 1),
|
|
2204
|
-
children: /* @__PURE__ */
|
|
2475
|
+
children: /* @__PURE__ */ jsx28(ChevronRightIcon4, { size: 16 })
|
|
2205
2476
|
}
|
|
2206
2477
|
) })
|
|
2207
2478
|
] }) });
|
|
2208
2479
|
});
|
|
2209
2480
|
|
|
2210
2481
|
// src/components/PhoneNumberInput/PhoneNumberInput.tsx
|
|
2211
|
-
import { forwardRef as
|
|
2212
|
-
import { jsx as
|
|
2482
|
+
import { forwardRef as forwardRef25, useRef as useRef13 } from "react";
|
|
2483
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
2213
2484
|
var sanitize3 = (input6) => {
|
|
2214
2485
|
const digits = input6.replace(/\D/g, "");
|
|
2215
2486
|
return digits.slice(0, phoneNumberMaxDigits(digits));
|
|
2216
2487
|
};
|
|
2217
2488
|
var isDigit4 = (char) => /\d/.test(char);
|
|
2218
|
-
var PhoneNumberInput = /* @__PURE__ */
|
|
2489
|
+
var PhoneNumberInput = /* @__PURE__ */ forwardRef25(
|
|
2219
2490
|
function PhoneNumberInput2(props, ref) {
|
|
2220
2491
|
const {
|
|
2221
2492
|
value: value3,
|
|
@@ -2226,9 +2497,9 @@ var PhoneNumberInput = /* @__PURE__ */ forwardRef23(
|
|
|
2226
2497
|
onKeyDown,
|
|
2227
2498
|
...rest
|
|
2228
2499
|
} = props;
|
|
2229
|
-
const inputRef =
|
|
2500
|
+
const inputRef = useRef13(null);
|
|
2230
2501
|
const m = useMessages();
|
|
2231
|
-
const
|
|
2502
|
+
const label6 = labelProp ?? m.phoneNumber ?? "\uD734\uB300\uD3F0 \uBC88\uD638";
|
|
2232
2503
|
const field3 = useFormattedInput({
|
|
2233
2504
|
isControlled: "value" in props,
|
|
2234
2505
|
value: value3,
|
|
@@ -2239,11 +2510,11 @@ var PhoneNumberInput = /* @__PURE__ */ forwardRef23(
|
|
|
2239
2510
|
isMeaningful: isDigit4,
|
|
2240
2511
|
inputRef
|
|
2241
2512
|
});
|
|
2242
|
-
return /* @__PURE__ */
|
|
2513
|
+
return /* @__PURE__ */ jsx29(
|
|
2243
2514
|
TextField,
|
|
2244
2515
|
{
|
|
2245
2516
|
ref: mergeRefs(ref, inputRef),
|
|
2246
|
-
label:
|
|
2517
|
+
label: label6,
|
|
2247
2518
|
placeholder,
|
|
2248
2519
|
type: "tel",
|
|
2249
2520
|
inputMode: "tel",
|
|
@@ -2261,7 +2532,7 @@ var PhoneNumberInput = /* @__PURE__ */ forwardRef23(
|
|
|
2261
2532
|
);
|
|
2262
2533
|
|
|
2263
2534
|
// src/components/RadioGroup/RadioGroup.tsx
|
|
2264
|
-
import { forwardRef as
|
|
2535
|
+
import { forwardRef as forwardRef26, useId as useId10, useState as useState10 } from "react";
|
|
2265
2536
|
|
|
2266
2537
|
// src/components/RadioGroup/RadioGroup.css.ts
|
|
2267
2538
|
import { createRuntimeFn as _7a46813 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
@@ -2274,14 +2545,14 @@ var radio = /* @__PURE__ */ _7a46813({ defaultClassName: "_1w9iwjm7", variantCla
|
|
|
2274
2545
|
var text = "_1w9iwjma";
|
|
2275
2546
|
|
|
2276
2547
|
// src/components/RadioGroup/RadioGroup.tsx
|
|
2277
|
-
import { jsx as
|
|
2278
|
-
var RadioGroup2 = /* @__PURE__ */
|
|
2548
|
+
import { jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2549
|
+
var RadioGroup2 = /* @__PURE__ */ forwardRef26(function RadioGroup3(props, ref) {
|
|
2279
2550
|
const {
|
|
2280
2551
|
options,
|
|
2281
2552
|
value: value3,
|
|
2282
2553
|
defaultValue,
|
|
2283
2554
|
onValueChange,
|
|
2284
|
-
label:
|
|
2555
|
+
label: label6,
|
|
2285
2556
|
helperText: helperText3,
|
|
2286
2557
|
error,
|
|
2287
2558
|
orientation = "vertical",
|
|
@@ -2294,11 +2565,11 @@ var RadioGroup2 = /* @__PURE__ */ forwardRef24(function RadioGroup3(props, ref)
|
|
|
2294
2565
|
className
|
|
2295
2566
|
} = props;
|
|
2296
2567
|
const isControlled = "value" in props;
|
|
2297
|
-
const [innerValue, setInnerValue] =
|
|
2568
|
+
const [innerValue, setInnerValue] = useState10(defaultValue ?? "");
|
|
2298
2569
|
const current2 = isControlled ? value3 ?? "" : innerValue;
|
|
2299
|
-
const generatedId =
|
|
2570
|
+
const generatedId = useId10();
|
|
2300
2571
|
const baseId = id ?? generatedId;
|
|
2301
|
-
const labelId =
|
|
2572
|
+
const labelId = label6 ? `${baseId}-label` : void 0;
|
|
2302
2573
|
const helperId = helperText3 ? `${baseId}-helper` : void 0;
|
|
2303
2574
|
const groupName = name ?? `${baseId}-radio`;
|
|
2304
2575
|
const detachedForm = name ? void 0 : `${baseId}-no-form`;
|
|
@@ -2307,12 +2578,12 @@ var RadioGroup2 = /* @__PURE__ */ forwardRef24(function RadioGroup3(props, ref)
|
|
|
2307
2578
|
if (!isControlled) setInnerValue(next);
|
|
2308
2579
|
onValueChange?.(next);
|
|
2309
2580
|
};
|
|
2310
|
-
return /* @__PURE__ */
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
required && /* @__PURE__ */
|
|
2581
|
+
return /* @__PURE__ */ jsxs24("div", { className: cx(field, className), children: [
|
|
2582
|
+
label6 && /* @__PURE__ */ jsxs24("span", { id: labelId, className: cx(label, groupLabel), children: [
|
|
2583
|
+
label6,
|
|
2584
|
+
required && /* @__PURE__ */ jsx30("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
2314
2585
|
] }),
|
|
2315
|
-
/* @__PURE__ */
|
|
2586
|
+
/* @__PURE__ */ jsx30(
|
|
2316
2587
|
"div",
|
|
2317
2588
|
{
|
|
2318
2589
|
ref,
|
|
@@ -2330,8 +2601,8 @@ var RadioGroup2 = /* @__PURE__ */ forwardRef24(function RadioGroup3(props, ref)
|
|
|
2330
2601
|
const descriptionId = option2.description ? `${itemId}-description` : void 0;
|
|
2331
2602
|
const itemDisabled = disabled || option2.disabled;
|
|
2332
2603
|
const checked = option2.value === current2;
|
|
2333
|
-
return /* @__PURE__ */
|
|
2334
|
-
/* @__PURE__ */
|
|
2604
|
+
return /* @__PURE__ */ jsxs24("div", { className: option({ size }), "data-disabled": itemDisabled || void 0, children: [
|
|
2605
|
+
/* @__PURE__ */ jsx30(
|
|
2335
2606
|
"input",
|
|
2336
2607
|
{
|
|
2337
2608
|
type: "radio",
|
|
@@ -2348,38 +2619,38 @@ var RadioGroup2 = /* @__PURE__ */ forwardRef24(function RadioGroup3(props, ref)
|
|
|
2348
2619
|
className: radio({ size })
|
|
2349
2620
|
}
|
|
2350
2621
|
),
|
|
2351
|
-
/* @__PURE__ */
|
|
2352
|
-
/* @__PURE__ */
|
|
2353
|
-
option2.description && /* @__PURE__ */
|
|
2622
|
+
/* @__PURE__ */ jsxs24("span", { className: text, children: [
|
|
2623
|
+
/* @__PURE__ */ jsx30("label", { htmlFor: itemId, className: labelText, children: option2.label }),
|
|
2624
|
+
option2.description && /* @__PURE__ */ jsx30("span", { id: descriptionId, className: description4, children: option2.description })
|
|
2354
2625
|
] })
|
|
2355
2626
|
] }, option2.value);
|
|
2356
2627
|
})
|
|
2357
2628
|
}
|
|
2358
2629
|
),
|
|
2359
|
-
helperText3 && /* @__PURE__ */
|
|
2630
|
+
helperText3 && /* @__PURE__ */ jsx30("p", { id: helperId, className: helperText({ error }), children: helperText3 })
|
|
2360
2631
|
] });
|
|
2361
2632
|
});
|
|
2362
2633
|
|
|
2363
2634
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
2364
|
-
import { forwardRef as
|
|
2635
|
+
import { forwardRef as forwardRef27, useId as useId11, useRef as useRef14, useState as useState11 } from "react";
|
|
2365
2636
|
|
|
2366
2637
|
// src/components/SegmentedControl/SegmentedControl.css.ts
|
|
2367
2638
|
import { createRuntimeFn as _7a46814 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
2368
2639
|
var icon5 = "_1h65mmo7";
|
|
2369
|
-
var
|
|
2370
|
-
var
|
|
2640
|
+
var item8 = /* @__PURE__ */ _7a46814({ defaultClassName: "_1h65mmo2", variantClassNames: { size: { sm: "_1h65mmo3", md: "_1h65mmo4", lg: "_1h65mmo5" }, fullWidth: { true: "_1h65mmo6" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
2641
|
+
var root9 = /* @__PURE__ */ _7a46814({ defaultClassName: "_1h65mmo0", variantClassNames: { fullWidth: { true: "_1h65mmo1" } }, defaultVariants: {}, compoundVariants: [] });
|
|
2371
2642
|
|
|
2372
2643
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
2373
|
-
import { jsx as
|
|
2644
|
+
import { jsx as jsx31, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2374
2645
|
var NEXT_KEYS = { ArrowRight: 1, ArrowDown: 1, ArrowLeft: -1, ArrowUp: -1 };
|
|
2375
|
-
var SegmentedControl = /* @__PURE__ */
|
|
2646
|
+
var SegmentedControl = /* @__PURE__ */ forwardRef27(
|
|
2376
2647
|
function SegmentedControl2(props, ref) {
|
|
2377
2648
|
const {
|
|
2378
2649
|
options,
|
|
2379
2650
|
value: value3,
|
|
2380
2651
|
defaultValue,
|
|
2381
2652
|
onValueChange,
|
|
2382
|
-
label:
|
|
2653
|
+
label: label6,
|
|
2383
2654
|
"aria-label": ariaLabel,
|
|
2384
2655
|
size,
|
|
2385
2656
|
fullWidth,
|
|
@@ -2389,11 +2660,11 @@ var SegmentedControl = /* @__PURE__ */ forwardRef25(
|
|
|
2389
2660
|
className
|
|
2390
2661
|
} = props;
|
|
2391
2662
|
const isControlled = "value" in props;
|
|
2392
|
-
const [innerValue, setInnerValue] =
|
|
2663
|
+
const [innerValue, setInnerValue] = useState11(defaultValue ?? "");
|
|
2393
2664
|
const current2 = isControlled ? value3 ?? "" : innerValue;
|
|
2394
|
-
const generatedId =
|
|
2395
|
-
const labelId =
|
|
2396
|
-
const itemRefs =
|
|
2665
|
+
const generatedId = useId11();
|
|
2666
|
+
const labelId = label6 ? `${id ?? generatedId}-label` : void 0;
|
|
2667
|
+
const itemRefs = useRef14([]);
|
|
2397
2668
|
const isEnabled = (index) => !disabled && !options[index]?.disabled;
|
|
2398
2669
|
const select = (index) => {
|
|
2399
2670
|
const next = options[index].value;
|
|
@@ -2405,10 +2676,10 @@ var SegmentedControl = /* @__PURE__ */ forwardRef25(
|
|
|
2405
2676
|
const tabStop = checkedIndex >= 0 && isEnabled(checkedIndex) ? checkedIndex : options.findIndex((_, i) => isEnabled(i));
|
|
2406
2677
|
const handleKeyDown = (event, index) => {
|
|
2407
2678
|
let target = -1;
|
|
2408
|
-
const
|
|
2409
|
-
if (
|
|
2679
|
+
const step2 = NEXT_KEYS[event.key];
|
|
2680
|
+
if (step2) {
|
|
2410
2681
|
for (let i = 1; i <= options.length; i++) {
|
|
2411
|
-
const candidate = (index +
|
|
2682
|
+
const candidate = (index + step2 * i + options.length) % options.length;
|
|
2412
2683
|
if (isEnabled(candidate)) {
|
|
2413
2684
|
target = candidate;
|
|
2414
2685
|
break;
|
|
@@ -2424,20 +2695,20 @@ var SegmentedControl = /* @__PURE__ */ forwardRef25(
|
|
|
2424
2695
|
itemRefs.current[target]?.focus();
|
|
2425
2696
|
select(target);
|
|
2426
2697
|
};
|
|
2427
|
-
const group = /* @__PURE__ */
|
|
2698
|
+
const group = /* @__PURE__ */ jsxs25(
|
|
2428
2699
|
"div",
|
|
2429
2700
|
{
|
|
2430
2701
|
ref,
|
|
2431
2702
|
id,
|
|
2432
2703
|
role: "radiogroup",
|
|
2433
2704
|
"aria-labelledby": labelId,
|
|
2434
|
-
"aria-label":
|
|
2705
|
+
"aria-label": label6 ? void 0 : ariaLabel,
|
|
2435
2706
|
"aria-disabled": disabled || void 0,
|
|
2436
|
-
className: cx(
|
|
2707
|
+
className: cx(root9({ fullWidth }), !label6 && className),
|
|
2437
2708
|
children: [
|
|
2438
2709
|
options.map((option2, index) => {
|
|
2439
2710
|
const checked = index === checkedIndex;
|
|
2440
|
-
return /* @__PURE__ */
|
|
2711
|
+
return /* @__PURE__ */ jsxs25(
|
|
2441
2712
|
"button",
|
|
2442
2713
|
{
|
|
2443
2714
|
ref: (node) => {
|
|
@@ -2450,24 +2721,24 @@ var SegmentedControl = /* @__PURE__ */ forwardRef25(
|
|
|
2450
2721
|
disabled: !isEnabled(index),
|
|
2451
2722
|
"data-state": checked ? "checked" : "unchecked",
|
|
2452
2723
|
"data-disabled": isEnabled(index) ? void 0 : "",
|
|
2453
|
-
className:
|
|
2724
|
+
className: item8({ size, fullWidth }),
|
|
2454
2725
|
onClick: () => select(index),
|
|
2455
2726
|
onKeyDown: (event) => handleKeyDown(event, index),
|
|
2456
2727
|
children: [
|
|
2457
|
-
option2.icon && /* @__PURE__ */
|
|
2728
|
+
option2.icon && /* @__PURE__ */ jsx31("span", { "aria-hidden": true, className: icon5, children: option2.icon }),
|
|
2458
2729
|
option2.label
|
|
2459
2730
|
]
|
|
2460
2731
|
},
|
|
2461
2732
|
option2.value
|
|
2462
2733
|
);
|
|
2463
2734
|
}),
|
|
2464
|
-
name && /* @__PURE__ */
|
|
2735
|
+
name && /* @__PURE__ */ jsx31("input", { type: "hidden", name, value: current2 })
|
|
2465
2736
|
]
|
|
2466
2737
|
}
|
|
2467
2738
|
);
|
|
2468
|
-
if (!
|
|
2469
|
-
return /* @__PURE__ */
|
|
2470
|
-
/* @__PURE__ */
|
|
2739
|
+
if (!label6) return group;
|
|
2740
|
+
return /* @__PURE__ */ jsxs25("div", { className: cx(field, className), children: [
|
|
2741
|
+
/* @__PURE__ */ jsx31("span", { id: labelId, className: label, children: label6 }),
|
|
2471
2742
|
group
|
|
2472
2743
|
] });
|
|
2473
2744
|
}
|
|
@@ -2475,17 +2746,17 @@ var SegmentedControl = /* @__PURE__ */ forwardRef25(
|
|
|
2475
2746
|
|
|
2476
2747
|
// src/components/Select/Select.tsx
|
|
2477
2748
|
import * as RadixSelect from "@radix-ui/react-select";
|
|
2478
|
-
import { forwardRef as
|
|
2749
|
+
import { forwardRef as forwardRef28, useId as useId12 } from "react";
|
|
2479
2750
|
import { CheckIcon as CheckIcon3, ChevronDownIcon as ChevronDownIcon4 } from "@bestow-ui/icons";
|
|
2480
|
-
import { jsx as
|
|
2481
|
-
var Select = /* @__PURE__ */
|
|
2751
|
+
import { jsx as jsx32, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2752
|
+
var Select = /* @__PURE__ */ forwardRef28(function Select2(props, ref) {
|
|
2482
2753
|
const {
|
|
2483
2754
|
options,
|
|
2484
2755
|
value: value3,
|
|
2485
2756
|
defaultValue,
|
|
2486
2757
|
onValueChange,
|
|
2487
2758
|
placeholder,
|
|
2488
|
-
label:
|
|
2759
|
+
label: label6,
|
|
2489
2760
|
helperText: helperText3,
|
|
2490
2761
|
error,
|
|
2491
2762
|
size,
|
|
@@ -2498,16 +2769,16 @@ var Select = /* @__PURE__ */ forwardRef26(function Select2(props, ref) {
|
|
|
2498
2769
|
className
|
|
2499
2770
|
} = props;
|
|
2500
2771
|
const isControlled = "value" in props;
|
|
2501
|
-
const generatedId =
|
|
2772
|
+
const generatedId = useId12();
|
|
2502
2773
|
const triggerId = id ?? generatedId;
|
|
2503
2774
|
const helperId = helperText3 ? `${triggerId}-helper` : void 0;
|
|
2504
2775
|
const portal2 = usePortalProps();
|
|
2505
|
-
return /* @__PURE__ */
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
required && /* @__PURE__ */
|
|
2776
|
+
return /* @__PURE__ */ jsxs26("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
|
|
2777
|
+
label6 && /* @__PURE__ */ jsxs26("label", { htmlFor: triggerId, className: label, children: [
|
|
2778
|
+
label6,
|
|
2779
|
+
required && /* @__PURE__ */ jsx32("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
2509
2780
|
] }),
|
|
2510
|
-
/* @__PURE__ */
|
|
2781
|
+
/* @__PURE__ */ jsxs26(
|
|
2511
2782
|
RadixSelect.Root,
|
|
2512
2783
|
{
|
|
2513
2784
|
value: isControlled ? value3 ?? "" : void 0,
|
|
@@ -2517,7 +2788,7 @@ var Select = /* @__PURE__ */ forwardRef26(function Select2(props, ref) {
|
|
|
2517
2788
|
required,
|
|
2518
2789
|
name,
|
|
2519
2790
|
children: [
|
|
2520
|
-
/* @__PURE__ */
|
|
2791
|
+
/* @__PURE__ */ jsxs26(
|
|
2521
2792
|
RadixSelect.Trigger,
|
|
2522
2793
|
{
|
|
2523
2794
|
ref,
|
|
@@ -2528,12 +2799,12 @@ var Select = /* @__PURE__ */ forwardRef26(function Select2(props, ref) {
|
|
|
2528
2799
|
"data-invalid": error || void 0,
|
|
2529
2800
|
className: cx(root3({ size, fullWidth }), trigger2, className),
|
|
2530
2801
|
children: [
|
|
2531
|
-
/* @__PURE__ */
|
|
2532
|
-
/* @__PURE__ */
|
|
2802
|
+
/* @__PURE__ */ jsx32("span", { className: value, children: /* @__PURE__ */ jsx32(RadixSelect.Value, { placeholder }) }),
|
|
2803
|
+
/* @__PURE__ */ jsx32(RadixSelect.Icon, { className: icon3, children: /* @__PURE__ */ jsx32(ChevronDownIcon4, { size: 16 }) })
|
|
2533
2804
|
]
|
|
2534
2805
|
}
|
|
2535
2806
|
),
|
|
2536
|
-
/* @__PURE__ */
|
|
2807
|
+
/* @__PURE__ */ jsx32(RadixSelect.Portal, { children: /* @__PURE__ */ jsx32(
|
|
2537
2808
|
RadixSelect.Content,
|
|
2538
2809
|
{
|
|
2539
2810
|
position: "popper",
|
|
@@ -2541,15 +2812,15 @@ var Select = /* @__PURE__ */ forwardRef26(function Select2(props, ref) {
|
|
|
2541
2812
|
collisionPadding: 8,
|
|
2542
2813
|
className: cx(portal2.className, content5),
|
|
2543
2814
|
style: portal2.style,
|
|
2544
|
-
children: /* @__PURE__ */
|
|
2815
|
+
children: /* @__PURE__ */ jsx32(RadixSelect.Viewport, { className: viewport, children: options.map((option2) => /* @__PURE__ */ jsxs26(
|
|
2545
2816
|
RadixSelect.Item,
|
|
2546
2817
|
{
|
|
2547
2818
|
value: option2.value,
|
|
2548
2819
|
disabled: option2.disabled,
|
|
2549
2820
|
className: item4,
|
|
2550
2821
|
children: [
|
|
2551
|
-
/* @__PURE__ */
|
|
2552
|
-
/* @__PURE__ */
|
|
2822
|
+
/* @__PURE__ */ jsx32(RadixSelect.ItemText, { children: option2.label }),
|
|
2823
|
+
/* @__PURE__ */ jsx32(RadixSelect.ItemIndicator, { className: itemIndicator, children: /* @__PURE__ */ jsx32(CheckIcon3, { size: 16 }) })
|
|
2553
2824
|
]
|
|
2554
2825
|
},
|
|
2555
2826
|
option2.value
|
|
@@ -2559,19 +2830,19 @@ var Select = /* @__PURE__ */ forwardRef26(function Select2(props, ref) {
|
|
|
2559
2830
|
]
|
|
2560
2831
|
}
|
|
2561
2832
|
),
|
|
2562
|
-
helperText3 && /* @__PURE__ */
|
|
2833
|
+
helperText3 && /* @__PURE__ */ jsx32("p", { id: helperId, className: helperText({ error }), children: helperText3 })
|
|
2563
2834
|
] });
|
|
2564
2835
|
});
|
|
2565
2836
|
|
|
2566
2837
|
// src/components/SkipLink/SkipLink.tsx
|
|
2567
|
-
import { forwardRef as
|
|
2838
|
+
import { forwardRef as forwardRef29 } from "react";
|
|
2568
2839
|
|
|
2569
2840
|
// src/components/SkipLink/SkipLink.css.ts
|
|
2570
2841
|
var skipLink = "_1t9jaar0";
|
|
2571
2842
|
|
|
2572
2843
|
// src/components/SkipLink/SkipLink.tsx
|
|
2573
|
-
import { jsx as
|
|
2574
|
-
var SkipLink = /* @__PURE__ */
|
|
2844
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
2845
|
+
var SkipLink = /* @__PURE__ */ forwardRef29(function SkipLink2({ href = "#main", className, children, onClick, ...rest }, ref) {
|
|
2575
2846
|
const m = useMessages();
|
|
2576
2847
|
const handleClick = (event) => {
|
|
2577
2848
|
onClick?.(event);
|
|
@@ -2583,12 +2854,12 @@ var SkipLink = /* @__PURE__ */ forwardRef27(function SkipLink2({ href = "#main",
|
|
|
2583
2854
|
target.focus();
|
|
2584
2855
|
target.scrollIntoView?.({ block: "start" });
|
|
2585
2856
|
};
|
|
2586
|
-
return /* @__PURE__ */
|
|
2857
|
+
return /* @__PURE__ */ jsx33("a", { ref, href, className: cx(skipLink, className), onClick: handleClick, ...rest, children: children ?? m.skipToContent ?? "\uBCF8\uBB38 \uBC14\uB85C\uAC00\uAE30" });
|
|
2587
2858
|
});
|
|
2588
2859
|
|
|
2589
2860
|
// src/components/Slider/Slider.tsx
|
|
2590
2861
|
import * as RadixSlider from "@radix-ui/react-slider";
|
|
2591
|
-
import { forwardRef as
|
|
2862
|
+
import { forwardRef as forwardRef30, useId as useId13, useState as useState12 } from "react";
|
|
2592
2863
|
|
|
2593
2864
|
// src/components/Slider/Slider.css.ts
|
|
2594
2865
|
import { createRuntimeFn as _7a46815 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
@@ -2597,21 +2868,21 @@ var header6 = "_126mzjm1";
|
|
|
2597
2868
|
var helperText2 = "_126mzjm4";
|
|
2598
2869
|
var label3 = "_126mzjm2";
|
|
2599
2870
|
var range2 = "_126mzjmb";
|
|
2600
|
-
var
|
|
2871
|
+
var root10 = /* @__PURE__ */ _7a46815({ defaultClassName: "_126mzjm5", variantClassNames: { size: { sm: "_126mzjm6", md: "_126mzjm7" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
2601
2872
|
var thumb = /* @__PURE__ */ _7a46815({ defaultClassName: "_126mzjmc", variantClassNames: { size: { sm: "_126mzjmd", md: "_126mzjme" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
2602
2873
|
var track = /* @__PURE__ */ _7a46815({ defaultClassName: "_126mzjm8", variantClassNames: { size: { sm: "_126mzjm9", md: "_126mzjma" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
2603
2874
|
var value2 = "_126mzjm3";
|
|
2604
2875
|
|
|
2605
2876
|
// src/components/Slider/Slider.tsx
|
|
2606
|
-
import { jsx as
|
|
2607
|
-
var Slider = /* @__PURE__ */
|
|
2877
|
+
import { jsx as jsx34, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2878
|
+
var Slider = /* @__PURE__ */ forwardRef30(function Slider2(props, ref) {
|
|
2608
2879
|
const {
|
|
2609
2880
|
value: value3,
|
|
2610
2881
|
defaultValue,
|
|
2611
2882
|
onValueChange,
|
|
2612
2883
|
min = 0,
|
|
2613
2884
|
max = 100,
|
|
2614
|
-
label:
|
|
2885
|
+
label: label6,
|
|
2615
2886
|
"aria-label": ariaLabel,
|
|
2616
2887
|
helperText: helperText3,
|
|
2617
2888
|
showValue,
|
|
@@ -2625,12 +2896,12 @@ var Slider = /* @__PURE__ */ forwardRef28(function Slider2(props, ref) {
|
|
|
2625
2896
|
} = props;
|
|
2626
2897
|
const m = useMessages();
|
|
2627
2898
|
const thumbLabels = thumbLabelsProp ?? [m.rangeStart ?? "\uCD5C\uC18C", m.rangeEnd ?? "\uCD5C\uB300"];
|
|
2628
|
-
const generatedId =
|
|
2899
|
+
const generatedId = useId13();
|
|
2629
2900
|
const baseId = id ?? generatedId;
|
|
2630
2901
|
const labelId = `${baseId}-label`;
|
|
2631
2902
|
const helperId = `${baseId}-helper`;
|
|
2632
2903
|
const isControlled = "value" in props;
|
|
2633
|
-
const [innerValue, setInnerValue] =
|
|
2904
|
+
const [innerValue, setInnerValue] = useState12(defaultValue ?? [min]);
|
|
2634
2905
|
const current2 = isControlled ? value3 ?? [min] : innerValue;
|
|
2635
2906
|
const isRange = current2.length > 1;
|
|
2636
2907
|
const handleChange = (next) => {
|
|
@@ -2638,12 +2909,12 @@ var Slider = /* @__PURE__ */ forwardRef28(function Slider2(props, ref) {
|
|
|
2638
2909
|
onValueChange?.(next);
|
|
2639
2910
|
};
|
|
2640
2911
|
const valueText = current2.map(formatValue).join(" \u2013 ");
|
|
2641
|
-
return /* @__PURE__ */
|
|
2642
|
-
(
|
|
2643
|
-
|
|
2644
|
-
showValue && /* @__PURE__ */
|
|
2912
|
+
return /* @__PURE__ */ jsxs27("div", { className: cx(field2, className), children: [
|
|
2913
|
+
(label6 || showValue) && /* @__PURE__ */ jsxs27("div", { className: header6, children: [
|
|
2914
|
+
label6 && /* @__PURE__ */ jsx34("span", { id: labelId, className: label3, children: label6 }),
|
|
2915
|
+
showValue && /* @__PURE__ */ jsx34("span", { className: value2, "aria-hidden": true, children: valueText })
|
|
2645
2916
|
] }),
|
|
2646
|
-
/* @__PURE__ */
|
|
2917
|
+
/* @__PURE__ */ jsxs27(
|
|
2647
2918
|
RadixSlider.Root,
|
|
2648
2919
|
{
|
|
2649
2920
|
ref,
|
|
@@ -2653,18 +2924,18 @@ var Slider = /* @__PURE__ */ forwardRef28(function Slider2(props, ref) {
|
|
|
2653
2924
|
disabled,
|
|
2654
2925
|
value: current2,
|
|
2655
2926
|
onValueChange: handleChange,
|
|
2656
|
-
className:
|
|
2927
|
+
className: root10({ size }),
|
|
2657
2928
|
...rest,
|
|
2658
2929
|
children: [
|
|
2659
|
-
/* @__PURE__ */
|
|
2930
|
+
/* @__PURE__ */ jsx34(RadixSlider.Track, { className: track({ size }), children: /* @__PURE__ */ jsx34(RadixSlider.Range, { className: range2 }) }),
|
|
2660
2931
|
current2.map((thumbValue, index) => {
|
|
2661
2932
|
const thumbLabelId = `${baseId}-thumb-${index}`;
|
|
2662
|
-
return /* @__PURE__ */
|
|
2933
|
+
return /* @__PURE__ */ jsx34(
|
|
2663
2934
|
RadixSlider.Thumb,
|
|
2664
2935
|
{
|
|
2665
2936
|
className: thumb({ size }),
|
|
2666
|
-
"aria-labelledby":
|
|
2667
|
-
"aria-label":
|
|
2937
|
+
"aria-labelledby": label6 ? isRange ? `${labelId} ${thumbLabelId}` : labelId : isRange ? thumbLabelId : void 0,
|
|
2938
|
+
"aria-label": label6 ? void 0 : isRange ? void 0 : ariaLabel,
|
|
2668
2939
|
"aria-valuetext": formatValue(thumbValue),
|
|
2669
2940
|
"aria-describedby": helperText3 ? helperId : void 0
|
|
2670
2941
|
},
|
|
@@ -2674,32 +2945,86 @@ var Slider = /* @__PURE__ */ forwardRef28(function Slider2(props, ref) {
|
|
|
2674
2945
|
]
|
|
2675
2946
|
}
|
|
2676
2947
|
),
|
|
2677
|
-
isRange && current2.map((_, index) => /* @__PURE__ */
|
|
2678
|
-
|
|
2948
|
+
isRange && current2.map((_, index) => /* @__PURE__ */ jsxs27("span", { id: `${baseId}-thumb-${index}`, hidden: true, children: [
|
|
2949
|
+
label6 ? "" : ariaLabel ? `${ariaLabel} ` : "",
|
|
2679
2950
|
thumbLabels[index] ?? `${index + 1}`
|
|
2680
2951
|
] }, index)),
|
|
2681
|
-
helperText3 && /* @__PURE__ */
|
|
2952
|
+
helperText3 && /* @__PURE__ */ jsx34("span", { id: helperId, className: helperText2, children: helperText3 })
|
|
2682
2953
|
] });
|
|
2683
2954
|
});
|
|
2684
2955
|
|
|
2956
|
+
// src/components/Stepper/Stepper.tsx
|
|
2957
|
+
import { forwardRef as forwardRef31 } from "react";
|
|
2958
|
+
import { CheckIcon as CheckIcon4 } from "@bestow-ui/icons";
|
|
2959
|
+
|
|
2960
|
+
// src/components/Stepper/Stepper.css.ts
|
|
2961
|
+
import { createRuntimeFn as _7a46816 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
2962
|
+
var description5 = "kervhmh";
|
|
2963
|
+
var indicator2 = /* @__PURE__ */ _7a46816({ defaultClassName: "kervhm6", variantClassNames: { status: { complete: "kervhm7", current: "kervhm8", upcoming: "kervhm9" } }, defaultVariants: {}, compoundVariants: [] });
|
|
2964
|
+
var label4 = /* @__PURE__ */ _7a46816({ defaultClassName: "kervhmd", variantClassNames: { status: { complete: "kervhme", current: "kervhmf", upcoming: "kervhmg" } }, defaultVariants: {}, compoundVariants: [] });
|
|
2965
|
+
var root11 = /* @__PURE__ */ _7a46816({ defaultClassName: "kervhm0", variantClassNames: { orientation: { horizontal: "kervhm1", vertical: "kervhm2" } }, defaultVariants: { orientation: "horizontal" }, compoundVariants: [] });
|
|
2966
|
+
var step = /* @__PURE__ */ _7a46816({ defaultClassName: "kervhm3", variantClassNames: { orientation: { horizontal: "kervhm4", vertical: "kervhm5" } }, defaultVariants: { orientation: "horizontal" }, compoundVariants: [] });
|
|
2967
|
+
var text2 = /* @__PURE__ */ _7a46816({ defaultClassName: "kervhma", variantClassNames: { orientation: { horizontal: "kervhmb", vertical: "kervhmc" } }, defaultVariants: {}, compoundVariants: [] });
|
|
2968
|
+
|
|
2969
|
+
// src/components/Stepper/Stepper.tsx
|
|
2970
|
+
import { jsx as jsx35, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2971
|
+
var Stepper = /* @__PURE__ */ forwardRef31(function Stepper2({ steps, current: current2, orientation = "horizontal", "aria-label": ariaLabel, className, ...rest }, ref) {
|
|
2972
|
+
const m = useMessages();
|
|
2973
|
+
return /* @__PURE__ */ jsx35(
|
|
2974
|
+
"ol",
|
|
2975
|
+
{
|
|
2976
|
+
ref,
|
|
2977
|
+
"aria-label": ariaLabel ?? m.steps ?? "\uC9C4\uD589 \uB2E8\uACC4",
|
|
2978
|
+
className: cx(root11({ orientation }), className),
|
|
2979
|
+
...rest,
|
|
2980
|
+
children: steps.map((step2, index) => {
|
|
2981
|
+
const status = index < current2 ? "complete" : index === current2 ? "current" : "upcoming";
|
|
2982
|
+
return /* @__PURE__ */ jsxs28(
|
|
2983
|
+
"li",
|
|
2984
|
+
{
|
|
2985
|
+
className: step({ orientation }),
|
|
2986
|
+
"data-status": status,
|
|
2987
|
+
"aria-current": status === "current" ? "step" : void 0,
|
|
2988
|
+
children: [
|
|
2989
|
+
/* @__PURE__ */ jsx35("span", { className: indicator2({ status }), "aria-hidden": true, children: status === "complete" ? /* @__PURE__ */ jsx35(CheckIcon4, { size: 16, strokeWidth: 2.5 }) : index + 1 }),
|
|
2990
|
+
/* @__PURE__ */ jsxs28("span", { className: text2({ orientation }), children: [
|
|
2991
|
+
/* @__PURE__ */ jsxs28("span", { className: label4({ status }), children: [
|
|
2992
|
+
step2.label,
|
|
2993
|
+
status === "complete" && /* @__PURE__ */ jsxs28("span", { className: visuallyHidden, children: [
|
|
2994
|
+
" (",
|
|
2995
|
+
m.stepCompleted ?? "\uC644\uB8CC",
|
|
2996
|
+
")"
|
|
2997
|
+
] })
|
|
2998
|
+
] }),
|
|
2999
|
+
step2.description && /* @__PURE__ */ jsx35("span", { className: description5, children: step2.description })
|
|
3000
|
+
] })
|
|
3001
|
+
]
|
|
3002
|
+
},
|
|
3003
|
+
index
|
|
3004
|
+
);
|
|
3005
|
+
})
|
|
3006
|
+
}
|
|
3007
|
+
);
|
|
3008
|
+
});
|
|
3009
|
+
|
|
2685
3010
|
// src/components/Switch/Switch.tsx
|
|
2686
3011
|
import * as RadixSwitch from "@radix-ui/react-switch";
|
|
2687
|
-
import { forwardRef as
|
|
3012
|
+
import { forwardRef as forwardRef32, useId as useId14 } from "react";
|
|
2688
3013
|
|
|
2689
3014
|
// src/components/Switch/Switch.css.ts
|
|
2690
|
-
import { createRuntimeFn as
|
|
2691
|
-
var
|
|
2692
|
-
var
|
|
2693
|
-
var thumb2 = /* @__PURE__ */
|
|
2694
|
-
var track2 = /* @__PURE__ */
|
|
3015
|
+
import { createRuntimeFn as _7a46817 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3016
|
+
var label5 = "o33ul29";
|
|
3017
|
+
var root12 = /* @__PURE__ */ _7a46817({ defaultClassName: "o33ul20", variantClassNames: { size: { sm: "o33ul21", md: "o33ul22" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
3018
|
+
var thumb2 = /* @__PURE__ */ _7a46817({ defaultClassName: "o33ul26", variantClassNames: { size: { sm: "o33ul27", md: "o33ul28" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
3019
|
+
var track2 = /* @__PURE__ */ _7a46817({ defaultClassName: "o33ul23", variantClassNames: { size: { sm: "o33ul24", md: "o33ul25" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
2695
3020
|
|
|
2696
3021
|
// src/components/Switch/Switch.tsx
|
|
2697
|
-
import { jsx as
|
|
2698
|
-
var Switch = /* @__PURE__ */
|
|
2699
|
-
const generatedId =
|
|
3022
|
+
import { jsx as jsx36, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3023
|
+
var Switch = /* @__PURE__ */ forwardRef32(function Switch2({ label: label6, size, id, className, disabled, "aria-label": ariaLabel, ...rest }, ref) {
|
|
3024
|
+
const generatedId = useId14();
|
|
2700
3025
|
const switchId = id ?? generatedId;
|
|
2701
|
-
return /* @__PURE__ */
|
|
2702
|
-
/* @__PURE__ */
|
|
3026
|
+
return /* @__PURE__ */ jsxs29("span", { className: cx(root12({ size }), className), "data-disabled": disabled || void 0, children: [
|
|
3027
|
+
/* @__PURE__ */ jsx36(
|
|
2703
3028
|
RadixSwitch.Root,
|
|
2704
3029
|
{
|
|
2705
3030
|
ref,
|
|
@@ -2708,28 +3033,30 @@ var Switch = /* @__PURE__ */ forwardRef29(function Switch2({ label: label5, size
|
|
|
2708
3033
|
"aria-label": ariaLabel,
|
|
2709
3034
|
className: track2({ size }),
|
|
2710
3035
|
...rest,
|
|
2711
|
-
children: /* @__PURE__ */
|
|
3036
|
+
children: /* @__PURE__ */ jsx36(RadixSwitch.Thumb, { className: thumb2({ size }) })
|
|
2712
3037
|
}
|
|
2713
3038
|
),
|
|
2714
|
-
|
|
3039
|
+
label6 && /* @__PURE__ */ jsx36("label", { htmlFor: switchId, className: label5, children: label6 })
|
|
2715
3040
|
] });
|
|
2716
3041
|
});
|
|
2717
3042
|
|
|
2718
3043
|
// src/components/Table/Table.tsx
|
|
2719
3044
|
import {
|
|
2720
3045
|
createContext as createContext3,
|
|
2721
|
-
forwardRef as
|
|
3046
|
+
forwardRef as forwardRef33,
|
|
2722
3047
|
useContext as useContext3,
|
|
2723
|
-
useId as
|
|
3048
|
+
useId as useId15
|
|
2724
3049
|
} from "react";
|
|
2725
3050
|
import { ArrowDownIcon, ArrowUpIcon } from "@bestow-ui/icons";
|
|
2726
3051
|
|
|
2727
3052
|
// src/components/Table/Table.css.ts
|
|
2728
|
-
import { createRuntimeFn as
|
|
3053
|
+
import { createRuntimeFn as _7a46818 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
2729
3054
|
var body3 = "l3ploy5";
|
|
2730
3055
|
var caption = "l3ploy2";
|
|
2731
|
-
var cell2 = /* @__PURE__ */
|
|
3056
|
+
var cell2 = /* @__PURE__ */ _7a46818({ defaultClassName: "l3ploy9", variantClassNames: { size: { sm: "l3ploya", md: "l3ployb" }, align: { left: "l3ployc", center: "l3ployd", right: "l3ploye" } }, defaultVariants: { size: "md", align: "left" }, compoundVariants: [] });
|
|
2732
3057
|
var container = "l3ploy0";
|
|
3058
|
+
var emptyCell = "l3ployj";
|
|
3059
|
+
var emptyContent = "l3ployk";
|
|
2733
3060
|
var footer3 = "l3ploy7";
|
|
2734
3061
|
var footerCell = "l3ployg";
|
|
2735
3062
|
var head = "l3ployf";
|
|
@@ -2742,10 +3069,10 @@ var striped = "l3ploy6";
|
|
|
2742
3069
|
var table = "l3ploy1";
|
|
2743
3070
|
|
|
2744
3071
|
// src/components/Table/Table.tsx
|
|
2745
|
-
import { jsx as
|
|
3072
|
+
import { Fragment as Fragment6, jsx as jsx37, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
2746
3073
|
var TableSizeContext = /* @__PURE__ */ createContext3("md");
|
|
2747
3074
|
var TableSectionContext = /* @__PURE__ */ createContext3("body");
|
|
2748
|
-
var Table = /* @__PURE__ */
|
|
3075
|
+
var Table = /* @__PURE__ */ forwardRef33(function Table2({
|
|
2749
3076
|
size = "md",
|
|
2750
3077
|
striped: striped2,
|
|
2751
3078
|
stickyHeader: stickyHeader2,
|
|
@@ -2757,8 +3084,8 @@ var Table = /* @__PURE__ */ forwardRef30(function Table2({
|
|
|
2757
3084
|
children,
|
|
2758
3085
|
...rest
|
|
2759
3086
|
}, ref) {
|
|
2760
|
-
const captionId =
|
|
2761
|
-
return /* @__PURE__ */
|
|
3087
|
+
const captionId = useId15();
|
|
3088
|
+
return /* @__PURE__ */ jsx37(TableSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsx37(
|
|
2762
3089
|
"div",
|
|
2763
3090
|
{
|
|
2764
3091
|
className: cx(container, containerClassName),
|
|
@@ -2767,7 +3094,7 @@ var Table = /* @__PURE__ */ forwardRef30(function Table2({
|
|
|
2767
3094
|
role: "region",
|
|
2768
3095
|
"aria-labelledby": caption2 ? captionId : void 0,
|
|
2769
3096
|
"aria-label": caption2 ? void 0 : ariaLabel,
|
|
2770
|
-
children: /* @__PURE__ */
|
|
3097
|
+
children: /* @__PURE__ */ jsxs30(
|
|
2771
3098
|
"table",
|
|
2772
3099
|
{
|
|
2773
3100
|
ref,
|
|
@@ -2775,7 +3102,7 @@ var Table = /* @__PURE__ */ forwardRef30(function Table2({
|
|
|
2775
3102
|
"aria-label": caption2 ? void 0 : ariaLabel,
|
|
2776
3103
|
...rest,
|
|
2777
3104
|
children: [
|
|
2778
|
-
caption2 && /* @__PURE__ */
|
|
3105
|
+
caption2 && /* @__PURE__ */ jsx37("caption", { id: captionId, className: caption, children: caption2 }),
|
|
2779
3106
|
children
|
|
2780
3107
|
]
|
|
2781
3108
|
}
|
|
@@ -2783,31 +3110,31 @@ var Table = /* @__PURE__ */ forwardRef30(function Table2({
|
|
|
2783
3110
|
}
|
|
2784
3111
|
) });
|
|
2785
3112
|
});
|
|
2786
|
-
var TableHeader = /* @__PURE__ */
|
|
3113
|
+
var TableHeader = /* @__PURE__ */ forwardRef33(
|
|
2787
3114
|
function TableHeader2({ className, ...rest }, ref) {
|
|
2788
|
-
return /* @__PURE__ */
|
|
3115
|
+
return /* @__PURE__ */ jsx37(TableSectionContext.Provider, { value: "header", children: /* @__PURE__ */ jsx37("thead", { ref, className: cx(header7, className), ...rest }) });
|
|
2789
3116
|
}
|
|
2790
3117
|
);
|
|
2791
|
-
var TableBody = /* @__PURE__ */
|
|
3118
|
+
var TableBody = /* @__PURE__ */ forwardRef33(
|
|
2792
3119
|
function TableBody2({ className, ...rest }, ref) {
|
|
2793
|
-
return /* @__PURE__ */
|
|
3120
|
+
return /* @__PURE__ */ jsx37(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ jsx37("tbody", { ref, className: cx(body3, className), ...rest }) });
|
|
2794
3121
|
}
|
|
2795
3122
|
);
|
|
2796
|
-
var TableFooter = /* @__PURE__ */
|
|
3123
|
+
var TableFooter = /* @__PURE__ */ forwardRef33(
|
|
2797
3124
|
function TableFooter2({ className, ...rest }, ref) {
|
|
2798
|
-
return /* @__PURE__ */
|
|
3125
|
+
return /* @__PURE__ */ jsx37(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ jsx37("tfoot", { ref, className: cx(footer3, className), ...rest }) });
|
|
2799
3126
|
}
|
|
2800
3127
|
);
|
|
2801
|
-
var TableRow = /* @__PURE__ */
|
|
2802
|
-
return /* @__PURE__ */
|
|
3128
|
+
var TableRow = /* @__PURE__ */ forwardRef33(function TableRow2({ selected, className, ...rest }, ref) {
|
|
3129
|
+
return /* @__PURE__ */ jsx37("tr", { ref, className: cx(row3, className), "data-state": selected ? "selected" : void 0, ...rest });
|
|
2803
3130
|
});
|
|
2804
|
-
var TableHead = /* @__PURE__ */
|
|
3131
|
+
var TableHead = /* @__PURE__ */ forwardRef33(function TableHead2({ align, sortDirection, onSort, scope, className, children, ...rest }, ref) {
|
|
2805
3132
|
const size = useContext3(TableSizeContext);
|
|
2806
3133
|
const section = useContext3(TableSectionContext);
|
|
2807
3134
|
const sortable = onSort !== void 0;
|
|
2808
3135
|
const direction = sortDirection ?? "none";
|
|
2809
3136
|
const SortIcon = direction === "descending" ? ArrowDownIcon : ArrowUpIcon;
|
|
2810
|
-
return /* @__PURE__ */
|
|
3137
|
+
return /* @__PURE__ */ jsx37(
|
|
2811
3138
|
"th",
|
|
2812
3139
|
{
|
|
2813
3140
|
ref,
|
|
@@ -2819,17 +3146,17 @@ var TableHead = /* @__PURE__ */ forwardRef30(function TableHead2({ align, sortDi
|
|
|
2819
3146
|
className
|
|
2820
3147
|
),
|
|
2821
3148
|
...rest,
|
|
2822
|
-
children: sortable ? /* @__PURE__ */
|
|
3149
|
+
children: sortable ? /* @__PURE__ */ jsxs30("button", { type: "button", className: sortButton, onClick: onSort, children: [
|
|
2823
3150
|
children,
|
|
2824
|
-
/* @__PURE__ */
|
|
3151
|
+
/* @__PURE__ */ jsx37(SortIcon, { size: 14, className: sortIcon, "data-active": direction !== "none", "aria-hidden": true })
|
|
2825
3152
|
] }) : children
|
|
2826
3153
|
}
|
|
2827
3154
|
);
|
|
2828
3155
|
});
|
|
2829
|
-
var TableCell = /* @__PURE__ */
|
|
3156
|
+
var TableCell = /* @__PURE__ */ forwardRef33(function TableCell2({ align, className, ...rest }, ref) {
|
|
2830
3157
|
const size = useContext3(TableSizeContext);
|
|
2831
3158
|
const section = useContext3(TableSectionContext);
|
|
2832
|
-
return /* @__PURE__ */
|
|
3159
|
+
return /* @__PURE__ */ jsx37(
|
|
2833
3160
|
"td",
|
|
2834
3161
|
{
|
|
2835
3162
|
ref,
|
|
@@ -2838,58 +3165,95 @@ var TableCell = /* @__PURE__ */ forwardRef30(function TableCell2({ align, classN
|
|
|
2838
3165
|
}
|
|
2839
3166
|
);
|
|
2840
3167
|
});
|
|
3168
|
+
var TableEmpty = /* @__PURE__ */ forwardRef33(function TableEmpty2({ colSpan, className, children, ...rest }, ref) {
|
|
3169
|
+
return /* @__PURE__ */ jsx37(TableRow, { children: /* @__PURE__ */ jsx37(TableCell, { ref, colSpan, className: cx(emptyCell, className), ...rest, children: /* @__PURE__ */ jsx37("div", { className: emptyContent, children }) }) });
|
|
3170
|
+
});
|
|
3171
|
+
function TableSkeleton({ rows = 5, columns }) {
|
|
3172
|
+
return /* @__PURE__ */ jsx37(Fragment6, { children: Array.from({ length: rows }, (_, row5) => /* @__PURE__ */ jsx37(TableRow, { "aria-hidden": true, children: Array.from({ length: columns }, (_2, column) => /* @__PURE__ */ jsx37(TableCell, { children: /* @__PURE__ */ jsx37(Skeleton, { width: column === 0 ? "60%" : "80%" }) }, column)) }, row5)) });
|
|
3173
|
+
}
|
|
3174
|
+
|
|
3175
|
+
// src/components/Table/useTableSelection.ts
|
|
3176
|
+
import { useCallback, useState as useState13 } from "react";
|
|
3177
|
+
function useTableSelection(initial = []) {
|
|
3178
|
+
const [selected, setSelected] = useState13(initial);
|
|
3179
|
+
const isSelected = useCallback((id) => selected.includes(id), [selected]);
|
|
3180
|
+
const toggle3 = useCallback((id, checked) => {
|
|
3181
|
+
setSelected((prev) => {
|
|
3182
|
+
const on = checked ?? !prev.includes(id);
|
|
3183
|
+
if (on) return prev.includes(id) ? prev : [...prev, id];
|
|
3184
|
+
return prev.filter((value3) => value3 !== id);
|
|
3185
|
+
});
|
|
3186
|
+
}, []);
|
|
3187
|
+
const clear2 = useCallback(() => setSelected([]), []);
|
|
3188
|
+
const selectAllProps = (pageIds) => {
|
|
3189
|
+
const all2 = pageIds.length > 0 && pageIds.every((id) => selected.includes(id));
|
|
3190
|
+
const some = pageIds.some((id) => selected.includes(id));
|
|
3191
|
+
return {
|
|
3192
|
+
checked: all2,
|
|
3193
|
+
indeterminate: !all2 && some,
|
|
3194
|
+
onChange: () => setSelected(
|
|
3195
|
+
(prev) => all2 ? prev.filter((id) => !pageIds.includes(id)) : [...prev, ...pageIds.filter((id) => !prev.includes(id))]
|
|
3196
|
+
)
|
|
3197
|
+
};
|
|
3198
|
+
};
|
|
3199
|
+
const rowProps = (id) => ({
|
|
3200
|
+
checked: selected.includes(id),
|
|
3201
|
+
onChange: (event) => toggle3(id, event.target.checked)
|
|
3202
|
+
});
|
|
3203
|
+
return { selected, setSelected, isSelected, toggle: toggle3, clear: clear2, selectAllProps, rowProps };
|
|
3204
|
+
}
|
|
2841
3205
|
|
|
2842
3206
|
// src/components/Tabs/Tabs.tsx
|
|
2843
3207
|
import * as RadixTabs from "@radix-ui/react-tabs";
|
|
2844
|
-
import { createContext as createContext4, forwardRef as
|
|
3208
|
+
import { createContext as createContext4, forwardRef as forwardRef34, useContext as useContext4 } from "react";
|
|
2845
3209
|
|
|
2846
3210
|
// src/components/Tabs/Tabs.css.ts
|
|
2847
|
-
import { createRuntimeFn as
|
|
3211
|
+
import { createRuntimeFn as _7a46819 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
2848
3212
|
var content10 = "fvhbtdb";
|
|
2849
|
-
var
|
|
2850
|
-
var
|
|
2851
|
-
var trigger3 = /* @__PURE__ */
|
|
3213
|
+
var list6 = /* @__PURE__ */ _7a46819({ defaultClassName: "fvhbtd1", variantClassNames: { variant: { line: "fvhbtd2", soft: "fvhbtd3" } }, defaultVariants: { variant: "line" }, compoundVariants: [] });
|
|
3214
|
+
var root13 = "fvhbtd0";
|
|
3215
|
+
var trigger3 = /* @__PURE__ */ _7a46819({ defaultClassName: "fvhbtd4", variantClassNames: { variant: { line: "fvhbtd5", soft: "fvhbtd6" }, size: { sm: "fvhbtd7", md: "fvhbtd8" } }, defaultVariants: { variant: "line", size: "md" }, compoundVariants: [[{ variant: "soft", size: "sm" }, "fvhbtd9"], [{ variant: "soft", size: "md" }, "fvhbtda"]] });
|
|
2852
3216
|
|
|
2853
3217
|
// src/components/Tabs/Tabs.tsx
|
|
2854
|
-
import { jsx as
|
|
3218
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
2855
3219
|
var TabsStyleContext = /* @__PURE__ */ createContext4({ variant: "line", size: "md" });
|
|
2856
|
-
var Tabs = /* @__PURE__ */
|
|
3220
|
+
var Tabs = /* @__PURE__ */ forwardRef34(function Tabs2({ variant = "line", size = "md", className, ...props }, ref) {
|
|
2857
3221
|
const controlled = "value" in props ? { value: props.value ?? "" } : {};
|
|
2858
|
-
return /* @__PURE__ */
|
|
3222
|
+
return /* @__PURE__ */ jsx38(TabsStyleContext.Provider, { value: { variant, size }, children: /* @__PURE__ */ jsx38(RadixTabs.Root, { ref, className: cx(root13, className), ...props, ...controlled }) });
|
|
2859
3223
|
});
|
|
2860
|
-
var TabsList = /* @__PURE__ */
|
|
3224
|
+
var TabsList = /* @__PURE__ */ forwardRef34(function TabsList2({ className, ...rest }, ref) {
|
|
2861
3225
|
const { variant } = useContext4(TabsStyleContext);
|
|
2862
|
-
return /* @__PURE__ */
|
|
3226
|
+
return /* @__PURE__ */ jsx38(RadixTabs.List, { ref, className: cx(list6({ variant }), className), ...rest });
|
|
2863
3227
|
});
|
|
2864
|
-
var TabsTrigger = /* @__PURE__ */
|
|
3228
|
+
var TabsTrigger = /* @__PURE__ */ forwardRef34(function TabsTrigger2({ className, ...rest }, ref) {
|
|
2865
3229
|
const { variant, size } = useContext4(TabsStyleContext);
|
|
2866
|
-
return /* @__PURE__ */
|
|
3230
|
+
return /* @__PURE__ */ jsx38(RadixTabs.Trigger, { ref, className: cx(trigger3({ variant, size }), className), ...rest });
|
|
2867
3231
|
});
|
|
2868
|
-
var TabsContent = /* @__PURE__ */
|
|
2869
|
-
return /* @__PURE__ */
|
|
3232
|
+
var TabsContent = /* @__PURE__ */ forwardRef34(function TabsContent2({ className, ...rest }, ref) {
|
|
3233
|
+
return /* @__PURE__ */ jsx38(RadixTabs.Content, { ref, className: cx(content10, className), ...rest });
|
|
2870
3234
|
});
|
|
2871
3235
|
|
|
2872
3236
|
// src/components/Textarea/Textarea.tsx
|
|
2873
3237
|
import {
|
|
2874
|
-
forwardRef as
|
|
2875
|
-
useCallback,
|
|
2876
|
-
useId as
|
|
2877
|
-
useRef as
|
|
2878
|
-
useState as
|
|
3238
|
+
forwardRef as forwardRef35,
|
|
3239
|
+
useCallback as useCallback2,
|
|
3240
|
+
useId as useId16,
|
|
3241
|
+
useRef as useRef15,
|
|
3242
|
+
useState as useState14
|
|
2879
3243
|
} from "react";
|
|
2880
3244
|
|
|
2881
3245
|
// src/components/Textarea/Textarea.css.ts
|
|
2882
|
-
import { createRuntimeFn as
|
|
3246
|
+
import { createRuntimeFn as _7a46820 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
2883
3247
|
var count = "_1koawa9";
|
|
2884
3248
|
var countOver = "_1koawaa";
|
|
2885
3249
|
var defaultWidth = "_1koawa7";
|
|
2886
3250
|
var footer4 = "_1koawa8";
|
|
2887
|
-
var textarea = /* @__PURE__ */
|
|
3251
|
+
var textarea = /* @__PURE__ */ _7a46820({ defaultClassName: "_1koawa0", variantClassNames: { size: { sm: "_1koawa1", md: "_1koawa2", lg: "_1koawa3" }, resize: { none: "_1koawa4", vertical: "_1koawa5", both: "_1koawa6" } }, defaultVariants: { size: "md", resize: "vertical" }, compoundVariants: [] });
|
|
2888
3252
|
|
|
2889
3253
|
// src/components/Textarea/Textarea.tsx
|
|
2890
|
-
import { jsx as
|
|
2891
|
-
var Textarea = /* @__PURE__ */
|
|
2892
|
-
label:
|
|
3254
|
+
import { jsx as jsx39, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3255
|
+
var Textarea = /* @__PURE__ */ forwardRef35(function Textarea2({
|
|
3256
|
+
label: label6,
|
|
2893
3257
|
helperText: helperText3,
|
|
2894
3258
|
error,
|
|
2895
3259
|
size,
|
|
@@ -2909,13 +3273,13 @@ var Textarea = /* @__PURE__ */ forwardRef32(function Textarea2({
|
|
|
2909
3273
|
"aria-describedby": ariaDescribedBy,
|
|
2910
3274
|
...rest
|
|
2911
3275
|
}, ref) {
|
|
2912
|
-
const generatedId =
|
|
3276
|
+
const generatedId = useId16();
|
|
2913
3277
|
const textareaId = id ?? generatedId;
|
|
2914
3278
|
const helperId = helperText3 ? `${textareaId}-helper` : void 0;
|
|
2915
|
-
const innerRef =
|
|
2916
|
-
const [uncontrolledLength, setUncontrolledLength] =
|
|
3279
|
+
const innerRef = useRef15(null);
|
|
3280
|
+
const [uncontrolledLength, setUncontrolledLength] = useState14(() => String(defaultValue ?? "").length);
|
|
2917
3281
|
const length = value3 !== void 0 ? String(value3).length : uncontrolledLength;
|
|
2918
|
-
const fitHeight =
|
|
3282
|
+
const fitHeight = useCallback2(() => {
|
|
2919
3283
|
const el = innerRef.current;
|
|
2920
3284
|
if (!autoResize || !el) return;
|
|
2921
3285
|
el.style.height = "auto";
|
|
@@ -2928,12 +3292,12 @@ var Textarea = /* @__PURE__ */ forwardRef32(function Textarea2({
|
|
|
2928
3292
|
fitHeight();
|
|
2929
3293
|
onChange?.(event);
|
|
2930
3294
|
};
|
|
2931
|
-
return /* @__PURE__ */
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
required && /* @__PURE__ */
|
|
3295
|
+
return /* @__PURE__ */ jsxs31("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
|
|
3296
|
+
label6 && /* @__PURE__ */ jsxs31("label", { htmlFor: textareaId, className: label, children: [
|
|
3297
|
+
label6,
|
|
3298
|
+
required && /* @__PURE__ */ jsx39("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
2935
3299
|
] }),
|
|
2936
|
-
/* @__PURE__ */
|
|
3300
|
+
/* @__PURE__ */ jsx39(
|
|
2937
3301
|
"textarea",
|
|
2938
3302
|
{
|
|
2939
3303
|
ref: mergeRefs(innerRef, ref),
|
|
@@ -2955,51 +3319,51 @@ var Textarea = /* @__PURE__ */ forwardRef32(function Textarea2({
|
|
|
2955
3319
|
...rest
|
|
2956
3320
|
}
|
|
2957
3321
|
),
|
|
2958
|
-
(helperText3 || showCount) && /* @__PURE__ */
|
|
2959
|
-
helperText3 && /* @__PURE__ */
|
|
2960
|
-
showCount && /* @__PURE__ */
|
|
3322
|
+
(helperText3 || showCount) && /* @__PURE__ */ jsxs31("div", { className: footer4, children: [
|
|
3323
|
+
helperText3 && /* @__PURE__ */ jsx39("p", { id: helperId, className: helperText({ error }), children: helperText3 }),
|
|
3324
|
+
showCount && /* @__PURE__ */ jsx39("span", { className: cx(count, maxLength !== void 0 && length >= maxLength && countOver), children: maxLength !== void 0 ? `${length}/${maxLength}` : length })
|
|
2961
3325
|
] })
|
|
2962
3326
|
] });
|
|
2963
3327
|
});
|
|
2964
3328
|
|
|
2965
3329
|
// src/components/Toast/Toast.tsx
|
|
2966
3330
|
import * as RadixToast from "@radix-ui/react-toast";
|
|
2967
|
-
import { createContext as createContext5, useCallback as
|
|
2968
|
-
import { XIcon as
|
|
3331
|
+
import { createContext as createContext5, useCallback as useCallback3, useContext as useContext5, useMemo as useMemo4, useRef as useRef16, useState as useState15 } from "react";
|
|
3332
|
+
import { XIcon as XIcon7 } from "@bestow-ui/icons";
|
|
2969
3333
|
|
|
2970
3334
|
// src/components/Toast/Toast.css.ts
|
|
2971
|
-
import { createRuntimeFn as
|
|
3335
|
+
import { createRuntimeFn as _7a46821 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
2972
3336
|
var action2 = "_1g11zvx9";
|
|
2973
3337
|
var close = "_1g11zvxa";
|
|
2974
|
-
var
|
|
3338
|
+
var description6 = "_1g11zvx8";
|
|
2975
3339
|
var title5 = "_1g11zvx7";
|
|
2976
|
-
var toast = /* @__PURE__ */
|
|
3340
|
+
var toast = /* @__PURE__ */ _7a46821({ defaultClassName: "_1g11zvx1", variantClassNames: { color: { primary: "_1g11zvx2", neutral: "_1g11zvx3", success: "_1g11zvx4", warning: "_1g11zvx5", danger: "_1g11zvx6" } }, defaultVariants: { color: "neutral" }, compoundVariants: [] });
|
|
2977
3341
|
var viewport2 = "_1g11zvx0";
|
|
2978
3342
|
|
|
2979
3343
|
// src/components/Toast/Toast.tsx
|
|
2980
|
-
import { jsx as
|
|
3344
|
+
import { jsx as jsx40, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
2981
3345
|
var REMOVE_DELAY = 500;
|
|
2982
3346
|
var ToastContext = /* @__PURE__ */ createContext5(null);
|
|
2983
3347
|
function ToastProvider({ children, duration = 5e3, label: labelProp }) {
|
|
2984
3348
|
const m = useMessages();
|
|
2985
|
-
const
|
|
2986
|
-
const [toasts, setToasts] =
|
|
2987
|
-
const nextId =
|
|
3349
|
+
const label6 = labelProp ?? m.notifications ?? "\uC54C\uB9BC";
|
|
3350
|
+
const [toasts, setToasts] = useState15([]);
|
|
3351
|
+
const nextId = useRef16(0);
|
|
2988
3352
|
const portal2 = usePortalProps();
|
|
2989
|
-
const toast2 =
|
|
3353
|
+
const toast2 = useCallback3((options) => {
|
|
2990
3354
|
const id = nextId.current++;
|
|
2991
3355
|
setToasts((prev) => [...prev, { ...options, id, open: true }]);
|
|
2992
3356
|
return id;
|
|
2993
3357
|
}, []);
|
|
2994
|
-
const dismiss =
|
|
3358
|
+
const dismiss = useCallback3((id) => {
|
|
2995
3359
|
const isTarget = (t) => id === void 0 || t.id === id;
|
|
2996
3360
|
setToasts((prev) => prev.map((t) => isTarget(t) ? { ...t, open: false } : t));
|
|
2997
3361
|
setTimeout(() => setToasts((prev) => prev.filter((t) => t.open || !isTarget(t))), REMOVE_DELAY);
|
|
2998
3362
|
}, []);
|
|
2999
3363
|
const value3 = useMemo4(() => ({ toast: toast2, dismiss }), [toast2, dismiss]);
|
|
3000
|
-
return /* @__PURE__ */
|
|
3364
|
+
return /* @__PURE__ */ jsx40(ToastContext.Provider, { value: value3, children: /* @__PURE__ */ jsxs32(RadixToast.Provider, { duration, label: label6, swipeDirection: "right", children: [
|
|
3001
3365
|
children,
|
|
3002
|
-
toasts.map(({ id, open, title: title6, description:
|
|
3366
|
+
toasts.map(({ id, open, title: title6, description: description7, color, duration: itemDuration, action: action3 }) => /* @__PURE__ */ jsxs32(
|
|
3003
3367
|
RadixToast.Root,
|
|
3004
3368
|
{
|
|
3005
3369
|
open,
|
|
@@ -3009,15 +3373,15 @@ function ToastProvider({ children, duration = 5e3, label: labelProp }) {
|
|
|
3009
3373
|
},
|
|
3010
3374
|
className: toast({ color }),
|
|
3011
3375
|
children: [
|
|
3012
|
-
/* @__PURE__ */
|
|
3013
|
-
|
|
3014
|
-
action3 && /* @__PURE__ */
|
|
3015
|
-
/* @__PURE__ */
|
|
3376
|
+
/* @__PURE__ */ jsx40(RadixToast.Title, { className: title5, children: title6 }),
|
|
3377
|
+
description7 && /* @__PURE__ */ jsx40(RadixToast.Description, { className: description6, children: description7 }),
|
|
3378
|
+
action3 && /* @__PURE__ */ jsx40(RadixToast.Action, { asChild: true, altText: action3.altText ?? action3.label, className: action2, children: /* @__PURE__ */ jsx40(Button, { size: "sm", variant: "soft", color: "neutral", onClick: action3.onClick, children: action3.label }) }),
|
|
3379
|
+
/* @__PURE__ */ jsx40(RadixToast.Close, { className: close, "aria-label": m.close ?? "\uB2EB\uAE30", children: /* @__PURE__ */ jsx40(XIcon7, { size: 16 }) })
|
|
3016
3380
|
]
|
|
3017
3381
|
},
|
|
3018
3382
|
id
|
|
3019
3383
|
)),
|
|
3020
|
-
/* @__PURE__ */
|
|
3384
|
+
/* @__PURE__ */ jsx40(RadixToast.Viewport, { className: cx(portal2.className, viewport2), style: portal2.style })
|
|
3021
3385
|
] }) });
|
|
3022
3386
|
}
|
|
3023
3387
|
function useToast() {
|
|
@@ -3034,7 +3398,7 @@ var arrow2 = "z7rufs1";
|
|
|
3034
3398
|
var content11 = "z7rufs0";
|
|
3035
3399
|
|
|
3036
3400
|
// src/components/Tooltip/Tooltip.tsx
|
|
3037
|
-
import { jsx as
|
|
3401
|
+
import { jsx as jsx41, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3038
3402
|
function Tooltip({
|
|
3039
3403
|
content: content12,
|
|
3040
3404
|
children,
|
|
@@ -3049,9 +3413,9 @@ function Tooltip({
|
|
|
3049
3413
|
}) {
|
|
3050
3414
|
const portal2 = usePortalProps();
|
|
3051
3415
|
if (disabled || content12 == null || content12 === "") return children;
|
|
3052
|
-
return /* @__PURE__ */
|
|
3053
|
-
/* @__PURE__ */
|
|
3054
|
-
/* @__PURE__ */
|
|
3416
|
+
return /* @__PURE__ */ jsx41(RadixTooltip.Provider, { delayDuration: delay, children: /* @__PURE__ */ jsxs33(RadixTooltip.Root, { open, defaultOpen, onOpenChange, children: [
|
|
3417
|
+
/* @__PURE__ */ jsx41(RadixTooltip.Trigger, { asChild: true, children }),
|
|
3418
|
+
/* @__PURE__ */ jsx41(RadixTooltip.Portal, { children: /* @__PURE__ */ jsxs33(
|
|
3055
3419
|
RadixTooltip.Content,
|
|
3056
3420
|
{
|
|
3057
3421
|
side,
|
|
@@ -3062,7 +3426,7 @@ function Tooltip({
|
|
|
3062
3426
|
style: portal2.style,
|
|
3063
3427
|
children: [
|
|
3064
3428
|
content12,
|
|
3065
|
-
/* @__PURE__ */
|
|
3429
|
+
/* @__PURE__ */ jsx41(RadixTooltip.Arrow, { className: arrow2, width: 10, height: 5 })
|
|
3066
3430
|
]
|
|
3067
3431
|
}
|
|
3068
3432
|
) })
|
|
@@ -3070,7 +3434,7 @@ function Tooltip({
|
|
|
3070
3434
|
}
|
|
3071
3435
|
|
|
3072
3436
|
// src/components/VerificationCodeInput/VerificationCodeInput.tsx
|
|
3073
|
-
import { forwardRef as
|
|
3437
|
+
import { forwardRef as forwardRef36, useEffect as useEffect10, useId as useId17, useRef as useRef17, useState as useState16 } from "react";
|
|
3074
3438
|
|
|
3075
3439
|
// src/components/VerificationCodeInput/VerificationCodeInput.css.ts
|
|
3076
3440
|
var input5 = "ea01812";
|
|
@@ -3080,9 +3444,9 @@ var slots = "ea01811";
|
|
|
3080
3444
|
var timer = "ea01814";
|
|
3081
3445
|
|
|
3082
3446
|
// src/components/VerificationCodeInput/VerificationCodeInput.tsx
|
|
3083
|
-
import { jsx as
|
|
3447
|
+
import { jsx as jsx42, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
3084
3448
|
var formatTime = (seconds) => `${String(Math.floor(seconds / 60)).padStart(2, "0")}:${String(seconds % 60).padStart(2, "0")}`;
|
|
3085
|
-
var VerificationCodeInput = /* @__PURE__ */
|
|
3449
|
+
var VerificationCodeInput = /* @__PURE__ */ forwardRef36(
|
|
3086
3450
|
function VerificationCodeInput2(props, ref) {
|
|
3087
3451
|
const {
|
|
3088
3452
|
length = 6,
|
|
@@ -3106,26 +3470,26 @@ var VerificationCodeInput = /* @__PURE__ */ forwardRef33(
|
|
|
3106
3470
|
className
|
|
3107
3471
|
} = props;
|
|
3108
3472
|
const m = useMessages();
|
|
3109
|
-
const
|
|
3473
|
+
const label6 = labelProp ?? m.verificationCode ?? "\uC778\uC99D\uBC88\uD638";
|
|
3110
3474
|
const resendText = resendTextProp ?? m.resend ?? "\uC7AC\uC804\uC1A1";
|
|
3111
3475
|
const expiredText = expiredTextProp ?? m.verificationExpired ?? "\uC778\uC99D \uC2DC\uAC04\uC774 \uC9C0\uB0AC\uC5B4\uC694. \uC7AC\uC804\uC1A1\uD574 \uC8FC\uC138\uC694.";
|
|
3112
|
-
const generatedId =
|
|
3476
|
+
const generatedId = useId17();
|
|
3113
3477
|
const inputId = id ?? generatedId;
|
|
3114
3478
|
const helperId = `${inputId}-helper`;
|
|
3115
3479
|
const statusId = `${inputId}-status`;
|
|
3116
|
-
const inputRef =
|
|
3480
|
+
const inputRef = useRef17(null);
|
|
3117
3481
|
const isControlled = "value" in props;
|
|
3118
|
-
const [innerValue, setInnerValue] =
|
|
3482
|
+
const [innerValue, setInnerValue] = useState16(defaultValue ?? "");
|
|
3119
3483
|
const code = (isControlled ? value3 ?? "" : innerValue).slice(0, length);
|
|
3120
|
-
const [focused, setFocused] =
|
|
3121
|
-
const [endAt, setEndAt] =
|
|
3122
|
-
const [remaining, setRemaining] =
|
|
3484
|
+
const [focused, setFocused] = useState16(false);
|
|
3485
|
+
const [endAt, setEndAt] = useState16(() => expiresIn ? Date.now() + expiresIn * 1e3 : null);
|
|
3486
|
+
const [remaining, setRemaining] = useState16(expiresIn ?? 0);
|
|
3123
3487
|
const expired = expiresIn !== void 0 && remaining <= 0;
|
|
3124
|
-
const onExpireRef =
|
|
3125
|
-
|
|
3488
|
+
const onExpireRef = useRef17(onExpire);
|
|
3489
|
+
useEffect10(() => {
|
|
3126
3490
|
onExpireRef.current = onExpire;
|
|
3127
3491
|
});
|
|
3128
|
-
|
|
3492
|
+
useEffect10(() => {
|
|
3129
3493
|
if (endAt === null) return;
|
|
3130
3494
|
const tick = () => {
|
|
3131
3495
|
const left = Math.max(0, Math.ceil((endAt - Date.now()) / 1e3));
|
|
@@ -3158,19 +3522,19 @@ var VerificationCodeInput = /* @__PURE__ */ forwardRef33(
|
|
|
3158
3522
|
}
|
|
3159
3523
|
inputRef.current?.focus();
|
|
3160
3524
|
};
|
|
3161
|
-
const
|
|
3525
|
+
const description7 = helperText3 ?? m.verificationCodeHint?.(length, type) ?? `${length}\uC790\uB9AC ${type === "numeric" ? "\uC22B\uC790" : "\uBB38\uC790"}\uB97C \uC785\uB825\uD558\uC138\uC694.`;
|
|
3162
3526
|
const activeIndex = Math.min(code.length, length - 1);
|
|
3163
|
-
return /* @__PURE__ */
|
|
3527
|
+
return /* @__PURE__ */ jsxs34(
|
|
3164
3528
|
"div",
|
|
3165
3529
|
{
|
|
3166
3530
|
className: cx(field, className),
|
|
3167
3531
|
"data-invalid": error || void 0,
|
|
3168
3532
|
"data-disabled": disabled || void 0,
|
|
3169
3533
|
children: [
|
|
3170
|
-
/* @__PURE__ */
|
|
3171
|
-
/* @__PURE__ */
|
|
3172
|
-
/* @__PURE__ */
|
|
3173
|
-
/* @__PURE__ */
|
|
3534
|
+
/* @__PURE__ */ jsx42("label", { htmlFor: inputId, className: label, children: label6 }),
|
|
3535
|
+
/* @__PURE__ */ jsxs34("div", { className: row4, children: [
|
|
3536
|
+
/* @__PURE__ */ jsxs34("div", { className: slots, children: [
|
|
3537
|
+
/* @__PURE__ */ jsx42(
|
|
3174
3538
|
"input",
|
|
3175
3539
|
{
|
|
3176
3540
|
ref: mergeRefs(ref, inputRef),
|
|
@@ -3190,7 +3554,7 @@ var VerificationCodeInput = /* @__PURE__ */ forwardRef33(
|
|
|
3190
3554
|
className: input5
|
|
3191
3555
|
}
|
|
3192
3556
|
),
|
|
3193
|
-
Array.from({ length }, (_, index) => /* @__PURE__ */
|
|
3557
|
+
Array.from({ length }, (_, index) => /* @__PURE__ */ jsx42(
|
|
3194
3558
|
"div",
|
|
3195
3559
|
{
|
|
3196
3560
|
className: slot,
|
|
@@ -3201,12 +3565,12 @@ var VerificationCodeInput = /* @__PURE__ */ forwardRef33(
|
|
|
3201
3565
|
index
|
|
3202
3566
|
))
|
|
3203
3567
|
] }),
|
|
3204
|
-
expiresIn !== void 0 && /* @__PURE__ */
|
|
3205
|
-
onResend && /* @__PURE__ */
|
|
3568
|
+
expiresIn !== void 0 && /* @__PURE__ */ jsx42("span", { role: "timer", className: timer, children: formatTime(remaining) }),
|
|
3569
|
+
onResend && /* @__PURE__ */ jsx42(Button, { size: "sm", variant: "outline", color: "neutral", onClick: resend, disabled, children: resendText })
|
|
3206
3570
|
] }),
|
|
3207
|
-
/* @__PURE__ */
|
|
3208
|
-
/* @__PURE__ */
|
|
3209
|
-
name && /* @__PURE__ */
|
|
3571
|
+
/* @__PURE__ */ jsx42("p", { id: helperId, className: helperText({ error }), children: description7 }),
|
|
3572
|
+
/* @__PURE__ */ jsx42("p", { id: statusId, role: "status", className: helperText({ error: true }), children: expired ? expiredText : "" }),
|
|
3573
|
+
name && /* @__PURE__ */ jsx42("input", { type: "hidden", name, value: code })
|
|
3210
3574
|
]
|
|
3211
3575
|
}
|
|
3212
3576
|
);
|
|
@@ -3242,6 +3606,8 @@ export {
|
|
|
3242
3606
|
DropdownMenuSubContent,
|
|
3243
3607
|
DropdownMenuSubTrigger,
|
|
3244
3608
|
DropdownMenuTrigger,
|
|
3609
|
+
ErrorSummary,
|
|
3610
|
+
FileUpload,
|
|
3245
3611
|
IconButton,
|
|
3246
3612
|
Input,
|
|
3247
3613
|
Link,
|
|
@@ -3259,14 +3625,17 @@ export {
|
|
|
3259
3625
|
SkipLink,
|
|
3260
3626
|
Slider,
|
|
3261
3627
|
Spinner,
|
|
3628
|
+
Stepper,
|
|
3262
3629
|
Switch,
|
|
3263
3630
|
Table,
|
|
3264
3631
|
TableBody,
|
|
3265
3632
|
TableCell,
|
|
3633
|
+
TableEmpty,
|
|
3266
3634
|
TableFooter,
|
|
3267
3635
|
TableHead,
|
|
3268
3636
|
TableHeader,
|
|
3269
3637
|
TableRow,
|
|
3638
|
+
TableSkeleton,
|
|
3270
3639
|
Tabs,
|
|
3271
3640
|
TabsContent,
|
|
3272
3641
|
TabsList,
|
|
@@ -3279,6 +3648,7 @@ export {
|
|
|
3279
3648
|
VerificationCodeInput,
|
|
3280
3649
|
useMessages,
|
|
3281
3650
|
usePortalProps,
|
|
3651
|
+
useTableSelection,
|
|
3282
3652
|
useTheme,
|
|
3283
3653
|
useToast
|
|
3284
3654
|
};
|