@spear-ai/spectral 1.3.21 → 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.
- package/dist/.js +84 -77
- package/dist/Button.js +1 -1
- package/dist/Card.js +4 -4
- package/dist/Drawer.js +15 -8
- package/dist/Icons/AnnotationsIcon.js +3 -3
- package/dist/Icons/CalendarIcon.js +8 -8
- package/dist/Icons/DeleteIcon.js +10 -10
- package/dist/Icons/DurationIcon.js +9 -9
- package/dist/Icons/EraserIcon.js +7 -7
- package/dist/Icons/GoToFirstIcon.js +10 -10
- package/dist/Icons/GoToLastIcon.js +8 -8
- package/dist/Icons/IconBase.js +8 -7
- package/dist/Icons/InfoIcon.js +32 -0
- package/dist/Icons/LabelIcon.js +6 -6
- package/dist/Icons/LassoIcon.js +3 -3
- package/dist/Icons/LineToolIcon.js +14 -14
- package/dist/Icons/LiveViewIcon.js +30 -30
- package/dist/Icons/LocationIcon.js +6 -6
- package/dist/Icons/MetadataIcon.js +8 -8
- package/dist/Icons/OntologyIcon.js +5 -5
- package/dist/Icons/PlayIcon.js +11 -11
- package/dist/Icons/PlusIcon.js +9 -9
- package/dist/Icons/ResetIcon.js +8 -8
- package/dist/Icons/ScissorsIcon.js +15 -15
- package/dist/Icons/SettingsIcon.js +42 -0
- package/dist/Icons/TrashIcon.js +1 -1
- package/dist/Icons/UndoIcon.js +5 -5
- package/dist/Icons/ZoomAllIcon.js +57 -25
- package/dist/Icons/ZoomXIcon.js +7 -7
- package/dist/Icons.js +38 -34
- package/dist/Popover.js +48 -42
- package/dist/RadioGroup/RadioGroupBase.js +120 -118
- package/dist/RadioGroup.js +41 -0
- package/dist/Slider/SliderBase.js +1 -1
- package/dist/ToggleGroup.js +9 -9
- package/dist/assets/main.css +1 -1
- package/dist/components/Drawer/Drawer.d.ts +2 -0
- package/dist/components/Drawer/Drawer.d.ts.map +1 -1
- package/dist/components/Icons/IconBase.d.ts +5 -5
- package/dist/components/Icons/IconBase.d.ts.map +1 -1
- package/dist/components/Icons/InfoIcon.d.ts +3 -0
- package/dist/components/Icons/InfoIcon.d.ts.map +1 -0
- package/dist/components/Icons/SettingsIcon.d.ts +3 -0
- package/dist/components/Icons/SettingsIcon.d.ts.map +1 -0
- package/dist/components/Icons/ZoomAllIcon.d.ts.map +1 -1
- package/dist/components/Icons/index.d.ts +2 -0
- package/dist/components/Icons/index.d.ts.map +1 -1
- package/dist/components/Popover/Popover.d.ts +1 -1
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +11 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -0
- package/dist/components/RadioGroup/RadioGroupBase.d.ts +2 -0
- package/dist/components/RadioGroup/RadioGroupBase.d.ts.map +1 -1
- package/dist/{loader-circle-Btf6jOd5.js → createLucideIcon-CI1yJrZf.js} +9 -16
- package/dist/features/HorizonColorGrid/HorizonColorGrid.d.ts +3 -0
- package/dist/features/HorizonColorGrid/HorizonColorGrid.d.ts.map +1 -0
- package/dist/features/HorizonColorGrid.js +70 -0
- package/dist/features/LabelingTools.js +4 -2
- package/dist/features/SensorMetadata/SensorMetadata.d.ts +2 -0
- package/dist/features/SensorMetadata/SensorMetadata.d.ts.map +1 -0
- package/dist/features/SensorMetadata.js +85 -0
- package/dist/features/SettingsPopover/SettingsPopover.d.ts +2 -0
- package/dist/features/SettingsPopover/SettingsPopover.d.ts.map +1 -0
- package/dist/features/SettingsPopover.js +194 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/loader-circle-CvdzOiQ_.js +11 -0
- package/dist/themes/grayscale-theme.webp +0 -0
- package/dist/themes/green-black-theme.webp +0 -0
- package/dist/themes/reverse-grayscale-theme.webp +0 -0
- package/dist/themes/viridis-theme.webp +0 -0
- package/package.json +5 -2
- package/src/styles/main.css +1 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { Slot as
|
|
4
|
-
import { createContext as
|
|
2
|
+
import { jsx as A, jsxs as T } from "react/jsx-runtime";
|
|
3
|
+
import { Slot as L } from "../primitives/slot.js";
|
|
4
|
+
import { createContext as z, forwardRef as P, useId as $, useState as U, useRef as G, useEffect as C, useCallback as E, useContext as B, useImperativeHandle as K } from "react";
|
|
5
5
|
function q(...s) {
|
|
6
6
|
return s.filter(Boolean).join(" ");
|
|
7
7
|
}
|
|
8
|
-
const H =
|
|
9
|
-
function
|
|
10
|
-
const { value: i, defaultValue: t, onChange: r } = s, [d, n] =
|
|
8
|
+
const H = z(null);
|
|
9
|
+
function J(s) {
|
|
10
|
+
const { value: i, defaultValue: t, onChange: r } = s, [d, n] = U(t), u = i !== void 0, g = u ? i : d, l = E(
|
|
11
11
|
(e) => {
|
|
12
12
|
u || n(e), r?.(e);
|
|
13
13
|
},
|
|
14
14
|
[u, r]
|
|
15
15
|
);
|
|
16
|
-
return [
|
|
16
|
+
return [g, l];
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Q(s, i, t, r) {
|
|
19
19
|
const d = s.length;
|
|
20
20
|
let n = i;
|
|
21
21
|
for (let u = 0; u < d; u += 1) {
|
|
@@ -24,11 +24,11 @@ function J(s, i, t, r) {
|
|
|
24
24
|
}
|
|
25
25
|
return i;
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function W(s, i, t) {
|
|
28
28
|
const { key: r } = s;
|
|
29
29
|
return r === "Home" ? "first" : r === "End" ? "last" : i === "vertical" ? r === "ArrowDown" ? "next" : r === "ArrowUp" ? "prev" : null : r === "ArrowRight" ? t === "rtl" ? "prev" : "next" : r === "ArrowLeft" ? t === "rtl" ? "next" : "prev" : null;
|
|
30
30
|
}
|
|
31
|
-
const
|
|
31
|
+
const X = P(
|
|
32
32
|
({
|
|
33
33
|
asChild: s,
|
|
34
34
|
className: i,
|
|
@@ -37,154 +37,156 @@ const W = L(
|
|
|
37
37
|
onValueChange: d,
|
|
38
38
|
name: n,
|
|
39
39
|
required: u = !1,
|
|
40
|
-
form:
|
|
40
|
+
form: g,
|
|
41
41
|
disabled: l = !1,
|
|
42
42
|
orientation: e = "vertical",
|
|
43
|
-
dir:
|
|
44
|
-
loop:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
dir: N = "ltr",
|
|
44
|
+
loop: p = !0,
|
|
45
|
+
variant: m = "default",
|
|
46
|
+
id: f,
|
|
47
|
+
...b
|
|
48
|
+
}, v) => {
|
|
49
|
+
const O = $(), F = f ?? `rg-${O}`, [R, x] = J({
|
|
49
50
|
value: t,
|
|
50
51
|
defaultValue: r ?? void 0,
|
|
51
52
|
onChange: d
|
|
52
|
-
}), [
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}, [
|
|
56
|
-
const c =
|
|
53
|
+
}), [w, V] = U(R), y = G([]), I = G(null);
|
|
54
|
+
C(() => {
|
|
55
|
+
R !== void 0 && V(R);
|
|
56
|
+
}, [R]), C(() => {
|
|
57
|
+
const c = I.current;
|
|
57
58
|
if (!c) return;
|
|
58
59
|
const a = () => {
|
|
59
|
-
|
|
60
|
+
x(r ?? void 0);
|
|
60
61
|
};
|
|
61
62
|
return c.addEventListener("reset", a), () => c.removeEventListener("reset", a);
|
|
62
|
-
}, [r,
|
|
63
|
-
const o =
|
|
64
|
-
|
|
65
|
-
}), []), h =
|
|
63
|
+
}, [r, x]);
|
|
64
|
+
const o = E((c) => (y.current.push(c), () => {
|
|
65
|
+
y.current = y.current.filter((a) => a.value !== c.value);
|
|
66
|
+
}), []), h = E(
|
|
66
67
|
(c, a) => {
|
|
67
|
-
l || (
|
|
68
|
+
l || (x(c), a?.focus && (V(c), y.current.find((M) => M.value === c)?.ref.current?.focus()));
|
|
68
69
|
},
|
|
69
|
-
[l,
|
|
70
|
-
),
|
|
71
|
-
value:
|
|
70
|
+
[l, x]
|
|
71
|
+
), k = {
|
|
72
|
+
value: R,
|
|
72
73
|
setValue: h,
|
|
73
74
|
name: n,
|
|
74
75
|
required: u,
|
|
75
|
-
form:
|
|
76
|
+
form: g,
|
|
76
77
|
disabled: l,
|
|
77
78
|
orientation: e,
|
|
78
|
-
dir:
|
|
79
|
-
loop:
|
|
79
|
+
dir: N,
|
|
80
|
+
loop: p,
|
|
80
81
|
registerItem: o,
|
|
81
|
-
focusableValue:
|
|
82
|
-
setFocusableValue:
|
|
83
|
-
formElRef:
|
|
84
|
-
itemsRef:
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
82
|
+
focusableValue: w,
|
|
83
|
+
setFocusableValue: V,
|
|
84
|
+
formElRef: I,
|
|
85
|
+
itemsRef: y,
|
|
86
|
+
variant: m
|
|
87
|
+
}, D = s ? L : "div", S = v;
|
|
88
|
+
return /* @__PURE__ */ A(H.Provider, { value: k, children: /* @__PURE__ */ A(
|
|
89
|
+
D,
|
|
88
90
|
{
|
|
89
|
-
id:
|
|
90
|
-
ref:
|
|
91
|
+
id: F,
|
|
92
|
+
ref: S,
|
|
91
93
|
role: "radiogroup",
|
|
92
94
|
"aria-orientation": e,
|
|
93
95
|
"data-disabled": l ? "" : void 0,
|
|
94
96
|
className: q(i),
|
|
95
|
-
...
|
|
97
|
+
...b
|
|
96
98
|
}
|
|
97
99
|
) });
|
|
98
100
|
}
|
|
99
101
|
);
|
|
100
|
-
|
|
101
|
-
const
|
|
102
|
-
({ asChild: s, className: i, value: t, disabled: r, id: d, onKeyDown: n, onClick: u, ...
|
|
103
|
-
const e =
|
|
102
|
+
X.displayName = "RadioGroup";
|
|
103
|
+
const Y = P(
|
|
104
|
+
({ asChild: s, className: i, value: t, disabled: r, id: d, onKeyDown: n, onClick: u, ...g }, l) => {
|
|
105
|
+
const e = B(H);
|
|
104
106
|
if (!e) throw new Error("RadioGroupItem must be used within RadioGroup");
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
+
const N = $(), p = d ?? `rgi-${N}`, m = G(null), f = G(null);
|
|
108
|
+
K(
|
|
107
109
|
l,
|
|
108
|
-
() =>
|
|
110
|
+
() => m.current,
|
|
109
111
|
[]
|
|
110
112
|
);
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
const o = { value: t, ref:
|
|
113
|
+
const b = e.value === t, v = !!r || e.disabled;
|
|
114
|
+
C(() => {
|
|
115
|
+
const o = { value: t, ref: m, disabled: !!v, id: p };
|
|
114
116
|
return e.registerItem(o);
|
|
115
|
-
}, [t,
|
|
117
|
+
}, [t, v, p]), C(() => {
|
|
116
118
|
!e.formElRef.current && f.current?.form && (e.formElRef.current = f.current.form);
|
|
117
|
-
}, [e.formElRef]),
|
|
118
|
-
f.current && (f.current.checked =
|
|
119
|
-
}, [
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
},
|
|
119
|
+
}, [e.formElRef]), C(() => {
|
|
120
|
+
f.current && (f.current.checked = b);
|
|
121
|
+
}, [b]);
|
|
122
|
+
const F = (e.focusableValue ? e.focusableValue === t : b) && !v ? 0 : -1, R = s ? L : "button", x = (o) => {
|
|
123
|
+
m.current = o;
|
|
124
|
+
}, w = E(
|
|
123
125
|
(o) => {
|
|
124
|
-
if (!
|
|
126
|
+
if (!v && (e.setValue(t, { focus: !0, user: o }), f.current)) {
|
|
125
127
|
const h = new Event("change", { bubbles: !0 });
|
|
126
128
|
f.current.dispatchEvent(h);
|
|
127
129
|
}
|
|
128
130
|
},
|
|
129
|
-
[e,
|
|
130
|
-
),
|
|
131
|
+
[e, v, t]
|
|
132
|
+
), V = E(
|
|
131
133
|
(o) => {
|
|
132
|
-
u?.(o), !o.defaultPrevented &&
|
|
134
|
+
u?.(o), !o.defaultPrevented && w(!0);
|
|
133
135
|
},
|
|
134
|
-
[u,
|
|
135
|
-
),
|
|
136
|
+
[u, w]
|
|
137
|
+
), y = E(
|
|
136
138
|
(o) => {
|
|
137
139
|
if (n?.(o), o.defaultPrevented) return;
|
|
138
140
|
if (o.key === " " || o.key === "Enter") {
|
|
139
|
-
o.preventDefault(),
|
|
141
|
+
o.preventDefault(), w(!0);
|
|
140
142
|
return;
|
|
141
143
|
}
|
|
142
|
-
const h =
|
|
144
|
+
const h = W(o, e.orientation, e.dir);
|
|
143
145
|
if (h) {
|
|
144
146
|
o.preventDefault();
|
|
145
|
-
const
|
|
146
|
-
if (
|
|
147
|
+
const k = [...e.itemsRef.current], D = k.findIndex((a) => a.value === t);
|
|
148
|
+
if (D === -1) return;
|
|
147
149
|
if (h === "first") {
|
|
148
|
-
const a =
|
|
150
|
+
const a = k.find((j) => !j.disabled);
|
|
149
151
|
a && e.setValue(a.value, { focus: !0, user: !0 });
|
|
150
152
|
return;
|
|
151
153
|
}
|
|
152
154
|
if (h === "last") {
|
|
153
|
-
const a = [...
|
|
155
|
+
const a = [...k].reverse().find((j) => !j.disabled);
|
|
154
156
|
a && e.setValue(a.value, { focus: !0, user: !0 });
|
|
155
157
|
return;
|
|
156
158
|
}
|
|
157
|
-
const
|
|
159
|
+
const S = Q(k, D, h, e.loop), c = k[S];
|
|
158
160
|
c && !c.disabled && e.setValue(c.value, { focus: !0, user: !0 });
|
|
159
161
|
}
|
|
160
162
|
},
|
|
161
|
-
[e, n,
|
|
162
|
-
);
|
|
163
|
-
return /* @__PURE__ */
|
|
164
|
-
|
|
163
|
+
[e, n, w, t]
|
|
164
|
+
), I = e.variant === "unstyled";
|
|
165
|
+
return /* @__PURE__ */ T(
|
|
166
|
+
R,
|
|
165
167
|
{
|
|
166
|
-
id:
|
|
167
|
-
ref:
|
|
168
|
+
id: p,
|
|
169
|
+
ref: x,
|
|
168
170
|
type: "button",
|
|
169
171
|
role: "radio",
|
|
170
|
-
"aria-checked":
|
|
171
|
-
"aria-disabled":
|
|
172
|
-
"data-state":
|
|
173
|
-
"data-disabled":
|
|
174
|
-
tabIndex:
|
|
175
|
-
onClick:
|
|
176
|
-
onKeyDown:
|
|
172
|
+
"aria-checked": b,
|
|
173
|
+
"aria-disabled": v || void 0,
|
|
174
|
+
"data-state": b ? "checked" : "unchecked",
|
|
175
|
+
"data-disabled": v ? "" : void 0,
|
|
176
|
+
tabIndex: F,
|
|
177
|
+
onClick: V,
|
|
178
|
+
onKeyDown: y,
|
|
177
179
|
className: q(
|
|
178
|
-
|
|
179
|
-
"border-input bg-background border",
|
|
180
|
-
"
|
|
181
|
-
|
|
182
|
-
"
|
|
180
|
+
// Only apply default styles when not unstyled
|
|
181
|
+
!I && "border-input bg-background focus-visible:ring-ring inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full border focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
182
|
+
!I && "data-[state=checked]:border-primary data-[state=checked]:bg-primary/10 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
183
|
+
// Always preserve basic accessibility for unstyled variant
|
|
184
|
+
I && "border-sm focus-visible:ring-ring data-[state=checked]:border-selected-primary cursor-pointer rounded-sm border-2 border-transparent transition-opacity hover:opacity-70 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",
|
|
183
185
|
i
|
|
184
186
|
),
|
|
185
|
-
...
|
|
187
|
+
...g,
|
|
186
188
|
children: [
|
|
187
|
-
/* @__PURE__ */
|
|
189
|
+
/* @__PURE__ */ A(
|
|
188
190
|
"input",
|
|
189
191
|
{
|
|
190
192
|
ref: f,
|
|
@@ -192,9 +194,9 @@ const X = L(
|
|
|
192
194
|
name: e.name,
|
|
193
195
|
value: t,
|
|
194
196
|
required: e.required,
|
|
195
|
-
disabled:
|
|
197
|
+
disabled: v,
|
|
196
198
|
form: e.form,
|
|
197
|
-
checked:
|
|
199
|
+
checked: b,
|
|
198
200
|
readOnly: !0,
|
|
199
201
|
tabIndex: -1,
|
|
200
202
|
"aria-hidden": "true",
|
|
@@ -207,37 +209,37 @@ const X = L(
|
|
|
207
209
|
}
|
|
208
210
|
}
|
|
209
211
|
),
|
|
210
|
-
|
|
212
|
+
g.children
|
|
211
213
|
]
|
|
212
214
|
}
|
|
213
215
|
);
|
|
214
216
|
}
|
|
215
217
|
);
|
|
216
|
-
|
|
217
|
-
const
|
|
218
|
+
Y.displayName = "RadioGroupItem";
|
|
219
|
+
const Z = P(
|
|
218
220
|
({ asChild: s, className: i, forceMount: t, ...r }, d) => {
|
|
219
|
-
if (
|
|
220
|
-
const [u,
|
|
221
|
-
return
|
|
221
|
+
if (!B(H)) return null;
|
|
222
|
+
const [u, g] = U(!1), l = G(null);
|
|
223
|
+
return K(
|
|
222
224
|
d,
|
|
223
225
|
() => l.current,
|
|
224
226
|
[]
|
|
225
|
-
),
|
|
226
|
-
const
|
|
227
|
-
if (!
|
|
228
|
-
const
|
|
229
|
-
if (!
|
|
227
|
+
), C(() => {
|
|
228
|
+
const p = l.current;
|
|
229
|
+
if (!p) return;
|
|
230
|
+
const m = p.closest('[role="radio"]');
|
|
231
|
+
if (!m) return;
|
|
230
232
|
const f = () => {
|
|
231
|
-
|
|
233
|
+
g(m.getAttribute("aria-checked") === "true");
|
|
232
234
|
};
|
|
233
235
|
f();
|
|
234
|
-
const
|
|
235
|
-
return
|
|
236
|
-
}, []), !u && !t ? null : /* @__PURE__ */
|
|
237
|
-
s ?
|
|
236
|
+
const b = new MutationObserver(f);
|
|
237
|
+
return b.observe(m, { attributes: !0, attributeFilter: ["aria-checked"] }), () => b.disconnect();
|
|
238
|
+
}, []), !u && !t ? null : /* @__PURE__ */ A(
|
|
239
|
+
s ? L : "span",
|
|
238
240
|
{
|
|
239
|
-
ref: (
|
|
240
|
-
l.current =
|
|
241
|
+
ref: (p) => {
|
|
242
|
+
l.current = p;
|
|
241
243
|
},
|
|
242
244
|
"data-state": u ? "checked" : "unchecked",
|
|
243
245
|
className: q("flex items-center justify-center text-current", i),
|
|
@@ -246,9 +248,9 @@ const Y = L(
|
|
|
246
248
|
);
|
|
247
249
|
}
|
|
248
250
|
);
|
|
249
|
-
|
|
251
|
+
Z.displayName = "RadioGroupIndicator";
|
|
250
252
|
export {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
253
|
+
X as RadioGroup,
|
|
254
|
+
Z as RadioGroupIndicator,
|
|
255
|
+
Y as RadioGroupItem
|
|
254
256
|
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import './assets/main.css';
|
|
3
|
+
import { jsx as t, jsxs as d } from "react/jsx-runtime";
|
|
4
|
+
import { RadioGroup as l, RadioGroupItem as n, RadioGroupIndicator as m } from "./RadioGroup/RadioGroupBase.js";
|
|
5
|
+
import { c as e } from "./twUtils-CRiPKpXj.js";
|
|
6
|
+
import { createContext as u, useContext as p } from "react";
|
|
7
|
+
import { c as f } 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 x = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], y = f("circle", x), i = u({
|
|
15
|
+
variant: "default"
|
|
16
|
+
}), v = ({ className: r, variant: o = "default", ...a }) => /* @__PURE__ */ t(i.Provider, { value: { variant: o }, children: /* @__PURE__ */ t(
|
|
17
|
+
l,
|
|
18
|
+
{
|
|
19
|
+
"data-slot": "radio-group",
|
|
20
|
+
className: e("grid gap-3", r),
|
|
21
|
+
variant: o,
|
|
22
|
+
...a
|
|
23
|
+
}
|
|
24
|
+
) }), C = ({ className: r, children: o, ...a }) => {
|
|
25
|
+
const { variant: s } = p(i), c = s === "unstyled";
|
|
26
|
+
return /* @__PURE__ */ d(n, { "data-slot": "radio-group-item", className: e(r), ...a, children: [
|
|
27
|
+
!c && /* @__PURE__ */ t(
|
|
28
|
+
m,
|
|
29
|
+
{
|
|
30
|
+
"data-slot": "radio-group-indicator",
|
|
31
|
+
className: "relative flex items-center justify-center",
|
|
32
|
+
children: /* @__PURE__ */ t(y, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
o
|
|
36
|
+
] });
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
v as RadioGroup,
|
|
40
|
+
C as RadioGroupItem
|
|
41
|
+
};
|
|
@@ -257,7 +257,7 @@ const at = E(
|
|
|
257
257
|
"data-orientation": t.orientation,
|
|
258
258
|
"data-disabled": t.disabled ? "" : void 0,
|
|
259
259
|
className: x(
|
|
260
|
-
"
|
|
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",
|
package/dist/ToggleGroup.js
CHANGED
|
@@ -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
|
|
5
|
-
import { toggleVariants as
|
|
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
|
-
}),
|
|
13
|
-
|
|
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
|
-
),
|
|
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
|
-
|
|
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
|
-
|
|
53
|
-
|
|
52
|
+
w as ToggleGroup,
|
|
53
|
+
h as ToggleGroupItem
|
|
54
54
|
};
|