prometeo-design-system 4.3.0 → 4.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/Avatar.es.js +41 -40
  2. package/dist/CardProfile-C1F83KJV.js +280 -0
  3. package/dist/CardProfile.es.js +3 -291
  4. package/dist/CheckBox.es.js +21 -24
  5. package/dist/DialogModal.es.js +46 -52
  6. package/dist/Icons/UserAvatar.es.js +4 -4
  7. package/dist/Input.es.js +72 -73
  8. package/dist/NotificationCard.es.js +21 -28
  9. package/dist/PlainTooltip.es.js +19 -19
  10. package/dist/PyrionLayout.es.js +810 -916
  11. package/dist/Scrollable.es.js +177 -322
  12. package/dist/Select.es.js +47 -47
  13. package/dist/SelectSearch.es.js +103 -107
  14. package/dist/TabLinks.es.js +121 -2
  15. package/dist/TicketCard.es.js +2 -2
  16. package/dist/Toast.es.js +51 -95
  17. package/dist/badge-CbqYNrl4.js +87 -0
  18. package/dist/components/Avatar/Avatar.d.ts +4 -2
  19. package/dist/components/CardProfile/CardProfile.d.ts +4 -7
  20. package/dist/components/DropZone/useFileDropzone.d.ts +1 -9
  21. package/dist/components/Layout/LayoutGeneric.d.ts +6 -0
  22. package/dist/components/NotificationCard/NotificationCard.d.ts +2 -3
  23. package/dist/components/PyrionNavigationDrawer/PLNotificationsList.d.ts +2 -5
  24. package/dist/components/PyrionNavigationDrawer/PLSidebar.d.ts +1 -3
  25. package/dist/components/PyrionNavigationDrawer/PLSidebarContent.d.ts +0 -2
  26. package/dist/components/PyrionNavigationDrawer/PLayoutBase.d.ts +0 -2
  27. package/dist/components/PyrionNavigationDrawer/PyrionLayout.d.ts +1 -4
  28. package/dist/components/Scrollable/Scrollable.d.ts +0 -29
  29. package/dist/components/Sidebar/SecondaryBar/SecondaryBar.d.ts +32 -0
  30. package/dist/components/Sidebar/SecondaryBar/hooks/useSecondaryBarAnimation.d.ts +2 -0
  31. package/dist/components/Sidebar/SecondaryBar/index.d.ts +1 -0
  32. package/dist/components/Sidebar/SidebarComposable.d.ts +43 -0
  33. package/dist/components/Sidebar/components/NavigationLink.d.ts +11 -0
  34. package/dist/components/Sidebar/components/company-logo.d.ts +5 -0
  35. package/dist/components/Sidebar/components/nav-actions.d.ts +7 -0
  36. package/dist/components/Sidebar/components/nav-links.d.ts +7 -0
  37. package/dist/components/Sidebar/context/SidebarContext.d.ts +13 -0
  38. package/dist/components/Sidebar/hooks/SidebarProvider.d.ts +3 -0
  39. package/dist/components/Sidebar/hooks/useNavBarActions.d.ts +9 -0
  40. package/dist/components/Sidebar/hooks/useNavBarCollapse.d.ts +4 -0
  41. package/dist/components/Sidebar/hooks/useNavLinks.d.ts +32 -0
  42. package/dist/components/Sidebar/hooks/useSidebarHook.d.ts +13 -0
  43. package/dist/components/Sidebar/index.d.ts +12 -0
  44. package/dist/components/Sidebar/ui/useNavbarAnimation.d.ts +2 -0
  45. package/dist/components/TabLinks/TabLinks.d.ts +0 -19
  46. package/dist/components/Toaster/Toaster.d.ts +1 -13
  47. package/dist/components/UserCard/UserCard.d.ts +2 -3
  48. package/dist/hooks/useLabelBackground.d.ts +0 -1
  49. package/dist/index.d.ts +16 -0
  50. package/dist/prometeo-design-system.es.js +2906 -119
  51. package/dist/styles.css +1 -1
  52. package/dist/useLabelBackground-BDIHUdND.js +26 -0
  53. package/package.json +2 -2
  54. package/dist/TabLinks-DxqprStp.js +0 -147
  55. package/dist/UserCard.d.ts +0 -6
  56. package/dist/UserCard.es.js +0 -28
  57. package/dist/badge-BEx-0Q-K.js +0 -35
  58. package/dist/exports/UserCard.d.ts +0 -2
  59. package/dist/useLabelBackground-D5SzHhl_.js +0 -32
@@ -1,117 +1,117 @@
1
1
  import { j as Y } from "./jsx-runtime-GkKLlHH4.js";
2
2
  import { g as i } from "./utils-X4-h3cum.js";
3
- import { useState as A, useRef as E, useEffect as b, useMemo as ee, useCallback as ne } from "react";
3
+ import { useState as A, useRef as E, useEffect as b, useMemo as ee, useCallback as te } from "react";
4
4
  import Z from "./Select.es.js";
5
5
  function re(e) {
6
6
  const {
7
- options: C,
7
+ options: p,
8
8
  fetcher: d,
9
9
  asyncMode: _ = "fetch_in_open",
10
10
  disabled: w = !1,
11
11
  debounceDelay: P = 500,
12
12
  minCharacters: T = 3,
13
13
  optionLabel: h,
14
- optionValue: c,
14
+ optionValue: s,
15
15
  controlledValue: f,
16
16
  isOpen: F,
17
- inputRef: p,
17
+ inputRef: y,
18
18
  name: I
19
- } = e || {}, M = C ? C.filter((n) => n != null) : [], [V, g] = A(M || []), [D, k] = A(M || []), [s, N] = A(""), [W, v] = A(!1), [J, U] = A(!1), o = E(null), O = E(null), m = E(!1), S = E(d), L = e?.multiple === !0 || !1, j = E(L ? [] : void 0), [a, y] = A(L ? [] : void 0);
19
+ } = e || {}, M = p ? p.filter((t) => t != null) : [], [V, g] = A(M || []), [D, k] = A(M || []), [c, N] = A(""), [W, C] = A(!1), [J, U] = A(!1), l = E(null), O = E(null), m = E(!1), L = E(d), S = e?.multiple === !0 || !1, j = E(S ? [] : void 0), [a, v] = A(S ? [] : void 0);
20
20
  b(() => {
21
- S.current = d;
21
+ L.current = d;
22
22
  }, [d]), b(() => {
23
- if (L) {
24
- const n = z(f, "value");
25
- y(n);
23
+ if (S) {
24
+ const t = z(f, "value");
25
+ v(t);
26
26
  } else
27
- f != null ? y(f) : y(void 0);
27
+ f != null ? v(f) : v(void 0);
28
28
  }, [f]), b(() => {
29
29
  j.current = f !== void 0 ? f : a;
30
30
  }, [f, a]), b(() => {
31
31
  if (e?.options) {
32
- const n = e.options.filter((t) => t != null);
33
- g(n), k(n);
32
+ const t = e.options.filter((n) => n != null);
33
+ g(t), k(t);
34
34
  }
35
35
  }, [e?.options]);
36
- const B = ee(() => (n, t) => new Promise((l, r) => {
37
- o.current && clearTimeout(o.current), o.current = setTimeout(() => n(s).then(l).catch(r), t);
38
- }), [s]), te = (n) => {
39
- const t = f !== void 0, l = (r) => c ? i(r, c) : i(r, "id");
36
+ const B = ee(() => (t, n) => new Promise((o, r) => {
37
+ l.current && clearTimeout(l.current), l.current = setTimeout(() => t(c).then(o).catch(r), n);
38
+ }), [c]), ne = (t) => {
39
+ const n = f !== void 0, o = (r) => s ? i(r, s) : i(r, "id");
40
40
  if (e?.multiple === !0) {
41
41
  const r = j.current || [];
42
42
  let u;
43
- r.some((x) => l(x) === l(n)) ? u = r.filter((x) => l(x) !== l(n)) : u = [...r, n], t ? (j.current = u, e?.onChange?.(u, I)) : (j.current = u, y(u), e?.onChange?.(u, I));
43
+ r.some((x) => o(x) === o(t)) ? u = r.filter((x) => o(x) !== o(t)) : u = [...r, t], n ? (j.current = u, e?.onChange?.(u, I)) : (j.current = u, v(u), e?.onChange?.(u, I));
44
44
  } else
45
- t ? (j.current = n, e?.onChange?.(n, I)) : (j.current = n, y(n), e?.onChange?.(n, I));
46
- }, q = (n) => (e?.onFetchingStart?.(), S.current?.(n) || Promise.resolve([])), z = (n, t) => Array.isArray(n) ? (n.some((l) => typeof l != "object" || l === null) && console.debug(`El valor del ${t || "resultado del fetcher"} contiene elementos no válidos (null,undefined, no-object)`, n), n?.filter((l) => l != null) || []) : (console.debug(`El valor del ${t || "resultado del fetcher"} no es un Array (tipo de dato obtenido: ${typeof n})`), []), $ = ne((n, t) => n.length === 0 ? t : c ? t.filter((l) => !n.some((r) => i(r, c) === i(l, c))) : t.filter((l) => !n.some((r) => i(r, "id") === i(l, "id"))), [c]);
45
+ n ? (j.current = t, e?.onChange?.(t, I)) : (j.current = t, v(t), e?.onChange?.(t, I));
46
+ }, q = (t) => (e?.onFetchingStart?.(), L.current?.(t) || Promise.resolve([])), z = (t, n) => Array.isArray(t) ? (t.some((o) => typeof o != "object" || o === null) && console.debug(`El valor del ${n || "resultado del fetcher"} contiene elementos no válidos (null,undefined, no-object)`, t), t?.filter((o) => o != null) || []) : (console.debug(`El valor del ${n || "resultado del fetcher"} no es un Array (tipo de dato obtenido: ${typeof t})`), []), $ = te((t, n) => t.length === 0 ? n : s ? n.filter((o) => !t.some((r) => i(r, s) === i(o, s))) : n.filter((o) => !t.some((r) => i(r, "id") === i(o, "id"))), [s]);
47
47
  b(() => {
48
- const n = e?.subscribeOpenChange;
49
- if (!n) return;
50
- const t = n((l) => {
51
- U(l);
48
+ const t = e?.subscribeOpenChange;
49
+ if (!t) return;
50
+ const n = t((o) => {
51
+ U(o);
52
52
  });
53
53
  return () => {
54
- t && t();
54
+ n && n();
55
55
  };
56
56
  }, [e?.subscribeOpenChange]);
57
57
  const G = F !== void 0 ? F : J;
58
58
  b(() => {
59
- if (!w && S.current && _ === "fetch_on_type") {
60
- if (!s || s === "" || s.length < T) {
61
- o.current && clearTimeout(o.current), v(!1);
59
+ if (!w && L.current && _ === "fetch_on_type") {
60
+ if (!c || c === "" || c.length < T) {
61
+ l.current && clearTimeout(l.current), C(!1);
62
62
  return;
63
63
  }
64
- const n = B(q, P);
65
- v(!0), n.then((t) => {
66
- const l = z(t);
67
- g(l);
64
+ const t = B(q, P);
65
+ C(!0), t.then((n) => {
66
+ const o = z(n);
67
+ g(o);
68
68
  }).finally(() => {
69
- v(!1), e?.onFetchingEnd?.();
69
+ C(!1), e?.onFetchingEnd?.();
70
70
  });
71
71
  }
72
- }, [_, s, w, P, B, T]), b(() => {
72
+ }, [_, c, w, P, B, T]), b(() => {
73
73
  if (!w)
74
74
  if (G) {
75
75
  if (e?.onOpen?.(), _ === "fetch_in_open") {
76
- if (!S.current)
76
+ if (!L.current)
77
77
  return;
78
- v(!0), q().then((n) => {
79
- const t = z(n);
78
+ C(!0), q().then((t) => {
79
+ const n = z(t);
80
80
  g(() => {
81
- const l = t.filter((r) => {
82
- if (c)
83
- return i(r, c) !== void 0;
81
+ const o = n.filter((r) => {
82
+ if (s)
83
+ return i(r, s) !== void 0;
84
84
  });
85
- return L && a.length > 0 ? [...$(a, l), ...a] : l;
85
+ return S && a.length > 0 ? [...$(a, o), ...a] : o;
86
86
  });
87
87
  }).finally(() => {
88
- v(!1), e?.onFetchingEnd?.();
88
+ C(!1), e?.onFetchingEnd?.();
89
89
  });
90
90
  }
91
91
  } else
92
92
  e?.onClose?.();
93
93
  }, [G, _, w]);
94
- const H = (n, t) => n?.filter((l) => {
94
+ const H = (t, n) => t?.filter((o) => {
95
95
  if (h)
96
- return i(l, h)?.toLowerCase().includes(t.toLowerCase());
96
+ return i(o, h)?.toLowerCase().includes(n.toLowerCase());
97
97
  {
98
- const r = l;
98
+ const r = o;
99
99
  switch (typeof r) {
100
100
  case "string":
101
- return r?.toLowerCase().includes(t.toLowerCase());
101
+ return r?.toLowerCase().includes(n.toLowerCase());
102
102
  case "number":
103
- return r.toString().includes(t);
103
+ return r.toString().includes(n);
104
104
  case "object":
105
- return Object.values(r).some((R) => R.toString()?.toLowerCase().includes(t.toLowerCase()));
105
+ return Object.values(r).some((R) => R.toString()?.toLowerCase().includes(n.toLowerCase()));
106
106
  default:
107
107
  return !1;
108
108
  }
109
109
  }
110
- }) || [], le = (n) => n?.sort((t, l) => {
110
+ }) || [], oe = (t) => t?.sort((n, o) => {
111
111
  if (h)
112
- return i(t, h) < i(l, h) ? -1 : 1;
112
+ return i(n, h) < i(o, h) ? -1 : 1;
113
113
  {
114
- const u = ["label", "name", "value"].find((K) => typeof t == "object" && Object.keys(t).includes(K)), R = t, x = l;
114
+ const u = ["label", "name", "value"].find((K) => typeof n == "object" && Object.keys(n).includes(K)), R = n, x = o;
115
115
  switch (typeof R) {
116
116
  case "string":
117
117
  return R < x ? -1 : 1;
@@ -119,29 +119,29 @@ function re(e) {
119
119
  return R < x ? -1 : 1;
120
120
  case "object":
121
121
  if (u) {
122
- const K = i(t, u), oe = i(l, u);
123
- return K < oe ? -1 : 1;
122
+ const K = i(n, u), le = i(o, u);
123
+ return K < le ? -1 : 1;
124
124
  } else
125
125
  return 1;
126
126
  default:
127
127
  return 1;
128
128
  }
129
129
  }
130
- }) || [], Q = (n) => {
131
- const t = typeof p == "function" ? p() : p;
132
- n.target === t?.current && (O.current && clearTimeout(O.current), m.current || (m.current = !0, e?.onTypeStart?.()), O.current = setTimeout(() => {
130
+ }) || [], Q = (t) => {
131
+ const n = typeof y == "function" ? y() : y;
132
+ t.target === n?.current && (O.current && clearTimeout(O.current), m.current || (m.current = !0, e?.onTypeStart?.()), O.current = setTimeout(() => {
133
133
  m.current = !1;
134
134
  }, P));
135
135
  };
136
136
  b(() => {
137
- if (s === "")
138
- k(le(V));
139
- else if (L) {
140
- const n = $(a, V);
141
- k([...H(n, s), ...a]);
137
+ if (c === "")
138
+ k(oe(V));
139
+ else if (S) {
140
+ const t = $(a, V);
141
+ k([...H(t, c), ...a]);
142
142
  } else {
143
- const n = $([a], V);
144
- k([...H(n, s), a]);
143
+ const t = $([a], V);
144
+ k([...H(t, c), a]);
145
145
  }
146
146
  }, [V]), b(() => (document.addEventListener("keydown", Q), () => {
147
147
  document.removeEventListener("keydown", Q);
@@ -150,80 +150,80 @@ function re(e) {
150
150
  N("");
151
151
  };
152
152
  return {
153
- inputValue: s,
153
+ inputValue: c,
154
154
  setInputValue: N,
155
155
  cleanInputValue: X,
156
156
  cleanOptions: () => {
157
- if (L)
157
+ if (S)
158
158
  g(a);
159
159
  else {
160
- const n = a;
161
- g(n ? [n] : []);
160
+ const t = a;
161
+ g(t ? [t] : []);
162
162
  }
163
163
  X();
164
164
  },
165
165
  clearValue: () => {
166
- y(L ? [] : void 0);
166
+ v(S ? [] : void 0);
167
167
  },
168
168
  filteredOptions: D,
169
169
  isLoading: W,
170
170
  value: a,
171
- setValue: y,
172
- onOptionClick: te
171
+ setValue: v,
172
+ onOptionClick: ne
173
173
  };
174
174
  }
175
175
  const he = (e) => {
176
- const C = E(null), { asyncMode: d = "fetch_in_open" } = e, _ = (o, O, m) => {
177
- const S = {
178
- options: o.options,
179
- fetcher: o.fetcher,
176
+ const p = E(null), { asyncMode: d = "fetch_in_open" } = e, _ = (l, O, m) => {
177
+ const L = {
178
+ options: l.options,
179
+ fetcher: l.fetcher,
180
180
  asyncMode: O,
181
- debounceDelay: o.debounceDelay,
182
- minCharacters: o.minCharacters,
183
- disabled: o.disabled,
184
- optionValue: o.optionValue,
185
- optionLabel: o.optionLabel,
181
+ debounceDelay: l.debounceDelay,
182
+ minCharacters: l.minCharacters,
183
+ disabled: l.disabled,
184
+ optionValue: l.optionValue,
185
+ optionLabel: l.optionLabel,
186
186
  onFetchingStart: () => {
187
187
  O === "fetch_on_type" && m.current?.open();
188
188
  },
189
189
  onTypeStart: () => {
190
- !o?.fetcher && m.current?.open();
190
+ !l?.fetcher && m.current?.open();
191
191
  },
192
192
  inputRef: () => m.current?.searchInputRef,
193
193
  subscribeOpenChange: m.current?.subscribeOpenChange,
194
- name: o.name
194
+ name: l.name
195
195
  };
196
- return o.multiple ? {
197
- ...S,
196
+ return l.multiple ? {
197
+ ...L,
198
198
  multiple: !0,
199
- controlledValue: o.value,
200
- onChange: o.onChange
199
+ controlledValue: l.value,
200
+ onChange: l.onChange
201
201
  } : {
202
- ...S,
202
+ ...L,
203
203
  multiple: !1,
204
- controlledValue: o.value,
205
- onChange: o.onChange
204
+ controlledValue: l.value,
205
+ onChange: l.onChange
206
206
  };
207
- }, { inputValue: w, setInputValue: P, filteredOptions: T, isLoading: h, value: c, onOptionClick: f, cleanInputValue: F, cleanOptions: p, clearValue: I } = re(_(e, d, C));
207
+ }, { inputValue: w, setInputValue: P, filteredOptions: T, isLoading: h, value: s, onOptionClick: f, cleanInputValue: F, cleanOptions: y, clearValue: I } = re(_(e, d, p));
208
208
  b(() => {
209
- !e.controls || !C.current || (e.controls.current = {
210
- ...C.current,
209
+ !e.controls || !p.current || (e.controls.current = {
210
+ ...p.current,
211
211
  cleanOptions: () => {
212
- p();
212
+ y();
213
213
  }
214
214
  });
215
- }, [e.controls, p]);
216
- const M = ne(
215
+ }, [e.controls, y]);
216
+ const M = te(
217
217
  () => d === "fetch_on_type" ? h : !1,
218
218
  [d, h]
219
- ), V = ee(() => e.multiple ? c.map((o) => i(o, e.optionValue)) : c ? i(c, e.optionValue) : void 0, [c, e.optionValue, e.multiple]), g = (o) => {
220
- const O = T.find((m) => i(m, e.optionValue) === o.id);
219
+ ), V = ee(() => e.multiple ? s.map((l) => i(l, e.optionValue)) : s ? i(s, e.optionValue) : void 0, [s, e.optionValue, e.multiple]), g = (l) => {
220
+ const O = T.find((m) => i(m, e.optionValue) === l.id);
221
221
  O && f(O);
222
- }, { displayMode: D = e.multiple ? "chips" : "compact", dropdownOptions: k, overflow: s = "scroll", onChange: N, onClear: W, ...v } = e.selectComponentProps || {}, J = {
222
+ }, { displayMode: D = e.multiple ? "chips" : "compact", dropdownOptions: k, overflow: c = "scroll", onChange: N, onClear: W, ...C } = e.selectComponentProps || {}, J = {
223
223
  controledSearchValue: w,
224
224
  onSearchValueChange: d === "fetch_on_type" ? P : void 0,
225
225
  onSearchClear: d === "fetch_on_type" ? () => {
226
- F(), p();
226
+ F(), y();
227
227
  } : void 0,
228
228
  inputSearchPlaceholder: e.inputSearchPlaceholder,
229
229
  isLoading: M(),
@@ -238,9 +238,8 @@ const he = (e) => {
238
238
  disabled: e.disabled,
239
239
  className: e.className,
240
240
  name: e.name,
241
- overflow: s,
242
- placeholder: e.placeholder,
243
- ...v,
241
+ overflow: c,
242
+ ...C,
244
243
  onClear: e?.selectComponentProps?.onClear && U,
245
244
  multiple: !0,
246
245
  value: V,
@@ -249,10 +248,9 @@ const he = (e) => {
249
248
  optionValue: e.optionValue,
250
249
  optionLabel: e.optionLabel,
251
250
  renderOption: e.renderOption,
252
- renderSelection: e.renderSelection,
253
251
  onOptionClick: g,
254
252
  displayMode: D,
255
- controls: C,
253
+ controls: p,
256
254
  emptyMessage: "Use el buscador para obtener las opciones disponibles",
257
255
  dropdownOptions: J,
258
256
  isLoading: d === "fetch_in_open" ? h : !1
@@ -261,11 +259,10 @@ const he = (e) => {
261
259
  Z,
262
260
  {
263
261
  disabled: e.disabled,
264
- ...v,
265
- placeholder: e.placeholder,
262
+ ...C,
266
263
  onClear: U,
267
264
  className: e.className,
268
- overflow: s,
265
+ overflow: c,
269
266
  name: e.name,
270
267
  multiple: !1,
271
268
  value: V,
@@ -274,10 +271,9 @@ const he = (e) => {
274
271
  optionValue: e.optionValue,
275
272
  optionLabel: e.optionLabel,
276
273
  renderOption: e.renderOption,
277
- renderSelection: e.renderSelection,
278
274
  onOptionClick: g,
279
275
  displayMode: "compact",
280
- controls: C,
276
+ controls: p,
281
277
  emptyMessage: "Use el buscador para obtener las opciones disponibles",
282
278
  dropdownOptions: J,
283
279
  isLoading: d === "fetch_in_open" ? h : !1
@@ -1,4 +1,123 @@
1
- import { T as f } from "./TabLinks-DxqprStp.js";
1
+ import { j as i } from "./jsx-runtime-GkKLlHH4.js";
2
+ import { motion as C } from "framer-motion";
3
+ import { memo as N, isValidElement as I } from "react";
4
+ import { c as s } from "./cn-B6yFEsav.js";
5
+ import z from "./PlainTooltip.es.js";
6
+ const E = /* @__PURE__ */ Symbol.for("react.memo"), $ = (t, a, r) => {
7
+ if (!t)
8
+ return null;
9
+ if (typeof t == "function") {
10
+ const l = t;
11
+ return /* @__PURE__ */ i.jsx(l, { size: r, className: a });
12
+ }
13
+ if (typeof t == "object") {
14
+ if (I(t))
15
+ return t;
16
+ if ("$$typeof" in t && t.$$typeof === E) {
17
+ const l = t;
18
+ return /* @__PURE__ */ i.jsx(l, { size: r, className: a });
19
+ }
20
+ }
21
+ return t;
22
+ };
23
+ function p({
24
+ items: t,
25
+ activeTab: a,
26
+ onTabChange: r,
27
+ className: l,
28
+ tabClassName: o,
29
+ activeTabClassName: h,
30
+ indicatorClassName: g,
31
+ animated: y = !0,
32
+ renderTab: d
33
+ }) {
34
+ const j = (e) => {
35
+ e.disabled || r?.(e.id, e);
36
+ };
37
+ return /* @__PURE__ */ i.jsx(
38
+ "div",
39
+ {
40
+ className: s(
41
+ "flex flex-row justify-around items-end relative border-b border-neutral-strong-default w-full md:justify-start md:px-10 md:gap-5",
42
+ l
43
+ ),
44
+ role: "tablist",
45
+ children: t?.map((e) => {
46
+ const n = a === e.id, u = () => j(e), { iconPosition: f = "top", iconSize: T = 24 } = e, v = (c, m, b, k, x) => b ? /* @__PURE__ */ i.jsx(z, { title: b, ...k, children: /* @__PURE__ */ i.jsx("div", { onMouseEnter: m, onClick: x, children: c }) }) : /* @__PURE__ */ i.jsx("div", { onMouseEnter: m, onClick: x, children: c });
47
+ return d ? /* @__PURE__ */ i.jsx("div", { children: d(e, n, u, e.onIconClick, e.onIconHover, e.iconTooltipTitle, e.iconTooltipProps, e.iconSize) }, e.id) : /* @__PURE__ */ i.jsxs(
48
+ "button",
49
+ {
50
+ onClick: u,
51
+ disabled: e.disabled,
52
+ className: s(
53
+ "group/tablink-item",
54
+ "relative flex flex-col pb-3 justify-center items-center h-max px-4 font-medium focus:outline-none transition-colors",
55
+ !e.disabled && "hover:text-primary-default-default cursor-pointer",
56
+ e.disabled && "opacity-50 cursor-default",
57
+ o,
58
+ n && h
59
+ ),
60
+ tabIndex: e.disabled ? -1 : 0,
61
+ "aria-label": e.title,
62
+ role: "tab",
63
+ "aria-selected": n,
64
+ children: [
65
+ /* @__PURE__ */ i.jsxs("div", { className: s(
66
+ "flex items-center gap-0.5",
67
+ f === "left" && "flex-row-reverse",
68
+ f === "top" ? "flex-col-reverse" : "gap-1"
69
+ ), children: [
70
+ /* @__PURE__ */ i.jsx(
71
+ "label",
72
+ {
73
+ className: s(
74
+ "transition-all duration-300 ease-in-out relative z-10 group-hover/tablink-item:text-neutral-medium-hover ",
75
+ n ? "text-primary-default-default prometeo-fonts-title-medium group-hover/tablink-item:text-primary-default-default" : "text-neutral-medium-default prometeo-fonts-body-large cursor-pointer",
76
+ "leading-6! line-clamp-1"
77
+ ),
78
+ children: e.title
79
+ }
80
+ ),
81
+ v($(e.icon, s(
82
+ "transition-all duration-300 ease-in-out group-hover/tablink-item:text-neutral-medium-hover ",
83
+ n ? "text-primary-default-default prometeo-fonts-title-medium group-hover/tablink-item:text-primary-default-default" : "text-neutral-medium-default prometeo-fonts-body-large"
84
+ ), T), e.onIconHover, e.iconTooltipTitle, e.iconTooltipProps, e.onIconClick)
85
+ ] }),
86
+ n && y && /* @__PURE__ */ i.jsx(
87
+ C.div,
88
+ {
89
+ layoutId: "tab-indicator",
90
+ className: s(
91
+ "absolute -bottom-px left-0 right-0 h-[5px] rounded-t-xl bg-primary-default-default z-0",
92
+ g
93
+ ),
94
+ transition: {
95
+ type: "spring",
96
+ stiffness: 250,
97
+ damping: 17
98
+ },
99
+ "aria-hidden": "true"
100
+ }
101
+ )
102
+ ]
103
+ },
104
+ e.id
105
+ );
106
+ })
107
+ }
108
+ );
109
+ }
110
+ p.displayName = "TabLinks";
111
+ const H = N(p, (t, a) => {
112
+ if (t.activeTab !== a.activeTab || t.className !== a.className || t.tabClassName !== a.tabClassName || t.activeTabClassName !== a.activeTabClassName || t.indicatorClassName !== a.indicatorClassName || t.animated !== a.animated || t.onTabChange !== a.onTabChange || t.renderTab !== a.renderTab || t.items.length !== a.items.length)
113
+ return !1;
114
+ for (let r = 0; r < t.items.length; r++) {
115
+ const l = t.items[r], o = a.items[r];
116
+ if (l.id !== o.id || l.title !== o.title || l.disabled !== o.disabled || l.description !== o.description)
117
+ return !1;
118
+ }
119
+ return !0;
120
+ });
2
121
  export {
3
- f as default
122
+ H as default
4
123
  };
@@ -1,5 +1,5 @@
1
1
  import { j as l } from "./jsx-runtime-GkKLlHH4.js";
2
- import { g as L } from "./useLabelBackground-D5SzHhl_.js";
2
+ import { g as L } from "./useLabelBackground-BDIHUdND.js";
3
3
  import { c as d } from "./cn-B6yFEsav.js";
4
4
  import { memo as O, useState as y, useCallback as x, useImperativeHandle as S, Children as A, isValidElement as B, cloneElement as k, useRef as w, useLayoutEffect as N, useEffect as z } from "react";
5
5
  import { CrevronLeft as I } from "./Icons/CrevronLeft.es.js";
@@ -79,7 +79,7 @@ const C = (n, t) => typeof n == "function" ? t ? n(t) : null : n, q = (n) => {
79
79
  type: "button",
80
80
  onClick: t,
81
81
  className: d(
82
- "ticketcard-toggle-button text-neutral-default-default",
82
+ "ticketcard-toggle-button",
83
83
  "grid place-items-center cursor-pointer transition-transform rounded-lg w-8 max-w-8 min-w-8",
84
84
  "bg-neutral-default-default ",
85
85
  "transition-all duration-300 ease-in-out",