@spear-ai/spectral 1.3.20 → 1.3.22

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 (78) hide show
  1. package/dist/.js +84 -77
  2. package/dist/Button.js +1 -1
  3. package/dist/Card.js +4 -4
  4. package/dist/Drawer.js +15 -8
  5. package/dist/Icons/AnnotationsIcon.js +3 -3
  6. package/dist/Icons/CalendarIcon.js +8 -8
  7. package/dist/Icons/DeleteIcon.js +10 -10
  8. package/dist/Icons/DurationIcon.js +9 -9
  9. package/dist/Icons/EraserIcon.js +7 -7
  10. package/dist/Icons/GoToFirstIcon.js +10 -10
  11. package/dist/Icons/GoToLastIcon.js +8 -8
  12. package/dist/Icons/IconBase.js +8 -7
  13. package/dist/Icons/InfoIcon.js +32 -0
  14. package/dist/Icons/LabelIcon.js +6 -6
  15. package/dist/Icons/LassoIcon.js +3 -3
  16. package/dist/Icons/LineToolIcon.js +14 -14
  17. package/dist/Icons/LiveViewIcon.js +30 -30
  18. package/dist/Icons/LocationIcon.js +6 -6
  19. package/dist/Icons/MetadataIcon.js +8 -8
  20. package/dist/Icons/OntologyIcon.js +5 -5
  21. package/dist/Icons/PlayIcon.js +11 -11
  22. package/dist/Icons/PlusIcon.js +9 -9
  23. package/dist/Icons/ResetIcon.js +8 -8
  24. package/dist/Icons/ScissorsIcon.js +15 -15
  25. package/dist/Icons/SettingsIcon.js +42 -0
  26. package/dist/Icons/TrashIcon.js +1 -1
  27. package/dist/Icons/UndoIcon.js +5 -5
  28. package/dist/Icons/ZoomAllIcon.js +57 -25
  29. package/dist/Icons/ZoomXIcon.js +7 -7
  30. package/dist/Icons.js +38 -34
  31. package/dist/Popover.js +48 -42
  32. package/dist/RadioGroup/RadioGroupBase.js +120 -118
  33. package/dist/RadioGroup.js +41 -0
  34. package/dist/Slider/SliderBase.js +98 -99
  35. package/dist/Slider.js +3 -3
  36. package/dist/ToggleGroup.js +9 -9
  37. package/dist/assets/main.css +1 -1
  38. package/dist/components/Drawer/Drawer.d.ts +2 -0
  39. package/dist/components/Drawer/Drawer.d.ts.map +1 -1
  40. package/dist/components/Icons/IconBase.d.ts +5 -5
  41. package/dist/components/Icons/IconBase.d.ts.map +1 -1
  42. package/dist/components/Icons/InfoIcon.d.ts +3 -0
  43. package/dist/components/Icons/InfoIcon.d.ts.map +1 -0
  44. package/dist/components/Icons/SettingsIcon.d.ts +3 -0
  45. package/dist/components/Icons/SettingsIcon.d.ts.map +1 -0
  46. package/dist/components/Icons/ZoomAllIcon.d.ts.map +1 -1
  47. package/dist/components/Icons/index.d.ts +2 -0
  48. package/dist/components/Icons/index.d.ts.map +1 -1
  49. package/dist/components/Popover/Popover.d.ts +1 -1
  50. package/dist/components/Popover/Popover.d.ts.map +1 -1
  51. package/dist/components/RadioGroup/RadioGroup.d.ts +11 -0
  52. package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -0
  53. package/dist/components/RadioGroup/RadioGroupBase.d.ts +2 -0
  54. package/dist/components/RadioGroup/RadioGroupBase.d.ts.map +1 -1
  55. package/dist/components/Slider/Slider.d.ts +1 -1
  56. package/dist/components/Slider/Slider.d.ts.map +1 -1
  57. package/dist/components/Slider/SliderBase.d.ts +2 -2
  58. package/dist/components/Slider/SliderBase.d.ts.map +1 -1
  59. package/dist/{loader-circle-Btf6jOd5.js → createLucideIcon-CI1yJrZf.js} +9 -16
  60. package/dist/features/HorizonColorGrid/HorizonColorGrid.d.ts +3 -0
  61. package/dist/features/HorizonColorGrid/HorizonColorGrid.d.ts.map +1 -0
  62. package/dist/features/HorizonColorGrid.js +70 -0
  63. package/dist/features/LabelingTools.js +4 -2
  64. package/dist/features/SensorMetadata/SensorMetadata.d.ts +2 -0
  65. package/dist/features/SensorMetadata/SensorMetadata.d.ts.map +1 -0
  66. package/dist/features/SensorMetadata.js +85 -0
  67. package/dist/features/SettingsPopover/SettingsPopover.d.ts +2 -0
  68. package/dist/features/SettingsPopover/SettingsPopover.d.ts.map +1 -0
  69. package/dist/features/SettingsPopover.js +194 -0
  70. package/dist/index.d.ts +1 -0
  71. package/dist/index.d.ts.map +1 -1
  72. package/dist/loader-circle-CvdzOiQ_.js +11 -0
  73. package/dist/themes/grayscale-theme.webp +0 -0
  74. package/dist/themes/green-black-theme.webp +0 -0
  75. package/dist/themes/reverse-grayscale-theme.webp +0 -0
  76. package/dist/themes/viridis-theme.webp +0 -0
  77. package/package.json +5 -2
  78. package/src/styles/main.css +1 -0
@@ -1,80 +1,80 @@
1
1
  "use client";
2
2
  import { jsx as k, jsxs as Q } from "react/jsx-runtime";
3
3
  import { Slot as P } from "../primitives/slot.js";
4
- import { createContext as W, forwardRef as z, useEffect as Z, useRef as B, useState as F, useCallback as A, useContext as U, createRef as _ } from "react";
5
- function E(...r) {
4
+ import { createContext as W, forwardRef as E, useEffect as Z, useRef as G, useState as B, useCallback as A, useContext as F, createRef as _ } from "react";
5
+ function x(...r) {
6
6
  return r.filter(Boolean).join(" ");
7
7
  }
8
- function I(r, o, e) {
9
- return Math.min(e, Math.max(o, r));
8
+ function I(r, i, e) {
9
+ return Math.min(e, Math.max(i, r));
10
10
  }
11
- function j(r, o, e) {
12
- const a = Math.round((r - e) / o), l = e + a * o;
11
+ function U(r, i, e) {
12
+ const a = Math.round((r - e) / i), l = e + a * i;
13
13
  return Number(l.toFixed(10));
14
14
  }
15
- function L(r, o, e) {
16
- return (r - o) * 100 / (e - o);
15
+ function L(r, i, e) {
16
+ return (r - i) * 100 / (e - i);
17
17
  }
18
- function tt(r, o, e) {
19
- return o + r / 100 * (e - o);
18
+ function tt(r, i, e) {
19
+ return i + r / 100 * (e - i);
20
20
  }
21
- function et(r, o) {
21
+ function et(r, i) {
22
22
  let e = 0, a = 1 / 0;
23
23
  for (let l = 0; l < r.length; l += 1) {
24
- const n = Math.abs(r[l] - o);
24
+ const n = Math.abs(r[l] - i);
25
25
  n < a && (a = n, e = l);
26
26
  }
27
27
  return e;
28
28
  }
29
29
  function nt(r) {
30
- const { value: o, defaultValue: e, onChange: a } = r, [l, n] = F(e), s = Array.isArray(o), t = s ? o : l, i = A(
30
+ const { value: i, defaultValue: e, onChange: a } = r, [l, n] = B(e), s = Array.isArray(i), t = s ? i : l, o = A(
31
31
  (u) => {
32
32
  const d = typeof u == "function" ? u(t) : u;
33
33
  s || n(d), a?.(d);
34
34
  },
35
35
  [s, a, t]
36
36
  );
37
- return [t, i];
37
+ return [t, o];
38
38
  }
39
- const x = W(null), rt = z(
39
+ const z = W(null), rt = E(
40
40
  ({
41
41
  asChild: r,
42
- className: o,
42
+ className: i,
43
43
  value: e,
44
44
  defaultValue: a,
45
45
  onValueChange: l,
46
46
  onValueCommit: n,
47
47
  min: s = 0,
48
48
  max: t = 100,
49
- step: i = 1,
49
+ step: o = 1,
50
50
  minStepsBetweenThumbs: u = 0,
51
51
  orientation: d = "horizontal",
52
52
  dir: S = "ltr",
53
53
  disabled: b = !1,
54
- name: p,
54
+ name: h,
55
55
  form: N,
56
56
  required: T,
57
57
  children: V,
58
58
  ...$
59
59
  }, c) => {
60
- const [m, f] = nt({
60
+ const [m, p] = nt({
61
61
  value: e,
62
62
  defaultValue: a && a.length > 0 ? a : [s],
63
63
  onChange: l
64
64
  });
65
65
  Z(() => {
66
- f((g) => X(g, { min: s, max: t, step: i, minStepsBetweenThumbs: u }));
67
- }, [s, t, i, u, f]);
68
- const v = B(null), h = B([]), [y, C] = F(null), w = A(
66
+ p((g) => X(g, { min: s, max: t, step: o, minStepsBetweenThumbs: u }));
67
+ }, [s, t, o, u]);
68
+ const v = G(null), f = G([]), [y, C] = B(null), w = A(
69
69
  (g, R) => {
70
- const D = X(g, { min: s, max: t, step: i, minStepsBetweenThumbs: u });
71
- f(D), R?.commit && n?.(D);
70
+ const D = X(g, { min: s, max: t, step: o, minStepsBetweenThumbs: u });
71
+ p(D), R?.commit && n?.(D);
72
72
  },
73
- [t, s, u, n, f, i]
73
+ [t, s, u, n, p, o]
74
74
  ), K = A(
75
75
  (g, R, D) => {
76
- const G = [...m];
77
- G[g] = R, w(G, D);
76
+ const j = [...m];
77
+ j[g] = R, w(j, D);
78
78
  },
79
79
  [w, m]
80
80
  ), M = {
@@ -82,36 +82,36 @@ const x = W(null), rt = z(
82
82
  setValues: w,
83
83
  min: s,
84
84
  max: t,
85
- step: i,
85
+ step: o,
86
86
  minStepsBetweenThumbs: u,
87
87
  orientation: d,
88
88
  dir: S,
89
89
  disabled: b,
90
90
  trackRef: v,
91
- thumbsRef: h,
91
+ thumbsRef: f,
92
92
  activeIndex: y,
93
93
  setActiveIndex: C,
94
94
  updateAtIndex: K
95
95
  }, J = r ? P : "div", O = c;
96
- return /* @__PURE__ */ k(x.Provider, { value: M, children: /* @__PURE__ */ Q(
96
+ return /* @__PURE__ */ k(z.Provider, { value: M, children: /* @__PURE__ */ Q(
97
97
  J,
98
98
  {
99
99
  ref: O,
100
100
  role: "presentation",
101
101
  "data-orientation": d,
102
102
  "data-disabled": b ? "" : void 0,
103
- className: E(
103
+ className: x(
104
104
  "relative touch-none select-none",
105
105
  d === "horizontal" ? "h-6 w-full" : "h-full w-6",
106
- o
106
+ i
107
107
  ),
108
108
  ...$,
109
109
  children: [
110
- p && M.values.map((g, R) => /* @__PURE__ */ k(
110
+ h && M.values.map((g, R) => /* @__PURE__ */ k(
111
111
  "input",
112
112
  {
113
113
  type: "hidden",
114
- name: M.values.length > 1 ? `${p}[]` : p,
114
+ name: M.values.length > 1 ? `${h}[]` : h,
115
115
  value: String(g),
116
116
  form: N,
117
117
  required: T && R === 0,
@@ -125,29 +125,29 @@ const x = W(null), rt = z(
125
125
  ) });
126
126
  }
127
127
  );
128
- rt.displayName = "Slider";
129
- function X(r, o) {
130
- const { min: e, max: a, step: l, minStepsBetweenThumbs: n } = o, s = r.map((i) => I(j(i, l, e), e, a));
131
- if (s.sort((i, u) => i - u), s.length <= 1 || n <= 0) return s;
128
+ rt.displayName = "SliderBase";
129
+ function X(r, i) {
130
+ const { min: e, max: a, step: l, minStepsBetweenThumbs: n } = i, s = r.map((o) => I(U(o, l, e), e, a));
131
+ if (s.sort((o, u) => o - u), s.length <= 1 || n <= 0) return s;
132
132
  const t = l * n;
133
- for (let i = 1; i < s.length; i += 1)
134
- s[i] - s[i - 1] < t && (s[i] = I(s[i - 1] + t, e, a));
133
+ for (let o = 1; o < s.length; o += 1)
134
+ s[o] - s[o - 1] < t && (s[o] = I(s[o - 1] + t, e, a));
135
135
  return s;
136
136
  }
137
- const ot = z(
138
- ({ asChild: r, className: o, onPointerDown: e, ...a }, l) => {
139
- const n = U(x);
137
+ const ot = E(
138
+ ({ asChild: r, className: i, onPointerDown: e, ...a }, l) => {
139
+ const n = F(z);
140
140
  if (!n) throw new Error("SliderTrack must be used within Slider");
141
141
  const s = r ? P : "div", t = (u) => {
142
142
  n.trackRef.current = u, typeof l == "function" ? l(u) : l && "current" in l && (l.current = u);
143
- }, i = A(
143
+ }, o = A(
144
144
  (u) => {
145
145
  if (e?.(u), u.defaultPrevented || n.disabled) return;
146
146
  const d = n.trackRef.current;
147
147
  if (!d) return;
148
148
  d.setPointerCapture?.(u.pointerId), u.preventDefault();
149
- const S = d.getBoundingClientRect(), b = Y(u.clientX, u.clientY, S, n), p = et(n.values, b);
150
- n.setActiveIndex(p), n.updateAtIndex(p, b), H(p, n);
149
+ const S = d.getBoundingClientRect(), b = Y(u.clientX, u.clientY, S, n), h = et(n.values, b);
150
+ n.setActiveIndex(h), n.updateAtIndex(h, b), H(h, n);
151
151
  },
152
152
  [n, e]
153
153
  );
@@ -156,30 +156,30 @@ const ot = z(
156
156
  {
157
157
  ref: t,
158
158
  "data-orientation": n.orientation,
159
- className: E(
159
+ className: x(
160
160
  "bg-secondary relative grow rounded-full",
161
161
  n.orientation === "horizontal" ? "h-2" : "w-2",
162
- o
162
+ i
163
163
  ),
164
164
  style: { touchAction: "none" },
165
- onPointerDown: i,
165
+ onPointerDown: o,
166
166
  ...a
167
167
  }
168
168
  );
169
169
  }
170
170
  );
171
171
  ot.displayName = "SliderTrack";
172
- const it = z(
173
- ({ asChild: r, className: o, style: e, ...a }, l) => {
174
- const n = U(x);
172
+ const it = E(
173
+ ({ asChild: r, className: i, style: e, ...a }, l) => {
174
+ const n = F(z);
175
175
  if (!n) throw new Error("SliderRange must be used within Slider");
176
- const s = r ? P : "div", t = L(n.values[0], n.min, n.max), i = L(n.values[n.values.length - 1], n.min, n.max), u = n.orientation === "horizontal" ? { left: `${t}%`, width: `${i - t}%` } : { bottom: `${t}%`, height: `${i - t}%` };
176
+ const s = r ? P : "div", t = L(n.values[0], n.min, n.max), o = L(n.values[n.values.length - 1], n.min, n.max), u = n.orientation === "horizontal" ? { left: `${t}%`, width: `${o - t}%` } : { bottom: `${t}%`, height: `${o - t}%` };
177
177
  return /* @__PURE__ */ k(
178
178
  s,
179
179
  {
180
180
  ref: l,
181
181
  "data-orientation": n.orientation,
182
- className: E("bg-primary absolute rounded-full", n.orientation === "horizontal" ? "h-2" : "w-2", o),
182
+ className: x("bg-primary absolute rounded-full", n.orientation === "horizontal" ? "h-2" : "w-2", i),
183
183
  style: { ...u, ...e },
184
184
  ...a
185
185
  }
@@ -187,61 +187,61 @@ const it = z(
187
187
  }
188
188
  );
189
189
  it.displayName = "SliderRange";
190
- const at = z(
191
- ({ asChild: r, className: o, index: e, onKeyDown: a, onPointerDown: l, ...n }, s) => {
192
- const t = U(x);
190
+ const at = E(
191
+ ({ asChild: r, className: i, index: e, onKeyDown: a, onPointerDown: l, ...n }, s) => {
192
+ const t = F(z);
193
193
  if (!t) throw new Error("SliderThumb must be used within Slider");
194
- const [i] = F(() => {
194
+ const [o] = B(() => {
195
195
  const c = typeof e == "number" ? e : t.thumbsRef.current.length;
196
196
  return t.thumbsRef.current[c] || (t.thumbsRef.current[c] = _()), c;
197
- }), u = t.values[i] ?? t.values[t.values.length - 1], d = L(u, t.min, t.max), S = r ? P : "button", b = (c) => {
198
- t.thumbsRef.current[i].current = c, typeof s == "function" ? s(c) : s && "current" in s && (s.current = c);
199
- }, N = (t.activeIndex === null || t.activeIndex === i) && !t.disabled ? 0 : -1, T = A(
197
+ }), u = t.values[o] ?? t.values[t.values.length - 1], d = L(u, t.min, t.max), S = r ? P : "button", b = (c) => {
198
+ t.thumbsRef.current[o].current = c, typeof s == "function" ? s(c) : s && "current" in s && (s.current = c);
199
+ }, N = (t.activeIndex === null || t.activeIndex === o) && !t.disabled ? 0 : -1, T = A(
200
200
  (c) => {
201
201
  if (a?.(c), c.defaultPrevented || t.disabled) return;
202
- const m = Math.max(t.step * 10, t.step), f = (w) => w === "inc" ? 1 : -1, v = (w) => st(i, w, t), h = c.key;
203
- if (h === "Home") {
204
- c.preventDefault(), t.updateAtIndex(i, t.min, { commit: !0 });
202
+ const m = Math.max(t.step * 10, t.step), p = (w) => w === "inc" ? 1 : -1, v = (w) => st(o, w, t), f = c.key;
203
+ if (f === "Home") {
204
+ c.preventDefault(), t.updateAtIndex(o, t.min, { commit: !0 });
205
205
  return;
206
206
  }
207
- if (h === "End") {
208
- c.preventDefault(), t.updateAtIndex(i, t.max, { commit: !0 });
207
+ if (f === "End") {
208
+ c.preventDefault(), t.updateAtIndex(o, t.max, { commit: !0 });
209
209
  return;
210
210
  }
211
211
  const y = t.orientation === "horizontal", C = t.dir === "rtl";
212
- if (h === "ArrowRight" && y) {
212
+ if (f === "ArrowRight" && y) {
213
213
  c.preventDefault(), v(t.step * (C ? -1 : 1));
214
214
  return;
215
215
  }
216
- if (h === "ArrowLeft" && y) {
216
+ if (f === "ArrowLeft" && y) {
217
217
  c.preventDefault(), v(t.step * (C ? 1 : -1));
218
218
  return;
219
219
  }
220
- if (h === "ArrowUp" && !y) {
220
+ if (f === "ArrowUp" && !y) {
221
221
  c.preventDefault(), v(t.step);
222
222
  return;
223
223
  }
224
- if (h === "ArrowDown" && !y) {
224
+ if (f === "ArrowDown" && !y) {
225
225
  c.preventDefault(), v(-t.step);
226
226
  return;
227
227
  }
228
- if (h === "PageUp") {
229
- c.preventDefault(), v(f("inc") * m);
228
+ if (f === "PageUp") {
229
+ c.preventDefault(), v(p("inc") * m);
230
230
  return;
231
231
  }
232
- if (h === "PageDown") {
233
- c.preventDefault(), v(f("dec") * m);
232
+ if (f === "PageDown") {
233
+ c.preventDefault(), v(p("dec") * m);
234
234
  return;
235
235
  }
236
236
  },
237
- [t, i, a]
237
+ [t, o, a]
238
238
  ), V = A(
239
239
  (c) => {
240
240
  if (l?.(c), c.defaultPrevented || t.disabled) return;
241
- const m = t.trackRef.current, f = t.thumbsRef.current[i].current;
242
- !m || !f || (f.setPointerCapture?.(c.pointerId), c.preventDefault(), t.setActiveIndex(i), H(i, t));
241
+ const m = t.trackRef.current, p = t.thumbsRef.current[o].current;
242
+ !m || !p || (p.setPointerCapture?.(c.pointerId), c.preventDefault(), t.setActiveIndex(o), H(o, t));
243
243
  },
244
- [t, i, l]
244
+ [t, o, l]
245
245
  ), $ = t.orientation === "horizontal" ? { left: `${d}%`, transform: "translate(-50%, -50%)" } : { bottom: `${d}%`, transform: "translate(-50%, 50%)" };
246
246
  return /* @__PURE__ */ k(
247
247
  S,
@@ -256,17 +256,16 @@ const at = z(
256
256
  "aria-disabled": t.disabled || void 0,
257
257
  "data-orientation": t.orientation,
258
258
  "data-disabled": t.disabled ? "" : void 0,
259
- className: E(
260
- "bg-background absolute grid place-items-center rounded-full shadow",
259
+ className: x(
260
+ "absolute grid place-items-center rounded-full shadow",
261
261
  "border-input border outline-none",
262
262
  "focus-visible:ring-ring focus-visible:ring-2 focus-visible:ring-offset-2",
263
263
  "h-5 w-5",
264
- o
264
+ i
265
265
  ),
266
266
  style: {
267
267
  ...$,
268
- top: t.orientation === "horizontal" ? "50%" : "auto",
269
- left: t.orientation === "horizontal" ? void 0 : "50%",
268
+ ...t.orientation === "horizontal" ? { top: "50%" } : { left: "50%" },
270
269
  touchAction: "none"
271
270
  },
272
271
  onKeyDown: T,
@@ -277,38 +276,38 @@ const at = z(
277
276
  }
278
277
  );
279
278
  at.displayName = "SliderThumb";
280
- function Y(r, o, e, a) {
279
+ function Y(r, i, e, a) {
281
280
  let l;
282
281
  if (a.orientation === "horizontal") {
283
- const i = I(r - e.left, 0, e.width) / e.width * 100;
284
- l = a.dir === "rtl" ? 100 - i : i;
282
+ const o = I(r - e.left, 0, e.width) / e.width * 100;
283
+ l = a.dir === "rtl" ? 100 - o : o;
285
284
  } else
286
- l = 100 - I(o - e.top, 0, e.height) / e.height * 100;
287
- const n = tt(l, a.min, a.max), s = j(n, a.step, a.min);
285
+ l = 100 - I(i - e.top, 0, e.height) / e.height * 100;
286
+ const n = tt(l, a.min, a.max), s = U(n, a.step, a.min);
288
287
  return I(s, a.min, a.max);
289
288
  }
290
- function q(r, o, e) {
289
+ function q(r, i, e) {
291
290
  const a = e.step * e.minStepsBetweenThumbs, l = r > 0 ? e.values[r - 1] : e.min, n = r < e.values.length - 1 ? e.values[r + 1] : e.max, s = l + (r > 0 ? a : 0), t = n - (r < e.values.length - 1 ? a : 0);
292
- return I(o, s, t);
291
+ return I(i, s, t);
293
292
  }
294
- function st(r, o, e) {
295
- const a = e.values[r], l = q(r, j(a + o, e.step, e.min), e);
293
+ function st(r, i, e) {
294
+ const a = e.values[r], l = q(r, U(a + i, e.step, e.min), e);
296
295
  e.updateAtIndex(r, l, { commit: !0 });
297
296
  }
298
- function H(r, o) {
299
- const e = o.trackRef.current;
297
+ function H(r, i) {
298
+ const e = i.trackRef.current;
300
299
  if (!e) return;
301
300
  const a = () => e.getBoundingClientRect(), l = (s) => {
302
- if (o.disabled) return;
303
- const t = Y(s.clientX, s.clientY, a(), o), i = q(r, t, o);
304
- o.updateAtIndex(r, i);
301
+ if (i.disabled) return;
302
+ const t = Y(s.clientX, s.clientY, a(), i), o = q(r, t, i);
303
+ i.updateAtIndex(r, o);
305
304
  }, n = () => {
306
- o.setActiveIndex(null), o.setValues([...o.values], { commit: !0 }), window.removeEventListener("pointermove", l, !0), window.removeEventListener("pointerup", n, !0);
305
+ i.setActiveIndex(null), window.removeEventListener("pointermove", l, !0), window.removeEventListener("pointerup", n, !0);
307
306
  };
308
307
  window.addEventListener("pointermove", l, !0), window.addEventListener("pointerup", n, !0);
309
308
  }
310
309
  export {
311
- rt as Slider,
310
+ rt as SliderBase,
312
311
  it as SliderRange,
313
312
  at as SliderThumb,
314
313
  ot as SliderTrack
package/dist/Slider.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import './assets/main.css';
3
3
  import { jsxs as v, jsx as t } from "react/jsx-runtime";
4
- import { Slider as w, SliderTrack as p, SliderRange as x, SliderThumb as S } from "./Slider/SliderBase.js";
4
+ import { SliderBase as w, SliderTrack as p, SliderRange as x, SliderThumb as k } from "./Slider/SliderBase.js";
5
5
  import { c as a } from "./twUtils-CRiPKpXj.js";
6
6
  const j = ({
7
7
  className: o,
@@ -58,8 +58,8 @@ const j = ({
58
58
  )
59
59
  }
60
60
  ),
61
- Array.from({ length: f.length }, (k, g) => /* @__PURE__ */ t(
62
- S,
61
+ Array.from({ length: f.length }, (z, g) => /* @__PURE__ */ t(
62
+ k,
63
63
  {
64
64
  "data-slot": "slider-thumb",
65
65
  className: "border-slider-thumb-border bg-slider-thumb-bg ring-slider-thumb-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
@@ -1,29 +1,29 @@
1
1
  "use client";
2
2
  import './assets/main.css';
3
3
  import { jsx as d } from "react/jsx-runtime";
4
- import { ToggleGroupItemBase as p, ToggleGroupBase as m } from "./ToggleGroup/ToggleGroupBase.js";
5
- import { toggleVariants as f } from "./Toggle.js";
4
+ import { ToggleGroupItemBase as p, ToggleGroupBase as f } from "./ToggleGroup/ToggleGroupBase.js";
5
+ import { toggleVariants as m } from "./Toggle.js";
6
6
  import { c as l } from "./twUtils-CRiPKpXj.js";
7
7
  import { createContext as c, forwardRef as v, useContext as b } from "react";
8
8
  const g = c({
9
9
  size: "default",
10
10
  variant: "default",
11
11
  layout: "default"
12
- }), h = ({ className: n, variant: e, size: o, layout: a, children: u, ...r }) => /* @__PURE__ */ d(
13
- m,
12
+ }), w = ({ className: n, variant: e, size: o, layout: a, children: u, ...r }) => /* @__PURE__ */ d(
13
+ f,
14
14
  {
15
15
  "data-slot": "toggle-group",
16
16
  "data-variant": e,
17
17
  "data-size": o,
18
18
  "data-layout": a,
19
19
  className: l(
20
- "group/toggle-group [&[data-variant='outline']]:bg-toggle-group-bg flex h-fit w-fit items-center rounded-md [&_button:first-of-type]:rounded-l-md [&_button:last-of-type]:rounded-r-md [&[data-variant='outline']]:gap-0.25",
20
+ "group/toggle-group [&[data-variant='outline']]:bg-toggle-group-bg flex h-fit w-fit items-center rounded-md [&_button:first-of-type]:rounded-l-md [&_button:last-of-type]:rounded-r-md [&[data-layout='expanded']]:w-full [&[data-variant='outline']]:gap-0.25",
21
21
  n
22
22
  ),
23
23
  ...r,
24
24
  children: /* @__PURE__ */ d(g.Provider, { value: { variant: e, size: o, layout: a }, children: u })
25
25
  }
26
- ), w = v(({ className: n, children: e, variant: o, size: a, value: u, layout: r, ...i }, s) => {
26
+ ), h = v(({ className: n, children: e, variant: o, size: a, value: u, layout: r, ...i }, s) => {
27
27
  const t = b(g);
28
28
  return /* @__PURE__ */ d(
29
29
  p,
@@ -35,7 +35,7 @@ const g = c({
35
35
  "data-layout": t.layout || r,
36
36
  value: u,
37
37
  className: l(
38
- f({
38
+ m({
39
39
  variant: t.variant || o,
40
40
  size: t.size || a,
41
41
  layout: t.layout || r
@@ -49,6 +49,6 @@ const g = c({
49
49
  );
50
50
  });
51
51
  export {
52
- h as ToggleGroup,
53
- w as ToggleGroupItem
52
+ w as ToggleGroup,
53
+ h as ToggleGroupItem
54
54
  };