@purpurds/tabs 6.3.0 → 6.4.0

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