@bestow-ui/react 1.6.1 → 1.8.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/dist/client.js CHANGED
@@ -3,49 +3,103 @@ import {
3
3
  Skeleton,
4
4
  addDays,
5
5
  addMonths,
6
+ adornment,
6
7
  compareDays,
7
8
  cx,
9
+ field,
10
+ fieldFullWidth,
8
11
  focusField,
9
12
  getCalendarWeeks,
13
+ helperText,
14
+ input,
10
15
  isSameDay,
11
16
  isSameMonth,
12
17
  kakaoPostcodeProvider,
18
+ label,
13
19
  mergeThemes,
14
20
  parseISODate,
15
21
  presetRange,
22
+ requiredMark,
23
+ root,
24
+ systemThemeClass,
16
25
  themeClass,
17
26
  themeToStyle,
18
27
  toISODate,
19
28
  visuallyHidden
20
- } from "./chunk-NKLDAXUR.js";
29
+ } from "./chunk-MP5VSIWQ.js";
21
30
 
22
31
  // src/theme/ThemeProvider.tsx
23
- import { createContext, forwardRef, useContext, useMemo } from "react";
32
+ import { createContext, forwardRef, useContext, useId, useMemo } from "react";
24
33
 
25
34
  // src/theme/ThemeProvider.css.ts
26
35
  var portal = "sfyhlv0";
27
- var root = "sfyhlv1 sfyhlv0";
36
+ var root2 = "sfyhlv1 sfyhlv0";
37
+
38
+ // src/theme/useSystemTheme.ts
39
+ import { useSyncExternalStore } from "react";
40
+ var query = "(prefers-color-scheme: dark)";
41
+ var getMediaQuery = () => typeof window !== "undefined" && window.matchMedia ? window.matchMedia(query) : void 0;
42
+ function subscribe(onChange) {
43
+ const mql = getMediaQuery();
44
+ mql?.addEventListener("change", onChange);
45
+ return () => mql?.removeEventListener("change", onChange);
46
+ }
47
+ var noopSubscribe = () => () => {
48
+ };
49
+ var getSnapshot = () => getMediaQuery()?.matches ? "dark" : "light";
50
+ var getLight = () => "light";
51
+ var getServerSnapshot = () => null;
52
+ function useSystemTheme(enabled) {
53
+ return useSyncExternalStore(
54
+ enabled ? subscribe : noopSubscribe,
55
+ enabled ? getSnapshot : getLight,
56
+ enabled ? getServerSnapshot : getLight
57
+ );
58
+ }
28
59
 
29
60
  // src/theme/ThemeProvider.tsx
30
- import { jsx } from "react/jsx-runtime";
31
- var ThemeContext = /* @__PURE__ */ createContext({ theme: "light" });
61
+ import { jsx, jsxs } from "react/jsx-runtime";
62
+ var ThemeContext = /* @__PURE__ */ createContext({
63
+ mode: "light",
64
+ theme: "light",
65
+ pending: false
66
+ });
67
+ var declarations = (style) => (
68
+ // 값은 개발자가 준 테마지만 </style> 로 태그가 끝나지 않게 < 를 CSS 이스케이프로 바꾼다
69
+ Object.entries(style ?? {}).map(([name, value3]) => `${name}:${value3.replace(/</g, "\\3c ")}`).join(";")
70
+ );
71
+ function pendingOverridesCss(selector, theme) {
72
+ const light = declarations(themeToStyle(theme, "light"));
73
+ const dark = declarations(themeToStyle(theme, "dark"));
74
+ if (!light && !dark) return void 0;
75
+ return `${selector}{${light}}@media (prefers-color-scheme: dark){${selector}{${dark}}}`;
76
+ }
32
77
  var ThemeProvider = /* @__PURE__ */ forwardRef(function ThemeProvider2({ theme: themeProp, overrides, className, style, children, ...rest }, ref) {
33
78
  const parent = useContext(ThemeContext);
34
- const theme = themeProp ?? parent.theme;
79
+ const mode = themeProp ?? parent.mode;
80
+ const system = useSystemTheme(mode === "system");
81
+ const pending = mode === "system" && system === null;
82
+ const theme = mode === "system" ? system ?? "light" : mode;
35
83
  const merged = useMemo(() => mergeThemes(parent.overrides, overrides), [parent.overrides, overrides]);
36
84
  const value3 = useMemo(
37
- () => ({ theme, overrides: merged, style: themeToStyle(merged, theme) }),
38
- [theme, merged]
85
+ () => ({ mode, theme, pending, overrides: merged, style: pending ? void 0 : themeToStyle(merged, theme) }),
86
+ [mode, theme, pending, merged]
39
87
  );
40
- return /* @__PURE__ */ jsx(ThemeContext.Provider, { value: value3, children: /* @__PURE__ */ jsx(
88
+ const id = useId();
89
+ const pendingCss = pending && pendingOverridesCss(`.${systemThemeClass}[data-bestow-theme-id="${id}"]`, merged);
90
+ return /* @__PURE__ */ jsx(ThemeContext.Provider, { value: value3, children: /* @__PURE__ */ jsxs(
41
91
  "div",
42
92
  {
43
93
  ref,
44
- "data-theme": theme,
45
- className: cx(themeClass[theme], root, className),
94
+ "data-theme": pending ? "system" : theme,
95
+ "data-bestow-theme-id": pendingCss ? id : void 0,
96
+ className: cx(pending ? systemThemeClass : themeClass[theme], root2, className),
46
97
  style: value3.style ? { ...value3.style, ...style } : style,
47
98
  ...rest,
48
- children
99
+ children: [
100
+ pendingCss && /* @__PURE__ */ jsx("style", { dangerouslySetInnerHTML: { __html: pendingCss } }),
101
+ children
102
+ ]
49
103
  }
50
104
  ) });
51
105
  });
@@ -53,8 +107,8 @@ function useTheme() {
53
107
  return useContext(ThemeContext).theme;
54
108
  }
55
109
  function usePortalProps() {
56
- const { theme, style } = useContext(ThemeContext);
57
- return { className: cx(themeClass[theme], portal), style };
110
+ const { theme, pending, style } = useContext(ThemeContext);
111
+ return { className: cx(pending ? systemThemeClass : themeClass[theme], portal), style };
58
112
  }
59
113
 
60
114
  // src/i18n/LocaleProvider.tsx
@@ -81,21 +135,21 @@ var content = "v58j0l5";
81
135
  var contentInner = "v58j0l6";
82
136
  var header = "v58j0l2";
83
137
  var item = "v58j0l1";
84
- var root2 = "v58j0l0";
138
+ var root3 = "v58j0l0";
85
139
  var trigger = "v58j0l3";
86
140
 
87
141
  // src/components/Accordion/Accordion.tsx
88
- import { jsx as jsx3, jsxs } from "react/jsx-runtime";
142
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
89
143
  var Accordion = /* @__PURE__ */ forwardRef2(function Accordion2({ className, ...props }, ref) {
90
144
  const { collapsible, ...multipleProps } = props;
91
145
  const typedProps = props.type === "multiple" ? multipleProps : { ...multipleProps, collapsible };
92
146
  const rootProps = "value" in props ? { ...typedProps, value: props.value ?? (props.type === "multiple" ? [] : "") } : typedProps;
93
- return /* @__PURE__ */ jsx3(RadixAccordion.Root, { ref, className: cx(root2, className), ...rootProps });
147
+ return /* @__PURE__ */ jsx3(RadixAccordion.Root, { ref, className: cx(root3, className), ...rootProps });
94
148
  });
95
149
  var AccordionItem = /* @__PURE__ */ forwardRef2(function AccordionItem2({ title: title6, headingLevel = 3, className, children, ...rest }, ref) {
96
150
  const Heading = `h${headingLevel}`;
97
- return /* @__PURE__ */ jsxs(RadixAccordion.Item, { ref, className: cx(item, className), ...rest, children: [
98
- /* @__PURE__ */ jsx3(RadixAccordion.Header, { asChild: true, children: /* @__PURE__ */ jsx3(Heading, { className: header, children: /* @__PURE__ */ jsxs(RadixAccordion.Trigger, { className: trigger, children: [
151
+ return /* @__PURE__ */ jsxs2(RadixAccordion.Item, { ref, className: cx(item, className), ...rest, children: [
152
+ /* @__PURE__ */ jsx3(RadixAccordion.Header, { asChild: true, children: /* @__PURE__ */ jsx3(Heading, { className: header, children: /* @__PURE__ */ jsxs2(RadixAccordion.Trigger, { className: trigger, children: [
99
153
  title6,
100
154
  /* @__PURE__ */ jsx3(ChevronDownIcon, { size: 18, className: chevron })
101
155
  ] }) }) }),
@@ -104,10 +158,41 @@ var AccordionItem = /* @__PURE__ */ forwardRef2(function AccordionItem2({ title:
104
158
  });
105
159
 
106
160
  // src/components/AddressInput/AddressInput.tsx
107
- import { forwardRef as forwardRef7, useEffect, useId as useId2, useRef as useRef2, useState } from "react";
161
+ import { forwardRef as forwardRef7, useEffect as useEffect2, useId as useId3, useRef as useRef3, useState } from "react";
162
+
163
+ // src/utils/mergeRefs.ts
164
+ function mergeRefs(...refs) {
165
+ return (value3) => {
166
+ for (const ref of refs) {
167
+ if (typeof ref === "function") ref(value3);
168
+ else if (ref) ref.current = value3;
169
+ }
170
+ };
171
+ }
172
+
173
+ // src/utils/useFormReset.ts
174
+ import { useEffect, useRef } from "react";
175
+ function useFormReset(ref, onReset) {
176
+ const latest = useRef(onReset);
177
+ useEffect(() => {
178
+ latest.current = onReset;
179
+ });
180
+ useEffect(() => {
181
+ const form = ref.current?.closest("form");
182
+ if (!form) return;
183
+ const handleReset = () => latest.current();
184
+ form.addEventListener("reset", handleReset);
185
+ return () => form.removeEventListener("reset", handleReset);
186
+ }, [ref]);
187
+ }
108
188
 
109
189
  // src/components/Button/Button.tsx
110
- import { forwardRef as forwardRef4 } from "react";
190
+ import {
191
+ Children,
192
+ cloneElement,
193
+ forwardRef as forwardRef4,
194
+ version
195
+ } from "react";
111
196
 
112
197
  // src/components/Spinner/Spinner.tsx
113
198
  import { LoaderIcon } from "@bestow-ui/icons";
@@ -118,12 +203,12 @@ import { createRuntimeFn as _7a468 } from "@vanilla-extract/recipes/createRuntim
118
203
  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: [] });
119
204
 
120
205
  // src/components/Spinner/Spinner.tsx
121
- import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
206
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
122
207
  var Spinner = /* @__PURE__ */ forwardRef3(function Spinner2({ size, color, label: labelProp, className, ...rest }, ref) {
123
208
  const m = useMessages();
124
209
  const label6 = labelProp ?? m.loading ?? "\uB85C\uB529 \uC911";
125
210
  const a11y = label6 ? { role: "status" } : { "aria-hidden": true };
126
- return /* @__PURE__ */ jsxs2("span", { ref, className: cx(spinner({ size, color }), className), ...a11y, ...rest, children: [
211
+ return /* @__PURE__ */ jsxs3("span", { ref, className: cx(spinner({ size, color }), className), ...a11y, ...rest, children: [
127
212
  /* @__PURE__ */ jsx4(LoaderIcon, { size: "100%" }),
128
213
  label6 && /* @__PURE__ */ jsx4("span", { className: visuallyHidden, children: label6 })
129
214
  ] });
@@ -135,7 +220,7 @@ var button = /* @__PURE__ */ _7a4682({ defaultClassName: "xcekda6", variantClass
135
220
  var icon = "xcekdai";
136
221
 
137
222
  // src/components/Button/Button.tsx
138
- import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
223
+ import { Fragment, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
139
224
  var Button = /* @__PURE__ */ forwardRef4(function Button2({
140
225
  variant,
141
226
  color,
@@ -144,6 +229,8 @@ var Button = /* @__PURE__ */ forwardRef4(function Button2({
144
229
  startIcon,
145
230
  endIcon,
146
231
  loading,
232
+ asChild,
233
+ disabled,
147
234
  className,
148
235
  type = "button",
149
236
  onClick,
@@ -151,51 +238,67 @@ var Button = /* @__PURE__ */ forwardRef4(function Button2({
151
238
  ...rest
152
239
  }, ref) {
153
240
  const handleClick = (event) => {
154
- if (loading) {
241
+ if (loading || disabled) {
155
242
  event.preventDefault();
156
243
  return;
157
244
  }
158
245
  onClick?.(event);
159
246
  };
160
247
  const leading = loading ? /* @__PURE__ */ jsx5(Spinner, { size: "sm", label: "" }) : startIcon;
161
- return /* @__PURE__ */ jsxs3(
248
+ const buttonClassName = cx(button({ variant, color, size, fullWidth }), className);
249
+ const content12 = (label6) => /* @__PURE__ */ jsxs4(Fragment, { children: [
250
+ leading && /* @__PURE__ */ jsx5("span", { className: icon, children: leading }),
251
+ label6,
252
+ endIcon && /* @__PURE__ */ jsx5("span", { className: icon, children: endIcon })
253
+ ] });
254
+ if (asChild) {
255
+ const child = Children.only(children);
256
+ const { props } = child;
257
+ return cloneElement(
258
+ child,
259
+ {
260
+ ...rest,
261
+ ...props,
262
+ className: cx(buttonClassName, props.className),
263
+ style: { ...rest.style, ...props.style },
264
+ // React 19 는 ref 가 props 에 있고, element.ref 를 읽으면 경고한다. 18 은 element.ref 에만 있다
265
+ ref: mergeRefs(ref, parseInt(version) >= 19 ? props.ref : child.ref),
266
+ tabIndex: disabled ? -1 : props.tabIndex,
267
+ "aria-busy": loading || void 0,
268
+ "aria-disabled": loading || disabled || void 0,
269
+ "data-disabled": disabled ? "" : void 0,
270
+ onClick: (event) => {
271
+ handleClick(event);
272
+ if (!loading && !disabled) props.onClick?.(event);
273
+ }
274
+ },
275
+ content12(props.children)
276
+ );
277
+ }
278
+ return /* @__PURE__ */ jsx5(
162
279
  "button",
163
280
  {
164
281
  ref,
165
282
  type,
166
- className: cx(button({ variant, color, size, fullWidth }), className),
283
+ disabled,
284
+ className: buttonClassName,
167
285
  "aria-busy": loading || void 0,
168
286
  "aria-disabled": loading || void 0,
169
287
  onClick: handleClick,
170
288
  ...rest,
171
- children: [
172
- leading && /* @__PURE__ */ jsx5("span", { className: icon, children: leading }),
173
- children,
174
- endIcon && /* @__PURE__ */ jsx5("span", { className: icon, children: endIcon })
175
- ]
289
+ children: content12(children)
176
290
  }
177
291
  );
178
292
  });
179
293
 
180
- // src/components/Input/Input.css.ts
181
- import { createRuntimeFn as _7a4683 } from "@vanilla-extract/recipes/createRuntimeFn";
182
- var adornment = "_19p5zvh6";
183
- var field = "_19p5zvh7";
184
- var fieldFullWidth = "_19p5zvh8";
185
- var helperText = /* @__PURE__ */ _7a4683({ defaultClassName: "_19p5zvhb", variantClassNames: { error: { true: "_19p5zvhc" } }, defaultVariants: {}, compoundVariants: [] });
186
- var input = "_19p5zvh5";
187
- var label = "_19p5zvh9";
188
- var requiredMark = "_19p5zvha";
189
- var root3 = /* @__PURE__ */ _7a4683({ defaultClassName: "_19p5zvh0", variantClassNames: { size: { sm: "_19p5zvh1", md: "_19p5zvh2", lg: "_19p5zvh3" }, fullWidth: { true: "_19p5zvh4" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
190
-
191
294
  // src/components/Input/Input.tsx
192
295
  import { forwardRef as forwardRef5 } from "react";
193
- import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
296
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
194
297
  var Input = /* @__PURE__ */ forwardRef5(function Input2({ size, invalid, fullWidth, startAdornment, endAdornment, rootClassName, className, disabled, ...rest }, ref) {
195
- return /* @__PURE__ */ jsxs4(
298
+ return /* @__PURE__ */ jsxs5(
196
299
  "div",
197
300
  {
198
- className: cx(root3({ size, fullWidth }), rootClassName),
301
+ className: cx(root({ size, fullWidth }), rootClassName),
199
302
  "data-invalid": invalid || void 0,
200
303
  "data-disabled": disabled || void 0,
201
304
  children: [
@@ -217,14 +320,14 @@ var Input = /* @__PURE__ */ forwardRef5(function Input2({ size, invalid, fullWid
217
320
  });
218
321
 
219
322
  // src/components/Input/TextField.tsx
220
- import { forwardRef as forwardRef6, useId } from "react";
221
- import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
323
+ import { forwardRef as forwardRef6, useId as useId2 } from "react";
324
+ import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
222
325
  var TextField = /* @__PURE__ */ forwardRef6(function TextField2({ label: label6, helperText: helperText3, error, required, fullWidth, id, "aria-describedby": ariaDescribedBy, ...rest }, ref) {
223
- const generatedId = useId();
326
+ const generatedId = useId2();
224
327
  const inputId = id ?? generatedId;
225
328
  const helperId = helperText3 ? `${inputId}-helper` : void 0;
226
- return /* @__PURE__ */ jsxs5("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
227
- label6 && /* @__PURE__ */ jsxs5("label", { htmlFor: inputId, className: label, children: [
329
+ return /* @__PURE__ */ jsxs6("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
330
+ label6 && /* @__PURE__ */ jsxs6("label", { htmlFor: inputId, className: label, children: [
228
331
  label6,
229
332
  required && /* @__PURE__ */ jsx7("span", { className: requiredMark, "aria-hidden": true, children: "*" })
230
333
  ] }),
@@ -249,9 +352,9 @@ import * as Dialog from "@radix-ui/react-dialog";
249
352
  import { XIcon } from "@bestow-ui/icons";
250
353
 
251
354
  // src/utils/useReturnFocus.ts
252
- import { useRef } from "react";
355
+ import { useRef as useRef2 } from "react";
253
356
  function useReturnFocus(hasTrigger, onCloseAutoFocus) {
254
- const returnTo = useRef(null);
357
+ const returnTo = useRef2(null);
255
358
  return {
256
359
  onOpenAutoFocus: () => {
257
360
  const active = document.activeElement instanceof HTMLElement ? document.activeElement : null;
@@ -272,10 +375,10 @@ function useReturnFocus(hasTrigger, onCloseAutoFocus) {
272
375
  }
273
376
 
274
377
  // src/components/Modal/Modal.css.ts
275
- import { createRuntimeFn as _7a4684 } from "@vanilla-extract/recipes/createRuntimeFn";
378
+ import { createRuntimeFn as _7a4683 } from "@vanilla-extract/recipes/createRuntimeFn";
276
379
  var body = "_1pdsmv0a";
277
380
  var closeButton = "_1pdsmv09";
278
- var content2 = /* @__PURE__ */ _7a4684({ defaultClassName: "_1pdsmv01", variantClassNames: { size: { sm: "_1pdsmv02", md: "_1pdsmv03", lg: "_1pdsmv04" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
381
+ var content2 = /* @__PURE__ */ _7a4683({ defaultClassName: "_1pdsmv01", variantClassNames: { size: { sm: "_1pdsmv02", md: "_1pdsmv03", lg: "_1pdsmv04" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
279
382
  var description = "_1pdsmv08";
280
383
  var footer = "_1pdsmv0b";
281
384
  var header2 = "_1pdsmv05";
@@ -284,14 +387,14 @@ var overlay = "_1pdsmv00";
284
387
  var title = "_1pdsmv07";
285
388
 
286
389
  // src/components/Modal/Modal.tsx
287
- import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
390
+ import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
288
391
  function Modal({
289
392
  open,
290
393
  defaultOpen,
291
394
  onOpenChange,
292
395
  trigger: trigger4,
293
396
  title: title6,
294
- description: description7,
397
+ description: description8,
295
398
  children,
296
399
  footer: footer5,
297
400
  size,
@@ -303,11 +406,11 @@ function Modal({
303
406
  const portal2 = usePortalProps();
304
407
  const m = useMessages();
305
408
  const focus = useReturnFocus(Boolean(trigger4), onCloseAutoFocus);
306
- return /* @__PURE__ */ jsxs6(Dialog.Root, { open, defaultOpen, onOpenChange, children: [
409
+ return /* @__PURE__ */ jsxs7(Dialog.Root, { open, defaultOpen, onOpenChange, children: [
307
410
  trigger4 && /* @__PURE__ */ jsx8(Dialog.Trigger, { asChild: true, children: trigger4 }),
308
- /* @__PURE__ */ jsxs6(Dialog.Portal, { children: [
411
+ /* @__PURE__ */ jsxs7(Dialog.Portal, { children: [
309
412
  /* @__PURE__ */ jsx8(Dialog.Overlay, { className: cx(portal2.className, overlay), style: portal2.style }),
310
- /* @__PURE__ */ jsxs6(
413
+ /* @__PURE__ */ jsxs7(
311
414
  Dialog.Content,
312
415
  {
313
416
  className: cx(portal2.className, content2({ size }), className),
@@ -315,12 +418,12 @@ function Modal({
315
418
  onPointerDownOutside: closeOnOverlayClick ? void 0 : (event) => event.preventDefault(),
316
419
  onOpenAutoFocus: focus.onOpenAutoFocus,
317
420
  onCloseAutoFocus: focus.onCloseAutoFocus,
318
- ...description7 ? {} : { "aria-describedby": void 0 },
421
+ ...description8 ? {} : { "aria-describedby": void 0 },
319
422
  children: [
320
- /* @__PURE__ */ jsxs6("div", { className: header2, children: [
321
- /* @__PURE__ */ jsxs6("div", { className: headings, children: [
423
+ /* @__PURE__ */ jsxs7("div", { className: header2, children: [
424
+ /* @__PURE__ */ jsxs7("div", { className: headings, children: [
322
425
  /* @__PURE__ */ jsx8(Dialog.Title, { className: title, children: title6 }),
323
- description7 && /* @__PURE__ */ jsx8(Dialog.Description, { className: description, children: description7 })
426
+ description8 && /* @__PURE__ */ jsx8(Dialog.Description, { className: description, children: description8 })
324
427
  ] }),
325
428
  !hideCloseButton && /* @__PURE__ */ jsx8(Dialog.Close, { className: closeButton, "aria-label": m.close ?? "\uB2EB\uAE30", children: /* @__PURE__ */ jsx8(XIcon, { size: 16 }) })
326
429
  ] }),
@@ -343,7 +446,7 @@ var searchStatus = "_16fi7uy5";
343
446
  var zonecode = "_16fi7uy3";
344
447
 
345
448
  // src/components/AddressInput/AddressInput.tsx
346
- import { Fragment, jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
449
+ import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
347
450
  var EMPTY = { zonecode: "", address: "", extraAddress: "", detail: "" };
348
451
  function SearchArea({
349
452
  provider,
@@ -351,13 +454,13 @@ function SearchArea({
351
454
  loadErrorText,
352
455
  loadingText
353
456
  }) {
354
- const containerRef = useRef2(null);
457
+ const containerRef = useRef3(null);
355
458
  const [status, setStatus] = useState("loading");
356
- const onSelectRef = useRef2(onSelect);
357
- useEffect(() => {
459
+ const onSelectRef = useRef3(onSelect);
460
+ useEffect2(() => {
358
461
  onSelectRef.current = onSelect;
359
462
  });
360
- useEffect(() => {
463
+ useEffect2(() => {
361
464
  const container2 = containerRef.current;
362
465
  if (!container2) return;
363
466
  let cleanup;
@@ -374,7 +477,7 @@ function SearchArea({
374
477
  cleanup?.();
375
478
  };
376
479
  }, [provider]);
377
- return /* @__PURE__ */ jsxs7("div", { className: searchArea, children: [
480
+ return /* @__PURE__ */ jsxs8("div", { className: searchArea, children: [
378
481
  /* @__PURE__ */ jsx9("div", { ref: containerRef, style: { width: "100%", height: "100%" } }),
379
482
  status !== "ready" && /* @__PURE__ */ jsx9("div", { className: searchStatus, role: "status", children: status === "loading" ? /* @__PURE__ */ jsx9(Spinner, { label: loadingText }) : loadErrorText })
380
483
  ] });
@@ -402,10 +505,10 @@ var AddressInput = /* @__PURE__ */ forwardRef7(
402
505
  const searchLabel = searchLabelProp ?? m.addressSearch ?? "\uC8FC\uC18C \uAC80\uC0C9";
403
506
  const detailPlaceholder = detailPlaceholderProp ?? m.detailAddressPlaceholder ?? "\uC0C1\uC138 \uC8FC\uC18C (\uB3D9\xB7\uD638\uC218 \uB4F1)";
404
507
  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.";
405
- const baseId = useId2();
508
+ const baseId = useId3();
406
509
  const helperId = helperText3 ? `${baseId}-helper` : void 0;
407
- const detailRef = useRef2(null);
408
- const selectedRef = useRef2(false);
510
+ const detailRef = useRef3(null);
511
+ const selectedRef = useRef3(false);
409
512
  const [open, setOpen] = useState(false);
410
513
  const isControlled = "value" in props;
411
514
  const [innerValue, setInnerValue] = useState(defaultValue ?? EMPTY);
@@ -414,6 +517,10 @@ var AddressInput = /* @__PURE__ */ forwardRef7(
414
517
  if (!isControlled) setInnerValue(next);
415
518
  onValueChange?.(next);
416
519
  };
520
+ const rootRef = useRef3(null);
521
+ useFormReset(rootRef, () => {
522
+ if (!isControlled) update(defaultValue ?? EMPTY);
523
+ });
417
524
  const openSearch = () => {
418
525
  if (disabled) return;
419
526
  selectedRef.current = false;
@@ -430,120 +537,119 @@ var AddressInput = /* @__PURE__ */ forwardRef7(
430
537
  setOpen(false);
431
538
  };
432
539
  const fullAddress = `${current2.address}${current2.extraAddress ?? ""}`;
433
- return /* @__PURE__ */ jsxs7("fieldset", { ref, className: cx(fieldset, className), disabled, "aria-describedby": helperId, children: [
434
- /* @__PURE__ */ jsxs7("legend", { className: legend, children: [
435
- label6,
436
- required && /* @__PURE__ */ jsx9("span", { className: requiredMark, "aria-hidden": true, children: "*" })
437
- ] }),
438
- /* @__PURE__ */ jsxs7("div", { className: row, children: [
439
- /* @__PURE__ */ jsx9(
440
- TextField,
441
- {
442
- "aria-label": m.postalCode ?? "\uC6B0\uD3B8\uBC88\uD638",
443
- readOnly: true,
444
- value: current2.zonecode,
445
- placeholder: m.postalCode ?? "\uC6B0\uD3B8\uBC88\uD638",
446
- error: error && !current2.zonecode,
447
- "aria-required": required || void 0,
448
- rootClassName: zonecode,
449
- onClick: openSearch
450
- }
451
- ),
452
- /* @__PURE__ */ jsx9(Button, { variant: "outline", color: "neutral", onClick: openSearch, disabled, children: searchLabel })
453
- ] }),
454
- /* @__PURE__ */ jsx9(
455
- TextField,
456
- {
457
- "aria-label": m.baseAddress ?? "\uAE30\uBCF8 \uC8FC\uC18C",
458
- readOnly: true,
459
- value: fullAddress,
460
- placeholder: m.baseAddressPlaceholder ?? `${searchLabel}\uC744 \uB20C\uB7EC \uC8FC\uC18C\uB97C \uACE0\uB974\uC138\uC694`,
461
- error: error && !current2.address,
462
- "aria-required": required || void 0,
463
- fullWidth: true,
464
- onClick: openSearch
465
- }
466
- ),
467
- /* @__PURE__ */ jsx9(
468
- TextField,
469
- {
470
- ref: detailRef,
471
- "aria-label": m.detailAddress ?? "\uC0C1\uC138 \uC8FC\uC18C",
472
- value: current2.detail,
473
- placeholder: detailPlaceholder,
474
- onChange: (event) => update({ ...current2, detail: event.target.value }),
475
- autoComplete: "address-line2",
476
- fullWidth: true
477
- }
478
- ),
479
- helperText3 && /* @__PURE__ */ jsx9("p", { id: helperId, className: helperText({ error }), children: helperText3 }),
480
- name && /* @__PURE__ */ jsxs7(Fragment, { children: [
481
- /* @__PURE__ */ jsx9("input", { type: "hidden", name: `${name}[zonecode]`, value: current2.zonecode }),
482
- /* @__PURE__ */ jsx9("input", { type: "hidden", name: `${name}[address]`, value: fullAddress }),
483
- /* @__PURE__ */ jsx9("input", { type: "hidden", name: `${name}[detail]`, value: current2.detail })
484
- ] }),
485
- /* @__PURE__ */ jsx9(
486
- Modal,
487
- {
488
- open,
489
- onOpenChange: setOpen,
490
- title: searchLabel,
491
- description: m.addressSearchDescription ?? "\uB3C4\uB85C\uBA85, \uAC74\uBB3C\uBA85, \uC9C0\uBC88\uC73C\uB85C \uAC80\uC0C9\uD560 \uC218 \uC788\uC5B4\uC694.",
492
- onCloseAutoFocus: (event) => {
493
- if (selectedRef.current) {
494
- event.preventDefault();
495
- detailRef.current?.focus();
540
+ return /* @__PURE__ */ jsxs8(
541
+ "fieldset",
542
+ {
543
+ ref: mergeRefs(ref, rootRef),
544
+ className: cx(fieldset, className),
545
+ disabled,
546
+ "aria-describedby": helperId,
547
+ children: [
548
+ /* @__PURE__ */ jsxs8("legend", { className: legend, children: [
549
+ label6,
550
+ required && /* @__PURE__ */ jsx9("span", { className: requiredMark, "aria-hidden": true, children: "*" })
551
+ ] }),
552
+ /* @__PURE__ */ jsxs8("div", { className: row, children: [
553
+ /* @__PURE__ */ jsx9(
554
+ TextField,
555
+ {
556
+ "aria-label": m.postalCode ?? "\uC6B0\uD3B8\uBC88\uD638",
557
+ readOnly: true,
558
+ value: current2.zonecode,
559
+ placeholder: m.postalCode ?? "\uC6B0\uD3B8\uBC88\uD638",
560
+ error: error && !current2.zonecode,
561
+ "aria-required": required || void 0,
562
+ rootClassName: zonecode,
563
+ onClick: openSearch
564
+ }
565
+ ),
566
+ /* @__PURE__ */ jsx9(Button, { variant: "outline", color: "neutral", onClick: openSearch, disabled, children: searchLabel })
567
+ ] }),
568
+ /* @__PURE__ */ jsx9(
569
+ TextField,
570
+ {
571
+ "aria-label": m.baseAddress ?? "\uAE30\uBCF8 \uC8FC\uC18C",
572
+ readOnly: true,
573
+ value: fullAddress,
574
+ placeholder: m.baseAddressPlaceholder ?? `${searchLabel}\uC744 \uB20C\uB7EC \uC8FC\uC18C\uB97C \uACE0\uB974\uC138\uC694`,
575
+ error: error && !current2.address,
576
+ "aria-required": required || void 0,
577
+ fullWidth: true,
578
+ onClick: openSearch
496
579
  }
497
- },
498
- children: /* @__PURE__ */ jsx9(
499
- SearchArea,
580
+ ),
581
+ /* @__PURE__ */ jsx9(
582
+ TextField,
500
583
  {
501
- provider,
502
- onSelect: handleSelect,
503
- loadErrorText,
504
- loadingText: m.addressLoading ?? "\uC8FC\uC18C \uAC80\uC0C9\uC744 \uBD88\uB7EC\uC624\uB294 \uC911"
584
+ ref: detailRef,
585
+ "aria-label": m.detailAddress ?? "\uC0C1\uC138 \uC8FC\uC18C",
586
+ value: current2.detail,
587
+ placeholder: detailPlaceholder,
588
+ onChange: (event) => update({ ...current2, detail: event.target.value }),
589
+ autoComplete: "address-line2",
590
+ fullWidth: true
591
+ }
592
+ ),
593
+ helperText3 && /* @__PURE__ */ jsx9("p", { id: helperId, className: helperText({ error }), children: helperText3 }),
594
+ name && /* @__PURE__ */ jsxs8(Fragment2, { children: [
595
+ /* @__PURE__ */ jsx9("input", { type: "hidden", name: `${name}[zonecode]`, value: current2.zonecode }),
596
+ /* @__PURE__ */ jsx9("input", { type: "hidden", name: `${name}[address]`, value: fullAddress }),
597
+ /* @__PURE__ */ jsx9("input", { type: "hidden", name: `${name}[detail]`, value: current2.detail })
598
+ ] }),
599
+ /* @__PURE__ */ jsx9(
600
+ Modal,
601
+ {
602
+ open,
603
+ onOpenChange: setOpen,
604
+ title: searchLabel,
605
+ description: m.addressSearchDescription ?? "\uB3C4\uB85C\uBA85, \uAC74\uBB3C\uBA85, \uC9C0\uBC88\uC73C\uB85C \uAC80\uC0C9\uD560 \uC218 \uC788\uC5B4\uC694.",
606
+ onCloseAutoFocus: (event) => {
607
+ if (selectedRef.current) {
608
+ event.preventDefault();
609
+ detailRef.current?.focus();
610
+ }
611
+ },
612
+ children: /* @__PURE__ */ jsx9(
613
+ SearchArea,
614
+ {
615
+ provider,
616
+ onSelect: handleSelect,
617
+ loadErrorText,
618
+ loadingText: m.addressLoading ?? "\uC8FC\uC18C \uAC80\uC0C9\uC744 \uBD88\uB7EC\uC624\uB294 \uC911"
619
+ }
620
+ )
505
621
  }
506
622
  )
507
- }
508
- )
509
- ] });
623
+ ]
624
+ }
625
+ );
510
626
  }
511
627
  );
512
628
 
513
629
  // src/components/AgreementGroup/AgreementGroup.tsx
514
- import { forwardRef as forwardRef9, useId as useId3, useState as useState2 } from "react";
630
+ import { forwardRef as forwardRef9, useId as useId4, useRef as useRef5, useState as useState2 } from "react";
515
631
  import { ChevronDownIcon as ChevronDownIcon2 } from "@bestow-ui/icons";
516
632
 
517
633
  // src/components/Checkbox/Checkbox.tsx
518
- import { forwardRef as forwardRef8, useEffect as useEffect2, useRef as useRef3 } from "react";
519
-
520
- // src/utils/mergeRefs.ts
521
- function mergeRefs(...refs) {
522
- return (value3) => {
523
- for (const ref of refs) {
524
- if (typeof ref === "function") ref(value3);
525
- else if (ref) ref.current = value3;
526
- }
527
- };
528
- }
634
+ import { forwardRef as forwardRef8, useEffect as useEffect3, useRef as useRef4 } from "react";
529
635
 
530
636
  // src/components/Checkbox/Checkbox.css.ts
531
- import { createRuntimeFn as _7a4685 } from "@vanilla-extract/recipes/createRuntimeFn";
637
+ import { createRuntimeFn as _7a4684 } from "@vanilla-extract/recipes/createRuntimeFn";
532
638
  var checkIcon = "_1y7mzsn8 _1y7mzsn7";
533
- var control = /* @__PURE__ */ _7a4685({ defaultClassName: "_1y7mzsn3", variantClassNames: { size: { sm: "_1y7mzsn4", md: "_1y7mzsn5" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
639
+ var control = /* @__PURE__ */ _7a4684({ defaultClassName: "_1y7mzsn3", variantClassNames: { size: { sm: "_1y7mzsn4", md: "_1y7mzsn5" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
534
640
  var indeterminateIcon = "_1y7mzsn9 _1y7mzsn7";
535
641
  var input2 = "_1y7mzsn6";
536
- var root4 = /* @__PURE__ */ _7a4685({ defaultClassName: "_1y7mzsn0", variantClassNames: { size: { sm: "_1y7mzsn1", md: "_1y7mzsn2" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
642
+ var root4 = /* @__PURE__ */ _7a4684({ defaultClassName: "_1y7mzsn0", variantClassNames: { size: { sm: "_1y7mzsn1", md: "_1y7mzsn2" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
537
643
 
538
644
  // src/components/Checkbox/Checkbox.tsx
539
- import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
645
+ import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
540
646
  var Checkbox = /* @__PURE__ */ forwardRef8(function Checkbox2({ label: label6, size, indeterminate = false, invalid, disabled, onChange, onCheckedChange, className, ...rest }, ref) {
541
- const innerRef = useRef3(null);
542
- useEffect2(() => {
647
+ const innerRef = useRef4(null);
648
+ useEffect3(() => {
543
649
  if (innerRef.current) innerRef.current.indeterminate = indeterminate;
544
650
  }, [indeterminate]);
545
- return /* @__PURE__ */ jsxs8("label", { className: cx(root4({ size }), className), "data-disabled": disabled || void 0, children: [
546
- /* @__PURE__ */ jsxs8("span", { className: control({ size }), children: [
651
+ return /* @__PURE__ */ jsxs9("label", { className: cx(root4({ size }), className), "data-disabled": disabled || void 0, children: [
652
+ /* @__PURE__ */ jsxs9("span", { className: control({ size }), children: [
547
653
  /* @__PURE__ */ jsx10(
548
654
  "input",
549
655
  {
@@ -589,11 +695,11 @@ var tag = "j3uxdc7";
589
695
  var toggle = "j3uxdc8";
590
696
 
591
697
  // src/components/AgreementGroup/AgreementGroup.tsx
592
- import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
698
+ import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
593
699
  var AgreementGroup = /* @__PURE__ */ forwardRef9(
594
700
  function AgreementGroup2(props, ref) {
595
701
  const {
596
- items: items2,
702
+ items: items3,
597
703
  value: value3,
598
704
  defaultValue,
599
705
  onValueChange,
@@ -616,24 +722,31 @@ var AgreementGroup = /* @__PURE__ */ forwardRef9(
616
722
  const optionalText = optionalTextProp ?? m.optional ?? "\uC120\uD0DD";
617
723
  const showText = showTextProp ?? m.show ?? "\uBCF4\uAE30";
618
724
  const hideText = hideTextProp ?? m.hide ?? "\uC811\uAE30";
619
- const baseId = useId3();
725
+ const baseId = useId4();
620
726
  const helperId = helperText3 ? `${baseId}-helper` : void 0;
621
727
  const isControlled = "value" in props;
622
728
  const [innerValue, setInnerValue] = useState2(defaultValue ?? []);
623
729
  const agreed = isControlled ? value3 ?? [] : innerValue;
624
730
  const [expanded, setExpanded] = useState2([]);
731
+ const rootRef = useRef5(null);
732
+ useFormReset(rootRef, () => {
733
+ if (isControlled) return;
734
+ const next = defaultValue ?? [];
735
+ setInnerValue(next);
736
+ if (next.join() !== agreed.join()) onValueChange?.(next);
737
+ });
625
738
  const update = (next) => {
626
739
  if (!isControlled) setInnerValue(next);
627
740
  onValueChange?.(next);
628
741
  };
629
- const allValues = items2.map((item9) => item9.value);
742
+ const allValues = items3.map((item9) => item9.value);
630
743
  const agreedCount = allValues.filter((v) => agreed.includes(v)).length;
631
- const allChecked = items2.length > 0 && agreedCount === items2.length;
744
+ const allChecked = items3.length > 0 && agreedCount === items3.length;
632
745
  const toggleItem = (itemValue, checked) => update(checked ? [...agreed.filter((v) => v !== itemValue), itemValue] : agreed.filter((v) => v !== itemValue));
633
- return /* @__PURE__ */ jsxs9(
746
+ return /* @__PURE__ */ jsxs10(
634
747
  "fieldset",
635
748
  {
636
- ref,
749
+ ref: mergeRefs(ref, rootRef),
637
750
  id,
638
751
  className: cx(fieldset2, className),
639
752
  disabled,
@@ -641,7 +754,7 @@ var AgreementGroup = /* @__PURE__ */ forwardRef9(
641
754
  "data-invalid": error || void 0,
642
755
  children: [
643
756
  label6 && /* @__PURE__ */ jsx11("legend", { className: legend2, children: label6 }),
644
- /* @__PURE__ */ jsxs9("div", { className: box, children: [
757
+ /* @__PURE__ */ jsxs10("div", { className: box, children: [
645
758
  /* @__PURE__ */ jsx11("div", { className: all, children: /* @__PURE__ */ jsx11(
646
759
  Checkbox,
647
760
  {
@@ -651,13 +764,13 @@ var AgreementGroup = /* @__PURE__ */ forwardRef9(
651
764
  onChange: (event) => update(event.target.checked ? allValues : [])
652
765
  }
653
766
  ) }),
654
- /* @__PURE__ */ jsx11("ul", { className: list, children: items2.map((item9) => {
767
+ /* @__PURE__ */ jsx11("ul", { className: list, children: items3.map((item9) => {
655
768
  const labelId = `${baseId}-${item9.value}-label`;
656
769
  const toggleTextId = `${baseId}-${item9.value}-toggle`;
657
770
  const contentId = `${baseId}-${item9.value}-content`;
658
771
  const isOpen = expanded.includes(item9.value);
659
- return /* @__PURE__ */ jsxs9("li", { className: item2, children: [
660
- /* @__PURE__ */ jsxs9("div", { className: row2, children: [
772
+ return /* @__PURE__ */ jsxs10("li", { className: item2, children: [
773
+ /* @__PURE__ */ jsxs10("div", { className: row2, children: [
661
774
  /* @__PURE__ */ jsx11(
662
775
  Checkbox,
663
776
  {
@@ -665,14 +778,14 @@ var AgreementGroup = /* @__PURE__ */ forwardRef9(
665
778
  checked: agreed.includes(item9.value),
666
779
  invalid: error && item9.required && !agreed.includes(item9.value),
667
780
  onChange: (event) => toggleItem(item9.value, event.target.checked),
668
- label: /* @__PURE__ */ jsxs9("span", { id: labelId, children: [
781
+ label: /* @__PURE__ */ jsxs10("span", { id: labelId, children: [
669
782
  /* @__PURE__ */ jsx11("span", { className: tag, "data-required": item9.required || void 0, children: item9.required ? requiredText : optionalText }),
670
783
  " ",
671
784
  item9.label
672
785
  ] })
673
786
  }
674
787
  ),
675
- item9.content && /* @__PURE__ */ jsxs9(
788
+ item9.content && /* @__PURE__ */ jsxs10(
676
789
  "button",
677
790
  {
678
791
  type: "button",
@@ -707,23 +820,24 @@ import { forwardRef as forwardRef10 } from "react";
707
820
  import { CircleAlertIcon, CircleCheckIcon, InfoIcon, TriangleAlertIcon, XIcon as XIcon2 } from "@bestow-ui/icons";
708
821
 
709
822
  // src/components/Alert/Alert.css.ts
710
- import { createRuntimeFn as _7a4686 } from "@vanilla-extract/recipes/createRuntimeFn";
711
- var action = "bsmpc0j";
712
- var alert = /* @__PURE__ */ _7a4686({ defaultClassName: "bsmpc06", variantClassNames: { variant: { soft: "bsmpc07", outline: "bsmpc08", solid: "bsmpc09" }, color: { primary: "bsmpc0a", neutral: "bsmpc0b", danger: "bsmpc0c", success: "bsmpc0d", warning: "bsmpc0e" } }, defaultVariants: { variant: "soft", color: "primary" }, compoundVariants: [] });
713
- var closeButton2 = "bsmpc0k";
714
- var content4 = "bsmpc0g";
715
- var description2 = "bsmpc0i";
716
- var icon2 = "bsmpc0f";
717
- var title2 = "bsmpc0h";
823
+ import { createRuntimeFn as _7a4685 } from "@vanilla-extract/recipes/createRuntimeFn";
824
+ var action = "bsmpc0k";
825
+ var alert = /* @__PURE__ */ _7a4685({ defaultClassName: "bsmpc06", variantClassNames: { variant: { soft: "bsmpc07", outline: "bsmpc08", solid: "bsmpc09" }, color: { primary: "bsmpc0a", neutral: "bsmpc0b", danger: "bsmpc0c", success: "bsmpc0d", warning: "bsmpc0e", info: "bsmpc0f" } }, defaultVariants: { variant: "soft", color: "primary" }, compoundVariants: [] });
826
+ var closeButton2 = "bsmpc0l";
827
+ var content4 = "bsmpc0h";
828
+ var description2 = "bsmpc0j";
829
+ var icon2 = "bsmpc0g";
830
+ var title2 = "bsmpc0i";
718
831
 
719
832
  // src/components/Alert/Alert.tsx
720
- import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
833
+ import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
721
834
  var defaultIcons = {
722
835
  primary: InfoIcon,
723
836
  neutral: InfoIcon,
724
837
  success: CircleCheckIcon,
725
838
  warning: TriangleAlertIcon,
726
- danger: CircleAlertIcon
839
+ danger: CircleAlertIcon,
840
+ info: InfoIcon
727
841
  };
728
842
  var Alert = /* @__PURE__ */ forwardRef10(function Alert2({
729
843
  variant,
@@ -741,9 +855,9 @@ var Alert = /* @__PURE__ */ forwardRef10(function Alert2({
741
855
  const closeLabel = closeLabelProp ?? m.close ?? "\uB2EB\uAE30";
742
856
  const DefaultIcon = defaultIcons[color];
743
857
  const iconNode = icon7 === void 0 ? /* @__PURE__ */ jsx12(DefaultIcon, { size: 18 }) : icon7;
744
- return /* @__PURE__ */ jsxs10("div", { ref, className: cx(alert({ variant, color }), className), ...rest, children: [
858
+ return /* @__PURE__ */ jsxs11("div", { ref, className: cx(alert({ variant, color }), className), ...rest, children: [
745
859
  iconNode !== false && iconNode !== null && /* @__PURE__ */ jsx12("span", { className: icon2, "aria-hidden": true, children: iconNode }),
746
- /* @__PURE__ */ jsxs10("div", { className: content4, children: [
860
+ /* @__PURE__ */ jsxs11("div", { className: content4, children: [
747
861
  title6 && /* @__PURE__ */ jsx12("div", { className: title2, children: title6 }),
748
862
  children && /* @__PURE__ */ jsx12("div", { className: description2, children })
749
863
  ] }),
@@ -753,15 +867,15 @@ var Alert = /* @__PURE__ */ forwardRef10(function Alert2({
753
867
  });
754
868
 
755
869
  // src/components/AmountInput/AmountInput.tsx
756
- import { forwardRef as forwardRef11, useRef as useRef5 } from "react";
870
+ import { forwardRef as forwardRef11, useRef as useRef7 } from "react";
757
871
  import { formatKoreanAmount } from "@bestow-ui/korean-utils";
758
872
 
759
873
  // src/utils/useFormattedInput.ts
760
- import { useRef as useRef4, useState as useState3 } from "react";
874
+ import { useRef as useRef6, useState as useState3 } from "react";
761
875
 
762
876
  // src/utils/useIsomorphicLayoutEffect.ts
763
- import { useEffect as useEffect3, useLayoutEffect } from "react";
764
- var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect3;
877
+ import { useEffect as useEffect4, useLayoutEffect } from "react";
878
+ var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect4;
765
879
 
766
880
  // src/utils/useFormattedInput.ts
767
881
  function caretAfter(display, count2, isMeaningful2) {
@@ -778,15 +892,16 @@ function useFormattedInput({
778
892
  value: value3,
779
893
  defaultValue,
780
894
  onValueChange,
781
- sanitize: sanitize4,
895
+ sanitize: sanitize3,
782
896
  format: format2,
783
897
  isMeaningful: isMeaningful2,
784
- inputRef
898
+ inputRef,
899
+ manualReset
785
900
  }) {
786
- const [innerValue, setInnerValue] = useState3(() => sanitize4(defaultValue ?? ""));
787
- const raw = isControlled ? sanitize4(value3 ?? "") : innerValue;
901
+ const [innerValue, setInnerValue] = useState3(() => sanitize3(defaultValue ?? ""));
902
+ const raw = isControlled ? sanitize3(value3 ?? "") : innerValue;
788
903
  const display = format2(raw);
789
- const pendingCaret = useRef4(null);
904
+ const pendingCaret = useRef6(null);
790
905
  useIsomorphicLayoutEffect(() => {
791
906
  const input6 = inputRef.current;
792
907
  if (pendingCaret.current === null || !input6 || document.activeElement !== input6) return;
@@ -794,6 +909,12 @@ function useFormattedInput({
794
909
  input6.setSelectionRange(position, position);
795
910
  pendingCaret.current = null;
796
911
  });
912
+ useFormReset(inputRef, () => {
913
+ if (isControlled || manualReset) return;
914
+ const next = sanitize3(defaultValue ?? "");
915
+ setInnerValue(next);
916
+ if (next !== innerValue) onValueChange?.(next);
917
+ });
797
918
  const commit = (next, caretCount) => {
798
919
  pendingCaret.current = caretCount;
799
920
  if (!isControlled) setInnerValue(next);
@@ -801,8 +922,8 @@ function useFormattedInput({
801
922
  };
802
923
  const onChange = (event) => {
803
924
  const { value: typed, selectionStart } = event.target;
804
- const next = sanitize4(typed);
805
- const before = sanitize4(typed.slice(0, selectionStart ?? typed.length));
925
+ const next = sanitize3(typed);
926
+ const before = sanitize3(typed.slice(0, selectionStart ?? typed.length));
806
927
  commit(next, Math.min(before.length, next.length));
807
928
  };
808
929
  const onKeyDown = (event) => {
@@ -822,7 +943,7 @@ function useFormattedInput({
822
943
  commit(raw.slice(0, index) + raw.slice(index + 1), index);
823
944
  }
824
945
  };
825
- const setRaw = (next) => setInnerValue(sanitize4(next));
946
+ const setRaw = (next) => setInnerValue(sanitize3(next));
826
947
  return { raw, display, onChange, onKeyDown, setRaw };
827
948
  }
828
949
 
@@ -830,7 +951,7 @@ function useFormattedInput({
830
951
  var input3 = "_70qkav0";
831
952
 
832
953
  // src/components/AmountInput/AmountInput.tsx
833
- import { Fragment as Fragment2, jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
954
+ import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
834
955
  var MAX_DIGITS = 15;
835
956
  var isDigit = (char) => /\d/.test(char);
836
957
  var AmountInput = /* @__PURE__ */ forwardRef11(
@@ -849,11 +970,11 @@ var AmountInput = /* @__PURE__ */ forwardRef11(
849
970
  className,
850
971
  ...rest
851
972
  } = props;
852
- const inputRef = useRef5(null);
973
+ const inputRef = useRef7(null);
853
974
  const m = useMessages();
854
975
  const unit2 = unitProp ?? m.currencyUnit ?? "\uC6D0";
855
976
  const label6 = labelProp ?? m.amount ?? "\uAE08\uC561";
856
- const sanitize4 = (input6) => {
977
+ const sanitize3 = (input6) => {
857
978
  let digits = input6.replace(/\D/g, "").replace(/^0+(?=\d)/, "").slice(0, MAX_DIGITS);
858
979
  if (max !== void 0 && digits && Number(digits) > max) digits = String(Math.floor(max));
859
980
  return digits;
@@ -864,7 +985,7 @@ var AmountInput = /* @__PURE__ */ forwardRef11(
864
985
  value: toRaw(value3),
865
986
  defaultValue: toRaw(defaultValue),
866
987
  onValueChange: (digits) => onValueChange?.(digits === "" ? null : Number(digits)),
867
- sanitize: sanitize4,
988
+ sanitize: sanitize3,
868
989
  format: (digits) => digits === "" ? "" : Number(digits).toLocaleString("ko-KR"),
869
990
  isMeaningful: isDigit,
870
991
  inputRef
@@ -884,7 +1005,7 @@ var AmountInput = /* @__PURE__ */ forwardRef11(
884
1005
  onKeyDown?.(event);
885
1006
  },
886
1007
  endAdornment: unit2,
887
- helperText: reading && helperText3 ? /* @__PURE__ */ jsxs11(Fragment2, { children: [
1008
+ helperText: reading && helperText3 ? /* @__PURE__ */ jsxs12(Fragment3, { children: [
888
1009
  reading,
889
1010
  /* @__PURE__ */ jsx13("br", {}),
890
1011
  helperText3
@@ -902,13 +1023,13 @@ import { UserIcon } from "@bestow-ui/icons";
902
1023
  import { forwardRef as forwardRef12 } from "react";
903
1024
 
904
1025
  // src/components/Avatar/Avatar.css.ts
905
- import { createRuntimeFn as _7a4687 } from "@vanilla-extract/recipes/createRuntimeFn";
1026
+ import { createRuntimeFn as _7a4686 } from "@vanilla-extract/recipes/createRuntimeFn";
906
1027
  var fallback = "_1fd2kp27";
907
1028
  var image = "_1fd2kp26";
908
- var root5 = /* @__PURE__ */ _7a4687({ defaultClassName: "_1fd2kp20", variantClassNames: { size: { sm: "_1fd2kp21", md: "_1fd2kp22", lg: "_1fd2kp23" }, shape: { circle: "_1fd2kp24", square: "_1fd2kp25" } }, defaultVariants: { size: "md", shape: "circle" }, compoundVariants: [] });
1029
+ var root5 = /* @__PURE__ */ _7a4686({ defaultClassName: "_1fd2kp20", variantClassNames: { size: { sm: "_1fd2kp21", md: "_1fd2kp22", lg: "_1fd2kp23" }, shape: { circle: "_1fd2kp24", square: "_1fd2kp25" } }, defaultVariants: { size: "md", shape: "circle" }, compoundVariants: [] });
909
1030
 
910
1031
  // src/components/Avatar/Avatar.tsx
911
- import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
1032
+ import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
912
1033
  function getInitials(name) {
913
1034
  const [a = "", b = ""] = name.trim().split(/\s+/);
914
1035
  const first = (word) => Array.from(word)[0] ?? "";
@@ -918,7 +1039,7 @@ var Avatar = /* @__PURE__ */ forwardRef12(function Avatar2({ src, alt, name, fal
918
1039
  const label6 = alt ?? name;
919
1040
  const a11y = label6 ? { role: "img", "aria-label": label6 } : { "aria-hidden": true };
920
1041
  const initials = name ? getInitials(name) : "";
921
- return /* @__PURE__ */ jsxs12(RadixAvatar.Root, { ref, className: cx(root5({ size, shape }), className), ...a11y, ...rest, children: [
1042
+ return /* @__PURE__ */ jsxs13(RadixAvatar.Root, { ref, className: cx(root5({ size, shape }), className), ...a11y, ...rest, children: [
922
1043
  src && /* @__PURE__ */ jsx14(RadixAvatar.Image, { src, alt: "", className: image }),
923
1044
  /* @__PURE__ */ jsx14(RadixAvatar.Fallback, { className: fallback, children: fallback2 ?? (initials || /* @__PURE__ */ jsx14(UserIcon, { size: "60%" })) })
924
1045
  ] });
@@ -934,12 +1055,12 @@ import { forwardRef as forwardRef13 } from "react";
934
1055
  import { ExternalLinkIcon } from "@bestow-ui/icons";
935
1056
 
936
1057
  // src/components/Link/Link.css.ts
937
- import { createRuntimeFn as _7a4688 } from "@vanilla-extract/recipes/createRuntimeFn";
1058
+ import { createRuntimeFn as _7a4687 } from "@vanilla-extract/recipes/createRuntimeFn";
938
1059
  var externalIcon = "_1t4hlp6";
939
- var link = /* @__PURE__ */ _7a4688({ defaultClassName: "_1t4hlp0", variantClassNames: { color: { primary: "_1t4hlp1", neutral: "_1t4hlp2", inherit: "_1t4hlp3" }, underline: { always: "_1t4hlp4", hover: "_1t4hlp5" } }, defaultVariants: { color: "primary", underline: "always" }, compoundVariants: [] });
1060
+ var link = /* @__PURE__ */ _7a4687({ defaultClassName: "_1t4hlp0", variantClassNames: { color: { primary: "_1t4hlp1", neutral: "_1t4hlp2", inherit: "_1t4hlp3" }, underline: { always: "_1t4hlp4", hover: "_1t4hlp5" } }, defaultVariants: { color: "primary", underline: "always" }, compoundVariants: [] });
940
1061
 
941
1062
  // src/components/Link/Link.tsx
942
- import { Fragment as Fragment3, jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
1063
+ import { Fragment as Fragment4, jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
943
1064
  var Link = /* @__PURE__ */ forwardRef13(function Link2({
944
1065
  as: Component = "a",
945
1066
  asChild,
@@ -962,7 +1083,7 @@ var Link = /* @__PURE__ */ forwardRef13(function Link2({
962
1083
  /* @__PURE__ */ jsx15(Slot, { ref, className: linkClassName, ...{ target, rel, ...rest }, children })
963
1084
  );
964
1085
  }
965
- return /* @__PURE__ */ jsxs13(
1086
+ return /* @__PURE__ */ jsxs14(
966
1087
  Component,
967
1088
  {
968
1089
  ref,
@@ -972,7 +1093,7 @@ var Link = /* @__PURE__ */ forwardRef13(function Link2({
972
1093
  ...rest,
973
1094
  children: [
974
1095
  children,
975
- external && /* @__PURE__ */ jsxs13(Fragment3, { children: [
1096
+ external && /* @__PURE__ */ jsxs14(Fragment4, { children: [
976
1097
  " ",
977
1098
  /* @__PURE__ */ jsx15(ExternalLinkIcon, { className: externalIcon }),
978
1099
  /* @__PURE__ */ jsx15("span", { className: visuallyHidden, children: externalLabel })
@@ -990,14 +1111,14 @@ var list2 = "_18t8ztt0";
990
1111
  var separator = "_18t8ztt4";
991
1112
 
992
1113
  // src/components/Breadcrumb/Breadcrumb.tsx
993
- import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
994
- var Breadcrumb = /* @__PURE__ */ forwardRef14(function Breadcrumb2({ items: items2, linkAs, separator: separator4, "aria-label": ariaLabelProp, className, ...rest }, ref) {
1114
+ import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
1115
+ var Breadcrumb = /* @__PURE__ */ forwardRef14(function Breadcrumb2({ items: items3, linkAs, separator: separator5, "aria-label": ariaLabelProp, className, ...rest }, ref) {
995
1116
  const m = useMessages();
996
1117
  const ariaLabel = ariaLabelProp ?? m.breadcrumb ?? "\uC774\uB3D9 \uACBD\uB85C";
997
- const sep = separator4 ?? /* @__PURE__ */ jsx16(ChevronRightIcon, { size: 14 });
998
- return /* @__PURE__ */ jsx16("nav", { ref, "aria-label": ariaLabel, className, ...rest, children: /* @__PURE__ */ jsx16("ol", { className: list2, children: items2.map((item9, index) => {
999
- const isCurrent = index === items2.length - 1;
1000
- return /* @__PURE__ */ jsxs14("li", { className: item3, children: [
1118
+ const sep = separator5 ?? /* @__PURE__ */ jsx16(ChevronRightIcon, { size: 14 });
1119
+ return /* @__PURE__ */ jsx16("nav", { ref, "aria-label": ariaLabel, className, ...rest, children: /* @__PURE__ */ jsx16("ol", { className: list2, children: items3.map((item9, index) => {
1120
+ const isCurrent = index === items3.length - 1;
1121
+ return /* @__PURE__ */ jsxs15("li", { className: item3, children: [
1001
1122
  index > 0 && /* @__PURE__ */ jsx16("span", { className: separator, "aria-hidden": true, children: sep }),
1002
1123
  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 })
1003
1124
  ] }, index);
@@ -1005,15 +1126,15 @@ var Breadcrumb = /* @__PURE__ */ forwardRef14(function Breadcrumb2({ items: item
1005
1126
  });
1006
1127
 
1007
1128
  // src/components/BusinessNumberInput/BusinessNumberInput.tsx
1008
- import { forwardRef as forwardRef15, useRef as useRef6, useState as useState5 } from "react";
1129
+ import { forwardRef as forwardRef15, useRef as useRef8, useState as useState5 } from "react";
1009
1130
  import { formatBusinessNumber, isValidBusinessNumber } from "@bestow-ui/korean-utils";
1010
1131
 
1011
1132
  // src/utils/useDelayedAnnouncement.ts
1012
- import { useEffect as useEffect4, useState as useState4 } from "react";
1133
+ import { useEffect as useEffect5, useState as useState4 } from "react";
1013
1134
  var ANNOUNCE_DELAY = 800;
1014
1135
  function useDelayedAnnouncement(message, delay = ANNOUNCE_DELAY) {
1015
1136
  const [announced, setAnnounced] = useState4("");
1016
- useEffect4(() => {
1137
+ useEffect5(() => {
1017
1138
  const timer2 = setTimeout(() => setAnnounced(message), message ? delay : 0);
1018
1139
  return () => clearTimeout(timer2);
1019
1140
  }, [message, delay]);
@@ -1021,7 +1142,7 @@ function useDelayedAnnouncement(message, delay = ANNOUNCE_DELAY) {
1021
1142
  }
1022
1143
 
1023
1144
  // src/components/BusinessNumberInput/BusinessNumberInput.tsx
1024
- import { Fragment as Fragment4, jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
1145
+ import { Fragment as Fragment5, jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
1025
1146
  var sanitize = (input6) => input6.replace(/\D/g, "").slice(0, 10);
1026
1147
  var isDigit2 = (char) => /\d/.test(char);
1027
1148
  var BusinessNumberInput = /* @__PURE__ */ forwardRef15(
@@ -1040,12 +1161,13 @@ var BusinessNumberInput = /* @__PURE__ */ forwardRef15(
1040
1161
  onKeyDown,
1041
1162
  ...rest
1042
1163
  } = props;
1043
- const inputRef = useRef6(null);
1164
+ const inputRef = useRef8(null);
1044
1165
  const m = useMessages();
1045
1166
  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.";
1046
1167
  const label6 = labelProp ?? m.businessNumber ?? "\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638";
1047
1168
  const incompleteText = m.businessNumberIncomplete ?? "10\uC790\uB9AC\uB97C \uBAA8\uB450 \uC785\uB825\uD574 \uC8FC\uC138\uC694.";
1048
1169
  const [touched, setTouched] = useState5(false);
1170
+ useFormReset(inputRef, () => setTouched(false));
1049
1171
  const field4 = useFormattedInput({
1050
1172
  isControlled: "value" in props,
1051
1173
  value: value3,
@@ -1060,7 +1182,7 @@ var BusinessNumberInput = /* @__PURE__ */ forwardRef15(
1060
1182
  const autoInvalid = validate && field4.raw.length > 0 && (complete ? !isValidBusinessNumber(field4.raw) : touched);
1061
1183
  const showAuto = autoInvalid && error === void 0;
1062
1184
  const announcement = useDelayedAnnouncement(showAuto && complete ? invalidText : "");
1063
- return /* @__PURE__ */ jsxs15(Fragment4, { children: [
1185
+ return /* @__PURE__ */ jsxs16(Fragment5, { children: [
1064
1186
  /* @__PURE__ */ jsx17(
1065
1187
  TextField,
1066
1188
  {
@@ -1089,16 +1211,16 @@ var BusinessNumberInput = /* @__PURE__ */ forwardRef15(
1089
1211
  );
1090
1212
 
1091
1213
  // src/components/Calendar/Calendar.tsx
1092
- import { forwardRef as forwardRef17, useEffect as useEffect5, useId as useId4, useRef as useRef7, useState as useState6 } from "react";
1214
+ import { forwardRef as forwardRef17, useEffect as useEffect6, useId as useId5, useRef as useRef9, useState as useState6 } from "react";
1093
1215
  import { ChevronLeftIcon, ChevronRightIcon as ChevronRightIcon2 } from "@bestow-ui/icons";
1094
1216
  import { KOREAN_WEEKDAYS } from "@bestow-ui/korean-utils";
1095
1217
 
1096
1218
  // src/utils/useIsClient.ts
1097
- import { useSyncExternalStore } from "react";
1219
+ import { useSyncExternalStore as useSyncExternalStore2 } from "react";
1098
1220
  var subscribeNothing = () => () => {
1099
1221
  };
1100
1222
  function useIsClient() {
1101
- return useSyncExternalStore(
1223
+ return useSyncExternalStore2(
1102
1224
  subscribeNothing,
1103
1225
  () => true,
1104
1226
  () => false
@@ -1106,15 +1228,15 @@ function useIsClient() {
1106
1228
  }
1107
1229
 
1108
1230
  // src/components/IconButton/IconButton.tsx
1109
- import { forwardRef as forwardRef16 } from "react";
1231
+ import { cloneElement as cloneElement2, forwardRef as forwardRef16 } from "react";
1110
1232
 
1111
1233
  // src/components/IconButton/IconButton.css.ts
1112
- import { createRuntimeFn as _7a4689 } from "@vanilla-extract/recipes/createRuntimeFn";
1113
- var iconButton = /* @__PURE__ */ _7a4689({ defaultClassName: "ip9et20", variantClassNames: { size: { sm: "ip9et21", md: "ip9et22", lg: "ip9et23" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
1234
+ import { createRuntimeFn as _7a4688 } from "@vanilla-extract/recipes/createRuntimeFn";
1235
+ var iconButton = /* @__PURE__ */ _7a4688({ defaultClassName: "ip9et20", variantClassNames: { size: { sm: "ip9et21", md: "ip9et22", lg: "ip9et23" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
1114
1236
 
1115
1237
  // src/components/IconButton/IconButton.tsx
1116
1238
  import { jsx as jsx18 } from "react/jsx-runtime";
1117
- var IconButton = /* @__PURE__ */ forwardRef16(function IconButton2({ variant = "ghost", color = "neutral", size, loading, className, children, ...rest }, ref) {
1239
+ var IconButton = /* @__PURE__ */ forwardRef16(function IconButton2({ variant = "ghost", color = "neutral", size, loading, asChild, className, children, ...rest }, ref) {
1118
1240
  return /* @__PURE__ */ jsx18(
1119
1241
  Button,
1120
1242
  {
@@ -1123,9 +1245,10 @@ var IconButton = /* @__PURE__ */ forwardRef16(function IconButton2({ variant = "
1123
1245
  color,
1124
1246
  size,
1125
1247
  loading,
1248
+ asChild,
1126
1249
  className: cx(iconButton({ size }), className),
1127
1250
  ...rest,
1128
- children: !loading && children
1251
+ children: loading ? asChild && cloneElement2(children, void 0, null) : children
1129
1252
  }
1130
1253
  );
1131
1254
  });
@@ -1140,7 +1263,7 @@ var root6 = "_1qyq67b0";
1140
1263
  var weekday = "_1qyq67b4";
1141
1264
 
1142
1265
  // src/components/Calendar/Calendar.tsx
1143
- import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
1266
+ import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
1144
1267
  var Calendar = /* @__PURE__ */ forwardRef17(function Calendar2(props, ref) {
1145
1268
  const {
1146
1269
  value: value3,
@@ -1161,8 +1284,8 @@ var Calendar = /* @__PURE__ */ forwardRef17(function Calendar2(props, ref) {
1161
1284
  const nextMonthLabel = nextMonthLabelProp ?? m.nextMonth ?? "\uB2E4\uC74C \uB2EC";
1162
1285
  const weekdaysShort = m.weekdaysShort ?? KOREAN_WEEKDAYS;
1163
1286
  const weekdaysLong = m.weekdaysLong ?? KOREAN_WEEKDAYS.map((name) => `${name}\uC694\uC77C`);
1164
- const headingId = useId4();
1165
- const gridRef = useRef7(null);
1287
+ const headingId = useId5();
1288
+ const gridRef = useRef9(null);
1166
1289
  const isControlled = "value" in props;
1167
1290
  const [innerValue, setInnerValue] = useState6(defaultValue ?? "");
1168
1291
  const selected = parseISODate(isControlled ? value3 : innerValue);
@@ -1179,13 +1302,13 @@ var Calendar = /* @__PURE__ */ forwardRef17(function Calendar2(props, ref) {
1179
1302
  const [focusedState, setFocused] = useState6(null);
1180
1303
  const base = selected ?? today;
1181
1304
  const focused = focusedState ?? (base ? clamp(base) : null);
1182
- const moveFocus = useRef7(initialFocus ?? false);
1305
+ const moveFocus = useRef9(initialFocus ?? false);
1183
1306
  const selectedIso = selected ? toISODate(selected) : "";
1184
- useEffect5(() => {
1307
+ useEffect6(() => {
1185
1308
  const date = parseISODate(selectedIso);
1186
1309
  if (date) setFocused((prev) => isSameDay(prev, date) ? prev : date);
1187
1310
  }, [selectedIso]);
1188
- useEffect5(() => {
1311
+ useEffect6(() => {
1189
1312
  if (!moveFocus.current || !focused) return;
1190
1313
  moveFocus.current = false;
1191
1314
  gridRef.current?.querySelector(`[data-date="${toISODate(focused)}"]`)?.focus();
@@ -1225,8 +1348,8 @@ var Calendar = /* @__PURE__ */ forwardRef17(function Calendar2(props, ref) {
1225
1348
  ) : [];
1226
1349
  const canPrev = !!visible && (!minDate || compareDays(new Date(visible.getFullYear(), visible.getMonth(), 0), minDate) >= 0);
1227
1350
  const canNext = !!visible && (!maxDate || compareDays(new Date(visible.getFullYear(), visible.getMonth() + 1, 1), maxDate) <= 0);
1228
- return /* @__PURE__ */ jsxs16("div", { ref, className: cx(root6, className), children: [
1229
- /* @__PURE__ */ jsxs16("div", { className: header3, children: [
1351
+ return /* @__PURE__ */ jsxs17("div", { ref, className: cx(root6, className), children: [
1352
+ /* @__PURE__ */ jsxs17("div", { className: header3, children: [
1230
1353
  /* @__PURE__ */ jsx19(
1231
1354
  IconButton,
1232
1355
  {
@@ -1249,7 +1372,7 @@ var Calendar = /* @__PURE__ */ forwardRef17(function Calendar2(props, ref) {
1249
1372
  }
1250
1373
  )
1251
1374
  ] }),
1252
- /* @__PURE__ */ jsxs16("table", { ref: gridRef, role: "grid", "aria-labelledby": headingId, className: grid, onKeyDown: handleKeyDown, children: [
1375
+ /* @__PURE__ */ jsxs17("table", { ref: gridRef, role: "grid", "aria-labelledby": headingId, className: grid, onKeyDown: handleKeyDown, children: [
1253
1376
  /* @__PURE__ */ jsx19("thead", { children: /* @__PURE__ */ jsx19("tr", { children: weekdaysShort.map((name, index) => /* @__PURE__ */ jsx19("th", { scope: "col", abbr: weekdaysLong[index], className: weekday, "data-weekday": index, children: name }, index)) }) }),
1254
1377
  /* @__PURE__ */ jsx19("tbody", { children: weeks.map((week) => /* @__PURE__ */ jsx19("tr", { children: week.map((date) => {
1255
1378
  const iso = toISODate(date);
@@ -1287,15 +1410,118 @@ var Calendar = /* @__PURE__ */ forwardRef17(function Calendar2(props, ref) {
1287
1410
  ] });
1288
1411
  });
1289
1412
 
1413
+ // src/components/CheckboxGroup/CheckboxGroup.tsx
1414
+ import { forwardRef as forwardRef18, useId as useId6, useRef as useRef10, useState as useState7 } from "react";
1415
+
1416
+ // src/components/CheckboxGroup/CheckboxGroup.css.ts
1417
+ import { createRuntimeFn as _7a4689 } from "@vanilla-extract/recipes/createRuntimeFn";
1418
+ var description3 = /* @__PURE__ */ _7a4689({ defaultClassName: "_1z0r6xj5", variantClassNames: { size: { sm: "_1z0r6xj6", md: "_1z0r6xj7" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
1419
+ var groupLabel = "_1z0r6xj0";
1420
+ var items = /* @__PURE__ */ _7a4689({ defaultClassName: "_1z0r6xj1", variantClassNames: { orientation: { vertical: "_1z0r6xj2", horizontal: "_1z0r6xj3" } }, defaultVariants: { orientation: "vertical" }, compoundVariants: [] });
1421
+ var option = "_1z0r6xj4";
1422
+
1423
+ // src/components/CheckboxGroup/CheckboxGroup.tsx
1424
+ import { Fragment as Fragment6, jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
1425
+ var CheckboxGroup = /* @__PURE__ */ forwardRef18(
1426
+ function CheckboxGroup2(props, ref) {
1427
+ const {
1428
+ options,
1429
+ value: value3,
1430
+ defaultValue,
1431
+ onValueChange,
1432
+ label: label6,
1433
+ helperText: helperText3,
1434
+ error,
1435
+ orientation,
1436
+ size,
1437
+ disabled,
1438
+ required,
1439
+ name,
1440
+ id,
1441
+ "aria-label": ariaLabel,
1442
+ className
1443
+ } = props;
1444
+ const m = useMessages();
1445
+ const isControlled = "value" in props;
1446
+ const [innerValue, setInnerValue] = useState7(defaultValue ?? []);
1447
+ const current2 = isControlled ? value3 ?? [] : innerValue;
1448
+ const generatedId = useId6();
1449
+ const baseId = id ?? generatedId;
1450
+ const labelId = label6 ? `${baseId}-label` : void 0;
1451
+ const helperId = helperText3 ? `${baseId}-helper` : void 0;
1452
+ const rootRef = useRef10(null);
1453
+ useFormReset(rootRef, () => {
1454
+ if (isControlled) return;
1455
+ const next = defaultValue ?? [];
1456
+ setInnerValue(next);
1457
+ if (next.join() !== current2.join()) onValueChange?.(next);
1458
+ });
1459
+ const toggle3 = (optionValue, checked) => {
1460
+ const next = options.map((option3) => option3.value).filter((v) => v === optionValue ? checked : current2.includes(v));
1461
+ if (!isControlled) setInnerValue(next);
1462
+ onValueChange?.(next);
1463
+ };
1464
+ return /* @__PURE__ */ jsxs18("div", { className: cx(field, className), children: [
1465
+ label6 && /* @__PURE__ */ jsxs18("span", { id: labelId, className: cx(label, groupLabel), children: [
1466
+ label6,
1467
+ required && /* @__PURE__ */ jsxs18(Fragment6, { children: [
1468
+ /* @__PURE__ */ jsx20("span", { className: requiredMark, "aria-hidden": true, children: "*" }),
1469
+ " ",
1470
+ /* @__PURE__ */ jsxs18("span", { className: visuallyHidden, children: [
1471
+ "(",
1472
+ m.required ?? "\uD544\uC218",
1473
+ ")"
1474
+ ] })
1475
+ ] })
1476
+ ] }),
1477
+ /* @__PURE__ */ jsx20(
1478
+ "div",
1479
+ {
1480
+ ref: mergeRefs(ref, rootRef),
1481
+ id: baseId,
1482
+ role: "group",
1483
+ "aria-label": ariaLabel,
1484
+ "aria-labelledby": labelId,
1485
+ "aria-describedby": helperId,
1486
+ className: items({ orientation }),
1487
+ children: options.map((option3) => {
1488
+ const itemId = `${baseId}-${option3.value}`;
1489
+ const descriptionId = option3.description ? `${itemId}-description` : void 0;
1490
+ return /* @__PURE__ */ jsxs18("div", { className: option, children: [
1491
+ /* @__PURE__ */ jsx20(
1492
+ Checkbox,
1493
+ {
1494
+ id: itemId,
1495
+ name,
1496
+ value: option3.value,
1497
+ label: option3.label,
1498
+ size,
1499
+ checked: current2.includes(option3.value),
1500
+ onCheckedChange: (checked) => toggle3(option3.value, checked),
1501
+ disabled: disabled || option3.disabled,
1502
+ invalid: error,
1503
+ "aria-describedby": descriptionId
1504
+ }
1505
+ ),
1506
+ option3.description && /* @__PURE__ */ jsx20("span", { id: descriptionId, className: description3({ size }), children: option3.description })
1507
+ ] }, option3.value);
1508
+ })
1509
+ }
1510
+ ),
1511
+ helperText3 && /* @__PURE__ */ jsx20("p", { id: helperId, className: helperText({ error }), children: helperText3 })
1512
+ ] });
1513
+ }
1514
+ );
1515
+
1290
1516
  // src/components/Combobox/Combobox.tsx
1291
1517
  import * as Popover from "@radix-ui/react-popover";
1292
1518
  import {
1293
- forwardRef as forwardRef18,
1294
- useEffect as useEffect6,
1295
- useId as useId5,
1519
+ forwardRef as forwardRef19,
1520
+ useEffect as useEffect7,
1521
+ useId as useId7,
1296
1522
  useMemo as useMemo3,
1297
- useRef as useRef8,
1298
- useState as useState7
1523
+ useRef as useRef11,
1524
+ useState as useState8
1299
1525
  } from "react";
1300
1526
  import { CheckIcon, ChevronDownIcon as ChevronDownIcon3, XIcon as XIcon3 } from "@bestow-ui/icons";
1301
1527
 
@@ -1315,9 +1541,9 @@ var empty = "c2pbq74";
1315
1541
  var toggle2 = "c2pbq71 c2pbq70";
1316
1542
 
1317
1543
  // src/components/Combobox/Combobox.tsx
1318
- import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
1319
- var defaultFilter = (option2, query) => option2.label.toLowerCase().includes(query.trim().toLowerCase());
1320
- var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
1544
+ import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
1545
+ var defaultFilter = (option3, query2) => option3.label.toLowerCase().includes(query2.trim().toLowerCase());
1546
+ var Combobox = /* @__PURE__ */ forwardRef19(function Combobox2(props, ref) {
1321
1547
  const {
1322
1548
  options,
1323
1549
  value: value3,
@@ -1345,24 +1571,24 @@ var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
1345
1571
  const emptyMessage = emptyMessageProp ?? m.noResults ?? "\uACB0\uACFC\uAC00 \uC5C6\uC5B4\uC694";
1346
1572
  const toggleLabel = toggleLabelProp ?? m.openList ?? "\uBAA9\uB85D \uC5F4\uAE30";
1347
1573
  const clearLabel = clearLabelProp ?? m.clearSelection ?? "\uC120\uD0DD \uC9C0\uC6B0\uAE30";
1348
- const generatedId = useId5();
1574
+ const generatedId = useId7();
1349
1575
  const inputId = id ?? generatedId;
1350
1576
  const labelId = `${inputId}-label`;
1351
1577
  const listId = `${inputId}-listbox`;
1352
1578
  const helperId = helperText3 ? `${inputId}-helper` : void 0;
1353
1579
  const optionId = (index) => `${inputId}-option-${index}`;
1354
1580
  const portal2 = usePortalProps();
1355
- const inputRef = useRef8(null);
1356
- const anchorRef = useRef8(null);
1581
+ const inputRef = useRef11(null);
1582
+ const anchorRef = useRef11(null);
1357
1583
  const isControlled = "value" in props;
1358
- const [innerValue, setInnerValue] = useState7(defaultValue);
1584
+ const [innerValue, setInnerValue] = useState8(defaultValue);
1359
1585
  const selectedValue = isControlled ? value3 : innerValue;
1360
1586
  const selectedOption = options.find((o) => o.value === selectedValue);
1361
- const [open, setOpen] = useState7(false);
1362
- const [query, setQuery] = useState7(null);
1363
- const [activeIndex, setActiveIndex] = useState7(-1);
1364
- const filtered = useMemo3(() => query ? options.filter((o) => filter(o, query)) : options, [options, filter, query]);
1365
- const inputText = query ?? selectedOption?.label ?? "";
1587
+ const [open, setOpen] = useState8(false);
1588
+ const [query2, setQuery] = useState8(null);
1589
+ const [activeIndex, setActiveIndex] = useState8(-1);
1590
+ const filtered = useMemo3(() => query2 ? options.filter((o) => filter(o, query2)) : options, [options, filter, query2]);
1591
+ const inputText = query2 ?? selectedOption?.label ?? "";
1366
1592
  const firstEnabled = (list7, from = 0, step2 = 1) => {
1367
1593
  for (let i = from; i >= 0 && i < list7.length; i += step2) if (!list7[i].disabled) return i;
1368
1594
  return -1;
@@ -1379,18 +1605,24 @@ var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
1379
1605
  setQuery(null);
1380
1606
  setActiveIndex(-1);
1381
1607
  };
1608
+ useFormReset(inputRef, () => {
1609
+ reset();
1610
+ if (isControlled) return;
1611
+ setInnerValue(defaultValue);
1612
+ if (defaultValue !== selectedValue) onValueChange?.(defaultValue ?? "");
1613
+ });
1382
1614
  const clearSelection = () => {
1383
1615
  if (!isControlled) setInnerValue(void 0);
1384
1616
  if (selectedValue) onValueChange?.("");
1385
1617
  };
1386
1618
  const close2 = () => {
1387
- if (query === "" && selectedValue) clearSelection();
1619
+ if (query2 === "" && selectedValue) clearSelection();
1388
1620
  reset();
1389
1621
  };
1390
- const select2 = (option2) => {
1391
- if (option2.disabled) return;
1392
- if (!isControlled) setInnerValue(option2.value);
1393
- if (option2.value !== selectedValue) onValueChange?.(option2.value);
1622
+ const select2 = (option3) => {
1623
+ if (option3.disabled) return;
1624
+ if (!isControlled) setInnerValue(option3.value);
1625
+ if (option3.value !== selectedValue) onValueChange?.(option3.value);
1394
1626
  reset();
1395
1627
  };
1396
1628
  const move = (step2) => {
@@ -1406,6 +1638,7 @@ var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
1406
1638
  setActiveIndex(nextQuery ? firstEnabled(nextList) : -1);
1407
1639
  };
1408
1640
  const handleKeyDown = (event) => {
1641
+ if (event.nativeEvent.isComposing || event.keyCode === 229) return;
1409
1642
  switch (event.key) {
1410
1643
  case "ArrowDown":
1411
1644
  event.preventDefault();
@@ -1420,8 +1653,8 @@ var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
1420
1653
  case "Enter":
1421
1654
  if (open) {
1422
1655
  event.preventDefault();
1423
- const option2 = filtered[activeIndex];
1424
- if (option2) select2(option2);
1656
+ const option3 = filtered[activeIndex];
1657
+ if (option3) select2(option3);
1425
1658
  else close2();
1426
1659
  }
1427
1660
  break;
@@ -1436,34 +1669,34 @@ var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
1436
1669
  break;
1437
1670
  }
1438
1671
  };
1439
- useEffect6(() => {
1672
+ useEffect7(() => {
1440
1673
  if (!open || activeIndex < 0) return;
1441
1674
  document.getElementById(optionId(activeIndex))?.scrollIntoView?.({ block: "nearest" });
1442
1675
  }, [open, activeIndex]);
1443
1676
  const hasOptions = filtered.length > 0;
1444
1677
  const noResults = open && !disabled && !hasOptions;
1445
- const [announcedFor, setAnnouncedFor] = useState7(void 0);
1446
- useEffect6(() => {
1678
+ const [announcedFor, setAnnouncedFor] = useState8(void 0);
1679
+ useEffect7(() => {
1447
1680
  if (!noResults) return;
1448
- const timer2 = setTimeout(() => setAnnouncedFor(query), ANNOUNCE_DELAY);
1681
+ const timer2 = setTimeout(() => setAnnouncedFor(query2), ANNOUNCE_DELAY);
1449
1682
  return () => clearTimeout(timer2);
1450
- }, [noResults, query]);
1451
- const announceNoResults = noResults && announcedFor === query;
1452
- return /* @__PURE__ */ jsxs17("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
1453
- label6 && /* @__PURE__ */ jsxs17("label", { id: labelId, htmlFor: inputId, className: label, children: [
1683
+ }, [noResults, query2]);
1684
+ const announceNoResults = noResults && announcedFor === query2;
1685
+ return /* @__PURE__ */ jsxs19("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
1686
+ label6 && /* @__PURE__ */ jsxs19("label", { id: labelId, htmlFor: inputId, className: label, children: [
1454
1687
  label6,
1455
- required && /* @__PURE__ */ jsx20("span", { className: requiredMark, "aria-hidden": true, children: "*" })
1688
+ required && /* @__PURE__ */ jsx21("span", { className: requiredMark, "aria-hidden": true, children: "*" })
1456
1689
  ] }),
1457
- /* @__PURE__ */ jsxs17(Popover.Root, { open: open && !disabled, onOpenChange: (next) => next ? openList() : close2(), children: [
1458
- /* @__PURE__ */ jsx20(Popover.Anchor, { asChild: true, children: /* @__PURE__ */ jsxs17(
1690
+ /* @__PURE__ */ jsxs19(Popover.Root, { open: open && !disabled, onOpenChange: (next) => next ? openList() : close2(), children: [
1691
+ /* @__PURE__ */ jsx21(Popover.Anchor, { asChild: true, children: /* @__PURE__ */ jsxs19(
1459
1692
  "div",
1460
1693
  {
1461
1694
  ref: anchorRef,
1462
- className: cx(root3({ size, fullWidth }), className),
1695
+ className: cx(root({ size, fullWidth }), className),
1463
1696
  "data-invalid": error || void 0,
1464
1697
  "data-disabled": disabled || void 0,
1465
1698
  children: [
1466
- /* @__PURE__ */ jsx20(
1699
+ /* @__PURE__ */ jsx21(
1467
1700
  "input",
1468
1701
  {
1469
1702
  ref: mergeRefs(ref, inputRef),
@@ -1490,7 +1723,7 @@ var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
1490
1723
  className: input
1491
1724
  }
1492
1725
  ),
1493
- clearable && selectedOption && !disabled && /* @__PURE__ */ jsx20(
1726
+ clearable && selectedOption && !disabled && /* @__PURE__ */ jsx21(
1494
1727
  "button",
1495
1728
  {
1496
1729
  type: "button",
@@ -1503,10 +1736,10 @@ var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
1503
1736
  reset();
1504
1737
  inputRef.current?.focus();
1505
1738
  },
1506
- children: /* @__PURE__ */ jsx20(XIcon3, { size: 16 })
1739
+ children: /* @__PURE__ */ jsx21(XIcon3, { size: 16 })
1507
1740
  }
1508
1741
  ),
1509
- /* @__PURE__ */ jsx20(
1742
+ /* @__PURE__ */ jsx21(
1510
1743
  "button",
1511
1744
  {
1512
1745
  type: "button",
@@ -1521,13 +1754,13 @@ var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
1521
1754
  else openList(options);
1522
1755
  inputRef.current?.focus();
1523
1756
  },
1524
- children: /* @__PURE__ */ jsx20(ChevronDownIcon3, { size: 16 })
1757
+ children: /* @__PURE__ */ jsx21(ChevronDownIcon3, { size: 16 })
1525
1758
  }
1526
1759
  )
1527
1760
  ]
1528
1761
  }
1529
1762
  ) }),
1530
- /* @__PURE__ */ jsx20(Popover.Portal, { children: /* @__PURE__ */ jsx20(
1763
+ /* @__PURE__ */ jsx21(Popover.Portal, { children: /* @__PURE__ */ jsx21(
1531
1764
  Popover.Content,
1532
1765
  {
1533
1766
  role: "presentation",
@@ -1542,63 +1775,63 @@ var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
1542
1775
  onInteractOutside: (event) => {
1543
1776
  if (anchorRef.current?.contains(event.target)) event.preventDefault();
1544
1777
  },
1545
- children: hasOptions ? /* @__PURE__ */ jsx20(
1778
+ children: hasOptions ? /* @__PURE__ */ jsx21(
1546
1779
  "div",
1547
1780
  {
1548
1781
  id: listId,
1549
1782
  role: "listbox",
1550
1783
  "aria-labelledby": label6 ? labelId : void 0,
1551
1784
  "aria-label": label6 ? void 0 : ariaLabel,
1552
- children: filtered.map((option2, index) => {
1553
- const isSelected = option2.value === selectedValue;
1785
+ children: filtered.map((option3, index) => {
1786
+ const isSelected = option3.value === selectedValue;
1554
1787
  return (
1555
1788
  // aria-activedescendant 패턴: 포커스·키보드는 입력창이 맡고 항목은 포커스를 받지 않는다 (WAI-ARIA combobox)
1556
1789
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/interactive-supports-focus
1557
- /* @__PURE__ */ jsxs17(
1790
+ /* @__PURE__ */ jsxs19(
1558
1791
  "div",
1559
1792
  {
1560
1793
  id: optionId(index),
1561
1794
  role: "option",
1562
1795
  "aria-selected": isSelected,
1563
- "aria-disabled": option2.disabled || void 0,
1796
+ "aria-disabled": option3.disabled || void 0,
1564
1797
  "data-highlighted": index === activeIndex ? "" : void 0,
1565
1798
  "data-state": isSelected ? "checked" : "unchecked",
1566
- "data-disabled": option2.disabled ? "" : void 0,
1799
+ "data-disabled": option3.disabled ? "" : void 0,
1567
1800
  className: item4,
1568
1801
  onMouseDown: (event) => event.preventDefault(),
1569
- onMouseMove: () => !option2.disabled && setActiveIndex(index),
1570
- onClick: () => select2(option2),
1802
+ onMouseMove: () => !option3.disabled && setActiveIndex(index),
1803
+ onClick: () => select2(option3),
1571
1804
  children: [
1572
- option2.label,
1573
- isSelected && /* @__PURE__ */ jsx20("span", { className: itemIndicator, "aria-hidden": true, children: /* @__PURE__ */ jsx20(CheckIcon, { size: 16 }) })
1805
+ option3.label,
1806
+ isSelected && /* @__PURE__ */ jsx21("span", { className: itemIndicator, "aria-hidden": true, children: /* @__PURE__ */ jsx21(CheckIcon, { size: 16 }) })
1574
1807
  ]
1575
1808
  },
1576
- option2.value
1809
+ option3.value
1577
1810
  )
1578
1811
  );
1579
1812
  })
1580
1813
  }
1581
1814
  ) : (
1582
1815
  // 스크린리더 알림은 아래의 항상 있는 status 영역이 맡는다 (여기는 화면 표시만)
1583
- /* @__PURE__ */ jsx20("div", { className: empty, children: emptyMessage })
1816
+ /* @__PURE__ */ jsx21("div", { className: empty, children: emptyMessage })
1584
1817
  )
1585
1818
  }
1586
1819
  ) })
1587
1820
  ] }),
1588
- /* @__PURE__ */ jsx20("span", { role: "status", className: visuallyHidden, children: announceNoResults ? emptyMessage : "" }),
1589
- name && /* @__PURE__ */ jsx20("input", { type: "hidden", name, value: selectedValue ?? "" }),
1590
- helperText3 && /* @__PURE__ */ jsx20("p", { id: helperId, className: helperText({ error }), children: helperText3 })
1821
+ /* @__PURE__ */ jsx21("span", { role: "status", className: visuallyHidden, children: announceNoResults ? emptyMessage : "" }),
1822
+ name && /* @__PURE__ */ jsx21("input", { type: "hidden", name, value: selectedValue ?? "" }),
1823
+ helperText3 && /* @__PURE__ */ jsx21("p", { id: helperId, className: helperText({ error }), children: helperText3 })
1591
1824
  ] });
1592
1825
  });
1593
1826
 
1594
1827
  // src/components/DatePicker/DatePicker.tsx
1595
- import { forwardRef as forwardRef19, useEffect as useEffect7, useRef as useRef9, useState as useState8 } from "react";
1828
+ import { forwardRef as forwardRef20, useEffect as useEffect8, useRef as useRef12, useState as useState9 } from "react";
1596
1829
  import { CalendarIcon } from "@bestow-ui/icons";
1597
1830
 
1598
1831
  // src/components/Popover/Popover.tsx
1599
1832
  import * as RadixPopover from "@radix-ui/react-popover";
1600
1833
  import { XIcon as XIcon4 } from "@bestow-ui/icons";
1601
- import { useId as useId6 } from "react";
1834
+ import { useId as useId8 } from "react";
1602
1835
 
1603
1836
  // src/components/Popover/Popover.css.ts
1604
1837
  var arrow = "_1j99p8x4";
@@ -1608,7 +1841,7 @@ var header4 = "_1j99p8x1";
1608
1841
  var title3 = "_1j99p8x2";
1609
1842
 
1610
1843
  // src/components/Popover/Popover.tsx
1611
- import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
1844
+ import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
1612
1845
  function Popover2({
1613
1846
  content: content12,
1614
1847
  children,
@@ -1628,10 +1861,10 @@ function Popover2({
1628
1861
  }) {
1629
1862
  const portal2 = usePortalProps();
1630
1863
  const m = useMessages();
1631
- const titleId = useId6();
1632
- return /* @__PURE__ */ jsxs18(RadixPopover.Root, { open, defaultOpen, onOpenChange, modal, children: [
1633
- /* @__PURE__ */ jsx21(RadixPopover.Trigger, { asChild: true, children }),
1634
- /* @__PURE__ */ jsx21(RadixPopover.Portal, { children: /* @__PURE__ */ jsxs18(
1864
+ const titleId = useId8();
1865
+ return /* @__PURE__ */ jsxs20(RadixPopover.Root, { open, defaultOpen, onOpenChange, modal, children: [
1866
+ /* @__PURE__ */ jsx22(RadixPopover.Trigger, { asChild: true, children }),
1867
+ /* @__PURE__ */ jsx22(RadixPopover.Portal, { children: /* @__PURE__ */ jsxs20(
1635
1868
  RadixPopover.Content,
1636
1869
  {
1637
1870
  side,
@@ -1644,12 +1877,12 @@ function Popover2({
1644
1877
  className: cx(portal2.className, content7, className),
1645
1878
  style: { ...portal2.style, ...style },
1646
1879
  children: [
1647
- (title6 || showClose) && /* @__PURE__ */ jsxs18("div", { className: header4, children: [
1648
- title6 && /* @__PURE__ */ jsx21("h2", { id: titleId, className: title3, children: title6 }),
1649
- showClose && /* @__PURE__ */ jsx21(RadixPopover.Close, { className: closeButton3, "aria-label": m.close ?? "\uB2EB\uAE30", children: /* @__PURE__ */ jsx21(XIcon4, { size: 16 }) })
1880
+ (title6 || showClose) && /* @__PURE__ */ jsxs20("div", { className: header4, children: [
1881
+ title6 && /* @__PURE__ */ jsx22("h2", { id: titleId, className: title3, children: title6 }),
1882
+ showClose && /* @__PURE__ */ jsx22(RadixPopover.Close, { className: closeButton3, "aria-label": m.close ?? "\uB2EB\uAE30", children: /* @__PURE__ */ jsx22(XIcon4, { size: 16 }) })
1650
1883
  ] }),
1651
1884
  content12,
1652
- showArrow && /* @__PURE__ */ jsx21(RadixPopover.Arrow, { className: arrow, width: 12, height: 6 })
1885
+ showArrow && /* @__PURE__ */ jsx22(RadixPopover.Arrow, { className: arrow, width: 12, height: 6 })
1653
1886
  ]
1654
1887
  }
1655
1888
  ) })
@@ -1658,11 +1891,11 @@ function Popover2({
1658
1891
  var PopoverClose = RadixPopover.Close;
1659
1892
 
1660
1893
  // src/components/DatePicker/DatePicker.tsx
1661
- import { Fragment as Fragment5, jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
1894
+ import { Fragment as Fragment7, jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
1662
1895
  var sanitize2 = (input6) => input6.replace(/\D/g, "").slice(0, 8);
1663
1896
  var format = (digits) => digits.length <= 4 ? digits : digits.length <= 6 ? `${digits.slice(0, 4)}-${digits.slice(4)}` : `${digits.slice(0, 4)}-${digits.slice(4, 6)}-${digits.slice(6)}`;
1664
1897
  var isDigit3 = (char) => /\d/.test(char);
1665
- var DatePicker = /* @__PURE__ */ forwardRef19(
1898
+ var DatePicker = /* @__PURE__ */ forwardRef20(
1666
1899
  function DatePicker2(props, ref) {
1667
1900
  const {
1668
1901
  value: value3,
@@ -1688,17 +1921,17 @@ var DatePicker = /* @__PURE__ */ forwardRef19(
1688
1921
  id,
1689
1922
  className
1690
1923
  } = props;
1691
- const inputRef = useRef9(null);
1924
+ const inputRef = useRef12(null);
1692
1925
  const m = useMessages();
1693
1926
  const label6 = labelProp ?? m.date ?? "\uB0A0\uC9DC";
1694
1927
  const calendarLabel = calendarLabelProp ?? m.openCalendar ?? "\uB2EC\uB825 \uC5F4\uAE30";
1695
1928
  const invalidText = invalidTextProp ?? m.dateInvalid ?? "\uC62C\uBC14\uB978 \uB0A0\uC9DC\uAC00 \uC544\uB2C8\uC5D0\uC694.";
1696
1929
  const unavailableText = unavailableTextProp ?? m.dateUnavailable ?? "\uACE0\uB97C \uC218 \uC5C6\uB294 \uB0A0\uC9DC\uC608\uC694.";
1697
1930
  const incompleteText = incompleteTextProp ?? m.dateIncomplete ?? "\uB0A0\uC9DC\uB97C YYYY-MM-DD \uD615\uC2DD\uC73C\uB85C \uC785\uB825\uD574 \uC8FC\uC138\uC694.";
1698
- const [open, setOpen] = useState8(false);
1699
- const [touched, setTouched] = useState8(false);
1931
+ const [open, setOpen] = useState9(false);
1932
+ const [touched, setTouched] = useState9(false);
1700
1933
  const isControlled = "value" in props;
1701
- const lastEmitted = useRef9(isControlled ? value3 ?? "" : defaultValue ?? "");
1934
+ const lastEmitted = useRef12(isControlled ? value3 ?? "" : defaultValue ?? "");
1702
1935
  const minDate = parseISODate(min);
1703
1936
  const maxDate = parseISODate(max);
1704
1937
  const toIso = (digits) => digits.length === 8 ? `${digits.slice(0, 4)}-${digits.slice(4, 6)}-${digits.slice(6)}` : "";
@@ -1719,11 +1952,12 @@ var DatePicker = /* @__PURE__ */ forwardRef19(
1719
1952
  sanitize: sanitize2,
1720
1953
  format,
1721
1954
  isMeaningful: isDigit3,
1722
- inputRef
1955
+ inputRef,
1956
+ manualReset: true
1723
1957
  });
1724
1958
  const textIso = toIso(field4.raw);
1725
1959
  const { setRaw } = field4;
1726
- useEffect7(() => {
1960
+ useEffect8(() => {
1727
1961
  if (!isControlled) return;
1728
1962
  const next = value3 ?? "";
1729
1963
  lastEmitted.current = next;
@@ -1733,14 +1967,20 @@ var DatePicker = /* @__PURE__ */ forwardRef19(
1733
1967
  if (next === "" && !textIsValid) return;
1734
1968
  setRaw(next.replace(/\D/g, ""));
1735
1969
  }, [value3]);
1970
+ useFormReset(inputRef, () => {
1971
+ setTouched(false);
1972
+ const next = (isControlled ? value3 : defaultValue) ?? "";
1973
+ setRaw(next.replace(/\D/g, ""));
1974
+ if (!isControlled) emit(next);
1975
+ });
1736
1976
  const date = parseISODate(textIso);
1737
1977
  const complete = field4.raw.length === 8;
1738
1978
  const autoError = complete ? !date ? invalidText : isUnavailable(date) ? unavailableText : null : touched && field4.raw.length > 0 ? incompleteText : null;
1739
1979
  const showAuto = autoError !== null && error === void 0;
1740
1980
  const announcement = useDelayedAnnouncement(showAuto && complete ? autoError ?? "" : "");
1741
1981
  const selectedIso = date && !isUnavailable(date) ? textIso : "";
1742
- return /* @__PURE__ */ jsxs19(Fragment5, { children: [
1743
- /* @__PURE__ */ jsx22(
1982
+ return /* @__PURE__ */ jsxs21(Fragment7, { children: [
1983
+ /* @__PURE__ */ jsx23(
1744
1984
  TextField,
1745
1985
  {
1746
1986
  ref: mergeRefs(ref, inputRef),
@@ -1759,7 +1999,7 @@ var DatePicker = /* @__PURE__ */ forwardRef19(
1759
1999
  disabled,
1760
2000
  fullWidth,
1761
2001
  rootClassName: className,
1762
- endAdornment: /* @__PURE__ */ jsx22(
2002
+ endAdornment: /* @__PURE__ */ jsx23(
1763
2003
  Popover2,
1764
2004
  {
1765
2005
  open,
@@ -1768,7 +2008,7 @@ var DatePicker = /* @__PURE__ */ forwardRef19(
1768
2008
  align: "end",
1769
2009
  "aria-label": m.calendar ?? "\uB2EC\uB825",
1770
2010
  onOpenAutoFocus: (event) => event.preventDefault(),
1771
- content: /* @__PURE__ */ jsx22(
2011
+ content: /* @__PURE__ */ jsx23(
1772
2012
  Calendar,
1773
2013
  {
1774
2014
  value: selectedIso,
@@ -1785,19 +2025,19 @@ var DatePicker = /* @__PURE__ */ forwardRef19(
1785
2025
  initialFocus: true
1786
2026
  }
1787
2027
  ),
1788
- children: /* @__PURE__ */ jsx22(IconButton, { "aria-label": calendarLabel, size: "sm", disabled, children: /* @__PURE__ */ jsx22(CalendarIcon, {}) })
2028
+ children: /* @__PURE__ */ jsx23(IconButton, { "aria-label": calendarLabel, size: "sm", disabled, children: /* @__PURE__ */ jsx23(CalendarIcon, {}) })
1789
2029
  }
1790
2030
  )
1791
2031
  }
1792
2032
  ),
1793
- /* @__PURE__ */ jsx22("span", { role: "status", className: visuallyHidden, children: announcement }),
1794
- name && /* @__PURE__ */ jsx22("input", { type: "hidden", name, value: selectedIso })
2033
+ /* @__PURE__ */ jsx23("span", { role: "status", className: visuallyHidden, children: announcement }),
2034
+ name && /* @__PURE__ */ jsx23("input", { type: "hidden", name, value: selectedIso })
1795
2035
  ] });
1796
2036
  }
1797
2037
  );
1798
2038
 
1799
2039
  // src/components/DateRangePicker/DateRangePicker.tsx
1800
- import { forwardRef as forwardRef20, useId as useId7, useState as useState9 } from "react";
2040
+ import { forwardRef as forwardRef21, useId as useId9, useRef as useRef13, useState as useState10 } from "react";
1801
2041
 
1802
2042
  // src/components/DateRangePicker/DateRangePicker.css.ts
1803
2043
  var field2 = "_17277dh3";
@@ -1808,8 +2048,8 @@ var presets = "_17277dh5";
1808
2048
  var separator2 = "_17277dh4";
1809
2049
 
1810
2050
  // src/components/DateRangePicker/DateRangePicker.tsx
1811
- import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
1812
- var DateRangePicker = /* @__PURE__ */ forwardRef20(
2051
+ import { jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
2052
+ var DateRangePicker = /* @__PURE__ */ forwardRef21(
1813
2053
  function DateRangePicker2(props, ref) {
1814
2054
  const {
1815
2055
  value: value3,
@@ -1834,37 +2074,41 @@ var DateRangePicker = /* @__PURE__ */ forwardRef20(
1834
2074
  className
1835
2075
  } = props;
1836
2076
  const m = useMessages();
1837
- const generatedId = useId7();
2077
+ const generatedId = useId9();
1838
2078
  const baseId = id ?? generatedId;
1839
2079
  const helperId = helperText3 ? `${baseId}-helper` : void 0;
1840
2080
  const isClient = useIsClient();
1841
2081
  const isControlled = "value" in props;
1842
- const [inner, setInner] = useState9(defaultValue ?? { start: "", end: "" });
2082
+ const [inner, setInner] = useState10(defaultValue ?? { start: "", end: "" });
1843
2083
  const range3 = isControlled ? value3 ?? { start: "", end: "" } : inner;
1844
2084
  const update = (next) => {
1845
2085
  if (next.start === range3.start && next.end === range3.end) return;
1846
2086
  if (!isControlled) setInner(next);
1847
2087
  onValueChange?.(next);
1848
2088
  };
2089
+ const rootRef = useRef13(null);
2090
+ useFormReset(rootRef, () => {
2091
+ if (!isControlled) update(defaultValue ?? { start: "", end: "" });
2092
+ });
1849
2093
  const todayIso = () => today ?? toISODate(/* @__PURE__ */ new Date());
1850
2094
  const startLabel = startLabelProp ?? m.dateRangeStart ?? "\uC2DC\uC791\uC77C";
1851
2095
  const endLabel = endLabelProp ?? m.dateRangeEnd ?? "\uC885\uB8CC\uC77C";
1852
2096
  const common = { isDateDisabled, isHoliday, today, disabled, required, fullWidth: true };
1853
- return /* @__PURE__ */ jsxs20(
2097
+ return /* @__PURE__ */ jsxs22(
1854
2098
  "fieldset",
1855
2099
  {
1856
- ref,
2100
+ ref: mergeRefs(ref, rootRef),
1857
2101
  id,
1858
2102
  className: cx(fieldset3, className),
1859
2103
  "aria-describedby": helperId,
1860
2104
  "data-invalid": error || void 0,
1861
2105
  children: [
1862
- label6 && /* @__PURE__ */ jsxs20("legend", { className: legend3, children: [
2106
+ label6 && /* @__PURE__ */ jsxs22("legend", { className: legend3, children: [
1863
2107
  label6,
1864
- required && /* @__PURE__ */ jsx23("span", { className: requiredMark, "aria-hidden": true, children: "*" })
2108
+ required && /* @__PURE__ */ jsx24("span", { className: requiredMark, "aria-hidden": true, children: "*" })
1865
2109
  ] }),
1866
- /* @__PURE__ */ jsxs20("div", { className: fields, children: [
1867
- /* @__PURE__ */ jsx23("div", { className: field2, children: /* @__PURE__ */ jsx23(
2110
+ /* @__PURE__ */ jsxs22("div", { className: fields, children: [
2111
+ /* @__PURE__ */ jsx24("div", { className: field2, children: /* @__PURE__ */ jsx24(
1868
2112
  DatePicker,
1869
2113
  {
1870
2114
  ...common,
@@ -1878,8 +2122,8 @@ var DateRangePicker = /* @__PURE__ */ forwardRef20(
1878
2122
  error: error || void 0
1879
2123
  }
1880
2124
  ) }),
1881
- /* @__PURE__ */ jsx23("span", { className: separator2, "aria-hidden": true, children: "~" }),
1882
- /* @__PURE__ */ jsx23("div", { className: field2, children: /* @__PURE__ */ jsx23(
2125
+ /* @__PURE__ */ jsx24("span", { className: separator2, "aria-hidden": true, children: "~" }),
2126
+ /* @__PURE__ */ jsx24("div", { className: field2, children: /* @__PURE__ */ jsx24(
1883
2127
  DatePicker,
1884
2128
  {
1885
2129
  ...common,
@@ -1894,10 +2138,10 @@ var DateRangePicker = /* @__PURE__ */ forwardRef20(
1894
2138
  }
1895
2139
  ) })
1896
2140
  ] }),
1897
- presets2 && presets2.length > 0 && /* @__PURE__ */ jsx23("div", { role: "group", "aria-label": m.dateRangePresets ?? "\uBE60\uB978 \uC120\uD0DD", className: presets, children: presets2.map((preset) => {
2141
+ presets2 && presets2.length > 0 && /* @__PURE__ */ jsx24("div", { role: "group", "aria-label": m.dateRangePresets ?? "\uBE60\uB978 \uC120\uD0DD", className: presets, children: presets2.map((preset) => {
1898
2142
  const target = isClient ? presetRange(preset, todayIso()) : null;
1899
2143
  const pressed = !!target && target.start === range3.start && target.end === range3.end;
1900
- return /* @__PURE__ */ jsx23(
2144
+ return /* @__PURE__ */ jsx24(
1901
2145
  Button,
1902
2146
  {
1903
2147
  type: "button",
@@ -1912,7 +2156,7 @@ var DateRangePicker = /* @__PURE__ */ forwardRef20(
1912
2156
  preset.label
1913
2157
  );
1914
2158
  }) }),
1915
- helperText3 && /* @__PURE__ */ jsx23("p", { id: helperId, className: helperText({ error }), children: helperText3 })
2159
+ helperText3 && /* @__PURE__ */ jsx24("p", { id: helperId, className: helperText({ error }), children: helperText3 })
1916
2160
  ]
1917
2161
  }
1918
2162
  );
@@ -1928,7 +2172,7 @@ import { createRuntimeFn as _7a46810 } from "@vanilla-extract/recipes/createRunt
1928
2172
  var body2 = "nmobyvy";
1929
2173
  var closeButton4 = "nmobyvx";
1930
2174
  var content8 = /* @__PURE__ */ _7a46810({ defaultClassName: "nmobyv9", variantClassNames: { side: { right: "nmobyva", left: "nmobyvb", top: "nmobyvc", bottom: "nmobyvd" }, size: { sm: "nmobyve", md: "nmobyvf", lg: "nmobyvg" } }, defaultVariants: { side: "right", size: "md" }, compoundVariants: [[{ side: "right", size: "sm" }, "nmobyvh"], [{ side: "right", size: "md" }, "nmobyvi"], [{ side: "right", size: "lg" }, "nmobyvj"], [{ side: "left", size: "sm" }, "nmobyvk"], [{ side: "left", size: "md" }, "nmobyvl"], [{ side: "left", size: "lg" }, "nmobyvm"], [{ side: "top", size: "sm" }, "nmobyvn"], [{ side: "top", size: "md" }, "nmobyvo"], [{ side: "top", size: "lg" }, "nmobyvp"], [{ side: "bottom", size: "sm" }, "nmobyvq"], [{ side: "bottom", size: "md" }, "nmobyvr"], [{ side: "bottom", size: "lg" }, "nmobyvs"]] });
1931
- var description3 = "nmobyvw";
2175
+ var description4 = "nmobyvw";
1932
2176
  var footer2 = "nmobyvz";
1933
2177
  var header5 = "nmobyvt";
1934
2178
  var headings2 = "nmobyvu";
@@ -1936,14 +2180,14 @@ var overlay2 = "nmobyv0";
1936
2180
  var title4 = "nmobyvv";
1937
2181
 
1938
2182
  // src/components/Drawer/Drawer.tsx
1939
- import { jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
2183
+ import { jsx as jsx25, jsxs as jsxs23 } from "react/jsx-runtime";
1940
2184
  function Drawer({
1941
2185
  open,
1942
2186
  defaultOpen,
1943
2187
  onOpenChange,
1944
2188
  trigger: trigger4,
1945
2189
  title: title6,
1946
- description: description7,
2190
+ description: description8,
1947
2191
  children,
1948
2192
  footer: footer5,
1949
2193
  side,
@@ -1955,11 +2199,11 @@ function Drawer({
1955
2199
  const portal2 = usePortalProps();
1956
2200
  const m = useMessages();
1957
2201
  const focus = useReturnFocus(Boolean(trigger4));
1958
- return /* @__PURE__ */ jsxs21(Dialog2.Root, { open, defaultOpen, onOpenChange, children: [
1959
- trigger4 && /* @__PURE__ */ jsx24(Dialog2.Trigger, { asChild: true, children: trigger4 }),
1960
- /* @__PURE__ */ jsxs21(Dialog2.Portal, { children: [
1961
- /* @__PURE__ */ jsx24(Dialog2.Overlay, { className: cx(portal2.className, overlay2), style: portal2.style }),
1962
- /* @__PURE__ */ jsxs21(
2202
+ return /* @__PURE__ */ jsxs23(Dialog2.Root, { open, defaultOpen, onOpenChange, children: [
2203
+ trigger4 && /* @__PURE__ */ jsx25(Dialog2.Trigger, { asChild: true, children: trigger4 }),
2204
+ /* @__PURE__ */ jsxs23(Dialog2.Portal, { children: [
2205
+ /* @__PURE__ */ jsx25(Dialog2.Overlay, { className: cx(portal2.className, overlay2), style: portal2.style }),
2206
+ /* @__PURE__ */ jsxs23(
1963
2207
  Dialog2.Content,
1964
2208
  {
1965
2209
  className: cx(portal2.className, content8({ side, size }), className),
@@ -1968,17 +2212,17 @@ function Drawer({
1968
2212
  onPointerDownOutside: closeOnOverlayClick ? void 0 : (event) => event.preventDefault(),
1969
2213
  onOpenAutoFocus: focus.onOpenAutoFocus,
1970
2214
  onCloseAutoFocus: focus.onCloseAutoFocus,
1971
- ...description7 ? {} : { "aria-describedby": void 0 },
2215
+ ...description8 ? {} : { "aria-describedby": void 0 },
1972
2216
  children: [
1973
- /* @__PURE__ */ jsxs21("div", { className: header5, children: [
1974
- /* @__PURE__ */ jsxs21("div", { className: headings2, children: [
1975
- /* @__PURE__ */ jsx24(Dialog2.Title, { className: title4, children: title6 }),
1976
- description7 && /* @__PURE__ */ jsx24(Dialog2.Description, { className: description3, children: description7 })
2217
+ /* @__PURE__ */ jsxs23("div", { className: header5, children: [
2218
+ /* @__PURE__ */ jsxs23("div", { className: headings2, children: [
2219
+ /* @__PURE__ */ jsx25(Dialog2.Title, { className: title4, children: title6 }),
2220
+ description8 && /* @__PURE__ */ jsx25(Dialog2.Description, { className: description4, children: description8 })
1977
2221
  ] }),
1978
- !hideCloseButton && /* @__PURE__ */ jsx24(Dialog2.Close, { asChild: true, children: /* @__PURE__ */ jsx24(IconButton, { "aria-label": m.close ?? "\uB2EB\uAE30", size: "sm", className: closeButton4, children: /* @__PURE__ */ jsx24(XIcon5, {}) }) })
2222
+ !hideCloseButton && /* @__PURE__ */ jsx25(Dialog2.Close, { asChild: true, children: /* @__PURE__ */ jsx25(IconButton, { "aria-label": m.close ?? "\uB2EB\uAE30", size: "sm", className: closeButton4, children: /* @__PURE__ */ jsx25(XIcon5, {}) }) })
1979
2223
  ] }),
1980
- children && /* @__PURE__ */ jsx24("div", { className: body2, children }),
1981
- footer5 && /* @__PURE__ */ jsx24("div", { className: footer2, children: footer5 })
2224
+ children && /* @__PURE__ */ jsx25("div", { className: body2, children }),
2225
+ footer5 && /* @__PURE__ */ jsx25("div", { className: footer2, children: footer5 })
1982
2226
  ]
1983
2227
  }
1984
2228
  )
@@ -1988,7 +2232,7 @@ function Drawer({
1988
2232
  var DrawerClose = Dialog2.Close;
1989
2233
 
1990
2234
  // src/components/ErrorSummary/ErrorSummary.tsx
1991
- import { forwardRef as forwardRef21, useEffect as useEffect8, useId as useId8, useRef as useRef10 } from "react";
2235
+ import { forwardRef as forwardRef22, useEffect as useEffect9, useId as useId10, useRef as useRef14 } from "react";
1992
2236
 
1993
2237
  // src/components/ErrorSummary/ErrorSummary.css.ts
1994
2238
  var link3 = "_1cdophv2";
@@ -1996,17 +2240,17 @@ var list3 = "_1cdophv1";
1996
2240
  var root7 = "_1cdophv0";
1997
2241
 
1998
2242
  // src/components/ErrorSummary/ErrorSummary.tsx
1999
- import { jsx as jsx25 } from "react/jsx-runtime";
2000
- var ErrorSummary = /* @__PURE__ */ forwardRef21(function ErrorSummary2({ errors: errors2, title: title6, focusKey, className, ...rest }, ref) {
2243
+ import { jsx as jsx26 } from "react/jsx-runtime";
2244
+ var ErrorSummary = /* @__PURE__ */ forwardRef22(function ErrorSummary2({ errors: errors2, title: title6, focusKey, className, ...rest }, ref) {
2001
2245
  const m = useMessages();
2002
- const titleId = useId8();
2003
- const rootRef = useRef10(null);
2246
+ const titleId = useId10();
2247
+ const rootRef = useRef14(null);
2004
2248
  const hasErrors = errors2.length > 0;
2005
- useEffect8(() => {
2249
+ useEffect9(() => {
2006
2250
  if (hasErrors) rootRef.current?.focus();
2007
2251
  }, [focusKey, hasErrors]);
2008
2252
  if (!hasErrors) return null;
2009
- return /* @__PURE__ */ jsx25(
2253
+ return /* @__PURE__ */ jsx26(
2010
2254
  "div",
2011
2255
  {
2012
2256
  ref: mergeRefs(ref, rootRef),
@@ -2014,12 +2258,12 @@ var ErrorSummary = /* @__PURE__ */ forwardRef21(function ErrorSummary2({ errors:
2014
2258
  "aria-labelledby": titleId,
2015
2259
  className: cx(root7, className),
2016
2260
  ...rest,
2017
- children: /* @__PURE__ */ jsx25(
2261
+ children: /* @__PURE__ */ jsx26(
2018
2262
  Alert,
2019
2263
  {
2020
2264
  color: "danger",
2021
- title: /* @__PURE__ */ jsx25("span", { id: titleId, children: title6 ?? m.errorSummaryTitle?.(errors2.length) ?? `\uC785\uB825\uD55C \uB0B4\uC6A9\uC5D0 \uACE0\uCE60 \uACF3\uC774 ${errors2.length}\uAC1C \uC788\uC5B4\uC694` }),
2022
- children: /* @__PURE__ */ jsx25("ul", { className: list3, children: errors2.map((error) => /* @__PURE__ */ jsx25("li", { children: /* @__PURE__ */ jsx25(
2265
+ title: /* @__PURE__ */ jsx26("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` }),
2266
+ children: /* @__PURE__ */ jsx26("ul", { className: list3, children: errors2.map((error) => /* @__PURE__ */ jsx26("li", { children: /* @__PURE__ */ jsx26(
2023
2267
  "a",
2024
2268
  {
2025
2269
  href: `#${error.id}`,
@@ -2037,9 +2281,20 @@ var ErrorSummary = /* @__PURE__ */ forwardRef21(function ErrorSummary2({ errors:
2037
2281
  });
2038
2282
 
2039
2283
  // src/components/FileUpload/FileUpload.tsx
2040
- import { forwardRef as forwardRef22, useEffect as useEffect9, useId as useId9, useRef as useRef11, useState as useState10 } from "react";
2284
+ import { forwardRef as forwardRef23, useEffect as useEffect10, useId as useId11, useRef as useRef15, useState as useState11 } from "react";
2041
2285
  import { FileIcon, UploadIcon, XIcon as XIcon6 } from "@bestow-ui/icons";
2042
2286
 
2287
+ // src/utils/useFieldsetDisabled.ts
2288
+ import { useSyncExternalStore as useSyncExternalStore3 } from "react";
2289
+ var noSubscribe = () => () => void 0;
2290
+ function useFieldsetDisabled(ref) {
2291
+ return useSyncExternalStore3(
2292
+ noSubscribe,
2293
+ () => !!ref.current?.matches("fieldset:disabled *"),
2294
+ () => false
2295
+ );
2296
+ }
2297
+
2043
2298
  // src/components/FileUpload/FileUpload.css.ts
2044
2299
  var dropHint = "r2jefr3";
2045
2300
  var dropIcon = "r2jefr2";
@@ -2053,7 +2308,7 @@ var list4 = "r2jefr4";
2053
2308
  var root8 = "r2jefr0";
2054
2309
 
2055
2310
  // src/components/FileUpload/FileUpload.tsx
2056
- import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
2311
+ import { jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
2057
2312
  var REMOVED_ANNOUNCE_DELAY = 500;
2058
2313
  function formatSize(bytes) {
2059
2314
  if (bytes < 1024) return `${bytes} B`;
@@ -2070,7 +2325,7 @@ function matchesAccept(file, accept) {
2070
2325
  }
2071
2326
  var NO_FILES = [];
2072
2327
  var sameFile = (a, b) => a.name === b.name && a.size === b.size && a.lastModified === b.lastModified;
2073
- var FileUpload = /* @__PURE__ */ forwardRef22(function FileUpload2(props, ref) {
2328
+ var FileUpload = /* @__PURE__ */ forwardRef23(function FileUpload2(props, ref) {
2074
2329
  const {
2075
2330
  value: value3,
2076
2331
  defaultValue,
@@ -2084,29 +2339,32 @@ var FileUpload = /* @__PURE__ */ forwardRef22(function FileUpload2(props, ref) {
2084
2339
  helperText: helperText3,
2085
2340
  error,
2086
2341
  required,
2087
- disabled,
2342
+ disabled: disabledProp,
2088
2343
  name,
2089
2344
  id,
2090
2345
  className
2091
2346
  } = props;
2092
2347
  const m = useMessages();
2348
+ const rootRef = useRef15(null);
2349
+ const fieldsetDisabled = useFieldsetDisabled(rootRef);
2350
+ const disabled = disabledProp || fieldsetDisabled;
2093
2351
  const isControlled = "value" in props;
2094
- const [innerFiles, setInnerFiles] = useState10(defaultValue ?? []);
2352
+ const [innerFiles, setInnerFiles] = useState11(defaultValue ?? []);
2095
2353
  const files = isControlled ? value3 ?? NO_FILES : innerFiles;
2096
- const [rejections, setRejections] = useState10([]);
2097
- const [announcement, setAnnouncement] = useState10("");
2098
- const [dragging, setDragging] = useState10(false);
2099
- const generatedId = useId9();
2354
+ const [rejections, setRejections] = useState11([]);
2355
+ const [announcement, setAnnouncement] = useState11("");
2356
+ const [dragging, setDragging] = useState11(false);
2357
+ const generatedId = useId11();
2100
2358
  const baseId = id ?? generatedId;
2101
2359
  const labelId = label6 ? `${baseId}-label` : void 0;
2102
2360
  const helperId = helperText3 ? `${baseId}-helper` : void 0;
2103
2361
  const errorsId = rejections.length > 0 ? `${baseId}-errors` : void 0;
2104
- const inputRef = useRef11(null);
2105
- const selectButtonRef = useRef11(null);
2106
- const removeButtonRefs = useRef11([]);
2107
- const focusAfterRemove = useRef11(null);
2108
- const announceTimer = useRef11(void 0);
2109
- useEffect9(() => () => clearTimeout(announceTimer.current), []);
2362
+ const inputRef = useRef15(null);
2363
+ const selectButtonRef = useRef15(null);
2364
+ const removeButtonRefs = useRef15([]);
2365
+ const focusAfterRemove = useRef15(null);
2366
+ const announceTimer = useRef15(void 0);
2367
+ useEffect10(() => () => clearTimeout(announceTimer.current), []);
2110
2368
  const selectLabel = m.fileSelect ?? "\uD30C\uC77C \uC120\uD0DD";
2111
2369
  const reasonText = (rejection) => {
2112
2370
  const fileName2 = rejection.file.name;
@@ -2154,13 +2412,13 @@ var FileUpload = /* @__PURE__ */ forwardRef22(function FileUpload2(props, ref) {
2154
2412
  setRejections([]);
2155
2413
  commit(next, m.fileRemoved?.(removed.name) ?? `${removed.name} \uC0AD\uC81C\uB428`, REMOVED_ANNOUNCE_DELAY);
2156
2414
  };
2157
- useEffect9(() => {
2415
+ useEffect10(() => {
2158
2416
  if (focusAfterRemove.current === null) return;
2159
2417
  const target = focusAfterRemove.current;
2160
2418
  focusAfterRemove.current = null;
2161
2419
  (target >= 0 ? removeButtonRefs.current[target] : selectButtonRef.current)?.focus();
2162
2420
  }, [files]);
2163
- useEffect9(() => {
2421
+ useEffect10(() => {
2164
2422
  const input6 = inputRef.current;
2165
2423
  if (!name || !input6 || typeof DataTransfer === "undefined") return;
2166
2424
  try {
@@ -2170,17 +2428,25 @@ var FileUpload = /* @__PURE__ */ forwardRef22(function FileUpload2(props, ref) {
2170
2428
  } catch {
2171
2429
  }
2172
2430
  }, [files, name]);
2431
+ useFormReset(rootRef, () => {
2432
+ setRejections([]);
2433
+ announce("");
2434
+ if (isControlled) return;
2435
+ const next = defaultValue ?? [];
2436
+ setInnerFiles(next);
2437
+ if (next.length !== files.length) onValueChange?.(next);
2438
+ });
2173
2439
  const onDrag = (event, over) => {
2174
2440
  if (disabled) return;
2175
2441
  event.preventDefault();
2176
2442
  setDragging(over);
2177
2443
  };
2178
- return /* @__PURE__ */ jsxs22("div", { ref, className: cx(field, root8, className), children: [
2179
- label6 && /* @__PURE__ */ jsxs22("span", { id: labelId, className: label, children: [
2444
+ return /* @__PURE__ */ jsxs24("div", { ref: mergeRefs(ref, rootRef), className: cx(field, root8, className), children: [
2445
+ label6 && /* @__PURE__ */ jsxs24("span", { id: labelId, className: label, children: [
2180
2446
  label6,
2181
- required && /* @__PURE__ */ jsx26("span", { className: requiredMark, "aria-hidden": true, children: "*" })
2447
+ required && /* @__PURE__ */ jsx27("span", { className: requiredMark, "aria-hidden": true, children: "*" })
2182
2448
  ] }),
2183
- /* @__PURE__ */ jsxs22(
2449
+ /* @__PURE__ */ jsxs24(
2184
2450
  "div",
2185
2451
  {
2186
2452
  role: "group",
@@ -2200,8 +2466,8 @@ var FileUpload = /* @__PURE__ */ forwardRef22(function FileUpload2(props, ref) {
2200
2466
  if (!disabled) addFiles(Array.from(event.dataTransfer.files));
2201
2467
  },
2202
2468
  children: [
2203
- /* @__PURE__ */ jsx26("span", { className: dropIcon, "aria-hidden": true, children: /* @__PURE__ */ jsx26(UploadIcon, { size: 24 }) }),
2204
- /* @__PURE__ */ jsx26(
2469
+ /* @__PURE__ */ jsx27("span", { className: dropIcon, "aria-hidden": true, children: /* @__PURE__ */ jsx27(UploadIcon, { size: 24 }) }),
2470
+ /* @__PURE__ */ jsx27(
2205
2471
  Button,
2206
2472
  {
2207
2473
  ref: selectButtonRef,
@@ -2214,8 +2480,8 @@ var FileUpload = /* @__PURE__ */ forwardRef22(function FileUpload2(props, ref) {
2214
2480
  children: selectLabel
2215
2481
  }
2216
2482
  ),
2217
- /* @__PURE__ */ jsx26("span", { className: dropHint, children: m.fileDropHint ?? "\uB610\uB294 \uC5EC\uAE30\uB85C \uB04C\uC5B4\uB2E4 \uB193\uC73C\uC138\uC694" }),
2218
- /* @__PURE__ */ jsx26(
2483
+ /* @__PURE__ */ jsx27("span", { className: dropHint, children: m.fileDropHint ?? "\uB610\uB294 \uC5EC\uAE30\uB85C \uB04C\uC5B4\uB2E4 \uB193\uC73C\uC138\uC694" }),
2484
+ /* @__PURE__ */ jsx27(
2219
2485
  "input",
2220
2486
  {
2221
2487
  ref: inputRef,
@@ -2238,11 +2504,11 @@ var FileUpload = /* @__PURE__ */ forwardRef22(function FileUpload2(props, ref) {
2238
2504
  ]
2239
2505
  }
2240
2506
  ),
2241
- files.length > 0 && /* @__PURE__ */ jsx26("ul", { "aria-label": m.fileList ?? "\uC120\uD0DD\uD55C \uD30C\uC77C", className: list4, children: files.map((file, index) => /* @__PURE__ */ jsxs22("li", { className: item5, children: [
2242
- /* @__PURE__ */ jsx26("span", { className: fileIcon, "aria-hidden": true, children: /* @__PURE__ */ jsx26(FileIcon, { size: 16 }) }),
2243
- /* @__PURE__ */ jsx26("span", { className: fileName, children: file.name }),
2244
- /* @__PURE__ */ jsx26("span", { id: `${baseId}-size-${index}`, className: fileSize, children: formatSize(file.size) }),
2245
- /* @__PURE__ */ jsx26(
2507
+ files.length > 0 && /* @__PURE__ */ jsx27("ul", { "aria-label": m.fileList ?? "\uC120\uD0DD\uD55C \uD30C\uC77C", className: list4, children: files.map((file, index) => /* @__PURE__ */ jsxs24("li", { className: item5, children: [
2508
+ /* @__PURE__ */ jsx27("span", { className: fileIcon, "aria-hidden": true, children: /* @__PURE__ */ jsx27(FileIcon, { size: 16 }) }),
2509
+ /* @__PURE__ */ jsx27("span", { className: fileName, children: file.name }),
2510
+ /* @__PURE__ */ jsx27("span", { id: `${baseId}-size-${index}`, className: fileSize, children: formatSize(file.size) }),
2511
+ /* @__PURE__ */ jsx27(
2246
2512
  IconButton,
2247
2513
  {
2248
2514
  ref: (node) => {
@@ -2253,20 +2519,20 @@ var FileUpload = /* @__PURE__ */ forwardRef22(function FileUpload2(props, ref) {
2253
2519
  "aria-describedby": `${baseId}-size-${index}`,
2254
2520
  disabled,
2255
2521
  onClick: () => removeAt(index),
2256
- children: /* @__PURE__ */ jsx26(XIcon6, {})
2522
+ children: /* @__PURE__ */ jsx27(XIcon6, {})
2257
2523
  }
2258
2524
  )
2259
2525
  ] }, `${file.name}-${file.size}-${file.lastModified}`)) }),
2260
- rejections.length > 0 && /* @__PURE__ */ jsx26("ul", { id: errorsId, className: errors, children: [...new Set(rejections.map(reasonText))].map((text3) => /* @__PURE__ */ jsx26("li", { children: text3 }, text3)) }),
2261
- helperText3 && /* @__PURE__ */ jsx26("p", { id: helperId, className: helperText({ error }), children: helperText3 }),
2262
- /* @__PURE__ */ jsx26("div", { role: "status", className: visuallyHidden, children: announcement })
2526
+ rejections.length > 0 && /* @__PURE__ */ jsx27("ul", { id: errorsId, className: errors, children: [...new Set(rejections.map(reasonText))].map((text3) => /* @__PURE__ */ jsx27("li", { children: text3 }, text3)) }),
2527
+ helperText3 && /* @__PURE__ */ jsx27("p", { id: helperId, className: helperText({ error }), children: helperText3 }),
2528
+ /* @__PURE__ */ jsx27("div", { role: "status", className: visuallyHidden, children: announcement })
2263
2529
  ] });
2264
2530
  });
2265
2531
 
2266
2532
  // src/components/DropdownMenu/DropdownMenu.tsx
2267
2533
  import * as RadixMenu from "@radix-ui/react-dropdown-menu";
2268
2534
  import { CheckIcon as CheckIcon2, ChevronRightIcon as ChevronRightIcon3, MinusIcon } from "@bestow-ui/icons";
2269
- import { forwardRef as forwardRef23 } from "react";
2535
+ import { forwardRef as forwardRef24 } from "react";
2270
2536
 
2271
2537
  // src/components/DropdownMenu/DropdownMenu.css.ts
2272
2538
  var content9 = "_1d7ahux0";
@@ -2283,14 +2549,14 @@ var subChevron = "_1d7ahuxb";
2283
2549
  var subTrigger = "_1d7ahuxa";
2284
2550
 
2285
2551
  // src/components/DropdownMenu/DropdownMenu.tsx
2286
- import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
2552
+ import { jsx as jsx28, jsxs as jsxs25 } from "react/jsx-runtime";
2287
2553
  var DropdownMenu = RadixMenu.Root;
2288
2554
  var DropdownMenuTrigger = RadixMenu.Trigger;
2289
2555
  var DropdownMenuGroup = RadixMenu.Group;
2290
- var DropdownMenuContent = /* @__PURE__ */ forwardRef23(
2556
+ var DropdownMenuContent = /* @__PURE__ */ forwardRef24(
2291
2557
  function DropdownMenuContent2({ className, style, side = "bottom", align = "start", sideOffset = 4, collisionPadding = 8, ...rest }, ref) {
2292
2558
  const portal2 = usePortalProps();
2293
- return /* @__PURE__ */ jsx27(RadixMenu.Portal, { children: /* @__PURE__ */ jsx27(
2559
+ return /* @__PURE__ */ jsx28(RadixMenu.Portal, { children: /* @__PURE__ */ jsx28(
2294
2560
  RadixMenu.Content,
2295
2561
  {
2296
2562
  ref,
@@ -2305,56 +2571,56 @@ var DropdownMenuContent = /* @__PURE__ */ forwardRef23(
2305
2571
  ) });
2306
2572
  }
2307
2573
  );
2308
- var DropdownMenuItem = /* @__PURE__ */ forwardRef23(
2574
+ var DropdownMenuItem = /* @__PURE__ */ forwardRef24(
2309
2575
  function DropdownMenuItem2({ icon: icon7, shortcut: shortcut2, color = "neutral", className, children, ...rest }, ref) {
2310
- return /* @__PURE__ */ jsxs23(RadixMenu.Item, { ref, className: cx(item6, color === "danger" && danger, className), ...rest, children: [
2311
- icon7 && /* @__PURE__ */ jsx27("span", { className: icon4, "aria-hidden": true, children: icon7 }),
2576
+ return /* @__PURE__ */ jsxs25(RadixMenu.Item, { ref, className: cx(item6, color === "danger" && danger, className), ...rest, children: [
2577
+ icon7 && /* @__PURE__ */ jsx28("span", { className: icon4, "aria-hidden": true, children: icon7 }),
2312
2578
  children,
2313
- shortcut2 && /* @__PURE__ */ jsx27("span", { className: shortcut, "aria-hidden": true, children: shortcut2 })
2579
+ shortcut2 && /* @__PURE__ */ jsx28("span", { className: shortcut, "aria-hidden": true, children: shortcut2 })
2314
2580
  ] });
2315
2581
  }
2316
2582
  );
2317
- var DropdownMenuLabel = /* @__PURE__ */ forwardRef23(
2583
+ var DropdownMenuLabel = /* @__PURE__ */ forwardRef24(
2318
2584
  function DropdownMenuLabel2({ className, ...rest }, ref) {
2319
- return /* @__PURE__ */ jsx27(RadixMenu.Label, { ref, className: cx(label2, className), ...rest });
2585
+ return /* @__PURE__ */ jsx28(RadixMenu.Label, { ref, className: cx(label2, className), ...rest });
2320
2586
  }
2321
2587
  );
2322
- var DropdownMenuSeparator = /* @__PURE__ */ forwardRef23(
2588
+ var DropdownMenuSeparator = /* @__PURE__ */ forwardRef24(
2323
2589
  function DropdownMenuSeparator2({ className, ...rest }, ref) {
2324
- return /* @__PURE__ */ jsx27(RadixMenu.Separator, { ref, className: cx(separator3, className), ...rest });
2590
+ return /* @__PURE__ */ jsx28(RadixMenu.Separator, { ref, className: cx(separator3, className), ...rest });
2325
2591
  }
2326
2592
  );
2327
- var DropdownMenuCheckboxItem = /* @__PURE__ */ forwardRef23(
2593
+ var DropdownMenuCheckboxItem = /* @__PURE__ */ forwardRef24(
2328
2594
  function DropdownMenuCheckboxItem2({ className, children, ...rest }, ref) {
2329
- return /* @__PURE__ */ jsxs23(RadixMenu.CheckboxItem, { ref, className: cx(item6, className), ...rest, children: [
2330
- /* @__PURE__ */ jsx27("span", { className: indicator, "aria-hidden": true, children: /* @__PURE__ */ jsx27(RadixMenu.ItemIndicator, { className: indicatorInner, children: rest.checked === "indeterminate" ? /* @__PURE__ */ jsx27(MinusIcon, { size: 16 }) : /* @__PURE__ */ jsx27(CheckIcon2, { size: 16 }) }) }),
2595
+ return /* @__PURE__ */ jsxs25(RadixMenu.CheckboxItem, { ref, className: cx(item6, className), ...rest, children: [
2596
+ /* @__PURE__ */ jsx28("span", { className: indicator, "aria-hidden": true, children: /* @__PURE__ */ jsx28(RadixMenu.ItemIndicator, { className: indicatorInner, children: rest.checked === "indeterminate" ? /* @__PURE__ */ jsx28(MinusIcon, { size: 16 }) : /* @__PURE__ */ jsx28(CheckIcon2, { size: 16 }) }) }),
2331
2597
  children
2332
2598
  ] });
2333
2599
  }
2334
2600
  );
2335
2601
  var DropdownMenuRadioGroup = RadixMenu.RadioGroup;
2336
- var DropdownMenuRadioItem = /* @__PURE__ */ forwardRef23(
2602
+ var DropdownMenuRadioItem = /* @__PURE__ */ forwardRef24(
2337
2603
  function DropdownMenuRadioItem2({ className, children, ...rest }, ref) {
2338
- return /* @__PURE__ */ jsxs23(RadixMenu.RadioItem, { ref, className: cx(item6, className), ...rest, children: [
2339
- /* @__PURE__ */ jsx27("span", { className: indicator, "aria-hidden": true, children: /* @__PURE__ */ jsx27(RadixMenu.ItemIndicator, { className: indicatorInner, children: /* @__PURE__ */ jsx27("span", { className: radioDot }) }) }),
2604
+ return /* @__PURE__ */ jsxs25(RadixMenu.RadioItem, { ref, className: cx(item6, className), ...rest, children: [
2605
+ /* @__PURE__ */ jsx28("span", { className: indicator, "aria-hidden": true, children: /* @__PURE__ */ jsx28(RadixMenu.ItemIndicator, { className: indicatorInner, children: /* @__PURE__ */ jsx28("span", { className: radioDot }) }) }),
2340
2606
  children
2341
2607
  ] });
2342
2608
  }
2343
2609
  );
2344
2610
  var DropdownMenuSub = RadixMenu.Sub;
2345
- var DropdownMenuSubTrigger = /* @__PURE__ */ forwardRef23(
2611
+ var DropdownMenuSubTrigger = /* @__PURE__ */ forwardRef24(
2346
2612
  function DropdownMenuSubTrigger2({ icon: icon7, className, children, ...rest }, ref) {
2347
- return /* @__PURE__ */ jsxs23(RadixMenu.SubTrigger, { ref, className: cx(item6, subTrigger, className), ...rest, children: [
2348
- icon7 && /* @__PURE__ */ jsx27("span", { className: icon4, "aria-hidden": true, children: icon7 }),
2613
+ return /* @__PURE__ */ jsxs25(RadixMenu.SubTrigger, { ref, className: cx(item6, subTrigger, className), ...rest, children: [
2614
+ icon7 && /* @__PURE__ */ jsx28("span", { className: icon4, "aria-hidden": true, children: icon7 }),
2349
2615
  children,
2350
- /* @__PURE__ */ jsx27("span", { className: subChevron, "aria-hidden": true, children: /* @__PURE__ */ jsx27(ChevronRightIcon3, { size: 16 }) })
2616
+ /* @__PURE__ */ jsx28("span", { className: subChevron, "aria-hidden": true, children: /* @__PURE__ */ jsx28(ChevronRightIcon3, { size: 16 }) })
2351
2617
  ] });
2352
2618
  }
2353
2619
  );
2354
- var DropdownMenuSubContent = /* @__PURE__ */ forwardRef23(
2620
+ var DropdownMenuSubContent = /* @__PURE__ */ forwardRef24(
2355
2621
  function DropdownMenuSubContent2({ className, style, sideOffset = 4, alignOffset = -5, collisionPadding = 8, ...rest }, ref) {
2356
2622
  const portal2 = usePortalProps();
2357
- return /* @__PURE__ */ jsx27(RadixMenu.Portal, { children: /* @__PURE__ */ jsx27(
2623
+ return /* @__PURE__ */ jsx28(RadixMenu.Portal, { children: /* @__PURE__ */ jsx28(
2358
2624
  RadixMenu.SubContent,
2359
2625
  {
2360
2626
  ref,
@@ -2370,7 +2636,7 @@ var DropdownMenuSubContent = /* @__PURE__ */ forwardRef23(
2370
2636
  );
2371
2637
 
2372
2638
  // src/components/NumberInput/NumberInput.tsx
2373
- import { forwardRef as forwardRef24, useEffect as useEffect10, useId as useId10, useRef as useRef12, useState as useState11 } from "react";
2639
+ import { forwardRef as forwardRef25, useEffect as useEffect11, useId as useId12, useRef as useRef16, useState as useState12 } from "react";
2374
2640
  import { MinusIcon as MinusIcon2, PlusIcon } from "@bestow-ui/icons";
2375
2641
 
2376
2642
  // src/components/NumberInput/NumberInput.css.ts
@@ -2381,12 +2647,12 @@ var stepper = /* @__PURE__ */ _7a46811({ defaultClassName: "_1vq2qhv3", variantC
2381
2647
  var unit = "_1vq2qhv2";
2382
2648
 
2383
2649
  // src/components/NumberInput/NumberInput.tsx
2384
- import { Fragment as Fragment6, jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
2650
+ import { Fragment as Fragment8, jsx as jsx29, jsxs as jsxs26 } from "react/jsx-runtime";
2385
2651
  var MAX_DIGITS2 = 15;
2386
2652
  var isMeaningful = (char) => /[\d.-]/.test(char);
2387
2653
  var decimalsOf = (n) => Number.isFinite(n) ? String(n).split(".")[1]?.length ?? 0 : 0;
2388
2654
  var parse = (raw) => /\d/.test(raw) ? Number(raw) : null;
2389
- var NumberInput = /* @__PURE__ */ forwardRef24(
2655
+ var NumberInput = /* @__PURE__ */ forwardRef25(
2390
2656
  function NumberInput2(props, ref) {
2391
2657
  const {
2392
2658
  value: value3,
@@ -2412,15 +2678,15 @@ var NumberInput = /* @__PURE__ */ forwardRef24(
2412
2678
  } = props;
2413
2679
  const isControlled = "value" in props;
2414
2680
  const m = useMessages();
2415
- const inputRef = useRef12(null);
2416
- const generatedId = useId10();
2681
+ const inputRef = useRef16(null);
2682
+ const generatedId = useId12();
2417
2683
  const inputId = id ?? generatedId;
2418
2684
  const precision = Math.max(0, precisionProp ?? decimalsOf(step2));
2419
2685
  const allowNegative = min === void 0 || min < 0;
2420
2686
  const round = (n) => Number(n.toFixed(precision));
2421
2687
  const clamp = (n) => Math.min(max ?? Infinity, Math.max(min ?? -Infinity, round(n)));
2422
2688
  const toRaw = (n) => n === null || n === void 0 || !Number.isFinite(n) ? "" : String(round(n));
2423
- const sanitize4 = (input6) => {
2689
+ const sanitize3 = (input6) => {
2424
2690
  const negative = allowNegative && input6.trimStart().startsWith("-");
2425
2691
  const [intPart = "", ...fracParts] = input6.replace(/[^\d.]/g, "").split(".");
2426
2692
  const int = intPart.replace(/^0+(?=\d)/, "").slice(0, MAX_DIGITS2);
@@ -2433,7 +2699,7 @@ var NumberInput = /* @__PURE__ */ forwardRef24(
2433
2699
  const [, sign = "", int = "", rest2 = ""] = raw.match(/^(-?)(\d*)(.*)$/) ?? [];
2434
2700
  return `${sign}${int ? Number(int).toLocaleString("ko-KR") : ""}${rest2}`;
2435
2701
  };
2436
- const lastEmitted = useRef12(parse(toRaw(isControlled ? value3 : defaultValue)));
2702
+ const lastEmitted = useRef16(parse(toRaw(isControlled ? value3 : defaultValue)));
2437
2703
  const emit = (next) => {
2438
2704
  if (next === lastEmitted.current) return;
2439
2705
  lastEmitted.current = next;
@@ -2444,21 +2710,27 @@ var NumberInput = /* @__PURE__ */ forwardRef24(
2444
2710
  value: void 0,
2445
2711
  defaultValue: toRaw(isControlled ? value3 : defaultValue),
2446
2712
  onValueChange: (raw) => emit(parse(raw)),
2447
- sanitize: sanitize4,
2713
+ sanitize: sanitize3,
2448
2714
  format: format2,
2449
2715
  isMeaningful,
2450
- inputRef
2716
+ inputRef,
2717
+ manualReset: true
2451
2718
  });
2452
2719
  const { setRaw } = field4;
2453
- useEffect10(() => {
2720
+ useEffect11(() => {
2454
2721
  if (!isControlled) return;
2455
2722
  const next = value3 ?? null;
2456
2723
  lastEmitted.current = next;
2457
2724
  if (parse(field4.raw) !== next) setRaw(toRaw(next));
2458
2725
  }, [value3]);
2726
+ useFormReset(inputRef, () => {
2727
+ const next = toRaw(isControlled ? value3 : defaultValue);
2728
+ setRaw(next);
2729
+ if (!isControlled) emit(parse(next));
2730
+ });
2459
2731
  const current2 = parse(field4.raw);
2460
2732
  const valueText = (n) => `${format2(toRaw(n))}${unit2 ?? ""}`;
2461
- const [announcement, setAnnouncement] = useState11("");
2733
+ const [announcement, setAnnouncement] = useState12("");
2462
2734
  const setValue = (next, announce = true) => {
2463
2735
  setRaw(toRaw(next));
2464
2736
  emit(next);
@@ -2492,7 +2764,7 @@ var NumberInput = /* @__PURE__ */ forwardRef24(
2492
2764
  field4.onKeyDown(event);
2493
2765
  }
2494
2766
  };
2495
- const stepper2 = (direction) => /* @__PURE__ */ jsx28(
2767
+ const stepper2 = (direction) => /* @__PURE__ */ jsx29(
2496
2768
  IconButton,
2497
2769
  {
2498
2770
  size: "sm",
@@ -2503,11 +2775,11 @@ var NumberInput = /* @__PURE__ */ forwardRef24(
2503
2775
  onMouseDown: (event) => event.preventDefault(),
2504
2776
  onClick: () => stepBy(direction * step2),
2505
2777
  className: stepper({ size }),
2506
- children: direction < 0 ? /* @__PURE__ */ jsx28(MinusIcon2, {}) : /* @__PURE__ */ jsx28(PlusIcon, {})
2778
+ children: direction < 0 ? /* @__PURE__ */ jsx29(MinusIcon2, {}) : /* @__PURE__ */ jsx29(PlusIcon, {})
2507
2779
  }
2508
2780
  );
2509
- return /* @__PURE__ */ jsxs24(Fragment6, { children: [
2510
- /* @__PURE__ */ jsx28(
2781
+ return /* @__PURE__ */ jsxs26(Fragment8, { children: [
2782
+ /* @__PURE__ */ jsx29(
2511
2783
  TextField,
2512
2784
  {
2513
2785
  ref: mergeRefs(ref, inputRef),
@@ -2535,23 +2807,23 @@ var NumberInput = /* @__PURE__ */ forwardRef24(
2535
2807
  disabled,
2536
2808
  readOnly,
2537
2809
  startAdornment: hideStepper ? void 0 : stepper2(-1),
2538
- endAdornment: unit2 || !hideStepper ? /* @__PURE__ */ jsxs24("span", { className: end, children: [
2539
- unit2 && /* @__PURE__ */ jsx28("span", { className: unit, children: unit2 }),
2810
+ endAdornment: unit2 || !hideStepper ? /* @__PURE__ */ jsxs26("span", { className: end, children: [
2811
+ unit2 && /* @__PURE__ */ jsx29("span", { className: unit, children: unit2 }),
2540
2812
  !hideStepper && stepper2(1)
2541
2813
  ] }) : void 0,
2542
2814
  className: cx(input4, className),
2543
2815
  ...rest
2544
2816
  }
2545
2817
  ),
2546
- name && /* @__PURE__ */ jsx28("input", { type: "hidden", name, value: current2 === null ? "" : String(current2) }),
2547
- /* @__PURE__ */ jsx28("span", { "aria-live": "assertive", "aria-atomic": "true", className: visuallyHidden, children: announcement })
2818
+ name && /* @__PURE__ */ jsx29("input", { type: "hidden", name, value: current2 === null ? "" : String(current2) }),
2819
+ /* @__PURE__ */ jsx29("span", { "aria-live": "assertive", "aria-atomic": "true", className: visuallyHidden, children: announcement })
2548
2820
  ] });
2549
2821
  }
2550
2822
  );
2551
2823
 
2552
2824
  // src/components/Pagination/Pagination.tsx
2553
2825
  import { ChevronLeftIcon as ChevronLeftIcon2, ChevronRightIcon as ChevronRightIcon4 } from "@bestow-ui/icons";
2554
- import { forwardRef as forwardRef25, useState as useState12 } from "react";
2826
+ import { forwardRef as forwardRef26, useState as useState13 } from "react";
2555
2827
 
2556
2828
  // src/components/Pagination/getPaginationItems.ts
2557
2829
  var range = (start, end2) => end2 < start ? [] : Array.from({ length: end2 - start + 1 }, (_, i) => start + i);
@@ -2567,14 +2839,14 @@ function getPaginationItems(page, totalPages, siblingCount = 1, boundaryCount =
2567
2839
  Math.max(page + siblingCount, boundaryCount + siblingCount * 2 + 2),
2568
2840
  endPages.length > 0 ? endPages[0] - 2 : totalPages - 1
2569
2841
  );
2570
- const items2 = [...startPages];
2571
- if (siblingsStart > boundaryCount + 2) items2.push("ellipsis-start");
2572
- else if (boundaryCount + 1 < totalPages - boundaryCount) items2.push(boundaryCount + 1);
2573
- items2.push(...range(siblingsStart, siblingsEnd));
2574
- if (siblingsEnd < totalPages - boundaryCount - 1) items2.push("ellipsis-end");
2575
- else if (totalPages - boundaryCount > boundaryCount) items2.push(totalPages - boundaryCount);
2576
- items2.push(...endPages);
2577
- return items2;
2842
+ const items3 = [...startPages];
2843
+ if (siblingsStart > boundaryCount + 2) items3.push("ellipsis-start");
2844
+ else if (boundaryCount + 1 < totalPages - boundaryCount) items3.push(boundaryCount + 1);
2845
+ items3.push(...range(siblingsStart, siblingsEnd));
2846
+ if (siblingsEnd < totalPages - boundaryCount - 1) items3.push("ellipsis-end");
2847
+ else if (totalPages - boundaryCount > boundaryCount) items3.push(totalPages - boundaryCount);
2848
+ items3.push(...endPages);
2849
+ return items3;
2578
2850
  }
2579
2851
 
2580
2852
  // src/components/Pagination/Pagination.css.ts
@@ -2584,8 +2856,8 @@ var item7 = /* @__PURE__ */ _7a46812({ defaultClassName: "_1iraoak1", variantCla
2584
2856
  var list5 = "_1iraoak0";
2585
2857
 
2586
2858
  // src/components/Pagination/Pagination.tsx
2587
- import { jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
2588
- var Pagination = /* @__PURE__ */ forwardRef25(function Pagination2({
2859
+ import { jsx as jsx30, jsxs as jsxs27 } from "react/jsx-runtime";
2860
+ var Pagination = /* @__PURE__ */ forwardRef26(function Pagination2({
2589
2861
  totalPages,
2590
2862
  page: pageProp,
2591
2863
  defaultPage = 1,
@@ -2598,7 +2870,7 @@ var Pagination = /* @__PURE__ */ forwardRef25(function Pagination2({
2598
2870
  "aria-label": ariaLabelProp,
2599
2871
  ...rest
2600
2872
  }, ref) {
2601
- const [uncontrolledPage, setUncontrolledPage] = useState12(defaultPage);
2873
+ const [uncontrolledPage, setUncontrolledPage] = useState13(defaultPage);
2602
2874
  const m = useMessages();
2603
2875
  const ariaLabel = ariaLabelProp ?? m.pagination ?? "\uD398\uC774\uC9C0 \uD0D0\uC0C9";
2604
2876
  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`);
@@ -2610,8 +2882,8 @@ var Pagination = /* @__PURE__ */ forwardRef25(function Pagination2({
2610
2882
  onPageChange?.(next);
2611
2883
  };
2612
2884
  const itemClass = item7({ size });
2613
- return /* @__PURE__ */ jsx29("nav", { ref, "aria-label": ariaLabel, className, ...rest, children: /* @__PURE__ */ jsxs25("ul", { className: list5, children: [
2614
- /* @__PURE__ */ jsx29("li", { children: /* @__PURE__ */ jsx29(
2885
+ return /* @__PURE__ */ jsx30("nav", { ref, "aria-label": ariaLabel, className, ...rest, children: /* @__PURE__ */ jsxs27("ul", { className: list5, children: [
2886
+ /* @__PURE__ */ jsx30("li", { children: /* @__PURE__ */ jsx30(
2615
2887
  "button",
2616
2888
  {
2617
2889
  type: "button",
@@ -2619,11 +2891,11 @@ var Pagination = /* @__PURE__ */ forwardRef25(function Pagination2({
2619
2891
  "aria-label": getItemLabel("previous", page - 1),
2620
2892
  disabled: page <= 1,
2621
2893
  onClick: () => goTo(page - 1),
2622
- children: /* @__PURE__ */ jsx29(ChevronLeftIcon2, { size: 16 })
2894
+ children: /* @__PURE__ */ jsx30(ChevronLeftIcon2, { size: 16 })
2623
2895
  }
2624
2896
  ) }),
2625
2897
  getPaginationItems(page, totalPages, siblingCount, boundaryCount).map(
2626
- (item9) => typeof item9 === "number" ? /* @__PURE__ */ jsx29("li", { children: /* @__PURE__ */ jsx29(
2898
+ (item9) => typeof item9 === "number" ? /* @__PURE__ */ jsx30("li", { children: /* @__PURE__ */ jsx30(
2627
2899
  "button",
2628
2900
  {
2629
2901
  type: "button",
@@ -2633,9 +2905,9 @@ var Pagination = /* @__PURE__ */ forwardRef25(function Pagination2({
2633
2905
  onClick: () => goTo(item9),
2634
2906
  children: item9
2635
2907
  }
2636
- ) }, item9) : /* @__PURE__ */ jsx29("li", { "aria-hidden": true, className: cx(itemClass, ellipsis), children: "\u2026" }, item9)
2908
+ ) }, item9) : /* @__PURE__ */ jsx30("li", { "aria-hidden": true, className: cx(itemClass, ellipsis), children: "\u2026" }, item9)
2637
2909
  ),
2638
- /* @__PURE__ */ jsx29("li", { children: /* @__PURE__ */ jsx29(
2910
+ /* @__PURE__ */ jsx30("li", { children: /* @__PURE__ */ jsx30(
2639
2911
  "button",
2640
2912
  {
2641
2913
  type: "button",
@@ -2643,22 +2915,18 @@ var Pagination = /* @__PURE__ */ forwardRef25(function Pagination2({
2643
2915
  "aria-label": getItemLabel("next", page + 1),
2644
2916
  disabled: page >= totalPages,
2645
2917
  onClick: () => goTo(page + 1),
2646
- children: /* @__PURE__ */ jsx29(ChevronRightIcon4, { size: 16 })
2918
+ children: /* @__PURE__ */ jsx30(ChevronRightIcon4, { size: 16 })
2647
2919
  }
2648
2920
  ) })
2649
2921
  ] }) });
2650
2922
  });
2651
2923
 
2652
2924
  // src/components/PhoneNumberInput/PhoneNumberInput.tsx
2653
- import { forwardRef as forwardRef26, useRef as useRef13 } from "react";
2654
- import { formatPhoneNumber, phoneNumberMaxDigits } from "@bestow-ui/korean-utils";
2655
- import { jsx as jsx30 } from "react/jsx-runtime";
2656
- var sanitize3 = (input6) => {
2657
- const digits = input6.replace(/\D/g, "");
2658
- return digits.slice(0, phoneNumberMaxDigits(digits));
2659
- };
2925
+ import { forwardRef as forwardRef27, useRef as useRef17 } from "react";
2926
+ import { formatPhoneNumber, phoneNumberDigits } from "@bestow-ui/korean-utils";
2927
+ import { jsx as jsx31 } from "react/jsx-runtime";
2660
2928
  var isDigit4 = (char) => /\d/.test(char);
2661
- var PhoneNumberInput = /* @__PURE__ */ forwardRef26(
2929
+ var PhoneNumberInput = /* @__PURE__ */ forwardRef27(
2662
2930
  function PhoneNumberInput2(props, ref) {
2663
2931
  const {
2664
2932
  value: value3,
@@ -2669,7 +2937,7 @@ var PhoneNumberInput = /* @__PURE__ */ forwardRef26(
2669
2937
  onKeyDown,
2670
2938
  ...rest
2671
2939
  } = props;
2672
- const inputRef = useRef13(null);
2940
+ const inputRef = useRef17(null);
2673
2941
  const m = useMessages();
2674
2942
  const label6 = labelProp ?? m.phoneNumber ?? "\uD734\uB300\uD3F0 \uBC88\uD638";
2675
2943
  const field4 = useFormattedInput({
@@ -2677,12 +2945,12 @@ var PhoneNumberInput = /* @__PURE__ */ forwardRef26(
2677
2945
  value: value3,
2678
2946
  defaultValue,
2679
2947
  onValueChange,
2680
- sanitize: sanitize3,
2948
+ sanitize: phoneNumberDigits,
2681
2949
  format: formatPhoneNumber,
2682
2950
  isMeaningful: isDigit4,
2683
2951
  inputRef
2684
2952
  });
2685
- return /* @__PURE__ */ jsx30(
2953
+ return /* @__PURE__ */ jsx31(
2686
2954
  TextField,
2687
2955
  {
2688
2956
  ref: mergeRefs(ref, inputRef),
@@ -2704,21 +2972,21 @@ var PhoneNumberInput = /* @__PURE__ */ forwardRef26(
2704
2972
  );
2705
2973
 
2706
2974
  // src/components/RadioGroup/RadioGroup.tsx
2707
- import { forwardRef as forwardRef27, useId as useId11, useState as useState13 } from "react";
2975
+ import { forwardRef as forwardRef28, useId as useId13, useRef as useRef18, useState as useState14 } from "react";
2708
2976
 
2709
2977
  // src/components/RadioGroup/RadioGroup.css.ts
2710
2978
  import { createRuntimeFn as _7a46813 } from "@vanilla-extract/recipes/createRuntimeFn";
2711
- var description4 = "_1w9iwjmc";
2712
- var groupLabel = "_1w9iwjmd";
2713
- var items = /* @__PURE__ */ _7a46813({ defaultClassName: "_1w9iwjm0", variantClassNames: { orientation: { vertical: "_1w9iwjm1", horizontal: "_1w9iwjm2" } }, defaultVariants: { orientation: "vertical" }, compoundVariants: [] });
2979
+ var description5 = "_1w9iwjmc";
2980
+ var groupLabel2 = "_1w9iwjmd";
2981
+ var items2 = /* @__PURE__ */ _7a46813({ defaultClassName: "_1w9iwjm0", variantClassNames: { orientation: { vertical: "_1w9iwjm1", horizontal: "_1w9iwjm2" } }, defaultVariants: { orientation: "vertical" }, compoundVariants: [] });
2714
2982
  var labelText = "_1w9iwjmb";
2715
- var option = /* @__PURE__ */ _7a46813({ defaultClassName: "_1w9iwjm3", variantClassNames: { size: { sm: "_1w9iwjm4", md: "_1w9iwjm5" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
2983
+ var option2 = /* @__PURE__ */ _7a46813({ defaultClassName: "_1w9iwjm3", variantClassNames: { size: { sm: "_1w9iwjm4", md: "_1w9iwjm5" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
2716
2984
  var radio = /* @__PURE__ */ _7a46813({ defaultClassName: "_1w9iwjm7", variantClassNames: { size: { sm: "_1w9iwjm8", md: "_1w9iwjm9" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
2717
2985
  var text = "_1w9iwjma";
2718
2986
 
2719
2987
  // src/components/RadioGroup/RadioGroup.tsx
2720
- import { jsx as jsx31, jsxs as jsxs26 } from "react/jsx-runtime";
2721
- var RadioGroup2 = /* @__PURE__ */ forwardRef27(function RadioGroup3(props, ref) {
2988
+ import { jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
2989
+ var RadioGroup2 = /* @__PURE__ */ forwardRef28(function RadioGroup3(props, ref) {
2722
2990
  const {
2723
2991
  options,
2724
2992
  value: value3,
@@ -2737,28 +3005,35 @@ var RadioGroup2 = /* @__PURE__ */ forwardRef27(function RadioGroup3(props, ref)
2737
3005
  className
2738
3006
  } = props;
2739
3007
  const isControlled = "value" in props;
2740
- const [innerValue, setInnerValue] = useState13(defaultValue ?? "");
3008
+ const [innerValue, setInnerValue] = useState14(defaultValue ?? "");
2741
3009
  const current2 = isControlled ? value3 ?? "" : innerValue;
2742
- const generatedId = useId11();
3010
+ const generatedId = useId13();
2743
3011
  const baseId = id ?? generatedId;
2744
3012
  const labelId = label6 ? `${baseId}-label` : void 0;
2745
3013
  const helperId = helperText3 ? `${baseId}-helper` : void 0;
2746
3014
  const groupName = name ?? `${baseId}-radio`;
2747
3015
  const detachedForm = name ? void 0 : `${baseId}-no-form`;
3016
+ const rootRef = useRef18(null);
3017
+ useFormReset(rootRef, () => {
3018
+ if (isControlled) return;
3019
+ const next = defaultValue ?? "";
3020
+ setInnerValue(next);
3021
+ if (next !== current2) onValueChange?.(next);
3022
+ });
2748
3023
  const handleChange = (next) => {
2749
3024
  if (next === current2) return;
2750
3025
  if (!isControlled) setInnerValue(next);
2751
3026
  onValueChange?.(next);
2752
3027
  };
2753
- return /* @__PURE__ */ jsxs26("div", { className: cx(field, className), children: [
2754
- label6 && /* @__PURE__ */ jsxs26("span", { id: labelId, className: cx(label, groupLabel), children: [
3028
+ return /* @__PURE__ */ jsxs28("div", { className: cx(field, className), children: [
3029
+ label6 && /* @__PURE__ */ jsxs28("span", { id: labelId, className: cx(label, groupLabel2), children: [
2755
3030
  label6,
2756
- required && /* @__PURE__ */ jsx31("span", { className: requiredMark, "aria-hidden": true, children: "*" })
3031
+ required && /* @__PURE__ */ jsx32("span", { className: requiredMark, "aria-hidden": true, children: "*" })
2757
3032
  ] }),
2758
- /* @__PURE__ */ jsx31(
3033
+ /* @__PURE__ */ jsx32(
2759
3034
  "div",
2760
3035
  {
2761
- ref,
3036
+ ref: mergeRefs(ref, rootRef),
2762
3037
  id: baseId,
2763
3038
  role: "radiogroup",
2764
3039
  "aria-label": ariaLabel,
@@ -2767,23 +3042,23 @@ var RadioGroup2 = /* @__PURE__ */ forwardRef27(function RadioGroup3(props, ref)
2767
3042
  "aria-invalid": error || void 0,
2768
3043
  "aria-required": required || void 0,
2769
3044
  "data-disabled": disabled || void 0,
2770
- className: items({ orientation }),
2771
- children: options.map((option2) => {
2772
- const itemId = `${baseId}-${option2.value}`;
2773
- const descriptionId = option2.description ? `${itemId}-description` : void 0;
2774
- const itemDisabled = disabled || option2.disabled;
2775
- const checked = option2.value === current2;
2776
- return /* @__PURE__ */ jsxs26("div", { className: option({ size }), "data-disabled": itemDisabled || void 0, children: [
2777
- /* @__PURE__ */ jsx31(
3045
+ className: items2({ orientation }),
3046
+ children: options.map((option3) => {
3047
+ const itemId = `${baseId}-${option3.value}`;
3048
+ const descriptionId = option3.description ? `${itemId}-description` : void 0;
3049
+ const itemDisabled = disabled || option3.disabled;
3050
+ const checked = option3.value === current2;
3051
+ return /* @__PURE__ */ jsxs28("div", { className: option2({ size }), "data-disabled": itemDisabled || void 0, children: [
3052
+ /* @__PURE__ */ jsx32(
2778
3053
  "input",
2779
3054
  {
2780
3055
  type: "radio",
2781
3056
  id: itemId,
2782
3057
  name: groupName,
2783
3058
  form: detachedForm,
2784
- value: option2.value,
3059
+ value: option3.value,
2785
3060
  checked,
2786
- onChange: () => handleChange(option2.value),
3061
+ onChange: () => handleChange(option3.value),
2787
3062
  disabled: itemDisabled,
2788
3063
  required,
2789
3064
  "aria-describedby": descriptionId,
@@ -2791,20 +3066,172 @@ var RadioGroup2 = /* @__PURE__ */ forwardRef27(function RadioGroup3(props, ref)
2791
3066
  className: radio({ size })
2792
3067
  }
2793
3068
  ),
2794
- /* @__PURE__ */ jsxs26("span", { className: text, children: [
2795
- /* @__PURE__ */ jsx31("label", { htmlFor: itemId, className: labelText, children: option2.label }),
2796
- option2.description && /* @__PURE__ */ jsx31("span", { id: descriptionId, className: description4, children: option2.description })
3069
+ /* @__PURE__ */ jsxs28("span", { className: text, children: [
3070
+ /* @__PURE__ */ jsx32("label", { htmlFor: itemId, className: labelText, children: option3.label }),
3071
+ option3.description && /* @__PURE__ */ jsx32("span", { id: descriptionId, className: description5, children: option3.description })
2797
3072
  ] })
2798
- ] }, option2.value);
3073
+ ] }, option3.value);
2799
3074
  })
2800
3075
  }
2801
3076
  ),
2802
- helperText3 && /* @__PURE__ */ jsx31("p", { id: helperId, className: helperText({ error }), children: helperText3 })
3077
+ helperText3 && /* @__PURE__ */ jsx32("p", { id: helperId, className: helperText({ error }), children: helperText3 })
2803
3078
  ] });
2804
3079
  });
2805
3080
 
3081
+ // src/components/ResidentNumberInput/ResidentNumberInput.tsx
3082
+ import { forwardRef as forwardRef29, useId as useId14, useRef as useRef19, useState as useState15 } from "react";
3083
+ import { isValidResidentNumber, parseResidentNumber } from "@bestow-ui/korean-utils";
3084
+
3085
+ // src/components/ResidentNumberInput/ResidentNumberInput.css.ts
3086
+ var back = "_1llmfr72";
3087
+ var backOne = "_1llmfr73";
3088
+ var front = "_1llmfr71";
3089
+ var hiddenDigits = "_1llmfr75";
3090
+ var row3 = "_1llmfr70";
3091
+ var separator4 = "_1llmfr74";
3092
+
3093
+ // src/components/ResidentNumberInput/ResidentNumberInput.tsx
3094
+ import { jsx as jsx33, jsxs as jsxs29 } from "react/jsx-runtime";
3095
+ var onlyDigits = (input6) => input6.replace(/\D/g, "");
3096
+ var ResidentNumberInput = /* @__PURE__ */ forwardRef29(
3097
+ function ResidentNumberInput2(props, ref) {
3098
+ const {
3099
+ value: value3,
3100
+ defaultValue,
3101
+ onValueChange,
3102
+ digits = 13,
3103
+ validate = true,
3104
+ invalidText: invalidTextProp,
3105
+ label: labelProp,
3106
+ helperText: helperText3,
3107
+ error,
3108
+ required,
3109
+ disabled,
3110
+ size,
3111
+ name,
3112
+ id,
3113
+ className,
3114
+ onBlur
3115
+ } = props;
3116
+ const m = useMessages();
3117
+ const label6 = labelProp ?? m.residentNumber ?? "\uC8FC\uBBFC\uB4F1\uB85D\uBC88\uD638";
3118
+ const invalidText = invalidTextProp ?? m.residentNumberInvalid ?? "\uC62C\uBC14\uB978 \uC8FC\uBBFC\uB4F1\uB85D\uBC88\uD638\uAC00 \uC544\uB2C8\uC5D0\uC694. \uC0DD\uB144\uC6D4\uC77C\uACFC \uB4B7\uC790\uB9AC \uCCAB \uC22B\uC790\uB97C \uD655\uC778\uD574 \uC8FC\uC138\uC694.";
3119
+ const incompleteText = m.residentNumberIncomplete?.(digits) ?? `${digits}\uC790\uB9AC\uB97C \uBAA8\uB450 \uC785\uB825\uD574 \uC8FC\uC138\uC694.`;
3120
+ const backLength = digits - 6;
3121
+ const isControlled = "value" in props;
3122
+ const split = (v) => {
3123
+ const d = onlyDigits(v).slice(0, digits);
3124
+ return { front: d.slice(0, 6), back: d.slice(6) };
3125
+ };
3126
+ const [parts, setParts] = useState15(() => split((isControlled ? value3 : defaultValue) ?? ""));
3127
+ const current2 = isControlled && (value3 ?? "") !== parts.front + parts.back ? split(value3 ?? "") : parts;
3128
+ const raw = current2.front + current2.back;
3129
+ const generatedId = useId14();
3130
+ const baseId = id ?? generatedId;
3131
+ const frontId = `${baseId}-front`;
3132
+ const backId = `${baseId}-back`;
3133
+ const labelId = `${baseId}-label`;
3134
+ const frontRef = useRef19(null);
3135
+ const backRef = useRef19(null);
3136
+ const complete = current2.front.length === 6 && current2.back.length === backLength;
3137
+ const isValid = (v) => digits === 13 ? isValidResidentNumber(v) : parseResidentNumber(v) !== null;
3138
+ const update = (next) => {
3139
+ setParts(next);
3140
+ const nextRaw = next.front + next.back;
3141
+ if (nextRaw === raw) return;
3142
+ const nextComplete = next.front.length === 6 && next.back.length === backLength;
3143
+ onValueChange?.(nextRaw, nextComplete ? isValid(nextRaw) : null);
3144
+ };
3145
+ const [touched, setTouched] = useState15(false);
3146
+ useFormReset(frontRef, () => {
3147
+ setTouched(false);
3148
+ if (isControlled) return setParts(split(value3 ?? ""));
3149
+ const next = split(defaultValue ?? "");
3150
+ update(next);
3151
+ });
3152
+ const autoInvalid = validate && raw.length > 0 && (complete ? !isValid(raw) : touched);
3153
+ const showAuto = autoInvalid && error === void 0;
3154
+ const invalid = error ?? autoInvalid;
3155
+ const helper = showAuto ? complete ? invalidText : incompleteText : helperText3;
3156
+ const helperId = helper ? `${baseId}-helper` : void 0;
3157
+ const announcement = useDelayedAnnouncement(showAuto && complete ? invalidText : "");
3158
+ const common = {
3159
+ inputMode: "numeric",
3160
+ autoComplete: "off",
3161
+ size,
3162
+ disabled,
3163
+ required,
3164
+ invalid,
3165
+ "aria-describedby": helperId
3166
+ };
3167
+ return /* @__PURE__ */ jsxs29(
3168
+ "div",
3169
+ {
3170
+ className: cx(field, className),
3171
+ onBlur: (event) => {
3172
+ if (!event.currentTarget.contains(event.relatedTarget)) setTouched(true);
3173
+ onBlur?.(event);
3174
+ },
3175
+ children: [
3176
+ /* @__PURE__ */ jsxs29("label", { id: labelId, htmlFor: frontId, className: label, children: [
3177
+ label6,
3178
+ required && /* @__PURE__ */ jsx33("span", { className: requiredMark, "aria-hidden": true, children: "*" })
3179
+ ] }),
3180
+ /* @__PURE__ */ jsxs29("div", { role: "group", id: baseId, "aria-labelledby": labelId, className: row3, children: [
3181
+ /* @__PURE__ */ jsx33(
3182
+ Input,
3183
+ {
3184
+ ...common,
3185
+ ref: mergeRefs(ref, frontRef),
3186
+ id: frontId,
3187
+ "aria-label": m.residentNumberFront ?? "\uC55E 6\uC790\uB9AC",
3188
+ placeholder: "000000",
3189
+ rootClassName: front,
3190
+ maxLength: 6,
3191
+ value: current2.front,
3192
+ onChange: (event) => update({ front: onlyDigits(event.target.value).slice(0, 6), back: current2.back }),
3193
+ onPaste: (event) => {
3194
+ const pasted = onlyDigits(event.clipboardData.getData("text"));
3195
+ if (pasted.length <= 6) return;
3196
+ event.preventDefault();
3197
+ update(split(pasted));
3198
+ }
3199
+ }
3200
+ ),
3201
+ /* @__PURE__ */ jsx33("span", { className: separator4, "aria-hidden": true, children: "-" }),
3202
+ /* @__PURE__ */ jsx33(
3203
+ Input,
3204
+ {
3205
+ ...common,
3206
+ ref: backRef,
3207
+ id: backId,
3208
+ type: digits === 13 ? "password" : "text",
3209
+ "aria-label": digits === 13 ? m.residentNumberBack ?? "\uB4A4 7\uC790\uB9AC" : m.residentNumberBackFirst ?? "\uB4B7\uC790\uB9AC \uCCAB \uC22B\uC790",
3210
+ maxLength: backLength,
3211
+ rootClassName: digits === 13 ? back : backOne,
3212
+ value: current2.back,
3213
+ onChange: (event) => update({ front: current2.front, back: onlyDigits(event.target.value).slice(0, backLength) }),
3214
+ onKeyDown: (event) => {
3215
+ if (event.key === "Backspace" && current2.back === "") {
3216
+ event.preventDefault();
3217
+ frontRef.current?.focus();
3218
+ }
3219
+ }
3220
+ }
3221
+ ),
3222
+ digits === 7 && /* @__PURE__ */ jsx33("span", { className: hiddenDigits, "aria-hidden": true, children: "\u25CF\u25CF\u25CF\u25CF\u25CF\u25CF" })
3223
+ ] }),
3224
+ helper && /* @__PURE__ */ jsx33("p", { id: helperId, className: helperText({ error: invalid }), children: helper }),
3225
+ name && /* @__PURE__ */ jsx33("input", { type: "hidden", name, value: raw }),
3226
+ /* @__PURE__ */ jsx33("span", { role: "status", className: visuallyHidden, children: announcement })
3227
+ ]
3228
+ }
3229
+ );
3230
+ }
3231
+ );
3232
+
2806
3233
  // src/components/SegmentedControl/SegmentedControl.tsx
2807
- import { forwardRef as forwardRef28, useId as useId12, useRef as useRef14, useState as useState14 } from "react";
3234
+ import { forwardRef as forwardRef30, useId as useId15, useRef as useRef20, useState as useState16 } from "react";
2808
3235
 
2809
3236
  // src/components/SegmentedControl/SegmentedControl.css.ts
2810
3237
  import { createRuntimeFn as _7a46814 } from "@vanilla-extract/recipes/createRuntimeFn";
@@ -2813,9 +3240,9 @@ var item8 = /* @__PURE__ */ _7a46814({ defaultClassName: "_1h65mmo2", variantCla
2813
3240
  var root9 = /* @__PURE__ */ _7a46814({ defaultClassName: "_1h65mmo0", variantClassNames: { fullWidth: { true: "_1h65mmo1" } }, defaultVariants: {}, compoundVariants: [] });
2814
3241
 
2815
3242
  // src/components/SegmentedControl/SegmentedControl.tsx
2816
- import { jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
3243
+ import { jsx as jsx34, jsxs as jsxs30 } from "react/jsx-runtime";
2817
3244
  var NEXT_KEYS = { ArrowRight: 1, ArrowDown: 1, ArrowLeft: -1, ArrowUp: -1 };
2818
- var SegmentedControl = /* @__PURE__ */ forwardRef28(
3245
+ var SegmentedControl = /* @__PURE__ */ forwardRef30(
2819
3246
  function SegmentedControl2(props, ref) {
2820
3247
  const {
2821
3248
  options,
@@ -2832,19 +3259,26 @@ var SegmentedControl = /* @__PURE__ */ forwardRef28(
2832
3259
  className
2833
3260
  } = props;
2834
3261
  const isControlled = "value" in props;
2835
- const [innerValue, setInnerValue] = useState14(defaultValue ?? "");
3262
+ const [innerValue, setInnerValue] = useState16(defaultValue ?? "");
2836
3263
  const current2 = isControlled ? value3 ?? "" : innerValue;
2837
- const generatedId = useId12();
3264
+ const generatedId = useId15();
2838
3265
  const labelId = label6 ? `${id ?? generatedId}-label` : void 0;
2839
- const itemRefs = useRef14([]);
3266
+ const itemRefs = useRef20([]);
2840
3267
  const isEnabled = (index) => !disabled && !options[index]?.disabled;
3268
+ const rootRef = useRef20(null);
3269
+ useFormReset(rootRef, () => {
3270
+ if (isControlled) return;
3271
+ const next = defaultValue ?? "";
3272
+ setInnerValue(next);
3273
+ if (next !== current2) onValueChange?.(next);
3274
+ });
2841
3275
  const select2 = (index) => {
2842
3276
  const next = options[index].value;
2843
3277
  if (next === current2) return;
2844
3278
  if (!isControlled) setInnerValue(next);
2845
3279
  onValueChange?.(next);
2846
3280
  };
2847
- const checkedIndex = options.findIndex((option2) => option2.value === current2);
3281
+ const checkedIndex = options.findIndex((option3) => option3.value === current2);
2848
3282
  const tabStop = checkedIndex >= 0 && isEnabled(checkedIndex) ? checkedIndex : options.findIndex((_, i) => isEnabled(i));
2849
3283
  const handleKeyDown = (event, index) => {
2850
3284
  let target = -1;
@@ -2867,10 +3301,10 @@ var SegmentedControl = /* @__PURE__ */ forwardRef28(
2867
3301
  itemRefs.current[target]?.focus();
2868
3302
  select2(target);
2869
3303
  };
2870
- const group = /* @__PURE__ */ jsxs27(
3304
+ const group = /* @__PURE__ */ jsxs30(
2871
3305
  "div",
2872
3306
  {
2873
- ref,
3307
+ ref: mergeRefs(ref, rootRef),
2874
3308
  id,
2875
3309
  role: "radiogroup",
2876
3310
  "aria-labelledby": labelId,
@@ -2878,9 +3312,9 @@ var SegmentedControl = /* @__PURE__ */ forwardRef28(
2878
3312
  "aria-disabled": disabled || void 0,
2879
3313
  className: cx(root9({ fullWidth }), !label6 && className),
2880
3314
  children: [
2881
- options.map((option2, index) => {
3315
+ options.map((option3, index) => {
2882
3316
  const checked = index === checkedIndex;
2883
- return /* @__PURE__ */ jsxs27(
3317
+ return /* @__PURE__ */ jsxs30(
2884
3318
  "button",
2885
3319
  {
2886
3320
  ref: (node) => {
@@ -2897,27 +3331,27 @@ var SegmentedControl = /* @__PURE__ */ forwardRef28(
2897
3331
  onClick: () => select2(index),
2898
3332
  onKeyDown: (event) => handleKeyDown(event, index),
2899
3333
  children: [
2900
- option2.icon && /* @__PURE__ */ jsx32("span", { "aria-hidden": true, className: icon5, children: option2.icon }),
2901
- option2.label
3334
+ option3.icon && /* @__PURE__ */ jsx34("span", { "aria-hidden": true, className: icon5, children: option3.icon }),
3335
+ option3.label
2902
3336
  ]
2903
3337
  },
2904
- option2.value
3338
+ option3.value
2905
3339
  );
2906
3340
  }),
2907
- name && /* @__PURE__ */ jsx32("input", { type: "hidden", name, value: current2 })
3341
+ name && /* @__PURE__ */ jsx34("input", { type: "hidden", name, value: current2 })
2908
3342
  ]
2909
3343
  }
2910
3344
  );
2911
3345
  if (!label6) return group;
2912
- return /* @__PURE__ */ jsxs27("div", { className: cx(field, className), children: [
2913
- /* @__PURE__ */ jsx32("span", { id: labelId, className: label, children: label6 }),
3346
+ return /* @__PURE__ */ jsxs30("div", { className: cx(field, className), children: [
3347
+ /* @__PURE__ */ jsx34("span", { id: labelId, className: label, children: label6 }),
2914
3348
  group
2915
3349
  ] });
2916
3350
  }
2917
3351
  );
2918
3352
 
2919
3353
  // src/components/NativeSelect/NativeSelect.tsx
2920
- import { forwardRef as forwardRef29, useId as useId13 } from "react";
3354
+ import { forwardRef as forwardRef31, useId as useId16 } from "react";
2921
3355
  import { ChevronDownIcon as ChevronDownIcon4 } from "@bestow-ui/icons";
2922
3356
 
2923
3357
  // src/components/NativeSelect/NativeSelect.css.ts
@@ -2927,8 +3361,8 @@ var select = /* @__PURE__ */ _7a46815({ defaultClassName: "_5silym1", variantCla
2927
3361
  var wrapper = "_5silym0";
2928
3362
 
2929
3363
  // src/components/NativeSelect/NativeSelect.tsx
2930
- import { jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
2931
- var NativeSelect = /* @__PURE__ */ forwardRef29(function NativeSelect2({
3364
+ import { jsx as jsx35, jsxs as jsxs31 } from "react/jsx-runtime";
3365
+ var NativeSelect = /* @__PURE__ */ forwardRef31(function NativeSelect2({
2932
3366
  options,
2933
3367
  onValueChange,
2934
3368
  onChange,
@@ -2948,26 +3382,26 @@ var NativeSelect = /* @__PURE__ */ forwardRef29(function NativeSelect2({
2948
3382
  "aria-describedby": ariaDescribedBy,
2949
3383
  ...rest
2950
3384
  }, ref) {
2951
- const generatedId = useId13();
3385
+ const generatedId = useId16();
2952
3386
  const selectId = id ?? generatedId;
2953
3387
  const helperId = helperText3 ? `${selectId}-helper` : void 0;
2954
3388
  const handleChange = (event) => {
2955
3389
  onChange?.(event);
2956
3390
  onValueChange?.(event.target.value);
2957
3391
  };
2958
- return /* @__PURE__ */ jsxs28("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
2959
- label6 && /* @__PURE__ */ jsxs28("label", { htmlFor: selectId, className: label, children: [
3392
+ return /* @__PURE__ */ jsxs31("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
3393
+ label6 && /* @__PURE__ */ jsxs31("label", { htmlFor: selectId, className: label, children: [
2960
3394
  label6,
2961
- required && /* @__PURE__ */ jsx33("span", { className: requiredMark, "aria-hidden": true, children: "*" })
3395
+ required && /* @__PURE__ */ jsx35("span", { className: requiredMark, "aria-hidden": true, children: "*" })
2962
3396
  ] }),
2963
- /* @__PURE__ */ jsxs28(
3397
+ /* @__PURE__ */ jsxs31(
2964
3398
  "span",
2965
3399
  {
2966
- className: cx(root3({ size, fullWidth }), wrapper),
3400
+ className: cx(root({ size, fullWidth }), wrapper),
2967
3401
  "data-invalid": error || void 0,
2968
3402
  "data-disabled": disabled || void 0,
2969
3403
  children: [
2970
- /* @__PURE__ */ jsxs28(
3404
+ /* @__PURE__ */ jsxs31(
2971
3405
  "select",
2972
3406
  {
2973
3407
  ref,
@@ -2982,25 +3416,25 @@ var NativeSelect = /* @__PURE__ */ forwardRef29(function NativeSelect2({
2982
3416
  className: cx(select({ size }), className),
2983
3417
  ...rest,
2984
3418
  children: [
2985
- placeholder !== void 0 && /* @__PURE__ */ jsx33("option", { value: "", disabled: true, children: placeholder }),
2986
- options ? options.map((option2) => /* @__PURE__ */ jsx33("option", { value: option2.value, disabled: option2.disabled, children: option2.label }, option2.value)) : children
3419
+ placeholder !== void 0 && /* @__PURE__ */ jsx35("option", { value: "", disabled: true, children: placeholder }),
3420
+ options ? options.map((option3) => /* @__PURE__ */ jsx35("option", { value: option3.value, disabled: option3.disabled, children: option3.label }, option3.value)) : children
2987
3421
  ]
2988
3422
  }
2989
3423
  ),
2990
- /* @__PURE__ */ jsx33(ChevronDownIcon4, { size: 16, className: icon6({ size }) })
3424
+ /* @__PURE__ */ jsx35(ChevronDownIcon4, { size: 16, className: icon6({ size }) })
2991
3425
  ]
2992
3426
  }
2993
3427
  ),
2994
- helperText3 && /* @__PURE__ */ jsx33("p", { id: helperId, className: helperText({ error }), children: helperText3 })
3428
+ helperText3 && /* @__PURE__ */ jsx35("p", { id: helperId, className: helperText({ error }), children: helperText3 })
2995
3429
  ] });
2996
3430
  });
2997
3431
 
2998
3432
  // src/components/Select/Select.tsx
2999
3433
  import * as RadixSelect from "@radix-ui/react-select";
3000
- import { forwardRef as forwardRef30, useId as useId14 } from "react";
3434
+ import { forwardRef as forwardRef32, useId as useId17 } from "react";
3001
3435
  import { CheckIcon as CheckIcon3, ChevronDownIcon as ChevronDownIcon5 } from "@bestow-ui/icons";
3002
- import { jsx as jsx34, jsxs as jsxs29 } from "react/jsx-runtime";
3003
- var Select = /* @__PURE__ */ forwardRef30(function Select2(props, ref) {
3436
+ import { jsx as jsx36, jsxs as jsxs32 } from "react/jsx-runtime";
3437
+ var Select = /* @__PURE__ */ forwardRef32(function Select2(props, ref) {
3004
3438
  const {
3005
3439
  options,
3006
3440
  value: value3,
@@ -3020,16 +3454,16 @@ var Select = /* @__PURE__ */ forwardRef30(function Select2(props, ref) {
3020
3454
  className
3021
3455
  } = props;
3022
3456
  const isControlled = "value" in props;
3023
- const generatedId = useId14();
3457
+ const generatedId = useId17();
3024
3458
  const triggerId = id ?? generatedId;
3025
3459
  const helperId = helperText3 ? `${triggerId}-helper` : void 0;
3026
3460
  const portal2 = usePortalProps();
3027
- return /* @__PURE__ */ jsxs29("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
3028
- label6 && /* @__PURE__ */ jsxs29("label", { htmlFor: triggerId, className: label, children: [
3461
+ return /* @__PURE__ */ jsxs32("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
3462
+ label6 && /* @__PURE__ */ jsxs32("label", { htmlFor: triggerId, className: label, children: [
3029
3463
  label6,
3030
- required && /* @__PURE__ */ jsx34("span", { className: requiredMark, "aria-hidden": true, children: "*" })
3464
+ required && /* @__PURE__ */ jsx36("span", { className: requiredMark, "aria-hidden": true, children: "*" })
3031
3465
  ] }),
3032
- /* @__PURE__ */ jsxs29(
3466
+ /* @__PURE__ */ jsxs32(
3033
3467
  RadixSelect.Root,
3034
3468
  {
3035
3469
  value: isControlled ? value3 ?? "" : void 0,
@@ -3039,7 +3473,7 @@ var Select = /* @__PURE__ */ forwardRef30(function Select2(props, ref) {
3039
3473
  required,
3040
3474
  name,
3041
3475
  children: [
3042
- /* @__PURE__ */ jsxs29(
3476
+ /* @__PURE__ */ jsxs32(
3043
3477
  RadixSelect.Trigger,
3044
3478
  {
3045
3479
  ref,
@@ -3048,14 +3482,14 @@ var Select = /* @__PURE__ */ forwardRef30(function Select2(props, ref) {
3048
3482
  "aria-invalid": error || void 0,
3049
3483
  "aria-describedby": helperId,
3050
3484
  "data-invalid": error || void 0,
3051
- className: cx(root3({ size, fullWidth }), trigger2, className),
3485
+ className: cx(root({ size, fullWidth }), trigger2, className),
3052
3486
  children: [
3053
- /* @__PURE__ */ jsx34("span", { className: value, children: /* @__PURE__ */ jsx34(RadixSelect.Value, { placeholder }) }),
3054
- /* @__PURE__ */ jsx34(RadixSelect.Icon, { className: icon3, children: /* @__PURE__ */ jsx34(ChevronDownIcon5, { size: 16 }) })
3487
+ /* @__PURE__ */ jsx36("span", { className: value, children: /* @__PURE__ */ jsx36(RadixSelect.Value, { placeholder }) }),
3488
+ /* @__PURE__ */ jsx36(RadixSelect.Icon, { className: icon3, children: /* @__PURE__ */ jsx36(ChevronDownIcon5, { size: 16 }) })
3055
3489
  ]
3056
3490
  }
3057
3491
  ),
3058
- /* @__PURE__ */ jsx34(RadixSelect.Portal, { children: /* @__PURE__ */ jsx34(
3492
+ /* @__PURE__ */ jsx36(RadixSelect.Portal, { children: /* @__PURE__ */ jsx36(
3059
3493
  RadixSelect.Content,
3060
3494
  {
3061
3495
  position: "popper",
@@ -3063,37 +3497,37 @@ var Select = /* @__PURE__ */ forwardRef30(function Select2(props, ref) {
3063
3497
  collisionPadding: 8,
3064
3498
  className: cx(portal2.className, content5),
3065
3499
  style: portal2.style,
3066
- children: /* @__PURE__ */ jsx34(RadixSelect.Viewport, { className: viewport, children: options.map((option2) => /* @__PURE__ */ jsxs29(
3500
+ children: /* @__PURE__ */ jsx36(RadixSelect.Viewport, { className: viewport, children: options.map((option3) => /* @__PURE__ */ jsxs32(
3067
3501
  RadixSelect.Item,
3068
3502
  {
3069
- value: option2.value,
3070
- disabled: option2.disabled,
3503
+ value: option3.value,
3504
+ disabled: option3.disabled,
3071
3505
  className: item4,
3072
3506
  children: [
3073
- /* @__PURE__ */ jsx34(RadixSelect.ItemText, { children: option2.label }),
3074
- /* @__PURE__ */ jsx34(RadixSelect.ItemIndicator, { className: itemIndicator, children: /* @__PURE__ */ jsx34(CheckIcon3, { size: 16 }) })
3507
+ /* @__PURE__ */ jsx36(RadixSelect.ItemText, { children: option3.label }),
3508
+ /* @__PURE__ */ jsx36(RadixSelect.ItemIndicator, { className: itemIndicator, children: /* @__PURE__ */ jsx36(CheckIcon3, { size: 16 }) })
3075
3509
  ]
3076
3510
  },
3077
- option2.value
3511
+ option3.value
3078
3512
  )) })
3079
3513
  }
3080
3514
  ) })
3081
3515
  ]
3082
3516
  }
3083
3517
  ),
3084
- helperText3 && /* @__PURE__ */ jsx34("p", { id: helperId, className: helperText({ error }), children: helperText3 })
3518
+ helperText3 && /* @__PURE__ */ jsx36("p", { id: helperId, className: helperText({ error }), children: helperText3 })
3085
3519
  ] });
3086
3520
  });
3087
3521
 
3088
3522
  // src/components/SkipLink/SkipLink.tsx
3089
- import { forwardRef as forwardRef31 } from "react";
3523
+ import { forwardRef as forwardRef33 } from "react";
3090
3524
 
3091
3525
  // src/components/SkipLink/SkipLink.css.ts
3092
3526
  var skipLink = "_1t9jaar0";
3093
3527
 
3094
3528
  // src/components/SkipLink/SkipLink.tsx
3095
- import { jsx as jsx35 } from "react/jsx-runtime";
3096
- var SkipLink = /* @__PURE__ */ forwardRef31(function SkipLink2({ href = "#main", className, children, onClick, ...rest }, ref) {
3529
+ import { jsx as jsx37 } from "react/jsx-runtime";
3530
+ var SkipLink = /* @__PURE__ */ forwardRef33(function SkipLink2({ href = "#main", className, children, onClick, ...rest }, ref) {
3097
3531
  const m = useMessages();
3098
3532
  const handleClick = (event) => {
3099
3533
  onClick?.(event);
@@ -3105,12 +3539,12 @@ var SkipLink = /* @__PURE__ */ forwardRef31(function SkipLink2({ href = "#main",
3105
3539
  target.focus();
3106
3540
  target.scrollIntoView?.({ block: "start" });
3107
3541
  };
3108
- return /* @__PURE__ */ jsx35("a", { ref, href, className: cx(skipLink, className), onClick: handleClick, ...rest, children: children ?? m.skipToContent ?? "\uBCF8\uBB38 \uBC14\uB85C\uAC00\uAE30" });
3542
+ return /* @__PURE__ */ jsx37("a", { ref, href, className: cx(skipLink, className), onClick: handleClick, ...rest, children: children ?? m.skipToContent ?? "\uBCF8\uBB38 \uBC14\uB85C\uAC00\uAE30" });
3109
3543
  });
3110
3544
 
3111
3545
  // src/components/Slider/Slider.tsx
3112
3546
  import * as RadixSlider from "@radix-ui/react-slider";
3113
- import { forwardRef as forwardRef32, useId as useId15, useState as useState15 } from "react";
3547
+ import { forwardRef as forwardRef34, useId as useId18, useRef as useRef21, useState as useState17 } from "react";
3114
3548
 
3115
3549
  // src/components/Slider/Slider.css.ts
3116
3550
  import { createRuntimeFn as _7a46816 } from "@vanilla-extract/recipes/createRuntimeFn";
@@ -3125,8 +3559,8 @@ var track = /* @__PURE__ */ _7a46816({ defaultClassName: "_126mzjm8", variantCla
3125
3559
  var value2 = "_126mzjm3";
3126
3560
 
3127
3561
  // src/components/Slider/Slider.tsx
3128
- import { jsx as jsx36, jsxs as jsxs30 } from "react/jsx-runtime";
3129
- var Slider = /* @__PURE__ */ forwardRef32(function Slider2(props, ref) {
3562
+ import { jsx as jsx38, jsxs as jsxs33 } from "react/jsx-runtime";
3563
+ var Slider = /* @__PURE__ */ forwardRef34(function Slider2(props, ref) {
3130
3564
  const {
3131
3565
  value: value3,
3132
3566
  defaultValue,
@@ -3142,33 +3576,42 @@ var Slider = /* @__PURE__ */ forwardRef32(function Slider2(props, ref) {
3142
3576
  size,
3143
3577
  id,
3144
3578
  className,
3145
- disabled,
3579
+ disabled: disabledProp,
3146
3580
  ...rest
3147
3581
  } = props;
3148
3582
  const m = useMessages();
3149
3583
  const thumbLabels = thumbLabelsProp ?? [m.rangeStart ?? "\uCD5C\uC18C", m.rangeEnd ?? "\uCD5C\uB300"];
3150
- const generatedId = useId15();
3584
+ const generatedId = useId18();
3151
3585
  const baseId = id ?? generatedId;
3152
3586
  const labelId = `${baseId}-label`;
3153
3587
  const helperId = `${baseId}-helper`;
3154
3588
  const isControlled = "value" in props;
3155
- const [innerValue, setInnerValue] = useState15(defaultValue ?? [min]);
3589
+ const [innerValue, setInnerValue] = useState17(defaultValue ?? [min]);
3156
3590
  const current2 = isControlled ? value3 ?? [min] : innerValue;
3157
3591
  const isRange = current2.length > 1;
3592
+ const rootRef = useRef21(null);
3593
+ const fieldsetDisabled = useFieldsetDisabled(rootRef);
3594
+ const disabled = disabledProp || fieldsetDisabled;
3595
+ useFormReset(rootRef, () => {
3596
+ if (isControlled) return;
3597
+ const next = defaultValue ?? [min];
3598
+ setInnerValue(next);
3599
+ if (next.join() !== current2.join()) onValueChange?.(next);
3600
+ });
3158
3601
  const handleChange = (next) => {
3159
3602
  if (!isControlled) setInnerValue(next);
3160
3603
  onValueChange?.(next);
3161
3604
  };
3162
3605
  const valueText = current2.map(formatValue).join(" \u2013 ");
3163
- return /* @__PURE__ */ jsxs30("div", { className: cx(field3, className), children: [
3164
- (label6 || showValue) && /* @__PURE__ */ jsxs30("div", { className: header6, children: [
3165
- label6 && /* @__PURE__ */ jsx36("span", { id: labelId, className: label3, children: label6 }),
3166
- showValue && /* @__PURE__ */ jsx36("span", { className: value2, "aria-hidden": true, children: valueText })
3606
+ return /* @__PURE__ */ jsxs33("div", { className: cx(field3, className), children: [
3607
+ (label6 || showValue) && /* @__PURE__ */ jsxs33("div", { className: header6, children: [
3608
+ label6 && /* @__PURE__ */ jsx38("span", { id: labelId, className: label3, children: label6 }),
3609
+ showValue && /* @__PURE__ */ jsx38("span", { className: value2, "aria-hidden": true, children: valueText })
3167
3610
  ] }),
3168
- /* @__PURE__ */ jsxs30(
3611
+ /* @__PURE__ */ jsxs33(
3169
3612
  RadixSlider.Root,
3170
3613
  {
3171
- ref,
3614
+ ref: mergeRefs(ref, rootRef),
3172
3615
  id: baseId,
3173
3616
  min,
3174
3617
  max,
@@ -3178,10 +3621,10 @@ var Slider = /* @__PURE__ */ forwardRef32(function Slider2(props, ref) {
3178
3621
  className: root10({ size }),
3179
3622
  ...rest,
3180
3623
  children: [
3181
- /* @__PURE__ */ jsx36(RadixSlider.Track, { className: track({ size }), children: /* @__PURE__ */ jsx36(RadixSlider.Range, { className: range2 }) }),
3624
+ /* @__PURE__ */ jsx38(RadixSlider.Track, { className: track({ size }), children: /* @__PURE__ */ jsx38(RadixSlider.Range, { className: range2 }) }),
3182
3625
  current2.map((thumbValue, index) => {
3183
3626
  const thumbLabelId = `${baseId}-thumb-${index}`;
3184
- return /* @__PURE__ */ jsx36(
3627
+ return /* @__PURE__ */ jsx38(
3185
3628
  RadixSlider.Thumb,
3186
3629
  {
3187
3630
  className: thumb({ size }),
@@ -3196,32 +3639,33 @@ var Slider = /* @__PURE__ */ forwardRef32(function Slider2(props, ref) {
3196
3639
  ]
3197
3640
  }
3198
3641
  ),
3199
- isRange && current2.map((_, index) => /* @__PURE__ */ jsxs30("span", { id: `${baseId}-thumb-${index}`, hidden: true, children: [
3642
+ isRange && current2.map((_, index) => /* @__PURE__ */ jsxs33("span", { id: `${baseId}-thumb-${index}`, hidden: true, children: [
3200
3643
  label6 ? "" : ariaLabel ? `${ariaLabel} ` : "",
3201
3644
  thumbLabels[index] ?? `${index + 1}`
3202
3645
  ] }, index)),
3203
- helperText3 && /* @__PURE__ */ jsx36("span", { id: helperId, className: helperText2, children: helperText3 })
3646
+ helperText3 && /* @__PURE__ */ jsx38("span", { id: helperId, className: helperText2, children: helperText3 })
3204
3647
  ] });
3205
3648
  });
3206
3649
 
3207
3650
  // src/components/Stepper/Stepper.tsx
3208
- import { forwardRef as forwardRef33 } from "react";
3651
+ import { forwardRef as forwardRef35 } from "react";
3209
3652
  import { CheckIcon as CheckIcon4 } from "@bestow-ui/icons";
3210
3653
 
3211
3654
  // src/components/Stepper/Stepper.css.ts
3212
3655
  import { createRuntimeFn as _7a46817 } from "@vanilla-extract/recipes/createRuntimeFn";
3213
- var description5 = "kervhmh";
3656
+ var description6 = "kervhmi";
3214
3657
  var indicator2 = /* @__PURE__ */ _7a46817({ defaultClassName: "kervhm6", variantClassNames: { status: { complete: "kervhm7", current: "kervhm8", upcoming: "kervhm9" } }, defaultVariants: {}, compoundVariants: [] });
3215
- var label4 = /* @__PURE__ */ _7a46817({ defaultClassName: "kervhmd", variantClassNames: { status: { complete: "kervhme", current: "kervhmf", upcoming: "kervhmg" } }, defaultVariants: {}, compoundVariants: [] });
3658
+ var label4 = /* @__PURE__ */ _7a46817({ defaultClassName: "kervhme", variantClassNames: { status: { complete: "kervhmf", current: "kervhmg", upcoming: "kervhmh" } }, defaultVariants: {}, compoundVariants: [] });
3216
3659
  var root11 = /* @__PURE__ */ _7a46817({ defaultClassName: "kervhm0", variantClassNames: { orientation: { horizontal: "kervhm1", vertical: "kervhm2" } }, defaultVariants: { orientation: "horizontal" }, compoundVariants: [] });
3217
3660
  var step = /* @__PURE__ */ _7a46817({ defaultClassName: "kervhm3", variantClassNames: { orientation: { horizontal: "kervhm4", vertical: "kervhm5" } }, defaultVariants: { orientation: "horizontal" }, compoundVariants: [] });
3218
- var text2 = /* @__PURE__ */ _7a46817({ defaultClassName: "kervhma", variantClassNames: { orientation: { horizontal: "kervhmb", vertical: "kervhmc" } }, defaultVariants: {}, compoundVariants: [] });
3661
+ var text2 = /* @__PURE__ */ _7a46817({ defaultClassName: "kervhma", variantClassNames: { orientation: { horizontal: "kervhmb", vertical: "kervhmc" }, reserveDescription: { true: "kervhmd" } }, defaultVariants: {}, compoundVariants: [] });
3219
3662
 
3220
3663
  // src/components/Stepper/Stepper.tsx
3221
- import { jsx as jsx37, jsxs as jsxs31 } from "react/jsx-runtime";
3222
- var Stepper = /* @__PURE__ */ forwardRef33(function Stepper2({ steps, current: current2, orientation = "horizontal", "aria-label": ariaLabel, className, ...rest }, ref) {
3664
+ import { jsx as jsx39, jsxs as jsxs34 } from "react/jsx-runtime";
3665
+ var Stepper = /* @__PURE__ */ forwardRef35(function Stepper2({ steps, current: current2, orientation = "horizontal", loading, "aria-label": ariaLabel, className, ...rest }, ref) {
3223
3666
  const m = useMessages();
3224
- return /* @__PURE__ */ jsx37(
3667
+ const reserveDescription = orientation === "vertical" && steps.some((step2) => step2.description);
3668
+ return /* @__PURE__ */ jsx39(
3225
3669
  "ol",
3226
3670
  {
3227
3671
  ref,
@@ -3230,24 +3674,30 @@ var Stepper = /* @__PURE__ */ forwardRef33(function Stepper2({ steps, current: c
3230
3674
  ...rest,
3231
3675
  children: steps.map((step2, index) => {
3232
3676
  const status = index < current2 ? "complete" : index === current2 ? "current" : "upcoming";
3233
- return /* @__PURE__ */ jsxs31(
3677
+ const inProgress = loading && status === "current";
3678
+ return /* @__PURE__ */ jsxs34(
3234
3679
  "li",
3235
3680
  {
3236
3681
  className: step({ orientation }),
3237
3682
  "data-status": status,
3238
3683
  "aria-current": status === "current" ? "step" : void 0,
3239
3684
  children: [
3240
- /* @__PURE__ */ jsx37("span", { className: indicator2({ status }), "aria-hidden": true, children: status === "complete" ? /* @__PURE__ */ jsx37(CheckIcon4, { size: 16, strokeWidth: 2.5 }) : index + 1 }),
3241
- /* @__PURE__ */ jsxs31("span", { className: text2({ orientation }), children: [
3242
- /* @__PURE__ */ jsxs31("span", { className: label4({ status }), children: [
3685
+ /* @__PURE__ */ jsx39("span", { className: indicator2({ status }), "aria-hidden": true, children: status === "complete" ? /* @__PURE__ */ jsx39(CheckIcon4, { size: 16, strokeWidth: 2.5 }) : inProgress ? /* @__PURE__ */ jsx39(Spinner, { size: "sm", label: "" }) : index + 1 }),
3686
+ /* @__PURE__ */ jsxs34("span", { className: text2({ orientation, reserveDescription }), children: [
3687
+ /* @__PURE__ */ jsxs34("span", { className: label4({ status }), children: [
3243
3688
  step2.label,
3244
- status === "complete" && /* @__PURE__ */ jsxs31("span", { className: visuallyHidden, children: [
3689
+ status === "complete" && /* @__PURE__ */ jsxs34("span", { className: visuallyHidden, children: [
3245
3690
  " (",
3246
3691
  m.stepCompleted ?? "\uC644\uB8CC",
3247
3692
  ")"
3693
+ ] }),
3694
+ inProgress && /* @__PURE__ */ jsxs34("span", { className: visuallyHidden, children: [
3695
+ " (",
3696
+ m.stepInProgress ?? "\uC9C4\uD589 \uC911",
3697
+ ")"
3248
3698
  ] })
3249
3699
  ] }),
3250
- step2.description && /* @__PURE__ */ jsx37("span", { className: description5, children: step2.description })
3700
+ step2.description && /* @__PURE__ */ jsx39("span", { className: description6, children: step2.description })
3251
3701
  ] })
3252
3702
  ]
3253
3703
  },
@@ -3259,7 +3709,7 @@ var Stepper = /* @__PURE__ */ forwardRef33(function Stepper2({ steps, current: c
3259
3709
  });
3260
3710
 
3261
3711
  // src/components/Switch/Switch.tsx
3262
- import { forwardRef as forwardRef34, useEffect as useEffect11, useId as useId16, useRef as useRef15, useState as useState16 } from "react";
3712
+ import { forwardRef as forwardRef36, useEffect as useEffect12, useId as useId19, useRef as useRef22, useState as useState18 } from "react";
3263
3713
 
3264
3714
  // src/components/Switch/Switch.css.ts
3265
3715
  import { createRuntimeFn as _7a46818 } from "@vanilla-extract/recipes/createRuntimeFn";
@@ -3270,11 +3720,11 @@ var thumb2 = /* @__PURE__ */ _7a46818({ defaultClassName: "o33ul26", variantClas
3270
3720
  var track2 = /* @__PURE__ */ _7a46818({ defaultClassName: "o33ul23", variantClassNames: { size: { sm: "o33ul24", md: "o33ul25" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
3271
3721
 
3272
3722
  // src/components/Switch/Switch.tsx
3273
- import { jsx as jsx38, jsxs as jsxs32 } from "react/jsx-runtime";
3723
+ import { jsx as jsx40, jsxs as jsxs35 } from "react/jsx-runtime";
3274
3724
  function setNativeChecked(input6, checked) {
3275
3725
  Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "checked")?.set?.call(input6, checked);
3276
3726
  }
3277
- var Switch = /* @__PURE__ */ forwardRef34(function Switch2({
3727
+ var Switch = /* @__PURE__ */ forwardRef36(function Switch2({
3278
3728
  label: label6,
3279
3729
  size,
3280
3730
  id,
@@ -3288,31 +3738,26 @@ var Switch = /* @__PURE__ */ forwardRef34(function Switch2({
3288
3738
  onCheckedChange,
3289
3739
  "aria-label": ariaLabel
3290
3740
  }, ref) {
3291
- const generatedId = useId16();
3741
+ const generatedId = useId19();
3292
3742
  const switchId = id ?? generatedId;
3293
- const [uncontrolled, setUncontrolled] = useState16(defaultChecked ?? false);
3743
+ const [uncontrolled, setUncontrolled] = useState18(defaultChecked ?? false);
3294
3744
  const isControlled = checkedProp !== void 0;
3295
3745
  const checked = isControlled ? checkedProp : uncontrolled;
3296
- const buttonRef = useRef15(null);
3297
- const inputRef = useRef15(null);
3298
- const [inForm, setInForm] = useState16(true);
3299
- const userToggled = useRef15(false);
3746
+ const buttonRef = useRef22(null);
3747
+ const inputRef = useRef22(null);
3748
+ const [inForm, setInForm] = useState18(true);
3749
+ const userToggled = useRef22(false);
3300
3750
  const setChecked = (next) => {
3301
3751
  if (!isControlled) setUncontrolled(next);
3302
3752
  if (next !== checked) onCheckedChange?.(next);
3303
3753
  };
3304
- const setCheckedRef = useRef15(setChecked);
3305
- setCheckedRef.current = setChecked;
3306
- useEffect11(() => {
3307
- const form = buttonRef.current?.form;
3308
- setInForm(!!form);
3309
- if (!form) return;
3310
- const initial = checked;
3311
- const onReset = () => setCheckedRef.current(initial);
3312
- form.addEventListener("reset", onReset);
3313
- return () => form.removeEventListener("reset", onReset);
3754
+ useFormReset(buttonRef, () => {
3755
+ if (!isControlled) setChecked(defaultChecked ?? false);
3756
+ });
3757
+ useEffect12(() => {
3758
+ setInForm(!!buttonRef.current?.form);
3314
3759
  }, []);
3315
- useEffect11(() => {
3760
+ useEffect12(() => {
3316
3761
  const input6 = inputRef.current;
3317
3762
  if (!input6 || input6.checked === checked) return;
3318
3763
  setNativeChecked(input6, checked);
@@ -3325,8 +3770,8 @@ var Switch = /* @__PURE__ */ forwardRef34(function Switch2({
3325
3770
  if (inForm) event.stopPropagation();
3326
3771
  };
3327
3772
  const state = checked ? "checked" : "unchecked";
3328
- return /* @__PURE__ */ jsxs32("span", { className: cx(root12({ size }), className), "data-disabled": disabled || void 0, children: [
3329
- /* @__PURE__ */ jsx38(
3773
+ return /* @__PURE__ */ jsxs35("span", { className: cx(root12({ size }), className), "data-disabled": disabled || void 0, children: [
3774
+ /* @__PURE__ */ jsx40(
3330
3775
  "button",
3331
3776
  {
3332
3777
  ref: mergeRefs(ref, buttonRef),
@@ -3342,10 +3787,10 @@ var Switch = /* @__PURE__ */ forwardRef34(function Switch2({
3342
3787
  value: value3,
3343
3788
  className: track2({ size }),
3344
3789
  onClick: handleClick,
3345
- children: /* @__PURE__ */ jsx38("span", { className: thumb2({ size }), "data-state": state, "data-disabled": disabled ? "" : void 0 })
3790
+ children: /* @__PURE__ */ jsx40("span", { className: thumb2({ size }), "data-state": state, "data-disabled": disabled ? "" : void 0 })
3346
3791
  }
3347
3792
  ),
3348
- inForm && /* @__PURE__ */ jsx38(
3793
+ inForm && /* @__PURE__ */ jsx40(
3349
3794
  "input",
3350
3795
  {
3351
3796
  ref: inputRef,
@@ -3360,16 +3805,16 @@ var Switch = /* @__PURE__ */ forwardRef34(function Switch2({
3360
3805
  className: bubbleInput({ size })
3361
3806
  }
3362
3807
  ),
3363
- label6 && /* @__PURE__ */ jsx38("label", { htmlFor: switchId, className: label5, children: label6 })
3808
+ label6 && /* @__PURE__ */ jsx40("label", { htmlFor: switchId, className: label5, children: label6 })
3364
3809
  ] });
3365
3810
  });
3366
3811
 
3367
3812
  // src/components/Table/Table.tsx
3368
3813
  import {
3369
3814
  createContext as createContext3,
3370
- forwardRef as forwardRef35,
3815
+ forwardRef as forwardRef37,
3371
3816
  useContext as useContext3,
3372
- useId as useId17
3817
+ useId as useId20
3373
3818
  } from "react";
3374
3819
  import { ArrowDownIcon, ArrowUpIcon } from "@bestow-ui/icons";
3375
3820
 
@@ -3385,7 +3830,7 @@ var footer3 = "l3ploy7";
3385
3830
  var footerCell = "l3ployg";
3386
3831
  var head = "l3ployf";
3387
3832
  var header7 = "l3ploy3";
3388
- var row3 = "l3ploy8";
3833
+ var row4 = "l3ploy8";
3389
3834
  var sortButton = "l3ployh";
3390
3835
  var sortIcon = "l3ployi";
3391
3836
  var stickyHeader = "l3ploy4";
@@ -3393,10 +3838,10 @@ var striped = "l3ploy6";
3393
3838
  var table = "l3ploy1";
3394
3839
 
3395
3840
  // src/components/Table/Table.tsx
3396
- import { Fragment as Fragment7, jsx as jsx39, jsxs as jsxs33 } from "react/jsx-runtime";
3841
+ import { Fragment as Fragment9, jsx as jsx41, jsxs as jsxs36 } from "react/jsx-runtime";
3397
3842
  var TableSizeContext = /* @__PURE__ */ createContext3("md");
3398
3843
  var TableSectionContext = /* @__PURE__ */ createContext3("body");
3399
- var Table = /* @__PURE__ */ forwardRef35(function Table2({
3844
+ var Table = /* @__PURE__ */ forwardRef37(function Table2({
3400
3845
  size = "md",
3401
3846
  striped: striped2,
3402
3847
  stickyHeader: stickyHeader2,
@@ -3408,8 +3853,8 @@ var Table = /* @__PURE__ */ forwardRef35(function Table2({
3408
3853
  children,
3409
3854
  ...rest
3410
3855
  }, ref) {
3411
- const captionId = useId17();
3412
- return /* @__PURE__ */ jsx39(TableSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsx39(
3856
+ const captionId = useId20();
3857
+ return /* @__PURE__ */ jsx41(TableSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsx41(
3413
3858
  "div",
3414
3859
  {
3415
3860
  className: cx(container, containerClassName),
@@ -3418,7 +3863,7 @@ var Table = /* @__PURE__ */ forwardRef35(function Table2({
3418
3863
  role: "region",
3419
3864
  "aria-labelledby": caption2 ? captionId : void 0,
3420
3865
  "aria-label": caption2 ? void 0 : ariaLabel,
3421
- children: /* @__PURE__ */ jsxs33(
3866
+ children: /* @__PURE__ */ jsxs36(
3422
3867
  "table",
3423
3868
  {
3424
3869
  ref,
@@ -3426,7 +3871,7 @@ var Table = /* @__PURE__ */ forwardRef35(function Table2({
3426
3871
  "aria-label": caption2 ? void 0 : ariaLabel,
3427
3872
  ...rest,
3428
3873
  children: [
3429
- caption2 && /* @__PURE__ */ jsx39("caption", { id: captionId, className: caption, children: caption2 }),
3874
+ caption2 && /* @__PURE__ */ jsx41("caption", { id: captionId, className: caption, children: caption2 }),
3430
3875
  children
3431
3876
  ]
3432
3877
  }
@@ -3434,31 +3879,31 @@ var Table = /* @__PURE__ */ forwardRef35(function Table2({
3434
3879
  }
3435
3880
  ) });
3436
3881
  });
3437
- var TableHeader = /* @__PURE__ */ forwardRef35(
3882
+ var TableHeader = /* @__PURE__ */ forwardRef37(
3438
3883
  function TableHeader2({ className, ...rest }, ref) {
3439
- return /* @__PURE__ */ jsx39(TableSectionContext.Provider, { value: "header", children: /* @__PURE__ */ jsx39("thead", { ref, className: cx(header7, className), ...rest }) });
3884
+ return /* @__PURE__ */ jsx41(TableSectionContext.Provider, { value: "header", children: /* @__PURE__ */ jsx41("thead", { ref, className: cx(header7, className), ...rest }) });
3440
3885
  }
3441
3886
  );
3442
- var TableBody = /* @__PURE__ */ forwardRef35(
3887
+ var TableBody = /* @__PURE__ */ forwardRef37(
3443
3888
  function TableBody2({ className, ...rest }, ref) {
3444
- return /* @__PURE__ */ jsx39(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ jsx39("tbody", { ref, className: cx(body3, className), ...rest }) });
3889
+ return /* @__PURE__ */ jsx41(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ jsx41("tbody", { ref, className: cx(body3, className), ...rest }) });
3445
3890
  }
3446
3891
  );
3447
- var TableFooter = /* @__PURE__ */ forwardRef35(
3892
+ var TableFooter = /* @__PURE__ */ forwardRef37(
3448
3893
  function TableFooter2({ className, ...rest }, ref) {
3449
- return /* @__PURE__ */ jsx39(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ jsx39("tfoot", { ref, className: cx(footer3, className), ...rest }) });
3894
+ return /* @__PURE__ */ jsx41(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ jsx41("tfoot", { ref, className: cx(footer3, className), ...rest }) });
3450
3895
  }
3451
3896
  );
3452
- var TableRow = /* @__PURE__ */ forwardRef35(function TableRow2({ selected, className, ...rest }, ref) {
3453
- return /* @__PURE__ */ jsx39("tr", { ref, className: cx(row3, className), "data-state": selected ? "selected" : void 0, ...rest });
3897
+ var TableRow = /* @__PURE__ */ forwardRef37(function TableRow2({ selected, className, ...rest }, ref) {
3898
+ return /* @__PURE__ */ jsx41("tr", { ref, className: cx(row4, className), "data-state": selected ? "selected" : void 0, ...rest });
3454
3899
  });
3455
- var TableHead = /* @__PURE__ */ forwardRef35(function TableHead2({ align, sortDirection, onSort, scope, className, children, ...rest }, ref) {
3900
+ var TableHead = /* @__PURE__ */ forwardRef37(function TableHead2({ align, sortDirection, onSort, scope, className, children, ...rest }, ref) {
3456
3901
  const size = useContext3(TableSizeContext);
3457
3902
  const section = useContext3(TableSectionContext);
3458
3903
  const sortable = onSort !== void 0;
3459
3904
  const direction = sortDirection ?? "none";
3460
3905
  const SortIcon = direction === "descending" ? ArrowDownIcon : ArrowUpIcon;
3461
- return /* @__PURE__ */ jsx39(
3906
+ return /* @__PURE__ */ jsx41(
3462
3907
  "th",
3463
3908
  {
3464
3909
  ref,
@@ -3470,17 +3915,17 @@ var TableHead = /* @__PURE__ */ forwardRef35(function TableHead2({ align, sortDi
3470
3915
  className
3471
3916
  ),
3472
3917
  ...rest,
3473
- children: sortable ? /* @__PURE__ */ jsxs33("button", { type: "button", className: sortButton, onClick: onSort, children: [
3918
+ children: sortable ? /* @__PURE__ */ jsxs36("button", { type: "button", className: sortButton, onClick: onSort, children: [
3474
3919
  children,
3475
- /* @__PURE__ */ jsx39(SortIcon, { size: 14, className: sortIcon, "data-active": direction !== "none", "aria-hidden": true })
3920
+ /* @__PURE__ */ jsx41(SortIcon, { size: 14, className: sortIcon, "data-active": direction !== "none", "aria-hidden": true })
3476
3921
  ] }) : children
3477
3922
  }
3478
3923
  );
3479
3924
  });
3480
- var TableCell = /* @__PURE__ */ forwardRef35(function TableCell2({ align, className, ...rest }, ref) {
3925
+ var TableCell = /* @__PURE__ */ forwardRef37(function TableCell2({ align, className, ...rest }, ref) {
3481
3926
  const size = useContext3(TableSizeContext);
3482
3927
  const section = useContext3(TableSectionContext);
3483
- return /* @__PURE__ */ jsx39(
3928
+ return /* @__PURE__ */ jsx41(
3484
3929
  "td",
3485
3930
  {
3486
3931
  ref,
@@ -3489,17 +3934,17 @@ var TableCell = /* @__PURE__ */ forwardRef35(function TableCell2({ align, classN
3489
3934
  }
3490
3935
  );
3491
3936
  });
3492
- var TableEmpty = /* @__PURE__ */ forwardRef35(function TableEmpty2({ colSpan, className, children, ...rest }, ref) {
3493
- return /* @__PURE__ */ jsx39(TableRow, { children: /* @__PURE__ */ jsx39(TableCell, { ref, colSpan, className: cx(emptyCell, className), ...rest, children: /* @__PURE__ */ jsx39("div", { className: emptyContent, children }) }) });
3937
+ var TableEmpty = /* @__PURE__ */ forwardRef37(function TableEmpty2({ colSpan, className, children, ...rest }, ref) {
3938
+ return /* @__PURE__ */ jsx41(TableRow, { children: /* @__PURE__ */ jsx41(TableCell, { ref, colSpan, className: cx(emptyCell, className), ...rest, children: /* @__PURE__ */ jsx41("div", { className: emptyContent, children }) }) });
3494
3939
  });
3495
3940
  function TableSkeleton({ rows = 5, columns }) {
3496
- return /* @__PURE__ */ jsx39(Fragment7, { 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)) });
3941
+ return /* @__PURE__ */ jsx41(Fragment9, { children: Array.from({ length: rows }, (_, row6) => /* @__PURE__ */ jsx41(TableRow, { "aria-hidden": true, children: Array.from({ length: columns }, (_2, column) => /* @__PURE__ */ jsx41(TableCell, { children: /* @__PURE__ */ jsx41(Skeleton, { width: column === 0 ? "60%" : "80%" }) }, column)) }, row6)) });
3497
3942
  }
3498
3943
 
3499
3944
  // src/components/Table/useTableSelection.ts
3500
- import { useCallback, useState as useState17 } from "react";
3945
+ import { useCallback, useState as useState19 } from "react";
3501
3946
  function useTableSelection(initial = []) {
3502
- const [selected, setSelected] = useState17(initial);
3947
+ const [selected, setSelected] = useState19(initial);
3503
3948
  const isSelected = useCallback((id) => selected.includes(id), [selected]);
3504
3949
  const toggle3 = useCallback((id, checked) => {
3505
3950
  setSelected((prev) => {
@@ -3529,7 +3974,7 @@ function useTableSelection(initial = []) {
3529
3974
 
3530
3975
  // src/components/Tabs/Tabs.tsx
3531
3976
  import * as RadixTabs from "@radix-ui/react-tabs";
3532
- import { createContext as createContext4, forwardRef as forwardRef36, useContext as useContext4 } from "react";
3977
+ import { createContext as createContext4, forwardRef as forwardRef38, useContext as useContext4 } from "react";
3533
3978
 
3534
3979
  // src/components/Tabs/Tabs.css.ts
3535
3980
  import { createRuntimeFn as _7a46820 } from "@vanilla-extract/recipes/createRuntimeFn";
@@ -3539,31 +3984,31 @@ var root13 = "fvhbtd0";
3539
3984
  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"]] });
3540
3985
 
3541
3986
  // src/components/Tabs/Tabs.tsx
3542
- import { jsx as jsx40 } from "react/jsx-runtime";
3987
+ import { jsx as jsx42 } from "react/jsx-runtime";
3543
3988
  var TabsStyleContext = /* @__PURE__ */ createContext4({ variant: "line", size: "md" });
3544
- var Tabs = /* @__PURE__ */ forwardRef36(function Tabs2({ variant = "line", size = "md", className, ...props }, ref) {
3989
+ var Tabs = /* @__PURE__ */ forwardRef38(function Tabs2({ variant = "line", size = "md", className, ...props }, ref) {
3545
3990
  const controlled = "value" in props ? { value: props.value ?? "" } : {};
3546
- return /* @__PURE__ */ jsx40(TabsStyleContext.Provider, { value: { variant, size }, children: /* @__PURE__ */ jsx40(RadixTabs.Root, { ref, className: cx(root13, className), ...props, ...controlled }) });
3991
+ return /* @__PURE__ */ jsx42(TabsStyleContext.Provider, { value: { variant, size }, children: /* @__PURE__ */ jsx42(RadixTabs.Root, { ref, className: cx(root13, className), ...props, ...controlled }) });
3547
3992
  });
3548
- var TabsList = /* @__PURE__ */ forwardRef36(function TabsList2({ className, ...rest }, ref) {
3993
+ var TabsList = /* @__PURE__ */ forwardRef38(function TabsList2({ className, ...rest }, ref) {
3549
3994
  const { variant } = useContext4(TabsStyleContext);
3550
- return /* @__PURE__ */ jsx40(RadixTabs.List, { ref, className: cx(list6({ variant }), className), ...rest });
3995
+ return /* @__PURE__ */ jsx42(RadixTabs.List, { ref, className: cx(list6({ variant }), className), ...rest });
3551
3996
  });
3552
- var TabsTrigger = /* @__PURE__ */ forwardRef36(function TabsTrigger2({ className, ...rest }, ref) {
3997
+ var TabsTrigger = /* @__PURE__ */ forwardRef38(function TabsTrigger2({ className, ...rest }, ref) {
3553
3998
  const { variant, size } = useContext4(TabsStyleContext);
3554
- return /* @__PURE__ */ jsx40(RadixTabs.Trigger, { ref, className: cx(trigger3({ variant, size }), className), ...rest });
3999
+ return /* @__PURE__ */ jsx42(RadixTabs.Trigger, { ref, className: cx(trigger3({ variant, size }), className), ...rest });
3555
4000
  });
3556
- var TabsContent = /* @__PURE__ */ forwardRef36(function TabsContent2({ className, ...rest }, ref) {
3557
- return /* @__PURE__ */ jsx40(RadixTabs.Content, { ref, className: cx(content10, className), ...rest });
4001
+ var TabsContent = /* @__PURE__ */ forwardRef38(function TabsContent2({ className, ...rest }, ref) {
4002
+ return /* @__PURE__ */ jsx42(RadixTabs.Content, { ref, className: cx(content10, className), ...rest });
3558
4003
  });
3559
4004
 
3560
4005
  // src/components/Textarea/Textarea.tsx
3561
4006
  import {
3562
- forwardRef as forwardRef37,
4007
+ forwardRef as forwardRef39,
3563
4008
  useCallback as useCallback2,
3564
- useId as useId18,
3565
- useRef as useRef16,
3566
- useState as useState18
4009
+ useId as useId21,
4010
+ useRef as useRef23,
4011
+ useState as useState20
3567
4012
  } from "react";
3568
4013
 
3569
4014
  // src/components/Textarea/Textarea.css.ts
@@ -3575,8 +4020,8 @@ var footer4 = "_1koawa8";
3575
4020
  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: [] });
3576
4021
 
3577
4022
  // src/components/Textarea/Textarea.tsx
3578
- import { jsx as jsx41, jsxs as jsxs34 } from "react/jsx-runtime";
3579
- var Textarea = /* @__PURE__ */ forwardRef37(function Textarea2({
4023
+ import { jsx as jsx43, jsxs as jsxs37 } from "react/jsx-runtime";
4024
+ var Textarea = /* @__PURE__ */ forwardRef39(function Textarea2({
3580
4025
  label: label6,
3581
4026
  helperText: helperText3,
3582
4027
  error,
@@ -3597,11 +4042,11 @@ var Textarea = /* @__PURE__ */ forwardRef37(function Textarea2({
3597
4042
  "aria-describedby": ariaDescribedBy,
3598
4043
  ...rest
3599
4044
  }, ref) {
3600
- const generatedId = useId18();
4045
+ const generatedId = useId21();
3601
4046
  const textareaId = id ?? generatedId;
3602
4047
  const helperId = helperText3 ? `${textareaId}-helper` : void 0;
3603
- const innerRef = useRef16(null);
3604
- const [uncontrolledLength, setUncontrolledLength] = useState18(() => String(defaultValue ?? "").length);
4048
+ const innerRef = useRef23(null);
4049
+ const [uncontrolledLength, setUncontrolledLength] = useState20(() => String(defaultValue ?? "").length);
3605
4050
  const length = value3 !== void 0 ? String(value3).length : uncontrolledLength;
3606
4051
  const fitHeight = useCallback2(() => {
3607
4052
  const el = innerRef.current;
@@ -3611,17 +4056,21 @@ var Textarea = /* @__PURE__ */ forwardRef37(function Textarea2({
3611
4056
  el.style.height = `${el.scrollHeight + borders}px`;
3612
4057
  }, [autoResize]);
3613
4058
  useIsomorphicLayoutEffect(fitHeight, [fitHeight, value3]);
4059
+ useFormReset(innerRef, () => {
4060
+ if (value3 === void 0) setUncontrolledLength(String(defaultValue ?? "").length);
4061
+ setTimeout(fitHeight);
4062
+ });
3614
4063
  const handleChange = (event) => {
3615
4064
  if (value3 === void 0) setUncontrolledLength(event.target.value.length);
3616
4065
  fitHeight();
3617
4066
  onChange?.(event);
3618
4067
  };
3619
- return /* @__PURE__ */ jsxs34("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
3620
- label6 && /* @__PURE__ */ jsxs34("label", { htmlFor: textareaId, className: label, children: [
4068
+ return /* @__PURE__ */ jsxs37("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
4069
+ label6 && /* @__PURE__ */ jsxs37("label", { htmlFor: textareaId, className: label, children: [
3621
4070
  label6,
3622
- required && /* @__PURE__ */ jsx41("span", { className: requiredMark, "aria-hidden": true, children: "*" })
4071
+ required && /* @__PURE__ */ jsx43("span", { className: requiredMark, "aria-hidden": true, children: "*" })
3623
4072
  ] }),
3624
- /* @__PURE__ */ jsx41(
4073
+ /* @__PURE__ */ jsx43(
3625
4074
  "textarea",
3626
4075
  {
3627
4076
  ref: mergeRefs(innerRef, ref),
@@ -3643,36 +4092,36 @@ var Textarea = /* @__PURE__ */ forwardRef37(function Textarea2({
3643
4092
  ...rest
3644
4093
  }
3645
4094
  ),
3646
- (helperText3 || showCount) && /* @__PURE__ */ jsxs34("div", { className: footer4, children: [
3647
- helperText3 && /* @__PURE__ */ jsx41("p", { id: helperId, className: helperText({ error }), children: helperText3 }),
3648
- showCount && /* @__PURE__ */ jsx41("span", { className: cx(count, maxLength !== void 0 && length >= maxLength && countOver), children: maxLength !== void 0 ? `${length}/${maxLength}` : length })
4095
+ (helperText3 || showCount) && /* @__PURE__ */ jsxs37("div", { className: footer4, children: [
4096
+ helperText3 && /* @__PURE__ */ jsx43("p", { id: helperId, className: helperText({ error }), children: helperText3 }),
4097
+ showCount && /* @__PURE__ */ jsx43("span", { className: cx(count, maxLength !== void 0 && length >= maxLength && countOver), children: maxLength !== void 0 ? `${length}/${maxLength}` : length })
3649
4098
  ] })
3650
4099
  ] });
3651
4100
  });
3652
4101
 
3653
4102
  // src/components/Toast/Toast.tsx
3654
4103
  import * as RadixToast from "@radix-ui/react-toast";
3655
- import { createContext as createContext5, useCallback as useCallback3, useContext as useContext5, useMemo as useMemo4, useRef as useRef17, useState as useState19 } from "react";
4104
+ import { createContext as createContext5, useCallback as useCallback3, useContext as useContext5, useMemo as useMemo4, useRef as useRef24, useState as useState21 } from "react";
3656
4105
  import { XIcon as XIcon7 } from "@bestow-ui/icons";
3657
4106
 
3658
4107
  // src/components/Toast/Toast.css.ts
3659
4108
  import { createRuntimeFn as _7a46822 } from "@vanilla-extract/recipes/createRuntimeFn";
3660
- var action2 = "_1g11zvx9";
3661
- var close = "_1g11zvxa";
3662
- var description6 = "_1g11zvx8";
3663
- var title5 = "_1g11zvx7";
3664
- var toast = /* @__PURE__ */ _7a46822({ defaultClassName: "_1g11zvx1", variantClassNames: { color: { primary: "_1g11zvx2", neutral: "_1g11zvx3", success: "_1g11zvx4", warning: "_1g11zvx5", danger: "_1g11zvx6" } }, defaultVariants: { color: "neutral" }, compoundVariants: [] });
4109
+ var action2 = "_1g11zvxa";
4110
+ var close = "_1g11zvxb";
4111
+ var description7 = "_1g11zvx9";
4112
+ var title5 = "_1g11zvx8";
4113
+ var toast = /* @__PURE__ */ _7a46822({ defaultClassName: "_1g11zvx1", variantClassNames: { color: { primary: "_1g11zvx2", neutral: "_1g11zvx3", success: "_1g11zvx4", warning: "_1g11zvx5", danger: "_1g11zvx6", info: "_1g11zvx7" } }, defaultVariants: { color: "neutral" }, compoundVariants: [] });
3665
4114
  var viewport2 = "_1g11zvx0";
3666
4115
 
3667
4116
  // src/components/Toast/Toast.tsx
3668
- import { jsx as jsx42, jsxs as jsxs35 } from "react/jsx-runtime";
4117
+ import { jsx as jsx44, jsxs as jsxs38 } from "react/jsx-runtime";
3669
4118
  var REMOVE_DELAY = 500;
3670
4119
  var ToastContext = /* @__PURE__ */ createContext5(null);
3671
4120
  function ToastProvider({ children, duration = 5e3, label: labelProp }) {
3672
4121
  const m = useMessages();
3673
4122
  const label6 = labelProp ?? m.notifications ?? "\uC54C\uB9BC";
3674
- const [toasts, setToasts] = useState19([]);
3675
- const nextId = useRef17(0);
4123
+ const [toasts, setToasts] = useState21([]);
4124
+ const nextId = useRef24(0);
3676
4125
  const portal2 = usePortalProps();
3677
4126
  const toast2 = useCallback3((options) => {
3678
4127
  const id = nextId.current++;
@@ -3685,9 +4134,9 @@ function ToastProvider({ children, duration = 5e3, label: labelProp }) {
3685
4134
  setTimeout(() => setToasts((prev) => prev.filter((t) => t.open || !isTarget(t))), REMOVE_DELAY);
3686
4135
  }, []);
3687
4136
  const value3 = useMemo4(() => ({ toast: toast2, dismiss }), [toast2, dismiss]);
3688
- return /* @__PURE__ */ jsx42(ToastContext.Provider, { value: value3, children: /* @__PURE__ */ jsxs35(RadixToast.Provider, { duration, label: label6, swipeDirection: "right", children: [
4137
+ return /* @__PURE__ */ jsx44(ToastContext.Provider, { value: value3, children: /* @__PURE__ */ jsxs38(RadixToast.Provider, { duration, label: label6, swipeDirection: "right", children: [
3689
4138
  children,
3690
- toasts.map(({ id, open, title: title6, description: description7, color, duration: itemDuration, action: action3 }) => /* @__PURE__ */ jsxs35(
4139
+ toasts.map(({ id, open, title: title6, description: description8, color, duration: itemDuration, action: action3 }) => /* @__PURE__ */ jsxs38(
3691
4140
  RadixToast.Root,
3692
4141
  {
3693
4142
  open,
@@ -3697,15 +4146,15 @@ function ToastProvider({ children, duration = 5e3, label: labelProp }) {
3697
4146
  },
3698
4147
  className: toast({ color }),
3699
4148
  children: [
3700
- /* @__PURE__ */ jsx42(RadixToast.Title, { className: title5, children: title6 }),
3701
- description7 && /* @__PURE__ */ jsx42(RadixToast.Description, { className: description6, children: description7 }),
3702
- 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 }) }),
3703
- /* @__PURE__ */ jsx42(RadixToast.Close, { className: close, "aria-label": m.close ?? "\uB2EB\uAE30", children: /* @__PURE__ */ jsx42(XIcon7, { size: 16 }) })
4149
+ /* @__PURE__ */ jsx44(RadixToast.Title, { className: title5, children: title6 }),
4150
+ description8 && /* @__PURE__ */ jsx44(RadixToast.Description, { className: description7, children: description8 }),
4151
+ action3 && /* @__PURE__ */ jsx44(RadixToast.Action, { asChild: true, altText: action3.altText ?? action3.label, className: action2, children: /* @__PURE__ */ jsx44(Button, { size: "sm", variant: "soft", color: "neutral", onClick: action3.onClick, children: action3.label }) }),
4152
+ /* @__PURE__ */ jsx44(RadixToast.Close, { className: close, "aria-label": m.close ?? "\uB2EB\uAE30", children: /* @__PURE__ */ jsx44(XIcon7, { size: 16 }) })
3704
4153
  ]
3705
4154
  },
3706
4155
  id
3707
4156
  )),
3708
- /* @__PURE__ */ jsx42(RadixToast.Viewport, { className: cx(portal2.className, viewport2), style: portal2.style })
4157
+ /* @__PURE__ */ jsx44(RadixToast.Viewport, { className: cx(portal2.className, viewport2), style: portal2.style })
3709
4158
  ] }) });
3710
4159
  }
3711
4160
  function useToast() {
@@ -3722,7 +4171,7 @@ var arrow2 = "z7rufs1";
3722
4171
  var content11 = "z7rufs0";
3723
4172
 
3724
4173
  // src/components/Tooltip/Tooltip.tsx
3725
- import { jsx as jsx43, jsxs as jsxs36 } from "react/jsx-runtime";
4174
+ import { jsx as jsx45, jsxs as jsxs39 } from "react/jsx-runtime";
3726
4175
  function Tooltip({
3727
4176
  content: content12,
3728
4177
  children,
@@ -3737,9 +4186,9 @@ function Tooltip({
3737
4186
  }) {
3738
4187
  const portal2 = usePortalProps();
3739
4188
  if (disabled || content12 == null || content12 === "") return children;
3740
- return /* @__PURE__ */ jsx43(RadixTooltip.Provider, { delayDuration: delay, children: /* @__PURE__ */ jsxs36(RadixTooltip.Root, { open, defaultOpen, onOpenChange, children: [
3741
- /* @__PURE__ */ jsx43(RadixTooltip.Trigger, { asChild: true, children }),
3742
- /* @__PURE__ */ jsx43(RadixTooltip.Portal, { children: /* @__PURE__ */ jsxs36(
4189
+ return /* @__PURE__ */ jsx45(RadixTooltip.Provider, { delayDuration: delay, children: /* @__PURE__ */ jsxs39(RadixTooltip.Root, { open, defaultOpen, onOpenChange, children: [
4190
+ /* @__PURE__ */ jsx45(RadixTooltip.Trigger, { asChild: true, children }),
4191
+ /* @__PURE__ */ jsx45(RadixTooltip.Portal, { children: /* @__PURE__ */ jsxs39(
3743
4192
  RadixTooltip.Content,
3744
4193
  {
3745
4194
  side,
@@ -3750,7 +4199,7 @@ function Tooltip({
3750
4199
  style: portal2.style,
3751
4200
  children: [
3752
4201
  content12,
3753
- /* @__PURE__ */ jsx43(RadixTooltip.Arrow, { className: arrow2, width: 10, height: 5 })
4202
+ /* @__PURE__ */ jsx45(RadixTooltip.Arrow, { className: arrow2, width: 10, height: 5 })
3754
4203
  ]
3755
4204
  }
3756
4205
  ) })
@@ -3758,19 +4207,19 @@ function Tooltip({
3758
4207
  }
3759
4208
 
3760
4209
  // src/components/VerificationCodeInput/VerificationCodeInput.tsx
3761
- import { forwardRef as forwardRef38, useEffect as useEffect12, useId as useId19, useRef as useRef18, useState as useState20 } from "react";
4210
+ import { forwardRef as forwardRef40, useEffect as useEffect13, useId as useId22, useRef as useRef25, useState as useState22 } from "react";
3762
4211
 
3763
4212
  // src/components/VerificationCodeInput/VerificationCodeInput.css.ts
3764
4213
  var input5 = "ea01812";
3765
- var row4 = "ea01810";
4214
+ var row5 = "ea01810";
3766
4215
  var slot = "ea01813";
3767
4216
  var slots = "ea01811";
3768
4217
  var timer = "ea01814";
3769
4218
 
3770
4219
  // src/components/VerificationCodeInput/VerificationCodeInput.tsx
3771
- import { jsx as jsx44, jsxs as jsxs37 } from "react/jsx-runtime";
4220
+ import { jsx as jsx46, jsxs as jsxs40 } from "react/jsx-runtime";
3772
4221
  var formatTime = (seconds) => `${String(Math.floor(seconds / 60)).padStart(2, "0")}:${String(seconds % 60).padStart(2, "0")}`;
3773
- var VerificationCodeInput = /* @__PURE__ */ forwardRef38(
4222
+ var VerificationCodeInput = /* @__PURE__ */ forwardRef40(
3774
4223
  function VerificationCodeInput2(props, ref) {
3775
4224
  const {
3776
4225
  length = 6,
@@ -3797,23 +4246,23 @@ var VerificationCodeInput = /* @__PURE__ */ forwardRef38(
3797
4246
  const label6 = labelProp ?? m.verificationCode ?? "\uC778\uC99D\uBC88\uD638";
3798
4247
  const resendText = resendTextProp ?? m.resend ?? "\uC7AC\uC804\uC1A1";
3799
4248
  const expiredText = expiredTextProp ?? m.verificationExpired ?? "\uC778\uC99D \uC2DC\uAC04\uC774 \uC9C0\uB0AC\uC5B4\uC694. \uC7AC\uC804\uC1A1\uD574 \uC8FC\uC138\uC694.";
3800
- const generatedId = useId19();
4249
+ const generatedId = useId22();
3801
4250
  const inputId = id ?? generatedId;
3802
4251
  const helperId = `${inputId}-helper`;
3803
4252
  const statusId = `${inputId}-status`;
3804
- const inputRef = useRef18(null);
4253
+ const inputRef = useRef25(null);
3805
4254
  const isControlled = "value" in props;
3806
- const [innerValue, setInnerValue] = useState20(defaultValue ?? "");
4255
+ const [innerValue, setInnerValue] = useState22(defaultValue ?? "");
3807
4256
  const code = (isControlled ? value3 ?? "" : innerValue).slice(0, length);
3808
- const [focused, setFocused] = useState20(false);
3809
- const [endAt, setEndAt] = useState20(() => expiresIn ? Date.now() + expiresIn * 1e3 : null);
3810
- const [remaining, setRemaining] = useState20(expiresIn ?? 0);
4257
+ const [focused, setFocused] = useState22(false);
4258
+ const [endAt, setEndAt] = useState22(() => expiresIn ? Date.now() + expiresIn * 1e3 : null);
4259
+ const [remaining, setRemaining] = useState22(expiresIn ?? 0);
3811
4260
  const expired = expiresIn !== void 0 && remaining <= 0;
3812
- const onExpireRef = useRef18(onExpire);
3813
- useEffect12(() => {
4261
+ const onExpireRef = useRef25(onExpire);
4262
+ useEffect13(() => {
3814
4263
  onExpireRef.current = onExpire;
3815
4264
  });
3816
- useEffect12(() => {
4265
+ useEffect13(() => {
3817
4266
  if (endAt === null) return;
3818
4267
  const tick = () => {
3819
4268
  const left = Math.max(0, Math.ceil((endAt - Date.now()) / 1e3));
@@ -3827,6 +4276,12 @@ var VerificationCodeInput = /* @__PURE__ */ forwardRef38(
3827
4276
  tick();
3828
4277
  return () => clearInterval(timer2);
3829
4278
  }, [endAt]);
4279
+ useFormReset(inputRef, () => {
4280
+ if (isControlled) return;
4281
+ const next = defaultValue ?? "";
4282
+ setInnerValue(next);
4283
+ if (next !== code) onValueChange?.(next);
4284
+ });
3830
4285
  const setCode = (next) => {
3831
4286
  if (!isControlled) setInnerValue(next);
3832
4287
  onValueChange?.(next);
@@ -3846,19 +4301,19 @@ var VerificationCodeInput = /* @__PURE__ */ forwardRef38(
3846
4301
  }
3847
4302
  inputRef.current?.focus();
3848
4303
  };
3849
- const description7 = helperText3 ?? m.verificationCodeHint?.(length, type) ?? `${length}\uC790\uB9AC ${type === "numeric" ? "\uC22B\uC790" : "\uBB38\uC790"}\uB97C \uC785\uB825\uD558\uC138\uC694.`;
4304
+ const description8 = helperText3 ?? m.verificationCodeHint?.(length, type) ?? `${length}\uC790\uB9AC ${type === "numeric" ? "\uC22B\uC790" : "\uBB38\uC790"}\uB97C \uC785\uB825\uD558\uC138\uC694.`;
3850
4305
  const activeIndex = Math.min(code.length, length - 1);
3851
- return /* @__PURE__ */ jsxs37(
4306
+ return /* @__PURE__ */ jsxs40(
3852
4307
  "div",
3853
4308
  {
3854
4309
  className: cx(field, className),
3855
4310
  "data-invalid": error || void 0,
3856
4311
  "data-disabled": disabled || void 0,
3857
4312
  children: [
3858
- /* @__PURE__ */ jsx44("label", { htmlFor: inputId, className: label, children: label6 }),
3859
- /* @__PURE__ */ jsxs37("div", { className: row4, children: [
3860
- /* @__PURE__ */ jsxs37("div", { className: slots, children: [
3861
- /* @__PURE__ */ jsx44(
4313
+ /* @__PURE__ */ jsx46("label", { htmlFor: inputId, className: label, children: label6 }),
4314
+ /* @__PURE__ */ jsxs40("div", { className: row5, children: [
4315
+ /* @__PURE__ */ jsxs40("div", { className: slots, children: [
4316
+ /* @__PURE__ */ jsx46(
3862
4317
  "input",
3863
4318
  {
3864
4319
  ref: mergeRefs(ref, inputRef),
@@ -3878,7 +4333,7 @@ var VerificationCodeInput = /* @__PURE__ */ forwardRef38(
3878
4333
  className: input5
3879
4334
  }
3880
4335
  ),
3881
- Array.from({ length }, (_, index) => /* @__PURE__ */ jsx44(
4336
+ Array.from({ length }, (_, index) => /* @__PURE__ */ jsx46(
3882
4337
  "div",
3883
4338
  {
3884
4339
  className: slot,
@@ -3889,12 +4344,12 @@ var VerificationCodeInput = /* @__PURE__ */ forwardRef38(
3889
4344
  index
3890
4345
  ))
3891
4346
  ] }),
3892
- expiresIn !== void 0 && /* @__PURE__ */ jsx44("span", { role: "timer", className: timer, children: formatTime(remaining) }),
3893
- onResend && /* @__PURE__ */ jsx44(Button, { size: "sm", variant: "outline", color: "neutral", onClick: resend, disabled, children: resendText })
4347
+ expiresIn !== void 0 && /* @__PURE__ */ jsx46("span", { role: "timer", className: timer, children: formatTime(remaining) }),
4348
+ onResend && /* @__PURE__ */ jsx46(Button, { size: "sm", variant: "outline", color: "neutral", onClick: resend, disabled, children: resendText })
3894
4349
  ] }),
3895
- /* @__PURE__ */ jsx44("p", { id: helperId, className: helperText({ error }), children: description7 }),
3896
- /* @__PURE__ */ jsx44("p", { id: statusId, role: "status", className: helperText({ error: true }), children: expired ? expiredText : "" }),
3897
- name && /* @__PURE__ */ jsx44("input", { type: "hidden", name, value: code })
4350
+ /* @__PURE__ */ jsx46("p", { id: helperId, className: helperText({ error }), children: description8 }),
4351
+ /* @__PURE__ */ jsx46("p", { id: statusId, role: "status", className: helperText({ error: true }), children: expired ? expiredText : "" }),
4352
+ name && /* @__PURE__ */ jsx46("input", { type: "hidden", name, value: code })
3898
4353
  ]
3899
4354
  }
3900
4355
  );
@@ -3913,6 +4368,7 @@ export {
3913
4368
  Button,
3914
4369
  Calendar,
3915
4370
  Checkbox,
4371
+ CheckboxGroup,
3916
4372
  Combobox,
3917
4373
  DatePicker,
3918
4374
  DateRangePicker,
@@ -3946,6 +4402,7 @@ export {
3946
4402
  Popover2 as Popover,
3947
4403
  PopoverClose,
3948
4404
  RadioGroup2 as RadioGroup,
4405
+ ResidentNumberInput,
3949
4406
  SegmentedControl,
3950
4407
  Select,
3951
4408
  SkipLink,