@bestow-ui/react 1.7.0 → 2.0.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/index.cjs CHANGED
@@ -159,7 +159,7 @@ module.exports = __toCommonJS(src_exports);
159
159
  // src/theme/contract.css.ts
160
160
  var systemThemeClass = "tkagtb2";
161
161
  var themeClass = { light: "tkagtb0", dark: "tkagtb1" };
162
- var vars = { space: { "0": "var(--bestow-space-0)", "1": "var(--bestow-space-1)", "2": "var(--bestow-space-2)", "3": "var(--bestow-space-3)", "4": "var(--bestow-space-4)", "5": "var(--bestow-space-5)", "6": "var(--bestow-space-6)", "8": "var(--bestow-space-8)", "10": "var(--bestow-space-10)", "12": "var(--bestow-space-12)", "16": "var(--bestow-space-16)" }, radius: { none: "var(--bestow-radius-none)", sm: "var(--bestow-radius-sm)", md: "var(--bestow-radius-md)", lg: "var(--bestow-radius-lg)", xl: "var(--bestow-radius-xl)", full: "var(--bestow-radius-full)" }, font: { family: { sans: "var(--bestow-font-family-sans)", mono: "var(--bestow-font-family-mono)" }, size: { xs: "var(--bestow-font-size-xs)", sm: "var(--bestow-font-size-sm)", md: "var(--bestow-font-size-md)", lg: "var(--bestow-font-size-lg)", xl: "var(--bestow-font-size-xl)", "2xl": "var(--bestow-font-size-2xl)", "3xl": "var(--bestow-font-size-3xl)", "4xl": "var(--bestow-font-size-4xl)" }, weight: { regular: "var(--bestow-font-weight-regular)", medium: "var(--bestow-font-weight-medium)", semibold: "var(--bestow-font-weight-semibold)", bold: "var(--bestow-font-weight-bold)" }, lineHeight: { tight: "var(--bestow-font-line-height-tight)", normal: "var(--bestow-font-line-height-normal)", relaxed: "var(--bestow-font-line-height-relaxed)" } }, duration: { fast: "var(--bestow-duration-fast)", normal: "var(--bestow-duration-normal)", slow: "var(--bestow-duration-slow)" }, zIndex: { overlay: "var(--bestow-z-index-overlay)", modal: "var(--bestow-z-index-modal)", dropdown: "var(--bestow-z-index-dropdown)", toast: "var(--bestow-z-index-toast)", tooltip: "var(--bestow-z-index-tooltip)" }, color: { bg: { "default": "var(--bestow-color-bg-default)", subtle: "var(--bestow-color-bg-subtle)", muted: "var(--bestow-color-bg-muted)", inverse: "var(--bestow-color-bg-inverse)", overlay: "var(--bestow-color-bg-overlay)" }, fg: { "default": "var(--bestow-color-fg-default)", muted: "var(--bestow-color-fg-muted)", subtle: "var(--bestow-color-fg-subtle)", inverse: "var(--bestow-color-fg-inverse)" }, border: { "default": "var(--bestow-color-border-default)", strong: "var(--bestow-color-border-strong)", focus: "var(--bestow-color-border-focus)", input: "var(--bestow-color-border-input)", inputHover: "var(--bestow-color-border-input-hover)", control: "var(--bestow-color-border-control)" }, primary: { solid: "var(--bestow-color-primary-solid)", solidHover: "var(--bestow-color-primary-solid-hover)", contrast: "var(--bestow-color-primary-contrast)", subtle: "var(--bestow-color-primary-subtle)", subtleHover: "var(--bestow-color-primary-subtle-hover)", text: "var(--bestow-color-primary-text)" }, neutral: { solid: "var(--bestow-color-neutral-solid)", solidHover: "var(--bestow-color-neutral-solid-hover)", contrast: "var(--bestow-color-neutral-contrast)", subtle: "var(--bestow-color-neutral-subtle)", subtleHover: "var(--bestow-color-neutral-subtle-hover)", text: "var(--bestow-color-neutral-text)" }, danger: { solid: "var(--bestow-color-danger-solid)", solidHover: "var(--bestow-color-danger-solid-hover)", contrast: "var(--bestow-color-danger-contrast)", subtle: "var(--bestow-color-danger-subtle)", subtleHover: "var(--bestow-color-danger-subtle-hover)", text: "var(--bestow-color-danger-text)" }, success: { solid: "var(--bestow-color-success-solid)", solidHover: "var(--bestow-color-success-solid-hover)", contrast: "var(--bestow-color-success-contrast)", subtle: "var(--bestow-color-success-subtle)", subtleHover: "var(--bestow-color-success-subtle-hover)", text: "var(--bestow-color-success-text)" }, warning: { solid: "var(--bestow-color-warning-solid)", solidHover: "var(--bestow-color-warning-solid-hover)", contrast: "var(--bestow-color-warning-contrast)", subtle: "var(--bestow-color-warning-subtle)", subtleHover: "var(--bestow-color-warning-subtle-hover)", text: "var(--bestow-color-warning-text)" }, info: { solid: "var(--bestow-color-info-solid)", solidHover: "var(--bestow-color-info-solid-hover)", contrast: "var(--bestow-color-info-contrast)", subtle: "var(--bestow-color-info-subtle)", subtleHover: "var(--bestow-color-info-subtle-hover)", text: "var(--bestow-color-info-text)" } }, shadow: { sm: "var(--bestow-shadow-sm)", md: "var(--bestow-shadow-md)", lg: "var(--bestow-shadow-lg)" } };
162
+ var vars = { space: { "0": "var(--bestow-space-0)", "1": "var(--bestow-space-1)", "2": "var(--bestow-space-2)", "3": "var(--bestow-space-3)", "4": "var(--bestow-space-4)", "5": "var(--bestow-space-5)", "6": "var(--bestow-space-6)", "8": "var(--bestow-space-8)", "10": "var(--bestow-space-10)", "12": "var(--bestow-space-12)", "16": "var(--bestow-space-16)" }, radius: { none: "var(--bestow-radius-none)", sm: "var(--bestow-radius-sm)", md: "var(--bestow-radius-md)", lg: "var(--bestow-radius-lg)", xl: "var(--bestow-radius-xl)", full: "var(--bestow-radius-full)" }, font: { family: { sans: "var(--bestow-font-family-sans)", mono: "var(--bestow-font-family-mono)" }, size: { xs: "var(--bestow-font-size-xs)", sm: "var(--bestow-font-size-sm)", md: "var(--bestow-font-size-md)", lg: "var(--bestow-font-size-lg)", xl: "var(--bestow-font-size-xl)", "2xl": "var(--bestow-font-size-2xl)", "3xl": "var(--bestow-font-size-3xl)", "4xl": "var(--bestow-font-size-4xl)" }, weight: { regular: "var(--bestow-font-weight-regular)", medium: "var(--bestow-font-weight-medium)", semibold: "var(--bestow-font-weight-semibold)", bold: "var(--bestow-font-weight-bold)" }, lineHeight: { tight: "var(--bestow-font-line-height-tight)", normal: "var(--bestow-font-line-height-normal)", relaxed: "var(--bestow-font-line-height-relaxed)" } }, duration: { fast: "var(--bestow-duration-fast)", normal: "var(--bestow-duration-normal)", slow: "var(--bestow-duration-slow)" }, opacity: { disabled: "var(--bestow-opacity-disabled)" }, zIndex: { overlay: "var(--bestow-z-index-overlay)", modal: "var(--bestow-z-index-modal)", dropdown: "var(--bestow-z-index-dropdown)", toast: "var(--bestow-z-index-toast)", tooltip: "var(--bestow-z-index-tooltip)" }, color: { bg: { "default": "var(--bestow-color-bg-default)", subtle: "var(--bestow-color-bg-subtle)", muted: "var(--bestow-color-bg-muted)", inverse: "var(--bestow-color-bg-inverse)", overlay: "var(--bestow-color-bg-overlay)" }, fg: { "default": "var(--bestow-color-fg-default)", muted: "var(--bestow-color-fg-muted)", subtle: "var(--bestow-color-fg-subtle)", inverse: "var(--bestow-color-fg-inverse)" }, border: { "default": "var(--bestow-color-border-default)", strong: "var(--bestow-color-border-strong)", focus: "var(--bestow-color-border-focus)", input: "var(--bestow-color-border-input)", inputHover: "var(--bestow-color-border-input-hover)", control: "var(--bestow-color-border-control)" }, primary: { solid: "var(--bestow-color-primary-solid)", solidHover: "var(--bestow-color-primary-solid-hover)", contrast: "var(--bestow-color-primary-contrast)", subtle: "var(--bestow-color-primary-subtle)", subtleHover: "var(--bestow-color-primary-subtle-hover)", text: "var(--bestow-color-primary-text)" }, neutral: { solid: "var(--bestow-color-neutral-solid)", solidHover: "var(--bestow-color-neutral-solid-hover)", contrast: "var(--bestow-color-neutral-contrast)", subtle: "var(--bestow-color-neutral-subtle)", subtleHover: "var(--bestow-color-neutral-subtle-hover)", text: "var(--bestow-color-neutral-text)" }, danger: { solid: "var(--bestow-color-danger-solid)", solidHover: "var(--bestow-color-danger-solid-hover)", contrast: "var(--bestow-color-danger-contrast)", subtle: "var(--bestow-color-danger-subtle)", subtleHover: "var(--bestow-color-danger-subtle-hover)", text: "var(--bestow-color-danger-text)" }, success: { solid: "var(--bestow-color-success-solid)", solidHover: "var(--bestow-color-success-solid-hover)", contrast: "var(--bestow-color-success-contrast)", subtle: "var(--bestow-color-success-subtle)", subtleHover: "var(--bestow-color-success-subtle-hover)", text: "var(--bestow-color-success-text)" }, warning: { solid: "var(--bestow-color-warning-solid)", solidHover: "var(--bestow-color-warning-solid-hover)", contrast: "var(--bestow-color-warning-contrast)", subtle: "var(--bestow-color-warning-subtle)", subtleHover: "var(--bestow-color-warning-subtle-hover)", text: "var(--bestow-color-warning-text)" }, info: { solid: "var(--bestow-color-info-solid)", solidHover: "var(--bestow-color-info-solid-hover)", contrast: "var(--bestow-color-info-contrast)", subtle: "var(--bestow-color-info-subtle)", subtleHover: "var(--bestow-color-info-subtle-hover)", text: "var(--bestow-color-info-text)" } }, shadow: { sm: "var(--bestow-shadow-sm)", md: "var(--bestow-shadow-md)", lg: "var(--bestow-shadow-lg)" } };
163
163
 
164
164
  // src/theme/color.ts
165
165
  var import_tokens = require("@bestow-ui/tokens");
@@ -383,6 +383,7 @@ var en = {
383
383
  increment: "Increase",
384
384
  steps: "Progress",
385
385
  stepCompleted: "completed",
386
+ stepInProgress: "in progress",
386
387
  fileSelect: "Choose files",
387
388
  fileDropHint: "or drag and drop here",
388
389
  fileList: "Selected files",
@@ -515,18 +516,19 @@ function loadKakaoPostcode() {
515
516
  const existing = w.kakao?.Postcode ?? w.daum?.Postcode;
516
517
  if (existing) return Promise.resolve(existing);
517
518
  loading ?? (loading = new Promise((resolve, reject) => {
519
+ const fail = (message) => {
520
+ loading = null;
521
+ reject(new Error(message));
522
+ };
518
523
  const script = document.createElement("script");
519
524
  script.src = KAKAO_POSTCODE_SRC;
520
525
  script.async = true;
521
526
  script.onload = () => {
522
527
  const ctor = w.kakao?.Postcode ?? w.daum?.Postcode;
523
- if (ctor) resolve(ctor);
524
- else reject(new Error("\uC6B0\uD3B8\uBC88\uD638 \uC11C\uBE44\uC2A4\uB97C \uCC3E\uC9C0 \uBABB\uD588\uC5B4\uC694"));
525
- };
526
- script.onerror = () => {
527
- loading = null;
528
- reject(new Error("\uC6B0\uD3B8\uBC88\uD638 \uC11C\uBE44\uC2A4\uB97C \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC5B4\uC694"));
528
+ if (ctor) return resolve(ctor);
529
+ fail("\uC6B0\uD3B8\uBC88\uD638 \uC11C\uBE44\uC2A4\uB97C \uCC3E\uC9C0 \uBABB\uD588\uC5B4\uC694");
529
530
  };
531
+ script.onerror = () => fail("\uC6B0\uD3B8\uBC88\uD638 \uC11C\uBE44\uC2A4\uB97C \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC5B4\uC694");
530
532
  document.head.appendChild(script);
531
533
  }));
532
534
  return loading;
@@ -1098,14 +1100,40 @@ var AccordionItem = /* @__PURE__ */ (0, import_react16.forwardRef)(function Acco
1098
1100
  });
1099
1101
 
1100
1102
  // src/components/AddressInput/AddressInput.tsx
1101
- var import_react22 = require("react");
1103
+ var import_react23 = require("react");
1104
+
1105
+ // src/utils/mergeRefs.ts
1106
+ function mergeRefs(...refs) {
1107
+ return (value4) => {
1108
+ for (const ref of refs) {
1109
+ if (typeof ref === "function") ref(value4);
1110
+ else if (ref) ref.current = value4;
1111
+ }
1112
+ };
1113
+ }
1114
+
1115
+ // src/utils/useFormReset.ts
1116
+ var import_react17 = require("react");
1117
+ function useFormReset(ref, onReset) {
1118
+ const latest = (0, import_react17.useRef)(onReset);
1119
+ (0, import_react17.useEffect)(() => {
1120
+ latest.current = onReset;
1121
+ });
1122
+ (0, import_react17.useEffect)(() => {
1123
+ const form = ref.current?.closest("form");
1124
+ if (!form) return;
1125
+ const handleReset = () => latest.current();
1126
+ form.addEventListener("reset", handleReset);
1127
+ return () => form.removeEventListener("reset", handleReset);
1128
+ }, [ref]);
1129
+ }
1102
1130
 
1103
1131
  // src/components/Button/Button.tsx
1104
- var import_react18 = require("react");
1132
+ var import_react19 = require("react");
1105
1133
 
1106
1134
  // src/components/Spinner/Spinner.tsx
1107
1135
  var import_icons2 = require("@bestow-ui/icons");
1108
- var import_react17 = require("react");
1136
+ var import_react18 = require("react");
1109
1137
 
1110
1138
  // src/components/Spinner/Spinner.css.ts
1111
1139
  var import_createRuntimeFn11 = require("@vanilla-extract/recipes/createRuntimeFn");
@@ -1113,7 +1141,7 @@ var spinner = /* @__PURE__ */ (0, import_createRuntimeFn11.createRuntimeFn)({ de
1113
1141
 
1114
1142
  // src/components/Spinner/Spinner.tsx
1115
1143
  var import_jsx_runtime16 = require("react/jsx-runtime");
1116
- var Spinner = /* @__PURE__ */ (0, import_react17.forwardRef)(function Spinner2({ size, color, label: labelProp, className, ...rest }, ref) {
1144
+ var Spinner = /* @__PURE__ */ (0, import_react18.forwardRef)(function Spinner2({ size, color, label: labelProp, className, ...rest }, ref) {
1117
1145
  const m = useMessages();
1118
1146
  const label7 = labelProp ?? m.loading ?? "\uB85C\uB529 \uC911";
1119
1147
  const a11y = label7 ? { role: "status" } : { "aria-hidden": true };
@@ -1130,7 +1158,7 @@ var icon2 = "xcekdai";
1130
1158
 
1131
1159
  // src/components/Button/Button.tsx
1132
1160
  var import_jsx_runtime17 = require("react/jsx-runtime");
1133
- var Button = /* @__PURE__ */ (0, import_react18.forwardRef)(function Button2({
1161
+ var Button = /* @__PURE__ */ (0, import_react19.forwardRef)(function Button2({
1134
1162
  variant,
1135
1163
  color,
1136
1164
  size,
@@ -1138,6 +1166,8 @@ var Button = /* @__PURE__ */ (0, import_react18.forwardRef)(function Button2({
1138
1166
  startIcon,
1139
1167
  endIcon,
1140
1168
  loading: loading2,
1169
+ asChild,
1170
+ disabled,
1141
1171
  className,
1142
1172
  type = "button",
1143
1173
  onClick,
@@ -1145,36 +1175,63 @@ var Button = /* @__PURE__ */ (0, import_react18.forwardRef)(function Button2({
1145
1175
  ...rest
1146
1176
  }, ref) {
1147
1177
  const handleClick = (event) => {
1148
- if (loading2) {
1178
+ if (loading2 || disabled) {
1149
1179
  event.preventDefault();
1150
1180
  return;
1151
1181
  }
1152
1182
  onClick?.(event);
1153
1183
  };
1154
1184
  const leading = loading2 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Spinner, { size: "sm", label: "" }) : startIcon;
1155
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1185
+ const buttonClassName = cx(button({ variant, color, size, fullWidth }), className);
1186
+ const content12 = (label7) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
1187
+ leading && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: icon2, children: leading }),
1188
+ label7,
1189
+ endIcon && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: icon2, children: endIcon })
1190
+ ] });
1191
+ if (asChild) {
1192
+ const child = import_react19.Children.only(children);
1193
+ const { props } = child;
1194
+ return (0, import_react19.cloneElement)(
1195
+ child,
1196
+ {
1197
+ ...rest,
1198
+ ...props,
1199
+ className: cx(buttonClassName, props.className),
1200
+ style: { ...rest.style, ...props.style },
1201
+ // React 19 는 ref 가 props 에 있고, element.ref 를 읽으면 경고한다. 18 은 element.ref 에만 있다
1202
+ ref: mergeRefs(ref, parseInt(import_react19.version) >= 19 ? props.ref : child.ref),
1203
+ tabIndex: disabled ? -1 : props.tabIndex,
1204
+ "aria-busy": loading2 || void 0,
1205
+ "aria-disabled": loading2 || disabled || void 0,
1206
+ "data-disabled": disabled ? "" : void 0,
1207
+ onClick: (event) => {
1208
+ handleClick(event);
1209
+ if (!loading2 && !disabled) props.onClick?.(event);
1210
+ }
1211
+ },
1212
+ content12(props.children)
1213
+ );
1214
+ }
1215
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1156
1216
  "button",
1157
1217
  {
1158
1218
  ref,
1159
1219
  type,
1160
- className: cx(button({ variant, color, size, fullWidth }), className),
1220
+ disabled,
1221
+ className: buttonClassName,
1161
1222
  "aria-busy": loading2 || void 0,
1162
1223
  "aria-disabled": loading2 || void 0,
1163
1224
  onClick: handleClick,
1164
1225
  ...rest,
1165
- children: [
1166
- leading && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: icon2, children: leading }),
1167
- children,
1168
- endIcon && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: icon2, children: endIcon })
1169
- ]
1226
+ children: content12(children)
1170
1227
  }
1171
1228
  );
1172
1229
  });
1173
1230
 
1174
1231
  // src/components/Input/Input.tsx
1175
- var import_react19 = require("react");
1232
+ var import_react20 = require("react");
1176
1233
  var import_jsx_runtime18 = require("react/jsx-runtime");
1177
- var Input = /* @__PURE__ */ (0, import_react19.forwardRef)(function Input2({ size, invalid, fullWidth, startAdornment, endAdornment, rootClassName, className, disabled, ...rest }, ref) {
1234
+ var Input = /* @__PURE__ */ (0, import_react20.forwardRef)(function Input2({ size, invalid, fullWidth, startAdornment, endAdornment, rootClassName, className, disabled, ...rest }, ref) {
1178
1235
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1179
1236
  "div",
1180
1237
  {
@@ -1200,10 +1257,10 @@ var Input = /* @__PURE__ */ (0, import_react19.forwardRef)(function Input2({ siz
1200
1257
  });
1201
1258
 
1202
1259
  // src/components/Input/TextField.tsx
1203
- var import_react20 = require("react");
1260
+ var import_react21 = require("react");
1204
1261
  var import_jsx_runtime19 = require("react/jsx-runtime");
1205
- var TextField = /* @__PURE__ */ (0, import_react20.forwardRef)(function TextField2({ label: label7, helperText: helperText3, error, required, fullWidth, id, "aria-describedby": ariaDescribedBy, ...rest }, ref) {
1206
- const generatedId = (0, import_react20.useId)();
1262
+ var TextField = /* @__PURE__ */ (0, import_react21.forwardRef)(function TextField2({ label: label7, helperText: helperText3, error, required, fullWidth, id, "aria-describedby": ariaDescribedBy, ...rest }, ref) {
1263
+ const generatedId = (0, import_react21.useId)();
1207
1264
  const inputId = id ?? generatedId;
1208
1265
  const helperId = helperText3 ? `${inputId}-helper` : void 0;
1209
1266
  return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
@@ -1232,9 +1289,9 @@ var Dialog = __toESM(require("@radix-ui/react-dialog"), 1);
1232
1289
  var import_icons3 = require("@bestow-ui/icons");
1233
1290
 
1234
1291
  // src/utils/useReturnFocus.ts
1235
- var import_react21 = require("react");
1292
+ var import_react22 = require("react");
1236
1293
  function useReturnFocus(hasTrigger, onCloseAutoFocus) {
1237
- const returnTo = (0, import_react21.useRef)(null);
1294
+ const returnTo = (0, import_react22.useRef)(null);
1238
1295
  return {
1239
1296
  onOpenAutoFocus: () => {
1240
1297
  const active = document.activeElement instanceof HTMLElement ? document.activeElement : null;
@@ -1334,13 +1391,13 @@ function SearchArea({
1334
1391
  loadErrorText,
1335
1392
  loadingText
1336
1393
  }) {
1337
- const containerRef = (0, import_react22.useRef)(null);
1338
- const [status, setStatus] = (0, import_react22.useState)("loading");
1339
- const onSelectRef = (0, import_react22.useRef)(onSelect);
1340
- (0, import_react22.useEffect)(() => {
1394
+ const containerRef = (0, import_react23.useRef)(null);
1395
+ const [status, setStatus] = (0, import_react23.useState)("loading");
1396
+ const onSelectRef = (0, import_react23.useRef)(onSelect);
1397
+ (0, import_react23.useEffect)(() => {
1341
1398
  onSelectRef.current = onSelect;
1342
1399
  });
1343
- (0, import_react22.useEffect)(() => {
1400
+ (0, import_react23.useEffect)(() => {
1344
1401
  const container3 = containerRef.current;
1345
1402
  if (!container3) return;
1346
1403
  let cleanup;
@@ -1362,7 +1419,7 @@ function SearchArea({
1362
1419
  status !== "ready" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: searchStatus, role: "status", children: status === "loading" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Spinner, { label: loadingText }) : loadErrorText })
1363
1420
  ] });
1364
1421
  }
1365
- var AddressInput = /* @__PURE__ */ (0, import_react22.forwardRef)(
1422
+ var AddressInput = /* @__PURE__ */ (0, import_react23.forwardRef)(
1366
1423
  function AddressInput2(props, ref) {
1367
1424
  const {
1368
1425
  value: value4,
@@ -1385,18 +1442,22 @@ var AddressInput = /* @__PURE__ */ (0, import_react22.forwardRef)(
1385
1442
  const searchLabel = searchLabelProp ?? m.addressSearch ?? "\uC8FC\uC18C \uAC80\uC0C9";
1386
1443
  const detailPlaceholder = detailPlaceholderProp ?? m.detailAddressPlaceholder ?? "\uC0C1\uC138 \uC8FC\uC18C (\uB3D9\xB7\uD638\uC218 \uB4F1)";
1387
1444
  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.";
1388
- const baseId = (0, import_react22.useId)();
1445
+ const baseId = (0, import_react23.useId)();
1389
1446
  const helperId = helperText3 ? `${baseId}-helper` : void 0;
1390
- const detailRef = (0, import_react22.useRef)(null);
1391
- const selectedRef = (0, import_react22.useRef)(false);
1392
- const [open, setOpen] = (0, import_react22.useState)(false);
1447
+ const detailRef = (0, import_react23.useRef)(null);
1448
+ const selectedRef = (0, import_react23.useRef)(false);
1449
+ const [open, setOpen] = (0, import_react23.useState)(false);
1393
1450
  const isControlled = "value" in props;
1394
- const [innerValue, setInnerValue] = (0, import_react22.useState)(defaultValue ?? EMPTY);
1451
+ const [innerValue, setInnerValue] = (0, import_react23.useState)(defaultValue ?? EMPTY);
1395
1452
  const current2 = isControlled ? value4 ?? EMPTY : innerValue;
1396
1453
  const update = (next) => {
1397
1454
  if (!isControlled) setInnerValue(next);
1398
1455
  onValueChange?.(next);
1399
1456
  };
1457
+ const rootRef = (0, import_react23.useRef)(null);
1458
+ useFormReset(rootRef, () => {
1459
+ if (!isControlled) update(defaultValue ?? EMPTY);
1460
+ });
1400
1461
  const openSearch = () => {
1401
1462
  if (disabled) return;
1402
1463
  selectedRef.current = false;
@@ -1413,102 +1474,101 @@ var AddressInput = /* @__PURE__ */ (0, import_react22.forwardRef)(
1413
1474
  setOpen(false);
1414
1475
  };
1415
1476
  const fullAddress = `${current2.address}${current2.extraAddress ?? ""}`;
1416
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("fieldset", { ref, className: cx(fieldset, className), disabled, "aria-describedby": helperId, children: [
1417
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("legend", { className: legend, children: [
1418
- label7,
1419
- required && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: requiredMark, "aria-hidden": true, children: "*" })
1420
- ] }),
1421
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: row, children: [
1422
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1423
- TextField,
1424
- {
1425
- "aria-label": m.postalCode ?? "\uC6B0\uD3B8\uBC88\uD638",
1426
- readOnly: true,
1427
- value: current2.zonecode,
1428
- placeholder: m.postalCode ?? "\uC6B0\uD3B8\uBC88\uD638",
1429
- error: error && !current2.zonecode,
1430
- "aria-required": required || void 0,
1431
- rootClassName: zonecode,
1432
- onClick: openSearch
1433
- }
1434
- ),
1435
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Button, { variant: "outline", color: "neutral", onClick: openSearch, disabled, children: searchLabel })
1436
- ] }),
1437
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1438
- TextField,
1439
- {
1440
- "aria-label": m.baseAddress ?? "\uAE30\uBCF8 \uC8FC\uC18C",
1441
- readOnly: true,
1442
- value: fullAddress,
1443
- placeholder: m.baseAddressPlaceholder ?? `${searchLabel}\uC744 \uB20C\uB7EC \uC8FC\uC18C\uB97C \uACE0\uB974\uC138\uC694`,
1444
- error: error && !current2.address,
1445
- "aria-required": required || void 0,
1446
- fullWidth: true,
1447
- onClick: openSearch
1448
- }
1449
- ),
1450
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1451
- TextField,
1452
- {
1453
- ref: detailRef,
1454
- "aria-label": m.detailAddress ?? "\uC0C1\uC138 \uC8FC\uC18C",
1455
- value: current2.detail,
1456
- placeholder: detailPlaceholder,
1457
- onChange: (event) => update({ ...current2, detail: event.target.value }),
1458
- autoComplete: "address-line2",
1459
- fullWidth: true
1460
- }
1461
- ),
1462
- helperText3 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { id: helperId, className: helperText({ error }), children: helperText3 }),
1463
- name && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
1464
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("input", { type: "hidden", name: `${name}[zonecode]`, value: current2.zonecode }),
1465
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("input", { type: "hidden", name: `${name}[address]`, value: fullAddress }),
1466
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("input", { type: "hidden", name: `${name}[detail]`, value: current2.detail })
1467
- ] }),
1468
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1469
- Modal,
1470
- {
1471
- open,
1472
- onOpenChange: setOpen,
1473
- title: searchLabel,
1474
- description: m.addressSearchDescription ?? "\uB3C4\uB85C\uBA85, \uAC74\uBB3C\uBA85, \uC9C0\uBC88\uC73C\uB85C \uAC80\uC0C9\uD560 \uC218 \uC788\uC5B4\uC694.",
1475
- onCloseAutoFocus: (event) => {
1476
- if (selectedRef.current) {
1477
- event.preventDefault();
1478
- detailRef.current?.focus();
1477
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1478
+ "fieldset",
1479
+ {
1480
+ ref: mergeRefs(ref, rootRef),
1481
+ className: cx(fieldset, className),
1482
+ disabled,
1483
+ "aria-describedby": helperId,
1484
+ children: [
1485
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("legend", { className: legend, children: [
1486
+ label7,
1487
+ required && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: requiredMark, "aria-hidden": true, children: "*" })
1488
+ ] }),
1489
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: row, children: [
1490
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1491
+ TextField,
1492
+ {
1493
+ "aria-label": m.postalCode ?? "\uC6B0\uD3B8\uBC88\uD638",
1494
+ readOnly: true,
1495
+ value: current2.zonecode,
1496
+ placeholder: m.postalCode ?? "\uC6B0\uD3B8\uBC88\uD638",
1497
+ error: error && !current2.zonecode,
1498
+ "aria-required": required || void 0,
1499
+ rootClassName: zonecode,
1500
+ onClick: openSearch
1501
+ }
1502
+ ),
1503
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Button, { variant: "outline", color: "neutral", onClick: openSearch, disabled, children: searchLabel })
1504
+ ] }),
1505
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1506
+ TextField,
1507
+ {
1508
+ "aria-label": m.baseAddress ?? "\uAE30\uBCF8 \uC8FC\uC18C",
1509
+ readOnly: true,
1510
+ value: fullAddress,
1511
+ placeholder: m.baseAddressPlaceholder ?? `${searchLabel}\uC744 \uB20C\uB7EC \uC8FC\uC18C\uB97C \uACE0\uB974\uC138\uC694`,
1512
+ error: error && !current2.address,
1513
+ "aria-required": required || void 0,
1514
+ fullWidth: true,
1515
+ onClick: openSearch
1479
1516
  }
1480
- },
1481
- children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1482
- SearchArea,
1517
+ ),
1518
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1519
+ TextField,
1483
1520
  {
1484
- provider,
1485
- onSelect: handleSelect,
1486
- loadErrorText,
1487
- loadingText: m.addressLoading ?? "\uC8FC\uC18C \uAC80\uC0C9\uC744 \uBD88\uB7EC\uC624\uB294 \uC911"
1521
+ ref: detailRef,
1522
+ "aria-label": m.detailAddress ?? "\uC0C1\uC138 \uC8FC\uC18C",
1523
+ value: current2.detail,
1524
+ placeholder: detailPlaceholder,
1525
+ onChange: (event) => update({ ...current2, detail: event.target.value }),
1526
+ autoComplete: "address-line2",
1527
+ fullWidth: true
1528
+ }
1529
+ ),
1530
+ helperText3 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { id: helperId, className: helperText({ error }), children: helperText3 }),
1531
+ name && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
1532
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("input", { type: "hidden", name: `${name}[zonecode]`, value: current2.zonecode }),
1533
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("input", { type: "hidden", name: `${name}[address]`, value: fullAddress }),
1534
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("input", { type: "hidden", name: `${name}[detail]`, value: current2.detail })
1535
+ ] }),
1536
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1537
+ Modal,
1538
+ {
1539
+ open,
1540
+ onOpenChange: setOpen,
1541
+ title: searchLabel,
1542
+ description: m.addressSearchDescription ?? "\uB3C4\uB85C\uBA85, \uAC74\uBB3C\uBA85, \uC9C0\uBC88\uC73C\uB85C \uAC80\uC0C9\uD560 \uC218 \uC788\uC5B4\uC694.",
1543
+ onCloseAutoFocus: (event) => {
1544
+ if (selectedRef.current) {
1545
+ event.preventDefault();
1546
+ detailRef.current?.focus();
1547
+ }
1548
+ },
1549
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1550
+ SearchArea,
1551
+ {
1552
+ provider,
1553
+ onSelect: handleSelect,
1554
+ loadErrorText,
1555
+ loadingText: m.addressLoading ?? "\uC8FC\uC18C \uAC80\uC0C9\uC744 \uBD88\uB7EC\uC624\uB294 \uC911"
1556
+ }
1557
+ )
1488
1558
  }
1489
1559
  )
1490
- }
1491
- )
1492
- ] });
1560
+ ]
1561
+ }
1562
+ );
1493
1563
  }
1494
1564
  );
1495
1565
 
1496
1566
  // src/components/AgreementGroup/AgreementGroup.tsx
1497
- var import_react24 = require("react");
1567
+ var import_react25 = require("react");
1498
1568
  var import_icons4 = require("@bestow-ui/icons");
1499
1569
 
1500
1570
  // src/components/Checkbox/Checkbox.tsx
1501
- var import_react23 = require("react");
1502
-
1503
- // src/utils/mergeRefs.ts
1504
- function mergeRefs(...refs) {
1505
- return (value4) => {
1506
- for (const ref of refs) {
1507
- if (typeof ref === "function") ref(value4);
1508
- else if (ref) ref.current = value4;
1509
- }
1510
- };
1511
- }
1571
+ var import_react24 = require("react");
1512
1572
 
1513
1573
  // src/components/Checkbox/Checkbox.css.ts
1514
1574
  var import_createRuntimeFn14 = require("@vanilla-extract/recipes/createRuntimeFn");
@@ -1520,9 +1580,9 @@ var root6 = /* @__PURE__ */ (0, import_createRuntimeFn14.createRuntimeFn)({ defa
1520
1580
 
1521
1581
  // src/components/Checkbox/Checkbox.tsx
1522
1582
  var import_jsx_runtime22 = require("react/jsx-runtime");
1523
- var Checkbox = /* @__PURE__ */ (0, import_react23.forwardRef)(function Checkbox2({ label: label7, size, indeterminate = false, invalid, disabled, onChange, onCheckedChange, className, ...rest }, ref) {
1524
- const innerRef = (0, import_react23.useRef)(null);
1525
- (0, import_react23.useEffect)(() => {
1583
+ var Checkbox = /* @__PURE__ */ (0, import_react24.forwardRef)(function Checkbox2({ label: label7, size, indeterminate = false, invalid, disabled, onChange, onCheckedChange, className, ...rest }, ref) {
1584
+ const innerRef = (0, import_react24.useRef)(null);
1585
+ (0, import_react24.useEffect)(() => {
1526
1586
  if (innerRef.current) innerRef.current.indeterminate = indeterminate;
1527
1587
  }, [indeterminate]);
1528
1588
  return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", { className: cx(root6({ size }), className), "data-disabled": disabled || void 0, children: [
@@ -1573,7 +1633,7 @@ var toggle = "j3uxdc8";
1573
1633
 
1574
1634
  // src/components/AgreementGroup/AgreementGroup.tsx
1575
1635
  var import_jsx_runtime23 = require("react/jsx-runtime");
1576
- var AgreementGroup = /* @__PURE__ */ (0, import_react24.forwardRef)(
1636
+ var AgreementGroup = /* @__PURE__ */ (0, import_react25.forwardRef)(
1577
1637
  function AgreementGroup2(props, ref) {
1578
1638
  const {
1579
1639
  items: items3,
@@ -1599,12 +1659,19 @@ var AgreementGroup = /* @__PURE__ */ (0, import_react24.forwardRef)(
1599
1659
  const optionalText = optionalTextProp ?? m.optional ?? "\uC120\uD0DD";
1600
1660
  const showText = showTextProp ?? m.show ?? "\uBCF4\uAE30";
1601
1661
  const hideText = hideTextProp ?? m.hide ?? "\uC811\uAE30";
1602
- const baseId = (0, import_react24.useId)();
1662
+ const baseId = (0, import_react25.useId)();
1603
1663
  const helperId = helperText3 ? `${baseId}-helper` : void 0;
1604
1664
  const isControlled = "value" in props;
1605
- const [innerValue, setInnerValue] = (0, import_react24.useState)(defaultValue ?? []);
1665
+ const [innerValue, setInnerValue] = (0, import_react25.useState)(defaultValue ?? []);
1606
1666
  const agreed = isControlled ? value4 ?? [] : innerValue;
1607
- const [expanded, setExpanded] = (0, import_react24.useState)([]);
1667
+ const [expanded, setExpanded] = (0, import_react25.useState)([]);
1668
+ const rootRef = (0, import_react25.useRef)(null);
1669
+ useFormReset(rootRef, () => {
1670
+ if (isControlled) return;
1671
+ const next = defaultValue ?? [];
1672
+ setInnerValue(next);
1673
+ if (next.join() !== agreed.join()) onValueChange?.(next);
1674
+ });
1608
1675
  const update = (next) => {
1609
1676
  if (!isControlled) setInnerValue(next);
1610
1677
  onValueChange?.(next);
@@ -1616,7 +1683,7 @@ var AgreementGroup = /* @__PURE__ */ (0, import_react24.forwardRef)(
1616
1683
  return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
1617
1684
  "fieldset",
1618
1685
  {
1619
- ref,
1686
+ ref: mergeRefs(ref, rootRef),
1620
1687
  id,
1621
1688
  className: cx(fieldset2, className),
1622
1689
  disabled,
@@ -1686,7 +1753,7 @@ var AgreementGroup = /* @__PURE__ */ (0, import_react24.forwardRef)(
1686
1753
  );
1687
1754
 
1688
1755
  // src/components/Alert/Alert.tsx
1689
- var import_react25 = require("react");
1756
+ var import_react26 = require("react");
1690
1757
  var import_icons5 = require("@bestow-ui/icons");
1691
1758
 
1692
1759
  // src/components/Alert/Alert.css.ts
@@ -1709,7 +1776,7 @@ var defaultIcons = {
1709
1776
  danger: import_icons5.CircleAlertIcon,
1710
1777
  info: import_icons5.InfoIcon
1711
1778
  };
1712
- var Alert = /* @__PURE__ */ (0, import_react25.forwardRef)(function Alert2({
1779
+ var Alert = /* @__PURE__ */ (0, import_react26.forwardRef)(function Alert2({
1713
1780
  variant,
1714
1781
  color = "primary",
1715
1782
  title: title6,
@@ -1737,15 +1804,15 @@ var Alert = /* @__PURE__ */ (0, import_react25.forwardRef)(function Alert2({
1737
1804
  });
1738
1805
 
1739
1806
  // src/components/AmountInput/AmountInput.tsx
1740
- var import_react28 = require("react");
1807
+ var import_react29 = require("react");
1741
1808
  var import_korean_utils4 = require("@bestow-ui/korean-utils");
1742
1809
 
1743
1810
  // src/utils/useFormattedInput.ts
1744
- var import_react27 = require("react");
1811
+ var import_react28 = require("react");
1745
1812
 
1746
1813
  // src/utils/useIsomorphicLayoutEffect.ts
1747
- var import_react26 = require("react");
1748
- var useIsomorphicLayoutEffect = typeof window !== "undefined" ? import_react26.useLayoutEffect : import_react26.useEffect;
1814
+ var import_react27 = require("react");
1815
+ var useIsomorphicLayoutEffect = typeof window !== "undefined" ? import_react27.useLayoutEffect : import_react27.useEffect;
1749
1816
 
1750
1817
  // src/utils/useFormattedInput.ts
1751
1818
  function caretAfter(display, count2, isMeaningful2) {
@@ -1762,15 +1829,16 @@ function useFormattedInput({
1762
1829
  value: value4,
1763
1830
  defaultValue,
1764
1831
  onValueChange,
1765
- sanitize: sanitize4,
1832
+ sanitize: sanitize3,
1766
1833
  format: format2,
1767
1834
  isMeaningful: isMeaningful2,
1768
- inputRef
1835
+ inputRef,
1836
+ manualReset
1769
1837
  }) {
1770
- const [innerValue, setInnerValue] = (0, import_react27.useState)(() => sanitize4(defaultValue ?? ""));
1771
- const raw = isControlled ? sanitize4(value4 ?? "") : innerValue;
1838
+ const [innerValue, setInnerValue] = (0, import_react28.useState)(() => sanitize3(defaultValue ?? ""));
1839
+ const raw = isControlled ? sanitize3(value4 ?? "") : innerValue;
1772
1840
  const display = format2(raw);
1773
- const pendingCaret = (0, import_react27.useRef)(null);
1841
+ const pendingCaret = (0, import_react28.useRef)(null);
1774
1842
  useIsomorphicLayoutEffect(() => {
1775
1843
  const input6 = inputRef.current;
1776
1844
  if (pendingCaret.current === null || !input6 || document.activeElement !== input6) return;
@@ -1778,6 +1846,12 @@ function useFormattedInput({
1778
1846
  input6.setSelectionRange(position, position);
1779
1847
  pendingCaret.current = null;
1780
1848
  });
1849
+ useFormReset(inputRef, () => {
1850
+ if (isControlled || manualReset) return;
1851
+ const next = sanitize3(defaultValue ?? "");
1852
+ setInnerValue(next);
1853
+ if (next !== innerValue) onValueChange?.(next);
1854
+ });
1781
1855
  const commit = (next, caretCount) => {
1782
1856
  pendingCaret.current = caretCount;
1783
1857
  if (!isControlled) setInnerValue(next);
@@ -1785,8 +1859,8 @@ function useFormattedInput({
1785
1859
  };
1786
1860
  const onChange = (event) => {
1787
1861
  const { value: typed, selectionStart } = event.target;
1788
- const next = sanitize4(typed);
1789
- const before = sanitize4(typed.slice(0, selectionStart ?? typed.length));
1862
+ const next = sanitize3(typed);
1863
+ const before = sanitize3(typed.slice(0, selectionStart ?? typed.length));
1790
1864
  commit(next, Math.min(before.length, next.length));
1791
1865
  };
1792
1866
  const onKeyDown = (event) => {
@@ -1806,7 +1880,7 @@ function useFormattedInput({
1806
1880
  commit(raw.slice(0, index) + raw.slice(index + 1), index);
1807
1881
  }
1808
1882
  };
1809
- const setRaw = (next) => setInnerValue(sanitize4(next));
1883
+ const setRaw = (next) => setInnerValue(sanitize3(next));
1810
1884
  return { raw, display, onChange, onKeyDown, setRaw };
1811
1885
  }
1812
1886
 
@@ -1817,7 +1891,7 @@ var input3 = "_70qkav0";
1817
1891
  var import_jsx_runtime25 = require("react/jsx-runtime");
1818
1892
  var MAX_DIGITS = 15;
1819
1893
  var isDigit = (char) => /\d/.test(char);
1820
- var AmountInput = /* @__PURE__ */ (0, import_react28.forwardRef)(
1894
+ var AmountInput = /* @__PURE__ */ (0, import_react29.forwardRef)(
1821
1895
  function AmountInput2(props, ref) {
1822
1896
  const {
1823
1897
  value: value4,
@@ -1833,11 +1907,11 @@ var AmountInput = /* @__PURE__ */ (0, import_react28.forwardRef)(
1833
1907
  className,
1834
1908
  ...rest
1835
1909
  } = props;
1836
- const inputRef = (0, import_react28.useRef)(null);
1910
+ const inputRef = (0, import_react29.useRef)(null);
1837
1911
  const m = useMessages();
1838
1912
  const unit2 = unitProp ?? m.currencyUnit ?? "\uC6D0";
1839
1913
  const label7 = labelProp ?? m.amount ?? "\uAE08\uC561";
1840
- const sanitize4 = (input6) => {
1914
+ const sanitize3 = (input6) => {
1841
1915
  let digits = input6.replace(/\D/g, "").replace(/^0+(?=\d)/, "").slice(0, MAX_DIGITS);
1842
1916
  if (max !== void 0 && digits && Number(digits) > max) digits = String(Math.floor(max));
1843
1917
  return digits;
@@ -1848,7 +1922,7 @@ var AmountInput = /* @__PURE__ */ (0, import_react28.forwardRef)(
1848
1922
  value: toRaw(value4),
1849
1923
  defaultValue: toRaw(defaultValue),
1850
1924
  onValueChange: (digits) => onValueChange?.(digits === "" ? null : Number(digits)),
1851
- sanitize: sanitize4,
1925
+ sanitize: sanitize3,
1852
1926
  format: (digits) => digits === "" ? "" : Number(digits).toLocaleString("ko-KR"),
1853
1927
  isMeaningful: isDigit,
1854
1928
  inputRef
@@ -1883,7 +1957,7 @@ var AmountInput = /* @__PURE__ */ (0, import_react28.forwardRef)(
1883
1957
  // src/components/Avatar/Avatar.tsx
1884
1958
  var RadixAvatar = __toESM(require("@radix-ui/react-avatar"), 1);
1885
1959
  var import_icons6 = require("@bestow-ui/icons");
1886
- var import_react29 = require("react");
1960
+ var import_react30 = require("react");
1887
1961
 
1888
1962
  // src/components/Avatar/Avatar.css.ts
1889
1963
  var import_createRuntimeFn16 = require("@vanilla-extract/recipes/createRuntimeFn");
@@ -1898,7 +1972,7 @@ function getInitials(name) {
1898
1972
  const first = (word) => Array.from(word)[0] ?? "";
1899
1973
  return (first(a) + first(b)).toUpperCase();
1900
1974
  }
1901
- var Avatar = /* @__PURE__ */ (0, import_react29.forwardRef)(function Avatar2({ src, alt, name, fallback: fallback2, size, shape, className, ...rest }, ref) {
1975
+ var Avatar = /* @__PURE__ */ (0, import_react30.forwardRef)(function Avatar2({ src, alt, name, fallback: fallback2, size, shape, className, ...rest }, ref) {
1902
1976
  const label7 = alt ?? name;
1903
1977
  const a11y = label7 ? { role: "img", "aria-label": label7 } : { "aria-hidden": true };
1904
1978
  const initials = name ? getInitials(name) : "";
@@ -1909,12 +1983,12 @@ var Avatar = /* @__PURE__ */ (0, import_react29.forwardRef)(function Avatar2({ s
1909
1983
  });
1910
1984
 
1911
1985
  // src/components/Breadcrumb/Breadcrumb.tsx
1912
- var import_react31 = require("react");
1986
+ var import_react32 = require("react");
1913
1987
  var import_icons8 = require("@bestow-ui/icons");
1914
1988
 
1915
1989
  // src/components/Link/Link.tsx
1916
1990
  var import_react_slot = require("@radix-ui/react-slot");
1917
- var import_react30 = require("react");
1991
+ var import_react31 = require("react");
1918
1992
  var import_icons7 = require("@bestow-ui/icons");
1919
1993
 
1920
1994
  // src/components/Link/Link.css.ts
@@ -1927,7 +2001,7 @@ var import_jsx_runtime27 = (
1927
2001
  // Slot 의 props 타입은 HTMLElement 기준이라 <a> 전용 속성(target·rel 등)은 그대로 넘기도록 단언한다
1928
2002
  require("react/jsx-runtime")
1929
2003
  );
1930
- var Link = /* @__PURE__ */ (0, import_react30.forwardRef)(function Link2({
2004
+ var Link = /* @__PURE__ */ (0, import_react31.forwardRef)(function Link2({
1931
2005
  as: Component = "a",
1932
2006
  asChild,
1933
2007
  color,
@@ -1975,7 +2049,7 @@ var separator = "_18t8ztt4";
1975
2049
 
1976
2050
  // src/components/Breadcrumb/Breadcrumb.tsx
1977
2051
  var import_jsx_runtime28 = require("react/jsx-runtime");
1978
- var Breadcrumb = /* @__PURE__ */ (0, import_react31.forwardRef)(function Breadcrumb2({ items: items3, linkAs, separator: separator5, "aria-label": ariaLabelProp, className, ...rest }, ref) {
2052
+ var Breadcrumb = /* @__PURE__ */ (0, import_react32.forwardRef)(function Breadcrumb2({ items: items3, linkAs, separator: separator5, "aria-label": ariaLabelProp, className, ...rest }, ref) {
1979
2053
  const m = useMessages();
1980
2054
  const ariaLabel = ariaLabelProp ?? m.breadcrumb ?? "\uC774\uB3D9 \uACBD\uB85C";
1981
2055
  const sep = separator5 ?? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_icons8.ChevronRightIcon, { size: 14 });
@@ -1989,15 +2063,15 @@ var Breadcrumb = /* @__PURE__ */ (0, import_react31.forwardRef)(function Breadcr
1989
2063
  });
1990
2064
 
1991
2065
  // src/components/BusinessNumberInput/BusinessNumberInput.tsx
1992
- var import_react33 = require("react");
2066
+ var import_react34 = require("react");
1993
2067
  var import_korean_utils5 = require("@bestow-ui/korean-utils");
1994
2068
 
1995
2069
  // src/utils/useDelayedAnnouncement.ts
1996
- var import_react32 = require("react");
2070
+ var import_react33 = require("react");
1997
2071
  var ANNOUNCE_DELAY = 800;
1998
2072
  function useDelayedAnnouncement(message, delay = ANNOUNCE_DELAY) {
1999
- const [announced, setAnnounced] = (0, import_react32.useState)("");
2000
- (0, import_react32.useEffect)(() => {
2073
+ const [announced, setAnnounced] = (0, import_react33.useState)("");
2074
+ (0, import_react33.useEffect)(() => {
2001
2075
  const timer2 = setTimeout(() => setAnnounced(message), message ? delay : 0);
2002
2076
  return () => clearTimeout(timer2);
2003
2077
  }, [message, delay]);
@@ -2008,7 +2082,7 @@ function useDelayedAnnouncement(message, delay = ANNOUNCE_DELAY) {
2008
2082
  var import_jsx_runtime29 = require("react/jsx-runtime");
2009
2083
  var sanitize = (input6) => input6.replace(/\D/g, "").slice(0, 10);
2010
2084
  var isDigit2 = (char) => /\d/.test(char);
2011
- var BusinessNumberInput = /* @__PURE__ */ (0, import_react33.forwardRef)(
2085
+ var BusinessNumberInput = /* @__PURE__ */ (0, import_react34.forwardRef)(
2012
2086
  function BusinessNumberInput2(props, ref) {
2013
2087
  const {
2014
2088
  value: value4,
@@ -2024,12 +2098,13 @@ var BusinessNumberInput = /* @__PURE__ */ (0, import_react33.forwardRef)(
2024
2098
  onKeyDown,
2025
2099
  ...rest
2026
2100
  } = props;
2027
- const inputRef = (0, import_react33.useRef)(null);
2101
+ const inputRef = (0, import_react34.useRef)(null);
2028
2102
  const m = useMessages();
2029
2103
  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.";
2030
2104
  const label7 = labelProp ?? m.businessNumber ?? "\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638";
2031
2105
  const incompleteText = m.businessNumberIncomplete ?? "10\uC790\uB9AC\uB97C \uBAA8\uB450 \uC785\uB825\uD574 \uC8FC\uC138\uC694.";
2032
- const [touched, setTouched] = (0, import_react33.useState)(false);
2106
+ const [touched, setTouched] = (0, import_react34.useState)(false);
2107
+ useFormReset(inputRef, () => setTouched(false));
2033
2108
  const field4 = useFormattedInput({
2034
2109
  isControlled: "value" in props,
2035
2110
  value: value4,
@@ -2073,16 +2148,16 @@ var BusinessNumberInput = /* @__PURE__ */ (0, import_react33.forwardRef)(
2073
2148
  );
2074
2149
 
2075
2150
  // src/components/Calendar/Calendar.tsx
2076
- var import_react36 = require("react");
2151
+ var import_react37 = require("react");
2077
2152
  var import_icons9 = require("@bestow-ui/icons");
2078
2153
  var import_korean_utils6 = require("@bestow-ui/korean-utils");
2079
2154
 
2080
2155
  // src/utils/useIsClient.ts
2081
- var import_react34 = require("react");
2156
+ var import_react35 = require("react");
2082
2157
  var subscribeNothing = () => () => {
2083
2158
  };
2084
2159
  function useIsClient() {
2085
- return (0, import_react34.useSyncExternalStore)(
2160
+ return (0, import_react35.useSyncExternalStore)(
2086
2161
  subscribeNothing,
2087
2162
  () => true,
2088
2163
  () => false
@@ -2090,7 +2165,7 @@ function useIsClient() {
2090
2165
  }
2091
2166
 
2092
2167
  // src/components/IconButton/IconButton.tsx
2093
- var import_react35 = require("react");
2168
+ var import_react36 = require("react");
2094
2169
 
2095
2170
  // src/components/IconButton/IconButton.css.ts
2096
2171
  var import_createRuntimeFn18 = require("@vanilla-extract/recipes/createRuntimeFn");
@@ -2098,7 +2173,7 @@ var iconButton = /* @__PURE__ */ (0, import_createRuntimeFn18.createRuntimeFn)({
2098
2173
 
2099
2174
  // src/components/IconButton/IconButton.tsx
2100
2175
  var import_jsx_runtime30 = require("react/jsx-runtime");
2101
- var IconButton = /* @__PURE__ */ (0, import_react35.forwardRef)(function IconButton2({ variant = "ghost", color = "neutral", size, loading: loading2, className, children, ...rest }, ref) {
2176
+ var IconButton = /* @__PURE__ */ (0, import_react36.forwardRef)(function IconButton2({ variant = "ghost", color = "neutral", size, loading: loading2, asChild, className, children, ...rest }, ref) {
2102
2177
  return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2103
2178
  Button,
2104
2179
  {
@@ -2107,9 +2182,10 @@ var IconButton = /* @__PURE__ */ (0, import_react35.forwardRef)(function IconBut
2107
2182
  color,
2108
2183
  size,
2109
2184
  loading: loading2,
2185
+ asChild,
2110
2186
  className: cx(iconButton({ size }), className),
2111
2187
  ...rest,
2112
- children: !loading2 && children
2188
+ children: loading2 ? asChild && (0, import_react36.cloneElement)(children, void 0, null) : children
2113
2189
  }
2114
2190
  );
2115
2191
  });
@@ -2125,7 +2201,7 @@ var weekday = "_1qyq67b4";
2125
2201
 
2126
2202
  // src/components/Calendar/Calendar.tsx
2127
2203
  var import_jsx_runtime31 = require("react/jsx-runtime");
2128
- var Calendar = /* @__PURE__ */ (0, import_react36.forwardRef)(function Calendar2(props, ref) {
2204
+ var Calendar = /* @__PURE__ */ (0, import_react37.forwardRef)(function Calendar2(props, ref) {
2129
2205
  const {
2130
2206
  value: value4,
2131
2207
  defaultValue,
@@ -2145,10 +2221,10 @@ var Calendar = /* @__PURE__ */ (0, import_react36.forwardRef)(function Calendar2
2145
2221
  const nextMonthLabel = nextMonthLabelProp ?? m.nextMonth ?? "\uB2E4\uC74C \uB2EC";
2146
2222
  const weekdaysShort = m.weekdaysShort ?? import_korean_utils6.KOREAN_WEEKDAYS;
2147
2223
  const weekdaysLong = m.weekdaysLong ?? import_korean_utils6.KOREAN_WEEKDAYS.map((name) => `${name}\uC694\uC77C`);
2148
- const headingId = (0, import_react36.useId)();
2149
- const gridRef = (0, import_react36.useRef)(null);
2224
+ const headingId = (0, import_react37.useId)();
2225
+ const gridRef = (0, import_react37.useRef)(null);
2150
2226
  const isControlled = "value" in props;
2151
- const [innerValue, setInnerValue] = (0, import_react36.useState)(defaultValue ?? "");
2227
+ const [innerValue, setInnerValue] = (0, import_react37.useState)(defaultValue ?? "");
2152
2228
  const selected = parseISODate(isControlled ? value4 : innerValue);
2153
2229
  const isClient = useIsClient();
2154
2230
  const today = parseISODate(todayProp) ?? (isClient ? /* @__PURE__ */ new Date() : null);
@@ -2160,16 +2236,16 @@ var Calendar = /* @__PURE__ */ (0, import_react36.forwardRef)(function Calendar2
2160
2236
  return date;
2161
2237
  };
2162
2238
  const isDisabled = (date) => minDate !== null && compareDays(date, minDate) < 0 || maxDate !== null && compareDays(date, maxDate) > 0 || !!isDateDisabled?.(date);
2163
- const [focusedState, setFocused] = (0, import_react36.useState)(null);
2239
+ const [focusedState, setFocused] = (0, import_react37.useState)(null);
2164
2240
  const base = selected ?? today;
2165
2241
  const focused = focusedState ?? (base ? clamp(base) : null);
2166
- const moveFocus = (0, import_react36.useRef)(initialFocus ?? false);
2242
+ const moveFocus = (0, import_react37.useRef)(initialFocus ?? false);
2167
2243
  const selectedIso = selected ? toISODate(selected) : "";
2168
- (0, import_react36.useEffect)(() => {
2244
+ (0, import_react37.useEffect)(() => {
2169
2245
  const date = parseISODate(selectedIso);
2170
2246
  if (date) setFocused((prev) => isSameDay(prev, date) ? prev : date);
2171
2247
  }, [selectedIso]);
2172
- (0, import_react36.useEffect)(() => {
2248
+ (0, import_react37.useEffect)(() => {
2173
2249
  if (!moveFocus.current || !focused) return;
2174
2250
  moveFocus.current = false;
2175
2251
  gridRef.current?.querySelector(`[data-date="${toISODate(focused)}"]`)?.focus();
@@ -2272,7 +2348,7 @@ var Calendar = /* @__PURE__ */ (0, import_react36.forwardRef)(function Calendar2
2272
2348
  });
2273
2349
 
2274
2350
  // src/components/CheckboxGroup/CheckboxGroup.tsx
2275
- var import_react37 = require("react");
2351
+ var import_react38 = require("react");
2276
2352
 
2277
2353
  // src/components/CheckboxGroup/CheckboxGroup.css.ts
2278
2354
  var import_createRuntimeFn19 = require("@vanilla-extract/recipes/createRuntimeFn");
@@ -2283,7 +2359,7 @@ var option = "_1z0r6xj4";
2283
2359
 
2284
2360
  // src/components/CheckboxGroup/CheckboxGroup.tsx
2285
2361
  var import_jsx_runtime32 = require("react/jsx-runtime");
2286
- var CheckboxGroup = /* @__PURE__ */ (0, import_react37.forwardRef)(
2362
+ var CheckboxGroup = /* @__PURE__ */ (0, import_react38.forwardRef)(
2287
2363
  function CheckboxGroup2(props, ref) {
2288
2364
  const {
2289
2365
  options,
@@ -2304,12 +2380,19 @@ var CheckboxGroup = /* @__PURE__ */ (0, import_react37.forwardRef)(
2304
2380
  } = props;
2305
2381
  const m = useMessages();
2306
2382
  const isControlled = "value" in props;
2307
- const [innerValue, setInnerValue] = (0, import_react37.useState)(defaultValue ?? []);
2383
+ const [innerValue, setInnerValue] = (0, import_react38.useState)(defaultValue ?? []);
2308
2384
  const current2 = isControlled ? value4 ?? [] : innerValue;
2309
- const generatedId = (0, import_react37.useId)();
2385
+ const generatedId = (0, import_react38.useId)();
2310
2386
  const baseId = id ?? generatedId;
2311
2387
  const labelId = label7 ? `${baseId}-label` : void 0;
2312
2388
  const helperId = helperText3 ? `${baseId}-helper` : void 0;
2389
+ const rootRef = (0, import_react38.useRef)(null);
2390
+ useFormReset(rootRef, () => {
2391
+ if (isControlled) return;
2392
+ const next = defaultValue ?? [];
2393
+ setInnerValue(next);
2394
+ if (next.join() !== current2.join()) onValueChange?.(next);
2395
+ });
2313
2396
  const toggle3 = (optionValue, checked) => {
2314
2397
  const next = options.map((option3) => option3.value).filter((v) => v === optionValue ? checked : current2.includes(v));
2315
2398
  if (!isControlled) setInnerValue(next);
@@ -2331,7 +2414,7 @@ var CheckboxGroup = /* @__PURE__ */ (0, import_react37.forwardRef)(
2331
2414
  /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2332
2415
  "div",
2333
2416
  {
2334
- ref,
2417
+ ref: mergeRefs(ref, rootRef),
2335
2418
  id: baseId,
2336
2419
  role: "group",
2337
2420
  "aria-label": ariaLabel,
@@ -2369,7 +2452,7 @@ var CheckboxGroup = /* @__PURE__ */ (0, import_react37.forwardRef)(
2369
2452
 
2370
2453
  // src/components/Combobox/Combobox.tsx
2371
2454
  var Popover = __toESM(require("@radix-ui/react-popover"), 1);
2372
- var import_react38 = require("react");
2455
+ var import_react39 = require("react");
2373
2456
  var import_icons10 = require("@bestow-ui/icons");
2374
2457
 
2375
2458
  // src/components/Select/Select.css.ts
@@ -2390,7 +2473,7 @@ var toggle2 = "c2pbq71 c2pbq70";
2390
2473
  // src/components/Combobox/Combobox.tsx
2391
2474
  var import_jsx_runtime33 = require("react/jsx-runtime");
2392
2475
  var defaultFilter = (option3, query2) => option3.label.toLowerCase().includes(query2.trim().toLowerCase());
2393
- var Combobox = /* @__PURE__ */ (0, import_react38.forwardRef)(function Combobox2(props, ref) {
2476
+ var Combobox = /* @__PURE__ */ (0, import_react39.forwardRef)(function Combobox2(props, ref) {
2394
2477
  const {
2395
2478
  options,
2396
2479
  value: value4,
@@ -2418,23 +2501,23 @@ var Combobox = /* @__PURE__ */ (0, import_react38.forwardRef)(function Combobox2
2418
2501
  const emptyMessage = emptyMessageProp ?? m.noResults ?? "\uACB0\uACFC\uAC00 \uC5C6\uC5B4\uC694";
2419
2502
  const toggleLabel = toggleLabelProp ?? m.openList ?? "\uBAA9\uB85D \uC5F4\uAE30";
2420
2503
  const clearLabel = clearLabelProp ?? m.clearSelection ?? "\uC120\uD0DD \uC9C0\uC6B0\uAE30";
2421
- const generatedId = (0, import_react38.useId)();
2504
+ const generatedId = (0, import_react39.useId)();
2422
2505
  const inputId = id ?? generatedId;
2423
2506
  const labelId = `${inputId}-label`;
2424
2507
  const listId = `${inputId}-listbox`;
2425
2508
  const helperId = helperText3 ? `${inputId}-helper` : void 0;
2426
2509
  const optionId = (index) => `${inputId}-option-${index}`;
2427
2510
  const portal2 = usePortalProps();
2428
- const inputRef = (0, import_react38.useRef)(null);
2429
- const anchorRef = (0, import_react38.useRef)(null);
2511
+ const inputRef = (0, import_react39.useRef)(null);
2512
+ const anchorRef = (0, import_react39.useRef)(null);
2430
2513
  const isControlled = "value" in props;
2431
- const [innerValue, setInnerValue] = (0, import_react38.useState)(defaultValue);
2514
+ const [innerValue, setInnerValue] = (0, import_react39.useState)(defaultValue);
2432
2515
  const selectedValue = isControlled ? value4 : innerValue;
2433
2516
  const selectedOption = options.find((o) => o.value === selectedValue);
2434
- const [open, setOpen] = (0, import_react38.useState)(false);
2435
- const [query2, setQuery] = (0, import_react38.useState)(null);
2436
- const [activeIndex, setActiveIndex] = (0, import_react38.useState)(-1);
2437
- const filtered = (0, import_react38.useMemo)(() => query2 ? options.filter((o) => filter(o, query2)) : options, [options, filter, query2]);
2517
+ const [open, setOpen] = (0, import_react39.useState)(false);
2518
+ const [query2, setQuery] = (0, import_react39.useState)(null);
2519
+ const [activeIndex, setActiveIndex] = (0, import_react39.useState)(-1);
2520
+ const filtered = (0, import_react39.useMemo)(() => query2 ? options.filter((o) => filter(o, query2)) : options, [options, filter, query2]);
2438
2521
  const inputText = query2 ?? selectedOption?.label ?? "";
2439
2522
  const firstEnabled = (list7, from = 0, step2 = 1) => {
2440
2523
  for (let i = from; i >= 0 && i < list7.length; i += step2) if (!list7[i].disabled) return i;
@@ -2452,6 +2535,12 @@ var Combobox = /* @__PURE__ */ (0, import_react38.forwardRef)(function Combobox2
2452
2535
  setQuery(null);
2453
2536
  setActiveIndex(-1);
2454
2537
  };
2538
+ useFormReset(inputRef, () => {
2539
+ reset();
2540
+ if (isControlled) return;
2541
+ setInnerValue(defaultValue);
2542
+ if (defaultValue !== selectedValue) onValueChange?.(defaultValue ?? "");
2543
+ });
2455
2544
  const clearSelection = () => {
2456
2545
  if (!isControlled) setInnerValue(void 0);
2457
2546
  if (selectedValue) onValueChange?.("");
@@ -2479,6 +2568,7 @@ var Combobox = /* @__PURE__ */ (0, import_react38.forwardRef)(function Combobox2
2479
2568
  setActiveIndex(nextQuery ? firstEnabled(nextList) : -1);
2480
2569
  };
2481
2570
  const handleKeyDown = (event) => {
2571
+ if (event.nativeEvent.isComposing || event.keyCode === 229) return;
2482
2572
  switch (event.key) {
2483
2573
  case "ArrowDown":
2484
2574
  event.preventDefault();
@@ -2509,14 +2599,14 @@ var Combobox = /* @__PURE__ */ (0, import_react38.forwardRef)(function Combobox2
2509
2599
  break;
2510
2600
  }
2511
2601
  };
2512
- (0, import_react38.useEffect)(() => {
2602
+ (0, import_react39.useEffect)(() => {
2513
2603
  if (!open || activeIndex < 0) return;
2514
2604
  document.getElementById(optionId(activeIndex))?.scrollIntoView?.({ block: "nearest" });
2515
2605
  }, [open, activeIndex]);
2516
2606
  const hasOptions = filtered.length > 0;
2517
2607
  const noResults = open && !disabled && !hasOptions;
2518
- const [announcedFor, setAnnouncedFor] = (0, import_react38.useState)(void 0);
2519
- (0, import_react38.useEffect)(() => {
2608
+ const [announcedFor, setAnnouncedFor] = (0, import_react39.useState)(void 0);
2609
+ (0, import_react39.useEffect)(() => {
2520
2610
  if (!noResults) return;
2521
2611
  const timer2 = setTimeout(() => setAnnouncedFor(query2), ANNOUNCE_DELAY);
2522
2612
  return () => clearTimeout(timer2);
@@ -2665,13 +2755,13 @@ var Combobox = /* @__PURE__ */ (0, import_react38.forwardRef)(function Combobox2
2665
2755
  });
2666
2756
 
2667
2757
  // src/components/DatePicker/DatePicker.tsx
2668
- var import_react40 = require("react");
2758
+ var import_react41 = require("react");
2669
2759
  var import_icons12 = require("@bestow-ui/icons");
2670
2760
 
2671
2761
  // src/components/Popover/Popover.tsx
2672
2762
  var RadixPopover = __toESM(require("@radix-ui/react-popover"), 1);
2673
2763
  var import_icons11 = require("@bestow-ui/icons");
2674
- var import_react39 = require("react");
2764
+ var import_react40 = require("react");
2675
2765
 
2676
2766
  // src/components/Popover/Popover.css.ts
2677
2767
  var arrow = "_1j99p8x4";
@@ -2701,7 +2791,7 @@ function Popover2({
2701
2791
  }) {
2702
2792
  const portal2 = usePortalProps();
2703
2793
  const m = useMessages();
2704
- const titleId = (0, import_react39.useId)();
2794
+ const titleId = (0, import_react40.useId)();
2705
2795
  return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(RadixPopover.Root, { open, defaultOpen, onOpenChange, modal, children: [
2706
2796
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(RadixPopover.Trigger, { asChild: true, children }),
2707
2797
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(RadixPopover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
@@ -2735,7 +2825,7 @@ var import_jsx_runtime35 = require("react/jsx-runtime");
2735
2825
  var sanitize2 = (input6) => input6.replace(/\D/g, "").slice(0, 8);
2736
2826
  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)}`;
2737
2827
  var isDigit3 = (char) => /\d/.test(char);
2738
- var DatePicker = /* @__PURE__ */ (0, import_react40.forwardRef)(
2828
+ var DatePicker = /* @__PURE__ */ (0, import_react41.forwardRef)(
2739
2829
  function DatePicker2(props, ref) {
2740
2830
  const {
2741
2831
  value: value4,
@@ -2761,17 +2851,17 @@ var DatePicker = /* @__PURE__ */ (0, import_react40.forwardRef)(
2761
2851
  id,
2762
2852
  className
2763
2853
  } = props;
2764
- const inputRef = (0, import_react40.useRef)(null);
2854
+ const inputRef = (0, import_react41.useRef)(null);
2765
2855
  const m = useMessages();
2766
2856
  const label7 = labelProp ?? m.date ?? "\uB0A0\uC9DC";
2767
2857
  const calendarLabel = calendarLabelProp ?? m.openCalendar ?? "\uB2EC\uB825 \uC5F4\uAE30";
2768
2858
  const invalidText = invalidTextProp ?? m.dateInvalid ?? "\uC62C\uBC14\uB978 \uB0A0\uC9DC\uAC00 \uC544\uB2C8\uC5D0\uC694.";
2769
2859
  const unavailableText = unavailableTextProp ?? m.dateUnavailable ?? "\uACE0\uB97C \uC218 \uC5C6\uB294 \uB0A0\uC9DC\uC608\uC694.";
2770
2860
  const incompleteText = incompleteTextProp ?? m.dateIncomplete ?? "\uB0A0\uC9DC\uB97C YYYY-MM-DD \uD615\uC2DD\uC73C\uB85C \uC785\uB825\uD574 \uC8FC\uC138\uC694.";
2771
- const [open, setOpen] = (0, import_react40.useState)(false);
2772
- const [touched, setTouched] = (0, import_react40.useState)(false);
2861
+ const [open, setOpen] = (0, import_react41.useState)(false);
2862
+ const [touched, setTouched] = (0, import_react41.useState)(false);
2773
2863
  const isControlled = "value" in props;
2774
- const lastEmitted = (0, import_react40.useRef)(isControlled ? value4 ?? "" : defaultValue ?? "");
2864
+ const lastEmitted = (0, import_react41.useRef)(isControlled ? value4 ?? "" : defaultValue ?? "");
2775
2865
  const minDate = parseISODate(min);
2776
2866
  const maxDate = parseISODate(max);
2777
2867
  const toIso = (digits) => digits.length === 8 ? `${digits.slice(0, 4)}-${digits.slice(4, 6)}-${digits.slice(6)}` : "";
@@ -2792,11 +2882,12 @@ var DatePicker = /* @__PURE__ */ (0, import_react40.forwardRef)(
2792
2882
  sanitize: sanitize2,
2793
2883
  format,
2794
2884
  isMeaningful: isDigit3,
2795
- inputRef
2885
+ inputRef,
2886
+ manualReset: true
2796
2887
  });
2797
2888
  const textIso = toIso(field4.raw);
2798
2889
  const { setRaw } = field4;
2799
- (0, import_react40.useEffect)(() => {
2890
+ (0, import_react41.useEffect)(() => {
2800
2891
  if (!isControlled) return;
2801
2892
  const next = value4 ?? "";
2802
2893
  lastEmitted.current = next;
@@ -2806,6 +2897,12 @@ var DatePicker = /* @__PURE__ */ (0, import_react40.forwardRef)(
2806
2897
  if (next === "" && !textIsValid) return;
2807
2898
  setRaw(next.replace(/\D/g, ""));
2808
2899
  }, [value4]);
2900
+ useFormReset(inputRef, () => {
2901
+ setTouched(false);
2902
+ const next = (isControlled ? value4 : defaultValue) ?? "";
2903
+ setRaw(next.replace(/\D/g, ""));
2904
+ if (!isControlled) emit(next);
2905
+ });
2809
2906
  const date = parseISODate(textIso);
2810
2907
  const complete = field4.raw.length === 8;
2811
2908
  const autoError = complete ? !date ? invalidText : isUnavailable(date) ? unavailableText : null : touched && field4.raw.length > 0 ? incompleteText : null;
@@ -2870,7 +2967,7 @@ var DatePicker = /* @__PURE__ */ (0, import_react40.forwardRef)(
2870
2967
  );
2871
2968
 
2872
2969
  // src/components/DateRangePicker/DateRangePicker.tsx
2873
- var import_react41 = require("react");
2970
+ var import_react42 = require("react");
2874
2971
 
2875
2972
  // src/components/DateRangePicker/DateRangePicker.css.ts
2876
2973
  var field2 = "_17277dh3";
@@ -2882,7 +2979,7 @@ var separator2 = "_17277dh4";
2882
2979
 
2883
2980
  // src/components/DateRangePicker/DateRangePicker.tsx
2884
2981
  var import_jsx_runtime36 = require("react/jsx-runtime");
2885
- var DateRangePicker = /* @__PURE__ */ (0, import_react41.forwardRef)(
2982
+ var DateRangePicker = /* @__PURE__ */ (0, import_react42.forwardRef)(
2886
2983
  function DateRangePicker2(props, ref) {
2887
2984
  const {
2888
2985
  value: value4,
@@ -2907,18 +3004,22 @@ var DateRangePicker = /* @__PURE__ */ (0, import_react41.forwardRef)(
2907
3004
  className
2908
3005
  } = props;
2909
3006
  const m = useMessages();
2910
- const generatedId = (0, import_react41.useId)();
3007
+ const generatedId = (0, import_react42.useId)();
2911
3008
  const baseId = id ?? generatedId;
2912
3009
  const helperId = helperText3 ? `${baseId}-helper` : void 0;
2913
3010
  const isClient = useIsClient();
2914
3011
  const isControlled = "value" in props;
2915
- const [inner, setInner] = (0, import_react41.useState)(defaultValue ?? { start: "", end: "" });
3012
+ const [inner, setInner] = (0, import_react42.useState)(defaultValue ?? { start: "", end: "" });
2916
3013
  const range3 = isControlled ? value4 ?? { start: "", end: "" } : inner;
2917
3014
  const update = (next) => {
2918
3015
  if (next.start === range3.start && next.end === range3.end) return;
2919
3016
  if (!isControlled) setInner(next);
2920
3017
  onValueChange?.(next);
2921
3018
  };
3019
+ const rootRef = (0, import_react42.useRef)(null);
3020
+ useFormReset(rootRef, () => {
3021
+ if (!isControlled) update(defaultValue ?? { start: "", end: "" });
3022
+ });
2922
3023
  const todayIso = () => today ?? toISODate(/* @__PURE__ */ new Date());
2923
3024
  const startLabel = startLabelProp ?? m.dateRangeStart ?? "\uC2DC\uC791\uC77C";
2924
3025
  const endLabel = endLabelProp ?? m.dateRangeEnd ?? "\uC885\uB8CC\uC77C";
@@ -2926,7 +3027,7 @@ var DateRangePicker = /* @__PURE__ */ (0, import_react41.forwardRef)(
2926
3027
  return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
2927
3028
  "fieldset",
2928
3029
  {
2929
- ref,
3030
+ ref: mergeRefs(ref, rootRef),
2930
3031
  id,
2931
3032
  className: cx(fieldset3, className),
2932
3033
  "aria-describedby": helperId,
@@ -3061,7 +3162,7 @@ function Drawer({
3061
3162
  var DrawerClose = Dialog2.Close;
3062
3163
 
3063
3164
  // src/components/ErrorSummary/ErrorSummary.tsx
3064
- var import_react42 = require("react");
3165
+ var import_react43 = require("react");
3065
3166
 
3066
3167
  // src/components/ErrorSummary/ErrorSummary.css.ts
3067
3168
  var link3 = "_1cdophv2";
@@ -3070,12 +3171,12 @@ var root9 = "_1cdophv0";
3070
3171
 
3071
3172
  // src/components/ErrorSummary/ErrorSummary.tsx
3072
3173
  var import_jsx_runtime38 = require("react/jsx-runtime");
3073
- var ErrorSummary = /* @__PURE__ */ (0, import_react42.forwardRef)(function ErrorSummary2({ errors: errors2, title: title6, focusKey, className, ...rest }, ref) {
3174
+ var ErrorSummary = /* @__PURE__ */ (0, import_react43.forwardRef)(function ErrorSummary2({ errors: errors2, title: title6, focusKey, className, ...rest }, ref) {
3074
3175
  const m = useMessages();
3075
- const titleId = (0, import_react42.useId)();
3076
- const rootRef = (0, import_react42.useRef)(null);
3176
+ const titleId = (0, import_react43.useId)();
3177
+ const rootRef = (0, import_react43.useRef)(null);
3077
3178
  const hasErrors = errors2.length > 0;
3078
- (0, import_react42.useEffect)(() => {
3179
+ (0, import_react43.useEffect)(() => {
3079
3180
  if (hasErrors) rootRef.current?.focus();
3080
3181
  }, [focusKey, hasErrors]);
3081
3182
  if (!hasErrors) return null;
@@ -3110,9 +3211,20 @@ var ErrorSummary = /* @__PURE__ */ (0, import_react42.forwardRef)(function Error
3110
3211
  });
3111
3212
 
3112
3213
  // src/components/FileUpload/FileUpload.tsx
3113
- var import_react43 = require("react");
3214
+ var import_react45 = require("react");
3114
3215
  var import_icons14 = require("@bestow-ui/icons");
3115
3216
 
3217
+ // src/utils/useFieldsetDisabled.ts
3218
+ var import_react44 = require("react");
3219
+ var noSubscribe = () => () => void 0;
3220
+ function useFieldsetDisabled(ref) {
3221
+ return (0, import_react44.useSyncExternalStore)(
3222
+ noSubscribe,
3223
+ () => !!ref.current?.matches("fieldset:disabled *"),
3224
+ () => false
3225
+ );
3226
+ }
3227
+
3116
3228
  // src/components/FileUpload/FileUpload.css.ts
3117
3229
  var dropHint = "r2jefr3";
3118
3230
  var dropIcon = "r2jefr2";
@@ -3143,7 +3255,7 @@ function matchesAccept(file, accept) {
3143
3255
  }
3144
3256
  var NO_FILES = [];
3145
3257
  var sameFile = (a, b) => a.name === b.name && a.size === b.size && a.lastModified === b.lastModified;
3146
- var FileUpload = /* @__PURE__ */ (0, import_react43.forwardRef)(function FileUpload2(props, ref) {
3258
+ var FileUpload = /* @__PURE__ */ (0, import_react45.forwardRef)(function FileUpload2(props, ref) {
3147
3259
  const {
3148
3260
  value: value4,
3149
3261
  defaultValue,
@@ -3157,29 +3269,32 @@ var FileUpload = /* @__PURE__ */ (0, import_react43.forwardRef)(function FileUpl
3157
3269
  helperText: helperText3,
3158
3270
  error,
3159
3271
  required,
3160
- disabled,
3272
+ disabled: disabledProp,
3161
3273
  name,
3162
3274
  id,
3163
3275
  className
3164
3276
  } = props;
3165
3277
  const m = useMessages();
3278
+ const rootRef = (0, import_react45.useRef)(null);
3279
+ const fieldsetDisabled = useFieldsetDisabled(rootRef);
3280
+ const disabled = disabledProp || fieldsetDisabled;
3166
3281
  const isControlled = "value" in props;
3167
- const [innerFiles, setInnerFiles] = (0, import_react43.useState)(defaultValue ?? []);
3282
+ const [innerFiles, setInnerFiles] = (0, import_react45.useState)(defaultValue ?? []);
3168
3283
  const files = isControlled ? value4 ?? NO_FILES : innerFiles;
3169
- const [rejections, setRejections] = (0, import_react43.useState)([]);
3170
- const [announcement, setAnnouncement] = (0, import_react43.useState)("");
3171
- const [dragging, setDragging] = (0, import_react43.useState)(false);
3172
- const generatedId = (0, import_react43.useId)();
3284
+ const [rejections, setRejections] = (0, import_react45.useState)([]);
3285
+ const [announcement, setAnnouncement] = (0, import_react45.useState)("");
3286
+ const [dragging, setDragging] = (0, import_react45.useState)(false);
3287
+ const generatedId = (0, import_react45.useId)();
3173
3288
  const baseId = id ?? generatedId;
3174
3289
  const labelId = label7 ? `${baseId}-label` : void 0;
3175
3290
  const helperId = helperText3 ? `${baseId}-helper` : void 0;
3176
3291
  const errorsId = rejections.length > 0 ? `${baseId}-errors` : void 0;
3177
- const inputRef = (0, import_react43.useRef)(null);
3178
- const selectButtonRef = (0, import_react43.useRef)(null);
3179
- const removeButtonRefs = (0, import_react43.useRef)([]);
3180
- const focusAfterRemove = (0, import_react43.useRef)(null);
3181
- const announceTimer = (0, import_react43.useRef)(void 0);
3182
- (0, import_react43.useEffect)(() => () => clearTimeout(announceTimer.current), []);
3292
+ const inputRef = (0, import_react45.useRef)(null);
3293
+ const selectButtonRef = (0, import_react45.useRef)(null);
3294
+ const removeButtonRefs = (0, import_react45.useRef)([]);
3295
+ const focusAfterRemove = (0, import_react45.useRef)(null);
3296
+ const announceTimer = (0, import_react45.useRef)(void 0);
3297
+ (0, import_react45.useEffect)(() => () => clearTimeout(announceTimer.current), []);
3183
3298
  const selectLabel = m.fileSelect ?? "\uD30C\uC77C \uC120\uD0DD";
3184
3299
  const reasonText = (rejection) => {
3185
3300
  const fileName2 = rejection.file.name;
@@ -3227,13 +3342,13 @@ var FileUpload = /* @__PURE__ */ (0, import_react43.forwardRef)(function FileUpl
3227
3342
  setRejections([]);
3228
3343
  commit(next, m.fileRemoved?.(removed.name) ?? `${removed.name} \uC0AD\uC81C\uB428`, REMOVED_ANNOUNCE_DELAY);
3229
3344
  };
3230
- (0, import_react43.useEffect)(() => {
3345
+ (0, import_react45.useEffect)(() => {
3231
3346
  if (focusAfterRemove.current === null) return;
3232
3347
  const target = focusAfterRemove.current;
3233
3348
  focusAfterRemove.current = null;
3234
3349
  (target >= 0 ? removeButtonRefs.current[target] : selectButtonRef.current)?.focus();
3235
3350
  }, [files]);
3236
- (0, import_react43.useEffect)(() => {
3351
+ (0, import_react45.useEffect)(() => {
3237
3352
  const input6 = inputRef.current;
3238
3353
  if (!name || !input6 || typeof DataTransfer === "undefined") return;
3239
3354
  try {
@@ -3243,12 +3358,20 @@ var FileUpload = /* @__PURE__ */ (0, import_react43.forwardRef)(function FileUpl
3243
3358
  } catch {
3244
3359
  }
3245
3360
  }, [files, name]);
3361
+ useFormReset(rootRef, () => {
3362
+ setRejections([]);
3363
+ announce("");
3364
+ if (isControlled) return;
3365
+ const next = defaultValue ?? [];
3366
+ setInnerFiles(next);
3367
+ if (next.length !== files.length) onValueChange?.(next);
3368
+ });
3246
3369
  const onDrag = (event, over) => {
3247
3370
  if (disabled) return;
3248
3371
  event.preventDefault();
3249
3372
  setDragging(over);
3250
3373
  };
3251
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { ref, className: cx(field, root10, className), children: [
3374
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { ref: mergeRefs(ref, rootRef), className: cx(field, root10, className), children: [
3252
3375
  label7 && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { id: labelId, className: label, children: [
3253
3376
  label7,
3254
3377
  required && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: requiredMark, "aria-hidden": true, children: "*" })
@@ -3339,7 +3462,7 @@ var FileUpload = /* @__PURE__ */ (0, import_react43.forwardRef)(function FileUpl
3339
3462
  // src/components/DropdownMenu/DropdownMenu.tsx
3340
3463
  var RadixMenu = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
3341
3464
  var import_icons15 = require("@bestow-ui/icons");
3342
- var import_react44 = require("react");
3465
+ var import_react46 = require("react");
3343
3466
 
3344
3467
  // src/components/DropdownMenu/DropdownMenu.css.ts
3345
3468
  var content9 = "_1d7ahux0";
@@ -3360,7 +3483,7 @@ var import_jsx_runtime40 = require("react/jsx-runtime");
3360
3483
  var DropdownMenu = RadixMenu.Root;
3361
3484
  var DropdownMenuTrigger = RadixMenu.Trigger;
3362
3485
  var DropdownMenuGroup = RadixMenu.Group;
3363
- var DropdownMenuContent = /* @__PURE__ */ (0, import_react44.forwardRef)(
3486
+ var DropdownMenuContent = /* @__PURE__ */ (0, import_react46.forwardRef)(
3364
3487
  function DropdownMenuContent2({ className, style, side = "bottom", align = "start", sideOffset = 4, collisionPadding = 8, ...rest }, ref) {
3365
3488
  const portal2 = usePortalProps();
3366
3489
  return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(RadixMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
@@ -3378,7 +3501,7 @@ var DropdownMenuContent = /* @__PURE__ */ (0, import_react44.forwardRef)(
3378
3501
  ) });
3379
3502
  }
3380
3503
  );
3381
- var DropdownMenuItem = /* @__PURE__ */ (0, import_react44.forwardRef)(
3504
+ var DropdownMenuItem = /* @__PURE__ */ (0, import_react46.forwardRef)(
3382
3505
  function DropdownMenuItem2({ icon: icon8, shortcut: shortcut2, color = "neutral", className, children, ...rest }, ref) {
3383
3506
  return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(RadixMenu.Item, { ref, className: cx(item7, color === "danger" && danger, className), ...rest, children: [
3384
3507
  icon8 && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: icon5, "aria-hidden": true, children: icon8 }),
@@ -3387,17 +3510,17 @@ var DropdownMenuItem = /* @__PURE__ */ (0, import_react44.forwardRef)(
3387
3510
  ] });
3388
3511
  }
3389
3512
  );
3390
- var DropdownMenuLabel = /* @__PURE__ */ (0, import_react44.forwardRef)(
3513
+ var DropdownMenuLabel = /* @__PURE__ */ (0, import_react46.forwardRef)(
3391
3514
  function DropdownMenuLabel2({ className, ...rest }, ref) {
3392
3515
  return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(RadixMenu.Label, { ref, className: cx(label3, className), ...rest });
3393
3516
  }
3394
3517
  );
3395
- var DropdownMenuSeparator = /* @__PURE__ */ (0, import_react44.forwardRef)(
3518
+ var DropdownMenuSeparator = /* @__PURE__ */ (0, import_react46.forwardRef)(
3396
3519
  function DropdownMenuSeparator2({ className, ...rest }, ref) {
3397
3520
  return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(RadixMenu.Separator, { ref, className: cx(separator3, className), ...rest });
3398
3521
  }
3399
3522
  );
3400
- var DropdownMenuCheckboxItem = /* @__PURE__ */ (0, import_react44.forwardRef)(
3523
+ var DropdownMenuCheckboxItem = /* @__PURE__ */ (0, import_react46.forwardRef)(
3401
3524
  function DropdownMenuCheckboxItem2({ className, children, ...rest }, ref) {
3402
3525
  return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(RadixMenu.CheckboxItem, { ref, className: cx(item7, className), ...rest, children: [
3403
3526
  /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: indicator2, "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(RadixMenu.ItemIndicator, { className: indicatorInner, children: rest.checked === "indeterminate" ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons15.MinusIcon, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons15.CheckIcon, { size: 16 }) }) }),
@@ -3406,7 +3529,7 @@ var DropdownMenuCheckboxItem = /* @__PURE__ */ (0, import_react44.forwardRef)(
3406
3529
  }
3407
3530
  );
3408
3531
  var DropdownMenuRadioGroup = RadixMenu.RadioGroup;
3409
- var DropdownMenuRadioItem = /* @__PURE__ */ (0, import_react44.forwardRef)(
3532
+ var DropdownMenuRadioItem = /* @__PURE__ */ (0, import_react46.forwardRef)(
3410
3533
  function DropdownMenuRadioItem2({ className, children, ...rest }, ref) {
3411
3534
  return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(RadixMenu.RadioItem, { ref, className: cx(item7, className), ...rest, children: [
3412
3535
  /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: indicator2, "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(RadixMenu.ItemIndicator, { className: indicatorInner, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: radioDot }) }) }),
@@ -3415,7 +3538,7 @@ var DropdownMenuRadioItem = /* @__PURE__ */ (0, import_react44.forwardRef)(
3415
3538
  }
3416
3539
  );
3417
3540
  var DropdownMenuSub = RadixMenu.Sub;
3418
- var DropdownMenuSubTrigger = /* @__PURE__ */ (0, import_react44.forwardRef)(
3541
+ var DropdownMenuSubTrigger = /* @__PURE__ */ (0, import_react46.forwardRef)(
3419
3542
  function DropdownMenuSubTrigger2({ icon: icon8, className, children, ...rest }, ref) {
3420
3543
  return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(RadixMenu.SubTrigger, { ref, className: cx(item7, subTrigger, className), ...rest, children: [
3421
3544
  icon8 && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: icon5, "aria-hidden": true, children: icon8 }),
@@ -3424,7 +3547,7 @@ var DropdownMenuSubTrigger = /* @__PURE__ */ (0, import_react44.forwardRef)(
3424
3547
  ] });
3425
3548
  }
3426
3549
  );
3427
- var DropdownMenuSubContent = /* @__PURE__ */ (0, import_react44.forwardRef)(
3550
+ var DropdownMenuSubContent = /* @__PURE__ */ (0, import_react46.forwardRef)(
3428
3551
  function DropdownMenuSubContent2({ className, style, sideOffset = 4, alignOffset = -5, collisionPadding = 8, ...rest }, ref) {
3429
3552
  const portal2 = usePortalProps();
3430
3553
  return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(RadixMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
@@ -3443,7 +3566,7 @@ var DropdownMenuSubContent = /* @__PURE__ */ (0, import_react44.forwardRef)(
3443
3566
  );
3444
3567
 
3445
3568
  // src/components/NumberInput/NumberInput.tsx
3446
- var import_react45 = require("react");
3569
+ var import_react47 = require("react");
3447
3570
  var import_icons16 = require("@bestow-ui/icons");
3448
3571
 
3449
3572
  // src/components/NumberInput/NumberInput.css.ts
@@ -3459,7 +3582,7 @@ var MAX_DIGITS2 = 15;
3459
3582
  var isMeaningful = (char) => /[\d.-]/.test(char);
3460
3583
  var decimalsOf = (n) => Number.isFinite(n) ? String(n).split(".")[1]?.length ?? 0 : 0;
3461
3584
  var parse = (raw) => /\d/.test(raw) ? Number(raw) : null;
3462
- var NumberInput = /* @__PURE__ */ (0, import_react45.forwardRef)(
3585
+ var NumberInput = /* @__PURE__ */ (0, import_react47.forwardRef)(
3463
3586
  function NumberInput2(props, ref) {
3464
3587
  const {
3465
3588
  value: value4,
@@ -3485,15 +3608,15 @@ var NumberInput = /* @__PURE__ */ (0, import_react45.forwardRef)(
3485
3608
  } = props;
3486
3609
  const isControlled = "value" in props;
3487
3610
  const m = useMessages();
3488
- const inputRef = (0, import_react45.useRef)(null);
3489
- const generatedId = (0, import_react45.useId)();
3611
+ const inputRef = (0, import_react47.useRef)(null);
3612
+ const generatedId = (0, import_react47.useId)();
3490
3613
  const inputId = id ?? generatedId;
3491
3614
  const precision = Math.max(0, precisionProp ?? decimalsOf(step2));
3492
3615
  const allowNegative = min === void 0 || min < 0;
3493
3616
  const round = (n) => Number(n.toFixed(precision));
3494
3617
  const clamp = (n) => Math.min(max ?? Infinity, Math.max(min ?? -Infinity, round(n)));
3495
3618
  const toRaw = (n) => n === null || n === void 0 || !Number.isFinite(n) ? "" : String(round(n));
3496
- const sanitize4 = (input6) => {
3619
+ const sanitize3 = (input6) => {
3497
3620
  const negative = allowNegative && input6.trimStart().startsWith("-");
3498
3621
  const [intPart = "", ...fracParts] = input6.replace(/[^\d.]/g, "").split(".");
3499
3622
  const int = intPart.replace(/^0+(?=\d)/, "").slice(0, MAX_DIGITS2);
@@ -3506,7 +3629,7 @@ var NumberInput = /* @__PURE__ */ (0, import_react45.forwardRef)(
3506
3629
  const [, sign = "", int = "", rest2 = ""] = raw.match(/^(-?)(\d*)(.*)$/) ?? [];
3507
3630
  return `${sign}${int ? Number(int).toLocaleString("ko-KR") : ""}${rest2}`;
3508
3631
  };
3509
- const lastEmitted = (0, import_react45.useRef)(parse(toRaw(isControlled ? value4 : defaultValue)));
3632
+ const lastEmitted = (0, import_react47.useRef)(parse(toRaw(isControlled ? value4 : defaultValue)));
3510
3633
  const emit = (next) => {
3511
3634
  if (next === lastEmitted.current) return;
3512
3635
  lastEmitted.current = next;
@@ -3517,21 +3640,27 @@ var NumberInput = /* @__PURE__ */ (0, import_react45.forwardRef)(
3517
3640
  value: void 0,
3518
3641
  defaultValue: toRaw(isControlled ? value4 : defaultValue),
3519
3642
  onValueChange: (raw) => emit(parse(raw)),
3520
- sanitize: sanitize4,
3643
+ sanitize: sanitize3,
3521
3644
  format: format2,
3522
3645
  isMeaningful,
3523
- inputRef
3646
+ inputRef,
3647
+ manualReset: true
3524
3648
  });
3525
3649
  const { setRaw } = field4;
3526
- (0, import_react45.useEffect)(() => {
3650
+ (0, import_react47.useEffect)(() => {
3527
3651
  if (!isControlled) return;
3528
3652
  const next = value4 ?? null;
3529
3653
  lastEmitted.current = next;
3530
3654
  if (parse(field4.raw) !== next) setRaw(toRaw(next));
3531
3655
  }, [value4]);
3656
+ useFormReset(inputRef, () => {
3657
+ const next = toRaw(isControlled ? value4 : defaultValue);
3658
+ setRaw(next);
3659
+ if (!isControlled) emit(parse(next));
3660
+ });
3532
3661
  const current2 = parse(field4.raw);
3533
3662
  const valueText = (n) => `${format2(toRaw(n))}${unit2 ?? ""}`;
3534
- const [announcement, setAnnouncement] = (0, import_react45.useState)("");
3663
+ const [announcement, setAnnouncement] = (0, import_react47.useState)("");
3535
3664
  const setValue = (next, announce = true) => {
3536
3665
  setRaw(toRaw(next));
3537
3666
  emit(next);
@@ -3624,7 +3753,7 @@ var NumberInput = /* @__PURE__ */ (0, import_react45.forwardRef)(
3624
3753
 
3625
3754
  // src/components/Pagination/Pagination.tsx
3626
3755
  var import_icons17 = require("@bestow-ui/icons");
3627
- var import_react46 = require("react");
3756
+ var import_react48 = require("react");
3628
3757
 
3629
3758
  // src/components/Pagination/getPaginationItems.ts
3630
3759
  var range = (start, end2) => end2 < start ? [] : Array.from({ length: end2 - start + 1 }, (_, i) => start + i);
@@ -3658,7 +3787,7 @@ var list5 = "_1iraoak0";
3658
3787
 
3659
3788
  // src/components/Pagination/Pagination.tsx
3660
3789
  var import_jsx_runtime42 = require("react/jsx-runtime");
3661
- var Pagination = /* @__PURE__ */ (0, import_react46.forwardRef)(function Pagination2({
3790
+ var Pagination = /* @__PURE__ */ (0, import_react48.forwardRef)(function Pagination2({
3662
3791
  totalPages,
3663
3792
  page: pageProp,
3664
3793
  defaultPage = 1,
@@ -3671,7 +3800,7 @@ var Pagination = /* @__PURE__ */ (0, import_react46.forwardRef)(function Paginat
3671
3800
  "aria-label": ariaLabelProp,
3672
3801
  ...rest
3673
3802
  }, ref) {
3674
- const [uncontrolledPage, setUncontrolledPage] = (0, import_react46.useState)(defaultPage);
3803
+ const [uncontrolledPage, setUncontrolledPage] = (0, import_react48.useState)(defaultPage);
3675
3804
  const m = useMessages();
3676
3805
  const ariaLabel = ariaLabelProp ?? m.pagination ?? "\uD398\uC774\uC9C0 \uD0D0\uC0C9";
3677
3806
  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`);
@@ -3723,15 +3852,11 @@ var Pagination = /* @__PURE__ */ (0, import_react46.forwardRef)(function Paginat
3723
3852
  });
3724
3853
 
3725
3854
  // src/components/PhoneNumberInput/PhoneNumberInput.tsx
3726
- var import_react47 = require("react");
3855
+ var import_react49 = require("react");
3727
3856
  var import_korean_utils7 = require("@bestow-ui/korean-utils");
3728
3857
  var import_jsx_runtime43 = require("react/jsx-runtime");
3729
- var sanitize3 = (input6) => {
3730
- const digits = input6.replace(/\D/g, "");
3731
- return digits.slice(0, (0, import_korean_utils7.phoneNumberMaxDigits)(digits));
3732
- };
3733
3858
  var isDigit4 = (char) => /\d/.test(char);
3734
- var PhoneNumberInput = /* @__PURE__ */ (0, import_react47.forwardRef)(
3859
+ var PhoneNumberInput = /* @__PURE__ */ (0, import_react49.forwardRef)(
3735
3860
  function PhoneNumberInput2(props, ref) {
3736
3861
  const {
3737
3862
  value: value4,
@@ -3742,7 +3867,7 @@ var PhoneNumberInput = /* @__PURE__ */ (0, import_react47.forwardRef)(
3742
3867
  onKeyDown,
3743
3868
  ...rest
3744
3869
  } = props;
3745
- const inputRef = (0, import_react47.useRef)(null);
3870
+ const inputRef = (0, import_react49.useRef)(null);
3746
3871
  const m = useMessages();
3747
3872
  const label7 = labelProp ?? m.phoneNumber ?? "\uD734\uB300\uD3F0 \uBC88\uD638";
3748
3873
  const field4 = useFormattedInput({
@@ -3750,7 +3875,7 @@ var PhoneNumberInput = /* @__PURE__ */ (0, import_react47.forwardRef)(
3750
3875
  value: value4,
3751
3876
  defaultValue,
3752
3877
  onValueChange,
3753
- sanitize: sanitize3,
3878
+ sanitize: import_korean_utils7.phoneNumberDigits,
3754
3879
  format: import_korean_utils7.formatPhoneNumber,
3755
3880
  isMeaningful: isDigit4,
3756
3881
  inputRef
@@ -3777,7 +3902,7 @@ var PhoneNumberInput = /* @__PURE__ */ (0, import_react47.forwardRef)(
3777
3902
  );
3778
3903
 
3779
3904
  // src/components/RadioGroup/RadioGroup.tsx
3780
- var import_react48 = require("react");
3905
+ var import_react50 = require("react");
3781
3906
 
3782
3907
  // src/components/RadioGroup/RadioGroup.css.ts
3783
3908
  var import_createRuntimeFn23 = require("@vanilla-extract/recipes/createRuntimeFn");
@@ -3791,7 +3916,7 @@ var text = "_1w9iwjma";
3791
3916
 
3792
3917
  // src/components/RadioGroup/RadioGroup.tsx
3793
3918
  var import_jsx_runtime44 = require("react/jsx-runtime");
3794
- var RadioGroup2 = /* @__PURE__ */ (0, import_react48.forwardRef)(function RadioGroup3(props, ref) {
3919
+ var RadioGroup2 = /* @__PURE__ */ (0, import_react50.forwardRef)(function RadioGroup3(props, ref) {
3795
3920
  const {
3796
3921
  options,
3797
3922
  value: value4,
@@ -3810,14 +3935,21 @@ var RadioGroup2 = /* @__PURE__ */ (0, import_react48.forwardRef)(function RadioG
3810
3935
  className
3811
3936
  } = props;
3812
3937
  const isControlled = "value" in props;
3813
- const [innerValue, setInnerValue] = (0, import_react48.useState)(defaultValue ?? "");
3938
+ const [innerValue, setInnerValue] = (0, import_react50.useState)(defaultValue ?? "");
3814
3939
  const current2 = isControlled ? value4 ?? "" : innerValue;
3815
- const generatedId = (0, import_react48.useId)();
3940
+ const generatedId = (0, import_react50.useId)();
3816
3941
  const baseId = id ?? generatedId;
3817
3942
  const labelId = label7 ? `${baseId}-label` : void 0;
3818
3943
  const helperId = helperText3 ? `${baseId}-helper` : void 0;
3819
3944
  const groupName = name ?? `${baseId}-radio`;
3820
3945
  const detachedForm = name ? void 0 : `${baseId}-no-form`;
3946
+ const rootRef = (0, import_react50.useRef)(null);
3947
+ useFormReset(rootRef, () => {
3948
+ if (isControlled) return;
3949
+ const next = defaultValue ?? "";
3950
+ setInnerValue(next);
3951
+ if (next !== current2) onValueChange?.(next);
3952
+ });
3821
3953
  const handleChange = (next) => {
3822
3954
  if (next === current2) return;
3823
3955
  if (!isControlled) setInnerValue(next);
@@ -3831,7 +3963,7 @@ var RadioGroup2 = /* @__PURE__ */ (0, import_react48.forwardRef)(function RadioG
3831
3963
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3832
3964
  "div",
3833
3965
  {
3834
- ref,
3966
+ ref: mergeRefs(ref, rootRef),
3835
3967
  id: baseId,
3836
3968
  role: "radiogroup",
3837
3969
  "aria-label": ariaLabel,
@@ -3877,7 +4009,7 @@ var RadioGroup2 = /* @__PURE__ */ (0, import_react48.forwardRef)(function RadioG
3877
4009
  });
3878
4010
 
3879
4011
  // src/components/ResidentNumberInput/ResidentNumberInput.tsx
3880
- var import_react49 = require("react");
4012
+ var import_react51 = require("react");
3881
4013
  var import_korean_utils8 = require("@bestow-ui/korean-utils");
3882
4014
 
3883
4015
  // src/components/ResidentNumberInput/ResidentNumberInput.css.ts
@@ -3891,7 +4023,7 @@ var separator4 = "_1llmfr74";
3891
4023
  // src/components/ResidentNumberInput/ResidentNumberInput.tsx
3892
4024
  var import_jsx_runtime45 = require("react/jsx-runtime");
3893
4025
  var onlyDigits = (input6) => input6.replace(/\D/g, "");
3894
- var ResidentNumberInput = /* @__PURE__ */ (0, import_react49.forwardRef)(
4026
+ var ResidentNumberInput = /* @__PURE__ */ (0, import_react51.forwardRef)(
3895
4027
  function ResidentNumberInput2(props, ref) {
3896
4028
  const {
3897
4029
  value: value4,
@@ -3921,16 +4053,16 @@ var ResidentNumberInput = /* @__PURE__ */ (0, import_react49.forwardRef)(
3921
4053
  const d = onlyDigits(v).slice(0, digits);
3922
4054
  return { front: d.slice(0, 6), back: d.slice(6) };
3923
4055
  };
3924
- const [parts, setParts] = (0, import_react49.useState)(() => split((isControlled ? value4 : defaultValue) ?? ""));
4056
+ const [parts, setParts] = (0, import_react51.useState)(() => split((isControlled ? value4 : defaultValue) ?? ""));
3925
4057
  const current2 = isControlled && (value4 ?? "") !== parts.front + parts.back ? split(value4 ?? "") : parts;
3926
4058
  const raw = current2.front + current2.back;
3927
- const generatedId = (0, import_react49.useId)();
4059
+ const generatedId = (0, import_react51.useId)();
3928
4060
  const baseId = id ?? generatedId;
3929
4061
  const frontId = `${baseId}-front`;
3930
4062
  const backId = `${baseId}-back`;
3931
4063
  const labelId = `${baseId}-label`;
3932
- const frontRef = (0, import_react49.useRef)(null);
3933
- const backRef = (0, import_react49.useRef)(null);
4064
+ const frontRef = (0, import_react51.useRef)(null);
4065
+ const backRef = (0, import_react51.useRef)(null);
3934
4066
  const complete = current2.front.length === 6 && current2.back.length === backLength;
3935
4067
  const isValid = (v) => digits === 13 ? (0, import_korean_utils8.isValidResidentNumber)(v) : (0, import_korean_utils8.parseResidentNumber)(v) !== null;
3936
4068
  const update = (next) => {
@@ -3940,7 +4072,13 @@ var ResidentNumberInput = /* @__PURE__ */ (0, import_react49.forwardRef)(
3940
4072
  const nextComplete = next.front.length === 6 && next.back.length === backLength;
3941
4073
  onValueChange?.(nextRaw, nextComplete ? isValid(nextRaw) : null);
3942
4074
  };
3943
- const [touched, setTouched] = (0, import_react49.useState)(false);
4075
+ const [touched, setTouched] = (0, import_react51.useState)(false);
4076
+ useFormReset(frontRef, () => {
4077
+ setTouched(false);
4078
+ if (isControlled) return setParts(split(value4 ?? ""));
4079
+ const next = split(defaultValue ?? "");
4080
+ update(next);
4081
+ });
3944
4082
  const autoInvalid = validate && raw.length > 0 && (complete ? !isValid(raw) : touched);
3945
4083
  const showAuto = autoInvalid && error === void 0;
3946
4084
  const invalid = error ?? autoInvalid;
@@ -4023,7 +4161,7 @@ var ResidentNumberInput = /* @__PURE__ */ (0, import_react49.forwardRef)(
4023
4161
  );
4024
4162
 
4025
4163
  // src/components/SegmentedControl/SegmentedControl.tsx
4026
- var import_react50 = require("react");
4164
+ var import_react52 = require("react");
4027
4165
 
4028
4166
  // src/components/SegmentedControl/SegmentedControl.css.ts
4029
4167
  var import_createRuntimeFn24 = require("@vanilla-extract/recipes/createRuntimeFn");
@@ -4034,7 +4172,7 @@ var root11 = /* @__PURE__ */ (0, import_createRuntimeFn24.createRuntimeFn)({ def
4034
4172
  // src/components/SegmentedControl/SegmentedControl.tsx
4035
4173
  var import_jsx_runtime46 = require("react/jsx-runtime");
4036
4174
  var NEXT_KEYS = { ArrowRight: 1, ArrowDown: 1, ArrowLeft: -1, ArrowUp: -1 };
4037
- var SegmentedControl = /* @__PURE__ */ (0, import_react50.forwardRef)(
4175
+ var SegmentedControl = /* @__PURE__ */ (0, import_react52.forwardRef)(
4038
4176
  function SegmentedControl2(props, ref) {
4039
4177
  const {
4040
4178
  options,
@@ -4051,12 +4189,19 @@ var SegmentedControl = /* @__PURE__ */ (0, import_react50.forwardRef)(
4051
4189
  className
4052
4190
  } = props;
4053
4191
  const isControlled = "value" in props;
4054
- const [innerValue, setInnerValue] = (0, import_react50.useState)(defaultValue ?? "");
4192
+ const [innerValue, setInnerValue] = (0, import_react52.useState)(defaultValue ?? "");
4055
4193
  const current2 = isControlled ? value4 ?? "" : innerValue;
4056
- const generatedId = (0, import_react50.useId)();
4194
+ const generatedId = (0, import_react52.useId)();
4057
4195
  const labelId = label7 ? `${id ?? generatedId}-label` : void 0;
4058
- const itemRefs = (0, import_react50.useRef)([]);
4196
+ const itemRefs = (0, import_react52.useRef)([]);
4059
4197
  const isEnabled = (index) => !disabled && !options[index]?.disabled;
4198
+ const rootRef = (0, import_react52.useRef)(null);
4199
+ useFormReset(rootRef, () => {
4200
+ if (isControlled) return;
4201
+ const next = defaultValue ?? "";
4202
+ setInnerValue(next);
4203
+ if (next !== current2) onValueChange?.(next);
4204
+ });
4060
4205
  const select2 = (index) => {
4061
4206
  const next = options[index].value;
4062
4207
  if (next === current2) return;
@@ -4089,7 +4234,7 @@ var SegmentedControl = /* @__PURE__ */ (0, import_react50.forwardRef)(
4089
4234
  const group = /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
4090
4235
  "div",
4091
4236
  {
4092
- ref,
4237
+ ref: mergeRefs(ref, rootRef),
4093
4238
  id,
4094
4239
  role: "radiogroup",
4095
4240
  "aria-labelledby": labelId,
@@ -4136,7 +4281,7 @@ var SegmentedControl = /* @__PURE__ */ (0, import_react50.forwardRef)(
4136
4281
  );
4137
4282
 
4138
4283
  // src/components/NativeSelect/NativeSelect.tsx
4139
- var import_react51 = require("react");
4284
+ var import_react53 = require("react");
4140
4285
  var import_icons18 = require("@bestow-ui/icons");
4141
4286
 
4142
4287
  // src/components/NativeSelect/NativeSelect.css.ts
@@ -4147,7 +4292,7 @@ var wrapper = "_5silym0";
4147
4292
 
4148
4293
  // src/components/NativeSelect/NativeSelect.tsx
4149
4294
  var import_jsx_runtime47 = require("react/jsx-runtime");
4150
- var NativeSelect = /* @__PURE__ */ (0, import_react51.forwardRef)(function NativeSelect2({
4295
+ var NativeSelect = /* @__PURE__ */ (0, import_react53.forwardRef)(function NativeSelect2({
4151
4296
  options,
4152
4297
  onValueChange,
4153
4298
  onChange,
@@ -4167,7 +4312,7 @@ var NativeSelect = /* @__PURE__ */ (0, import_react51.forwardRef)(function Nativ
4167
4312
  "aria-describedby": ariaDescribedBy,
4168
4313
  ...rest
4169
4314
  }, ref) {
4170
- const generatedId = (0, import_react51.useId)();
4315
+ const generatedId = (0, import_react53.useId)();
4171
4316
  const selectId = id ?? generatedId;
4172
4317
  const helperId = helperText3 ? `${selectId}-helper` : void 0;
4173
4318
  const handleChange = (event) => {
@@ -4216,10 +4361,10 @@ var NativeSelect = /* @__PURE__ */ (0, import_react51.forwardRef)(function Nativ
4216
4361
 
4217
4362
  // src/components/Select/Select.tsx
4218
4363
  var RadixSelect = __toESM(require("@radix-ui/react-select"), 1);
4219
- var import_react52 = require("react");
4364
+ var import_react54 = require("react");
4220
4365
  var import_icons19 = require("@bestow-ui/icons");
4221
4366
  var import_jsx_runtime48 = require("react/jsx-runtime");
4222
- var Select = /* @__PURE__ */ (0, import_react52.forwardRef)(function Select2(props, ref) {
4367
+ var Select = /* @__PURE__ */ (0, import_react54.forwardRef)(function Select2(props, ref) {
4223
4368
  const {
4224
4369
  options,
4225
4370
  value: value4,
@@ -4239,7 +4384,7 @@ var Select = /* @__PURE__ */ (0, import_react52.forwardRef)(function Select2(pro
4239
4384
  className
4240
4385
  } = props;
4241
4386
  const isControlled = "value" in props;
4242
- const generatedId = (0, import_react52.useId)();
4387
+ const generatedId = (0, import_react54.useId)();
4243
4388
  const triggerId = id ?? generatedId;
4244
4389
  const helperId = helperText3 ? `${triggerId}-helper` : void 0;
4245
4390
  const portal2 = usePortalProps();
@@ -4305,14 +4450,14 @@ var Select = /* @__PURE__ */ (0, import_react52.forwardRef)(function Select2(pro
4305
4450
  });
4306
4451
 
4307
4452
  // src/components/SkipLink/SkipLink.tsx
4308
- var import_react53 = require("react");
4453
+ var import_react55 = require("react");
4309
4454
 
4310
4455
  // src/components/SkipLink/SkipLink.css.ts
4311
4456
  var skipLink = "_1t9jaar0";
4312
4457
 
4313
4458
  // src/components/SkipLink/SkipLink.tsx
4314
4459
  var import_jsx_runtime49 = require("react/jsx-runtime");
4315
- var SkipLink = /* @__PURE__ */ (0, import_react53.forwardRef)(function SkipLink2({ href = "#main", className, children, onClick, ...rest }, ref) {
4460
+ var SkipLink = /* @__PURE__ */ (0, import_react55.forwardRef)(function SkipLink2({ href = "#main", className, children, onClick, ...rest }, ref) {
4316
4461
  const m = useMessages();
4317
4462
  const handleClick = (event) => {
4318
4463
  onClick?.(event);
@@ -4329,7 +4474,7 @@ var SkipLink = /* @__PURE__ */ (0, import_react53.forwardRef)(function SkipLink2
4329
4474
 
4330
4475
  // src/components/Slider/Slider.tsx
4331
4476
  var RadixSlider = __toESM(require("@radix-ui/react-slider"), 1);
4332
- var import_react54 = require("react");
4477
+ var import_react56 = require("react");
4333
4478
 
4334
4479
  // src/components/Slider/Slider.css.ts
4335
4480
  var import_createRuntimeFn26 = require("@vanilla-extract/recipes/createRuntimeFn");
@@ -4345,7 +4490,7 @@ var value3 = "_126mzjm3";
4345
4490
 
4346
4491
  // src/components/Slider/Slider.tsx
4347
4492
  var import_jsx_runtime50 = require("react/jsx-runtime");
4348
- var Slider = /* @__PURE__ */ (0, import_react54.forwardRef)(function Slider2(props, ref) {
4493
+ var Slider = /* @__PURE__ */ (0, import_react56.forwardRef)(function Slider2(props, ref) {
4349
4494
  const {
4350
4495
  value: value4,
4351
4496
  defaultValue,
@@ -4361,19 +4506,28 @@ var Slider = /* @__PURE__ */ (0, import_react54.forwardRef)(function Slider2(pro
4361
4506
  size,
4362
4507
  id,
4363
4508
  className,
4364
- disabled,
4509
+ disabled: disabledProp,
4365
4510
  ...rest
4366
4511
  } = props;
4367
4512
  const m = useMessages();
4368
4513
  const thumbLabels = thumbLabelsProp ?? [m.rangeStart ?? "\uCD5C\uC18C", m.rangeEnd ?? "\uCD5C\uB300"];
4369
- const generatedId = (0, import_react54.useId)();
4514
+ const generatedId = (0, import_react56.useId)();
4370
4515
  const baseId = id ?? generatedId;
4371
4516
  const labelId = `${baseId}-label`;
4372
4517
  const helperId = `${baseId}-helper`;
4373
4518
  const isControlled = "value" in props;
4374
- const [innerValue, setInnerValue] = (0, import_react54.useState)(defaultValue ?? [min]);
4519
+ const [innerValue, setInnerValue] = (0, import_react56.useState)(defaultValue ?? [min]);
4375
4520
  const current2 = isControlled ? value4 ?? [min] : innerValue;
4376
4521
  const isRange = current2.length > 1;
4522
+ const rootRef = (0, import_react56.useRef)(null);
4523
+ const fieldsetDisabled = useFieldsetDisabled(rootRef);
4524
+ const disabled = disabledProp || fieldsetDisabled;
4525
+ useFormReset(rootRef, () => {
4526
+ if (isControlled) return;
4527
+ const next = defaultValue ?? [min];
4528
+ setInnerValue(next);
4529
+ if (next.join() !== current2.join()) onValueChange?.(next);
4530
+ });
4377
4531
  const handleChange = (next) => {
4378
4532
  if (!isControlled) setInnerValue(next);
4379
4533
  onValueChange?.(next);
@@ -4387,7 +4541,7 @@ var Slider = /* @__PURE__ */ (0, import_react54.forwardRef)(function Slider2(pro
4387
4541
  /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
4388
4542
  RadixSlider.Root,
4389
4543
  {
4390
- ref,
4544
+ ref: mergeRefs(ref, rootRef),
4391
4545
  id: baseId,
4392
4546
  min,
4393
4547
  max,
@@ -4424,22 +4578,23 @@ var Slider = /* @__PURE__ */ (0, import_react54.forwardRef)(function Slider2(pro
4424
4578
  });
4425
4579
 
4426
4580
  // src/components/Stepper/Stepper.tsx
4427
- var import_react55 = require("react");
4581
+ var import_react57 = require("react");
4428
4582
  var import_icons20 = require("@bestow-ui/icons");
4429
4583
 
4430
4584
  // src/components/Stepper/Stepper.css.ts
4431
4585
  var import_createRuntimeFn27 = require("@vanilla-extract/recipes/createRuntimeFn");
4432
- var description7 = "kervhmh";
4586
+ var description7 = "kervhmi";
4433
4587
  var indicator3 = /* @__PURE__ */ (0, import_createRuntimeFn27.createRuntimeFn)({ defaultClassName: "kervhm6", variantClassNames: { status: { complete: "kervhm7", current: "kervhm8", upcoming: "kervhm9" } }, defaultVariants: {}, compoundVariants: [] });
4434
- var label5 = /* @__PURE__ */ (0, import_createRuntimeFn27.createRuntimeFn)({ defaultClassName: "kervhmd", variantClassNames: { status: { complete: "kervhme", current: "kervhmf", upcoming: "kervhmg" } }, defaultVariants: {}, compoundVariants: [] });
4588
+ var label5 = /* @__PURE__ */ (0, import_createRuntimeFn27.createRuntimeFn)({ defaultClassName: "kervhme", variantClassNames: { status: { complete: "kervhmf", current: "kervhmg", upcoming: "kervhmh" } }, defaultVariants: {}, compoundVariants: [] });
4435
4589
  var root13 = /* @__PURE__ */ (0, import_createRuntimeFn27.createRuntimeFn)({ defaultClassName: "kervhm0", variantClassNames: { orientation: { horizontal: "kervhm1", vertical: "kervhm2" } }, defaultVariants: { orientation: "horizontal" }, compoundVariants: [] });
4436
4590
  var step = /* @__PURE__ */ (0, import_createRuntimeFn27.createRuntimeFn)({ defaultClassName: "kervhm3", variantClassNames: { orientation: { horizontal: "kervhm4", vertical: "kervhm5" } }, defaultVariants: { orientation: "horizontal" }, compoundVariants: [] });
4437
- var text2 = /* @__PURE__ */ (0, import_createRuntimeFn27.createRuntimeFn)({ defaultClassName: "kervhma", variantClassNames: { orientation: { horizontal: "kervhmb", vertical: "kervhmc" } }, defaultVariants: {}, compoundVariants: [] });
4591
+ var text2 = /* @__PURE__ */ (0, import_createRuntimeFn27.createRuntimeFn)({ defaultClassName: "kervhma", variantClassNames: { orientation: { horizontal: "kervhmb", vertical: "kervhmc" }, reserveDescription: { true: "kervhmd" } }, defaultVariants: {}, compoundVariants: [] });
4438
4592
 
4439
4593
  // src/components/Stepper/Stepper.tsx
4440
4594
  var import_jsx_runtime51 = require("react/jsx-runtime");
4441
- var Stepper = /* @__PURE__ */ (0, import_react55.forwardRef)(function Stepper2({ steps, current: current2, orientation = "horizontal", "aria-label": ariaLabel, className, ...rest }, ref) {
4595
+ var Stepper = /* @__PURE__ */ (0, import_react57.forwardRef)(function Stepper2({ steps, current: current2, orientation = "horizontal", loading: loading2, "aria-label": ariaLabel, className, ...rest }, ref) {
4442
4596
  const m = useMessages();
4597
+ const reserveDescription = orientation === "vertical" && steps.some((step2) => step2.description);
4443
4598
  return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4444
4599
  "ol",
4445
4600
  {
@@ -4449,6 +4604,7 @@ var Stepper = /* @__PURE__ */ (0, import_react55.forwardRef)(function Stepper2({
4449
4604
  ...rest,
4450
4605
  children: steps.map((step2, index) => {
4451
4606
  const status = index < current2 ? "complete" : index === current2 ? "current" : "upcoming";
4607
+ const inProgress = loading2 && status === "current";
4452
4608
  return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
4453
4609
  "li",
4454
4610
  {
@@ -4456,14 +4612,19 @@ var Stepper = /* @__PURE__ */ (0, import_react55.forwardRef)(function Stepper2({
4456
4612
  "data-status": status,
4457
4613
  "aria-current": status === "current" ? "step" : void 0,
4458
4614
  children: [
4459
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: indicator3({ status }), "aria-hidden": true, children: status === "complete" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_icons20.CheckIcon, { size: 16, strokeWidth: 2.5 }) : index + 1 }),
4460
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: text2({ orientation }), children: [
4615
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: indicator3({ status }), "aria-hidden": true, children: status === "complete" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_icons20.CheckIcon, { size: 16, strokeWidth: 2.5 }) : inProgress ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Spinner, { size: "sm", label: "" }) : index + 1 }),
4616
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: text2({ orientation, reserveDescription }), children: [
4461
4617
  /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: label5({ status }), children: [
4462
4618
  step2.label,
4463
4619
  status === "complete" && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: visuallyHidden, children: [
4464
4620
  " (",
4465
4621
  m.stepCompleted ?? "\uC644\uB8CC",
4466
4622
  ")"
4623
+ ] }),
4624
+ inProgress && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: visuallyHidden, children: [
4625
+ " (",
4626
+ m.stepInProgress ?? "\uC9C4\uD589 \uC911",
4627
+ ")"
4467
4628
  ] })
4468
4629
  ] }),
4469
4630
  step2.description && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: description7, children: step2.description })
@@ -4478,7 +4639,7 @@ var Stepper = /* @__PURE__ */ (0, import_react55.forwardRef)(function Stepper2({
4478
4639
  });
4479
4640
 
4480
4641
  // src/components/Switch/Switch.tsx
4481
- var import_react56 = require("react");
4642
+ var import_react58 = require("react");
4482
4643
 
4483
4644
  // src/components/Switch/Switch.css.ts
4484
4645
  var import_createRuntimeFn28 = require("@vanilla-extract/recipes/createRuntimeFn");
@@ -4493,7 +4654,7 @@ var import_jsx_runtime52 = require("react/jsx-runtime");
4493
4654
  function setNativeChecked(input6, checked) {
4494
4655
  Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "checked")?.set?.call(input6, checked);
4495
4656
  }
4496
- var Switch = /* @__PURE__ */ (0, import_react56.forwardRef)(function Switch2({
4657
+ var Switch = /* @__PURE__ */ (0, import_react58.forwardRef)(function Switch2({
4497
4658
  label: label7,
4498
4659
  size,
4499
4660
  id,
@@ -4507,31 +4668,26 @@ var Switch = /* @__PURE__ */ (0, import_react56.forwardRef)(function Switch2({
4507
4668
  onCheckedChange,
4508
4669
  "aria-label": ariaLabel
4509
4670
  }, ref) {
4510
- const generatedId = (0, import_react56.useId)();
4671
+ const generatedId = (0, import_react58.useId)();
4511
4672
  const switchId = id ?? generatedId;
4512
- const [uncontrolled, setUncontrolled] = (0, import_react56.useState)(defaultChecked ?? false);
4673
+ const [uncontrolled, setUncontrolled] = (0, import_react58.useState)(defaultChecked ?? false);
4513
4674
  const isControlled = checkedProp !== void 0;
4514
4675
  const checked = isControlled ? checkedProp : uncontrolled;
4515
- const buttonRef = (0, import_react56.useRef)(null);
4516
- const inputRef = (0, import_react56.useRef)(null);
4517
- const [inForm, setInForm] = (0, import_react56.useState)(true);
4518
- const userToggled = (0, import_react56.useRef)(false);
4676
+ const buttonRef = (0, import_react58.useRef)(null);
4677
+ const inputRef = (0, import_react58.useRef)(null);
4678
+ const [inForm, setInForm] = (0, import_react58.useState)(true);
4679
+ const userToggled = (0, import_react58.useRef)(false);
4519
4680
  const setChecked = (next) => {
4520
4681
  if (!isControlled) setUncontrolled(next);
4521
4682
  if (next !== checked) onCheckedChange?.(next);
4522
4683
  };
4523
- const setCheckedRef = (0, import_react56.useRef)(setChecked);
4524
- setCheckedRef.current = setChecked;
4525
- (0, import_react56.useEffect)(() => {
4526
- const form = buttonRef.current?.form;
4527
- setInForm(!!form);
4528
- if (!form) return;
4529
- const initial = checked;
4530
- const onReset = () => setCheckedRef.current(initial);
4531
- form.addEventListener("reset", onReset);
4532
- return () => form.removeEventListener("reset", onReset);
4684
+ useFormReset(buttonRef, () => {
4685
+ if (!isControlled) setChecked(defaultChecked ?? false);
4686
+ });
4687
+ (0, import_react58.useEffect)(() => {
4688
+ setInForm(!!buttonRef.current?.form);
4533
4689
  }, []);
4534
- (0, import_react56.useEffect)(() => {
4690
+ (0, import_react58.useEffect)(() => {
4535
4691
  const input6 = inputRef.current;
4536
4692
  if (!input6 || input6.checked === checked) return;
4537
4693
  setNativeChecked(input6, checked);
@@ -4584,7 +4740,7 @@ var Switch = /* @__PURE__ */ (0, import_react56.forwardRef)(function Switch2({
4584
4740
  });
4585
4741
 
4586
4742
  // src/components/Table/Table.tsx
4587
- var import_react57 = require("react");
4743
+ var import_react59 = require("react");
4588
4744
  var import_icons21 = require("@bestow-ui/icons");
4589
4745
 
4590
4746
  // src/components/Table/Table.css.ts
@@ -4608,9 +4764,9 @@ var table = "l3ploy1";
4608
4764
 
4609
4765
  // src/components/Table/Table.tsx
4610
4766
  var import_jsx_runtime53 = require("react/jsx-runtime");
4611
- var TableSizeContext = /* @__PURE__ */ (0, import_react57.createContext)("md");
4612
- var TableSectionContext = /* @__PURE__ */ (0, import_react57.createContext)("body");
4613
- var Table = /* @__PURE__ */ (0, import_react57.forwardRef)(function Table2({
4767
+ var TableSizeContext = /* @__PURE__ */ (0, import_react59.createContext)("md");
4768
+ var TableSectionContext = /* @__PURE__ */ (0, import_react59.createContext)("body");
4769
+ var Table = /* @__PURE__ */ (0, import_react59.forwardRef)(function Table2({
4614
4770
  size = "md",
4615
4771
  striped: striped2,
4616
4772
  stickyHeader: stickyHeader2,
@@ -4622,7 +4778,7 @@ var Table = /* @__PURE__ */ (0, import_react57.forwardRef)(function Table2({
4622
4778
  children,
4623
4779
  ...rest
4624
4780
  }, ref) {
4625
- const captionId = (0, import_react57.useId)();
4781
+ const captionId = (0, import_react59.useId)();
4626
4782
  return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TableSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4627
4783
  "div",
4628
4784
  {
@@ -4648,27 +4804,27 @@ var Table = /* @__PURE__ */ (0, import_react57.forwardRef)(function Table2({
4648
4804
  }
4649
4805
  ) });
4650
4806
  });
4651
- var TableHeader = /* @__PURE__ */ (0, import_react57.forwardRef)(
4807
+ var TableHeader = /* @__PURE__ */ (0, import_react59.forwardRef)(
4652
4808
  function TableHeader2({ className, ...rest }, ref) {
4653
4809
  return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TableSectionContext.Provider, { value: "header", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("thead", { ref, className: cx(header9, className), ...rest }) });
4654
4810
  }
4655
4811
  );
4656
- var TableBody = /* @__PURE__ */ (0, import_react57.forwardRef)(
4812
+ var TableBody = /* @__PURE__ */ (0, import_react59.forwardRef)(
4657
4813
  function TableBody2({ className, ...rest }, ref) {
4658
4814
  return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("tbody", { ref, className: cx(body4, className), ...rest }) });
4659
4815
  }
4660
4816
  );
4661
- var TableFooter = /* @__PURE__ */ (0, import_react57.forwardRef)(
4817
+ var TableFooter = /* @__PURE__ */ (0, import_react59.forwardRef)(
4662
4818
  function TableFooter2({ className, ...rest }, ref) {
4663
4819
  return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("tfoot", { ref, className: cx(footer4, className), ...rest }) });
4664
4820
  }
4665
4821
  );
4666
- var TableRow = /* @__PURE__ */ (0, import_react57.forwardRef)(function TableRow2({ selected, className, ...rest }, ref) {
4822
+ var TableRow = /* @__PURE__ */ (0, import_react59.forwardRef)(function TableRow2({ selected, className, ...rest }, ref) {
4667
4823
  return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("tr", { ref, className: cx(row4, className), "data-state": selected ? "selected" : void 0, ...rest });
4668
4824
  });
4669
- var TableHead = /* @__PURE__ */ (0, import_react57.forwardRef)(function TableHead2({ align, sortDirection, onSort, scope, className, children, ...rest }, ref) {
4670
- const size = (0, import_react57.useContext)(TableSizeContext);
4671
- const section = (0, import_react57.useContext)(TableSectionContext);
4825
+ var TableHead = /* @__PURE__ */ (0, import_react59.forwardRef)(function TableHead2({ align, sortDirection, onSort, scope, className, children, ...rest }, ref) {
4826
+ const size = (0, import_react59.useContext)(TableSizeContext);
4827
+ const section = (0, import_react59.useContext)(TableSectionContext);
4672
4828
  const sortable = onSort !== void 0;
4673
4829
  const direction = sortDirection ?? "none";
4674
4830
  const SortIcon = direction === "descending" ? import_icons21.ArrowDownIcon : import_icons21.ArrowUpIcon;
@@ -4691,9 +4847,9 @@ var TableHead = /* @__PURE__ */ (0, import_react57.forwardRef)(function TableHea
4691
4847
  }
4692
4848
  );
4693
4849
  });
4694
- var TableCell = /* @__PURE__ */ (0, import_react57.forwardRef)(function TableCell2({ align, className, ...rest }, ref) {
4695
- const size = (0, import_react57.useContext)(TableSizeContext);
4696
- const section = (0, import_react57.useContext)(TableSectionContext);
4850
+ var TableCell = /* @__PURE__ */ (0, import_react59.forwardRef)(function TableCell2({ align, className, ...rest }, ref) {
4851
+ const size = (0, import_react59.useContext)(TableSizeContext);
4852
+ const section = (0, import_react59.useContext)(TableSectionContext);
4697
4853
  return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4698
4854
  "td",
4699
4855
  {
@@ -4703,7 +4859,7 @@ var TableCell = /* @__PURE__ */ (0, import_react57.forwardRef)(function TableCel
4703
4859
  }
4704
4860
  );
4705
4861
  });
4706
- var TableEmpty = /* @__PURE__ */ (0, import_react57.forwardRef)(function TableEmpty2({ colSpan, className, children, ...rest }, ref) {
4862
+ var TableEmpty = /* @__PURE__ */ (0, import_react59.forwardRef)(function TableEmpty2({ colSpan, className, children, ...rest }, ref) {
4707
4863
  return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TableCell, { ref, colSpan, className: cx(emptyCell, className), ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: emptyContent, children }) }) });
4708
4864
  });
4709
4865
  function TableSkeleton({ rows = 5, columns: columns2 }) {
@@ -4711,18 +4867,18 @@ function TableSkeleton({ rows = 5, columns: columns2 }) {
4711
4867
  }
4712
4868
 
4713
4869
  // src/components/Table/useTableSelection.ts
4714
- var import_react58 = require("react");
4870
+ var import_react60 = require("react");
4715
4871
  function useTableSelection(initial = []) {
4716
- const [selected, setSelected] = (0, import_react58.useState)(initial);
4717
- const isSelected = (0, import_react58.useCallback)((id) => selected.includes(id), [selected]);
4718
- const toggle3 = (0, import_react58.useCallback)((id, checked) => {
4872
+ const [selected, setSelected] = (0, import_react60.useState)(initial);
4873
+ const isSelected = (0, import_react60.useCallback)((id) => selected.includes(id), [selected]);
4874
+ const toggle3 = (0, import_react60.useCallback)((id, checked) => {
4719
4875
  setSelected((prev) => {
4720
4876
  const on = checked ?? !prev.includes(id);
4721
4877
  if (on) return prev.includes(id) ? prev : [...prev, id];
4722
4878
  return prev.filter((value4) => value4 !== id);
4723
4879
  });
4724
4880
  }, []);
4725
- const clear2 = (0, import_react58.useCallback)(() => setSelected([]), []);
4881
+ const clear2 = (0, import_react60.useCallback)(() => setSelected([]), []);
4726
4882
  const selectAllProps = (pageIds) => {
4727
4883
  const all2 = pageIds.length > 0 && pageIds.every((id) => selected.includes(id));
4728
4884
  const some = pageIds.some((id) => selected.includes(id));
@@ -4743,7 +4899,7 @@ function useTableSelection(initial = []) {
4743
4899
 
4744
4900
  // src/components/Tabs/Tabs.tsx
4745
4901
  var RadixTabs = __toESM(require("@radix-ui/react-tabs"), 1);
4746
- var import_react59 = require("react");
4902
+ var import_react61 = require("react");
4747
4903
 
4748
4904
  // src/components/Tabs/Tabs.css.ts
4749
4905
  var import_createRuntimeFn30 = require("@vanilla-extract/recipes/createRuntimeFn");
@@ -4754,25 +4910,25 @@ var trigger3 = /* @__PURE__ */ (0, import_createRuntimeFn30.createRuntimeFn)({ d
4754
4910
 
4755
4911
  // src/components/Tabs/Tabs.tsx
4756
4912
  var import_jsx_runtime54 = require("react/jsx-runtime");
4757
- var TabsStyleContext = /* @__PURE__ */ (0, import_react59.createContext)({ variant: "line", size: "md" });
4758
- var Tabs = /* @__PURE__ */ (0, import_react59.forwardRef)(function Tabs2({ variant = "line", size = "md", className, ...props }, ref) {
4913
+ var TabsStyleContext = /* @__PURE__ */ (0, import_react61.createContext)({ variant: "line", size: "md" });
4914
+ var Tabs = /* @__PURE__ */ (0, import_react61.forwardRef)(function Tabs2({ variant = "line", size = "md", className, ...props }, ref) {
4759
4915
  const controlled = "value" in props ? { value: props.value ?? "" } : {};
4760
4916
  return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(TabsStyleContext.Provider, { value: { variant, size }, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(RadixTabs.Root, { ref, className: cx(root15, className), ...props, ...controlled }) });
4761
4917
  });
4762
- var TabsList = /* @__PURE__ */ (0, import_react59.forwardRef)(function TabsList2({ className, ...rest }, ref) {
4763
- const { variant } = (0, import_react59.useContext)(TabsStyleContext);
4918
+ var TabsList = /* @__PURE__ */ (0, import_react61.forwardRef)(function TabsList2({ className, ...rest }, ref) {
4919
+ const { variant } = (0, import_react61.useContext)(TabsStyleContext);
4764
4920
  return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(RadixTabs.List, { ref, className: cx(list6({ variant }), className), ...rest });
4765
4921
  });
4766
- var TabsTrigger = /* @__PURE__ */ (0, import_react59.forwardRef)(function TabsTrigger2({ className, ...rest }, ref) {
4767
- const { variant, size } = (0, import_react59.useContext)(TabsStyleContext);
4922
+ var TabsTrigger = /* @__PURE__ */ (0, import_react61.forwardRef)(function TabsTrigger2({ className, ...rest }, ref) {
4923
+ const { variant, size } = (0, import_react61.useContext)(TabsStyleContext);
4768
4924
  return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(RadixTabs.Trigger, { ref, className: cx(trigger3({ variant, size }), className), ...rest });
4769
4925
  });
4770
- var TabsContent = /* @__PURE__ */ (0, import_react59.forwardRef)(function TabsContent2({ className, ...rest }, ref) {
4926
+ var TabsContent = /* @__PURE__ */ (0, import_react61.forwardRef)(function TabsContent2({ className, ...rest }, ref) {
4771
4927
  return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(RadixTabs.Content, { ref, className: cx(content10, className), ...rest });
4772
4928
  });
4773
4929
 
4774
4930
  // src/components/Textarea/Textarea.tsx
4775
- var import_react60 = require("react");
4931
+ var import_react62 = require("react");
4776
4932
 
4777
4933
  // src/components/Textarea/Textarea.css.ts
4778
4934
  var import_createRuntimeFn31 = require("@vanilla-extract/recipes/createRuntimeFn");
@@ -4784,7 +4940,7 @@ var textarea = /* @__PURE__ */ (0, import_createRuntimeFn31.createRuntimeFn)({ d
4784
4940
 
4785
4941
  // src/components/Textarea/Textarea.tsx
4786
4942
  var import_jsx_runtime55 = require("react/jsx-runtime");
4787
- var Textarea = /* @__PURE__ */ (0, import_react60.forwardRef)(function Textarea2({
4943
+ var Textarea = /* @__PURE__ */ (0, import_react62.forwardRef)(function Textarea2({
4788
4944
  label: label7,
4789
4945
  helperText: helperText3,
4790
4946
  error,
@@ -4805,13 +4961,13 @@ var Textarea = /* @__PURE__ */ (0, import_react60.forwardRef)(function Textarea2
4805
4961
  "aria-describedby": ariaDescribedBy,
4806
4962
  ...rest
4807
4963
  }, ref) {
4808
- const generatedId = (0, import_react60.useId)();
4964
+ const generatedId = (0, import_react62.useId)();
4809
4965
  const textareaId = id ?? generatedId;
4810
4966
  const helperId = helperText3 ? `${textareaId}-helper` : void 0;
4811
- const innerRef = (0, import_react60.useRef)(null);
4812
- const [uncontrolledLength, setUncontrolledLength] = (0, import_react60.useState)(() => String(defaultValue ?? "").length);
4967
+ const innerRef = (0, import_react62.useRef)(null);
4968
+ const [uncontrolledLength, setUncontrolledLength] = (0, import_react62.useState)(() => String(defaultValue ?? "").length);
4813
4969
  const length = value4 !== void 0 ? String(value4).length : uncontrolledLength;
4814
- const fitHeight = (0, import_react60.useCallback)(() => {
4970
+ const fitHeight = (0, import_react62.useCallback)(() => {
4815
4971
  const el = innerRef.current;
4816
4972
  if (!autoResize || !el) return;
4817
4973
  el.style.height = "auto";
@@ -4819,6 +4975,10 @@ var Textarea = /* @__PURE__ */ (0, import_react60.forwardRef)(function Textarea2
4819
4975
  el.style.height = `${el.scrollHeight + borders}px`;
4820
4976
  }, [autoResize]);
4821
4977
  useIsomorphicLayoutEffect(fitHeight, [fitHeight, value4]);
4978
+ useFormReset(innerRef, () => {
4979
+ if (value4 === void 0) setUncontrolledLength(String(defaultValue ?? "").length);
4980
+ setTimeout(fitHeight);
4981
+ });
4822
4982
  const handleChange = (event) => {
4823
4983
  if (value4 === void 0) setUncontrolledLength(event.target.value.length);
4824
4984
  fitHeight();
@@ -4860,7 +5020,7 @@ var Textarea = /* @__PURE__ */ (0, import_react60.forwardRef)(function Textarea2
4860
5020
 
4861
5021
  // src/components/Toast/Toast.tsx
4862
5022
  var RadixToast = __toESM(require("@radix-ui/react-toast"), 1);
4863
- var import_react61 = require("react");
5023
+ var import_react63 = require("react");
4864
5024
  var import_icons22 = require("@bestow-ui/icons");
4865
5025
 
4866
5026
  // src/components/Toast/Toast.css.ts
@@ -4875,24 +5035,24 @@ var viewport2 = "_1g11zvx0";
4875
5035
  // src/components/Toast/Toast.tsx
4876
5036
  var import_jsx_runtime56 = require("react/jsx-runtime");
4877
5037
  var REMOVE_DELAY = 500;
4878
- var ToastContext = /* @__PURE__ */ (0, import_react61.createContext)(null);
5038
+ var ToastContext = /* @__PURE__ */ (0, import_react63.createContext)(null);
4879
5039
  function ToastProvider({ children, duration = 5e3, label: labelProp }) {
4880
5040
  const m = useMessages();
4881
5041
  const label7 = labelProp ?? m.notifications ?? "\uC54C\uB9BC";
4882
- const [toasts, setToasts] = (0, import_react61.useState)([]);
4883
- const nextId = (0, import_react61.useRef)(0);
5042
+ const [toasts, setToasts] = (0, import_react63.useState)([]);
5043
+ const nextId = (0, import_react63.useRef)(0);
4884
5044
  const portal2 = usePortalProps();
4885
- const toast2 = (0, import_react61.useCallback)((options) => {
5045
+ const toast2 = (0, import_react63.useCallback)((options) => {
4886
5046
  const id = nextId.current++;
4887
5047
  setToasts((prev) => [...prev, { ...options, id, open: true }]);
4888
5048
  return id;
4889
5049
  }, []);
4890
- const dismiss = (0, import_react61.useCallback)((id) => {
5050
+ const dismiss = (0, import_react63.useCallback)((id) => {
4891
5051
  const isTarget = (t) => id === void 0 || t.id === id;
4892
5052
  setToasts((prev) => prev.map((t) => isTarget(t) ? { ...t, open: false } : t));
4893
5053
  setTimeout(() => setToasts((prev) => prev.filter((t) => t.open || !isTarget(t))), REMOVE_DELAY);
4894
5054
  }, []);
4895
- const value4 = (0, import_react61.useMemo)(() => ({ toast: toast2, dismiss }), [toast2, dismiss]);
5055
+ const value4 = (0, import_react63.useMemo)(() => ({ toast: toast2, dismiss }), [toast2, dismiss]);
4896
5056
  return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ToastContext.Provider, { value: value4, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(RadixToast.Provider, { duration, label: label7, swipeDirection: "right", children: [
4897
5057
  children,
4898
5058
  toasts.map(({ id, open, title: title6, description: description9, color, duration: itemDuration, action: action3 }) => /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
@@ -4917,7 +5077,7 @@ function ToastProvider({ children, duration = 5e3, label: labelProp }) {
4917
5077
  ] }) });
4918
5078
  }
4919
5079
  function useToast() {
4920
- const context = (0, import_react61.useContext)(ToastContext);
5080
+ const context = (0, import_react63.useContext)(ToastContext);
4921
5081
  if (!context) throw new Error("useToast \uB294 ToastProvider \uC548\uC5D0\uC11C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4.");
4922
5082
  return context;
4923
5083
  }
@@ -4966,7 +5126,7 @@ function Tooltip({
4966
5126
  }
4967
5127
 
4968
5128
  // src/components/VerificationCodeInput/VerificationCodeInput.tsx
4969
- var import_react62 = require("react");
5129
+ var import_react64 = require("react");
4970
5130
 
4971
5131
  // src/components/VerificationCodeInput/VerificationCodeInput.css.ts
4972
5132
  var input5 = "ea01812";
@@ -4978,7 +5138,7 @@ var timer = "ea01814";
4978
5138
  // src/components/VerificationCodeInput/VerificationCodeInput.tsx
4979
5139
  var import_jsx_runtime58 = require("react/jsx-runtime");
4980
5140
  var formatTime = (seconds) => `${String(Math.floor(seconds / 60)).padStart(2, "0")}:${String(seconds % 60).padStart(2, "0")}`;
4981
- var VerificationCodeInput = /* @__PURE__ */ (0, import_react62.forwardRef)(
5141
+ var VerificationCodeInput = /* @__PURE__ */ (0, import_react64.forwardRef)(
4982
5142
  function VerificationCodeInput2(props, ref) {
4983
5143
  const {
4984
5144
  length = 6,
@@ -5005,23 +5165,23 @@ var VerificationCodeInput = /* @__PURE__ */ (0, import_react62.forwardRef)(
5005
5165
  const label7 = labelProp ?? m.verificationCode ?? "\uC778\uC99D\uBC88\uD638";
5006
5166
  const resendText = resendTextProp ?? m.resend ?? "\uC7AC\uC804\uC1A1";
5007
5167
  const expiredText = expiredTextProp ?? m.verificationExpired ?? "\uC778\uC99D \uC2DC\uAC04\uC774 \uC9C0\uB0AC\uC5B4\uC694. \uC7AC\uC804\uC1A1\uD574 \uC8FC\uC138\uC694.";
5008
- const generatedId = (0, import_react62.useId)();
5168
+ const generatedId = (0, import_react64.useId)();
5009
5169
  const inputId = id ?? generatedId;
5010
5170
  const helperId = `${inputId}-helper`;
5011
5171
  const statusId = `${inputId}-status`;
5012
- const inputRef = (0, import_react62.useRef)(null);
5172
+ const inputRef = (0, import_react64.useRef)(null);
5013
5173
  const isControlled = "value" in props;
5014
- const [innerValue, setInnerValue] = (0, import_react62.useState)(defaultValue ?? "");
5174
+ const [innerValue, setInnerValue] = (0, import_react64.useState)(defaultValue ?? "");
5015
5175
  const code = (isControlled ? value4 ?? "" : innerValue).slice(0, length);
5016
- const [focused, setFocused] = (0, import_react62.useState)(false);
5017
- const [endAt, setEndAt] = (0, import_react62.useState)(() => expiresIn ? Date.now() + expiresIn * 1e3 : null);
5018
- const [remaining, setRemaining] = (0, import_react62.useState)(expiresIn ?? 0);
5176
+ const [focused, setFocused] = (0, import_react64.useState)(false);
5177
+ const [endAt, setEndAt] = (0, import_react64.useState)(() => expiresIn ? Date.now() + expiresIn * 1e3 : null);
5178
+ const [remaining, setRemaining] = (0, import_react64.useState)(expiresIn ?? 0);
5019
5179
  const expired = expiresIn !== void 0 && remaining <= 0;
5020
- const onExpireRef = (0, import_react62.useRef)(onExpire);
5021
- (0, import_react62.useEffect)(() => {
5180
+ const onExpireRef = (0, import_react64.useRef)(onExpire);
5181
+ (0, import_react64.useEffect)(() => {
5022
5182
  onExpireRef.current = onExpire;
5023
5183
  });
5024
- (0, import_react62.useEffect)(() => {
5184
+ (0, import_react64.useEffect)(() => {
5025
5185
  if (endAt === null) return;
5026
5186
  const tick = () => {
5027
5187
  const left = Math.max(0, Math.ceil((endAt - Date.now()) / 1e3));
@@ -5035,6 +5195,12 @@ var VerificationCodeInput = /* @__PURE__ */ (0, import_react62.forwardRef)(
5035
5195
  tick();
5036
5196
  return () => clearInterval(timer2);
5037
5197
  }, [endAt]);
5198
+ useFormReset(inputRef, () => {
5199
+ if (isControlled) return;
5200
+ const next = defaultValue ?? "";
5201
+ setInnerValue(next);
5202
+ if (next !== code) onValueChange?.(next);
5203
+ });
5038
5204
  const setCode = (next) => {
5039
5205
  if (!isControlled) setInnerValue(next);
5040
5206
  onValueChange?.(next);