prometeo-design-system 3.1.2 → 3.1.4
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/Avatar.es.js +44 -38
- package/dist/Button.es.js +27 -27
- package/dist/{CardProfile-Ct5Fs60N.js → CardProfile-y9Knsg26.js} +41 -40
- package/dist/CardProfile.es.js +1 -1
- package/dist/CheckBox.es.js +1 -1
- package/dist/DatePicker-CehTiXGa.js +3631 -0
- package/dist/DatePicker.es.js +1 -1
- package/dist/DialogModal.es.js +1 -1
- package/dist/DrawerDesktop.es.js +78 -72
- package/dist/DrawerMobile.es.js +1 -1
- package/dist/DropZone.es.js +1 -1
- package/dist/FAButton.es.js +1 -1
- package/dist/Header.es.js +4 -4
- package/dist/{HelperComponent-DhGU_ug-.js → HelperComponent-ljsn0xD6.js} +1 -1
- package/dist/Icons/AccountCircle.es.js +1 -1
- package/dist/Icons/Add.es.js +1 -1
- package/dist/Icons/ArrowLeft.es.js +1 -1
- package/dist/Icons/ArrowUpDown.es.js +1 -1
- package/dist/Icons/AttachFile.es.js +1 -1
- package/dist/Icons/Boards.es.js +1 -1
- package/dist/Icons/Calendar.es.js +1 -1
- package/dist/Icons/Cancel.es.js +1 -1
- package/dist/Icons/Check.es.js +1 -1
- package/dist/Icons/CheckCircle.es.js +1 -1
- package/dist/Icons/CheckList.es.js +1 -1
- package/dist/Icons/ChevronDown.es.js +1 -1
- package/dist/Icons/Clock.es.js +1 -1
- package/dist/Icons/Close.es.js +1 -1
- package/dist/Icons/CloseNavBarDesktop.es.js +1 -1
- package/dist/Icons/Collapse.es.js +1 -1
- package/dist/Icons/Company.es.js +1 -1
- package/dist/Icons/Copy.es.js +1 -1
- package/dist/Icons/CrevronLeft.es.js +1 -1
- package/dist/Icons/CrevronRight.es.js +1 -1
- package/dist/Icons/DocumentFill.es.js +1 -1
- package/dist/Icons/Download.es.js +1 -1
- package/dist/Icons/Edit.es.js +1 -1
- package/dist/Icons/EditFill.es.js +1 -1
- package/dist/Icons/Email.es.js +1 -1
- package/dist/Icons/Error.es.js +1 -1
- package/dist/Icons/EyeVisibility.es.js +1 -1
- package/dist/Icons/EyeVisibilityOff.es.js +1 -1
- package/dist/Icons/FaLock.es.js +1 -1
- package/dist/Icons/FastForward.es.js +1 -1
- package/dist/Icons/File.es.js +1 -1
- package/dist/Icons/Filter.es.js +1 -1
- package/dist/Icons/FormatColorText.es.js +1 -1
- package/dist/Icons/Help.es.js +1 -1
- package/dist/Icons/HistoryActivity.es.js +1 -1
- package/dist/Icons/Home.es.js +1 -1
- package/dist/Icons/Image.es.js +1 -1
- package/dist/Icons/Info.es.js +1 -1
- package/dist/Icons/Logout.es.js +1 -1
- package/dist/Icons/MessageSquare.es.js +1 -1
- package/dist/Icons/MessageSquareFill.es.js +1 -1
- package/dist/Icons/MoreVert.es.js +1 -1
- package/dist/Icons/Notifications.es.js +1 -1
- package/dist/Icons/Pause.es.js +1 -1
- package/dist/Icons/Reload.es.js +1 -1
- package/dist/Icons/Search.es.js +1 -1
- package/dist/Icons/Settings.es.js +1 -1
- package/dist/Icons/Shared.es.js +1 -1
- package/dist/Icons/Sort.es.js +1 -1
- package/dist/Icons/Stars.es.js +1 -1
- package/dist/Icons/Ticket.es.js +1 -1
- package/dist/Icons/TicketFilled.es.js +1 -1
- package/dist/Icons/Trash.es.js +1 -1
- package/dist/Icons/TrashFill.es.js +1 -1
- package/dist/Icons/Upload.es.js +1 -1
- package/dist/Icons/UploadCloud.es.js +1 -1
- package/dist/Icons/UserAdd.es.js +1 -1
- package/dist/Icons/UserAddFill.es.js +1 -1
- package/dist/Icons/UserPerson.es.js +1 -1
- package/dist/Icons/WhatsApp.es.js +1 -1
- package/dist/Image.es.js +1 -1
- package/dist/{ImageGallery-4DdXqwRy.js → ImageGallery-DG9ovlQ-.js} +1 -1
- package/dist/ImageGallery.es.js +1 -1
- package/dist/Input.es.js +218 -2
- package/dist/InputMultiple.es.js +1 -1
- package/dist/{LayoutGeneric-CbaoatQB.js → LayoutGeneric-CfWhV1ov.js} +6 -6
- package/dist/LayoutGeneric.es.js +1 -1
- package/dist/Logo.es.js +1 -1
- package/dist/Menu.es.js +1 -1
- package/dist/OtpInput.es.js +1 -1
- package/dist/Pagination.es.js +1 -1
- package/dist/ProfilePictureUpload.es.js +1 -1
- package/dist/ProgressBar.es.js +1 -1
- package/dist/RadioButton.es.js +2 -2
- package/dist/RecurrentDatePicker.es.js +7 -7
- package/dist/RecurrentDatePickerRRule.es.js +2 -4
- package/dist/Scrollable.d.ts +2 -0
- package/dist/Scrollable.es.js +260 -0
- package/dist/SegmentedButton.es.js +1 -1
- package/dist/{Select-DW30oGym.js → Select-BdxmkrjB.js} +14 -13
- package/dist/Select.es.js +1 -1
- package/dist/SelectSearch.d.ts +2 -0
- package/dist/SelectSearch.es.js +147 -131
- package/dist/Skeleton.es.js +1 -1
- package/dist/Spinner.es.js +1 -1
- package/dist/Steps.es.js +1 -1
- package/dist/SwipeContainer.es.js +1 -1
- package/dist/Switch.es.js +7 -7
- package/dist/TabLinks.es.js +9 -9
- package/dist/Table.es.js +1 -1
- package/dist/TextArea.es.js +1 -1
- package/dist/Toast.es.js +1 -1
- package/dist/ToastProvider.es.js +1 -1
- package/dist/Tooltip.es.js +1 -1
- package/dist/components/Avatar/Avatar.d.ts +1 -1
- package/dist/components/Drawer/DrawerDesktop.d.ts +1 -0
- package/dist/components/NavigationDrawer/NavItemSecondary.d.ts +1 -0
- package/dist/components/NavigationDrawer/NavigationDrawer.d.ts +41 -21
- package/dist/components/NavigationDrawer/NavigationDrawerActionItem.d.ts +16 -0
- package/dist/components/NavigationDrawer/NavigationDrawerActions.d.ts +9 -0
- package/dist/components/NavigationDrawer/NavigationDrawerItemBase.d.ts +18 -0
- package/dist/components/NavigationDrawer/{NavItem.d.ts → NavigationDrawerLinkItem.d.ts} +10 -4
- package/dist/components/NavigationDrawer/NavigationDrawerNavlinks.d.ts +11 -0
- package/dist/components/NotificationCard/NotificationCard.d.ts +25 -0
- package/dist/components/PyrionNavigationDrawer/PyrionHelpSection.d.ts +8 -0
- package/dist/components/PyrionNavigationDrawer/PyrionNavigationDrawer.d.ts +130 -0
- package/dist/components/PyrionNavigationDrawer/PyrionNavigationDrawerMobileAppSwitcher.d.ts +10 -0
- package/dist/components/PyrionNavigationDrawer/PyrionNavigationDrawerSystemLogo.d.ts +7 -0
- package/dist/components/PyrionNavigationDrawer/PyrionNotificationsList.d.ts +8 -0
- package/dist/components/PyrionNavigationDrawer/SidebarContent.d.ts +13 -0
- package/dist/components/PyrionNavigationDrawer/SystemSessions.d.ts +12 -0
- package/dist/components/Scrollable/Scrollable.d.ts +31 -0
- package/dist/components/SelectSearch/SelectSearch.d.ts +6 -2
- package/dist/components/Sidebar/components/badge.d.ts +2 -1
- package/dist/components/TabSwitch/TabSwitch.d.ts +0 -20
- package/dist/components/TicketCard/TicketCard.d.ts +32 -0
- package/dist/components/UserCard/UserCard.d.ts +12 -0
- package/dist/exports/Scrollable.d.ts +2 -0
- package/dist/exports/SelectSearch.d.ts +2 -0
- package/dist/hooks/useLabelBackground.d.ts +1 -0
- package/dist/{jsx-runtime-DKDX3adD.js → jsx-runtime-GkKLlHH4.js} +2 -20
- package/dist/lib/utils.d.ts +2 -2
- package/dist/prometeo-design-system.es.js +54 -51
- package/dist/styles.css +1 -1
- package/dist/useLabelBackground-BDIHUdND.js +26 -0
- package/package.json +9 -5
- package/src/styles/base.css +47 -0
- package/src/styles/intellisense.css +1 -0
- package/src/styles/palette.css +3 -0
- package/src/styles/utilities.css +18 -0
- package/dist/DatePicker-D1EwMGIN.js +0 -3568
- package/dist/Input-EkMrxcNX.js +0 -241
- package/dist/components/PyrionNavigationDrawer/PyirionNavigationDrawer.d.ts +0 -40
package/dist/SelectSearch.es.js
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { g as i, S as
|
|
3
|
-
import { useState as
|
|
4
|
-
function
|
|
1
|
+
import { j as Y } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
+
import { g as i, S as Z } from "./Select-BdxmkrjB.js";
|
|
3
|
+
import { useState as A, useRef as E, useEffect as b, useMemo as ee, useCallback as te } from "react";
|
|
4
|
+
function re(e) {
|
|
5
5
|
const {
|
|
6
6
|
options: O,
|
|
7
|
-
fetcher:
|
|
8
|
-
asyncMode:
|
|
9
|
-
disabled:
|
|
10
|
-
debounceDelay:
|
|
11
|
-
minCharacters:
|
|
7
|
+
fetcher: d,
|
|
8
|
+
asyncMode: _ = "fetch_in_open",
|
|
9
|
+
disabled: w = !1,
|
|
10
|
+
debounceDelay: P = 500,
|
|
11
|
+
minCharacters: T = 3,
|
|
12
12
|
optionLabel: h,
|
|
13
13
|
optionValue: s,
|
|
14
|
-
controlledValue:
|
|
14
|
+
controlledValue: f,
|
|
15
15
|
isOpen: F,
|
|
16
|
-
inputRef:
|
|
17
|
-
name:
|
|
18
|
-
} = e || {}, M = O ? O.filter((t) => t != null) : [], [
|
|
16
|
+
inputRef: y,
|
|
17
|
+
name: k
|
|
18
|
+
} = e || {}, M = O ? O.filter((t) => t != null) : [], [V, g] = A(M || []), [D, I] = A(M || []), [c, N] = A(""), [W, v] = A(!1), [J, U] = A(!1), o = E(null), C = E(null), m = E(!1), L = E(d), S = e?.multiple === !0 || !1, j = E(S ? [] : void 0), [a, p] = A(S ? [] : void 0);
|
|
19
19
|
b(() => {
|
|
20
|
-
|
|
21
|
-
}, [u]), b(() => {
|
|
22
|
-
if (L) {
|
|
23
|
-
const t = z(d, "value");
|
|
24
|
-
v(t);
|
|
25
|
-
} else
|
|
26
|
-
d != null ? v(d) : v(void 0);
|
|
20
|
+
L.current = d;
|
|
27
21
|
}, [d]), b(() => {
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
if (S) {
|
|
23
|
+
const t = z(f, "value");
|
|
24
|
+
p(t);
|
|
25
|
+
} else
|
|
26
|
+
f != null ? p(f) : p(void 0);
|
|
27
|
+
}, [f]), b(() => {
|
|
28
|
+
j.current = f !== void 0 ? f : a;
|
|
29
|
+
}, [f, a]), b(() => {
|
|
30
30
|
if (e?.options) {
|
|
31
31
|
const t = e.options.filter((n) => n != null);
|
|
32
|
-
|
|
32
|
+
g(t), I(t);
|
|
33
33
|
}
|
|
34
34
|
}, [e?.options]);
|
|
35
|
-
const B =
|
|
36
|
-
|
|
37
|
-
}), [c]),
|
|
38
|
-
const n =
|
|
35
|
+
const B = ee(() => (t, n) => new Promise((l, r) => {
|
|
36
|
+
o.current && clearTimeout(o.current), o.current = setTimeout(() => t(c).then(l).catch(r), n);
|
|
37
|
+
}), [c]), ne = (t) => {
|
|
38
|
+
const n = f !== void 0, l = (r) => s ? i(r, s) : i(r, "id");
|
|
39
39
|
if (e?.multiple === !0) {
|
|
40
|
-
const r =
|
|
41
|
-
let
|
|
42
|
-
r.some((
|
|
40
|
+
const r = j.current || [];
|
|
41
|
+
let u;
|
|
42
|
+
r.some((x) => l(x) === l(t)) ? u = r.filter((x) => l(x) !== l(t)) : u = [...r, t], n ? (j.current = u, e?.onChange?.(u, k)) : (j.current = u, p(u), e?.onChange?.(u, k));
|
|
43
43
|
} else
|
|
44
|
-
n ? (
|
|
45
|
-
}, q = (t) => (e?.onFetchingStart?.(),
|
|
44
|
+
n ? (j.current = t, e?.onChange?.(t, k)) : (j.current = t, p(t), e?.onChange?.(t, k));
|
|
45
|
+
}, q = (t) => (e?.onFetchingStart?.(), L.current?.(t) || Promise.resolve([])), z = (t, n) => Array.isArray(t) ? (t.some((l) => typeof l != "object" || l === null) && console.debug(`El valor del ${n || "resultado del fetcher"} contiene elementos no válidos (null,undefined, no-object)`, t), t?.filter((l) => l != 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((l) => !t.some((r) => i(r, s) === i(l, s))) : n.filter((l) => !t.some((r) => i(r, "id") === i(l, "id"))), [s]);
|
|
46
46
|
b(() => {
|
|
47
47
|
const t = e?.subscribeOpenChange;
|
|
48
48
|
if (!t) return;
|
|
49
|
-
const n = t((
|
|
50
|
-
U(
|
|
49
|
+
const n = t((l) => {
|
|
50
|
+
U(l);
|
|
51
51
|
});
|
|
52
52
|
return () => {
|
|
53
53
|
n && n();
|
|
@@ -55,70 +55,70 @@ function le(e) {
|
|
|
55
55
|
}, [e?.subscribeOpenChange]);
|
|
56
56
|
const G = F !== void 0 ? F : J;
|
|
57
57
|
b(() => {
|
|
58
|
-
if (!
|
|
59
|
-
if (!c || c === "" || c.length <
|
|
60
|
-
|
|
58
|
+
if (!w && L.current && _ === "fetch_on_type") {
|
|
59
|
+
if (!c || c === "" || c.length < T) {
|
|
60
|
+
o.current && clearTimeout(o.current), v(!1);
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
63
|
-
const t = B(q,
|
|
64
|
-
|
|
65
|
-
const
|
|
66
|
-
|
|
63
|
+
const t = B(q, P);
|
|
64
|
+
v(!0), t.then((n) => {
|
|
65
|
+
const l = z(n);
|
|
66
|
+
g(l);
|
|
67
67
|
}).finally(() => {
|
|
68
|
-
|
|
68
|
+
v(!1), e?.onFetchingEnd?.();
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
|
-
}, [
|
|
72
|
-
if (!
|
|
71
|
+
}, [_, c, w, P, B, T]), b(() => {
|
|
72
|
+
if (!w)
|
|
73
73
|
if (G) {
|
|
74
|
-
if (e?.onOpen?.(),
|
|
75
|
-
if (!
|
|
74
|
+
if (e?.onOpen?.(), _ === "fetch_in_open") {
|
|
75
|
+
if (!L.current)
|
|
76
76
|
return;
|
|
77
|
-
|
|
77
|
+
v(!0), q().then((t) => {
|
|
78
78
|
const n = z(t);
|
|
79
|
-
|
|
80
|
-
const
|
|
79
|
+
g(() => {
|
|
80
|
+
const l = n.filter((r) => {
|
|
81
81
|
if (s)
|
|
82
82
|
return i(r, s) !== void 0;
|
|
83
83
|
});
|
|
84
|
-
return
|
|
84
|
+
return S && a.length > 0 ? [...$(a, l), ...a] : l;
|
|
85
85
|
});
|
|
86
86
|
}).finally(() => {
|
|
87
|
-
|
|
87
|
+
v(!1), e?.onFetchingEnd?.();
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
90
|
} else
|
|
91
91
|
e?.onClose?.();
|
|
92
|
-
}, [G,
|
|
93
|
-
const H = (t, n) => t?.filter((
|
|
92
|
+
}, [G, _, w]);
|
|
93
|
+
const H = (t, n) => t?.filter((l) => {
|
|
94
94
|
if (h)
|
|
95
|
-
return i(
|
|
95
|
+
return i(l, h)?.toLowerCase().includes(n.toLowerCase());
|
|
96
96
|
{
|
|
97
|
-
const r =
|
|
97
|
+
const r = l;
|
|
98
98
|
switch (typeof r) {
|
|
99
99
|
case "string":
|
|
100
100
|
return r?.toLowerCase().includes(n.toLowerCase());
|
|
101
101
|
case "number":
|
|
102
102
|
return r.toString().includes(n);
|
|
103
103
|
case "object":
|
|
104
|
-
return Object.values(r).some((
|
|
104
|
+
return Object.values(r).some((R) => R.toString()?.toLowerCase().includes(n.toLowerCase()));
|
|
105
105
|
default:
|
|
106
106
|
return !1;
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
}) || [],
|
|
109
|
+
}) || [], le = (t) => t?.sort((n, l) => {
|
|
110
110
|
if (h)
|
|
111
|
-
return i(n, h) < i(
|
|
111
|
+
return i(n, h) < i(l, h) ? -1 : 1;
|
|
112
112
|
{
|
|
113
|
-
const
|
|
114
|
-
switch (typeof
|
|
113
|
+
const u = ["label", "name", "value"].find((K) => typeof n == "object" && Object.keys(n).includes(K)), R = n, x = l;
|
|
114
|
+
switch (typeof R) {
|
|
115
115
|
case "string":
|
|
116
|
-
return
|
|
116
|
+
return R < x ? -1 : 1;
|
|
117
117
|
case "number":
|
|
118
|
-
return
|
|
118
|
+
return R < x ? -1 : 1;
|
|
119
119
|
case "object":
|
|
120
|
-
if (
|
|
121
|
-
const K = i(n,
|
|
120
|
+
if (u) {
|
|
121
|
+
const K = i(n, u), oe = i(l, u);
|
|
122
122
|
return K < oe ? -1 : 1;
|
|
123
123
|
} else
|
|
124
124
|
return 1;
|
|
@@ -127,138 +127,154 @@ function le(e) {
|
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
}) || [], Q = (t) => {
|
|
130
|
-
const n = typeof
|
|
131
|
-
t.target === n?.current && (
|
|
130
|
+
const n = typeof y == "function" ? y() : y;
|
|
131
|
+
t.target === n?.current && (C.current && clearTimeout(C.current), m.current || (m.current = !0, e?.onTypeStart?.()), C.current = setTimeout(() => {
|
|
132
132
|
m.current = !1;
|
|
133
|
-
},
|
|
133
|
+
}, P));
|
|
134
134
|
};
|
|
135
|
-
|
|
135
|
+
b(() => {
|
|
136
136
|
if (c === "")
|
|
137
|
-
I(
|
|
138
|
-
else if (
|
|
139
|
-
const t = $(
|
|
140
|
-
I([...H(t, c), ...
|
|
137
|
+
I(le(V));
|
|
138
|
+
else if (S) {
|
|
139
|
+
const t = $(a, V);
|
|
140
|
+
I([...H(t, c), ...a]);
|
|
141
141
|
} else {
|
|
142
|
-
const t = $([
|
|
143
|
-
I([...H(t, c),
|
|
142
|
+
const t = $([a], V);
|
|
143
|
+
I([...H(t, c), a]);
|
|
144
144
|
}
|
|
145
|
-
}, [
|
|
145
|
+
}, [V]), b(() => (document.addEventListener("keydown", Q), () => {
|
|
146
146
|
document.removeEventListener("keydown", Q);
|
|
147
|
-
}), [])
|
|
147
|
+
}), []);
|
|
148
|
+
const X = () => {
|
|
149
|
+
N("");
|
|
150
|
+
};
|
|
151
|
+
return {
|
|
148
152
|
inputValue: c,
|
|
149
153
|
setInputValue: N,
|
|
150
|
-
cleanInputValue:
|
|
151
|
-
N("");
|
|
152
|
-
},
|
|
154
|
+
cleanInputValue: X,
|
|
153
155
|
cleanOptions: () => {
|
|
154
|
-
|
|
156
|
+
if (S)
|
|
157
|
+
g(a);
|
|
158
|
+
else {
|
|
159
|
+
const t = a;
|
|
160
|
+
g(t ? [t] : []);
|
|
161
|
+
}
|
|
162
|
+
X();
|
|
155
163
|
},
|
|
156
164
|
clearValue: () => {
|
|
157
|
-
|
|
165
|
+
p(S ? [] : void 0);
|
|
158
166
|
},
|
|
159
167
|
filteredOptions: D,
|
|
160
168
|
isLoading: W,
|
|
161
|
-
value:
|
|
162
|
-
setValue:
|
|
163
|
-
onOptionClick:
|
|
169
|
+
value: a,
|
|
170
|
+
setValue: p,
|
|
171
|
+
onOptionClick: ne
|
|
164
172
|
};
|
|
165
173
|
}
|
|
166
174
|
const fe = (e) => {
|
|
167
|
-
const O =
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
minCharacters: l.minCharacters,
|
|
178
|
-
disabled: l.disabled,
|
|
179
|
-
optionValue: l.optionValue,
|
|
180
|
-
optionLabel: l.optionLabel,
|
|
175
|
+
const O = E(null), { asyncMode: d = "fetch_in_open" } = e, _ = (o, C, m) => {
|
|
176
|
+
const L = {
|
|
177
|
+
options: o.options,
|
|
178
|
+
fetcher: o.fetcher,
|
|
179
|
+
asyncMode: C,
|
|
180
|
+
debounceDelay: o.debounceDelay,
|
|
181
|
+
minCharacters: o.minCharacters,
|
|
182
|
+
disabled: o.disabled,
|
|
183
|
+
optionValue: o.optionValue,
|
|
184
|
+
optionLabel: o.optionLabel,
|
|
181
185
|
onFetchingStart: () => {
|
|
182
|
-
|
|
186
|
+
C === "fetch_on_type" && m.current?.open();
|
|
183
187
|
},
|
|
184
188
|
onTypeStart: () => {
|
|
185
|
-
!
|
|
189
|
+
!o?.fetcher && m.current?.open();
|
|
186
190
|
},
|
|
187
191
|
inputRef: () => m.current?.searchInputRef,
|
|
188
192
|
subscribeOpenChange: m.current?.subscribeOpenChange,
|
|
189
|
-
name:
|
|
193
|
+
name: o.name
|
|
190
194
|
};
|
|
191
|
-
return
|
|
192
|
-
...
|
|
195
|
+
return o.multiple ? {
|
|
196
|
+
...L,
|
|
193
197
|
multiple: !0,
|
|
194
|
-
controlledValue:
|
|
195
|
-
onChange:
|
|
198
|
+
controlledValue: o.value,
|
|
199
|
+
onChange: o.onChange
|
|
196
200
|
} : {
|
|
197
|
-
...
|
|
201
|
+
...L,
|
|
198
202
|
multiple: !1,
|
|
199
|
-
controlledValue:
|
|
200
|
-
onChange:
|
|
203
|
+
controlledValue: o.value,
|
|
204
|
+
onChange: o.onChange
|
|
201
205
|
};
|
|
202
|
-
}, { inputValue:
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
206
|
+
}, { inputValue: w, setInputValue: P, filteredOptions: T, isLoading: h, value: s, onOptionClick: f, cleanInputValue: F, cleanOptions: y, clearValue: k } = re(_(e, d, O));
|
|
207
|
+
b(() => {
|
|
208
|
+
!e.controls || !O.current || (e.controls.current = {
|
|
209
|
+
...O.current,
|
|
210
|
+
cleanOptions: () => {
|
|
211
|
+
y();
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
}, [e.controls, y]);
|
|
215
|
+
const M = te(
|
|
216
|
+
() => d === "fetch_on_type" ? h : !1,
|
|
217
|
+
[d, h]
|
|
218
|
+
), V = ee(() => e.multiple ? s.map((o) => i(o, e.optionValue)) : s ? i(s, e.optionValue) : void 0, [s, e.optionValue, e.multiple]), g = (o) => {
|
|
219
|
+
const C = T.find((m) => i(m, e.optionValue) === o.id);
|
|
220
|
+
C && f(C);
|
|
221
|
+
}, { displayMode: D = e.multiple ? "chips" : "compact", dropdownOptions: I, overflow: c = "scroll", onChange: N, onClear: W, ...v } = e.selectComponentProps || {}, J = {
|
|
222
|
+
controledSearchValue: w,
|
|
223
|
+
onSearchValueChange: d === "fetch_on_type" ? P : void 0,
|
|
224
|
+
onSearchClear: d === "fetch_on_type" ? () => {
|
|
225
|
+
F(), y();
|
|
210
226
|
} : void 0,
|
|
211
227
|
inputSearchPlaceholder: e.inputSearchPlaceholder,
|
|
212
228
|
isLoading: M(),
|
|
213
229
|
...I || {}
|
|
214
230
|
}, U = () => {
|
|
215
|
-
|
|
231
|
+
k(), e?.selectComponentProps?.onClear?.();
|
|
216
232
|
};
|
|
217
|
-
return e.multiple ? /* @__PURE__ */
|
|
218
|
-
|
|
233
|
+
return e.multiple ? /* @__PURE__ */ Y.jsx(
|
|
234
|
+
Z,
|
|
219
235
|
{
|
|
220
236
|
disabled: e.disabled,
|
|
221
237
|
className: e.className,
|
|
222
238
|
name: e.name,
|
|
223
239
|
overflow: c,
|
|
224
|
-
...
|
|
240
|
+
...v,
|
|
225
241
|
onClear: e?.selectComponentProps?.onClear && U,
|
|
226
242
|
multiple: !0,
|
|
227
|
-
value:
|
|
243
|
+
value: V,
|
|
228
244
|
label: e.label || "",
|
|
229
|
-
options:
|
|
245
|
+
options: T,
|
|
230
246
|
optionValue: e.optionValue,
|
|
231
247
|
optionLabel: e.optionLabel,
|
|
232
248
|
renderOption: e.renderOption,
|
|
233
|
-
onOptionClick:
|
|
249
|
+
onOptionClick: g,
|
|
234
250
|
displayMode: D,
|
|
235
251
|
controls: O,
|
|
236
252
|
emptyMessage: "Use el buscador para obtener las opciones disponibles",
|
|
237
253
|
dropdownOptions: J,
|
|
238
|
-
isLoading:
|
|
254
|
+
isLoading: d === "fetch_in_open" ? h : !1
|
|
239
255
|
}
|
|
240
|
-
) : /* @__PURE__ */
|
|
241
|
-
|
|
256
|
+
) : /* @__PURE__ */ Y.jsx(
|
|
257
|
+
Z,
|
|
242
258
|
{
|
|
243
259
|
disabled: e.disabled,
|
|
244
|
-
...
|
|
260
|
+
...v,
|
|
245
261
|
onClear: U,
|
|
246
262
|
className: e.className,
|
|
247
263
|
overflow: c,
|
|
248
264
|
name: e.name,
|
|
249
265
|
multiple: !1,
|
|
250
|
-
value:
|
|
266
|
+
value: V,
|
|
251
267
|
label: e.label || "",
|
|
252
|
-
options:
|
|
268
|
+
options: T,
|
|
253
269
|
optionValue: e.optionValue,
|
|
254
270
|
optionLabel: e.optionLabel,
|
|
255
271
|
renderOption: e.renderOption,
|
|
256
|
-
onOptionClick:
|
|
272
|
+
onOptionClick: g,
|
|
257
273
|
displayMode: "compact",
|
|
258
274
|
controls: O,
|
|
259
275
|
emptyMessage: "Use el buscador para obtener las opciones disponibles",
|
|
260
276
|
dropdownOptions: J,
|
|
261
|
-
isLoading:
|
|
277
|
+
isLoading: d === "fetch_in_open" ? h : !1
|
|
262
278
|
}
|
|
263
279
|
);
|
|
264
280
|
};
|
package/dist/Skeleton.es.js
CHANGED
package/dist/Spinner.es.js
CHANGED
package/dist/Steps.es.js
CHANGED
package/dist/Switch.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { j as a } from "./jsx-runtime-
|
|
1
|
+
import { j as a } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
2
|
import { c as r } from "./cn-B6yFEsav.js";
|
|
3
3
|
import { memo as w, useRef as b } from "react";
|
|
4
|
-
import { motion as
|
|
5
|
-
const
|
|
4
|
+
import { motion as l } from "framer-motion";
|
|
5
|
+
const c = ({ name: d, value: o, onChange: f, disabled: t = !1 }) => {
|
|
6
6
|
const n = b(null), h = (u) => {
|
|
7
7
|
if (!n.current || t) return;
|
|
8
8
|
u.preventDefault(), u.stopPropagation();
|
|
@@ -59,7 +59,7 @@ const l = ({ name: d, value: o, onChange: f, disabled: t = !1 }) => {
|
|
|
59
59
|
i[e][s].container
|
|
60
60
|
),
|
|
61
61
|
children: /* @__PURE__ */ a.jsx(
|
|
62
|
-
|
|
62
|
+
l.span,
|
|
63
63
|
{
|
|
64
64
|
animate: m[e],
|
|
65
65
|
whileHover: t ? {} : {
|
|
@@ -70,7 +70,7 @@ const l = ({ name: d, value: o, onChange: f, disabled: t = !1 }) => {
|
|
|
70
70
|
"size-10 aspect-square rounded-full absolute top-1/2 -translate-y-1/2"
|
|
71
71
|
),
|
|
72
72
|
children: /* @__PURE__ */ a.jsx(
|
|
73
|
-
|
|
73
|
+
l.span,
|
|
74
74
|
{
|
|
75
75
|
animate: p[e],
|
|
76
76
|
whileTap: t ? {} : {
|
|
@@ -89,8 +89,8 @@ const l = ({ name: d, value: o, onChange: f, disabled: t = !1 }) => {
|
|
|
89
89
|
)
|
|
90
90
|
] });
|
|
91
91
|
};
|
|
92
|
-
|
|
93
|
-
const y = w(
|
|
92
|
+
c.displayName = "Switch";
|
|
93
|
+
const y = w(c);
|
|
94
94
|
export {
|
|
95
95
|
y as Switch,
|
|
96
96
|
y as default
|
package/dist/TabLinks.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { j as n } from "./jsx-runtime-
|
|
1
|
+
import { j as n } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
2
|
import { motion as x } from "framer-motion";
|
|
3
3
|
import { memo as N } from "react";
|
|
4
4
|
import { c as r } from "./cn-B6yFEsav.js";
|
|
5
|
-
function
|
|
5
|
+
function c({
|
|
6
6
|
items: t,
|
|
7
7
|
activeTab: e,
|
|
8
8
|
onTabChange: i,
|
|
9
9
|
className: l,
|
|
10
10
|
tabClassName: d,
|
|
11
|
-
activeTabClassName:
|
|
11
|
+
activeTabClassName: o,
|
|
12
12
|
indicatorClassName: f,
|
|
13
13
|
animated: b = !0,
|
|
14
14
|
renderTab: m
|
|
@@ -25,18 +25,18 @@ function o({
|
|
|
25
25
|
),
|
|
26
26
|
role: "tablist",
|
|
27
27
|
children: t?.map((a) => {
|
|
28
|
-
const s = e === a.id,
|
|
29
|
-
return m ? /* @__PURE__ */ n.jsx("div", { children: m(a, s,
|
|
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(
|
|
30
30
|
"button",
|
|
31
31
|
{
|
|
32
|
-
onClick:
|
|
32
|
+
onClick: u,
|
|
33
33
|
disabled: a.disabled,
|
|
34
34
|
className: r(
|
|
35
35
|
"relative flex justify-center items-center h-10 px-4 font-medium focus:outline-none transition-colors",
|
|
36
36
|
!a.disabled && "hover:text-primary-default-default cursor-pointer",
|
|
37
37
|
a.disabled && "opacity-50 cursor-default",
|
|
38
38
|
d,
|
|
39
|
-
s &&
|
|
39
|
+
s && o
|
|
40
40
|
),
|
|
41
41
|
tabIndex: a.disabled ? -1 : 0,
|
|
42
42
|
"aria-label": a.title,
|
|
@@ -78,8 +78,8 @@ function o({
|
|
|
78
78
|
}
|
|
79
79
|
);
|
|
80
80
|
}
|
|
81
|
-
|
|
82
|
-
const C = N(
|
|
81
|
+
c.displayName = "TabLinks";
|
|
82
|
+
const C = N(c, (t, e) => {
|
|
83
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)
|
|
84
84
|
return !1;
|
|
85
85
|
for (let i = 0; i < t.items.length; i++) {
|
package/dist/Table.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as r } from "./jsx-runtime-
|
|
1
|
+
import { j as r } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
2
|
import { c as l } from "./cn-B6yFEsav.js";
|
|
3
3
|
import * as o from "react";
|
|
4
4
|
const n = o.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ r.jsx("div", { className: "w-full", children: /* @__PURE__ */ r.jsx(
|
package/dist/TextArea.es.js
CHANGED
package/dist/Toast.es.js
CHANGED
package/dist/ToastProvider.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as t } from "./jsx-runtime-
|
|
1
|
+
import { j as t } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
2
|
import { Toaster as r } from "sonner";
|
|
3
3
|
const i = ({ ...o }) => /* @__PURE__ */ t.jsx(r, { ...o, position: "bottom-right", richColors: !1, theme: "light" });
|
|
4
4
|
export {
|
package/dist/Tooltip.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-
|
|
1
|
+
import { j as e } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
2
|
import { AnimatePresence as f, motion as n } from "framer-motion";
|
|
3
3
|
import { useState as p, cloneElement as x } from "react";
|
|
4
4
|
import { Close as b } from "./Icons/Close.es.js";
|
|
@@ -7,5 +7,5 @@ interface IAvatar {
|
|
|
7
7
|
subImageUrl?: string;
|
|
8
8
|
borderColor?: string;
|
|
9
9
|
}
|
|
10
|
-
export default function Avatar({ imageUrl, sizeImage, sizeFallback, fallbackText, subImageUrl,
|
|
10
|
+
export default function Avatar({ imageUrl, sizeImage, sizeFallback, fallbackText, subImageUrl, }: IAvatar): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -15,6 +15,7 @@ export interface DrawerDesktopProps<TContext = unknown> {
|
|
|
15
15
|
attachToParent?: boolean;
|
|
16
16
|
closeOnOverlayClick?: boolean;
|
|
17
17
|
hideCloseButton?: boolean;
|
|
18
|
+
unmountChildrenOnClose?: boolean;
|
|
18
19
|
}
|
|
19
20
|
declare const DrawerDesktop: import('react').ForwardRefExoticComponent<DrawerDesktopProps<any> & import('react').RefAttributes<DrawerDesktopHandle<any>>>;
|
|
20
21
|
export default DrawerDesktop;
|