@bestow-ui/react 0.9.0 → 0.11.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.js CHANGED
@@ -121,9 +121,12 @@ function createIntentColors(intent, color) {
121
121
  subtleHover: rgba(darkSolid, 0.26),
122
122
  text: findReadable(darkBase, Math.max(darkBase.l, 0.75), 0.02, [darkBg, darkSubtleOnBg, darkSubtleHoverOnBg])
123
123
  };
124
+ const focusOn = (candidate, fallback2, bg) => contrastRatio(candidate, bg) >= 3 ? candidate : fallback2;
124
125
  const focus = intent === "primary" ? {
125
- light: { border: { focus: light.solid } },
126
- dark: { border: { focus: withL(darkBase, Math.min(1, darkBase.l + 0.06)) } }
126
+ light: { border: { focus: focusOn(light.solid, light.text, lightColors.bg.default) } },
127
+ dark: {
128
+ border: { focus: focusOn(withL(darkBase, Math.min(1, darkBase.l + 0.06)), dark.text, darkBg) }
129
+ }
127
130
  } : void 0;
128
131
  return {
129
132
  light: { color: { [intent]: light, ...focus?.light } },
@@ -136,19 +139,19 @@ import { assignInlineVars } from "@vanilla-extract/dynamic";
136
139
  function deepMerge(target, source) {
137
140
  if (!source) return target;
138
141
  const out = { ...target };
139
- for (const [key, value3] of Object.entries(source)) {
140
- if (value3 === void 0) continue;
142
+ for (const [key, value4] of Object.entries(source)) {
143
+ if (value4 === void 0) continue;
141
144
  const prev = out[key];
142
- out[key] = typeof value3 === "object" && typeof prev === "object" ? deepMerge(prev, value3) : value3;
145
+ out[key] = typeof value4 === "object" && typeof prev === "object" ? deepMerge(prev, value4) : value4;
143
146
  }
144
147
  return out;
145
148
  }
146
149
  function createTheme(...inputs) {
147
150
  let light = {};
148
151
  let dark = {};
149
- for (const input3 of inputs) {
150
- light = deepMerge(deepMerge(light, input3.common), input3.light);
151
- dark = deepMerge(deepMerge(dark, input3.common), input3.dark);
152
+ for (const input5 of inputs) {
153
+ light = deepMerge(deepMerge(light, input5.common), input5.light);
154
+ dark = deepMerge(deepMerge(dark, input5.common), input5.dark);
152
155
  }
153
156
  return Object.freeze({ light, dark });
154
157
  }
@@ -158,11 +161,11 @@ function mergeThemes(a, b) {
158
161
  return createTheme(a, b);
159
162
  }
160
163
  function flatten(partial, contract, out) {
161
- for (const [key, value3] of Object.entries(partial)) {
164
+ for (const [key, value4] of Object.entries(partial)) {
162
165
  const target = contract[key];
163
166
  if (target === void 0) continue;
164
- if (typeof target === "string" && typeof value3 === "string") out[target] = value3;
165
- else if (typeof target === "object" && typeof value3 === "object") flatten(value3, target, out);
167
+ if (typeof target === "string" && typeof value4 === "string") out[target] = value4;
168
+ else if (typeof target === "object" && typeof value4 === "object") flatten(value4, target, out);
166
169
  }
167
170
  return out;
168
171
  }
@@ -191,17 +194,17 @@ var ThemeProvider = /* @__PURE__ */ forwardRef(function ThemeProvider2({ theme:
191
194
  const parent = useContext(ThemeContext);
192
195
  const theme = themeProp ?? parent.theme;
193
196
  const merged = useMemo(() => mergeThemes(parent.overrides, overrides), [parent.overrides, overrides]);
194
- const value3 = useMemo(
197
+ const value4 = useMemo(
195
198
  () => ({ theme, overrides: merged, style: themeToStyle(merged, theme) }),
196
199
  [theme, merged]
197
200
  );
198
- return /* @__PURE__ */ jsx(ThemeContext.Provider, { value: value3, children: /* @__PURE__ */ jsx(
201
+ return /* @__PURE__ */ jsx(ThemeContext.Provider, { value: value4, children: /* @__PURE__ */ jsx(
199
202
  "div",
200
203
  {
201
204
  ref,
202
205
  "data-theme": theme,
203
206
  className: cx(themeClass[theme], root, className),
204
- style: value3.style ? { ...value3.style, ...style } : style,
207
+ style: value4.style ? { ...value4.style, ...style } : style,
205
208
  ...rest,
206
209
  children
207
210
  }
@@ -251,22 +254,638 @@ var AccordionItem = /* @__PURE__ */ forwardRef2(function AccordionItem2({ title:
251
254
  ] });
252
255
  });
253
256
 
254
- // src/components/Alert/Alert.tsx
257
+ // src/components/AddressInput/AddressInput.tsx
258
+ import { forwardRef as forwardRef7, useEffect, useId as useId2, useRef as useRef2, useState } from "react";
259
+
260
+ // src/components/Button/Button.tsx
261
+ import { forwardRef as forwardRef4 } from "react";
262
+
263
+ // src/components/Spinner/Spinner.tsx
264
+ import { LoaderIcon } from "@bestow-ui/icons";
255
265
  import { forwardRef as forwardRef3 } from "react";
256
- import { CircleAlertIcon, CircleCheckIcon, InfoIcon, TriangleAlertIcon, XIcon } from "@bestow-ui/icons";
257
266
 
258
- // src/components/Alert/Alert.css.ts
267
+ // src/styles/visuallyHidden.css.ts
268
+ var visuallyHidden = "_1kdtbw10";
269
+
270
+ // src/components/Spinner/Spinner.css.ts
259
271
  import { createRuntimeFn as _7a468 } from "@vanilla-extract/recipes/createRuntimeFn";
272
+ var spinner = /* @__PURE__ */ _7a468({ defaultClassName: "_4b5tg40", variantClassNames: { color: { current: "_4b5tg41", primary: "_4b5tg42", neutral: "_4b5tg43", danger: "_4b5tg44" }, size: { sm: "_4b5tg45", md: "_4b5tg46", lg: "_4b5tg47" } }, defaultVariants: { color: "current", size: "md" }, compoundVariants: [] });
273
+
274
+ // src/components/Spinner/Spinner.tsx
275
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
276
+ var Spinner = /* @__PURE__ */ forwardRef3(function Spinner2({ size, color, label: label6 = "\uB85C\uB529 \uC911", className, ...rest }, ref) {
277
+ const a11y = label6 ? { role: "status" } : { "aria-hidden": true };
278
+ return /* @__PURE__ */ jsxs2("span", { ref, className: cx(spinner({ size, color }), className), ...a11y, ...rest, children: [
279
+ /* @__PURE__ */ jsx3(LoaderIcon, { size: "100%" }),
280
+ label6 && /* @__PURE__ */ jsx3("span", { className: visuallyHidden, children: label6 })
281
+ ] });
282
+ });
283
+
284
+ // src/components/Button/Button.css.ts
285
+ import { createRuntimeFn as _7a4682 } from "@vanilla-extract/recipes/createRuntimeFn";
286
+ var button = /* @__PURE__ */ _7a4682({ defaultClassName: "xcekda6", variantClassNames: { variant: { solid: "xcekda7", soft: "xcekda8", outline: "xcekda9", ghost: "xcekdaa" }, color: { primary: "xcekdab", neutral: "xcekdac", danger: "xcekdad" }, size: { sm: "xcekdae", md: "xcekdaf", lg: "xcekdag" }, fullWidth: { true: "xcekdah" } }, defaultVariants: { variant: "solid", color: "primary", size: "md" }, compoundVariants: [] });
287
+ var icon = "xcekdai";
288
+
289
+ // src/components/Button/Button.tsx
290
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
291
+ var Button = /* @__PURE__ */ forwardRef4(function Button2({
292
+ variant,
293
+ color,
294
+ size,
295
+ fullWidth,
296
+ startIcon,
297
+ endIcon,
298
+ loading: loading2,
299
+ className,
300
+ type = "button",
301
+ onClick,
302
+ children,
303
+ ...rest
304
+ }, ref) {
305
+ const handleClick = (event) => {
306
+ if (loading2) {
307
+ event.preventDefault();
308
+ return;
309
+ }
310
+ onClick?.(event);
311
+ };
312
+ const leading = loading2 ? /* @__PURE__ */ jsx4(Spinner, { size: "sm", label: "" }) : startIcon;
313
+ return /* @__PURE__ */ jsxs3(
314
+ "button",
315
+ {
316
+ ref,
317
+ type,
318
+ className: cx(button({ variant, color, size, fullWidth }), className),
319
+ "aria-busy": loading2 || void 0,
320
+ "aria-disabled": loading2 || void 0,
321
+ onClick: handleClick,
322
+ ...rest,
323
+ children: [
324
+ leading && /* @__PURE__ */ jsx4("span", { className: icon, children: leading }),
325
+ children,
326
+ endIcon && /* @__PURE__ */ jsx4("span", { className: icon, children: endIcon })
327
+ ]
328
+ }
329
+ );
330
+ });
331
+
332
+ // src/components/Input/Input.css.ts
333
+ import { createRuntimeFn as _7a4683 } from "@vanilla-extract/recipes/createRuntimeFn";
334
+ var adornment = "_19p5zvh6";
335
+ var field = "_19p5zvh7";
336
+ var fieldFullWidth = "_19p5zvh8";
337
+ var helperText = /* @__PURE__ */ _7a4683({ defaultClassName: "_19p5zvhb", variantClassNames: { error: { true: "_19p5zvhc" } }, defaultVariants: {}, compoundVariants: [] });
338
+ var input = "_19p5zvh5";
339
+ var label = "_19p5zvh9";
340
+ var requiredMark = "_19p5zvha";
341
+ var root3 = /* @__PURE__ */ _7a4683({ defaultClassName: "_19p5zvh0", variantClassNames: { size: { sm: "_19p5zvh1", md: "_19p5zvh2", lg: "_19p5zvh3" }, fullWidth: { true: "_19p5zvh4" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
342
+
343
+ // src/components/Input/Input.tsx
344
+ import { forwardRef as forwardRef5 } from "react";
345
+ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
346
+ var Input = /* @__PURE__ */ forwardRef5(function Input2({ size, invalid, fullWidth, startAdornment, endAdornment, rootClassName, className, disabled, ...rest }, ref) {
347
+ return /* @__PURE__ */ jsxs4(
348
+ "div",
349
+ {
350
+ className: cx(root3({ size, fullWidth }), rootClassName),
351
+ "data-invalid": invalid || void 0,
352
+ "data-disabled": disabled || void 0,
353
+ children: [
354
+ startAdornment && /* @__PURE__ */ jsx5("span", { className: adornment, children: startAdornment }),
355
+ /* @__PURE__ */ jsx5(
356
+ "input",
357
+ {
358
+ ref,
359
+ className: cx(input, className),
360
+ disabled,
361
+ "aria-invalid": invalid || void 0,
362
+ ...rest
363
+ }
364
+ ),
365
+ endAdornment && /* @__PURE__ */ jsx5("span", { className: adornment, children: endAdornment })
366
+ ]
367
+ }
368
+ );
369
+ });
370
+
371
+ // src/components/Input/TextField.tsx
372
+ import { forwardRef as forwardRef6, useId } from "react";
373
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
374
+ var TextField = /* @__PURE__ */ forwardRef6(function TextField2({ label: label6, helperText: helperText3, error, required, fullWidth, id, "aria-describedby": ariaDescribedBy, ...rest }, ref) {
375
+ const generatedId = useId();
376
+ const inputId = id ?? generatedId;
377
+ const helperId = helperText3 ? `${inputId}-helper` : void 0;
378
+ return /* @__PURE__ */ jsxs5("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
379
+ label6 && /* @__PURE__ */ jsxs5("label", { htmlFor: inputId, className: label, children: [
380
+ label6,
381
+ required && /* @__PURE__ */ jsx6("span", { className: requiredMark, "aria-hidden": true, children: "*" })
382
+ ] }),
383
+ /* @__PURE__ */ jsx6(
384
+ Input,
385
+ {
386
+ ref,
387
+ id: inputId,
388
+ invalid: error,
389
+ required,
390
+ fullWidth,
391
+ "aria-describedby": cx(helperId, ariaDescribedBy) || void 0,
392
+ ...rest
393
+ }
394
+ ),
395
+ helperText3 && /* @__PURE__ */ jsx6("p", { id: helperId, className: helperText({ error }), children: helperText3 })
396
+ ] });
397
+ });
398
+
399
+ // src/components/Modal/Modal.tsx
400
+ import * as Dialog from "@radix-ui/react-dialog";
401
+ import { XIcon } from "@bestow-ui/icons";
402
+
403
+ // src/utils/useReturnFocus.ts
404
+ import { useRef } from "react";
405
+ function useReturnFocus(hasTrigger, onCloseAutoFocus) {
406
+ const returnTo = useRef(null);
407
+ return {
408
+ onOpenAutoFocus: () => {
409
+ returnTo.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
410
+ },
411
+ onCloseAutoFocus: (event) => {
412
+ onCloseAutoFocus?.(event);
413
+ if (event.defaultPrevented || hasTrigger) return;
414
+ const target = returnTo.current;
415
+ if (target && target.isConnected && target !== document.body) {
416
+ event.preventDefault();
417
+ target.focus();
418
+ }
419
+ }
420
+ };
421
+ }
422
+
423
+ // src/components/Modal/Modal.css.ts
424
+ import { createRuntimeFn as _7a4684 } from "@vanilla-extract/recipes/createRuntimeFn";
425
+ var body = "_1pdsmv0a";
426
+ var closeButton = "_1pdsmv09";
427
+ var content2 = /* @__PURE__ */ _7a4684({ defaultClassName: "_1pdsmv01", variantClassNames: { size: { sm: "_1pdsmv02", md: "_1pdsmv03", lg: "_1pdsmv04" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
428
+ var description = "_1pdsmv08";
429
+ var footer = "_1pdsmv0b";
430
+ var header2 = "_1pdsmv05";
431
+ var headings = "_1pdsmv06";
432
+ var overlay = "_1pdsmv00";
433
+ var title = "_1pdsmv07";
434
+
435
+ // src/components/Modal/Modal.tsx
436
+ import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
437
+ function Modal({
438
+ open,
439
+ defaultOpen,
440
+ onOpenChange,
441
+ trigger: trigger4,
442
+ title: title6,
443
+ description: description6,
444
+ children,
445
+ footer: footer6,
446
+ size,
447
+ hideCloseButton = false,
448
+ closeOnOverlayClick = true,
449
+ className,
450
+ onCloseAutoFocus
451
+ }) {
452
+ const portal2 = usePortalProps();
453
+ const focus = useReturnFocus(Boolean(trigger4), onCloseAutoFocus);
454
+ return /* @__PURE__ */ jsxs6(Dialog.Root, { open, defaultOpen, onOpenChange, children: [
455
+ trigger4 && /* @__PURE__ */ jsx7(Dialog.Trigger, { asChild: true, children: trigger4 }),
456
+ /* @__PURE__ */ jsxs6(Dialog.Portal, { children: [
457
+ /* @__PURE__ */ jsx7(Dialog.Overlay, { className: cx(portal2.className, overlay), style: portal2.style }),
458
+ /* @__PURE__ */ jsxs6(
459
+ Dialog.Content,
460
+ {
461
+ className: cx(portal2.className, content2({ size }), className),
462
+ style: portal2.style,
463
+ onPointerDownOutside: closeOnOverlayClick ? void 0 : (event) => event.preventDefault(),
464
+ onOpenAutoFocus: focus.onOpenAutoFocus,
465
+ onCloseAutoFocus: focus.onCloseAutoFocus,
466
+ ...description6 ? {} : { "aria-describedby": void 0 },
467
+ children: [
468
+ /* @__PURE__ */ jsxs6("div", { className: header2, children: [
469
+ /* @__PURE__ */ jsxs6("div", { className: headings, children: [
470
+ /* @__PURE__ */ jsx7(Dialog.Title, { className: title, children: title6 }),
471
+ description6 && /* @__PURE__ */ jsx7(Dialog.Description, { className: description, children: description6 })
472
+ ] }),
473
+ !hideCloseButton && /* @__PURE__ */ jsx7(Dialog.Close, { className: closeButton, "aria-label": "\uB2EB\uAE30", children: /* @__PURE__ */ jsx7(XIcon, { size: 16 }) })
474
+ ] }),
475
+ children && /* @__PURE__ */ jsx7("div", { className: body, children }),
476
+ footer6 && /* @__PURE__ */ jsx7("div", { className: footer, children: footer6 })
477
+ ]
478
+ }
479
+ )
480
+ ] })
481
+ ] });
482
+ }
483
+ var ModalClose = Dialog.Close;
484
+
485
+ // src/components/AddressInput/addressProviders.ts
486
+ var KAKAO_POSTCODE_SRC = "https://t1.kakaocdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js";
487
+ var loading = null;
488
+ function loadKakaoPostcode() {
489
+ const w = window;
490
+ const existing = w.kakao?.Postcode ?? w.daum?.Postcode;
491
+ if (existing) return Promise.resolve(existing);
492
+ loading ?? (loading = new Promise((resolve, reject) => {
493
+ const script = document.createElement("script");
494
+ script.src = KAKAO_POSTCODE_SRC;
495
+ script.async = true;
496
+ script.onload = () => {
497
+ const ctor = w.kakao?.Postcode ?? w.daum?.Postcode;
498
+ if (ctor) resolve(ctor);
499
+ else reject(new Error("\uC6B0\uD3B8\uBC88\uD638 \uC11C\uBE44\uC2A4\uB97C \uCC3E\uC9C0 \uBABB\uD588\uC5B4\uC694"));
500
+ };
501
+ script.onerror = () => {
502
+ loading = null;
503
+ reject(new Error("\uC6B0\uD3B8\uBC88\uD638 \uC11C\uBE44\uC2A4\uB97C \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC5B4\uC694"));
504
+ };
505
+ document.head.appendChild(script);
506
+ }));
507
+ return loading;
508
+ }
509
+ function composeExtraAddress(data) {
510
+ if (data.userSelectedType !== "R") return "";
511
+ const parts = [];
512
+ if (data.bname && /[동로가]$/.test(data.bname)) parts.push(data.bname);
513
+ if (data.buildingName && data.apartment === "Y") parts.push(data.buildingName);
514
+ return parts.length ? ` (${parts.join(", ")})` : "";
515
+ }
516
+ var kakaoPostcodeProvider = async (container2, onSelect) => {
517
+ const Postcode = await loadKakaoPostcode();
518
+ new Postcode({
519
+ width: "100%",
520
+ height: "100%",
521
+ oncomplete: (data) => {
522
+ const address = data.userSelectedType === "R" ? data.roadAddress : data.jibunAddress || data.autoJibunAddress || "";
523
+ onSelect({ zonecode: data.zonecode, address, extraAddress: composeExtraAddress(data) });
524
+ }
525
+ }).embed(container2);
526
+ };
527
+
528
+ // src/components/AddressInput/AddressInput.css.ts
529
+ var fieldset = "_16fi7uy0";
530
+ var legend = "_16fi7uy1";
531
+ var row = "_16fi7uy2";
532
+ var searchArea = "_16fi7uy4";
533
+ var searchStatus = "_16fi7uy5";
534
+ var zonecode = "_16fi7uy3";
535
+
536
+ // src/components/AddressInput/AddressInput.tsx
537
+ import { Fragment, jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
538
+ var EMPTY = { zonecode: "", address: "", extraAddress: "", detail: "" };
539
+ function SearchArea({
540
+ provider,
541
+ onSelect,
542
+ loadErrorText
543
+ }) {
544
+ const containerRef = useRef2(null);
545
+ const [status, setStatus] = useState("loading");
546
+ const onSelectRef = useRef2(onSelect);
547
+ useEffect(() => {
548
+ onSelectRef.current = onSelect;
549
+ });
550
+ useEffect(() => {
551
+ const container2 = containerRef.current;
552
+ if (!container2) return;
553
+ let cleanup;
554
+ let cancelled = false;
555
+ Promise.resolve().then(() => provider(container2, (result) => onSelectRef.current(result))).then((fn) => {
556
+ if (cancelled) fn?.();
557
+ else {
558
+ cleanup = fn;
559
+ setStatus("ready");
560
+ }
561
+ }).catch(() => !cancelled && setStatus("error"));
562
+ return () => {
563
+ cancelled = true;
564
+ cleanup?.();
565
+ };
566
+ }, [provider]);
567
+ return /* @__PURE__ */ jsxs7("div", { className: searchArea, children: [
568
+ /* @__PURE__ */ jsx8("div", { ref: containerRef, style: { width: "100%", height: "100%" } }),
569
+ status !== "ready" && /* @__PURE__ */ jsx8("div", { className: searchStatus, role: "status", children: status === "loading" ? /* @__PURE__ */ jsx8(Spinner, { label: "\uC8FC\uC18C \uAC80\uC0C9\uC744 \uBD88\uB7EC\uC624\uB294 \uC911" }) : loadErrorText })
570
+ ] });
571
+ }
572
+ var AddressInput = /* @__PURE__ */ forwardRef7(
573
+ function AddressInput2(props, ref) {
574
+ const {
575
+ value: value4,
576
+ defaultValue,
577
+ onValueChange,
578
+ label: label6 = "\uC8FC\uC18C",
579
+ required,
580
+ helperText: helperText3,
581
+ error,
582
+ disabled,
583
+ provider = kakaoPostcodeProvider,
584
+ searchLabel = "\uC8FC\uC18C \uAC80\uC0C9",
585
+ detailPlaceholder = "\uC0C1\uC138 \uC8FC\uC18C (\uB3D9\xB7\uD638\uC218 \uB4F1)",
586
+ loadErrorText = "\uC8FC\uC18C \uAC80\uC0C9\uC744 \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC5B4\uC694. \uC7A0\uC2DC \uB4A4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574 \uC8FC\uC138\uC694.",
587
+ name,
588
+ className
589
+ } = props;
590
+ const baseId = useId2();
591
+ const helperId = helperText3 ? `${baseId}-helper` : void 0;
592
+ const detailRef = useRef2(null);
593
+ const selectedRef = useRef2(false);
594
+ const [open, setOpen] = useState(false);
595
+ const isControlled = "value" in props;
596
+ const [innerValue, setInnerValue] = useState(defaultValue ?? EMPTY);
597
+ const current2 = isControlled ? value4 ?? EMPTY : innerValue;
598
+ const update = (next) => {
599
+ if (!isControlled) setInnerValue(next);
600
+ onValueChange?.(next);
601
+ };
602
+ const openSearch = () => {
603
+ if (disabled) return;
604
+ selectedRef.current = false;
605
+ setOpen(true);
606
+ };
607
+ const handleSelect = (result) => {
608
+ selectedRef.current = true;
609
+ update({
610
+ ...current2,
611
+ zonecode: result.zonecode,
612
+ address: result.address,
613
+ extraAddress: result.extraAddress ?? ""
614
+ });
615
+ setOpen(false);
616
+ };
617
+ const fullAddress = `${current2.address}${current2.extraAddress ?? ""}`;
618
+ return /* @__PURE__ */ jsxs7("fieldset", { ref, className: cx(fieldset, className), disabled, "aria-describedby": helperId, children: [
619
+ /* @__PURE__ */ jsxs7("legend", { className: legend, children: [
620
+ label6,
621
+ required && /* @__PURE__ */ jsx8("span", { className: requiredMark, "aria-hidden": true, children: "*" })
622
+ ] }),
623
+ /* @__PURE__ */ jsxs7("div", { className: row, children: [
624
+ /* @__PURE__ */ jsx8(
625
+ TextField,
626
+ {
627
+ "aria-label": "\uC6B0\uD3B8\uBC88\uD638",
628
+ readOnly: true,
629
+ value: current2.zonecode,
630
+ placeholder: "\uC6B0\uD3B8\uBC88\uD638",
631
+ error: error && !current2.zonecode,
632
+ "aria-required": required || void 0,
633
+ rootClassName: zonecode,
634
+ onClick: openSearch
635
+ }
636
+ ),
637
+ /* @__PURE__ */ jsx8(Button, { variant: "outline", color: "neutral", onClick: openSearch, disabled, children: searchLabel })
638
+ ] }),
639
+ /* @__PURE__ */ jsx8(
640
+ TextField,
641
+ {
642
+ "aria-label": "\uAE30\uBCF8 \uC8FC\uC18C",
643
+ readOnly: true,
644
+ value: fullAddress,
645
+ placeholder: `${searchLabel}\uC744 \uB20C\uB7EC \uC8FC\uC18C\uB97C \uACE0\uB974\uC138\uC694`,
646
+ error: error && !current2.address,
647
+ "aria-required": required || void 0,
648
+ fullWidth: true,
649
+ onClick: openSearch
650
+ }
651
+ ),
652
+ /* @__PURE__ */ jsx8(
653
+ TextField,
654
+ {
655
+ ref: detailRef,
656
+ "aria-label": "\uC0C1\uC138 \uC8FC\uC18C",
657
+ value: current2.detail,
658
+ placeholder: detailPlaceholder,
659
+ onChange: (event) => update({ ...current2, detail: event.target.value }),
660
+ autoComplete: "address-line2",
661
+ fullWidth: true
662
+ }
663
+ ),
664
+ helperText3 && /* @__PURE__ */ jsx8("p", { id: helperId, className: helperText({ error }), children: helperText3 }),
665
+ name && /* @__PURE__ */ jsxs7(Fragment, { children: [
666
+ /* @__PURE__ */ jsx8("input", { type: "hidden", name: `${name}[zonecode]`, value: current2.zonecode }),
667
+ /* @__PURE__ */ jsx8("input", { type: "hidden", name: `${name}[address]`, value: fullAddress }),
668
+ /* @__PURE__ */ jsx8("input", { type: "hidden", name: `${name}[detail]`, value: current2.detail })
669
+ ] }),
670
+ /* @__PURE__ */ jsx8(
671
+ Modal,
672
+ {
673
+ open,
674
+ onOpenChange: setOpen,
675
+ title: searchLabel,
676
+ description: "\uB3C4\uB85C\uBA85, \uAC74\uBB3C\uBA85, \uC9C0\uBC88\uC73C\uB85C \uAC80\uC0C9\uD560 \uC218 \uC788\uC5B4\uC694.",
677
+ onCloseAutoFocus: (event) => {
678
+ if (selectedRef.current) {
679
+ event.preventDefault();
680
+ detailRef.current?.focus();
681
+ }
682
+ },
683
+ children: /* @__PURE__ */ jsx8(SearchArea, { provider, onSelect: handleSelect, loadErrorText })
684
+ }
685
+ )
686
+ ] });
687
+ }
688
+ );
689
+
690
+ // src/components/AgreementGroup/AgreementGroup.tsx
691
+ import { forwardRef as forwardRef9, useId as useId3, useState as useState2 } from "react";
692
+ import { ChevronDownIcon as ChevronDownIcon2 } from "@bestow-ui/icons";
693
+
694
+ // src/components/Checkbox/Checkbox.tsx
695
+ import { forwardRef as forwardRef8, useEffect as useEffect2, useRef as useRef3 } from "react";
696
+
697
+ // src/utils/mergeRefs.ts
698
+ function mergeRefs(...refs) {
699
+ return (value4) => {
700
+ for (const ref of refs) {
701
+ if (typeof ref === "function") ref(value4);
702
+ else if (ref) ref.current = value4;
703
+ }
704
+ };
705
+ }
706
+
707
+ // src/components/Checkbox/Checkbox.css.ts
708
+ import { createRuntimeFn as _7a4685 } from "@vanilla-extract/recipes/createRuntimeFn";
709
+ var checkIcon = "_1y7mzsn8 _1y7mzsn7";
710
+ var control = /* @__PURE__ */ _7a4685({ defaultClassName: "_1y7mzsn3", variantClassNames: { size: { sm: "_1y7mzsn4", md: "_1y7mzsn5" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
711
+ var indeterminateIcon = "_1y7mzsn9 _1y7mzsn7";
712
+ var input2 = "_1y7mzsn6";
713
+ var root4 = /* @__PURE__ */ _7a4685({ defaultClassName: "_1y7mzsn0", variantClassNames: { size: { sm: "_1y7mzsn1", md: "_1y7mzsn2" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
714
+
715
+ // src/components/Checkbox/Checkbox.tsx
716
+ import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
717
+ var Checkbox = /* @__PURE__ */ forwardRef8(function Checkbox2({ label: label6, size, indeterminate = false, invalid, disabled, className, ...rest }, ref) {
718
+ const innerRef = useRef3(null);
719
+ useEffect2(() => {
720
+ if (innerRef.current) innerRef.current.indeterminate = indeterminate;
721
+ }, [indeterminate]);
722
+ return /* @__PURE__ */ jsxs8("label", { className: cx(root4({ size }), className), "data-disabled": disabled || void 0, children: [
723
+ /* @__PURE__ */ jsxs8("span", { className: control({ size }), children: [
724
+ /* @__PURE__ */ jsx9(
725
+ "input",
726
+ {
727
+ ref: mergeRefs(innerRef, ref),
728
+ type: "checkbox",
729
+ className: input2,
730
+ disabled,
731
+ "aria-invalid": invalid || void 0,
732
+ ...rest
733
+ }
734
+ ),
735
+ /* @__PURE__ */ jsx9("svg", { className: checkIcon, viewBox: "0 0 20 20", fill: "none", "aria-hidden": true, children: /* @__PURE__ */ jsx9(
736
+ "path",
737
+ {
738
+ d: "M5 10.5l3.2 3L15 7",
739
+ stroke: "currentColor",
740
+ strokeWidth: "2",
741
+ strokeLinecap: "round",
742
+ strokeLinejoin: "round"
743
+ }
744
+ ) }),
745
+ /* @__PURE__ */ jsx9("svg", { className: indeterminateIcon, viewBox: "0 0 20 20", fill: "none", "aria-hidden": true, children: /* @__PURE__ */ jsx9("path", { d: "M6 10h8", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) })
746
+ ] }),
747
+ label6
748
+ ] });
749
+ });
750
+
751
+ // src/components/AgreementGroup/AgreementGroup.css.ts
752
+ var all = "j3uxdc3";
753
+ var box = "j3uxdc2";
754
+ var chevron2 = "j3uxdc9";
755
+ var content3 = "j3uxdca";
756
+ var fieldset2 = "j3uxdc0";
757
+ var item2 = "j3uxdc5";
758
+ var legend2 = "j3uxdc1";
759
+ var list = "j3uxdc4";
760
+ var row2 = "j3uxdc6";
761
+ var tag = "j3uxdc7";
762
+ var toggle = "j3uxdc8";
763
+
764
+ // src/components/AgreementGroup/AgreementGroup.tsx
765
+ import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
766
+ function hasAllRequiredAgreements(items2, value4) {
767
+ return items2.every((item7) => !item7.required || value4.includes(item7.value));
768
+ }
769
+ var AgreementGroup = /* @__PURE__ */ forwardRef9(
770
+ function AgreementGroup2(props, ref) {
771
+ const {
772
+ items: items2,
773
+ value: value4,
774
+ defaultValue,
775
+ onValueChange,
776
+ label: label6,
777
+ allLabel = "\uC804\uCCB4 \uB3D9\uC758",
778
+ helperText: helperText3,
779
+ error,
780
+ disabled,
781
+ requiredText = "\uD544\uC218",
782
+ optionalText = "\uC120\uD0DD",
783
+ showText = "\uBCF4\uAE30",
784
+ hideText = "\uC811\uAE30",
785
+ name,
786
+ className
787
+ } = props;
788
+ const baseId = useId3();
789
+ const helperId = helperText3 ? `${baseId}-helper` : void 0;
790
+ const isControlled = "value" in props;
791
+ const [innerValue, setInnerValue] = useState2(defaultValue ?? []);
792
+ const agreed = isControlled ? value4 ?? [] : innerValue;
793
+ const [expanded, setExpanded] = useState2([]);
794
+ const update = (next) => {
795
+ if (!isControlled) setInnerValue(next);
796
+ onValueChange?.(next);
797
+ };
798
+ const allValues = items2.map((item7) => item7.value);
799
+ const agreedCount = allValues.filter((v) => agreed.includes(v)).length;
800
+ const allChecked = items2.length > 0 && agreedCount === items2.length;
801
+ const toggleItem = (itemValue, checked) => update(checked ? [...agreed.filter((v) => v !== itemValue), itemValue] : agreed.filter((v) => v !== itemValue));
802
+ return /* @__PURE__ */ jsxs9(
803
+ "fieldset",
804
+ {
805
+ ref,
806
+ className: cx(fieldset2, className),
807
+ disabled,
808
+ "aria-describedby": helperId,
809
+ "data-invalid": error || void 0,
810
+ children: [
811
+ label6 && /* @__PURE__ */ jsx10("legend", { className: legend2, children: label6 }),
812
+ /* @__PURE__ */ jsxs9("div", { className: box, children: [
813
+ /* @__PURE__ */ jsx10("div", { className: all, children: /* @__PURE__ */ jsx10(
814
+ Checkbox,
815
+ {
816
+ label: allLabel,
817
+ checked: allChecked,
818
+ indeterminate: agreedCount > 0 && !allChecked,
819
+ onChange: (event) => update(event.target.checked ? allValues : [])
820
+ }
821
+ ) }),
822
+ /* @__PURE__ */ jsx10("ul", { className: list, children: items2.map((item7) => {
823
+ const labelId = `${baseId}-${item7.value}-label`;
824
+ const toggleTextId = `${baseId}-${item7.value}-toggle`;
825
+ const contentId = `${baseId}-${item7.value}-content`;
826
+ const isOpen = expanded.includes(item7.value);
827
+ return /* @__PURE__ */ jsxs9("li", { className: item2, children: [
828
+ /* @__PURE__ */ jsxs9("div", { className: row2, children: [
829
+ /* @__PURE__ */ jsx10(
830
+ Checkbox,
831
+ {
832
+ size: "sm",
833
+ checked: agreed.includes(item7.value),
834
+ invalid: error && item7.required && !agreed.includes(item7.value),
835
+ onChange: (event) => toggleItem(item7.value, event.target.checked),
836
+ label: /* @__PURE__ */ jsxs9("span", { id: labelId, children: [
837
+ /* @__PURE__ */ jsx10("span", { className: tag, "data-required": item7.required || void 0, children: item7.required ? requiredText : optionalText }),
838
+ " ",
839
+ item7.label
840
+ ] })
841
+ }
842
+ ),
843
+ item7.content && /* @__PURE__ */ jsxs9(
844
+ "button",
845
+ {
846
+ type: "button",
847
+ className: toggle,
848
+ "aria-expanded": isOpen,
849
+ "aria-controls": contentId,
850
+ "aria-labelledby": `${labelId} ${toggleTextId}`,
851
+ onClick: () => setExpanded((prev) => isOpen ? prev.filter((v) => v !== item7.value) : [...prev, item7.value]),
852
+ children: [
853
+ /* @__PURE__ */ jsx10("span", { id: toggleTextId, children: isOpen ? hideText : showText }),
854
+ /* @__PURE__ */ jsx10(ChevronDownIcon2, { size: 14, className: chevron2 })
855
+ ]
856
+ }
857
+ )
858
+ ] }),
859
+ item7.content && isOpen && // 내용이 길면 스크롤된다 — 키보드로도 스크롤할 수 있게 포커스를 받는 이름 있는 영역으로 둔다
860
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
861
+ /* @__PURE__ */ jsx10("div", { id: contentId, role: "region", "aria-labelledby": labelId, tabIndex: 0, className: content3, children: item7.content })
862
+ ] }, item7.value);
863
+ }) })
864
+ ] }),
865
+ name && agreed.map((v) => /* @__PURE__ */ jsx10("input", { type: "hidden", name, value: v }, v)),
866
+ helperText3 && /* @__PURE__ */ jsx10("p", { id: helperId, className: helperText({ error }), children: helperText3 })
867
+ ]
868
+ }
869
+ );
870
+ }
871
+ );
872
+
873
+ // src/components/Alert/Alert.tsx
874
+ import { forwardRef as forwardRef10 } from "react";
875
+ import { CircleAlertIcon, CircleCheckIcon, InfoIcon, TriangleAlertIcon, XIcon as XIcon2 } from "@bestow-ui/icons";
876
+
877
+ // src/components/Alert/Alert.css.ts
878
+ import { createRuntimeFn as _7a4686 } from "@vanilla-extract/recipes/createRuntimeFn";
260
879
  var action = "bsmpc0j";
261
- var alert = /* @__PURE__ */ _7a468({ defaultClassName: "bsmpc06", variantClassNames: { variant: { soft: "bsmpc07", outline: "bsmpc08", solid: "bsmpc09" }, color: { primary: "bsmpc0a", neutral: "bsmpc0b", danger: "bsmpc0c", success: "bsmpc0d", warning: "bsmpc0e" } }, defaultVariants: { variant: "soft", color: "primary" }, compoundVariants: [] });
262
- var closeButton = "bsmpc0k";
263
- var content2 = "bsmpc0g";
264
- var description = "bsmpc0i";
265
- var icon = "bsmpc0f";
266
- var title = "bsmpc0h";
880
+ var alert = /* @__PURE__ */ _7a4686({ defaultClassName: "bsmpc06", variantClassNames: { variant: { soft: "bsmpc07", outline: "bsmpc08", solid: "bsmpc09" }, color: { primary: "bsmpc0a", neutral: "bsmpc0b", danger: "bsmpc0c", success: "bsmpc0d", warning: "bsmpc0e" } }, defaultVariants: { variant: "soft", color: "primary" }, compoundVariants: [] });
881
+ var closeButton2 = "bsmpc0k";
882
+ var content4 = "bsmpc0g";
883
+ var description2 = "bsmpc0i";
884
+ var icon2 = "bsmpc0f";
885
+ var title2 = "bsmpc0h";
267
886
 
268
887
  // src/components/Alert/Alert.tsx
269
- import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
888
+ import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
270
889
  var defaultIcons = {
271
890
  primary: InfoIcon,
272
891
  neutral: InfoIcon,
@@ -274,85 +893,272 @@ var defaultIcons = {
274
893
  warning: TriangleAlertIcon,
275
894
  danger: CircleAlertIcon
276
895
  };
277
- var Alert = /* @__PURE__ */ forwardRef3(function Alert2({ variant, color = "primary", title: title6, icon: icon6, action: action3, onClose, closeLabel = "\uB2EB\uAE30", className, children, ...rest }, ref) {
896
+ var Alert = /* @__PURE__ */ forwardRef10(function Alert2({ variant, color = "primary", title: title6, icon: icon6, action: action3, onClose, closeLabel = "\uB2EB\uAE30", className, children, ...rest }, ref) {
278
897
  const DefaultIcon = defaultIcons[color];
279
- const iconNode = icon6 === void 0 ? /* @__PURE__ */ jsx3(DefaultIcon, { size: 18 }) : icon6;
280
- return /* @__PURE__ */ jsxs2("div", { ref, className: cx(alert({ variant, color }), className), ...rest, children: [
281
- iconNode !== false && iconNode !== null && /* @__PURE__ */ jsx3("span", { className: icon, "aria-hidden": true, children: iconNode }),
282
- /* @__PURE__ */ jsxs2("div", { className: content2, children: [
283
- title6 && /* @__PURE__ */ jsx3("div", { className: title, children: title6 }),
284
- children && /* @__PURE__ */ jsx3("div", { className: description, children })
898
+ const iconNode = icon6 === void 0 ? /* @__PURE__ */ jsx11(DefaultIcon, { size: 18 }) : icon6;
899
+ return /* @__PURE__ */ jsxs10("div", { ref, className: cx(alert({ variant, color }), className), ...rest, children: [
900
+ iconNode !== false && iconNode !== null && /* @__PURE__ */ jsx11("span", { className: icon2, "aria-hidden": true, children: iconNode }),
901
+ /* @__PURE__ */ jsxs10("div", { className: content4, children: [
902
+ title6 && /* @__PURE__ */ jsx11("div", { className: title2, children: title6 }),
903
+ children && /* @__PURE__ */ jsx11("div", { className: description2, children })
285
904
  ] }),
286
- action3 && /* @__PURE__ */ jsx3("div", { className: action, children: action3 }),
287
- onClose && /* @__PURE__ */ jsx3("button", { type: "button", className: closeButton, "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx3(XIcon, { size: 16 }) })
905
+ action3 && /* @__PURE__ */ jsx11("div", { className: action, children: action3 }),
906
+ onClose && /* @__PURE__ */ jsx11("button", { type: "button", className: closeButton2, "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx11(XIcon2, { size: 16 }) })
288
907
  ] });
289
908
  });
290
909
 
910
+ // src/components/AmountInput/AmountInput.tsx
911
+ import { forwardRef as forwardRef11, useRef as useRef5 } from "react";
912
+
913
+ // src/utils/koreanFormat.ts
914
+ var onlyDigits = (input5) => input5.replace(/\D/g, "");
915
+ function phoneNumberMaxDigits(digits) {
916
+ if (digits.startsWith("02")) return 10;
917
+ if (/^1[568]/.test(digits)) return 8;
918
+ return 11;
919
+ }
920
+ function formatPhoneNumber(input5) {
921
+ const d = onlyDigits(input5).slice(0, phoneNumberMaxDigits(onlyDigits(input5)));
922
+ if (d.startsWith("02")) {
923
+ if (d.length <= 2) return d;
924
+ if (d.length <= 5) return `${d.slice(0, 2)}-${d.slice(2)}`;
925
+ if (d.length <= 9) return `${d.slice(0, 2)}-${d.slice(2, 5)}-${d.slice(5)}`;
926
+ return `${d.slice(0, 2)}-${d.slice(2, 6)}-${d.slice(6)}`;
927
+ }
928
+ if (/^1[568]/.test(d)) {
929
+ return d.length <= 4 ? d : `${d.slice(0, 4)}-${d.slice(4)}`;
930
+ }
931
+ if (d.length <= 3) return d;
932
+ if (d.length <= 6) return `${d.slice(0, 3)}-${d.slice(3)}`;
933
+ if (d.length <= 10) return `${d.slice(0, 3)}-${d.slice(3, 6)}-${d.slice(6)}`;
934
+ return `${d.slice(0, 3)}-${d.slice(3, 7)}-${d.slice(7)}`;
935
+ }
936
+ function formatBusinessNumber(input5) {
937
+ const d = onlyDigits(input5).slice(0, 10);
938
+ if (d.length <= 3) return d;
939
+ if (d.length <= 5) return `${d.slice(0, 3)}-${d.slice(3)}`;
940
+ return `${d.slice(0, 3)}-${d.slice(3, 5)}-${d.slice(5)}`;
941
+ }
942
+ function isValidBusinessNumber(input5) {
943
+ const d = onlyDigits(input5);
944
+ if (d.length !== 10) return false;
945
+ const weights = [1, 3, 7, 1, 3, 7, 1, 3, 5];
946
+ const digits = [...d].map(Number);
947
+ let sum = weights.reduce((acc, w, i) => acc + w * digits[i], 0);
948
+ sum += Math.floor(digits[8] * 5 / 10);
949
+ return (10 - sum % 10) % 10 === digits[9];
950
+ }
951
+ function formatKoreanAmount(amount, unit = "\uC6D0") {
952
+ const n = Math.floor(Math.abs(amount));
953
+ if (n === 0) return `0${unit}`;
954
+ const units = [
955
+ { value: 1e12, label: "\uC870" },
956
+ { value: 1e8, label: "\uC5B5" },
957
+ { value: 1e4, label: "\uB9CC" },
958
+ { value: 1, label: "" }
959
+ ];
960
+ let rest = n;
961
+ const parts = [];
962
+ for (const u of units) {
963
+ const q = Math.floor(rest / u.value);
964
+ rest %= u.value;
965
+ if (q > 0) parts.push(`${q.toLocaleString("ko-KR")}${u.label}`);
966
+ }
967
+ return `${amount < 0 ? "-" : ""}${parts.join(" ")}${unit}`;
968
+ }
969
+
970
+ // src/utils/useFormattedInput.ts
971
+ import { useLayoutEffect, useRef as useRef4, useState as useState3 } from "react";
972
+ function caretAfter(display, count2, isMeaningful) {
973
+ if (count2 <= 0) return 0;
974
+ let seen = 0;
975
+ for (let i = 0; i < display.length; i++) {
976
+ if (isMeaningful(display[i])) seen++;
977
+ if (seen === count2) return i + 1;
978
+ }
979
+ return display.length;
980
+ }
981
+ function useFormattedInput({
982
+ isControlled,
983
+ value: value4,
984
+ defaultValue,
985
+ onValueChange,
986
+ sanitize: sanitize3,
987
+ format,
988
+ isMeaningful,
989
+ inputRef
990
+ }) {
991
+ const [innerValue, setInnerValue] = useState3(() => sanitize3(defaultValue ?? ""));
992
+ const raw = isControlled ? sanitize3(value4 ?? "") : innerValue;
993
+ const display = format(raw);
994
+ const pendingCaret = useRef4(null);
995
+ useLayoutEffect(() => {
996
+ const input5 = inputRef.current;
997
+ if (pendingCaret.current === null || !input5 || document.activeElement !== input5) return;
998
+ const position = caretAfter(input5.value, pendingCaret.current, isMeaningful);
999
+ input5.setSelectionRange(position, position);
1000
+ pendingCaret.current = null;
1001
+ });
1002
+ const commit = (next, caretCount) => {
1003
+ pendingCaret.current = caretCount;
1004
+ if (!isControlled) setInnerValue(next);
1005
+ if (next !== raw) onValueChange?.(next);
1006
+ };
1007
+ const onChange = (event) => {
1008
+ const { value: typed, selectionStart } = event.target;
1009
+ const next = sanitize3(typed);
1010
+ const before = sanitize3(typed.slice(0, selectionStart ?? typed.length));
1011
+ commit(next, Math.min(before.length, next.length));
1012
+ };
1013
+ const onKeyDown = (event) => {
1014
+ const input5 = event.currentTarget;
1015
+ const { selectionStart: start, selectionEnd: end } = input5;
1016
+ if (start === null || start !== end) return;
1017
+ const countBefore = (text2) => [...text2].filter(isMeaningful).length;
1018
+ if (event.key === "Backspace" && start > 0 && !isMeaningful(input5.value[start - 1])) {
1019
+ const index = countBefore(input5.value.slice(0, start)) - 1;
1020
+ if (index < 0) return;
1021
+ event.preventDefault();
1022
+ commit(raw.slice(0, index) + raw.slice(index + 1), index);
1023
+ } else if (event.key === "Delete" && start < input5.value.length && !isMeaningful(input5.value[start])) {
1024
+ const index = countBefore(input5.value.slice(0, start));
1025
+ if (index >= raw.length) return;
1026
+ event.preventDefault();
1027
+ commit(raw.slice(0, index) + raw.slice(index + 1), index);
1028
+ }
1029
+ };
1030
+ return { raw, display, onChange, onKeyDown };
1031
+ }
1032
+
1033
+ // src/components/AmountInput/AmountInput.css.ts
1034
+ var input3 = "_70qkav0";
1035
+
1036
+ // src/components/AmountInput/AmountInput.tsx
1037
+ import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
1038
+ var MAX_DIGITS = 15;
1039
+ var isDigit = (char) => /\d/.test(char);
1040
+ var AmountInput = /* @__PURE__ */ forwardRef11(
1041
+ function AmountInput2(props, ref) {
1042
+ const {
1043
+ value: value4,
1044
+ defaultValue,
1045
+ onValueChange,
1046
+ max,
1047
+ unit = "\uC6D0",
1048
+ showKoreanAmount = true,
1049
+ label: label6 = "\uAE08\uC561",
1050
+ placeholder = "0",
1051
+ helperText: helperText3,
1052
+ onKeyDown,
1053
+ className,
1054
+ ...rest
1055
+ } = props;
1056
+ const inputRef = useRef5(null);
1057
+ const sanitize3 = (input5) => {
1058
+ let digits = input5.replace(/\D/g, "").replace(/^0+(?=\d)/, "").slice(0, MAX_DIGITS);
1059
+ if (max !== void 0 && digits && Number(digits) > max) digits = String(Math.floor(max));
1060
+ return digits;
1061
+ };
1062
+ const toRaw = (amount) => amount === null || amount === void 0 ? "" : String(Math.floor(Math.abs(amount)));
1063
+ const field3 = useFormattedInput({
1064
+ isControlled: "value" in props,
1065
+ value: toRaw(value4),
1066
+ defaultValue: toRaw(defaultValue),
1067
+ onValueChange: (digits) => onValueChange?.(digits === "" ? null : Number(digits)),
1068
+ sanitize: sanitize3,
1069
+ format: (digits) => digits === "" ? "" : Number(digits).toLocaleString("ko-KR"),
1070
+ isMeaningful: isDigit,
1071
+ inputRef
1072
+ });
1073
+ const reading = showKoreanAmount && field3.raw !== "" ? formatKoreanAmount(Number(field3.raw), unit) : null;
1074
+ return /* @__PURE__ */ jsx12(
1075
+ TextField,
1076
+ {
1077
+ ref: mergeRefs(ref, inputRef),
1078
+ label: label6,
1079
+ placeholder,
1080
+ inputMode: "numeric",
1081
+ value: field3.display,
1082
+ onChange: field3.onChange,
1083
+ onKeyDown: (event) => {
1084
+ field3.onKeyDown(event);
1085
+ onKeyDown?.(event);
1086
+ },
1087
+ endAdornment: unit,
1088
+ helperText: reading && helperText3 ? /* @__PURE__ */ jsxs11(Fragment2, { children: [
1089
+ reading,
1090
+ /* @__PURE__ */ jsx12("br", {}),
1091
+ helperText3
1092
+ ] }) : reading ?? helperText3,
1093
+ className: cx(input3, className),
1094
+ ...rest
1095
+ }
1096
+ );
1097
+ }
1098
+ );
1099
+
291
1100
  // src/components/Avatar/Avatar.tsx
292
1101
  import * as RadixAvatar from "@radix-ui/react-avatar";
293
1102
  import { UserIcon } from "@bestow-ui/icons";
294
- import { forwardRef as forwardRef4 } from "react";
1103
+ import { forwardRef as forwardRef12 } from "react";
295
1104
 
296
1105
  // src/components/Avatar/Avatar.css.ts
297
- import { createRuntimeFn as _7a4682 } from "@vanilla-extract/recipes/createRuntimeFn";
1106
+ import { createRuntimeFn as _7a4687 } from "@vanilla-extract/recipes/createRuntimeFn";
298
1107
  var fallback = "_1fd2kp27";
299
1108
  var image = "_1fd2kp26";
300
- var root3 = /* @__PURE__ */ _7a4682({ defaultClassName: "_1fd2kp20", variantClassNames: { size: { sm: "_1fd2kp21", md: "_1fd2kp22", lg: "_1fd2kp23" }, shape: { circle: "_1fd2kp24", square: "_1fd2kp25" } }, defaultVariants: { size: "md", shape: "circle" }, compoundVariants: [] });
1109
+ var root5 = /* @__PURE__ */ _7a4687({ defaultClassName: "_1fd2kp20", variantClassNames: { size: { sm: "_1fd2kp21", md: "_1fd2kp22", lg: "_1fd2kp23" }, shape: { circle: "_1fd2kp24", square: "_1fd2kp25" } }, defaultVariants: { size: "md", shape: "circle" }, compoundVariants: [] });
301
1110
 
302
1111
  // src/components/Avatar/Avatar.tsx
303
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
1112
+ import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
304
1113
  function getInitials(name) {
305
1114
  const [a = "", b = ""] = name.trim().split(/\s+/);
306
1115
  const first = (word) => Array.from(word)[0] ?? "";
307
1116
  return (first(a) + first(b)).toUpperCase();
308
1117
  }
309
- var Avatar = /* @__PURE__ */ forwardRef4(function Avatar2({ src, alt, name, fallback: fallback2, size, shape, className, ...rest }, ref) {
310
- const label5 = alt ?? name;
311
- const a11y = label5 ? { role: "img", "aria-label": label5 } : { "aria-hidden": true };
1118
+ var Avatar = /* @__PURE__ */ forwardRef12(function Avatar2({ src, alt, name, fallback: fallback2, size, shape, className, ...rest }, ref) {
1119
+ const label6 = alt ?? name;
1120
+ const a11y = label6 ? { role: "img", "aria-label": label6 } : { "aria-hidden": true };
312
1121
  const initials = name ? getInitials(name) : "";
313
- return /* @__PURE__ */ jsxs3(RadixAvatar.Root, { ref, className: cx(root3({ size, shape }), className), ...a11y, ...rest, children: [
314
- src && /* @__PURE__ */ jsx4(RadixAvatar.Image, { src, alt: "", className: image }),
315
- /* @__PURE__ */ jsx4(RadixAvatar.Fallback, { className: fallback, children: fallback2 ?? (initials || /* @__PURE__ */ jsx4(UserIcon, { size: "60%" })) })
1122
+ return /* @__PURE__ */ jsxs12(RadixAvatar.Root, { ref, className: cx(root5({ size, shape }), className), ...a11y, ...rest, children: [
1123
+ src && /* @__PURE__ */ jsx13(RadixAvatar.Image, { src, alt: "", className: image }),
1124
+ /* @__PURE__ */ jsx13(RadixAvatar.Fallback, { className: fallback, children: fallback2 ?? (initials || /* @__PURE__ */ jsx13(UserIcon, { size: "60%" })) })
316
1125
  ] });
317
1126
  });
318
1127
 
319
1128
  // src/components/Badge/Badge.tsx
320
- import { forwardRef as forwardRef5 } from "react";
1129
+ import { forwardRef as forwardRef13 } from "react";
321
1130
 
322
1131
  // src/components/Badge/Badge.css.ts
323
- import { createRuntimeFn as _7a4683 } from "@vanilla-extract/recipes/createRuntimeFn";
324
- var badge = /* @__PURE__ */ _7a4683({ defaultClassName: "_1295cfn4", variantClassNames: { variant: { solid: "_1295cfn5", soft: "_1295cfn6", outline: "_1295cfn7" }, color: { primary: "_1295cfn8", neutral: "_1295cfn9", danger: "_1295cfna", success: "_1295cfnb", warning: "_1295cfnc" }, size: { sm: "_1295cfnd", md: "_1295cfne", lg: "_1295cfnf" } }, defaultVariants: { variant: "soft", color: "neutral", size: "md" }, compoundVariants: [] });
325
- var icon2 = "_1295cfng";
1132
+ import { createRuntimeFn as _7a4688 } from "@vanilla-extract/recipes/createRuntimeFn";
1133
+ var badge = /* @__PURE__ */ _7a4688({ defaultClassName: "_1295cfn4", variantClassNames: { variant: { solid: "_1295cfn5", soft: "_1295cfn6", outline: "_1295cfn7" }, color: { primary: "_1295cfn8", neutral: "_1295cfn9", danger: "_1295cfna", success: "_1295cfnb", warning: "_1295cfnc" }, size: { sm: "_1295cfnd", md: "_1295cfne", lg: "_1295cfnf" } }, defaultVariants: { variant: "soft", color: "neutral", size: "md" }, compoundVariants: [] });
1134
+ var icon3 = "_1295cfng";
326
1135
 
327
1136
  // src/components/Badge/Badge.tsx
328
- import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
329
- var Badge = /* @__PURE__ */ forwardRef5(function Badge2({ variant, color, size, startIcon, className, children, ...rest }, ref) {
330
- return /* @__PURE__ */ jsxs4("span", { ref, className: cx(badge({ variant, color, size }), className), ...rest, children: [
331
- startIcon && /* @__PURE__ */ jsx5("span", { className: icon2, children: startIcon }),
1137
+ import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
1138
+ var Badge = /* @__PURE__ */ forwardRef13(function Badge2({ variant, color, size, startIcon, className, children, ...rest }, ref) {
1139
+ return /* @__PURE__ */ jsxs13("span", { ref, className: cx(badge({ variant, color, size }), className), ...rest, children: [
1140
+ startIcon && /* @__PURE__ */ jsx14("span", { className: icon3, children: startIcon }),
332
1141
  children
333
1142
  ] });
334
1143
  });
335
1144
 
336
1145
  // src/components/Breadcrumb/Breadcrumb.tsx
337
- import { forwardRef as forwardRef7 } from "react";
1146
+ import { forwardRef as forwardRef15 } from "react";
338
1147
  import { ChevronRightIcon } from "@bestow-ui/icons";
339
1148
 
340
1149
  // src/components/Link/Link.tsx
341
1150
  import { Slot } from "@radix-ui/react-slot";
342
- import { forwardRef as forwardRef6 } from "react";
1151
+ import { forwardRef as forwardRef14 } from "react";
343
1152
  import { ExternalLinkIcon } from "@bestow-ui/icons";
344
1153
 
345
- // src/styles/visuallyHidden.css.ts
346
- var visuallyHidden = "_1kdtbw10";
347
-
348
1154
  // src/components/Link/Link.css.ts
349
- import { createRuntimeFn as _7a4684 } from "@vanilla-extract/recipes/createRuntimeFn";
1155
+ import { createRuntimeFn as _7a4689 } from "@vanilla-extract/recipes/createRuntimeFn";
350
1156
  var externalIcon = "_1t4hlp6";
351
- var link = /* @__PURE__ */ _7a4684({ defaultClassName: "_1t4hlp0", variantClassNames: { color: { primary: "_1t4hlp1", neutral: "_1t4hlp2", inherit: "_1t4hlp3" }, underline: { always: "_1t4hlp4", hover: "_1t4hlp5" } }, defaultVariants: { color: "primary", underline: "always" }, compoundVariants: [] });
1157
+ var link = /* @__PURE__ */ _7a4689({ defaultClassName: "_1t4hlp0", variantClassNames: { color: { primary: "_1t4hlp1", neutral: "_1t4hlp2", inherit: "_1t4hlp3" }, underline: { always: "_1t4hlp4", hover: "_1t4hlp5" } }, defaultVariants: { color: "primary", underline: "always" }, compoundVariants: [] });
352
1158
 
353
1159
  // src/components/Link/Link.tsx
354
- import { Fragment, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
355
- var Link = /* @__PURE__ */ forwardRef6(function Link2({
1160
+ import { Fragment as Fragment3, jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
1161
+ var Link = /* @__PURE__ */ forwardRef14(function Link2({
356
1162
  as: Component = "a",
357
1163
  asChild,
358
1164
  color,
@@ -369,10 +1175,10 @@ var Link = /* @__PURE__ */ forwardRef6(function Link2({
369
1175
  if (asChild) {
370
1176
  return (
371
1177
  // Slot 의 props 타입은 HTMLElement 기준이라 <a> 전용 속성(target·rel 등)은 그대로 넘기도록 단언한다
372
- /* @__PURE__ */ jsx6(Slot, { ref, className: linkClassName, ...{ target, rel, ...rest }, children })
1178
+ /* @__PURE__ */ jsx15(Slot, { ref, className: linkClassName, ...{ target, rel, ...rest }, children })
373
1179
  );
374
1180
  }
375
- return /* @__PURE__ */ jsxs5(
1181
+ return /* @__PURE__ */ jsxs14(
376
1182
  Component,
377
1183
  {
378
1184
  ref,
@@ -382,10 +1188,10 @@ var Link = /* @__PURE__ */ forwardRef6(function Link2({
382
1188
  ...rest,
383
1189
  children: [
384
1190
  children,
385
- external && /* @__PURE__ */ jsxs5(Fragment, { children: [
1191
+ external && /* @__PURE__ */ jsxs14(Fragment3, { children: [
386
1192
  " ",
387
- /* @__PURE__ */ jsx6(ExternalLinkIcon, { className: externalIcon }),
388
- /* @__PURE__ */ jsx6("span", { className: visuallyHidden, children: externalLabel })
1193
+ /* @__PURE__ */ jsx15(ExternalLinkIcon, { className: externalIcon }),
1194
+ /* @__PURE__ */ jsx15("span", { className: visuallyHidden, children: externalLabel })
389
1195
  ] })
390
1196
  ]
391
1197
  }
@@ -394,241 +1200,436 @@ var Link = /* @__PURE__ */ forwardRef6(function Link2({
394
1200
 
395
1201
  // src/components/Breadcrumb/Breadcrumb.css.ts
396
1202
  var current = "_18t8ztt3";
397
- var item2 = "_18t8ztt1";
1203
+ var item3 = "_18t8ztt1";
398
1204
  var link2 = "_18t8ztt2";
399
- var list = "_18t8ztt0";
1205
+ var list2 = "_18t8ztt0";
400
1206
  var separator = "_18t8ztt4";
401
1207
 
402
1208
  // src/components/Breadcrumb/Breadcrumb.tsx
403
- import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
404
- var Breadcrumb = /* @__PURE__ */ forwardRef7(function Breadcrumb2({ items: items2, linkAs, separator: separator3, "aria-label": ariaLabel = "\uC774\uB3D9 \uACBD\uB85C", className, ...rest }, ref) {
405
- const sep = separator3 ?? /* @__PURE__ */ jsx7(ChevronRightIcon, { size: 14 });
406
- return /* @__PURE__ */ jsx7("nav", { ref, "aria-label": ariaLabel, className, ...rest, children: /* @__PURE__ */ jsx7("ol", { className: list, children: items2.map((item6, index) => {
1209
+ import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
1210
+ var Breadcrumb = /* @__PURE__ */ forwardRef15(function Breadcrumb2({ items: items2, linkAs, separator: separator3, "aria-label": ariaLabel = "\uC774\uB3D9 \uACBD\uB85C", className, ...rest }, ref) {
1211
+ const sep = separator3 ?? /* @__PURE__ */ jsx16(ChevronRightIcon, { size: 14 });
1212
+ return /* @__PURE__ */ jsx16("nav", { ref, "aria-label": ariaLabel, className, ...rest, children: /* @__PURE__ */ jsx16("ol", { className: list2, children: items2.map((item7, index) => {
407
1213
  const isCurrent = index === items2.length - 1;
408
- return /* @__PURE__ */ jsxs6("li", { className: item2, children: [
409
- index > 0 && /* @__PURE__ */ jsx7("span", { className: separator, "aria-hidden": true, children: sep }),
410
- isCurrent || item6.href === void 0 ? /* @__PURE__ */ jsx7("span", { className: isCurrent ? current : void 0, "aria-current": isCurrent ? "page" : void 0, children: item6.label }) : /* @__PURE__ */ jsx7(Link, { as: linkAs, href: item6.href, color: "neutral", underline: "hover", className: link2, children: item6.label })
1214
+ return /* @__PURE__ */ jsxs15("li", { className: item3, children: [
1215
+ index > 0 && /* @__PURE__ */ jsx16("span", { className: separator, "aria-hidden": true, children: sep }),
1216
+ isCurrent || item7.href === void 0 ? /* @__PURE__ */ jsx16("span", { className: isCurrent ? current : void 0, "aria-current": isCurrent ? "page" : void 0, children: item7.label }) : /* @__PURE__ */ jsx16(Link, { as: linkAs, href: item7.href, color: "neutral", underline: "hover", className: link2, children: item7.label })
411
1217
  ] }, index);
412
1218
  }) }) });
413
1219
  });
414
1220
 
415
- // src/components/Button/Button.tsx
416
- import { forwardRef as forwardRef9 } from "react";
417
-
418
- // src/components/Spinner/Spinner.tsx
419
- import { LoaderIcon } from "@bestow-ui/icons";
420
- import { forwardRef as forwardRef8 } from "react";
421
-
422
- // src/components/Spinner/Spinner.css.ts
423
- import { createRuntimeFn as _7a4685 } from "@vanilla-extract/recipes/createRuntimeFn";
424
- var spinner = /* @__PURE__ */ _7a4685({ defaultClassName: "_4b5tg40", variantClassNames: { color: { current: "_4b5tg41", primary: "_4b5tg42", neutral: "_4b5tg43", danger: "_4b5tg44" }, size: { sm: "_4b5tg45", md: "_4b5tg46", lg: "_4b5tg47" } }, defaultVariants: { color: "current", size: "md" }, compoundVariants: [] });
425
-
426
- // src/components/Spinner/Spinner.tsx
427
- import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
428
- var Spinner = /* @__PURE__ */ forwardRef8(function Spinner2({ size, color, label: label5 = "\uB85C\uB529 \uC911", className, ...rest }, ref) {
429
- const a11y = label5 ? { role: "status" } : { "aria-hidden": true };
430
- return /* @__PURE__ */ jsxs7("span", { ref, className: cx(spinner({ size, color }), className), ...a11y, ...rest, children: [
431
- /* @__PURE__ */ jsx8(LoaderIcon, { size: "100%" }),
432
- label5 && /* @__PURE__ */ jsx8("span", { className: visuallyHidden, children: label5 })
433
- ] });
434
- });
435
-
436
- // src/components/Button/Button.css.ts
437
- import { createRuntimeFn as _7a4686 } from "@vanilla-extract/recipes/createRuntimeFn";
438
- var button = /* @__PURE__ */ _7a4686({ defaultClassName: "xcekda6", variantClassNames: { variant: { solid: "xcekda7", soft: "xcekda8", outline: "xcekda9", ghost: "xcekdaa" }, color: { primary: "xcekdab", neutral: "xcekdac", danger: "xcekdad" }, size: { sm: "xcekdae", md: "xcekdaf", lg: "xcekdag" }, fullWidth: { true: "xcekdah" } }, defaultVariants: { variant: "solid", color: "primary", size: "md" }, compoundVariants: [] });
439
- var icon3 = "xcekdai";
440
-
441
- // src/components/Button/Button.tsx
442
- import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
443
- var Button = /* @__PURE__ */ forwardRef9(function Button2({
444
- variant,
445
- color,
446
- size,
447
- fullWidth,
448
- startIcon,
449
- endIcon,
450
- loading,
451
- className,
452
- type = "button",
453
- onClick,
454
- children,
455
- ...rest
456
- }, ref) {
457
- const handleClick = (event) => {
458
- if (loading) {
459
- event.preventDefault();
460
- return;
461
- }
462
- onClick?.(event);
463
- };
464
- const leading = loading ? /* @__PURE__ */ jsx9(Spinner, { size: "sm", label: "" }) : startIcon;
465
- return /* @__PURE__ */ jsxs8(
466
- "button",
467
- {
468
- ref,
469
- type,
470
- className: cx(button({ variant, color, size, fullWidth }), className),
471
- "aria-busy": loading || void 0,
472
- "aria-disabled": loading || void 0,
473
- onClick: handleClick,
474
- ...rest,
475
- children: [
476
- leading && /* @__PURE__ */ jsx9("span", { className: icon3, children: leading }),
477
- children,
478
- endIcon && /* @__PURE__ */ jsx9("span", { className: icon3, children: endIcon })
479
- ]
480
- }
481
- );
482
- });
1221
+ // src/components/BusinessNumberInput/BusinessNumberInput.tsx
1222
+ import { forwardRef as forwardRef16, useRef as useRef6, useState as useState4 } from "react";
1223
+ import { jsx as jsx17 } from "react/jsx-runtime";
1224
+ var sanitize = (input5) => input5.replace(/\D/g, "").slice(0, 10);
1225
+ var isDigit2 = (char) => /\d/.test(char);
1226
+ var BusinessNumberInput = /* @__PURE__ */ forwardRef16(
1227
+ function BusinessNumberInput2(props, ref) {
1228
+ const {
1229
+ value: value4,
1230
+ defaultValue,
1231
+ onValueChange,
1232
+ validate = true,
1233
+ invalidText = "\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.",
1234
+ label: label6 = "\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638",
1235
+ placeholder = "000-00-00000",
1236
+ error,
1237
+ helperText: helperText3,
1238
+ onBlur,
1239
+ onKeyDown,
1240
+ ...rest
1241
+ } = props;
1242
+ const inputRef = useRef6(null);
1243
+ const [touched, setTouched] = useState4(false);
1244
+ const field3 = useFormattedInput({
1245
+ isControlled: "value" in props,
1246
+ value: value4,
1247
+ defaultValue,
1248
+ onValueChange: (digits) => onValueChange?.(digits, digits.length === 10 ? isValidBusinessNumber(digits) : null),
1249
+ sanitize,
1250
+ format: formatBusinessNumber,
1251
+ isMeaningful: isDigit2,
1252
+ inputRef
1253
+ });
1254
+ const complete = field3.raw.length === 10;
1255
+ const autoInvalid = validate && field3.raw.length > 0 && (complete ? !isValidBusinessNumber(field3.raw) : touched);
1256
+ const showAuto = autoInvalid && error === void 0;
1257
+ return /* @__PURE__ */ jsx17(
1258
+ TextField,
1259
+ {
1260
+ ref: mergeRefs(ref, inputRef),
1261
+ label: label6,
1262
+ placeholder,
1263
+ inputMode: "numeric",
1264
+ value: field3.display,
1265
+ onChange: field3.onChange,
1266
+ onKeyDown: (event) => {
1267
+ field3.onKeyDown(event);
1268
+ onKeyDown?.(event);
1269
+ },
1270
+ onBlur: (event) => {
1271
+ setTouched(true);
1272
+ onBlur?.(event);
1273
+ },
1274
+ error: error ?? autoInvalid,
1275
+ helperText: showAuto ? complete ? invalidText : "10\uC790\uB9AC\uB97C \uBAA8\uB450 \uC785\uB825\uD574 \uC8FC\uC138\uC694." : helperText3,
1276
+ ...rest
1277
+ }
1278
+ );
1279
+ }
1280
+ );
483
1281
 
484
1282
  // src/components/Card/Card.tsx
485
- import { forwardRef as forwardRef10 } from "react";
1283
+ import { forwardRef as forwardRef17 } from "react";
486
1284
 
487
1285
  // src/components/Card/Card.css.ts
488
- import { createRuntimeFn as _7a4687 } from "@vanilla-extract/recipes/createRuntimeFn";
489
- var body = "dnuf1u9";
490
- var card = /* @__PURE__ */ _7a4687({ defaultClassName: "dnuf1u0", variantClassNames: { variant: { outline: "dnuf1u1", elevated: "dnuf1u2", soft: "dnuf1u3" }, padding: { none: "dnuf1u4", sm: "dnuf1u5", md: "dnuf1u6", lg: "dnuf1u7" } }, defaultVariants: { variant: "outline", padding: "md" }, compoundVariants: [] });
491
- var footer = "dnuf1ua";
492
- var header2 = "dnuf1u8";
1286
+ import { createRuntimeFn as _7a46810 } from "@vanilla-extract/recipes/createRuntimeFn";
1287
+ var body2 = "dnuf1u9";
1288
+ var card = /* @__PURE__ */ _7a46810({ defaultClassName: "dnuf1u0", variantClassNames: { variant: { outline: "dnuf1u1", elevated: "dnuf1u2", soft: "dnuf1u3" }, padding: { none: "dnuf1u4", sm: "dnuf1u5", md: "dnuf1u6", lg: "dnuf1u7" } }, defaultVariants: { variant: "outline", padding: "md" }, compoundVariants: [] });
1289
+ var footer2 = "dnuf1ua";
1290
+ var header3 = "dnuf1u8";
493
1291
 
494
1292
  // src/components/Card/Card.tsx
495
- import { jsx as jsx10 } from "react/jsx-runtime";
496
- var Card = /* @__PURE__ */ forwardRef10(function Card2({ variant, padding, as: Component = "div", className, ...rest }, ref) {
497
- return /* @__PURE__ */ jsx10(Component, { ref, className: cx(card({ variant, padding }), className), ...rest });
1293
+ import { jsx as jsx18 } from "react/jsx-runtime";
1294
+ var Card = /* @__PURE__ */ forwardRef17(function Card2({ variant, padding, as: Component = "div", className, ...rest }, ref) {
1295
+ return /* @__PURE__ */ jsx18(Component, { ref, className: cx(card({ variant, padding }), className), ...rest });
498
1296
  });
499
- var CardHeader = /* @__PURE__ */ forwardRef10(function CardHeader2({ className, ...rest }, ref) {
500
- return /* @__PURE__ */ jsx10("div", { ref, className: cx(header2, className), ...rest });
1297
+ var CardHeader = /* @__PURE__ */ forwardRef17(function CardHeader2({ className, ...rest }, ref) {
1298
+ return /* @__PURE__ */ jsx18("div", { ref, className: cx(header3, className), ...rest });
501
1299
  });
502
- var CardBody = /* @__PURE__ */ forwardRef10(function CardBody2({ className, ...rest }, ref) {
503
- return /* @__PURE__ */ jsx10("div", { ref, className: cx(body, className), ...rest });
1300
+ var CardBody = /* @__PURE__ */ forwardRef17(function CardBody2({ className, ...rest }, ref) {
1301
+ return /* @__PURE__ */ jsx18("div", { ref, className: cx(body2, className), ...rest });
504
1302
  });
505
- var CardFooter = /* @__PURE__ */ forwardRef10(function CardFooter2({ className, ...rest }, ref) {
506
- return /* @__PURE__ */ jsx10("div", { ref, className: cx(footer, className), ...rest });
1303
+ var CardFooter = /* @__PURE__ */ forwardRef17(function CardFooter2({ className, ...rest }, ref) {
1304
+ return /* @__PURE__ */ jsx18("div", { ref, className: cx(footer2, className), ...rest });
507
1305
  });
508
1306
 
509
- // src/components/Checkbox/Checkbox.tsx
510
- import { forwardRef as forwardRef11, useEffect, useRef } from "react";
1307
+ // src/components/Combobox/Combobox.tsx
1308
+ import * as Popover from "@radix-ui/react-popover";
1309
+ import {
1310
+ forwardRef as forwardRef18,
1311
+ useEffect as useEffect3,
1312
+ useId as useId4,
1313
+ useMemo as useMemo2,
1314
+ useRef as useRef7,
1315
+ useState as useState5
1316
+ } from "react";
1317
+ import { CheckIcon, ChevronDownIcon as ChevronDownIcon3 } from "@bestow-ui/icons";
511
1318
 
512
- // src/utils/mergeRefs.ts
513
- function mergeRefs(...refs) {
514
- return (value3) => {
515
- for (const ref of refs) {
516
- if (typeof ref === "function") ref(value3);
517
- else if (ref) ref.current = value3;
518
- }
519
- };
520
- }
1319
+ // src/components/Select/Select.css.ts
1320
+ var content5 = "_1kx81e83";
1321
+ var icon4 = "_1kx81e82";
1322
+ var item4 = "_1kx81e85";
1323
+ var itemIndicator = "_1kx81e86";
1324
+ var trigger2 = "_1kx81e80";
1325
+ var value = "_1kx81e81";
1326
+ var viewport = "_1kx81e84";
521
1327
 
522
- // src/components/Checkbox/Checkbox.css.ts
523
- import { createRuntimeFn as _7a4688 } from "@vanilla-extract/recipes/createRuntimeFn";
524
- var checkIcon = "_1y7mzsn8 _1y7mzsn7";
525
- var control = /* @__PURE__ */ _7a4688({ defaultClassName: "_1y7mzsn3", variantClassNames: { size: { sm: "_1y7mzsn4", md: "_1y7mzsn5" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
526
- var indeterminateIcon = "_1y7mzsn9 _1y7mzsn7";
527
- var input = "_1y7mzsn6";
528
- var root4 = /* @__PURE__ */ _7a4688({ defaultClassName: "_1y7mzsn0", variantClassNames: { size: { sm: "_1y7mzsn1", md: "_1y7mzsn2" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
1328
+ // src/components/Combobox/Combobox.css.ts
1329
+ var content6 = "c2pbq71";
1330
+ var empty = "c2pbq72";
1331
+ var toggle2 = "c2pbq70";
529
1332
 
530
- // src/components/Checkbox/Checkbox.tsx
531
- import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
532
- var Checkbox = /* @__PURE__ */ forwardRef11(function Checkbox2({ label: label5, size, indeterminate = false, invalid, disabled, className, ...rest }, ref) {
533
- const innerRef = useRef(null);
534
- useEffect(() => {
535
- if (innerRef.current) innerRef.current.indeterminate = indeterminate;
536
- }, [indeterminate]);
537
- return /* @__PURE__ */ jsxs9("label", { className: cx(root4({ size }), className), "data-disabled": disabled || void 0, children: [
538
- /* @__PURE__ */ jsxs9("span", { className: control({ size }), children: [
539
- /* @__PURE__ */ jsx11(
540
- "input",
541
- {
542
- ref: mergeRefs(innerRef, ref),
543
- type: "checkbox",
544
- className: input,
545
- disabled,
546
- "aria-invalid": invalid || void 0,
547
- ...rest
1333
+ // src/components/Combobox/Combobox.tsx
1334
+ import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
1335
+ var defaultFilter = (option2, query) => option2.label.toLowerCase().includes(query.trim().toLowerCase());
1336
+ var Combobox = /* @__PURE__ */ forwardRef18(function Combobox2(props, ref) {
1337
+ const {
1338
+ options,
1339
+ value: value4,
1340
+ defaultValue,
1341
+ onValueChange,
1342
+ filter = defaultFilter,
1343
+ emptyMessage = "\uACB0\uACFC\uAC00 \uC5C6\uC5B4\uC694",
1344
+ placeholder,
1345
+ label: label6,
1346
+ helperText: helperText3,
1347
+ error,
1348
+ size,
1349
+ fullWidth,
1350
+ disabled,
1351
+ required,
1352
+ name,
1353
+ id,
1354
+ "aria-label": ariaLabel,
1355
+ toggleLabel = "\uBAA9\uB85D \uC5F4\uAE30",
1356
+ className
1357
+ } = props;
1358
+ const generatedId = useId4();
1359
+ const inputId = id ?? generatedId;
1360
+ const labelId = `${inputId}-label`;
1361
+ const listId = `${inputId}-listbox`;
1362
+ const helperId = helperText3 ? `${inputId}-helper` : void 0;
1363
+ const optionId = (index) => `${inputId}-option-${index}`;
1364
+ const portal2 = usePortalProps();
1365
+ const inputRef = useRef7(null);
1366
+ const anchorRef = useRef7(null);
1367
+ const isControlled = "value" in props;
1368
+ const [innerValue, setInnerValue] = useState5(defaultValue);
1369
+ const selectedValue = isControlled ? value4 : innerValue;
1370
+ const selectedOption = options.find((o) => o.value === selectedValue);
1371
+ const [open, setOpen] = useState5(false);
1372
+ const [query, setQuery] = useState5(null);
1373
+ const [activeIndex, setActiveIndex] = useState5(-1);
1374
+ const filtered = useMemo2(() => query ? options.filter((o) => filter(o, query)) : options, [options, filter, query]);
1375
+ const inputText = query ?? selectedOption?.label ?? "";
1376
+ const firstEnabled = (list5, from = 0, step = 1) => {
1377
+ for (let i = from; i >= 0 && i < list5.length; i += step) if (!list5[i].disabled) return i;
1378
+ return -1;
1379
+ };
1380
+ const openList = (list5 = filtered, preferLast = false) => {
1381
+ setOpen(true);
1382
+ const selectedIndex = list5.findIndex((o) => o.value === selectedValue);
1383
+ setActiveIndex(
1384
+ selectedIndex >= 0 && !list5[selectedIndex].disabled ? selectedIndex : preferLast ? firstEnabled(list5, list5.length - 1, -1) : firstEnabled(list5)
1385
+ );
1386
+ };
1387
+ const close2 = () => {
1388
+ setOpen(false);
1389
+ setQuery(null);
1390
+ setActiveIndex(-1);
1391
+ };
1392
+ const select = (option2) => {
1393
+ if (option2.disabled) return;
1394
+ if (!isControlled) setInnerValue(option2.value);
1395
+ if (option2.value !== selectedValue) onValueChange?.(option2.value);
1396
+ close2();
1397
+ };
1398
+ const move = (step) => {
1399
+ const start = activeIndex < 0 ? step === 1 ? 0 : filtered.length - 1 : activeIndex + step;
1400
+ const next = firstEnabled(filtered, start, step);
1401
+ if (next >= 0) setActiveIndex(next);
1402
+ };
1403
+ const handleChange = (event) => {
1404
+ const nextQuery = event.target.value;
1405
+ const nextList = nextQuery ? options.filter((o) => filter(o, nextQuery)) : options;
1406
+ setQuery(nextQuery);
1407
+ setOpen(true);
1408
+ setActiveIndex(firstEnabled(nextList));
1409
+ };
1410
+ const handleKeyDown = (event) => {
1411
+ switch (event.key) {
1412
+ case "ArrowDown":
1413
+ event.preventDefault();
1414
+ if (!open) openList();
1415
+ else move(1);
1416
+ break;
1417
+ case "ArrowUp":
1418
+ event.preventDefault();
1419
+ if (!open) openList(filtered, true);
1420
+ else move(-1);
1421
+ break;
1422
+ case "Enter":
1423
+ if (open) {
1424
+ event.preventDefault();
1425
+ const option2 = filtered[activeIndex];
1426
+ if (option2) select(option2);
548
1427
  }
549
- ),
550
- /* @__PURE__ */ jsx11("svg", { className: checkIcon, viewBox: "0 0 20 20", fill: "none", "aria-hidden": true, children: /* @__PURE__ */ jsx11(
551
- "path",
1428
+ break;
1429
+ case "Escape":
1430
+ if (open) {
1431
+ event.preventDefault();
1432
+ close2();
1433
+ }
1434
+ break;
1435
+ case "Tab":
1436
+ if (open) close2();
1437
+ break;
1438
+ }
1439
+ };
1440
+ useEffect3(() => {
1441
+ if (!open || activeIndex < 0) return;
1442
+ document.getElementById(optionId(activeIndex))?.scrollIntoView?.({ block: "nearest" });
1443
+ }, [open, activeIndex]);
1444
+ const hasOptions = filtered.length > 0;
1445
+ return /* @__PURE__ */ jsxs16("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
1446
+ label6 && /* @__PURE__ */ jsxs16("label", { id: labelId, htmlFor: inputId, className: label, children: [
1447
+ label6,
1448
+ required && /* @__PURE__ */ jsx19("span", { className: requiredMark, "aria-hidden": true, children: "*" })
1449
+ ] }),
1450
+ /* @__PURE__ */ jsxs16(Popover.Root, { open: open && !disabled, onOpenChange: (next) => next ? openList() : close2(), children: [
1451
+ /* @__PURE__ */ jsx19(Popover.Anchor, { asChild: true, children: /* @__PURE__ */ jsxs16(
1452
+ "div",
552
1453
  {
553
- d: "M5 10.5l3.2 3L15 7",
554
- stroke: "currentColor",
555
- strokeWidth: "2",
556
- strokeLinecap: "round",
557
- strokeLinejoin: "round"
1454
+ ref: anchorRef,
1455
+ className: cx(root3({ size, fullWidth }), className),
1456
+ "data-invalid": error || void 0,
1457
+ "data-disabled": disabled || void 0,
1458
+ children: [
1459
+ /* @__PURE__ */ jsx19(
1460
+ "input",
1461
+ {
1462
+ ref: mergeRefs(ref, inputRef),
1463
+ id: inputId,
1464
+ type: "text",
1465
+ role: "combobox",
1466
+ "aria-expanded": open,
1467
+ "aria-controls": open && hasOptions ? listId : void 0,
1468
+ "aria-autocomplete": "list",
1469
+ "aria-activedescendant": open && activeIndex >= 0 ? optionId(activeIndex) : void 0,
1470
+ "aria-label": label6 ? void 0 : ariaLabel,
1471
+ "aria-invalid": error || void 0,
1472
+ "aria-required": required || void 0,
1473
+ "aria-describedby": helperId,
1474
+ autoComplete: "off",
1475
+ placeholder,
1476
+ disabled,
1477
+ value: inputText,
1478
+ onChange: handleChange,
1479
+ onKeyDown: handleKeyDown,
1480
+ onBlur: () => {
1481
+ if (open) close2();
1482
+ },
1483
+ className: input
1484
+ }
1485
+ ),
1486
+ /* @__PURE__ */ jsx19(
1487
+ "button",
1488
+ {
1489
+ type: "button",
1490
+ tabIndex: -1,
1491
+ "aria-label": toggleLabel,
1492
+ "aria-expanded": open,
1493
+ disabled,
1494
+ className: toggle2,
1495
+ onMouseDown: (event) => event.preventDefault(),
1496
+ onClick: () => {
1497
+ if (open) close2();
1498
+ else openList(options);
1499
+ inputRef.current?.focus();
1500
+ },
1501
+ children: /* @__PURE__ */ jsx19(ChevronDownIcon3, { size: 16 })
1502
+ }
1503
+ )
1504
+ ]
558
1505
  }
559
1506
  ) }),
560
- /* @__PURE__ */ jsx11("svg", { className: indeterminateIcon, viewBox: "0 0 20 20", fill: "none", "aria-hidden": true, children: /* @__PURE__ */ jsx11("path", { d: "M6 10h8", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) })
1507
+ /* @__PURE__ */ jsx19(Popover.Portal, { children: /* @__PURE__ */ jsx19(
1508
+ Popover.Content,
1509
+ {
1510
+ role: "presentation",
1511
+ align: "start",
1512
+ sideOffset: 4,
1513
+ collisionPadding: 8,
1514
+ className: cx(portal2.className, content6),
1515
+ style: portal2.style,
1516
+ onOpenAutoFocus: (event) => event.preventDefault(),
1517
+ onCloseAutoFocus: (event) => event.preventDefault(),
1518
+ onMouseDown: (event) => event.preventDefault(),
1519
+ onInteractOutside: (event) => {
1520
+ if (anchorRef.current?.contains(event.target)) event.preventDefault();
1521
+ },
1522
+ children: hasOptions ? /* @__PURE__ */ jsx19(
1523
+ "div",
1524
+ {
1525
+ id: listId,
1526
+ role: "listbox",
1527
+ "aria-labelledby": label6 ? labelId : void 0,
1528
+ "aria-label": label6 ? void 0 : ariaLabel,
1529
+ children: filtered.map((option2, index) => {
1530
+ const isSelected = option2.value === selectedValue;
1531
+ return (
1532
+ // aria-activedescendant 패턴: 포커스·키보드는 입력창이 맡고 항목은 포커스를 받지 않는다 (WAI-ARIA combobox)
1533
+ // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/interactive-supports-focus
1534
+ /* @__PURE__ */ jsxs16(
1535
+ "div",
1536
+ {
1537
+ id: optionId(index),
1538
+ role: "option",
1539
+ "aria-selected": isSelected,
1540
+ "aria-disabled": option2.disabled || void 0,
1541
+ "data-highlighted": index === activeIndex ? "" : void 0,
1542
+ "data-state": isSelected ? "checked" : "unchecked",
1543
+ "data-disabled": option2.disabled ? "" : void 0,
1544
+ className: item4,
1545
+ onMouseDown: (event) => event.preventDefault(),
1546
+ onMouseMove: () => !option2.disabled && setActiveIndex(index),
1547
+ onClick: () => select(option2),
1548
+ children: [
1549
+ option2.label,
1550
+ isSelected && /* @__PURE__ */ jsx19("span", { className: itemIndicator, "aria-hidden": true, children: /* @__PURE__ */ jsx19(CheckIcon, { size: 16 }) })
1551
+ ]
1552
+ },
1553
+ option2.value
1554
+ )
1555
+ );
1556
+ })
1557
+ }
1558
+ ) : /* @__PURE__ */ jsx19("div", { className: empty, role: "status", children: emptyMessage })
1559
+ }
1560
+ ) })
561
1561
  ] }),
562
- label5
1562
+ name && /* @__PURE__ */ jsx19("input", { type: "hidden", name, value: selectedValue ?? "" }),
1563
+ helperText3 && /* @__PURE__ */ jsx19("p", { id: helperId, className: helperText({ error }), children: helperText3 })
563
1564
  ] });
564
1565
  });
565
1566
 
566
1567
  // src/components/Divider/Divider.tsx
567
- import { forwardRef as forwardRef12 } from "react";
1568
+ import { forwardRef as forwardRef19 } from "react";
568
1569
 
569
1570
  // src/components/Divider/Divider.css.ts
570
- import { createRuntimeFn as _7a4689 } from "@vanilla-extract/recipes/createRuntimeFn";
571
- var divider = /* @__PURE__ */ _7a4689({ defaultClassName: "_1t3gq8v0", variantClassNames: { orientation: { horizontal: "_1t3gq8v1", vertical: "_1t3gq8v2" } }, defaultVariants: { orientation: "horizontal" }, compoundVariants: [] });
1571
+ import { createRuntimeFn as _7a46811 } from "@vanilla-extract/recipes/createRuntimeFn";
1572
+ var divider = /* @__PURE__ */ _7a46811({ defaultClassName: "_1t3gq8v0", variantClassNames: { orientation: { horizontal: "_1t3gq8v1", vertical: "_1t3gq8v2" } }, defaultVariants: { orientation: "horizontal" }, compoundVariants: [] });
572
1573
  var labeled = "_1t3gq8v3";
573
1574
  var line = "_1t3gq8v4";
574
1575
 
575
1576
  // src/components/Divider/Divider.tsx
576
- import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
577
- var Divider = /* @__PURE__ */ forwardRef12(function Divider2({ orientation = "horizontal", decorative, className, children, ...rest }, ref) {
1577
+ import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
1578
+ var Divider = /* @__PURE__ */ forwardRef19(function Divider2({ orientation = "horizontal", decorative, className, children, ...rest }, ref) {
578
1579
  if (children && orientation === "horizontal") {
579
- return /* @__PURE__ */ jsxs10("div", { ref, className: cx(labeled, className), ...rest, children: [
580
- /* @__PURE__ */ jsx12("span", { className: line, "aria-hidden": true }),
1580
+ return /* @__PURE__ */ jsxs17("div", { ref, className: cx(labeled, className), ...rest, children: [
1581
+ /* @__PURE__ */ jsx20("span", { className: line, "aria-hidden": true }),
581
1582
  children,
582
- /* @__PURE__ */ jsx12("span", { className: line, "aria-hidden": true })
1583
+ /* @__PURE__ */ jsx20("span", { className: line, "aria-hidden": true })
583
1584
  ] });
584
1585
  }
585
1586
  const a11y = decorative ? { role: "none" } : { role: "separator", "aria-orientation": orientation === "vertical" ? "vertical" : void 0 };
586
- return /* @__PURE__ */ jsx12("div", { ref, className: cx(divider({ orientation }), className), ...a11y, ...rest });
1587
+ return /* @__PURE__ */ jsx20("div", { ref, className: cx(divider({ orientation }), className), ...a11y, ...rest });
587
1588
  });
588
1589
 
589
1590
  // src/components/Drawer/Drawer.tsx
590
- import * as Dialog from "@radix-ui/react-dialog";
591
- import { XIcon as XIcon2 } from "@bestow-ui/icons";
1591
+ import * as Dialog2 from "@radix-ui/react-dialog";
1592
+ import { XIcon as XIcon3 } from "@bestow-ui/icons";
592
1593
 
593
1594
  // src/components/IconButton/IconButton.tsx
594
- import { forwardRef as forwardRef13 } from "react";
1595
+ import { forwardRef as forwardRef20 } from "react";
595
1596
 
596
1597
  // src/components/IconButton/IconButton.css.ts
597
- import { createRuntimeFn as _7a46810 } from "@vanilla-extract/recipes/createRuntimeFn";
598
- var iconButton = /* @__PURE__ */ _7a46810({ defaultClassName: "ip9et20", variantClassNames: { size: { sm: "ip9et21", md: "ip9et22", lg: "ip9et23" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
1598
+ import { createRuntimeFn as _7a46812 } from "@vanilla-extract/recipes/createRuntimeFn";
1599
+ var iconButton = /* @__PURE__ */ _7a46812({ defaultClassName: "ip9et20", variantClassNames: { size: { sm: "ip9et21", md: "ip9et22", lg: "ip9et23" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
599
1600
 
600
1601
  // src/components/IconButton/IconButton.tsx
601
- import { jsx as jsx13 } from "react/jsx-runtime";
602
- var IconButton = /* @__PURE__ */ forwardRef13(function IconButton2({ variant = "ghost", color = "neutral", size, loading, className, children, ...rest }, ref) {
603
- return /* @__PURE__ */ jsx13(
1602
+ import { jsx as jsx21 } from "react/jsx-runtime";
1603
+ var IconButton = /* @__PURE__ */ forwardRef20(function IconButton2({ variant = "ghost", color = "neutral", size, loading: loading2, className, children, ...rest }, ref) {
1604
+ return /* @__PURE__ */ jsx21(
604
1605
  Button,
605
1606
  {
606
1607
  ref,
607
1608
  variant,
608
1609
  color,
609
1610
  size,
610
- loading,
1611
+ loading: loading2,
611
1612
  className: cx(iconButton({ size }), className),
612
1613
  ...rest,
613
- children: !loading && children
1614
+ children: !loading2 && children
614
1615
  }
615
1616
  );
616
1617
  });
617
1618
 
618
1619
  // src/components/Drawer/Drawer.css.ts
619
- import { createRuntimeFn as _7a46811 } from "@vanilla-extract/recipes/createRuntimeFn";
620
- var body2 = "nmobyvy";
621
- var closeButton2 = "nmobyvx";
622
- var content3 = /* @__PURE__ */ _7a46811({ defaultClassName: "nmobyv9", variantClassNames: { side: { right: "nmobyva", left: "nmobyvb", top: "nmobyvc", bottom: "nmobyvd" }, size: { sm: "nmobyve", md: "nmobyvf", lg: "nmobyvg" } }, defaultVariants: { side: "right", size: "md" }, compoundVariants: [[{ side: "right", size: "sm" }, "nmobyvh"], [{ side: "right", size: "md" }, "nmobyvi"], [{ side: "right", size: "lg" }, "nmobyvj"], [{ side: "left", size: "sm" }, "nmobyvk"], [{ side: "left", size: "md" }, "nmobyvl"], [{ side: "left", size: "lg" }, "nmobyvm"], [{ side: "top", size: "sm" }, "nmobyvn"], [{ side: "top", size: "md" }, "nmobyvo"], [{ side: "top", size: "lg" }, "nmobyvp"], [{ side: "bottom", size: "sm" }, "nmobyvq"], [{ side: "bottom", size: "md" }, "nmobyvr"], [{ side: "bottom", size: "lg" }, "nmobyvs"]] });
623
- var description2 = "nmobyvw";
624
- var footer2 = "nmobyvz";
625
- var header3 = "nmobyvt";
626
- var headings = "nmobyvu";
627
- var overlay = "nmobyv0";
628
- var title2 = "nmobyvv";
1620
+ import { createRuntimeFn as _7a46813 } from "@vanilla-extract/recipes/createRuntimeFn";
1621
+ var body3 = "nmobyvy";
1622
+ var closeButton3 = "nmobyvx";
1623
+ var content7 = /* @__PURE__ */ _7a46813({ defaultClassName: "nmobyv9", variantClassNames: { side: { right: "nmobyva", left: "nmobyvb", top: "nmobyvc", bottom: "nmobyvd" }, size: { sm: "nmobyve", md: "nmobyvf", lg: "nmobyvg" } }, defaultVariants: { side: "right", size: "md" }, compoundVariants: [[{ side: "right", size: "sm" }, "nmobyvh"], [{ side: "right", size: "md" }, "nmobyvi"], [{ side: "right", size: "lg" }, "nmobyvj"], [{ side: "left", size: "sm" }, "nmobyvk"], [{ side: "left", size: "md" }, "nmobyvl"], [{ side: "left", size: "lg" }, "nmobyvm"], [{ side: "top", size: "sm" }, "nmobyvn"], [{ side: "top", size: "md" }, "nmobyvo"], [{ side: "top", size: "lg" }, "nmobyvp"], [{ side: "bottom", size: "sm" }, "nmobyvq"], [{ side: "bottom", size: "md" }, "nmobyvr"], [{ side: "bottom", size: "lg" }, "nmobyvs"]] });
1624
+ var description3 = "nmobyvw";
1625
+ var footer3 = "nmobyvz";
1626
+ var header4 = "nmobyvt";
1627
+ var headings2 = "nmobyvu";
1628
+ var overlay2 = "nmobyv0";
1629
+ var title3 = "nmobyvv";
629
1630
 
630
1631
  // src/components/Drawer/Drawer.tsx
631
- import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
1632
+ import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
632
1633
  function Drawer({
633
1634
  open,
634
1635
  defaultOpen,
@@ -637,7 +1638,7 @@ function Drawer({
637
1638
  title: title6,
638
1639
  description: description6,
639
1640
  children,
640
- footer: footer5,
1641
+ footer: footer6,
641
1642
  side,
642
1643
  size,
643
1644
  hideCloseButton = false,
@@ -645,58 +1646,61 @@ function Drawer({
645
1646
  className
646
1647
  }) {
647
1648
  const portal2 = usePortalProps();
648
- return /* @__PURE__ */ jsxs11(Dialog.Root, { open, defaultOpen, onOpenChange, children: [
649
- trigger4 && /* @__PURE__ */ jsx14(Dialog.Trigger, { asChild: true, children: trigger4 }),
650
- /* @__PURE__ */ jsxs11(Dialog.Portal, { children: [
651
- /* @__PURE__ */ jsx14(Dialog.Overlay, { className: cx(portal2.className, overlay), style: portal2.style }),
652
- /* @__PURE__ */ jsxs11(
653
- Dialog.Content,
1649
+ const focus = useReturnFocus(Boolean(trigger4));
1650
+ return /* @__PURE__ */ jsxs18(Dialog2.Root, { open, defaultOpen, onOpenChange, children: [
1651
+ trigger4 && /* @__PURE__ */ jsx22(Dialog2.Trigger, { asChild: true, children: trigger4 }),
1652
+ /* @__PURE__ */ jsxs18(Dialog2.Portal, { children: [
1653
+ /* @__PURE__ */ jsx22(Dialog2.Overlay, { className: cx(portal2.className, overlay2), style: portal2.style }),
1654
+ /* @__PURE__ */ jsxs18(
1655
+ Dialog2.Content,
654
1656
  {
655
- className: cx(portal2.className, content3({ side, size }), className),
1657
+ className: cx(portal2.className, content7({ side, size }), className),
656
1658
  style: portal2.style,
657
1659
  "data-side": side ?? "right",
658
1660
  onPointerDownOutside: closeOnOverlayClick ? void 0 : (event) => event.preventDefault(),
1661
+ onOpenAutoFocus: focus.onOpenAutoFocus,
1662
+ onCloseAutoFocus: focus.onCloseAutoFocus,
659
1663
  ...description6 ? {} : { "aria-describedby": void 0 },
660
1664
  children: [
661
- /* @__PURE__ */ jsxs11("div", { className: header3, children: [
662
- /* @__PURE__ */ jsxs11("div", { className: headings, children: [
663
- /* @__PURE__ */ jsx14(Dialog.Title, { className: title2, children: title6 }),
664
- description6 && /* @__PURE__ */ jsx14(Dialog.Description, { className: description2, children: description6 })
1665
+ /* @__PURE__ */ jsxs18("div", { className: header4, children: [
1666
+ /* @__PURE__ */ jsxs18("div", { className: headings2, children: [
1667
+ /* @__PURE__ */ jsx22(Dialog2.Title, { className: title3, children: title6 }),
1668
+ description6 && /* @__PURE__ */ jsx22(Dialog2.Description, { className: description3, children: description6 })
665
1669
  ] }),
666
- !hideCloseButton && /* @__PURE__ */ jsx14(Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsx14(IconButton, { "aria-label": "\uB2EB\uAE30", size: "sm", className: closeButton2, children: /* @__PURE__ */ jsx14(XIcon2, {}) }) })
1670
+ !hideCloseButton && /* @__PURE__ */ jsx22(Dialog2.Close, { asChild: true, children: /* @__PURE__ */ jsx22(IconButton, { "aria-label": "\uB2EB\uAE30", size: "sm", className: closeButton3, children: /* @__PURE__ */ jsx22(XIcon3, {}) }) })
667
1671
  ] }),
668
- children && /* @__PURE__ */ jsx14("div", { className: body2, children }),
669
- footer5 && /* @__PURE__ */ jsx14("div", { className: footer2, children: footer5 })
1672
+ children && /* @__PURE__ */ jsx22("div", { className: body3, children }),
1673
+ footer6 && /* @__PURE__ */ jsx22("div", { className: footer3, children: footer6 })
670
1674
  ]
671
1675
  }
672
1676
  )
673
1677
  ] })
674
1678
  ] });
675
1679
  }
676
- var DrawerClose = Dialog.Close;
1680
+ var DrawerClose = Dialog2.Close;
677
1681
 
678
1682
  // src/components/DropdownMenu/DropdownMenu.tsx
679
1683
  import * as RadixMenu from "@radix-ui/react-dropdown-menu";
680
- import { forwardRef as forwardRef14 } from "react";
1684
+ import { forwardRef as forwardRef21 } from "react";
681
1685
 
682
1686
  // src/components/DropdownMenu/DropdownMenu.css.ts
683
- var content4 = "_1d7ahux0";
1687
+ var content8 = "_1d7ahux0";
684
1688
  var danger = "_1d7ahux2";
685
- var icon4 = "_1d7ahux3";
686
- var item3 = "_1d7ahux1";
687
- var label = "_1d7ahux5";
1689
+ var icon5 = "_1d7ahux3";
1690
+ var item5 = "_1d7ahux1";
1691
+ var label2 = "_1d7ahux5";
688
1692
  var separator2 = "_1d7ahux6";
689
1693
  var shortcut = "_1d7ahux4";
690
1694
 
691
1695
  // src/components/DropdownMenu/DropdownMenu.tsx
692
- import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
1696
+ import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
693
1697
  var DropdownMenu = RadixMenu.Root;
694
1698
  var DropdownMenuTrigger = RadixMenu.Trigger;
695
1699
  var DropdownMenuGroup = RadixMenu.Group;
696
- var DropdownMenuContent = /* @__PURE__ */ forwardRef14(
1700
+ var DropdownMenuContent = /* @__PURE__ */ forwardRef21(
697
1701
  function DropdownMenuContent2({ className, style, side = "bottom", align = "start", sideOffset = 4, collisionPadding = 8, ...rest }, ref) {
698
1702
  const portal2 = usePortalProps();
699
- return /* @__PURE__ */ jsx15(RadixMenu.Portal, { children: /* @__PURE__ */ jsx15(
1703
+ return /* @__PURE__ */ jsx23(RadixMenu.Portal, { children: /* @__PURE__ */ jsx23(
700
1704
  RadixMenu.Content,
701
1705
  {
702
1706
  ref,
@@ -704,167 +1708,36 @@ var DropdownMenuContent = /* @__PURE__ */ forwardRef14(
704
1708
  align,
705
1709
  sideOffset,
706
1710
  collisionPadding,
707
- className: cx(portal2.className, content4, className),
1711
+ className: cx(portal2.className, content8, className),
708
1712
  style: { ...portal2.style, ...style },
709
1713
  ...rest
710
1714
  }
711
1715
  ) });
712
1716
  }
713
1717
  );
714
- var DropdownMenuItem = /* @__PURE__ */ forwardRef14(
1718
+ var DropdownMenuItem = /* @__PURE__ */ forwardRef21(
715
1719
  function DropdownMenuItem2({ icon: icon6, shortcut: shortcut2, color = "default", className, children, ...rest }, ref) {
716
- return /* @__PURE__ */ jsxs12(RadixMenu.Item, { ref, className: cx(item3, color === "danger" && danger, className), ...rest, children: [
717
- icon6 && /* @__PURE__ */ jsx15("span", { className: icon4, "aria-hidden": true, children: icon6 }),
1720
+ return /* @__PURE__ */ jsxs19(RadixMenu.Item, { ref, className: cx(item5, color === "danger" && danger, className), ...rest, children: [
1721
+ icon6 && /* @__PURE__ */ jsx23("span", { className: icon5, "aria-hidden": true, children: icon6 }),
718
1722
  children,
719
- shortcut2 && /* @__PURE__ */ jsx15("span", { className: shortcut, "aria-hidden": true, children: shortcut2 })
1723
+ shortcut2 && /* @__PURE__ */ jsx23("span", { className: shortcut, "aria-hidden": true, children: shortcut2 })
720
1724
  ] });
721
1725
  }
722
1726
  );
723
- var DropdownMenuLabel = /* @__PURE__ */ forwardRef14(
1727
+ var DropdownMenuLabel = /* @__PURE__ */ forwardRef21(
724
1728
  function DropdownMenuLabel2({ className, ...rest }, ref) {
725
- return /* @__PURE__ */ jsx15(RadixMenu.Label, { ref, className: cx(label, className), ...rest });
1729
+ return /* @__PURE__ */ jsx23(RadixMenu.Label, { ref, className: cx(label2, className), ...rest });
726
1730
  }
727
1731
  );
728
- var DropdownMenuSeparator = /* @__PURE__ */ forwardRef14(
1732
+ var DropdownMenuSeparator = /* @__PURE__ */ forwardRef21(
729
1733
  function DropdownMenuSeparator2({ className, ...rest }, ref) {
730
- return /* @__PURE__ */ jsx15(RadixMenu.Separator, { ref, className: cx(separator2, className), ...rest });
1734
+ return /* @__PURE__ */ jsx23(RadixMenu.Separator, { ref, className: cx(separator2, className), ...rest });
731
1735
  }
732
1736
  );
733
1737
 
734
- // src/components/Input/Input.tsx
735
- import { forwardRef as forwardRef15 } from "react";
736
-
737
- // src/components/Input/Input.css.ts
738
- import { createRuntimeFn as _7a46812 } from "@vanilla-extract/recipes/createRuntimeFn";
739
- var adornment = "_19p5zvh6";
740
- var field = "_19p5zvh7";
741
- var fieldFullWidth = "_19p5zvh8";
742
- var helperText = /* @__PURE__ */ _7a46812({ defaultClassName: "_19p5zvhb", variantClassNames: { error: { true: "_19p5zvhc" } }, defaultVariants: {}, compoundVariants: [] });
743
- var input2 = "_19p5zvh5";
744
- var label2 = "_19p5zvh9";
745
- var requiredMark = "_19p5zvha";
746
- var root5 = /* @__PURE__ */ _7a46812({ defaultClassName: "_19p5zvh0", variantClassNames: { size: { sm: "_19p5zvh1", md: "_19p5zvh2", lg: "_19p5zvh3" }, fullWidth: { true: "_19p5zvh4" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
747
-
748
- // src/components/Input/Input.tsx
749
- import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
750
- var Input = /* @__PURE__ */ forwardRef15(function Input2({ size, invalid, fullWidth, startAdornment, endAdornment, rootClassName, className, disabled, ...rest }, ref) {
751
- return /* @__PURE__ */ jsxs13(
752
- "div",
753
- {
754
- className: cx(root5({ size, fullWidth }), rootClassName),
755
- "data-invalid": invalid || void 0,
756
- "data-disabled": disabled || void 0,
757
- children: [
758
- startAdornment && /* @__PURE__ */ jsx16("span", { className: adornment, children: startAdornment }),
759
- /* @__PURE__ */ jsx16(
760
- "input",
761
- {
762
- ref,
763
- className: cx(input2, className),
764
- disabled,
765
- "aria-invalid": invalid || void 0,
766
- ...rest
767
- }
768
- ),
769
- endAdornment && /* @__PURE__ */ jsx16("span", { className: adornment, children: endAdornment })
770
- ]
771
- }
772
- );
773
- });
774
-
775
- // src/components/Input/TextField.tsx
776
- import { forwardRef as forwardRef16, useId } from "react";
777
- import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
778
- var TextField = /* @__PURE__ */ forwardRef16(function TextField2({ label: label5, helperText: helperText2, error, required, fullWidth, id, "aria-describedby": ariaDescribedBy, ...rest }, ref) {
779
- const generatedId = useId();
780
- const inputId = id ?? generatedId;
781
- const helperId = helperText2 ? `${inputId}-helper` : void 0;
782
- return /* @__PURE__ */ jsxs14("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
783
- label5 && /* @__PURE__ */ jsxs14("label", { htmlFor: inputId, className: label2, children: [
784
- label5,
785
- required && /* @__PURE__ */ jsx17("span", { className: requiredMark, "aria-hidden": true, children: "*" })
786
- ] }),
787
- /* @__PURE__ */ jsx17(
788
- Input,
789
- {
790
- ref,
791
- id: inputId,
792
- invalid: error,
793
- required,
794
- fullWidth,
795
- "aria-describedby": cx(helperId, ariaDescribedBy) || void 0,
796
- ...rest
797
- }
798
- ),
799
- helperText2 && /* @__PURE__ */ jsx17("p", { id: helperId, className: helperText({ error }), children: helperText2 })
800
- ] });
801
- });
802
-
803
- // src/components/Modal/Modal.tsx
804
- import * as Dialog2 from "@radix-ui/react-dialog";
805
- import { XIcon as XIcon3 } from "@bestow-ui/icons";
806
-
807
- // src/components/Modal/Modal.css.ts
808
- import { createRuntimeFn as _7a46813 } from "@vanilla-extract/recipes/createRuntimeFn";
809
- var body3 = "_1pdsmv0a";
810
- var closeButton3 = "_1pdsmv09";
811
- var content5 = /* @__PURE__ */ _7a46813({ defaultClassName: "_1pdsmv01", variantClassNames: { size: { sm: "_1pdsmv02", md: "_1pdsmv03", lg: "_1pdsmv04" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
812
- var description3 = "_1pdsmv08";
813
- var footer3 = "_1pdsmv0b";
814
- var header4 = "_1pdsmv05";
815
- var headings2 = "_1pdsmv06";
816
- var overlay2 = "_1pdsmv00";
817
- var title3 = "_1pdsmv07";
818
-
819
- // src/components/Modal/Modal.tsx
820
- import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
821
- function Modal({
822
- open,
823
- defaultOpen,
824
- onOpenChange,
825
- trigger: trigger4,
826
- title: title6,
827
- description: description6,
828
- children,
829
- footer: footer5,
830
- size,
831
- hideCloseButton = false,
832
- closeOnOverlayClick = true,
833
- className
834
- }) {
835
- const portal2 = usePortalProps();
836
- return /* @__PURE__ */ jsxs15(Dialog2.Root, { open, defaultOpen, onOpenChange, children: [
837
- trigger4 && /* @__PURE__ */ jsx18(Dialog2.Trigger, { asChild: true, children: trigger4 }),
838
- /* @__PURE__ */ jsxs15(Dialog2.Portal, { children: [
839
- /* @__PURE__ */ jsx18(Dialog2.Overlay, { className: cx(portal2.className, overlay2), style: portal2.style }),
840
- /* @__PURE__ */ jsxs15(
841
- Dialog2.Content,
842
- {
843
- className: cx(portal2.className, content5({ size }), className),
844
- style: portal2.style,
845
- onPointerDownOutside: closeOnOverlayClick ? void 0 : (event) => event.preventDefault(),
846
- ...description6 ? {} : { "aria-describedby": void 0 },
847
- children: [
848
- /* @__PURE__ */ jsxs15("div", { className: header4, children: [
849
- /* @__PURE__ */ jsxs15("div", { className: headings2, children: [
850
- /* @__PURE__ */ jsx18(Dialog2.Title, { className: title3, children: title6 }),
851
- description6 && /* @__PURE__ */ jsx18(Dialog2.Description, { className: description3, children: description6 })
852
- ] }),
853
- !hideCloseButton && /* @__PURE__ */ jsx18(Dialog2.Close, { className: closeButton3, "aria-label": "\uB2EB\uAE30", children: /* @__PURE__ */ jsx18(XIcon3, { size: 16 }) })
854
- ] }),
855
- children && /* @__PURE__ */ jsx18("div", { className: body3, children }),
856
- footer5 && /* @__PURE__ */ jsx18("div", { className: footer3, children: footer5 })
857
- ]
858
- }
859
- )
860
- ] })
861
- ] });
862
- }
863
- var ModalClose = Dialog2.Close;
864
-
865
1738
  // src/components/Pagination/Pagination.tsx
866
1739
  import { ChevronLeftIcon, ChevronRightIcon as ChevronRightIcon2 } from "@bestow-ui/icons";
867
- import { forwardRef as forwardRef17, useState } from "react";
1740
+ import { forwardRef as forwardRef22, useState as useState6 } from "react";
868
1741
 
869
1742
  // src/components/Pagination/getPaginationItems.ts
870
1743
  var range = (start, end) => end < start ? [] : Array.from({ length: end - start + 1 }, (_, i) => start + i);
@@ -893,13 +1766,13 @@ function getPaginationItems(page, totalPages, siblingCount = 1, boundaryCount =
893
1766
  // src/components/Pagination/Pagination.css.ts
894
1767
  import { createRuntimeFn as _7a46814 } from "@vanilla-extract/recipes/createRuntimeFn";
895
1768
  var ellipsis = "_1iraoak4";
896
- var item4 = /* @__PURE__ */ _7a46814({ defaultClassName: "_1iraoak1", variantClassNames: { size: { sm: "_1iraoak2", md: "_1iraoak3" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
897
- var list2 = "_1iraoak0";
1769
+ var item6 = /* @__PURE__ */ _7a46814({ defaultClassName: "_1iraoak1", variantClassNames: { size: { sm: "_1iraoak2", md: "_1iraoak3" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
1770
+ var list3 = "_1iraoak0";
898
1771
 
899
1772
  // src/components/Pagination/Pagination.tsx
900
- import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
1773
+ import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
901
1774
  var defaultItemLabel = (type, page) => type === "previous" ? "\uC774\uC804 \uD398\uC774\uC9C0" : type === "next" ? "\uB2E4\uC74C \uD398\uC774\uC9C0" : `${page} \uD398\uC774\uC9C0`;
902
- var Pagination = /* @__PURE__ */ forwardRef17(function Pagination2({
1775
+ var Pagination = /* @__PURE__ */ forwardRef22(function Pagination2({
903
1776
  totalPages,
904
1777
  page: pageProp,
905
1778
  defaultPage = 1,
@@ -912,7 +1785,7 @@ var Pagination = /* @__PURE__ */ forwardRef17(function Pagination2({
912
1785
  "aria-label": ariaLabel = "\uD398\uC774\uC9C0 \uD0D0\uC0C9",
913
1786
  ...rest
914
1787
  }, ref) {
915
- const [uncontrolledPage, setUncontrolledPage] = useState(defaultPage);
1788
+ const [uncontrolledPage, setUncontrolledPage] = useState6(defaultPage);
916
1789
  if (totalPages < 1) return null;
917
1790
  const page = Math.min(Math.max(pageProp ?? uncontrolledPage, 1), totalPages);
918
1791
  const goTo = (next) => {
@@ -920,9 +1793,9 @@ var Pagination = /* @__PURE__ */ forwardRef17(function Pagination2({
920
1793
  if (pageProp === void 0) setUncontrolledPage(next);
921
1794
  onPageChange?.(next);
922
1795
  };
923
- const itemClass = item4({ size });
924
- return /* @__PURE__ */ jsx19("nav", { ref, "aria-label": ariaLabel, className, ...rest, children: /* @__PURE__ */ jsxs16("ul", { className: list2, children: [
925
- /* @__PURE__ */ jsx19("li", { children: /* @__PURE__ */ jsx19(
1796
+ const itemClass = item6({ size });
1797
+ return /* @__PURE__ */ jsx24("nav", { ref, "aria-label": ariaLabel, className, ...rest, children: /* @__PURE__ */ jsxs20("ul", { className: list3, children: [
1798
+ /* @__PURE__ */ jsx24("li", { children: /* @__PURE__ */ jsx24(
926
1799
  "button",
927
1800
  {
928
1801
  type: "button",
@@ -930,23 +1803,23 @@ var Pagination = /* @__PURE__ */ forwardRef17(function Pagination2({
930
1803
  "aria-label": getItemLabel("previous", page - 1),
931
1804
  disabled: page <= 1,
932
1805
  onClick: () => goTo(page - 1),
933
- children: /* @__PURE__ */ jsx19(ChevronLeftIcon, { size: 16 })
1806
+ children: /* @__PURE__ */ jsx24(ChevronLeftIcon, { size: 16 })
934
1807
  }
935
1808
  ) }),
936
1809
  getPaginationItems(page, totalPages, siblingCount, boundaryCount).map(
937
- (item6) => typeof item6 === "number" ? /* @__PURE__ */ jsx19("li", { children: /* @__PURE__ */ jsx19(
1810
+ (item7) => typeof item7 === "number" ? /* @__PURE__ */ jsx24("li", { children: /* @__PURE__ */ jsx24(
938
1811
  "button",
939
1812
  {
940
1813
  type: "button",
941
1814
  className: itemClass,
942
- "aria-label": getItemLabel("page", item6),
943
- "aria-current": item6 === page ? "page" : void 0,
944
- onClick: () => goTo(item6),
945
- children: item6
1815
+ "aria-label": getItemLabel("page", item7),
1816
+ "aria-current": item7 === page ? "page" : void 0,
1817
+ onClick: () => goTo(item7),
1818
+ children: item7
946
1819
  }
947
- ) }, item6) : /* @__PURE__ */ jsx19("li", { "aria-hidden": true, className: cx(itemClass, ellipsis), children: "\u2026" }, item6)
1820
+ ) }, item7) : /* @__PURE__ */ jsx24("li", { "aria-hidden": true, className: cx(itemClass, ellipsis), children: "\u2026" }, item7)
948
1821
  ),
949
- /* @__PURE__ */ jsx19("li", { children: /* @__PURE__ */ jsx19(
1822
+ /* @__PURE__ */ jsx24("li", { children: /* @__PURE__ */ jsx24(
950
1823
  "button",
951
1824
  {
952
1825
  type: "button",
@@ -954,28 +1827,79 @@ var Pagination = /* @__PURE__ */ forwardRef17(function Pagination2({
954
1827
  "aria-label": getItemLabel("next", page + 1),
955
1828
  disabled: page >= totalPages,
956
1829
  onClick: () => goTo(page + 1),
957
- children: /* @__PURE__ */ jsx19(ChevronRightIcon2, { size: 16 })
1830
+ children: /* @__PURE__ */ jsx24(ChevronRightIcon2, { size: 16 })
958
1831
  }
959
1832
  ) })
960
1833
  ] }) });
961
1834
  });
962
1835
 
1836
+ // src/components/PhoneNumberInput/PhoneNumberInput.tsx
1837
+ import { forwardRef as forwardRef23, useRef as useRef8 } from "react";
1838
+ import { jsx as jsx25 } from "react/jsx-runtime";
1839
+ var sanitize2 = (input5) => {
1840
+ const digits = input5.replace(/\D/g, "");
1841
+ return digits.slice(0, phoneNumberMaxDigits(digits));
1842
+ };
1843
+ var isDigit3 = (char) => /\d/.test(char);
1844
+ var PhoneNumberInput = /* @__PURE__ */ forwardRef23(
1845
+ function PhoneNumberInput2(props, ref) {
1846
+ const {
1847
+ value: value4,
1848
+ defaultValue,
1849
+ onValueChange,
1850
+ label: label6 = "\uD734\uB300\uD3F0 \uBC88\uD638",
1851
+ placeholder = "010-0000-0000",
1852
+ onKeyDown,
1853
+ ...rest
1854
+ } = props;
1855
+ const inputRef = useRef8(null);
1856
+ const field3 = useFormattedInput({
1857
+ isControlled: "value" in props,
1858
+ value: value4,
1859
+ defaultValue,
1860
+ onValueChange,
1861
+ sanitize: sanitize2,
1862
+ format: formatPhoneNumber,
1863
+ isMeaningful: isDigit3,
1864
+ inputRef
1865
+ });
1866
+ return /* @__PURE__ */ jsx25(
1867
+ TextField,
1868
+ {
1869
+ ref: mergeRefs(ref, inputRef),
1870
+ label: label6,
1871
+ placeholder,
1872
+ type: "tel",
1873
+ inputMode: "tel",
1874
+ autoComplete: "tel-national",
1875
+ value: field3.display,
1876
+ onChange: field3.onChange,
1877
+ onKeyDown: (event) => {
1878
+ field3.onKeyDown(event);
1879
+ onKeyDown?.(event);
1880
+ },
1881
+ ...rest
1882
+ }
1883
+ );
1884
+ }
1885
+ );
1886
+
963
1887
  // src/components/Popover/Popover.tsx
964
1888
  import * as RadixPopover from "@radix-ui/react-popover";
965
1889
  import { XIcon as XIcon4 } from "@bestow-ui/icons";
966
- import { useId as useId2 } from "react";
1890
+ import { useId as useId5 } from "react";
967
1891
 
968
1892
  // src/components/Popover/Popover.css.ts
969
1893
  var arrow = "_1j99p8x4";
970
1894
  var closeButton4 = "_1j99p8x3";
971
- var content6 = "_1j99p8x0";
1895
+ var content9 = "_1j99p8x0";
972
1896
  var header5 = "_1j99p8x1";
973
1897
  var title4 = "_1j99p8x2";
974
1898
 
975
1899
  // src/components/Popover/Popover.tsx
976
- import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
977
- function Popover({
978
- content: content10,
1900
+ import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
1901
+ function Popover2({
1902
+ content: content12,
979
1903
  children,
980
1904
  title: title6,
981
1905
  "aria-label": ariaLabel,
@@ -991,10 +1915,10 @@ function Popover({
991
1915
  style
992
1916
  }) {
993
1917
  const portal2 = usePortalProps();
994
- const titleId = useId2();
995
- return /* @__PURE__ */ jsxs17(RadixPopover.Root, { open, defaultOpen, onOpenChange, modal, children: [
996
- /* @__PURE__ */ jsx20(RadixPopover.Trigger, { asChild: true, children }),
997
- /* @__PURE__ */ jsx20(RadixPopover.Portal, { children: /* @__PURE__ */ jsxs17(
1918
+ const titleId = useId5();
1919
+ return /* @__PURE__ */ jsxs21(RadixPopover.Root, { open, defaultOpen, onOpenChange, modal, children: [
1920
+ /* @__PURE__ */ jsx26(RadixPopover.Trigger, { asChild: true, children }),
1921
+ /* @__PURE__ */ jsx26(RadixPopover.Portal, { children: /* @__PURE__ */ jsxs21(
998
1922
  RadixPopover.Content,
999
1923
  {
1000
1924
  side,
@@ -1003,15 +1927,15 @@ function Popover({
1003
1927
  collisionPadding: 8,
1004
1928
  "aria-labelledby": title6 ? titleId : void 0,
1005
1929
  "aria-label": title6 ? void 0 : ariaLabel,
1006
- className: cx(portal2.className, content6, className),
1930
+ className: cx(portal2.className, content9, className),
1007
1931
  style: { ...portal2.style, ...style },
1008
1932
  children: [
1009
- (title6 || showClose) && /* @__PURE__ */ jsxs17("div", { className: header5, children: [
1010
- title6 && /* @__PURE__ */ jsx20("h2", { id: titleId, className: title4, children: title6 }),
1011
- showClose && /* @__PURE__ */ jsx20(RadixPopover.Close, { className: closeButton4, "aria-label": "\uB2EB\uAE30", children: /* @__PURE__ */ jsx20(XIcon4, { size: 16 }) })
1933
+ (title6 || showClose) && /* @__PURE__ */ jsxs21("div", { className: header5, children: [
1934
+ title6 && /* @__PURE__ */ jsx26("h2", { id: titleId, className: title4, children: title6 }),
1935
+ showClose && /* @__PURE__ */ jsx26(RadixPopover.Close, { className: closeButton4, "aria-label": "\uB2EB\uAE30", children: /* @__PURE__ */ jsx26(XIcon4, { size: 16 }) })
1012
1936
  ] }),
1013
- content10,
1014
- showArrow && /* @__PURE__ */ jsx20(RadixPopover.Arrow, { className: arrow, width: 12, height: 6 })
1937
+ content12,
1938
+ showArrow && /* @__PURE__ */ jsx26(RadixPopover.Arrow, { className: arrow, width: 12, height: 6 })
1015
1939
  ]
1016
1940
  }
1017
1941
  ) })
@@ -1020,7 +1944,7 @@ function Popover({
1020
1944
  var PopoverClose = RadixPopover.Close;
1021
1945
 
1022
1946
  // src/components/Progress/Progress.tsx
1023
- import { forwardRef as forwardRef18, useId as useId3 } from "react";
1947
+ import { forwardRef as forwardRef24, useId as useId6 } from "react";
1024
1948
 
1025
1949
  // src/components/Progress/Progress.css.ts
1026
1950
  import { createRuntimeFn as _7a46815 } from "@vanilla-extract/recipes/createRuntimeFn";
@@ -1029,15 +1953,15 @@ var indicator = /* @__PURE__ */ _7a46815({ defaultClassName: "_1tvkq008", varian
1029
1953
  var label3 = "_1tvkq002";
1030
1954
  var root6 = "_1tvkq000";
1031
1955
  var track = /* @__PURE__ */ _7a46815({ defaultClassName: "_1tvkq004", variantClassNames: { size: { sm: "_1tvkq005", md: "_1tvkq006", lg: "_1tvkq007" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
1032
- var value = "_1tvkq003";
1956
+ var value2 = "_1tvkq003";
1033
1957
 
1034
1958
  // src/components/Progress/Progress.tsx
1035
- import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
1036
- var defaultFormat = (value3, max) => `${Math.round(value3 / max * 100)}%`;
1037
- var Progress = /* @__PURE__ */ forwardRef18(function Progress2({
1038
- value: value3,
1959
+ import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
1960
+ var defaultFormat = (value4, max) => `${Math.round(value4 / max * 100)}%`;
1961
+ var Progress = /* @__PURE__ */ forwardRef24(function Progress2({
1962
+ value: value4,
1039
1963
  max = 100,
1040
- label: label5,
1964
+ label: label6,
1041
1965
  "aria-label": ariaLabel,
1042
1966
  showValue,
1043
1967
  formatValue = defaultFormat,
@@ -1046,28 +1970,28 @@ var Progress = /* @__PURE__ */ forwardRef18(function Progress2({
1046
1970
  className,
1047
1971
  ...rest
1048
1972
  }, ref) {
1049
- const labelId = useId3();
1050
- const isIndeterminate = value3 === void 0 || value3 === null;
1973
+ const labelId = useId6();
1974
+ const isIndeterminate = value4 === void 0 || value4 === null;
1051
1975
  const safeMax = max > 0 ? max : 100;
1052
- const clamped = isIndeterminate ? 0 : Math.min(safeMax, Math.max(0, value3));
1976
+ const clamped = isIndeterminate ? 0 : Math.min(safeMax, Math.max(0, value4));
1053
1977
  const valueText = isIndeterminate ? void 0 : formatValue(clamped, safeMax);
1054
- return /* @__PURE__ */ jsxs18("div", { ref, className: cx(root6, className), ...rest, children: [
1055
- (label5 || showValue && valueText) && /* @__PURE__ */ jsxs18("div", { className: header6, children: [
1056
- label5 && /* @__PURE__ */ jsx21("span", { id: labelId, className: label3, children: label5 }),
1057
- showValue && valueText && /* @__PURE__ */ jsx21("span", { className: value, "aria-hidden": true, children: valueText })
1978
+ return /* @__PURE__ */ jsxs22("div", { ref, className: cx(root6, className), ...rest, children: [
1979
+ (label6 || showValue && valueText) && /* @__PURE__ */ jsxs22("div", { className: header6, children: [
1980
+ label6 && /* @__PURE__ */ jsx27("span", { id: labelId, className: label3, children: label6 }),
1981
+ showValue && valueText && /* @__PURE__ */ jsx27("span", { className: value2, "aria-hidden": true, children: valueText })
1058
1982
  ] }),
1059
- /* @__PURE__ */ jsx21(
1983
+ /* @__PURE__ */ jsx27(
1060
1984
  "div",
1061
1985
  {
1062
1986
  role: "progressbar",
1063
- "aria-labelledby": label5 ? labelId : void 0,
1064
- "aria-label": label5 ? void 0 : ariaLabel,
1987
+ "aria-labelledby": label6 ? labelId : void 0,
1988
+ "aria-label": label6 ? void 0 : ariaLabel,
1065
1989
  "aria-valuemin": 0,
1066
1990
  "aria-valuemax": safeMax,
1067
1991
  "aria-valuenow": isIndeterminate ? void 0 : clamped,
1068
1992
  "aria-valuetext": valueText,
1069
1993
  className: track({ size }),
1070
- children: /* @__PURE__ */ jsx21(
1994
+ children: /* @__PURE__ */ jsx27(
1071
1995
  "div",
1072
1996
  {
1073
1997
  className: indicator({ color }),
@@ -1082,7 +2006,7 @@ var Progress = /* @__PURE__ */ forwardRef18(function Progress2({
1082
2006
 
1083
2007
  // src/components/RadioGroup/RadioGroup.tsx
1084
2008
  import * as RadixRadioGroup from "@radix-ui/react-radio-group";
1085
- import { forwardRef as forwardRef19, useId as useId4 } from "react";
2009
+ import { forwardRef as forwardRef25, useId as useId7 } from "react";
1086
2010
 
1087
2011
  // src/components/RadioGroup/RadioGroup.css.ts
1088
2012
  import { createRuntimeFn as _7a46816 } from "@vanilla-extract/recipes/createRuntimeFn";
@@ -1096,15 +2020,15 @@ var radio = /* @__PURE__ */ _7a46816({ defaultClassName: "_1w9iwjm7", variantCla
1096
2020
  var text = "_1w9iwjmb";
1097
2021
 
1098
2022
  // src/components/RadioGroup/RadioGroup.tsx
1099
- import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
1100
- var RadioGroup = /* @__PURE__ */ forwardRef19(function RadioGroup2(props, ref) {
2023
+ import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
2024
+ var RadioGroup = /* @__PURE__ */ forwardRef25(function RadioGroup2(props, ref) {
1101
2025
  const {
1102
2026
  options,
1103
- value: value3,
2027
+ value: value4,
1104
2028
  defaultValue,
1105
2029
  onValueChange,
1106
- label: label5,
1107
- helperText: helperText2,
2030
+ label: label6,
2031
+ helperText: helperText3,
1108
2032
  error,
1109
2033
  orientation = "vertical",
1110
2034
  size,
@@ -1116,21 +2040,21 @@ var RadioGroup = /* @__PURE__ */ forwardRef19(function RadioGroup2(props, ref) {
1116
2040
  className
1117
2041
  } = props;
1118
2042
  const isControlled = "value" in props;
1119
- const generatedId = useId4();
2043
+ const generatedId = useId7();
1120
2044
  const baseId = id ?? generatedId;
1121
- const labelId = label5 ? `${baseId}-label` : void 0;
1122
- const helperId = helperText2 ? `${baseId}-helper` : void 0;
1123
- return /* @__PURE__ */ jsxs19("div", { className: cx(field, className), children: [
1124
- label5 && /* @__PURE__ */ jsxs19("span", { id: labelId, className: cx(label2, groupLabel), children: [
1125
- label5,
1126
- required && /* @__PURE__ */ jsx22("span", { className: requiredMark, "aria-hidden": true, children: "*" })
2045
+ const labelId = label6 ? `${baseId}-label` : void 0;
2046
+ const helperId = helperText3 ? `${baseId}-helper` : void 0;
2047
+ return /* @__PURE__ */ jsxs23("div", { className: cx(field, className), children: [
2048
+ label6 && /* @__PURE__ */ jsxs23("span", { id: labelId, className: cx(label, groupLabel), children: [
2049
+ label6,
2050
+ required && /* @__PURE__ */ jsx28("span", { className: requiredMark, "aria-hidden": true, children: "*" })
1127
2051
  ] }),
1128
- /* @__PURE__ */ jsx22(
2052
+ /* @__PURE__ */ jsx28(
1129
2053
  RadixRadioGroup.Root,
1130
2054
  {
1131
2055
  ref,
1132
2056
  id: baseId,
1133
- value: isControlled ? value3 ?? "" : void 0,
2057
+ value: isControlled ? value4 ?? "" : void 0,
1134
2058
  defaultValue,
1135
2059
  onValueChange,
1136
2060
  orientation,
@@ -1146,8 +2070,8 @@ var RadioGroup = /* @__PURE__ */ forwardRef19(function RadioGroup2(props, ref) {
1146
2070
  const itemId = `${baseId}-${option2.value}`;
1147
2071
  const descriptionId = option2.description ? `${itemId}-description` : void 0;
1148
2072
  const itemDisabled = disabled || option2.disabled;
1149
- return /* @__PURE__ */ jsxs19("div", { className: option({ size }), "data-disabled": itemDisabled || void 0, children: [
1150
- /* @__PURE__ */ jsx22(
2073
+ return /* @__PURE__ */ jsxs23("div", { className: option({ size }), "data-disabled": itemDisabled || void 0, children: [
2074
+ /* @__PURE__ */ jsx28(
1151
2075
  RadixRadioGroup.Item,
1152
2076
  {
1153
2077
  id: itemId,
@@ -1155,46 +2079,35 @@ var RadioGroup = /* @__PURE__ */ forwardRef19(function RadioGroup2(props, ref) {
1155
2079
  disabled: option2.disabled,
1156
2080
  "aria-describedby": descriptionId,
1157
2081
  className: radio({ size }),
1158
- children: /* @__PURE__ */ jsx22(RadixRadioGroup.Indicator, { className: indicator2 })
2082
+ children: /* @__PURE__ */ jsx28(RadixRadioGroup.Indicator, { className: indicator2 })
1159
2083
  }
1160
2084
  ),
1161
- /* @__PURE__ */ jsxs19("span", { className: text, children: [
1162
- /* @__PURE__ */ jsx22("label", { htmlFor: itemId, className: labelText, children: option2.label }),
1163
- option2.description && /* @__PURE__ */ jsx22("span", { id: descriptionId, className: description4, children: option2.description })
2085
+ /* @__PURE__ */ jsxs23("span", { className: text, children: [
2086
+ /* @__PURE__ */ jsx28("label", { htmlFor: itemId, className: labelText, children: option2.label }),
2087
+ option2.description && /* @__PURE__ */ jsx28("span", { id: descriptionId, className: description4, children: option2.description })
1164
2088
  ] })
1165
2089
  ] }, option2.value);
1166
2090
  })
1167
2091
  }
1168
2092
  ),
1169
- helperText2 && /* @__PURE__ */ jsx22("p", { id: helperId, className: helperText({ error }), children: helperText2 })
2093
+ helperText3 && /* @__PURE__ */ jsx28("p", { id: helperId, className: helperText({ error }), children: helperText3 })
1170
2094
  ] });
1171
2095
  });
1172
2096
 
1173
2097
  // src/components/Select/Select.tsx
1174
2098
  import * as RadixSelect from "@radix-ui/react-select";
1175
- import { forwardRef as forwardRef20, useId as useId5 } from "react";
1176
- import { CheckIcon, ChevronDownIcon as ChevronDownIcon2 } from "@bestow-ui/icons";
1177
-
1178
- // src/components/Select/Select.css.ts
1179
- var content7 = "_1kx81e83";
1180
- var icon5 = "_1kx81e82";
1181
- var item5 = "_1kx81e85";
1182
- var itemIndicator = "_1kx81e86";
1183
- var trigger2 = "_1kx81e80";
1184
- var value2 = "_1kx81e81";
1185
- var viewport = "_1kx81e84";
1186
-
1187
- // src/components/Select/Select.tsx
1188
- import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
1189
- var Select = /* @__PURE__ */ forwardRef20(function Select2(props, ref) {
2099
+ import { forwardRef as forwardRef26, useId as useId8 } from "react";
2100
+ import { CheckIcon as CheckIcon2, ChevronDownIcon as ChevronDownIcon4 } from "@bestow-ui/icons";
2101
+ import { jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
2102
+ var Select = /* @__PURE__ */ forwardRef26(function Select2(props, ref) {
1190
2103
  const {
1191
2104
  options,
1192
- value: value3,
2105
+ value: value4,
1193
2106
  defaultValue,
1194
2107
  onValueChange,
1195
2108
  placeholder,
1196
- label: label5,
1197
- helperText: helperText2,
2109
+ label: label6,
2110
+ helperText: helperText3,
1198
2111
  error,
1199
2112
  size,
1200
2113
  fullWidth,
@@ -1206,26 +2119,26 @@ var Select = /* @__PURE__ */ forwardRef20(function Select2(props, ref) {
1206
2119
  className
1207
2120
  } = props;
1208
2121
  const isControlled = "value" in props;
1209
- const generatedId = useId5();
2122
+ const generatedId = useId8();
1210
2123
  const triggerId = id ?? generatedId;
1211
- const helperId = helperText2 ? `${triggerId}-helper` : void 0;
2124
+ const helperId = helperText3 ? `${triggerId}-helper` : void 0;
1212
2125
  const portal2 = usePortalProps();
1213
- return /* @__PURE__ */ jsxs20("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
1214
- label5 && /* @__PURE__ */ jsxs20("label", { htmlFor: triggerId, className: label2, children: [
1215
- label5,
1216
- required && /* @__PURE__ */ jsx23("span", { className: requiredMark, "aria-hidden": true, children: "*" })
2126
+ return /* @__PURE__ */ jsxs24("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
2127
+ label6 && /* @__PURE__ */ jsxs24("label", { htmlFor: triggerId, className: label, children: [
2128
+ label6,
2129
+ required && /* @__PURE__ */ jsx29("span", { className: requiredMark, "aria-hidden": true, children: "*" })
1217
2130
  ] }),
1218
- /* @__PURE__ */ jsxs20(
2131
+ /* @__PURE__ */ jsxs24(
1219
2132
  RadixSelect.Root,
1220
2133
  {
1221
- value: isControlled ? value3 ?? "" : void 0,
2134
+ value: isControlled ? value4 ?? "" : void 0,
1222
2135
  defaultValue,
1223
2136
  onValueChange,
1224
2137
  disabled,
1225
2138
  required,
1226
2139
  name,
1227
2140
  children: [
1228
- /* @__PURE__ */ jsxs20(
2141
+ /* @__PURE__ */ jsxs24(
1229
2142
  RadixSelect.Trigger,
1230
2143
  {
1231
2144
  ref,
@@ -1234,30 +2147,30 @@ var Select = /* @__PURE__ */ forwardRef20(function Select2(props, ref) {
1234
2147
  "aria-invalid": error || void 0,
1235
2148
  "aria-describedby": helperId,
1236
2149
  "data-invalid": error || void 0,
1237
- className: cx(root5({ size, fullWidth }), trigger2, className),
2150
+ className: cx(root3({ size, fullWidth }), trigger2, className),
1238
2151
  children: [
1239
- /* @__PURE__ */ jsx23("span", { className: value2, children: /* @__PURE__ */ jsx23(RadixSelect.Value, { placeholder }) }),
1240
- /* @__PURE__ */ jsx23(RadixSelect.Icon, { className: icon5, children: /* @__PURE__ */ jsx23(ChevronDownIcon2, { size: 16 }) })
2152
+ /* @__PURE__ */ jsx29("span", { className: value, children: /* @__PURE__ */ jsx29(RadixSelect.Value, { placeholder }) }),
2153
+ /* @__PURE__ */ jsx29(RadixSelect.Icon, { className: icon4, children: /* @__PURE__ */ jsx29(ChevronDownIcon4, { size: 16 }) })
1241
2154
  ]
1242
2155
  }
1243
2156
  ),
1244
- /* @__PURE__ */ jsx23(RadixSelect.Portal, { children: /* @__PURE__ */ jsx23(
2157
+ /* @__PURE__ */ jsx29(RadixSelect.Portal, { children: /* @__PURE__ */ jsx29(
1245
2158
  RadixSelect.Content,
1246
2159
  {
1247
2160
  position: "popper",
1248
2161
  sideOffset: 4,
1249
2162
  collisionPadding: 8,
1250
- className: cx(portal2.className, content7),
2163
+ className: cx(portal2.className, content5),
1251
2164
  style: portal2.style,
1252
- children: /* @__PURE__ */ jsx23(RadixSelect.Viewport, { className: viewport, children: options.map((option2) => /* @__PURE__ */ jsxs20(
2165
+ children: /* @__PURE__ */ jsx29(RadixSelect.Viewport, { className: viewport, children: options.map((option2) => /* @__PURE__ */ jsxs24(
1253
2166
  RadixSelect.Item,
1254
2167
  {
1255
2168
  value: option2.value,
1256
2169
  disabled: option2.disabled,
1257
- className: item5,
2170
+ className: item4,
1258
2171
  children: [
1259
- /* @__PURE__ */ jsx23(RadixSelect.ItemText, { children: option2.label }),
1260
- /* @__PURE__ */ jsx23(RadixSelect.ItemIndicator, { className: itemIndicator, children: /* @__PURE__ */ jsx23(CheckIcon, { size: 16 }) })
2172
+ /* @__PURE__ */ jsx29(RadixSelect.ItemText, { children: option2.label }),
2173
+ /* @__PURE__ */ jsx29(RadixSelect.ItemIndicator, { className: itemIndicator, children: /* @__PURE__ */ jsx29(CheckIcon2, { size: 16 }) })
1261
2174
  ]
1262
2175
  },
1263
2176
  option2.value
@@ -1267,13 +2180,13 @@ var Select = /* @__PURE__ */ forwardRef20(function Select2(props, ref) {
1267
2180
  ]
1268
2181
  }
1269
2182
  ),
1270
- helperText2 && /* @__PURE__ */ jsx23("p", { id: helperId, className: helperText({ error }), children: helperText2 })
2183
+ helperText3 && /* @__PURE__ */ jsx29("p", { id: helperId, className: helperText({ error }), children: helperText3 })
1271
2184
  ] });
1272
2185
  });
1273
2186
 
1274
2187
  // src/components/Skeleton/Skeleton.tsx
1275
2188
  import { assignInlineVars as assignInlineVars2 } from "@vanilla-extract/dynamic";
1276
- import { forwardRef as forwardRef21 } from "react";
2189
+ import { forwardRef as forwardRef27 } from "react";
1277
2190
 
1278
2191
  // src/components/Skeleton/Skeleton.css.ts
1279
2192
  import { createRuntimeFn as _7a46817 } from "@vanilla-extract/recipes/createRuntimeFn";
@@ -1283,13 +2196,13 @@ var skeleton = /* @__PURE__ */ _7a46817({ defaultClassName: "_1s8datd2", variant
1283
2196
  var width = "var(--_1s8datd0)";
1284
2197
 
1285
2198
  // src/components/Skeleton/Skeleton.tsx
1286
- import { jsx as jsx24 } from "react/jsx-runtime";
1287
- var toCss = (value3) => typeof value3 === "number" ? `${value3}px` : value3;
1288
- var Skeleton = /* @__PURE__ */ forwardRef21(function Skeleton2({ variant = "text", width: width2, height: height2, lines: lines2 = 1, className, style, ...rest }, ref) {
2199
+ import { jsx as jsx30 } from "react/jsx-runtime";
2200
+ var toCss = (value4) => typeof value4 === "number" ? `${value4}px` : value4;
2201
+ var Skeleton = /* @__PURE__ */ forwardRef27(function Skeleton2({ variant = "text", width: width2, height: height2, lines: lines2 = 1, className, style, ...rest }, ref) {
1289
2202
  const w = toCss(width2 ?? (variant === "circle" ? 40 : "100%"));
1290
2203
  const h = toCss(height2 ?? (variant === "circle" ? w : variant === "rect" ? 100 : "1em"));
1291
2204
  if (variant === "text" && lines2 > 1) {
1292
- return /* @__PURE__ */ jsx24(
2205
+ return /* @__PURE__ */ jsx30(
1293
2206
  "span",
1294
2207
  {
1295
2208
  ref,
@@ -1297,7 +2210,7 @@ var Skeleton = /* @__PURE__ */ forwardRef21(function Skeleton2({ variant = "text
1297
2210
  className: cx(lines, className),
1298
2211
  style: { ...assignInlineVars2({ [width]: w }), ...style },
1299
2212
  ...rest,
1300
- children: Array.from({ length: lines2 }, (_, i) => /* @__PURE__ */ jsx24(
2213
+ children: Array.from({ length: lines2 }, (_, i) => /* @__PURE__ */ jsx30(
1301
2214
  "span",
1302
2215
  {
1303
2216
  className: skeleton({ variant }),
@@ -1308,7 +2221,7 @@ var Skeleton = /* @__PURE__ */ forwardRef21(function Skeleton2({ variant = "text
1308
2221
  }
1309
2222
  );
1310
2223
  }
1311
- return /* @__PURE__ */ jsx24(
2224
+ return /* @__PURE__ */ jsx30(
1312
2225
  "span",
1313
2226
  {
1314
2227
  ref,
@@ -1320,106 +2233,324 @@ var Skeleton = /* @__PURE__ */ forwardRef21(function Skeleton2({ variant = "text
1320
2233
  );
1321
2234
  });
1322
2235
 
2236
+ // src/components/Slider/Slider.tsx
2237
+ import * as RadixSlider from "@radix-ui/react-slider";
2238
+ import { forwardRef as forwardRef28, useId as useId9, useState as useState7 } from "react";
2239
+
2240
+ // src/components/Slider/Slider.css.ts
2241
+ import { createRuntimeFn as _7a46818 } from "@vanilla-extract/recipes/createRuntimeFn";
2242
+ var field2 = "_126mzjm0";
2243
+ var header7 = "_126mzjm1";
2244
+ var helperText2 = "_126mzjm4";
2245
+ var label4 = "_126mzjm2";
2246
+ var range2 = "_126mzjmb";
2247
+ var root7 = /* @__PURE__ */ _7a46818({ defaultClassName: "_126mzjm5", variantClassNames: { size: { sm: "_126mzjm6", md: "_126mzjm7" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
2248
+ var thumb = /* @__PURE__ */ _7a46818({ defaultClassName: "_126mzjmc", variantClassNames: { size: { sm: "_126mzjmd", md: "_126mzjme" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
2249
+ var track2 = /* @__PURE__ */ _7a46818({ defaultClassName: "_126mzjm8", variantClassNames: { size: { sm: "_126mzjm9", md: "_126mzjma" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
2250
+ var value3 = "_126mzjm3";
2251
+
2252
+ // src/components/Slider/Slider.tsx
2253
+ import { jsx as jsx31, jsxs as jsxs25 } from "react/jsx-runtime";
2254
+ var Slider = /* @__PURE__ */ forwardRef28(function Slider2(props, ref) {
2255
+ const {
2256
+ value: value4,
2257
+ defaultValue,
2258
+ onValueChange,
2259
+ min = 0,
2260
+ max = 100,
2261
+ label: label6,
2262
+ "aria-label": ariaLabel,
2263
+ helperText: helperText3,
2264
+ showValue,
2265
+ formatValue = String,
2266
+ thumbLabels = ["\uCD5C\uC18C", "\uCD5C\uB300"],
2267
+ size,
2268
+ id,
2269
+ className,
2270
+ disabled,
2271
+ ...rest
2272
+ } = props;
2273
+ const generatedId = useId9();
2274
+ const baseId = id ?? generatedId;
2275
+ const labelId = `${baseId}-label`;
2276
+ const helperId = `${baseId}-helper`;
2277
+ const isControlled = "value" in props;
2278
+ const [innerValue, setInnerValue] = useState7(defaultValue ?? [min]);
2279
+ const current2 = isControlled ? value4 ?? [min] : innerValue;
2280
+ const isRange = current2.length > 1;
2281
+ const handleChange = (next) => {
2282
+ if (!isControlled) setInnerValue(next);
2283
+ onValueChange?.(next);
2284
+ };
2285
+ const valueText = current2.map(formatValue).join(" \u2013 ");
2286
+ return /* @__PURE__ */ jsxs25("div", { className: cx(field2, className), children: [
2287
+ (label6 || showValue) && /* @__PURE__ */ jsxs25("div", { className: header7, children: [
2288
+ label6 && /* @__PURE__ */ jsx31("span", { id: labelId, className: label4, children: label6 }),
2289
+ showValue && /* @__PURE__ */ jsx31("span", { className: value3, "aria-hidden": true, children: valueText })
2290
+ ] }),
2291
+ /* @__PURE__ */ jsxs25(
2292
+ RadixSlider.Root,
2293
+ {
2294
+ ref,
2295
+ id: baseId,
2296
+ min,
2297
+ max,
2298
+ disabled,
2299
+ value: current2,
2300
+ onValueChange: handleChange,
2301
+ className: root7({ size }),
2302
+ ...rest,
2303
+ children: [
2304
+ /* @__PURE__ */ jsx31(RadixSlider.Track, { className: track2({ size }), children: /* @__PURE__ */ jsx31(RadixSlider.Range, { className: range2 }) }),
2305
+ current2.map((thumbValue, index) => {
2306
+ const thumbLabelId = `${baseId}-thumb-${index}`;
2307
+ return /* @__PURE__ */ jsx31(
2308
+ RadixSlider.Thumb,
2309
+ {
2310
+ className: thumb({ size }),
2311
+ "aria-labelledby": label6 ? isRange ? `${labelId} ${thumbLabelId}` : labelId : isRange ? thumbLabelId : void 0,
2312
+ "aria-label": label6 ? void 0 : isRange ? void 0 : ariaLabel,
2313
+ "aria-valuetext": formatValue(thumbValue),
2314
+ "aria-describedby": helperText3 ? helperId : void 0
2315
+ },
2316
+ index
2317
+ );
2318
+ })
2319
+ ]
2320
+ }
2321
+ ),
2322
+ isRange && current2.map((_, index) => /* @__PURE__ */ jsxs25("span", { id: `${baseId}-thumb-${index}`, hidden: true, children: [
2323
+ label6 ? "" : ariaLabel ? `${ariaLabel} ` : "",
2324
+ thumbLabels[index] ?? `${index + 1}`
2325
+ ] }, index)),
2326
+ helperText3 && /* @__PURE__ */ jsx31("span", { id: helperId, className: helperText2, children: helperText3 })
2327
+ ] });
2328
+ });
2329
+
1323
2330
  // src/components/Stack/Stack.tsx
1324
- import { forwardRef as forwardRef22 } from "react";
2331
+ import { forwardRef as forwardRef29 } from "react";
1325
2332
 
1326
2333
  // src/components/Stack/Stack.css.ts
1327
- import { createRuntimeFn as _7a46818 } from "@vanilla-extract/recipes/createRuntimeFn";
1328
- var stack = /* @__PURE__ */ _7a46818({ defaultClassName: "_1jz9hj90", variantClassNames: { direction: { row: "_1jz9hj91", column: "_1jz9hj92", "row-reverse": "_1jz9hj93", "column-reverse": "_1jz9hj94" }, gap: { "0": "_1jz9hj95", "1": "_1jz9hj96", "2": "_1jz9hj97", "3": "_1jz9hj98", "4": "_1jz9hj99", "5": "_1jz9hj9a", "6": "_1jz9hj9b", "8": "_1jz9hj9c", "10": "_1jz9hj9d", "12": "_1jz9hj9e", "16": "_1jz9hj9f" }, align: { start: "_1jz9hj9g", center: "_1jz9hj9h", end: "_1jz9hj9i", stretch: "_1jz9hj9j", baseline: "_1jz9hj9k" }, justify: { start: "_1jz9hj9l", center: "_1jz9hj9m", end: "_1jz9hj9n", between: "_1jz9hj9o", around: "_1jz9hj9p", evenly: "_1jz9hj9q" }, wrap: { true: "_1jz9hj9r" } }, defaultVariants: { direction: "column" }, compoundVariants: [] });
2334
+ import { createRuntimeFn as _7a46819 } from "@vanilla-extract/recipes/createRuntimeFn";
2335
+ var stack = /* @__PURE__ */ _7a46819({ defaultClassName: "_1jz9hj90", variantClassNames: { direction: { row: "_1jz9hj91", column: "_1jz9hj92", "row-reverse": "_1jz9hj93", "column-reverse": "_1jz9hj94" }, gap: { "0": "_1jz9hj95", "1": "_1jz9hj96", "2": "_1jz9hj97", "3": "_1jz9hj98", "4": "_1jz9hj99", "5": "_1jz9hj9a", "6": "_1jz9hj9b", "8": "_1jz9hj9c", "10": "_1jz9hj9d", "12": "_1jz9hj9e", "16": "_1jz9hj9f" }, align: { start: "_1jz9hj9g", center: "_1jz9hj9h", end: "_1jz9hj9i", stretch: "_1jz9hj9j", baseline: "_1jz9hj9k" }, justify: { start: "_1jz9hj9l", center: "_1jz9hj9m", end: "_1jz9hj9n", between: "_1jz9hj9o", around: "_1jz9hj9p", evenly: "_1jz9hj9q" }, wrap: { true: "_1jz9hj9r" } }, defaultVariants: { direction: "column" }, compoundVariants: [] });
1329
2336
 
1330
2337
  // src/components/Stack/Stack.tsx
1331
- import { jsx as jsx25 } from "react/jsx-runtime";
1332
- var Stack = /* @__PURE__ */ forwardRef22(function Stack2({ as: Component = "div", direction, gap, align, justify, wrap, className, ...rest }, ref) {
1333
- return /* @__PURE__ */ jsx25(Component, { ref, className: cx(stack({ direction, gap, align, justify, wrap }), className), ...rest });
2338
+ import { jsx as jsx32 } from "react/jsx-runtime";
2339
+ var Stack = /* @__PURE__ */ forwardRef29(function Stack2({ as: Component = "div", direction, gap, align, justify, wrap, className, ...rest }, ref) {
2340
+ return /* @__PURE__ */ jsx32(Component, { ref, className: cx(stack({ direction, gap, align, justify, wrap }), className), ...rest });
1334
2341
  });
1335
2342
 
1336
2343
  // src/components/Switch/Switch.tsx
1337
2344
  import * as RadixSwitch from "@radix-ui/react-switch";
1338
- import { forwardRef as forwardRef23, useId as useId6 } from "react";
2345
+ import { forwardRef as forwardRef30, useId as useId10 } from "react";
1339
2346
 
1340
2347
  // src/components/Switch/Switch.css.ts
1341
- import { createRuntimeFn as _7a46819 } from "@vanilla-extract/recipes/createRuntimeFn";
1342
- var label4 = "o33ul29";
1343
- var root7 = /* @__PURE__ */ _7a46819({ defaultClassName: "o33ul20", variantClassNames: { size: { sm: "o33ul21", md: "o33ul22" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
1344
- var thumb = /* @__PURE__ */ _7a46819({ defaultClassName: "o33ul26", variantClassNames: { size: { sm: "o33ul27", md: "o33ul28" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
1345
- var track2 = /* @__PURE__ */ _7a46819({ defaultClassName: "o33ul23", variantClassNames: { size: { sm: "o33ul24", md: "o33ul25" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
2348
+ import { createRuntimeFn as _7a46820 } from "@vanilla-extract/recipes/createRuntimeFn";
2349
+ var label5 = "o33ul29";
2350
+ var root8 = /* @__PURE__ */ _7a46820({ defaultClassName: "o33ul20", variantClassNames: { size: { sm: "o33ul21", md: "o33ul22" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
2351
+ var thumb2 = /* @__PURE__ */ _7a46820({ defaultClassName: "o33ul26", variantClassNames: { size: { sm: "o33ul27", md: "o33ul28" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
2352
+ var track3 = /* @__PURE__ */ _7a46820({ defaultClassName: "o33ul23", variantClassNames: { size: { sm: "o33ul24", md: "o33ul25" } }, defaultVariants: { size: "md" }, compoundVariants: [] });
1346
2353
 
1347
2354
  // src/components/Switch/Switch.tsx
1348
- import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
1349
- var Switch = /* @__PURE__ */ forwardRef23(function Switch2({ label: label5, size, id, className, disabled, "aria-label": ariaLabel, ...rest }, ref) {
1350
- const generatedId = useId6();
2355
+ import { jsx as jsx33, jsxs as jsxs26 } from "react/jsx-runtime";
2356
+ var Switch = /* @__PURE__ */ forwardRef30(function Switch2({ label: label6, size, id, className, disabled, "aria-label": ariaLabel, ...rest }, ref) {
2357
+ const generatedId = useId10();
1351
2358
  const switchId = id ?? generatedId;
1352
- return /* @__PURE__ */ jsxs21("span", { className: cx(root7({ size }), className), "data-disabled": disabled || void 0, children: [
1353
- /* @__PURE__ */ jsx26(
2359
+ return /* @__PURE__ */ jsxs26("span", { className: cx(root8({ size }), className), "data-disabled": disabled || void 0, children: [
2360
+ /* @__PURE__ */ jsx33(
1354
2361
  RadixSwitch.Root,
1355
2362
  {
1356
2363
  ref,
1357
2364
  id: switchId,
1358
2365
  disabled,
1359
2366
  "aria-label": ariaLabel,
1360
- className: track2({ size }),
2367
+ className: track3({ size }),
1361
2368
  ...rest,
1362
- children: /* @__PURE__ */ jsx26(RadixSwitch.Thumb, { className: thumb({ size }) })
2369
+ children: /* @__PURE__ */ jsx33(RadixSwitch.Thumb, { className: thumb2({ size }) })
1363
2370
  }
1364
2371
  ),
1365
- label5 && /* @__PURE__ */ jsx26("label", { htmlFor: switchId, className: label4, children: label5 })
2372
+ label6 && /* @__PURE__ */ jsx33("label", { htmlFor: switchId, className: label5, children: label6 })
1366
2373
  ] });
1367
2374
  });
1368
2375
 
2376
+ // src/components/Table/Table.tsx
2377
+ import {
2378
+ createContext as createContext2,
2379
+ forwardRef as forwardRef31,
2380
+ useContext as useContext2,
2381
+ useId as useId11
2382
+ } from "react";
2383
+ import { ArrowDownIcon, ArrowUpIcon } from "@bestow-ui/icons";
2384
+
2385
+ // src/components/Table/Table.css.ts
2386
+ import { createRuntimeFn as _7a46821 } from "@vanilla-extract/recipes/createRuntimeFn";
2387
+ var body4 = "l3ploy5";
2388
+ var caption = "l3ploy2";
2389
+ var cell = /* @__PURE__ */ _7a46821({ defaultClassName: "l3ploy9", variantClassNames: { size: { sm: "l3ploya", md: "l3ployb" }, align: { left: "l3ployc", center: "l3ployd", right: "l3ploye" } }, defaultVariants: { size: "md", align: "left" }, compoundVariants: [] });
2390
+ var container = "l3ploy0";
2391
+ var footer4 = "l3ploy7";
2392
+ var footerCell = "l3ployg";
2393
+ var head = "l3ployf";
2394
+ var header8 = "l3ploy3";
2395
+ var row3 = "l3ploy8";
2396
+ var sortButton = "l3ployh";
2397
+ var sortIcon = "l3ployi";
2398
+ var stickyHeader = "l3ploy4";
2399
+ var striped = "l3ploy6";
2400
+ var table = "l3ploy1";
2401
+
2402
+ // src/components/Table/Table.tsx
2403
+ import { jsx as jsx34, jsxs as jsxs27 } from "react/jsx-runtime";
2404
+ var TableSizeContext = /* @__PURE__ */ createContext2("md");
2405
+ var TableSectionContext = /* @__PURE__ */ createContext2("body");
2406
+ var Table = /* @__PURE__ */ forwardRef31(function Table2({
2407
+ size = "md",
2408
+ striped: striped2,
2409
+ stickyHeader: stickyHeader2,
2410
+ caption: caption2,
2411
+ "aria-label": ariaLabel,
2412
+ containerClassName,
2413
+ containerStyle,
2414
+ className,
2415
+ children,
2416
+ ...rest
2417
+ }, ref) {
2418
+ const captionId = useId11();
2419
+ return /* @__PURE__ */ jsx34(TableSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsx34(
2420
+ "div",
2421
+ {
2422
+ className: cx(container, containerClassName),
2423
+ style: containerStyle,
2424
+ tabIndex: 0,
2425
+ role: "region",
2426
+ "aria-labelledby": caption2 ? captionId : void 0,
2427
+ "aria-label": caption2 ? void 0 : ariaLabel,
2428
+ children: /* @__PURE__ */ jsxs27(
2429
+ "table",
2430
+ {
2431
+ ref,
2432
+ className: cx(table, striped2 && striped, stickyHeader2 && stickyHeader, className),
2433
+ "aria-label": caption2 ? void 0 : ariaLabel,
2434
+ ...rest,
2435
+ children: [
2436
+ caption2 && /* @__PURE__ */ jsx34("caption", { id: captionId, className: caption, children: caption2 }),
2437
+ children
2438
+ ]
2439
+ }
2440
+ )
2441
+ }
2442
+ ) });
2443
+ });
2444
+ var TableHeader = /* @__PURE__ */ forwardRef31(
2445
+ function TableHeader2({ className, ...rest }, ref) {
2446
+ return /* @__PURE__ */ jsx34(TableSectionContext.Provider, { value: "header", children: /* @__PURE__ */ jsx34("thead", { ref, className: cx(header8, className), ...rest }) });
2447
+ }
2448
+ );
2449
+ var TableBody = /* @__PURE__ */ forwardRef31(
2450
+ function TableBody2({ className, ...rest }, ref) {
2451
+ return /* @__PURE__ */ jsx34(TableSectionContext.Provider, { value: "body", children: /* @__PURE__ */ jsx34("tbody", { ref, className: cx(body4, className), ...rest }) });
2452
+ }
2453
+ );
2454
+ var TableFooter = /* @__PURE__ */ forwardRef31(
2455
+ function TableFooter2({ className, ...rest }, ref) {
2456
+ return /* @__PURE__ */ jsx34(TableSectionContext.Provider, { value: "footer", children: /* @__PURE__ */ jsx34("tfoot", { ref, className: cx(footer4, className), ...rest }) });
2457
+ }
2458
+ );
2459
+ var TableRow = /* @__PURE__ */ forwardRef31(function TableRow2({ selected, className, ...rest }, ref) {
2460
+ return /* @__PURE__ */ jsx34("tr", { ref, className: cx(row3, className), "data-state": selected ? "selected" : void 0, ...rest });
2461
+ });
2462
+ var TableHead = /* @__PURE__ */ forwardRef31(function TableHead2({ align, sortDirection, onSort, scope, className, children, ...rest }, ref) {
2463
+ const size = useContext2(TableSizeContext);
2464
+ const section = useContext2(TableSectionContext);
2465
+ const sortable = onSort !== void 0;
2466
+ const direction = sortDirection ?? "none";
2467
+ const SortIcon = direction === "descending" ? ArrowDownIcon : ArrowUpIcon;
2468
+ return /* @__PURE__ */ jsx34(
2469
+ "th",
2470
+ {
2471
+ ref,
2472
+ scope: scope ?? (section === "header" ? "col" : "row"),
2473
+ "aria-sort": sortable && direction !== "none" ? direction : void 0,
2474
+ className: cx(
2475
+ cell({ size, align }),
2476
+ section === "header" ? head : section === "footer" ? footerCell : void 0,
2477
+ className
2478
+ ),
2479
+ ...rest,
2480
+ children: sortable ? /* @__PURE__ */ jsxs27("button", { type: "button", className: sortButton, onClick: onSort, children: [
2481
+ children,
2482
+ /* @__PURE__ */ jsx34(SortIcon, { size: 14, className: sortIcon, "data-active": direction !== "none", "aria-hidden": true })
2483
+ ] }) : children
2484
+ }
2485
+ );
2486
+ });
2487
+ var TableCell = /* @__PURE__ */ forwardRef31(function TableCell2({ align, className, ...rest }, ref) {
2488
+ const size = useContext2(TableSizeContext);
2489
+ const section = useContext2(TableSectionContext);
2490
+ return /* @__PURE__ */ jsx34(
2491
+ "td",
2492
+ {
2493
+ ref,
2494
+ className: cx(cell({ size, align }), section === "footer" && footerCell, className),
2495
+ ...rest
2496
+ }
2497
+ );
2498
+ });
2499
+
1369
2500
  // src/components/Tabs/Tabs.tsx
1370
2501
  import * as RadixTabs from "@radix-ui/react-tabs";
1371
- import { createContext as createContext2, forwardRef as forwardRef24, useContext as useContext2 } from "react";
2502
+ import { createContext as createContext3, forwardRef as forwardRef32, useContext as useContext3 } from "react";
1372
2503
 
1373
2504
  // src/components/Tabs/Tabs.css.ts
1374
- import { createRuntimeFn as _7a46820 } from "@vanilla-extract/recipes/createRuntimeFn";
1375
- var content8 = "fvhbtda";
1376
- var list3 = /* @__PURE__ */ _7a46820({ defaultClassName: "fvhbtd0", variantClassNames: { variant: { line: "fvhbtd1", soft: "fvhbtd2" } }, defaultVariants: { variant: "line" }, compoundVariants: [] });
1377
- var trigger3 = /* @__PURE__ */ _7a46820({ defaultClassName: "fvhbtd3", variantClassNames: { variant: { line: "fvhbtd4", soft: "fvhbtd5" }, size: { sm: "fvhbtd6", md: "fvhbtd7" } }, defaultVariants: { variant: "line", size: "md" }, compoundVariants: [[{ variant: "soft", size: "sm" }, "fvhbtd8"], [{ variant: "soft", size: "md" }, "fvhbtd9"]] });
2505
+ import { createRuntimeFn as _7a46822 } from "@vanilla-extract/recipes/createRuntimeFn";
2506
+ var content10 = "fvhbtda";
2507
+ var list4 = /* @__PURE__ */ _7a46822({ defaultClassName: "fvhbtd0", variantClassNames: { variant: { line: "fvhbtd1", soft: "fvhbtd2" } }, defaultVariants: { variant: "line" }, compoundVariants: [] });
2508
+ var trigger3 = /* @__PURE__ */ _7a46822({ defaultClassName: "fvhbtd3", variantClassNames: { variant: { line: "fvhbtd4", soft: "fvhbtd5" }, size: { sm: "fvhbtd6", md: "fvhbtd7" } }, defaultVariants: { variant: "line", size: "md" }, compoundVariants: [[{ variant: "soft", size: "sm" }, "fvhbtd8"], [{ variant: "soft", size: "md" }, "fvhbtd9"]] });
1378
2509
 
1379
2510
  // src/components/Tabs/Tabs.tsx
1380
- import { jsx as jsx27 } from "react/jsx-runtime";
1381
- var TabsStyleContext = /* @__PURE__ */ createContext2({ variant: "line", size: "md" });
1382
- var Tabs = /* @__PURE__ */ forwardRef24(function Tabs2({ variant = "line", size = "md", ...props }, ref) {
2511
+ import { jsx as jsx35 } from "react/jsx-runtime";
2512
+ var TabsStyleContext = /* @__PURE__ */ createContext3({ variant: "line", size: "md" });
2513
+ var Tabs = /* @__PURE__ */ forwardRef32(function Tabs2({ variant = "line", size = "md", ...props }, ref) {
1383
2514
  const controlled = "value" in props ? { value: props.value ?? "" } : {};
1384
- return /* @__PURE__ */ jsx27(TabsStyleContext.Provider, { value: { variant, size }, children: /* @__PURE__ */ jsx27(RadixTabs.Root, { ref, ...props, ...controlled }) });
2515
+ return /* @__PURE__ */ jsx35(TabsStyleContext.Provider, { value: { variant, size }, children: /* @__PURE__ */ jsx35(RadixTabs.Root, { ref, ...props, ...controlled }) });
1385
2516
  });
1386
- var TabsList = /* @__PURE__ */ forwardRef24(function TabsList2({ className, ...rest }, ref) {
1387
- const { variant } = useContext2(TabsStyleContext);
1388
- return /* @__PURE__ */ jsx27(RadixTabs.List, { ref, className: cx(list3({ variant }), className), ...rest });
2517
+ var TabsList = /* @__PURE__ */ forwardRef32(function TabsList2({ className, ...rest }, ref) {
2518
+ const { variant } = useContext3(TabsStyleContext);
2519
+ return /* @__PURE__ */ jsx35(RadixTabs.List, { ref, className: cx(list4({ variant }), className), ...rest });
1389
2520
  });
1390
- var TabsTrigger = /* @__PURE__ */ forwardRef24(function TabsTrigger2({ className, ...rest }, ref) {
1391
- const { variant, size } = useContext2(TabsStyleContext);
1392
- return /* @__PURE__ */ jsx27(RadixTabs.Trigger, { ref, className: cx(trigger3({ variant, size }), className), ...rest });
2521
+ var TabsTrigger = /* @__PURE__ */ forwardRef32(function TabsTrigger2({ className, ...rest }, ref) {
2522
+ const { variant, size } = useContext3(TabsStyleContext);
2523
+ return /* @__PURE__ */ jsx35(RadixTabs.Trigger, { ref, className: cx(trigger3({ variant, size }), className), ...rest });
1393
2524
  });
1394
- var TabsContent = /* @__PURE__ */ forwardRef24(function TabsContent2({ className, ...rest }, ref) {
1395
- return /* @__PURE__ */ jsx27(RadixTabs.Content, { ref, className: cx(content8, className), ...rest });
2525
+ var TabsContent = /* @__PURE__ */ forwardRef32(function TabsContent2({ className, ...rest }, ref) {
2526
+ return /* @__PURE__ */ jsx35(RadixTabs.Content, { ref, className: cx(content10, className), ...rest });
1396
2527
  });
1397
2528
 
1398
2529
  // src/components/Textarea/Textarea.tsx
1399
2530
  import {
1400
- forwardRef as forwardRef25,
2531
+ forwardRef as forwardRef33,
1401
2532
  useCallback,
1402
- useEffect as useEffect2,
1403
- useId as useId7,
1404
- useLayoutEffect,
1405
- useRef as useRef2,
1406
- useState as useState2
2533
+ useEffect as useEffect4,
2534
+ useId as useId12,
2535
+ useLayoutEffect as useLayoutEffect2,
2536
+ useRef as useRef9,
2537
+ useState as useState8
1407
2538
  } from "react";
1408
2539
 
1409
2540
  // src/components/Textarea/Textarea.css.ts
1410
- import { createRuntimeFn as _7a46821 } from "@vanilla-extract/recipes/createRuntimeFn";
2541
+ import { createRuntimeFn as _7a46823 } from "@vanilla-extract/recipes/createRuntimeFn";
1411
2542
  var count = "_1koawa9";
1412
2543
  var countOver = "_1koawaa";
1413
2544
  var defaultWidth = "_1koawa7";
1414
- var footer4 = "_1koawa8";
1415
- var textarea = /* @__PURE__ */ _7a46821({ defaultClassName: "_1koawa0", variantClassNames: { size: { sm: "_1koawa1", md: "_1koawa2", lg: "_1koawa3" }, resize: { none: "_1koawa4", vertical: "_1koawa5", both: "_1koawa6" } }, defaultVariants: { size: "md", resize: "vertical" }, compoundVariants: [] });
2545
+ var footer5 = "_1koawa8";
2546
+ var textarea = /* @__PURE__ */ _7a46823({ defaultClassName: "_1koawa0", variantClassNames: { size: { sm: "_1koawa1", md: "_1koawa2", lg: "_1koawa3" }, resize: { none: "_1koawa4", vertical: "_1koawa5", both: "_1koawa6" } }, defaultVariants: { size: "md", resize: "vertical" }, compoundVariants: [] });
1416
2547
 
1417
2548
  // src/components/Textarea/Textarea.tsx
1418
- import { jsx as jsx28, jsxs as jsxs22 } from "react/jsx-runtime";
1419
- var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect2;
1420
- var Textarea = /* @__PURE__ */ forwardRef25(function Textarea2({
1421
- label: label5,
1422
- helperText: helperText2,
2549
+ import { jsx as jsx36, jsxs as jsxs28 } from "react/jsx-runtime";
2550
+ var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect2 : useEffect4;
2551
+ var Textarea = /* @__PURE__ */ forwardRef33(function Textarea2({
2552
+ label: label6,
2553
+ helperText: helperText3,
1423
2554
  error,
1424
2555
  size,
1425
2556
  fullWidth,
@@ -1429,7 +2560,7 @@ var Textarea = /* @__PURE__ */ forwardRef25(function Textarea2({
1429
2560
  required,
1430
2561
  id,
1431
2562
  rows = 3,
1432
- value: value3,
2563
+ value: value4,
1433
2564
  defaultValue,
1434
2565
  onChange,
1435
2566
  maxLength,
@@ -1438,12 +2569,12 @@ var Textarea = /* @__PURE__ */ forwardRef25(function Textarea2({
1438
2569
  "aria-describedby": ariaDescribedBy,
1439
2570
  ...rest
1440
2571
  }, ref) {
1441
- const generatedId = useId7();
2572
+ const generatedId = useId12();
1442
2573
  const textareaId = id ?? generatedId;
1443
- const helperId = helperText2 ? `${textareaId}-helper` : void 0;
1444
- const innerRef = useRef2(null);
1445
- const [uncontrolledLength, setUncontrolledLength] = useState2(() => String(defaultValue ?? "").length);
1446
- const length = value3 !== void 0 ? String(value3).length : uncontrolledLength;
2574
+ const helperId = helperText3 ? `${textareaId}-helper` : void 0;
2575
+ const innerRef = useRef9(null);
2576
+ const [uncontrolledLength, setUncontrolledLength] = useState8(() => String(defaultValue ?? "").length);
2577
+ const length = value4 !== void 0 ? String(value4).length : uncontrolledLength;
1447
2578
  const fitHeight = useCallback(() => {
1448
2579
  const el = innerRef.current;
1449
2580
  if (!autoResize || !el) return;
@@ -1451,24 +2582,24 @@ var Textarea = /* @__PURE__ */ forwardRef25(function Textarea2({
1451
2582
  const borders = el.offsetHeight - el.clientHeight;
1452
2583
  el.style.height = `${el.scrollHeight + borders}px`;
1453
2584
  }, [autoResize]);
1454
- useIsomorphicLayoutEffect(fitHeight, [fitHeight, value3]);
2585
+ useIsomorphicLayoutEffect(fitHeight, [fitHeight, value4]);
1455
2586
  const handleChange = (event) => {
1456
- if (value3 === void 0) setUncontrolledLength(event.target.value.length);
2587
+ if (value4 === void 0) setUncontrolledLength(event.target.value.length);
1457
2588
  fitHeight();
1458
2589
  onChange?.(event);
1459
2590
  };
1460
- return /* @__PURE__ */ jsxs22("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
1461
- label5 && /* @__PURE__ */ jsxs22("label", { htmlFor: textareaId, className: label2, children: [
1462
- label5,
1463
- required && /* @__PURE__ */ jsx28("span", { className: requiredMark, "aria-hidden": true, children: "*" })
2591
+ return /* @__PURE__ */ jsxs28("div", { className: cx(field, fullWidth && fieldFullWidth), children: [
2592
+ label6 && /* @__PURE__ */ jsxs28("label", { htmlFor: textareaId, className: label, children: [
2593
+ label6,
2594
+ required && /* @__PURE__ */ jsx36("span", { className: requiredMark, "aria-hidden": true, children: "*" })
1464
2595
  ] }),
1465
- /* @__PURE__ */ jsx28(
2596
+ /* @__PURE__ */ jsx36(
1466
2597
  "textarea",
1467
2598
  {
1468
2599
  ref: mergeRefs(innerRef, ref),
1469
2600
  id: textareaId,
1470
2601
  rows,
1471
- value: value3,
2602
+ value: value4,
1472
2603
  defaultValue,
1473
2604
  onChange: handleChange,
1474
2605
  maxLength,
@@ -1484,34 +2615,34 @@ var Textarea = /* @__PURE__ */ forwardRef25(function Textarea2({
1484
2615
  ...rest
1485
2616
  }
1486
2617
  ),
1487
- (helperText2 || showCount) && /* @__PURE__ */ jsxs22("div", { className: footer4, children: [
1488
- helperText2 && /* @__PURE__ */ jsx28("p", { id: helperId, className: helperText({ error }), children: helperText2 }),
1489
- showCount && /* @__PURE__ */ jsx28("span", { className: cx(count, maxLength !== void 0 && length >= maxLength && countOver), children: maxLength !== void 0 ? `${length}/${maxLength}` : length })
2618
+ (helperText3 || showCount) && /* @__PURE__ */ jsxs28("div", { className: footer5, children: [
2619
+ helperText3 && /* @__PURE__ */ jsx36("p", { id: helperId, className: helperText({ error }), children: helperText3 }),
2620
+ showCount && /* @__PURE__ */ jsx36("span", { className: cx(count, maxLength !== void 0 && length >= maxLength && countOver), children: maxLength !== void 0 ? `${length}/${maxLength}` : length })
1490
2621
  ] })
1491
2622
  ] });
1492
2623
  });
1493
2624
 
1494
2625
  // src/components/Toast/Toast.tsx
1495
2626
  import * as RadixToast from "@radix-ui/react-toast";
1496
- import { createContext as createContext3, useCallback as useCallback2, useContext as useContext3, useMemo as useMemo2, useRef as useRef3, useState as useState3 } from "react";
2627
+ import { createContext as createContext4, useCallback as useCallback2, useContext as useContext4, useMemo as useMemo3, useRef as useRef10, useState as useState9 } from "react";
1497
2628
  import { XIcon as XIcon5 } from "@bestow-ui/icons";
1498
2629
 
1499
2630
  // src/components/Toast/Toast.css.ts
1500
- import { createRuntimeFn as _7a46822 } from "@vanilla-extract/recipes/createRuntimeFn";
2631
+ import { createRuntimeFn as _7a46824 } from "@vanilla-extract/recipes/createRuntimeFn";
1501
2632
  var action2 = "_1g11zvx8";
1502
2633
  var close = "_1g11zvx9";
1503
2634
  var description5 = "_1g11zvx7";
1504
2635
  var title5 = "_1g11zvx6";
1505
- var toast = /* @__PURE__ */ _7a46822({ defaultClassName: "_1g11zvx1", variantClassNames: { variant: { "default": "_1g11zvx2", success: "_1g11zvx3", warning: "_1g11zvx4", danger: "_1g11zvx5" } }, defaultVariants: { variant: "default" }, compoundVariants: [] });
2636
+ var toast = /* @__PURE__ */ _7a46824({ defaultClassName: "_1g11zvx1", variantClassNames: { variant: { "default": "_1g11zvx2", success: "_1g11zvx3", warning: "_1g11zvx4", danger: "_1g11zvx5" } }, defaultVariants: { variant: "default" }, compoundVariants: [] });
1506
2637
  var viewport2 = "_1g11zvx0";
1507
2638
 
1508
2639
  // src/components/Toast/Toast.tsx
1509
- import { jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
2640
+ import { jsx as jsx37, jsxs as jsxs29 } from "react/jsx-runtime";
1510
2641
  var REMOVE_DELAY = 500;
1511
- var ToastContext = /* @__PURE__ */ createContext3(null);
1512
- function ToastProvider({ children, duration = 5e3, label: label5 = "\uC54C\uB9BC" }) {
1513
- const [toasts, setToasts] = useState3([]);
1514
- const nextId = useRef3(0);
2642
+ var ToastContext = /* @__PURE__ */ createContext4(null);
2643
+ function ToastProvider({ children, duration = 5e3, label: label6 = "\uC54C\uB9BC" }) {
2644
+ const [toasts, setToasts] = useState9([]);
2645
+ const nextId = useRef10(0);
1515
2646
  const portal2 = usePortalProps();
1516
2647
  const toast2 = useCallback2((options) => {
1517
2648
  const id = nextId.current++;
@@ -1523,10 +2654,10 @@ function ToastProvider({ children, duration = 5e3, label: label5 = "\uC54C\uB9BC
1523
2654
  setToasts((prev) => prev.map((t) => isTarget(t) ? { ...t, open: false } : t));
1524
2655
  setTimeout(() => setToasts((prev) => prev.filter((t) => t.open || !isTarget(t))), REMOVE_DELAY);
1525
2656
  }, []);
1526
- const value3 = useMemo2(() => ({ toast: toast2, dismiss }), [toast2, dismiss]);
1527
- return /* @__PURE__ */ jsx29(ToastContext.Provider, { value: value3, children: /* @__PURE__ */ jsxs23(RadixToast.Provider, { duration, label: label5, swipeDirection: "right", children: [
2657
+ const value4 = useMemo3(() => ({ toast: toast2, dismiss }), [toast2, dismiss]);
2658
+ return /* @__PURE__ */ jsx37(ToastContext.Provider, { value: value4, children: /* @__PURE__ */ jsxs29(RadixToast.Provider, { duration, label: label6, swipeDirection: "right", children: [
1528
2659
  children,
1529
- toasts.map(({ id, open, title: title6, description: description6, variant, duration: itemDuration, action: action3 }) => /* @__PURE__ */ jsxs23(
2660
+ toasts.map(({ id, open, title: title6, description: description6, variant, duration: itemDuration, action: action3 }) => /* @__PURE__ */ jsxs29(
1530
2661
  RadixToast.Root,
1531
2662
  {
1532
2663
  open,
@@ -1536,19 +2667,19 @@ function ToastProvider({ children, duration = 5e3, label: label5 = "\uC54C\uB9BC
1536
2667
  },
1537
2668
  className: toast({ variant }),
1538
2669
  children: [
1539
- /* @__PURE__ */ jsx29(RadixToast.Title, { className: title5, children: title6 }),
1540
- description6 && /* @__PURE__ */ jsx29(RadixToast.Description, { className: description5, children: description6 }),
1541
- action3 && /* @__PURE__ */ jsx29(RadixToast.Action, { asChild: true, altText: action3.altText ?? action3.label, className: action2, children: /* @__PURE__ */ jsx29(Button, { size: "sm", variant: "soft", color: "neutral", onClick: action3.onClick, children: action3.label }) }),
1542
- /* @__PURE__ */ jsx29(RadixToast.Close, { className: close, "aria-label": "\uB2EB\uAE30", children: /* @__PURE__ */ jsx29(XIcon5, { size: 16 }) })
2670
+ /* @__PURE__ */ jsx37(RadixToast.Title, { className: title5, children: title6 }),
2671
+ description6 && /* @__PURE__ */ jsx37(RadixToast.Description, { className: description5, children: description6 }),
2672
+ action3 && /* @__PURE__ */ jsx37(RadixToast.Action, { asChild: true, altText: action3.altText ?? action3.label, className: action2, children: /* @__PURE__ */ jsx37(Button, { size: "sm", variant: "soft", color: "neutral", onClick: action3.onClick, children: action3.label }) }),
2673
+ /* @__PURE__ */ jsx37(RadixToast.Close, { className: close, "aria-label": "\uB2EB\uAE30", children: /* @__PURE__ */ jsx37(XIcon5, { size: 16 }) })
1543
2674
  ]
1544
2675
  },
1545
2676
  id
1546
2677
  )),
1547
- /* @__PURE__ */ jsx29(RadixToast.Viewport, { className: cx(portal2.className, viewport2), style: portal2.style })
2678
+ /* @__PURE__ */ jsx37(RadixToast.Viewport, { className: cx(portal2.className, viewport2), style: portal2.style })
1548
2679
  ] }) });
1549
2680
  }
1550
2681
  function useToast() {
1551
- const context = useContext3(ToastContext);
2682
+ const context = useContext4(ToastContext);
1552
2683
  if (!context) throw new Error("useToast \uB294 ToastProvider \uC548\uC5D0\uC11C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4.");
1553
2684
  return context;
1554
2685
  }
@@ -1558,12 +2689,12 @@ import * as RadixTooltip from "@radix-ui/react-tooltip";
1558
2689
 
1559
2690
  // src/components/Tooltip/Tooltip.css.ts
1560
2691
  var arrow2 = "z7rufs1";
1561
- var content9 = "z7rufs0";
2692
+ var content11 = "z7rufs0";
1562
2693
 
1563
2694
  // src/components/Tooltip/Tooltip.tsx
1564
- import { jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
2695
+ import { jsx as jsx38, jsxs as jsxs30 } from "react/jsx-runtime";
1565
2696
  function Tooltip({
1566
- content: content10,
2697
+ content: content12,
1567
2698
  children,
1568
2699
  side = "top",
1569
2700
  align = "center",
@@ -1575,21 +2706,21 @@ function Tooltip({
1575
2706
  className
1576
2707
  }) {
1577
2708
  const portal2 = usePortalProps();
1578
- if (disabled || content10 == null || content10 === "") return children;
1579
- return /* @__PURE__ */ jsx30(RadixTooltip.Provider, { delayDuration: delay, children: /* @__PURE__ */ jsxs24(RadixTooltip.Root, { open, defaultOpen, onOpenChange, children: [
1580
- /* @__PURE__ */ jsx30(RadixTooltip.Trigger, { asChild: true, children }),
1581
- /* @__PURE__ */ jsx30(RadixTooltip.Portal, { children: /* @__PURE__ */ jsxs24(
2709
+ if (disabled || content12 == null || content12 === "") return children;
2710
+ return /* @__PURE__ */ jsx38(RadixTooltip.Provider, { delayDuration: delay, children: /* @__PURE__ */ jsxs30(RadixTooltip.Root, { open, defaultOpen, onOpenChange, children: [
2711
+ /* @__PURE__ */ jsx38(RadixTooltip.Trigger, { asChild: true, children }),
2712
+ /* @__PURE__ */ jsx38(RadixTooltip.Portal, { children: /* @__PURE__ */ jsxs30(
1582
2713
  RadixTooltip.Content,
1583
2714
  {
1584
2715
  side,
1585
2716
  align,
1586
2717
  sideOffset: 6,
1587
2718
  collisionPadding: 8,
1588
- className: cx(portal2.className, content9, className),
2719
+ className: cx(portal2.className, content11, className),
1589
2720
  style: portal2.style,
1590
2721
  children: [
1591
- content10,
1592
- /* @__PURE__ */ jsx30(RadixTooltip.Arrow, { className: arrow2, width: 10, height: 5 })
2722
+ content12,
2723
+ /* @__PURE__ */ jsx38(RadixTooltip.Arrow, { className: arrow2, width: 10, height: 5 })
1593
2724
  ]
1594
2725
  }
1595
2726
  ) })
@@ -1597,14 +2728,14 @@ function Tooltip({
1597
2728
  }
1598
2729
 
1599
2730
  // src/components/Typography/Typography.tsx
1600
- import { forwardRef as forwardRef26 } from "react";
2731
+ import { forwardRef as forwardRef34 } from "react";
1601
2732
 
1602
2733
  // src/components/Typography/Typography.css.ts
1603
- import { createRuntimeFn as _7a46823 } from "@vanilla-extract/recipes/createRuntimeFn";
1604
- var typography = /* @__PURE__ */ _7a46823({ defaultClassName: "kiolio0", variantClassNames: { variant: { display: "kiolio1", h1: "kiolio2", h2: "kiolio3", h3: "kiolio4", h4: "kiolio5", "body-lg": "kiolio6", body: "kiolio7", "body-sm": "kiolio8", caption: "kiolio9" }, color: { "default": "kiolioa", muted: "kioliob", subtle: "kiolioc", primary: "kioliod", danger: "kiolioe", success: "kioliof", warning: "kioliog", inherit: "kiolioh" }, weight: { regular: "kiolioi", medium: "kiolioj", semibold: "kioliok", bold: "kioliol" }, align: { start: "kioliom", center: "kiolion", end: "kiolioo" }, truncate: { true: "kioliop" } }, defaultVariants: { variant: "body", color: "default" }, compoundVariants: [] });
2734
+ import { createRuntimeFn as _7a46825 } from "@vanilla-extract/recipes/createRuntimeFn";
2735
+ var typography = /* @__PURE__ */ _7a46825({ defaultClassName: "kiolio0", variantClassNames: { variant: { display: "kiolio1", h1: "kiolio2", h2: "kiolio3", h3: "kiolio4", h4: "kiolio5", "body-lg": "kiolio6", body: "kiolio7", "body-sm": "kiolio8", caption: "kiolio9" }, color: { "default": "kiolioa", muted: "kioliob", subtle: "kiolioc", primary: "kioliod", danger: "kiolioe", success: "kioliof", warning: "kioliog", inherit: "kiolioh" }, weight: { regular: "kiolioi", medium: "kiolioj", semibold: "kioliok", bold: "kioliol" }, align: { start: "kioliom", center: "kiolion", end: "kiolioo" }, truncate: { true: "kioliop" } }, defaultVariants: { variant: "body", color: "default" }, compoundVariants: [] });
1605
2736
 
1606
2737
  // src/components/Typography/Typography.tsx
1607
- import { jsx as jsx31 } from "react/jsx-runtime";
2738
+ import { jsx as jsx39 } from "react/jsx-runtime";
1608
2739
  var defaultElement = {
1609
2740
  display: "h1",
1610
2741
  h1: "h1",
@@ -1616,9 +2747,9 @@ var defaultElement = {
1616
2747
  "body-sm": "p",
1617
2748
  caption: "span"
1618
2749
  };
1619
- var Typography = /* @__PURE__ */ forwardRef26(function Typography2({ variant = "body", as, color, weight, align, truncate, className, ...rest }, ref) {
2750
+ var Typography = /* @__PURE__ */ forwardRef34(function Typography2({ variant = "body", as, color, weight, align, truncate, className, ...rest }, ref) {
1620
2751
  const Component = as ?? defaultElement[variant];
1621
- return /* @__PURE__ */ jsx31(
2752
+ return /* @__PURE__ */ jsx39(
1622
2753
  Component,
1623
2754
  {
1624
2755
  ref,
@@ -1627,19 +2758,164 @@ var Typography = /* @__PURE__ */ forwardRef26(function Typography2({ variant = "
1627
2758
  }
1628
2759
  );
1629
2760
  });
2761
+
2762
+ // src/components/VerificationCodeInput/VerificationCodeInput.tsx
2763
+ import { forwardRef as forwardRef35, useEffect as useEffect5, useId as useId13, useRef as useRef11, useState as useState10 } from "react";
2764
+
2765
+ // src/components/VerificationCodeInput/VerificationCodeInput.css.ts
2766
+ var input4 = "ea01812";
2767
+ var row4 = "ea01810";
2768
+ var slot = "ea01813";
2769
+ var slots = "ea01811";
2770
+ var timer = "ea01814";
2771
+
2772
+ // src/components/VerificationCodeInput/VerificationCodeInput.tsx
2773
+ import { jsx as jsx40, jsxs as jsxs31 } from "react/jsx-runtime";
2774
+ var formatTime = (seconds) => `${String(Math.floor(seconds / 60)).padStart(2, "0")}:${String(seconds % 60).padStart(2, "0")}`;
2775
+ var VerificationCodeInput = /* @__PURE__ */ forwardRef35(
2776
+ function VerificationCodeInput2(props, ref) {
2777
+ const {
2778
+ length = 6,
2779
+ value: value4,
2780
+ defaultValue,
2781
+ onValueChange,
2782
+ onComplete,
2783
+ type = "numeric",
2784
+ label: label6 = "\uC778\uC99D\uBC88\uD638",
2785
+ helperText: helperText3,
2786
+ error,
2787
+ disabled,
2788
+ autoFocus,
2789
+ expiresIn,
2790
+ onExpire,
2791
+ onResend,
2792
+ resendText = "\uC7AC\uC804\uC1A1",
2793
+ expiredText = "\uC778\uC99D \uC2DC\uAC04\uC774 \uC9C0\uB0AC\uC5B4\uC694. \uC7AC\uC804\uC1A1\uD574 \uC8FC\uC138\uC694.",
2794
+ name,
2795
+ id,
2796
+ className
2797
+ } = props;
2798
+ const generatedId = useId13();
2799
+ const inputId = id ?? generatedId;
2800
+ const helperId = `${inputId}-helper`;
2801
+ const statusId = `${inputId}-status`;
2802
+ const inputRef = useRef11(null);
2803
+ const isControlled = "value" in props;
2804
+ const [innerValue, setInnerValue] = useState10(defaultValue ?? "");
2805
+ const code = (isControlled ? value4 ?? "" : innerValue).slice(0, length);
2806
+ const [focused, setFocused] = useState10(false);
2807
+ const [endAt, setEndAt] = useState10(() => expiresIn ? Date.now() + expiresIn * 1e3 : null);
2808
+ const [remaining, setRemaining] = useState10(expiresIn ?? 0);
2809
+ const expired = expiresIn !== void 0 && remaining <= 0;
2810
+ const onExpireRef = useRef11(onExpire);
2811
+ useEffect5(() => {
2812
+ onExpireRef.current = onExpire;
2813
+ });
2814
+ useEffect5(() => {
2815
+ if (endAt === null) return;
2816
+ const tick = () => {
2817
+ const left = Math.max(0, Math.ceil((endAt - Date.now()) / 1e3));
2818
+ setRemaining(left);
2819
+ if (left === 0) {
2820
+ clearInterval(timer2);
2821
+ onExpireRef.current?.();
2822
+ }
2823
+ };
2824
+ const timer2 = setInterval(tick, 250);
2825
+ tick();
2826
+ return () => clearInterval(timer2);
2827
+ }, [endAt]);
2828
+ const setCode = (next) => {
2829
+ if (!isControlled) setInnerValue(next);
2830
+ onValueChange?.(next);
2831
+ if (next.length === length && code.length !== length) onComplete?.(next);
2832
+ };
2833
+ const handleChange = (event) => {
2834
+ const raw = event.target.value;
2835
+ const cleaned = (type === "numeric" ? raw.replace(/\D/g, "") : raw.replace(/[^0-9a-z]/gi, "").toUpperCase()).slice(0, length);
2836
+ setCode(cleaned);
2837
+ };
2838
+ const resend = () => {
2839
+ onResend?.();
2840
+ setCode("");
2841
+ if (expiresIn) {
2842
+ setEndAt(Date.now() + expiresIn * 1e3);
2843
+ setRemaining(expiresIn);
2844
+ }
2845
+ inputRef.current?.focus();
2846
+ };
2847
+ const description6 = helperText3 ?? `${length}\uC790\uB9AC ${type === "numeric" ? "\uC22B\uC790" : "\uBB38\uC790"}\uB97C \uC785\uB825\uD558\uC138\uC694.`;
2848
+ const activeIndex = Math.min(code.length, length - 1);
2849
+ return /* @__PURE__ */ jsxs31(
2850
+ "div",
2851
+ {
2852
+ className: cx(field, className),
2853
+ "data-invalid": error || void 0,
2854
+ "data-disabled": disabled || void 0,
2855
+ children: [
2856
+ /* @__PURE__ */ jsx40("label", { htmlFor: inputId, className: label, children: label6 }),
2857
+ /* @__PURE__ */ jsxs31("div", { className: row4, children: [
2858
+ /* @__PURE__ */ jsxs31("div", { className: slots, children: [
2859
+ /* @__PURE__ */ jsx40(
2860
+ "input",
2861
+ {
2862
+ ref: mergeRefs(ref, inputRef),
2863
+ id: inputId,
2864
+ type: "text",
2865
+ inputMode: type === "numeric" ? "numeric" : "text",
2866
+ autoComplete: "one-time-code",
2867
+ pattern: type === "numeric" ? "[0-9]*" : void 0,
2868
+ value: code,
2869
+ onChange: handleChange,
2870
+ onFocus: () => setFocused(true),
2871
+ onBlur: () => setFocused(false),
2872
+ disabled,
2873
+ autoFocus,
2874
+ "aria-invalid": error || void 0,
2875
+ "aria-describedby": `${helperId} ${statusId}`,
2876
+ className: input4
2877
+ }
2878
+ ),
2879
+ Array.from({ length }, (_, index) => /* @__PURE__ */ jsx40(
2880
+ "div",
2881
+ {
2882
+ className: slot,
2883
+ "data-active": focused && index === activeIndex ? "" : void 0,
2884
+ "aria-hidden": true,
2885
+ children: code[index] ?? ""
2886
+ },
2887
+ index
2888
+ ))
2889
+ ] }),
2890
+ expiresIn !== void 0 && /* @__PURE__ */ jsx40("span", { role: "timer", className: timer, children: formatTime(remaining) }),
2891
+ onResend && /* @__PURE__ */ jsx40(Button, { size: "sm", variant: "outline", color: "neutral", onClick: resend, disabled, children: resendText })
2892
+ ] }),
2893
+ /* @__PURE__ */ jsx40("p", { id: helperId, className: helperText({ error }), children: description6 }),
2894
+ /* @__PURE__ */ jsx40("p", { id: statusId, role: "status", className: helperText({ error: true }), children: expired ? expiredText : "" }),
2895
+ name && /* @__PURE__ */ jsx40("input", { type: "hidden", name, value: code })
2896
+ ]
2897
+ }
2898
+ );
2899
+ }
2900
+ );
1630
2901
  export {
1631
2902
  Accordion,
1632
2903
  AccordionItem,
2904
+ AddressInput,
2905
+ AgreementGroup,
1633
2906
  Alert,
2907
+ AmountInput,
1634
2908
  Avatar,
1635
2909
  Badge,
1636
2910
  Breadcrumb,
2911
+ BusinessNumberInput,
1637
2912
  Button,
1638
2913
  Card,
1639
2914
  CardBody,
1640
2915
  CardFooter,
1641
2916
  CardHeader,
1642
2917
  Checkbox,
2918
+ Combobox,
1643
2919
  Divider,
1644
2920
  Drawer,
1645
2921
  DrawerClose,
@@ -1656,15 +2932,24 @@ export {
1656
2932
  Modal,
1657
2933
  ModalClose,
1658
2934
  Pagination,
1659
- Popover,
2935
+ PhoneNumberInput,
2936
+ Popover2 as Popover,
1660
2937
  PopoverClose,
1661
2938
  Progress,
1662
2939
  RadioGroup,
1663
2940
  Select,
1664
2941
  Skeleton,
2942
+ Slider,
1665
2943
  Spinner,
1666
2944
  Stack,
1667
2945
  Switch,
2946
+ Table,
2947
+ TableBody,
2948
+ TableCell,
2949
+ TableFooter,
2950
+ TableHead,
2951
+ TableHeader,
2952
+ TableRow,
1668
2953
  Tabs,
1669
2954
  TabsContent,
1670
2955
  TabsList,
@@ -1675,9 +2960,17 @@ export {
1675
2960
  ToastProvider,
1676
2961
  Tooltip,
1677
2962
  Typography,
2963
+ VerificationCodeInput,
2964
+ composeExtraAddress,
1678
2965
  contrastRatio,
1679
2966
  createIntentColors,
1680
2967
  createTheme,
2968
+ formatBusinessNumber,
2969
+ formatKoreanAmount,
2970
+ formatPhoneNumber,
2971
+ hasAllRequiredAgreements,
2972
+ isValidBusinessNumber,
2973
+ kakaoPostcodeProvider,
1681
2974
  themeClass,
1682
2975
  usePortalClassName,
1683
2976
  usePortalProps,