prometeo-design-system 4.0.0 → 4.1.0

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 (45) hide show
  1. package/dist/{CardProfile-y9Knsg26.js → CardProfile-C1F83KJV.js} +1 -1
  2. package/dist/CardProfile.es.js +1 -1
  3. package/dist/{DatePicker-6eb-0Ns5.js → DatePicker-QuBgR5DQ.js} +799 -794
  4. package/dist/DatePicker.es.js +1 -1
  5. package/dist/DialogModal.es.js +25 -22
  6. package/dist/PlainTooltip.d.ts +6 -0
  7. package/dist/PlainTooltip.es.js +72 -0
  8. package/dist/PyrionLayout.es.js +789 -740
  9. package/dist/RecurrentDatePicker.es.js +1 -1
  10. package/dist/RecurrentDatePickerRRule.es.js +1 -1
  11. package/dist/Scrollable.es.js +1 -1
  12. package/dist/Select.es.js +524 -524
  13. package/dist/SelectSearch.es.js +44 -43
  14. package/dist/TabLinks.es.js +81 -52
  15. package/dist/{badge-B1IK_-i5.js → badge-CbqYNrl4.js} +28 -28
  16. package/dist/components/DatePicker/DatePicker.d.ts +1 -0
  17. package/dist/components/NavigationDrawer/NavigationDrawer.d.ts +2 -1
  18. package/dist/components/NavigationDrawer/NavigationDrawerActionItem.d.ts +4 -3
  19. package/dist/components/NavigationDrawer/NavigationDrawerActions.d.ts +3 -4
  20. package/dist/components/NavigationDrawer/NavigationDrawerItemBase.d.ts +1 -0
  21. package/dist/components/NavigationDrawer/NavigationDrawerLinkItem.d.ts +3 -2
  22. package/dist/components/NavigationDrawer/NavigationDrawerNavlinks.d.ts +2 -2
  23. package/dist/components/PlainTooltip/PlainTooltip.d.ts +11 -0
  24. package/dist/components/PyrionNavigationDrawer/PLContent.d.ts +4 -4
  25. package/dist/components/PyrionNavigationDrawer/PLFooter.d.ts +3 -2
  26. package/dist/components/PyrionNavigationDrawer/PLSidebarContent.d.ts +2 -2
  27. package/dist/components/PyrionNavigationDrawer/PLayoutBase.d.ts +7 -6
  28. package/dist/components/PyrionNavigationDrawer/PyrionLayout.d.ts +15 -12
  29. package/dist/components/PyrionNavigationDrawer/index.d.ts +2 -2
  30. package/dist/components/Select/Select.d.ts +1 -0
  31. package/dist/components/TabLinks/TabLinks.d.ts +10 -1
  32. package/dist/components/TabSwitch/TabSwitch.d.ts +2 -0
  33. package/dist/exports/PlainTooltip.d.ts +2 -0
  34. package/dist/hooks/useDevice.d.ts +1 -0
  35. package/dist/index.d.ts +0 -1
  36. package/dist/prometeo-design-system.es.js +50 -52
  37. package/dist/styles.css +1 -1
  38. package/dist/useDevice-vwn4GLwK.js +16 -0
  39. package/dist/useDevice.es.js +2 -11
  40. package/package.json +6 -6
  41. package/src/styles/base.css +1 -0
  42. package/dist/SwipeContainer.d.ts +0 -4
  43. package/dist/SwipeContainer.es.js +0 -185
  44. package/dist/components/SwipeContainer/SwipeContainer.d.ts +0 -19
  45. package/dist/exports/SwipeContainer.d.ts +0 -1
@@ -4,10 +4,10 @@ import { useState as A, useRef as E, useEffect as b, useMemo as ee, useCallback
4
4
  import Z from "./Select.es.js";
5
5
  function re(e) {
6
6
  const {
7
- options: O,
7
+ options: p,
8
8
  fetcher: d,
9
- asyncMode: w = "fetch_in_open",
10
- disabled: S = !1,
9
+ asyncMode: _ = "fetch_in_open",
10
+ disabled: w = !1,
11
11
  debounceDelay: P = 500,
12
12
  minCharacters: T = 3,
13
13
  optionLabel: h,
@@ -15,12 +15,12 @@ function re(e) {
15
15
  controlledValue: f,
16
16
  isOpen: F,
17
17
  inputRef: y,
18
- name: k
19
- } = e || {}, M = O ? O.filter((t) => t != null) : [], [V, g] = A(M || []), [D, I] = A(M || []), [c, N] = A(""), [W, p] = A(!1), [J, U] = A(!1), l = E(null), C = E(null), m = E(!1), L = E(d), _ = e?.multiple === !0 || !1, j = E(_ ? [] : void 0), [a, v] = A(_ ? [] : void 0);
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);
20
20
  b(() => {
21
21
  L.current = d;
22
22
  }, [d]), b(() => {
23
- if (_) {
23
+ if (S) {
24
24
  const t = z(f, "value");
25
25
  v(t);
26
26
  } else
@@ -30,7 +30,7 @@ function re(e) {
30
30
  }, [f, a]), b(() => {
31
31
  if (e?.options) {
32
32
  const t = e.options.filter((n) => n != null);
33
- g(t), I(t);
33
+ g(t), k(t);
34
34
  }
35
35
  }, [e?.options]);
36
36
  const B = ee(() => (t, n) => new Promise((o, r) => {
@@ -40,9 +40,9 @@ function re(e) {
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, k)) : (j.current = u, v(u), e?.onChange?.(u, k));
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
- n ? (j.current = t, e?.onChange?.(t, k)) : (j.current = t, v(t), e?.onChange?.(t, k));
45
+ n ? (j.current = t, e?.onChange?.(t, I)) : (j.current = t, v(t), e?.onChange?.(t, I));
46
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
48
  const t = e?.subscribeOpenChange;
@@ -56,41 +56,41 @@ function re(e) {
56
56
  }, [e?.subscribeOpenChange]);
57
57
  const G = F !== void 0 ? F : J;
58
58
  b(() => {
59
- if (!S && L.current && w === "fetch_on_type") {
59
+ if (!w && L.current && _ === "fetch_on_type") {
60
60
  if (!c || c === "" || c.length < T) {
61
- l.current && clearTimeout(l.current), p(!1);
61
+ l.current && clearTimeout(l.current), C(!1);
62
62
  return;
63
63
  }
64
64
  const t = B(q, P);
65
- p(!0), t.then((n) => {
65
+ C(!0), t.then((n) => {
66
66
  const o = z(n);
67
67
  g(o);
68
68
  }).finally(() => {
69
- p(!1), e?.onFetchingEnd?.();
69
+ C(!1), e?.onFetchingEnd?.();
70
70
  });
71
71
  }
72
- }, [w, c, S, P, B, T]), b(() => {
73
- if (!S)
72
+ }, [_, c, w, P, B, T]), b(() => {
73
+ if (!w)
74
74
  if (G) {
75
- if (e?.onOpen?.(), w === "fetch_in_open") {
75
+ if (e?.onOpen?.(), _ === "fetch_in_open") {
76
76
  if (!L.current)
77
77
  return;
78
- p(!0), q().then((t) => {
78
+ C(!0), q().then((t) => {
79
79
  const n = z(t);
80
80
  g(() => {
81
81
  const o = n.filter((r) => {
82
82
  if (s)
83
83
  return i(r, s) !== void 0;
84
84
  });
85
- return _ && a.length > 0 ? [...$(a, o), ...a] : o;
85
+ return S && a.length > 0 ? [...$(a, o), ...a] : o;
86
86
  });
87
87
  }).finally(() => {
88
- p(!1), e?.onFetchingEnd?.();
88
+ C(!1), e?.onFetchingEnd?.();
89
89
  });
90
90
  }
91
91
  } else
92
92
  e?.onClose?.();
93
- }, [G, w, S]);
93
+ }, [G, _, w]);
94
94
  const H = (t, n) => t?.filter((o) => {
95
95
  if (h)
96
96
  return i(o, h)?.toLowerCase().includes(n.toLowerCase());
@@ -129,19 +129,19 @@ function re(e) {
129
129
  }
130
130
  }) || [], Q = (t) => {
131
131
  const n = typeof y == "function" ? y() : y;
132
- t.target === n?.current && (C.current && clearTimeout(C.current), m.current || (m.current = !0, e?.onTypeStart?.()), C.current = setTimeout(() => {
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
137
  if (c === "")
138
- I(oe(V));
139
- else if (_) {
138
+ k(oe(V));
139
+ else if (S) {
140
140
  const t = $(a, V);
141
- I([...H(t, c), ...a]);
141
+ k([...H(t, c), ...a]);
142
142
  } else {
143
143
  const t = $([a], V);
144
- I([...H(t, c), a]);
144
+ k([...H(t, c), a]);
145
145
  }
146
146
  }, [V]), b(() => (document.addEventListener("keydown", Q), () => {
147
147
  document.removeEventListener("keydown", Q);
@@ -154,7 +154,7 @@ function re(e) {
154
154
  setInputValue: N,
155
155
  cleanInputValue: X,
156
156
  cleanOptions: () => {
157
- if (_)
157
+ if (S)
158
158
  g(a);
159
159
  else {
160
160
  const t = a;
@@ -163,7 +163,7 @@ function re(e) {
163
163
  X();
164
164
  },
165
165
  clearValue: () => {
166
- v(_ ? [] : void 0);
166
+ v(S ? [] : void 0);
167
167
  },
168
168
  filteredOptions: D,
169
169
  isLoading: W,
@@ -173,18 +173,18 @@ function re(e) {
173
173
  };
174
174
  }
175
175
  const he = (e) => {
176
- const O = E(null), { asyncMode: d = "fetch_in_open" } = e, w = (l, C, m) => {
176
+ const p = E(null), { asyncMode: d = "fetch_in_open" } = e, _ = (l, O, m) => {
177
177
  const L = {
178
178
  options: l.options,
179
179
  fetcher: l.fetcher,
180
- asyncMode: C,
180
+ asyncMode: O,
181
181
  debounceDelay: l.debounceDelay,
182
182
  minCharacters: l.minCharacters,
183
183
  disabled: l.disabled,
184
184
  optionValue: l.optionValue,
185
185
  optionLabel: l.optionLabel,
186
186
  onFetchingStart: () => {
187
- C === "fetch_on_type" && m.current?.open();
187
+ O === "fetch_on_type" && m.current?.open();
188
188
  },
189
189
  onTypeStart: () => {
190
190
  !l?.fetcher && m.current?.open();
@@ -204,10 +204,10 @@ const he = (e) => {
204
204
  controlledValue: l.value,
205
205
  onChange: l.onChange
206
206
  };
207
- }, { inputValue: S, setInputValue: P, filteredOptions: T, isLoading: h, value: s, onOptionClick: f, cleanInputValue: F, cleanOptions: y, clearValue: k } = re(w(e, d, O));
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 || !O.current || (e.controls.current = {
210
- ...O.current,
209
+ !e.controls || !p.current || (e.controls.current = {
210
+ ...p.current,
211
211
  cleanOptions: () => {
212
212
  y();
213
213
  }
@@ -217,19 +217,20 @@ const he = (e) => {
217
217
  () => d === "fetch_on_type" ? h : !1,
218
218
  [d, h]
219
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 C = T.find((m) => i(m, e.optionValue) === l.id);
221
- C && f(C);
222
- }, { displayMode: D = e.multiple ? "chips" : "compact", dropdownOptions: I, overflow: c = "scroll", onChange: N, onClear: W, ...p } = e.selectComponentProps || {}, J = {
223
- controledSearchValue: S,
220
+ const O = T.find((m) => i(m, e.optionValue) === l.id);
221
+ O && f(O);
222
+ }, { displayMode: D = e.multiple ? "chips" : "compact", dropdownOptions: k, overflow: c = "scroll", onChange: N, onClear: W, ...C } = e.selectComponentProps || {}, J = {
223
+ controledSearchValue: w,
224
224
  onSearchValueChange: d === "fetch_on_type" ? P : void 0,
225
225
  onSearchClear: d === "fetch_on_type" ? () => {
226
226
  F(), y();
227
227
  } : void 0,
228
228
  inputSearchPlaceholder: e.inputSearchPlaceholder,
229
229
  isLoading: M(),
230
- ...I || {}
230
+ focusSearchInputOnOpen: !0,
231
+ ...k || {}
231
232
  }, U = () => {
232
- k(), e?.selectComponentProps?.onClear?.();
233
+ I(), e?.selectComponentProps?.onClear?.();
233
234
  };
234
235
  return e.multiple ? /* @__PURE__ */ Y.jsx(
235
236
  Z,
@@ -238,7 +239,7 @@ const he = (e) => {
238
239
  className: e.className,
239
240
  name: e.name,
240
241
  overflow: c,
241
- ...p,
242
+ ...C,
242
243
  onClear: e?.selectComponentProps?.onClear && U,
243
244
  multiple: !0,
244
245
  value: V,
@@ -249,7 +250,7 @@ const he = (e) => {
249
250
  renderOption: e.renderOption,
250
251
  onOptionClick: g,
251
252
  displayMode: D,
252
- controls: O,
253
+ controls: p,
253
254
  emptyMessage: "Use el buscador para obtener las opciones disponibles",
254
255
  dropdownOptions: J,
255
256
  isLoading: d === "fetch_in_open" ? h : !1
@@ -258,7 +259,7 @@ const he = (e) => {
258
259
  Z,
259
260
  {
260
261
  disabled: e.disabled,
261
- ...p,
262
+ ...C,
262
263
  onClear: U,
263
264
  className: e.className,
264
265
  overflow: c,
@@ -272,7 +273,7 @@ const he = (e) => {
272
273
  renderOption: e.renderOption,
273
274
  onOptionClick: g,
274
275
  displayMode: "compact",
275
- controls: O,
276
+ controls: p,
276
277
  emptyMessage: "Use el buscador para obtener las opciones disponibles",
277
278
  dropdownOptions: J,
278
279
  isLoading: d === "fetch_in_open" ? h : !1
@@ -1,56 +1,95 @@
1
- import { j as n } from "./jsx-runtime-GkKLlHH4.js";
2
- import { motion as x } from "framer-motion";
3
- import { memo as N } from "react";
4
- import { c as r } from "./cn-B6yFEsav.js";
5
- function c({
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({
6
24
  items: t,
7
- activeTab: e,
8
- onTabChange: i,
25
+ activeTab: a,
26
+ onTabChange: r,
9
27
  className: l,
10
- tabClassName: d,
11
- activeTabClassName: o,
12
- indicatorClassName: f,
13
- animated: b = !0,
14
- renderTab: m
28
+ tabClassName: o,
29
+ activeTabClassName: h,
30
+ indicatorClassName: g,
31
+ animated: y = !0,
32
+ renderTab: d
15
33
  }) {
16
- const h = (a) => {
17
- a.disabled || i?.(a.id, a);
34
+ const j = (e) => {
35
+ e.disabled || r?.(e.id, e);
18
36
  };
19
- return /* @__PURE__ */ n.jsx(
37
+ return /* @__PURE__ */ i.jsx(
20
38
  "div",
21
39
  {
22
- className: r(
40
+ className: s(
23
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",
24
42
  l
25
43
  ),
26
44
  role: "tablist",
27
- children: t?.map((a) => {
28
- const s = e === a.id, u = () => h(a);
29
- return m ? /* @__PURE__ */ n.jsx("div", { children: m(a, s, u) }, a.id) : /* @__PURE__ */ n.jsxs(
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(
30
48
  "button",
31
49
  {
32
50
  onClick: u,
33
- disabled: a.disabled,
34
- className: r(
35
- "relative flex justify-center items-center h-10 px-4 font-medium focus:outline-none transition-colors",
36
- !a.disabled && "hover:text-primary-default-default cursor-pointer",
37
- a.disabled && "opacity-50 cursor-default",
38
- d,
39
- s && o
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
40
59
  ),
41
- tabIndex: a.disabled ? -1 : 0,
42
- "aria-label": a.title,
60
+ tabIndex: e.disabled ? -1 : 0,
61
+ "aria-label": e.title,
43
62
  role: "tab",
44
- "aria-selected": s,
45
- title: a.description,
63
+ "aria-selected": n,
46
64
  children: [
47
- s && b && /* @__PURE__ */ n.jsx(
48
- x.div,
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,
49
88
  {
50
89
  layoutId: "tab-indicator",
51
- className: r(
90
+ className: s(
52
91
  "absolute -bottom-px left-0 right-0 h-[5px] rounded-t-xl bg-primary-default-default z-0",
53
- f
92
+ g
54
93
  ),
55
94
  transition: {
56
95
  type: "spring",
@@ -59,36 +98,26 @@ function c({
59
98
  },
60
99
  "aria-hidden": "true"
61
100
  }
62
- ),
63
- /* @__PURE__ */ n.jsx(
64
- "span",
65
- {
66
- className: r(
67
- "relative z-10",
68
- s ? "text-primary-default-default font-semibold text-md" : "text-neutral-medium-default font-medium text-md"
69
- ),
70
- children: a.title
71
- }
72
101
  )
73
102
  ]
74
103
  },
75
- a.id
104
+ e.id
76
105
  );
77
106
  })
78
107
  }
79
108
  );
80
109
  }
81
- c.displayName = "TabLinks";
82
- const C = N(c, (t, e) => {
83
- if (t.activeTab !== e.activeTab || t.className !== e.className || t.tabClassName !== e.tabClassName || t.activeTabClassName !== e.activeTabClassName || t.indicatorClassName !== e.indicatorClassName || t.animated !== e.animated || t.onTabChange !== e.onTabChange || t.renderTab !== e.renderTab || t.items.length !== e.items.length)
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)
84
113
  return !1;
85
- for (let i = 0; i < t.items.length; i++) {
86
- const l = t.items[i], d = e.items[i];
87
- if (l.id !== d.id || l.title !== d.title || l.disabled !== d.disabled || l.description !== d.description)
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)
88
117
  return !1;
89
118
  }
90
119
  return !0;
91
120
  });
92
121
  export {
93
- C as default
122
+ H as default
94
123
  };
@@ -1,12 +1,12 @@
1
1
  import { j as n } from "./jsx-runtime-GkKLlHH4.js";
2
2
  import { c as i } from "./cn-B6yFEsav.js";
3
- import { forwardRef as b, useState as g, useRef as p, useEffect as h } from "react";
4
- const j = b((t, s) => {
5
- const [c, u] = g(t?.currentTabName || t.tabs[0].name), l = p(null), { tabs: r = [], className: d, activeColor: a = "var(--neutral-900)" } = t;
6
- h(() => {
7
- l.current?.style.setProperty("--tab-bg", a);
3
+ import { forwardRef as b, useState as p, useRef as h, useEffect as v } from "react";
4
+ const N = b((t, s) => {
5
+ const [c, d] = p(t?.currentTabName || t.tabs[0].name), r = h(null), { tabs: l = [], className: u, activeColor: a = "var(--neutral-900)", currentSystemId: m } = t;
6
+ v(() => {
7
+ r.current?.style.setProperty("--tab-bg", a);
8
8
  }, [a]);
9
- const m = r.find((e) => e.name === (t?.currentTabName || c));
9
+ const o = l.find((e) => e.id === m || e.name === (t?.currentTabName || c));
10
10
  return /* @__PURE__ */ n.jsx(
11
11
  "div",
12
12
  {
@@ -16,13 +16,13 @@ const j = b((t, s) => {
16
16
  "flex flex-col gap-2",
17
17
  "bg-neutral-strong-default",
18
18
  "h-full w-14 max-w-14 pl-[6px] py-6",
19
- " border-r border-neutral-default-default",
20
- d
19
+ "border-r border-neutral-default-default",
20
+ u
21
21
  ),
22
- children: r.map(
22
+ children: l.map(
23
23
  (e) => {
24
- const o = e.name === m?.name, f = typeof e.thumbnail == "string" ? /* @__PURE__ */ n.jsx("img", { src: e.thumbnail, alt: e.description, className: "aspect-square object-contain rounded", draggable: !1 }) : e.thumbnail, x = () => {
25
- e.disabled || (u(e.name), e.onClick && e.onClick(e.name));
24
+ const f = e.name === o?.name, x = typeof e.thumbnail == "string" ? /* @__PURE__ */ n.jsx("img", { src: e.thumbnail, alt: e.description, className: "aspect-square object-contain rounded", draggable: !1 }) : e.thumbnail, g = () => {
25
+ e.disabled || (d(e.name), e.onClick && e.onClick(e.name));
26
26
  };
27
27
  return /* @__PURE__ */ n.jsx(
28
28
  "div",
@@ -33,17 +33,17 @@ const j = b((t, s) => {
33
33
  "flex items-center pl-[6px] ",
34
34
  "rounded-l-[8px]",
35
35
  "tabswitch-element relative",
36
- o && "active"
36
+ f && "active"
37
37
  ),
38
- onClick: x,
39
- ref: l,
38
+ onClick: g,
39
+ ref: r,
40
40
  children: /* @__PURE__ */ n.jsx("div", { className: i(
41
41
  "size-8 rounded-[4px]",
42
42
  "grid place-items-center",
43
43
  "tab-thumbnail-icon",
44
44
  "bg-transparent text-neutral-default-default",
45
45
  e?.className
46
- ), children: f })
46
+ ), children: x })
47
47
  },
48
48
  e.name
49
49
  );
@@ -51,22 +51,22 @@ const j = b((t, s) => {
51
51
  )
52
52
  }
53
53
  );
54
- }), N = ({
54
+ }), C = ({
55
55
  count: t,
56
56
  maxCount: s = 9,
57
57
  className: c = "",
58
- size: u = "medium",
59
- variant: l = "primary",
60
- showZero: r = !1,
61
- disabled: d = !1
58
+ size: d = "medium",
59
+ variant: r = "primary",
60
+ showZero: l = !1,
61
+ disabled: u = !1
62
62
  }) => {
63
63
  const a = t, m = a > s ? `+${s}` : a;
64
- if (a === 0 && !r) return null;
65
- const e = {
64
+ if (a === 0 && !l) return null;
65
+ const o = {
66
66
  small: "w-4.5 h-4.5 text-xs ",
67
67
  medium: "w-5 h-5 text-xs",
68
68
  large: "w-6 h-6 text-sm"
69
- }, o = {
69
+ }, e = {
70
70
  primary: "bg-primary-default-default text-neutral-strong-default",
71
71
  secondary: "bg-neutral-medium-default text-neutral-strong-default",
72
72
  success: "bg-green-500 text-white",
@@ -75,13 +75,13 @@ const j = b((t, s) => {
75
75
  };
76
76
  return /* @__PURE__ */ n.jsx("div", { className: i(
77
77
  "rounded-full flex items-center justify-center font-medium select-none",
78
- e[u],
79
- o[l],
78
+ o[d],
79
+ e[r],
80
80
  c,
81
- d && "text-neutral-strong-disabled bg-primary-medium-disabled"
81
+ u && "text-neutral-strong-disabled bg-primary-medium-disabled"
82
82
  ), children: /* @__PURE__ */ n.jsx("span", { children: m }) });
83
83
  };
84
84
  export {
85
- N as B,
86
- j as T
85
+ C as B,
86
+ N as T
87
87
  };
@@ -22,6 +22,7 @@ interface DatePickerBaseProps {
22
22
  name?: string;
23
23
  min?: number;
24
24
  max?: number;
25
+ disabled?: boolean;
25
26
  }
26
27
  interface DatePickerSingleProps extends DatePickerBaseProps {
27
28
  mode?: "single";
@@ -28,6 +28,7 @@ export interface NavigationDrawerProps {
28
28
  drawer?: boolean;
29
29
  sidebar?: boolean;
30
30
  };
31
+ outletRef?: React.RefObject<HTMLDivElement | null>;
31
32
  }
32
33
  type SlotBaseProps = {
33
34
  children?: NavigationDrawerSlotChildren;
@@ -53,4 +54,4 @@ declare const NavigationDrawer: React.NamedExoticComponent<NavigationDrawerProps
53
54
  Sidebar: React.NamedExoticComponent<import('./NavigationDrawerSidebar').NavigationDrawerSidebarProps & React.RefAttributes<HTMLDivElement>>;
54
55
  };
55
56
  export default NavigationDrawer;
56
- export { useDrawerState, useDrawerActions };
57
+ export { useDrawerActions, useDrawerState };
@@ -1,5 +1,5 @@
1
1
  import { IconComponent } from '../../Icons/types';
2
- export interface NavigationDrawerActionItemProps {
2
+ export interface PyrionLayoutActionItemProps {
3
3
  id: string;
4
4
  title: string;
5
5
  icon?: IconComponent;
@@ -11,7 +11,8 @@ export interface NavigationDrawerActionItemProps {
11
11
  payload?: any;
12
12
  isView?: boolean | (() => boolean);
13
13
  order?: number;
14
+ tooltipText?: string;
14
15
  }
15
- declare const NavigationDrawerActionItem: import('react').MemoExoticComponent<(props: NavigationDrawerActionItemProps) => import("react/jsx-runtime").JSX.Element | null>;
16
+ declare const NavigationDrawerActionItem: import('react').MemoExoticComponent<(props: PyrionLayoutActionItemProps) => import("react/jsx-runtime").JSX.Element | null>;
16
17
  export default NavigationDrawerActionItem;
17
- export type { NavigationDrawerActionItemProps as NavigationDrawerActionItemPropsType };
18
+ export type { PyrionLayoutActionItemProps as NavigationDrawerActionItemPropsType };
@@ -1,10 +1,9 @@
1
- import { NavigationDrawerActionItemProps } from './NavigationDrawerActionItem';
1
+ import { PyrionLayoutActionItemProps } from './NavigationDrawerActionItem';
2
2
  export interface NavigationDrawerActionsProps {
3
- actions?: NavigationDrawerActionItemProps[];
3
+ actions?: PyrionLayoutActionItemProps[];
4
4
  activeActionId?: string;
5
5
  onActionClick?: (id: string, payload?: any) => void;
6
6
  className?: string;
7
- payload?: any;
8
7
  }
9
- declare const NavigationDrawerActions: import('react').MemoExoticComponent<({ actions, activeActionId, onActionClick, className, payload }: NavigationDrawerActionsProps) => import("react/jsx-runtime").JSX.Element>;
8
+ declare const NavigationDrawerActions: import('react').MemoExoticComponent<({ actions, activeActionId, onActionClick, className }: NavigationDrawerActionsProps) => import("react/jsx-runtime").JSX.Element>;
10
9
  export default NavigationDrawerActions;
@@ -13,6 +13,7 @@ export interface NavigationDrawerItemBaseProps {
13
13
  onClick?: React.MouseEventHandler;
14
14
  onAuxClick?: React.MouseEventHandler;
15
15
  disabled?: boolean;
16
+ tooltipText?: string;
16
17
  }
17
18
  declare const NavigationDrawerItemBase: React.MemoExoticComponent<(props: NavigationDrawerItemBaseProps) => import("react/jsx-runtime").JSX.Element>;
18
19
  export default NavigationDrawerItemBase;
@@ -1,7 +1,7 @@
1
1
  import { IconComponent } from '../../Icons/types';
2
2
  import { ReactNode } from 'react';
3
3
  import { NavItemSecondaryProps } from './NavItemSecondary';
4
- export interface NavigationDrawerLinkItemProps {
4
+ export interface PyrionLayoutLinkItemProps {
5
5
  path: string;
6
6
  title: string;
7
7
  icon?: IconComponent;
@@ -17,6 +17,7 @@ export interface NavigationDrawerLinkItemProps {
17
17
  onClick?: (path: string) => void;
18
18
  sublinks?: NavItemSecondaryProps[];
19
19
  subLinksRender?: (sublinks: NavItemSecondaryProps[], controls: NavItemHandler) => ReactNode;
20
+ tooltipText?: string;
20
21
  }
21
22
  interface NavItemHandler {
22
23
  toggle: () => void;
@@ -26,5 +27,5 @@ interface NavItemHandler {
26
27
  toggleDrawerCollapse?: () => void;
27
28
  subscribeToCollapse?: (listener: (collapsed: boolean) => void) => () => void;
28
29
  }
29
- declare const NavigationDrawerLinkItem: import('react').NamedExoticComponent<NavigationDrawerLinkItemProps & import('react').RefAttributes<NavItemHandler>>;
30
+ declare const NavigationDrawerLinkItem: import('react').NamedExoticComponent<PyrionLayoutLinkItemProps & import('react').RefAttributes<NavItemHandler>>;
30
31
  export default NavigationDrawerLinkItem;
@@ -1,6 +1,6 @@
1
- import { NavigationDrawerLinkItemProps } from './NavigationDrawerLinkItem';
1
+ import { PyrionLayoutLinkItemProps } from './NavigationDrawerLinkItem';
2
2
  export interface NavigationDrawerNavlinksProps {
3
- navlinks?: NavigationDrawerLinkItemProps[];
3
+ navlinks?: PyrionLayoutLinkItemProps[];
4
4
  handleNavigation: (path: string) => void;
5
5
  className?: string;
6
6
  getIsCollapsed?: () => boolean;
@@ -0,0 +1,11 @@
1
+ export interface PlainTooltipProps {
2
+ title: string;
3
+ children: React.ReactNode;
4
+ delayToShow?: number;
5
+ delayToClose?: number;
6
+ className?: string;
7
+ attachToParent?: boolean;
8
+ disabled?: boolean;
9
+ }
10
+ declare const PlainTooltip: import('react').MemoExoticComponent<({ title, children, delayToShow, delayToClose, className, attachToParent, disabled }: PlainTooltipProps) => string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<import('react').ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null | undefined> | null | undefined>;
11
+ export default PlainTooltip;
@@ -1,9 +1,9 @@
1
- import { NavigationDrawerActionItemProps } from '../NavigationDrawer/NavigationDrawerActionItem';
2
- import { NavigationDrawerLinkItemProps } from '../NavigationDrawer/NavigationDrawerLinkItem';
1
+ import { PyrionLayoutActionItemProps } from '../NavigationDrawer/NavigationDrawerActionItem';
2
+ import { PyrionLayoutLinkItemProps } from '../NavigationDrawer/NavigationDrawerLinkItem';
3
3
  declare const DrawerContent: import('react').MemoExoticComponent<({ navlinks, handleNavigation, allActions, activeActionId, onActionClick }: {
4
- navlinks?: NavigationDrawerLinkItemProps[];
4
+ navlinks?: PyrionLayoutLinkItemProps[];
5
5
  handleNavigation: (path: string) => void;
6
- allActions: NavigationDrawerActionItemProps[];
6
+ allActions: PyrionLayoutActionItemProps[];
7
7
  activeActionId?: string;
8
8
  onActionClick?: (id: string, payload?: any) => void;
9
9
  }) => import("react/jsx-runtime").JSX.Element>;