@spear-ai/spectral 1.3.21 → 1.3.23

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 (83) hide show
  1. package/dist/.js +93 -78
  2. package/dist/App.js +9 -1
  3. package/dist/Badge.js +9 -1
  4. package/dist/Button.js +10 -2
  5. package/dist/Card.js +13 -5
  6. package/dist/Drawer.js +24 -9
  7. package/dist/Icons/AnnotationsIcon.js +3 -3
  8. package/dist/Icons/CalendarIcon.js +8 -8
  9. package/dist/Icons/DeleteIcon.js +10 -10
  10. package/dist/Icons/DurationIcon.js +9 -9
  11. package/dist/Icons/EraserIcon.js +7 -7
  12. package/dist/Icons/GoToFirstIcon.js +10 -10
  13. package/dist/Icons/GoToLastIcon.js +8 -8
  14. package/dist/Icons/IconBase.js +8 -7
  15. package/dist/Icons/InfoIcon.js +32 -0
  16. package/dist/Icons/LabelIcon.js +6 -6
  17. package/dist/Icons/LassoIcon.js +3 -3
  18. package/dist/Icons/LineToolIcon.js +14 -14
  19. package/dist/Icons/LiveViewIcon.js +30 -30
  20. package/dist/Icons/LocationIcon.js +6 -6
  21. package/dist/Icons/MetadataIcon.js +8 -8
  22. package/dist/Icons/OntologyIcon.js +5 -5
  23. package/dist/Icons/PlayIcon.js +11 -11
  24. package/dist/Icons/PlusIcon.js +9 -9
  25. package/dist/Icons/ResetIcon.js +8 -8
  26. package/dist/Icons/ScissorsIcon.js +15 -15
  27. package/dist/Icons/SettingsIcon.js +42 -0
  28. package/dist/Icons/TrashIcon.js +1 -1
  29. package/dist/Icons/UndoIcon.js +5 -5
  30. package/dist/Icons/ZoomAllIcon.js +57 -25
  31. package/dist/Icons/ZoomXIcon.js +7 -7
  32. package/dist/Icons.js +47 -35
  33. package/dist/Label.js +9 -1
  34. package/dist/Popover.js +57 -43
  35. package/dist/RadioGroup/RadioGroupBase.js +120 -118
  36. package/dist/RadioGroup.js +49 -0
  37. package/dist/Skeleton.js +9 -1
  38. package/dist/Slider/SliderBase.js +1 -1
  39. package/dist/Slider.js +9 -1
  40. package/dist/Switch.js +9 -1
  41. package/dist/Toggle.js +9 -1
  42. package/dist/ToggleGroup.js +18 -10
  43. package/dist/Toolbar.js +9 -1
  44. package/dist/Tooltip.js +9 -1
  45. package/dist/assets/main.css +1 -1
  46. package/dist/components/Drawer/Drawer.d.ts +2 -0
  47. package/dist/components/Drawer/Drawer.d.ts.map +1 -1
  48. package/dist/components/Icons/IconBase.d.ts +5 -5
  49. package/dist/components/Icons/IconBase.d.ts.map +1 -1
  50. package/dist/components/Icons/InfoIcon.d.ts +3 -0
  51. package/dist/components/Icons/InfoIcon.d.ts.map +1 -0
  52. package/dist/components/Icons/SettingsIcon.d.ts +3 -0
  53. package/dist/components/Icons/SettingsIcon.d.ts.map +1 -0
  54. package/dist/components/Icons/ZoomAllIcon.d.ts.map +1 -1
  55. package/dist/components/Icons/index.d.ts +2 -0
  56. package/dist/components/Icons/index.d.ts.map +1 -1
  57. package/dist/components/Popover/Popover.d.ts +1 -1
  58. package/dist/components/Popover/Popover.d.ts.map +1 -1
  59. package/dist/components/RadioGroup/RadioGroup.d.ts +11 -0
  60. package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -0
  61. package/dist/components/RadioGroup/RadioGroupBase.d.ts +2 -0
  62. package/dist/components/RadioGroup/RadioGroupBase.d.ts.map +1 -1
  63. package/dist/{loader-circle-Btf6jOd5.js → createLucideIcon-CI1yJrZf.js} +9 -16
  64. package/dist/features/HorizonColorGrid/HorizonColorGrid.d.ts +3 -0
  65. package/dist/features/HorizonColorGrid/HorizonColorGrid.d.ts.map +1 -0
  66. package/dist/features/HorizonColorGrid.js +70 -0
  67. package/dist/features/LabelingTools.js +4 -2
  68. package/dist/features/SensorMetadata/SensorMetadata.d.ts +2 -0
  69. package/dist/features/SensorMetadata/SensorMetadata.d.ts.map +1 -0
  70. package/dist/features/SensorMetadata.js +85 -0
  71. package/dist/features/SettingsPopover/SettingsPopover.d.ts +2 -0
  72. package/dist/features/SettingsPopover/SettingsPopover.d.ts.map +1 -0
  73. package/dist/features/SettingsPopover.js +194 -0
  74. package/dist/index.d.ts +1 -0
  75. package/dist/index.d.ts.map +1 -1
  76. package/dist/loader-circle-CvdzOiQ_.js +11 -0
  77. package/dist/main.js +9 -1
  78. package/dist/themes/grayscale-theme.webp +0 -0
  79. package/dist/themes/green-black-theme.webp +0 -0
  80. package/dist/themes/reverse-grayscale-theme.webp +0 -0
  81. package/dist/themes/viridis-theme.webp +0 -0
  82. package/package.json +5 -2
  83. package/src/styles/main.css +1 -0
@@ -1,28 +1,60 @@
1
1
  "use client";
2
- import { jsxs as d, jsx as o } from "react/jsx-runtime";
3
- import k from "./IconBase.js";
4
- import { forwardRef as u } from "react";
5
- const L = ({ className: r, ariaHidden: t, title: e = "Instagram", description: n, size: s = 24 }, i) => /* @__PURE__ */ d(
6
- k,
7
- {
8
- size: s,
9
- className: r,
10
- title: e,
11
- description: n,
12
- "aria-hidden": t,
13
- ref: i,
14
- children: [
15
- /* @__PURE__ */ o("path", { d: "M18 9L21 12L18 15", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
16
- /* @__PURE__ */ o("path", { d: "M15 12H21", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
17
- /* @__PURE__ */ o("path", { d: "M6 9L3 12L6 15", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
18
- /* @__PURE__ */ o("path", { d: "M3 12H9", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
19
- /* @__PURE__ */ o("path", { d: "M9 18L12 21L15 18", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
20
- /* @__PURE__ */ o("path", { d: "M12 15V21", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
21
- /* @__PURE__ */ o("path", { d: "M15 6L12 3L9 6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
22
- /* @__PURE__ */ o("path", { d: "M12 3V9", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
23
- ]
24
- }
25
- ), h = u(L);
2
+ import { jsxs as t, jsx as o } from "react/jsx-runtime";
3
+ import k, { SvgIdContext as L } from "./IconBase.js";
4
+ import { forwardRef as h, useContext as l } from "react";
5
+ const u = ({ className: e, ariaHidden: n, title: i = "Zoom All", description: d, size: s = 24 }, c) => {
6
+ const r = l(L);
7
+ return /* @__PURE__ */ t(
8
+ k,
9
+ {
10
+ size: s,
11
+ className: e,
12
+ title: i,
13
+ description: d,
14
+ "aria-hidden": n,
15
+ ref: c,
16
+ children: [
17
+ /* @__PURE__ */ t("g", { "clip-path": `url(#${r}-clip0)`, children: [
18
+ /* @__PURE__ */ o("path", { d: "M21 19L10 19", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
19
+ /* @__PURE__ */ o(
20
+ "path",
21
+ {
22
+ d: "M12 17L10 19L12 21",
23
+ stroke: "currentColor",
24
+ strokeWidth: "2",
25
+ strokeLinecap: "round",
26
+ strokeLinejoin: "round"
27
+ }
28
+ ),
29
+ /* @__PURE__ */ o(
30
+ "path",
31
+ {
32
+ d: "M19 21L21 19L19 17",
33
+ stroke: "currentColor",
34
+ strokeWidth: "2",
35
+ strokeLinecap: "round",
36
+ strokeLinejoin: "round"
37
+ }
38
+ ),
39
+ /* @__PURE__ */ o("path", { d: "M5 14L5 3", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
40
+ /* @__PURE__ */ o("path", { d: "M7 5L5 3L3 5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
41
+ /* @__PURE__ */ o("path", { d: "M3 12L5 14L7 12", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
42
+ /* @__PURE__ */ o(
43
+ "path",
44
+ {
45
+ d: "M21 12C21 12.5304 20.7893 13.0391 20.4142 13.4142C20.0391 13.7893 19.5304 14 19 14L12 14C11.4696 14 10.9609 13.7893 10.5858 13.4142C10.2107 13.0391 10 12.5304 10 12L10 5C10 4.46957 10.2107 3.96086 10.5858 3.58579C10.9609 3.21071 11.4696 3 12 3L19 3C19.5304 3 20.0391 3.21071 20.4142 3.58579C20.7893 3.96086 21 4.46957 21 5L21 12Z",
46
+ stroke: "currentColor",
47
+ strokeWidth: "2",
48
+ strokeLinecap: "round",
49
+ strokeLinejoin: "round"
50
+ }
51
+ )
52
+ ] }),
53
+ /* @__PURE__ */ o("defs", { children: /* @__PURE__ */ o("clipPath", { id: `${r}-clip0`, children: /* @__PURE__ */ o("rect", { width: "24", height: "24", fill: "white", transform: "matrix(-1 0 0 -1 24 24)" }) }) })
54
+ ]
55
+ }
56
+ );
57
+ }, m = h(u);
26
58
  export {
27
- h as ZoomAllIcon
59
+ m as ZoomAllIcon
28
60
  };
@@ -1,16 +1,16 @@
1
1
  "use client";
2
2
  import { jsxs as d, jsx as o } from "react/jsx-runtime";
3
- import a from "./IconBase.js";
4
- import { forwardRef as c } from "react";
5
- const k = ({ className: r, ariaHidden: t, title: e = "Instagram", description: n, size: s = 24 }, i) => /* @__PURE__ */ d(
6
- a,
3
+ import c from "./IconBase.js";
4
+ import { forwardRef as k } from "react";
5
+ const a = ({ className: r, ariaHidden: t, title: e = "Zoom X Axis", description: n, size: i = 24 }, s) => /* @__PURE__ */ d(
6
+ c,
7
7
  {
8
- size: s,
8
+ size: i,
9
9
  className: r,
10
10
  title: e,
11
11
  description: n,
12
12
  "aria-hidden": t,
13
- ref: i,
13
+ ref: s,
14
14
  children: [
15
15
  /* @__PURE__ */ o(
16
16
  "path",
@@ -35,7 +35,7 @@ const k = ({ className: r, ariaHidden: t, title: e = "Instagram", description: n
35
35
  /* @__PURE__ */ o("path", { d: "M2.375 12H21.625", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
36
36
  ]
37
37
  }
38
- ), m = c(k);
38
+ ), m = k(a);
39
39
  export {
40
40
  m as ZoomXIcon
41
41
  };
package/dist/Icons.js CHANGED
@@ -1,52 +1,64 @@
1
1
  "use client";
2
- import './assets/main.css';
2
+ (function(){
3
+ if (typeof document === 'undefined') return;
4
+ if (document.querySelector('link[data-spectral-css]')) return;
5
+ var link = document.createElement('link');
6
+ link.rel = 'stylesheet';
7
+ link.setAttribute('data-spectral-css', '');
8
+ link.href = new URL('./assets/main.css', import.meta.url).href;
9
+ document.head.appendChild(link);
10
+ })();
3
11
  import { AnnotationsIcon as e } from "./Icons/AnnotationsIcon.js";
4
12
  import { CalendarIcon as n } from "./Icons/CalendarIcon.js";
5
13
  import { ClockIcon as m } from "./Icons/ClockIcon.js";
6
- import { DeleteIcon as p } from "./Icons/DeleteIcon.js";
7
- import { DurationIcon as I } from "./Icons/DurationIcon.js";
14
+ import { DeleteIcon as I } from "./Icons/DeleteIcon.js";
15
+ import { DurationIcon as x } from "./Icons/DurationIcon.js";
8
16
  import { EraserIcon as s } from "./Icons/EraserIcon.js";
9
17
  import { GoToFirstIcon as i } from "./Icons/GoToFirstIcon.js";
10
18
  import { GoToLastIcon as T } from "./Icons/GoToLastIcon.js";
11
- import { LabelIcon as Z } from "./Icons/LabelIcon.js";
12
- import { LassoIcon as y } from "./Icons/LassoIcon.js";
13
- import { LineToolIcon as C } from "./Icons/LineToolIcon.js";
14
- import { LiveViewIcon as G } from "./Icons/LiveViewIcon.js";
19
+ import { InfoIcon as Z } from "./Icons/InfoIcon.js";
20
+ import { LabelIcon as u } from "./Icons/LabelIcon.js";
21
+ import { LassoIcon as A } from "./Icons/LassoIcon.js";
22
+ import { LineToolIcon as D } from "./Icons/LineToolIcon.js";
23
+ import { LiveViewIcon as P } from "./Icons/LiveViewIcon.js";
15
24
  import { LocationIcon as b } from "./Icons/LocationIcon.js";
16
- import { MetadataIcon as h } from "./Icons/MetadataIcon.js";
17
- import { OntologyIcon as v } from "./Icons/OntologyIcon.js";
18
- import { PlayIcon as E } from "./Icons/PlayIcon.js";
19
- import { PlusIcon as M } from "./Icons/PlusIcon.js";
20
- import { ResetIcon as R } from "./Icons/ResetIcon.js";
21
- import { ScissorsIcon as U } from "./Icons/ScissorsIcon.js";
22
- import { TrashIcon as X } from "./Icons/TrashIcon.js";
23
- import { UndoIcon as j } from "./Icons/UndoIcon.js";
24
- import { ZoomAllIcon as z } from "./Icons/ZoomAllIcon.js";
25
- import { ZoomXIcon as H } from "./Icons/ZoomXIcon.js";
26
- import { ZoomYIcon as K } from "./Icons/ZoomYIcon.js";
25
+ import { MetadataIcon as k } from "./Icons/MetadataIcon.js";
26
+ import { OntologyIcon as w } from "./Icons/OntologyIcon.js";
27
+ import { PlayIcon as F } from "./Icons/PlayIcon.js";
28
+ import { PlusIcon as O } from "./Icons/PlusIcon.js";
29
+ import { ResetIcon as U } from "./Icons/ResetIcon.js";
30
+ import { ScissorsIcon as X } from "./Icons/ScissorsIcon.js";
31
+ import { SettingsIcon as j } from "./Icons/SettingsIcon.js";
32
+ import { TrashIcon as z } from "./Icons/TrashIcon.js";
33
+ import { UndoIcon as H } from "./Icons/UndoIcon.js";
34
+ import { ZoomAllIcon as K } from "./Icons/ZoomAllIcon.js";
35
+ import { ZoomXIcon as Q } from "./Icons/ZoomXIcon.js";
36
+ import { ZoomYIcon as _ } from "./Icons/ZoomYIcon.js";
27
37
  export {
28
38
  e as AnnotationsIcon,
29
39
  n as CalendarIcon,
30
40
  m as ClockIcon,
31
- p as DeleteIcon,
32
- I as DurationIcon,
41
+ I as DeleteIcon,
42
+ x as DurationIcon,
33
43
  s as EraserIcon,
34
44
  i as GoToFirstIcon,
35
45
  T as GoToLastIcon,
36
- Z as LabelIcon,
37
- y as LassoIcon,
38
- C as LineToolIcon,
39
- G as LiveViewIcon,
46
+ Z as InfoIcon,
47
+ u as LabelIcon,
48
+ A as LassoIcon,
49
+ D as LineToolIcon,
50
+ P as LiveViewIcon,
40
51
  b as LocationIcon,
41
- h as MetadataIcon,
42
- v as OntologyIcon,
43
- E as PlayIcon,
44
- M as PlusIcon,
45
- R as ResetIcon,
46
- U as ScissorsIcon,
47
- X as TrashIcon,
48
- j as UndoIcon,
49
- z as ZoomAllIcon,
50
- H as ZoomXIcon,
51
- K as ZoomYIcon
52
+ k as MetadataIcon,
53
+ w as OntologyIcon,
54
+ F as PlayIcon,
55
+ O as PlusIcon,
56
+ U as ResetIcon,
57
+ X as ScissorsIcon,
58
+ j as SettingsIcon,
59
+ z as TrashIcon,
60
+ H as UndoIcon,
61
+ K as ZoomAllIcon,
62
+ Q as ZoomXIcon,
63
+ _ as ZoomYIcon
52
64
  };
package/dist/Label.js CHANGED
@@ -1,5 +1,13 @@
1
1
  "use client";
2
- import './assets/main.css';
2
+ (function(){
3
+ if (typeof document === 'undefined') return;
4
+ if (document.querySelector('link[data-spectral-css]')) return;
5
+ var link = document.createElement('link');
6
+ link.rel = 'stylesheet';
7
+ link.setAttribute('data-spectral-css', '');
8
+ link.href = new URL('./assets/main.css', import.meta.url).href;
9
+ document.head.appendChild(link);
10
+ })();
3
11
  import { jsx as l } from "react/jsx-runtime";
4
12
  import { c as s } from "./twUtils-CRiPKpXj.js";
5
13
  import { c as t } from "./index-CRBC94ik.js";
package/dist/Popover.js CHANGED
@@ -1,23 +1,31 @@
1
1
  "use client";
2
- import './assets/main.css';
2
+ (function(){
3
+ if (typeof document === 'undefined') return;
4
+ if (document.querySelector('link[data-spectral-css]')) return;
5
+ var link = document.createElement('link');
6
+ link.rel = 'stylesheet';
7
+ link.setAttribute('data-spectral-css', '');
8
+ link.href = new URL('./assets/main.css', import.meta.url).href;
9
+ document.head.appendChild(link);
10
+ })();
3
11
  import { jsx as s } from "react/jsx-runtime";
4
12
  import * as i from "react";
5
13
  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
14
  import { h as U, R as V, u as W, F as Z } from "./index-gg2zpNk0.js";
7
- import { c as b, R as q, A as w, C as B, a as J } from "./index-sDEISz8i.js";
15
+ import { c as w, R as q, A as b, C as B, a as J } from "./index-sDEISz8i.js";
8
16
  import { c as Q } from "./twUtils-CRiPKpXj.js";
9
17
  var C = "Popover", [E, he] = z(C, [
10
- b
11
- ]), g = b(), [X, l] = E(C), F = (e) => {
18
+ w
19
+ ]), g = w(), [X, l] = E(C), F = (e) => {
12
20
  const {
13
- __scopePopover: n,
21
+ __scopePopover: a,
14
22
  children: t,
15
- open: a,
23
+ open: n,
16
24
  defaultOpen: o,
17
25
  onOpenChange: r,
18
26
  modal: c = !1
19
- } = e, p = g(n), f = i.useRef(null), [v, h] = i.useState(!1), [m, u] = L({
20
- prop: a,
27
+ } = e, p = g(a), f = i.useRef(null), [v, h] = i.useState(!1), [m, u] = L({
28
+ prop: n,
21
29
  defaultProp: o ?? !1,
22
30
  onChange: r,
23
31
  caller: C
@@ -25,7 +33,7 @@ var C = "Popover", [E, he] = z(C, [
25
33
  return /* @__PURE__ */ s(q, { ...p, children: /* @__PURE__ */ s(
26
34
  X,
27
35
  {
28
- scope: n,
36
+ scope: a,
29
37
  contentId: G(),
30
38
  triggerRef: f,
31
39
  open: m,
@@ -41,15 +49,15 @@ var C = "Popover", [E, he] = z(C, [
41
49
  };
42
50
  F.displayName = C;
43
51
  var N = "PopoverAnchor", S = i.forwardRef(
44
- (e, n) => {
45
- const { __scopePopover: t, ...a } = e, o = l(N, t), r = g(t), { onCustomAnchorAdd: c, onCustomAnchorRemove: p } = o;
46
- return i.useEffect(() => (c(), () => p()), [c, p]), /* @__PURE__ */ s(w, { ...r, ...a, ref: n });
52
+ (e, a) => {
53
+ const { __scopePopover: t, ...n } = e, o = l(N, t), r = g(t), { onCustomAnchorAdd: c, onCustomAnchorRemove: p } = o;
54
+ return i.useEffect(() => (c(), () => p()), [c, p]), /* @__PURE__ */ s(b, { ...r, ...n, ref: a });
47
55
  }
48
56
  );
49
57
  S.displayName = N;
50
58
  var y = "PopoverTrigger", D = i.forwardRef(
51
- (e, n) => {
52
- const { __scopePopover: t, ...a } = e, o = l(y, t), r = g(t), c = O(n, o.triggerRef), p = /* @__PURE__ */ s(
59
+ (e, a) => {
60
+ const { __scopePopover: t, ...n } = e, o = l(y, t), r = g(t), c = O(a, o.triggerRef), p = /* @__PURE__ */ s(
53
61
  _.button,
54
62
  {
55
63
  type: "button",
@@ -57,34 +65,34 @@ var y = "PopoverTrigger", D = i.forwardRef(
57
65
  "aria-expanded": o.open,
58
66
  "aria-controls": o.contentId,
59
67
  "data-state": $(o.open),
60
- ...a,
68
+ ...n,
61
69
  ref: c,
62
70
  onClick: P(e.onClick, o.onOpenToggle)
63
71
  }
64
72
  );
65
- return o.hasCustomAnchor ? p : /* @__PURE__ */ s(w, { asChild: !0, ...r, children: p });
73
+ return o.hasCustomAnchor ? p : /* @__PURE__ */ s(b, { asChild: !0, ...r, children: p });
66
74
  }
67
75
  );
68
76
  D.displayName = y;
69
77
  var A = "PopoverPortal", [Y, ee] = E(A, {
70
78
  forceMount: void 0
71
79
  }), M = (e) => {
72
- const { __scopePopover: n, forceMount: t, children: a, container: o } = e, r = l(A, n);
73
- return /* @__PURE__ */ s(Y, { scope: n, forceMount: t, children: /* @__PURE__ */ s(x, { present: t || r.open, children: /* @__PURE__ */ s(H, { asChild: !0, container: o, children: a }) }) });
80
+ const { __scopePopover: a, forceMount: t, children: n, container: o } = e, r = l(A, a);
81
+ 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 }) }) });
74
82
  };
75
83
  M.displayName = A;
76
84
  var d = "PopoverContent", T = i.forwardRef(
77
- (e, n) => {
78
- const t = ee(d, e.__scopePopover), { forceMount: a = t.forceMount, ...o } = e, r = l(d, e.__scopePopover);
79
- return /* @__PURE__ */ s(x, { present: a || r.open, children: r.modal ? /* @__PURE__ */ s(te, { ...o, ref: n }) : /* @__PURE__ */ s(re, { ...o, ref: n }) });
85
+ (e, a) => {
86
+ const t = ee(d, e.__scopePopover), { forceMount: n = t.forceMount, ...o } = e, r = l(d, e.__scopePopover);
87
+ return /* @__PURE__ */ s(x, { present: n || r.open, children: r.modal ? /* @__PURE__ */ s(te, { ...o, ref: a }) : /* @__PURE__ */ s(re, { ...o, ref: a }) });
80
88
  }
81
89
  );
82
90
  T.displayName = d;
83
91
  var oe = K("PopoverContent.RemoveScroll"), te = i.forwardRef(
84
- (e, n) => {
85
- const t = l(d, e.__scopePopover), a = i.useRef(null), o = O(n, a), r = i.useRef(!1);
92
+ (e, a) => {
93
+ const t = l(d, e.__scopePopover), n = i.useRef(null), o = O(a, n), r = i.useRef(!1);
86
94
  return i.useEffect(() => {
87
- const c = a.current;
95
+ const c = n.current;
88
96
  if (c) return U(c);
89
97
  }, []), /* @__PURE__ */ s(V, { as: oe, allowPinchZoom: !0, children: /* @__PURE__ */ s(
90
98
  k,
@@ -113,20 +121,20 @@ var oe = K("PopoverContent.RemoveScroll"), te = i.forwardRef(
113
121
  ) });
114
122
  }
115
123
  ), re = i.forwardRef(
116
- (e, n) => {
117
- const t = l(d, e.__scopePopover), a = i.useRef(!1), o = i.useRef(!1);
124
+ (e, a) => {
125
+ const t = l(d, e.__scopePopover), n = i.useRef(!1), o = i.useRef(!1);
118
126
  return /* @__PURE__ */ s(
119
127
  k,
120
128
  {
121
129
  ...e,
122
- ref: n,
130
+ ref: a,
123
131
  trapFocus: !1,
124
132
  disableOutsidePointerEvents: !1,
125
133
  onCloseAutoFocus: (r) => {
126
- e.onCloseAutoFocus?.(r), r.defaultPrevented || (a.current || t.triggerRef.current?.focus(), r.preventDefault()), a.current = !1, o.current = !1;
134
+ e.onCloseAutoFocus?.(r), r.defaultPrevented || (n.current || t.triggerRef.current?.focus(), r.preventDefault()), n.current = !1, o.current = !1;
127
135
  },
128
136
  onInteractOutside: (r) => {
129
- e.onInteractOutside?.(r), r.defaultPrevented || (a.current = !0, r.detail.originalEvent.type === "pointerdown" && (o.current = !0));
137
+ e.onInteractOutside?.(r), r.defaultPrevented || (n.current = !0, r.detail.originalEvent.type === "pointerdown" && (o.current = !0));
130
138
  const c = r.target;
131
139
  t.triggerRef.current?.contains(c) && r.preventDefault(), r.detail.originalEvent.type === "focusin" && o.current && r.preventDefault();
132
140
  }
@@ -134,10 +142,10 @@ var oe = K("PopoverContent.RemoveScroll"), te = i.forwardRef(
134
142
  );
135
143
  }
136
144
  ), k = i.forwardRef(
137
- (e, n) => {
145
+ (e, a) => {
138
146
  const {
139
147
  __scopePopover: t,
140
- trapFocus: a,
148
+ trapFocus: n,
141
149
  onOpenAutoFocus: o,
142
150
  onCloseAutoFocus: r,
143
151
  disableOutsidePointerEvents: c,
@@ -152,7 +160,7 @@ var oe = K("PopoverContent.RemoveScroll"), te = i.forwardRef(
152
160
  {
153
161
  asChild: !0,
154
162
  loop: !0,
155
- trapped: a,
163
+ trapped: n,
156
164
  onMountAutoFocus: o,
157
165
  onUnmountAutoFocus: r,
158
166
  children: /* @__PURE__ */ s(
@@ -173,7 +181,7 @@ var oe = K("PopoverContent.RemoveScroll"), te = i.forwardRef(
173
181
  id: u.contentId,
174
182
  ...R,
175
183
  ...m,
176
- ref: n,
184
+ ref: a,
177
185
  style: {
178
186
  ...m.style,
179
187
  "--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)",
@@ -190,14 +198,14 @@ var oe = K("PopoverContent.RemoveScroll"), te = i.forwardRef(
190
198
  );
191
199
  }
192
200
  ), I = "PopoverClose", ne = i.forwardRef(
193
- (e, n) => {
194
- const { __scopePopover: t, ...a } = e, o = l(I, t);
201
+ (e, a) => {
202
+ const { __scopePopover: t, ...n } = e, o = l(I, t);
195
203
  return /* @__PURE__ */ s(
196
204
  _.button,
197
205
  {
198
206
  type: "button",
199
- ...a,
200
- ref: n,
207
+ ...n,
208
+ ref: a,
201
209
  onClick: P(e.onClick, () => o.onOpenChange(!1))
202
210
  }
203
211
  );
@@ -205,9 +213,9 @@ var oe = K("PopoverContent.RemoveScroll"), te = i.forwardRef(
205
213
  );
206
214
  ne.displayName = I;
207
215
  var ae = "PopoverArrow", se = i.forwardRef(
208
- (e, n) => {
209
- const { __scopePopover: t, ...a } = e, o = g(t);
210
- return /* @__PURE__ */ s(J, { ...o, ...a, ref: n });
216
+ (e, a) => {
217
+ const { __scopePopover: t, ...n } = e, o = g(t);
218
+ return /* @__PURE__ */ s(J, { ...o, ...n, ref: a });
211
219
  }
212
220
  );
213
221
  se.displayName = ae;
@@ -221,12 +229,18 @@ function me({ ...e }) {
221
229
  function Ce({ ...e }) {
222
230
  return /* @__PURE__ */ s(pe, { asChild: !0, "data-slot": "popover-trigger", ...e });
223
231
  }
224
- function Re({ className: e, align: n = "center", sideOffset: t = 4, width: a = 320, ...o }) {
232
+ function Re({
233
+ className: e,
234
+ align: a = "center",
235
+ sideOffset: t = 4,
236
+ width: n = "w-fit",
237
+ ...o
238
+ }) {
225
239
  return /* @__PURE__ */ s(le, { children: /* @__PURE__ */ s(
226
240
  ue,
227
241
  {
228
242
  "data-slot": "popover-content",
229
- align: n,
243
+ align: a,
230
244
  sideOffset: t,
231
245
  className: Q(
232
246
  "bg-popover-bg text-popover-text data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
@@ -235,7 +249,7 @@ function Re({ className: e, align: n = "center", sideOffset: t = 4, width: a = 3
235
249
  "max-h-[var(--radix-popover-content-max-height)] origin-(--radix-popover-content-transform-origin) rounded-lg border-none p-4 shadow-md outline-hidden",
236
250
  e
237
251
  ),
238
- style: { width: `${a}px` },
252
+ style: { width: `${n ? `${n}px` : "w-fit"}` },
239
253
  ...o
240
254
  }
241
255
  ) });