@spear-ai/spectral 1.3.62 → 1.3.63

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 (164) hide show
  1. package/dist/.js +181 -152
  2. package/dist/Accordion.d.ts +37 -0
  3. package/dist/Accordion.js +465 -0
  4. package/dist/Alert/AlertBase.js +2 -2
  5. package/dist/Alert.js +4 -3
  6. package/dist/Avatar.js +1 -1
  7. package/dist/Badge.d.ts +12 -2
  8. package/dist/Badge.js +28 -4
  9. package/dist/Button.js +2 -2
  10. package/dist/ButtonGroup/ButtonGroupButton.d.ts +13 -0
  11. package/dist/ButtonGroup/ButtonGroupButton.js +51 -0
  12. package/dist/ButtonGroup.d.ts +29 -0
  13. package/dist/ButtonGroup.js +89 -0
  14. package/dist/ButtonIcon.js +2 -1
  15. package/dist/Checkbox/CheckboxBase.js +1 -1
  16. package/dist/Checkbox.js +11 -12
  17. package/dist/Dialog/DialogBase.d.ts +1 -1
  18. package/dist/Dialog/DialogBase.js +2 -2
  19. package/dist/Dialog.js +4 -4
  20. package/dist/Drawer.js +24 -1283
  21. package/dist/HoverCard.d.ts +29 -0
  22. package/dist/HoverCard.js +207 -0
  23. package/dist/Icons/MessagesIcon.d.ts +3 -0
  24. package/dist/Icons/MessagesIcon.js +31 -0
  25. package/dist/Icons/index.d.ts +1 -0
  26. package/dist/Icons.js +50 -48
  27. package/dist/Input.d.ts +2 -0
  28. package/dist/Input.js +98 -89
  29. package/dist/InputGroup.d.ts +16 -0
  30. package/dist/InputGroup.js +129 -0
  31. package/dist/InputOTP.d.ts +0 -2
  32. package/dist/InputOTP.js +138 -142
  33. package/dist/Label.d.ts +3 -7
  34. package/dist/Label.js +11 -11
  35. package/dist/MultiSelect/MultiSelectBase.js +22 -22
  36. package/dist/Popover.d.ts +6 -7
  37. package/dist/Popover.js +60 -71
  38. package/dist/RadioButtonGroup/RadioButtonGroupBase.js +1 -1
  39. package/dist/RadioButtonGroup.js +1 -1
  40. package/dist/RadioGroup.d.ts +1 -1
  41. package/dist/RadioGroup.js +141 -134
  42. package/dist/Select.js +97 -895
  43. package/dist/Separator.d.ts +12 -0
  44. package/dist/Separator.js +24 -0
  45. package/dist/Skeleton.js +3 -3
  46. package/dist/Slider.d.ts +15 -3
  47. package/dist/Slider.js +464 -40
  48. package/dist/Switch/SwitchBase.js +1 -1
  49. package/dist/Switch.js +2 -2
  50. package/dist/Tabs/TabsBase.js +1 -1
  51. package/dist/Tabs.js +16 -16
  52. package/dist/Textarea.js +41 -42
  53. package/dist/Toggle.js +2 -2
  54. package/dist/ToggleGroup.js +1 -1
  55. package/dist/Tooltip/TooltipBase.js +29 -29
  56. package/dist/Tooltip.js +15 -15
  57. package/dist/Tray/TrayStoriesData.d.ts +39 -0
  58. package/dist/Tray/TrayStoriesData.js +438 -0
  59. package/dist/Tray.d.ts +28 -0
  60. package/dist/Tray.js +227 -0
  61. package/dist/clsx-OuTLNxxd.js +16 -0
  62. package/dist/components/Accordion/Accordion.d.ts +37 -0
  63. package/dist/components/Accordion/Accordion.d.ts.map +1 -0
  64. package/dist/components/Badge/Badge.d.ts +12 -2
  65. package/dist/components/Badge/Badge.d.ts.map +1 -1
  66. package/dist/components/ButtonGroup/ButtonGroup.d.ts +29 -0
  67. package/dist/components/ButtonGroup/ButtonGroup.d.ts.map +1 -0
  68. package/dist/components/ButtonGroup/ButtonGroupButton.d.ts +13 -0
  69. package/dist/components/ButtonGroup/ButtonGroupButton.d.ts.map +1 -0
  70. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  71. package/dist/components/Dialog/DialogBase.d.ts +1 -1
  72. package/dist/components/HoverCard/HoverCard.d.ts +29 -0
  73. package/dist/components/HoverCard/HoverCard.d.ts.map +1 -0
  74. package/dist/components/Icons/MessagesIcon.d.ts +3 -0
  75. package/dist/components/Icons/MessagesIcon.d.ts.map +1 -0
  76. package/dist/components/Icons/index.d.ts +1 -0
  77. package/dist/components/Icons/index.d.ts.map +1 -1
  78. package/dist/components/Input/Input.d.ts +2 -0
  79. package/dist/components/Input/Input.d.ts.map +1 -1
  80. package/dist/components/InputGroup/InputGroup.d.ts +16 -0
  81. package/dist/components/InputGroup/InputGroup.d.ts.map +1 -0
  82. package/dist/components/InputOTP/InputOTP.d.ts +0 -2
  83. package/dist/components/InputOTP/InputOTP.d.ts.map +1 -1
  84. package/dist/components/Label/Label.d.ts +3 -7
  85. package/dist/components/Label/Label.d.ts.map +1 -1
  86. package/dist/components/Popover/Popover.d.ts +6 -7
  87. package/dist/components/Popover/Popover.d.ts.map +1 -1
  88. package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
  89. package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
  90. package/dist/components/Separator/Separator.d.ts +12 -0
  91. package/dist/components/Separator/Separator.d.ts.map +1 -0
  92. package/dist/components/Slider/Slider.d.ts +15 -3
  93. package/dist/components/Slider/Slider.d.ts.map +1 -1
  94. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  95. package/dist/components/Tray/Tray.d.ts +28 -0
  96. package/dist/components/Tray/Tray.d.ts.map +1 -0
  97. package/dist/components/Tray/TrayStoriesData.d.ts +39 -0
  98. package/dist/components/Tray/TrayStoriesData.d.ts.map +1 -0
  99. package/dist/features/AuthCard/ForgotPasswordEmailForm.js +4 -3
  100. package/dist/features/AuthCard/ForgotPasswordResetForm.js +9 -9
  101. package/dist/features/AuthCard/PasswordInput.js +78 -9
  102. package/dist/features/AuthCard/SignInForm.js +8 -7
  103. package/dist/features/AuthCard/SignUpForm.js +8 -7
  104. package/dist/features/AuthCard.js +2 -2
  105. package/dist/features/LabelingTools.js +7 -6
  106. package/dist/features/SensorMetadata.js +3 -2
  107. package/dist/features/SettingsPopover.js +3 -2
  108. package/dist/index-0ioNhtNM.js +10 -0
  109. package/dist/{index-CBwRmAsQ.js → index-6Abv_Flm.js} +1 -1
  110. package/dist/{index-DUK1rxhf.js → index-B-GQStVW.js} +6 -5
  111. package/dist/index-B2oBi8ng.js +142 -0
  112. package/dist/index-BIpuW_o8.js +146 -0
  113. package/dist/index-BZPx6jYI.js +8 -0
  114. package/dist/index-BhufZRa2.js +232 -0
  115. package/dist/index-CAKA12cC.js +1265 -0
  116. package/dist/{index-Cfyte2YO.js → index-CGALWSq_.js} +1 -1
  117. package/dist/index-CVSxKOPp.js +13 -0
  118. package/dist/index-CevVJ05e.js +822 -0
  119. package/dist/{index-CRBC94ik.js → index-D29mdTf5.js} +1 -1
  120. package/dist/{index-FeGk8zep.js → index-NzygPVvJ.js} +10 -9
  121. package/dist/index-UEFPWH8U.js +54 -0
  122. package/dist/index-rKs9bXHr.js +6 -0
  123. package/dist/{index-Cb7rjMhE.js → index-y6Br5T4h.js} +6 -6
  124. package/dist/index.d.ts +10 -1
  125. package/dist/index.d.ts.map +1 -1
  126. package/dist/linear-cursor-small.png +0 -0
  127. package/dist/message-alert-matte-glass-gradient.webp +0 -0
  128. package/dist/primitives/button.d.ts +10 -0
  129. package/dist/primitives/button.d.ts.map +1 -0
  130. package/dist/primitives/button.js +42 -0
  131. package/dist/primitives/input.d.ts +3 -0
  132. package/dist/primitives/input.d.ts.map +1 -0
  133. package/dist/primitives/input.js +18 -0
  134. package/dist/primitives/select.d.ts +16 -0
  135. package/dist/primitives/select.d.ts.map +1 -0
  136. package/dist/primitives/select.js +196 -0
  137. package/dist/primitives/slot.d.ts.map +1 -1
  138. package/dist/primitives/slot.js +21 -20
  139. package/dist/primitives/textarea.d.ts +3 -0
  140. package/dist/primitives/textarea.d.ts.map +1 -0
  141. package/dist/primitives/textarea.js +16 -0
  142. package/dist/{proxy-DD79Ok6n.js → proxy-C9AqCss6.js} +1 -1
  143. package/dist/speech-bubble-fluid-glass-gradient.webp +0 -0
  144. package/dist/styles/main.css +1 -1
  145. package/dist/utils/formFieldUtils.js +1 -1
  146. package/dist/utils/twUtils.js +2728 -2
  147. package/package.json +13 -8
  148. package/dist/Accordion/AccordionBase.d.ts +0 -42
  149. package/dist/Accordion/AccordionBase.js +0 -225
  150. package/dist/Badge/BadgeBase.d.ts +0 -13
  151. package/dist/Badge/BadgeBase.js +0 -35
  152. package/dist/PasswordInput-ClY_hxuN.js +0 -261
  153. package/dist/components/Accordion/AccordionBase.d.ts +0 -42
  154. package/dist/components/Accordion/AccordionBase.d.ts.map +0 -1
  155. package/dist/components/Badge/BadgeBase.d.ts +0 -13
  156. package/dist/components/Badge/BadgeBase.d.ts.map +0 -1
  157. package/dist/index-CA7haECj.js +0 -248
  158. package/dist/index-CbXx14YO.js +0 -59
  159. package/dist/index-VXXKXen4.js +0 -15
  160. package/dist/index-cCg4yNa8.js +0 -132
  161. package/dist/primitives/label.d.ts +0 -5
  162. package/dist/primitives/label.d.ts.map +0 -1
  163. package/dist/primitives/label.js +0 -27
  164. package/dist/twUtils-CRiPKpXj.js +0 -2743
@@ -1,15 +1,18 @@
1
1
  "use client";
2
2
  import "./styles/main.css";
3
3
  import { jsx as n, jsxs as N } from "react/jsx-runtime";
4
- import { Label as O } from "./Label.js";
4
+ import { Label as _ } from "./Label.js";
5
5
  import * as c from "react";
6
- import { createContext as Re, forwardRef as A, useMemo as ge, memo as Ie, useContext as he } from "react";
7
- import { c as K, b as we, P as F, e as w, a as G, d as Y, h as ye } from "./index-CA7haECj.js";
8
- import { c as Ce, u as j, a as Ee } from "./index-CbXx14YO.js";
9
- import { u as Se } from "./index-Cb7rjMhE.js";
10
- import { P as Fe } from "./index-CBwRmAsQ.js";
11
- import { c as S } from "./twUtils-CRiPKpXj.js";
12
- var L = "rovingFocusGroup.onEntryFocus", xe = { bubbles: !1, cancelable: !0 }, x = "RovingFocusGroup", [M, z, Ne] = Ce(x), [_e, H] = K(
6
+ import { createContext as Re, forwardRef as G, useMemo as ge, memo as he, useContext as Ie } from "react";
7
+ import { c as K, P as S, b as w, a as P, u as Y } from "./index-BhufZRa2.js";
8
+ import { c as we, u as j } from "./index-UEFPWH8U.js";
9
+ import { u as ye } from "./index-CVSxKOPp.js";
10
+ import { u as Ce } from "./index-0ioNhtNM.js";
11
+ import { u as Ee } from "./index-y6Br5T4h.js";
12
+ import { u as Fe } from "./index-BZPx6jYI.js";
13
+ import { P as Se } from "./index-6Abv_Flm.js";
14
+ import { cn as F } from "./utils/twUtils.js";
15
+ var O = "rovingFocusGroup.onEntryFocus", xe = { bubbles: !1, cancelable: !0 }, x = "RovingFocusGroup", [M, z, Ne] = we(x), [_e, H] = K(
13
16
  x,
14
17
  [Ne]
15
18
  ), [Ae, Ge] = _e(x), $ = c.forwardRef(
@@ -25,42 +28,42 @@ var Pe = c.forwardRef((e, t) => {
25
28
  currentTabStopId: i,
26
29
  defaultCurrentTabStopId: v,
27
30
  onCurrentTabStopIdChange: b,
28
- onEntryFocus: d,
29
- preventScrollOnEntryFocus: u = !1,
31
+ onEntryFocus: f,
32
+ preventScrollOnEntryFocus: d = !1,
30
33
  ...R
31
- } = e, m = c.useRef(null), l = G(t, m), f = j(s), [g, p] = Y({
34
+ } = e, g = c.useRef(null), l = P(t, g), p = j(s), [m, u] = Y({
32
35
  prop: i,
33
36
  defaultProp: v ?? null,
34
37
  onChange: b,
35
38
  caller: x
36
- }), [y, T] = c.useState(!1), h = ye(d), C = z(o), k = c.useRef(!1), [fe, V] = c.useState(0);
39
+ }), [y, k] = c.useState(!1), I = Ce(f), C = z(o), D = c.useRef(!1), [fe, V] = c.useState(0);
37
40
  return c.useEffect(() => {
38
- const I = m.current;
39
- if (I)
40
- return I.addEventListener(L, h), () => I.removeEventListener(L, h);
41
- }, [h]), /* @__PURE__ */ n(
41
+ const h = g.current;
42
+ if (h)
43
+ return h.addEventListener(O, I), () => h.removeEventListener(O, I);
44
+ }, [I]), /* @__PURE__ */ n(
42
45
  Ae,
43
46
  {
44
47
  scope: o,
45
48
  orientation: r,
46
- dir: f,
49
+ dir: p,
47
50
  loop: a,
48
- currentTabStopId: g,
51
+ currentTabStopId: m,
49
52
  onItemFocus: c.useCallback(
50
- (I) => p(I),
51
- [p]
53
+ (h) => u(h),
54
+ [u]
52
55
  ),
53
- onItemShiftTab: c.useCallback(() => T(!0), []),
56
+ onItemShiftTab: c.useCallback(() => k(!0), []),
54
57
  onFocusableItemAdd: c.useCallback(
55
- () => V((I) => I + 1),
58
+ () => V((h) => h + 1),
56
59
  []
57
60
  ),
58
61
  onFocusableItemRemove: c.useCallback(
59
- () => V((I) => I - 1),
62
+ () => V((h) => h - 1),
60
63
  []
61
64
  ),
62
65
  children: /* @__PURE__ */ n(
63
- F.div,
66
+ S.div,
64
67
  {
65
68
  tabIndex: y || fe === 0 ? -1 : 0,
66
69
  "data-orientation": r,
@@ -68,22 +71,22 @@ var Pe = c.forwardRef((e, t) => {
68
71
  ref: l,
69
72
  style: { outline: "none", ...e.style },
70
73
  onMouseDown: w(e.onMouseDown, () => {
71
- k.current = !0;
74
+ D.current = !0;
72
75
  }),
73
- onFocus: w(e.onFocus, (I) => {
74
- const pe = !k.current;
75
- if (I.target === I.currentTarget && pe && !y) {
76
- const q = new CustomEvent(L, xe);
77
- if (I.currentTarget.dispatchEvent(q), !q.defaultPrevented) {
78
- const D = C().filter((E) => E.focusable), me = D.find((E) => E.active), ve = D.find((E) => E.id === g), be = [me, ve, ...D].filter(
76
+ onFocus: w(e.onFocus, (h) => {
77
+ const pe = !D.current;
78
+ if (h.target === h.currentTarget && pe && !y) {
79
+ const q = new CustomEvent(O, xe);
80
+ if (h.currentTarget.dispatchEvent(q), !q.defaultPrevented) {
81
+ const L = C().filter((E) => E.focusable), me = L.find((E) => E.active), ve = L.find((E) => E.id === m), be = [me, ve, ...L].filter(
79
82
  Boolean
80
83
  ).map((E) => E.ref.current);
81
- J(be, u);
84
+ J(be, d);
82
85
  }
83
86
  }
84
- k.current = !1;
87
+ D.current = !1;
85
88
  }),
86
- onBlur: w(e.onBlur, () => T(!1))
89
+ onBlur: w(e.onBlur, () => k(!1))
87
90
  }
88
91
  )
89
92
  }
@@ -97,49 +100,49 @@ var Pe = c.forwardRef((e, t) => {
97
100
  tabStopId: s,
98
101
  children: i,
99
102
  ...v
100
- } = e, b = we(), d = s || b, u = Ge(W, o), R = u.currentTabStopId === d, m = z(o), { onFocusableItemAdd: l, onFocusableItemRemove: f, currentTabStopId: g } = u;
103
+ } = e, b = ye(), f = s || b, d = Ge(W, o), R = d.currentTabStopId === f, g = z(o), { onFocusableItemAdd: l, onFocusableItemRemove: p, currentTabStopId: m } = d;
101
104
  return c.useEffect(() => {
102
105
  if (r)
103
- return l(), () => f();
104
- }, [r, l, f]), /* @__PURE__ */ n(
106
+ return l(), () => p();
107
+ }, [r, l, p]), /* @__PURE__ */ n(
105
108
  M.ItemSlot,
106
109
  {
107
110
  scope: o,
108
- id: d,
111
+ id: f,
109
112
  focusable: r,
110
113
  active: a,
111
114
  children: /* @__PURE__ */ n(
112
- F.span,
115
+ S.span,
113
116
  {
114
117
  tabIndex: R ? 0 : -1,
115
- "data-orientation": u.orientation,
118
+ "data-orientation": d.orientation,
116
119
  ...v,
117
120
  ref: t,
118
- onMouseDown: w(e.onMouseDown, (p) => {
119
- r ? u.onItemFocus(d) : p.preventDefault();
121
+ onMouseDown: w(e.onMouseDown, (u) => {
122
+ r ? d.onItemFocus(f) : u.preventDefault();
120
123
  }),
121
- onFocus: w(e.onFocus, () => u.onItemFocus(d)),
122
- onKeyDown: w(e.onKeyDown, (p) => {
123
- if (p.key === "Tab" && p.shiftKey) {
124
- u.onItemShiftTab();
124
+ onFocus: w(e.onFocus, () => d.onItemFocus(f)),
125
+ onKeyDown: w(e.onKeyDown, (u) => {
126
+ if (u.key === "Tab" && u.shiftKey) {
127
+ d.onItemShiftTab();
125
128
  return;
126
129
  }
127
- if (p.target !== p.currentTarget) return;
128
- const y = De(p, u.orientation, u.dir);
130
+ if (u.target !== u.currentTarget) return;
131
+ const y = De(u, d.orientation, d.dir);
129
132
  if (y !== void 0) {
130
- if (p.metaKey || p.ctrlKey || p.altKey || p.shiftKey) return;
131
- p.preventDefault();
132
- let h = m().filter((C) => C.focusable).map((C) => C.ref.current);
133
- if (y === "last") h.reverse();
133
+ if (u.metaKey || u.ctrlKey || u.altKey || u.shiftKey) return;
134
+ u.preventDefault();
135
+ let I = g().filter((C) => C.focusable).map((C) => C.ref.current);
136
+ if (y === "last") I.reverse();
134
137
  else if (y === "prev" || y === "next") {
135
- y === "prev" && h.reverse();
136
- const C = h.indexOf(p.currentTarget);
137
- h = u.loop ? Le(h, C + 1) : h.slice(C + 1);
138
+ y === "prev" && I.reverse();
139
+ const C = I.indexOf(u.currentTarget);
140
+ I = d.loop ? Le(I, C + 1) : I.slice(C + 1);
138
141
  }
139
- setTimeout(() => J(h));
142
+ setTimeout(() => J(I));
140
143
  }
141
144
  }),
142
- children: typeof i == "function" ? i({ isCurrentTabStop: R, hasTabStop: g != null }) : i
145
+ children: typeof i == "function" ? i({ isCurrentTabStop: R, hasTabStop: m != null }) : i
143
146
  }
144
147
  )
145
148
  }
@@ -183,12 +186,12 @@ var Oe = $, Me = X, U = "Radio", [Be, Q] = K(U), [Ke, Ue] = Be(U), Z = c.forward
183
186
  disabled: i,
184
187
  value: v = "on",
185
188
  onCheck: b,
186
- form: d,
187
- ...u
188
- } = e, [R, m] = c.useState(null), l = G(t, (p) => m(p)), f = c.useRef(!1), g = R ? d || !!R.closest("form") : !0;
189
+ form: f,
190
+ ...d
191
+ } = e, [R, g] = c.useState(null), l = P(t, (u) => g(u)), p = c.useRef(!1), m = R ? f || !!R.closest("form") : !0;
189
192
  return /* @__PURE__ */ N(Ke, { scope: o, checked: a, disabled: i, children: [
190
193
  /* @__PURE__ */ n(
191
- F.button,
194
+ S.button,
192
195
  {
193
196
  type: "button",
194
197
  role: "radio",
@@ -197,24 +200,24 @@ var Oe = $, Me = X, U = "Radio", [Be, Q] = K(U), [Ke, Ue] = Be(U), Z = c.forward
197
200
  "data-disabled": i ? "" : void 0,
198
201
  disabled: i,
199
202
  value: v,
200
- ...u,
203
+ ...d,
201
204
  ref: l,
202
- onClick: w(e.onClick, (p) => {
203
- a || b?.(), g && (f.current = p.isPropagationStopped(), f.current || p.stopPropagation());
205
+ onClick: w(e.onClick, (u) => {
206
+ a || b?.(), m && (p.current = u.isPropagationStopped(), p.current || u.stopPropagation());
204
207
  })
205
208
  }
206
209
  ),
207
- g && /* @__PURE__ */ n(
210
+ m && /* @__PURE__ */ n(
208
211
  te,
209
212
  {
210
213
  control: R,
211
- bubbles: !f.current,
214
+ bubbles: !p.current,
212
215
  name: r,
213
216
  value: v,
214
217
  checked: a,
215
218
  required: s,
216
219
  disabled: i,
217
- form: d,
220
+ form: f,
218
221
  style: { transform: "translateX(-100%)" }
219
222
  }
220
223
  )
@@ -225,8 +228,8 @@ Z.displayName = U;
225
228
  var ee = "RadioIndicator", oe = c.forwardRef(
226
229
  (e, t) => {
227
230
  const { __scopeRadio: o, forceMount: r, ...a } = e, s = Ue(ee, o);
228
- return /* @__PURE__ */ n(Fe, { present: r || s.checked, children: /* @__PURE__ */ n(
229
- F.span,
231
+ return /* @__PURE__ */ n(Se, { present: r || s.checked, children: /* @__PURE__ */ n(
232
+ S.span,
230
233
  {
231
234
  "data-state": re(s.checked),
232
235
  "data-disabled": s.disabled ? "" : void 0,
@@ -245,20 +248,20 @@ var Ve = "RadioBubbleInput", te = c.forwardRef(
245
248
  bubbles: r = !0,
246
249
  ...a
247
250
  }, s) => {
248
- const i = c.useRef(null), v = G(i, s), b = Ee(o), d = Se(t);
251
+ const i = c.useRef(null), v = P(i, s), b = Fe(o), f = Ee(t);
249
252
  return c.useEffect(() => {
250
- const u = i.current;
251
- if (!u) return;
253
+ const d = i.current;
254
+ if (!d) return;
252
255
  const R = window.HTMLInputElement.prototype, l = Object.getOwnPropertyDescriptor(
253
256
  R,
254
257
  "checked"
255
258
  ).set;
256
259
  if (b !== o && l) {
257
- const f = new Event("click", { bubbles: r });
258
- l.call(u, o), u.dispatchEvent(f);
260
+ const p = new Event("click", { bubbles: r });
261
+ l.call(d, o), d.dispatchEvent(p);
259
262
  }
260
263
  }, [b, o, r]), /* @__PURE__ */ n(
261
- F.input,
264
+ S.input,
262
265
  {
263
266
  type: "radio",
264
267
  "aria-hidden": !0,
@@ -268,7 +271,7 @@ var Ve = "RadioBubbleInput", te = c.forwardRef(
268
271
  ref: v,
269
272
  style: {
270
273
  ...a.style,
271
- ...d,
274
+ ...f,
272
275
  position: "absolute",
273
276
  pointerEvents: "none",
274
277
  opacity: 0,
@@ -282,10 +285,10 @@ te.displayName = Ve;
282
285
  function re(e) {
283
286
  return e ? "checked" : "unchecked";
284
287
  }
285
- var qe = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], P = "RadioGroup", [Ye] = K(P, [
288
+ var qe = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], T = "RadioGroup", [Ye] = K(T, [
286
289
  H,
287
290
  Q
288
- ]), ae = H(), ne = Q(), [je, ze] = Ye(P), se = c.forwardRef(
291
+ ]), ae = H(), ne = Q(), [je, ze] = Ye(T), se = c.forwardRef(
289
292
  (e, t) => {
290
293
  const {
291
294
  __scopeRadioGroup: o,
@@ -295,15 +298,15 @@ var qe = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], P = "RadioGroup",
295
298
  required: i = !1,
296
299
  disabled: v = !1,
297
300
  orientation: b,
298
- dir: d,
299
- loop: u = !0,
301
+ dir: f,
302
+ loop: d = !0,
300
303
  onValueChange: R,
301
- ...m
302
- } = e, l = ae(o), f = j(d), [g, p] = Y({
304
+ ...g
305
+ } = e, l = ae(o), p = j(f), [m, u] = Y({
303
306
  prop: s,
304
307
  defaultProp: a ?? null,
305
308
  onChange: R,
306
- caller: P
309
+ caller: T
307
310
  });
308
311
  return /* @__PURE__ */ n(
309
312
  je,
@@ -312,25 +315,25 @@ var qe = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], P = "RadioGroup",
312
315
  name: r,
313
316
  required: i,
314
317
  disabled: v,
315
- value: g,
316
- onValueChange: p,
318
+ value: m,
319
+ onValueChange: u,
317
320
  children: /* @__PURE__ */ n(
318
321
  Oe,
319
322
  {
320
323
  asChild: !0,
321
324
  ...l,
322
325
  orientation: b,
323
- dir: f,
324
- loop: u,
326
+ dir: p,
327
+ loop: d,
325
328
  children: /* @__PURE__ */ n(
326
- F.div,
329
+ S.div,
327
330
  {
328
331
  role: "radiogroup",
329
332
  "aria-required": i,
330
333
  "aria-orientation": b,
331
334
  "data-disabled": v ? "" : void 0,
332
- dir: f,
333
- ...m,
335
+ dir: p,
336
+ ...g,
334
337
  ref: t
335
338
  }
336
339
  )
@@ -340,16 +343,16 @@ var qe = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], P = "RadioGroup",
340
343
  );
341
344
  }
342
345
  );
343
- se.displayName = P;
346
+ se.displayName = T;
344
347
  var ie = "RadioGroupItem", ce = c.forwardRef(
345
348
  (e, t) => {
346
- const { __scopeRadioGroup: o, disabled: r, ...a } = e, s = ze(ie, o), i = s.disabled || r, v = ae(o), b = ne(o), d = c.useRef(null), u = G(t, d), R = s.value === a.value, m = c.useRef(!1);
349
+ const { __scopeRadioGroup: o, disabled: r, ...a } = e, s = ze(ie, o), i = s.disabled || r, v = ae(o), b = ne(o), f = c.useRef(null), d = P(t, f), R = s.value === a.value, g = c.useRef(!1);
347
350
  return c.useEffect(() => {
348
- const l = (g) => {
349
- qe.includes(g.key) && (m.current = !0);
350
- }, f = () => m.current = !1;
351
- return document.addEventListener("keydown", l), document.addEventListener("keyup", f), () => {
352
- document.removeEventListener("keydown", l), document.removeEventListener("keyup", f);
351
+ const l = (m) => {
352
+ qe.includes(m.key) && (g.current = !0);
353
+ }, p = () => g.current = !1;
354
+ return document.addEventListener("keydown", l), document.addEventListener("keyup", p), () => {
355
+ document.removeEventListener("keydown", l), document.removeEventListener("keyup", p);
353
356
  };
354
357
  }, []), /* @__PURE__ */ n(
355
358
  Me,
@@ -367,13 +370,13 @@ var ie = "RadioGroupItem", ce = c.forwardRef(
367
370
  ...b,
368
371
  ...a,
369
372
  name: s.name,
370
- ref: u,
373
+ ref: d,
371
374
  onCheck: () => s.onValueChange(a.value),
372
375
  onKeyDown: w((l) => {
373
376
  l.key === "Enter" && l.preventDefault();
374
377
  }),
375
378
  onFocus: w(a.onFocus, () => {
376
- m.current && d.current?.click();
379
+ g.current && f.current?.click();
377
380
  })
378
381
  }
379
382
  )
@@ -395,7 +398,7 @@ const le = Re({
395
398
  variant: "default",
396
399
  disabledValues: [],
397
400
  groupDisabled: !1
398
- }), _ = "pointer-events-none opacity-60", Xe = A(
401
+ }), A = "pointer-events-none opacity-60", Xe = G(
399
402
  ({
400
403
  className: e,
401
404
  itemClassName: t,
@@ -406,7 +409,7 @@ const le = Re({
406
409
  variant: i = "default",
407
410
  ...v
408
411
  }, b) => {
409
- const d = ge(
412
+ const f = ge(
410
413
  () => ({
411
414
  orientation: r,
412
415
  variant: i,
@@ -417,34 +420,35 @@ const le = Re({
417
420
  }),
418
421
  [r, i, a, t, s]
419
422
  );
420
- return /* @__PURE__ */ n(le.Provider, { value: d, children: /* @__PURE__ */ n(
423
+ return /* @__PURE__ */ n(le.Provider, { value: f, children: /* @__PURE__ */ n(
421
424
  $e,
422
425
  {
423
- className: S(
426
+ className: F(
424
427
  "text-text-primary flex w-full",
425
- r === "vertical" ? "flex-col gap-4" : "flex-row gap-4",
428
+ r === "vertical" ? "flex-col gap-4" : "flex-row gap-5",
429
+ i === "unstyled" && "w-fit gap-2.5",
426
430
  e
427
431
  ),
428
432
  ref: b,
429
433
  onValueChange: o,
430
434
  value: s,
431
- disabled: d.groupDisabled,
435
+ disabled: f.groupDisabled,
432
436
  ...v
433
437
  }
434
438
  ) });
435
439
  }
436
440
  );
437
441
  Xe.displayName = "RadioGroup";
438
- const B = Ie(
439
- A(({ value: e, id: t, isDisabled: o, className: r, ...a }, s) => /* @__PURE__ */ n(
442
+ const B = he(
443
+ G(({ value: e, id: t, isDisabled: o, className: r, ...a }, s) => /* @__PURE__ */ n(
440
444
  de,
441
445
  {
442
446
  ref: s,
443
- className: S(
447
+ className: F(
444
448
  "border-border-subtle bg-radio-bg relative aspect-square h-4.5 w-4.5 cursor-pointer rounded-full border-2 ring-black transition-colors",
445
449
  "hover:border-radio-border--hover focus-visible:ring-1 focus-visible:ring-offset-2",
446
450
  "[&[data-state=checked]]:border-radio-border--selected [&[data-state=checked]]:bg-radio-bg",
447
- o && _,
451
+ o && A,
448
452
  r
449
453
  ),
450
454
  disabled: o,
@@ -456,53 +460,56 @@ const B = Ie(
456
460
  ))
457
461
  );
458
462
  B.displayName = "RadioButton";
459
- const Je = A(
463
+ const Je = G(
460
464
  ({ className: e, children: t, value: o, description: r, disabled: a, ...s }, i) => {
461
- const { disabledValues: v, groupDisabled: b, itemClassName: d, variant: u, selected: R } = he(le), m = o.toString(), l = s.id?.toString() || m, f = b || v.includes(m) || !!a, g = R === m;
462
- return u === "tiles" ? /* @__PURE__ */ n(
463
- O,
465
+ const { disabledValues: v, groupDisabled: b, itemClassName: f, variant: d, selected: R, orientation: g } = Ie(le), l = o.toString(), p = s.id?.toString() || l, m = b || v.includes(l) || !!a, u = R === l;
466
+ return d === "tiles" ? /* @__PURE__ */ n(
467
+ _,
464
468
  {
465
- htmlFor: l,
466
- className: S(
469
+ htmlFor: p,
470
+ className: F(
467
471
  "border-border-subtle flex w-full cursor-pointer items-start rounded-xl border p-4",
468
- g && "border-tile-border--selected bg-tile-bg--selected",
469
- f && _,
470
- d,
472
+ u && "border-tile-border--selected bg-tile-bg--selected",
473
+ m && A,
474
+ f,
471
475
  e
472
476
  ),
473
477
  children: /* @__PURE__ */ N("div", { className: "flex w-full items-start justify-between gap-4", children: [
474
- /* @__PURE__ */ n("div", { className: "relative top-0.75 mr-3 flex-shrink-0", children: /* @__PURE__ */ n(B, { ref: i, value: m, id: l, isDisabled: f, ...s }) }),
478
+ /* @__PURE__ */ n("div", { className: "relative top-0.75 mr-3 flex-shrink-0", children: /* @__PURE__ */ n(B, { ref: i, value: l, id: p, isDisabled: m, ...s }) }),
475
479
  /* @__PURE__ */ N("div", { className: "flex flex-grow flex-col", children: [
476
480
  /* @__PURE__ */ n("div", { className: "font-bold", children: t }),
477
481
  r && /* @__PURE__ */ n("div", { className: "mt-1 text-sm", children: r })
478
482
  ] })
479
483
  ] })
480
484
  }
481
- ) : u === "unstyled" ? /* @__PURE__ */ n(
482
- de,
485
+ ) : d === "unstyled" ? /* @__PURE__ */ n(de, { ref: i, value: l, id: p, disabled: m, asChild: !0, ...s, children: /* @__PURE__ */ n(
486
+ _,
483
487
  {
484
- ref: i,
485
- value: m,
486
- id: l,
487
- disabled: f,
488
- className: S(
488
+ htmlFor: p,
489
+ className: F(
489
490
  "[&[data-state=checked]]:border-radio-border--selected flex h-fit w-fit rounded border-2 border-transparent",
490
- f && _,
491
- d,
491
+ m && A,
492
+ f,
492
493
  e
493
494
  ),
494
- ...s,
495
495
  children: t
496
496
  }
497
- ) : /* @__PURE__ */ N("div", { className: S("flex items-center", f && _, d, e), children: [
498
- /* @__PURE__ */ n(B, { ref: i, value: m, id: l, isDisabled: f, ...s }),
499
- t && /* @__PURE__ */ n(O, { className: "text-md ml-2 cursor-pointer font-normal", htmlFor: l, children: t })
497
+ ) }) : /* @__PURE__ */ N("div", { className: F("flex items-center", m && A, f, e, g), children: [
498
+ /* @__PURE__ */ n(B, { ref: i, value: l, id: p, isDisabled: m, ...s }),
499
+ t && /* @__PURE__ */ n(
500
+ _,
501
+ {
502
+ className: F("text-md cursor-pointer font-normal", g === "vertical" ? "ml-2" : "ml-1"),
503
+ htmlFor: p,
504
+ children: t
505
+ }
506
+ )
500
507
  ] });
501
508
  }
502
509
  );
503
510
  Je.displayName = "RadioGroup.Item";
504
- const Qe = A(
505
- ({ className: e, ...t }, o) => /* @__PURE__ */ n(O, { ref: o, className: S("text-md block font-medium", e), ...t })
511
+ const Qe = G(
512
+ ({ className: e, ...t }, o) => /* @__PURE__ */ n(_, { ref: o, className: F("text-md block font-medium", e), ...t })
506
513
  );
507
514
  Qe.displayName = "RadioGroup.Label";
508
515
  export {