@spear-ai/spectral 1.4.25 → 1.4.27

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 (203) hide show
  1. package/dist/Accordion.d.ts +28 -9
  2. package/dist/Accordion.js +203 -183
  3. package/dist/Alert/AlertBase.d.ts +24 -16
  4. package/dist/Alert/AlertBase.js +33 -18
  5. package/dist/Alert.js +1 -1
  6. package/dist/Avatar.js +11 -11
  7. package/dist/Button.d.ts +7 -2
  8. package/dist/Button.js +25 -12
  9. package/dist/ButtonIcon.d.ts +7 -2
  10. package/dist/ButtonIcon.js +25 -16
  11. package/dist/Card.js +1 -1
  12. package/dist/Checkbox/CheckboxBase.d.ts +13 -13
  13. package/dist/Checkbox/CheckboxBase.js +128 -125
  14. package/dist/Checkbox.d.ts +7 -2
  15. package/dist/Checkbox.js +29 -22
  16. package/dist/DataCard.js +3 -3
  17. package/dist/Dialog.js +2 -2
  18. package/dist/Drawer.js +2 -2
  19. package/dist/HoverCard.js +1 -1
  20. package/dist/Icons/AnalyzeIcon.d.ts +3 -1
  21. package/dist/Icons/AnalyzeIcon.js +3 -6
  22. package/dist/Icons/AnnotationsIcon.d.ts +3 -1
  23. package/dist/Icons/AnnotationsIcon.js +3 -6
  24. package/dist/Icons/ApprovedIcon.d.ts +3 -1
  25. package/dist/Icons/ApprovedIcon.js +3 -6
  26. package/dist/Icons/ArrowDownIcon.d.ts +3 -1
  27. package/dist/Icons/ArrowDownIcon.js +3 -6
  28. package/dist/Icons/ArrowUpIcon.d.ts +3 -1
  29. package/dist/Icons/ArrowUpIcon.js +4 -7
  30. package/dist/Icons/CalendarIcon.d.ts +3 -1
  31. package/dist/Icons/CalendarIcon.js +9 -12
  32. package/dist/Icons/CheckCircleIcon.d.ts +3 -1
  33. package/dist/Icons/CheckCircleIcon.js +2 -5
  34. package/dist/Icons/CheckSquareIcon.d.ts +3 -1
  35. package/dist/Icons/CheckSquareIcon.js +4 -7
  36. package/dist/Icons/CheckmarkIcon.d.ts +3 -1
  37. package/dist/Icons/CheckmarkIcon.js +5 -8
  38. package/dist/Icons/ChevronDownIcon.d.ts +3 -1
  39. package/dist/Icons/ChevronDownIcon.js +5 -8
  40. package/dist/Icons/ChevronUpIcon.d.ts +3 -1
  41. package/dist/Icons/ChevronUpIcon.js +5 -8
  42. package/dist/Icons/ClockIcon.d.ts +3 -1
  43. package/dist/Icons/ClockIcon.js +5 -8
  44. package/dist/Icons/CloseCircleIcon.d.ts +3 -1
  45. package/dist/Icons/CloseCircleIcon.js +4 -7
  46. package/dist/Icons/CloseIcon.d.ts +3 -1
  47. package/dist/Icons/CloseIcon.js +5 -8
  48. package/dist/Icons/DashboardIcon.d.ts +3 -1
  49. package/dist/Icons/DashboardIcon.js +3 -6
  50. package/dist/Icons/DatabaseIcon.d.ts +3 -1
  51. package/dist/Icons/DatabaseIcon.js +4 -7
  52. package/dist/Icons/DeleteIcon.d.ts +3 -1
  53. package/dist/Icons/DeleteIcon.js +4 -7
  54. package/dist/Icons/DurationIcon.d.ts +3 -1
  55. package/dist/Icons/DurationIcon.js +3 -6
  56. package/dist/Icons/EditIcon.d.ts +3 -1
  57. package/dist/Icons/EditIcon.js +3 -6
  58. package/dist/Icons/EmailIcon.d.ts +3 -1
  59. package/dist/Icons/EmailIcon.js +4 -7
  60. package/dist/Icons/EraserIcon.d.ts +3 -1
  61. package/dist/Icons/EraserIcon.js +9 -10
  62. package/dist/Icons/ErrorIcon.d.ts +3 -1
  63. package/dist/Icons/ErrorIcon.js +4 -7
  64. package/dist/Icons/EyeClosedIcon.d.ts +3 -1
  65. package/dist/Icons/EyeClosedIcon.js +4 -7
  66. package/dist/Icons/EyeClosedIcon2.d.ts +3 -1
  67. package/dist/Icons/EyeClosedIcon2.js +3 -6
  68. package/dist/Icons/EyeOpenIcon.d.ts +3 -1
  69. package/dist/Icons/EyeOpenIcon.js +6 -9
  70. package/dist/Icons/GoToFirstIcon.d.ts +3 -1
  71. package/dist/Icons/GoToFirstIcon.js +4 -7
  72. package/dist/Icons/GoToLastIcon.d.ts +3 -1
  73. package/dist/Icons/GoToLastIcon.js +4 -7
  74. package/dist/Icons/HarmonicCursorsIcon.d.ts +3 -1
  75. package/dist/Icons/HarmonicCursorsIcon.js +4 -7
  76. package/dist/Icons/IconBase.d.ts +4 -2
  77. package/dist/Icons/IconBase.js +17 -8
  78. package/dist/Icons/InfoIcon.d.ts +3 -1
  79. package/dist/Icons/InfoIcon.js +4 -7
  80. package/dist/Icons/LabelIcon.d.ts +3 -1
  81. package/dist/Icons/LabelIcon.js +3 -6
  82. package/dist/Icons/LassoIcon.d.ts +3 -1
  83. package/dist/Icons/LassoIcon.js +5 -8
  84. package/dist/Icons/LineToolIcon.d.ts +3 -1
  85. package/dist/Icons/LineToolIcon.js +3 -6
  86. package/dist/Icons/LineToolIcon2.d.ts +3 -1
  87. package/dist/Icons/LineToolIcon2.js +3 -6
  88. package/dist/Icons/LiveViewIcon.d.ts +3 -1
  89. package/dist/Icons/LiveViewIcon.js +2 -5
  90. package/dist/Icons/LoaderIcon.d.ts +3 -1
  91. package/dist/Icons/LoaderIcon.js +6 -7
  92. package/dist/Icons/LocationIcon.d.ts +3 -1
  93. package/dist/Icons/LocationIcon.js +3 -6
  94. package/dist/Icons/LogoutIcon.d.ts +3 -1
  95. package/dist/Icons/LogoutIcon.js +4 -7
  96. package/dist/Icons/MessagesIcon.d.ts +3 -1
  97. package/dist/Icons/MessagesIcon.js +5 -8
  98. package/dist/Icons/MetadataIcon.d.ts +3 -1
  99. package/dist/Icons/MetadataIcon.js +4 -7
  100. package/dist/Icons/MinusIcon.d.ts +3 -1
  101. package/dist/Icons/MinusIcon.js +3 -6
  102. package/dist/Icons/OntologyIcon.d.ts +3 -1
  103. package/dist/Icons/OntologyIcon.js +2 -5
  104. package/dist/Icons/PanelIconClose.d.ts +3 -1
  105. package/dist/Icons/PanelIconClose.js +4 -7
  106. package/dist/Icons/PanelIconOpen.d.ts +3 -1
  107. package/dist/Icons/PanelIconOpen.js +8 -11
  108. package/dist/Icons/PlayIcon.d.ts +3 -1
  109. package/dist/Icons/PlayIcon.js +3 -6
  110. package/dist/Icons/PlusIcon.d.ts +3 -1
  111. package/dist/Icons/PlusIcon.js +4 -7
  112. package/dist/Icons/ResetIcon.d.ts +3 -1
  113. package/dist/Icons/ResetIcon.js +4 -7
  114. package/dist/Icons/ReviewedIcon.d.ts +3 -1
  115. package/dist/Icons/ReviewedIcon.js +3 -6
  116. package/dist/Icons/ScissorsIcon.d.ts +3 -1
  117. package/dist/Icons/ScissorsIcon.js +6 -9
  118. package/dist/Icons/SettingsIcon.d.ts +3 -1
  119. package/dist/Icons/SettingsIcon.js +3 -6
  120. package/dist/Icons/SortAscendingIcon.d.ts +3 -1
  121. package/dist/Icons/SortAscendingIcon.js +3 -6
  122. package/dist/Icons/SortAtoZIcon.d.ts +3 -1
  123. package/dist/Icons/SortAtoZIcon.js +3 -6
  124. package/dist/Icons/SortDescendingIcon.d.ts +3 -1
  125. package/dist/Icons/SortDescendingIcon.js +3 -6
  126. package/dist/Icons/SortZtoAIcon.d.ts +3 -1
  127. package/dist/Icons/SortZtoAIcon.js +3 -6
  128. package/dist/Icons/StackIcon.d.ts +3 -1
  129. package/dist/Icons/StackIcon.js +4 -7
  130. package/dist/Icons/StarIcon.d.ts +3 -1
  131. package/dist/Icons/StarIcon.js +3 -6
  132. package/dist/Icons/TrashIcon.d.ts +3 -1
  133. package/dist/Icons/TrashIcon.js +3 -6
  134. package/dist/Icons/UndoIcon.d.ts +3 -1
  135. package/dist/Icons/UndoIcon.js +4 -7
  136. package/dist/Icons/UserIcon.d.ts +3 -1
  137. package/dist/Icons/UserIcon.js +3 -6
  138. package/dist/Icons/WarningIcon.d.ts +3 -1
  139. package/dist/Icons/WarningIcon.js +5 -8
  140. package/dist/Icons/ZoomAllIcon.d.ts +3 -1
  141. package/dist/Icons/ZoomAllIcon.js +3 -6
  142. package/dist/Icons/ZoomXIcon.d.ts +3 -1
  143. package/dist/Icons/ZoomXIcon.js +4 -7
  144. package/dist/Icons/ZoomYIcon.d.ts +3 -1
  145. package/dist/Icons/ZoomYIcon.js +4 -7
  146. package/dist/Input/InputUtils.d.ts +4 -4
  147. package/dist/Input/InputUtils.js +1 -1
  148. package/dist/Input.d.ts +7 -17
  149. package/dist/Input.js +105 -101
  150. package/dist/InputOTP.d.ts +27 -7
  151. package/dist/InputOTP.js +171 -146
  152. package/dist/Label.d.ts +7 -2
  153. package/dist/Label.js +12 -9
  154. package/dist/MultiSelect/MultiSelectBase.d.ts +7 -2
  155. package/dist/MultiSelect/MultiSelectBase.js +212 -213
  156. package/dist/{MultiSelect/MutiSelect.d.ts → MultiSelect.d.ts} +8 -2
  157. package/dist/MultiSelect.js +27 -0
  158. package/dist/Popover.js +1 -1
  159. package/dist/RadioButtonGroup.js +1 -1
  160. package/dist/RadioGroup.d.ts +20 -14
  161. package/dist/RadioGroup.js +177 -148
  162. package/dist/Select.d.ts +7 -2
  163. package/dist/Select.js +108 -109
  164. package/dist/Separator.d.ts +8 -8
  165. package/dist/Separator.js +14 -15
  166. package/dist/Switch/SwitchBase.d.ts +13 -11
  167. package/dist/Switch/SwitchBase.js +84 -61
  168. package/dist/Switch.d.ts +11 -4
  169. package/dist/Switch.js +19 -20
  170. package/dist/Tabs/TabsBase.d.ts +16 -6
  171. package/dist/Tabs/TabsBase.js +133 -96
  172. package/dist/Tabs/tabsUtils.d.ts +6 -2
  173. package/dist/Tabs/tabsUtils.js +5 -2
  174. package/dist/Tabs.js +18 -18
  175. package/dist/Textarea.d.ts +7 -2
  176. package/dist/Textarea.js +78 -61
  177. package/dist/Toggle/ToggleBase.d.ts +4 -8
  178. package/dist/Toggle/ToggleBase.js +29 -16
  179. package/dist/Toggle.d.ts +4 -2
  180. package/dist/Toggle.js +23 -13
  181. package/dist/ToggleGroup/ToggleGroupBase.d.ts +4 -7
  182. package/dist/ToggleGroup/ToggleGroupBase.js +82 -73
  183. package/dist/ToggleGroup.d.ts +7 -2
  184. package/dist/ToggleGroup.js +31 -19
  185. package/dist/Tray.d.ts +47 -15
  186. package/dist/Tray.js +98 -60
  187. package/dist/hooks/useAccordionAutoScroll.d.ts +1 -1
  188. package/dist/hooks/useAccordionAutoScroll.d.ts.map +1 -1
  189. package/dist/hooks/useAccordionAutoScroll.js +35 -34
  190. package/dist/{index-BSCg4Mei.js → index-B0Kp8R0j.js} +3 -3
  191. package/dist/{index-jgQ7sgLl.js → index-D4jMMaAi.js} +5 -5
  192. package/dist/primitives/input.d.ts.map +1 -1
  193. package/dist/primitives/input.js +1 -4
  194. package/dist/primitives/select.d.ts.map +1 -1
  195. package/dist/primitives/select.js +4 -11
  196. package/dist/primitives/slot.d.ts +11 -4
  197. package/dist/primitives/slot.d.ts.map +1 -1
  198. package/dist/primitives/slot.js +32 -28
  199. package/dist/primitives/textarea.d.ts.map +1 -1
  200. package/dist/primitives/textarea.js +1 -3
  201. package/dist/utils/formFieldUtils.js +2 -2
  202. package/package.json +1 -1
  203. package/dist/MultiSelect/MutiSelect.js +0 -19
package/dist/InputOTP.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import "./styles/main.css";
3
- import { jsx as T, jsxs as vt } from "react/jsx-runtime";
3
+ import { jsx as k, jsxs as ft } from "react/jsx-runtime";
4
4
  import "./Icons/AnalyzeIcon.js";
5
5
  import "./Icons/AnnotationsIcon.js";
6
6
  import "./Icons/ApprovedIcon.js";
@@ -40,7 +40,7 @@ import "./Icons/LocationIcon.js";
40
40
  import "./Icons/LogoutIcon.js";
41
41
  import "./Icons/MessagesIcon.js";
42
42
  import "./Icons/MetadataIcon.js";
43
- import { MinusIcon as _t } from "./Icons/MinusIcon.js";
43
+ import { MinusIcon as Nt } from "./Icons/MinusIcon.js";
44
44
  import "./Icons/OntologyIcon.js";
45
45
  import "./Icons/PanelIconClose.js";
46
46
  import "./Icons/PanelIconOpen.js";
@@ -63,170 +63,170 @@ import "./Icons/WarningIcon.js";
63
63
  import "./Icons/ZoomAllIcon.js";
64
64
  import "./Icons/ZoomXIcon.js";
65
65
  import "./Icons/ZoomYIcon.js";
66
- import { useFormFieldId as Ht, ErrorMessage as Gt, getErrorMessageId as Lt } from "./utils/formFieldUtils.js";
67
- import { cn as gt } from "./utils/twUtils.js";
66
+ import { useFormFieldId as _t, ErrorMessage as Ht, getErrorMessageId as Gt } from "./utils/formFieldUtils.js";
67
+ import { cn as vt } from "./utils/twUtils.js";
68
68
  import * as r from "react";
69
- import { createContext as ht, forwardRef as Q, useContext as bt } from "react";
70
- var zt = Object.defineProperty, $t = Object.defineProperties, Vt = Object.getOwnPropertyDescriptors, K = Object.getOwnPropertySymbols, wt = Object.prototype.hasOwnProperty, yt = Object.prototype.propertyIsEnumerable, ft = (t, n, a) => n in t ? zt(t, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[n] = a, qt = (t, n) => {
71
- for (var a in n || (n = {})) wt.call(n, a) && ft(t, a, n[a]);
72
- if (K) for (var a of K(n)) yt.call(n, a) && ft(t, a, n[a]);
69
+ import { createContext as gt, useContext as ht } from "react";
70
+ var Lt = Object.defineProperty, zt = Object.defineProperties, $t = Object.getOwnPropertyDescriptors, K = Object.getOwnPropertySymbols, bt = Object.prototype.hasOwnProperty, wt = Object.prototype.propertyIsEnumerable, mt = (t, n, a) => n in t ? Lt(t, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[n] = a, Vt = (t, n) => {
71
+ for (var a in n || (n = {})) bt.call(n, a) && mt(t, a, n[a]);
72
+ if (K) for (var a of K(n)) wt.call(n, a) && mt(t, a, n[a]);
73
73
  return t;
74
- }, Zt = (t, n) => $t(t, Vt(n)), Jt = (t, n) => {
74
+ }, qt = (t, n) => zt(t, $t(n)), Zt = (t, n) => {
75
75
  var a = {};
76
- for (var u in t) wt.call(t, u) && n.indexOf(u) < 0 && (a[u] = t[u]);
77
- if (t != null && K) for (var u of K(t)) n.indexOf(u) < 0 && yt.call(t, u) && (a[u] = t[u]);
76
+ for (var u in t) bt.call(t, u) && n.indexOf(u) < 0 && (a[u] = t[u]);
77
+ if (t != null && K) for (var u of K(t)) n.indexOf(u) < 0 && wt.call(t, u) && (a[u] = t[u]);
78
78
  return a;
79
79
  };
80
- function Kt(t) {
80
+ function Jt(t) {
81
81
  let n = setTimeout(t, 0), a = setTimeout(t, 10), u = setTimeout(t, 50);
82
82
  return [n, a, u];
83
83
  }
84
- function Qt(t) {
84
+ function Kt(t) {
85
85
  let n = r.useRef();
86
86
  return r.useEffect(() => {
87
87
  n.current = t;
88
88
  }), n.current;
89
89
  }
90
- var Ut = 18, xt = 40, Xt = `${xt}px`, Yt = ["[data-lastpass-icon-root]", "com-1password-button", "[data-dashlanecreated]", '[style$="2147483647 !important;"]'].join(",");
91
- function te({ containerRef: t, inputRef: n, pushPasswordManagerStrategy: a, isFocused: u }) {
92
- let [v, s] = r.useState(!1), [b, d] = r.useState(!1), [k, E] = r.useState(!1), A = r.useMemo(() => a === "none" ? !1 : (a === "increase-width" || a === "experimental-no-flickering") && v && b, [v, b, a]), R = r.useCallback(() => {
93
- let f = t.current, P = n.current;
94
- if (!f || !P || k || a === "none") return;
95
- let g = f, w = g.getBoundingClientRect().left + g.offsetWidth, I = g.getBoundingClientRect().top + g.offsetHeight / 2, l = w - Ut, O = I;
96
- document.querySelectorAll(Yt).length === 0 && document.elementFromPoint(l, O) === f || (s(!0), E(!0));
97
- }, [t, n, k, a]);
90
+ var Qt = 18, xt = 40, Ut = `${xt}px`, Xt = ["[data-lastpass-icon-root]", "com-1password-button", "[data-dashlanecreated]", '[style$="2147483647 !important;"]'].join(",");
91
+ function Yt({ containerRef: t, inputRef: n, pushPasswordManagerStrategy: a, isFocused: u }) {
92
+ let [v, s] = r.useState(!1), [b, m] = r.useState(!1), [C, j] = r.useState(!1), M = r.useMemo(() => a === "none" ? !1 : (a === "increase-width" || a === "experimental-no-flickering") && v && b, [v, b, a]), R = r.useCallback(() => {
93
+ let f = t.current, y = n.current;
94
+ if (!f || !y || C || a === "none") return;
95
+ let g = f, w = g.getBoundingClientRect().left + g.offsetWidth, I = g.getBoundingClientRect().top + g.offsetHeight / 2, l = w - Qt, O = I;
96
+ document.querySelectorAll(Xt).length === 0 && document.elementFromPoint(l, O) === f || (s(!0), j(!0));
97
+ }, [t, n, C, a]);
98
98
  return r.useEffect(() => {
99
99
  let f = t.current;
100
100
  if (!f || a === "none") return;
101
- function P() {
101
+ function y() {
102
102
  let w = window.innerWidth - f.getBoundingClientRect().right;
103
- d(w >= xt);
103
+ m(w >= xt);
104
104
  }
105
- P();
106
- let g = setInterval(P, 1e3);
105
+ y();
106
+ let g = setInterval(y, 1e3);
107
107
  return () => {
108
108
  clearInterval(g);
109
109
  };
110
110
  }, [t, a]), r.useEffect(() => {
111
111
  let f = u || document.activeElement === n.current;
112
112
  if (a === "none" || !f) return;
113
- let P = setTimeout(R, 0), g = setTimeout(R, 2e3), w = setTimeout(R, 5e3), I = setTimeout(() => {
114
- E(!0);
113
+ let y = setTimeout(R, 0), g = setTimeout(R, 2e3), w = setTimeout(R, 5e3), I = setTimeout(() => {
114
+ j(!0);
115
115
  }, 6e3);
116
116
  return () => {
117
- clearTimeout(P), clearTimeout(g), clearTimeout(w), clearTimeout(I);
117
+ clearTimeout(y), clearTimeout(g), clearTimeout(w), clearTimeout(I);
118
118
  };
119
- }, [n, u, a, R]), { hasPWMBadge: v, willPushPWMBadge: A, PWM_BADGE_SPACE_WIDTH: Xt };
119
+ }, [n, u, a, R]), { hasPWMBadge: v, willPushPWMBadge: M, PWM_BADGE_SPACE_WIDTH: Ut };
120
120
  }
121
- var ee = r.createContext({}), Et = r.forwardRef((t, n) => {
122
- var a = t, { value: u, onChange: v, maxLength: s, textAlign: b = "left", pattern: d, placeholder: k, inputMode: E = "numeric", onComplete: A, pushPasswordManagerStrategy: R = "increase-width", pasteTransformer: f, containerClassName: P, noScriptCSSFallback: g = re, render: w, children: I } = a, l = Jt(a, ["value", "onChange", "maxLength", "textAlign", "pattern", "placeholder", "inputMode", "onComplete", "pushPasswordManagerStrategy", "pasteTransformer", "containerClassName", "noScriptCSSFallback", "render", "children"]), O, rt, nt, ot, at;
123
- let [It, Ot] = r.useState(typeof l.defaultValue == "string" ? l.defaultValue : ""), p = u ?? It, W = Qt(p), L = r.useCallback((e) => {
124
- v?.(e), Ot(e);
125
- }, [v]), C = r.useMemo(() => d ? typeof d == "string" ? new RegExp(d) : d : null, [d]), c = r.useRef(null), U = r.useRef(null), X = r.useRef({ value: p, onChange: L, isIOS: typeof window < "u" && ((rt = (O = window?.CSS) == null ? void 0 : O.supports) == null ? void 0 : rt.call(O, "-webkit-touch-callout", "none")) }), Z = r.useRef({ prev: [(nt = c.current) == null ? void 0 : nt.selectionStart, (ot = c.current) == null ? void 0 : ot.selectionEnd, (at = c.current) == null ? void 0 : at.selectionDirection] });
121
+ var te = r.createContext({}), Et = r.forwardRef((t, n) => {
122
+ var a = t, { value: u, onChange: v, maxLength: s, textAlign: b = "left", pattern: m, placeholder: C, inputMode: j = "numeric", onComplete: M, pushPasswordManagerStrategy: R = "increase-width", pasteTransformer: f, containerClassName: y, noScriptCSSFallback: g = ee, render: w, children: I } = a, l = Zt(a, ["value", "onChange", "maxLength", "textAlign", "pattern", "placeholder", "inputMode", "onComplete", "pushPasswordManagerStrategy", "pasteTransformer", "containerClassName", "noScriptCSSFallback", "render", "children"]), O, et, rt, nt, ot;
123
+ let [Rt, It] = r.useState(typeof l.defaultValue == "string" ? l.defaultValue : ""), p = u ?? Rt, W = Kt(p), L = r.useCallback((e) => {
124
+ v?.(e), It(e);
125
+ }, [v]), P = r.useMemo(() => m ? typeof m == "string" ? new RegExp(m) : m : null, [m]), c = r.useRef(null), Q = r.useRef(null), U = r.useRef({ value: p, onChange: L, isIOS: typeof window < "u" && ((et = (O = window?.CSS) == null ? void 0 : O.supports) == null ? void 0 : et.call(O, "-webkit-touch-callout", "none")) }), Z = r.useRef({ prev: [(rt = c.current) == null ? void 0 : rt.selectionStart, (nt = c.current) == null ? void 0 : nt.selectionEnd, (ot = c.current) == null ? void 0 : ot.selectionDirection] });
126
126
  r.useImperativeHandle(n, () => c.current, []), r.useEffect(() => {
127
- let e = c.current, o = U.current;
127
+ let e = c.current, o = Q.current;
128
128
  if (!e || !o) return;
129
- X.current.value !== e.value && X.current.onChange(e.value), Z.current.prev = [e.selectionStart, e.selectionEnd, e.selectionDirection];
130
- function m() {
129
+ U.current.value !== e.value && U.current.onChange(e.value), Z.current.prev = [e.selectionStart, e.selectionEnd, e.selectionDirection];
130
+ function d() {
131
131
  if (document.activeElement !== e) {
132
132
  $(null), V(null);
133
133
  return;
134
134
  }
135
- let i = e.selectionStart, h = e.selectionEnd, J = e.selectionDirection, S = e.maxLength, F = e.value, M = Z.current.prev, j = -1, D = -1, N;
135
+ let i = e.selectionStart, h = e.selectionEnd, J = e.selectionDirection, S = e.maxLength, F = e.value, T = Z.current.prev, A = -1, D = -1, N;
136
136
  if (F.length !== 0 && i !== null && h !== null) {
137
- let Bt = i === h, Ft = i === F.length && F.length < S;
138
- if (Bt && !Ft) {
137
+ let Wt = i === h, Bt = i === F.length && F.length < S;
138
+ if (Wt && !Bt) {
139
139
  let _ = i;
140
- if (_ === 0) j = 0, D = 1, N = "forward";
141
- else if (_ === S) j = _ - 1, D = _, N = "backward";
140
+ if (_ === 0) A = 0, D = 1, N = "forward";
141
+ else if (_ === S) A = _ - 1, D = _, N = "backward";
142
142
  else if (S > 1 && F.length > 1) {
143
- let et = 0;
144
- if (M[0] !== null && M[1] !== null) {
145
- N = _ < M[1] ? "backward" : "forward";
146
- let Nt = M[0] === M[1] && M[0] < S;
147
- N === "backward" && !Nt && (et = -1);
143
+ let tt = 0;
144
+ if (T[0] !== null && T[1] !== null) {
145
+ N = _ < T[1] ? "backward" : "forward";
146
+ let Ft = T[0] === T[1] && T[0] < S;
147
+ N === "backward" && !Ft && (tt = -1);
148
148
  }
149
- j = et + _, D = et + _ + 1;
149
+ A = tt + _, D = tt + _ + 1;
150
150
  }
151
151
  }
152
- j !== -1 && D !== -1 && j !== D && c.current.setSelectionRange(j, D, N);
152
+ A !== -1 && D !== -1 && A !== D && c.current.setSelectionRange(A, D, N);
153
153
  }
154
- let dt = j !== -1 ? j : i, mt = D !== -1 ? D : h, Wt = N ?? J;
155
- $(dt), V(mt), Z.current.prev = [dt, mt, Wt];
154
+ let ct = A !== -1 ? A : i, dt = D !== -1 ? D : h, jt = N ?? J;
155
+ $(ct), V(dt), Z.current.prev = [ct, dt, jt];
156
156
  }
157
- if (document.addEventListener("selectionchange", m, { capture: !0 }), m(), document.activeElement === e && Y(!0), !document.getElementById("input-otp-style")) {
157
+ if (document.addEventListener("selectionchange", d, { capture: !0 }), d(), document.activeElement === e && X(!0), !document.getElementById("input-otp-style")) {
158
158
  let i = document.createElement("style");
159
159
  if (i.id = "input-otp-style", document.head.appendChild(i), i.sheet) {
160
160
  let h = "background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";
161
161
  q(i.sheet, "[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"), q(i.sheet, `[data-input-otp]:autofill { ${h} }`), q(i.sheet, `[data-input-otp]:-webkit-autofill { ${h} }`), q(i.sheet, "@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"), q(i.sheet, "[data-input-otp] + * { pointer-events: all !important; }");
162
162
  }
163
163
  }
164
- let y = () => {
164
+ let x = () => {
165
165
  o && o.style.setProperty("--root-height", `${e.clientHeight}px`);
166
166
  };
167
- y();
168
- let x = new ResizeObserver(y);
169
- return x.observe(e), () => {
170
- document.removeEventListener("selectionchange", m, { capture: !0 }), x.disconnect();
167
+ x();
168
+ let E = new ResizeObserver(x);
169
+ return E.observe(e), () => {
170
+ document.removeEventListener("selectionchange", d, { capture: !0 }), E.disconnect();
171
171
  };
172
172
  }, []);
173
- let [lt, it] = r.useState(!1), [z, Y] = r.useState(!1), [B, $] = r.useState(null), [H, V] = r.useState(null);
173
+ let [at, lt] = r.useState(!1), [z, X] = r.useState(!1), [B, $] = r.useState(null), [H, V] = r.useState(null);
174
174
  r.useEffect(() => {
175
- Kt(() => {
176
- var e, o, m, y;
175
+ Jt(() => {
176
+ var e, o, d, x;
177
177
  (e = c.current) == null || e.dispatchEvent(new Event("input"));
178
- let x = (o = c.current) == null ? void 0 : o.selectionStart, i = (m = c.current) == null ? void 0 : m.selectionEnd, h = (y = c.current) == null ? void 0 : y.selectionDirection;
179
- x !== null && i !== null && ($(x), V(i), Z.current.prev = [x, i, h]);
178
+ let E = (o = c.current) == null ? void 0 : o.selectionStart, i = (d = c.current) == null ? void 0 : d.selectionEnd, h = (x = c.current) == null ? void 0 : x.selectionDirection;
179
+ E !== null && i !== null && ($(E), V(i), Z.current.prev = [E, i, h]);
180
180
  });
181
181
  }, [p, z]), r.useEffect(() => {
182
- W !== void 0 && p !== W && W.length < s && p.length === s && A?.(p);
183
- }, [s, A, W, p]);
184
- let G = te({ containerRef: U, inputRef: c, pushPasswordManagerStrategy: R, isFocused: z }), ut = r.useCallback((e) => {
182
+ W !== void 0 && p !== W && W.length < s && p.length === s && M?.(p);
183
+ }, [s, M, W, p]);
184
+ let G = Yt({ containerRef: Q, inputRef: c, pushPasswordManagerStrategy: R, isFocused: z }), it = r.useCallback((e) => {
185
185
  let o = e.currentTarget.value.slice(0, s);
186
- if (o.length > 0 && C && !C.test(o)) {
186
+ if (o.length > 0 && P && !P.test(o)) {
187
187
  e.preventDefault();
188
188
  return;
189
189
  }
190
190
  typeof W == "string" && o.length < W.length && document.dispatchEvent(new Event("selectionchange")), L(o);
191
- }, [s, L, W, C]), st = r.useCallback(() => {
191
+ }, [s, L, W, P]), ut = r.useCallback(() => {
192
192
  var e;
193
193
  if (c.current) {
194
- let o = Math.min(c.current.value.length, s - 1), m = c.current.value.length;
195
- (e = c.current) == null || e.setSelectionRange(o, m), $(o), V(m);
194
+ let o = Math.min(c.current.value.length, s - 1), d = c.current.value.length;
195
+ (e = c.current) == null || e.setSelectionRange(o, d), $(o), V(d);
196
196
  }
197
- Y(!0);
198
- }, [s]), pt = r.useCallback((e) => {
199
- var o, m;
200
- let y = c.current;
201
- if (!f && (!X.current.isIOS || !e.clipboardData || !y)) return;
202
- let x = e.clipboardData.getData("text/plain"), i = f ? f(x) : x;
197
+ X(!0);
198
+ }, [s]), st = r.useCallback((e) => {
199
+ var o, d;
200
+ let x = c.current;
201
+ if (!f && (!U.current.isIOS || !e.clipboardData || !x)) return;
202
+ let E = e.clipboardData.getData("text/plain"), i = f ? f(E) : E;
203
203
  e.preventDefault();
204
- let h = (o = c.current) == null ? void 0 : o.selectionStart, J = (m = c.current) == null ? void 0 : m.selectionEnd, S = (h !== J ? p.slice(0, h) + i + p.slice(J) : p.slice(0, h) + i + p.slice(h)).slice(0, s);
205
- if (S.length > 0 && C && !C.test(S)) return;
206
- y.value = S, L(S);
207
- let F = Math.min(S.length, s - 1), M = S.length;
208
- y.setSelectionRange(F, M), $(F), V(M);
209
- }, [s, L, C, p]), jt = r.useMemo(() => ({ position: "relative", cursor: l.disabled ? "default" : "text", userSelect: "none", WebkitUserSelect: "none", pointerEvents: "none" }), [l.disabled]), ct = r.useMemo(() => ({ position: "absolute", inset: 0, width: G.willPushPWMBadge ? `calc(100% + ${G.PWM_BADGE_SPACE_WIDTH})` : "100%", clipPath: G.willPushPWMBadge ? `inset(0 ${G.PWM_BADGE_SPACE_WIDTH} 0 0)` : void 0, height: "100%", display: "flex", textAlign: b, opacity: "1", color: "transparent", pointerEvents: "all", background: "transparent", caretColor: "transparent", border: "0 solid transparent", outline: "0 solid transparent", boxShadow: "none", lineHeight: "1", letterSpacing: "-.5em", fontSize: "var(--root-height)", fontFamily: "monospace", fontVariantNumeric: "tabular-nums" }), [G.PWM_BADGE_SPACE_WIDTH, G.willPushPWMBadge, b]), Dt = r.useMemo(() => r.createElement("input", Zt(qt({ autoComplete: l.autoComplete || "one-time-code" }, l), { "data-input-otp": !0, "data-input-otp-placeholder-shown": p.length === 0 || void 0, "data-input-otp-mss": B, "data-input-otp-mse": H, inputMode: E, pattern: C?.source, "aria-placeholder": k, style: ct, maxLength: s, value: p, ref: c, onPaste: (e) => {
204
+ let h = (o = c.current) == null ? void 0 : o.selectionStart, J = (d = c.current) == null ? void 0 : d.selectionEnd, S = (h !== J ? p.slice(0, h) + i + p.slice(J) : p.slice(0, h) + i + p.slice(h)).slice(0, s);
205
+ if (S.length > 0 && P && !P.test(S)) return;
206
+ x.value = S, L(S);
207
+ let F = Math.min(S.length, s - 1), T = S.length;
208
+ x.setSelectionRange(F, T), $(F), V(T);
209
+ }, [s, L, P, p]), Ot = r.useMemo(() => ({ position: "relative", cursor: l.disabled ? "default" : "text", userSelect: "none", WebkitUserSelect: "none", pointerEvents: "none" }), [l.disabled]), pt = r.useMemo(() => ({ position: "absolute", inset: 0, width: G.willPushPWMBadge ? `calc(100% + ${G.PWM_BADGE_SPACE_WIDTH})` : "100%", clipPath: G.willPushPWMBadge ? `inset(0 ${G.PWM_BADGE_SPACE_WIDTH} 0 0)` : void 0, height: "100%", display: "flex", textAlign: b, opacity: "1", color: "transparent", pointerEvents: "all", background: "transparent", caretColor: "transparent", border: "0 solid transparent", outline: "0 solid transparent", boxShadow: "none", lineHeight: "1", letterSpacing: "-.5em", fontSize: "var(--root-height)", fontFamily: "monospace", fontVariantNumeric: "tabular-nums" }), [G.PWM_BADGE_SPACE_WIDTH, G.willPushPWMBadge, b]), At = r.useMemo(() => r.createElement("input", qt(Vt({ autoComplete: l.autoComplete || "one-time-code" }, l), { "data-input-otp": !0, "data-input-otp-placeholder-shown": p.length === 0 || void 0, "data-input-otp-mss": B, "data-input-otp-mse": H, inputMode: j, pattern: P?.source, "aria-placeholder": C, style: pt, maxLength: s, value: p, ref: c, onPaste: (e) => {
210
210
  var o;
211
- pt(e), (o = l.onPaste) == null || o.call(l, e);
212
- }, onChange: ut, onMouseOver: (e) => {
211
+ st(e), (o = l.onPaste) == null || o.call(l, e);
212
+ }, onChange: it, onMouseOver: (e) => {
213
213
  var o;
214
- it(!0), (o = l.onMouseOver) == null || o.call(l, e);
214
+ lt(!0), (o = l.onMouseOver) == null || o.call(l, e);
215
215
  }, onMouseLeave: (e) => {
216
216
  var o;
217
- it(!1), (o = l.onMouseLeave) == null || o.call(l, e);
217
+ lt(!1), (o = l.onMouseLeave) == null || o.call(l, e);
218
218
  }, onFocus: (e) => {
219
219
  var o;
220
- st(), (o = l.onFocus) == null || o.call(l, e);
220
+ ut(), (o = l.onFocus) == null || o.call(l, e);
221
221
  }, onBlur: (e) => {
222
222
  var o;
223
- Y(!1), (o = l.onBlur) == null || o.call(l, e);
224
- } })), [ut, st, pt, E, ct, s, H, B, l, C?.source, p]), tt = r.useMemo(() => ({ slots: Array.from({ length: s }).map((e, o) => {
225
- var m;
226
- let y = z && B !== null && H !== null && (B === H && o === B || o >= B && o < H), x = p[o] !== void 0 ? p[o] : null, i = p[0] !== void 0 ? null : (m = k?.[o]) != null ? m : null;
227
- return { char: x, placeholderChar: i, isActive: y, hasFakeCaret: y && x === null };
228
- }), isFocused: z, isHovering: !l.disabled && lt }), [z, lt, s, H, B, l.disabled, p]), At = r.useMemo(() => w ? w(tt) : r.createElement(ee.Provider, { value: tt }, I), [I, tt, w]);
229
- return r.createElement(r.Fragment, null, g !== null && r.createElement("noscript", null, r.createElement("style", null, g)), r.createElement("div", { ref: U, "data-input-otp-container": !0, style: jt, className: P }, At, r.createElement("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" } }, Dt)));
223
+ X(!1), (o = l.onBlur) == null || o.call(l, e);
224
+ } })), [it, ut, st, j, pt, s, H, B, l, P?.source, p]), Y = r.useMemo(() => ({ slots: Array.from({ length: s }).map((e, o) => {
225
+ var d;
226
+ let x = z && B !== null && H !== null && (B === H && o === B || o >= B && o < H), E = p[o] !== void 0 ? p[o] : null, i = p[0] !== void 0 ? null : (d = C?.[o]) != null ? d : null;
227
+ return { char: E, placeholderChar: i, isActive: x, hasFakeCaret: x && E === null };
228
+ }), isFocused: z, isHovering: !l.disabled && at }), [z, at, s, H, B, l.disabled, p]), Dt = r.useMemo(() => w ? w(Y) : r.createElement(te.Provider, { value: Y }, I), [I, Y, w]);
229
+ return r.createElement(r.Fragment, null, g !== null && r.createElement("noscript", null, r.createElement("style", null, g)), r.createElement("div", { ref: Q, "data-input-otp-container": !0, style: Ot, className: y }, Dt, r.createElement("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" } }, At)));
230
230
  });
231
231
  Et.displayName = "Input";
232
232
  function q(t, n) {
@@ -236,7 +236,7 @@ function q(t, n) {
236
236
  console.error("input-otp could not insert CSS rule:", n);
237
237
  }
238
238
  }
239
- var re = `
239
+ var ee = `
240
240
  [data-input-otp] {
241
241
  --nojs-bg: white !important;
242
242
  --nojs-fg: black !important;
@@ -256,88 +256,113 @@ var re = `
256
256
  --nojs-fg: white !important;
257
257
  }
258
258
  }`;
259
- const St = ht({}), Pt = ht(null), Ct = () => {
260
- const t = bt(Pt);
259
+ const St = gt({}), yt = gt(null), Pt = () => {
260
+ const t = ht(yt);
261
261
  if (!t)
262
262
  throw new Error("useRoot must be used within an InputOTP");
263
263
  return t;
264
- }, Mt = Q(({ autoFocus: t = !1, children: n, className: a, errorMessage: u, hasError: v, id: s, inputMode: b = "numeric", maxLength: d, name: k, onChange: E, onComplete: A, value: R, variant: f = "outlined", ...P }, g) => {
265
- const w = Ht(s, k), I = (l) => {
266
- const O = l.clipboardData.getData("text/plain").trim();
267
- O.length === d && typeof E == "function" && (E(""), setTimeout(() => {
268
- typeof E == "function" && E(O);
269
- }, 0));
264
+ }, Ct = ({
265
+ ref: t,
266
+ autoFocus: n = !1,
267
+ children: a,
268
+ className: u,
269
+ errorMessage: v,
270
+ hasError: s,
271
+ id: b,
272
+ inputMode: m = "numeric",
273
+ maxLength: C,
274
+ name: j,
275
+ onChange: M,
276
+ onComplete: R,
277
+ value: f,
278
+ variant: y = "outlined",
279
+ ...g
280
+ }) => {
281
+ const w = _t(b, j), I = (l) => {
282
+ const O = l.clipboardData.getData("text/plain").trim().replaceAll("-", "");
283
+ O.length === C && typeof M == "function" && M(O);
270
284
  };
271
- return /* @__PURE__ */ T(St.Provider, { value: { hasError: v }, children: /* @__PURE__ */ vt("div", { className: "flex w-max flex-col gap-y-1", children: [
272
- /* @__PURE__ */ T(
285
+ return /* @__PURE__ */ k(St.Provider, { value: { hasError: s }, children: /* @__PURE__ */ ft("div", { className: "flex w-max flex-col gap-y-1", children: [
286
+ /* @__PURE__ */ k(
273
287
  Et,
274
288
  {
275
- autoFocus: t,
276
- containerClassName: gt("flex items-center gap-2 has-[:disabled]:opacity-50 disabled:cursor-not-allowed", a),
289
+ autoFocus: n,
290
+ containerClassName: vt("flex items-center gap-2 has-[:disabled]:opacity-50 disabled:cursor-not-allowed", u),
277
291
  "data-1p-ignore": "true",
278
292
  "data-dashlane-disabled-on-field": "true",
279
293
  "data-lpignore": "true",
280
294
  "data-protonpass-ignore": "true",
281
295
  "data-testid": "spectral-input-otp",
282
296
  id: w,
283
- inputMode: b,
284
- maxLength: d,
285
- onChange: E,
286
- onComplete: A,
297
+ inputMode: m,
298
+ maxLength: C,
299
+ onChange: M,
300
+ onComplete: R,
287
301
  onPaste: I,
288
302
  pasteTransformer: (l) => l.replaceAll("-", ""),
289
303
  pushPasswordManagerStrategy: "none",
290
- ref: g,
304
+ ref: t,
291
305
  role: "textbox",
292
306
  textAlign: "center",
293
- value: R,
294
- ...P,
295
- render: ({ slots: l }) => /* @__PURE__ */ T(Pt.Provider, { value: { slots: l, variant: f }, children: n })
307
+ value: f,
308
+ ...g,
309
+ render: ({ slots: l }) => /* @__PURE__ */ k(yt.Provider, { value: { slots: l, variant: y }, children: a })
296
310
  }
297
311
  ),
298
- v && u && /* @__PURE__ */ T(Gt, { dataTestId: "spectral-input-otp-error-message", id: Lt(w), message: u })
312
+ s && v && /* @__PURE__ */ k(Ht, { dataTestId: "spectral-input-otp-error-message", id: Gt(w), message: v })
299
313
  ] }) });
300
- });
301
- Mt.displayName = "InputOTP";
302
- const Tt = Q(({ ...t }, n) => /* @__PURE__ */ T("div", { className: "flex items-center justify-between gap-x-2 justify-center", "data-testid": "spectral-input-otp-group", ref: n, ...t }));
303
- Tt.displayName = "InputOTP.Group";
304
- const kt = Q(({ index: t, className: n, ...a }, u) => {
305
- const { variant: v = "outlined", slots: s = [] } = Ct(), { hasError: b } = bt(St), d = s[t] || { char: "", hasFakeCaret: !0, isActive: !1 };
306
- return /* @__PURE__ */ vt(
314
+ };
315
+ Ct.displayName = "InputOTP";
316
+ const Mt = ({
317
+ ref: t,
318
+ ...n
319
+ }) => /* @__PURE__ */ k("div", { className: "flex items-center justify-center gap-x-2", "data-testid": "spectral-input-otp-group", ref: t, ...n });
320
+ Mt.displayName = "InputOTP.Group";
321
+ const Tt = ({
322
+ ref: t,
323
+ index: n,
324
+ className: a,
325
+ ...u
326
+ }) => {
327
+ const { variant: v = "outlined", slots: s = [] } = Pt(), { hasError: b } = ht(St), m = s[n] || { char: "", hasFakeCaret: !0, isActive: !1 };
328
+ return /* @__PURE__ */ ft(
307
329
  "div",
308
330
  {
309
- className: gt(
310
- "relative flex h-12 w-10 items-center justify-center rounded-[8px] border-1 transition duration-200 z-10 focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2",
311
- v === "filled" ? "bg-level-one border-level-one" : "bg-transparent border-input-otp-border",
331
+ className: vt(
332
+ "relative z-10 flex h-12 w-10 items-center justify-center rounded-[8px] border-1 transition duration-200 focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2",
333
+ v === "filled" ? "bg-level-one border-level-one" : "border-input-otp-border bg-transparent",
312
334
  !b && "border",
313
- b && "border-2 border-danger-400 focus-visible:outline-danger-400",
314
- d.isActive && !b && "z-10 outline-2 outline-input-otp-border--focus outline-offset-2",
315
- d.isActive && b && "outline-2 outline-offset-2 outline-danger-400",
316
- n
335
+ b && "border-danger-400 focus-visible:outline-danger-400 border-2",
336
+ m.isActive && !b && "outline-input-otp-border--focus z-10 outline-2 outline-offset-2",
337
+ m.isActive && b && "outline-danger-400 outline-2 outline-offset-2",
338
+ a
317
339
  ),
318
- "data-index": t,
340
+ "data-index": n,
319
341
  "data-testid": "spectral-input-otp-slot",
320
342
  "data-variant": v,
321
- ref: u,
322
- ...a,
343
+ ref: t,
344
+ ...u,
323
345
  children: [
324
- d.char,
325
- d.hasFakeCaret && /* @__PURE__ */ T("div", { className: "pointer-events-none absolute inset-0 flex animate-caret-blink items-center justify-center", children: /* @__PURE__ */ T("div", { className: "h-8 w-px bg-input-otp-caret" }) })
346
+ m.char,
347
+ m.hasFakeCaret && /* @__PURE__ */ k("div", { className: "animate-caret-blink pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ k("div", { className: "bg-input-otp-caret h-8 w-px" }) })
326
348
  ]
327
349
  }
328
350
  );
329
- });
330
- kt.displayName = "InputOTP.Slot";
331
- const Rt = Q(({ ...t }, n) => {
332
- const { variant: a = "outlined" } = Ct();
333
- return /* @__PURE__ */ T("div", { ref: n, role: "separator", ...t, "data-testid": "spectral-input-otp-separator", "data-variant": a, children: /* @__PURE__ */ T(_t, { size: 24, color: a === "filled" ? "var(--color-input-otp-filled-separator)" : "var(--color-input-otp-border)" }) });
334
- });
335
- Rt.displayName = "InputOTP.Separator";
336
- const vr = Object.assign(Mt, {
337
- Group: Tt,
338
- Slot: kt,
339
- Separator: Rt
351
+ };
352
+ Tt.displayName = "InputOTP.Slot";
353
+ const kt = ({
354
+ ref: t,
355
+ ...n
356
+ }) => {
357
+ const { variant: a = "outlined" } = Pt();
358
+ return /* @__PURE__ */ k("div", { ref: t, role: "separator", ...n, "data-testid": "spectral-input-otp-separator", "data-variant": a, children: /* @__PURE__ */ k(Nt, { size: 24, color: a === "filled" ? "var(--color-input-otp-filled-separator)" : "var(--color-input-otp-border)" }) });
359
+ };
360
+ kt.displayName = "InputOTP.Separator";
361
+ const fr = Object.assign(Ct, {
362
+ Group: Mt,
363
+ Slot: Tt,
364
+ Separator: kt
340
365
  });
341
366
  export {
342
- vr as InputOTP
367
+ fr as InputOTP
343
368
  };
package/dist/Label.d.ts CHANGED
@@ -1,4 +1,9 @@
1
- import { ComponentPropsWithoutRef } from 'react';
1
+ import { ComponentPropsWithoutRef, Ref } from 'react';
2
2
  export type LabelProps = ComponentPropsWithoutRef<'label'>;
3
- export declare const Label: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & import('react').RefAttributes<HTMLLabelElement>>;
3
+ export declare const Label: {
4
+ ({ ref, className, ...props }: LabelProps & {
5
+ ref?: Ref<HTMLLabelElement>;
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ displayName: string;
8
+ };
4
9
  //# sourceMappingURL=Label.d.ts.map
package/dist/Label.js CHANGED
@@ -1,13 +1,16 @@
1
- "use client";
2
1
  import "./styles/main.css";
3
- import { jsx as r } from "react/jsx-runtime";
4
- import { cn as l } from "./utils/twUtils.js";
5
- import { forwardRef as t } from "react";
6
- const m = t(({ className: e, ...a }, o) => (
2
+ import { jsx as o } from "react/jsx-runtime";
3
+ import { cn as t } from "./utils/twUtils.js";
4
+ import "react";
5
+ const r = ({
6
+ ref: e,
7
+ className: a,
8
+ ...l
9
+ }) => (
7
10
  // eslint-disable-next-line jsx-a11y/label-has-associated-control
8
- /* @__PURE__ */ r("label", { ref: o, "data-slot": "label", className: l("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", e), ...a })
9
- ));
10
- m.displayName = "Label";
11
+ /* @__PURE__ */ o("label", { ref: e, "data-slot": "label", className: t("text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70", a), ...l })
12
+ );
13
+ r.displayName = "Label";
11
14
  export {
12
- m as Label
15
+ r as Label
13
16
  };
@@ -1,4 +1,4 @@
1
- import { ButtonHTMLAttributes } from 'react';
1
+ import { ButtonHTMLAttributes, Ref } from 'react';
2
2
  export type MultiSelectState = 'default' | 'error' | 'disabled' | 'loading';
3
3
  export interface MultiSelectOption {
4
4
  disabled?: boolean;
@@ -30,5 +30,10 @@ export interface MultiSelectBaseProps extends Omit<ButtonHTMLAttributes<HTMLButt
30
30
  'aria-label'?: string;
31
31
  'aria-describedby'?: string;
32
32
  }
33
- export declare const MultiSelectBase: import('react').ForwardRefExoticComponent<MultiSelectBaseProps & import('react').RefAttributes<HTMLButtonElement>>;
33
+ export declare const MultiSelectBase: {
34
+ ({ ref, className, clearAllLabel, closeOnSelect, emptyMessage, errorMessage, id, label, loadingMessage, maxCount, name, onChange, options, placeholder, searchPlaceholder, selectAllLabel, showClearAll, showSearch, showSelectAll, sortAlphabetically, state, value, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, ...props }: MultiSelectBaseProps & {
35
+ ref?: Ref<HTMLButtonElement>;
36
+ }): import("react/jsx-runtime").JSX.Element;
37
+ displayName: string;
38
+ };
34
39
  //# sourceMappingURL=MultiSelectBase.d.ts.map