@spear-ai/spectral 1.4.12 → 1.4.13

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.
@@ -1,99 +1,100 @@
1
1
  "use client";
2
2
  import "../styles/main.css";
3
3
  import { jsx as r, jsxs as I } from "react/jsx-runtime";
4
- import { CloseIcon as V } from "../Icons/CloseIcon.js";
5
- import { cn as g } from "../utils/twUtils.js";
6
- import { c as $ } from "../index-D29mdTf5.js";
7
- import { createContext as j, useContext as W, useState as O, useMemo as B, useCallback as C, cloneElement as N, useEffect as h, useRef as D, useLayoutEffect as M, isValidElement as R } from "react";
8
- import { createPortal as S } from "react-dom";
9
- const z = j(null);
4
+ import { CloseIcon as $ } from "../Icons/CloseIcon.js";
5
+ import { cn as m } from "../utils/twUtils.js";
6
+ import { c as j } from "../index-D29mdTf5.js";
7
+ import { createContext as S, useContext as W, useState as N, useMemo as B, useCallback as k, cloneElement as z, useEffect as C, useRef as h, useLayoutEffect as M, isValidElement as O } from "react";
8
+ import { createPortal as A } from "react-dom";
9
+ import { R as F } from "../Combination-BtmnusWq.js";
10
+ const P = S(null);
10
11
  function p() {
11
- const t = W(z);
12
+ const t = W(P);
12
13
  if (!t)
13
14
  throw new Error("Dialog components must be used within <Dialog>");
14
15
  return t;
15
16
  }
16
- function P(t) {
17
- return R(t) && typeof t.type != "string" ? !0 : R(t);
17
+ function T(t) {
18
+ return O(t) && typeof t.type != "string" ? !0 : O(t);
18
19
  }
19
20
  let E = 0;
20
- function Q({ isOpen: t, defaultOpen: o = !1, onOpenChange: e, children: n, modal: a = !1 }) {
21
- const [l, u] = O(o), s = t !== void 0, f = s ? t : l, y = B(
21
+ function Z({ isOpen: t, defaultOpen: o = !1, onOpenChange: e, children: n, modal: a = !1 }) {
22
+ const [l, u] = N(o), s = t !== void 0, f = s ? t : l, b = B(
22
23
  () => ({
23
24
  contentId: `dialog-content-${++E}`,
24
25
  descriptionId: `dialog-description-${E}`,
25
26
  titleId: `dialog-title-${E}`
26
27
  }),
27
28
  []
28
- ), b = C(
29
+ ), y = k(
29
30
  (c) => {
30
31
  s || u(c), e?.(c);
31
32
  },
32
33
  [s, e]
33
- ), k = B(
34
+ ), D = B(
34
35
  () => ({
35
36
  modal: a,
36
37
  isOpen: f,
37
- setIsOpen: b,
38
- ...y
38
+ setIsOpen: y,
39
+ ...b
39
40
  }),
40
- [f, b, a, y]
41
+ [f, y, a, b]
41
42
  );
42
- return /* @__PURE__ */ r(z.Provider, { value: k, children: n });
43
+ return /* @__PURE__ */ r(P.Provider, { value: D, children: n });
43
44
  }
44
- function X({ children: t, asChild: o = !0, dataTestId: e }) {
45
- const { setIsOpen: n } = p(), a = C(() => {
45
+ function _({ children: t, asChild: o = !0, dataTestId: e }) {
46
+ const { setIsOpen: n } = p(), a = k(() => {
46
47
  n(!0);
47
48
  }, [n]);
48
49
  if (!o)
49
50
  return /* @__PURE__ */ r("button", { "data-slot": "dialog-trigger", "data-testid": e, onClick: a, tabIndex: 0, children: t });
50
- if (!P(t))
51
+ if (!T(t))
51
52
  throw new Error("DialogTrigger expects a single React element as child");
52
53
  const l = t.props.onClick;
53
- return N(t, {
54
+ return z(t, {
54
55
  onClick: (...u) => {
55
56
  l?.(...u), a();
56
57
  }
57
58
  });
58
59
  }
59
- function A({ children: t, asChild: o = !0, dataTestId: e }) {
60
- const { setIsOpen: n } = p(), a = C(() => {
60
+ function H({ children: t, asChild: o = !0, dataTestId: e }) {
61
+ const { setIsOpen: n } = p(), a = k(() => {
61
62
  n(!1);
62
63
  }, [n]);
63
64
  if (!o)
64
65
  return /* @__PURE__ */ r("button", { className: "cursor-pointer focus-visible:outline-none outline-transparent focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1", "data-slot": "dialog-close", "data-testid": e, onClick: a, tabIndex: 0, children: t });
65
- if (!P(t))
66
+ if (!T(t))
66
67
  throw new Error("DialogClose expects a single React element as child");
67
68
  const l = t.props.onClick;
68
- return N(t, {
69
+ return z(t, {
69
70
  onClick: (...u) => {
70
71
  l?.(...u), a();
71
72
  }
72
73
  });
73
74
  }
74
- function T({ children: t, container: o }) {
75
- const [e, n] = O(!1);
76
- return h(() => (n(!0), () => n(!1)), []), e ? S(t, o ?? document.body) : null;
75
+ function L({ children: t, container: o }) {
76
+ const [e, n] = N(!1);
77
+ return C(() => (n(!0), () => n(!1)), []), e ? A(t, o ?? document.body) : null;
77
78
  }
78
- function Y({ className: t, dataTestId: o }) {
79
- const { isOpen: e, setIsOpen: n } = p(), a = C(
79
+ function tt({ className: t, dataTestId: o }) {
80
+ const { isOpen: e, setIsOpen: n } = p(), a = k(
80
81
  (l) => {
81
82
  l.target === l.currentTarget && n(!1);
82
83
  },
83
84
  [n]
84
85
  );
85
- return e ? /* @__PURE__ */ r(T, { children: /* @__PURE__ */ r(
86
+ return e ? /* @__PURE__ */ r(L, { children: /* @__PURE__ */ r(
86
87
  "div",
87
88
  {
88
89
  "aria-hidden": "true",
89
- className: g("fixed inset-0 z-40 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=open]:fade-in-0", "data-[state=closed]:animate-out data-[state=closed]:fade-out-0", t),
90
+ className: m("fixed inset-0 z-40 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=open]:fade-in-0", "data-[state=closed]:animate-out data-[state=closed]:fade-out-0", t),
90
91
  "data-state": e ? "open" : "closed",
91
92
  "data-testid": o,
92
93
  onClick: a
93
94
  }
94
95
  ) }) : null;
95
96
  }
96
- const F = $(
97
+ const U = j(
97
98
  [
98
99
  "fixed left-1/2 top-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 rounded-lg shadow-lg outline-none data-[state=open]:animate-in data-[state=open]:fade-in-0",
99
100
  "data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 max-h-[80vh] overflow-y-auto"
@@ -113,22 +114,22 @@ const F = $(
113
114
  }
114
115
  }
115
116
  );
116
- function Z({ children: t, className: o, dataTestId: e, onEscapeKeyDown: n, onInteractOutside: a, onPointerDownOutside: l, size: u }) {
117
- const { isOpen: s, setIsOpen: f, contentId: y, titleId: b, descriptionId: k, modal: c } = p(), m = D(null), x = D(null), w = D(!1);
118
- return h(() => {
117
+ function et({ children: t, className: o, dataTestId: e, onEscapeKeyDown: n, onInteractOutside: a, onPointerDownOutside: l, size: u }) {
118
+ const { isOpen: s, setIsOpen: f, contentId: b, titleId: y, descriptionId: D, modal: c } = p(), g = h(null), R = h(null), x = h(null), v = h(!1);
119
+ return C(() => {
119
120
  if (!s) {
120
- w.current && x.current && typeof x.current.focus == "function" && x.current.focus(), x.current = null, w.current = !1;
121
+ v.current && x.current && typeof x.current.focus == "function" && x.current.focus(), x.current = null, v.current = !1;
121
122
  return;
122
123
  }
123
- if (!m.current || w.current) return;
124
- w.current = !0;
125
- const d = m.current;
124
+ if (!g.current || v.current) return;
125
+ v.current = !0;
126
+ const d = g.current;
126
127
  x.current = document.activeElement, setTimeout(() => {
127
- if (!d || !m.current) return;
128
+ if (!d || !g.current) return;
128
129
  const i = document.activeElement;
129
130
  (!d.contains(i) || i === document.body) && d.focus();
130
131
  }, 0);
131
- }, [s, f]), h(() => {
132
+ }, [s, f]), C(() => {
132
133
  if (!s) return;
133
134
  const d = (i) => {
134
135
  i.key === "Escape" && (n?.(i), a?.(i), i.defaultPrevented || (i.preventDefault(), f(!1)));
@@ -136,80 +137,80 @@ function Z({ children: t, className: o, dataTestId: e, onEscapeKeyDown: n, onInt
136
137
  return document.addEventListener("keydown", d, { capture: !0 }), () => {
137
138
  document.removeEventListener("keydown", d, { capture: !0 });
138
139
  };
139
- }, [s, n, a]), h(() => {
140
+ }, [s, n, a]), C(() => {
140
141
  if (!s) return;
141
142
  const d = (i) => {
142
- const v = i.target;
143
- m.current && !m.current.contains(v) && (l?.(i), a?.(i), !c && !i.defaultPrevented && f(!1));
143
+ const w = i.target;
144
+ g.current && !g.current.contains(w) && (l?.(i), a?.(i), !c && !i.defaultPrevented && f(!1));
144
145
  };
145
146
  return document.addEventListener("pointerdown", d), () => document.removeEventListener("pointerdown", d);
146
147
  }, [s, l, a, f, c]), M(() => {
147
148
  if (!s || !c || typeof window > "u") return;
148
- const d = document.body.style.overflow, i = document.body.style.paddingRight, v = window.innerWidth - document.documentElement.clientWidth;
149
- if (document.body.style.overflow = "hidden", v > 0) {
150
- const L = window.getComputedStyle(document.body).paddingRight;
151
- document.body.style.paddingRight = `calc(${L} + ${v}px)`;
149
+ const d = document.body.style.overflow, i = document.body.style.paddingRight, w = window.innerWidth - document.documentElement.clientWidth;
150
+ if (document.body.style.overflow = "hidden", w > 0) {
151
+ const V = window.getComputedStyle(document.body).paddingRight;
152
+ document.body.style.paddingRight = `calc(${V} + ${w}px)`;
152
153
  }
153
154
  return () => {
154
155
  document.body.style.overflow = d, document.body.style.paddingRight = i;
155
156
  };
156
- }, [s, c]), s ? /* @__PURE__ */ r(T, { children: /* @__PURE__ */ I(
157
+ }, [s, c]), s ? /* @__PURE__ */ r(L, { children: /* @__PURE__ */ I(
157
158
  "div",
158
159
  {
159
- "aria-describedby": k,
160
- "aria-labelledby": b,
160
+ "aria-describedby": D,
161
+ "aria-labelledby": y,
161
162
  "aria-modal": c ? "true" : void 0,
162
- className: g(F({ size: u }), o),
163
+ className: m(U({ size: u }), o),
163
164
  "data-slot": "dialog-content",
164
165
  "data-state": s ? "open" : "closed",
165
166
  "data-testid": e,
166
- id: y,
167
- ref: m,
167
+ id: b,
168
+ ref: g,
168
169
  role: "dialog",
169
170
  tabIndex: -1,
170
171
  children: [
171
- /* @__PURE__ */ r(A, { asChild: !0, children: /* @__PURE__ */ I(
172
+ /* @__PURE__ */ r(H, { asChild: !0, children: /* @__PURE__ */ I(
172
173
  "button",
173
174
  {
174
175
  "aria-label": "Close dialog",
175
- className: g("absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100", "focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none cursor-pointer"),
176
+ className: m("absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100", "focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none cursor-pointer"),
176
177
  "data-slot": "dialog-close",
177
178
  "data-testid": "spectral-dialog-close-icon",
178
179
  children: [
179
- /* @__PURE__ */ r(V, { size: 16 }),
180
+ /* @__PURE__ */ r($, { size: 16 }),
180
181
  /* @__PURE__ */ r("span", { className: "sr-only", children: "Close" })
181
182
  ]
182
183
  }
183
184
  ) }),
184
- t
185
+ /* @__PURE__ */ r(F, { shards: [R], children: /* @__PURE__ */ r("div", { ref: R, children: t }) })
185
186
  ]
186
187
  }
187
188
  ) }) : null;
188
189
  }
189
- function _({ children: t, className: o, dataTestId: e }) {
190
+ function nt({ children: t, className: o, dataTestId: e }) {
190
191
  const { titleId: n } = p();
191
- return /* @__PURE__ */ r("h2", { className: g("text-base font-semibold leading-none tracking-tight", o), "data-slot": "dialog-title", "data-testid": e, id: n, children: t });
192
+ return /* @__PURE__ */ r("h2", { className: m("text-base font-semibold leading-none tracking-tight", o), "data-slot": "dialog-title", "data-testid": e, id: n, children: t });
192
193
  }
193
- function tt({ children: t, className: o, dataTestId: e }) {
194
+ function ot({ children: t, className: o, dataTestId: e }) {
194
195
  const { descriptionId: n } = p();
195
- return /* @__PURE__ */ r("p", { className: g("text-sm text-text-secondary", o), "data-slot": "dialog-description", "data-testid": e, id: n, children: t });
196
+ return /* @__PURE__ */ r("p", { className: m("text-sm text-text-secondary", o), "data-slot": "dialog-description", "data-testid": e, id: n, children: t });
196
197
  }
197
- function et({ children: t, className: o, dataTestId: e }) {
198
- return /* @__PURE__ */ r("div", { className: g("flex flex-col space-y-1.5 text-center text-left", o), "data-slot": "dialog-header", "data-testid": e, children: t });
198
+ function at({ children: t, className: o, dataTestId: e }) {
199
+ return /* @__PURE__ */ r("div", { className: m("flex flex-col space-y-1.5 text-center text-left", o), "data-slot": "dialog-header", "data-testid": e, children: t });
199
200
  }
200
- function nt({ children: t, className: o, dataTestId: e }) {
201
- return /* @__PURE__ */ r("div", { className: g("flex flex-col-reverse flex-row justify-end space-x-2", o), "data-slot": "dialog-footer", "data-testid": e, children: t });
201
+ function it({ children: t, className: o, dataTestId: e }) {
202
+ return /* @__PURE__ */ r("div", { className: m("flex flex-col-reverse flex-row justify-end space-x-2", o), "data-slot": "dialog-footer", "data-testid": e, children: t });
202
203
  }
203
204
  export {
204
- Q as DialogBase,
205
- A as DialogCloseBase,
206
- Z as DialogContentBase,
207
- tt as DialogDescriptionBase,
208
- nt as DialogFooterBase,
209
- et as DialogHeaderBase,
210
- Y as DialogOverlayBase,
211
- T as DialogPortalBase,
212
- _ as DialogTitleBase,
213
- X as DialogTriggerBase,
205
+ Z as DialogBase,
206
+ H as DialogCloseBase,
207
+ et as DialogContentBase,
208
+ ot as DialogDescriptionBase,
209
+ it as DialogFooterBase,
210
+ at as DialogHeaderBase,
211
+ tt as DialogOverlayBase,
212
+ L as DialogPortalBase,
213
+ nt as DialogTitleBase,
214
+ _ as DialogTriggerBase,
214
215
  p as useDialogContext
215
216
  };
package/dist/Drawer.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import "./styles/main.css";
2
2
  import { jsx as t, jsxs as s } from "react/jsx-runtime";
3
3
  import { SpectralProvider as f } from "./SpectralProvider.js";
4
- import { D as e } from "./index-CAKA12cC.js";
4
+ import { D as e } from "./index-Dc8KxzeM.js";
5
5
  const u = ({ children: d, defaultOpen: o = !1, description: i, direction: l = "right", dismissible: c = !0, modal: p = !0, onOpenChange: n, open: m, size: r = "380px", title: x, trigger: h }) => {
6
6
  const a = "!font-sans fixed", w = {
7
7
  left: {
@@ -1,12 +1,11 @@
1
1
  import { IconProps } from './iconTypes';
2
- import { ComponentPropsWithoutRef, CSSProperties, ReactNode } from 'react';
2
+ import { ComponentPropsWithoutRef, ReactNode } from 'react';
3
3
  export declare const SvgIdContext: import('react').Context<string>;
4
4
  interface IconBaseProps extends Omit<IconProps, 'strokeWidth'>, ComponentPropsWithoutRef<'svg'> {
5
5
  children: ReactNode;
6
6
  className?: string;
7
7
  size?: number;
8
8
  title?: string;
9
- style?: CSSProperties;
10
9
  color?: string;
11
10
  }
12
11
  declare const IconBase: import('react').ForwardRefExoticComponent<IconBaseProps & import('react').RefAttributes<SVGSVGElement>>;
@@ -1,16 +1,16 @@
1
1
  "use client";
2
2
  import "../styles/main.css";
3
- import { jsxs as w, jsx as t } from "react/jsx-runtime";
4
- import { createContext as x, forwardRef as B, useId as g } from "react";
5
- const m = x(""), p = B(function({ children: c, title: o, size: n = 24, ariaHidden: r = !0, description: d = "", className: a = "", style: f, ...h }, v) {
6
- const s = g(), e = o !== void 0 ? !1 : r, i = !e && o ? `${s}_title` : "", l = !e && d ? `${s}_desc` : "", u = [i, l].filter(Boolean).join(" ") || void 0;
7
- return /* @__PURE__ */ w("svg", { height: n, width: n, xmlns: "http://www.w3.org/2000/svg", className: a, role: "img", "aria-hidden": e, "aria-labelledby": u, ref: v, style: f, fill: "none", viewBox: "0 0 24 24", ...h, children: [
3
+ import { jsxs as u, jsx as t } from "react/jsx-runtime";
4
+ import { createContext as w, forwardRef as x, useId as B } from "react";
5
+ const g = w(""), A = x(function({ children: c, title: o, size: n = 24, ariaHidden: r = !0, description: d, className: a, ...f }, h) {
6
+ const s = B(), e = o !== void 0 ? !1 : r, i = !e && o ? `${s}_title` : "", l = !e && d ? `${s}_desc` : "", v = [i, l].filter(Boolean).join(" ") || void 0;
7
+ return /* @__PURE__ */ u("svg", { height: n, width: n, xmlns: "http://www.w3.org/2000/svg", className: a, role: "img", "aria-hidden": e, "aria-labelledby": v, ref: h, fill: "none", viewBox: "0 0 24 24", ...f, children: [
8
8
  !e && o && /* @__PURE__ */ t("title", { id: i, children: o }),
9
9
  !e && d && /* @__PURE__ */ t("desc", { id: l, children: d }),
10
- /* @__PURE__ */ t(m.Provider, { value: s, children: c })
10
+ /* @__PURE__ */ t(g.Provider, { value: s, children: c })
11
11
  ] });
12
12
  });
13
13
  export {
14
- m as SvgIdContext,
15
- p as default
14
+ g as SvgIdContext,
15
+ A as default
16
16
  };
package/dist/Popover.js CHANGED
@@ -4,10 +4,11 @@ import { jsx as s } from "react/jsx-runtime";
4
4
  import * as p from "react";
5
5
  import { u as L, c as z, a as x, P as O, b as P, e as G } from "./index-BhufZRa2.js";
6
6
  import { P as H, D as K } from "./index-B2oBi8ng.js";
7
- import { h as j, R as U, u as V, F as W } from "./index-B-GQStVW.js";
8
- import { u as Z } from "./index-CVSxKOPp.js";
9
- import { c as _, R as q, A as b, C as B, a as J } from "./index-NzygPVvJ.js";
7
+ import { h as j, u as U, F as V } from "./index-MZS7zxk4.js";
8
+ import { u as W } from "./index-CVSxKOPp.js";
9
+ import { c as _, R as Z, A as b, C as q, a as B } from "./index-NzygPVvJ.js";
10
10
  import { P as w } from "./index-6Abv_Flm.js";
11
+ import { R as J } from "./Combination-BtmnusWq.js";
11
12
  import { cn as Q } from "./utils/twUtils.js";
12
13
  var C = "Popover", [E] = z(C, [
13
14
  _
@@ -19,24 +20,24 @@ var C = "Popover", [E] = z(C, [
19
20
  defaultOpen: o,
20
21
  onOpenChange: t,
21
22
  modal: c = !1
22
- } = e, i = g(n), f = p.useRef(null), [v, h] = p.useState(!1), [m, u] = L({
23
+ } = e, i = g(n), f = p.useRef(null), [v, m] = p.useState(!1), [h, u] = L({
23
24
  prop: a,
24
25
  defaultProp: o ?? !1,
25
26
  onChange: t,
26
27
  caller: C
27
28
  });
28
- return /* @__PURE__ */ s(q, { ...i, children: /* @__PURE__ */ s(
29
+ return /* @__PURE__ */ s(Z, { ...i, children: /* @__PURE__ */ s(
29
30
  X,
30
31
  {
31
32
  scope: n,
32
- contentId: Z(),
33
+ contentId: W(),
33
34
  triggerRef: f,
34
- open: m,
35
+ open: h,
35
36
  onOpenChange: u,
36
37
  onOpenToggle: p.useCallback(() => u((R) => !R), [u]),
37
38
  hasCustomAnchor: v,
38
- onCustomAnchorAdd: p.useCallback(() => h(!0), []),
39
- onCustomAnchorRemove: p.useCallback(() => h(!1), []),
39
+ onCustomAnchorAdd: p.useCallback(() => m(!0), []),
40
+ onCustomAnchorRemove: p.useCallback(() => m(!1), []),
40
41
  modal: c,
41
42
  children: r
42
43
  }
@@ -89,7 +90,7 @@ var oe = G("PopoverContent.RemoveScroll"), te = p.forwardRef(
89
90
  return p.useEffect(() => {
90
91
  const c = a.current;
91
92
  if (c) return j(c);
92
- }, []), /* @__PURE__ */ s(U, { as: oe, allowPinchZoom: !0, children: /* @__PURE__ */ s(
93
+ }, []), /* @__PURE__ */ s(J, { as: oe, allowPinchZoom: !0, children: /* @__PURE__ */ s(
93
94
  k,
94
95
  {
95
96
  ...e,
@@ -147,11 +148,11 @@ var oe = G("PopoverContent.RemoveScroll"), te = p.forwardRef(
147
148
  onEscapeKeyDown: i,
148
149
  onPointerDownOutside: f,
149
150
  onFocusOutside: v,
150
- onInteractOutside: h,
151
- ...m
151
+ onInteractOutside: m,
152
+ ...h
152
153
  } = e, u = l(d, r), R = g(r);
153
- return V(), /* @__PURE__ */ s(
154
- W,
154
+ return U(), /* @__PURE__ */ s(
155
+ V,
155
156
  {
156
157
  asChild: !0,
157
158
  loop: !0,
@@ -163,22 +164,22 @@ var oe = G("PopoverContent.RemoveScroll"), te = p.forwardRef(
163
164
  {
164
165
  asChild: !0,
165
166
  disableOutsidePointerEvents: c,
166
- onInteractOutside: h,
167
+ onInteractOutside: m,
167
168
  onEscapeKeyDown: i,
168
169
  onPointerDownOutside: f,
169
170
  onFocusOutside: v,
170
171
  onDismiss: () => u.onOpenChange(!1),
171
172
  children: /* @__PURE__ */ s(
172
- B,
173
+ q,
173
174
  {
174
175
  "data-state": $(u.open),
175
176
  role: "dialog",
176
177
  id: u.contentId,
177
178
  ...R,
178
- ...m,
179
+ ...h,
179
180
  ref: n,
180
181
  style: {
181
- ...m.style,
182
+ ...h.style,
182
183
  "--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)",
183
184
  "--radix-popover-content-available-width": "var(--radix-popper-available-width)",
184
185
  "--radix-popover-content-available-height": "var(--radix-popper-available-height)",
@@ -210,7 +211,7 @@ ne.displayName = I;
210
211
  var ae = "PopoverArrow", se = p.forwardRef(
211
212
  (e, n) => {
212
213
  const { __scopePopover: r, ...a } = e, o = g(r);
213
- return /* @__PURE__ */ s(J, { ...o, ...a, ref: n });
214
+ return /* @__PURE__ */ s(B, { ...o, ...a, ref: n });
214
215
  }
215
216
  );
216
217
  se.displayName = ae;
@@ -218,7 +219,7 @@ function $(e) {
218
219
  return e ? "open" : "closed";
219
220
  }
220
221
  var ce = F, pe = y, ie = D, le = M, ue = T;
221
- const Re = ({ ...e }) => /* @__PURE__ */ s(ce, { "data-slot": "popover", "data-testid": "spectral-popover", ...e }), Ae = ({ ...e }) => /* @__PURE__ */ s(ie, { "data-slot": "popover-trigger", "data-testid": "spectral-popover-trigger", ...e }), xe = ({ align: e = "center", className: n, side: r = "bottom", sideOffset: a = 4, width: o = "w-fit", ...t }) => /* @__PURE__ */ s(le, { children: /* @__PURE__ */ s(
222
+ const Ae = ({ ...e }) => /* @__PURE__ */ s(ce, { "data-slot": "popover", "data-testid": "spectral-popover", ...e }), xe = ({ ...e }) => /* @__PURE__ */ s(ie, { "data-slot": "popover-trigger", "data-testid": "spectral-popover-trigger", ...e }), Oe = ({ align: e = "center", className: n, side: r = "bottom", sideOffset: a = 4, width: o = "w-fit", ...t }) => /* @__PURE__ */ s(le, { children: /* @__PURE__ */ s(
222
223
  ue,
223
224
  {
224
225
  align: e,
@@ -239,10 +240,10 @@ const Re = ({ ...e }) => /* @__PURE__ */ s(ce, { "data-slot": "popover", "data-t
239
240
  },
240
241
  ...t
241
242
  }
242
- ) }), Oe = ({ ...e }) => /* @__PURE__ */ s(pe, { "data-slot": "popover-anchor", ...e });
243
+ ) }), _e = ({ ...e }) => /* @__PURE__ */ s(pe, { "data-slot": "popover-anchor", ...e });
243
244
  export {
244
- Re as Popover,
245
- Oe as PopoverAnchor,
246
- xe as PopoverContent,
247
- Ae as PopoverTrigger
245
+ Ae as Popover,
246
+ _e as PopoverAnchor,
247
+ Oe as PopoverContent,
248
+ xe as PopoverTrigger
248
249
  };
package/dist/Select.js CHANGED
@@ -64,7 +64,7 @@ import "./Icons/ZoomAllIcon.js";
64
64
  import "./Icons/ZoomXIcon.js";
65
65
  import "./Icons/ZoomYIcon.js";
66
66
  import { Label as C } from "./Label.js";
67
- import { R as X, T as Y, f as Z, e as _, C as $, c as tt, V as et, S as rt, d as I, G as at, I as it, b as st, a as ot } from "./index-CevVJ05e.js";
67
+ import { R as X, T as Y, f as Z, e as _, C as $, c as tt, V as et, S as rt, d as I, G as at, I as it, b as st, a as ot } from "./index-7IR9qVCR.js";
68
68
  import { useFormFieldId as lt, useFormFieldState as dt, getAriaProps as mt, getErrorMessageId as ct, groupOptions as pt, getFormFieldCSSProperties as nt, getStateClasses as ut, getTriggerClasses as ht, ErrorMessage as gt, LoadingState as bt, EmptyState as ft, getOptionClasses as xt } from "./utils/formFieldUtils.js";
69
69
  import { cn as s } from "./utils/twUtils.js";
70
70
  import { forwardRef as yt, useState as Nt } from "react";
package/dist/Tray.js CHANGED
@@ -68,7 +68,7 @@ import { cn as rt } from "./utils/twUtils.js";
68
68
  import { c as $r } from "./index-D29mdTf5.js";
69
69
  import * as re from "react";
70
70
  import { createContext as mt, useRef as z, useLayoutEffect as zr, useEffect as nt, useId as Ye, useContext as O, useInsertionEffect as Zi, useMemo as Y, useCallback as Ji, Children as Hr, isValidElement as _r, useState as Ae, Fragment as Qi, createElement as Gr, forwardRef as q, Component as Xr } from "react";
71
- import { D as Pt } from "./index-CAKA12cC.js";
71
+ import { D as Pt } from "./index-Dc8KxzeM.js";
72
72
  const qe = mt({});
73
73
  function Ze(t) {
74
74
  const e = z(null);
@@ -5,12 +5,13 @@ import { c as Re } from "./index-rKs9bXHr.js";
5
5
  import { u as Ee, c as st, a as k, P as M, b as R, d as Y, e as ct } from "./index-BhufZRa2.js";
6
6
  import { u as lt, c as at } from "./index-UEFPWH8U.js";
7
7
  import { D as it, P as dt } from "./index-B2oBi8ng.js";
8
- import { h as ut, u as pt, R as ft, F as mt } from "./index-B-GQStVW.js";
8
+ import { h as ut, u as pt, F as ft } from "./index-MZS7zxk4.js";
9
9
  import { u as Ie } from "./index-CVSxKOPp.js";
10
- import { c as _e, R as ht, A as vt, C as gt, a as St } from "./index-NzygPVvJ.js";
11
- import { u as wt } from "./index-0ioNhtNM.js";
12
- import { u as Ct } from "./index-BZPx6jYI.js";
13
- import { V as xt } from "./index-CGALWSq_.js";
10
+ import { c as _e, R as mt, A as ht, C as vt, a as gt } from "./index-NzygPVvJ.js";
11
+ import { u as St } from "./index-0ioNhtNM.js";
12
+ import { u as wt } from "./index-BZPx6jYI.js";
13
+ import { V as Ct } from "./index-CGALWSq_.js";
14
+ import { R as xt } from "./Combination-BtmnusWq.js";
14
15
  import { jsx as p, jsxs as le, Fragment as Te } from "react/jsx-runtime";
15
16
  var yt = [" ", "Enter", "ArrowUp", "ArrowDown"], It = [" ", "Enter"], J = "Select", [ie, de, Tt] = at(J), [te] = st(J, [
16
17
  Tt,
@@ -42,7 +43,7 @@ var yt = [" ", "Enter", "ArrowUp", "ArrowDown"], It = [" ", "Enter"], J = "Selec
42
43
  onChange: c,
43
44
  caller: J
44
45
  }), V = t.useRef(null), B = h ? y || !!h.closest("form") : !0, [G, H] = t.useState(/* @__PURE__ */ new Set()), F = Array.from(G).map((_) => _.props.value).join(";");
45
- return /* @__PURE__ */ p(ht, { ...i, children: /* @__PURE__ */ le(
46
+ return /* @__PURE__ */ p(mt, { ...i, children: /* @__PURE__ */ le(
46
47
  Pt,
47
48
  {
48
49
  required: T,
@@ -113,7 +114,7 @@ var Me = "SelectTrigger", Ae = t.forwardRef(
113
114
  y: Math.round(i.pageY)
114
115
  });
115
116
  };
116
- return /* @__PURE__ */ p(vt, { asChild: !0, ...d, children: /* @__PURE__ */ p(
117
+ return /* @__PURE__ */ p(ht, { asChild: !0, ...d, children: /* @__PURE__ */ p(
117
118
  M.button,
118
119
  {
119
120
  type: "button",
@@ -295,8 +296,8 @@ var O = 10, [Be, q] = te(Q), Nt = "SelectContentImpl", Mt = ct("SelectContent.Re
295
296
  position: a,
296
297
  isPositioned: G,
297
298
  searchRef: pe,
298
- children: /* @__PURE__ */ p(ft, { as: Mt, allowPinchZoom: !0, children: /* @__PURE__ */ p(
299
- mt,
299
+ children: /* @__PURE__ */ p(xt, { as: Mt, allowPinchZoom: !0, children: /* @__PURE__ */ p(
300
+ ft,
300
301
  {
301
302
  asChild: !0,
302
303
  trapped: m.open,
@@ -470,7 +471,7 @@ var Ot = "SelectPopperPosition", Se = t.forwardRef((o, l) => {
470
471
  ...d
471
472
  } = o, n = ue(e);
472
473
  return /* @__PURE__ */ p(
473
- gt,
474
+ vt,
474
475
  {
475
476
  ...n,
476
477
  ...d,
@@ -743,13 +744,13 @@ et.displayName = Bt;
743
744
  var ye = "SelectArrow", Ht = t.forwardRef(
744
745
  (o, l) => {
745
746
  const { __scopeSelect: e, ...a } = o, s = ue(e), d = j(ye, e), n = q(ye, e);
746
- return d.open && n.position === "popper" ? /* @__PURE__ */ p(St, { ...s, ...a, ref: l }) : null;
747
+ return d.open && n.position === "popper" ? /* @__PURE__ */ p(gt, { ...s, ...a, ref: l }) : null;
747
748
  }
748
749
  );
749
750
  Ht.displayName = ye;
750
751
  var Ft = "SelectBubbleInput", tt = t.forwardRef(
751
752
  ({ __scopeSelect: o, value: l, ...e }, a) => {
752
- const s = t.useRef(null), d = k(a, s), n = Ct(l);
753
+ const s = t.useRef(null), d = k(a, s), n = wt(l);
753
754
  return t.useEffect(() => {
754
755
  const r = s.current;
755
756
  if (!r) return;
@@ -765,7 +766,7 @@ var Ft = "SelectBubbleInput", tt = t.forwardRef(
765
766
  M.select,
766
767
  {
767
768
  ...e,
768
- style: { ...xt, ...e.style },
769
+ style: { ...Ct, ...e.style },
769
770
  ref: d,
770
771
  defaultValue: l
771
772
  }
@@ -777,7 +778,7 @@ function ot(o) {
777
778
  return o === "" || o === void 0;
778
779
  }
779
780
  function nt(o) {
780
- const l = wt(o), e = t.useRef(""), a = t.useRef(0), s = t.useCallback(
781
+ const l = St(o), e = t.useRef(""), a = t.useRef(0), s = t.useCallback(
781
782
  (n) => {
782
783
  const r = e.current + n;
783
784
  l(r), (function c(f) {
@@ -802,21 +803,21 @@ function rt(o, l, e) {
802
803
  function Ut(o, l) {
803
804
  return o.map((e, a) => o[(l + a) % o.length]);
804
805
  }
805
- var Qt = Ne, eo = Ae, to = De, oo = Le, no = ke, ro = Ve, so = Ue, co = Ke, lo = ze, ao = je, io = qe, uo = Ze, po = $e, fo = Je, mo = et;
806
+ var eo = Ne, to = Ae, oo = De, no = Le, ro = ke, so = Ve, co = Ue, lo = Ke, ao = ze, io = je, uo = qe, po = Ze, fo = $e, mo = Je, ho = et;
806
807
  export {
807
- ro as C,
808
- co as G,
809
- ao as I,
810
- lo as L,
811
- no as P,
812
- Qt as R,
813
- fo as S,
814
- eo as T,
815
- so as V,
816
- uo as a,
817
- io as b,
818
- po as c,
819
- mo as d,
820
- oo as e,
821
- to as f
808
+ so as C,
809
+ lo as G,
810
+ io as I,
811
+ ao as L,
812
+ ro as P,
813
+ eo as R,
814
+ mo as S,
815
+ to as T,
816
+ co as V,
817
+ po as a,
818
+ uo as b,
819
+ fo as c,
820
+ ho as d,
821
+ no as e,
822
+ oo as f
822
823
  };