@lax-wp/design-system 0.14.40 → 0.14.41

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