@spear-ai/spectral 1.8.8 → 1.9.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 (54) hide show
  1. package/dist/.js +214 -210
  2. package/dist/Accordion.js +4 -4
  3. package/dist/Combobox/ComboboxBase.d.ts +8 -0
  4. package/dist/Combobox/ComboboxBase.js +80 -0
  5. package/dist/Combobox.d.ts +20 -0
  6. package/dist/Combobox.js +175 -0
  7. package/dist/ComboboxBase-CxNxYtdT.js +408 -0
  8. package/dist/ControlGroup/ControlGroupSelect.d.ts +33 -0
  9. package/dist/ControlGroup/ControlGroupSelect.js +104 -0
  10. package/dist/ControlGroup.d.ts +24 -0
  11. package/dist/ControlGroup.js +51 -0
  12. package/dist/Dialog.js +2 -2
  13. package/dist/Drawer.js +1 -1
  14. package/dist/HoverCard.js +4 -4
  15. package/dist/MultiSelect/MultiSelectBase.js +128 -126
  16. package/dist/Popover.js +1 -1
  17. package/dist/RadioGroup.d.ts +1 -1
  18. package/dist/RadioGroup.js +194 -204
  19. package/dist/Select.js +1 -1
  20. package/dist/Slider.js +3 -3
  21. package/dist/Tooltip.js +6 -6
  22. package/dist/Tray.d.ts +3 -1
  23. package/dist/Tray.js +36 -32
  24. package/dist/{Combination-CQ5bXZqE.js → index-6oYKCvIn.js} +179 -178
  25. package/dist/{index-CtqlhLRO.js → index-BFOf48AQ.js} +1 -1
  26. package/dist/{index-BJ6qs9i5.js → index-BlHU_t18.js} +7 -7
  27. package/dist/{index-D2Qxe4uK.js → index-Bm1RbF6w.js} +1 -1
  28. package/dist/{index-CXltlPV-.js → index-Bv2OIg5P.js} +6 -6
  29. package/dist/{index-Cgdmxb3F.js → index-CKEI0pDv.js} +1 -1
  30. package/dist/{index-CDkQCeZY.js → index-CM_hWgfC.js} +1 -1
  31. package/dist/{index-CJKg3MVV.js → index-C_YVr64u.js} +2 -2
  32. package/dist/{index-obMGvcdD.js → index-CwSyIPrv.js} +1 -1
  33. package/dist/{index-9OmOYyjJ.js → index-Dc0No4pV.js} +2 -1
  34. package/dist/{index-DqvTB1Bv.js → index-T6XEa11q.js} +7 -7
  35. package/dist/{index-CmWCa9Ae.js → index-pBCLb6Gr.js} +5 -5
  36. package/dist/{index-WBfSMXvE.js → index-psiVrsnE.js} +1 -1
  37. package/dist/index.d.ts +3 -1
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/primitives/button.d.ts +1 -1
  40. package/dist/primitives/button.d.ts.map +1 -1
  41. package/dist/primitives/button.js +4 -4
  42. package/dist/{InputGroup.d.ts → primitives/input-group.d.ts} +10 -7
  43. package/dist/primitives/input-group.d.ts.map +1 -0
  44. package/dist/primitives/input-group.js +74 -0
  45. package/dist/primitives/input.d.ts +6 -1
  46. package/dist/primitives/input.d.ts.map +1 -1
  47. package/dist/primitives/input.js +1 -1
  48. package/dist/primitives/popover.d.ts +10 -0
  49. package/dist/primitives/popover.d.ts.map +1 -0
  50. package/dist/primitives/popover.js +26 -0
  51. package/dist/primitives/select.js +2 -2
  52. package/dist/styles/spectral.css +2 -2
  53. package/package.json +1 -1
  54. package/dist/InputGroup.js +0 -84
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import "../styles/main.css";
3
- import { jsxs as d, jsx as s, Fragment as ce } from "react/jsx-runtime";
3
+ import { jsxs as c, jsx as s, Fragment as ce } from "react/jsx-runtime";
4
4
  import "../Icons/AnalyzeIcon.js";
5
5
  import "../Icons/AnnotationsIcon.js";
6
6
  import "../Icons/ApprovedIcon.js";
@@ -15,7 +15,7 @@ import { ChevronDownIcon as ue } from "../Icons/ChevronDownIcon.js";
15
15
  import "../Icons/ChevronUpIcon.js";
16
16
  import "../Icons/ClockIcon.js";
17
17
  import "../Icons/CloseCircleIcon.js";
18
- import { CloseIcon as Q } from "../Icons/CloseIcon.js";
18
+ import { CloseIcon as W } from "../Icons/CloseIcon.js";
19
19
  import "../Icons/DashboardIcon.js";
20
20
  import "../Icons/DatabaseIcon.js";
21
21
  import "../Icons/DeleteIcon.js";
@@ -69,7 +69,7 @@ import "../Icons/WarningIcon.js";
69
69
  import "../Icons/ZoomAllIcon.js";
70
70
  import "../Icons/ZoomXIcon.js";
71
71
  import "../Icons/ZoomYIcon.js";
72
- import { R as be, T as ge, P as he, C as xe } from "../index-CXltlPV-.js";
72
+ import { R as be, T as ge, P as he, C as xe } from "../index-Bv2OIg5P.js";
73
73
  import { ErrorMessage as ye } from "../utils/formFieldUtils.js";
74
74
  import { cn as y } from "../utils/twUtils.js";
75
75
  import { useId as ve, useState as V, useRef as we, useMemo as v, useCallback as w, useEffect as Ne } from "react";
@@ -87,7 +87,7 @@ const Ie = "h-4 w-4", Ce = (b) => ({
87
87
  g && "border-input-border--focus",
88
88
  Ce(b),
89
89
  m
90
- ), Oe = () => y(
90
+ ), De = () => y(
91
91
  "z-50 max-h-80 overflow-hidden rounded-lg border border-input-border bg-input-bg shadow-lg",
92
92
  "motion-safe:data-[state=open]:animate-in motion-safe:data-[state=closed]:animate-out",
93
93
  "motion-safe:data-[state=closed]:fade-out-0 motion-safe:data-[state=open]:fade-in-0",
@@ -95,33 +95,33 @@ const Ie = "h-4 w-4", Ce = (b) => ({
95
95
  "motion-safe:data-[side=bottom]:slide-in-from-top-2",
96
96
  "motion-safe:data-[side=top]:slide-in-from-bottom-2",
97
97
  "origin-(--radix-popover-content-transform-origin)"
98
- ), De = (b, g, m, I, N, D, S, F, j) => {
99
- const [t, c] = V(-1), r = v(() => {
98
+ ), Oe = (b, g, m, C, N, S, F, j, E) => {
99
+ const [t, d] = V(-1), r = v(() => {
100
100
  const o = [];
101
- return S && o.push({ type: "search" }), F && o.push({ type: "select-all" }), b.forEach((p, f) => {
101
+ return F && o.push({ type: "search" }), j && o.push({ type: "select-all" }), b.forEach((p, f) => {
102
102
  p.disabled || o.push({ type: "option", index: f, value: p.value });
103
103
  }), o;
104
- }, [b, S, F, j]), x = w(
104
+ }, [b, F, j, E]), x = w(
105
105
  (o) => {
106
106
  if (o < 0 || o >= r.length) return;
107
- r[o].type === "search" && D.current?.focus();
107
+ r[o].type === "search" && S.current?.focus();
108
108
  },
109
- [r, D]
110
- ), E = w(
109
+ [r, S]
110
+ ), M = w(
111
111
  (o) => {
112
112
  const p = t >= 0 && t < r.length ? r[t] : null;
113
113
  if (o.key === " " && p?.type === "search" || o.key === "Enter" && p?.type === "search")
114
114
  return;
115
- const a = {
115
+ const n = {
116
116
  ArrowDown: () => {
117
117
  o.preventDefault();
118
118
  const l = Math.min(t + 1, r.length - 1);
119
- c(l), x(l);
119
+ d(l), x(l);
120
120
  },
121
121
  ArrowUp: () => {
122
122
  o.preventDefault();
123
123
  const l = Math.max(t - 1, 0);
124
- c(l), x(l);
124
+ d(l), x(l);
125
125
  },
126
126
  Tab: () => {
127
127
  if (o.shiftKey)
@@ -130,107 +130,107 @@ const Ie = "h-4 w-4", Ce = (b) => ({
130
130
  else {
131
131
  o.preventDefault();
132
132
  const l = t - 1;
133
- c(l), x(l);
133
+ d(l), x(l);
134
134
  }
135
135
  else if (t >= r.length - 1)
136
136
  m();
137
137
  else {
138
138
  o.preventDefault();
139
139
  const l = t + 1;
140
- c(l), x(l);
140
+ d(l), x(l);
141
141
  }
142
142
  },
143
143
  Enter: () => {
144
144
  if (o.preventDefault(), t >= 0 && t < r.length) {
145
145
  const l = r[t];
146
- l.type === "select-all" ? N() : l.type === "clear-all" ? g() : l.type === "option" && I(l.value);
146
+ l.type === "select-all" ? N() : l.type === "clear-all" ? g() : l.type === "option" && C(l.value);
147
147
  }
148
148
  },
149
149
  " ": () => {
150
150
  if (o.preventDefault(), t >= 0 && t < r.length) {
151
151
  const l = r[t];
152
- l.type === "select-all" ? N() : l.type === "clear-all" ? g() : l.type === "option" && I(l.value);
152
+ l.type === "select-all" ? N() : l.type === "clear-all" ? g() : l.type === "option" && C(l.value);
153
153
  }
154
154
  },
155
155
  Escape: () => {
156
156
  o.preventDefault(), m();
157
157
  }
158
158
  }[o.key];
159
- a && a();
159
+ n && n();
160
160
  },
161
- [r, t, I, N, g, m, x]
162
- ), M = w(
161
+ [r, t, C, N, g, m, x]
162
+ ), P = w(
163
163
  (o) => {
164
164
  if (t < 0 || t >= r.length) return !1;
165
165
  const p = r[t];
166
166
  return p.type === "option" && p.index === o;
167
167
  },
168
168
  [t, r]
169
- ), z = v(() => t < 0 || t >= r.length ? !1 : r[t].type === "search", [t, r]), P = v(() => t < 0 || t >= r.length ? !1 : r[t].type === "select-all", [t, r]), C = v(() => t < 0 || t >= r.length ? !1 : r[t].type === "clear-all", [t, r]);
169
+ ), K = v(() => t < 0 || t >= r.length ? !1 : r[t].type === "search", [t, r]), L = v(() => t < 0 || t >= r.length ? !1 : r[t].type === "select-all", [t, r]), k = v(() => t < 0 || t >= r.length ? !1 : r[t].type === "clear-all", [t, r]);
170
170
  return {
171
171
  focusedIndex: t,
172
- setFocusedIndex: c,
173
- handleKeyDown: E,
174
- getOptionFocusIndex: M,
175
- isSearchFocused: z,
176
- isSelectAllFocused: P,
177
- isClearAllFocused: C
172
+ setFocusedIndex: d,
173
+ handleKeyDown: M,
174
+ getOptionFocusIndex: P,
175
+ isSearchFocused: K,
176
+ isSelectAllFocused: L,
177
+ isClearAllFocused: k
178
178
  };
179
179
  }, Se = ({
180
180
  className: b,
181
181
  clearAllLabel: g = "Clear all",
182
182
  closeOnSelect: m = !1,
183
- emptyMessage: I = "No options found",
183
+ emptyMessage: C = "No options found",
184
184
  errorMessage: N,
185
- id: D,
186
- label: S,
187
- loadingMessage: F = "Loading options…",
188
- maxCount: j = 3,
185
+ id: S,
186
+ label: F,
187
+ loadingMessage: j = "Loading options…",
188
+ maxCount: E = 3,
189
189
  name: t,
190
- onChange: c,
190
+ onChange: d,
191
191
  options: r = [],
192
192
  placeholder: x = "Select options",
193
- ref: E,
194
- searchPlaceholder: M = "Search options…",
195
- selectAllLabel: z = "Select all",
196
- showClearAll: P = !0,
197
- showSearch: C = !0,
193
+ ref: M,
194
+ searchPlaceholder: P = "Search options…",
195
+ selectAllLabel: K = "Select all",
196
+ showClearAll: L = !0,
197
+ showSearch: k = !0,
198
198
  showSelectAll: o = !0,
199
199
  sortAlphabetically: p = !1,
200
200
  state: f = "default",
201
- value: a = [],
201
+ value: n = [],
202
202
  "aria-label": l,
203
- "aria-describedby": W,
203
+ "aria-describedby": X,
204
204
  ...H
205
205
  }) => {
206
- const X = ve(), K = D ?? `${t}-${X}`, _ = `${K}-listbox`, G = `${K}-error`, [h, L] = V(!1), [T, Y] = V(""), R = we(null), ee = H.disabled ?? f === "disabled", te = f === "loading", re = f === "error", k = v(() => {
207
- let e = r.filter((n) => n.label.toLowerCase().includes(T.toLowerCase()));
208
- return p && (e = [...e].sort((n, i) => n.label.localeCompare(i.label))), e;
209
- }, [r, T, p]), O = v(() => {
210
- const e = {}, n = [];
211
- return k.forEach((i) => {
212
- i.group ? (e[i.group] || (e[i.group] = []), e[i.group].push(i)) : n.push(i);
213
- }), { groups: e, ungrouped: n, hasGroups: Object.keys(e).length > 0 };
214
- }, [k]), $ = w(
206
+ const Y = ve(), z = S ?? `${t}-${Y}`, _ = `${z}-listbox`, G = `${z}-error`, [h, T] = V(!1), [$, ee] = V(""), B = we(null), U = H.disabled ?? f === "disabled", te = f === "loading", re = f === "error", D = v(() => {
207
+ let e = r.filter((a) => a.label.toLowerCase().includes($.toLowerCase()));
208
+ return p && (e = [...e].sort((a, i) => a.label.localeCompare(i.label))), e;
209
+ }, [r, $, p]), O = v(() => {
210
+ const e = {}, a = [];
211
+ return D.forEach((i) => {
212
+ i.group ? (e[i.group] || (e[i.group] = []), e[i.group].push(i)) : a.push(i);
213
+ }), { groups: e, ungrouped: a, hasGroups: Object.keys(e).length > 0 };
214
+ }, [D]), R = w(
215
215
  (e) => {
216
216
  if (r.find((u) => u.value === e)?.disabled) return;
217
- const i = a.includes(e) ? a.filter((u) => u !== e) : [...a, e];
218
- c(i), m && L(!1);
217
+ const i = n.includes(e) ? n.filter((u) => u !== e) : [...n, e];
218
+ d(i), m && T(!1);
219
219
  },
220
- [r, a, c, m]
221
- ), U = w(() => {
222
- const e = r.filter((i) => !i.disabled).map((i) => i.value), n = e.every((i) => a.includes(i));
223
- c(n ? [] : e);
224
- }, [r, a, c]), Z = w(() => {
225
- c([]);
226
- }, [c]), q = v(() => r.filter((e) => !e.disabled).map((e) => e.value), [r]), ie = q.length > 0 && q.every((e) => a.includes(e)), { getOptionFocusIndex: se, handleKeyDown: oe, isSelectAllFocused: le, setFocusedIndex: A } = De(
227
- k,
228
- Z,
229
- () => L(!1),
230
- $,
231
- U,
220
+ [r, n, d, m]
221
+ ), Z = w(() => {
222
+ const e = r.filter((i) => !i.disabled).map((i) => i.value), a = e.every((i) => n.includes(i));
223
+ d(a ? [] : e);
224
+ }, [r, n, d]), q = w(() => {
225
+ d([]);
226
+ }, [d]), J = v(() => r.filter((e) => !e.disabled).map((e) => e.value), [r]), ie = J.length > 0 && J.every((e) => n.includes(e)), { getOptionFocusIndex: se, handleKeyDown: oe, isSelectAllFocused: le, setFocusedIndex: A } = Oe(
227
+ D,
228
+ q,
229
+ () => T(!1),
232
230
  R,
233
- C,
231
+ Z,
232
+ B,
233
+ k,
234
234
  o,
235
235
  !1
236
236
  // No separate clear-all button in dropdown
@@ -238,41 +238,44 @@ const Ie = "h-4 w-4", Ce = (b) => ({
238
238
  Ne(() => {
239
239
  A(h ? 0 : -1);
240
240
  }, [h, A]);
241
- const ne = w((e) => {
242
- Y(e.target.value);
243
- }, []), ae = () => {
244
- if (a.length === 0)
241
+ const ae = w((e) => {
242
+ ee(e.target.value);
243
+ }, []), ne = () => {
244
+ if (n.length === 0)
245
245
  return /* @__PURE__ */ s("span", { className: "text-input-text-placeholder flex min-h-8 items-center", children: x });
246
- const e = a.slice(0, j), n = a.length - j;
247
- return /* @__PURE__ */ d("div", { className: "flex flex-wrap items-center gap-1 overflow-hidden", children: [
246
+ const e = n.slice(0, E), a = n.length - E;
247
+ return /* @__PURE__ */ c("div", { className: "flex flex-wrap items-center gap-1 overflow-hidden", children: [
248
248
  e.map((i) => {
249
- const u = r.find((B) => B.value === i);
250
- return u ? /* @__PURE__ */ d("span", { className: "bg-input-bg--selected text-input-text inline-flex max-w-48 items-center gap-1 rounded-md px-2 py-1 text-xs", children: [
249
+ const u = r.find((I) => I.value === i);
250
+ return u ? /* @__PURE__ */ c("span", { className: "bg-input-bg--selected text-input-text inline-flex max-w-48 items-center gap-1 rounded-md px-2 py-1 text-xs", children: [
251
251
  /* @__PURE__ */ s("span", { className: "truncate", children: u.label }),
252
252
  /* @__PURE__ */ s(
253
253
  "button",
254
254
  {
255
- "aria-label": "Remove" + u.label,
256
- className: "hover:text-danger focus-visible:ring-accent cursor-pointer rounded-sm focus-visible:ring-2 focus-visible:ring-offset-1",
255
+ "aria-label": `Remove ${u.label}`,
256
+ className: "hover:text-danger cursor-pointer rounded-sm",
257
257
  "data-testid": "spectral-multiselect-remove-item-button",
258
- onClick: (B) => {
259
- B.stopPropagation(), $(i);
258
+ onClick: (I) => {
259
+ I.preventDefault(), I.stopPropagation(), R(i);
260
+ },
261
+ onPointerDown: (I) => {
262
+ I.stopPropagation();
260
263
  },
261
264
  type: "button",
262
- children: /* @__PURE__ */ s(Q, { size: 12 })
265
+ children: /* @__PURE__ */ s(W, { size: 12 })
263
266
  }
264
267
  )
265
268
  ] }, i) : null;
266
269
  }),
267
- n > 0 && /* @__PURE__ */ d("span", { className: "text-input-text-secondary flex items-center py-1 text-xs", children: [
270
+ a > 0 && /* @__PURE__ */ c("span", { className: "text-input-text-secondary flex items-center py-1 text-xs", children: [
268
271
  "+",
269
- n,
272
+ a,
270
273
  " more"
271
274
  ] })
272
275
  ] });
273
- }, J = (e, n) => {
274
- const i = a.includes(e.value), u = se(n);
275
- return /* @__PURE__ */ d(
276
+ }, Q = (e, a) => {
277
+ const i = n.includes(e.value), u = se(a);
278
+ return /* @__PURE__ */ c(
276
279
  "button",
277
280
  {
278
281
  className: y(
@@ -281,7 +284,7 @@ const Ie = "h-4 w-4", Ce = (b) => ({
281
284
  i && "text-input-text font-medium"
282
285
  ),
283
286
  disabled: e.disabled,
284
- onClick: () => $(e.value),
287
+ onClick: () => R(e.value),
285
288
  type: "button",
286
289
  children: [
287
290
  /* @__PURE__ */ s("div", { "data-testid": "spectral-multiselect-selected-indicator", className: y("border-input-border flex h-4 w-4 items-center justify-center rounded border", i && "bg-primary border-primary"), children: i && /* @__PURE__ */ s(pe, { size: 12 }) }),
@@ -295,63 +298,62 @@ const Ie = "h-4 w-4", Ce = (b) => ({
295
298
  "--multiselect-trigger-height": "3rem",
296
299
  "--multiselect-dropdown-max-height": "20rem"
297
300
  });
298
- return /* @__PURE__ */ d("div", { className: "w-full", "data-testid": "spectral-multiselect-root", children: [
299
- /* @__PURE__ */ s(be, { open: h, onOpenChange: L, children: /* @__PURE__ */ d("div", { "data-testid": "spectral-multiselect-wrapper", onKeyDown: h ? oe : void 0, role: "none", children: [
300
- /* @__PURE__ */ s(ge, { asChild: !0, children: /* @__PURE__ */ d(
301
+ return /* @__PURE__ */ c("div", { className: "w-full", "data-testid": "spectral-multiselect-root", children: [
302
+ /* @__PURE__ */ s(be, { open: h, onOpenChange: T, children: /* @__PURE__ */ c("div", { className: "relative", "data-testid": "spectral-multiselect-wrapper", onKeyDown: h ? oe : void 0, role: "none", children: [
303
+ /* @__PURE__ */ s(ge, { asChild: !0, children: /* @__PURE__ */ c(
301
304
  "button",
302
305
  {
303
306
  "aria-controls": h ? _ : void 0,
304
- "aria-describedby": [re ? G : null, W].filter(Boolean).join(" ") || void 0,
307
+ "aria-describedby": [re ? G : null, X].filter(Boolean).join(" ") || void 0,
305
308
  "aria-expanded": h,
306
- "aria-label": l ?? S,
309
+ "aria-label": l ?? F,
307
310
  className: ke(f, h, b),
308
311
  "data-state": f,
309
312
  "data-testid": "spectral-multiselect-trigger",
310
- disabled: ee,
311
- id: K,
313
+ disabled: U,
314
+ id: z,
312
315
  name: t,
313
- ref: E,
316
+ ref: M,
314
317
  role: "combobox",
315
318
  style: de(),
316
319
  type: "button",
317
320
  ...H,
318
321
  children: [
319
- /* @__PURE__ */ s("div", { className: "min-w-0 flex-1 overflow-hidden", "data-testid": "spectral-multiselect-selected-items", children: ae() }),
320
- /* @__PURE__ */ d("div", { className: "ml-2 flex shrink-0 items-center gap-2", children: [
321
- P && a.length > 0 && /* @__PURE__ */ s(
322
- "button",
323
- {
324
- "aria-label": "Clear all selections",
325
- className: "text-input-icon hover:text-input-icon--hover focus-visible:ring-accent cursor-pointer rounded-sm focus-visible:ring-2 focus-visible:ring-offset-1",
326
- "data-testid": "spectral-multiselect-clear-all-button",
327
- onClick: (e) => {
328
- e.stopPropagation(), Z();
329
- },
330
- type: "button",
331
- children: /* @__PURE__ */ s(Q, { size: 12 })
332
- }
333
- ),
334
- /* @__PURE__ */ s(ue, { className: y("text-input-icon transition-transform duration-200", h && "rotate-180"), size: 20 })
335
- ] })
322
+ /* @__PURE__ */ s("div", { className: "min-w-0 flex-1 overflow-hidden", "data-testid": "spectral-multiselect-selected-items", children: ne() }),
323
+ /* @__PURE__ */ s("div", { className: "ml-2 flex shrink-0 items-center gap-2", children: /* @__PURE__ */ s(ue, { className: y("text-input-icon transition-transform duration-200", h && "rotate-180"), size: 20 }) })
336
324
  ]
337
325
  }
338
326
  ) }),
327
+ L && n.length > 0 && /* @__PURE__ */ s(
328
+ "button",
329
+ {
330
+ "aria-label": "Clear all selections",
331
+ className: "text-input-icon hover:text-input-icon--hover focus-visible:ring-accent absolute top-1/2 right-10 z-10 -translate-y-1/2 cursor-pointer rounded-sm focus-visible:ring-2 focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-50",
332
+ "data-testid": "spectral-multiselect-clear-all-button",
333
+ disabled: U,
334
+ onClick: (e) => {
335
+ e.stopPropagation(), q(), document.getElementById(z)?.focus();
336
+ },
337
+ type: "button",
338
+ children: /* @__PURE__ */ s(W, { size: 12 })
339
+ }
340
+ ),
339
341
  /* @__PURE__ */ s(he, { children: /* @__PURE__ */ s(
340
342
  xe,
341
343
  {
342
344
  align: "start",
343
345
  avoidCollisions: !0,
344
- className: Oe(),
346
+ className: De(),
345
347
  collisionPadding: 10,
346
348
  "data-testid": "spectral-multiselect-dropdown",
347
349
  onOpenAutoFocus: (e) => {
348
- e.preventDefault(), C && R.current?.focus();
350
+ e.preventDefault(), k && B.current?.focus();
349
351
  },
350
352
  side: "bottom",
351
353
  sideOffset: 4,
352
354
  style: { width: "var(--radix-popover-trigger-width)" },
353
- children: /* @__PURE__ */ d("div", { className: "p-1", children: [
354
- C && /* @__PURE__ */ d("div", { className: "relative mb-2", children: [
355
+ children: /* @__PURE__ */ c("div", { className: "p-1", children: [
356
+ k && /* @__PURE__ */ c("div", { className: "relative mb-2", children: [
355
357
  /* @__PURE__ */ s(fe, { className: y(Ie, "text-input-icon absolute top-1/2 left-3 -translate-y-1/2") }),
356
358
  /* @__PURE__ */ s(
357
359
  "input",
@@ -359,36 +361,36 @@ const Ie = "h-4 w-4", Ce = (b) => ({
359
361
  "aria-label": "Search options",
360
362
  className: "border-input-border bg-input-bg focus-visible:border-input-border--focus w-full rounded-md border py-2 pr-3 pl-9 text-sm focus-visible:ring-1 focus-visible:ring-black focus-visible:outline-none",
361
363
  "data-testid": "spectral-multiselect-search-input",
362
- onChange: ne,
363
- placeholder: M,
364
- ref: R,
364
+ onChange: ae,
365
+ placeholder: P,
366
+ ref: B,
365
367
  type: "text",
366
- value: T
368
+ value: $
367
369
  }
368
370
  )
369
371
  ] }),
370
- /* @__PURE__ */ s("div", { className: "max-h-64 overflow-y-auto", id: _, role: "listbox", "aria-multiselectable": "true", children: te ? /* @__PURE__ */ d("div", { "data-testid": "spectral-multiselect-loading", className: "text-input-text-secondary flex items-center justify-center gap-2 py-6 text-sm", children: [
372
+ /* @__PURE__ */ s("div", { className: "max-h-64 overflow-y-auto", id: _, role: "listbox", "aria-multiselectable": "true", children: te ? /* @__PURE__ */ c("div", { "data-testid": "spectral-multiselect-loading", className: "text-input-text-secondary flex items-center justify-center gap-2 py-6 text-sm", children: [
371
373
  /* @__PURE__ */ s(me, {}),
372
- F
373
- ] }) : k.length === 0 ? /* @__PURE__ */ s("div", { "data-testid": "spectral-multiselect-empty-message", className: "text-input-text-secondary py-6 text-center text-sm", children: I }) : /* @__PURE__ */ d(ce, { children: [
374
- o && /* @__PURE__ */ d("div", { className: "mb-1", children: [
374
+ j
375
+ ] }) : D.length === 0 ? /* @__PURE__ */ s("div", { "data-testid": "spectral-multiselect-empty-message", className: "text-input-text-secondary py-6 text-center text-sm", children: C }) : /* @__PURE__ */ c(ce, { children: [
376
+ o && /* @__PURE__ */ c("div", { className: "mb-1", children: [
375
377
  /* @__PURE__ */ s(
376
378
  "button",
377
379
  {
378
380
  className: y("text-input-text-secondary hover:bg-input-bg--hover flex w-full items-center gap-3 px-3 py-2 text-sm font-medium focus:outline-none", le && "bg-input-bg--hover"),
379
381
  "data-testid": "spectral-multiselect-select-all-button",
380
- onClick: U,
382
+ onClick: Z,
381
383
  type: "button",
382
- children: ie ? g : z
384
+ children: ie ? g : K
383
385
  }
384
386
  ),
385
387
  /* @__PURE__ */ s("div", { className: "bg-input-border mx-3 my-1 h-px" })
386
388
  ] }),
387
- O.ungrouped.length > 0 && /* @__PURE__ */ s("div", { className: "mb-1", children: O.ungrouped.map((e, n) => J(e, n)) }),
388
- Object.entries(O.groups).map(([e, n]) => /* @__PURE__ */ d("div", { className: "mb-1", "data-testid": "spectral-multiselect-group", children: [
389
+ O.ungrouped.length > 0 && /* @__PURE__ */ s("div", { className: "mb-1", children: O.ungrouped.map((e, a) => Q(e, a)) }),
390
+ Object.entries(O.groups).map(([e, a]) => /* @__PURE__ */ c("div", { className: "mb-1", "data-testid": "spectral-multiselect-group", children: [
389
391
  (O.ungrouped.length > 0 || Object.keys(O.groups).indexOf(e) > 0) && /* @__PURE__ */ s("div", { className: "bg-input-border mx-3 my-1 h-px" }),
390
392
  /* @__PURE__ */ s("div", { "data-testid": "spectral-multiselect-group-name", className: "text-input-text-secondary px-3 py-1 text-xs font-semibold tracking-wide uppercase", children: e }),
391
- n.map((i, u) => J(i, k.indexOf(i)))
393
+ a.map((i, u) => Q(i, D.indexOf(i)))
392
394
  ] }, e))
393
395
  ] }) })
394
396
  ] })
package/dist/Popover.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./styles/main.css";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
- import { R as p, P as d, C as m, T as f, A as l } from "./index-CXltlPV-.js";
3
+ import { R as p, P as d, C as m, T as f, A as l } from "./index-Bv2OIg5P.js";
4
4
  import { cn as c } from "./utils/twUtils.js";
5
5
  import "react";
6
6
  const x = ({ ...o }) => /* @__PURE__ */ t(p, { "data-slot": "popover", "data-testid": "spectral-popover", ...o }), b = ({ ...o }) => /* @__PURE__ */ t(f, { "data-slot": "popover-trigger", "data-testid": "spectral-popover-trigger", ...o }), P = ({ align: o = "center", className: a, collisionPadding: r = 8, side: n = "bottom", sideOffset: i = 4, width: e = "w-fit", ...s }) => /* @__PURE__ */ t(d, { children: /* @__PURE__ */ t(
@@ -21,7 +21,7 @@ export interface RadioGroupItemProps extends ComponentProps<typeof RadioGroupPri
21
21
  value: string;
22
22
  }
23
23
  declare const RadioGroup: {
24
- ({ className, disabled, itemClassName, onValueChange, orientation, ref, selected, variant, ...props }: RadioGroupProps & {
24
+ (allProps: RadioGroupProps & {
25
25
  ref?: Ref<ComponentRef<typeof RadioGroupPrimitive.Root>>;
26
26
  }): ReactElement;
27
27
  displayName: string;