@spear-ai/spectral 1.3.37 → 1.3.39

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/.js CHANGED
@@ -2,104 +2,107 @@ import { Badge as e } from "./Badge.js";
2
2
  import { Button as p } from "./Button.js";
3
3
  import { Drawer as m } from "./Drawer.js";
4
4
  import { Popover as x, PopoverContent as c, PopoverTrigger as I } from "./Popover.js";
5
- import { RadioGroup as i, RadioGroupItem as s } from "./RadioGroup.js";
6
- import { Skeleton as g } from "./Skeleton.js";
7
- import { Slider as T } from "./Slider.js";
8
- import { Switch as C } from "./Switch.js";
9
- import { Toggle as P } from "./Toggle.js";
10
- import { ToggleGroup as v, ToggleGroupItem as G } from "./ToggleGroup.js";
11
- import { Tooltip as D, TooltipContent as k, TooltipTrigger as w } from "./Tooltip.js";
12
- import { AnnotationsIcon as R } from "./Icons/AnnotationsIcon.js";
13
- import { CalendarIcon as b } from "./Icons/CalendarIcon.js";
14
- import { ClockIcon as A } from "./Icons/ClockIcon.js";
15
- import { DashboardIcon as U } from "./Icons/DashboardIcon.js";
16
- import { DeleteIcon as F } from "./Icons/DeleteIcon.js";
17
- import { DurationIcon as M } from "./Icons/DurationIcon.js";
18
- import { EraserIcon as W } from "./Icons/EraserIcon.js";
19
- import { GoToFirstIcon as Y } from "./Icons/GoToFirstIcon.js";
20
- import { GoToLastIcon as q } from "./Icons/GoToLastIcon.js";
21
- import { HarmonicCursorsIcon as J } from "./Icons/HarmonicCursorsIcon.js";
22
- import { InfoIcon as N } from "./Icons/InfoIcon.js";
23
- import { LabelIcon as _ } from "./Icons/LabelIcon.js";
24
- import { LassoIcon as oo } from "./Icons/LassoIcon.js";
25
- import { LineToolIcon as eo } from "./Icons/LineToolIcon.js";
26
- import { LiveViewIcon as po } from "./Icons/LiveViewIcon.js";
27
- import { LocationIcon as mo } from "./Icons/LocationIcon.js";
28
- import { LogoutIcon as xo } from "./Icons/LogoutIcon.js";
29
- import { MetadataIcon as Io } from "./Icons/MetadataIcon.js";
30
- import { OntologyIcon as io } from "./Icons/OntologyIcon.js";
31
- import { PanelIcon as lo } from "./Icons/PanelIcon.js";
32
- import { PlayIcon as uo } from "./Icons/PlayIcon.js";
33
- import { PlusIcon as Co } from "./Icons/PlusIcon.js";
34
- import { ResetIcon as Po } from "./Icons/ResetIcon.js";
35
- import { ScissorsIcon as vo } from "./Icons/ScissorsIcon.js";
36
- import { SettingsIcon as ho } from "./Icons/SettingsIcon.js";
37
- import { TrashIcon as ko } from "./Icons/TrashIcon.js";
38
- import { UndoIcon as Bo } from "./Icons/UndoIcon.js";
39
- import { UserIcon as Zo } from "./Icons/UserIcon.js";
40
- import { WarningIcon as yo } from "./Icons/WarningIcon.js";
41
- import { ZoomAllIcon as Oo } from "./Icons/ZoomAllIcon.js";
42
- import { ZoomXIcon as Eo } from "./Icons/ZoomXIcon.js";
43
- import { ZoomYIcon as Ho } from "./Icons/ZoomYIcon.js";
44
- import { default as Vo, SvgIdContext as Wo } from "./Icons/IconBase.js";
45
- import { useOutsideClick as Yo } from "./hooks/useOutsideClick.js";
46
- import { useTheme as qo } from "./hooks/useTheme.js";
47
- import { c as Jo } from "./twUtils-CRiPKpXj.js";
48
- import { SpectralProvider as No } from "./SpectralProvider.js";
5
+ import { RadioButtonGroup as i, RadioButtonGroupItem as s } from "./RadioButtonGroup.js";
6
+ import { RadioGroup as u, RadioGroupItem as g } from "./RadioGroup.js";
7
+ import { Skeleton as T } from "./Skeleton.js";
8
+ import { Slider as C } from "./Slider.js";
9
+ import { Switch as P } from "./Switch.js";
10
+ import { Toggle as v } from "./Toggle.js";
11
+ import { ToggleGroup as R, ToggleGroupItem as h } from "./ToggleGroup.js";
12
+ import { Tooltip as k, TooltipContent as w, TooltipTrigger as Z } from "./Tooltip.js";
13
+ import { AnnotationsIcon as y } from "./Icons/AnnotationsIcon.js";
14
+ import { CalendarIcon as O } from "./Icons/CalendarIcon.js";
15
+ import { ClockIcon as E } from "./Icons/ClockIcon.js";
16
+ import { DashboardIcon as H } from "./Icons/DashboardIcon.js";
17
+ import { DeleteIcon as V } from "./Icons/DeleteIcon.js";
18
+ import { DurationIcon as X } from "./Icons/DurationIcon.js";
19
+ import { EraserIcon as j } from "./Icons/EraserIcon.js";
20
+ import { GoToFirstIcon as z } from "./Icons/GoToFirstIcon.js";
21
+ import { GoToLastIcon as K } from "./Icons/GoToLastIcon.js";
22
+ import { HarmonicCursorsIcon as Q } from "./Icons/HarmonicCursorsIcon.js";
23
+ import { InfoIcon as $ } from "./Icons/InfoIcon.js";
24
+ import { LabelIcon as ro } from "./Icons/LabelIcon.js";
25
+ import { LassoIcon as to } from "./Icons/LassoIcon.js";
26
+ import { LineToolIcon as no } from "./Icons/LineToolIcon.js";
27
+ import { LiveViewIcon as fo } from "./Icons/LiveViewIcon.js";
28
+ import { LocationIcon as co } from "./Icons/LocationIcon.js";
29
+ import { LogoutIcon as ao } from "./Icons/LogoutIcon.js";
30
+ import { MetadataIcon as so } from "./Icons/MetadataIcon.js";
31
+ import { OntologyIcon as uo } from "./Icons/OntologyIcon.js";
32
+ import { PanelIcon as To } from "./Icons/PanelIcon.js";
33
+ import { PlayIcon as Co } from "./Icons/PlayIcon.js";
34
+ import { PlusIcon as Po } from "./Icons/PlusIcon.js";
35
+ import { ResetIcon as vo } from "./Icons/ResetIcon.js";
36
+ import { ScissorsIcon as Ro } from "./Icons/ScissorsIcon.js";
37
+ import { SettingsIcon as Do } from "./Icons/SettingsIcon.js";
38
+ import { TrashIcon as wo } from "./Icons/TrashIcon.js";
39
+ import { UndoIcon as bo } from "./Icons/UndoIcon.js";
40
+ import { UserIcon as Ao } from "./Icons/UserIcon.js";
41
+ import { WarningIcon as Uo } from "./Icons/WarningIcon.js";
42
+ import { ZoomAllIcon as Fo } from "./Icons/ZoomAllIcon.js";
43
+ import { ZoomXIcon as Mo } from "./Icons/ZoomXIcon.js";
44
+ import { ZoomYIcon as Wo } from "./Icons/ZoomYIcon.js";
45
+ import { default as Yo, SvgIdContext as jo } from "./Icons/IconBase.js";
46
+ import { useOutsideClick as zo } from "./hooks/useOutsideClick.js";
47
+ import { useTheme as Ko } from "./hooks/useTheme.js";
48
+ import { c as Qo } from "./twUtils-CRiPKpXj.js";
49
+ import { SpectralProvider as $o } from "./SpectralProvider.js";
49
50
  export {
50
- R as AnnotationsIcon,
51
+ y as AnnotationsIcon,
51
52
  e as Badge,
52
53
  p as Button,
53
- b as CalendarIcon,
54
- A as ClockIcon,
55
- U as DashboardIcon,
56
- F as DeleteIcon,
54
+ O as CalendarIcon,
55
+ E as ClockIcon,
56
+ H as DashboardIcon,
57
+ V as DeleteIcon,
57
58
  m as Drawer,
58
- M as DurationIcon,
59
- W as EraserIcon,
60
- Y as GoToFirstIcon,
61
- q as GoToLastIcon,
62
- J as HarmonicCursorsIcon,
63
- Vo as IconBase,
64
- N as InfoIcon,
65
- _ as LabelIcon,
66
- oo as LassoIcon,
67
- eo as LineToolIcon,
68
- po as LiveViewIcon,
69
- mo as LocationIcon,
70
- xo as LogoutIcon,
71
- Io as MetadataIcon,
72
- io as OntologyIcon,
73
- lo as PanelIcon,
74
- uo as PlayIcon,
75
- Co as PlusIcon,
59
+ X as DurationIcon,
60
+ j as EraserIcon,
61
+ z as GoToFirstIcon,
62
+ K as GoToLastIcon,
63
+ Q as HarmonicCursorsIcon,
64
+ Yo as IconBase,
65
+ $ as InfoIcon,
66
+ ro as LabelIcon,
67
+ to as LassoIcon,
68
+ no as LineToolIcon,
69
+ fo as LiveViewIcon,
70
+ co as LocationIcon,
71
+ ao as LogoutIcon,
72
+ so as MetadataIcon,
73
+ uo as OntologyIcon,
74
+ To as PanelIcon,
75
+ Co as PlayIcon,
76
+ Po as PlusIcon,
76
77
  x as Popover,
77
78
  c as PopoverContent,
78
79
  I as PopoverTrigger,
79
- i as RadioGroup,
80
- s as RadioGroupItem,
81
- Po as ResetIcon,
82
- vo as ScissorsIcon,
83
- ho as SettingsIcon,
84
- g as Skeleton,
85
- T as Slider,
86
- No as SpectralProvider,
87
- Wo as SvgIdContext,
88
- C as Switch,
89
- P as Toggle,
90
- v as ToggleGroup,
91
- G as ToggleGroupItem,
92
- D as Tooltip,
93
- k as TooltipContent,
94
- w as TooltipTrigger,
95
- ko as TrashIcon,
96
- Bo as UndoIcon,
97
- Zo as UserIcon,
98
- yo as WarningIcon,
99
- Oo as ZoomAllIcon,
100
- Eo as ZoomXIcon,
101
- Ho as ZoomYIcon,
102
- Jo as cn,
103
- Yo as useOutsideClick,
104
- qo as useTheme
80
+ i as RadioButtonGroup,
81
+ s as RadioButtonGroupItem,
82
+ u as RadioGroup,
83
+ g as RadioGroupItem,
84
+ vo as ResetIcon,
85
+ Ro as ScissorsIcon,
86
+ Do as SettingsIcon,
87
+ T as Skeleton,
88
+ C as Slider,
89
+ $o as SpectralProvider,
90
+ jo as SvgIdContext,
91
+ P as Switch,
92
+ v as Toggle,
93
+ R as ToggleGroup,
94
+ h as ToggleGroupItem,
95
+ k as Tooltip,
96
+ w as TooltipContent,
97
+ Z as TooltipTrigger,
98
+ wo as TrashIcon,
99
+ bo as UndoIcon,
100
+ Ao as UserIcon,
101
+ Uo as WarningIcon,
102
+ Fo as ZoomAllIcon,
103
+ Mo as ZoomXIcon,
104
+ Wo as ZoomYIcon,
105
+ Qo as cn,
106
+ zo as useOutsideClick,
107
+ Ko as useTheme
105
108
  };
package/dist/Button.js CHANGED
@@ -4,8 +4,14 @@ import { jsxs as l, jsx as n } from "react/jsx-runtime";
4
4
  import { c as u } from "./twUtils-CRiPKpXj.js";
5
5
  import { c as v } from "./index-CRBC94ik.js";
6
6
  import { forwardRef as h } from "react";
7
- import { L as N } from "./loader-circle-CvdzOiQ_.js";
8
- const w = v(
7
+ import { c as N } from "./createLucideIcon-CI1yJrZf.js";
8
+ /**
9
+ * @license lucide-react v0.542.0 - ISC
10
+ *
11
+ * This source code is licensed under the ISC license.
12
+ * See the LICENSE file in the root directory of this source tree.
13
+ */
14
+ const w = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], _ = N("loader-circle", w), j = v(
9
15
  `
10
16
  !font-sans flex relative items-center justify-center gap-2 whitespace-nowrap transition-colors cursor-pointer rounded-lg border font-semibold disabled:pointer-events-none
11
17
  focus:outline-none focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0
@@ -35,18 +41,18 @@ const w = v(
35
41
  size: "default"
36
42
  }
37
43
  }
38
- ), j = h(
44
+ ), k = h(
39
45
  ({
40
- className: g,
41
- variant: r,
42
- label: o,
43
- endIcon: i,
46
+ className: c,
47
+ variant: o,
48
+ label: r,
49
+ endIcon: a,
44
50
  state: t,
45
- errorMessage: a,
46
- startIcon: d,
51
+ errorMessage: d,
52
+ startIcon: i,
47
53
  disabled: s,
48
- type: p = "button",
49
- dataTestId: c = `button-${r}`,
54
+ type: g = "button",
55
+ dataTestId: p = `button-${o}`,
50
56
  size: e,
51
57
  children: x,
52
58
  ...m
@@ -65,11 +71,11 @@ const w = v(
65
71
  ghost: "bg-transparent text-button-ghost-text--disabled pointer-events-none"
66
72
  }
67
73
  }, f = u(
68
- w({ variant: r, state: t, size: e }),
69
- t === "error" && b.error[r || "primary"],
70
- t === "loading" && b.loading[r || "primary"],
74
+ j({ variant: o, state: t, size: e }),
75
+ t === "error" && b.error[o || "primary"],
76
+ t === "loading" && b.loading[o || "primary"],
71
77
  e,
72
- g
78
+ c
73
79
  );
74
80
  return /* @__PURE__ */ l("div", { className: u("flex flex-col justify-items-center", e), children: [
75
81
  /* @__PURE__ */ l(
@@ -77,26 +83,26 @@ const w = v(
77
83
  {
78
84
  className: f,
79
85
  ref: y,
80
- type: p,
86
+ type: g,
81
87
  "aria-disabled": s,
82
88
  disabled: s,
83
- "data-testid": c,
89
+ "data-testid": p,
84
90
  ...m,
85
91
  "data-state": t,
86
92
  children: [
87
- d && /* @__PURE__ */ n("span", { className: "flex pr-2", "aria-hidden": !0, children: d }),
88
- e === "icon" ? /* @__PURE__ */ n("span", { className: "sr-only", children: o }) : o,
89
- t === "loading" && /* @__PURE__ */ n(N, { className: "ml-2 animate-spin", size: 16 }),
90
- i && t !== "loading" && /* @__PURE__ */ n("span", { className: "flex pl-2", "aria-hidden": !0, children: i }),
93
+ i && /* @__PURE__ */ n("span", { className: "flex pr-2", "aria-hidden": !0, children: i }),
94
+ e === "icon" ? /* @__PURE__ */ n("span", { className: "sr-only", children: r }) : r,
95
+ t === "loading" && /* @__PURE__ */ n(_, { className: "ml-2 animate-spin", size: 16 }),
96
+ a && t !== "loading" && /* @__PURE__ */ n("span", { className: "flex pl-2", "aria-hidden": !0, children: a }),
91
97
  e === "icon" && x
92
98
  ]
93
99
  }
94
100
  ),
95
- t === "error" && a && /* @__PURE__ */ n("p", { className: "text-danger-100 mt-2 text-xs", role: "alert", "aria-live": "assertive", children: a })
101
+ t === "error" && d && /* @__PURE__ */ n("p", { className: "text-danger-100 mt-2 text-xs", role: "alert", "aria-live": "assertive", children: d })
96
102
  ] });
97
103
  }
98
104
  );
99
- j.displayName = "Button";
105
+ k.displayName = "Button";
100
106
  export {
101
- j as Button
107
+ k as Button
102
108
  };
package/dist/Popover.js CHANGED
@@ -4,22 +4,22 @@ import { jsx as s } from "react/jsx-runtime";
4
4
  import * as i from "react";
5
5
  import { u as L, c as z, a as G, P as x, b as H, d as O, e as _, f as P, g as K, D as j } from "./index-B7LSgz_k.js";
6
6
  import { h as U, R as V, u as W, F as Z } from "./index-gg2zpNk0.js";
7
- import { c as w, R as q, A as b, C as B, a as J } from "./index-sDEISz8i.js";
7
+ import { c as b, R as q, A as w, C as B, a as J } from "./index-sDEISz8i.js";
8
8
  import { c as Q } from "./twUtils-CRiPKpXj.js";
9
9
  var C = "Popover", [E, he] = z(C, [
10
- w
11
- ]), g = w(), [X, l] = E(C), F = (e) => {
10
+ b
11
+ ]), g = b(), [X, l] = E(C), F = (e) => {
12
12
  const {
13
13
  __scopePopover: a,
14
14
  children: t,
15
- open: n,
15
+ open: r,
16
16
  defaultOpen: o,
17
- onOpenChange: r,
17
+ onOpenChange: n,
18
18
  modal: c = !1
19
19
  } = e, p = g(a), f = i.useRef(null), [v, h] = i.useState(!1), [m, u] = L({
20
- prop: n,
20
+ prop: r,
21
21
  defaultProp: o ?? !1,
22
- onChange: r,
22
+ onChange: n,
23
23
  caller: C
24
24
  });
25
25
  return /* @__PURE__ */ s(q, { ...p, children: /* @__PURE__ */ s(
@@ -40,16 +40,16 @@ var C = "Popover", [E, he] = z(C, [
40
40
  ) });
41
41
  };
42
42
  F.displayName = C;
43
- var N = "PopoverAnchor", S = i.forwardRef(
43
+ var N = "PopoverAnchor", y = i.forwardRef(
44
44
  (e, a) => {
45
- const { __scopePopover: t, ...n } = e, o = l(N, t), r = g(t), { onCustomAnchorAdd: c, onCustomAnchorRemove: p } = o;
46
- return i.useEffect(() => (c(), () => p()), [c, p]), /* @__PURE__ */ s(b, { ...r, ...n, ref: a });
45
+ const { __scopePopover: t, ...r } = e, o = l(N, t), n = g(t), { onCustomAnchorAdd: c, onCustomAnchorRemove: p } = o;
46
+ return i.useEffect(() => (c(), () => p()), [c, p]), /* @__PURE__ */ s(w, { ...n, ...r, ref: a });
47
47
  }
48
48
  );
49
- S.displayName = N;
50
- var y = "PopoverTrigger", D = i.forwardRef(
49
+ y.displayName = N;
50
+ var S = "PopoverTrigger", D = i.forwardRef(
51
51
  (e, a) => {
52
- const { __scopePopover: t, ...n } = e, o = l(y, t), r = g(t), c = O(a, o.triggerRef), p = /* @__PURE__ */ s(
52
+ const { __scopePopover: t, ...r } = e, o = l(S, t), n = g(t), c = O(a, o.triggerRef), p = /* @__PURE__ */ s(
53
53
  _.button,
54
54
  {
55
55
  type: "button",
@@ -57,34 +57,34 @@ var y = "PopoverTrigger", D = i.forwardRef(
57
57
  "aria-expanded": o.open,
58
58
  "aria-controls": o.contentId,
59
59
  "data-state": $(o.open),
60
- ...n,
60
+ ...r,
61
61
  ref: c,
62
62
  onClick: P(e.onClick, o.onOpenToggle)
63
63
  }
64
64
  );
65
- return o.hasCustomAnchor ? p : /* @__PURE__ */ s(b, { asChild: !0, ...r, children: p });
65
+ return o.hasCustomAnchor ? p : /* @__PURE__ */ s(w, { asChild: !0, ...n, children: p });
66
66
  }
67
67
  );
68
- D.displayName = y;
68
+ D.displayName = S;
69
69
  var A = "PopoverPortal", [Y, ee] = E(A, {
70
70
  forceMount: void 0
71
71
  }), M = (e) => {
72
- const { __scopePopover: a, forceMount: t, children: n, container: o } = e, r = l(A, a);
73
- return /* @__PURE__ */ s(Y, { scope: a, forceMount: t, children: /* @__PURE__ */ s(x, { present: t || r.open, children: /* @__PURE__ */ s(H, { asChild: !0, container: o, children: n }) }) });
72
+ const { __scopePopover: a, forceMount: t, children: r, container: o } = e, n = l(A, a);
73
+ return /* @__PURE__ */ s(Y, { scope: a, forceMount: t, children: /* @__PURE__ */ s(x, { present: t || n.open, children: /* @__PURE__ */ s(H, { asChild: !0, container: o, children: r }) }) });
74
74
  };
75
75
  M.displayName = A;
76
76
  var d = "PopoverContent", T = i.forwardRef(
77
77
  (e, a) => {
78
- const t = ee(d, e.__scopePopover), { forceMount: n = t.forceMount, ...o } = e, r = l(d, e.__scopePopover);
79
- return /* @__PURE__ */ s(x, { present: n || r.open, children: r.modal ? /* @__PURE__ */ s(te, { ...o, ref: a }) : /* @__PURE__ */ s(re, { ...o, ref: a }) });
78
+ const t = ee(d, e.__scopePopover), { forceMount: r = t.forceMount, ...o } = e, n = l(d, e.__scopePopover);
79
+ return /* @__PURE__ */ s(x, { present: r || n.open, children: n.modal ? /* @__PURE__ */ s(te, { ...o, ref: a }) : /* @__PURE__ */ s(re, { ...o, ref: a }) });
80
80
  }
81
81
  );
82
82
  T.displayName = d;
83
83
  var oe = K("PopoverContent.RemoveScroll"), te = i.forwardRef(
84
84
  (e, a) => {
85
- const t = l(d, e.__scopePopover), n = i.useRef(null), o = O(a, n), r = i.useRef(!1);
85
+ const t = l(d, e.__scopePopover), r = i.useRef(null), o = O(a, r), n = i.useRef(!1);
86
86
  return i.useEffect(() => {
87
- const c = n.current;
87
+ const c = r.current;
88
88
  if (c) return U(c);
89
89
  }, []), /* @__PURE__ */ s(V, { as: oe, allowPinchZoom: !0, children: /* @__PURE__ */ s(
90
90
  k,
@@ -94,13 +94,13 @@ var oe = K("PopoverContent.RemoveScroll"), te = i.forwardRef(
94
94
  trapFocus: t.open,
95
95
  disableOutsidePointerEvents: !0,
96
96
  onCloseAutoFocus: P(e.onCloseAutoFocus, (c) => {
97
- c.preventDefault(), r.current || t.triggerRef.current?.focus();
97
+ c.preventDefault(), n.current || t.triggerRef.current?.focus();
98
98
  }),
99
99
  onPointerDownOutside: P(
100
100
  e.onPointerDownOutside,
101
101
  (c) => {
102
102
  const p = c.detail.originalEvent, f = p.button === 0 && p.ctrlKey === !0, v = p.button === 2 || f;
103
- r.current = v;
103
+ n.current = v;
104
104
  },
105
105
  { checkForDefaultPrevented: !1 }
106
106
  ),
@@ -114,7 +114,7 @@ var oe = K("PopoverContent.RemoveScroll"), te = i.forwardRef(
114
114
  }
115
115
  ), re = i.forwardRef(
116
116
  (e, a) => {
117
- const t = l(d, e.__scopePopover), n = i.useRef(!1), o = i.useRef(!1);
117
+ const t = l(d, e.__scopePopover), r = i.useRef(!1), o = i.useRef(!1);
118
118
  return /* @__PURE__ */ s(
119
119
  k,
120
120
  {
@@ -122,13 +122,13 @@ var oe = K("PopoverContent.RemoveScroll"), te = i.forwardRef(
122
122
  ref: a,
123
123
  trapFocus: !1,
124
124
  disableOutsidePointerEvents: !1,
125
- onCloseAutoFocus: (r) => {
126
- e.onCloseAutoFocus?.(r), r.defaultPrevented || (n.current || t.triggerRef.current?.focus(), r.preventDefault()), n.current = !1, o.current = !1;
125
+ onCloseAutoFocus: (n) => {
126
+ e.onCloseAutoFocus?.(n), n.defaultPrevented || (r.current || t.triggerRef.current?.focus(), n.preventDefault()), r.current = !1, o.current = !1;
127
127
  },
128
- onInteractOutside: (r) => {
129
- e.onInteractOutside?.(r), r.defaultPrevented || (n.current = !0, r.detail.originalEvent.type === "pointerdown" && (o.current = !0));
130
- const c = r.target;
131
- t.triggerRef.current?.contains(c) && r.preventDefault(), r.detail.originalEvent.type === "focusin" && o.current && r.preventDefault();
128
+ onInteractOutside: (n) => {
129
+ e.onInteractOutside?.(n), n.defaultPrevented || (r.current = !0, n.detail.originalEvent.type === "pointerdown" && (o.current = !0));
130
+ const c = n.target;
131
+ t.triggerRef.current?.contains(c) && n.preventDefault(), n.detail.originalEvent.type === "focusin" && o.current && n.preventDefault();
132
132
  }
133
133
  }
134
134
  );
@@ -137,9 +137,9 @@ var oe = K("PopoverContent.RemoveScroll"), te = i.forwardRef(
137
137
  (e, a) => {
138
138
  const {
139
139
  __scopePopover: t,
140
- trapFocus: n,
140
+ trapFocus: r,
141
141
  onOpenAutoFocus: o,
142
- onCloseAutoFocus: r,
142
+ onCloseAutoFocus: n,
143
143
  disableOutsidePointerEvents: c,
144
144
  onEscapeKeyDown: p,
145
145
  onPointerDownOutside: f,
@@ -152,9 +152,9 @@ var oe = K("PopoverContent.RemoveScroll"), te = i.forwardRef(
152
152
  {
153
153
  asChild: !0,
154
154
  loop: !0,
155
- trapped: n,
155
+ trapped: r,
156
156
  onMountAutoFocus: o,
157
- onUnmountAutoFocus: r,
157
+ onUnmountAutoFocus: n,
158
158
  children: /* @__PURE__ */ s(
159
159
  j,
160
160
  {
@@ -191,12 +191,12 @@ var oe = K("PopoverContent.RemoveScroll"), te = i.forwardRef(
191
191
  }
192
192
  ), I = "PopoverClose", ne = i.forwardRef(
193
193
  (e, a) => {
194
- const { __scopePopover: t, ...n } = e, o = l(I, t);
194
+ const { __scopePopover: t, ...r } = e, o = l(I, t);
195
195
  return /* @__PURE__ */ s(
196
196
  _.button,
197
197
  {
198
198
  type: "button",
199
- ...n,
199
+ ...r,
200
200
  ref: a,
201
201
  onClick: P(e.onClick, () => o.onOpenChange(!1))
202
202
  }
@@ -206,15 +206,15 @@ var oe = K("PopoverContent.RemoveScroll"), te = i.forwardRef(
206
206
  ne.displayName = I;
207
207
  var ae = "PopoverArrow", se = i.forwardRef(
208
208
  (e, a) => {
209
- const { __scopePopover: t, ...n } = e, o = g(t);
210
- return /* @__PURE__ */ s(J, { ...o, ...n, ref: a });
209
+ const { __scopePopover: t, ...r } = e, o = g(t);
210
+ return /* @__PURE__ */ s(J, { ...o, ...r, ref: a });
211
211
  }
212
212
  );
213
213
  se.displayName = ae;
214
214
  function $(e) {
215
215
  return e ? "open" : "closed";
216
216
  }
217
- var ce = F, ie = S, pe = D, le = M, ue = T;
217
+ var ce = F, ie = y, pe = D, le = M, ue = T;
218
218
  function me({ ...e }) {
219
219
  return /* @__PURE__ */ s(ce, { "data-slot": "popover", ...e });
220
220
  }
@@ -225,7 +225,7 @@ function Re({
225
225
  className: e,
226
226
  align: a = "center",
227
227
  sideOffset: t = 4,
228
- width: n = "w-fit",
228
+ width: r = "w-fit",
229
229
  ...o
230
230
  }) {
231
231
  return /* @__PURE__ */ s(le, { children: /* @__PURE__ */ s(
@@ -239,9 +239,12 @@ function Re({
239
239
  "data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2",
240
240
  "data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 h-fit",
241
241
  "max-h-[var(--radix-popover-content-max-height)] origin-(--radix-popover-content-transform-origin) rounded-lg border-none p-4 shadow-md outline-hidden",
242
+ "w-[var(--popover-width)]",
242
243
  e
243
244
  ),
244
- style: { width: `${n ? `${n}px` : "w-fit"}` },
245
+ style: {
246
+ "--popover-width": typeof r == "number" ? `${r}px` : r === "w-fit" ? "320px" : r
247
+ },
245
248
  ...o
246
249
  }
247
250
  ) });
@@ -0,0 +1,18 @@
1
+ import { ReactNode } from '../../../node_modules/react';
2
+ export type RadioButtonGroupProps = {
3
+ value?: string;
4
+ onValueChange?: (value: string) => void;
5
+ children: ReactNode;
6
+ className?: string;
7
+ isKeptActive?: boolean;
8
+ expanded?: boolean;
9
+ };
10
+ export type RadioButtonGroupItemProps = {
11
+ value: string;
12
+ children: ReactNode;
13
+ className?: string;
14
+ disabled?: boolean;
15
+ };
16
+ export declare const RadioButtonGroupBase: ({ value, onValueChange, children, className, isKeptActive, expanded, }: RadioButtonGroupProps) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const RadioButtonGroupItem: ({ value, children, className, disabled }: RadioButtonGroupItemProps) => import("react/jsx-runtime").JSX.Element;
18
+ //# sourceMappingURL=RadioButtonGroupBase.d.ts.map
@@ -0,0 +1,58 @@
1
+ "use client";
2
+ import "../styles/main.css";
3
+ import { jsx as s } from "react/jsx-runtime";
4
+ import { c as l } from "../twUtils-CRiPKpXj.js";
5
+ import { createContext as f, useContext as b } from "react";
6
+ const u = f(null), x = ({
7
+ value: e,
8
+ onValueChange: r,
9
+ children: i,
10
+ className: t,
11
+ isKeptActive: o = !1,
12
+ expanded: n = !1
13
+ }) => /* @__PURE__ */ s(u.Provider, { value: { value: e, onValueChange: r, isKeptActive: o, expanded: n }, children: /* @__PURE__ */ s(
14
+ "div",
15
+ {
16
+ role: "radiogroup",
17
+ "data-expanded": n,
18
+ className: l(
19
+ "flex h-fit w-fit items-center rounded-md [&_button:first-of-type]:rounded-l-md [&_button:last-of-type]:rounded-r-md",
20
+ "data-[expanded=true]:w-full",
21
+ t
22
+ ),
23
+ children: i
24
+ }
25
+ ) }), w = ({ value: e, children: r, className: i, disabled: t = !1 }) => {
26
+ const o = b(u);
27
+ if (!o)
28
+ throw new Error("RadioButtonGroupItem must be used within a RadioButtonGroup");
29
+ const { value: n, onValueChange: a, isKeptActive: c, expanded: g } = o, d = n === e;
30
+ return /* @__PURE__ */ s(
31
+ "button",
32
+ {
33
+ type: "button",
34
+ role: "radio",
35
+ "aria-checked": d,
36
+ "data-state": d ? "on" : "off",
37
+ disabled: t,
38
+ onClick: () => {
39
+ !t && a && a(e);
40
+ },
41
+ className: l(
42
+ "bg-toggle-bg inline-flex items-center justify-center gap-2 border text-sm font-medium disabled:pointer-events-none disabled:opacity-50",
43
+ "text-toggle-text hover:bg-toggle-bg--hover hover:text-toggle-text--hover transition-[colors] hover:cursor-pointer disabled:cursor-not-allowed",
44
+ "focus-visible:border-ring focus-visible:ring-ring/50 focus:outline-none focus-visible:ring-[3px] [&_svg]:pointer-events-none [&_svg]:shrink-0",
45
+ 'border-toggle-border hover:border-toggle-border--hover h-9 min-w-9 px-3 outline-none [&_svg:not([class*="size-"]):not([width]):not([height])]:size-4',
46
+ "rounded-none shadow-none focus:z-10 focus-visible:z-10 [&:not(:first-child)]:border-l-0",
47
+ g && "w-full",
48
+ c && "data-[state=on]:bg-toggle-bg--active data-[state=on]:text-toggle-text--active data-[state=on]:border-toggle-border--active",
49
+ i
50
+ ),
51
+ children: r
52
+ }
53
+ );
54
+ };
55
+ export {
56
+ x as RadioButtonGroupBase,
57
+ w as RadioButtonGroupItem
58
+ };
@@ -0,0 +1,6 @@
1
+ import { RadioButtonGroupBase } from './RadioButtonGroupBase';
2
+ import { ComponentProps } from '../../../node_modules/react';
3
+ export type RadioButtonGroupProps = ComponentProps<typeof RadioButtonGroupBase>;
4
+ export declare const RadioButtonGroup: ({ className, children, ...props }: RadioButtonGroupProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const RadioButtonGroupItem: ({ value, children, className, disabled }: import('./RadioButtonGroupBase').RadioButtonGroupItemProps) => import("react/jsx-runtime").JSX.Element;
6
+ //# sourceMappingURL=RadioButtonGroup.d.ts.map
@@ -0,0 +1,20 @@
1
+ import "./styles/main.css";
2
+ import { jsx as e } from "react/jsx-runtime";
3
+ import { RadioButtonGroupItem as u, RadioButtonGroupBase as m } from "./RadioButtonGroup/RadioButtonGroupBase.js";
4
+ import { c as n } from "./twUtils-CRiPKpXj.js";
5
+ import "react";
6
+ const s = ({ className: t, children: o, ...r }) => /* @__PURE__ */ e(
7
+ m,
8
+ {
9
+ className: n(
10
+ "flex h-fit w-fit items-center rounded-md [&_button:first-of-type]:rounded-l-md [&_button:last-of-type]:rounded-r-md",
11
+ t
12
+ ),
13
+ ...r,
14
+ children: o
15
+ }
16
+ ), f = u;
17
+ export {
18
+ s as RadioButtonGroup,
19
+ f as RadioButtonGroupItem
20
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAE3D,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAE3C,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,GAAG;IAClF,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACxB,CAAA;AAED,iBAAS,OAAO,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAE1E;AAED,iBAAS,cAAc,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAEpF;AAED,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,KAAgB,EAChB,UAAc,EACd,KAAe,EACf,GAAG,KAAK,EACT,EAAE,mBAAmB,2CAmBrB;AAED,iBAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC,2CAElF;AAED,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,CAAA"}
1
+ {"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAE3D,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAE3C,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,GAAG;IAClF,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACxB,CAAA;AAED,iBAAS,OAAO,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAE1E;AAED,iBAAS,cAAc,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAEpF;AAED,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,KAAgB,EAChB,UAAc,EACd,KAAe,EACf,GAAG,KAAK,EACT,EAAE,mBAAmB,2CAwBrB;AAED,iBAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC,2CAElF;AAED,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { RadioButtonGroupBase } from './RadioButtonGroupBase';
2
+ import { ComponentProps } from '../../../node_modules/react';
3
+ export type RadioButtonGroupProps = ComponentProps<typeof RadioButtonGroupBase>;
4
+ export declare const RadioButtonGroup: ({ className, children, ...props }: RadioButtonGroupProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const RadioButtonGroupItem: ({ value, children, className, disabled }: import('./RadioButtonGroupBase').RadioButtonGroupItemProps) => import("react/jsx-runtime").JSX.Element;
6
+ //# sourceMappingURL=RadioButtonGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioButtonGroup.d.ts","sourceRoot":"","sources":["../../../src/components/RadioButtonGroup/RadioButtonGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAoD,MAAM,wBAAwB,CAAA;AAE/G,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAE3C,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAE/E,eAAO,MAAM,gBAAgB,GAAI,mCAAmC,qBAAqB,4CAYxF,CAAA;AAED,eAAO,MAAM,oBAAoB,mJAA2B,CAAA"}