@spear-ai/spectral 1.3.56 → 1.3.58

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.
package/dist/Tooltip.js CHANGED
@@ -2,10 +2,12 @@
2
2
  import "./styles/main.css";
3
3
  import { jsx as u, jsxs as H } from "react/jsx-runtime";
4
4
  import * as a from "react";
5
- import { c as K, u as W, a as J, b as S, P as Q, d as C, D as Z, e as ee } from "./index-DfFzqLW6.js";
6
- import { c as G, R as te, A as oe, a as re, C as ne } from "./index-C18a1qz_.js";
7
- import { P as j, a as ae } from "./index-Ddc_4vXe.js";
8
- import { R as se } from "./index-CFeaEsew.js";
5
+ import { c as K, b as W, d as J, a as S, P as Q, e as C, f as Z } from "./index-CA7haECj.js";
6
+ import { D as ee } from "./index-cCg4yNa8.js";
7
+ import { c as G, R as te, A as oe, a as re, C as ne } from "./index-FeGk8zep.js";
8
+ import { P as ae } from "./index-VXXKXen4.js";
9
+ import { P as j } from "./index-CBwRmAsQ.js";
10
+ import { R as se } from "./index-Cfyte2YO.js";
9
11
  import { c as ie } from "./twUtils-CRiPKpXj.js";
10
12
  var [O] = K("Tooltip", [
11
13
  G
@@ -162,7 +164,7 @@ var b = "TooltipContent", V = a.forwardRef(
162
164
  return document.addEventListener("pointermove", m), () => document.removeEventListener("pointermove", m);
163
165
  }
164
166
  }, [s, c, i, d, h]), /* @__PURE__ */ u(Y, { ...e, ref: l });
165
- }), [ve, he] = O(R, { isInside: !1 }), me = ee("TooltipContent"), Y = a.forwardRef(
167
+ }), [ve, he] = O(R, { isInside: !1 }), me = Z("TooltipContent"), Y = a.forwardRef(
166
168
  (e, o) => {
167
169
  const {
168
170
  __scopeTooltip: t,
@@ -180,7 +182,7 @@ var b = "TooltipContent", V = a.forwardRef(
180
182
  return window.addEventListener("scroll", f, { capture: !0 }), () => window.removeEventListener("scroll", f, { capture: !0 });
181
183
  }
182
184
  }, [s.trigger, c]), /* @__PURE__ */ u(
183
- Z,
185
+ ee,
184
186
  {
185
187
  asChild: !0,
186
188
  disableOutsidePointerEvents: !1,
@@ -317,7 +319,7 @@ function be(e) {
317
319
  return t.pop(), o.length === 1 && t.length === 1 && o[0].x === t[0].x && o[0].y === t[0].y ? o : o.concat(t);
318
320
  }
319
321
  var we = z, Pe = $, Ee = B, Re = U, _e = V, Oe = X;
320
- const De = ({ delayDuration: e = 0, ...o }) => /* @__PURE__ */ u(we, { "data-slot": "tooltip-provider", delayDuration: e, ...o }), He = ({ ...e }) => /* @__PURE__ */ u(De, { children: /* @__PURE__ */ u(Pe, { "data-slot": "tooltip", ...e }) }), Se = ({ ...e }) => /* @__PURE__ */ u(Ee, { "data-slot": "tooltip-trigger", ...e }), Ge = ({
322
+ const De = ({ delayDuration: e = 0, ...o }) => /* @__PURE__ */ u(we, { "data-slot": "tooltip-provider", delayDuration: e, ...o }), Ge = ({ ...e }) => /* @__PURE__ */ u(De, { children: /* @__PURE__ */ u(Pe, { "data-slot": "tooltip", ...e }) }), je = ({ ...e }) => /* @__PURE__ */ u(Ee, { "data-slot": "tooltip-trigger", ...e }), Fe = ({
321
323
  className: e,
322
324
  children: o,
323
325
  sideOffset: t = 0,
@@ -344,8 +346,8 @@ const De = ({ delayDuration: e = 0, ...o }) => /* @__PURE__ */ u(we, { "data-slo
344
346
  }
345
347
  ) });
346
348
  export {
347
- He as Tooltip,
348
- Ge as TooltipContent,
349
+ Ge as Tooltip,
350
+ Fe as TooltipContent,
349
351
  De as TooltipProvider,
350
- Se as TooltipTrigger
352
+ je as TooltipTrigger
351
353
  };
@@ -1,11 +1,36 @@
1
- import { ComponentProps } from 'react';
2
- import * as RadioGroupPrimitive from './RadioGroupBase';
3
- type RadioGroupVariant = 'default' | 'unstyled';
4
- export type RadioGroupProps = ComponentProps<typeof RadioGroupPrimitive.RadioGroup> & {
5
- variant?: RadioGroupVariant;
1
+ import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
3
+ type RadioGroupVariant = 'default' | 'tiles' | 'unstyled';
4
+ export type RadioGroupProps = Omit<ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>, 'onChange' | 'disabled'> & {
5
+ readonly onValueChange: (selected: string) => void;
6
+ readonly selected?: string;
7
+ readonly name: string;
8
+ readonly required?: boolean;
9
+ readonly orientation?: 'horizontal' | 'vertical';
10
+ readonly variant?: RadioGroupVariant;
11
+ readonly className?: string;
12
+ readonly disabled?: boolean | readonly string[];
13
+ readonly itemClassName?: string;
6
14
  };
7
- export type RadioGroupItemProps = ComponentProps<typeof RadioGroupPrimitive.RadioGroupItem>;
8
- export declare const RadioGroup: ({ className, variant, ...props }: RadioGroupProps) => import("react/jsx-runtime").JSX.Element;
9
- export declare const RadioGroupItem: ({ className, children, ...props }: RadioGroupItemProps) => import("react/jsx-runtime").JSX.Element;
10
- export {};
15
+ export interface RadioGroupItemProps extends ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item> {
16
+ readonly className?: string;
17
+ readonly children?: ReactNode;
18
+ readonly id?: string;
19
+ readonly value: string;
20
+ readonly description?: string | ReactNode;
21
+ }
22
+ declare const RadioGroup: import('react').ForwardRefExoticComponent<Omit<Omit<RadioGroupPrimitive.RadioGroupProps & import('react').RefAttributes<HTMLDivElement>, "ref">, "onChange" | "disabled"> & {
23
+ readonly onValueChange: (selected: string) => void;
24
+ readonly selected?: string;
25
+ readonly name: string;
26
+ readonly required?: boolean;
27
+ readonly orientation?: "horizontal" | "vertical";
28
+ readonly variant?: RadioGroupVariant;
29
+ readonly className?: string;
30
+ readonly disabled?: boolean | readonly string[];
31
+ readonly itemClassName?: string;
32
+ } & import('react').RefAttributes<HTMLDivElement>>;
33
+ declare const RadioGroupItem: import('react').ForwardRefExoticComponent<RadioGroupItemProps & import('react').RefAttributes<HTMLButtonElement>>;
34
+ declare const RadioGroupLabel: import('react').ForwardRefExoticComponent<Omit<Omit<import('../Label/Label').LabelProps, "ref"> & import('react').RefAttributes<HTMLLabelElement>, "ref"> & import('react').RefAttributes<HTMLLabelElement>>;
35
+ export { RadioGroup, RadioGroupItem, RadioGroupLabel };
11
36
  //# sourceMappingURL=RadioGroup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../src/components/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,mBAAmB,MAAM,kBAAkB,CAAA;AAGvD,OAAO,EAAE,KAAK,cAAc,EAA6B,MAAM,OAAO,CAAA;AAEtE,KAAK,iBAAiB,GAAG,SAAS,GAAG,UAAU,CAAA;AAM/C,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,mBAAmB,CAAC,UAAU,CAAC,GAAG;IACpF,OAAO,CAAC,EAAE,iBAAiB,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,OAAO,mBAAmB,CAAC,cAAc,CAAC,CAAA;AAE3F,eAAO,MAAM,UAAU,GAAI,kCAA8C,eAAe,4CAWvF,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,mCAAmC,mBAAmB,4CAiBpF,CAAA"}
1
+ {"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../src/components/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAA;AAElE,OAAO,EACL,KAAK,wBAAwB,EAM7B,KAAK,SAAS,EAGf,MAAM,OAAO,CAAA;AAEd,KAAK,iBAAiB,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAA;AAEzD,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,wBAAwB,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,EACzD,UAAU,GAAG,UAAU,CACxB,GAAG;IACF,QAAQ,CAAC,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IAClD,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IAChD,QAAQ,CAAC,OAAO,CAAC,EAAE,iBAAiB,CAAA;IACpC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,MAAM,EAAE,CAAA;IAC/C,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAChC,CAAA;AAED,MAAM,WAAW,mBAAoB,SAAQ,wBAAwB,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC;IACpG,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;IAC7B,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC1C;AAoBD,QAAA,MAAM,UAAU;4BArCU,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI;wBAC9B,MAAM;mBACX,MAAM;wBACD,OAAO;2BACJ,YAAY,GAAG,UAAU;uBAC7B,iBAAiB;yBACf,MAAM;wBACP,OAAO,GAAG,SAAS,MAAM,EAAE;6BACtB,MAAM;kDAwEhC,CAAA;AAgCD,QAAA,MAAM,cAAc,mHAiEnB,CAAA;AAGD,QAAA,MAAM,eAAe,uNAIpB,CAAA;AAGD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,eAAe,EAAE,CAAA"}
@@ -0,0 +1,248 @@
1
+ import "./styles/main.css";
2
+ import * as r from "react";
3
+ import { jsx as p, Fragment as x } from "react/jsx-runtime";
4
+ import * as R from "react-dom";
5
+ function A(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
6
+ return function(o) {
7
+ if (e?.(o), n === !1 || !o.defaultPrevented)
8
+ return t?.(o);
9
+ };
10
+ }
11
+ function S(e, t) {
12
+ if (typeof e == "function")
13
+ return e(t);
14
+ e != null && (e.current = t);
15
+ }
16
+ function h(...e) {
17
+ return (t) => {
18
+ let n = !1;
19
+ const s = e.map((o) => {
20
+ const c = S(o, t);
21
+ return !n && typeof c == "function" && (n = !0), c;
22
+ });
23
+ if (n)
24
+ return () => {
25
+ for (let o = 0; o < s.length; o++) {
26
+ const c = s[o];
27
+ typeof c == "function" ? c() : S(e[o], null);
28
+ }
29
+ };
30
+ };
31
+ }
32
+ function F(...e) {
33
+ return r.useCallback(h(...e), e);
34
+ }
35
+ function H(e, t) {
36
+ const n = r.createContext(t), s = (c) => {
37
+ const { children: u, ...i } = c, l = r.useMemo(() => i, Object.values(i));
38
+ return /* @__PURE__ */ p(n.Provider, { value: l, children: u });
39
+ };
40
+ s.displayName = e + "Provider";
41
+ function o(c) {
42
+ const u = r.useContext(n);
43
+ if (u) return u;
44
+ if (t !== void 0) return t;
45
+ throw new Error(`\`${c}\` must be used within \`${e}\``);
46
+ }
47
+ return [s, o];
48
+ }
49
+ function L(e, t = []) {
50
+ let n = [];
51
+ function s(c, u) {
52
+ const i = r.createContext(u), l = n.length;
53
+ n = [...n, u];
54
+ const f = (a) => {
55
+ const { scope: v, children: C, ...m } = a, b = v?.[e]?.[l] || i, g = r.useMemo(() => m, Object.values(m));
56
+ return /* @__PURE__ */ p(b.Provider, { value: g, children: C });
57
+ };
58
+ f.displayName = c + "Provider";
59
+ function d(a, v) {
60
+ const C = v?.[e]?.[l] || i, m = r.useContext(C);
61
+ if (m) return m;
62
+ if (u !== void 0) return u;
63
+ throw new Error(`\`${a}\` must be used within \`${c}\``);
64
+ }
65
+ return [f, d];
66
+ }
67
+ const o = () => {
68
+ const c = n.map((u) => r.createContext(u));
69
+ return function(i) {
70
+ const l = i?.[e] || c;
71
+ return r.useMemo(
72
+ () => ({ [`__scope${e}`]: { ...i, [e]: l } }),
73
+ [i, l]
74
+ );
75
+ };
76
+ };
77
+ return o.scopeName = e, [s, P(o, ...t)];
78
+ }
79
+ function P(...e) {
80
+ const t = e[0];
81
+ if (e.length === 1) return t;
82
+ const n = () => {
83
+ const s = e.map((o) => ({
84
+ useScope: o(),
85
+ scopeName: o.scopeName
86
+ }));
87
+ return function(c) {
88
+ const u = s.reduce((i, { useScope: l, scopeName: f }) => {
89
+ const a = l(c)[`__scope${f}`];
90
+ return { ...i, ...a };
91
+ }, {});
92
+ return r.useMemo(() => ({ [`__scope${t.scopeName}`]: u }), [u]);
93
+ };
94
+ };
95
+ return n.scopeName = t.scopeName, n;
96
+ }
97
+ var y = globalThis?.document ? r.useLayoutEffect : () => {
98
+ }, w = r[" useId ".trim().toString()] || (() => {
99
+ }), $ = 0;
100
+ function T(e) {
101
+ const [t, n] = r.useState(w());
102
+ return y(() => {
103
+ n((s) => s ?? String($++));
104
+ }, [e]), t ? `radix-${t}` : "";
105
+ }
106
+ var _ = r[" useInsertionEffect ".trim().toString()] || y;
107
+ function B({
108
+ prop: e,
109
+ defaultProp: t,
110
+ onChange: n = () => {
111
+ },
112
+ caller: s
113
+ }) {
114
+ const [o, c, u] = I({
115
+ defaultProp: t,
116
+ onChange: n
117
+ }), i = e !== void 0, l = i ? e : o;
118
+ {
119
+ const d = r.useRef(e !== void 0);
120
+ r.useEffect(() => {
121
+ const a = d.current;
122
+ a !== i && console.warn(
123
+ `${s} is changing from ${a ? "controlled" : "uncontrolled"} to ${i ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
124
+ ), d.current = i;
125
+ }, [i, s]);
126
+ }
127
+ const f = r.useCallback(
128
+ (d) => {
129
+ if (i) {
130
+ const a = N(d) ? d(e) : d;
131
+ a !== e && u.current?.(a);
132
+ } else
133
+ c(d);
134
+ },
135
+ [i, e, c, u]
136
+ );
137
+ return [l, f];
138
+ }
139
+ function I({
140
+ defaultProp: e,
141
+ onChange: t
142
+ }) {
143
+ const [n, s] = r.useState(e), o = r.useRef(n), c = r.useRef(t);
144
+ return _(() => {
145
+ c.current = t;
146
+ }, [t]), r.useEffect(() => {
147
+ o.current !== n && (c.current?.(n), o.current = n);
148
+ }, [n, o]), [n, s, c];
149
+ }
150
+ function N(e) {
151
+ return typeof e == "function";
152
+ }
153
+ // @__NO_SIDE_EFFECTS__
154
+ function O(e) {
155
+ const t = /* @__PURE__ */ j(e), n = r.forwardRef((s, o) => {
156
+ const { children: c, ...u } = s, i = r.Children.toArray(c), l = i.find(D);
157
+ if (l) {
158
+ const f = l.props.children, d = i.map((a) => a === l ? r.Children.count(f) > 1 ? r.Children.only(null) : r.isValidElement(f) ? f.props.children : null : a);
159
+ return /* @__PURE__ */ p(t, { ...u, ref: o, children: r.isValidElement(f) ? r.cloneElement(f, void 0, d) : null });
160
+ }
161
+ return /* @__PURE__ */ p(t, { ...u, ref: o, children: c });
162
+ });
163
+ return n.displayName = `${e}.Slot`, n;
164
+ }
165
+ // @__NO_SIDE_EFFECTS__
166
+ function j(e) {
167
+ const t = r.forwardRef((n, s) => {
168
+ const { children: o, ...c } = n;
169
+ if (r.isValidElement(o)) {
170
+ const u = V(o), i = M(c, o.props);
171
+ return o.type !== r.Fragment && (i.ref = s ? h(s, u) : u), r.cloneElement(o, i);
172
+ }
173
+ return r.Children.count(o) > 1 ? r.Children.only(null) : null;
174
+ });
175
+ return t.displayName = `${e}.SlotClone`, t;
176
+ }
177
+ var E = Symbol("radix.slottable");
178
+ // @__NO_SIDE_EFFECTS__
179
+ function U(e) {
180
+ const t = ({ children: n }) => /* @__PURE__ */ p(x, { children: n });
181
+ return t.displayName = `${e}.Slottable`, t.__radixId = E, t;
182
+ }
183
+ function D(e) {
184
+ return r.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === E;
185
+ }
186
+ function M(e, t) {
187
+ const n = { ...t };
188
+ for (const s in t) {
189
+ const o = e[s], c = t[s];
190
+ /^on[A-Z]/.test(s) ? o && c ? n[s] = (...i) => {
191
+ const l = c(...i);
192
+ return o(...i), l;
193
+ } : o && (n[s] = o) : s === "style" ? n[s] = { ...o, ...c } : s === "className" && (n[s] = [o, c].filter(Boolean).join(" "));
194
+ }
195
+ return { ...e, ...n };
196
+ }
197
+ function V(e) {
198
+ let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
199
+ return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
200
+ }
201
+ var W = [
202
+ "a",
203
+ "button",
204
+ "div",
205
+ "form",
206
+ "h2",
207
+ "h3",
208
+ "img",
209
+ "input",
210
+ "label",
211
+ "li",
212
+ "nav",
213
+ "ol",
214
+ "p",
215
+ "select",
216
+ "span",
217
+ "svg",
218
+ "ul"
219
+ ], Z = W.reduce((e, t) => {
220
+ const n = /* @__PURE__ */ O(`Primitive.${t}`), s = r.forwardRef((o, c) => {
221
+ const { asChild: u, ...i } = o, l = u ? n : t;
222
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ p(l, { ...i, ref: c });
223
+ });
224
+ return s.displayName = `Primitive.${t}`, { ...e, [t]: s };
225
+ }, {});
226
+ function q(e, t) {
227
+ e && R.flushSync(() => e.dispatchEvent(t));
228
+ }
229
+ function z(e) {
230
+ const t = r.useRef(e);
231
+ return r.useEffect(() => {
232
+ t.current = e;
233
+ }), r.useMemo(() => (...n) => t.current?.(...n), []);
234
+ }
235
+ export {
236
+ Z as P,
237
+ F as a,
238
+ T as b,
239
+ L as c,
240
+ B as d,
241
+ A as e,
242
+ U as f,
243
+ O as g,
244
+ z as h,
245
+ q as i,
246
+ H as j,
247
+ y as u
248
+ };
@@ -0,0 +1,69 @@
1
+ import * as o from "react";
2
+ import { a as y, u as A } from "./index-CA7haECj.js";
3
+ function T(n, e) {
4
+ return o.useReducer((t, r) => e[t][r] ?? t, n);
5
+ }
6
+ var E = (n) => {
7
+ const { present: e, children: t } = n, r = R(e), a = typeof t == "function" ? t({ present: r.isPresent }) : o.Children.only(t), c = y(r.ref, P(a));
8
+ return typeof t == "function" || r.isPresent ? o.cloneElement(a, { ref: c }) : null;
9
+ };
10
+ E.displayName = "Presence";
11
+ function R(n) {
12
+ const [e, t] = o.useState(), r = o.useRef(null), a = o.useRef(n), c = o.useRef("none"), p = n ? "mounted" : "unmounted", [N, s] = T(p, {
13
+ mounted: {
14
+ UNMOUNT: "unmounted",
15
+ ANIMATION_OUT: "unmountSuspended"
16
+ },
17
+ unmountSuspended: {
18
+ MOUNT: "mounted",
19
+ ANIMATION_END: "unmounted"
20
+ },
21
+ unmounted: {
22
+ MOUNT: "mounted"
23
+ }
24
+ });
25
+ return o.useEffect(() => {
26
+ const i = l(r.current);
27
+ c.current = N === "mounted" ? i : "none";
28
+ }, [N]), A(() => {
29
+ const i = r.current, m = a.current;
30
+ if (m !== n) {
31
+ const f = c.current, u = l(i);
32
+ n ? s("MOUNT") : u === "none" || i?.display === "none" ? s("UNMOUNT") : s(m && f !== u ? "ANIMATION_OUT" : "UNMOUNT"), a.current = n;
33
+ }
34
+ }, [n, s]), A(() => {
35
+ if (e) {
36
+ let i;
37
+ const m = e.ownerDocument.defaultView ?? window, d = (u) => {
38
+ const g = l(r.current).includes(CSS.escape(u.animationName));
39
+ if (u.target === e && g && (s("ANIMATION_END"), !a.current)) {
40
+ const O = e.style.animationFillMode;
41
+ e.style.animationFillMode = "forwards", i = m.setTimeout(() => {
42
+ e.style.animationFillMode === "forwards" && (e.style.animationFillMode = O);
43
+ });
44
+ }
45
+ }, f = (u) => {
46
+ u.target === e && (c.current = l(r.current));
47
+ };
48
+ return e.addEventListener("animationstart", f), e.addEventListener("animationcancel", d), e.addEventListener("animationend", d), () => {
49
+ m.clearTimeout(i), e.removeEventListener("animationstart", f), e.removeEventListener("animationcancel", d), e.removeEventListener("animationend", d);
50
+ };
51
+ } else
52
+ s("ANIMATION_END");
53
+ }, [e, s]), {
54
+ isPresent: ["mounted", "unmountSuspended"].includes(N),
55
+ ref: o.useCallback((i) => {
56
+ r.current = i ? getComputedStyle(i) : null, t(i);
57
+ }, [])
58
+ };
59
+ }
60
+ function l(n) {
61
+ return n?.animationName || "none";
62
+ }
63
+ function P(n) {
64
+ let e = Object.getOwnPropertyDescriptor(n.props, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning;
65
+ return t ? n.ref : (e = Object.getOwnPropertyDescriptor(n, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning, t ? n.props.ref : n.props.ref || n.ref);
66
+ }
67
+ export {
68
+ E as P
69
+ };
@@ -0,0 +1,27 @@
1
+ import * as h from "react";
2
+ import { u as z } from "./index-CA7haECj.js";
3
+ function n(r) {
4
+ const [d, e] = h.useState(void 0);
5
+ return z(() => {
6
+ if (r) {
7
+ e({ width: r.offsetWidth, height: r.offsetHeight });
8
+ const f = new ResizeObserver((i) => {
9
+ if (!Array.isArray(i) || !i.length)
10
+ return;
11
+ const b = i[0];
12
+ let o, t;
13
+ if ("borderBoxSize" in b) {
14
+ const s = b.borderBoxSize, u = Array.isArray(s) ? s[0] : s;
15
+ o = u.inlineSize, t = u.blockSize;
16
+ } else
17
+ o = r.offsetWidth, t = r.offsetHeight;
18
+ e({ width: o, height: t });
19
+ });
20
+ return f.observe(r, { box: "border-box" }), () => f.unobserve(r);
21
+ } else
22
+ e(void 0);
23
+ }, [r]), d;
24
+ }
25
+ export {
26
+ n as u
27
+ };
@@ -0,0 +1,59 @@
1
+ import "./styles/main.css";
2
+ import * as a from "react";
3
+ import s from "react";
4
+ import { c as D, a as S, g as v } from "./index-CA7haECj.js";
5
+ import { jsx as p } from "react/jsx-runtime";
6
+ function h(e) {
7
+ const t = e + "CollectionProvider", [A, N] = D(t), [_, f] = A(
8
+ t,
9
+ { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
10
+ ), C = (n) => {
11
+ const { scope: o, children: i } = n, r = s.useRef(null), c = s.useRef(/* @__PURE__ */ new Map()).current;
12
+ return /* @__PURE__ */ p(_, { scope: o, itemMap: c, collectionRef: r, children: i });
13
+ };
14
+ C.displayName = t;
15
+ const m = e + "CollectionSlot", E = v(m), R = s.forwardRef(
16
+ (n, o) => {
17
+ const { scope: i, children: r } = n, c = f(m, i), l = S(o, c.collectionRef);
18
+ return /* @__PURE__ */ p(E, { ref: l, children: r });
19
+ }
20
+ );
21
+ R.displayName = m;
22
+ const d = e + "CollectionItemSlot", I = "data-radix-collection-item", T = v(d), x = s.forwardRef(
23
+ (n, o) => {
24
+ const { scope: i, children: r, ...c } = n, l = s.useRef(null), M = S(o, l), u = f(d, i);
25
+ return s.useEffect(() => (u.itemMap.set(l, { ref: l, ...c }), () => void u.itemMap.delete(l))), /* @__PURE__ */ p(T, { [I]: "", ref: M, children: r });
26
+ }
27
+ );
28
+ x.displayName = d;
29
+ function O(n) {
30
+ const o = f(e + "CollectionConsumer", n);
31
+ return s.useCallback(() => {
32
+ const r = o.collectionRef.current;
33
+ if (!r) return [];
34
+ const c = Array.from(r.querySelectorAll(`[${I}]`));
35
+ return Array.from(o.itemMap.values()).sort(
36
+ (u, y) => c.indexOf(u.ref.current) - c.indexOf(y.ref.current)
37
+ );
38
+ }, [o.collectionRef, o.itemMap]);
39
+ }
40
+ return [
41
+ { Provider: C, Slot: R, ItemSlot: x },
42
+ O,
43
+ N
44
+ ];
45
+ }
46
+ var P = a.createContext(void 0);
47
+ function b(e) {
48
+ const t = a.useContext(P);
49
+ return e || t || "ltr";
50
+ }
51
+ function j(e) {
52
+ const t = a.useRef({ value: e, previous: e });
53
+ return a.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
54
+ }
55
+ export {
56
+ j as a,
57
+ h as c,
58
+ b as u
59
+ };
@@ -1,6 +1,6 @@
1
1
  import "./styles/main.css";
2
2
  import * as i from "react";
3
- import { P as o } from "./index-DfFzqLW6.js";
3
+ import { P as o } from "./index-CA7haECj.js";
4
4
  import { jsx as t } from "react/jsx-runtime";
5
5
  var d = Object.freeze({
6
6
  // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
@@ -1,7 +1,7 @@
1
1
  import "./styles/main.css";
2
2
  import * as u from "react";
3
3
  import { useState as he } from "react";
4
- import { i as z, b as me, P as pe } from "./index-DfFzqLW6.js";
4
+ import { h as z, a as me, P as pe } from "./index-CA7haECj.js";
5
5
  import { jsx as ge } from "react/jsx-runtime";
6
6
  var U = "focusScope.autoFocusOnMount", _ = "focusScope.autoFocusOnUnmount", Z = { bubbles: !1, cancelable: !0 }, ye = "FocusScope", be = u.forwardRef((e, t) => {
7
7
  const {