@alfadocs/ui-kit 1.75.1 → 1.77.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.
Files changed (120) hide show
  1. package/dist/_chunks/{balance-badge-cell-B49xgL6H.js → balance-badge-cell-Dzd-Z_5W.js} +2 -2
  2. package/dist/_chunks/booking-Cz_QjIJe.js +4051 -0
  3. package/dist/_chunks/{breadcrumb-Boan-5n8.js → breadcrumb-Bn29NCnf.js} +8 -8
  4. package/dist/_chunks/{calendar-appointment-editor-dialog-B4My4eiB.js → calendar-appointment-editor-dialog-cvUpUjj-.js} +4 -4
  5. package/dist/_chunks/{control-room-rail-CKZ2nemY.js → control-room-rail-DcJpHbp4.js} +2 -2
  6. package/dist/_chunks/{data-table-DTKGWUQm.js → data-table-BlONA1rP.js} +2 -2
  7. package/dist/_chunks/{file-manager-Ct5QpZZI.js → file-manager-C9iJjDZt.js} +3 -3
  8. package/dist/_chunks/{header-settings-Coh1r41O.js → header-settings-BYpVmLip.js} +2 -2
  9. package/dist/_chunks/{heatmap-Ba9cgfSY.js → heatmap-C2Rg-SV_.js} +2 -2
  10. package/dist/_chunks/{marketplace-app-shell-Ck5NVJcO.js → marketplace-app-shell-mS7Q2-81.js} +3 -3
  11. package/dist/_chunks/{notes-panel-CxjMovCh.js → notes-panel-CZO1qsD-.js} +2 -2
  12. package/dist/_chunks/{otp-input-CGMu30_e.js → otp-input-BgEZi0py.js} +54 -53
  13. package/dist/_chunks/{practice-results-B4Z5q46r.js → practice-results-By2BZFCz.js} +820 -783
  14. package/dist/_chunks/{recaptcha-widget-CsvwlYTE.js → recaptcha-widget-iglUBIF3.js} +2 -2
  15. package/dist/_chunks/{registration-form-DeK2QiJu.js → registration-form-xORq2s4p.js} +3 -3
  16. package/dist/_chunks/signature-request-DjY-X62H.js +2448 -0
  17. package/dist/_chunks/{tasks-panel-Cmr0oMvc.js → tasks-panel-BkjtgjQ8.js} +2 -2
  18. package/dist/_chunks/{theme-toggle-DTrUzIBG.js → theme-toggle-DKpzb0-M.js} +2 -2
  19. package/dist/_chunks/{tool-rail-C_9lm0TC.js → tool-rail-Kup1b7xI.js} +2 -2
  20. package/dist/_chunks/use-theme-CYGyzFgZ.js +196 -0
  21. package/dist/agent-catalog.json +46 -10
  22. package/dist/agent-i18n/en.json +5 -4
  23. package/dist/components/booking/booking-types.d.ts +22 -1
  24. package/dist/components/booking/booking.d.ts +1 -1
  25. package/dist/components/booking/code-step.d.ts +6 -0
  26. package/dist/components/booking/index.d.ts +1 -1
  27. package/dist/components/booking/index.js +1 -1
  28. package/dist/components/booking/step-focus.d.ts +9 -0
  29. package/dist/components/booking/use-booking-payment.d.ts +6 -3
  30. package/dist/components/breadcrumb/index.js +1 -1
  31. package/dist/components/control-room-rail/index.js +1 -1
  32. package/dist/components/data-table/index.js +1 -1
  33. package/dist/components/file-manager/index.js +1 -1
  34. package/dist/components/header-settings/index.js +1 -1
  35. package/dist/components/heatmap/index.js +1 -1
  36. package/dist/components/index.d.ts +1 -1
  37. package/dist/components/notes-panel/index.js +1 -1
  38. package/dist/components/otp-input/index.js +1 -1
  39. package/dist/components/otp-input/otp-input.d.ts +1 -0
  40. package/dist/components/patient-table/index.js +1 -1
  41. package/dist/components/practice-results/index.d.ts +1 -1
  42. package/dist/components/practice-results/index.js +1 -1
  43. package/dist/components/practice-results/practice-results.d.ts +4 -0
  44. package/dist/components/recaptcha-widget/index.js +1 -1
  45. package/dist/components/tasks-panel/index.js +1 -1
  46. package/dist/components/theme-toggle/index.js +1 -1
  47. package/dist/components/tool-rail/index.js +1 -1
  48. package/dist/hooks/index.d.ts +1 -1
  49. package/dist/hooks/index.js +88 -86
  50. package/dist/hooks/use-theme.d.ts +9 -0
  51. package/dist/host-compat.css +4 -1
  52. package/dist/i18n/locales/ar.d.ts +29 -0
  53. package/dist/i18n/locales/ar.js +30 -1
  54. package/dist/i18n/locales/de.d.ts +29 -0
  55. package/dist/i18n/locales/de.js +30 -1
  56. package/dist/i18n/locales/el.d.ts +29 -0
  57. package/dist/i18n/locales/el.js +30 -1
  58. package/dist/i18n/locales/en.d.ts +29 -0
  59. package/dist/i18n/locales/en.js +30 -1
  60. package/dist/i18n/locales/es.d.ts +29 -0
  61. package/dist/i18n/locales/es.js +30 -1
  62. package/dist/i18n/locales/fr.d.ts +29 -0
  63. package/dist/i18n/locales/fr.js +30 -1
  64. package/dist/i18n/locales/hi.d.ts +29 -0
  65. package/dist/i18n/locales/hi.js +30 -1
  66. package/dist/i18n/locales/it.d.ts +29 -0
  67. package/dist/i18n/locales/it.js +30 -1
  68. package/dist/i18n/locales/ja.d.ts +29 -0
  69. package/dist/i18n/locales/ja.js +30 -1
  70. package/dist/i18n/locales/nl.d.ts +29 -0
  71. package/dist/i18n/locales/nl.js +30 -1
  72. package/dist/i18n/locales/pl.d.ts +29 -0
  73. package/dist/i18n/locales/pl.js +30 -1
  74. package/dist/i18n/locales/pt.d.ts +29 -0
  75. package/dist/i18n/locales/pt.js +30 -1
  76. package/dist/i18n/locales/ro.d.ts +29 -0
  77. package/dist/i18n/locales/ro.js +30 -1
  78. package/dist/i18n/locales/ru.d.ts +29 -0
  79. package/dist/i18n/locales/ru.js +30 -1
  80. package/dist/i18n/locales/sq.d.ts +29 -0
  81. package/dist/i18n/locales/sq.js +30 -1
  82. package/dist/i18n/locales/sv.d.ts +29 -0
  83. package/dist/i18n/locales/sv.js +30 -1
  84. package/dist/i18n/locales/tr.d.ts +29 -0
  85. package/dist/i18n/locales/tr.js +30 -1
  86. package/dist/i18n/locales/zh.d.ts +29 -0
  87. package/dist/i18n/locales/zh.js +30 -1
  88. package/dist/index.js +1209 -1207
  89. package/dist/locales/ar.json +30 -1
  90. package/dist/locales/de.json +30 -1
  91. package/dist/locales/el.json +30 -1
  92. package/dist/locales/en.json +30 -1
  93. package/dist/locales/es.json +30 -1
  94. package/dist/locales/fr.json +30 -1
  95. package/dist/locales/hi.json +30 -1
  96. package/dist/locales/it.json +30 -1
  97. package/dist/locales/ja.json +30 -1
  98. package/dist/locales/nl.json +30 -1
  99. package/dist/locales/pl.json +30 -1
  100. package/dist/locales/pt.json +30 -1
  101. package/dist/locales/ro.json +30 -1
  102. package/dist/locales/ru.json +30 -1
  103. package/dist/locales/sq.json +30 -1
  104. package/dist/locales/sv.json +30 -1
  105. package/dist/locales/tr.json +30 -1
  106. package/dist/locales/zh.json +30 -1
  107. package/dist/patterns/calendar/index.js +1 -1
  108. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  109. package/dist/patterns/registration-form/index.js +1 -1
  110. package/dist/patterns/signature-request/channel-meta.d.ts +8 -2
  111. package/dist/patterns/signature-request/index.js +1 -1
  112. package/dist/patterns/signature-request/minor-patient.d.ts +41 -0
  113. package/dist/patterns/signature-request/required-documents.d.ts +4 -3
  114. package/dist/patterns/signature-request/signature-request.d.ts +62 -12
  115. package/dist/theme-boot.js +26 -0
  116. package/dist/tokens.css +1 -1
  117. package/package.json +4 -2
  118. package/dist/_chunks/booking-D2r19Lia.js +0 -3901
  119. package/dist/_chunks/signature-request-ldmXj2X6.js +0 -2221
  120. package/dist/_chunks/use-theme-CAuo6EYT.js +0 -159
@@ -1,4 +1,4 @@
1
- import { jsx as n, jsxs as z } from "react/jsx-runtime";
1
+ import { jsx as n, jsxs as E } from "react/jsx-runtime";
2
2
  import { forwardRef as y, useMemo as P, useRef as $, useImperativeHandle as q, Children as b, isValidElement as x, cloneElement as N, useContext as A, createContext as M } from "react";
3
3
  import * as j from "@radix-ui/react-dropdown-menu";
4
4
  import { Slot as V } from "@radix-ui/react-slot";
@@ -162,8 +162,8 @@ const J = [
162
162
  }), p.push(
163
163
  /* @__PURE__ */ n(I, { children: /* @__PURE__ */ n(T, { hiddenItems: m }) }, "ellipsis")
164
164
  ), p.push(f(!0, "ellipsis-sep")), u.forEach((g, v) => {
165
- const E = v === u.length - 1;
166
- p.push(w(g, E, `a-${v}`)), p.push(f(!E, `a-sep-${v}`));
165
+ const z = v === u.length - 1;
166
+ p.push(w(g, z, `a-${v}`)), p.push(f(!z, `a-sep-${v}`));
167
167
  });
168
168
  }
169
169
  return /* @__PURE__ */ n(
@@ -179,8 +179,8 @@ const J = [
179
179
  );
180
180
  S.displayName = "BreadcrumbList";
181
181
  const Q = [
182
- "ds:inline-flex ds:items-center",
183
- "ds:[max-inline-size:16rem]",
182
+ "ds:inline-flex ds:flex-wrap ds:items-center",
183
+ "ds:[min-inline-size:0] ds:[max-inline-size:100%]",
184
184
  "ds:min-h-[var(--min-target-size)]",
185
185
  "ds:py-[var(--spacing-xs)]"
186
186
  ].join(" "), I = y(
@@ -327,8 +327,8 @@ const Z = [
327
327
  "ds:outline-none"
328
328
  ].join(" "), T = y(({ className: r, hiddenItems: a = [], ...l }, e) => {
329
329
  const { t: s } = k("ui"), t = s("navigation.breadcrumb.showPath");
330
- return /* @__PURE__ */ z(j.Root, { children: [
331
- /* @__PURE__ */ n(j.Trigger, { asChild: !0, children: /* @__PURE__ */ z(
330
+ return /* @__PURE__ */ E(j.Root, { children: [
331
+ /* @__PURE__ */ n(j.Trigger, { asChild: !0, children: /* @__PURE__ */ E(
332
332
  "button",
333
333
  {
334
334
  ref: e,
@@ -391,4 +391,4 @@ export {
391
391
  H as e,
392
392
  U as f
393
393
  };
394
- //# sourceMappingURL=breadcrumb-Boan-5n8.js.map
394
+ //# sourceMappingURL=breadcrumb-Bn29NCnf.js.map
@@ -10,7 +10,7 @@ import { S as Hn, C as Ci } from "./skeleton-tTWJpvAq.js";
10
10
  import { S as Sr } from "./stethoscope-sZXGC43m.js";
11
11
  import { A as Gs, a as Ni } from "./entity-card-fpm-KUKc.js";
12
12
  import { T as Oo, P as Ro, E as xi, S as Mo } from "./task-editor-CRhfwP9T.js";
13
- import { C as Wo, a as Po, u as Di, d as Bo } from "./control-room-rail-CKZ2nemY.js";
13
+ import { C as Wo, a as Po, u as Di, d as Bo } from "./control-room-rail-DcJpHbp4.js";
14
14
  import { S as ms } from "./scroll-area-CY5SLYNw.js";
15
15
  import { d as vt, c as qs, b as ra } from "./toast-BNoN8Qjh.js";
16
16
  import { T as Ga, a as Si } from "./tooltip-uEBdD1-5.js";
@@ -74,12 +74,12 @@ import { createPortal as lc } from "react-dom";
74
74
  import { G as Ya, h as Js, c as uc, A as hc, C as _i } from "./color-picker-AcaWuKah.js";
75
75
  import { s as mc, S as pc } from "./signature-status-chip-pIoQjvH8.js";
76
76
  import { b as gc } from "./appointment-workflow-status-DMjuIK90.js";
77
- import { N as vc } from "./notes-panel-CxjMovCh.js";
77
+ import { N as vc } from "./notes-panel-CZO1qsD-.js";
78
78
  import { C as vs } from "./combobox-vF9O-QoG.js";
79
79
  import { S as fc } from "./state-backed-text-input-Cgh4ms3p.js";
80
80
  import { N as ns } from "./number-input-CVwI1ltI.js";
81
81
  import { T as bc } from "./time-picker-DVfyAR81.js";
82
- import { D as kc } from "./data-table-DTKGWUQm.js";
82
+ import { D as kc } from "./data-table-BlONA1rP.js";
83
83
  import { T as fs } from "./timestamp-DPLDWdxA.js";
84
84
  import { I as Zs } from "./icon-button-group-CRKFR48b.js";
85
85
  import { C as Ic, b as yc, a as Cc } from "./collapsible-DVPM46bq.js";
@@ -10983,4 +10983,4 @@ export {
10983
10983
  hp as r,
10984
10984
  Vn as u
10985
10985
  };
10986
- //# sourceMappingURL=calendar-appointment-editor-dialog-B4My4eiB.js.map
10986
+ //# sourceMappingURL=calendar-appointment-editor-dialog-cvUpUjj-.js.map
@@ -3,7 +3,7 @@ import { useState as D, useCallback as R, useMemo as x, useRef as O, useEffect a
3
3
  import { useTranslation as Ao } from "react-i18next";
4
4
  import { I as F } from "./icon-button-S8_weU3g.js";
5
5
  import { a as Mo } from "./panel-header-CbtlTe85.js";
6
- import { T as xo } from "./tool-rail-C_9lm0TC.js";
6
+ import { T as xo } from "./tool-rail-Kup1b7xI.js";
7
7
  import { u as W } from "./use-persistent-state-nZwZAnE9.js";
8
8
  import { S as ko } from "./star-Bf9L2Uot.js";
9
9
  import { X as So } from "./x-B5YnXwCz.js";
@@ -413,4 +413,4 @@ export {
413
413
  $o as d,
414
414
  Go as u
415
415
  };
416
- //# sourceMappingURL=control-room-rail-CKZ2nemY.js.map
416
+ //# sourceMappingURL=control-room-rail-DcJpHbp4.js.map
@@ -28,7 +28,7 @@ import { S as Ke } from "./state-backed-text-input-Cgh4ms3p.js";
28
28
  import { S as ea } from "./select-4S-eYZUf.js";
29
29
  import { u as ta } from "./registry-DvAUVLHh.js";
30
30
  import { u as aa } from "./use-prefers-reduced-motion-BMwIQRjB.js";
31
- import { u as ra } from "./use-theme-CAuo6EYT.js";
31
+ import { u as ra } from "./use-theme-CYGyzFgZ.js";
32
32
  import { f as na } from "./intl-locale-FWh-Y5_3.js";
33
33
  /**
34
34
  * @license lucide-react v1.22.0 - ISC
@@ -1990,4 +1990,4 @@ export {
1990
1990
  Cr as h,
1991
1991
  B as i
1992
1992
  };
1993
- //# sourceMappingURL=data-table-DTKGWUQm.js.map
1993
+ //# sourceMappingURL=data-table-BlONA1rP.js.map
@@ -2,7 +2,7 @@ import { jsx as n, jsxs as S } from "react/jsx-runtime";
2
2
  import { useMemo as O, useState as te, useRef as ee, useEffect as ne, useId as Pe, useCallback as y, forwardRef as bt, useImperativeHandle as vt } from "react";
3
3
  import { c as Ve } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as J } from "react-i18next";
5
- import { B as kt, b as He, c as ge } from "./breadcrumb-Boan-5n8.js";
5
+ import { B as kt, b as He, c as ge } from "./breadcrumb-Bn29NCnf.js";
6
6
  import { E as Mt } from "./empty-state-DwJ5YNzz.js";
7
7
  import { S as he } from "./skeleton-tTWJpvAq.js";
8
8
  import { u as Ct } from "./use-controllable-state-BiY4xTzM.js";
@@ -18,7 +18,7 @@ import { F as Ft } from "./file-text-5yv6r2ls.js";
18
18
  import { F as Tt } from "./file-spreadsheet-DmwyfV4O.js";
19
19
  import { F as At } from "./file-BuG1VMAy.js";
20
20
  import { C as Dt } from "./chevron-right-I9AeSxH2.js";
21
- import { D as Fe } from "./data-table-DTKGWUQm.js";
21
+ import { D as Fe } from "./data-table-BlONA1rP.js";
22
22
  import { A as Rt, a as It } from "./actions-cell-renderer-B1yaOfQM.js";
23
23
  import { B as $e } from "./badge-BUk4RjTS.js";
24
24
  import { D as Ue } from "./download-CfYKJO_j.js";
@@ -1744,4 +1744,4 @@ export {
1744
1744
  hn as F,
1745
1745
  Gt as f
1746
1746
  };
1747
- //# sourceMappingURL=file-manager-Ct5QpZZI.js.map
1747
+ //# sourceMappingURL=file-manager-C9iJjDZt.js.map
@@ -8,7 +8,7 @@ import { D as n } from "./dropdown-menu-D1we7oAY.js";
8
8
  import { u as me, p as ge, c as w, a as Z } from "./locale-picker-DzdGDSBI.js";
9
9
  import { u as he } from "./use-media-query-CcAx5SMM.js";
10
10
  import { u as fe } from "./use-locale-BExNy9Dl.js";
11
- import { u as ye } from "./use-theme-CAuo6EYT.js";
11
+ import { u as ye } from "./use-theme-CYGyzFgZ.js";
12
12
  import { a as be } from "./use-direction-Dp8h70PP.js";
13
13
  import { u as ve } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
14
14
  import { u as we } from "./registry-DvAUVLHh.js";
@@ -507,4 +507,4 @@ Ke.displayName = "HeaderSettings";
507
507
  export {
508
508
  Ke as H
509
509
  };
510
- //# sourceMappingURL=header-settings-Coh1r41O.js.map
510
+ //# sourceMappingURL=header-settings-BYpVmLip.js.map
@@ -2823,7 +2823,7 @@ const an = Mn(
2823
2823
  }
2824
2824
  );
2825
2825
  an.displayName = "HeatmapLegend";
2826
- const rn = () => import("./data-table-DTKGWUQm.js").then((e) => e.h).then((e) => ({
2826
+ const rn = () => import("./data-table-BlONA1rP.js").then((e) => e.h).then((e) => ({
2827
2827
  default: e.DataTable
2828
2828
  })), sa = Sn(rn);
2829
2829
  function xn() {
@@ -3647,4 +3647,4 @@ export {
3647
3647
  Dn as b,
3648
3648
  so as h
3649
3649
  };
3650
- //# sourceMappingURL=heatmap-Ba9cgfSY.js.map
3650
+ //# sourceMappingURL=heatmap-C2Rg-SV_.js.map
@@ -9,13 +9,13 @@ import { C as U } from "./card-BA4Ig_kn.js";
9
9
  import { D as u } from "./dropdown-menu-D1we7oAY.js";
10
10
  import { T as ke } from "./tab-bar-BEODTG6k.js";
11
11
  import { a as Y, H as we, g as Ne, f as G, e as ye, c as Se, d as Ce } from "./header-l_B8MV0g.js";
12
- import { H as Ae } from "./header-settings-Coh1r41O.js";
12
+ import { H as Ae } from "./header-settings-BYpVmLip.js";
13
13
  import { S as Te } from "./sign-in-with-alfadocs-button-DzrNgbWv.js";
14
14
  import { S as Ee, a as ee, v as ze, h as Ie, c as Me, r as Le, b as He, l as Ve, m as Be, k as Re, j as J } from "./sidebar-BS24EnYd.js";
15
15
  import { N as De } from "./navigation-dismiss-B1mcW1CT.js";
16
16
  import { T as Oe } from "./theme-root-BOO73p5t.js";
17
17
  import { a as X } from "./tooltip-uEBdD1-5.js";
18
- import { u as je } from "./use-theme-CAuo6EYT.js";
18
+ import { u as je } from "./use-theme-CYGyzFgZ.js";
19
19
  import { u as Pe } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
20
20
  import { u as $e } from "./use-media-query-CcAx5SMM.js";
21
21
  import { A as We, L as _e } from "./logo-hIsyVE96.js";
@@ -656,4 +656,4 @@ export {
656
656
  na as M,
657
657
  y as P
658
658
  };
659
- //# sourceMappingURL=marketplace-app-shell-Ck5NVJcO.js.map
659
+ //# sourceMappingURL=marketplace-app-shell-mS7Q2-81.js.map
@@ -18,7 +18,7 @@ import { D as L } from "./dialog-C7RWaH08.js";
18
18
  import { P as In } from "./panel-header-CbtlTe85.js";
19
19
  import { a as Yn, u as Gn, R as Jn } from "./use-list-reflow-C7O4Uqnl.js";
20
20
  import { u as Qn } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
21
- import { u as Un } from "./use-theme-CAuo6EYT.js";
21
+ import { u as Un } from "./use-theme-CYGyzFgZ.js";
22
22
  import { N as Xn } from "./notebook-pen-CO7HoM-W.js";
23
23
  import { P as Zn } from "./pencil-B1sKKyuT.js";
24
24
  import { T as er } from "./trash-2-uumy3fy1.js";
@@ -1109,4 +1109,4 @@ const jr = qn(
1109
1109
  export {
1110
1110
  jr as N
1111
1111
  };
1112
- //# sourceMappingURL=notes-panel-CxjMovCh.js.map
1112
+ //# sourceMappingURL=notes-panel-CZO1qsD-.js.map
@@ -1,12 +1,12 @@
1
- import { jsxs as re, jsx as I } from "react/jsx-runtime";
2
- import { forwardRef as ae, useId as se, useRef as R, useState as ne, useEffect as oe, useCallback as B, useMemo as ie, useImperativeHandle as ce } from "react";
3
- import { c as $ } from "./index-D2ZczOXr.js";
4
- import { useTranslation as le } from "react-i18next";
5
- import { u as ue } from "./use-controllable-state-BiY4xTzM.js";
6
- import { u as pe } from "./use-web-otp-D_utzp6S.js";
7
- import { u as de, a as fe } from "./form-field-context-DtiROUJV.js";
8
- import { u as ge } from "./registry-DvAUVLHh.js";
9
- const me = {
1
+ import { jsxs as ae, jsx as I } from "react/jsx-runtime";
2
+ import { forwardRef as se, useId as ne, useRef as R, useState as oe, useEffect as ie, useCallback as S, useMemo as ce, useImperativeHandle as le } from "react";
3
+ import { c as j } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as ue } from "react-i18next";
5
+ import { u as pe } from "./use-controllable-state-BiY4xTzM.js";
6
+ import { u as de } from "./use-web-otp-D_utzp6S.js";
7
+ import { u as fe, a as ge } from "./form-field-context-DtiROUJV.js";
8
+ import { u as me } from "./registry-DvAUVLHh.js";
9
+ const he = {
10
10
  id: "otp-input",
11
11
  // Value input — `set_value` replaces the digits. There is no `submit`
12
12
  // action: completion is host-driven (the consumer's `onComplete` fires
@@ -81,7 +81,7 @@ const me = {
81
81
  description: "Sourced from the id prop."
82
82
  }
83
83
  }
84
- }, he = $("ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]"), ve = $(
84
+ }, ve = j("ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]"), be = j(
85
85
  [
86
86
  "ds:w-[var(--min-target-size)] ds:h-[var(--min-target-size)]",
87
87
  "ds:rounded-[var(--radius-sm)]",
@@ -105,21 +105,21 @@ const me = {
105
105
  function z(a) {
106
106
  return a.replace(/[\u0660-\u0669]/g, (n) => String(n.charCodeAt(0) - 1632)).replace(/[\u06F0-\u06F9]/g, (n) => String(n.charCodeAt(0) - 1776));
107
107
  }
108
- const be = 3, ye = 10;
109
- function we(a) {
108
+ const ye = 3, we = 10;
109
+ function Ie(a) {
110
110
  const n = Number.isFinite(a) ? Math.floor(a) : 6;
111
- return Math.max(be, Math.min(ye, n));
111
+ return Math.max(ye, Math.min(we, n));
112
112
  }
113
113
  function k(a, n, g) {
114
114
  return (g === "alphanumeric" ? a.replace(/[^A-Za-z0-9]/g, "").toUpperCase() : z(a).replace(/\D/g, "")).slice(0, n);
115
115
  }
116
- function Ie(a, n, g) {
116
+ function ke(a, n, g) {
117
117
  const p = k(a, n, g), d = new Array(n).fill("");
118
118
  for (let m = 0; m < p.length; m += 1)
119
119
  d[m] = p[m];
120
120
  return d;
121
121
  }
122
- const ke = ae(
122
+ const Ve = se(
123
123
  ({
124
124
  length: a = 6,
125
125
  value: n,
@@ -127,46 +127,47 @@ const ke = ae(
127
127
  onChange: p,
128
128
  onComplete: d,
129
129
  disabled: m,
130
- error: j,
130
+ error: $,
131
131
  label: V,
132
+ "aria-describedby": Z,
132
133
  id: E,
133
- className: Z,
134
- webOtp: _ = !1,
134
+ className: _,
135
+ webOtp: U = !1,
135
136
  name: K,
136
137
  mode: i = "numeric"
137
- }, U) => {
138
- const { t: q } = le("ui"), r = we(a), v = de(), x = se(), H = V ? x : void 0, [G, O] = ue({
138
+ }, q) => {
139
+ const { t: x } = ue("ui"), r = Ie(a), v = fe(), G = ne(), B = V ? G : void 0, [W, H] = pe({
139
140
  value: n,
140
141
  defaultValue: k(g ?? "", r, i)
141
- }), h = k(G ?? "", r, i), W = Ie(h, r, i), y = v.disabled || !!m, P = v.invalid || !!j, X = P ? "error" : "default", S = R([]), D = R(h.length === r), f = R(h);
142
+ }), h = k(W ?? "", r, i), X = ke(h, r, i), y = v.disabled || !!m, O = v.invalid || !!$, J = O ? "error" : "default", P = R([]), D = R(h.length === r), f = R(h);
142
143
  f.current = h;
143
- const J = () => {
144
+ const Q = () => {
144
145
  const t = h.length;
145
146
  return t >= r ? r - 1 : t;
146
- }, [b, A] = ne(J);
147
- oe(() => {
147
+ }, [b, A] = oe(Q);
148
+ ie(() => {
148
149
  b >= r && A(r - 1);
149
150
  }, [b, r]);
150
- const l = B(
151
+ const l = S(
151
152
  (t) => {
152
153
  const e = Math.max(0, Math.min(r - 1, t));
153
154
  A(e);
154
- const s = S.current[e];
155
+ const s = P.current[e];
155
156
  s && (s.focus(), s.select());
156
157
  },
157
158
  [r]
158
- ), u = B(
159
+ ), u = S(
159
160
  (t) => {
160
161
  const e = k(t, r, i);
161
- O(e), f.current = e, p == null || p(e), e.length === r ? D.current || (D.current = !0, d == null || d(e)) : D.current = !1;
162
+ H(e), f.current = e, p == null || p(e), e.length === r ? D.current || (D.current = !0, d == null || d(e)) : D.current = !1;
162
163
  },
163
- [O, r, i, p, d]
164
+ [H, r, i, p, d]
164
165
  );
165
- pe({
166
- enabled: _ && !y,
166
+ de({
167
+ enabled: U && !y,
167
168
  onCode: u
168
169
  });
169
- const Q = (t) => (e) => {
170
+ const Y = (t) => (e) => {
170
171
  const s = e.target.value, o = i === "alphanumeric" ? s.replace(/[^A-Za-z0-9]/g, "").toUpperCase() : z(s).replace(/\D/g, ""), c = f.current;
171
172
  if (o.length === 0) {
172
173
  if (s === "" && t < c.length) {
@@ -179,7 +180,7 @@ const ke = ae(
179
180
  u(F);
180
181
  const L = Math.min(t + o.length, r - 1);
181
182
  l(L);
182
- }, Y = (t) => (e) => {
183
+ }, ee = (t) => (e) => {
183
184
  const s = f.current;
184
185
  if (e.key === "Backspace") {
185
186
  if (s[t]) {
@@ -208,7 +209,7 @@ const ke = ae(
208
209
  return;
209
210
  }
210
211
  e.key === "End" && (e.preventDefault(), l(r - 1));
211
- }, ee = (t) => (e) => {
212
+ }, te = (t) => (e) => {
212
213
  const o = e.clipboardData.getData("text").replace(/\s+/g, ""), c = i === "alphanumeric" ? o.replace(/[^A-Za-z0-9]/g, "").toUpperCase() : z(o);
213
214
  if (i === "alphanumeric" ? c.length === 0 : !/^[0-9]+$/.test(c))
214
215
  return;
@@ -217,11 +218,11 @@ const ke = ae(
217
218
  u(L);
218
219
  const N = Math.min(t + c.length, r - 1);
219
220
  l(N);
220
- }, te = (t) => (e) => {
221
+ }, re = (t) => (e) => {
221
222
  A(t), e.currentTarget.select();
222
223
  }, T = v.id;
223
- fe(v, `${T}-0`);
224
- const M = ie(
224
+ ge(v, `${T}-0`);
225
+ const M = ce(
225
226
  () => ({
226
227
  getValue: () => f.current,
227
228
  setValue: (t) => u(t),
@@ -231,11 +232,11 @@ const ke = ae(
231
232
  }),
232
233
  [u, l, b, r]
233
234
  );
234
- return ge(me, M, E), ce(U, () => M, [M]), /* @__PURE__ */ re("div", { className: he({ className: Z }), children: [
235
+ return me(he, M, E), le(q, () => M, [M]), /* @__PURE__ */ ae("div", { className: ve({ className: _ }), children: [
235
236
  V ? /* @__PURE__ */ I(
236
237
  "label",
237
238
  {
238
- id: H,
239
+ id: B,
239
240
  htmlFor: `${T}-0`,
240
241
  className: "type-label ds:text-foreground",
241
242
  children: V
@@ -246,20 +247,20 @@ const ke = ae(
246
247
  {
247
248
  role: "group",
248
249
  dir: "ltr",
249
- "aria-labelledby": H,
250
- "aria-invalid": P || void 0,
251
- "aria-describedby": v.describedBy || void 0,
250
+ "aria-labelledby": B,
251
+ "aria-invalid": O || void 0,
252
+ "aria-describedby": [Z, v.describedBy].filter(Boolean).join(" ") || void 0,
252
253
  "aria-disabled": y || void 0,
253
254
  "data-component": "otp-input",
254
255
  "data-component-id": E,
255
256
  className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]",
256
- children: W.map((t, e) => {
257
+ children: X.map((t, e) => {
257
258
  const s = !y && e === b;
258
259
  return /* @__PURE__ */ I(
259
260
  "input",
260
261
  {
261
262
  ref: (o) => {
262
- S.current[e] = o;
263
+ P.current[e] = o;
263
264
  },
264
265
  id: `${T}-${e}`,
265
266
  type: "text",
@@ -271,18 +272,18 @@ const ke = ae(
271
272
  value: t,
272
273
  disabled: y,
273
274
  tabIndex: s ? 0 : -1,
274
- "aria-label": q(
275
+ "aria-label": x(
275
276
  i === "alphanumeric" ? "inputs.otp.charLabel" : "inputs.otp.digitLabel",
276
277
  {
277
278
  current: e + 1,
278
279
  total: r
279
280
  }
280
281
  ),
281
- onChange: Q(e),
282
- onKeyDown: Y(e),
283
- onPaste: ee(e),
284
- onFocus: te(e),
285
- className: ve({ tone: X })
282
+ onChange: Y(e),
283
+ onKeyDown: ee(e),
284
+ onPaste: te(e),
285
+ onFocus: re(e),
286
+ className: be({ tone: J })
286
287
  },
287
288
  e
288
289
  );
@@ -293,8 +294,8 @@ const ke = ae(
293
294
  ] });
294
295
  }
295
296
  );
296
- ke.displayName = "OTPInput";
297
+ Ve.displayName = "OTPInput";
297
298
  export {
298
- ke as O
299
+ Ve as O
299
300
  };
300
- //# sourceMappingURL=otp-input-CGMu30_e.js.map
301
+ //# sourceMappingURL=otp-input-BgEZi0py.js.map