prometeo-design-system 3.0.6 → 3.0.8

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 (162) hide show
  1. package/dist/{CardProfile-B63chbXo.js → CardProfile-Ct5Fs60N.js} +13 -12
  2. package/dist/CardProfile.es.js +1 -1
  3. package/dist/CheckBox.es.js +6 -6
  4. package/dist/{DatePicker-D718l51x.js → DatePicker-D1EwMGIN.js} +2 -2
  5. package/dist/DatePicker.es.js +1 -1
  6. package/dist/DrawerDesktop.es.js +4 -4
  7. package/dist/DropZone.es.js +23 -22
  8. package/dist/FAButton.es.js +6 -6
  9. package/dist/HelperComponent-DhGU_ug-.js +26 -0
  10. package/dist/Icons/AccountCircle.d.ts +6 -0
  11. package/dist/Icons/AccountCircle.es.js +21 -0
  12. package/dist/Icons/Add.d.ts +6 -0
  13. package/dist/Icons/Add.es.js +19 -0
  14. package/dist/Icons/ArrowLeft.d.ts +6 -0
  15. package/dist/Icons/ArrowLeft.es.js +19 -0
  16. package/dist/Icons/ArrowUpDown.d.ts +6 -0
  17. package/dist/Icons/ArrowUpDown.es.js +21 -0
  18. package/dist/Icons/AttachFile.d.ts +6 -0
  19. package/dist/Icons/AttachFile.es.js +19 -0
  20. package/dist/Icons/Boards.d.ts +6 -0
  21. package/dist/Icons/Boards.es.js +19 -0
  22. package/dist/Icons/Calendar.d.ts +6 -0
  23. package/dist/Icons/Calendar.es.js +19 -0
  24. package/dist/Icons/Cancel.d.ts +6 -0
  25. package/dist/Icons/Cancel.es.js +19 -0
  26. package/dist/Icons/Check.d.ts +6 -0
  27. package/dist/Icons/Check.es.js +19 -0
  28. package/dist/Icons/CheckCircle.d.ts +6 -0
  29. package/dist/Icons/CheckCircle.es.js +21 -0
  30. package/dist/Icons/CheckList.d.ts +6 -0
  31. package/dist/Icons/CheckList.es.js +25 -0
  32. package/dist/Icons/ChevronDown.d.ts +6 -0
  33. package/dist/Icons/ChevronDown.es.js +21 -0
  34. package/dist/Icons/Clock.d.ts +6 -0
  35. package/dist/Icons/Clock.es.js +19 -0
  36. package/dist/Icons/Close.d.ts +6 -0
  37. package/dist/Icons/Close.es.js +19 -0
  38. package/dist/Icons/CloseNavBarDesktop.d.ts +6 -0
  39. package/dist/Icons/CloseNavBarDesktop.es.js +36 -0
  40. package/dist/Icons/Collapse.d.ts +6 -0
  41. package/dist/Icons/Collapse.es.js +19 -0
  42. package/dist/Icons/Company.d.ts +6 -0
  43. package/dist/Icons/Company.es.js +25 -0
  44. package/dist/Icons/Copy.d.ts +6 -0
  45. package/dist/Icons/Copy.es.js +19 -0
  46. package/dist/Icons/CrevronLeft.d.ts +6 -0
  47. package/dist/Icons/CrevronLeft.es.js +21 -0
  48. package/dist/Icons/CrevronRight.d.ts +6 -0
  49. package/dist/Icons/CrevronRight.es.js +21 -0
  50. package/dist/Icons/DocumentFill.d.ts +6 -0
  51. package/dist/Icons/DocumentFill.es.js +27 -0
  52. package/dist/Icons/Download.d.ts +6 -0
  53. package/dist/Icons/Download.es.js +25 -0
  54. package/dist/Icons/Edit.d.ts +6 -0
  55. package/dist/Icons/Edit.es.js +19 -0
  56. package/dist/Icons/EditFill.d.ts +6 -0
  57. package/dist/Icons/EditFill.es.js +25 -0
  58. package/dist/Icons/Email.d.ts +6 -0
  59. package/dist/Icons/Email.es.js +25 -0
  60. package/dist/Icons/Error.d.ts +6 -0
  61. package/dist/Icons/Error.es.js +19 -0
  62. package/dist/Icons/EyeVisibility.d.ts +6 -0
  63. package/dist/Icons/EyeVisibility.es.js +21 -0
  64. package/dist/Icons/EyeVisibilityOff.d.ts +6 -0
  65. package/dist/Icons/EyeVisibilityOff.es.js +21 -0
  66. package/dist/Icons/FaLock.d.ts +6 -0
  67. package/dist/Icons/FaLock.es.js +19 -0
  68. package/dist/Icons/FastForward.d.ts +6 -0
  69. package/dist/Icons/FastForward.es.js +27 -0
  70. package/dist/Icons/File.d.ts +6 -0
  71. package/dist/Icons/File.es.js +25 -0
  72. package/dist/Icons/Filter.d.ts +6 -0
  73. package/dist/Icons/Filter.es.js +19 -0
  74. package/dist/Icons/FormatColorText.d.ts +6 -0
  75. package/dist/Icons/FormatColorText.es.js +26 -0
  76. package/dist/Icons/Help.d.ts +6 -0
  77. package/dist/Icons/Help.es.js +19 -0
  78. package/dist/Icons/HistoryActivity.d.ts +6 -0
  79. package/dist/Icons/HistoryActivity.es.js +21 -0
  80. package/dist/Icons/Home.d.ts +6 -0
  81. package/dist/Icons/Home.es.js +19 -0
  82. package/dist/Icons/Image.d.ts +6 -0
  83. package/dist/Icons/Image.es.js +25 -0
  84. package/dist/Icons/Info.d.ts +6 -0
  85. package/dist/Icons/Info.es.js +19 -0
  86. package/dist/Icons/Logout.d.ts +6 -0
  87. package/dist/Icons/Logout.es.js +19 -0
  88. package/dist/Icons/MessageSquare.d.ts +6 -0
  89. package/dist/Icons/MessageSquare.es.js +21 -0
  90. package/dist/Icons/MessageSquareFill.d.ts +6 -0
  91. package/dist/Icons/MessageSquareFill.es.js +27 -0
  92. package/dist/Icons/MoreVert.d.ts +6 -0
  93. package/dist/Icons/MoreVert.es.js +19 -0
  94. package/dist/Icons/Notifications.d.ts +6 -0
  95. package/dist/Icons/Notifications.es.js +21 -0
  96. package/dist/Icons/Pause.d.ts +6 -0
  97. package/dist/Icons/Pause.es.js +19 -0
  98. package/dist/Icons/Reload.d.ts +6 -0
  99. package/dist/Icons/Reload.es.js +25 -0
  100. package/dist/Icons/Search.d.ts +6 -0
  101. package/dist/Icons/Search.es.js +19 -0
  102. package/dist/Icons/Settings.d.ts +6 -0
  103. package/dist/Icons/Settings.es.js +19 -0
  104. package/dist/Icons/Shared.d.ts +6 -0
  105. package/dist/Icons/Shared.es.js +19 -0
  106. package/dist/Icons/Sort.d.ts +6 -0
  107. package/dist/Icons/Sort.es.js +19 -0
  108. package/dist/Icons/Stars.d.ts +6 -0
  109. package/dist/Icons/Stars.es.js +19 -0
  110. package/dist/Icons/Ticket.d.ts +6 -0
  111. package/dist/Icons/Ticket.es.js +19 -0
  112. package/dist/Icons/TicketFilled.d.ts +6 -0
  113. package/dist/Icons/TicketFilled.es.js +21 -0
  114. package/dist/Icons/Trash.d.ts +6 -0
  115. package/dist/Icons/Trash.es.js +19 -0
  116. package/dist/Icons/TrashFill.d.ts +6 -0
  117. package/dist/Icons/TrashFill.es.js +25 -0
  118. package/dist/Icons/Upload.d.ts +6 -0
  119. package/dist/Icons/Upload.es.js +19 -0
  120. package/dist/Icons/UploadCloud.d.ts +6 -0
  121. package/dist/Icons/UploadCloud.es.js +21 -0
  122. package/dist/Icons/UserAdd.d.ts +6 -0
  123. package/dist/Icons/UserAdd.es.js +19 -0
  124. package/dist/Icons/UserAddFill.d.ts +6 -0
  125. package/dist/Icons/UserAddFill.es.js +27 -0
  126. package/dist/Icons/UserPerson.d.ts +6 -0
  127. package/dist/Icons/UserPerson.es.js +19 -0
  128. package/dist/Icons/WhatsApp.d.ts +6 -0
  129. package/dist/Icons/WhatsApp.es.js +76 -0
  130. package/dist/Icons/index.d.ts +1 -0
  131. package/dist/Icons.es.js +120 -976
  132. package/dist/{ImageGallery-BLrIJSw2.js → ImageGallery-4DdXqwRy.js} +57 -55
  133. package/dist/ImageGallery.es.js +1 -1
  134. package/dist/{Input-DD4VHP1s.js → Input-EkMrxcNX.js} +16 -14
  135. package/dist/Input.es.js +1 -1
  136. package/dist/InputMultiple.es.js +45 -43
  137. package/dist/Logo.es.js +1 -1
  138. package/dist/OtpInput.es.js +47 -46
  139. package/dist/RadioButton.es.js +1 -1
  140. package/dist/RecurrentDatePicker.es.js +4 -4
  141. package/dist/RecurrentDatePickerRRule.es.js +1 -1
  142. package/dist/{Select-DfjHfmxM.js → Select-CRFOzYc6.js} +64 -61
  143. package/dist/Select.es.js +1 -1
  144. package/dist/SelectSearch.es.js +127 -117
  145. package/dist/Steps.es.js +6 -6
  146. package/dist/Toast.es.js +32 -28
  147. package/dist/Tooltip.es.js +7 -7
  148. package/dist/components/FAB/FAButton.d.ts +1 -1
  149. package/dist/components/NavigationDrawer/NavItem.d.ts +11 -2
  150. package/dist/components/NavigationDrawer/NavItemSecondary.d.ts +9 -0
  151. package/dist/components/PyrionNavigationDrawer/PyirionNavigationDrawer.d.ts +5 -3
  152. package/dist/components/Toaster/Toaster.d.ts +1 -1
  153. package/dist/iconUtils-D0lVAgGT.js +5 -0
  154. package/dist/index.d.ts +0 -1
  155. package/dist/prometeo-design-system.es.js +155 -232
  156. package/dist/styles.css +1 -1
  157. package/package.json +6 -5
  158. package/src/styles/base.css +1 -0
  159. package/dist/HelperComponent-DZjT3uYS.js +0 -24
  160. package/dist/Icons/IconsObject.d.ts +0 -81
  161. package/dist/Icons/Icons_Legacy.d.ts +0 -131
  162. package/dist/Icons_Legacy-BJgYCS_W.js +0 -979
@@ -1,106 +1,116 @@
1
- import { j as G } from "./jsx-runtime-DKDX3adD.js";
2
- import { g as i, S as H } from "./Select-DfjHfmxM.js";
3
- import { useState as T, useRef as I, useEffect as h, useMemo as Q, useCallback as X } from "react";
1
+ import { j as q } from "./jsx-runtime-DKDX3adD.js";
2
+ import { g as l, S as G } from "./Select-CRFOzYc6.js";
3
+ import { useState as T, useRef as I, useEffect as h, useMemo as H, useCallback as Q } from "react";
4
4
  function te(e) {
5
5
  const {
6
- options: O,
7
- fetcher: s,
6
+ options: y,
7
+ fetcher: u,
8
8
  asyncMode: V = "fetch_in_open",
9
9
  disabled: S = !1,
10
- debounceDelay: R = 500,
10
+ debounceDelay: A = 500,
11
11
  minCharacters: _ = 3,
12
- optionLabel: f,
13
- optionValue: u,
12
+ optionLabel: d,
13
+ optionValue: c,
14
14
  controlledValue: m,
15
- isOpen: F,
16
- inputRef: j,
17
- name: y
18
- } = e || {}, [C, k] = T(O || []), [J, p] = T(O || []), [a, x] = T(""), [M, r] = T(!1), [v, b] = T(!1), g = I(null), D = I(null), N = I(!1), E = I(s), P = e?.multiple === !0 || !1, w = I(P ? [] : void 0), [d, A] = T(P ? [] : void 0);
15
+ isOpen: x,
16
+ inputRef: R,
17
+ name: p
18
+ } = e || {}, [O, j] = T(y || []), [J, C] = T(y || []), [a, k] = T(""), [E, o] = T(!1), [v, b] = T(!1), g = I(null), D = I(null), N = I(!1), F = I(u), M = e?.multiple === !0 || !1, w = I(M ? [] : void 0), [f, P] = T(M ? [] : void 0);
19
19
  h(() => {
20
- E.current = s;
21
- }, [s]), h(() => {
22
- m !== void 0 && A(m);
20
+ F.current = u;
21
+ }, [u]), h(() => {
22
+ m !== void 0 && P(m);
23
23
  }, [m]), h(() => {
24
- w.current = m !== void 0 ? m : d;
25
- }, [m, d]), h(() => {
26
- e?.options && (k(e.options), p(e.options));
24
+ w.current = m !== void 0 ? m : f;
25
+ }, [m, f]), h(() => {
26
+ e?.options && (j(e.options), C(e.options));
27
27
  }, [e?.options]);
28
- const U = Q(() => (t, n) => new Promise((o, l) => {
29
- g.current && clearTimeout(g.current), g.current = setTimeout(() => t(a).then(o).catch(l), n);
30
- }), [a]), Y = (t) => {
31
- const n = m !== void 0, o = (l) => u ? i(l, u) : i(l, "id");
28
+ const U = H(() => (t, n) => new Promise((r, i) => {
29
+ g.current && clearTimeout(g.current), g.current = setTimeout(() => t(a).then(r).catch(i), n);
30
+ }), [a]), X = (t) => {
31
+ const n = m !== void 0, r = (i) => c ? l(i, c) : l(i, "id");
32
32
  if (e?.multiple === !0) {
33
- const l = w.current || [];
34
- let c;
35
- l.some((L) => o(L) === o(t)) ? c = l.filter((L) => o(L) !== o(t)) : c = [...l, t], n ? (w.current = c, e?.onChange?.(c, y)) : (w.current = c, A(c), e?.onChange?.(c, y));
33
+ const i = w.current || [];
34
+ let s;
35
+ i.some((L) => r(L) === r(t)) ? s = i.filter((L) => r(L) !== r(t)) : s = [...i, t], n ? (w.current = s, e?.onChange?.(s, p)) : (w.current = s, P(s), e?.onChange?.(s, p));
36
36
  } else
37
- n ? (w.current = t, e?.onChange?.(t, y)) : (w.current = t, A(t), e?.onChange?.(t, y));
38
- }, W = (t) => (e?.onFetchingStart?.(), E.current?.(t) || Promise.resolve([])), K = X((t, n) => t.length === 0 ? n : u ? n.filter((o) => !t.some((l) => i(l, u) === i(o, u))) : n.filter((o) => !t.some((l) => i(l, "id") === i(o, "id"))), [u]);
37
+ n ? (w.current = t, e?.onChange?.(t, p)) : (w.current = t, P(t), e?.onChange?.(t, p));
38
+ }, W = (t) => (e?.onFetchingStart?.(), F.current?.(t) || Promise.resolve([])), K = Q((t, n) => t.length === 0 ? n : c ? n.filter((r) => !t.some((i) => l(i, c) === l(r, c))) : n.filter((r) => !t.some((i) => l(i, "id") === l(r, "id"))), [c]);
39
39
  h(() => {
40
40
  const t = e?.subscribeOpenChange;
41
41
  if (!t) return;
42
- const n = t((o) => {
43
- b(o);
42
+ const n = t((r) => {
43
+ b(r);
44
44
  });
45
45
  return () => {
46
46
  n && n();
47
47
  };
48
48
  }, [e?.subscribeOpenChange]);
49
- const B = F !== void 0 ? F : v;
49
+ const $ = x !== void 0 ? x : v;
50
50
  h(() => {
51
- if (!S && E.current && V === "fetch_on_type") {
51
+ if (!S && F.current && V === "fetch_on_type") {
52
52
  if (!a || a === "" || a.length < _) {
53
- g.current && clearTimeout(g.current), r(!1);
53
+ g.current && clearTimeout(g.current), o(!1);
54
54
  return;
55
55
  }
56
- const t = U(W, R);
57
- r(!0), t.then((n) => {
58
- k(n);
56
+ const t = U(W, A);
57
+ o(!0), t.then((n) => {
58
+ if (!Array.isArray(n))
59
+ return console.debug(`El resultado del fetcher no es un Array (tipo de resultado obtenido: ${typeof n})`), [];
60
+ j(n);
59
61
  }).finally(() => {
60
- r(!1), e?.onFetchingEnd?.();
62
+ o(!1), e?.onFetchingEnd?.();
61
63
  });
62
64
  }
63
- }, [V, a, S, R, U, _]), h(() => {
65
+ }, [V, a, S, A, U, _]), h(() => {
64
66
  if (!S)
65
- if (B) {
67
+ if ($) {
66
68
  if (e?.onOpen?.(), V === "fetch_in_open") {
67
- if (!E.current)
69
+ if (!F.current)
68
70
  return;
69
- r(!0), W().then((t) => {
70
- k(() => P && d.length > 0 ? [...K(d, t), ...d] : t);
71
+ o(!0), W().then((t) => {
72
+ if (!Array.isArray(t))
73
+ return console.debug(`El resultado del fetcher no es un Array (tipo de resultado obtenido: ${typeof t})`), [];
74
+ j(() => {
75
+ const n = t.filter((r) => {
76
+ if (c)
77
+ return l(r, c) !== void 0;
78
+ });
79
+ return M && f.length > 0 ? [...K(f, n), ...f] : n;
80
+ });
71
81
  }).finally(() => {
72
- r(!1), e?.onFetchingEnd?.();
82
+ o(!1), e?.onFetchingEnd?.();
73
83
  });
74
84
  }
75
85
  } else
76
86
  e?.onClose?.();
77
- }, [B, V, S]);
78
- const q = (t, n) => t.filter((o) => {
79
- if (f)
80
- return i(o, f).toLowerCase().includes(n.toLowerCase());
81
- switch (typeof o) {
87
+ }, [$, V, S]);
88
+ const z = (t, n) => t?.filter((r) => {
89
+ if (d)
90
+ return l(r, d)?.toLowerCase().includes(n.toLowerCase());
91
+ switch (typeof r) {
82
92
  case "string":
83
- return o.toLowerCase().includes(n.toLowerCase());
93
+ return r?.toLowerCase().includes(n.toLowerCase());
84
94
  case "number":
85
- return o.toString().includes(n);
95
+ return r.toString().includes(n);
86
96
  case "object":
87
- return Object.values(o).some((c) => c.toString().toLowerCase().includes(n.toLowerCase()));
97
+ return Object.values(r).some((s) => s.toString()?.toLowerCase().includes(n.toLowerCase()));
88
98
  default:
89
99
  return !1;
90
100
  }
91
- }), Z = (t) => t.sort((n, o) => {
92
- if (f)
93
- return i(n, f) < i(o, f) ? -1 : 1;
101
+ }) || [], Y = (t) => t?.sort((n, r) => {
102
+ if (d)
103
+ return l(n, d) < l(r, d) ? -1 : 1;
94
104
  {
95
- const c = ["label", "name", "value"].find((L) => typeof n == "object" && Object.keys(n).includes(L));
105
+ const s = ["label", "name", "value"].find((L) => typeof n == "object" && Object.keys(n).includes(L));
96
106
  switch (typeof n) {
97
107
  case "string":
98
- return n < o ? -1 : 1;
108
+ return n < r ? -1 : 1;
99
109
  case "number":
100
- return n < o ? -1 : 1;
110
+ return n < r ? -1 : 1;
101
111
  case "object":
102
- if (c) {
103
- const L = i(n, c), ee = i(o, c);
112
+ if (s) {
113
+ const L = l(n, s), ee = l(r, s);
104
114
  return L < ee ? -1 : 1;
105
115
  } else
106
116
  return 1;
@@ -108,127 +118,127 @@ function te(e) {
108
118
  return 1;
109
119
  }
110
120
  }
111
- }), z = (t) => {
112
- const n = typeof j == "function" ? j() : j;
121
+ }) || [], B = (t) => {
122
+ const n = typeof R == "function" ? R() : R;
113
123
  t.target === n?.current && (D.current && clearTimeout(D.current), N.current || (N.current = !0, e?.onTypeStart?.()), D.current = setTimeout(() => {
114
124
  N.current = !1;
115
- }, R));
125
+ }, A));
116
126
  };
117
127
  return h(() => {
118
128
  if (a === "")
119
- p(Z(C));
120
- else if (P) {
121
- const t = K(d, C);
122
- p([...q(t, a), ...d]);
129
+ C(Y(O));
130
+ else if (M) {
131
+ const t = K(f, O);
132
+ C([...z(t, a), ...f]);
123
133
  } else {
124
- const t = K([d], C);
125
- p([...q(t, a), d]);
134
+ const t = K([f], O);
135
+ C([...z(t, a), f]);
126
136
  }
127
- }, [C]), h(() => (document.addEventListener("keydown", z), () => {
128
- document.removeEventListener("keydown", z);
137
+ }, [O]), h(() => (document.addEventListener("keydown", B), () => {
138
+ document.removeEventListener("keydown", B);
129
139
  }), []), {
130
140
  inputValue: a,
131
- setInputValue: x,
141
+ setInputValue: k,
132
142
  cleanInputValue: () => {
133
- x("");
143
+ k("");
134
144
  },
135
145
  filteredOptions: J,
136
- isLoading: M,
137
- value: d,
138
- setValue: A,
139
- onOptionClick: Y
146
+ isLoading: E,
147
+ value: f,
148
+ setValue: P,
149
+ onOptionClick: X
140
150
  };
141
151
  }
142
152
  const ie = (e) => {
143
- const O = I(null);
153
+ const y = I(null);
144
154
  h(() => {
145
- e.controls && (e.controls.current = O.current);
155
+ e.controls && (e.controls.current = y.current);
146
156
  }, [e.controls]);
147
- const { asyncMode: s = "fetch_in_open" } = e, V = (r, v, b) => {
157
+ const { asyncMode: u = "fetch_in_open" } = e, V = (o, v, b) => {
148
158
  const g = {
149
- options: r.options,
150
- fetcher: r.fetcher,
159
+ options: o.options,
160
+ fetcher: o.fetcher,
151
161
  asyncMode: v,
152
- debounceDelay: r.debounceDelay,
153
- minCharacters: r.minCharacters,
154
- disabled: r.disabled,
155
- optionValue: r.optionValue,
156
- optionLabel: r.optionLabel,
162
+ debounceDelay: o.debounceDelay,
163
+ minCharacters: o.minCharacters,
164
+ disabled: o.disabled,
165
+ optionValue: o.optionValue,
166
+ optionLabel: o.optionLabel,
157
167
  onFetchingStart: () => {
158
168
  v === "fetch_on_type" && b.current?.open();
159
169
  },
160
170
  onTypeStart: () => {
161
- !r?.fetcher && b.current?.open();
171
+ !o?.fetcher && b.current?.open();
162
172
  },
163
173
  inputRef: () => b.current?.searchInputRef,
164
174
  subscribeOpenChange: b.current?.subscribeOpenChange,
165
- name: r.name
175
+ name: o.name
166
176
  };
167
- return r.multiple ? {
177
+ return o.multiple ? {
168
178
  ...g,
169
179
  multiple: !0,
170
- controlledValue: r.value,
171
- onChange: r.onChange
180
+ controlledValue: o.value,
181
+ onChange: o.onChange
172
182
  } : {
173
183
  ...g,
174
184
  multiple: !1,
175
- controlledValue: r.value,
176
- onChange: r.onChange
185
+ controlledValue: o.value,
186
+ onChange: o.onChange
177
187
  };
178
- }, { inputValue: S, setInputValue: R, filteredOptions: _, isLoading: f, value: u, onOptionClick: m, cleanInputValue: F } = te(V(e, s, O)), j = X(() => s === "fetch_on_type" ? f : !1, [s, f]), y = Q(() => e.multiple ? u.map((r) => i(r, e.optionValue)) : u ? i(u, e.optionValue) : void 0, [u, e.optionValue, e.multiple]), C = (r) => {
179
- const v = _.find((b) => i(b, e.optionValue) === r.id);
188
+ }, { inputValue: S, setInputValue: A, filteredOptions: _, isLoading: d, value: c, onOptionClick: m, cleanInputValue: x } = te(V(e, u, y)), R = Q(() => u === "fetch_on_type" ? d : !1, [u, d]), p = H(() => e.multiple ? c.map((o) => l(o, e.optionValue)) : c ? l(c, e.optionValue) : void 0, [c, e.optionValue, e.multiple]), O = (o) => {
189
+ const v = _.find((b) => l(b, e.optionValue) === o.id);
180
190
  v && m(v);
181
- }, { displayMode: k = e.multiple ? "chips" : "compact", dropdownOptions: J, overflow: p = "scroll", onChange: a, ...x } = e.selectComponentProps || {}, M = {
191
+ }, { displayMode: j = e.multiple ? "chips" : "compact", dropdownOptions: J, overflow: C = "scroll", onChange: a, ...k } = e.selectComponentProps || {}, E = {
182
192
  controledSearchValue: S,
183
- onSearchValueChange: s === "fetch_on_type" ? R : void 0,
184
- onSearchClear: s === "fetch_on_type" ? F : void 0,
193
+ onSearchValueChange: u === "fetch_on_type" ? A : void 0,
194
+ onSearchClear: u === "fetch_on_type" ? x : void 0,
185
195
  inputSearchPlaceholder: e.inputSearchPlaceholder,
186
- isLoading: j(),
196
+ isLoading: R(),
187
197
  ...J || {}
188
198
  };
189
- return e.multiple ? /* @__PURE__ */ G.jsx(
190
- H,
199
+ return e.multiple ? /* @__PURE__ */ q.jsx(
200
+ G,
191
201
  {
192
202
  disabled: e.disabled,
193
203
  className: e.className,
194
204
  name: e.name,
195
- overflow: p,
196
- ...x,
205
+ overflow: C,
206
+ ...k,
197
207
  multiple: !0,
198
- value: y,
208
+ value: p,
199
209
  label: e.label || "",
200
210
  options: _,
201
211
  optionValue: e.optionValue,
202
212
  optionLabel: e.optionLabel,
203
213
  renderOption: e.renderOption,
204
- onOptionClick: C,
205
- displayMode: k,
206
- controls: O,
214
+ onOptionClick: O,
215
+ displayMode: j,
216
+ controls: y,
207
217
  emptyMessage: "Use el buscador para obtener las opciones disponibles",
208
- dropdownOptions: M,
209
- isLoading: s === "fetch_in_open" ? f : !1
218
+ dropdownOptions: E,
219
+ isLoading: u === "fetch_in_open" ? d : !1
210
220
  }
211
- ) : /* @__PURE__ */ G.jsx(
212
- H,
221
+ ) : /* @__PURE__ */ q.jsx(
222
+ G,
213
223
  {
214
224
  disabled: e.disabled,
215
- ...x,
225
+ ...k,
216
226
  className: e.className,
217
- overflow: p,
227
+ overflow: C,
218
228
  name: e.name,
219
229
  multiple: !1,
220
- value: y,
230
+ value: p,
221
231
  label: e.label || "",
222
232
  options: _,
223
233
  optionValue: e.optionValue,
224
234
  optionLabel: e.optionLabel,
225
235
  renderOption: e.renderOption,
226
- onOptionClick: C,
236
+ onOptionClick: O,
227
237
  displayMode: "compact",
228
- controls: O,
238
+ controls: y,
229
239
  emptyMessage: "Use el buscador para obtener las opciones disponibles",
230
- dropdownOptions: M,
231
- isLoading: s === "fetch_in_open" ? f : !1
240
+ dropdownOptions: E,
241
+ isLoading: u === "fetch_in_open" ? d : !1
232
242
  }
233
243
  );
234
244
  };
package/dist/Steps.es.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { j as e } from "./jsx-runtime-DKDX3adD.js";
2
- import { C as j } from "./Icons_Legacy-BJgYCS_W.js";
3
- import { c as y } from "./cn-B6yFEsav.js";
2
+ import { c as j } from "./cn-B6yFEsav.js";
4
3
  import { motion as r } from "framer-motion";
5
4
  import N from "react";
5
+ import { Check as y } from "./Icons/Check.es.js";
6
6
  const b = ({
7
7
  index: n,
8
8
  isHorizontal: t,
@@ -141,10 +141,10 @@ const b = ({
141
141
  transition: { duration: 0.3, delay: l * 0.3 },
142
142
  whileTap: f ? { scale: 0.95 } : {},
143
143
  onClick: () => h(l),
144
- children: s === "numbered" || s === "numbered-minimal" || !a.icon ? d === "completed" ? /* @__PURE__ */ e.jsx(r.div, { initial: { scale: 0 }, animate: { scale: 1 }, transition: { duration: 0.2 }, children: /* @__PURE__ */ e.jsx(j, { size: 24, className: "text-neutral-strong-default" }) }) : /* @__PURE__ */ e.jsx("span", { children: l + 1 }) : N.cloneElement(a.icon, { size: m[i].iconSize })
144
+ children: s === "numbered" || s === "numbered-minimal" || !a.icon ? d === "completed" ? /* @__PURE__ */ e.jsx(r.div, { initial: { scale: 0 }, animate: { scale: 1 }, transition: { duration: 0.2 }, children: /* @__PURE__ */ e.jsx(y, { size: 24, className: "text-neutral-strong-default" }) }) : /* @__PURE__ */ e.jsx("span", { children: l + 1 }) : N.cloneElement(a.icon, { size: m[i].iconSize })
145
145
  }
146
146
  ),
147
- s !== "minimal" && s !== "numbered-minimal" && a.description && /* @__PURE__ */ e.jsx("p", { className: y(
147
+ s !== "minimal" && s !== "numbered-minimal" && a.description && /* @__PURE__ */ e.jsx("p", { className: j(
148
148
  "absolute text-center w-28 -bottom-2 translate-y-full",
149
149
  m[i].description,
150
150
  "text-gray-400 mt-2 text-center",
@@ -177,7 +177,7 @@ const b = ({
177
177
  transition: { duration: 0.3, delay: l * 0.1 },
178
178
  whileTap: f ? { scale: 0.95 } : {},
179
179
  onClick: () => h(l),
180
- children: s === "numbered" || s === "numbered-minimal" || !a.icon ? d === "completed" ? /* @__PURE__ */ e.jsx(r.div, { initial: { scale: 0 }, animate: { scale: 1 }, transition: { duration: 0.2 }, children: /* @__PURE__ */ e.jsx(j, { size: 24, className: "text-neutral-strong-default" }) }) : /* @__PURE__ */ e.jsx("span", { children: l + 1 }) : a.icon
180
+ children: s === "numbered" || s === "numbered-minimal" || !a.icon ? d === "completed" ? /* @__PURE__ */ e.jsx(r.div, { initial: { scale: 0 }, animate: { scale: 1 }, transition: { duration: 0.2 }, children: /* @__PURE__ */ e.jsx(y, { size: 24, className: "text-neutral-strong-default" }) }) : /* @__PURE__ */ e.jsx("span", { children: l + 1 }) : a.icon
181
181
  }
182
182
  ),
183
183
  s !== "minimal" && s !== "numbered-minimal" && /* @__PURE__ */ e.jsx(
@@ -187,7 +187,7 @@ const b = ({
187
187
  initial: { opacity: 0, x: -10 },
188
188
  animate: { opacity: 1, x: 0 },
189
189
  transition: { duration: 0.3, delay: l * 0.1 + 0.1 },
190
- children: a.description && /* @__PURE__ */ e.jsx("p", { className: y(
190
+ children: a.description && /* @__PURE__ */ e.jsx("p", { className: j(
191
191
  "h-full text-start flex items-center justify-start ",
192
192
  m[i].description,
193
193
  "text-gray-400",
package/dist/Toast.es.js CHANGED
@@ -1,9 +1,13 @@
1
1
  import { j as e } from "./jsx-runtime-DKDX3adD.js";
2
2
  import w from "react";
3
3
  import { toast as p } from "sonner";
4
- import { c as o } from "./cn-B6yFEsav.js";
5
- import { I as m, E as u, O as f, Q as b, a as C } from "./Icons_Legacy-BJgYCS_W.js";
4
+ import { c as s } from "./cn-B6yFEsav.js";
5
+ import { Info as m } from "./Icons/Info.es.js";
6
+ import { Error as u } from "./Icons/Error.es.js";
7
+ import { Cancel as f } from "./Icons/Cancel.es.js";
8
+ import { CheckCircle as b } from "./Icons/CheckCircle.es.js";
6
9
  import h from "./Button.es.js";
10
+ import { Close as C } from "./Icons/Close.es.js";
7
11
  const x = {
8
12
  dark: {
9
13
  success: {
@@ -63,18 +67,18 @@ const x = {
63
67
  shadow: "0px 0px 2px 0px rgba(0, 0, 0, 0.35),8px 8px 20px 0px rgba(0, 0, 0, 0.3),0px 0px 15px 0px rgba(0, 0, 0, 0.2),0px 0px 20px 0px rgba(21, 21, 21, 0.3) inset,6px 0px 100px 0px rgba(0, 0, 0, 0.05) inset"
64
68
  }
65
69
  }, v = (c) => {
66
- const { title: t, description: n, button: s, id: i, icon: d, variant: r = "info", colorMode: a = "dark", showClose: g = !1 } = c;
70
+ const { title: r, description: i, button: a, id: n, icon: d, variant: o = "info", colorMode: t = "dark", showClose: g = !1 } = c;
67
71
  return /* @__PURE__ */ e.jsxs(
68
72
  "div",
69
73
  {
70
74
  style: {
71
- boxShadow: l[a].shadow
75
+ boxShadow: l[t].shadow
72
76
  },
73
- className: o(
77
+ className: s(
74
78
  "flex p-3 pb-4 md:w-[485px] md:max-w-[485px] md:min-w-[485px] md:h-[68px] md:max-h-[68px] rounded-lg gap-2",
75
79
  "w-[345px] max-w-[345px] min-w-[345px] h-[68px] max-h-[68px]",
76
- l[a].container,
77
- x[a][r].container
80
+ l[t].container,
81
+ x[t][o].container
78
82
  ),
79
83
  children: [
80
84
  /* @__PURE__ */ e.jsxs(
@@ -82,20 +86,20 @@ const x = {
82
86
  {
83
87
  className: "flex items-center justify-start gap-2 max-h-[38px] h-[38px] overflow-hidden flex-1 ",
84
88
  children: [
85
- /* @__PURE__ */ e.jsx("div", { className: "f", style: { color: "inherit" }, children: w.createElement(d || x[a][r].icon, { size: 24, className: x[a][r].iconClass }) }),
89
+ /* @__PURE__ */ e.jsx("div", { className: "f", style: { color: "inherit" }, children: w.createElement(d || x[t][o].icon, { size: 24, className: x[t][o].iconClass }) }),
86
90
  /* @__PURE__ */ e.jsxs("div", { className: "flex-1 flex flex-col gap-1", children: [
87
- /* @__PURE__ */ e.jsx("p", { className: o("select-none prometeo-fonts-label-medium md:prometeo-fonts-label-xlarge", l[a].title), children: t }),
88
- n && /* @__PURE__ */ e.jsx("p", { className: o("select-none prometeo-fonts-body-xsmall md:prometeo-fonts-body-small text-nowrap overflow-ellipsis ", l[a].description), children: n })
91
+ /* @__PURE__ */ e.jsx("p", { className: s("select-none prometeo-fonts-label-medium md:prometeo-fonts-label-xlarge", l[t].title), children: r }),
92
+ i && /* @__PURE__ */ e.jsx("p", { className: s("select-none prometeo-fonts-body-xsmall md:prometeo-fonts-body-small text-nowrap overflow-ellipsis ", l[t].description), children: i })
89
93
  ] })
90
94
  ]
91
95
  }
92
96
  ),
93
- s?.label && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: /* @__PURE__ */ e.jsx(
97
+ a?.label && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: /* @__PURE__ */ e.jsx(
94
98
  h,
95
99
  {
96
- label: s?.label,
100
+ label: a?.label,
97
101
  onClick: () => {
98
- s?.onClick(), p.dismiss(i);
102
+ a?.onClick(), p.dismiss(n);
99
103
  },
100
104
  size: "small",
101
105
  color: "secondary"
@@ -105,42 +109,42 @@ const x = {
105
109
  h,
106
110
  {
107
111
  onClick: () => {
108
- p.dismiss(i);
112
+ p.dismiss(n);
109
113
  },
110
114
  label: "",
111
115
  size: "small",
112
116
  color: "secondary",
113
- icon: /* @__PURE__ */ e.jsx(C, { className: o(a === "light" ? "text-neutral-medium-focused " : "") }),
117
+ icon: /* @__PURE__ */ e.jsx(C, { className: s(t === "light" ? "text-neutral-medium-focused " : "") }),
114
118
  variant: "text",
115
119
  animate: !1,
116
- className: o(a === "light" ? "hover:bg-neutral-default-hover-light focus:bg-inherit active:bg-neutral-weak-hover " : "")
120
+ className: s(t === "light" ? "hover:bg-neutral-default-hover-light focus:bg-inherit active:bg-neutral-weak-hover " : "")
117
121
  }
118
122
  ) })
119
123
  ]
120
124
  }
121
125
  );
122
126
  };
123
- function M(c, t) {
124
- const { duration: n = 2500, showClose: s = !1, colorMode: i = "dark", position: d } = t || {};
125
- return p.custom((r) => /* @__PURE__ */ e.jsx(
127
+ function _(c, r) {
128
+ const { duration: i = 2500, showClose: a = !1, colorMode: n = "dark", position: d } = r || {};
129
+ return p.custom((o) => /* @__PURE__ */ e.jsx(
126
130
  v,
127
131
  {
128
- id: r,
129
- variant: t?.variant || "success",
132
+ id: o,
133
+ variant: r?.variant || "success",
130
134
  title: c,
131
- description: t?.description,
132
- icon: t?.icon,
133
- button: t?.button,
134
- showClose: s,
135
- colorMode: i
135
+ description: r?.description,
136
+ icon: r?.icon,
137
+ button: r?.button,
138
+ showClose: a,
139
+ colorMode: n
136
140
  }
137
141
  ), {
138
- duration: n,
142
+ duration: i,
139
143
  position: d,
140
144
  unstyled: !0
141
145
  });
142
146
  }
143
147
  export {
144
148
  v as default,
145
- M as toastpyrion
149
+ _ as toastpyrion
146
150
  };
@@ -1,7 +1,7 @@
1
1
  import { j as e } from "./jsx-runtime-DKDX3adD.js";
2
- import { a as f } from "./Icons_Legacy-BJgYCS_W.js";
3
- import { AnimatePresence as p, motion as n } from "framer-motion";
4
- import { useState as x, cloneElement as b } from "react";
2
+ import { AnimatePresence as f, motion as n } from "framer-motion";
3
+ import { useState as p, cloneElement as x } from "react";
4
+ import { Close as b } from "./Icons/Close.es.js";
5
5
  const N = ({
6
6
  title: i,
7
7
  trigger: o,
@@ -9,7 +9,7 @@ const N = ({
9
9
  position: t = "top",
10
10
  component: c
11
11
  }) => {
12
- const [s, l] = x(!1), m = () => l(!0), a = () => l(!1), u = o === "hover" ? {
12
+ const [s, l] = p(!1), m = () => l(!0), a = () => l(!1), u = o === "hover" ? {
13
13
  onMouseEnter: m,
14
14
  onMouseLeave: a
15
15
  } : {
@@ -21,8 +21,8 @@ const N = ({
21
21
  right: "left-full top-1/2 -translate-y-1/2 ml-2"
22
22
  };
23
23
  return /* @__PURE__ */ e.jsxs("div", { className: "relative inline-block", children: [
24
- b(r, u),
25
- /* @__PURE__ */ e.jsx(p, { children: s && /* @__PURE__ */ e.jsx(
24
+ x(r, u),
25
+ /* @__PURE__ */ e.jsx(f, { children: s && /* @__PURE__ */ e.jsx(
26
26
  n.div,
27
27
  {
28
28
  initial: { opacity: 0, scale: 0.8, y: t === "top" ? 10 : -10 },
@@ -49,7 +49,7 @@ const N = ({
49
49
  className: "absolute cursor-pointer -top-2 -right-2 w-6 h-6 bg-neutral-strong-default hover:bg-neutral-medium-default rounded-full flex items-center justify-center transition-colors z-10",
50
50
  whileHover: { scale: 1.1 },
51
51
  whileTap: { scale: 0.95 },
52
- children: /* @__PURE__ */ e.jsx(f, { size: 14, className: "text-white" })
52
+ children: /* @__PURE__ */ e.jsx(b, { size: 14, className: "text-white" })
53
53
  }
54
54
  )
55
55
  ] })
@@ -1,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  import { ColorVariant, ButtonVariant } from '../Shared/types';
3
- import { IconComponent } from '../../Icons/Icons_Legacy';
3
+ import { IconComponent } from '../../Icons/types';
4
4
  export interface FAButtonProps {
5
5
  icon?: IconComponent;
6
6
  label?: string;
@@ -1,4 +1,6 @@
1
- import { IconComponent } from '../../Icons/Icons_Legacy';
1
+ import { IconComponent } from '../../Icons/types';
2
+ import { ReactNode } from 'react';
3
+ import { NavItemSecondaryProps } from './NavItemSecondary';
2
4
  export interface NavItemProps {
3
5
  path: string;
4
6
  title: string;
@@ -10,6 +12,13 @@ export interface NavItemProps {
10
12
  isSelected?: boolean;
11
13
  isCollapsed?: boolean;
12
14
  onClick?: (path: string) => void;
15
+ sublinks?: NavItemSecondaryProps[];
16
+ subLinksRender?: (sublinks: NavItemSecondaryProps[], controls: NavItemHandler) => ReactNode;
13
17
  }
14
- declare const NavItem: import('react').MemoExoticComponent<(props: NavItemProps) => import("react/jsx-runtime").JSX.Element>;
18
+ interface NavItemHandler {
19
+ toggle: () => void;
20
+ setIsCollapsed: (collapsed: boolean) => void;
21
+ isCollapsed: boolean;
22
+ }
23
+ declare const NavItem: import('react').NamedExoticComponent<NavItemProps & import('react').RefAttributes<NavItemHandler>>;
15
24
  export default NavItem;
@@ -0,0 +1,9 @@
1
+ export interface NavItemSecondaryProps {
2
+ title: string;
3
+ path: string;
4
+ className?: string;
5
+ isSelected?: boolean;
6
+ onClick?: (path: string) => void;
7
+ }
8
+ declare const NavItemSecondary: import('react').MemoExoticComponent<(props: NavItemSecondaryProps) => import("react/jsx-runtime").JSX.Element>;
9
+ export default NavItemSecondary;
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { NavLinkProps } from 'react-router';
2
+ import { NavItemProps } from '../NavigationDrawer/NavItem';
3
3
  type TProduct = {
4
4
  name: string;
5
5
  domain: string;
@@ -26,13 +26,15 @@ type TUser = {
26
26
  area?: string;
27
27
  };
28
28
  export interface PyirionNavigationDrawerProps {
29
- navlinks?: NavLinkProps[];
29
+ links?: NavItemProps[];
30
30
  children?: ReactNode;
31
31
  state: {
32
32
  company: TCompany;
33
33
  enabled_systems: TSystem[];
34
34
  user: TUser;
35
35
  };
36
+ onLinkClick?: (path: string) => void;
37
+ onNavigate?: (from: string, to: string) => void;
36
38
  }
37
- declare const PyirionNavigationDrawer: ({ children, state }: PyirionNavigationDrawerProps) => import("react/jsx-runtime").JSX.Element;
39
+ declare const PyirionNavigationDrawer: ({ children, state, links: navlinks, onLinkClick, onNavigate }: PyirionNavigationDrawerProps) => import("react/jsx-runtime").JSX.Element;
38
40
  export default PyirionNavigationDrawer;
@@ -1,5 +1,5 @@
1
1
  import { ColorMode } from '../Shared/types';
2
- import { IconComponent } from '../../Icons/Icons_Legacy';
2
+ import { IconComponent } from '../../Icons/types';
3
3
  type ToastElementsProps = {
4
4
  container: string;
5
5
  iconClass: string;