@versini/ui-togglegroup 4.0.2 → 4.0.4
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/components/ToggleGroup/ToggleGroup.js +357 -327
- package/dist/index.js +3 -3
- package/package.json +5 -5
|
@@ -1,126 +1,127 @@
|
|
|
1
1
|
import { jsx as f } from "react/jsx-runtime";
|
|
2
2
|
import * as l from "react";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
const
|
|
3
|
+
import C, { useContext as ge } from "react";
|
|
4
|
+
import w from "clsx";
|
|
5
|
+
const me = "av-togglegroup", ve = "av-togglegroup-item-wrapper", Ce = "av-togglegroup-item";
|
|
6
6
|
function U(e, t = []) {
|
|
7
|
-
let
|
|
8
|
-
function
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
var
|
|
13
|
-
const { scope:
|
|
14
|
-
return /* @__PURE__ */ f(
|
|
7
|
+
let o = [];
|
|
8
|
+
function r(s, c) {
|
|
9
|
+
const u = l.createContext(c), i = o.length;
|
|
10
|
+
o = [...o, c];
|
|
11
|
+
const g = (d) => {
|
|
12
|
+
var b;
|
|
13
|
+
const { scope: m, children: S, ...T } = d, h = ((b = m == null ? void 0 : m[e]) == null ? void 0 : b[i]) || u, p = l.useMemo(() => T, Object.values(T));
|
|
14
|
+
return /* @__PURE__ */ f(h.Provider, { value: p, children: S });
|
|
15
15
|
};
|
|
16
|
-
|
|
17
|
-
function
|
|
18
|
-
var
|
|
19
|
-
const
|
|
20
|
-
if (
|
|
21
|
-
if (
|
|
16
|
+
g.displayName = s + "Provider";
|
|
17
|
+
function a(d, m) {
|
|
18
|
+
var h;
|
|
19
|
+
const S = ((h = m == null ? void 0 : m[e]) == null ? void 0 : h[i]) || u, T = l.useContext(S);
|
|
20
|
+
if (T) return T;
|
|
21
|
+
if (c !== void 0) return c;
|
|
22
22
|
throw new Error(`\`${d}\` must be used within \`${s}\``);
|
|
23
23
|
}
|
|
24
|
-
return [
|
|
24
|
+
return [g, a];
|
|
25
25
|
}
|
|
26
26
|
const n = () => {
|
|
27
|
-
const s =
|
|
28
|
-
return function(
|
|
29
|
-
const i = (
|
|
27
|
+
const s = o.map((c) => l.createContext(c));
|
|
28
|
+
return function(u) {
|
|
29
|
+
const i = (u == null ? void 0 : u[e]) || s;
|
|
30
30
|
return l.useMemo(
|
|
31
|
-
() => ({ [`__scope${e}`]: { ...
|
|
32
|
-
[
|
|
31
|
+
() => ({ [`__scope${e}`]: { ...u, [e]: i } }),
|
|
32
|
+
[u, i]
|
|
33
33
|
);
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
|
-
return n.scopeName = e, [
|
|
36
|
+
return n.scopeName = e, [r, be(n, ...t)];
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function be(...e) {
|
|
39
39
|
const t = e[0];
|
|
40
40
|
if (e.length === 1) return t;
|
|
41
|
-
const
|
|
42
|
-
const
|
|
41
|
+
const o = () => {
|
|
42
|
+
const r = e.map((n) => ({
|
|
43
43
|
useScope: n(),
|
|
44
44
|
scopeName: n.scopeName
|
|
45
45
|
}));
|
|
46
46
|
return function(s) {
|
|
47
|
-
const
|
|
48
|
-
const d = i(s)[`__scope${
|
|
49
|
-
return { ...
|
|
47
|
+
const c = r.reduce((u, { useScope: i, scopeName: g }) => {
|
|
48
|
+
const d = i(s)[`__scope${g}`];
|
|
49
|
+
return { ...u, ...d };
|
|
50
50
|
}, {});
|
|
51
|
-
return l.useMemo(() => ({ [`__scope${t.scopeName}`]:
|
|
51
|
+
return l.useMemo(() => ({ [`__scope${t.scopeName}`]: c }), [c]);
|
|
52
52
|
};
|
|
53
53
|
};
|
|
54
|
-
return
|
|
54
|
+
return o.scopeName = t.scopeName, o;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function W(e, t) {
|
|
57
57
|
if (typeof e == "function")
|
|
58
58
|
return e(t);
|
|
59
59
|
e != null && (e.current = t);
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function Y(...e) {
|
|
62
62
|
return (t) => {
|
|
63
|
-
let
|
|
64
|
-
const
|
|
65
|
-
const s =
|
|
66
|
-
return !
|
|
63
|
+
let o = !1;
|
|
64
|
+
const r = e.map((n) => {
|
|
65
|
+
const s = W(n, t);
|
|
66
|
+
return !o && typeof s == "function" && (o = !0), s;
|
|
67
67
|
});
|
|
68
|
-
if (
|
|
68
|
+
if (o)
|
|
69
69
|
return () => {
|
|
70
|
-
for (let n = 0; n <
|
|
71
|
-
const s =
|
|
72
|
-
typeof s == "function" ? s() :
|
|
70
|
+
for (let n = 0; n < r.length; n++) {
|
|
71
|
+
const s = r[n];
|
|
72
|
+
typeof s == "function" ? s() : W(e[n], null);
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
77
|
function L(...e) {
|
|
78
|
-
return l.useCallback(
|
|
78
|
+
return l.useCallback(Y(...e), e);
|
|
79
79
|
}
|
|
80
80
|
// @__NO_SIDE_EFFECTS__
|
|
81
|
-
function
|
|
82
|
-
const t = /* @__PURE__ */
|
|
83
|
-
const { children: s, ...
|
|
81
|
+
function $(e) {
|
|
82
|
+
const t = /* @__PURE__ */ he(e), o = l.forwardRef((r, n) => {
|
|
83
|
+
const { children: s, ...c } = r, u = l.Children.toArray(s), i = u.find(ye);
|
|
84
84
|
if (i) {
|
|
85
|
-
const
|
|
86
|
-
return /* @__PURE__ */ f(t, { ...
|
|
85
|
+
const g = i.props.children, a = u.map((d) => d === i ? l.Children.count(g) > 1 ? l.Children.only(null) : l.isValidElement(g) ? g.props.children : null : d);
|
|
86
|
+
return /* @__PURE__ */ f(t, { ...c, ref: n, children: l.isValidElement(g) ? l.cloneElement(g, void 0, a) : null });
|
|
87
87
|
}
|
|
88
|
-
return /* @__PURE__ */ f(t, { ...
|
|
88
|
+
return /* @__PURE__ */ f(t, { ...c, ref: n, children: s });
|
|
89
89
|
});
|
|
90
|
-
return
|
|
90
|
+
return o.displayName = `${e}.Slot`, o;
|
|
91
91
|
}
|
|
92
92
|
// @__NO_SIDE_EFFECTS__
|
|
93
|
-
function
|
|
94
|
-
const t = l.forwardRef((
|
|
95
|
-
const { children: n, ...s } =
|
|
93
|
+
function he(e) {
|
|
94
|
+
const t = l.forwardRef((o, r) => {
|
|
95
|
+
const { children: n, ...s } = o;
|
|
96
96
|
if (l.isValidElement(n)) {
|
|
97
|
-
const
|
|
98
|
-
return n.type !== l.Fragment && (
|
|
97
|
+
const c = Te(n), u = Se(s, n.props);
|
|
98
|
+
return n.type !== l.Fragment && (u.ref = r ? Y(r, c) : c), l.cloneElement(n, u);
|
|
99
99
|
}
|
|
100
100
|
return l.Children.count(n) > 1 ? l.Children.only(null) : null;
|
|
101
101
|
});
|
|
102
102
|
return t.displayName = `${e}.SlotClone`, t;
|
|
103
103
|
}
|
|
104
|
-
var
|
|
105
|
-
function
|
|
106
|
-
return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId ===
|
|
104
|
+
var Ie = Symbol("radix.slottable");
|
|
105
|
+
function ye(e) {
|
|
106
|
+
return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Ie;
|
|
107
107
|
}
|
|
108
|
-
function
|
|
109
|
-
const
|
|
110
|
-
for (const
|
|
111
|
-
const n = e[
|
|
112
|
-
/^on[A-Z]/.test(
|
|
113
|
-
s(...
|
|
114
|
-
|
|
108
|
+
function Se(e, t) {
|
|
109
|
+
const o = { ...t };
|
|
110
|
+
for (const r in t) {
|
|
111
|
+
const n = e[r], s = t[r];
|
|
112
|
+
/^on[A-Z]/.test(r) ? n && s ? o[r] = (...u) => {
|
|
113
|
+
const i = s(...u);
|
|
114
|
+
return n(...u), i;
|
|
115
|
+
} : n && (o[r] = n) : r === "style" ? o[r] = { ...n, ...s } : r === "className" && (o[r] = [n, s].filter(Boolean).join(" "));
|
|
115
116
|
}
|
|
116
|
-
return { ...e, ...
|
|
117
|
+
return { ...e, ...o };
|
|
117
118
|
}
|
|
118
|
-
function
|
|
119
|
-
var
|
|
120
|
-
let t = (
|
|
121
|
-
return
|
|
119
|
+
function Te(e) {
|
|
120
|
+
var r, n;
|
|
121
|
+
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, o = t && "isReactWarning" in t && t.isReactWarning;
|
|
122
|
+
return o ? e.ref : (t = (n = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : n.get, o = t && "isReactWarning" in t && t.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
|
|
122
123
|
}
|
|
123
|
-
var
|
|
124
|
+
var Re = [
|
|
124
125
|
"a",
|
|
125
126
|
"button",
|
|
126
127
|
"div",
|
|
@@ -134,186 +135,210 @@ var Te = [
|
|
|
134
135
|
"nav",
|
|
135
136
|
"ol",
|
|
136
137
|
"p",
|
|
138
|
+
"select",
|
|
137
139
|
"span",
|
|
138
140
|
"svg",
|
|
139
141
|
"ul"
|
|
140
|
-
], A =
|
|
141
|
-
const
|
|
142
|
-
const { asChild:
|
|
143
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(i, { ...
|
|
142
|
+
], A = Re.reduce((e, t) => {
|
|
143
|
+
const o = /* @__PURE__ */ $(`Primitive.${t}`), r = l.forwardRef((n, s) => {
|
|
144
|
+
const { asChild: c, ...u } = n, i = c ? o : t;
|
|
145
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(i, { ...u, ref: s });
|
|
144
146
|
});
|
|
145
|
-
return
|
|
147
|
+
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
146
148
|
}, {});
|
|
147
|
-
function
|
|
149
|
+
function E(e, t, { checkForDefaultPrevented: o = !0 } = {}) {
|
|
148
150
|
return function(n) {
|
|
149
|
-
if (e == null || e(n),
|
|
151
|
+
if (e == null || e(n), o === !1 || !n.defaultPrevented)
|
|
150
152
|
return t == null ? void 0 : t(n);
|
|
151
153
|
};
|
|
152
154
|
}
|
|
153
|
-
function
|
|
154
|
-
const t = e + "CollectionProvider", [
|
|
155
|
+
function Pe(e) {
|
|
156
|
+
const t = e + "CollectionProvider", [o, r] = U(t), [n, s] = o(
|
|
155
157
|
t,
|
|
156
158
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
157
|
-
),
|
|
158
|
-
const { scope:
|
|
159
|
-
return /* @__PURE__ */ f(n, { scope:
|
|
159
|
+
), c = (h) => {
|
|
160
|
+
const { scope: p, children: b } = h, R = C.useRef(null), v = C.useRef(/* @__PURE__ */ new Map()).current;
|
|
161
|
+
return /* @__PURE__ */ f(n, { scope: p, itemMap: v, collectionRef: R, children: b });
|
|
160
162
|
};
|
|
161
|
-
|
|
162
|
-
const
|
|
163
|
-
(
|
|
164
|
-
const { scope:
|
|
165
|
-
return /* @__PURE__ */ f(i, { ref:
|
|
163
|
+
c.displayName = t;
|
|
164
|
+
const u = e + "CollectionSlot", i = /* @__PURE__ */ $(u), g = C.forwardRef(
|
|
165
|
+
(h, p) => {
|
|
166
|
+
const { scope: b, children: R } = h, v = s(u, b), I = L(p, v.collectionRef);
|
|
167
|
+
return /* @__PURE__ */ f(i, { ref: I, children: R });
|
|
166
168
|
}
|
|
167
169
|
);
|
|
168
|
-
|
|
169
|
-
const
|
|
170
|
-
(
|
|
171
|
-
const { scope:
|
|
172
|
-
return
|
|
170
|
+
g.displayName = u;
|
|
171
|
+
const a = e + "CollectionItemSlot", d = "data-radix-collection-item", m = /* @__PURE__ */ $(a), S = C.forwardRef(
|
|
172
|
+
(h, p) => {
|
|
173
|
+
const { scope: b, children: R, ...v } = h, I = C.useRef(null), _ = L(p, I), G = s(a, b);
|
|
174
|
+
return C.useEffect(() => (G.itemMap.set(I, { ref: I, ...v }), () => void G.itemMap.delete(I))), /* @__PURE__ */ f(m, { [d]: "", ref: _, children: R });
|
|
173
175
|
}
|
|
174
176
|
);
|
|
175
|
-
|
|
176
|
-
function
|
|
177
|
-
const
|
|
178
|
-
return
|
|
179
|
-
const
|
|
180
|
-
if (!
|
|
181
|
-
const
|
|
182
|
-
return Array.from(
|
|
183
|
-
(G,
|
|
177
|
+
S.displayName = a;
|
|
178
|
+
function T(h) {
|
|
179
|
+
const p = s(e + "CollectionConsumer", h);
|
|
180
|
+
return C.useCallback(() => {
|
|
181
|
+
const R = p.collectionRef.current;
|
|
182
|
+
if (!R) return [];
|
|
183
|
+
const v = Array.from(R.querySelectorAll(`[${d}]`));
|
|
184
|
+
return Array.from(p.itemMap.values()).sort(
|
|
185
|
+
(G, k) => v.indexOf(G.ref.current) - v.indexOf(k.ref.current)
|
|
184
186
|
);
|
|
185
|
-
}, [
|
|
187
|
+
}, [p.collectionRef, p.itemMap]);
|
|
186
188
|
}
|
|
187
189
|
return [
|
|
188
|
-
{ Provider:
|
|
189
|
-
|
|
190
|
-
|
|
190
|
+
{ Provider: c, Slot: g, ItemSlot: S },
|
|
191
|
+
T,
|
|
192
|
+
r
|
|
191
193
|
];
|
|
192
194
|
}
|
|
193
|
-
var
|
|
195
|
+
var z = globalThis != null && globalThis.document ? l.useLayoutEffect : () => {
|
|
194
196
|
}, xe = l[" useId ".trim().toString()] || (() => {
|
|
195
|
-
}),
|
|
196
|
-
function
|
|
197
|
-
const [t,
|
|
198
|
-
return
|
|
199
|
-
|
|
197
|
+
}), Ee = 0;
|
|
198
|
+
function _e(e) {
|
|
199
|
+
const [t, o] = l.useState(xe());
|
|
200
|
+
return z(() => {
|
|
201
|
+
o((r) => r ?? String(Ee++));
|
|
200
202
|
}, [e]), t ? `radix-${t}` : "";
|
|
201
203
|
}
|
|
202
|
-
function
|
|
204
|
+
function Ge(e) {
|
|
203
205
|
const t = l.useRef(e);
|
|
204
206
|
return l.useEffect(() => {
|
|
205
207
|
t.current = e;
|
|
206
|
-
}), l.useMemo(() => (...
|
|
207
|
-
var
|
|
208
|
-
return (
|
|
208
|
+
}), l.useMemo(() => (...o) => {
|
|
209
|
+
var r;
|
|
210
|
+
return (r = t.current) == null ? void 0 : r.call(t, ...o);
|
|
209
211
|
}, []);
|
|
210
212
|
}
|
|
211
|
-
|
|
213
|
+
var we = l[" useInsertionEffect ".trim().toString()] || z;
|
|
214
|
+
function M({
|
|
212
215
|
prop: e,
|
|
213
216
|
defaultProp: t,
|
|
214
|
-
onChange:
|
|
215
|
-
}
|
|
217
|
+
onChange: o = () => {
|
|
218
|
+
},
|
|
219
|
+
caller: r
|
|
216
220
|
}) {
|
|
217
|
-
const [
|
|
221
|
+
const [n, s, c] = Ae({
|
|
222
|
+
defaultProp: t,
|
|
223
|
+
onChange: o
|
|
224
|
+
}), u = e !== void 0, i = u ? e : n;
|
|
225
|
+
{
|
|
226
|
+
const a = l.useRef(e !== void 0);
|
|
227
|
+
l.useEffect(() => {
|
|
228
|
+
const d = a.current;
|
|
229
|
+
d !== u && console.warn(
|
|
230
|
+
`${r} is changing from ${d ? "controlled" : "uncontrolled"} to ${u ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
231
|
+
), a.current = u;
|
|
232
|
+
}, [u, r]);
|
|
233
|
+
}
|
|
234
|
+
const g = l.useCallback(
|
|
218
235
|
(a) => {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
236
|
+
var d;
|
|
237
|
+
if (u) {
|
|
238
|
+
const m = Fe(a) ? a(e) : a;
|
|
239
|
+
m !== e && ((d = c.current) == null || d.call(c, m));
|
|
222
240
|
} else
|
|
223
|
-
|
|
241
|
+
s(a);
|
|
224
242
|
},
|
|
225
|
-
[
|
|
243
|
+
[u, e, s, c]
|
|
226
244
|
);
|
|
227
|
-
return [
|
|
245
|
+
return [i, g];
|
|
228
246
|
}
|
|
229
|
-
function
|
|
247
|
+
function Ae({
|
|
230
248
|
defaultProp: e,
|
|
231
249
|
onChange: t
|
|
232
250
|
}) {
|
|
233
|
-
const r = l.useState(e),
|
|
234
|
-
return
|
|
235
|
-
|
|
236
|
-
}, [
|
|
251
|
+
const [o, r] = l.useState(e), n = l.useRef(o), s = l.useRef(t);
|
|
252
|
+
return we(() => {
|
|
253
|
+
s.current = t;
|
|
254
|
+
}, [t]), l.useEffect(() => {
|
|
255
|
+
var c;
|
|
256
|
+
n.current !== o && ((c = s.current) == null || c.call(s, o), n.current = o);
|
|
257
|
+
}, [o, n]), [o, r, s];
|
|
237
258
|
}
|
|
238
|
-
|
|
259
|
+
function Fe(e) {
|
|
260
|
+
return typeof e == "function";
|
|
261
|
+
}
|
|
262
|
+
var ke = l.createContext(void 0);
|
|
239
263
|
function q(e) {
|
|
240
|
-
const t = l.useContext(
|
|
264
|
+
const t = l.useContext(ke);
|
|
241
265
|
return e || t || "ltr";
|
|
242
266
|
}
|
|
243
|
-
var D = "rovingFocusGroup.onEntryFocus",
|
|
244
|
-
|
|
245
|
-
[
|
|
246
|
-
), [
|
|
247
|
-
(e, t) => /* @__PURE__ */ f(
|
|
267
|
+
var D = "rovingFocusGroup.onEntryFocus", Ne = { bubbles: !1, cancelable: !0 }, F = "RovingFocusGroup", [V, Z, Me] = Pe(F), [Oe, J] = U(
|
|
268
|
+
F,
|
|
269
|
+
[Me]
|
|
270
|
+
), [De, Le] = Oe(F), Q = l.forwardRef(
|
|
271
|
+
(e, t) => /* @__PURE__ */ f(V.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ f(V.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ f($e, { ...e, ref: t }) }) })
|
|
248
272
|
);
|
|
249
|
-
Q.displayName =
|
|
250
|
-
var
|
|
273
|
+
Q.displayName = F;
|
|
274
|
+
var $e = l.forwardRef((e, t) => {
|
|
251
275
|
const {
|
|
252
|
-
__scopeRovingFocusGroup:
|
|
253
|
-
orientation:
|
|
276
|
+
__scopeRovingFocusGroup: o,
|
|
277
|
+
orientation: r,
|
|
254
278
|
loop: n = !1,
|
|
255
279
|
dir: s,
|
|
256
|
-
currentTabStopId:
|
|
257
|
-
defaultCurrentTabStopId:
|
|
280
|
+
currentTabStopId: c,
|
|
281
|
+
defaultCurrentTabStopId: u,
|
|
258
282
|
onCurrentTabStopIdChange: i,
|
|
259
|
-
onEntryFocus:
|
|
260
|
-
preventScrollOnEntryFocus:
|
|
283
|
+
onEntryFocus: g,
|
|
284
|
+
preventScrollOnEntryFocus: a = !1,
|
|
261
285
|
...d
|
|
262
|
-
} = e,
|
|
263
|
-
prop:
|
|
264
|
-
defaultProp:
|
|
265
|
-
onChange: i
|
|
266
|
-
|
|
286
|
+
} = e, m = l.useRef(null), S = L(t, m), T = q(s), [h, p] = M({
|
|
287
|
+
prop: c,
|
|
288
|
+
defaultProp: u ?? null,
|
|
289
|
+
onChange: i,
|
|
290
|
+
caller: F
|
|
291
|
+
}), [b, R] = l.useState(!1), v = Ge(g), I = Z(o), _ = l.useRef(!1), [G, k] = l.useState(0);
|
|
267
292
|
return l.useEffect(() => {
|
|
268
|
-
const y =
|
|
293
|
+
const y = m.current;
|
|
269
294
|
if (y)
|
|
270
|
-
return y.addEventListener(D,
|
|
271
|
-
}, [
|
|
272
|
-
|
|
295
|
+
return y.addEventListener(D, v), () => y.removeEventListener(D, v);
|
|
296
|
+
}, [v]), /* @__PURE__ */ f(
|
|
297
|
+
De,
|
|
273
298
|
{
|
|
274
|
-
scope:
|
|
275
|
-
orientation:
|
|
276
|
-
dir:
|
|
299
|
+
scope: o,
|
|
300
|
+
orientation: r,
|
|
301
|
+
dir: T,
|
|
277
302
|
loop: n,
|
|
278
|
-
currentTabStopId:
|
|
303
|
+
currentTabStopId: h,
|
|
279
304
|
onItemFocus: l.useCallback(
|
|
280
|
-
(y) =>
|
|
281
|
-
[
|
|
305
|
+
(y) => p(y),
|
|
306
|
+
[p]
|
|
282
307
|
),
|
|
283
|
-
onItemShiftTab: l.useCallback(() =>
|
|
308
|
+
onItemShiftTab: l.useCallback(() => R(!0), []),
|
|
284
309
|
onFocusableItemAdd: l.useCallback(
|
|
285
|
-
() =>
|
|
310
|
+
() => k((y) => y + 1),
|
|
286
311
|
[]
|
|
287
312
|
),
|
|
288
313
|
onFocusableItemRemove: l.useCallback(
|
|
289
|
-
() =>
|
|
314
|
+
() => k((y) => y - 1),
|
|
290
315
|
[]
|
|
291
316
|
),
|
|
292
317
|
children: /* @__PURE__ */ f(
|
|
293
318
|
A.div,
|
|
294
319
|
{
|
|
295
|
-
tabIndex:
|
|
296
|
-
"data-orientation":
|
|
320
|
+
tabIndex: b || G === 0 ? -1 : 0,
|
|
321
|
+
"data-orientation": r,
|
|
297
322
|
...d,
|
|
298
|
-
ref:
|
|
323
|
+
ref: S,
|
|
299
324
|
style: { outline: "none", ...e.style },
|
|
300
|
-
onMouseDown:
|
|
325
|
+
onMouseDown: E(e.onMouseDown, () => {
|
|
301
326
|
_.current = !0;
|
|
302
327
|
}),
|
|
303
|
-
onFocus:
|
|
304
|
-
const
|
|
305
|
-
if (y.target === y.currentTarget &&
|
|
306
|
-
const
|
|
307
|
-
if (y.currentTarget.dispatchEvent(
|
|
308
|
-
const O =
|
|
328
|
+
onFocus: E(e.onFocus, (y) => {
|
|
329
|
+
const ie = !_.current;
|
|
330
|
+
if (y.target === y.currentTarget && ie && !b) {
|
|
331
|
+
const K = new CustomEvent(D, Ne);
|
|
332
|
+
if (y.currentTarget.dispatchEvent(K), !K.defaultPrevented) {
|
|
333
|
+
const O = I().filter((x) => x.focusable), fe = O.find((x) => x.active), de = O.find((x) => x.id === h), pe = [fe, de, ...O].filter(
|
|
309
334
|
Boolean
|
|
310
|
-
).map((
|
|
311
|
-
ee(
|
|
335
|
+
).map((x) => x.ref.current);
|
|
336
|
+
ee(pe, a);
|
|
312
337
|
}
|
|
313
338
|
}
|
|
314
339
|
_.current = !1;
|
|
315
340
|
}),
|
|
316
|
-
onBlur:
|
|
341
|
+
onBlur: E(e.onBlur, () => R(!1))
|
|
317
342
|
}
|
|
318
343
|
)
|
|
319
344
|
}
|
|
@@ -321,53 +346,55 @@ var Oe = l.forwardRef((e, t) => {
|
|
|
321
346
|
}), X = "RovingFocusGroupItem", H = l.forwardRef(
|
|
322
347
|
(e, t) => {
|
|
323
348
|
const {
|
|
324
|
-
__scopeRovingFocusGroup:
|
|
325
|
-
focusable:
|
|
349
|
+
__scopeRovingFocusGroup: o,
|
|
350
|
+
focusable: r = !0,
|
|
326
351
|
active: n = !1,
|
|
327
352
|
tabStopId: s,
|
|
353
|
+
children: c,
|
|
328
354
|
...u
|
|
329
|
-
} = e,
|
|
355
|
+
} = e, i = _e(), g = s || i, a = Le(X, o), d = a.currentTabStopId === g, m = Z(o), { onFocusableItemAdd: S, onFocusableItemRemove: T, currentTabStopId: h } = a;
|
|
330
356
|
return l.useEffect(() => {
|
|
331
|
-
if (
|
|
332
|
-
return
|
|
333
|
-
}, [
|
|
334
|
-
|
|
357
|
+
if (r)
|
|
358
|
+
return S(), () => T();
|
|
359
|
+
}, [r, S, T]), /* @__PURE__ */ f(
|
|
360
|
+
V.ItemSlot,
|
|
335
361
|
{
|
|
336
|
-
scope:
|
|
337
|
-
id:
|
|
338
|
-
focusable:
|
|
362
|
+
scope: o,
|
|
363
|
+
id: g,
|
|
364
|
+
focusable: r,
|
|
339
365
|
active: n,
|
|
340
366
|
children: /* @__PURE__ */ f(
|
|
341
367
|
A.span,
|
|
342
368
|
{
|
|
343
|
-
tabIndex:
|
|
369
|
+
tabIndex: d ? 0 : -1,
|
|
344
370
|
"data-orientation": a.orientation,
|
|
345
371
|
...u,
|
|
346
372
|
ref: t,
|
|
347
|
-
onMouseDown:
|
|
348
|
-
|
|
373
|
+
onMouseDown: E(e.onMouseDown, (p) => {
|
|
374
|
+
r ? a.onItemFocus(g) : p.preventDefault();
|
|
349
375
|
}),
|
|
350
|
-
onFocus:
|
|
351
|
-
onKeyDown:
|
|
376
|
+
onFocus: E(e.onFocus, () => a.onItemFocus(g)),
|
|
377
|
+
onKeyDown: E(e.onKeyDown, (p) => {
|
|
352
378
|
if (p.key === "Tab" && p.shiftKey) {
|
|
353
379
|
a.onItemShiftTab();
|
|
354
380
|
return;
|
|
355
381
|
}
|
|
356
382
|
if (p.target !== p.currentTarget) return;
|
|
357
|
-
const
|
|
358
|
-
if (
|
|
383
|
+
const b = Be(p, a.orientation, a.dir);
|
|
384
|
+
if (b !== void 0) {
|
|
359
385
|
if (p.metaKey || p.ctrlKey || p.altKey || p.shiftKey) return;
|
|
360
386
|
p.preventDefault();
|
|
361
|
-
let v =
|
|
362
|
-
if (
|
|
363
|
-
else if (
|
|
364
|
-
|
|
365
|
-
const
|
|
366
|
-
v = a.loop ?
|
|
387
|
+
let v = m().filter((I) => I.focusable).map((I) => I.ref.current);
|
|
388
|
+
if (b === "last") v.reverse();
|
|
389
|
+
else if (b === "prev" || b === "next") {
|
|
390
|
+
b === "prev" && v.reverse();
|
|
391
|
+
const I = v.indexOf(p.currentTarget);
|
|
392
|
+
v = a.loop ? Ke(v, I + 1) : v.slice(I + 1);
|
|
367
393
|
}
|
|
368
394
|
setTimeout(() => ee(v));
|
|
369
395
|
}
|
|
370
|
-
})
|
|
396
|
+
}),
|
|
397
|
+
children: typeof c == "function" ? c({ isCurrentTabStop: d, hasTabStop: h != null }) : c
|
|
371
398
|
}
|
|
372
399
|
)
|
|
373
400
|
}
|
|
@@ -375,7 +402,7 @@ var Oe = l.forwardRef((e, t) => {
|
|
|
375
402
|
}
|
|
376
403
|
);
|
|
377
404
|
H.displayName = X;
|
|
378
|
-
var
|
|
405
|
+
var Ve = {
|
|
379
406
|
ArrowLeft: "prev",
|
|
380
407
|
ArrowUp: "prev",
|
|
381
408
|
ArrowRight: "next",
|
|
@@ -385,185 +412,188 @@ var De = {
|
|
|
385
412
|
PageDown: "last",
|
|
386
413
|
End: "last"
|
|
387
414
|
};
|
|
388
|
-
function
|
|
415
|
+
function Ue(e, t) {
|
|
389
416
|
return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
|
|
390
417
|
}
|
|
391
|
-
function
|
|
392
|
-
const
|
|
393
|
-
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(
|
|
394
|
-
return
|
|
418
|
+
function Be(e, t, o) {
|
|
419
|
+
const r = Ue(e.key, o);
|
|
420
|
+
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r)))
|
|
421
|
+
return Ve[r];
|
|
395
422
|
}
|
|
396
423
|
function ee(e, t = !1) {
|
|
397
|
-
const
|
|
398
|
-
for (const
|
|
399
|
-
if (
|
|
424
|
+
const o = document.activeElement;
|
|
425
|
+
for (const r of e)
|
|
426
|
+
if (r === o || (r.focus({ preventScroll: t }), document.activeElement !== o)) return;
|
|
400
427
|
}
|
|
401
|
-
function
|
|
402
|
-
return e.map((
|
|
428
|
+
function Ke(e, t) {
|
|
429
|
+
return e.map((o, r) => e[(t + r) % e.length]);
|
|
403
430
|
}
|
|
404
|
-
var
|
|
405
|
-
const { pressed:
|
|
406
|
-
prop:
|
|
431
|
+
var We = Q, je = H, te = "Toggle", oe = l.forwardRef((e, t) => {
|
|
432
|
+
const { pressed: o, defaultPressed: r, onPressedChange: n, ...s } = e, [c, u] = M({
|
|
433
|
+
prop: o,
|
|
407
434
|
onChange: n,
|
|
408
|
-
defaultProp:
|
|
435
|
+
defaultProp: r ?? !1,
|
|
436
|
+
caller: te
|
|
409
437
|
});
|
|
410
438
|
return /* @__PURE__ */ f(
|
|
411
439
|
A.button,
|
|
412
440
|
{
|
|
413
441
|
type: "button",
|
|
414
|
-
"aria-pressed":
|
|
415
|
-
"data-state":
|
|
442
|
+
"aria-pressed": c,
|
|
443
|
+
"data-state": c ? "on" : "off",
|
|
416
444
|
"data-disabled": e.disabled ? "" : void 0,
|
|
417
445
|
...s,
|
|
418
446
|
ref: t,
|
|
419
|
-
onClick:
|
|
420
|
-
e.disabled ||
|
|
447
|
+
onClick: E(e.onClick, () => {
|
|
448
|
+
e.disabled || u(!c);
|
|
421
449
|
})
|
|
422
450
|
}
|
|
423
451
|
);
|
|
424
452
|
});
|
|
425
|
-
|
|
426
|
-
var
|
|
453
|
+
oe.displayName = te;
|
|
454
|
+
var P = "ToggleGroup", [re, lt] = U(P, [
|
|
427
455
|
J
|
|
428
|
-
]),
|
|
429
|
-
const { type:
|
|
430
|
-
if (
|
|
431
|
-
return /* @__PURE__ */ f(
|
|
432
|
-
if (
|
|
433
|
-
return /* @__PURE__ */ f(
|
|
434
|
-
throw new Error(`Missing prop \`type\` expected on \`${
|
|
456
|
+
]), ne = J(), B = C.forwardRef((e, t) => {
|
|
457
|
+
const { type: o, ...r } = e;
|
|
458
|
+
if (o === "single")
|
|
459
|
+
return /* @__PURE__ */ f(Ye, { ...r, ref: t });
|
|
460
|
+
if (o === "multiple")
|
|
461
|
+
return /* @__PURE__ */ f(ze, { ...r, ref: t });
|
|
462
|
+
throw new Error(`Missing prop \`type\` expected on \`${P}\``);
|
|
435
463
|
});
|
|
436
|
-
|
|
437
|
-
var [
|
|
464
|
+
B.displayName = P;
|
|
465
|
+
var [se, ce] = re(P), Ye = C.forwardRef((e, t) => {
|
|
438
466
|
const {
|
|
439
|
-
value:
|
|
440
|
-
defaultValue:
|
|
467
|
+
value: o,
|
|
468
|
+
defaultValue: r,
|
|
441
469
|
onValueChange: n = () => {
|
|
442
470
|
},
|
|
443
471
|
...s
|
|
444
|
-
} = e, [
|
|
445
|
-
prop:
|
|
446
|
-
defaultProp:
|
|
447
|
-
onChange: n
|
|
472
|
+
} = e, [c, u] = M({
|
|
473
|
+
prop: o,
|
|
474
|
+
defaultProp: r ?? "",
|
|
475
|
+
onChange: n,
|
|
476
|
+
caller: P
|
|
448
477
|
});
|
|
449
478
|
return /* @__PURE__ */ f(
|
|
450
|
-
|
|
479
|
+
se,
|
|
451
480
|
{
|
|
452
481
|
scope: e.__scopeToggleGroup,
|
|
453
482
|
type: "single",
|
|
454
|
-
value:
|
|
455
|
-
onItemActivate:
|
|
456
|
-
onItemDeactivate:
|
|
457
|
-
children: /* @__PURE__ */ f(
|
|
483
|
+
value: C.useMemo(() => c ? [c] : [], [c]),
|
|
484
|
+
onItemActivate: u,
|
|
485
|
+
onItemDeactivate: C.useCallback(() => u(""), [u]),
|
|
486
|
+
children: /* @__PURE__ */ f(ue, { ...s, ref: t })
|
|
458
487
|
}
|
|
459
488
|
);
|
|
460
|
-
}),
|
|
489
|
+
}), ze = C.forwardRef((e, t) => {
|
|
461
490
|
const {
|
|
462
|
-
value:
|
|
463
|
-
defaultValue:
|
|
491
|
+
value: o,
|
|
492
|
+
defaultValue: r,
|
|
464
493
|
onValueChange: n = () => {
|
|
465
494
|
},
|
|
466
495
|
...s
|
|
467
|
-
} = e, [
|
|
468
|
-
prop:
|
|
469
|
-
defaultProp:
|
|
470
|
-
onChange: n
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
[
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
[
|
|
496
|
+
} = e, [c, u] = M({
|
|
497
|
+
prop: o,
|
|
498
|
+
defaultProp: r ?? [],
|
|
499
|
+
onChange: n,
|
|
500
|
+
caller: P
|
|
501
|
+
}), i = C.useCallback(
|
|
502
|
+
(a) => u((d = []) => [...d, a]),
|
|
503
|
+
[u]
|
|
504
|
+
), g = C.useCallback(
|
|
505
|
+
(a) => u((d = []) => d.filter((m) => m !== a)),
|
|
506
|
+
[u]
|
|
477
507
|
);
|
|
478
508
|
return /* @__PURE__ */ f(
|
|
479
|
-
|
|
509
|
+
se,
|
|
480
510
|
{
|
|
481
511
|
scope: e.__scopeToggleGroup,
|
|
482
512
|
type: "multiple",
|
|
483
|
-
value:
|
|
513
|
+
value: c,
|
|
484
514
|
onItemActivate: i,
|
|
485
|
-
onItemDeactivate:
|
|
486
|
-
children: /* @__PURE__ */ f(
|
|
515
|
+
onItemDeactivate: g,
|
|
516
|
+
children: /* @__PURE__ */ f(ue, { ...s, ref: t })
|
|
487
517
|
}
|
|
488
518
|
);
|
|
489
519
|
});
|
|
490
|
-
|
|
491
|
-
var [
|
|
520
|
+
B.displayName = P;
|
|
521
|
+
var [qe, Ze] = re(P), ue = C.forwardRef(
|
|
492
522
|
(e, t) => {
|
|
493
523
|
const {
|
|
494
|
-
__scopeToggleGroup:
|
|
495
|
-
disabled:
|
|
524
|
+
__scopeToggleGroup: o,
|
|
525
|
+
disabled: r = !1,
|
|
496
526
|
rovingFocus: n = !0,
|
|
497
527
|
orientation: s,
|
|
498
|
-
dir:
|
|
499
|
-
loop:
|
|
528
|
+
dir: c,
|
|
529
|
+
loop: u = !0,
|
|
500
530
|
...i
|
|
501
|
-
} = e,
|
|
502
|
-
return /* @__PURE__ */ f(
|
|
503
|
-
|
|
531
|
+
} = e, g = ne(o), a = q(c), d = { role: "group", dir: a, ...i };
|
|
532
|
+
return /* @__PURE__ */ f(qe, { scope: o, rovingFocus: n, disabled: r, children: n ? /* @__PURE__ */ f(
|
|
533
|
+
We,
|
|
504
534
|
{
|
|
505
535
|
asChild: !0,
|
|
506
|
-
...
|
|
536
|
+
...g,
|
|
507
537
|
orientation: s,
|
|
508
|
-
dir:
|
|
509
|
-
loop:
|
|
538
|
+
dir: a,
|
|
539
|
+
loop: u,
|
|
510
540
|
children: /* @__PURE__ */ f(A.div, { ...d, ref: t })
|
|
511
541
|
}
|
|
512
542
|
) : /* @__PURE__ */ f(A.div, { ...d, ref: t }) });
|
|
513
543
|
}
|
|
514
|
-
),
|
|
544
|
+
), N = "ToggleGroupItem", le = C.forwardRef(
|
|
515
545
|
(e, t) => {
|
|
516
|
-
const
|
|
517
|
-
return
|
|
518
|
-
|
|
546
|
+
const o = ce(N, e.__scopeToggleGroup), r = Ze(N, e.__scopeToggleGroup), n = ne(e.__scopeToggleGroup), s = o.value.includes(e.value), c = r.disabled || e.disabled, u = { ...e, pressed: s, disabled: c }, i = C.useRef(null);
|
|
547
|
+
return r.rovingFocus ? /* @__PURE__ */ f(
|
|
548
|
+
je,
|
|
519
549
|
{
|
|
520
550
|
asChild: !0,
|
|
521
551
|
...n,
|
|
522
|
-
focusable: !
|
|
552
|
+
focusable: !c,
|
|
523
553
|
active: s,
|
|
524
554
|
ref: i,
|
|
525
|
-
children: /* @__PURE__ */ f(
|
|
555
|
+
children: /* @__PURE__ */ f(j, { ...u, ref: t })
|
|
526
556
|
}
|
|
527
|
-
) : /* @__PURE__ */ f(
|
|
557
|
+
) : /* @__PURE__ */ f(j, { ...u, ref: t });
|
|
528
558
|
}
|
|
529
559
|
);
|
|
530
|
-
|
|
531
|
-
var
|
|
560
|
+
le.displayName = N;
|
|
561
|
+
var j = C.forwardRef(
|
|
532
562
|
(e, t) => {
|
|
533
|
-
const { __scopeToggleGroup:
|
|
563
|
+
const { __scopeToggleGroup: o, value: r, ...n } = e, s = ce(N, o), c = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, u = s.type === "single" ? c : void 0;
|
|
534
564
|
return /* @__PURE__ */ f(
|
|
535
|
-
|
|
565
|
+
oe,
|
|
536
566
|
{
|
|
537
|
-
...
|
|
567
|
+
...u,
|
|
538
568
|
...n,
|
|
539
569
|
ref: t,
|
|
540
570
|
onPressedChange: (i) => {
|
|
541
|
-
i ? s.onItemActivate(
|
|
571
|
+
i ? s.onItemActivate(r) : s.onItemDeactivate(r);
|
|
542
572
|
}
|
|
543
573
|
}
|
|
544
574
|
);
|
|
545
575
|
}
|
|
546
|
-
),
|
|
547
|
-
const
|
|
576
|
+
), Je = B, Qe = le;
|
|
577
|
+
const ae = C.createContext({
|
|
548
578
|
size: "medium",
|
|
549
579
|
focusMode: "system",
|
|
550
580
|
mode: "system"
|
|
551
|
-
}),
|
|
581
|
+
}), Xe = ({ focusMode: e }) => w("focus:outline", "focus:outline-2", "focus:outline-offset", {
|
|
552
582
|
"focus:outline-focus-light": e === "light",
|
|
553
583
|
"focus:outline-focus-dark": e === "dark",
|
|
554
584
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
555
585
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
556
|
-
}),
|
|
586
|
+
}), He = ({ mode: e }) => w({
|
|
557
587
|
"data-[state=on]:bg-surface-medium": e === "dark",
|
|
558
588
|
"data-[state=on]:bg-surface-lightest": e === "light",
|
|
559
589
|
"data-[state=on]:bg-surface-lightest dark:data-[state=on]:bg-surface-medium": e === "system",
|
|
560
590
|
"data-[state=on]:bg-surface-medium dark:data-[state=on]:bg-surface-lightest": e === "alt-system"
|
|
561
|
-
}),
|
|
591
|
+
}), et = ({ size: e }) => w({
|
|
562
592
|
"h-5 px-2": e === "small",
|
|
563
593
|
"h-6 px-3": e === "medium",
|
|
564
594
|
"h-7 px-4": e === "large"
|
|
565
|
-
}),
|
|
566
|
-
|
|
595
|
+
}), tt = ({ mode: e }) => w(
|
|
596
|
+
ve,
|
|
567
597
|
"px-1",
|
|
568
598
|
"relative",
|
|
569
599
|
"border-r",
|
|
@@ -576,26 +606,26 @@ const le = b.createContext({
|
|
|
576
606
|
"border-surface-light dark:border-surface-darker": e === "system",
|
|
577
607
|
"border-surface-darker dark:border-surface-light": e === "alt-system"
|
|
578
608
|
}
|
|
579
|
-
),
|
|
609
|
+
), ot = ({
|
|
580
610
|
focusMode: e,
|
|
581
611
|
mode: t,
|
|
582
|
-
size:
|
|
612
|
+
size: o
|
|
583
613
|
}) => ({
|
|
584
|
-
wrapperClass:
|
|
585
|
-
itemClass:
|
|
586
|
-
|
|
614
|
+
wrapperClass: tt({ mode: t }),
|
|
615
|
+
itemClass: w(
|
|
616
|
+
Ce,
|
|
587
617
|
"flex items-center justify-center bg-transparent",
|
|
588
618
|
"rounded-xs",
|
|
589
619
|
"transition duration-200 ease",
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
620
|
+
et({ size: o }),
|
|
621
|
+
Xe({ focusMode: e }),
|
|
622
|
+
He({ mode: t })
|
|
593
623
|
)
|
|
594
|
-
}),
|
|
624
|
+
}), rt = ({
|
|
595
625
|
mode: e,
|
|
596
626
|
className: t
|
|
597
|
-
}) =>
|
|
598
|
-
|
|
627
|
+
}) => w(
|
|
628
|
+
me,
|
|
599
629
|
"inline-flex p-1",
|
|
600
630
|
"rounded-xs",
|
|
601
631
|
{
|
|
@@ -605,40 +635,40 @@ const le = b.createContext({
|
|
|
605
635
|
"bg-surface-darker text-copy-lighter dark:bg-surface-light dark:text-copy-dark": e === "alt-system"
|
|
606
636
|
},
|
|
607
637
|
t
|
|
608
|
-
),
|
|
638
|
+
), at = ({
|
|
609
639
|
children: e,
|
|
610
640
|
value: t,
|
|
611
|
-
onValueChange:
|
|
612
|
-
disabled:
|
|
641
|
+
onValueChange: o,
|
|
642
|
+
disabled: r,
|
|
613
643
|
mode: n = "system",
|
|
614
644
|
focusMode: s = "system",
|
|
615
|
-
size:
|
|
616
|
-
defaultValue:
|
|
645
|
+
size: c = "medium",
|
|
646
|
+
defaultValue: u,
|
|
617
647
|
className: i,
|
|
618
|
-
...
|
|
648
|
+
...g
|
|
619
649
|
}) => {
|
|
620
|
-
const
|
|
621
|
-
return /* @__PURE__ */ f(
|
|
622
|
-
|
|
650
|
+
const a = rt({ mode: n, className: i }), d = { size: c, focusMode: s, mode: n };
|
|
651
|
+
return /* @__PURE__ */ f(ae.Provider, { value: d, children: /* @__PURE__ */ f(
|
|
652
|
+
Je,
|
|
623
653
|
{
|
|
624
|
-
disabled:
|
|
625
|
-
className:
|
|
654
|
+
disabled: r,
|
|
655
|
+
className: a,
|
|
626
656
|
value: t,
|
|
627
|
-
defaultValue:
|
|
628
|
-
onValueChange:
|
|
629
|
-
...
|
|
657
|
+
defaultValue: u,
|
|
658
|
+
onValueChange: o,
|
|
659
|
+
...g,
|
|
630
660
|
type: "single",
|
|
631
661
|
children: e
|
|
632
662
|
}
|
|
633
663
|
) });
|
|
634
|
-
},
|
|
635
|
-
const { size:
|
|
636
|
-
focusMode:
|
|
664
|
+
}, it = ({ value: e, disabled: t }) => {
|
|
665
|
+
const { size: o, focusMode: r, mode: n } = ge(ae), { itemClass: s, wrapperClass: c } = ot({
|
|
666
|
+
focusMode: r,
|
|
637
667
|
mode: n,
|
|
638
|
-
size:
|
|
668
|
+
size: o
|
|
639
669
|
});
|
|
640
|
-
return /* @__PURE__ */ f("div", { className:
|
|
641
|
-
|
|
670
|
+
return /* @__PURE__ */ f("div", { className: c, children: /* @__PURE__ */ f(
|
|
671
|
+
Qe,
|
|
642
672
|
{
|
|
643
673
|
disabled: t,
|
|
644
674
|
className: s,
|
|
@@ -648,9 +678,9 @@ const le = b.createContext({
|
|
|
648
678
|
) });
|
|
649
679
|
};
|
|
650
680
|
export {
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
681
|
+
me as TOGGLEGROUP_CLASSNAME,
|
|
682
|
+
Ce as TOGGLEGROUP_ITEM_CLASSNAME,
|
|
683
|
+
ve as TOGGLEGROUP_ITEM_WRAPPER_CLASSNAME,
|
|
684
|
+
at as ToggleGroup,
|
|
685
|
+
it as ToggleGroupItem
|
|
656
686
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { TOGGLEGROUP_CLASSNAME as E, TOGGLEGROUP_ITEM_CLASSNAME as e, TOGGLEGROUP_ITEM_WRAPPER_CLASSNAME as T, ToggleGroup as i, ToggleGroupItem as r } from "./components/ToggleGroup/ToggleGroup.js";
|
|
2
2
|
/*!
|
|
3
|
-
@versini/ui-togglegroup v4.0.
|
|
3
|
+
@versini/ui-togglegroup v4.0.4
|
|
4
4
|
© 2025 gizmette.com
|
|
5
5
|
*/
|
|
6
6
|
try {
|
|
7
7
|
window.__VERSINI_UI_TOGGLEGROUP__ || (window.__VERSINI_UI_TOGGLEGROUP__ = {
|
|
8
|
-
version: "4.0.
|
|
9
|
-
buildTime: "
|
|
8
|
+
version: "4.0.4",
|
|
9
|
+
buildTime: "06/20/2025 05:21 PM EDT",
|
|
10
10
|
homepage: "https://github.com/aversini/ui-components",
|
|
11
11
|
license: "MIT"
|
|
12
12
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-togglegroup",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -39,16 +39,16 @@
|
|
|
39
39
|
"react-dom": "^18.3.1 || ^19.0.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@versini/ui-types": "5.0.
|
|
42
|
+
"@versini/ui-types": "5.0.4"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@radix-ui/react-toggle-group": "1.1.
|
|
45
|
+
"@radix-ui/react-toggle-group": "1.1.10",
|
|
46
46
|
"@tailwindcss/typography": "0.5.16",
|
|
47
47
|
"clsx": "2.1.1",
|
|
48
|
-
"tailwindcss": "4.1.
|
|
48
|
+
"tailwindcss": "4.1.10"
|
|
49
49
|
},
|
|
50
50
|
"sideEffects": [
|
|
51
51
|
"**/*.css"
|
|
52
52
|
],
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "2fffae99315244f0662bdecbe45a89bc770f0f15"
|
|
54
54
|
}
|