mimir-ui-kit 1.37.6 → 1.37.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,27 +1,28 @@
1
1
  import { jsxs as Y, jsx as k } from "react/jsx-runtime";
2
- import { c as ye } from "../../index-DIxK0V-G.js";
3
- import * as R from "react";
4
- import N, { useRef as U, useState as Q, createContext as oe, useReducer as ke, useMemo as A, useId as ue, useContext as ie, forwardRef as Ee, useEffect as le } from "react";
2
+ import { c as Ee } from "../../index-DIxK0V-G.js";
3
+ import * as M from "react";
4
+ import R, { useRef as U, useState as Q, createContext as oe, useReducer as ye, useMemo as S, useId as ie, useContext as ue, forwardRef as ke, useEffect as le } from "react";
5
5
  import { ETabTrailSize as Ae } from "./constants.js";
6
6
  import { TabButtons as Se } from "./TabButtons/TabButtons.js";
7
- import { NotificationBadge as Fe } from "../NotificationBadge/NotificationBadge.js";
8
- import { n as W, M as se, W as q, s as H, y as z, o as E, H as V, $ as ce, b as De, D as de, a as B, u as Ne, c as h, t as Re } from "../../keyboard-B0lm_zyn.js";
9
- import { w as Me } from "../../use-active-press-86hajhdd.js";
10
- import { e as Ce } from "../../use-resolve-button-type-DhFdPxnv.js";
11
- import { T as pe, s as Le } from "../../hidden-DbgtYPOH.js";
12
- import { _ as G, T as J, P as D, F as T } from "../../focus-management-XwV-9qkO.js";
13
- import '../../assets/TabTrail.css';function Oe() {
7
+ import { ETabTrailButtonVariant as Fe } from "./TabButtons/constants.js";
8
+ import { NotificationBadge as De } from "../NotificationBadge/NotificationBadge.js";
9
+ import { n as W, M as se, W as V, s as j, y as q, o as A, H as z, $ as ce, b as Ne, D as de, a as G, u as Re, c as T, t as Me } from "../../keyboard-mgWkd2Vh.js";
10
+ import { w as Ce } from "../../use-active-press-CqLGIFz7.js";
11
+ import { e as Le } from "../../use-resolve-button-type-DhFdPxnv.js";
12
+ import { T as pe, s as Oe } from "../../hidden-PvGXrYUY.js";
13
+ import { _ as B, T as J, P as N, F as I } from "../../focus-management-DOYCPyGg.js";
14
+ import '../../assets/TabTrail.css';function Be() {
14
15
  let e = U(!1);
15
16
  return W(() => (e.current = !0, () => {
16
17
  e.current = !1;
17
18
  }), []), e;
18
19
  }
19
20
  function Ge({ onFocus: e }) {
20
- let [t, n] = Q(!0), r = Oe();
21
- return t ? N.createElement(pe, { as: "button", type: "button", features: Le.Focusable, onFocus: (l) => {
21
+ let [t, n] = Q(!0), r = Be();
22
+ return t ? R.createElement(pe, { as: "button", type: "button", features: Oe.Focusable, onFocus: (l) => {
22
23
  l.preventDefault();
23
24
  let s, o = 50;
24
- function u() {
25
+ function d() {
25
26
  if (o-- <= 0) {
26
27
  s && cancelAnimationFrame(s);
27
28
  return;
@@ -31,13 +32,13 @@ function Ge({ onFocus: e }) {
31
32
  n(!1);
32
33
  return;
33
34
  }
34
- s = requestAnimationFrame(u);
35
+ s = requestAnimationFrame(d);
35
36
  }
36
- s = requestAnimationFrame(u);
37
+ s = requestAnimationFrame(d);
37
38
  } }) : null;
38
39
  }
39
- const fe = R.createContext(null);
40
- function Be() {
40
+ const fe = M.createContext(null);
41
+ function Ue() {
41
42
  return { groups: /* @__PURE__ */ new Map(), get(e, t) {
42
43
  var n;
43
44
  let r = this.groups.get(e);
@@ -46,63 +47,63 @@ function Be() {
46
47
  r.set(t, l + 1);
47
48
  let s = Array.from(r.keys()).indexOf(t);
48
49
  function o() {
49
- let u = r.get(t);
50
- u > 1 ? r.set(t, u - 1) : r.delete(t);
50
+ let d = r.get(t);
51
+ d > 1 ? r.set(t, d - 1) : r.delete(t);
51
52
  }
52
53
  return [s, o];
53
54
  } };
54
55
  }
55
- function Ue({ children: e }) {
56
- let t = R.useRef(Be());
57
- return R.createElement(fe.Provider, { value: t }, e);
56
+ function We({ children: e }) {
57
+ let t = M.useRef(Ue());
58
+ return M.createElement(fe.Provider, { value: t }, e);
58
59
  }
59
60
  function be(e) {
60
- let t = R.useContext(fe);
61
+ let t = M.useContext(fe);
61
62
  if (!t) throw new Error("You must wrap your component in a <StableCollection>");
62
- let n = R.useId(), [r, l] = t.current.get(e, n);
63
- return R.useEffect(() => l, []), r;
63
+ let n = M.useId(), [r, l] = t.current.get(e, n);
64
+ return M.useEffect(() => l, []), r;
64
65
  }
65
- var We = ((e) => (e[e.Forwards = 0] = "Forwards", e[e.Backwards = 1] = "Backwards", e))(We || {}), qe = ((e) => (e[e.Less = -1] = "Less", e[e.Equal = 0] = "Equal", e[e.Greater = 1] = "Greater", e))(qe || {}), ze = ((e) => (e[e.SetSelectedIndex = 0] = "SetSelectedIndex", e[e.RegisterTab = 1] = "RegisterTab", e[e.UnregisterTab = 2] = "UnregisterTab", e[e.RegisterPanel = 3] = "RegisterPanel", e[e.UnregisterPanel = 4] = "UnregisterPanel", e))(ze || {});
66
- let Ve = { 0(e, t) {
66
+ var Ve = ((e) => (e[e.Forwards = 0] = "Forwards", e[e.Backwards = 1] = "Backwards", e))(Ve || {}), qe = ((e) => (e[e.Less = -1] = "Less", e[e.Equal = 0] = "Equal", e[e.Greater = 1] = "Greater", e))(qe || {}), ze = ((e) => (e[e.SetSelectedIndex = 0] = "SetSelectedIndex", e[e.RegisterTab = 1] = "RegisterTab", e[e.UnregisterTab = 2] = "UnregisterTab", e[e.RegisterPanel = 3] = "RegisterPanel", e[e.UnregisterPanel = 4] = "UnregisterPanel", e))(ze || {});
67
+ let He = { 0(e, t) {
67
68
  var n;
68
- let r = G(e.tabs, (c) => c.current), l = G(e.panels, (c) => c.current), s = r.filter((c) => {
69
+ let r = B(e.tabs, (u) => u.current), l = B(e.panels, (u) => u.current), s = r.filter((u) => {
69
70
  var m;
70
- return !((m = c.current) != null && m.hasAttribute("disabled"));
71
+ return !((m = u.current) != null && m.hasAttribute("disabled"));
71
72
  }), o = { ...e, tabs: r, panels: l };
72
73
  if (t.index < 0 || t.index > r.length - 1) {
73
- let c = B(Math.sign(t.index - e.selectedIndex), { [-1]: () => 1, 0: () => B(Math.sign(t.index), { [-1]: () => 0, 0: () => 0, 1: () => 1 }), 1: () => 0 });
74
+ let u = G(Math.sign(t.index - e.selectedIndex), { [-1]: () => 1, 0: () => G(Math.sign(t.index), { [-1]: () => 0, 0: () => 0, 1: () => 1 }), 1: () => 0 });
74
75
  if (s.length === 0) return o;
75
- let m = B(c, { 0: () => r.indexOf(s[0]), 1: () => r.indexOf(s[s.length - 1]) });
76
+ let m = G(u, { 0: () => r.indexOf(s[0]), 1: () => r.indexOf(s[s.length - 1]) });
76
77
  return { ...o, selectedIndex: m === -1 ? e.selectedIndex : m };
77
78
  }
78
- let u = r.slice(0, t.index), x = [...r.slice(t.index), ...u].find((c) => s.includes(c));
79
- if (!x) return o;
80
- let f = (n = r.indexOf(x)) != null ? n : e.selectedIndex;
81
- return f === -1 && (f = e.selectedIndex), { ...o, selectedIndex: f };
79
+ let d = r.slice(0, t.index), p = [...r.slice(t.index), ...d].find((u) => s.includes(u));
80
+ if (!p) return o;
81
+ let b = (n = r.indexOf(p)) != null ? n : e.selectedIndex;
82
+ return b === -1 && (b = e.selectedIndex), { ...o, selectedIndex: b };
82
83
  }, 1(e, t) {
83
84
  if (e.tabs.includes(t.tab)) return e;
84
- let n = e.tabs[e.selectedIndex], r = G([...e.tabs, t.tab], (s) => s.current), l = e.selectedIndex;
85
+ let n = e.tabs[e.selectedIndex], r = B([...e.tabs, t.tab], (s) => s.current), l = e.selectedIndex;
85
86
  return e.info.current.isControlled || (l = r.indexOf(n), l === -1 && (l = e.selectedIndex)), { ...e, tabs: r, selectedIndex: l };
86
87
  }, 2(e, t) {
87
88
  return { ...e, tabs: e.tabs.filter((n) => n !== t.tab) };
88
89
  }, 3(e, t) {
89
- return e.panels.includes(t.panel) ? e : { ...e, panels: G([...e.panels, t.panel], (n) => n.current) };
90
+ return e.panels.includes(t.panel) ? e : { ...e, panels: B([...e.panels, t.panel], (n) => n.current) };
90
91
  }, 4(e, t) {
91
92
  return { ...e, panels: e.panels.filter((n) => n !== t.panel) };
92
93
  } }, X = oe(null);
93
94
  X.displayName = "TabsDataContext";
94
- function M(e) {
95
- let t = ie(X);
95
+ function C(e) {
96
+ let t = ue(X);
96
97
  if (t === null) {
97
98
  let n = new Error(`<${e} /> is missing a parent <Tab.Group /> component.`);
98
- throw Error.captureStackTrace && Error.captureStackTrace(n, M), n;
99
+ throw Error.captureStackTrace && Error.captureStackTrace(n, C), n;
99
100
  }
100
101
  return t;
101
102
  }
102
103
  let Z = oe(null);
103
104
  Z.displayName = "TabsActionsContext";
104
105
  function ee(e) {
105
- let t = ie(Z);
106
+ let t = ue(Z);
106
107
  if (t === null) {
107
108
  let n = new Error(`<${e} /> is missing a parent <Tab.Group /> component.`);
108
109
  throw Error.captureStackTrace && Error.captureStackTrace(n, ee), n;
@@ -110,172 +111,174 @@ function ee(e) {
110
111
  return t;
111
112
  }
112
113
  function je(e, t) {
113
- return B(t.type, Ve, e, t);
114
+ return G(t.type, He, e, t);
114
115
  }
115
- let He = "div";
116
- function Je(e, t) {
117
- let { defaultIndex: n = 0, vertical: r = !1, manual: l = !1, onChange: s, selectedIndex: o = null, ...u } = e;
118
- const x = r ? "vertical" : "horizontal", f = l ? "manual" : "auto";
119
- let c = o !== null, m = H({ isControlled: c }), _ = z(t), [a, i] = ke(je, { info: m, selectedIndex: o ?? n, tabs: [], panels: [] }), $ = A(() => ({ selectedIndex: a.selectedIndex }), [a.selectedIndex]), C = H(s || (() => {
120
- })), w = H(a.tabs), b = A(() => ({ orientation: x, activation: f, ...a }), [x, f, a]), S = E((p) => (i({ type: 1, tab: p }), () => i({ type: 2, tab: p }))), L = E((p) => (i({ type: 3, panel: p }), () => i({ type: 4, panel: p }))), v = E((p) => {
121
- g.current !== p && C.current(p), c || i({ type: 0, index: p });
122
- }), g = H(c ? e.selectedIndex : a.selectedIndex), O = A(() => ({ registerTab: S, registerPanel: L, change: v }), []);
116
+ let Je = "div";
117
+ function Ke(e, t) {
118
+ let { defaultIndex: n = 0, vertical: r = !1, manual: l = !1, onChange: s, selectedIndex: o = null, ...d } = e;
119
+ const p = r ? "vertical" : "horizontal", b = l ? "manual" : "auto";
120
+ let u = o !== null, m = j({ isControlled: u }), $ = q(t), [f, a] = ye(je, { info: m, selectedIndex: o ?? n, tabs: [], panels: [] }), v = S(() => ({ selectedIndex: f.selectedIndex }), [f.selectedIndex]), w = j(s || (() => {
121
+ })), E = j(f.tabs), x = S(() => ({ orientation: p, activation: b, ...f }), [p, b, f]), F = A((c) => (a({ type: 1, tab: c }), () => a({ type: 2, tab: c }))), L = A((c) => (a({ type: 3, panel: c }), () => a({ type: 4, panel: c }))), g = A((c) => {
122
+ h.current !== c && w.current(c), u || a({ type: 0, index: c });
123
+ }), h = j(u ? e.selectedIndex : f.selectedIndex), O = S(() => ({ registerTab: F, registerPanel: L, change: g }), []);
123
124
  W(() => {
124
- i({ type: 0, index: o ?? n });
125
+ a({ type: 0, index: o ?? n });
125
126
  }, [o]), W(() => {
126
- if (g.current === void 0 || a.tabs.length <= 0) return;
127
- let p = G(a.tabs, (y) => y.current);
128
- p.some((y, F) => a.tabs[F] !== y) && v(p.indexOf(a.tabs[g.current]));
127
+ if (h.current === void 0 || f.tabs.length <= 0) return;
128
+ let c = B(f.tabs, (y) => y.current);
129
+ c.some((y, D) => f.tabs[D] !== y) && g(c.indexOf(f.tabs[h.current]));
129
130
  });
130
- let K = { ref: _ };
131
- return N.createElement(Ue, null, N.createElement(Z.Provider, { value: O }, N.createElement(X.Provider, { value: b }, b.tabs.length <= 0 && N.createElement(Ge, { onFocus: () => {
132
- var p, y;
133
- for (let F of w.current) if (((p = F.current) == null ? void 0 : p.tabIndex) === 0) return (y = F.current) == null || y.focus(), !0;
131
+ let K = { ref: $ };
132
+ return R.createElement(We, null, R.createElement(Z.Provider, { value: O }, R.createElement(X.Provider, { value: x }, x.tabs.length <= 0 && R.createElement(Ge, { onFocus: () => {
133
+ var c, y;
134
+ for (let D of E.current) if (((c = D.current) == null ? void 0 : c.tabIndex) === 0) return (y = D.current) == null || y.focus(), !0;
134
135
  return !1;
135
- } }), V({ ourProps: K, theirProps: u, slot: $, defaultTag: He, name: "Tabs" }))));
136
+ } }), z({ ourProps: K, theirProps: d, slot: v, defaultTag: Je, name: "Tabs" }))));
136
137
  }
137
- let Ke = "div";
138
- function Ye(e, t) {
139
- let { orientation: n, selectedIndex: r } = M("Tab.List"), l = z(t), s = A(() => ({ selectedIndex: r }), [r]);
140
- return V({ ourProps: { ref: l, role: "tablist", "aria-orientation": n }, theirProps: e, slot: s, defaultTag: Ke, name: "Tabs.List" });
138
+ let Ye = "div";
139
+ function Qe(e, t) {
140
+ let { orientation: n, selectedIndex: r } = C("Tab.List"), l = q(t), s = S(() => ({ selectedIndex: r }), [r]);
141
+ return z({ ourProps: { ref: l, role: "tablist", "aria-orientation": n }, theirProps: e, slot: s, defaultTag: Ye, name: "Tabs.List" });
141
142
  }
142
- let Qe = "button";
143
- function Xe(e, t) {
143
+ let Xe = "button";
144
+ function Ze(e, t) {
144
145
  var n, r;
145
- let l = ue(), { id: s = `headlessui-tabs-tab-${l}`, disabled: o = !1, autoFocus: u = !1, ...x } = e, { orientation: f, activation: c, selectedIndex: m, tabs: _, panels: a } = M("Tab"), i = ee("Tab"), $ = M("Tab"), [C, w] = Q(null), b = U(null), S = z(b, t, w);
146
- W(() => i.registerTab(b), [i, b]);
147
- let L = be("tabs"), v = _.indexOf(b);
148
- v === -1 && (v = L);
149
- let g = v === m, O = E((d) => {
150
- var P;
151
- let j = d();
152
- if (j === J.Success && c === "auto") {
153
- let $e = (P = Ne(b)) == null ? void 0 : P.activeElement, ae = $.tabs.findIndex((we) => we.current === $e);
154
- ae !== -1 && i.change(ae);
146
+ let l = ie(), { id: s = `headlessui-tabs-tab-${l}`, disabled: o = !1, autoFocus: d = !1, ...p } = e, { orientation: b, activation: u, selectedIndex: m, tabs: $, panels: f } = C("Tab"), a = ee("Tab"), v = C("Tab"), [w, E] = Q(null), x = U(null), F = q(x, t, E);
147
+ W(() => a.registerTab(x), [a, x]);
148
+ let L = be("tabs"), g = $.indexOf(x);
149
+ g === -1 && (g = L);
150
+ let h = g === m, O = A((i) => {
151
+ var _;
152
+ let H = i();
153
+ if (H === J.Success && u === "auto") {
154
+ let $e = (_ = Re(x)) == null ? void 0 : _.activeElement, ae = v.tabs.findIndex((we) => we.current === $e);
155
+ ae !== -1 && a.change(ae);
155
156
  }
156
- return j;
157
- }), K = E((d) => {
158
- let P = _.map((j) => j.current).filter(Boolean);
159
- if (d.key === h.Space || d.key === h.Enter) {
160
- d.preventDefault(), d.stopPropagation(), i.change(v);
157
+ return H;
158
+ }), K = A((i) => {
159
+ let _ = $.map((H) => H.current).filter(Boolean);
160
+ if (i.key === T.Space || i.key === T.Enter) {
161
+ i.preventDefault(), i.stopPropagation(), a.change(g);
161
162
  return;
162
163
  }
163
- switch (d.key) {
164
- case h.Home:
165
- case h.PageUp:
166
- return d.preventDefault(), d.stopPropagation(), O(() => D(P, T.First));
167
- case h.End:
168
- case h.PageDown:
169
- return d.preventDefault(), d.stopPropagation(), O(() => D(P, T.Last));
164
+ switch (i.key) {
165
+ case T.Home:
166
+ case T.PageUp:
167
+ return i.preventDefault(), i.stopPropagation(), O(() => N(_, I.First));
168
+ case T.End:
169
+ case T.PageDown:
170
+ return i.preventDefault(), i.stopPropagation(), O(() => N(_, I.Last));
170
171
  }
171
- if (O(() => B(f, { vertical() {
172
- return d.key === h.ArrowUp ? D(P, T.Previous | T.WrapAround) : d.key === h.ArrowDown ? D(P, T.Next | T.WrapAround) : J.Error;
172
+ if (O(() => G(b, { vertical() {
173
+ return i.key === T.ArrowUp ? N(_, I.Previous | I.WrapAround) : i.key === T.ArrowDown ? N(_, I.Next | I.WrapAround) : J.Error;
173
174
  }, horizontal() {
174
- return d.key === h.ArrowLeft ? D(P, T.Previous | T.WrapAround) : d.key === h.ArrowRight ? D(P, T.Next | T.WrapAround) : J.Error;
175
- } })) === J.Success) return d.preventDefault();
176
- }), p = U(!1), y = E(() => {
177
- var d;
178
- p.current || (p.current = !0, (d = b.current) == null || d.focus({ preventScroll: !0 }), i.change(v), Re(() => {
179
- p.current = !1;
175
+ return i.key === T.ArrowLeft ? N(_, I.Previous | I.WrapAround) : i.key === T.ArrowRight ? N(_, I.Next | I.WrapAround) : J.Error;
176
+ } })) === J.Success) return i.preventDefault();
177
+ }), c = U(!1), y = A(() => {
178
+ var i;
179
+ c.current || (c.current = !0, (i = x.current) == null || i.focus({ preventScroll: !0 }), a.change(g), Me(() => {
180
+ c.current = !1;
180
181
  }));
181
- }), F = E((d) => {
182
- d.preventDefault();
183
- }), { isFocusVisible: te, focusProps: he } = ce({ autoFocus: u }), { isHovered: re, hoverProps: Te } = De({ isDisabled: o }), { pressed: ne, pressProps: Ie } = Me({ disabled: o }), Pe = A(() => ({ selected: g, hover: re, active: ne, focus: te, autofocus: u, disabled: o }), [g, re, te, ne, u, o]), _e = de({ ref: S, onKeyDown: K, onMouseDown: F, onClick: y, id: s, role: "tab", type: Ce(e, C), "aria-controls": (r = (n = a[v]) == null ? void 0 : n.current) == null ? void 0 : r.id, "aria-selected": g, tabIndex: g ? 0 : -1, disabled: o || void 0, autoFocus: u }, he, Te, Ie);
184
- return V({ ourProps: _e, theirProps: x, slot: Pe, defaultTag: Qe, name: "Tabs.Tab" });
182
+ }), D = A((i) => {
183
+ i.preventDefault();
184
+ }), { isFocusVisible: te, focusProps: he } = ce({ autoFocus: d }), { isHovered: re, hoverProps: Te } = Ne({ isDisabled: o }), { pressed: ne, pressProps: Ie } = Ce({ disabled: o }), Pe = S(() => ({ selected: h, hover: re, active: ne, focus: te, autofocus: d, disabled: o }), [h, re, te, ne, d, o]), _e = de({ ref: F, onKeyDown: K, onMouseDown: D, onClick: y, id: s, role: "tab", type: Le(e, w), "aria-controls": (r = (n = f[g]) == null ? void 0 : n.current) == null ? void 0 : r.id, "aria-selected": h, tabIndex: h ? 0 : -1, disabled: o || void 0, autoFocus: d }, he, Te, Ie);
185
+ return z({ ourProps: _e, theirProps: p, slot: Pe, defaultTag: Xe, name: "Tabs.Tab" });
185
186
  }
186
- let Ze = "div";
187
- function et(e, t) {
188
- let { selectedIndex: n } = M("Tab.Panels"), r = z(t), l = A(() => ({ selectedIndex: n }), [n]);
189
- return V({ ourProps: { ref: r }, theirProps: e, slot: l, defaultTag: Ze, name: "Tabs.Panels" });
187
+ let et = "div";
188
+ function tt(e, t) {
189
+ let { selectedIndex: n } = C("Tab.Panels"), r = q(t), l = S(() => ({ selectedIndex: n }), [n]);
190
+ return z({ ourProps: { ref: r }, theirProps: e, slot: l, defaultTag: et, name: "Tabs.Panels" });
190
191
  }
191
- let tt = "div", rt = se.RenderStrategy | se.Static;
192
- function nt(e, t) {
192
+ let rt = "div", nt = se.RenderStrategy | se.Static;
193
+ function at(e, t) {
193
194
  var n, r, l, s;
194
- let o = ue(), { id: u = `headlessui-tabs-panel-${o}`, tabIndex: x = 0, ...f } = e, { selectedIndex: c, tabs: m, panels: _ } = M("Tab.Panel"), a = ee("Tab.Panel"), i = U(null), $ = z(i, t);
195
- W(() => a.registerPanel(i), [a, i]);
196
- let C = be("panels"), w = _.indexOf(i);
197
- w === -1 && (w = C);
198
- let b = w === c, { isFocusVisible: S, focusProps: L } = ce(), v = A(() => ({ selected: b, focus: S }), [b, S]), g = de({ ref: $, id: u, role: "tabpanel", "aria-labelledby": (r = (n = m[w]) == null ? void 0 : n.current) == null ? void 0 : r.id, tabIndex: b ? x : -1 }, L);
199
- return !b && ((l = f.unmount) == null || l) && !((s = f.static) != null && s) ? N.createElement(pe, { "aria-hidden": "true", ...g }) : V({ ourProps: g, theirProps: f, slot: v, defaultTag: tt, features: rt, visible: b, name: "Tabs.Panel" });
195
+ let o = ie(), { id: d = `headlessui-tabs-panel-${o}`, tabIndex: p = 0, ...b } = e, { selectedIndex: u, tabs: m, panels: $ } = C("Tab.Panel"), f = ee("Tab.Panel"), a = U(null), v = q(a, t);
196
+ W(() => f.registerPanel(a), [f, a]);
197
+ let w = be("panels"), E = $.indexOf(a);
198
+ E === -1 && (E = w);
199
+ let x = E === u, { isFocusVisible: F, focusProps: L } = ce(), g = S(() => ({ selected: x, focus: F }), [x, F]), h = de({ ref: v, id: d, role: "tabpanel", "aria-labelledby": (r = (n = m[E]) == null ? void 0 : n.current) == null ? void 0 : r.id, tabIndex: x ? p : -1 }, L);
200
+ return !x && ((l = b.unmount) == null || l) && !((s = b.static) != null && s) ? R.createElement(pe, { "aria-hidden": "true", ...h }) : z({ ourProps: h, theirProps: b, slot: g, defaultTag: rt, features: nt, visible: x, name: "Tabs.Panel" });
200
201
  }
201
- let at = q(Xe), me = q(Je), xe = q(Ye), ve = q(et), ge = q(nt), lt = Object.assign(at, { Group: me, List: xe, Panels: ve, Panel: ge });
202
- const st = "_container_rlke5_2", ot = "_group_rlke5_6", ut = "_tab_rlke5_16", it = "_list_rlke5_51", ct = "_tabs_rlke5_62", dt = "_buttons_rlke5_68", pt = "_m_rlke5_75", ft = "_s_rlke5_83", I = {
203
- container: st,
204
- group: ot,
202
+ let lt = V(Ze), me = V(Ke), xe = V(Qe), ve = V(tt), ge = V(at), st = Object.assign(lt, { Group: me, List: xe, Panels: ve, Panel: ge });
203
+ const ot = "_container_rlke5_2", it = "_group_rlke5_6", ut = "_tab_rlke5_16", ct = "_list_rlke5_51", dt = "_tabs_rlke5_62", pt = "_buttons_rlke5_68", ft = "_m_rlke5_75", bt = "_s_rlke5_83", P = {
204
+ container: ot,
205
+ group: it,
205
206
  "group-inner": "_group-inner_rlke5_9",
206
207
  tab: ut,
207
- list: it,
208
- tabs: ct,
209
- buttons: dt,
210
- m: pt,
211
- s: ft
212
- }, wt = Ee(
208
+ list: ct,
209
+ tabs: dt,
210
+ buttons: pt,
211
+ m: ft,
212
+ s: bt
213
+ }, yt = ke(
213
214
  ({
214
215
  categories: e,
215
216
  size: t = Ae.M,
216
217
  showButtons: n = !0,
217
218
  className: r,
218
219
  selectedTabIndex: l,
219
- onTabChange: s
220
- }, o) => {
221
- const [u, x] = Q(l || 0), f = U(null);
220
+ onTabChange: s,
221
+ buttonsVariant: o = Fe.WHITE
222
+ }, d) => {
223
+ const [p, b] = Q(l || 0), u = U(null);
222
224
  le(() => {
223
- l !== void 0 && l !== u && x(l);
224
- }, [u, l]);
225
- const c = (a) => {
226
- x(a), s == null || s(a);
227
- }, m = () => {
228
- const a = (u + 1) % e.length;
229
- c(a);
230
- }, _ = () => {
231
- const a = (u - 1 + e.length) % e.length;
232
- c(a);
225
+ l !== void 0 && l !== p && b(l);
226
+ }, [p, l]);
227
+ const m = (a) => {
228
+ b(a), s == null || s(a);
229
+ }, $ = () => {
230
+ const a = (p + 1) % e.length;
231
+ m(a);
232
+ }, f = () => {
233
+ const a = (p - 1 + e.length) % e.length;
234
+ m(a);
233
235
  };
234
236
  return le(() => {
235
- var i;
236
- const a = (i = f.current) == null ? void 0 : i.querySelector(
237
- `.${I.tab}[data-active="true"]`
237
+ var v;
238
+ const a = (v = u.current) == null ? void 0 : v.querySelector(
239
+ `.${P.tab}[data-active="true"]`
238
240
  );
239
241
  a && typeof a.scrollIntoView == "function" && a.scrollIntoView({
240
242
  behavior: "smooth",
241
243
  block: "nearest",
242
244
  inline: "center"
243
245
  });
244
- }, [u]), /* @__PURE__ */ Y(
246
+ }, [p]), /* @__PURE__ */ Y(
245
247
  me,
246
248
  {
247
- ref: o,
248
- className: ye(I.group, I[t], r),
249
- selectedIndex: u,
250
- onChange: c,
249
+ ref: d,
250
+ className: Ee(P.group, P[t], r),
251
+ selectedIndex: p,
252
+ onChange: m,
251
253
  children: [
252
- /* @__PURE__ */ Y("div", { className: I["group-inner"], children: [
253
- /* @__PURE__ */ k(xe, { ref: f, className: I.list, children: /* @__PURE__ */ k("div", { className: I.tabs, children: e.map(({ name: a, notificationCount: i }, $) => /* @__PURE__ */ Y(
254
- lt,
254
+ /* @__PURE__ */ Y("div", { className: P["group-inner"], children: [
255
+ /* @__PURE__ */ k(xe, { ref: u, className: P.list, children: /* @__PURE__ */ k("div", { className: P.tabs, children: e.map(({ name: a, notificationCount: v }, w) => /* @__PURE__ */ Y(
256
+ st,
255
257
  {
256
- className: `${I.tab} ${u === $ ? 'data-active="true"' : ""}`,
257
- "data-active": u === $,
258
+ className: `${P.tab} ${p === w ? 'data-active="true"' : ""}`,
259
+ "data-active": p === w,
258
260
  children: [
259
261
  a,
260
- i && /* @__PURE__ */ k(Fe, { count: i, size: "m" })
262
+ v && /* @__PURE__ */ k(De, { count: v, size: "m" })
261
263
  ]
262
264
  },
263
265
  a
264
266
  )) }) }),
265
- n && /* @__PURE__ */ k("div", { className: I.buttons, children: /* @__PURE__ */ k(
267
+ n && /* @__PURE__ */ k("div", { className: P.buttons, children: /* @__PURE__ */ k(
266
268
  Se,
267
269
  {
268
- handlePrevTab: _,
269
- handleNextTab: m
270
+ handlePrevTab: f,
271
+ handleNextTab: $,
272
+ buttonsVariant: o
270
273
  }
271
274
  ) })
272
275
  ] }),
273
- /* @__PURE__ */ k(ve, { className: I.panels, children: e.map(({ name: a, content: i }) => /* @__PURE__ */ k(ge, { className: I.panel, children: i }, a)) })
276
+ /* @__PURE__ */ k(ve, { className: P.panels, children: e.map(({ name: a, content: v }) => /* @__PURE__ */ k(ge, { className: P.panel, children: v }, a)) })
274
277
  ]
275
278
  }
276
279
  );
277
280
  }
278
281
  );
279
282
  export {
280
- wt as TabTrail
283
+ yt as TabTrail
281
284
  };
@@ -1,6 +1,6 @@
1
1
  import l, { useId as u, useMemo as f } from "react";
2
- import { z as p, U as h, a as v, l as E, f as b, W as $ } from "./label-y3ANLTNC.js";
3
- import { W as H, H as W } from "./keyboard-B0lm_zyn.js";
2
+ import { z as p, U as h, a as v, l as E, f as b, W as $ } from "./label-D4GFpe5F.js";
3
+ import { W as H, H as W } from "./keyboard-mgWkd2Vh.js";
4
4
  let P = "div";
5
5
  function _(a, i) {
6
6
  let d = `headlessui-control-${u()}`, [o, n] = p(), [m, s] = h(), c = v(), { disabled: e = c || !1, ...t } = a, r = f(() => ({ disabled: e }), [e]);
@@ -1,4 +1,4 @@
1
- import { u as N, a as v } from "./keyboard-B0lm_zyn.js";
1
+ import { u as N, a as v } from "./keyboard-mgWkd2Vh.js";
2
2
  let m = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(","), F = ["[data-autofocus]"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
3
3
  var h = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e[e.AutoFocus = 64] = "AutoFocus", e))(h || {}), x = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(x || {}), A = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(A || {});
4
4
  function y(e = document.body) {
@@ -1,4 +1,4 @@
1
- import { W as t, H as a } from "./keyboard-B0lm_zyn.js";
1
+ import { W as t, H as a } from "./keyboard-mgWkd2Vh.js";
2
2
  let l = "span";
3
3
  var p = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(p || {});
4
4
  function s(e, n) {