prometeo-design-system 4.3.1 → 4.3.2

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