@versini/ui-togglegroup 3.0.9 → 3.0.10
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/index.js +82 -86
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as l, Fragment as ge } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as u from "react";
|
|
3
3
|
import C, { useContext as me } from "react";
|
|
4
4
|
import P from "clsx";
|
|
5
5
|
/*!
|
|
6
|
-
@versini/ui-togglegroup v3.0.
|
|
6
|
+
@versini/ui-togglegroup v3.0.10
|
|
7
7
|
© 2025 gizmette.com
|
|
8
8
|
*/
|
|
9
9
|
try {
|
|
10
10
|
window.__VERSINI_UI_TOGGLEGROUP__ || (window.__VERSINI_UI_TOGGLEGROUP__ = {
|
|
11
|
-
version: "3.0.
|
|
12
|
-
buildTime: "
|
|
11
|
+
version: "3.0.10",
|
|
12
|
+
buildTime: "02/16/2025 06:39 PM EST",
|
|
13
13
|
homepage: "https://github.com/aversini/ui-components",
|
|
14
14
|
license: "MIT"
|
|
15
15
|
});
|
|
@@ -19,17 +19,17 @@ const ve = "av-togglegroup", Ce = "av-togglegroup-item-wrapper", he = "av-toggle
|
|
|
19
19
|
function U(e, t = []) {
|
|
20
20
|
let o = [];
|
|
21
21
|
function r(s, c) {
|
|
22
|
-
const
|
|
22
|
+
const a = u.createContext(c), i = o.length;
|
|
23
23
|
o = [...o, c];
|
|
24
24
|
const d = (p) => {
|
|
25
25
|
var g;
|
|
26
|
-
const { scope: h, children: I, ...f } = p, m = ((g = h == null ? void 0 : h[e]) == null ? void 0 : g[i]) ||
|
|
26
|
+
const { scope: h, children: I, ...f } = p, m = ((g = h == null ? void 0 : h[e]) == null ? void 0 : g[i]) || a, T = u.useMemo(() => f, Object.values(f));
|
|
27
27
|
return /* @__PURE__ */ l(m.Provider, { value: T, children: I });
|
|
28
28
|
};
|
|
29
29
|
d.displayName = s + "Provider";
|
|
30
30
|
function v(p, h) {
|
|
31
31
|
var m;
|
|
32
|
-
const I = ((m = h == null ? void 0 : h[e]) == null ? void 0 : m[i]) ||
|
|
32
|
+
const I = ((m = h == null ? void 0 : h[e]) == null ? void 0 : m[i]) || a, f = u.useContext(I);
|
|
33
33
|
if (f) return f;
|
|
34
34
|
if (c !== void 0) return c;
|
|
35
35
|
throw new Error(`\`${p}\` must be used within \`${s}\``);
|
|
@@ -37,12 +37,12 @@ function U(e, t = []) {
|
|
|
37
37
|
return [d, v];
|
|
38
38
|
}
|
|
39
39
|
const n = () => {
|
|
40
|
-
const s = o.map((c) =>
|
|
41
|
-
return function(
|
|
42
|
-
const i = (
|
|
43
|
-
return
|
|
44
|
-
() => ({ [`__scope${e}`]: { ...
|
|
45
|
-
[
|
|
40
|
+
const s = o.map((c) => u.createContext(c));
|
|
41
|
+
return function(a) {
|
|
42
|
+
const i = (a == null ? void 0 : a[e]) || s;
|
|
43
|
+
return u.useMemo(
|
|
44
|
+
() => ({ [`__scope${e}`]: { ...a, [e]: i } }),
|
|
45
|
+
[a, i]
|
|
46
46
|
);
|
|
47
47
|
};
|
|
48
48
|
};
|
|
@@ -57,11 +57,11 @@ function be(...e) {
|
|
|
57
57
|
scopeName: n.scopeName
|
|
58
58
|
}));
|
|
59
59
|
return function(s) {
|
|
60
|
-
const c = r.reduce((
|
|
60
|
+
const c = r.reduce((a, { useScope: i, scopeName: d }) => {
|
|
61
61
|
const p = i(s)[`__scope${d}`];
|
|
62
|
-
return { ...
|
|
62
|
+
return { ...a, ...p };
|
|
63
63
|
}, {});
|
|
64
|
-
return
|
|
64
|
+
return u.useMemo(() => ({ [`__scope${t.scopeName}`]: c }), [c]);
|
|
65
65
|
};
|
|
66
66
|
};
|
|
67
67
|
return o.scopeName = t.scopeName, o;
|
|
@@ -88,40 +88,36 @@ function z(...e) {
|
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
90
|
function D(...e) {
|
|
91
|
-
return
|
|
91
|
+
return u.useCallback(z(...e), e);
|
|
92
92
|
}
|
|
93
|
-
var A =
|
|
94
|
-
const { children: o, ...r } = e, n =
|
|
93
|
+
var A = u.forwardRef((e, t) => {
|
|
94
|
+
const { children: o, ...r } = e, n = u.Children.toArray(o), s = n.find(Te);
|
|
95
95
|
if (s) {
|
|
96
|
-
const c = s.props.children,
|
|
97
|
-
return /* @__PURE__ */ l(L, { ...r, ref: t, children:
|
|
96
|
+
const c = s.props.children, a = n.map((i) => i === s ? u.Children.count(c) > 1 ? u.Children.only(null) : u.isValidElement(c) ? c.props.children : null : i);
|
|
97
|
+
return /* @__PURE__ */ l(L, { ...r, ref: t, children: u.isValidElement(c) ? u.cloneElement(c, void 0, a) : null });
|
|
98
98
|
}
|
|
99
99
|
return /* @__PURE__ */ l(L, { ...r, ref: t, children: o });
|
|
100
100
|
});
|
|
101
101
|
A.displayName = "Slot";
|
|
102
|
-
var L =
|
|
102
|
+
var L = u.forwardRef((e, t) => {
|
|
103
103
|
const { children: o, ...r } = e;
|
|
104
|
-
if (
|
|
105
|
-
const n = ye(o);
|
|
106
|
-
return
|
|
107
|
-
...Re(r, o.props),
|
|
108
|
-
// @ts-ignore
|
|
109
|
-
ref: t ? z(t, n) : n
|
|
110
|
-
});
|
|
104
|
+
if (u.isValidElement(o)) {
|
|
105
|
+
const n = ye(o), s = Re(r, o.props);
|
|
106
|
+
return o.type !== u.Fragment && (s.ref = t ? z(t, n) : n), u.cloneElement(o, s);
|
|
111
107
|
}
|
|
112
|
-
return
|
|
108
|
+
return u.Children.count(o) > 1 ? u.Children.only(null) : null;
|
|
113
109
|
});
|
|
114
110
|
L.displayName = "SlotClone";
|
|
115
111
|
var Ie = ({ children: e }) => /* @__PURE__ */ l(ge, { children: e });
|
|
116
112
|
function Te(e) {
|
|
117
|
-
return
|
|
113
|
+
return u.isValidElement(e) && e.type === Ie;
|
|
118
114
|
}
|
|
119
115
|
function Re(e, t) {
|
|
120
116
|
const o = { ...t };
|
|
121
117
|
for (const r in t) {
|
|
122
118
|
const n = e[r], s = t[r];
|
|
123
|
-
/^on[A-Z]/.test(r) ? n && s ? o[r] = (...
|
|
124
|
-
s(...
|
|
119
|
+
/^on[A-Z]/.test(r) ? n && s ? o[r] = (...a) => {
|
|
120
|
+
s(...a), n(...a);
|
|
125
121
|
} : n && (o[r] = n) : r === "style" ? o[r] = { ...n, ...s } : r === "className" && (o[r] = [n, s].filter(Boolean).join(" "));
|
|
126
122
|
}
|
|
127
123
|
return { ...e, ...o };
|
|
@@ -149,9 +145,9 @@ var Se = [
|
|
|
149
145
|
"svg",
|
|
150
146
|
"ul"
|
|
151
147
|
], w = Se.reduce((e, t) => {
|
|
152
|
-
const o =
|
|
153
|
-
const { asChild: s, ...c } = r,
|
|
154
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l(
|
|
148
|
+
const o = u.forwardRef((r, n) => {
|
|
149
|
+
const { asChild: s, ...c } = r, a = s ? A : t;
|
|
150
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l(a, { ...c, ref: n });
|
|
155
151
|
});
|
|
156
152
|
return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
|
|
157
153
|
}, {});
|
|
@@ -170,13 +166,13 @@ function _e(e) {
|
|
|
170
166
|
return /* @__PURE__ */ l(n, { scope: f, itemMap: g, collectionRef: T, children: m });
|
|
171
167
|
};
|
|
172
168
|
c.displayName = t;
|
|
173
|
-
const
|
|
169
|
+
const a = e + "CollectionSlot", i = C.forwardRef(
|
|
174
170
|
(I, f) => {
|
|
175
|
-
const { scope: m, children: T } = I, g = s(
|
|
171
|
+
const { scope: m, children: T } = I, g = s(a, m), b = D(f, g.collectionRef);
|
|
176
172
|
return /* @__PURE__ */ l(A, { ref: b, children: T });
|
|
177
173
|
}
|
|
178
174
|
);
|
|
179
|
-
i.displayName =
|
|
175
|
+
i.displayName = a;
|
|
180
176
|
const d = e + "CollectionItemSlot", v = "data-radix-collection-item", p = C.forwardRef(
|
|
181
177
|
(I, f) => {
|
|
182
178
|
const { scope: m, children: T, ...g } = I, b = C.useRef(null), _ = D(f, b), G = s(d, m);
|
|
@@ -201,20 +197,20 @@ function _e(e) {
|
|
|
201
197
|
r
|
|
202
198
|
];
|
|
203
199
|
}
|
|
204
|
-
var Ge = globalThis != null && globalThis.document ?
|
|
205
|
-
}, Pe =
|
|
200
|
+
var Ge = globalThis != null && globalThis.document ? u.useLayoutEffect : () => {
|
|
201
|
+
}, Pe = u.useId || (() => {
|
|
206
202
|
}), Ee = 0;
|
|
207
203
|
function xe(e) {
|
|
208
|
-
const [t, o] =
|
|
204
|
+
const [t, o] = u.useState(Pe());
|
|
209
205
|
return Ge(() => {
|
|
210
206
|
o((r) => r ?? String(Ee++));
|
|
211
207
|
}, [e]), t ? `radix-${t}` : "";
|
|
212
208
|
}
|
|
213
209
|
function $(e) {
|
|
214
|
-
const t =
|
|
215
|
-
return
|
|
210
|
+
const t = u.useRef(e);
|
|
211
|
+
return u.useEffect(() => {
|
|
216
212
|
t.current = e;
|
|
217
|
-
}),
|
|
213
|
+
}), u.useMemo(() => (...o) => {
|
|
218
214
|
var r;
|
|
219
215
|
return (r = t.current) == null ? void 0 : r.call(t, ...o);
|
|
220
216
|
}, []);
|
|
@@ -225,15 +221,15 @@ function k({
|
|
|
225
221
|
onChange: o = () => {
|
|
226
222
|
}
|
|
227
223
|
}) {
|
|
228
|
-
const [r, n] = we({ defaultProp: t, onChange: o }), s = e !== void 0, c = s ? e : r,
|
|
224
|
+
const [r, n] = we({ defaultProp: t, onChange: o }), s = e !== void 0, c = s ? e : r, a = $(o), i = u.useCallback(
|
|
229
225
|
(d) => {
|
|
230
226
|
if (s) {
|
|
231
227
|
const p = typeof d == "function" ? d(e) : d;
|
|
232
|
-
p !== e &&
|
|
228
|
+
p !== e && a(p);
|
|
233
229
|
} else
|
|
234
230
|
n(d);
|
|
235
231
|
},
|
|
236
|
-
[s, e, n,
|
|
232
|
+
[s, e, n, a]
|
|
237
233
|
);
|
|
238
234
|
return [c, i];
|
|
239
235
|
}
|
|
@@ -241,41 +237,41 @@ function we({
|
|
|
241
237
|
defaultProp: e,
|
|
242
238
|
onChange: t
|
|
243
239
|
}) {
|
|
244
|
-
const o =
|
|
245
|
-
return
|
|
240
|
+
const o = u.useState(e), [r] = o, n = u.useRef(r), s = $(t);
|
|
241
|
+
return u.useEffect(() => {
|
|
246
242
|
n.current !== r && (s(r), n.current = r);
|
|
247
243
|
}, [r, n, s]), o;
|
|
248
244
|
}
|
|
249
|
-
var Ae =
|
|
245
|
+
var Ae = u.createContext(void 0);
|
|
250
246
|
function q(e) {
|
|
251
|
-
const t =
|
|
247
|
+
const t = u.useContext(Ae);
|
|
252
248
|
return e || t || "ltr";
|
|
253
249
|
}
|
|
254
250
|
var O = "rovingFocusGroup.onEntryFocus", Fe = { bubbles: !1, cancelable: !0 }, N = "RovingFocusGroup", [V, Z, ke] = _e(N), [Ne, J] = U(
|
|
255
251
|
N,
|
|
256
252
|
[ke]
|
|
257
|
-
), [Me, Oe] = Ne(N), Q =
|
|
253
|
+
), [Me, Oe] = Ne(N), Q = u.forwardRef(
|
|
258
254
|
(e, t) => /* @__PURE__ */ l(V.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l(V.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l(De, { ...e, ref: t }) }) })
|
|
259
255
|
);
|
|
260
256
|
Q.displayName = N;
|
|
261
|
-
var De =
|
|
257
|
+
var De = u.forwardRef((e, t) => {
|
|
262
258
|
const {
|
|
263
259
|
__scopeRovingFocusGroup: o,
|
|
264
260
|
orientation: r,
|
|
265
261
|
loop: n = !1,
|
|
266
262
|
dir: s,
|
|
267
263
|
currentTabStopId: c,
|
|
268
|
-
defaultCurrentTabStopId:
|
|
264
|
+
defaultCurrentTabStopId: a,
|
|
269
265
|
onCurrentTabStopIdChange: i,
|
|
270
266
|
onEntryFocus: d,
|
|
271
267
|
preventScrollOnEntryFocus: v = !1,
|
|
272
268
|
...p
|
|
273
|
-
} = e, h =
|
|
269
|
+
} = e, h = u.useRef(null), I = D(t, h), f = q(s), [m = null, T] = k({
|
|
274
270
|
prop: c,
|
|
275
|
-
defaultProp:
|
|
271
|
+
defaultProp: a,
|
|
276
272
|
onChange: i
|
|
277
|
-
}), [g, b] =
|
|
278
|
-
return
|
|
273
|
+
}), [g, b] = u.useState(!1), _ = $(d), G = Z(o), x = u.useRef(!1), [le, K] = u.useState(0);
|
|
274
|
+
return u.useEffect(() => {
|
|
279
275
|
const R = h.current;
|
|
280
276
|
if (R)
|
|
281
277
|
return R.addEventListener(O, _), () => R.removeEventListener(O, _);
|
|
@@ -287,16 +283,16 @@ var De = a.forwardRef((e, t) => {
|
|
|
287
283
|
dir: f,
|
|
288
284
|
loop: n,
|
|
289
285
|
currentTabStopId: m,
|
|
290
|
-
onItemFocus:
|
|
286
|
+
onItemFocus: u.useCallback(
|
|
291
287
|
(R) => T(R),
|
|
292
288
|
[T]
|
|
293
289
|
),
|
|
294
|
-
onItemShiftTab:
|
|
295
|
-
onFocusableItemAdd:
|
|
290
|
+
onItemShiftTab: u.useCallback(() => b(!0), []),
|
|
291
|
+
onFocusableItemAdd: u.useCallback(
|
|
296
292
|
() => K((R) => R + 1),
|
|
297
293
|
[]
|
|
298
294
|
),
|
|
299
|
-
onFocusableItemRemove:
|
|
295
|
+
onFocusableItemRemove: u.useCallback(
|
|
300
296
|
() => K((R) => R - 1),
|
|
301
297
|
[]
|
|
302
298
|
),
|
|
@@ -329,7 +325,7 @@ var De = a.forwardRef((e, t) => {
|
|
|
329
325
|
)
|
|
330
326
|
}
|
|
331
327
|
);
|
|
332
|
-
}), X = "RovingFocusGroupItem", H =
|
|
328
|
+
}), X = "RovingFocusGroupItem", H = u.forwardRef(
|
|
333
329
|
(e, t) => {
|
|
334
330
|
const {
|
|
335
331
|
__scopeRovingFocusGroup: o,
|
|
@@ -337,8 +333,8 @@ var De = a.forwardRef((e, t) => {
|
|
|
337
333
|
active: n = !1,
|
|
338
334
|
tabStopId: s,
|
|
339
335
|
...c
|
|
340
|
-
} = e,
|
|
341
|
-
return
|
|
336
|
+
} = e, a = xe(), i = s || a, d = Oe(X, o), v = d.currentTabStopId === i, p = Z(o), { onFocusableItemAdd: h, onFocusableItemRemove: I } = d;
|
|
337
|
+
return u.useEffect(() => {
|
|
342
338
|
if (r)
|
|
343
339
|
return h(), () => I();
|
|
344
340
|
}, [r, h, I]), /* @__PURE__ */ l(
|
|
@@ -412,8 +408,8 @@ function ee(e, t = !1) {
|
|
|
412
408
|
function $e(e, t) {
|
|
413
409
|
return e.map((o, r) => e[(t + r) % e.length]);
|
|
414
410
|
}
|
|
415
|
-
var Be = Q, Ke = H, We = "Toggle", te =
|
|
416
|
-
const { pressed: o, defaultPressed: r = !1, onPressedChange: n, ...s } = e, [c = !1,
|
|
411
|
+
var Be = Q, Ke = H, We = "Toggle", te = u.forwardRef((e, t) => {
|
|
412
|
+
const { pressed: o, defaultPressed: r = !1, onPressedChange: n, ...s } = e, [c = !1, a] = k({
|
|
417
413
|
prop: o,
|
|
418
414
|
onChange: n,
|
|
419
415
|
defaultProp: r
|
|
@@ -428,7 +424,7 @@ var Be = Q, Ke = H, We = "Toggle", te = a.forwardRef((e, t) => {
|
|
|
428
424
|
...s,
|
|
429
425
|
ref: t,
|
|
430
426
|
onClick: S(e.onClick, () => {
|
|
431
|
-
e.disabled ||
|
|
427
|
+
e.disabled || a(!c);
|
|
432
428
|
})
|
|
433
429
|
}
|
|
434
430
|
);
|
|
@@ -452,7 +448,7 @@ var [ne, se] = oe(E), je = C.forwardRef((e, t) => {
|
|
|
452
448
|
onValueChange: n = () => {
|
|
453
449
|
},
|
|
454
450
|
...s
|
|
455
|
-
} = e, [c,
|
|
451
|
+
} = e, [c, a] = k({
|
|
456
452
|
prop: o,
|
|
457
453
|
defaultProp: r,
|
|
458
454
|
onChange: n
|
|
@@ -463,8 +459,8 @@ var [ne, se] = oe(E), je = C.forwardRef((e, t) => {
|
|
|
463
459
|
scope: e.__scopeToggleGroup,
|
|
464
460
|
type: "single",
|
|
465
461
|
value: c ? [c] : [],
|
|
466
|
-
onItemActivate:
|
|
467
|
-
onItemDeactivate: C.useCallback(() =>
|
|
462
|
+
onItemActivate: a,
|
|
463
|
+
onItemDeactivate: C.useCallback(() => a(""), [a]),
|
|
468
464
|
children: /* @__PURE__ */ l(ce, { ...s, ref: t })
|
|
469
465
|
}
|
|
470
466
|
);
|
|
@@ -475,16 +471,16 @@ var [ne, se] = oe(E), je = C.forwardRef((e, t) => {
|
|
|
475
471
|
onValueChange: n = () => {
|
|
476
472
|
},
|
|
477
473
|
...s
|
|
478
|
-
} = e, [c = [],
|
|
474
|
+
} = e, [c = [], a] = k({
|
|
479
475
|
prop: o,
|
|
480
476
|
defaultProp: r,
|
|
481
477
|
onChange: n
|
|
482
478
|
}), i = C.useCallback(
|
|
483
|
-
(v) =>
|
|
484
|
-
[
|
|
479
|
+
(v) => a((p = []) => [...p, v]),
|
|
480
|
+
[a]
|
|
485
481
|
), d = C.useCallback(
|
|
486
|
-
(v) =>
|
|
487
|
-
[
|
|
482
|
+
(v) => a((p = []) => p.filter((h) => h !== v)),
|
|
483
|
+
[a]
|
|
488
484
|
);
|
|
489
485
|
return /* @__PURE__ */ l(
|
|
490
486
|
ne,
|
|
@@ -507,7 +503,7 @@ var [ze, qe] = oe(E), ce = C.forwardRef(
|
|
|
507
503
|
rovingFocus: n = !0,
|
|
508
504
|
orientation: s,
|
|
509
505
|
dir: c,
|
|
510
|
-
loop:
|
|
506
|
+
loop: a = !0,
|
|
511
507
|
...i
|
|
512
508
|
} = e, d = re(o), v = q(c), p = { role: "group", dir: v, ...i };
|
|
513
509
|
return /* @__PURE__ */ l(ze, { scope: o, rovingFocus: n, disabled: r, children: n ? /* @__PURE__ */ l(
|
|
@@ -517,14 +513,14 @@ var [ze, qe] = oe(E), ce = C.forwardRef(
|
|
|
517
513
|
...d,
|
|
518
514
|
orientation: s,
|
|
519
515
|
dir: v,
|
|
520
|
-
loop:
|
|
516
|
+
loop: a,
|
|
521
517
|
children: /* @__PURE__ */ l(w.div, { ...p, ref: t })
|
|
522
518
|
}
|
|
523
519
|
) : /* @__PURE__ */ l(w.div, { ...p, ref: t }) });
|
|
524
520
|
}
|
|
525
521
|
), F = "ToggleGroupItem", ue = C.forwardRef(
|
|
526
522
|
(e, t) => {
|
|
527
|
-
const o = se(F, e.__scopeToggleGroup), r = qe(F, e.__scopeToggleGroup), n = re(e.__scopeToggleGroup), s = o.value.includes(e.value), c = r.disabled || e.disabled,
|
|
523
|
+
const o = se(F, e.__scopeToggleGroup), r = qe(F, e.__scopeToggleGroup), n = re(e.__scopeToggleGroup), s = o.value.includes(e.value), c = r.disabled || e.disabled, a = { ...e, pressed: s, disabled: c }, i = C.useRef(null);
|
|
528
524
|
return r.rovingFocus ? /* @__PURE__ */ l(
|
|
529
525
|
Ke,
|
|
530
526
|
{
|
|
@@ -533,19 +529,19 @@ var [ze, qe] = oe(E), ce = C.forwardRef(
|
|
|
533
529
|
focusable: !c,
|
|
534
530
|
active: s,
|
|
535
531
|
ref: i,
|
|
536
|
-
children: /* @__PURE__ */ l(Y, { ...
|
|
532
|
+
children: /* @__PURE__ */ l(Y, { ...a, ref: t })
|
|
537
533
|
}
|
|
538
|
-
) : /* @__PURE__ */ l(Y, { ...
|
|
534
|
+
) : /* @__PURE__ */ l(Y, { ...a, ref: t });
|
|
539
535
|
}
|
|
540
536
|
);
|
|
541
537
|
ue.displayName = F;
|
|
542
538
|
var Y = C.forwardRef(
|
|
543
539
|
(e, t) => {
|
|
544
|
-
const { __scopeToggleGroup: o, value: r, ...n } = e, s = se(F, o), c = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 },
|
|
540
|
+
const { __scopeToggleGroup: o, value: r, ...n } = e, s = se(F, o), c = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, a = s.type === "single" ? c : void 0;
|
|
545
541
|
return /* @__PURE__ */ l(
|
|
546
542
|
te,
|
|
547
543
|
{
|
|
548
|
-
...
|
|
544
|
+
...a,
|
|
549
545
|
...n,
|
|
550
546
|
ref: t,
|
|
551
547
|
onPressedChange: (i) => {
|
|
@@ -624,7 +620,7 @@ const ae = C.createContext({
|
|
|
624
620
|
mode: n = "system",
|
|
625
621
|
focusMode: s = "system",
|
|
626
622
|
size: c = "medium",
|
|
627
|
-
defaultValue:
|
|
623
|
+
defaultValue: a,
|
|
628
624
|
className: i,
|
|
629
625
|
...d
|
|
630
626
|
}) => {
|
|
@@ -635,7 +631,7 @@ const ae = C.createContext({
|
|
|
635
631
|
disabled: r,
|
|
636
632
|
className: v,
|
|
637
633
|
value: t,
|
|
638
|
-
defaultValue:
|
|
634
|
+
defaultValue: a,
|
|
639
635
|
onValueChange: o,
|
|
640
636
|
...d,
|
|
641
637
|
type: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-togglegroup",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"react-dom": "^18.3.1 || ^19.0.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@versini/ui-types": "4.5.
|
|
42
|
+
"@versini/ui-types": "4.5.1"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@radix-ui/react-toggle-group": "1.1.
|
|
45
|
+
"@radix-ui/react-toggle-group": "1.1.2",
|
|
46
46
|
"@tailwindcss/typography": "0.5.16",
|
|
47
47
|
"clsx": "2.1.1",
|
|
48
48
|
"tailwindcss": "3.4.17"
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"sideEffects": [
|
|
51
51
|
"**/*.css"
|
|
52
52
|
],
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "45b6ae437679028f6c1b791aa27f7b0a7fd66482"
|
|
54
54
|
}
|