@purpurds/tabs 8.4.0 → 8.5.1
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/LICENSE.txt +1 -1
- package/dist/styles.css +1 -1
- package/dist/tabs.cjs.js +3 -3
- package/dist/tabs.cjs.js.map +1 -1
- package/dist/tabs.d.ts.map +1 -1
- package/dist/tabs.es.js +430 -438
- package/dist/tabs.es.js.map +1 -1
- package/package.json +8 -8
- package/src/tab-header.module.scss +1 -1
- package/src/tabs.module.scss +4 -3
- package/src/tabs.tsx +19 -28
package/dist/tabs.es.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { jsx as m, jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
1
|
+
import { jsx as m, jsxs as ee } from "react/jsx-runtime";
|
|
2
|
+
import * as u from "react";
|
|
3
|
+
import O, { forwardRef as be, isValidElement as Ge, useRef as te, useState as U, Children as q, useEffect as Y } from "react";
|
|
4
4
|
import "react-dom";
|
|
5
|
-
function
|
|
5
|
+
function ke(e) {
|
|
6
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7
7
|
}
|
|
8
|
-
var
|
|
8
|
+
var le = { exports: {} };
|
|
9
9
|
/*!
|
|
10
10
|
Copyright (c) 2018 Jed Watson.
|
|
11
11
|
Licensed under the MIT License (MIT), see
|
|
12
12
|
http://jedwatson.github.io/classnames
|
|
13
13
|
*/
|
|
14
|
-
var
|
|
14
|
+
var de;
|
|
15
15
|
function ze() {
|
|
16
|
-
return
|
|
16
|
+
return de || (de = 1, (function(e) {
|
|
17
17
|
(function() {
|
|
18
18
|
var t = {}.hasOwnProperty;
|
|
19
19
|
function r() {
|
|
20
|
-
for (var n = "",
|
|
21
|
-
var
|
|
22
|
-
|
|
20
|
+
for (var n = "", i = 0; i < arguments.length; i++) {
|
|
21
|
+
var c = arguments[i];
|
|
22
|
+
c && (n = s(n, o.call(this, c)));
|
|
23
23
|
}
|
|
24
24
|
return n;
|
|
25
25
|
}
|
|
@@ -32,20 +32,20 @@ function ze() {
|
|
|
32
32
|
return r.apply(this, n);
|
|
33
33
|
if (n.toString !== Object.prototype.toString && !n.toString.toString().includes("[native code]"))
|
|
34
34
|
return n.toString();
|
|
35
|
-
var
|
|
36
|
-
for (var
|
|
37
|
-
t.call(n,
|
|
38
|
-
return
|
|
35
|
+
var i = "";
|
|
36
|
+
for (var c in n)
|
|
37
|
+
t.call(n, c) && n[c] && (i = s(i, this && this[c] || c));
|
|
38
|
+
return i;
|
|
39
39
|
}
|
|
40
|
-
function s(n,
|
|
41
|
-
return
|
|
40
|
+
function s(n, i) {
|
|
41
|
+
return i ? n ? n + " " + i : n + i : n;
|
|
42
42
|
}
|
|
43
43
|
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
44
44
|
})();
|
|
45
|
-
})(
|
|
45
|
+
})(le)), le.exports;
|
|
46
46
|
}
|
|
47
|
-
var
|
|
48
|
-
const
|
|
47
|
+
var Ke = ze();
|
|
48
|
+
const qe = /* @__PURE__ */ ke(Ke), Ye = {
|
|
49
49
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
50
50
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
51
51
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -53,72 +53,72 @@ const Ze = /* @__PURE__ */ qe(Ye), Xe = {
|
|
|
53
53
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
54
54
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
55
55
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
56
|
-
},
|
|
56
|
+
}, Ze = qe.bind(Ye), fe = "purpur-icon", Xe = "md", He = (e) => e.filter((t) => Object.keys(t).length >= 1).map((t) => `${t.name}="${t.value}"`).join(" "), Je = ({ content: e = "", title: t } = {}) => {
|
|
57
57
|
const r = [
|
|
58
58
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
59
59
|
{ name: "fill", value: "currentColor" },
|
|
60
60
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
61
61
|
t ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
62
62
|
], o = t ? `<title>${t}</title>` : "";
|
|
63
|
-
return `<svg ${
|
|
64
|
-
},
|
|
65
|
-
const n =
|
|
66
|
-
content:
|
|
63
|
+
return `<svg ${He(r)}>${o}${e}</svg>`;
|
|
64
|
+
}, Qe = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), ge = ({ svg: e, allyTitle: t, className: r, size: o = Xe, ...s }) => {
|
|
65
|
+
const n = Je({
|
|
66
|
+
content: Qe(e.svg),
|
|
67
67
|
title: t
|
|
68
|
-
}),
|
|
69
|
-
return /* @__PURE__ */ m("span", { className:
|
|
68
|
+
}), i = Ze(fe, `${fe}--${o}`, r);
|
|
69
|
+
return /* @__PURE__ */ m("span", { className: i, dangerouslySetInnerHTML: { __html: n }, ...s });
|
|
70
70
|
};
|
|
71
|
-
|
|
72
|
-
const
|
|
71
|
+
ge.displayName = "Icon";
|
|
72
|
+
const et = {
|
|
73
73
|
name: "chevron-left",
|
|
74
74
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M16.175 3.905a.9.9 0 0 1-.08 1.27L8.36 12l7.736 6.825a.9.9 0 0 1-1.191 1.35l-8.5-7.5a.9.9 0 0 1 0-1.35l8.5-7.5a.9.9 0 0 1 1.27.08Z" clip-rule="evenodd"/></svg>',
|
|
75
75
|
keywords: ["chevron-left"],
|
|
76
76
|
category: "utility"
|
|
77
|
-
},
|
|
77
|
+
}, tt = {
|
|
78
78
|
name: "chevron-right",
|
|
79
79
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M7.809 3.924a.9.9 0 0 0 .115 1.267L16.094 12l-8.17 6.809a.9.9 0 0 0 1.152 1.382l9-7.5a.9.9 0 0 0 0-1.382l-9-7.5a.9.9 0 0 0-1.267.115Z" clip-rule="evenodd"/></svg>',
|
|
80
80
|
keywords: ["chevron-right"],
|
|
81
81
|
category: "utility"
|
|
82
82
|
};
|
|
83
|
-
function
|
|
83
|
+
function A(e, t, { checkForDefaultPrevented: r = !0 } = {}) {
|
|
84
84
|
return function(s) {
|
|
85
85
|
if (e == null || e(s), r === !1 || !s.defaultPrevented)
|
|
86
86
|
return t == null ? void 0 : t(s);
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function ie(e, t = []) {
|
|
90
90
|
let r = [];
|
|
91
|
-
function o(n,
|
|
92
|
-
const
|
|
93
|
-
r = [...r,
|
|
94
|
-
const
|
|
91
|
+
function o(n, i) {
|
|
92
|
+
const c = u.createContext(i), d = r.length;
|
|
93
|
+
r = [...r, i];
|
|
94
|
+
const a = (f) => {
|
|
95
95
|
var C;
|
|
96
|
-
const { scope:
|
|
97
|
-
return /* @__PURE__ */ m(h.Provider, { value:
|
|
96
|
+
const { scope: _, children: g, ...I } = f, h = ((C = _ == null ? void 0 : _[e]) == null ? void 0 : C[d]) || c, v = u.useMemo(() => I, Object.values(I));
|
|
97
|
+
return /* @__PURE__ */ m(h.Provider, { value: v, children: g });
|
|
98
98
|
};
|
|
99
|
-
|
|
100
|
-
function l(f,
|
|
99
|
+
a.displayName = n + "Provider";
|
|
100
|
+
function l(f, _) {
|
|
101
101
|
var h;
|
|
102
|
-
const g = ((h =
|
|
103
|
-
if (
|
|
104
|
-
if (
|
|
102
|
+
const g = ((h = _ == null ? void 0 : _[e]) == null ? void 0 : h[d]) || c, I = u.useContext(g);
|
|
103
|
+
if (I) return I;
|
|
104
|
+
if (i !== void 0) return i;
|
|
105
105
|
throw new Error(`\`${f}\` must be used within \`${n}\``);
|
|
106
106
|
}
|
|
107
|
-
return [
|
|
107
|
+
return [a, l];
|
|
108
108
|
}
|
|
109
109
|
const s = () => {
|
|
110
|
-
const n = r.map((
|
|
111
|
-
return function(
|
|
112
|
-
const d = (
|
|
113
|
-
return
|
|
114
|
-
() => ({ [`__scope${e}`]: { ...
|
|
115
|
-
[
|
|
110
|
+
const n = r.map((i) => u.createContext(i));
|
|
111
|
+
return function(c) {
|
|
112
|
+
const d = (c == null ? void 0 : c[e]) || n;
|
|
113
|
+
return u.useMemo(
|
|
114
|
+
() => ({ [`__scope${e}`]: { ...c, [e]: d } }),
|
|
115
|
+
[c, d]
|
|
116
116
|
);
|
|
117
117
|
};
|
|
118
118
|
};
|
|
119
|
-
return s.scopeName = e, [o,
|
|
119
|
+
return s.scopeName = e, [o, nt(s, ...t)];
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function nt(...e) {
|
|
122
122
|
const t = e[0];
|
|
123
123
|
if (e.length === 1) return t;
|
|
124
124
|
const r = () => {
|
|
@@ -127,133 +127,133 @@ function ot(...e) {
|
|
|
127
127
|
scopeName: s.scopeName
|
|
128
128
|
}));
|
|
129
129
|
return function(n) {
|
|
130
|
-
const
|
|
131
|
-
const f = d(n)[`__scope${
|
|
132
|
-
return { ...
|
|
130
|
+
const i = o.reduce((c, { useScope: d, scopeName: a }) => {
|
|
131
|
+
const f = d(n)[`__scope${a}`];
|
|
132
|
+
return { ...c, ...f };
|
|
133
133
|
}, {});
|
|
134
|
-
return
|
|
134
|
+
return u.useMemo(() => ({ [`__scope${t.scopeName}`]: i }), [i]);
|
|
135
135
|
};
|
|
136
136
|
};
|
|
137
137
|
return r.scopeName = t.scopeName, r;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function pe(e, t) {
|
|
140
140
|
if (typeof e == "function")
|
|
141
141
|
return e(t);
|
|
142
142
|
e != null && (e.current = t);
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function he(...e) {
|
|
145
145
|
return (t) => {
|
|
146
146
|
let r = !1;
|
|
147
147
|
const o = e.map((s) => {
|
|
148
|
-
const n =
|
|
148
|
+
const n = pe(s, t);
|
|
149
149
|
return !r && typeof n == "function" && (r = !0), n;
|
|
150
150
|
});
|
|
151
151
|
if (r)
|
|
152
152
|
return () => {
|
|
153
153
|
for (let s = 0; s < o.length; s++) {
|
|
154
154
|
const n = o[s];
|
|
155
|
-
typeof n == "function" ? n() :
|
|
155
|
+
typeof n == "function" ? n() : pe(e[s], null);
|
|
156
156
|
}
|
|
157
157
|
};
|
|
158
158
|
};
|
|
159
159
|
}
|
|
160
|
-
function
|
|
161
|
-
return
|
|
160
|
+
function X(...e) {
|
|
161
|
+
return u.useCallback(he(...e), e);
|
|
162
162
|
}
|
|
163
163
|
// @__NO_SIDE_EFFECTS__
|
|
164
|
-
function
|
|
165
|
-
const t = /* @__PURE__ */
|
|
166
|
-
const { children: n, ...
|
|
164
|
+
function oe(e) {
|
|
165
|
+
const t = /* @__PURE__ */ rt(e), r = u.forwardRef((o, s) => {
|
|
166
|
+
const { children: n, ...i } = o, c = u.Children.toArray(n), d = c.find(st);
|
|
167
167
|
if (d) {
|
|
168
|
-
const
|
|
169
|
-
return /* @__PURE__ */ m(t, { ...
|
|
168
|
+
const a = d.props.children, l = c.map((f) => f === d ? u.Children.count(a) > 1 ? u.Children.only(null) : u.isValidElement(a) ? a.props.children : null : f);
|
|
169
|
+
return /* @__PURE__ */ m(t, { ...i, ref: s, children: u.isValidElement(a) ? u.cloneElement(a, void 0, l) : null });
|
|
170
170
|
}
|
|
171
|
-
return /* @__PURE__ */ m(t, { ...
|
|
171
|
+
return /* @__PURE__ */ m(t, { ...i, ref: s, children: n });
|
|
172
172
|
});
|
|
173
173
|
return r.displayName = `${e}.Slot`, r;
|
|
174
174
|
}
|
|
175
175
|
// @__NO_SIDE_EFFECTS__
|
|
176
|
-
function
|
|
177
|
-
const t =
|
|
176
|
+
function rt(e) {
|
|
177
|
+
const t = u.forwardRef((r, o) => {
|
|
178
178
|
const { children: s, ...n } = r;
|
|
179
|
-
if (
|
|
180
|
-
const
|
|
181
|
-
return s.type !==
|
|
179
|
+
if (u.isValidElement(s)) {
|
|
180
|
+
const i = ct(s), c = it(n, s.props);
|
|
181
|
+
return s.type !== u.Fragment && (c.ref = o ? he(o, i) : i), u.cloneElement(s, c);
|
|
182
182
|
}
|
|
183
|
-
return
|
|
183
|
+
return u.Children.count(s) > 1 ? u.Children.only(null) : null;
|
|
184
184
|
});
|
|
185
185
|
return t.displayName = `${e}.SlotClone`, t;
|
|
186
186
|
}
|
|
187
|
-
var
|
|
188
|
-
function
|
|
189
|
-
return
|
|
187
|
+
var ot = Symbol("radix.slottable");
|
|
188
|
+
function st(e) {
|
|
189
|
+
return u.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === ot;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function it(e, t) {
|
|
192
192
|
const r = { ...t };
|
|
193
193
|
for (const o in t) {
|
|
194
194
|
const s = e[o], n = t[o];
|
|
195
|
-
/^on[A-Z]/.test(o) ? s && n ? r[o] = (...
|
|
196
|
-
const d = n(...
|
|
197
|
-
return s(...
|
|
195
|
+
/^on[A-Z]/.test(o) ? s && n ? r[o] = (...c) => {
|
|
196
|
+
const d = n(...c);
|
|
197
|
+
return s(...c), d;
|
|
198
198
|
} : s && (r[o] = s) : o === "style" ? r[o] = { ...s, ...n } : o === "className" && (r[o] = [s, n].filter(Boolean).join(" "));
|
|
199
199
|
}
|
|
200
200
|
return { ...e, ...r };
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function ct(e) {
|
|
203
203
|
var o, s;
|
|
204
204
|
let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, r = t && "isReactWarning" in t && t.isReactWarning;
|
|
205
205
|
return r ? e.ref : (t = (s = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : s.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
|
|
206
206
|
}
|
|
207
|
-
function
|
|
208
|
-
const t = e + "CollectionProvider", [r, o] =
|
|
207
|
+
function ut(e) {
|
|
208
|
+
const t = e + "CollectionProvider", [r, o] = ie(t), [s, n] = r(
|
|
209
209
|
t,
|
|
210
210
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
211
|
-
),
|
|
212
|
-
const { scope:
|
|
213
|
-
return /* @__PURE__ */ m(s, { scope:
|
|
211
|
+
), i = (h) => {
|
|
212
|
+
const { scope: v, children: C } = h, N = O.useRef(null), w = O.useRef(/* @__PURE__ */ new Map()).current;
|
|
213
|
+
return /* @__PURE__ */ m(s, { scope: v, itemMap: w, collectionRef: N, children: C });
|
|
214
214
|
};
|
|
215
|
-
|
|
216
|
-
const
|
|
217
|
-
(h,
|
|
218
|
-
const { scope: C, children:
|
|
219
|
-
return /* @__PURE__ */ m(d, { ref: b, children:
|
|
215
|
+
i.displayName = t;
|
|
216
|
+
const c = e + "CollectionSlot", d = /* @__PURE__ */ oe(c), a = O.forwardRef(
|
|
217
|
+
(h, v) => {
|
|
218
|
+
const { scope: C, children: N } = h, w = n(c, C), b = X(v, w.collectionRef);
|
|
219
|
+
return /* @__PURE__ */ m(d, { ref: b, children: N });
|
|
220
220
|
}
|
|
221
221
|
);
|
|
222
|
-
|
|
223
|
-
const l = e + "CollectionItemSlot", f = "data-radix-collection-item",
|
|
224
|
-
(h,
|
|
225
|
-
const { scope: C, children:
|
|
226
|
-
return
|
|
222
|
+
a.displayName = c;
|
|
223
|
+
const l = e + "CollectionItemSlot", f = "data-radix-collection-item", _ = /* @__PURE__ */ oe(l), g = O.forwardRef(
|
|
224
|
+
(h, v) => {
|
|
225
|
+
const { scope: C, children: N, ...w } = h, b = O.useRef(null), R = X(v, b), x = n(l, C);
|
|
226
|
+
return O.useEffect(() => (x.itemMap.set(b, { ref: b, ...w }), () => void x.itemMap.delete(b))), /* @__PURE__ */ m(_, { [f]: "", ref: R, children: N });
|
|
227
227
|
}
|
|
228
228
|
);
|
|
229
229
|
g.displayName = l;
|
|
230
|
-
function
|
|
231
|
-
const
|
|
232
|
-
return
|
|
233
|
-
const
|
|
234
|
-
if (!
|
|
235
|
-
const w = Array.from(
|
|
236
|
-
return Array.from(
|
|
237
|
-
(x,
|
|
230
|
+
function I(h) {
|
|
231
|
+
const v = n(e + "CollectionConsumer", h);
|
|
232
|
+
return O.useCallback(() => {
|
|
233
|
+
const N = v.collectionRef.current;
|
|
234
|
+
if (!N) return [];
|
|
235
|
+
const w = Array.from(N.querySelectorAll(`[${f}]`));
|
|
236
|
+
return Array.from(v.itemMap.values()).sort(
|
|
237
|
+
(x, $) => w.indexOf(x.ref.current) - w.indexOf($.ref.current)
|
|
238
238
|
);
|
|
239
|
-
}, [
|
|
239
|
+
}, [v.collectionRef, v.itemMap]);
|
|
240
240
|
}
|
|
241
241
|
return [
|
|
242
|
-
{ Provider:
|
|
243
|
-
|
|
242
|
+
{ Provider: i, Slot: a, ItemSlot: g },
|
|
243
|
+
I,
|
|
244
244
|
o
|
|
245
245
|
];
|
|
246
246
|
}
|
|
247
|
-
var
|
|
248
|
-
},
|
|
249
|
-
}),
|
|
250
|
-
function
|
|
251
|
-
const [t, r] =
|
|
252
|
-
return
|
|
253
|
-
r((o) => o ?? String(
|
|
247
|
+
var H = globalThis != null && globalThis.document ? u.useLayoutEffect : () => {
|
|
248
|
+
}, at = u[" useId ".trim().toString()] || (() => {
|
|
249
|
+
}), lt = 0;
|
|
250
|
+
function we(e) {
|
|
251
|
+
const [t, r] = u.useState(at());
|
|
252
|
+
return H(() => {
|
|
253
|
+
r((o) => o ?? String(lt++));
|
|
254
254
|
}, [e]), t ? `radix-${t}` : "";
|
|
255
255
|
}
|
|
256
|
-
var
|
|
256
|
+
var dt = [
|
|
257
257
|
"a",
|
|
258
258
|
"button",
|
|
259
259
|
"div",
|
|
@@ -271,124 +271,124 @@ var pt = [
|
|
|
271
271
|
"span",
|
|
272
272
|
"svg",
|
|
273
273
|
"ul"
|
|
274
|
-
], L =
|
|
275
|
-
const r = /* @__PURE__ */
|
|
276
|
-
const { asChild:
|
|
277
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ m(d, { ...
|
|
274
|
+
], L = dt.reduce((e, t) => {
|
|
275
|
+
const r = /* @__PURE__ */ oe(`Primitive.${t}`), o = u.forwardRef((s, n) => {
|
|
276
|
+
const { asChild: i, ...c } = s, d = i ? r : t;
|
|
277
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ m(d, { ...c, ref: n });
|
|
278
278
|
});
|
|
279
279
|
return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
|
|
280
280
|
}, {});
|
|
281
|
-
function
|
|
282
|
-
const t =
|
|
283
|
-
return
|
|
281
|
+
function ft(e) {
|
|
282
|
+
const t = u.useRef(e);
|
|
283
|
+
return u.useEffect(() => {
|
|
284
284
|
t.current = e;
|
|
285
|
-
}),
|
|
285
|
+
}), u.useMemo(() => (...r) => {
|
|
286
286
|
var o;
|
|
287
287
|
return (o = t.current) == null ? void 0 : o.call(t, ...r);
|
|
288
288
|
}, []);
|
|
289
289
|
}
|
|
290
|
-
var
|
|
291
|
-
function
|
|
290
|
+
var pt = u[" useInsertionEffect ".trim().toString()] || H;
|
|
291
|
+
function Ce({
|
|
292
292
|
prop: e,
|
|
293
293
|
defaultProp: t,
|
|
294
294
|
onChange: r = () => {
|
|
295
295
|
},
|
|
296
296
|
caller: o
|
|
297
297
|
}) {
|
|
298
|
-
const [s, n,
|
|
298
|
+
const [s, n, i] = mt({
|
|
299
299
|
defaultProp: t,
|
|
300
300
|
onChange: r
|
|
301
|
-
}),
|
|
301
|
+
}), c = e !== void 0, d = c ? e : s;
|
|
302
302
|
{
|
|
303
|
-
const l =
|
|
304
|
-
|
|
303
|
+
const l = u.useRef(e !== void 0);
|
|
304
|
+
u.useEffect(() => {
|
|
305
305
|
const f = l.current;
|
|
306
|
-
f !==
|
|
307
|
-
`${o} is changing from ${f ? "controlled" : "uncontrolled"} to ${
|
|
308
|
-
), l.current =
|
|
309
|
-
}, [
|
|
306
|
+
f !== c && console.warn(
|
|
307
|
+
`${o} is changing from ${f ? "controlled" : "uncontrolled"} to ${c ? "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.`
|
|
308
|
+
), l.current = c;
|
|
309
|
+
}, [c, o]);
|
|
310
310
|
}
|
|
311
|
-
const
|
|
311
|
+
const a = u.useCallback(
|
|
312
312
|
(l) => {
|
|
313
313
|
var f;
|
|
314
|
-
if (
|
|
315
|
-
const
|
|
316
|
-
|
|
314
|
+
if (c) {
|
|
315
|
+
const _ = _t(l) ? l(e) : l;
|
|
316
|
+
_ !== e && ((f = i.current) == null || f.call(i, _));
|
|
317
317
|
} else
|
|
318
318
|
n(l);
|
|
319
319
|
},
|
|
320
|
-
[
|
|
320
|
+
[c, e, n, i]
|
|
321
321
|
);
|
|
322
|
-
return [d,
|
|
322
|
+
return [d, a];
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function mt({
|
|
325
325
|
defaultProp: e,
|
|
326
326
|
onChange: t
|
|
327
327
|
}) {
|
|
328
|
-
const [r, o] =
|
|
329
|
-
return
|
|
328
|
+
const [r, o] = u.useState(e), s = u.useRef(r), n = u.useRef(t);
|
|
329
|
+
return pt(() => {
|
|
330
330
|
n.current = t;
|
|
331
|
-
}, [t]),
|
|
332
|
-
var
|
|
333
|
-
s.current !== r && ((
|
|
331
|
+
}, [t]), u.useEffect(() => {
|
|
332
|
+
var i;
|
|
333
|
+
s.current !== r && ((i = n.current) == null || i.call(n, r), s.current = r);
|
|
334
334
|
}, [r, s]), [r, o, n];
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function _t(e) {
|
|
337
337
|
return typeof e == "function";
|
|
338
338
|
}
|
|
339
|
-
var
|
|
340
|
-
function
|
|
341
|
-
const t =
|
|
339
|
+
var vt = u.createContext(void 0);
|
|
340
|
+
function Se(e) {
|
|
341
|
+
const t = u.useContext(vt);
|
|
342
342
|
return e || t || "ltr";
|
|
343
343
|
}
|
|
344
|
-
var
|
|
345
|
-
|
|
346
|
-
[
|
|
347
|
-
), [
|
|
348
|
-
(e, t) => /* @__PURE__ */ m(
|
|
344
|
+
var ne = "rovingFocusGroup.onEntryFocus", bt = { bubbles: !1, cancelable: !0 }, W = "RovingFocusGroup", [se, ye, gt] = ut(W), [ht, Ie] = ie(
|
|
345
|
+
W,
|
|
346
|
+
[gt]
|
|
347
|
+
), [wt, Ct] = ht(W), Re = u.forwardRef(
|
|
348
|
+
(e, t) => /* @__PURE__ */ m(se.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ m(se.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ m(St, { ...e, ref: t }) }) })
|
|
349
349
|
);
|
|
350
|
-
Re.displayName =
|
|
351
|
-
var St =
|
|
350
|
+
Re.displayName = W;
|
|
351
|
+
var St = u.forwardRef((e, t) => {
|
|
352
352
|
const {
|
|
353
353
|
__scopeRovingFocusGroup: r,
|
|
354
354
|
orientation: o,
|
|
355
355
|
loop: s = !1,
|
|
356
356
|
dir: n,
|
|
357
|
-
currentTabStopId:
|
|
358
|
-
defaultCurrentTabStopId:
|
|
357
|
+
currentTabStopId: i,
|
|
358
|
+
defaultCurrentTabStopId: c,
|
|
359
359
|
onCurrentTabStopIdChange: d,
|
|
360
|
-
onEntryFocus:
|
|
360
|
+
onEntryFocus: a,
|
|
361
361
|
preventScrollOnEntryFocus: l = !1,
|
|
362
362
|
...f
|
|
363
|
-
} = e,
|
|
364
|
-
prop:
|
|
365
|
-
defaultProp:
|
|
363
|
+
} = e, _ = u.useRef(null), g = X(t, _), I = Se(n), [h, v] = Ce({
|
|
364
|
+
prop: i,
|
|
365
|
+
defaultProp: c ?? null,
|
|
366
366
|
onChange: d,
|
|
367
|
-
caller:
|
|
368
|
-
}), [C,
|
|
369
|
-
return
|
|
370
|
-
const
|
|
371
|
-
if (
|
|
372
|
-
return
|
|
367
|
+
caller: W
|
|
368
|
+
}), [C, N] = u.useState(!1), w = ft(a), b = ye(r), R = u.useRef(!1), [x, $] = u.useState(0);
|
|
369
|
+
return u.useEffect(() => {
|
|
370
|
+
const y = _.current;
|
|
371
|
+
if (y)
|
|
372
|
+
return y.addEventListener(ne, w), () => y.removeEventListener(ne, w);
|
|
373
373
|
}, [w]), /* @__PURE__ */ m(
|
|
374
|
-
|
|
374
|
+
wt,
|
|
375
375
|
{
|
|
376
376
|
scope: r,
|
|
377
377
|
orientation: o,
|
|
378
|
-
dir:
|
|
378
|
+
dir: I,
|
|
379
379
|
loop: s,
|
|
380
380
|
currentTabStopId: h,
|
|
381
|
-
onItemFocus:
|
|
382
|
-
(
|
|
383
|
-
[
|
|
381
|
+
onItemFocus: u.useCallback(
|
|
382
|
+
(y) => v(y),
|
|
383
|
+
[v]
|
|
384
384
|
),
|
|
385
|
-
onItemShiftTab:
|
|
386
|
-
onFocusableItemAdd:
|
|
387
|
-
() =>
|
|
385
|
+
onItemShiftTab: u.useCallback(() => N(!0), []),
|
|
386
|
+
onFocusableItemAdd: u.useCallback(
|
|
387
|
+
() => $((y) => y + 1),
|
|
388
388
|
[]
|
|
389
389
|
),
|
|
390
|
-
onFocusableItemRemove:
|
|
391
|
-
() =>
|
|
390
|
+
onFocusableItemRemove: u.useCallback(
|
|
391
|
+
() => $((y) => y - 1),
|
|
392
392
|
[]
|
|
393
393
|
),
|
|
394
394
|
children: /* @__PURE__ */ m(
|
|
@@ -399,45 +399,45 @@ var St = a.forwardRef((e, t) => {
|
|
|
399
399
|
...f,
|
|
400
400
|
ref: g,
|
|
401
401
|
style: { outline: "none", ...e.style },
|
|
402
|
-
onMouseDown:
|
|
403
|
-
|
|
402
|
+
onMouseDown: A(e.onMouseDown, () => {
|
|
403
|
+
R.current = !0;
|
|
404
404
|
}),
|
|
405
|
-
onFocus:
|
|
406
|
-
const
|
|
407
|
-
if (
|
|
408
|
-
const
|
|
409
|
-
if (
|
|
410
|
-
const V = b().filter((
|
|
405
|
+
onFocus: A(e.onFocus, (y) => {
|
|
406
|
+
const Q = !R.current;
|
|
407
|
+
if (y.target === y.currentTarget && Q && !C) {
|
|
408
|
+
const F = new CustomEvent(ne, bt);
|
|
409
|
+
if (y.currentTarget.dispatchEvent(F), !F.defaultPrevented) {
|
|
410
|
+
const V = b().filter((E) => E.focusable), B = V.find((E) => E.active), j = V.find((E) => E.id === h), k = [B, j, ...V].filter(
|
|
411
411
|
Boolean
|
|
412
|
-
).map((
|
|
413
|
-
|
|
412
|
+
).map((E) => E.ref.current);
|
|
413
|
+
xe(k, l);
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
|
-
|
|
416
|
+
R.current = !1;
|
|
417
417
|
}),
|
|
418
|
-
onBlur:
|
|
418
|
+
onBlur: A(e.onBlur, () => N(!1))
|
|
419
419
|
}
|
|
420
420
|
)
|
|
421
421
|
}
|
|
422
422
|
);
|
|
423
|
-
}),
|
|
423
|
+
}), Ne = "RovingFocusGroupItem", Te = u.forwardRef(
|
|
424
424
|
(e, t) => {
|
|
425
425
|
const {
|
|
426
426
|
__scopeRovingFocusGroup: r,
|
|
427
427
|
focusable: o = !0,
|
|
428
428
|
active: s = !1,
|
|
429
429
|
tabStopId: n,
|
|
430
|
-
children:
|
|
431
|
-
...
|
|
432
|
-
} = e, d =
|
|
433
|
-
return
|
|
430
|
+
children: i,
|
|
431
|
+
...c
|
|
432
|
+
} = e, d = we(), a = n || d, l = Ct(Ne, r), f = l.currentTabStopId === a, _ = ye(r), { onFocusableItemAdd: g, onFocusableItemRemove: I, currentTabStopId: h } = l;
|
|
433
|
+
return u.useEffect(() => {
|
|
434
434
|
if (o)
|
|
435
|
-
return g(), () =>
|
|
436
|
-
}, [o, g,
|
|
437
|
-
|
|
435
|
+
return g(), () => I();
|
|
436
|
+
}, [o, g, I]), /* @__PURE__ */ m(
|
|
437
|
+
se.ItemSlot,
|
|
438
438
|
{
|
|
439
439
|
scope: r,
|
|
440
|
-
id:
|
|
440
|
+
id: a,
|
|
441
441
|
focusable: o,
|
|
442
442
|
active: s,
|
|
443
443
|
children: /* @__PURE__ */ m(
|
|
@@ -445,41 +445,41 @@ var St = a.forwardRef((e, t) => {
|
|
|
445
445
|
{
|
|
446
446
|
tabIndex: f ? 0 : -1,
|
|
447
447
|
"data-orientation": l.orientation,
|
|
448
|
-
...
|
|
448
|
+
...c,
|
|
449
449
|
ref: t,
|
|
450
|
-
onMouseDown:
|
|
451
|
-
o ? l.onItemFocus(
|
|
450
|
+
onMouseDown: A(e.onMouseDown, (v) => {
|
|
451
|
+
o ? l.onItemFocus(a) : v.preventDefault();
|
|
452
452
|
}),
|
|
453
|
-
onFocus:
|
|
454
|
-
onKeyDown:
|
|
455
|
-
if (
|
|
453
|
+
onFocus: A(e.onFocus, () => l.onItemFocus(a)),
|
|
454
|
+
onKeyDown: A(e.onKeyDown, (v) => {
|
|
455
|
+
if (v.key === "Tab" && v.shiftKey) {
|
|
456
456
|
l.onItemShiftTab();
|
|
457
457
|
return;
|
|
458
458
|
}
|
|
459
|
-
if (
|
|
460
|
-
const C =
|
|
459
|
+
if (v.target !== v.currentTarget) return;
|
|
460
|
+
const C = Rt(v, l.orientation, l.dir);
|
|
461
461
|
if (C !== void 0) {
|
|
462
|
-
if (
|
|
463
|
-
|
|
464
|
-
let w =
|
|
462
|
+
if (v.metaKey || v.ctrlKey || v.altKey || v.shiftKey) return;
|
|
463
|
+
v.preventDefault();
|
|
464
|
+
let w = _().filter((b) => b.focusable).map((b) => b.ref.current);
|
|
465
465
|
if (C === "last") w.reverse();
|
|
466
466
|
else if (C === "prev" || C === "next") {
|
|
467
467
|
C === "prev" && w.reverse();
|
|
468
|
-
const b = w.indexOf(
|
|
469
|
-
w = l.loop ?
|
|
468
|
+
const b = w.indexOf(v.currentTarget);
|
|
469
|
+
w = l.loop ? Nt(w, b + 1) : w.slice(b + 1);
|
|
470
470
|
}
|
|
471
|
-
setTimeout(() =>
|
|
471
|
+
setTimeout(() => xe(w));
|
|
472
472
|
}
|
|
473
473
|
}),
|
|
474
|
-
children: typeof
|
|
474
|
+
children: typeof i == "function" ? i({ isCurrentTabStop: f, hasTabStop: h != null }) : i
|
|
475
475
|
}
|
|
476
476
|
)
|
|
477
477
|
}
|
|
478
478
|
);
|
|
479
479
|
}
|
|
480
480
|
);
|
|
481
|
-
|
|
482
|
-
var
|
|
481
|
+
Te.displayName = Ne;
|
|
482
|
+
var yt = {
|
|
483
483
|
ArrowLeft: "prev",
|
|
484
484
|
ArrowUp: "prev",
|
|
485
485
|
ArrowRight: "next",
|
|
@@ -489,33 +489,33 @@ var Nt = {
|
|
|
489
489
|
PageDown: "last",
|
|
490
490
|
End: "last"
|
|
491
491
|
};
|
|
492
|
-
function
|
|
492
|
+
function It(e, t) {
|
|
493
493
|
return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
|
|
494
494
|
}
|
|
495
|
-
function
|
|
496
|
-
const o =
|
|
495
|
+
function Rt(e, t, r) {
|
|
496
|
+
const o = It(e.key, r);
|
|
497
497
|
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(o)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(o)))
|
|
498
|
-
return
|
|
498
|
+
return yt[o];
|
|
499
499
|
}
|
|
500
|
-
function
|
|
500
|
+
function xe(e, t = !1) {
|
|
501
501
|
const r = document.activeElement;
|
|
502
502
|
for (const o of e)
|
|
503
503
|
if (o === r || (o.focus({ preventScroll: t }), document.activeElement !== r)) return;
|
|
504
504
|
}
|
|
505
|
-
function
|
|
505
|
+
function Nt(e, t) {
|
|
506
506
|
return e.map((r, o) => e[(t + o) % e.length]);
|
|
507
507
|
}
|
|
508
|
-
var
|
|
509
|
-
function
|
|
510
|
-
return
|
|
508
|
+
var Tt = Re, xt = Te;
|
|
509
|
+
function Et(e, t) {
|
|
510
|
+
return u.useReducer((r, o) => t[r][o] ?? r, e);
|
|
511
511
|
}
|
|
512
|
-
var
|
|
513
|
-
const { present: t, children: r } = e, o =
|
|
514
|
-
return typeof r == "function" || o.isPresent ?
|
|
512
|
+
var Ee = (e) => {
|
|
513
|
+
const { present: t, children: r } = e, o = At(t), s = typeof r == "function" ? r({ present: o.isPresent }) : u.Children.only(r), n = X(o.ref, Mt(s));
|
|
514
|
+
return typeof r == "function" || o.isPresent ? u.cloneElement(s, { ref: n }) : null;
|
|
515
515
|
};
|
|
516
|
-
|
|
517
|
-
function
|
|
518
|
-
const [t, r] =
|
|
516
|
+
Ee.displayName = "Presence";
|
|
517
|
+
function At(e) {
|
|
518
|
+
const [t, r] = u.useState(), o = u.useRef(null), s = u.useRef(e), n = u.useRef("none"), i = e ? "mounted" : "unmounted", [c, d] = Et(i, {
|
|
519
519
|
mounted: {
|
|
520
520
|
UNMOUNT: "unmounted",
|
|
521
521
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -528,84 +528,84 @@ function Mt(e) {
|
|
|
528
528
|
MOUNT: "mounted"
|
|
529
529
|
}
|
|
530
530
|
});
|
|
531
|
-
return
|
|
532
|
-
const
|
|
533
|
-
n.current =
|
|
534
|
-
}, [
|
|
535
|
-
const
|
|
531
|
+
return u.useEffect(() => {
|
|
532
|
+
const a = Z(o.current);
|
|
533
|
+
n.current = c === "mounted" ? a : "none";
|
|
534
|
+
}, [c]), H(() => {
|
|
535
|
+
const a = o.current, l = s.current;
|
|
536
536
|
if (l !== e) {
|
|
537
|
-
const
|
|
538
|
-
e ? d("MOUNT") : g === "none" || (
|
|
537
|
+
const _ = n.current, g = Z(a);
|
|
538
|
+
e ? d("MOUNT") : g === "none" || (a == null ? void 0 : a.display) === "none" ? d("UNMOUNT") : d(l && _ !== g ? "ANIMATION_OUT" : "UNMOUNT"), s.current = e;
|
|
539
539
|
}
|
|
540
|
-
}, [e, d]),
|
|
540
|
+
}, [e, d]), H(() => {
|
|
541
541
|
if (t) {
|
|
542
|
-
let
|
|
542
|
+
let a;
|
|
543
543
|
const l = t.ownerDocument.defaultView ?? window, f = (g) => {
|
|
544
|
-
const h =
|
|
544
|
+
const h = Z(o.current).includes(CSS.escape(g.animationName));
|
|
545
545
|
if (g.target === t && h && (d("ANIMATION_END"), !s.current)) {
|
|
546
|
-
const
|
|
547
|
-
t.style.animationFillMode = "forwards",
|
|
548
|
-
t.style.animationFillMode === "forwards" && (t.style.animationFillMode =
|
|
546
|
+
const v = t.style.animationFillMode;
|
|
547
|
+
t.style.animationFillMode = "forwards", a = l.setTimeout(() => {
|
|
548
|
+
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = v);
|
|
549
549
|
});
|
|
550
550
|
}
|
|
551
|
-
},
|
|
552
|
-
g.target === t && (n.current =
|
|
551
|
+
}, _ = (g) => {
|
|
552
|
+
g.target === t && (n.current = Z(o.current));
|
|
553
553
|
};
|
|
554
|
-
return t.addEventListener("animationstart",
|
|
555
|
-
l.clearTimeout(
|
|
554
|
+
return t.addEventListener("animationstart", _), t.addEventListener("animationcancel", f), t.addEventListener("animationend", f), () => {
|
|
555
|
+
l.clearTimeout(a), t.removeEventListener("animationstart", _), t.removeEventListener("animationcancel", f), t.removeEventListener("animationend", f);
|
|
556
556
|
};
|
|
557
557
|
} else
|
|
558
558
|
d("ANIMATION_END");
|
|
559
559
|
}, [t, d]), {
|
|
560
|
-
isPresent: ["mounted", "unmountSuspended"].includes(
|
|
561
|
-
ref:
|
|
562
|
-
o.current =
|
|
560
|
+
isPresent: ["mounted", "unmountSuspended"].includes(c),
|
|
561
|
+
ref: u.useCallback((a) => {
|
|
562
|
+
o.current = a ? getComputedStyle(a) : null, r(a);
|
|
563
563
|
}, [])
|
|
564
564
|
};
|
|
565
565
|
}
|
|
566
|
-
function
|
|
566
|
+
function Z(e) {
|
|
567
567
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
568
568
|
}
|
|
569
|
-
function
|
|
569
|
+
function Mt(e) {
|
|
570
570
|
var o, s;
|
|
571
571
|
let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, r = t && "isReactWarning" in t && t.isReactWarning;
|
|
572
572
|
return r ? e.ref : (t = (s = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : s.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
|
|
573
573
|
}
|
|
574
|
-
var
|
|
575
|
-
|
|
576
|
-
]),
|
|
574
|
+
var J = "Tabs", [Pt] = ie(J, [
|
|
575
|
+
Ie
|
|
576
|
+
]), Ae = Ie(), [$t, ce] = Pt(J), Me = u.forwardRef(
|
|
577
577
|
(e, t) => {
|
|
578
578
|
const {
|
|
579
579
|
__scopeTabs: r,
|
|
580
580
|
value: o,
|
|
581
581
|
onValueChange: s,
|
|
582
582
|
defaultValue: n,
|
|
583
|
-
orientation:
|
|
584
|
-
dir:
|
|
583
|
+
orientation: i = "horizontal",
|
|
584
|
+
dir: c,
|
|
585
585
|
activationMode: d = "automatic",
|
|
586
|
-
...
|
|
587
|
-
} = e, l =
|
|
586
|
+
...a
|
|
587
|
+
} = e, l = Se(c), [f, _] = Ce({
|
|
588
588
|
prop: o,
|
|
589
589
|
onChange: s,
|
|
590
590
|
defaultProp: n ?? "",
|
|
591
|
-
caller:
|
|
591
|
+
caller: J
|
|
592
592
|
});
|
|
593
593
|
return /* @__PURE__ */ m(
|
|
594
|
-
|
|
594
|
+
$t,
|
|
595
595
|
{
|
|
596
596
|
scope: r,
|
|
597
|
-
baseId:
|
|
597
|
+
baseId: we(),
|
|
598
598
|
value: f,
|
|
599
|
-
onValueChange:
|
|
600
|
-
orientation:
|
|
599
|
+
onValueChange: _,
|
|
600
|
+
orientation: i,
|
|
601
601
|
dir: l,
|
|
602
602
|
activationMode: d,
|
|
603
603
|
children: /* @__PURE__ */ m(
|
|
604
604
|
L.div,
|
|
605
605
|
{
|
|
606
606
|
dir: l,
|
|
607
|
-
"data-orientation":
|
|
608
|
-
...
|
|
607
|
+
"data-orientation": i,
|
|
608
|
+
...a,
|
|
609
609
|
ref: t
|
|
610
610
|
}
|
|
611
611
|
)
|
|
@@ -613,15 +613,15 @@ var H = "Tabs", [$t] = se(H, [
|
|
|
613
613
|
);
|
|
614
614
|
}
|
|
615
615
|
);
|
|
616
|
-
Me.displayName =
|
|
617
|
-
var Pe = "TabsList", $e =
|
|
616
|
+
Me.displayName = J;
|
|
617
|
+
var Pe = "TabsList", $e = u.forwardRef(
|
|
618
618
|
(e, t) => {
|
|
619
|
-
const { __scopeTabs: r, loop: o = !0, ...s } = e, n = ce(Pe, r),
|
|
619
|
+
const { __scopeTabs: r, loop: o = !0, ...s } = e, n = ce(Pe, r), i = Ae(r);
|
|
620
620
|
return /* @__PURE__ */ m(
|
|
621
|
-
|
|
621
|
+
Tt,
|
|
622
622
|
{
|
|
623
623
|
asChild: !0,
|
|
624
|
-
...
|
|
624
|
+
...i,
|
|
625
625
|
orientation: n.orientation,
|
|
626
626
|
dir: n.dir,
|
|
627
627
|
loop: o,
|
|
@@ -639,14 +639,14 @@ var Pe = "TabsList", $e = a.forwardRef(
|
|
|
639
639
|
}
|
|
640
640
|
);
|
|
641
641
|
$e.displayName = Pe;
|
|
642
|
-
var Oe = "TabsTrigger", Fe =
|
|
642
|
+
var Oe = "TabsTrigger", Fe = u.forwardRef(
|
|
643
643
|
(e, t) => {
|
|
644
|
-
const { __scopeTabs: r, value: o, disabled: s = !1, ...n } = e,
|
|
644
|
+
const { __scopeTabs: r, value: o, disabled: s = !1, ...n } = e, i = ce(Oe, r), c = Ae(r), d = Ve(i.baseId, o), a = Be(i.baseId, o), l = o === i.value;
|
|
645
645
|
return /* @__PURE__ */ m(
|
|
646
|
-
|
|
646
|
+
xt,
|
|
647
647
|
{
|
|
648
648
|
asChild: !0,
|
|
649
|
-
...
|
|
649
|
+
...c,
|
|
650
650
|
focusable: !s,
|
|
651
651
|
active: l,
|
|
652
652
|
children: /* @__PURE__ */ m(
|
|
@@ -655,22 +655,22 @@ var Oe = "TabsTrigger", Fe = a.forwardRef(
|
|
|
655
655
|
type: "button",
|
|
656
656
|
role: "tab",
|
|
657
657
|
"aria-selected": l,
|
|
658
|
-
"aria-controls":
|
|
658
|
+
"aria-controls": a,
|
|
659
659
|
"data-state": l ? "active" : "inactive",
|
|
660
660
|
"data-disabled": s ? "" : void 0,
|
|
661
661
|
disabled: s,
|
|
662
662
|
id: d,
|
|
663
663
|
...n,
|
|
664
664
|
ref: t,
|
|
665
|
-
onMouseDown:
|
|
666
|
-
!s && f.button === 0 && f.ctrlKey === !1 ?
|
|
665
|
+
onMouseDown: A(e.onMouseDown, (f) => {
|
|
666
|
+
!s && f.button === 0 && f.ctrlKey === !1 ? i.onValueChange(o) : f.preventDefault();
|
|
667
667
|
}),
|
|
668
|
-
onKeyDown:
|
|
669
|
-
[" ", "Enter"].includes(f.key) &&
|
|
668
|
+
onKeyDown: A(e.onKeyDown, (f) => {
|
|
669
|
+
[" ", "Enter"].includes(f.key) && i.onValueChange(o);
|
|
670
670
|
}),
|
|
671
|
-
onFocus:
|
|
672
|
-
const f =
|
|
673
|
-
!l && !s && f &&
|
|
671
|
+
onFocus: A(e.onFocus, () => {
|
|
672
|
+
const f = i.activationMode !== "manual";
|
|
673
|
+
!l && !s && f && i.onValueChange(o);
|
|
674
674
|
})
|
|
675
675
|
}
|
|
676
676
|
)
|
|
@@ -679,29 +679,29 @@ var Oe = "TabsTrigger", Fe = a.forwardRef(
|
|
|
679
679
|
}
|
|
680
680
|
);
|
|
681
681
|
Fe.displayName = Oe;
|
|
682
|
-
var De = "TabsContent", Le =
|
|
682
|
+
var De = "TabsContent", Le = u.forwardRef(
|
|
683
683
|
(e, t) => {
|
|
684
|
-
const { __scopeTabs: r, value: o, forceMount: s, children: n, ...
|
|
685
|
-
return
|
|
686
|
-
const
|
|
687
|
-
return () => cancelAnimationFrame(
|
|
688
|
-
}, []), /* @__PURE__ */ m(
|
|
684
|
+
const { __scopeTabs: r, value: o, forceMount: s, children: n, ...i } = e, c = ce(De, r), d = Ve(c.baseId, o), a = Be(c.baseId, o), l = o === c.value, f = u.useRef(l);
|
|
685
|
+
return u.useEffect(() => {
|
|
686
|
+
const _ = requestAnimationFrame(() => f.current = !1);
|
|
687
|
+
return () => cancelAnimationFrame(_);
|
|
688
|
+
}, []), /* @__PURE__ */ m(Ee, { present: s || l, children: ({ present: _ }) => /* @__PURE__ */ m(
|
|
689
689
|
L.div,
|
|
690
690
|
{
|
|
691
691
|
"data-state": l ? "active" : "inactive",
|
|
692
|
-
"data-orientation":
|
|
692
|
+
"data-orientation": c.orientation,
|
|
693
693
|
role: "tabpanel",
|
|
694
694
|
"aria-labelledby": d,
|
|
695
|
-
hidden: !
|
|
696
|
-
id:
|
|
695
|
+
hidden: !_,
|
|
696
|
+
id: a,
|
|
697
697
|
tabIndex: 0,
|
|
698
|
-
...
|
|
698
|
+
...i,
|
|
699
699
|
ref: t,
|
|
700
700
|
style: {
|
|
701
701
|
...e.style,
|
|
702
702
|
animationDuration: f.current ? "0s" : void 0
|
|
703
703
|
},
|
|
704
|
-
children:
|
|
704
|
+
children: _ && n
|
|
705
705
|
}
|
|
706
706
|
) });
|
|
707
707
|
}
|
|
@@ -713,25 +713,25 @@ function Ve(e, t) {
|
|
|
713
713
|
function Be(e, t) {
|
|
714
714
|
return `${e}-content-${t}`;
|
|
715
715
|
}
|
|
716
|
-
var
|
|
717
|
-
function
|
|
716
|
+
var Ot = Me, Ft = $e, Dt = Fe, Lt = Le;
|
|
717
|
+
function Vt(e) {
|
|
718
718
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
719
719
|
}
|
|
720
|
-
var
|
|
720
|
+
var re = { exports: {} };
|
|
721
721
|
/*!
|
|
722
722
|
Copyright (c) 2018 Jed Watson.
|
|
723
723
|
Licensed under the MIT License (MIT), see
|
|
724
724
|
http://jedwatson.github.io/classnames
|
|
725
725
|
*/
|
|
726
|
-
var
|
|
727
|
-
function
|
|
728
|
-
return
|
|
726
|
+
var me;
|
|
727
|
+
function Bt() {
|
|
728
|
+
return me || (me = 1, (function(e) {
|
|
729
729
|
(function() {
|
|
730
730
|
var t = {}.hasOwnProperty;
|
|
731
731
|
function r() {
|
|
732
|
-
for (var n = "",
|
|
733
|
-
var
|
|
734
|
-
|
|
732
|
+
for (var n = "", i = 0; i < arguments.length; i++) {
|
|
733
|
+
var c = arguments[i];
|
|
734
|
+
c && (n = s(n, o.call(this, c)));
|
|
735
735
|
}
|
|
736
736
|
return n;
|
|
737
737
|
}
|
|
@@ -744,28 +744,28 @@ function Ut() {
|
|
|
744
744
|
return r.apply(this, n);
|
|
745
745
|
if (n.toString !== Object.prototype.toString && !n.toString.toString().includes("[native code]"))
|
|
746
746
|
return n.toString();
|
|
747
|
-
var
|
|
748
|
-
for (var
|
|
749
|
-
t.call(n,
|
|
750
|
-
return
|
|
747
|
+
var i = "";
|
|
748
|
+
for (var c in n)
|
|
749
|
+
t.call(n, c) && n[c] && (i = s(i, this && this[c] || c));
|
|
750
|
+
return i;
|
|
751
751
|
}
|
|
752
|
-
function s(n,
|
|
753
|
-
return
|
|
752
|
+
function s(n, i) {
|
|
753
|
+
return i ? n ? n + " " + i : n + i : n;
|
|
754
754
|
}
|
|
755
755
|
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
756
756
|
})();
|
|
757
|
-
})(
|
|
757
|
+
})(re)), re.exports;
|
|
758
758
|
}
|
|
759
|
-
var
|
|
760
|
-
const
|
|
759
|
+
var Ut = Bt();
|
|
760
|
+
const ue = /* @__PURE__ */ Vt(Ut), Wt = {
|
|
761
761
|
"purpur-tab-content": "_purpur-tab-content_1ugbi_1",
|
|
762
762
|
"purpur-tab-content--force-mount": "_purpur-tab-content--force-mount_1ugbi_15"
|
|
763
|
-
},
|
|
764
|
-
({ children: e, tabId: t, "data-testid": r, className: o, disableForceMount: s, ...n },
|
|
765
|
-
|
|
763
|
+
}, jt = ue.bind(Wt), _e = "purpur-tab-content", Gt = be(
|
|
764
|
+
({ children: e, tabId: t, "data-testid": r, className: o, disableForceMount: s, ...n }, i) => /* @__PURE__ */ m(
|
|
765
|
+
Lt,
|
|
766
766
|
{
|
|
767
|
-
ref:
|
|
768
|
-
className:
|
|
767
|
+
ref: i,
|
|
768
|
+
className: jt(_e, o, {
|
|
769
769
|
[`${_e}--force-mount`]: !s
|
|
770
770
|
}),
|
|
771
771
|
"data-testid": r,
|
|
@@ -775,13 +775,13 @@ const ie = /* @__PURE__ */ Bt(Gt), Wt = {
|
|
|
775
775
|
children: e
|
|
776
776
|
}
|
|
777
777
|
)
|
|
778
|
-
),
|
|
779
|
-
"purpur-tab-header": "_purpur-tab-
|
|
780
|
-
"purpur-tab-header--contained": "_purpur-tab-header--
|
|
781
|
-
"purpur-tab-header--contained-negative": "_purpur-tab-header--contained-
|
|
782
|
-
"purpur-tab-header--line": "_purpur-tab-header--
|
|
783
|
-
"purpur-tab-header--line-negative": "_purpur-tab-header--line-
|
|
784
|
-
},
|
|
778
|
+
), kt = (e) => !!e && Ge(e) && !!e.props.name && !!e.props.tabId, zt = {
|
|
779
|
+
"purpur-tab-header": "_purpur-tab-header_znb0i_1",
|
|
780
|
+
"purpur-tab-header--contained": "_purpur-tab-header--contained_znb0i_36",
|
|
781
|
+
"purpur-tab-header--contained-negative": "_purpur-tab-header--contained-negative_znb0i_36",
|
|
782
|
+
"purpur-tab-header--line": "_purpur-tab-header--line_znb0i_39",
|
|
783
|
+
"purpur-tab-header--line-negative": "_purpur-tab-header--line-negative_znb0i_51"
|
|
784
|
+
}, Kt = ue.bind(zt), ve = "purpur-tab-header", qt = be(
|
|
785
785
|
({
|
|
786
786
|
index: e,
|
|
787
787
|
tabId: t,
|
|
@@ -789,182 +789,174 @@ const ie = /* @__PURE__ */ Bt(Gt), Wt = {
|
|
|
789
789
|
negative: o,
|
|
790
790
|
onFocus: s,
|
|
791
791
|
"data-testid": n,
|
|
792
|
-
children:
|
|
793
|
-
},
|
|
794
|
-
|
|
792
|
+
children: i
|
|
793
|
+
}, c) => /* @__PURE__ */ m(
|
|
794
|
+
Dt,
|
|
795
795
|
{
|
|
796
796
|
id: `${t}-trigger`,
|
|
797
|
-
className:
|
|
797
|
+
className: Kt(ve, `${ve}--${r}${o ? "-negative" : ""}`),
|
|
798
798
|
value: t,
|
|
799
799
|
"data-testid": n,
|
|
800
800
|
"data-index": e,
|
|
801
|
-
ref:
|
|
801
|
+
ref: c,
|
|
802
802
|
onFocus: s,
|
|
803
|
-
children:
|
|
803
|
+
children: i
|
|
804
804
|
}
|
|
805
805
|
)
|
|
806
|
-
),
|
|
807
|
-
"purpur-tabs__wrapper": "_purpur-
|
|
808
|
-
"purpur-tabs__scroll-button": "_purpur-tabs__scroll-
|
|
809
|
-
"purpur-tabs__scroll-button--left": "_purpur-tabs__scroll-button--
|
|
810
|
-
"purpur-tabs__scroll-button--right": "_purpur-tabs__scroll-button--
|
|
811
|
-
"purpur-tabs__wrapper--scroll-
|
|
812
|
-
"purpur-tabs__wrapper--scroll-
|
|
813
|
-
"purpur-tabs--line": "_purpur-tabs--
|
|
814
|
-
"purpur-tabs--line-negative": "_purpur-tabs--line-
|
|
815
|
-
"purpur-tabs__selected-border": "_purpur-tabs__selected-
|
|
816
|
-
"purpur-tabs__content-wrapper": "_purpur-tabs__content-
|
|
817
|
-
"purpur-tabs--contained": "_purpur-tabs--
|
|
818
|
-
"purpur-tabs__list": "_purpur-
|
|
819
|
-
"purpur-tabs--contained-negative": "_purpur-tabs--contained-
|
|
820
|
-
"purpur-tabs__content-container": "_purpur-tabs__content-
|
|
821
|
-
"purpur-tabs--fullWidth": "_purpur-tabs--
|
|
822
|
-
},
|
|
806
|
+
), Yt = {
|
|
807
|
+
"purpur-tabs__wrapper": "_purpur-tabs__wrapper_1u905_1",
|
|
808
|
+
"purpur-tabs__scroll-button": "_purpur-tabs__scroll-button_1u905_9",
|
|
809
|
+
"purpur-tabs__scroll-button--left": "_purpur-tabs__scroll-button--left_1u905_71",
|
|
810
|
+
"purpur-tabs__scroll-button--right": "_purpur-tabs__scroll-button--right_1u905_74",
|
|
811
|
+
"purpur-tabs__wrapper--scroll-start": "_purpur-tabs__wrapper--scroll-start_1u905_77",
|
|
812
|
+
"purpur-tabs__wrapper--scroll-end": "_purpur-tabs__wrapper--scroll-end_1u905_80",
|
|
813
|
+
"purpur-tabs--line": "_purpur-tabs--line_1u905_83",
|
|
814
|
+
"purpur-tabs--line-negative": "_purpur-tabs--line-negative_1u905_83",
|
|
815
|
+
"purpur-tabs__selected-border": "_purpur-tabs__selected-border_1u905_91",
|
|
816
|
+
"purpur-tabs__content-wrapper": "_purpur-tabs__content-wrapper_1u905_115",
|
|
817
|
+
"purpur-tabs--contained": "_purpur-tabs--contained_1u905_123",
|
|
818
|
+
"purpur-tabs__list": "_purpur-tabs__list_1u905_123",
|
|
819
|
+
"purpur-tabs--contained-negative": "_purpur-tabs--contained-negative_1u905_123",
|
|
820
|
+
"purpur-tabs__content-container": "_purpur-tabs__content-container_1u905_126",
|
|
821
|
+
"purpur-tabs--fullWidth": "_purpur-tabs--fullWidth_1u905_136"
|
|
822
|
+
}, tn = ["line", "contained"], Zt = (e) => new CustomEvent("tabChangeDetail", { detail: { value: e } }), P = ue.bind(Yt), T = "purpur-tabs", Xt = (e, t) => {
|
|
823
823
|
var d;
|
|
824
824
|
if (typeof (e == null ? void 0 : e.getBoundingClientRect) != "function" || typeof (t == null ? void 0 : t.scroll) != "function")
|
|
825
825
|
return;
|
|
826
|
-
const r = e.getBoundingClientRect(), o = t.getBoundingClientRect(), s = t.clientWidth, n = parseInt((d = getComputedStyle(t).borderLeftWidth) == null ? void 0 : d.split("px")[0], 10),
|
|
827
|
-
let
|
|
828
|
-
r.right > o.right && (
|
|
829
|
-
},
|
|
826
|
+
const r = e.getBoundingClientRect(), o = t.getBoundingClientRect(), s = t.clientWidth, n = parseInt((d = getComputedStyle(t).borderLeftWidth) == null ? void 0 : d.split("px")[0], 10), i = o.left + (isNaN(n) ? 0 : n);
|
|
827
|
+
let c;
|
|
828
|
+
r.right > o.right && (c = r.left + t.scrollLeft, c = c + r.width - s + s * 0.1, c = c - i), r.left < o.left && (c = r.left + t.scrollLeft, c = c - s * 0.1, c = c - i), c !== void 0 && t.scroll({ left: c, behavior: "smooth" });
|
|
829
|
+
}, Ht = ({
|
|
830
830
|
children: e,
|
|
831
831
|
variant: t = "line",
|
|
832
832
|
negative: r = !1,
|
|
833
833
|
fullWidth: o = !1,
|
|
834
834
|
onChange: s,
|
|
835
835
|
className: n,
|
|
836
|
-
defaultValue:
|
|
837
|
-
animateHeight:
|
|
836
|
+
defaultValue: i,
|
|
837
|
+
animateHeight: c = !1,
|
|
838
838
|
"data-testid": d,
|
|
839
|
-
value:
|
|
839
|
+
value: a,
|
|
840
840
|
...l
|
|
841
841
|
}) => {
|
|
842
|
-
const f =
|
|
842
|
+
const f = te(null), [_, g] = U(-1), [I, h] = U({}), [v, C] = U(0), [N, w] = U(0), b = q.toArray(e).filter(kt), R = te(null), x = te(new Array(b.length)), $ = 200, y = t === "line", Q = P(
|
|
843
843
|
T,
|
|
844
844
|
`${T}--${t}${r ? "-negative" : ""}`,
|
|
845
845
|
{ [`${T}--fullWidth`]: o },
|
|
846
846
|
n
|
|
847
|
-
),
|
|
848
|
-
const p =
|
|
847
|
+
), F = q.map(b, ({ props: { tabId: p } }) => p), V = () => {
|
|
848
|
+
const p = F.findIndex((S) => S === i);
|
|
849
849
|
return p >= 0 ? p : 0;
|
|
850
850
|
};
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
}, [b,
|
|
854
|
-
const [B,
|
|
855
|
-
if (new Set(
|
|
851
|
+
Y(() => {
|
|
852
|
+
a && j(b.findIndex((p) => p.props.tabId === a));
|
|
853
|
+
}, [b, a]);
|
|
854
|
+
const [B, j] = U(V);
|
|
855
|
+
if (new Set(F).size !== F.length)
|
|
856
856
|
throw new Error("tabId must be unique");
|
|
857
|
-
const
|
|
858
|
-
if (!
|
|
857
|
+
const G = (p, S) => S || d ? `${S || d}-${p}` : void 0, k = () => {
|
|
858
|
+
if (!y)
|
|
859
859
|
return;
|
|
860
860
|
const p = x.current[B];
|
|
861
861
|
C((p == null ? void 0 : p.offsetLeft) || 0), w((p == null ? void 0 : p.getBoundingClientRect().width) || 0);
|
|
862
|
-
},
|
|
863
|
-
|
|
862
|
+
}, E = (p) => {
|
|
863
|
+
y && !a && j(b.findIndex((S) => S.props.tabId === p)), s == null || s(Zt(p));
|
|
864
864
|
}, Ue = (p) => {
|
|
865
|
-
if (
|
|
866
|
-
const { scrollLeft:
|
|
867
|
-
|
|
865
|
+
if (R != null && R.current) {
|
|
866
|
+
const { scrollLeft: S } = R.current, M = p === "left" ? -$ : $;
|
|
867
|
+
R.current.scroll({ left: S + M, behavior: "smooth" });
|
|
868
868
|
}
|
|
869
869
|
}, ae = ({ side: p }) => /* @__PURE__ */ m(
|
|
870
870
|
"button",
|
|
871
871
|
{
|
|
872
|
-
className:
|
|
872
|
+
className: P(`${T}__scroll-button`, `${T}__scroll-button--${p}`),
|
|
873
873
|
onClick: () => Ue(p),
|
|
874
874
|
type: "button",
|
|
875
875
|
"aria-hidden": "true",
|
|
876
876
|
tabIndex: -1,
|
|
877
|
-
"data-testid":
|
|
878
|
-
children: /* @__PURE__ */ m(
|
|
877
|
+
"data-testid": G("scroll-button"),
|
|
878
|
+
children: /* @__PURE__ */ m(ge, { svg: p === "left" ? et : tt, size: "md" })
|
|
879
879
|
}
|
|
880
880
|
);
|
|
881
|
-
return
|
|
881
|
+
return Y(() => {
|
|
882
882
|
const p = () => {
|
|
883
|
-
if (f.current &&
|
|
884
|
-
const
|
|
885
|
-
g(
|
|
883
|
+
if (f.current && c) {
|
|
884
|
+
const M = f.current.offsetHeight;
|
|
885
|
+
g(M);
|
|
886
886
|
}
|
|
887
|
-
},
|
|
888
|
-
p(),
|
|
887
|
+
}, S = () => {
|
|
888
|
+
p(), k();
|
|
889
889
|
};
|
|
890
|
-
return p(), window.addEventListener("resize",
|
|
891
|
-
window.removeEventListener("resize",
|
|
890
|
+
return p(), window.addEventListener("resize", S), () => {
|
|
891
|
+
window.removeEventListener("resize", S);
|
|
892
892
|
};
|
|
893
|
-
}, [B,
|
|
894
|
-
|
|
895
|
-
}, [B, o, b.length, t]),
|
|
896
|
-
const p =
|
|
897
|
-
|
|
893
|
+
}, [B, c]), Y(() => {
|
|
894
|
+
k();
|
|
895
|
+
}, [B, o, b.length, t]), Y(() => {
|
|
896
|
+
const p = R.current;
|
|
897
|
+
if (!p) return;
|
|
898
|
+
const S = () => {
|
|
899
|
+
const { scrollLeft: M, scrollWidth: z, clientWidth: K } = p, D = z > K, We = M <= 1, je = M + K >= z - 1;
|
|
900
|
+
if (!D) {
|
|
898
901
|
h({});
|
|
899
902
|
return;
|
|
900
903
|
}
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
...ke,
|
|
905
|
-
...Ge && {
|
|
906
|
-
[`${T}__wrapper--scroll-end`]: !E.isIntersecting
|
|
907
|
-
},
|
|
908
|
-
...We && {
|
|
909
|
-
[`${T}__wrapper--scroll-start`]: !E.isIntersecting
|
|
910
|
-
}
|
|
911
|
-
}));
|
|
904
|
+
h({
|
|
905
|
+
[`${T}__wrapper--scroll-start`]: !We,
|
|
906
|
+
[`${T}__wrapper--scroll-end`]: !je
|
|
912
907
|
});
|
|
913
|
-
}, y = new IntersectionObserver(p, {
|
|
914
|
-
threshold: [0.99],
|
|
915
|
-
root: N.current
|
|
916
|
-
}), P = x.current;
|
|
917
|
-
return P.forEach((j) => y.observe(j)), () => {
|
|
918
|
-
P.forEach((j) => y.unobserve(j));
|
|
919
908
|
};
|
|
920
|
-
|
|
921
|
-
|
|
909
|
+
return S(), p.addEventListener("scroll", S, { passive: !0 }), window.addEventListener("resize", S), () => {
|
|
910
|
+
p.removeEventListener("scroll", S), window.removeEventListener("resize", S);
|
|
911
|
+
};
|
|
912
|
+
}, []), /* @__PURE__ */ m(
|
|
913
|
+
Ot,
|
|
922
914
|
{
|
|
923
|
-
defaultValue:
|
|
924
|
-
onValueChange:
|
|
915
|
+
defaultValue: i ?? b[0].props.tabId,
|
|
916
|
+
onValueChange: E,
|
|
925
917
|
"data-testid": d,
|
|
926
|
-
className:
|
|
927
|
-
value:
|
|
918
|
+
className: Q,
|
|
919
|
+
value: a,
|
|
928
920
|
...l,
|
|
929
|
-
children: /* @__PURE__ */
|
|
930
|
-
/* @__PURE__ */
|
|
931
|
-
/* @__PURE__ */
|
|
932
|
-
|
|
921
|
+
children: /* @__PURE__ */ ee("div", { className: P(`${T}__container`), children: [
|
|
922
|
+
/* @__PURE__ */ ee("div", { className: P(`${T}__wrapper`, I), children: [
|
|
923
|
+
/* @__PURE__ */ ee(
|
|
924
|
+
Ft,
|
|
933
925
|
{
|
|
934
926
|
ref: (p) => {
|
|
935
|
-
|
|
927
|
+
R.current = p;
|
|
936
928
|
},
|
|
937
|
-
className:
|
|
929
|
+
className: P(`${T}__list`),
|
|
938
930
|
children: [
|
|
939
|
-
q.map(b, (p,
|
|
940
|
-
const { name:
|
|
931
|
+
q.map(b, (p, S) => {
|
|
932
|
+
const { name: M, tabId: z, "data-testid": K } = p.props;
|
|
941
933
|
return /* @__PURE__ */ m(
|
|
942
|
-
|
|
934
|
+
qt,
|
|
943
935
|
{
|
|
944
|
-
"data-testid":
|
|
945
|
-
index:
|
|
946
|
-
tabId:
|
|
947
|
-
ref: (
|
|
948
|
-
|
|
936
|
+
"data-testid": G("header", K),
|
|
937
|
+
index: S,
|
|
938
|
+
tabId: z,
|
|
939
|
+
ref: (D) => {
|
|
940
|
+
D && (x.current[S] = D);
|
|
949
941
|
},
|
|
950
|
-
onFocus: (
|
|
951
|
-
|
|
942
|
+
onFocus: (D) => {
|
|
943
|
+
Xt(D.target, R.current);
|
|
952
944
|
},
|
|
953
945
|
variant: t,
|
|
954
946
|
negative: r,
|
|
955
|
-
children:
|
|
947
|
+
children: M
|
|
956
948
|
}
|
|
957
949
|
);
|
|
958
950
|
}),
|
|
959
|
-
|
|
951
|
+
y && /* @__PURE__ */ m(
|
|
960
952
|
"div",
|
|
961
953
|
{
|
|
962
|
-
className:
|
|
954
|
+
className: P(`${T}__selected-border`),
|
|
963
955
|
style: {
|
|
964
|
-
width:
|
|
965
|
-
transform: `translateX(${
|
|
956
|
+
width: N,
|
|
957
|
+
transform: `translateX(${v}px)`
|
|
966
958
|
},
|
|
967
|
-
"data-testid":
|
|
959
|
+
"data-testid": G("selected-border")
|
|
968
960
|
}
|
|
969
961
|
)
|
|
970
962
|
]
|
|
@@ -976,19 +968,19 @@ const ie = /* @__PURE__ */ Bt(Gt), Wt = {
|
|
|
976
968
|
/* @__PURE__ */ m(
|
|
977
969
|
"div",
|
|
978
970
|
{
|
|
979
|
-
className:
|
|
980
|
-
style: { height:
|
|
981
|
-
children: /* @__PURE__ */ m("div", { ref: f, className:
|
|
971
|
+
className: c ? P(`${T}__content-wrapper`) : "",
|
|
972
|
+
style: { height: c && _ > -1 ? `${_}px` : "auto" },
|
|
973
|
+
children: /* @__PURE__ */ m("div", { ref: f, className: P(`${T}__content-container`), children: q.map(b, (p) => p) })
|
|
982
974
|
}
|
|
983
975
|
)
|
|
984
976
|
] })
|
|
985
977
|
}
|
|
986
978
|
);
|
|
987
979
|
};
|
|
988
|
-
|
|
980
|
+
Ht.Content = Gt;
|
|
989
981
|
export {
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
982
|
+
Ht as Tabs,
|
|
983
|
+
Zt as createTabChangeDetailEvent,
|
|
984
|
+
tn as tabsVariants
|
|
993
985
|
};
|
|
994
986
|
//# sourceMappingURL=tabs.es.js.map
|