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.
- package/dist/{CardProfile-B63chbXo.js → CardProfile-Ct5Fs60N.js} +13 -12
- package/dist/CardProfile.es.js +1 -1
- package/dist/CheckBox.es.js +6 -6
- package/dist/{DatePicker-D718l51x.js → DatePicker-D1EwMGIN.js} +2 -2
- package/dist/DatePicker.es.js +1 -1
- package/dist/DrawerDesktop.es.js +4 -4
- package/dist/DropZone.es.js +23 -22
- package/dist/FAButton.es.js +6 -6
- package/dist/HelperComponent-DhGU_ug-.js +26 -0
- package/dist/Icons/AccountCircle.d.ts +6 -0
- package/dist/Icons/AccountCircle.es.js +21 -0
- package/dist/Icons/Add.d.ts +6 -0
- package/dist/Icons/Add.es.js +19 -0
- package/dist/Icons/ArrowLeft.d.ts +6 -0
- package/dist/Icons/ArrowLeft.es.js +19 -0
- package/dist/Icons/ArrowUpDown.d.ts +6 -0
- package/dist/Icons/ArrowUpDown.es.js +21 -0
- package/dist/Icons/AttachFile.d.ts +6 -0
- package/dist/Icons/AttachFile.es.js +19 -0
- package/dist/Icons/Boards.d.ts +6 -0
- package/dist/Icons/Boards.es.js +19 -0
- package/dist/Icons/Calendar.d.ts +6 -0
- package/dist/Icons/Calendar.es.js +19 -0
- package/dist/Icons/Cancel.d.ts +6 -0
- package/dist/Icons/Cancel.es.js +19 -0
- package/dist/Icons/Check.d.ts +6 -0
- package/dist/Icons/Check.es.js +19 -0
- package/dist/Icons/CheckCircle.d.ts +6 -0
- package/dist/Icons/CheckCircle.es.js +21 -0
- package/dist/Icons/CheckList.d.ts +6 -0
- package/dist/Icons/CheckList.es.js +25 -0
- package/dist/Icons/ChevronDown.d.ts +6 -0
- package/dist/Icons/ChevronDown.es.js +21 -0
- package/dist/Icons/Clock.d.ts +6 -0
- package/dist/Icons/Clock.es.js +19 -0
- package/dist/Icons/Close.d.ts +6 -0
- package/dist/Icons/Close.es.js +19 -0
- package/dist/Icons/CloseNavBarDesktop.d.ts +6 -0
- package/dist/Icons/CloseNavBarDesktop.es.js +36 -0
- package/dist/Icons/Collapse.d.ts +6 -0
- package/dist/Icons/Collapse.es.js +19 -0
- package/dist/Icons/Company.d.ts +6 -0
- package/dist/Icons/Company.es.js +25 -0
- package/dist/Icons/Copy.d.ts +6 -0
- package/dist/Icons/Copy.es.js +19 -0
- package/dist/Icons/CrevronLeft.d.ts +6 -0
- package/dist/Icons/CrevronLeft.es.js +21 -0
- package/dist/Icons/CrevronRight.d.ts +6 -0
- package/dist/Icons/CrevronRight.es.js +21 -0
- package/dist/Icons/DocumentFill.d.ts +6 -0
- package/dist/Icons/DocumentFill.es.js +27 -0
- package/dist/Icons/Download.d.ts +6 -0
- package/dist/Icons/Download.es.js +25 -0
- package/dist/Icons/Edit.d.ts +6 -0
- package/dist/Icons/Edit.es.js +19 -0
- package/dist/Icons/EditFill.d.ts +6 -0
- package/dist/Icons/EditFill.es.js +25 -0
- package/dist/Icons/Email.d.ts +6 -0
- package/dist/Icons/Email.es.js +25 -0
- package/dist/Icons/Error.d.ts +6 -0
- package/dist/Icons/Error.es.js +19 -0
- package/dist/Icons/EyeVisibility.d.ts +6 -0
- package/dist/Icons/EyeVisibility.es.js +21 -0
- package/dist/Icons/EyeVisibilityOff.d.ts +6 -0
- package/dist/Icons/EyeVisibilityOff.es.js +21 -0
- package/dist/Icons/FaLock.d.ts +6 -0
- package/dist/Icons/FaLock.es.js +19 -0
- package/dist/Icons/FastForward.d.ts +6 -0
- package/dist/Icons/FastForward.es.js +27 -0
- package/dist/Icons/File.d.ts +6 -0
- package/dist/Icons/File.es.js +25 -0
- package/dist/Icons/Filter.d.ts +6 -0
- package/dist/Icons/Filter.es.js +19 -0
- package/dist/Icons/FormatColorText.d.ts +6 -0
- package/dist/Icons/FormatColorText.es.js +26 -0
- package/dist/Icons/Help.d.ts +6 -0
- package/dist/Icons/Help.es.js +19 -0
- package/dist/Icons/HistoryActivity.d.ts +6 -0
- package/dist/Icons/HistoryActivity.es.js +21 -0
- package/dist/Icons/Home.d.ts +6 -0
- package/dist/Icons/Home.es.js +19 -0
- package/dist/Icons/Image.d.ts +6 -0
- package/dist/Icons/Image.es.js +25 -0
- package/dist/Icons/Info.d.ts +6 -0
- package/dist/Icons/Info.es.js +19 -0
- package/dist/Icons/Logout.d.ts +6 -0
- package/dist/Icons/Logout.es.js +19 -0
- package/dist/Icons/MessageSquare.d.ts +6 -0
- package/dist/Icons/MessageSquare.es.js +21 -0
- package/dist/Icons/MessageSquareFill.d.ts +6 -0
- package/dist/Icons/MessageSquareFill.es.js +27 -0
- package/dist/Icons/MoreVert.d.ts +6 -0
- package/dist/Icons/MoreVert.es.js +19 -0
- package/dist/Icons/Notifications.d.ts +6 -0
- package/dist/Icons/Notifications.es.js +21 -0
- package/dist/Icons/Pause.d.ts +6 -0
- package/dist/Icons/Pause.es.js +19 -0
- package/dist/Icons/Reload.d.ts +6 -0
- package/dist/Icons/Reload.es.js +25 -0
- package/dist/Icons/Search.d.ts +6 -0
- package/dist/Icons/Search.es.js +19 -0
- package/dist/Icons/Settings.d.ts +6 -0
- package/dist/Icons/Settings.es.js +19 -0
- package/dist/Icons/Shared.d.ts +6 -0
- package/dist/Icons/Shared.es.js +19 -0
- package/dist/Icons/Sort.d.ts +6 -0
- package/dist/Icons/Sort.es.js +19 -0
- package/dist/Icons/Stars.d.ts +6 -0
- package/dist/Icons/Stars.es.js +19 -0
- package/dist/Icons/Ticket.d.ts +6 -0
- package/dist/Icons/Ticket.es.js +19 -0
- package/dist/Icons/TicketFilled.d.ts +6 -0
- package/dist/Icons/TicketFilled.es.js +21 -0
- package/dist/Icons/Trash.d.ts +6 -0
- package/dist/Icons/Trash.es.js +19 -0
- package/dist/Icons/TrashFill.d.ts +6 -0
- package/dist/Icons/TrashFill.es.js +25 -0
- package/dist/Icons/Upload.d.ts +6 -0
- package/dist/Icons/Upload.es.js +19 -0
- package/dist/Icons/UploadCloud.d.ts +6 -0
- package/dist/Icons/UploadCloud.es.js +21 -0
- package/dist/Icons/UserAdd.d.ts +6 -0
- package/dist/Icons/UserAdd.es.js +19 -0
- package/dist/Icons/UserAddFill.d.ts +6 -0
- package/dist/Icons/UserAddFill.es.js +27 -0
- package/dist/Icons/UserPerson.d.ts +6 -0
- package/dist/Icons/UserPerson.es.js +19 -0
- package/dist/Icons/WhatsApp.d.ts +6 -0
- package/dist/Icons/WhatsApp.es.js +76 -0
- package/dist/Icons/index.d.ts +1 -0
- package/dist/Icons.es.js +120 -976
- package/dist/{ImageGallery-BLrIJSw2.js → ImageGallery-4DdXqwRy.js} +57 -55
- package/dist/ImageGallery.es.js +1 -1
- package/dist/{Input-DD4VHP1s.js → Input-EkMrxcNX.js} +16 -14
- package/dist/Input.es.js +1 -1
- package/dist/InputMultiple.es.js +45 -43
- package/dist/Logo.es.js +1 -1
- package/dist/OtpInput.es.js +47 -46
- package/dist/RadioButton.es.js +1 -1
- package/dist/RecurrentDatePicker.es.js +4 -4
- package/dist/RecurrentDatePickerRRule.es.js +1 -1
- package/dist/{Select-DfjHfmxM.js → Select-CRFOzYc6.js} +64 -61
- package/dist/Select.es.js +1 -1
- package/dist/SelectSearch.es.js +127 -117
- package/dist/Steps.es.js +6 -6
- package/dist/Toast.es.js +32 -28
- package/dist/Tooltip.es.js +7 -7
- package/dist/components/FAB/FAButton.d.ts +1 -1
- package/dist/components/NavigationDrawer/NavItem.d.ts +11 -2
- package/dist/components/NavigationDrawer/NavItemSecondary.d.ts +9 -0
- package/dist/components/PyrionNavigationDrawer/PyirionNavigationDrawer.d.ts +5 -3
- package/dist/components/Toaster/Toaster.d.ts +1 -1
- package/dist/iconUtils-D0lVAgGT.js +5 -0
- package/dist/index.d.ts +0 -1
- package/dist/prometeo-design-system.es.js +155 -232
- package/dist/styles.css +1 -1
- package/package.json +6 -5
- package/src/styles/base.css +1 -0
- package/dist/HelperComponent-DZjT3uYS.js +0 -24
- package/dist/Icons/IconsObject.d.ts +0 -81
- package/dist/Icons/Icons_Legacy.d.ts +0 -131
- package/dist/Icons_Legacy-BJgYCS_W.js +0 -979
package/dist/SelectSearch.es.js
CHANGED
|
@@ -1,106 +1,116 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { g as
|
|
3
|
-
import { useState as T, useRef as I, useEffect as h, useMemo as
|
|
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:
|
|
7
|
-
fetcher:
|
|
6
|
+
options: y,
|
|
7
|
+
fetcher: u,
|
|
8
8
|
asyncMode: V = "fetch_in_open",
|
|
9
9
|
disabled: S = !1,
|
|
10
|
-
debounceDelay:
|
|
10
|
+
debounceDelay: A = 500,
|
|
11
11
|
minCharacters: _ = 3,
|
|
12
|
-
optionLabel:
|
|
13
|
-
optionValue:
|
|
12
|
+
optionLabel: d,
|
|
13
|
+
optionValue: c,
|
|
14
14
|
controlledValue: m,
|
|
15
|
-
isOpen:
|
|
16
|
-
inputRef:
|
|
17
|
-
name:
|
|
18
|
-
} = e || {}, [
|
|
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
|
-
|
|
21
|
-
}, [
|
|
22
|
-
m !== void 0 &&
|
|
20
|
+
F.current = u;
|
|
21
|
+
}, [u]), h(() => {
|
|
22
|
+
m !== void 0 && P(m);
|
|
23
23
|
}, [m]), h(() => {
|
|
24
|
-
w.current = m !== void 0 ? m :
|
|
25
|
-
}, [m,
|
|
26
|
-
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 =
|
|
29
|
-
g.current && clearTimeout(g.current), g.current = setTimeout(() => t(a).then(
|
|
30
|
-
}), [a]),
|
|
31
|
-
const n = m !== void 0,
|
|
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
|
|
34
|
-
let
|
|
35
|
-
|
|
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,
|
|
38
|
-
}, W = (t) => (e?.onFetchingStart?.(),
|
|
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((
|
|
43
|
-
b(
|
|
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
|
|
49
|
+
const $ = x !== void 0 ? x : v;
|
|
50
50
|
h(() => {
|
|
51
|
-
if (!S &&
|
|
51
|
+
if (!S && F.current && V === "fetch_on_type") {
|
|
52
52
|
if (!a || a === "" || a.length < _) {
|
|
53
|
-
g.current && clearTimeout(g.current),
|
|
53
|
+
g.current && clearTimeout(g.current), o(!1);
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
|
-
const t = U(W,
|
|
57
|
-
|
|
58
|
-
|
|
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
|
-
|
|
62
|
+
o(!1), e?.onFetchingEnd?.();
|
|
61
63
|
});
|
|
62
64
|
}
|
|
63
|
-
}, [V, a, S,
|
|
65
|
+
}, [V, a, S, A, U, _]), h(() => {
|
|
64
66
|
if (!S)
|
|
65
|
-
if (
|
|
67
|
+
if ($) {
|
|
66
68
|
if (e?.onOpen?.(), V === "fetch_in_open") {
|
|
67
|
-
if (!
|
|
69
|
+
if (!F.current)
|
|
68
70
|
return;
|
|
69
|
-
|
|
70
|
-
|
|
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
|
-
|
|
82
|
+
o(!1), e?.onFetchingEnd?.();
|
|
73
83
|
});
|
|
74
84
|
}
|
|
75
85
|
} else
|
|
76
86
|
e?.onClose?.();
|
|
77
|
-
}, [
|
|
78
|
-
const
|
|
79
|
-
if (
|
|
80
|
-
return
|
|
81
|
-
switch (typeof
|
|
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
|
|
93
|
+
return r?.toLowerCase().includes(n.toLowerCase());
|
|
84
94
|
case "number":
|
|
85
|
-
return
|
|
95
|
+
return r.toString().includes(n);
|
|
86
96
|
case "object":
|
|
87
|
-
return Object.values(
|
|
97
|
+
return Object.values(r).some((s) => s.toString()?.toLowerCase().includes(n.toLowerCase()));
|
|
88
98
|
default:
|
|
89
99
|
return !1;
|
|
90
100
|
}
|
|
91
|
-
}),
|
|
92
|
-
if (
|
|
93
|
-
return
|
|
101
|
+
}) || [], Y = (t) => t?.sort((n, r) => {
|
|
102
|
+
if (d)
|
|
103
|
+
return l(n, d) < l(r, d) ? -1 : 1;
|
|
94
104
|
{
|
|
95
|
-
const
|
|
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 <
|
|
108
|
+
return n < r ? -1 : 1;
|
|
99
109
|
case "number":
|
|
100
|
-
return n <
|
|
110
|
+
return n < r ? -1 : 1;
|
|
101
111
|
case "object":
|
|
102
|
-
if (
|
|
103
|
-
const L =
|
|
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
|
-
}),
|
|
112
|
-
const n = typeof
|
|
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
|
-
},
|
|
125
|
+
}, A));
|
|
116
126
|
};
|
|
117
127
|
return h(() => {
|
|
118
128
|
if (a === "")
|
|
119
|
-
|
|
120
|
-
else if (
|
|
121
|
-
const t = K(
|
|
122
|
-
|
|
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([
|
|
125
|
-
|
|
134
|
+
const t = K([f], O);
|
|
135
|
+
C([...z(t, a), f]);
|
|
126
136
|
}
|
|
127
|
-
}, [
|
|
128
|
-
document.removeEventListener("keydown",
|
|
137
|
+
}, [O]), h(() => (document.addEventListener("keydown", B), () => {
|
|
138
|
+
document.removeEventListener("keydown", B);
|
|
129
139
|
}), []), {
|
|
130
140
|
inputValue: a,
|
|
131
|
-
setInputValue:
|
|
141
|
+
setInputValue: k,
|
|
132
142
|
cleanInputValue: () => {
|
|
133
|
-
|
|
143
|
+
k("");
|
|
134
144
|
},
|
|
135
145
|
filteredOptions: J,
|
|
136
|
-
isLoading:
|
|
137
|
-
value:
|
|
138
|
-
setValue:
|
|
139
|
-
onOptionClick:
|
|
146
|
+
isLoading: E,
|
|
147
|
+
value: f,
|
|
148
|
+
setValue: P,
|
|
149
|
+
onOptionClick: X
|
|
140
150
|
};
|
|
141
151
|
}
|
|
142
152
|
const ie = (e) => {
|
|
143
|
-
const
|
|
153
|
+
const y = I(null);
|
|
144
154
|
h(() => {
|
|
145
|
-
e.controls && (e.controls.current =
|
|
155
|
+
e.controls && (e.controls.current = y.current);
|
|
146
156
|
}, [e.controls]);
|
|
147
|
-
const { asyncMode:
|
|
157
|
+
const { asyncMode: u = "fetch_in_open" } = e, V = (o, v, b) => {
|
|
148
158
|
const g = {
|
|
149
|
-
options:
|
|
150
|
-
fetcher:
|
|
159
|
+
options: o.options,
|
|
160
|
+
fetcher: o.fetcher,
|
|
151
161
|
asyncMode: v,
|
|
152
|
-
debounceDelay:
|
|
153
|
-
minCharacters:
|
|
154
|
-
disabled:
|
|
155
|
-
optionValue:
|
|
156
|
-
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
|
-
!
|
|
171
|
+
!o?.fetcher && b.current?.open();
|
|
162
172
|
},
|
|
163
173
|
inputRef: () => b.current?.searchInputRef,
|
|
164
174
|
subscribeOpenChange: b.current?.subscribeOpenChange,
|
|
165
|
-
name:
|
|
175
|
+
name: o.name
|
|
166
176
|
};
|
|
167
|
-
return
|
|
177
|
+
return o.multiple ? {
|
|
168
178
|
...g,
|
|
169
179
|
multiple: !0,
|
|
170
|
-
controlledValue:
|
|
171
|
-
onChange:
|
|
180
|
+
controlledValue: o.value,
|
|
181
|
+
onChange: o.onChange
|
|
172
182
|
} : {
|
|
173
183
|
...g,
|
|
174
184
|
multiple: !1,
|
|
175
|
-
controlledValue:
|
|
176
|
-
onChange:
|
|
185
|
+
controlledValue: o.value,
|
|
186
|
+
onChange: o.onChange
|
|
177
187
|
};
|
|
178
|
-
}, { inputValue: S, setInputValue:
|
|
179
|
-
const v = _.find((b) =>
|
|
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:
|
|
191
|
+
}, { displayMode: j = e.multiple ? "chips" : "compact", dropdownOptions: J, overflow: C = "scroll", onChange: a, ...k } = e.selectComponentProps || {}, E = {
|
|
182
192
|
controledSearchValue: S,
|
|
183
|
-
onSearchValueChange:
|
|
184
|
-
onSearchClear:
|
|
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:
|
|
196
|
+
isLoading: R(),
|
|
187
197
|
...J || {}
|
|
188
198
|
};
|
|
189
|
-
return e.multiple ? /* @__PURE__ */
|
|
190
|
-
|
|
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:
|
|
196
|
-
...
|
|
205
|
+
overflow: C,
|
|
206
|
+
...k,
|
|
197
207
|
multiple: !0,
|
|
198
|
-
value:
|
|
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:
|
|
205
|
-
displayMode:
|
|
206
|
-
controls:
|
|
214
|
+
onOptionClick: O,
|
|
215
|
+
displayMode: j,
|
|
216
|
+
controls: y,
|
|
207
217
|
emptyMessage: "Use el buscador para obtener las opciones disponibles",
|
|
208
|
-
dropdownOptions:
|
|
209
|
-
isLoading:
|
|
218
|
+
dropdownOptions: E,
|
|
219
|
+
isLoading: u === "fetch_in_open" ? d : !1
|
|
210
220
|
}
|
|
211
|
-
) : /* @__PURE__ */
|
|
212
|
-
|
|
221
|
+
) : /* @__PURE__ */ q.jsx(
|
|
222
|
+
G,
|
|
213
223
|
{
|
|
214
224
|
disabled: e.disabled,
|
|
215
|
-
...
|
|
225
|
+
...k,
|
|
216
226
|
className: e.className,
|
|
217
|
-
overflow:
|
|
227
|
+
overflow: C,
|
|
218
228
|
name: e.name,
|
|
219
229
|
multiple: !1,
|
|
220
|
-
value:
|
|
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:
|
|
236
|
+
onOptionClick: O,
|
|
227
237
|
displayMode: "compact",
|
|
228
|
-
controls:
|
|
238
|
+
controls: y,
|
|
229
239
|
emptyMessage: "Use el buscador para obtener las opciones disponibles",
|
|
230
|
-
dropdownOptions:
|
|
231
|
-
isLoading:
|
|
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 {
|
|
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(
|
|
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:
|
|
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(
|
|
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:
|
|
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
|
|
5
|
-
import {
|
|
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:
|
|
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[
|
|
75
|
+
boxShadow: l[t].shadow
|
|
72
76
|
},
|
|
73
|
-
className:
|
|
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[
|
|
77
|
-
x[
|
|
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[
|
|
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:
|
|
88
|
-
|
|
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
|
-
|
|
97
|
+
a?.label && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: /* @__PURE__ */ e.jsx(
|
|
94
98
|
h,
|
|
95
99
|
{
|
|
96
|
-
label:
|
|
100
|
+
label: a?.label,
|
|
97
101
|
onClick: () => {
|
|
98
|
-
|
|
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(
|
|
112
|
+
p.dismiss(n);
|
|
109
113
|
},
|
|
110
114
|
label: "",
|
|
111
115
|
size: "small",
|
|
112
116
|
color: "secondary",
|
|
113
|
-
icon: /* @__PURE__ */ e.jsx(C, { className:
|
|
117
|
+
icon: /* @__PURE__ */ e.jsx(C, { className: s(t === "light" ? "text-neutral-medium-focused " : "") }),
|
|
114
118
|
variant: "text",
|
|
115
119
|
animate: !1,
|
|
116
|
-
className:
|
|
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
|
|
124
|
-
const { duration:
|
|
125
|
-
return p.custom((
|
|
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:
|
|
129
|
-
variant:
|
|
132
|
+
id: o,
|
|
133
|
+
variant: r?.variant || "success",
|
|
130
134
|
title: c,
|
|
131
|
-
description:
|
|
132
|
-
icon:
|
|
133
|
-
button:
|
|
134
|
-
showClose:
|
|
135
|
-
colorMode:
|
|
135
|
+
description: r?.description,
|
|
136
|
+
icon: r?.icon,
|
|
137
|
+
button: r?.button,
|
|
138
|
+
showClose: a,
|
|
139
|
+
colorMode: n
|
|
136
140
|
}
|
|
137
141
|
), {
|
|
138
|
-
duration:
|
|
142
|
+
duration: i,
|
|
139
143
|
position: d,
|
|
140
144
|
unstyled: !0
|
|
141
145
|
});
|
|
142
146
|
}
|
|
143
147
|
export {
|
|
144
148
|
v as default,
|
|
145
|
-
|
|
149
|
+
_ as toastpyrion
|
|
146
150
|
};
|
package/dist/Tooltip.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
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] =
|
|
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
|
-
|
|
25
|
-
/* @__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(
|
|
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/
|
|
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/
|
|
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
|
-
|
|
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 {
|
|
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
|
-
|
|
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;
|