@bestow-ui/react 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -3
- package/dist/{chunk-VQ45DNC3.js → chunk-NKLDAXUR.js} +2 -77
- package/dist/chunk-NKLDAXUR.js.map +1 -0
- package/dist/client.js +345 -194
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +381 -288
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +77 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +40 -45
- package/dist/index.d.ts +40 -45
- package/dist/shared.js +10 -6
- package/dist/shared.js.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-VQ45DNC3.js.map +0 -1
package/dist/client.js
CHANGED
|
@@ -1,29 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
-
KOREAN_WEEKDAYS,
|
|
4
3
|
Skeleton,
|
|
5
4
|
addDays,
|
|
6
5
|
addMonths,
|
|
7
6
|
compareDays,
|
|
8
7
|
cx,
|
|
9
8
|
focusField,
|
|
10
|
-
formatBusinessNumber,
|
|
11
|
-
formatKoreanAmount,
|
|
12
|
-
formatPhoneNumber,
|
|
13
9
|
getCalendarWeeks,
|
|
14
10
|
isSameDay,
|
|
15
11
|
isSameMonth,
|
|
16
|
-
isValidBusinessNumber,
|
|
17
12
|
kakaoPostcodeProvider,
|
|
18
13
|
mergeThemes,
|
|
19
14
|
parseISODate,
|
|
20
|
-
phoneNumberMaxDigits,
|
|
21
15
|
presetRange,
|
|
22
16
|
themeClass,
|
|
23
17
|
themeToStyle,
|
|
24
18
|
toISODate,
|
|
25
19
|
visuallyHidden
|
|
26
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-NKLDAXUR.js";
|
|
27
21
|
|
|
28
22
|
// src/theme/ThemeProvider.tsx
|
|
29
23
|
import { createContext, forwardRef, useContext, useMemo } from "react";
|
|
@@ -735,7 +729,7 @@ var Alert = /* @__PURE__ */ forwardRef10(function Alert2({
|
|
|
735
729
|
variant,
|
|
736
730
|
color = "primary",
|
|
737
731
|
title: title6,
|
|
738
|
-
icon:
|
|
732
|
+
icon: icon7,
|
|
739
733
|
action: action3,
|
|
740
734
|
onClose,
|
|
741
735
|
closeLabel: closeLabelProp,
|
|
@@ -746,7 +740,7 @@ var Alert = /* @__PURE__ */ forwardRef10(function Alert2({
|
|
|
746
740
|
const m = useMessages();
|
|
747
741
|
const closeLabel = closeLabelProp ?? m.close ?? "\uB2EB\uAE30";
|
|
748
742
|
const DefaultIcon = defaultIcons[color];
|
|
749
|
-
const iconNode =
|
|
743
|
+
const iconNode = icon7 === void 0 ? /* @__PURE__ */ jsx12(DefaultIcon, { size: 18 }) : icon7;
|
|
750
744
|
return /* @__PURE__ */ jsxs10("div", { ref, className: cx(alert({ variant, color }), className), ...rest, children: [
|
|
751
745
|
iconNode !== false && iconNode !== null && /* @__PURE__ */ jsx12("span", { className: icon2, "aria-hidden": true, children: iconNode }),
|
|
752
746
|
/* @__PURE__ */ jsxs10("div", { className: content4, children: [
|
|
@@ -760,6 +754,7 @@ var Alert = /* @__PURE__ */ forwardRef10(function Alert2({
|
|
|
760
754
|
|
|
761
755
|
// src/components/AmountInput/AmountInput.tsx
|
|
762
756
|
import { forwardRef as forwardRef11, useRef as useRef5 } from "react";
|
|
757
|
+
import { formatKoreanAmount } from "@bestow-ui/korean-utils";
|
|
763
758
|
|
|
764
759
|
// src/utils/useFormattedInput.ts
|
|
765
760
|
import { useRef as useRef4, useState as useState3 } from "react";
|
|
@@ -1011,6 +1006,7 @@ var Breadcrumb = /* @__PURE__ */ forwardRef14(function Breadcrumb2({ items: item
|
|
|
1011
1006
|
|
|
1012
1007
|
// src/components/BusinessNumberInput/BusinessNumberInput.tsx
|
|
1013
1008
|
import { forwardRef as forwardRef15, useRef as useRef6, useState as useState4 } from "react";
|
|
1009
|
+
import { formatBusinessNumber, isValidBusinessNumber } from "@bestow-ui/korean-utils";
|
|
1014
1010
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1015
1011
|
var sanitize = (input6) => input6.replace(/\D/g, "").slice(0, 10);
|
|
1016
1012
|
var isDigit2 = (char) => /\d/.test(char);
|
|
@@ -1077,6 +1073,7 @@ var BusinessNumberInput = /* @__PURE__ */ forwardRef15(
|
|
|
1077
1073
|
// src/components/Calendar/Calendar.tsx
|
|
1078
1074
|
import { forwardRef as forwardRef17, useEffect as useEffect4, useId as useId4, useRef as useRef7, useState as useState5 } from "react";
|
|
1079
1075
|
import { ChevronLeftIcon, ChevronRightIcon as ChevronRightIcon2 } from "@bestow-ui/icons";
|
|
1076
|
+
import { KOREAN_WEEKDAYS } from "@bestow-ui/korean-utils";
|
|
1080
1077
|
|
|
1081
1078
|
// src/utils/useIsClient.ts
|
|
1082
1079
|
import { useSyncExternalStore } from "react";
|
|
@@ -1179,7 +1176,7 @@ var Calendar = /* @__PURE__ */ forwardRef17(function Calendar2(props, ref) {
|
|
|
1179
1176
|
moveFocus.current = true;
|
|
1180
1177
|
setFocused(clamp(date));
|
|
1181
1178
|
};
|
|
1182
|
-
const
|
|
1179
|
+
const select2 = (date) => {
|
|
1183
1180
|
if (isDisabled(date)) return;
|
|
1184
1181
|
const iso = toISODate(date);
|
|
1185
1182
|
if (!isControlled) setInnerValue(iso);
|
|
@@ -1262,7 +1259,7 @@ var Calendar = /* @__PURE__ */ forwardRef17(function Calendar2(props, ref) {
|
|
|
1262
1259
|
"aria-label": label6,
|
|
1263
1260
|
"aria-current": isToday ? "date" : void 0,
|
|
1264
1261
|
"aria-disabled": disabled || void 0,
|
|
1265
|
-
onClick: () =>
|
|
1262
|
+
onClick: () => select2(date),
|
|
1266
1263
|
onFocus: () => !isSameDay(date, focused) && setFocused(date),
|
|
1267
1264
|
children: date.getDate()
|
|
1268
1265
|
}
|
|
@@ -1373,7 +1370,7 @@ var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
|
|
|
1373
1370
|
if (query === "" && selectedValue) clearSelection();
|
|
1374
1371
|
reset();
|
|
1375
1372
|
};
|
|
1376
|
-
const
|
|
1373
|
+
const select2 = (option2) => {
|
|
1377
1374
|
if (option2.disabled) return;
|
|
1378
1375
|
if (!isControlled) setInnerValue(option2.value);
|
|
1379
1376
|
if (option2.value !== selectedValue) onValueChange?.(option2.value);
|
|
@@ -1407,7 +1404,7 @@ var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
|
|
|
1407
1404
|
if (open) {
|
|
1408
1405
|
event.preventDefault();
|
|
1409
1406
|
const option2 = filtered[activeIndex];
|
|
1410
|
-
if (option2)
|
|
1407
|
+
if (option2) select2(option2);
|
|
1411
1408
|
else close2();
|
|
1412
1409
|
}
|
|
1413
1410
|
break;
|
|
@@ -1553,7 +1550,7 @@ var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
|
|
|
1553
1550
|
className: item4,
|
|
1554
1551
|
onMouseDown: (event) => event.preventDefault(),
|
|
1555
1552
|
onMouseMove: () => !option2.disabled && setActiveIndex(index),
|
|
1556
|
-
onClick: () =>
|
|
1553
|
+
onClick: () => select2(option2),
|
|
1557
1554
|
children: [
|
|
1558
1555
|
option2.label,
|
|
1559
1556
|
isSelected && /* @__PURE__ */ jsx20("span", { className: itemIndicator, "aria-hidden": true, children: /* @__PURE__ */ jsx20(CheckIcon, { size: 16 }) })
|
|
@@ -2290,9 +2287,9 @@ var DropdownMenuContent = /* @__PURE__ */ forwardRef23(
|
|
|
2290
2287
|
}
|
|
2291
2288
|
);
|
|
2292
2289
|
var DropdownMenuItem = /* @__PURE__ */ forwardRef23(
|
|
2293
|
-
function DropdownMenuItem2({ icon:
|
|
2290
|
+
function DropdownMenuItem2({ icon: icon7, shortcut: shortcut2, color = "neutral", className, children, ...rest }, ref) {
|
|
2294
2291
|
return /* @__PURE__ */ jsxs22(RadixMenu.Item, { ref, className: cx(item6, color === "danger" && danger, className), ...rest, children: [
|
|
2295
|
-
|
|
2292
|
+
icon7 && /* @__PURE__ */ jsx27("span", { className: icon4, "aria-hidden": true, children: icon7 }),
|
|
2296
2293
|
children,
|
|
2297
2294
|
shortcut2 && /* @__PURE__ */ jsx27("span", { className: shortcut, "aria-hidden": true, children: shortcut2 })
|
|
2298
2295
|
] });
|
|
@@ -2327,9 +2324,9 @@ var DropdownMenuRadioItem = /* @__PURE__ */ forwardRef23(
|
|
|
2327
2324
|
);
|
|
2328
2325
|
var DropdownMenuSub = RadixMenu.Sub;
|
|
2329
2326
|
var DropdownMenuSubTrigger = /* @__PURE__ */ forwardRef23(
|
|
2330
|
-
function DropdownMenuSubTrigger2({ icon:
|
|
2327
|
+
function DropdownMenuSubTrigger2({ icon: icon7, className, children, ...rest }, ref) {
|
|
2331
2328
|
return /* @__PURE__ */ jsxs22(RadixMenu.SubTrigger, { ref, className: cx(item6, subTrigger, className), ...rest, children: [
|
|
2332
|
-
|
|
2329
|
+
icon7 && /* @__PURE__ */ jsx27("span", { className: icon4, "aria-hidden": true, children: icon7 }),
|
|
2333
2330
|
children,
|
|
2334
2331
|
/* @__PURE__ */ jsx27("span", { className: subChevron, "aria-hidden": true, children: /* @__PURE__ */ jsx27(ChevronRightIcon3, { size: 16 }) })
|
|
2335
2332
|
] });
|
|
@@ -2635,6 +2632,7 @@ var Pagination = /* @__PURE__ */ forwardRef25(function Pagination2({
|
|
|
2635
2632
|
|
|
2636
2633
|
// src/components/PhoneNumberInput/PhoneNumberInput.tsx
|
|
2637
2634
|
import { forwardRef as forwardRef26, useRef as useRef13 } from "react";
|
|
2635
|
+
import { formatPhoneNumber, phoneNumberMaxDigits } from "@bestow-ui/korean-utils";
|
|
2638
2636
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
2639
2637
|
var sanitize3 = (input6) => {
|
|
2640
2638
|
const digits = input6.replace(/\D/g, "");
|
|
@@ -2821,7 +2819,7 @@ var SegmentedControl = /* @__PURE__ */ forwardRef28(
|
|
|
2821
2819
|
const labelId = label6 ? `${id ?? generatedId}-label` : void 0;
|
|
2822
2820
|
const itemRefs = useRef14([]);
|
|
2823
2821
|
const isEnabled = (index) => !disabled && !options[index]?.disabled;
|
|
2824
|
-
const
|
|
2822
|
+
const select2 = (index) => {
|
|
2825
2823
|
const next = options[index].value;
|
|
2826
2824
|
if (next === current2) return;
|
|
2827
2825
|
if (!isControlled) setInnerValue(next);
|
|
@@ -2848,7 +2846,7 @@ var SegmentedControl = /* @__PURE__ */ forwardRef28(
|
|
|
2848
2846
|
if (target < 0) return;
|
|
2849
2847
|
event.preventDefault();
|
|
2850
2848
|
itemRefs.current[target]?.focus();
|
|
2851
|
-
|
|
2849
|
+
select2(target);
|
|
2852
2850
|
};
|
|
2853
2851
|
const group = /* @__PURE__ */ jsxs26(
|
|
2854
2852
|
"div",
|
|
@@ -2877,7 +2875,7 @@ var SegmentedControl = /* @__PURE__ */ forwardRef28(
|
|
|
2877
2875
|
"data-state": checked ? "checked" : "unchecked",
|
|
2878
2876
|
"data-disabled": isEnabled(index) ? void 0 : "",
|
|
2879
2877
|
className: item8({ size, fullWidth }),
|
|
2880
|
-
onClick: () =>
|
|
2878
|
+
onClick: () => select2(index),
|
|
2881
2879
|
onKeyDown: (event) => handleKeyDown(event, index),
|
|
2882
2880
|
children: [
|
|
2883
2881
|
option2.icon && /* @__PURE__ */ jsx32("span", { "aria-hidden": true, className: icon5, children: option2.icon }),
|
|
@@ -2899,12 +2897,91 @@ var SegmentedControl = /* @__PURE__ */ forwardRef28(
|
|
|
2899
2897
|
}
|
|
2900
2898
|
);
|
|
2901
2899
|
|
|
2902
|
-
// src/components/
|
|
2903
|
-
import * as RadixSelect from "@radix-ui/react-select";
|
|
2900
|
+
// src/components/NativeSelect/NativeSelect.tsx
|
|
2904
2901
|
import { forwardRef as forwardRef29, useId as useId13 } from "react";
|
|
2905
|
-
import {
|
|
2902
|
+
import { ChevronDownIcon as ChevronDownIcon4 } from "@bestow-ui/icons";
|
|
2903
|
+
|
|
2904
|
+
// src/components/NativeSelect/NativeSelect.css.ts
|
|
2905
|
+
import { createRuntimeFn as _7a46815 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
2906
|
+
var icon6 = /* @__PURE__ */ _7a46815({ defaultClassName: "_5silym5", variantClassNames: { size: { sm: "_5silym6", md: "_5silym7", lg: "_5silym8" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
2907
|
+
var select = /* @__PURE__ */ _7a46815({ defaultClassName: "_5silym1", variantClassNames: { size: { sm: "_5silym2", md: "_5silym3", lg: "_5silym4" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
2908
|
+
var wrapper = "_5silym0";
|
|
2909
|
+
|
|
2910
|
+
// src/components/NativeSelect/NativeSelect.tsx
|
|
2906
2911
|
import { jsx as jsx33, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2907
|
-
var
|
|
2912
|
+
var NativeSelect = /* @__PURE__ */ forwardRef29(function NativeSelect2({
|
|
2913
|
+
options,
|
|
2914
|
+
onValueChange,
|
|
2915
|
+
onChange,
|
|
2916
|
+
placeholder,
|
|
2917
|
+
label: label6,
|
|
2918
|
+
helperText: helperText3,
|
|
2919
|
+
error,
|
|
2920
|
+
size,
|
|
2921
|
+
fullWidth,
|
|
2922
|
+
required,
|
|
2923
|
+
disabled,
|
|
2924
|
+
id,
|
|
2925
|
+
value: value3,
|
|
2926
|
+
defaultValue,
|
|
2927
|
+
className,
|
|
2928
|
+
children,
|
|
2929
|
+
"aria-describedby": ariaDescribedBy,
|
|
2930
|
+
...rest
|
|
2931
|
+
}, ref) {
|
|
2932
|
+
const generatedId = useId13();
|
|
2933
|
+
const selectId = id ?? generatedId;
|
|
2934
|
+
const helperId = helperText3 ? `${selectId}-helper` : void 0;
|
|
2935
|
+
const handleChange = (event) => {
|
|
2936
|
+
onChange?.(event);
|
|
2937
|
+
onValueChange?.(event.target.value);
|
|
2938
|
+
};
|
|
2939
|
+
return /* @__PURE__ */ jsxs27("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
|
|
2940
|
+
label6 && /* @__PURE__ */ jsxs27("label", { htmlFor: selectId, className: label, children: [
|
|
2941
|
+
label6,
|
|
2942
|
+
required && /* @__PURE__ */ jsx33("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
2943
|
+
] }),
|
|
2944
|
+
/* @__PURE__ */ jsxs27(
|
|
2945
|
+
"span",
|
|
2946
|
+
{
|
|
2947
|
+
className: cx(root3({ size, fullWidth }), wrapper),
|
|
2948
|
+
"data-invalid": error || void 0,
|
|
2949
|
+
"data-disabled": disabled || void 0,
|
|
2950
|
+
children: [
|
|
2951
|
+
/* @__PURE__ */ jsxs27(
|
|
2952
|
+
"select",
|
|
2953
|
+
{
|
|
2954
|
+
ref,
|
|
2955
|
+
id: selectId,
|
|
2956
|
+
value: value3,
|
|
2957
|
+
defaultValue: value3 === void 0 && defaultValue === void 0 && placeholder !== void 0 ? "" : defaultValue,
|
|
2958
|
+
onChange: handleChange,
|
|
2959
|
+
required,
|
|
2960
|
+
disabled,
|
|
2961
|
+
"aria-invalid": error || void 0,
|
|
2962
|
+
"aria-describedby": cx(helperId, ariaDescribedBy) || void 0,
|
|
2963
|
+
className: cx(select({ size }), className),
|
|
2964
|
+
...rest,
|
|
2965
|
+
children: [
|
|
2966
|
+
placeholder !== void 0 && /* @__PURE__ */ jsx33("option", { value: "", disabled: true, children: placeholder }),
|
|
2967
|
+
options ? options.map((option2) => /* @__PURE__ */ jsx33("option", { value: option2.value, disabled: option2.disabled, children: option2.label }, option2.value)) : children
|
|
2968
|
+
]
|
|
2969
|
+
}
|
|
2970
|
+
),
|
|
2971
|
+
/* @__PURE__ */ jsx33(ChevronDownIcon4, { size: 16, className: icon6({ size }) })
|
|
2972
|
+
]
|
|
2973
|
+
}
|
|
2974
|
+
),
|
|
2975
|
+
helperText3 && /* @__PURE__ */ jsx33("p", { id: helperId, className: helperText({ error }), children: helperText3 })
|
|
2976
|
+
] });
|
|
2977
|
+
});
|
|
2978
|
+
|
|
2979
|
+
// src/components/Select/Select.tsx
|
|
2980
|
+
import * as RadixSelect from "@radix-ui/react-select";
|
|
2981
|
+
import { forwardRef as forwardRef30, useId as useId14 } from "react";
|
|
2982
|
+
import { CheckIcon as CheckIcon3, ChevronDownIcon as ChevronDownIcon5 } from "@bestow-ui/icons";
|
|
2983
|
+
import { jsx as jsx34, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2984
|
+
var Select = /* @__PURE__ */ forwardRef30(function Select2(props, ref) {
|
|
2908
2985
|
const {
|
|
2909
2986
|
options,
|
|
2910
2987
|
value: value3,
|
|
@@ -2924,16 +3001,16 @@ var Select = /* @__PURE__ */ forwardRef29(function Select2(props, ref) {
|
|
|
2924
3001
|
className
|
|
2925
3002
|
} = props;
|
|
2926
3003
|
const isControlled = "value" in props;
|
|
2927
|
-
const generatedId =
|
|
3004
|
+
const generatedId = useId14();
|
|
2928
3005
|
const triggerId = id ?? generatedId;
|
|
2929
3006
|
const helperId = helperText3 ? `${triggerId}-helper` : void 0;
|
|
2930
3007
|
const portal2 = usePortalProps();
|
|
2931
|
-
return /* @__PURE__ */
|
|
2932
|
-
label6 && /* @__PURE__ */
|
|
3008
|
+
return /* @__PURE__ */ jsxs28("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
|
|
3009
|
+
label6 && /* @__PURE__ */ jsxs28("label", { htmlFor: triggerId, className: label, children: [
|
|
2933
3010
|
label6,
|
|
2934
|
-
required && /* @__PURE__ */
|
|
3011
|
+
required && /* @__PURE__ */ jsx34("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
2935
3012
|
] }),
|
|
2936
|
-
/* @__PURE__ */
|
|
3013
|
+
/* @__PURE__ */ jsxs28(
|
|
2937
3014
|
RadixSelect.Root,
|
|
2938
3015
|
{
|
|
2939
3016
|
value: isControlled ? value3 ?? "" : void 0,
|
|
@@ -2943,7 +3020,7 @@ var Select = /* @__PURE__ */ forwardRef29(function Select2(props, ref) {
|
|
|
2943
3020
|
required,
|
|
2944
3021
|
name,
|
|
2945
3022
|
children: [
|
|
2946
|
-
/* @__PURE__ */
|
|
3023
|
+
/* @__PURE__ */ jsxs28(
|
|
2947
3024
|
RadixSelect.Trigger,
|
|
2948
3025
|
{
|
|
2949
3026
|
ref,
|
|
@@ -2954,12 +3031,12 @@ var Select = /* @__PURE__ */ forwardRef29(function Select2(props, ref) {
|
|
|
2954
3031
|
"data-invalid": error || void 0,
|
|
2955
3032
|
className: cx(root3({ size, fullWidth }), trigger2, className),
|
|
2956
3033
|
children: [
|
|
2957
|
-
/* @__PURE__ */
|
|
2958
|
-
/* @__PURE__ */
|
|
3034
|
+
/* @__PURE__ */ jsx34("span", { className: value, children: /* @__PURE__ */ jsx34(RadixSelect.Value, { placeholder }) }),
|
|
3035
|
+
/* @__PURE__ */ jsx34(RadixSelect.Icon, { className: icon3, children: /* @__PURE__ */ jsx34(ChevronDownIcon5, { size: 16 }) })
|
|
2959
3036
|
]
|
|
2960
3037
|
}
|
|
2961
3038
|
),
|
|
2962
|
-
/* @__PURE__ */
|
|
3039
|
+
/* @__PURE__ */ jsx34(RadixSelect.Portal, { children: /* @__PURE__ */ jsx34(
|
|
2963
3040
|
RadixSelect.Content,
|
|
2964
3041
|
{
|
|
2965
3042
|
position: "popper",
|
|
@@ -2967,15 +3044,15 @@ var Select = /* @__PURE__ */ forwardRef29(function Select2(props, ref) {
|
|
|
2967
3044
|
collisionPadding: 8,
|
|
2968
3045
|
className: cx(portal2.className, content5),
|
|
2969
3046
|
style: portal2.style,
|
|
2970
|
-
children: /* @__PURE__ */
|
|
3047
|
+
children: /* @__PURE__ */ jsx34(RadixSelect.Viewport, { className: viewport, children: options.map((option2) => /* @__PURE__ */ jsxs28(
|
|
2971
3048
|
RadixSelect.Item,
|
|
2972
3049
|
{
|
|
2973
3050
|
value: option2.value,
|
|
2974
3051
|
disabled: option2.disabled,
|
|
2975
3052
|
className: item4,
|
|
2976
3053
|
children: [
|
|
2977
|
-
/* @__PURE__ */
|
|
2978
|
-
/* @__PURE__ */
|
|
3054
|
+
/* @__PURE__ */ jsx34(RadixSelect.ItemText, { children: option2.label }),
|
|
3055
|
+
/* @__PURE__ */ jsx34(RadixSelect.ItemIndicator, { className: itemIndicator, children: /* @__PURE__ */ jsx34(CheckIcon3, { size: 16 }) })
|
|
2979
3056
|
]
|
|
2980
3057
|
},
|
|
2981
3058
|
option2.value
|
|
@@ -2985,19 +3062,19 @@ var Select = /* @__PURE__ */ forwardRef29(function Select2(props, ref) {
|
|
|
2985
3062
|
]
|
|
2986
3063
|
}
|
|
2987
3064
|
),
|
|
2988
|
-
helperText3 && /* @__PURE__ */
|
|
3065
|
+
helperText3 && /* @__PURE__ */ jsx34("p", { id: helperId, className: helperText({ error }), children: helperText3 })
|
|
2989
3066
|
] });
|
|
2990
3067
|
});
|
|
2991
3068
|
|
|
2992
3069
|
// src/components/SkipLink/SkipLink.tsx
|
|
2993
|
-
import { forwardRef as
|
|
3070
|
+
import { forwardRef as forwardRef31 } from "react";
|
|
2994
3071
|
|
|
2995
3072
|
// src/components/SkipLink/SkipLink.css.ts
|
|
2996
3073
|
var skipLink = "_1t9jaar0";
|
|
2997
3074
|
|
|
2998
3075
|
// src/components/SkipLink/SkipLink.tsx
|
|
2999
|
-
import { jsx as
|
|
3000
|
-
var SkipLink = /* @__PURE__ */
|
|
3076
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
3077
|
+
var SkipLink = /* @__PURE__ */ forwardRef31(function SkipLink2({ href = "#main", className, children, onClick, ...rest }, ref) {
|
|
3001
3078
|
const m = useMessages();
|
|
3002
3079
|
const handleClick = (event) => {
|
|
3003
3080
|
onClick?.(event);
|
|
@@ -3009,28 +3086,28 @@ var SkipLink = /* @__PURE__ */ forwardRef30(function SkipLink2({ href = "#main",
|
|
|
3009
3086
|
target.focus();
|
|
3010
3087
|
target.scrollIntoView?.({ block: "start" });
|
|
3011
3088
|
};
|
|
3012
|
-
return /* @__PURE__ */
|
|
3089
|
+
return /* @__PURE__ */ jsx35("a", { ref, href, className: cx(skipLink, className), onClick: handleClick, ...rest, children: children ?? m.skipToContent ?? "\uBCF8\uBB38 \uBC14\uB85C\uAC00\uAE30" });
|
|
3013
3090
|
});
|
|
3014
3091
|
|
|
3015
3092
|
// src/components/Slider/Slider.tsx
|
|
3016
3093
|
import * as RadixSlider from "@radix-ui/react-slider";
|
|
3017
|
-
import { forwardRef as
|
|
3094
|
+
import { forwardRef as forwardRef32, useId as useId15, useState as useState14 } from "react";
|
|
3018
3095
|
|
|
3019
3096
|
// src/components/Slider/Slider.css.ts
|
|
3020
|
-
import { createRuntimeFn as
|
|
3097
|
+
import { createRuntimeFn as _7a46816 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3021
3098
|
var field3 = "_126mzjm0";
|
|
3022
3099
|
var header6 = "_126mzjm1";
|
|
3023
3100
|
var helperText2 = "_126mzjm4";
|
|
3024
3101
|
var label3 = "_126mzjm2";
|
|
3025
3102
|
var range2 = "_126mzjmb";
|
|
3026
|
-
var root10 = /* @__PURE__ */
|
|
3027
|
-
var thumb = /* @__PURE__ */
|
|
3028
|
-
var track = /* @__PURE__ */
|
|
3103
|
+
var root10 = /* @__PURE__ */ _7a46816({ defaultClassName: "_126mzjm5", variantClassNames: { size: { sm: "_126mzjm6", md: "_126mzjm7" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
3104
|
+
var thumb = /* @__PURE__ */ _7a46816({ defaultClassName: "_126mzjmc", variantClassNames: { size: { sm: "_126mzjmd", md: "_126mzjme" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
3105
|
+
var track = /* @__PURE__ */ _7a46816({ defaultClassName: "_126mzjm8", variantClassNames: { size: { sm: "_126mzjm9", md: "_126mzjma" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
3029
3106
|
var value2 = "_126mzjm3";
|
|
3030
3107
|
|
|
3031
3108
|
// src/components/Slider/Slider.tsx
|
|
3032
|
-
import { jsx as
|
|
3033
|
-
var Slider = /* @__PURE__ */
|
|
3109
|
+
import { jsx as jsx36, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3110
|
+
var Slider = /* @__PURE__ */ forwardRef32(function Slider2(props, ref) {
|
|
3034
3111
|
const {
|
|
3035
3112
|
value: value3,
|
|
3036
3113
|
defaultValue,
|
|
@@ -3051,7 +3128,7 @@ var Slider = /* @__PURE__ */ forwardRef31(function Slider2(props, ref) {
|
|
|
3051
3128
|
} = props;
|
|
3052
3129
|
const m = useMessages();
|
|
3053
3130
|
const thumbLabels = thumbLabelsProp ?? [m.rangeStart ?? "\uCD5C\uC18C", m.rangeEnd ?? "\uCD5C\uB300"];
|
|
3054
|
-
const generatedId =
|
|
3131
|
+
const generatedId = useId15();
|
|
3055
3132
|
const baseId = id ?? generatedId;
|
|
3056
3133
|
const labelId = `${baseId}-label`;
|
|
3057
3134
|
const helperId = `${baseId}-helper`;
|
|
@@ -3064,12 +3141,12 @@ var Slider = /* @__PURE__ */ forwardRef31(function Slider2(props, ref) {
|
|
|
3064
3141
|
onValueChange?.(next);
|
|
3065
3142
|
};
|
|
3066
3143
|
const valueText = current2.map(formatValue).join(" \u2013 ");
|
|
3067
|
-
return /* @__PURE__ */
|
|
3068
|
-
(label6 || showValue) && /* @__PURE__ */
|
|
3069
|
-
label6 && /* @__PURE__ */
|
|
3070
|
-
showValue && /* @__PURE__ */
|
|
3144
|
+
return /* @__PURE__ */ jsxs29("div", { className: cx(field3, className), children: [
|
|
3145
|
+
(label6 || showValue) && /* @__PURE__ */ jsxs29("div", { className: header6, children: [
|
|
3146
|
+
label6 && /* @__PURE__ */ jsx36("span", { id: labelId, className: label3, children: label6 }),
|
|
3147
|
+
showValue && /* @__PURE__ */ jsx36("span", { className: value2, "aria-hidden": true, children: valueText })
|
|
3071
3148
|
] }),
|
|
3072
|
-
/* @__PURE__ */
|
|
3149
|
+
/* @__PURE__ */ jsxs29(
|
|
3073
3150
|
RadixSlider.Root,
|
|
3074
3151
|
{
|
|
3075
3152
|
ref,
|
|
@@ -3082,10 +3159,10 @@ var Slider = /* @__PURE__ */ forwardRef31(function Slider2(props, ref) {
|
|
|
3082
3159
|
className: root10({ size }),
|
|
3083
3160
|
...rest,
|
|
3084
3161
|
children: [
|
|
3085
|
-
/* @__PURE__ */
|
|
3162
|
+
/* @__PURE__ */ jsx36(RadixSlider.Track, { className: track({ size }), children: /* @__PURE__ */ jsx36(RadixSlider.Range, { className: range2 }) }),
|
|
3086
3163
|
current2.map((thumbValue, index) => {
|
|
3087
3164
|
const thumbLabelId = `${baseId}-thumb-${index}`;
|
|
3088
|
-
return /* @__PURE__ */
|
|
3165
|
+
return /* @__PURE__ */ jsx36(
|
|
3089
3166
|
RadixSlider.Thumb,
|
|
3090
3167
|
{
|
|
3091
3168
|
className: thumb({ size }),
|
|
@@ -3100,32 +3177,32 @@ var Slider = /* @__PURE__ */ forwardRef31(function Slider2(props, ref) {
|
|
|
3100
3177
|
]
|
|
3101
3178
|
}
|
|
3102
3179
|
),
|
|
3103
|
-
isRange && current2.map((_, index) => /* @__PURE__ */
|
|
3180
|
+
isRange && current2.map((_, index) => /* @__PURE__ */ jsxs29("span", { id: `${baseId}-thumb-${index}`, hidden: true, children: [
|
|
3104
3181
|
label6 ? "" : ariaLabel ? `${ariaLabel} ` : "",
|
|
3105
3182
|
thumbLabels[index] ?? `${index + 1}`
|
|
3106
3183
|
] }, index)),
|
|
3107
|
-
helperText3 && /* @__PURE__ */
|
|
3184
|
+
helperText3 && /* @__PURE__ */ jsx36("span", { id: helperId, className: helperText2, children: helperText3 })
|
|
3108
3185
|
] });
|
|
3109
3186
|
});
|
|
3110
3187
|
|
|
3111
3188
|
// src/components/Stepper/Stepper.tsx
|
|
3112
|
-
import { forwardRef as
|
|
3189
|
+
import { forwardRef as forwardRef33 } from "react";
|
|
3113
3190
|
import { CheckIcon as CheckIcon4 } from "@bestow-ui/icons";
|
|
3114
3191
|
|
|
3115
3192
|
// src/components/Stepper/Stepper.css.ts
|
|
3116
|
-
import { createRuntimeFn as
|
|
3193
|
+
import { createRuntimeFn as _7a46817 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3117
3194
|
var description5 = "kervhmh";
|
|
3118
|
-
var indicator2 = /* @__PURE__ */
|
|
3119
|
-
var label4 = /* @__PURE__ */
|
|
3120
|
-
var root11 = /* @__PURE__ */
|
|
3121
|
-
var step = /* @__PURE__ */
|
|
3122
|
-
var text2 = /* @__PURE__ */
|
|
3195
|
+
var indicator2 = /* @__PURE__ */ _7a46817({ defaultClassName: "kervhm6", variantClassNames: { status: { complete: "kervhm7", current: "kervhm8", upcoming: "kervhm9" } }, defaultVariants: {}, compoundVariants: [] });
|
|
3196
|
+
var label4 = /* @__PURE__ */ _7a46817({ defaultClassName: "kervhmd", variantClassNames: { status: { complete: "kervhme", current: "kervhmf", upcoming: "kervhmg" } }, defaultVariants: {}, compoundVariants: [] });
|
|
3197
|
+
var root11 = /* @__PURE__ */ _7a46817({ defaultClassName: "kervhm0", variantClassNames: { orientation: { horizontal: "kervhm1", vertical: "kervhm2" } }, defaultVariants: { orientation: "horizontal" }, compoundVariants: [] });
|
|
3198
|
+
var step = /* @__PURE__ */ _7a46817({ defaultClassName: "kervhm3", variantClassNames: { orientation: { horizontal: "kervhm4", vertical: "kervhm5" } }, defaultVariants: { orientation: "horizontal" }, compoundVariants: [] });
|
|
3199
|
+
var text2 = /* @__PURE__ */ _7a46817({ defaultClassName: "kervhma", variantClassNames: { orientation: { horizontal: "kervhmb", vertical: "kervhmc" } }, defaultVariants: {}, compoundVariants: [] });
|
|
3123
3200
|
|
|
3124
3201
|
// src/components/Stepper/Stepper.tsx
|
|
3125
|
-
import { jsx as
|
|
3126
|
-
var Stepper = /* @__PURE__ */
|
|
3202
|
+
import { jsx as jsx37, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3203
|
+
var Stepper = /* @__PURE__ */ forwardRef33(function Stepper2({ steps, current: current2, orientation = "horizontal", "aria-label": ariaLabel, className, ...rest }, ref) {
|
|
3127
3204
|
const m = useMessages();
|
|
3128
|
-
return /* @__PURE__ */
|
|
3205
|
+
return /* @__PURE__ */ jsx37(
|
|
3129
3206
|
"ol",
|
|
3130
3207
|
{
|
|
3131
3208
|
ref,
|
|
@@ -3134,24 +3211,24 @@ var Stepper = /* @__PURE__ */ forwardRef32(function Stepper2({ steps, current: c
|
|
|
3134
3211
|
...rest,
|
|
3135
3212
|
children: steps.map((step2, index) => {
|
|
3136
3213
|
const status = index < current2 ? "complete" : index === current2 ? "current" : "upcoming";
|
|
3137
|
-
return /* @__PURE__ */
|
|
3214
|
+
return /* @__PURE__ */ jsxs30(
|
|
3138
3215
|
"li",
|
|
3139
3216
|
{
|
|
3140
3217
|
className: step({ orientation }),
|
|
3141
3218
|
"data-status": status,
|
|
3142
3219
|
"aria-current": status === "current" ? "step" : void 0,
|
|
3143
3220
|
children: [
|
|
3144
|
-
/* @__PURE__ */
|
|
3145
|
-
/* @__PURE__ */
|
|
3146
|
-
/* @__PURE__ */
|
|
3221
|
+
/* @__PURE__ */ jsx37("span", { className: indicator2({ status }), "aria-hidden": true, children: status === "complete" ? /* @__PURE__ */ jsx37(CheckIcon4, { size: 16, strokeWidth: 2.5 }) : index + 1 }),
|
|
3222
|
+
/* @__PURE__ */ jsxs30("span", { className: text2({ orientation }), children: [
|
|
3223
|
+
/* @__PURE__ */ jsxs30("span", { className: label4({ status }), children: [
|
|
3147
3224
|
step2.label,
|
|
3148
|
-
status === "complete" && /* @__PURE__ */
|
|
3225
|
+
status === "complete" && /* @__PURE__ */ jsxs30("span", { className: visuallyHidden, children: [
|
|
3149
3226
|
" (",
|
|
3150
3227
|
m.stepCompleted ?? "\uC644\uB8CC",
|
|
3151
3228
|
")"
|
|
3152
3229
|
] })
|
|
3153
3230
|
] }),
|
|
3154
|
-
step2.description && /* @__PURE__ */
|
|
3231
|
+
step2.description && /* @__PURE__ */ jsx37("span", { className: description5, children: step2.description })
|
|
3155
3232
|
] })
|
|
3156
3233
|
]
|
|
3157
3234
|
},
|
|
@@ -3163,52 +3240,125 @@ var Stepper = /* @__PURE__ */ forwardRef32(function Stepper2({ steps, current: c
|
|
|
3163
3240
|
});
|
|
3164
3241
|
|
|
3165
3242
|
// src/components/Switch/Switch.tsx
|
|
3166
|
-
import
|
|
3167
|
-
import { forwardRef as forwardRef33, useId as useId15 } from "react";
|
|
3243
|
+
import { forwardRef as forwardRef34, useEffect as useEffect10, useId as useId16, useRef as useRef15, useState as useState15 } from "react";
|
|
3168
3244
|
|
|
3169
3245
|
// src/components/Switch/Switch.css.ts
|
|
3170
|
-
import { createRuntimeFn as
|
|
3171
|
-
var
|
|
3172
|
-
var
|
|
3173
|
-
var
|
|
3174
|
-
var
|
|
3246
|
+
import { createRuntimeFn as _7a46818 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3247
|
+
var bubbleInput = /* @__PURE__ */ _7a46818({ defaultClassName: "o33ul29", variantClassNames: { size: { sm: "o33ul2a", md: "o33ul2b" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
3248
|
+
var label5 = "o33ul2c";
|
|
3249
|
+
var root12 = /* @__PURE__ */ _7a46818({ defaultClassName: "o33ul20", variantClassNames: { size: { sm: "o33ul21", md: "o33ul22" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
3250
|
+
var thumb2 = /* @__PURE__ */ _7a46818({ defaultClassName: "o33ul26", variantClassNames: { size: { sm: "o33ul27", md: "o33ul28" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
3251
|
+
var track2 = /* @__PURE__ */ _7a46818({ defaultClassName: "o33ul23", variantClassNames: { size: { sm: "o33ul24", md: "o33ul25" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
|
|
3175
3252
|
|
|
3176
3253
|
// src/components/Switch/Switch.tsx
|
|
3177
|
-
import { jsx as
|
|
3178
|
-
|
|
3179
|
-
|
|
3254
|
+
import { jsx as jsx38, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3255
|
+
function setNativeChecked(input6, checked) {
|
|
3256
|
+
Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "checked")?.set?.call(input6, checked);
|
|
3257
|
+
}
|
|
3258
|
+
var Switch = /* @__PURE__ */ forwardRef34(function Switch2({
|
|
3259
|
+
label: label6,
|
|
3260
|
+
size,
|
|
3261
|
+
id,
|
|
3262
|
+
className,
|
|
3263
|
+
disabled,
|
|
3264
|
+
required,
|
|
3265
|
+
name,
|
|
3266
|
+
value: value3 = "on",
|
|
3267
|
+
checked: checkedProp,
|
|
3268
|
+
defaultChecked,
|
|
3269
|
+
onCheckedChange,
|
|
3270
|
+
"aria-label": ariaLabel
|
|
3271
|
+
}, ref) {
|
|
3272
|
+
const generatedId = useId16();
|
|
3180
3273
|
const switchId = id ?? generatedId;
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3274
|
+
const [uncontrolled, setUncontrolled] = useState15(defaultChecked ?? false);
|
|
3275
|
+
const isControlled = checkedProp !== void 0;
|
|
3276
|
+
const checked = isControlled ? checkedProp : uncontrolled;
|
|
3277
|
+
const buttonRef = useRef15(null);
|
|
3278
|
+
const inputRef = useRef15(null);
|
|
3279
|
+
const [inForm, setInForm] = useState15(true);
|
|
3280
|
+
const userToggled = useRef15(false);
|
|
3281
|
+
const setChecked = (next) => {
|
|
3282
|
+
if (!isControlled) setUncontrolled(next);
|
|
3283
|
+
if (next !== checked) onCheckedChange?.(next);
|
|
3284
|
+
};
|
|
3285
|
+
const setCheckedRef = useRef15(setChecked);
|
|
3286
|
+
setCheckedRef.current = setChecked;
|
|
3287
|
+
useEffect10(() => {
|
|
3288
|
+
const form = buttonRef.current?.form;
|
|
3289
|
+
setInForm(!!form);
|
|
3290
|
+
if (!form) return;
|
|
3291
|
+
const initial = checked;
|
|
3292
|
+
const onReset = () => setCheckedRef.current(initial);
|
|
3293
|
+
form.addEventListener("reset", onReset);
|
|
3294
|
+
return () => form.removeEventListener("reset", onReset);
|
|
3295
|
+
}, []);
|
|
3296
|
+
useEffect10(() => {
|
|
3297
|
+
const input6 = inputRef.current;
|
|
3298
|
+
if (!input6 || input6.checked === checked) return;
|
|
3299
|
+
setNativeChecked(input6, checked);
|
|
3300
|
+
if (userToggled.current) input6.dispatchEvent(new Event("click", { bubbles: true }));
|
|
3301
|
+
userToggled.current = false;
|
|
3302
|
+
}, [checked]);
|
|
3303
|
+
const handleClick = (event) => {
|
|
3304
|
+
userToggled.current = true;
|
|
3305
|
+
setChecked(!checked);
|
|
3306
|
+
if (inForm) event.stopPropagation();
|
|
3307
|
+
};
|
|
3308
|
+
const state = checked ? "checked" : "unchecked";
|
|
3309
|
+
return /* @__PURE__ */ jsxs31("span", { className: cx(root12({ size }), className), "data-disabled": disabled || void 0, children: [
|
|
3310
|
+
/* @__PURE__ */ jsx38(
|
|
3311
|
+
"button",
|
|
3184
3312
|
{
|
|
3185
|
-
ref,
|
|
3313
|
+
ref: mergeRefs(ref, buttonRef),
|
|
3314
|
+
type: "button",
|
|
3315
|
+
role: "switch",
|
|
3186
3316
|
id: switchId,
|
|
3187
|
-
|
|
3317
|
+
"aria-checked": checked,
|
|
3318
|
+
"aria-required": required,
|
|
3188
3319
|
"aria-label": ariaLabel,
|
|
3320
|
+
"data-state": state,
|
|
3321
|
+
"data-disabled": disabled ? "" : void 0,
|
|
3322
|
+
disabled,
|
|
3323
|
+
value: value3,
|
|
3189
3324
|
className: track2({ size }),
|
|
3190
|
-
|
|
3191
|
-
children: /* @__PURE__ */
|
|
3325
|
+
onClick: handleClick,
|
|
3326
|
+
children: /* @__PURE__ */ jsx38("span", { className: thumb2({ size }), "data-state": state, "data-disabled": disabled ? "" : void 0 })
|
|
3192
3327
|
}
|
|
3193
3328
|
),
|
|
3194
|
-
|
|
3329
|
+
inForm && /* @__PURE__ */ jsx38(
|
|
3330
|
+
"input",
|
|
3331
|
+
{
|
|
3332
|
+
ref: inputRef,
|
|
3333
|
+
type: "checkbox",
|
|
3334
|
+
"aria-hidden": true,
|
|
3335
|
+
tabIndex: -1,
|
|
3336
|
+
defaultChecked: checked,
|
|
3337
|
+
required,
|
|
3338
|
+
disabled,
|
|
3339
|
+
name,
|
|
3340
|
+
value: value3,
|
|
3341
|
+
className: bubbleInput({ size })
|
|
3342
|
+
}
|
|
3343
|
+
),
|
|
3344
|
+
label6 && /* @__PURE__ */ jsx38("label", { htmlFor: switchId, className: label5, children: label6 })
|
|
3195
3345
|
] });
|
|
3196
3346
|
});
|
|
3197
3347
|
|
|
3198
3348
|
// src/components/Table/Table.tsx
|
|
3199
3349
|
import {
|
|
3200
3350
|
createContext as createContext3,
|
|
3201
|
-
forwardRef as
|
|
3351
|
+
forwardRef as forwardRef35,
|
|
3202
3352
|
useContext as useContext3,
|
|
3203
|
-
useId as
|
|
3353
|
+
useId as useId17
|
|
3204
3354
|
} from "react";
|
|
3205
3355
|
import { ArrowDownIcon, ArrowUpIcon } from "@bestow-ui/icons";
|
|
3206
3356
|
|
|
3207
3357
|
// src/components/Table/Table.css.ts
|
|
3208
|
-
import { createRuntimeFn as
|
|
3358
|
+
import { createRuntimeFn as _7a46819 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3209
3359
|
var body3 = "l3ploy5";
|
|
3210
3360
|
var caption = "l3ploy2";
|
|
3211
|
-
var cell2 = /* @__PURE__ */
|
|
3361
|
+
var cell2 = /* @__PURE__ */ _7a46819({ defaultClassName: "l3ploy9", variantClassNames: { size: { sm: "l3ploya", md: "l3ployb" }, align: { left: "l3ployc", center: "l3ployd", right: "l3ploye" } }, defaultVariants: { size: "md", align: "left" }, compoundVariants: [] });
|
|
3212
3362
|
var container = "l3ploy0";
|
|
3213
3363
|
var emptyCell = "l3ployj";
|
|
3214
3364
|
var emptyContent = "l3ployk";
|
|
@@ -3224,10 +3374,10 @@ var striped = "l3ploy6";
|
|
|
3224
3374
|
var table = "l3ploy1";
|
|
3225
3375
|
|
|
3226
3376
|
// src/components/Table/Table.tsx
|
|
3227
|
-
import { Fragment as Fragment6, jsx as
|
|
3377
|
+
import { Fragment as Fragment6, jsx as jsx39, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3228
3378
|
var TableSizeContext = /* @__PURE__ */ createContext3("md");
|
|
3229
3379
|
var TableSectionContext = /* @__PURE__ */ createContext3("body");
|
|
3230
|
-
var Table = /* @__PURE__ */
|
|
3380
|
+
var Table = /* @__PURE__ */ forwardRef35(function Table2({
|
|
3231
3381
|
size = "md",
|
|
3232
3382
|
striped: striped2,
|
|
3233
3383
|
stickyHeader: stickyHeader2,
|
|
@@ -3239,8 +3389,8 @@ var Table = /* @__PURE__ */ forwardRef34(function Table2({
|
|
|
3239
3389
|
children,
|
|
3240
3390
|
...rest
|
|
3241
3391
|
}, ref) {
|
|
3242
|
-
const captionId =
|
|
3243
|
-
return /* @__PURE__ */
|
|
3392
|
+
const captionId = useId17();
|
|
3393
|
+
return /* @__PURE__ */ jsx39(TableSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsx39(
|
|
3244
3394
|
"div",
|
|
3245
3395
|
{
|
|
3246
3396
|
className: cx(container, containerClassName),
|
|
@@ -3249,7 +3399,7 @@ var Table = /* @__PURE__ */ forwardRef34(function Table2({
|
|
|
3249
3399
|
role: "region",
|
|
3250
3400
|
"aria-labelledby": caption2 ? captionId : void 0,
|
|
3251
3401
|
"aria-label": caption2 ? void 0 : ariaLabel,
|
|
3252
|
-
children: /* @__PURE__ */
|
|
3402
|
+
children: /* @__PURE__ */ jsxs32(
|
|
3253
3403
|
"table",
|
|
3254
3404
|
{
|
|
3255
3405
|
ref,
|
|
@@ -3257,7 +3407,7 @@ var Table = /* @__PURE__ */ forwardRef34(function Table2({
|
|
|
3257
3407
|
"aria-label": caption2 ? void 0 : ariaLabel,
|
|
3258
3408
|
...rest,
|
|
3259
3409
|
children: [
|
|
3260
|
-
caption2 && /* @__PURE__ */
|
|
3410
|
+
caption2 && /* @__PURE__ */ jsx39("caption", { id: captionId, className: caption, children: caption2 }),
|
|
3261
3411
|
children
|
|
3262
3412
|
]
|
|
3263
3413
|
}
|
|
@@ -3265,31 +3415,31 @@ var Table = /* @__PURE__ */ forwardRef34(function Table2({
|
|
|
3265
3415
|
}
|
|
3266
3416
|
) });
|
|
3267
3417
|
});
|
|
3268
|
-
var TableHeader = /* @__PURE__ */
|
|
3418
|
+
var TableHeader = /* @__PURE__ */ forwardRef35(
|
|
3269
3419
|
function TableHeader2({ className, ...rest }, ref) {
|
|
3270
|
-
return /* @__PURE__ */
|
|
3420
|
+
return /* @__PURE__ */ jsx39(TableSectionContext.Provider, { value: "header", children: /* @__PURE__ */ jsx39("thead", { ref, className: cx(header7, className), ...rest }) });
|
|
3271
3421
|
}
|
|
3272
3422
|
);
|
|
3273
|
-
var TableBody = /* @__PURE__ */
|
|
3423
|
+
var TableBody = /* @__PURE__ */ forwardRef35(
|
|
3274
3424
|
function TableBody2({ className, ...rest }, ref) {
|
|
3275
|
-
return /* @__PURE__ */
|
|
3425
|
+
return /* @__PURE__ */ jsx39(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ jsx39("tbody", { ref, className: cx(body3, className), ...rest }) });
|
|
3276
3426
|
}
|
|
3277
3427
|
);
|
|
3278
|
-
var TableFooter = /* @__PURE__ */
|
|
3428
|
+
var TableFooter = /* @__PURE__ */ forwardRef35(
|
|
3279
3429
|
function TableFooter2({ className, ...rest }, ref) {
|
|
3280
|
-
return /* @__PURE__ */
|
|
3430
|
+
return /* @__PURE__ */ jsx39(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ jsx39("tfoot", { ref, className: cx(footer3, className), ...rest }) });
|
|
3281
3431
|
}
|
|
3282
3432
|
);
|
|
3283
|
-
var TableRow = /* @__PURE__ */
|
|
3284
|
-
return /* @__PURE__ */
|
|
3433
|
+
var TableRow = /* @__PURE__ */ forwardRef35(function TableRow2({ selected, className, ...rest }, ref) {
|
|
3434
|
+
return /* @__PURE__ */ jsx39("tr", { ref, className: cx(row3, className), "data-state": selected ? "selected" : void 0, ...rest });
|
|
3285
3435
|
});
|
|
3286
|
-
var TableHead = /* @__PURE__ */
|
|
3436
|
+
var TableHead = /* @__PURE__ */ forwardRef35(function TableHead2({ align, sortDirection, onSort, scope, className, children, ...rest }, ref) {
|
|
3287
3437
|
const size = useContext3(TableSizeContext);
|
|
3288
3438
|
const section = useContext3(TableSectionContext);
|
|
3289
3439
|
const sortable = onSort !== void 0;
|
|
3290
3440
|
const direction = sortDirection ?? "none";
|
|
3291
3441
|
const SortIcon = direction === "descending" ? ArrowDownIcon : ArrowUpIcon;
|
|
3292
|
-
return /* @__PURE__ */
|
|
3442
|
+
return /* @__PURE__ */ jsx39(
|
|
3293
3443
|
"th",
|
|
3294
3444
|
{
|
|
3295
3445
|
ref,
|
|
@@ -3301,17 +3451,17 @@ var TableHead = /* @__PURE__ */ forwardRef34(function TableHead2({ align, sortDi
|
|
|
3301
3451
|
className
|
|
3302
3452
|
),
|
|
3303
3453
|
...rest,
|
|
3304
|
-
children: sortable ? /* @__PURE__ */
|
|
3454
|
+
children: sortable ? /* @__PURE__ */ jsxs32("button", { type: "button", className: sortButton, onClick: onSort, children: [
|
|
3305
3455
|
children,
|
|
3306
|
-
/* @__PURE__ */
|
|
3456
|
+
/* @__PURE__ */ jsx39(SortIcon, { size: 14, className: sortIcon, "data-active": direction !== "none", "aria-hidden": true })
|
|
3307
3457
|
] }) : children
|
|
3308
3458
|
}
|
|
3309
3459
|
);
|
|
3310
3460
|
});
|
|
3311
|
-
var TableCell = /* @__PURE__ */
|
|
3461
|
+
var TableCell = /* @__PURE__ */ forwardRef35(function TableCell2({ align, className, ...rest }, ref) {
|
|
3312
3462
|
const size = useContext3(TableSizeContext);
|
|
3313
3463
|
const section = useContext3(TableSectionContext);
|
|
3314
|
-
return /* @__PURE__ */
|
|
3464
|
+
return /* @__PURE__ */ jsx39(
|
|
3315
3465
|
"td",
|
|
3316
3466
|
{
|
|
3317
3467
|
ref,
|
|
@@ -3320,17 +3470,17 @@ var TableCell = /* @__PURE__ */ forwardRef34(function TableCell2({ align, classN
|
|
|
3320
3470
|
}
|
|
3321
3471
|
);
|
|
3322
3472
|
});
|
|
3323
|
-
var TableEmpty = /* @__PURE__ */
|
|
3324
|
-
return /* @__PURE__ */
|
|
3473
|
+
var TableEmpty = /* @__PURE__ */ forwardRef35(function TableEmpty2({ colSpan, className, children, ...rest }, ref) {
|
|
3474
|
+
return /* @__PURE__ */ jsx39(TableRow, { children: /* @__PURE__ */ jsx39(TableCell, { ref, colSpan, className: cx(emptyCell, className), ...rest, children: /* @__PURE__ */ jsx39("div", { className: emptyContent, children }) }) });
|
|
3325
3475
|
});
|
|
3326
3476
|
function TableSkeleton({ rows = 5, columns }) {
|
|
3327
|
-
return /* @__PURE__ */
|
|
3477
|
+
return /* @__PURE__ */ jsx39(Fragment6, { children: Array.from({ length: rows }, (_, row5) => /* @__PURE__ */ jsx39(TableRow, { "aria-hidden": true, children: Array.from({ length: columns }, (_2, column) => /* @__PURE__ */ jsx39(TableCell, { children: /* @__PURE__ */ jsx39(Skeleton, { width: column === 0 ? "60%" : "80%" }) }, column)) }, row5)) });
|
|
3328
3478
|
}
|
|
3329
3479
|
|
|
3330
3480
|
// src/components/Table/useTableSelection.ts
|
|
3331
|
-
import { useCallback, useState as
|
|
3481
|
+
import { useCallback, useState as useState16 } from "react";
|
|
3332
3482
|
function useTableSelection(initial = []) {
|
|
3333
|
-
const [selected, setSelected] =
|
|
3483
|
+
const [selected, setSelected] = useState16(initial);
|
|
3334
3484
|
const isSelected = useCallback((id) => selected.includes(id), [selected]);
|
|
3335
3485
|
const toggle3 = useCallback((id, checked) => {
|
|
3336
3486
|
setSelected((prev) => {
|
|
@@ -3360,54 +3510,54 @@ function useTableSelection(initial = []) {
|
|
|
3360
3510
|
|
|
3361
3511
|
// src/components/Tabs/Tabs.tsx
|
|
3362
3512
|
import * as RadixTabs from "@radix-ui/react-tabs";
|
|
3363
|
-
import { createContext as createContext4, forwardRef as
|
|
3513
|
+
import { createContext as createContext4, forwardRef as forwardRef36, useContext as useContext4 } from "react";
|
|
3364
3514
|
|
|
3365
3515
|
// src/components/Tabs/Tabs.css.ts
|
|
3366
|
-
import { createRuntimeFn as
|
|
3516
|
+
import { createRuntimeFn as _7a46820 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3367
3517
|
var content10 = "fvhbtdb";
|
|
3368
|
-
var list6 = /* @__PURE__ */
|
|
3518
|
+
var list6 = /* @__PURE__ */ _7a46820({ defaultClassName: "fvhbtd1", variantClassNames: { variant: { line: "fvhbtd2", soft: "fvhbtd3" } }, defaultVariants: { variant: "line" }, compoundVariants: [] });
|
|
3369
3519
|
var root13 = "fvhbtd0";
|
|
3370
|
-
var trigger3 = /* @__PURE__ */
|
|
3520
|
+
var trigger3 = /* @__PURE__ */ _7a46820({ 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"]] });
|
|
3371
3521
|
|
|
3372
3522
|
// src/components/Tabs/Tabs.tsx
|
|
3373
|
-
import { jsx as
|
|
3523
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
3374
3524
|
var TabsStyleContext = /* @__PURE__ */ createContext4({ variant: "line", size: "md" });
|
|
3375
|
-
var Tabs = /* @__PURE__ */
|
|
3525
|
+
var Tabs = /* @__PURE__ */ forwardRef36(function Tabs2({ variant = "line", size = "md", className, ...props }, ref) {
|
|
3376
3526
|
const controlled = "value" in props ? { value: props.value ?? "" } : {};
|
|
3377
|
-
return /* @__PURE__ */
|
|
3527
|
+
return /* @__PURE__ */ jsx40(TabsStyleContext.Provider, { value: { variant, size }, children: /* @__PURE__ */ jsx40(RadixTabs.Root, { ref, className: cx(root13, className), ...props, ...controlled }) });
|
|
3378
3528
|
});
|
|
3379
|
-
var TabsList = /* @__PURE__ */
|
|
3529
|
+
var TabsList = /* @__PURE__ */ forwardRef36(function TabsList2({ className, ...rest }, ref) {
|
|
3380
3530
|
const { variant } = useContext4(TabsStyleContext);
|
|
3381
|
-
return /* @__PURE__ */
|
|
3531
|
+
return /* @__PURE__ */ jsx40(RadixTabs.List, { ref, className: cx(list6({ variant }), className), ...rest });
|
|
3382
3532
|
});
|
|
3383
|
-
var TabsTrigger = /* @__PURE__ */
|
|
3533
|
+
var TabsTrigger = /* @__PURE__ */ forwardRef36(function TabsTrigger2({ className, ...rest }, ref) {
|
|
3384
3534
|
const { variant, size } = useContext4(TabsStyleContext);
|
|
3385
|
-
return /* @__PURE__ */
|
|
3535
|
+
return /* @__PURE__ */ jsx40(RadixTabs.Trigger, { ref, className: cx(trigger3({ variant, size }), className), ...rest });
|
|
3386
3536
|
});
|
|
3387
|
-
var TabsContent = /* @__PURE__ */
|
|
3388
|
-
return /* @__PURE__ */
|
|
3537
|
+
var TabsContent = /* @__PURE__ */ forwardRef36(function TabsContent2({ className, ...rest }, ref) {
|
|
3538
|
+
return /* @__PURE__ */ jsx40(RadixTabs.Content, { ref, className: cx(content10, className), ...rest });
|
|
3389
3539
|
});
|
|
3390
3540
|
|
|
3391
3541
|
// src/components/Textarea/Textarea.tsx
|
|
3392
3542
|
import {
|
|
3393
|
-
forwardRef as
|
|
3543
|
+
forwardRef as forwardRef37,
|
|
3394
3544
|
useCallback as useCallback2,
|
|
3395
|
-
useId as
|
|
3396
|
-
useRef as
|
|
3397
|
-
useState as
|
|
3545
|
+
useId as useId18,
|
|
3546
|
+
useRef as useRef16,
|
|
3547
|
+
useState as useState17
|
|
3398
3548
|
} from "react";
|
|
3399
3549
|
|
|
3400
3550
|
// src/components/Textarea/Textarea.css.ts
|
|
3401
|
-
import { createRuntimeFn as
|
|
3551
|
+
import { createRuntimeFn as _7a46821 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3402
3552
|
var count = "_1koawa9";
|
|
3403
3553
|
var countOver = "_1koawaa";
|
|
3404
3554
|
var defaultWidth = "_1koawa7";
|
|
3405
3555
|
var footer4 = "_1koawa8";
|
|
3406
|
-
var textarea = /* @__PURE__ */
|
|
3556
|
+
var textarea = /* @__PURE__ */ _7a46821({ defaultClassName: "_1koawa0", variantClassNames: { size: { sm: "_1koawa1", md: "_1koawa2", lg: "_1koawa3" }, resize: { none: "_1koawa4", vertical: "_1koawa5", both: "_1koawa6" } }, defaultVariants: { size: "md", resize: "vertical" }, compoundVariants: [] });
|
|
3407
3557
|
|
|
3408
3558
|
// src/components/Textarea/Textarea.tsx
|
|
3409
|
-
import { jsx as
|
|
3410
|
-
var Textarea = /* @__PURE__ */
|
|
3559
|
+
import { jsx as jsx41, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3560
|
+
var Textarea = /* @__PURE__ */ forwardRef37(function Textarea2({
|
|
3411
3561
|
label: label6,
|
|
3412
3562
|
helperText: helperText3,
|
|
3413
3563
|
error,
|
|
@@ -3428,11 +3578,11 @@ var Textarea = /* @__PURE__ */ forwardRef36(function Textarea2({
|
|
|
3428
3578
|
"aria-describedby": ariaDescribedBy,
|
|
3429
3579
|
...rest
|
|
3430
3580
|
}, ref) {
|
|
3431
|
-
const generatedId =
|
|
3581
|
+
const generatedId = useId18();
|
|
3432
3582
|
const textareaId = id ?? generatedId;
|
|
3433
3583
|
const helperId = helperText3 ? `${textareaId}-helper` : void 0;
|
|
3434
|
-
const innerRef =
|
|
3435
|
-
const [uncontrolledLength, setUncontrolledLength] =
|
|
3584
|
+
const innerRef = useRef16(null);
|
|
3585
|
+
const [uncontrolledLength, setUncontrolledLength] = useState17(() => String(defaultValue ?? "").length);
|
|
3436
3586
|
const length = value3 !== void 0 ? String(value3).length : uncontrolledLength;
|
|
3437
3587
|
const fitHeight = useCallback2(() => {
|
|
3438
3588
|
const el = innerRef.current;
|
|
@@ -3447,12 +3597,12 @@ var Textarea = /* @__PURE__ */ forwardRef36(function Textarea2({
|
|
|
3447
3597
|
fitHeight();
|
|
3448
3598
|
onChange?.(event);
|
|
3449
3599
|
};
|
|
3450
|
-
return /* @__PURE__ */
|
|
3451
|
-
label6 && /* @__PURE__ */
|
|
3600
|
+
return /* @__PURE__ */ jsxs33("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
|
|
3601
|
+
label6 && /* @__PURE__ */ jsxs33("label", { htmlFor: textareaId, className: label, children: [
|
|
3452
3602
|
label6,
|
|
3453
|
-
required && /* @__PURE__ */
|
|
3603
|
+
required && /* @__PURE__ */ jsx41("span", { className: requiredMark, "aria-hidden": true, children: "*" })
|
|
3454
3604
|
] }),
|
|
3455
|
-
/* @__PURE__ */
|
|
3605
|
+
/* @__PURE__ */ jsx41(
|
|
3456
3606
|
"textarea",
|
|
3457
3607
|
{
|
|
3458
3608
|
ref: mergeRefs(innerRef, ref),
|
|
@@ -3474,36 +3624,36 @@ var Textarea = /* @__PURE__ */ forwardRef36(function Textarea2({
|
|
|
3474
3624
|
...rest
|
|
3475
3625
|
}
|
|
3476
3626
|
),
|
|
3477
|
-
(helperText3 || showCount) && /* @__PURE__ */
|
|
3478
|
-
helperText3 && /* @__PURE__ */
|
|
3479
|
-
showCount && /* @__PURE__ */
|
|
3627
|
+
(helperText3 || showCount) && /* @__PURE__ */ jsxs33("div", { className: footer4, children: [
|
|
3628
|
+
helperText3 && /* @__PURE__ */ jsx41("p", { id: helperId, className: helperText({ error }), children: helperText3 }),
|
|
3629
|
+
showCount && /* @__PURE__ */ jsx41("span", { className: cx(count, maxLength !== void 0 && length >= maxLength && countOver), children: maxLength !== void 0 ? `${length}/${maxLength}` : length })
|
|
3480
3630
|
] })
|
|
3481
3631
|
] });
|
|
3482
3632
|
});
|
|
3483
3633
|
|
|
3484
3634
|
// src/components/Toast/Toast.tsx
|
|
3485
3635
|
import * as RadixToast from "@radix-ui/react-toast";
|
|
3486
|
-
import { createContext as createContext5, useCallback as useCallback3, useContext as useContext5, useMemo as useMemo4, useRef as
|
|
3636
|
+
import { createContext as createContext5, useCallback as useCallback3, useContext as useContext5, useMemo as useMemo4, useRef as useRef17, useState as useState18 } from "react";
|
|
3487
3637
|
import { XIcon as XIcon7 } from "@bestow-ui/icons";
|
|
3488
3638
|
|
|
3489
3639
|
// src/components/Toast/Toast.css.ts
|
|
3490
|
-
import { createRuntimeFn as
|
|
3640
|
+
import { createRuntimeFn as _7a46822 } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
3491
3641
|
var action2 = "_1g11zvx9";
|
|
3492
3642
|
var close = "_1g11zvxa";
|
|
3493
3643
|
var description6 = "_1g11zvx8";
|
|
3494
3644
|
var title5 = "_1g11zvx7";
|
|
3495
|
-
var toast = /* @__PURE__ */
|
|
3645
|
+
var toast = /* @__PURE__ */ _7a46822({ defaultClassName: "_1g11zvx1", variantClassNames: { color: { primary: "_1g11zvx2", neutral: "_1g11zvx3", success: "_1g11zvx4", warning: "_1g11zvx5", danger: "_1g11zvx6" } }, defaultVariants: { color: "neutral" }, compoundVariants: [] });
|
|
3496
3646
|
var viewport2 = "_1g11zvx0";
|
|
3497
3647
|
|
|
3498
3648
|
// src/components/Toast/Toast.tsx
|
|
3499
|
-
import { jsx as
|
|
3649
|
+
import { jsx as jsx42, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
3500
3650
|
var REMOVE_DELAY = 500;
|
|
3501
3651
|
var ToastContext = /* @__PURE__ */ createContext5(null);
|
|
3502
3652
|
function ToastProvider({ children, duration = 5e3, label: labelProp }) {
|
|
3503
3653
|
const m = useMessages();
|
|
3504
3654
|
const label6 = labelProp ?? m.notifications ?? "\uC54C\uB9BC";
|
|
3505
|
-
const [toasts, setToasts] =
|
|
3506
|
-
const nextId =
|
|
3655
|
+
const [toasts, setToasts] = useState18([]);
|
|
3656
|
+
const nextId = useRef17(0);
|
|
3507
3657
|
const portal2 = usePortalProps();
|
|
3508
3658
|
const toast2 = useCallback3((options) => {
|
|
3509
3659
|
const id = nextId.current++;
|
|
@@ -3516,9 +3666,9 @@ function ToastProvider({ children, duration = 5e3, label: labelProp }) {
|
|
|
3516
3666
|
setTimeout(() => setToasts((prev) => prev.filter((t) => t.open || !isTarget(t))), REMOVE_DELAY);
|
|
3517
3667
|
}, []);
|
|
3518
3668
|
const value3 = useMemo4(() => ({ toast: toast2, dismiss }), [toast2, dismiss]);
|
|
3519
|
-
return /* @__PURE__ */
|
|
3669
|
+
return /* @__PURE__ */ jsx42(ToastContext.Provider, { value: value3, children: /* @__PURE__ */ jsxs34(RadixToast.Provider, { duration, label: label6, swipeDirection: "right", children: [
|
|
3520
3670
|
children,
|
|
3521
|
-
toasts.map(({ id, open, title: title6, description: description7, color, duration: itemDuration, action: action3 }) => /* @__PURE__ */
|
|
3671
|
+
toasts.map(({ id, open, title: title6, description: description7, color, duration: itemDuration, action: action3 }) => /* @__PURE__ */ jsxs34(
|
|
3522
3672
|
RadixToast.Root,
|
|
3523
3673
|
{
|
|
3524
3674
|
open,
|
|
@@ -3528,15 +3678,15 @@ function ToastProvider({ children, duration = 5e3, label: labelProp }) {
|
|
|
3528
3678
|
},
|
|
3529
3679
|
className: toast({ color }),
|
|
3530
3680
|
children: [
|
|
3531
|
-
/* @__PURE__ */
|
|
3532
|
-
description7 && /* @__PURE__ */
|
|
3533
|
-
action3 && /* @__PURE__ */
|
|
3534
|
-
/* @__PURE__ */
|
|
3681
|
+
/* @__PURE__ */ jsx42(RadixToast.Title, { className: title5, children: title6 }),
|
|
3682
|
+
description7 && /* @__PURE__ */ jsx42(RadixToast.Description, { className: description6, children: description7 }),
|
|
3683
|
+
action3 && /* @__PURE__ */ jsx42(RadixToast.Action, { asChild: true, altText: action3.altText ?? action3.label, className: action2, children: /* @__PURE__ */ jsx42(Button, { size: "sm", variant: "soft", color: "neutral", onClick: action3.onClick, children: action3.label }) }),
|
|
3684
|
+
/* @__PURE__ */ jsx42(RadixToast.Close, { className: close, "aria-label": m.close ?? "\uB2EB\uAE30", children: /* @__PURE__ */ jsx42(XIcon7, { size: 16 }) })
|
|
3535
3685
|
]
|
|
3536
3686
|
},
|
|
3537
3687
|
id
|
|
3538
3688
|
)),
|
|
3539
|
-
/* @__PURE__ */
|
|
3689
|
+
/* @__PURE__ */ jsx42(RadixToast.Viewport, { className: cx(portal2.className, viewport2), style: portal2.style })
|
|
3540
3690
|
] }) });
|
|
3541
3691
|
}
|
|
3542
3692
|
function useToast() {
|
|
@@ -3553,7 +3703,7 @@ var arrow2 = "z7rufs1";
|
|
|
3553
3703
|
var content11 = "z7rufs0";
|
|
3554
3704
|
|
|
3555
3705
|
// src/components/Tooltip/Tooltip.tsx
|
|
3556
|
-
import { jsx as
|
|
3706
|
+
import { jsx as jsx43, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
3557
3707
|
function Tooltip({
|
|
3558
3708
|
content: content12,
|
|
3559
3709
|
children,
|
|
@@ -3568,9 +3718,9 @@ function Tooltip({
|
|
|
3568
3718
|
}) {
|
|
3569
3719
|
const portal2 = usePortalProps();
|
|
3570
3720
|
if (disabled || content12 == null || content12 === "") return children;
|
|
3571
|
-
return /* @__PURE__ */
|
|
3572
|
-
/* @__PURE__ */
|
|
3573
|
-
/* @__PURE__ */
|
|
3721
|
+
return /* @__PURE__ */ jsx43(RadixTooltip.Provider, { delayDuration: delay, children: /* @__PURE__ */ jsxs35(RadixTooltip.Root, { open, defaultOpen, onOpenChange, children: [
|
|
3722
|
+
/* @__PURE__ */ jsx43(RadixTooltip.Trigger, { asChild: true, children }),
|
|
3723
|
+
/* @__PURE__ */ jsx43(RadixTooltip.Portal, { children: /* @__PURE__ */ jsxs35(
|
|
3574
3724
|
RadixTooltip.Content,
|
|
3575
3725
|
{
|
|
3576
3726
|
side,
|
|
@@ -3581,7 +3731,7 @@ function Tooltip({
|
|
|
3581
3731
|
style: portal2.style,
|
|
3582
3732
|
children: [
|
|
3583
3733
|
content12,
|
|
3584
|
-
/* @__PURE__ */
|
|
3734
|
+
/* @__PURE__ */ jsx43(RadixTooltip.Arrow, { className: arrow2, width: 10, height: 5 })
|
|
3585
3735
|
]
|
|
3586
3736
|
}
|
|
3587
3737
|
) })
|
|
@@ -3589,7 +3739,7 @@ function Tooltip({
|
|
|
3589
3739
|
}
|
|
3590
3740
|
|
|
3591
3741
|
// src/components/VerificationCodeInput/VerificationCodeInput.tsx
|
|
3592
|
-
import { forwardRef as
|
|
3742
|
+
import { forwardRef as forwardRef38, useEffect as useEffect11, useId as useId19, useRef as useRef18, useState as useState19 } from "react";
|
|
3593
3743
|
|
|
3594
3744
|
// src/components/VerificationCodeInput/VerificationCodeInput.css.ts
|
|
3595
3745
|
var input5 = "ea01812";
|
|
@@ -3599,9 +3749,9 @@ var slots = "ea01811";
|
|
|
3599
3749
|
var timer = "ea01814";
|
|
3600
3750
|
|
|
3601
3751
|
// src/components/VerificationCodeInput/VerificationCodeInput.tsx
|
|
3602
|
-
import { jsx as
|
|
3752
|
+
import { jsx as jsx44, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
3603
3753
|
var formatTime = (seconds) => `${String(Math.floor(seconds / 60)).padStart(2, "0")}:${String(seconds % 60).padStart(2, "0")}`;
|
|
3604
|
-
var VerificationCodeInput = /* @__PURE__ */
|
|
3754
|
+
var VerificationCodeInput = /* @__PURE__ */ forwardRef38(
|
|
3605
3755
|
function VerificationCodeInput2(props, ref) {
|
|
3606
3756
|
const {
|
|
3607
3757
|
length = 6,
|
|
@@ -3628,23 +3778,23 @@ var VerificationCodeInput = /* @__PURE__ */ forwardRef37(
|
|
|
3628
3778
|
const label6 = labelProp ?? m.verificationCode ?? "\uC778\uC99D\uBC88\uD638";
|
|
3629
3779
|
const resendText = resendTextProp ?? m.resend ?? "\uC7AC\uC804\uC1A1";
|
|
3630
3780
|
const expiredText = expiredTextProp ?? m.verificationExpired ?? "\uC778\uC99D \uC2DC\uAC04\uC774 \uC9C0\uB0AC\uC5B4\uC694. \uC7AC\uC804\uC1A1\uD574 \uC8FC\uC138\uC694.";
|
|
3631
|
-
const generatedId =
|
|
3781
|
+
const generatedId = useId19();
|
|
3632
3782
|
const inputId = id ?? generatedId;
|
|
3633
3783
|
const helperId = `${inputId}-helper`;
|
|
3634
3784
|
const statusId = `${inputId}-status`;
|
|
3635
|
-
const inputRef =
|
|
3785
|
+
const inputRef = useRef18(null);
|
|
3636
3786
|
const isControlled = "value" in props;
|
|
3637
|
-
const [innerValue, setInnerValue] =
|
|
3787
|
+
const [innerValue, setInnerValue] = useState19(defaultValue ?? "");
|
|
3638
3788
|
const code = (isControlled ? value3 ?? "" : innerValue).slice(0, length);
|
|
3639
|
-
const [focused, setFocused] =
|
|
3640
|
-
const [endAt, setEndAt] =
|
|
3641
|
-
const [remaining, setRemaining] =
|
|
3789
|
+
const [focused, setFocused] = useState19(false);
|
|
3790
|
+
const [endAt, setEndAt] = useState19(() => expiresIn ? Date.now() + expiresIn * 1e3 : null);
|
|
3791
|
+
const [remaining, setRemaining] = useState19(expiresIn ?? 0);
|
|
3642
3792
|
const expired = expiresIn !== void 0 && remaining <= 0;
|
|
3643
|
-
const onExpireRef =
|
|
3644
|
-
|
|
3793
|
+
const onExpireRef = useRef18(onExpire);
|
|
3794
|
+
useEffect11(() => {
|
|
3645
3795
|
onExpireRef.current = onExpire;
|
|
3646
3796
|
});
|
|
3647
|
-
|
|
3797
|
+
useEffect11(() => {
|
|
3648
3798
|
if (endAt === null) return;
|
|
3649
3799
|
const tick = () => {
|
|
3650
3800
|
const left = Math.max(0, Math.ceil((endAt - Date.now()) / 1e3));
|
|
@@ -3679,17 +3829,17 @@ var VerificationCodeInput = /* @__PURE__ */ forwardRef37(
|
|
|
3679
3829
|
};
|
|
3680
3830
|
const description7 = helperText3 ?? m.verificationCodeHint?.(length, type) ?? `${length}\uC790\uB9AC ${type === "numeric" ? "\uC22B\uC790" : "\uBB38\uC790"}\uB97C \uC785\uB825\uD558\uC138\uC694.`;
|
|
3681
3831
|
const activeIndex = Math.min(code.length, length - 1);
|
|
3682
|
-
return /* @__PURE__ */
|
|
3832
|
+
return /* @__PURE__ */ jsxs36(
|
|
3683
3833
|
"div",
|
|
3684
3834
|
{
|
|
3685
3835
|
className: cx(field, className),
|
|
3686
3836
|
"data-invalid": error || void 0,
|
|
3687
3837
|
"data-disabled": disabled || void 0,
|
|
3688
3838
|
children: [
|
|
3689
|
-
/* @__PURE__ */
|
|
3690
|
-
/* @__PURE__ */
|
|
3691
|
-
/* @__PURE__ */
|
|
3692
|
-
/* @__PURE__ */
|
|
3839
|
+
/* @__PURE__ */ jsx44("label", { htmlFor: inputId, className: label, children: label6 }),
|
|
3840
|
+
/* @__PURE__ */ jsxs36("div", { className: row4, children: [
|
|
3841
|
+
/* @__PURE__ */ jsxs36("div", { className: slots, children: [
|
|
3842
|
+
/* @__PURE__ */ jsx44(
|
|
3693
3843
|
"input",
|
|
3694
3844
|
{
|
|
3695
3845
|
ref: mergeRefs(ref, inputRef),
|
|
@@ -3709,7 +3859,7 @@ var VerificationCodeInput = /* @__PURE__ */ forwardRef37(
|
|
|
3709
3859
|
className: input5
|
|
3710
3860
|
}
|
|
3711
3861
|
),
|
|
3712
|
-
Array.from({ length }, (_, index) => /* @__PURE__ */
|
|
3862
|
+
Array.from({ length }, (_, index) => /* @__PURE__ */ jsx44(
|
|
3713
3863
|
"div",
|
|
3714
3864
|
{
|
|
3715
3865
|
className: slot,
|
|
@@ -3720,12 +3870,12 @@ var VerificationCodeInput = /* @__PURE__ */ forwardRef37(
|
|
|
3720
3870
|
index
|
|
3721
3871
|
))
|
|
3722
3872
|
] }),
|
|
3723
|
-
expiresIn !== void 0 && /* @__PURE__ */
|
|
3724
|
-
onResend && /* @__PURE__ */
|
|
3873
|
+
expiresIn !== void 0 && /* @__PURE__ */ jsx44("span", { role: "timer", className: timer, children: formatTime(remaining) }),
|
|
3874
|
+
onResend && /* @__PURE__ */ jsx44(Button, { size: "sm", variant: "outline", color: "neutral", onClick: resend, disabled, children: resendText })
|
|
3725
3875
|
] }),
|
|
3726
|
-
/* @__PURE__ */
|
|
3727
|
-
/* @__PURE__ */
|
|
3728
|
-
name && /* @__PURE__ */
|
|
3876
|
+
/* @__PURE__ */ jsx44("p", { id: helperId, className: helperText({ error }), children: description7 }),
|
|
3877
|
+
/* @__PURE__ */ jsx44("p", { id: statusId, role: "status", className: helperText({ error: true }), children: expired ? expiredText : "" }),
|
|
3878
|
+
name && /* @__PURE__ */ jsx44("input", { type: "hidden", name, value: code })
|
|
3729
3879
|
]
|
|
3730
3880
|
}
|
|
3731
3881
|
);
|
|
@@ -3770,6 +3920,7 @@ export {
|
|
|
3770
3920
|
LocaleProvider,
|
|
3771
3921
|
Modal,
|
|
3772
3922
|
ModalClose,
|
|
3923
|
+
NativeSelect,
|
|
3773
3924
|
NumberInput,
|
|
3774
3925
|
Pagination,
|
|
3775
3926
|
PhoneNumberInput,
|