@lax-wp/design-system 0.13.75 → 0.13.76

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.
Files changed (25) hide show
  1. package/dist/components/data-display/infinite-table/body/cell/DataCell.cjs.js +1 -1
  2. package/dist/components/data-display/infinite-table/body/cell/DataCell.cjs.js.map +1 -1
  3. package/dist/components/data-display/infinite-table/body/cell/DataCell.es.js +24 -24
  4. package/dist/components/data-display/infinite-table/body/cell/DataCell.es.js.map +1 -1
  5. package/dist/components/data-display/infinite-table/body/cell/InlineCurrencyField.cjs.js +1 -1
  6. package/dist/components/data-display/infinite-table/body/cell/InlineCurrencyField.cjs.js.map +1 -1
  7. package/dist/components/data-display/infinite-table/body/cell/InlineCurrencyField.es.js +2 -2
  8. package/dist/components/data-display/infinite-table/body/cell/InlineCurrencyField.es.js.map +1 -1
  9. package/dist/components/navigation/tabs/TabSwitch.cjs.js +1 -1
  10. package/dist/components/navigation/tabs/TabSwitch.cjs.js.map +1 -1
  11. package/dist/components/navigation/tabs/TabSwitch.es.js +57 -60
  12. package/dist/components/navigation/tabs/TabSwitch.es.js.map +1 -1
  13. package/dist/components/navigation/tabs/Tabs.cjs.js +1 -1
  14. package/dist/components/navigation/tabs/Tabs.cjs.js.map +1 -1
  15. package/dist/components/navigation/tabs/Tabs.es.js +381 -402
  16. package/dist/components/navigation/tabs/Tabs.es.js.map +1 -1
  17. package/dist/hooks/useTextWidth.cjs.js +1 -1
  18. package/dist/hooks/useTextWidth.cjs.js.map +1 -1
  19. package/dist/hooks/useTextWidth.es.js +14 -11
  20. package/dist/hooks/useTextWidth.es.js.map +1 -1
  21. package/dist/utils/countryFlags.cjs.js +2 -2
  22. package/dist/utils/countryFlags.cjs.js.map +1 -1
  23. package/dist/utils/countryFlags.es.js +11 -12
  24. package/dist/utils/countryFlags.es.js.map +1 -1
  25. package/package.json +1 -1
@@ -1,29 +1,29 @@
1
- import { jsx as n, jsxs as ve } from "react/jsx-runtime";
2
- import { useSensors as Xt, useSensor as it, MouseSensor as qt, TouchSensor as Qt, DndContext as Kt, closestCenter as Zt } from "@dnd-kit/core";
3
- import { SortableContext as en, horizontalListSortingStrategy as tn, arrayMove as lt } from "@dnd-kit/sortable";
4
- import { Dropdown as De } from "antd";
1
+ import { jsx as n, jsxs as ke } from "react/jsx-runtime";
2
+ import { useSensors as Rt, useSensor as Ze, MouseSensor as zt, TouchSensor as Wt, DndContext as Pt, closestCenter as Ft } from "@dnd-kit/core";
3
+ import { SortableContext as Bt, horizontalListSortingStrategy as jt, arrayMove as Ke } from "@dnd-kit/sortable";
4
+ import { Dropdown as ye } from "antd";
5
5
  import l from "../../../_virtual/index.es.js";
6
- import { useState as g, useRef as re, useMemo as U, useCallback as C, useLayoutEffect as nn, useEffect as ae } from "react";
7
- import { useTranslation as on } from "react-i18next";
8
- import ct from "@mui/icons-material/MoreHorizOutlined";
9
- import { INITIAL_TAB_OPTION_CONFIG as sn } from "./types.es.js";
10
- import { formatCount as rn } from "../../../utils/formatters.es.js";
11
- import { useTabConfig as an } from "../../../providers/design-system-provider/hooks.es.js";
12
- import { useTextWidth as ln } from "../../../hooks/useTextWidth.es.js";
13
- import cn from "../../button/IconButton.es.js";
14
- import { OptionButton as k } from "../../buttons/option-button/OptionButton.es.js";
15
- import { SearchBar as dn } from "../../forms/search-bar/SearchBar.es.js";
16
- import Oe from "../../tooltip/Tooltip.es.js";
17
- import { EditIcon as un } from "../../icons/EditIcon.es.js";
18
- import { toast as mn } from "react-toastify";
19
- import { TabSwitch as Ve } from "./TabSwitch.es.js";
20
- import { PinIcon as ie, ArrowOutwardIcon as pn, ArrowUpwardIcon as fn, ArrowDownwardIcon as hn, ContentCopyIcon as bn, VisibilityOffIcon as xn, VisibilityIcon as gn, UnpinFilledIcon as wn, DeleteIcon as kn } from "../../icon/icons.generated.es.js";
21
- import { SortableTab as dt } from "./SortableTab.es.js";
22
- import { DropableWrapper as yn } from "./DropableWrapper.es.js";
23
- import { MoreButton as Tn } from "./MoreButton.es.js";
24
- import { TabOptions as Nn } from "./TabOptions.es.js";
25
- import { TabDragOverlay as Sn } from "./TabDragOverlay.es.js";
26
- const _n = () => Math.random().toString(16).slice(2, 13), le = [
6
+ import { useState as w, useRef as Te, useMemo as M, useCallback as v, useEffect as j } from "react";
7
+ import { useTranslation as $t } from "react-i18next";
8
+ import et from "@mui/icons-material/MoreHorizOutlined";
9
+ import { INITIAL_TAB_OPTION_CONFIG as At } from "./types.es.js";
10
+ import { formatCount as Gt } from "../../../utils/formatters.es.js";
11
+ import { useTabConfig as Yt } from "../../../providers/design-system-provider/hooks.es.js";
12
+ import { useTextWidth as Jt } from "../../../hooks/useTextWidth.es.js";
13
+ import qt from "../../button/IconButton.es.js";
14
+ import { OptionButton as y } from "../../buttons/option-button/OptionButton.es.js";
15
+ import { SearchBar as Qt } from "../../forms/search-bar/SearchBar.es.js";
16
+ import Ce from "../../tooltip/Tooltip.es.js";
17
+ import { EditIcon as Xt } from "../../icons/EditIcon.es.js";
18
+ import { toast as Zt } from "react-toastify";
19
+ import { TabSwitch as Se } from "./TabSwitch.es.js";
20
+ import { PinIcon as se, ArrowOutwardIcon as Kt, ArrowUpwardIcon as en, ArrowDownwardIcon as tn, ContentCopyIcon as nn, VisibilityOffIcon as sn, VisibilityIcon as on, UnpinFilledIcon as an, DeleteIcon as rn } from "../../icon/icons.generated.es.js";
21
+ import { SortableTab as tt } from "./SortableTab.es.js";
22
+ import { DropableWrapper as ln } from "./DropableWrapper.es.js";
23
+ import { MoreButton as cn } from "./MoreButton.es.js";
24
+ import { TabOptions as dn } from "./TabOptions.es.js";
25
+ import { TabDragOverlay as un } from "./TabDragOverlay.es.js";
26
+ const mn = () => Math.random().toString(16).slice(2, 13), oe = [
27
27
  "[&_.ant-dropdown-menu-item]:!outline-none",
28
28
  "[&_.ant-dropdown-menu-submenu-title]:!outline-none",
29
29
  "[&_.ant-dropdown-menu-item:focus-visible_.option-button-inner]:ring-2",
@@ -34,15 +34,15 @@ const _n = () => Math.random().toString(16).slice(2, 13), le = [
34
34
  "[&_.ant-dropdown-menu-submenu-title:focus-visible_.option-button-inner]:ring-primary-500",
35
35
  "[&_.ant-dropdown-menu-submenu-title:focus-visible_.option-button-inner]:bg-gray-50",
36
36
  "[&_.ant-dropdown-menu-submenu-title:focus-visible_.option-button-inner]:dark:bg-black-600"
37
- ].join(" "), Cn = 26, ut = 6, In = 20, En = 32, vn = 24, Dn = 37, On = "(min-width: 640px)", Vn = 2, Ln = 'ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif';
38
- let Le = null;
39
- const Me = (b) => {
40
- b ? (Le = document.activeElement, setTimeout(() => {
37
+ ].join(" ");
38
+ let Ne = null;
39
+ const Ie = (T) => {
40
+ T ? (Ne = document.activeElement, setTimeout(() => {
41
41
  document.querySelector(
42
42
  ".row-option-cell .ant-dropdown-menu-item:not(.ant-dropdown-menu-item-disabled), .row-option-cell .ant-dropdown-menu-submenu-title"
43
43
  )?.focus();
44
44
  }, 50)) : setTimeout(() => {
45
- Le?.focus(), Le = null;
45
+ Ne?.focus(), Ne = null;
46
46
  }, 0);
47
47
  }, c = {
48
48
  SELECT: "Select",
@@ -55,328 +55,318 @@ const Me = (b) => {
55
55
  PIN: "Pin",
56
56
  UNPIN: "Unpin",
57
57
  EDIT: "Edit"
58
- }, ro = ({
59
- variant: b = "default",
60
- tabs: y = [],
61
- activeTab: i,
62
- onTabClick: mt,
58
+ }, Pn = ({
59
+ variant: T = "default",
60
+ tabs: _ = [],
61
+ activeTab: r,
62
+ onTabClick: nt,
63
63
  suffixRecord: $,
64
- isLoading: pt,
65
- size: T = "md",
66
- className: Ue,
67
- draggable: I = !1,
68
- showAllItems: G = !1,
69
- copyLink: ft = !1,
70
- isDisabled: ht = !1,
71
- color: ce = "light",
72
- iconsOnly: E = !1,
73
- tabIcons: Y = {},
74
- height: bt = "h-6",
75
- fullWidth: de = !1,
76
- fitContentWidth: ue = !1,
77
- disableAnimation: xt = !1,
78
- onEdit: He,
79
- onDelete: Re,
80
- onCopyLink: Ae,
81
- allowPin: v = !1,
82
- isFullWidth: D = !1,
83
- rightSection: P,
84
- initialTabs: gt,
85
- tabConfig: wt,
86
- onTabConfigChange: Pe,
87
- onTabsChange: Fe,
88
- parentContainer: kt = document.body,
89
- tabKey: N,
90
- linkConfig: p,
91
- showTabOptions: me = !0
64
+ isLoading: st,
65
+ size: O = "md",
66
+ className: ve,
67
+ draggable: E = !1,
68
+ showAllItems: A = !1,
69
+ copyLink: ot = !1,
70
+ isDisabled: at = !1,
71
+ color: ae = "light",
72
+ iconsOnly: rt = !1,
73
+ tabIcons: re = {},
74
+ height: it = "h-6",
75
+ fullWidth: ie = !1,
76
+ fitContentWidth: lt = !1,
77
+ disableAnimation: ct = !1,
78
+ onEdit: _e,
79
+ onDelete: Oe,
80
+ onCopyLink: Ee,
81
+ allowPin: C = !1,
82
+ isFullWidth: G = !1,
83
+ rightSection: H,
84
+ initialTabs: dt,
85
+ tabConfig: ut,
86
+ onTabConfigChange: De,
87
+ onTabsChange: Ve,
88
+ parentContainer: mt = document.body,
89
+ tabKey: S,
90
+ linkConfig: m,
91
+ showTabOptions: pt = !0
92
92
  }) => {
93
- const h = an(), Be = N ? h?.getTabSettings(N) : void 0, pe = gt ?? Be?.tab_items, J = wt ?? Be?.tab_options, [fe, yt] = g(""), [O, X] = g(!1), [he, ze] = g(0), [m, be] = g([]), [q, Tt] = g([]), [Nt, Q] = g(null), [H, K] = g(null), [St, We] = g(!1), [je, $e] = g(
94
- J ?? sn
95
- ), [xe, _t] = g(""), [Ge, Ct] = g("contains"), { showCounts: S, lockOrder: F, sortOrder: ge } = je, { t: u } = on(), we = re(null), It = re(null), ke = re(!1), ye = re(""), { measureText: Z, clearCache: Ye } = ln(), B = U(() => _n(), []), Et = Xt(
96
- it(qt, { activationConstraint: { distance: 5 } }),
97
- it(Qt, { activationConstraint: { delay: 300, tolerance: 5 } })
98
- ), w = U(() => $ && Object.fromEntries(
93
+ const x = Yt(), Le = S ? x?.getTabSettings(S) : void 0, le = dt ?? Le?.tab_items, Y = ut ?? Le?.tab_options, [ce, ft] = w(""), [I, J] = w(!1), [U, bt] = w(0), [d, de] = w([]), [q, ht] = w([]), [xt, Q] = w(null), [D, X] = w(null), [gt, Me] = w(!1), [He, Ue] = w(
94
+ Y ?? At
95
+ ), [ue, wt] = w(""), [Re, kt] = w("contains"), { showCounts: k, lockOrder: R, sortOrder: me } = He, { t: u } = $t(), Z = Te(null), yt = Te(null), ze = Te(U), { measureText: z } = Jt(), W = M(() => mn(), []), Tt = Rt(
96
+ Ze(zt, { activationConstraint: { distance: 5 } }),
97
+ Ze(Wt, { activationConstraint: { delay: 300, tolerance: 5 } })
98
+ ), p = M(() => $ && Object.fromEntries(
99
99
  Object.entries($).map(([e, t]) => [
100
100
  e,
101
- rn(t)
101
+ Gt(t)
102
102
  ])
103
- ), [$]), Je = U(() => q.filter(({ is_hidden: e }) => !e), [q]), R = U(() => q.filter(({ is_hidden: e }) => e), [q]), Xe = U(
104
- () => Je.filter(({ name: e }) => {
105
- if (!xe) return !0;
106
- const t = (e ?? "").toLowerCase(), o = xe.toLowerCase();
107
- return Ge === "contains" ? t.includes(o) : !t.includes(o);
103
+ ), [$]), We = M(() => q.filter(({ is_hidden: e }) => !e), [q]), V = M(() => q.filter(({ is_hidden: e }) => e), [q]), Pe = M(
104
+ () => We.filter(({ name: e }) => {
105
+ if (!ue) return !0;
106
+ const t = (e ?? "").toLowerCase(), s = ue.toLowerCase();
107
+ return Re === "contains" ? t.includes(s) : !t.includes(s);
108
108
  }),
109
- [Je, xe, Ge]
110
- ), d = U(
111
- () => [...Xe].sort((e, t) => e.is_pinned && !t.is_pinned ? -1 : !e.is_pinned && t.is_pinned ? 1 : 0),
112
- [Xe]
113
- ), qe = JSON.stringify(
114
- Object.entries(Y ?? {}).filter(([, e]) => e != null).map(([e]) => e).sort()
115
- ), Qe = U(
116
- () => new Set(JSON.parse(qe)),
117
- [qe]
118
- ), vt = he < d.length, ee = G ? d.length : vt ? he : d.length, Ke = d.findIndex((e) => e.name === i) >= ee, Ze = Math.max(0, d.length - ee - (Ke ? 1 : 0)) + R.length, z = C(
109
+ [We, ue, Re]
110
+ ), a = M(
111
+ () => [...Pe].sort((e, t) => e.is_pinned && !t.is_pinned ? -1 : !e.is_pinned && t.is_pinned ? 1 : 0),
112
+ [Pe]
113
+ ), Ct = U < a.length, K = A ? a.length : Ct ? U : a.length, Fe = a.findIndex((e) => e.name === r) >= K, Be = d.length - K - (Fe ? 1 : 0);
114
+ ze.current = U;
115
+ const P = v(
119
116
  (e) => {
120
- be(e), Fe?.(e), N && h?.persistTabSettings && h.persistTabSettings({ tab_type: N, tab_items: e });
117
+ de(e), Ve?.(e), S && x?.persistTabSettings && x.persistTabSettings({ tab_type: S, tab_items: e });
121
118
  },
122
- [Fe, N, h]
123
- ), Dt = C(
119
+ [Ve, S, x]
120
+ ), St = v(
124
121
  (e) => {
125
- $e(e), Pe?.(e), N && h?.persistTabSettings && h.persistTabSettings({ tab_type: N, tab_options: e });
122
+ Ue(e), De?.(e), S && x?.persistTabSettings && x.persistTabSettings({ tab_type: S, tab_options: e });
126
123
  },
127
- [Pe, N, h]
128
- ), et = C(() => {
129
- if (ye.current) return ye.current;
130
- const e = we.current?.querySelector('[id^="btn-tabs-tabswitch-"] span'), t = e ? getComputedStyle(e).fontFamily : "";
131
- return t && (ye.current = t), t || Ln;
132
- }, []), te = C(
124
+ [De, S, x]
125
+ ), je = (e) => e.is_pinned ? 32 : 0, pe = v(
133
126
  (e) => {
134
127
  if (!e) return;
135
- const t = d.length;
136
- if (G) {
137
- ze(t);
138
- return;
128
+ const t = E ? 30 : 0, s = k ? 190 : 84, i = O === "sm" ? 4 : 8, o = 32;
129
+ let f = 0, te = 0, g = 0;
130
+ const b = e - (H?.width || 0) - t, Ye = ze.current, Je = Ye < a.length, qe = V.length > 0;
131
+ for (let h = 0; h < a.length; h++) {
132
+ const N = a[h], ne = p?.[N.name] ? String(p?.[N.name]) : "", xe = k && ne ? z(ne, {
133
+ fontSize: "16px",
134
+ fontWeight: "500",
135
+ fontFamily: "Inter, system-ui, -apple-system, sans-serif"
136
+ }) + 18 + 2 : 0, ge = z(N?.name || "", {
137
+ fontSize: "16px",
138
+ fontWeight: "600",
139
+ fontFamily: "Inter, system-ui, -apple-system, sans-serif"
140
+ }), we = C ? je(N) : 0, Xe = ge + xe + o + i + we;
141
+ if (N.name === r && (te = Xe), f += Xe, b > f + (Je || qe ? s : 0) + h * 25)
142
+ g = h + 1;
143
+ else
144
+ break;
139
145
  }
140
- const o = typeof window > "u" || window.matchMedia(On).matches, r = et(), s = { fontSize: "14px", fontWeight: "600", fontFamily: r }, f = { fontSize: "12px", fontWeight: "400", fontFamily: r }, V = (a, L = !1) => {
141
- const M = E ? 0 : Z(u(a.name).toUpperCase(), s), _ = w?.[a.name], se = S && _ !== void 0 ? Z(String(_), f) + Cn + (E ? 0 : ut) : 0, $t = v && a.is_pinned || Qe.has(a.name) ? In + (E ? 0 : ut) : 0, Gt = I && a.name === i ? L ? vn : En : 0, Yt = b === "secondary" ? T === "sm" ? 24 : 32 : o ? 16 : 20, Jt = o && (L || !D) ? 8 : 0;
142
- return M + se + $t + Gt + Yt + Jt;
143
- }, oe = e - Vn, x = D ? 0 : T === "sm" ? 4 : 8, _e = [0];
144
- d.forEach((a, L) => {
145
- _e.push(_e[L] + V(a));
146
- });
147
- const Ce = d.findIndex((a) => a.name === i), zt = Ce >= 0 ? V(d[Ce], !0) : 0, Wt = b === "secondary" ? T === "sm" ? 24 : 32 : o ? 32 : 48, jt = (a) => Z(S ? `${a} MORE...` : "MORE...", s) + Wt + (o ? 8 : 0), st = I && me && y.length > 0 ? Dn : 0, rt = P?.width || 0, at = (a, L) => {
148
- let M = _e[a], _ = a;
149
- const se = L && Ce >= a;
150
- if (se && (M += zt, _ += 1), L) {
151
- const Ee = Math.max(0, t - a - (se ? 1 : 0)) + R.length;
152
- Ee > 0 && (M += jt(Ee), _ += 1);
146
+ const Qe = a.length - g;
147
+ if (Qe + V.length === 1 && V.length === 0 && Qe === 1 && g < a.length) {
148
+ const h = a[g];
149
+ if (h) {
150
+ const N = p?.[h.name] ? String(p?.[h.name]) : "", ne = k && N ? z(N, {
151
+ fontSize: "16px",
152
+ fontWeight: "500",
153
+ fontFamily: "Inter, system-ui, -apple-system, sans-serif"
154
+ }) + 18 + 2 : 0, xe = z(h?.name || "", {
155
+ fontSize: "16px",
156
+ fontWeight: "600",
157
+ fontFamily: "Inter, system-ui, -apple-system, sans-serif"
158
+ }), ge = C ? je(h) : 0, we = xe + ne + o + i + ge;
159
+ b >= f + we && (g += 1);
153
160
  }
154
- return st && (M += st, _ += 1), rt && (M += rt, _ += 1), M + x * Math.max(_ - 1, 0);
155
- };
156
- let Ie = 0;
157
- if (R.length === 0 && at(t, !1) <= oe)
158
- Ie = t;
159
- else
160
- for (let a = t; a >= 0; a--)
161
- if (at(a, !0) <= oe) {
162
- Ie = a;
163
- break;
164
- }
165
- ze(Ie);
161
+ }
162
+ const Ut = A ? a.length : g;
163
+ a.findIndex((h) => h.name === r) >= Ut && (f += te, b < f + (Je || qe ? s : 0) && (g = Math.max(g - 1, 0))), g !== Ye && bt(g);
166
164
  },
167
165
  [
168
- d,
169
- R.length,
170
- y.length,
171
- G,
172
- i,
173
- b,
174
- T,
166
+ a,
167
+ k,
168
+ A,
169
+ C,
170
+ p,
171
+ H?.width,
172
+ r,
173
+ O,
175
174
  E,
176
- D,
177
- S,
178
- w,
179
- v,
180
- Qe,
181
- I,
182
- me,
183
- P?.width,
184
- Z,
185
- et,
186
- u
175
+ V.length,
176
+ z
187
177
  ]
188
- ), Te = C(
178
+ ), fe = v(
189
179
  () => {
190
180
  if (typeof window < "u")
191
181
  return new URLSearchParams(window.location.search);
192
- if (p && h?.getSearchParam) {
193
- const e = new URLSearchParams(), t = h.getSearchParam(p.key);
194
- return t && e.set(p.key, t), e;
182
+ if (m && x?.getSearchParam) {
183
+ const e = new URLSearchParams(), t = x.getSearchParam(m.key);
184
+ return t && e.set(m.key, t), e;
195
185
  }
196
186
  return new URLSearchParams();
197
187
  },
198
- [p, h]
199
- ), Ne = C(
200
- (e, t) => (p && (t === p.defaultLink ? e.delete(p.key) : e.set(p.key, t), p.onResolve?.(e)), e),
201
- [p]
202
- ), W = C(
203
- (e) => p ? `?${Ne(Te(), e).toString()}` : void 0,
204
- [Ne, Te, p]
205
- ), Ot = ft || !!p, Vt = C(
188
+ [m, x]
189
+ ), be = v(
190
+ (e, t) => (m && (t === m.defaultLink ? e.delete(m.key) : e.set(m.key, t), m.onResolve?.(e)), e),
191
+ [m]
192
+ ), F = v(
193
+ (e) => m ? `?${be(fe(), e).toString()}` : void 0,
194
+ [be, fe, m]
195
+ ), Nt = ot || !!m, It = v(
206
196
  async (e) => {
207
- const t = W(e), o = typeof window < "u" ? window.location.origin : "", r = typeof window < "u" ? window.location.pathname : "", s = t ? `${o}${r}${t}` : `${o}${r}`;
208
- await navigator.clipboard.writeText(s), mn.success(u("Link copied to clipboard"), {
197
+ const t = F(e), s = typeof window < "u" ? window.location.origin : "", i = typeof window < "u" ? window.location.pathname : "", o = t ? `${s}${i}${t}` : `${s}${i}`;
198
+ await navigator.clipboard.writeText(o), Zt.success(u("Link copied to clipboard"), {
209
199
  toastId: "Link copied to clipboard"
210
- }), Ae?.(e, s);
200
+ }), Ee?.(e, o);
211
201
  },
212
- [W, u, Ae]
213
- ), j = (e) => {
214
- if (X(!1), mt?.(e), p && h?.navigate) {
215
- const t = Ne(Te(), e);
216
- h.navigate(`?${t.toString()}`);
202
+ [F, u, Ee]
203
+ ), B = (e) => {
204
+ if (J(!1), nt?.(e), m && x?.navigate) {
205
+ const t = be(fe(), e);
206
+ x.navigate(`?${t.toString()}`);
217
207
  }
218
- }, tt = (e) => {
219
- if (d.length <= 1) return;
220
- const t = m.map(
221
- (s) => s.name === e ? { ...s, is_hidden: !0 } : s
222
- ), o = d.findIndex((s) => s.name === e), r = o === 0 ? 1 : o - 1;
223
- j(d[r].name), z(t);
224
- }, Lt = (e) => {
225
- const t = m.map(
226
- (o) => o.name === e ? { ...o, is_hidden: !1 } : o
208
+ }, $e = (e) => {
209
+ if (a.length <= 1) return;
210
+ const t = d.map(
211
+ (o) => o.name === e ? { ...o, is_hidden: !0 } : o
212
+ ), s = a.findIndex((o) => o.name === e), i = s === 0 ? 1 : s - 1;
213
+ B(a[i].name), P(t);
214
+ }, vt = (e) => {
215
+ const t = d.map(
216
+ (s) => s.name === e ? { ...s, is_hidden: !1 } : s
227
217
  );
228
- X(!1), z(t);
229
- }, ne = (e) => {
230
- if (!v) return;
231
- const t = m.map(
232
- (o) => o.name === e ? { ...o, is_pinned: !o.is_pinned } : o
218
+ J(!1), P(t);
219
+ }, ee = (e) => {
220
+ if (!C) return;
221
+ const t = d.map(
222
+ (s) => s.name === e ? { ...s, is_pinned: !s.is_pinned } : s
233
223
  );
234
- z(t);
235
- }, nt = (e, t) => {
236
- const o = m.findIndex(({ name: s }) => s === e), r = t === "left" ? o - (m[o - 1]?.name === i ? 2 : 1) : o + 1;
237
- z(lt(m, o, r));
238
- }, ot = () => X(!O), Mt = (e) => K(e.active.id), Ut = (e) => {
239
- const { active: t, over: o } = e;
240
- if (o?.id === "more-tabs") {
241
- tt(t.id), K(null), Q(null);
224
+ P(t);
225
+ }, Ae = (e, t) => {
226
+ const s = d.findIndex(({ name: o }) => o === e), i = t === "left" ? s - (d[s - 1]?.name === r ? 2 : 1) : s + 1;
227
+ P(Ke(d, s, i));
228
+ }, Ge = () => J(!I), _t = (e) => X(e.active.id), Ot = (e) => {
229
+ const { active: t, over: s } = e;
230
+ if (s?.id === "more-tabs") {
231
+ $e(t.id), X(null), Q(null);
242
232
  return;
243
233
  }
244
- const r = m.findIndex(({ name: f }) => f === t.id), s = m.findIndex(({ name: f }) => f === o?.id);
245
- z(lt(m, r, s)), K(null), Q(null);
246
- }, Ht = () => {
247
- K(null), Q(null);
248
- }, Rt = (e) => {
234
+ const i = d.findIndex(({ name: f }) => f === t.id), o = d.findIndex(({ name: f }) => f === s?.id);
235
+ P(Ke(d, i, o)), X(null), Q(null);
236
+ }, Et = () => {
237
+ X(null), Q(null);
238
+ }, Dt = (e) => {
249
239
  Q(e.over?.id === "more-tabs" ? "more-tabs" : null);
250
- }, At = () => {
251
- }, Pt = (e, t) => {
252
- _t(e), Ct(t);
253
- }, Se = (e, t = !1, o = !1) => {
254
- const s = m.find((x) => x.name === e)?.is_pinned, f = [
240
+ }, Vt = () => {
241
+ }, Lt = (e, t) => {
242
+ wt(e), kt(t);
243
+ }, he = (e, t = !1, s = !1) => {
244
+ const o = d.find((b) => b.name === e)?.is_pinned, f = [
255
245
  {
256
246
  label: /* @__PURE__ */ n(
257
- k,
247
+ y,
258
248
  {
259
- icon: /* @__PURE__ */ n(pn, { size: 18, className: "text-inherit dark:text-inherit" }),
249
+ icon: /* @__PURE__ */ n(Kt, { size: 18, className: "text-inherit dark:text-inherit" }),
260
250
  text: u("Select Tab"),
261
251
  className: "text-black-900 dark:text-white"
262
252
  }
263
253
  ),
264
254
  key: c.SELECT,
265
- onClick: () => j(e)
255
+ onClick: () => B(e)
266
256
  },
267
257
  {
268
258
  label: /* @__PURE__ */ n(
269
- k,
259
+ y,
270
260
  {
271
- icon: /* @__PURE__ */ n(fn, { size: 18, className: "text-inherit dark:text-inherit" }),
261
+ icon: /* @__PURE__ */ n(en, { size: 18, className: "text-inherit dark:text-inherit" }),
272
262
  text: u("Move Up"),
273
- isDisabled: F,
263
+ isDisabled: R,
274
264
  className: "text-black-900 dark:text-white"
275
265
  }
276
266
  ),
277
267
  key: c.MOVE_LEFT,
278
- disabled: F,
279
- onClick: () => nt(e, "left")
268
+ disabled: R,
269
+ onClick: () => Ae(e, "left")
280
270
  },
281
271
  {
282
272
  label: /* @__PURE__ */ n(
283
- k,
273
+ y,
284
274
  {
285
- icon: /* @__PURE__ */ n(hn, { size: 18, className: "text-inherit dark:text-inherit" }),
275
+ icon: /* @__PURE__ */ n(tn, { size: 18, className: "text-inherit dark:text-inherit" }),
286
276
  text: u("Move Down"),
287
- isDisabled: F,
277
+ isDisabled: R,
288
278
  className: "text-black-900 dark:text-white"
289
279
  }
290
280
  ),
291
281
  key: c.MOVE_RIGHT,
292
- disabled: F,
293
- onClick: () => nt(e, "right")
282
+ disabled: R,
283
+ onClick: () => Ae(e, "right")
294
284
  },
295
285
  {
296
286
  label: /* @__PURE__ */ n(
297
- k,
287
+ y,
298
288
  {
299
- icon: /* @__PURE__ */ n(bn, { size: 18, className: "text-inherit dark:text-inherit" }),
289
+ icon: /* @__PURE__ */ n(nn, { size: 18, className: "text-inherit dark:text-inherit" }),
300
290
  text: u("Copy Link"),
301
291
  className: "text-black-900 dark:text-white"
302
292
  }
303
293
  ),
304
294
  key: c.COPY_LINK,
305
- onClick: () => Vt(e)
295
+ onClick: () => It(e)
306
296
  },
307
297
  {
308
298
  label: /* @__PURE__ */ n(
309
- k,
299
+ y,
310
300
  {
311
- icon: /* @__PURE__ */ n(xn, { size: 18, className: "text-inherit dark:text-inherit" }),
301
+ icon: /* @__PURE__ */ n(sn, { size: 18, className: "text-inherit dark:text-inherit" }),
312
302
  text: u("Hide"),
313
303
  className: "text-black-900 dark:text-white"
314
304
  }
315
305
  ),
316
306
  key: c.HIDE,
317
- onClick: () => tt(e)
307
+ onClick: () => $e(e)
318
308
  },
319
309
  {
320
310
  label: /* @__PURE__ */ n(
321
- k,
311
+ y,
322
312
  {
323
- icon: /* @__PURE__ */ n(gn, { size: 18, className: "text-inherit dark:text-inherit" }),
313
+ icon: /* @__PURE__ */ n(on, { size: 18, className: "text-inherit dark:text-inherit" }),
324
314
  text: u("Unhide"),
325
315
  className: "text-black-900 dark:text-white"
326
316
  }
327
317
  ),
328
318
  key: c.UNHIDE,
329
- onClick: () => Lt(e)
319
+ onClick: () => vt(e)
330
320
  },
331
321
  {
332
322
  label: /* @__PURE__ */ n(
333
- k,
323
+ y,
334
324
  {
335
- icon: s ? /* @__PURE__ */ n(wn, { size: 20, className: "rotate-12 text-inherit dark:text-inherit" }) : /* @__PURE__ */ n(ie, { size: 20, className: "rotate-45 text-inherit dark:text-inherit" }),
336
- text: u(s ? "Unpin" : "Pin"),
325
+ icon: o ? /* @__PURE__ */ n(an, { size: 20, className: "rotate-12 text-inherit dark:text-inherit" }) : /* @__PURE__ */ n(se, { size: 20, className: "rotate-45 text-inherit dark:text-inherit" }),
326
+ text: u(o ? "Unpin" : "Pin"),
337
327
  className: "text-black-900 dark:text-white",
338
- notVisible: !v
328
+ notVisible: !C
339
329
  }
340
330
  ),
341
- key: s ? c.UNPIN : c.PIN,
342
- onClick: () => ne(e)
331
+ key: o ? c.UNPIN : c.PIN,
332
+ onClick: () => ee(e)
343
333
  },
344
334
  {
345
335
  label: /* @__PURE__ */ n(
346
- k,
336
+ y,
347
337
  {
348
338
  className: "text-black-900 dark:text-white",
349
- icon: /* @__PURE__ */ n(un, {}),
339
+ icon: /* @__PURE__ */ n(Xt, {}),
350
340
  text: u("Edit"),
351
- notVisible: !He
341
+ notVisible: !_e
352
342
  }
353
343
  ),
354
344
  key: c.EDIT,
355
- onClick: () => He?.(e)
345
+ onClick: () => _e?.(e)
356
346
  },
357
347
  {
358
348
  label: /* @__PURE__ */ n(
359
- k,
349
+ y,
360
350
  {
361
351
  className: "text-error-600 dark:text-error-600",
362
- icon: /* @__PURE__ */ n(kn, { size: 18, className: "text-error-600 dark:text-error-600" }),
352
+ icon: /* @__PURE__ */ n(rn, { size: 18, className: "text-error-600 dark:text-error-600" }),
363
353
  text: u("Delete"),
364
- notVisible: !Re
354
+ notVisible: !Oe
365
355
  }
366
356
  ),
367
357
  key: c.DELETE,
368
- onClick: () => Re?.(e)
358
+ onClick: () => Oe?.(e)
369
359
  }
370
- ], V = [c.HIDE, c.UNHIDE], oe = [c.SELECT, c.MOVE_LEFT, c.MOVE_RIGHT, c.UNHIDE];
360
+ ], te = [c.HIDE, c.UNHIDE], g = [c.SELECT, c.MOVE_LEFT, c.MOVE_RIGHT, c.UNHIDE];
371
361
  return f.filter(
372
- (x) => t ? x.key === c.UNHIDE : o ? !V.includes(x.key) : !oe.includes(x.key)
373
- ).filter((x) => Ot ? !0 : x.key !== c.COPY_LINK).filter((x) => d.length === 1 ? x.key !== c.HIDE : !0);
374
- }, A = (e, t) => ({
362
+ (b) => t ? b.key === c.UNHIDE : s ? !te.includes(b.key) : !g.includes(b.key)
363
+ ).filter((b) => Nt ? !0 : b.key !== c.COPY_LINK).filter((b) => a.length === 1 ? b.key !== c.HIDE : !0);
364
+ }, L = (e, t) => ({
375
365
  classValue: {
376
366
  default: l("relative inline-flex pt-2 pb-3 px-2 pl-3 sm:px-2 rounded-t-sm group"),
377
367
  secondary: l(
378
368
  "flex w-full sm:w-auto relative rounded-lg font-sans font-semibold text-center cursor-pointer uppercase",
379
- T === "sm" ? "py-1 px-3 text-sm" : "py-2 px-4 text-base"
369
+ O === "sm" ? "py-1 px-3 text-sm" : "py-2 px-4 text-base"
380
370
  )
381
371
  },
382
372
  selectedClassValue: {
@@ -393,87 +383,78 @@ const Me = (b) => {
393
383
  t ? "text-primary-600 dark:text-primary-500" : "text-neutral-400 dark:text-neutral-400"
394
384
  )
395
385
  }
396
- })[e][b];
397
- nn(() => {
398
- const e = we.current;
399
- if (!e || b === "switch") return;
400
- const t = (ue ? e.parentElement : e) ?? e, o = (f) => {
401
- const V = getComputedStyle(f);
402
- return f.clientWidth - (parseFloat(V.paddingLeft) || 0) - (parseFloat(V.paddingRight) || 0);
403
- };
404
- let r = !1;
405
- const s = new ResizeObserver((f) => {
406
- te(f[0].contentRect.width);
386
+ })[e][T];
387
+ j(() => {
388
+ if (!Z.current || T === "switch") return;
389
+ const e = new ResizeObserver((t) => {
390
+ const s = t[0].contentRect.width;
391
+ pe(s);
407
392
  });
408
- return s.observe(t), te(o(t)), !ke.current && typeof document < "u" && document.fonts && document.fonts.ready.then(() => {
409
- r || ke.current || (ke.current = !0, Ye(), te(o(t)));
410
- }), () => {
411
- r = !0, s.disconnect();
412
- };
413
- }, [te, b, ue, Ye]);
414
- const Ft = JSON.stringify(y), Bt = JSON.stringify(pe?.map(({ name: e }) => e));
415
- return ae(() => {
416
- if (pe?.length) {
417
- let e = [...pe];
418
- y.forEach((t) => {
419
- e.find((o) => o.name === t) || e.push({ name: t, is_default: !1, is_hidden: !1, is_pinned: !1 });
393
+ return e.observe(Z.current), pe(Z.current.clientWidth), () => e.disconnect();
394
+ }, [pe, T]);
395
+ const Mt = JSON.stringify(_), Ht = JSON.stringify(le?.map(({ name: e }) => e));
396
+ return j(() => {
397
+ if (le?.length) {
398
+ let e = [...le];
399
+ _.forEach((t) => {
400
+ e.find((s) => s.name === t) || e.push({ name: t, is_default: !1, is_hidden: !1, is_pinned: !1 });
420
401
  }), e = e.filter(
421
- (t, o, r) => y.includes(t.name) && o === r.findIndex((s) => s.name === t.name)
422
- ), be(e);
402
+ (t, s, i) => _.includes(t.name) && s === i.findIndex((o) => o.name === t.name)
403
+ ), de(e);
423
404
  } else
424
- be(
425
- y.map((e) => ({ name: e, is_default: !1, is_hidden: !1, is_pinned: !1 })).filter((e, t, o) => t === o.findIndex((r) => r.name === e.name))
405
+ de(
406
+ _.map((e) => ({ name: e, is_default: !1, is_hidden: !1, is_pinned: !1 })).filter((e, t, s) => t === s.findIndex((i) => i.name === e.name))
426
407
  );
427
- }, [Ft, Bt]), ae(() => {
428
- J && $e(J);
429
- }, [J]), ae(() => {
430
- if (!m.length) return;
431
- const e = [...m];
432
- ge === "asc" ? e.sort((t, o) => t.name.localeCompare(o.name)) : ge === "desc" && e.sort((t, o) => o.name.localeCompare(t.name)), Tt(e);
433
- }, [m, ge]), ae(() => {
434
- Me(O);
435
- }, [O]), b === "switch" ? /* @__PURE__ */ n("div", { className: l("inline", Ue), children: /* @__PURE__ */ n(
408
+ }, [Mt, Ht]), j(() => {
409
+ Y && Ue(Y);
410
+ }, [Y]), j(() => {
411
+ if (!d.length) return;
412
+ const e = [...d];
413
+ me === "asc" ? e.sort((t, s) => t.name.localeCompare(s.name)) : me === "desc" && e.sort((t, s) => s.name.localeCompare(t.name)), ht(e);
414
+ }, [d, me]), j(() => {
415
+ Ie(I);
416
+ }, [I]), T === "switch" ? /* @__PURE__ */ n("div", { className: l("inline", ve), children: /* @__PURE__ */ n(
436
417
  "ul",
437
418
  {
438
419
  role: "tablist",
439
420
  "aria-orientation": "horizontal",
440
421
  className: l(
441
422
  "inline-flex grow-0 p-1 rounded-lg",
442
- ce === "dark" ? "border-[1.5px] border-neutral-800 bg-neutral-800 dark:border-black-800" : "bg-neutral-100 dark:bg-black-700",
443
- de ? "w-full" : "w-auto"
423
+ ae === "dark" ? "border-[1.5px] border-neutral-800 bg-neutral-800 dark:border-black-800" : "bg-neutral-100 dark:bg-black-700",
424
+ ie ? "w-full" : "w-auto"
444
425
  ),
445
- children: y.map((e) => {
446
- const t = i === e, o = Y?.[e], r = m.find((f) => f.name === e), s = v && r?.is_pinned;
447
- return /* @__PURE__ */ n("li", { role: "presentation", className: l("inline-flex", de ? "w-full" : "w-auto"), children: /* @__PURE__ */ n(
448
- Ve,
426
+ children: _.map((e) => {
427
+ const t = r === e, s = re?.[e], i = d.find((f) => f.name === e), o = C && i?.is_pinned;
428
+ return /* @__PURE__ */ n("li", { role: "presentation", className: l("inline-flex", ie ? "w-full" : "w-auto"), children: /* @__PURE__ */ n(
429
+ Se,
449
430
  {
450
431
  title: e,
451
- showCounts: S,
432
+ showCounts: k,
452
433
  role: "tab",
453
434
  ariaSelected: t,
454
435
  tabIndex: 0,
455
- icon: s ? /* @__PURE__ */ n(Oe, { title: "Unpin", children: /* @__PURE__ */ n("span", { onClick: () => ne(e), children: /* @__PURE__ */ n(ie, { className: "rotate-45 w-icon h-icon text-inherit dark:text-inherit" }) }) }) : o,
456
- iconsOnly: E,
436
+ icon: o ? /* @__PURE__ */ n(Ce, { title: "Unpin", children: /* @__PURE__ */ n("span", { onClick: () => ee(e), children: /* @__PURE__ */ n(se, { className: "rotate-45 w-icon h-icon text-inherit dark:text-inherit" }) }) }) : s,
437
+ iconsOnly: rt,
457
438
  classValue: l(
458
439
  "relative py-0.5 border-gray-200",
459
- bt,
460
- de ? "w-full flex items-center justify-center" : "px-2"
440
+ it,
441
+ ie ? "w-full flex items-center justify-center" : "px-2"
461
442
  ),
462
443
  selectedClassValue: l(
463
444
  "absolute inset-0 rounded-md z-0",
464
- ce === "dark" ? "bg-neutral-900" : "bg-white dark:bg-black-800"
445
+ ae === "dark" ? "bg-neutral-900" : "bg-white dark:bg-black-800"
465
446
  ),
466
447
  textClassValue: l(
467
448
  "relative text-xs font-semibold font-sans whitespace-nowrap",
468
449
  t ? "text-neutral-900 dark:text-neutral-100" : "text-neutral-700 dark:text-neutral-100"
469
450
  ),
470
451
  isSelected: t,
471
- href: W(e),
472
- onClick: ht ? void 0 : () => j(e),
473
- suffixRecord: w,
474
- selectedId: B,
475
- color: ce,
476
- disableAnimation: xt
452
+ href: F(e),
453
+ onClick: at ? void 0 : () => B(e),
454
+ suffixRecord: p,
455
+ selectedId: W,
456
+ color: ae,
457
+ disableAnimation: ct
477
458
  }
478
459
  ) }, e);
479
460
  })
@@ -481,138 +462,136 @@ const Me = (b) => {
481
462
  ) }) : /* @__PURE__ */ n(
482
463
  "div",
483
464
  {
484
- ref: we,
485
- className: l(ue ? "w-fit" : "w-full"),
486
- onMouseEnter: () => We(!0),
487
- onMouseLeave: () => We(!1),
488
- children: /* @__PURE__ */ ve(
489
- Kt,
465
+ ref: Z,
466
+ className: l(lt ? "w-fit" : "w-full"),
467
+ onMouseEnter: () => Me(!0),
468
+ onMouseLeave: () => Me(!1),
469
+ children: /* @__PURE__ */ ke(
470
+ Pt,
490
471
  {
491
- sensors: Et,
492
- onDragEnd: Ut,
493
- onDragStart: Mt,
494
- onDragCancel: Ht,
495
- collisionDetection: Zt,
496
- onDragOver: Rt,
472
+ sensors: Tt,
473
+ onDragEnd: Ot,
474
+ onDragStart: _t,
475
+ onDragCancel: Et,
476
+ collisionDetection: Ft,
477
+ onDragOver: Dt,
497
478
  children: [
498
- /* @__PURE__ */ ve(
479
+ /* @__PURE__ */ ke(
499
480
  "ul",
500
481
  {
501
482
  role: "tablist",
502
483
  "aria-orientation": "horizontal",
503
484
  className: l(
504
485
  "flex items-center w-full",
505
- Ue,
506
- D ? "gap-0" : T === "sm" ? "gap-1" : "gap-2"
486
+ ve,
487
+ G ? "gap-0" : O === "sm" ? "gap-1" : "gap-2"
507
488
  ),
508
- ref: It,
489
+ ref: yt,
509
490
  children: [
510
- pt ? /* @__PURE__ */ n("div", { className: "skeleton bg-neutral-300 dark:bg-black-700 animate-pulse h-10 min-w-[100px] w-full rounded" }) : /* @__PURE__ */ ve(
511
- en,
491
+ st ? /* @__PURE__ */ n("div", { className: "skeleton bg-neutral-300 dark:bg-black-700 animate-pulse h-10 min-w-[100px] w-full rounded" }) : /* @__PURE__ */ ke(
492
+ Bt,
512
493
  {
513
- items: d.map(({ name: e }) => e),
514
- strategy: tn,
494
+ items: a.map(({ name: e }) => e),
495
+ strategy: jt,
515
496
  id: "sortable",
516
- disabled: !I || F,
497
+ disabled: !E || R,
517
498
  children: [
518
- d.slice(0, ee).map(({ name: e, is_pinned: t }) => {
519
- const o = i === e && !O, r = v && t;
499
+ a.slice(0, K).map(({ name: e, is_pinned: t }) => {
500
+ const s = r === e && !I, i = C && t;
520
501
  return /* @__PURE__ */ n(
521
- dt,
502
+ tt,
522
503
  {
523
504
  title: e,
524
- isDragging: H === e,
525
- className: D ? "flex-1 flex justify-center" : "",
526
- children: /* @__PURE__ */ n("li", { role: "presentation", className: l(D ? "w-full flex" : "sm:mr-2"), children: /* @__PURE__ */ n(
527
- Ve,
505
+ isDragging: D === e,
506
+ className: G ? "flex-1 flex justify-center" : "",
507
+ children: /* @__PURE__ */ n("li", { role: "presentation", className: l(G ? "w-full flex" : "sm:mr-2"), children: /* @__PURE__ */ n(
508
+ Se,
528
509
  {
529
- showCounts: S,
510
+ showCounts: k,
530
511
  title: e,
531
- iconsOnly: E,
532
512
  role: "tab",
533
- ariaSelected: o,
513
+ ariaSelected: s,
534
514
  tabIndex: 0,
535
515
  classValue: l(
536
- A("classValue", o),
537
- D ? "w-full justify-center" : ""
516
+ L("classValue", s),
517
+ G ? "w-full justify-center" : ""
538
518
  ),
539
- selectedClassValue: A("selectedClassValue", o),
540
- textClassValue: A("textClassValue", o),
541
- isSelected: o,
542
- tabOptions: o && I ? /* @__PURE__ */ n(
543
- De,
519
+ selectedClassValue: L("selectedClassValue", s),
520
+ textClassValue: L("textClassValue", s),
521
+ isSelected: s,
522
+ tabOptions: s && E ? /* @__PURE__ */ n(
523
+ ye,
544
524
  {
545
525
  menu: {
546
- items: Se(e),
547
- className: le
526
+ items: he(e),
527
+ className: oe
548
528
  },
549
529
  trigger: ["click"],
550
- onOpenChange: Me,
530
+ onOpenChange: Ie,
551
531
  overlayClassName: "row-option-cell",
552
532
  rootClassName: "",
553
533
  openClassName: "max-h-[350px] overflow-y-auto",
554
534
  placement: "bottom",
555
535
  children: /* @__PURE__ */ n(
556
- cn,
536
+ qt,
557
537
  {
558
538
  tooltip: u("More"),
559
539
  variant: "ghost",
560
540
  className: "!text-primary-500 hover:!bg-primary-100 dark:hover:!bg-primary-900",
561
- children: /* @__PURE__ */ n(ct, { sx: { fontSize: 20 } })
541
+ children: /* @__PURE__ */ n(et, { sx: { fontSize: 20 } })
562
542
  }
563
543
  )
564
544
  }
565
545
  ) : null,
566
- draggingTab: H === e,
567
- href: W(e),
568
- onClick: () => j(e),
569
- suffixRecord: w,
570
- selectedId: B,
571
- icon: r ? /* @__PURE__ */ n(Oe, { title: u("Unpin"), children: /* @__PURE__ */ n("span", { onClick: () => ne(e), children: /* @__PURE__ */ n(ie, { size: 20, className: "rotate-45 text-inherit dark:text-inherit" }) }) }) : Y?.[e] ?? null
546
+ draggingTab: D === e,
547
+ href: F(e),
548
+ onClick: () => B(e),
549
+ suffixRecord: p,
550
+ selectedId: W,
551
+ icon: i ? /* @__PURE__ */ n(Ce, { title: u("Unpin"), children: /* @__PURE__ */ n("span", { onClick: () => ee(e), children: /* @__PURE__ */ n(se, { size: 20, className: "rotate-45 text-inherit dark:text-inherit" }) }) }) : re?.[e] ?? null
572
552
  }
573
553
  ) }, e)
574
554
  },
575
555
  e
576
556
  );
577
557
  }),
578
- i && Ke ? /* @__PURE__ */ n(dt, { title: i, isDragging: H === i, children: /* @__PURE__ */ n("li", { role: "presentation", className: l("sm:mr-2"), children: /* @__PURE__ */ n(
579
- Ve,
558
+ r && Fe ? /* @__PURE__ */ n(tt, { title: r, isDragging: D === r, children: /* @__PURE__ */ n("li", { role: "presentation", className: l("sm:mr-2"), children: /* @__PURE__ */ n(
559
+ Se,
580
560
  {
581
- showCounts: S,
582
- title: i,
583
- iconsOnly: E,
561
+ showCounts: k,
562
+ title: r,
584
563
  role: "tab",
585
564
  ariaSelected: !0,
586
565
  tabIndex: 0,
587
- classValue: A("classValue", !0),
588
- selectedClassValue: A("selectedClassValue", !0),
589
- textClassValue: A("textClassValue", !0),
566
+ classValue: L("classValue", !0),
567
+ selectedClassValue: L("selectedClassValue", !0),
568
+ textClassValue: L("textClassValue", !0),
590
569
  isSelected: !0,
591
- tabOptions: I ? /* @__PURE__ */ n(
592
- De,
570
+ tabOptions: E ? /* @__PURE__ */ n(
571
+ ye,
593
572
  {
594
573
  menu: {
595
- items: Se(i),
596
- className: le
574
+ items: he(r),
575
+ className: oe
597
576
  },
598
577
  trigger: ["click"],
599
- onOpenChange: Me,
578
+ onOpenChange: Ie,
600
579
  overlayClassName: "row-option-cell",
601
580
  rootClassName: "",
602
581
  openClassName: "max-h-[350px] overflow-y-auto",
603
582
  placement: "bottom",
604
- children: /* @__PURE__ */ n(ct, { sx: { fontSize: 20 }, className: "text-primary-600" })
583
+ children: /* @__PURE__ */ n(et, { sx: { fontSize: 20 }, className: "text-primary-600" })
605
584
  }
606
585
  ) : null,
607
- draggingTab: H === i,
608
- href: W(i),
609
- suffixRecord: w,
610
- selectedId: B,
611
- icon: v && m.find((e) => e.name === i)?.is_pinned ? /* @__PURE__ */ n(Oe, { title: u("Pinned"), children: /* @__PURE__ */ n("span", { onClick: () => ne(i), children: /* @__PURE__ */ n(ie, { size: 20, className: "rotate-45 text-inherit dark:text-inherit" }) }) }) : Y?.[i] ?? null
586
+ draggingTab: D === r,
587
+ href: F(r),
588
+ suffixRecord: p,
589
+ selectedId: W,
590
+ icon: C && d.find((e) => e.name === r)?.is_pinned ? /* @__PURE__ */ n(Ce, { title: u("Pinned"), children: /* @__PURE__ */ n("span", { onClick: () => ee(r), children: /* @__PURE__ */ n(se, { size: 20, className: "rotate-45 text-inherit dark:text-inherit" }) }) }) : re?.[r] ?? null
612
591
  }
613
- ) }, i) }, i) : null,
614
- (he < d.length && !G || R.length > 0) && Ze > 0 ? /* @__PURE__ */ n(yn, { id: "more-tabs", children: /* @__PURE__ */ n(
615
- De,
592
+ ) }, r) }, r) : null,
593
+ (U < a.length && !A || V.length > 0) && Be > 0 ? /* @__PURE__ */ n(ln, { id: "more-tabs", children: /* @__PURE__ */ n(
594
+ ye,
616
595
  {
617
596
  overlayStyle: {
618
597
  maxHeight: "calc(100vh - 350px)",
@@ -622,8 +601,8 @@ const Me = (b) => {
622
601
  borderRadius: 8,
623
602
  boxShadow: "0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05)"
624
603
  },
625
- onOpenChange: () => ot(),
626
- open: O,
604
+ onOpenChange: () => Ge(),
605
+ open: I,
627
606
  menu: {
628
607
  items: [
629
608
  {
@@ -631,41 +610,41 @@ const Me = (b) => {
631
610
  disabled: !0,
632
611
  style: { minWidth: "190px", marginBottom: "8px" },
633
612
  label: /* @__PURE__ */ n("div", { className: "px-2 bg-white dark:bg-black-800", children: /* @__PURE__ */ n(
634
- dn,
613
+ Qt,
635
614
  {
636
615
  id: "search-bar-more-tabs",
637
- value: fe,
616
+ value: ce,
638
617
  classValues: "!rounded-lg",
639
- onChange: (e) => yt(e)
618
+ onChange: (e) => ft(e)
640
619
  }
641
620
  ) })
642
621
  },
643
- ...d.slice(ee).filter((e) => e.name !== i).concat(R).filter(
644
- ({ name: e }) => typeof e == "string" && (e ?? "").toLowerCase().includes(fe.toLowerCase())
622
+ ...a.slice(K).filter((e) => e.name !== r).concat(V).filter(
623
+ ({ name: e }) => typeof e == "string" && (e ?? "").toLowerCase().includes(ce.toLowerCase())
645
624
  ).map(({ name: e, is_hidden: t }) => ({
646
625
  key: e,
647
626
  label: /* @__PURE__ */ n(
648
- k,
627
+ y,
649
628
  {
650
629
  className: l(
651
630
  "uppercase",
652
631
  t ? "text-neutral-400 dark:text-neutral-500" : "text-black-900 dark:text-black-200"
653
632
  ),
654
633
  text: e,
655
- suffixRecord: S ? w : {},
656
- highlight: fe,
634
+ suffixRecord: k ? p : {},
635
+ highlight: ce,
657
636
  truncateText: !0,
658
637
  isDisabled: t,
659
638
  onClick: t ? void 0 : () => {
660
- j(e), X(!1);
639
+ B(e), J(!1);
661
640
  }
662
641
  }
663
642
  ),
664
- popupClassName: le,
665
- children: O ? Se(e, t, !0) : null
643
+ popupClassName: oe,
644
+ children: I ? he(e, t, !0) : null
666
645
  }))
667
646
  ],
668
- className: le
647
+ className: oe
669
648
  },
670
649
  openClassName: "max-h-[350px] overflow-y-auto",
671
650
  trigger: ["click"],
@@ -673,16 +652,16 @@ const Me = (b) => {
673
652
  placement: "bottomRight",
674
653
  getPopupContainer: (e) => e.parentElement,
675
654
  children: /* @__PURE__ */ n(
676
- Tn,
655
+ cn,
677
656
  {
678
- title: `${S ? `${Ze} ` : ""}MORE...`,
679
- variant: b,
680
- size: T,
681
- draggingOver: Nt,
682
- suffixRecord: w,
683
- handleShowMoreDropdown: ot,
684
- selectedId: B,
685
- showMoreDropdown: O
657
+ title: `${k ? Be : ""} MORE...`,
658
+ variant: T,
659
+ size: O,
660
+ draggingOver: xt,
661
+ suffixRecord: p,
662
+ handleShowMoreDropdown: Ge,
663
+ selectedId: W,
664
+ showMoreDropdown: I
686
665
  }
687
666
  )
688
667
  }
@@ -690,40 +669,40 @@ const Me = (b) => {
690
669
  ]
691
670
  }
692
671
  ),
693
- P ? /* @__PURE__ */ n("div", { className: l(P?.className), children: /* @__PURE__ */ n("li", { children: P.component }) }) : null,
694
- I && me && y.length > 0 ? /* @__PURE__ */ n(
672
+ H ? /* @__PURE__ */ n("div", { className: l(H?.className), children: /* @__PURE__ */ n("li", { children: H.component }) }) : null,
673
+ E && pt && /* @__PURE__ */ n(
695
674
  "li",
696
675
  {
697
676
  className: l(
698
- St ? "opacity-100" : "opacity-0",
677
+ gt ? "opacity-100" : "opacity-0",
699
678
  "transition-opacity duration-300"
700
679
  ),
701
680
  children: /* @__PURE__ */ n(
702
- Nn,
681
+ dn,
703
682
  {
704
- hasSuffixRecord: !!(w && Object.keys(w).length > 0),
705
- savedConfig: je,
706
- onApplyFilter: (e) => Dt(e),
683
+ hasSuffixRecord: !!(p && Object.keys(p).length > 0),
684
+ savedConfig: He,
685
+ onApplyFilter: (e) => St(e),
707
686
  setUnsavedChanges: () => {
708
687
  },
709
- handleTabSort: At,
710
- onSearchChange: Pt
688
+ handleTabSort: Vt,
689
+ onSearchChange: Lt
711
690
  }
712
691
  )
713
692
  }
714
- ) : null
693
+ )
715
694
  ]
716
695
  }
717
696
  ),
718
- H ? /* @__PURE__ */ n(
719
- Sn,
697
+ D ? /* @__PURE__ */ n(
698
+ un,
720
699
  {
721
- draggingTab: H,
722
- suffixRecord: w,
723
- size: T,
724
- variant: b,
725
- selectedId: B,
726
- parentContainer: kt
700
+ draggingTab: D,
701
+ suffixRecord: p,
702
+ size: O,
703
+ variant: T,
704
+ selectedId: W,
705
+ parentContainer: mt
727
706
  }
728
707
  ) : null
729
708
  ]
@@ -733,6 +712,6 @@ const Me = (b) => {
733
712
  );
734
713
  };
735
714
  export {
736
- ro as Tabs
715
+ Pn as Tabs
737
716
  };
738
717
  //# sourceMappingURL=Tabs.es.js.map