prometeo-design-system 7.4.4 → 7.4.6
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/Badge.d.ts +4 -0
- package/dist/Badge.es.js +2 -1
- package/dist/ListItem.es.js +70 -65
- package/dist/PyrionLayout.es.js +1 -1
- package/dist/SelectSearch.es.js +69 -68
- package/dist/Tabs.es.js +1 -1
- package/dist/components/Badge/Badge.d.ts +1 -1
- package/dist/components/Menu/ListItem.d.ts +1 -0
- package/dist/exports/Badge.d.ts +2 -1
- package/dist/index.d.ts +6 -2
- package/dist/prometeo-design-system.es.js +55 -53
- package/package.json +1 -1
package/dist/Badge.d.ts
CHANGED
package/dist/Badge.es.js
CHANGED
|
@@ -44,5 +44,6 @@ const u = "brand", o = 99, d = l("radius-full flex items-center justify-center f
|
|
|
44
44
|
className: n
|
|
45
45
|
}) => /* @__PURE__ */ t.jsx("div", { className: m(d({ size: e, color: a, isTextVariant: s }), n), children: r });
|
|
46
46
|
export {
|
|
47
|
-
N as Badge
|
|
47
|
+
N as Badge,
|
|
48
|
+
N as default
|
|
48
49
|
};
|
package/dist/ListItem.es.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { j as a } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
-
import { i as
|
|
2
|
+
import { i as _ } from "./iconUtils-rTOfKDxE.js";
|
|
3
3
|
import { c as d } from "./cn-B6yFEsav.js";
|
|
4
4
|
import { c as m } from "./index-BOQuZ0gG.js";
|
|
5
|
-
import { memo as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { ChevronDown as
|
|
9
|
-
import { A as
|
|
10
|
-
const
|
|
5
|
+
import { memo as g, forwardRef as j, useMemo as h } from "react";
|
|
6
|
+
import y from "./CheckBox.es.js";
|
|
7
|
+
import U from "./Divider.es.js";
|
|
8
|
+
import { ChevronDown as F } from "./Icons/ChevronDown.es.js";
|
|
9
|
+
import { A as K } from "./AvatarBase-D6H-sXbg.js";
|
|
10
|
+
const M = {
|
|
11
11
|
size: "small",
|
|
12
12
|
name: "A B"
|
|
13
|
-
},
|
|
13
|
+
}, Z = g(function({
|
|
14
14
|
avatarProps: e,
|
|
15
15
|
className: t
|
|
16
16
|
}) {
|
|
17
|
-
return /* @__PURE__ */ a.jsx(
|
|
18
|
-
}),
|
|
17
|
+
return /* @__PURE__ */ a.jsx(K, { ...e, className: d(t, "shrink-0") });
|
|
18
|
+
}), q = m("group flex flex-col w-full py-1 gap-2 ", {
|
|
19
19
|
variants: {
|
|
20
20
|
size: {
|
|
21
21
|
small: "",
|
|
@@ -23,7 +23,7 @@ const F = {
|
|
|
23
23
|
large: ""
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
}),
|
|
26
|
+
}), G = m("flex items-center gap-2 transition-all duration-300 ease-in-out", {
|
|
27
27
|
variants: {
|
|
28
28
|
size: {
|
|
29
29
|
small: "p-1 pl-2 radius-medium",
|
|
@@ -49,7 +49,7 @@ const F = {
|
|
|
49
49
|
class: "bg-transparent group-hover:bg-transparent group-active:bg-transparent cursor-default"
|
|
50
50
|
}
|
|
51
51
|
]
|
|
52
|
-
}),
|
|
52
|
+
}), S = m(" transition-all duration-300 ease-in-out", {
|
|
53
53
|
variants: {
|
|
54
54
|
isSelected: {
|
|
55
55
|
true: "",
|
|
@@ -72,7 +72,7 @@ const F = {
|
|
|
72
72
|
class: "icon-neutral-tertiary-default group-hover:icon-neutral-tertiary-hover group-active:icon-neutral-tertiary-pressed"
|
|
73
73
|
}
|
|
74
74
|
]
|
|
75
|
-
}),
|
|
75
|
+
}), H = "flex gap-1 items-center flex-1 overflow-hidden", J = m("flex flex-col gap-0 p-0 overflow-hidden", {
|
|
76
76
|
variants: {
|
|
77
77
|
size: {
|
|
78
78
|
small: "",
|
|
@@ -80,7 +80,7 @@ const F = {
|
|
|
80
80
|
large: ""
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
}),
|
|
83
|
+
}), Q = m("transition-all duration-300 ease-in-out text-left truncate", {
|
|
84
84
|
variants: {
|
|
85
85
|
size: {
|
|
86
86
|
small: "",
|
|
@@ -144,7 +144,7 @@ const F = {
|
|
|
144
144
|
class: "text-disabled-default group-hover:text-disabled-default group-active:text-disabled-default"
|
|
145
145
|
}
|
|
146
146
|
]
|
|
147
|
-
}),
|
|
147
|
+
}), W = m("text-left transition-all duration-300 ease-in-out truncate", {
|
|
148
148
|
variants: {
|
|
149
149
|
size: {
|
|
150
150
|
small: "pyrion-fonts-body-xsmall ",
|
|
@@ -184,77 +184,77 @@ const F = {
|
|
|
184
184
|
class: ""
|
|
185
185
|
}
|
|
186
186
|
]
|
|
187
|
-
}),
|
|
187
|
+
}), C = {
|
|
188
188
|
small: 16,
|
|
189
189
|
medium: 20,
|
|
190
190
|
large: 24
|
|
191
|
-
},
|
|
191
|
+
}, X = g(function({
|
|
192
192
|
icon: e,
|
|
193
193
|
size: t,
|
|
194
194
|
className: r,
|
|
195
|
-
onClick:
|
|
195
|
+
onClick: n
|
|
196
196
|
}) {
|
|
197
197
|
const s = (f) => {
|
|
198
|
-
f.preventDefault(),
|
|
198
|
+
f.preventDefault(), n(f);
|
|
199
199
|
};
|
|
200
|
-
return /* @__PURE__ */ a.jsx("button", { type: "button", onClick: s, className: d("cursor-pointer", r), children: /* @__PURE__ */ a.jsx(e, { size:
|
|
200
|
+
return /* @__PURE__ */ a.jsx("button", { type: "button", onClick: s, className: d("cursor-pointer", r), children: /* @__PURE__ */ a.jsx(e, { size: C[t] }) });
|
|
201
201
|
});
|
|
202
|
-
function
|
|
203
|
-
let
|
|
204
|
-
return
|
|
205
|
-
|
|
202
|
+
function z(i, e, t, r) {
|
|
203
|
+
let n = null;
|
|
204
|
+
return _(i) && (n = i), n ? r ? /* @__PURE__ */ a.jsx(
|
|
205
|
+
X,
|
|
206
206
|
{
|
|
207
|
-
icon:
|
|
207
|
+
icon: n,
|
|
208
208
|
size: e,
|
|
209
209
|
className: t,
|
|
210
210
|
onClick: r
|
|
211
211
|
}
|
|
212
|
-
) : /* @__PURE__ */ a.jsx(
|
|
212
|
+
) : /* @__PURE__ */ a.jsx(n, { size: C[e], className: t }) : /* @__PURE__ */ a.jsx("span", { className: d("size-6 invisible") });
|
|
213
213
|
}
|
|
214
|
-
const
|
|
214
|
+
const Y = j(({ elementType: i, ...e }, t) => {
|
|
215
215
|
const r = d("menu-list-item", e.className);
|
|
216
|
-
return
|
|
217
|
-
}),
|
|
216
|
+
return i === "button" ? /* @__PURE__ */ a.jsx("button", { ref: t, ...e, className: r, children: e.children }) : i === "a" ? /* @__PURE__ */ a.jsx("a", { ref: t, ...e, className: r, children: e.children }) : /* @__PURE__ */ a.jsx("div", { ref: t, ...e, className: r, children: e.children });
|
|
217
|
+
}), de = g(j(
|
|
218
218
|
function(e, t) {
|
|
219
219
|
const {
|
|
220
220
|
size: r = "medium",
|
|
221
|
-
elementType:
|
|
221
|
+
elementType: n = "div",
|
|
222
222
|
isSelected: s = !1,
|
|
223
223
|
showDivider: f = !0,
|
|
224
|
-
disabled:
|
|
225
|
-
slot:
|
|
226
|
-
icon:
|
|
227
|
-
leadingIconClassName:
|
|
228
|
-
trailingIconClassName:
|
|
229
|
-
checkbox:
|
|
230
|
-
showSelectionComponent:
|
|
231
|
-
leadingIcon:
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
224
|
+
disabled: l = !1,
|
|
225
|
+
slot: $,
|
|
226
|
+
icon: N,
|
|
227
|
+
leadingIconClassName: I,
|
|
228
|
+
trailingIconClassName: k,
|
|
229
|
+
checkbox: T,
|
|
230
|
+
showSelectionComponent: A,
|
|
231
|
+
leadingIcon: V,
|
|
232
|
+
leadingSlot: p,
|
|
233
|
+
showTrailingIcon: w,
|
|
234
|
+
trailingIcon: D,
|
|
235
|
+
onTrailingIconClick: L,
|
|
235
236
|
avatarProps: o,
|
|
236
|
-
role:
|
|
237
|
-
...
|
|
238
|
-
} = e,
|
|
237
|
+
role: P,
|
|
238
|
+
...E
|
|
239
|
+
} = e, R = t, b = !!(T || A), v = V || N, c = r ?? "small", x = typeof p == "function" ? p({ isSelected: s, disabled: l, checkbox: b }) : p, B = h(
|
|
239
240
|
() => !!o && ("imageUrl" in o || "name" in o),
|
|
240
241
|
[o]
|
|
241
|
-
),
|
|
242
|
-
() => ({ ...
|
|
242
|
+
), O = h(
|
|
243
|
+
() => ({ ...M, ...o }),
|
|
243
244
|
[o?.imageUrl, o?.name]
|
|
244
245
|
);
|
|
245
246
|
return /* @__PURE__ */ a.jsxs(
|
|
246
|
-
|
|
247
|
+
Y,
|
|
247
248
|
{
|
|
248
|
-
ref:
|
|
249
|
-
elementType:
|
|
250
|
-
...
|
|
251
|
-
role:
|
|
252
|
-
className:
|
|
253
|
-
"aria-disabled":
|
|
249
|
+
ref: R,
|
|
250
|
+
elementType: n,
|
|
251
|
+
...E,
|
|
252
|
+
role: P ?? "menuitem",
|
|
253
|
+
className: q({ size: c }),
|
|
254
|
+
"aria-disabled": l ? "true" : "false",
|
|
254
255
|
"data-selected": s ? "true" : "false",
|
|
255
256
|
children: [
|
|
256
|
-
/* @__PURE__ */ a.jsxs("div", { className:
|
|
257
|
-
!b && g && y(g, c, d(h({ isSelected: s, disabled: n }), C)),
|
|
257
|
+
/* @__PURE__ */ a.jsxs("div", { className: G({ size: c, isSelected: s, disabled: l }), children: [
|
|
258
258
|
b && (e.onSelectionClick ? /* @__PURE__ */ a.jsx(
|
|
259
259
|
"span",
|
|
260
260
|
{
|
|
@@ -269,24 +269,29 @@ const W = S(({ elementType: l, ...e }, t) => {
|
|
|
269
269
|
},
|
|
270
270
|
tabIndex: 0,
|
|
271
271
|
className: "cursor-pointer",
|
|
272
|
-
children: /* @__PURE__ */ a.jsx(
|
|
272
|
+
children: /* @__PURE__ */ a.jsx(y, { checked: s, readOnly: !0, disabled: l })
|
|
273
273
|
}
|
|
274
|
-
) : /* @__PURE__ */ a.jsx(
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
274
|
+
) : /* @__PURE__ */ a.jsx(y, { checked: s, readOnly: !0, disabled: l })),
|
|
275
|
+
x ?? (!b && v && z(
|
|
276
|
+
v,
|
|
277
|
+
c,
|
|
278
|
+
d(S({ isSelected: s, disabled: l }), I)
|
|
279
|
+
)),
|
|
280
|
+
/* @__PURE__ */ a.jsxs("div", { className: H, children: [
|
|
281
|
+
B && /* @__PURE__ */ a.jsx(Z, { avatarProps: O }),
|
|
282
|
+
/* @__PURE__ */ a.jsxs("div", { className: J({ size: c }), children: [
|
|
283
|
+
e.label && /* @__PURE__ */ a.jsx("p", { className: d(Q({ size: c, isSelected: s, disabled: l }), e.labelClassName), children: e.label }),
|
|
284
|
+
e.supportingText && /* @__PURE__ */ a.jsx("p", { title: e.supportingText, className: W({ size: c, isSelected: s, disabled: l }), children: e.supportingText })
|
|
280
285
|
] })
|
|
281
286
|
] }),
|
|
282
|
-
|
|
287
|
+
z(D || (w ? F : null), "large", d(S({ isSelected: s, disabled: l }), k), L)
|
|
283
288
|
] }),
|
|
284
|
-
f && /* @__PURE__ */ a.jsx(
|
|
289
|
+
f && /* @__PURE__ */ a.jsx(U, {})
|
|
285
290
|
]
|
|
286
291
|
}
|
|
287
292
|
);
|
|
288
293
|
}
|
|
289
294
|
));
|
|
290
295
|
export {
|
|
291
|
-
|
|
296
|
+
de as default
|
|
292
297
|
};
|
package/dist/PyrionLayout.es.js
CHANGED
|
@@ -7,7 +7,7 @@ import { createPortal as me } from "react-dom";
|
|
|
7
7
|
import { u as $, N as D } from "./NavigationDrawer-BaEoMYbB.js";
|
|
8
8
|
import { c as ne } from "./index-BOQuZ0gG.js";
|
|
9
9
|
import bt from "./PlainTooltip.es.js";
|
|
10
|
-
import
|
|
10
|
+
import ht from "./Badge.es.js";
|
|
11
11
|
import { CrevronLeft as gt } from "./Icons/CrevronLeft.es.js";
|
|
12
12
|
import { Scrollable as re } from "./Scrollable.es.js";
|
|
13
13
|
import { useLocation as ge } from "react-router";
|
package/dist/SelectSearch.es.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as W } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
2
|
import { g as M } from "./utils-X4-h3cum.js";
|
|
3
|
-
import { useState as z, useRef as x, useEffect as F, useCallback as f, useMemo as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
3
|
+
import { useState as z, useRef as x, useEffect as F, useCallback as f, useMemo as X } from "react";
|
|
4
|
+
import Y from "./Select.es.js";
|
|
5
|
+
const he = {
|
|
6
6
|
fetch_in_open: "on-open",
|
|
7
7
|
fetch_on_type: "on-search"
|
|
8
8
|
};
|
|
9
|
-
function
|
|
10
|
-
return e ?
|
|
9
|
+
function Z(e) {
|
|
10
|
+
return e ? he[e] ?? e : "on-open";
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function me({
|
|
13
13
|
staticOptions: e = [],
|
|
14
14
|
fetcher: n,
|
|
15
15
|
fetchMode: C,
|
|
@@ -18,7 +18,7 @@ function he({
|
|
|
18
18
|
minCharacters: V = 0,
|
|
19
19
|
disabled: y = !1
|
|
20
20
|
}) {
|
|
21
|
-
const s =
|
|
21
|
+
const s = Z(C), T = s === "on-search" ? O ?? [] : e, [_, p] = z(T), [A, I] = z(!1), a = x(n), c = x(null), i = x(!0);
|
|
22
22
|
F(() => {
|
|
23
23
|
a.current = n;
|
|
24
24
|
}, [n]), F(() => (i.current = !0, () => {
|
|
@@ -28,7 +28,7 @@ function he({
|
|
|
28
28
|
}, [e]);
|
|
29
29
|
const h = f(async (m) => {
|
|
30
30
|
if (!(!a.current || y)) {
|
|
31
|
-
|
|
31
|
+
I(!0);
|
|
32
32
|
try {
|
|
33
33
|
const j = await a.current(m);
|
|
34
34
|
if (!i.current) return;
|
|
@@ -37,7 +37,7 @@ function he({
|
|
|
37
37
|
if (!i.current) return;
|
|
38
38
|
p([]);
|
|
39
39
|
} finally {
|
|
40
|
-
i.current &&
|
|
40
|
+
i.current && I(!1);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
}, [y]), u = f(() => {
|
|
@@ -57,14 +57,14 @@ function he({
|
|
|
57
57
|
handleSearchClear: r
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function ge(e, n) {
|
|
61
61
|
if (e)
|
|
62
62
|
return M(e, n);
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function Ce(e, n) {
|
|
65
65
|
return e ? e.map((C) => M(C, n)) : [];
|
|
66
66
|
}
|
|
67
|
-
const
|
|
67
|
+
const Ie = (e) => {
|
|
68
68
|
const n = "value" in e, C = e, {
|
|
69
69
|
options: O,
|
|
70
70
|
fetcher: b,
|
|
@@ -75,7 +75,7 @@ const _e = (e) => {
|
|
|
75
75
|
disabled: _,
|
|
76
76
|
multiple: p,
|
|
77
77
|
value: A,
|
|
78
|
-
defaultValue:
|
|
78
|
+
defaultValue: I,
|
|
79
79
|
onChange: a,
|
|
80
80
|
onClear: c,
|
|
81
81
|
label: i,
|
|
@@ -85,25 +85,25 @@ const _e = (e) => {
|
|
|
85
85
|
optionValue: r,
|
|
86
86
|
optionLabel: m,
|
|
87
87
|
renderOption: j,
|
|
88
|
-
renderSelection:
|
|
88
|
+
renderSelection: $,
|
|
89
89
|
controls: E,
|
|
90
|
-
labelVariant:
|
|
91
|
-
searchPlaceholder:
|
|
92
|
-
inputSearchPlaceholder:
|
|
90
|
+
labelVariant: q,
|
|
91
|
+
searchPlaceholder: ee,
|
|
92
|
+
inputSearchPlaceholder: ne,
|
|
93
93
|
selectComponentProps: D
|
|
94
|
-
} = C,
|
|
95
|
-
() => n ? void 0 :
|
|
96
|
-
), d = n ?
|
|
94
|
+
} = C, te = n ? A : void 0, oe = n ? void 0 : I, [re, k] = z(
|
|
95
|
+
() => n ? void 0 : oe
|
|
96
|
+
), d = n ? te : re, l = V ?? Z(y), H = ee ?? ne, se = "initialOptions" in e ? e.initialOptions : void 0, {
|
|
97
97
|
options: g,
|
|
98
|
-
isLoading:
|
|
98
|
+
isLoading: P,
|
|
99
99
|
handleOpen: N,
|
|
100
100
|
handleSearchChange: U,
|
|
101
|
-
handleSearchClear:
|
|
102
|
-
} =
|
|
101
|
+
handleSearchClear: w
|
|
102
|
+
} = me({
|
|
103
103
|
staticOptions: O,
|
|
104
104
|
fetcher: b,
|
|
105
105
|
fetchMode: l,
|
|
106
|
-
initialOptions:
|
|
106
|
+
initialOptions: se,
|
|
107
107
|
debounceDelay: s,
|
|
108
108
|
minCharacters: T,
|
|
109
109
|
disabled: _
|
|
@@ -116,10 +116,10 @@ const _e = (e) => {
|
|
|
116
116
|
});
|
|
117
117
|
return E && (E.current = {
|
|
118
118
|
...t,
|
|
119
|
-
cleanOptions:
|
|
119
|
+
cleanOptions: w
|
|
120
120
|
}), o;
|
|
121
|
-
}, [E,
|
|
122
|
-
const
|
|
121
|
+
}, [E, w, N]);
|
|
122
|
+
const ae = X(() => {
|
|
123
123
|
if (l !== "on-search") return g;
|
|
124
124
|
const t = new Set(
|
|
125
125
|
g.map((v) => M(v, r))
|
|
@@ -130,7 +130,7 @@ const _e = (e) => {
|
|
|
130
130
|
}, [g, l, r, d]), L = f(
|
|
131
131
|
(t) => g.find((o) => M(o, r) === t),
|
|
132
132
|
[g, r]
|
|
133
|
-
),
|
|
133
|
+
), ce = f(
|
|
134
134
|
(t) => {
|
|
135
135
|
if (!t) {
|
|
136
136
|
n || k(void 0);
|
|
@@ -143,85 +143,86 @@ const _e = (e) => {
|
|
|
143
143
|
));
|
|
144
144
|
},
|
|
145
145
|
[L, n, a, u]
|
|
146
|
-
),
|
|
146
|
+
), le = f(
|
|
147
147
|
(t) => {
|
|
148
148
|
const o = t.reduce((S, v) => {
|
|
149
|
-
const
|
|
150
|
-
return
|
|
149
|
+
const Q = L(v.id);
|
|
150
|
+
return Q && S.push(Q), S;
|
|
151
151
|
}, []);
|
|
152
152
|
n || k(o), a?.(o, u);
|
|
153
153
|
},
|
|
154
154
|
[L, n, a, u]
|
|
155
155
|
), {
|
|
156
|
-
dropdownOptions:
|
|
157
|
-
onClear:
|
|
158
|
-
displayMode:
|
|
159
|
-
overflow:
|
|
160
|
-
groupSelection:
|
|
161
|
-
value:
|
|
162
|
-
defaultValue:
|
|
163
|
-
|
|
164
|
-
|
|
156
|
+
dropdownOptions: Oe,
|
|
157
|
+
onClear: ie,
|
|
158
|
+
displayMode: ue,
|
|
159
|
+
overflow: de = "scroll",
|
|
160
|
+
groupSelection: Se,
|
|
161
|
+
value: ve,
|
|
162
|
+
defaultValue: Me,
|
|
163
|
+
isLoading: G,
|
|
164
|
+
...fe
|
|
165
|
+
} = D ?? {}, J = c ?? ie, pe = X(() => {
|
|
165
166
|
const t = {
|
|
166
167
|
searchPlaceholder: H,
|
|
167
168
|
focusSearchInputOnOpen: !0,
|
|
168
|
-
isLoading: l === "on-search" ?
|
|
169
|
+
isLoading: l === "on-search" ? P : !1,
|
|
169
170
|
...D?.dropdownOptions ?? {}
|
|
170
171
|
};
|
|
171
172
|
return l === "on-search" ? {
|
|
172
173
|
...t,
|
|
173
174
|
onSearchValueChange: U,
|
|
174
|
-
onSearchClear:
|
|
175
|
+
onSearchClear: w
|
|
175
176
|
} : t;
|
|
176
177
|
}, [
|
|
177
178
|
l,
|
|
178
179
|
H,
|
|
179
|
-
|
|
180
|
+
P,
|
|
180
181
|
U,
|
|
181
|
-
|
|
182
|
+
w,
|
|
182
183
|
D?.dropdownOptions
|
|
183
|
-
]),
|
|
184
|
+
]), K = {
|
|
184
185
|
disabled: _,
|
|
185
186
|
className: R,
|
|
186
187
|
name: u,
|
|
187
188
|
placeholder: h,
|
|
188
189
|
label: i ?? "",
|
|
189
|
-
labelVariant:
|
|
190
|
-
options:
|
|
190
|
+
labelVariant: q,
|
|
191
|
+
options: ae,
|
|
191
192
|
optionValue: r,
|
|
192
193
|
optionLabel: m,
|
|
193
194
|
renderOption: j,
|
|
194
|
-
renderSelection:
|
|
195
|
+
renderSelection: $,
|
|
195
196
|
controls: B,
|
|
196
|
-
dropdownOptions:
|
|
197
|
+
dropdownOptions: pe,
|
|
197
198
|
emptyMessage: "Use el buscador para obtener las opciones disponibles",
|
|
198
|
-
overflow:
|
|
199
|
-
...
|
|
199
|
+
overflow: de,
|
|
200
|
+
...fe
|
|
200
201
|
};
|
|
201
|
-
return p ? /* @__PURE__ */
|
|
202
|
-
|
|
202
|
+
return p ? /* @__PURE__ */ W.jsx(
|
|
203
|
+
Y,
|
|
203
204
|
{
|
|
204
|
-
...
|
|
205
|
+
...K,
|
|
205
206
|
multiple: !0,
|
|
206
|
-
value:
|
|
207
|
-
onChange:
|
|
208
|
-
displayMode:
|
|
209
|
-
isLoading: l === "on-open" ?
|
|
210
|
-
onClear:
|
|
207
|
+
value: Ce(d, r),
|
|
208
|
+
onChange: le,
|
|
209
|
+
displayMode: ue ?? "chips",
|
|
210
|
+
isLoading: G ?? (l === "on-open" ? P : !1),
|
|
211
|
+
onClear: J
|
|
211
212
|
}
|
|
212
|
-
) : /* @__PURE__ */
|
|
213
|
-
|
|
213
|
+
) : /* @__PURE__ */ W.jsx(
|
|
214
|
+
Y,
|
|
214
215
|
{
|
|
215
|
-
...
|
|
216
|
+
...K,
|
|
216
217
|
multiple: !1,
|
|
217
|
-
value:
|
|
218
|
-
onChange:
|
|
218
|
+
value: ge(d, r),
|
|
219
|
+
onChange: ce,
|
|
219
220
|
displayMode: "compact",
|
|
220
|
-
isLoading: l === "on-open" ?
|
|
221
|
-
onClear:
|
|
221
|
+
isLoading: G ?? (l === "on-open" ? P : !1),
|
|
222
|
+
onClear: J
|
|
222
223
|
}
|
|
223
224
|
);
|
|
224
225
|
};
|
|
225
226
|
export {
|
|
226
|
-
|
|
227
|
+
Ie as default
|
|
227
228
|
};
|
package/dist/Tabs.es.js
CHANGED
|
@@ -2,7 +2,7 @@ import { j as r } from "./jsx-runtime-GkKLlHH4.js";
|
|
|
2
2
|
import I, { memo as m, useRef as R, useEffect as B, useCallback as y, useMemo as w } from "react";
|
|
3
3
|
import { c as d } from "./cn-B6yFEsav.js";
|
|
4
4
|
import { c as u } from "./index-BOQuZ0gG.js";
|
|
5
|
-
import
|
|
5
|
+
import M from "./Badge.es.js";
|
|
6
6
|
import { i as P } from "./iconUtils-rTOfKDxE.js";
|
|
7
7
|
import E from "./PlainTooltip.es.js";
|
|
8
8
|
import { Info as F } from "./Icons/Info.es.js";
|
|
@@ -33,4 +33,4 @@ type BadgeSmallProps = BadgeBaseProps & {
|
|
|
33
33
|
};
|
|
34
34
|
export type BadgeProps = BadgeIconProps | BadgeTextProps | BadgeCountProps | BadgeSmallProps;
|
|
35
35
|
export declare const Badge: (props: BadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
-
export
|
|
36
|
+
export default Badge;
|
|
@@ -10,6 +10,7 @@ export interface ListItemProps {
|
|
|
10
10
|
/** @deprecated use leadingIcon instead */
|
|
11
11
|
icon?: IconComponent;
|
|
12
12
|
leadingIcon?: IconComponent;
|
|
13
|
+
leadingSlot?: React.ReactNode | ((state: ListItemSlotState) => React.ReactNode);
|
|
13
14
|
/** @deprecated not allowed anymore */
|
|
14
15
|
iconClassName?: string;
|
|
15
16
|
leadingIconClassName?: ClassNameValue;
|
package/dist/exports/Badge.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -91,7 +91,9 @@ export { Collapsible } from './exports/Collapsible';
|
|
|
91
91
|
export type { CollapsibleProps, CollapsibleTriggerProps, CollapsibleContentProps, CollapsibleOrientation, } from './exports/Collapsible';
|
|
92
92
|
export { default as Breadcrumbs } from './exports/Breadcrumbs';
|
|
93
93
|
export { default as BreadcrumbItem } from './exports/Breadcrumbs';
|
|
94
|
-
export { Badge } from './
|
|
94
|
+
export { default as Badge } from './exports/Badge';
|
|
95
|
+
/** @deprecated Usar `Badge`. Componente legacy basado en `count`. */
|
|
96
|
+
export { Badge as BadgeLegacy } from './components/Sidebar/components/badge';
|
|
95
97
|
export { NavbarCollapseButton } from './components/Sidebar/components/collapse-button';
|
|
96
98
|
export { default as OtpInput } from './exports/OtpInput';
|
|
97
99
|
export { useModalControl, useModalState } from './exports/Modal';
|
|
@@ -117,7 +119,9 @@ export type { MenuControl } from './exports/Menu';
|
|
|
117
119
|
export type { MenuListProps } from './exports/MenuList';
|
|
118
120
|
export type { MenuListGroupProps, GroupContext, } from './exports/MenuList';
|
|
119
121
|
export type { OtpInputProps } from './exports/OtpInput';
|
|
120
|
-
export type { BadgeProps } from './
|
|
122
|
+
export type { BadgeProps } from './exports/Badge';
|
|
123
|
+
/** @deprecated Usar `BadgeProps`. */
|
|
124
|
+
export type { BadgeProps as BadgeLegacyProps } from './components/Sidebar/components/badge';
|
|
121
125
|
export type { NavbarCollapseButtonProps } from './components/Sidebar/components/collapse-button';
|
|
122
126
|
export type { SpinnerProps } from './exports/Spinner';
|
|
123
127
|
export type { SplitButtonProps, SplitButtonActionSlot, SplitButtonTrailingSlot, } from './exports/SplitButton';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { u as Le, c as Ne, b as Ie, a as Ve } from "./useDrawerControl-H3_CBNvK.js";
|
|
2
2
|
import J from "./HelperComponent.es.js";
|
|
3
|
-
import { DEFAULT_PAGE_SIZE_OPTIONS as Oe, DEFAULT_ROW_INTERACTION as Ae, HeadRow as Re, HeaderCell as ke, RowCell as je, Table as Me, TableBody as
|
|
3
|
+
import { DEFAULT_PAGE_SIZE_OPTIONS as Oe, DEFAULT_ROW_INTERACTION as Ae, HeadRow as Re, HeaderCell as ke, RowCell as je, Table as Me, TableBody as Be, LegacyTableBody as Pe, LegacyTableCaption as _e, LegacyTableCell as He, TableFooter as Fe, LegacyTableFooter as ze, LegacyTableHead as Ee, TableHeader as Ue, LegacyTableHeader as Ge, LegacyTable as Ze, TableRow as $e, LegacyTableRow as We } from "./Table.es.js";
|
|
4
4
|
import { Tab as Je, TabLinkItem as Ke, TabLinks as Qe, default as Xe } from "./Tabs.es.js";
|
|
5
5
|
import { j as o } from "./jsx-runtime-GkKLlHH4.js";
|
|
6
6
|
import { g as D } from "./utils-X4-h3cum.js";
|
|
7
7
|
import * as K from "react";
|
|
8
|
-
import { forwardRef as Q, useState as X, useCallback as
|
|
8
|
+
import { forwardRef as Q, useState as X, useCallback as P, useEffect as O, Children as Y, isValidElement as ee, useRef as _, useMemo as $ } from "react";
|
|
9
9
|
import { u as te } from "./useAutocomplete-5HfWBKc-.js";
|
|
10
10
|
import G from "./Select.es.js";
|
|
11
11
|
import { c as h } from "./cn-B6yFEsav.js";
|
|
@@ -25,7 +25,7 @@ import { default as It, default as Vt } from "./Drawer.es.js";
|
|
|
25
25
|
import { D as Ot } from "./DrawerMobile-DT6ZkP7f.js";
|
|
26
26
|
import { default as Rt } from "./Header.es.js";
|
|
27
27
|
import { default as jt } from "./Input.es.js";
|
|
28
|
-
import { default as
|
|
28
|
+
import { default as Bt } from "./InputPassword.es.js";
|
|
29
29
|
import { default as _t } from "./InputLegacy.es.js";
|
|
30
30
|
import { default as Ft } from "./Logo.es.js";
|
|
31
31
|
import { default as Et } from "./Link.es.js";
|
|
@@ -51,29 +51,30 @@ import { default as Va } from "./Image.es.js";
|
|
|
51
51
|
import { default as Oa, toastpyrion as Aa } from "./Toast.es.js";
|
|
52
52
|
import { default as ka } from "./ToastProvider.es.js";
|
|
53
53
|
import { default as Ma } from "./SelectSearch.es.js";
|
|
54
|
-
import { default as
|
|
54
|
+
import { default as Pa } from "./FAButton.es.js";
|
|
55
55
|
import { default as Ha } from "./RadioButton.es.js";
|
|
56
56
|
import { default as za } from "./InputSearch.es.js";
|
|
57
57
|
import { default as Ua } from "./ListItem.es.js";
|
|
58
58
|
import { default as Za } from "./Chip.es.js";
|
|
59
59
|
import { default as Wa, default as qa } from "./Breadcrumbs.es.js";
|
|
60
|
-
import { default as Ka } from "./
|
|
61
|
-
import { default as Xa } from "./
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import { default as ur } from "./
|
|
66
|
-
import { default as cr } from "./
|
|
67
|
-
import { default as mr } from "./
|
|
68
|
-
import { default as hr } from "./
|
|
69
|
-
import { default as br } from "./
|
|
70
|
-
import { default as vr } from "./
|
|
71
|
-
import { default as yr
|
|
72
|
-
import { default as Tr } from "./
|
|
73
|
-
import { default as Nr } from "./
|
|
74
|
-
import { default as Vr } from "./
|
|
75
|
-
import { default as Or } from "./
|
|
76
|
-
import {
|
|
60
|
+
import { default as Ka } from "./Badge.es.js";
|
|
61
|
+
import { default as Xa } from "./OtpInput.es.js";
|
|
62
|
+
import { default as er } from "./PriorityChip.es.js";
|
|
63
|
+
import { Card as ar, CardContent as rr, CardFooter as or, CardHeader as nr } from "./Card.es.js";
|
|
64
|
+
import { A as sr } from "./AvatarBase-D6H-sXbg.js";
|
|
65
|
+
import { default as ur } from "./Button.es.js";
|
|
66
|
+
import { default as cr } from "./CardProfile.es.js";
|
|
67
|
+
import { default as mr } from "./Check.es.js";
|
|
68
|
+
import { default as hr } from "./CheckBox.es.js";
|
|
69
|
+
import { default as br } from "./InputMultiple.es.js";
|
|
70
|
+
import { default as vr } from "./ProfilePictureUpload.es.js";
|
|
71
|
+
import { default as yr } from "./SplitButton.es.js";
|
|
72
|
+
import { default as Sr, default as Tr } from "./Toggle.es.js";
|
|
73
|
+
import { default as Nr } from "./IconButton.es.js";
|
|
74
|
+
import { default as Vr } from "./Skeleton.es.js";
|
|
75
|
+
import { default as Or } from "./Collapsible.es.js";
|
|
76
|
+
import { default as Rr } from "./AttachInput.es.js";
|
|
77
|
+
import { useScrollable as jr } from "./useScrollable.es.js";
|
|
77
78
|
const H = ({
|
|
78
79
|
secondaryActionsSlot: e,
|
|
79
80
|
primaryActionsSlot: a,
|
|
@@ -152,20 +153,20 @@ const q = Q(
|
|
|
152
153
|
...j
|
|
153
154
|
} = e, T = x !== void 0, [L, z] = X(
|
|
154
155
|
() => y ?? ""
|
|
155
|
-
), E = T ? x : L, M = K.useRef(null), U =
|
|
156
|
+
), E = T ? x : L, M = K.useRef(null), U = P(
|
|
156
157
|
(t) => {
|
|
157
158
|
M.current = t, typeof a == "function" ? a(t) : a && (a.current = t);
|
|
158
159
|
},
|
|
159
160
|
[a]
|
|
160
|
-
), v =
|
|
161
|
+
), v = P(() => {
|
|
161
162
|
const t = M.current;
|
|
162
163
|
if (!t || !n) return;
|
|
163
164
|
t.style.height = "auto";
|
|
164
165
|
const p = t.scrollHeight, s = Number.parseInt(getComputedStyle(t).lineHeight) || 16, C = (m ?? l) * s;
|
|
165
166
|
let b = Math.max(p, C);
|
|
166
167
|
if (d || m) {
|
|
167
|
-
const
|
|
168
|
-
b = Math.min(b,
|
|
168
|
+
const B = (d ?? m ?? 1) * s;
|
|
169
|
+
b = Math.min(b, B);
|
|
169
170
|
}
|
|
170
171
|
t.style.height = `${b}px`, b > s + 12 && (t.style.alignContent = "start");
|
|
171
172
|
}, [n, l, d, m]), N = (t) => {
|
|
@@ -269,7 +270,7 @@ const be = Object.assign(q, {
|
|
|
269
270
|
}
|
|
270
271
|
});
|
|
271
272
|
}, [e.controls, m]);
|
|
272
|
-
const w =
|
|
273
|
+
const w = P(
|
|
273
274
|
() => r === "fetch_on_type" ? c : !1,
|
|
274
275
|
[r, c]
|
|
275
276
|
), g = $(() => e.multiple ? f.map((t) => D(t, e.optionValue)) : f ? D(f, e.optionValue) : void 0, [f, e.optionValue, e.multiple]), R = (t) => {
|
|
@@ -284,7 +285,7 @@ const be = Object.assign(q, {
|
|
|
284
285
|
}, k = (t) => {
|
|
285
286
|
const p = t.reduce((s, C) => {
|
|
286
287
|
const b = d.find(
|
|
287
|
-
(
|
|
288
|
+
(B) => D(B, e.optionValue) === C.id
|
|
288
289
|
);
|
|
289
290
|
return b && s.push(b), s;
|
|
290
291
|
}, []);
|
|
@@ -431,26 +432,27 @@ const be = Object.assign(q, {
|
|
|
431
432
|
};
|
|
432
433
|
export {
|
|
433
434
|
be as ActionInput,
|
|
434
|
-
|
|
435
|
+
Rr as AttachInput,
|
|
435
436
|
ot as Avatar,
|
|
436
437
|
nt as AvatarAndSubavatar,
|
|
437
|
-
|
|
438
|
-
|
|
438
|
+
sr as AvatarBase,
|
|
439
|
+
Ka as Badge,
|
|
440
|
+
ve as BadgeLegacy,
|
|
439
441
|
Wa as BreadcrumbItem,
|
|
440
442
|
qa as Breadcrumbs,
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
443
|
+
ur as Button,
|
|
444
|
+
ar as Card,
|
|
445
|
+
rr as CardContent,
|
|
446
|
+
or as CardFooter,
|
|
447
|
+
nr as CardHeader,
|
|
448
|
+
cr as CardProfile,
|
|
447
449
|
ct as Chat,
|
|
448
450
|
ut as ChatCard,
|
|
449
451
|
ft as ChatViewport,
|
|
450
|
-
|
|
451
|
-
|
|
452
|
+
mr as Check,
|
|
453
|
+
hr as CheckBox,
|
|
452
454
|
Za as Chip,
|
|
453
|
-
|
|
455
|
+
Or as Collapsible,
|
|
454
456
|
Oe as DEFAULT_PAGE_SIZE_OPTIONS,
|
|
455
457
|
Ae as DEFAULT_ROW_INTERACTION,
|
|
456
458
|
oa as DatePicker,
|
|
@@ -462,18 +464,18 @@ export {
|
|
|
462
464
|
Vt as DrawerDesktop,
|
|
463
465
|
Ot as DrawerMobile,
|
|
464
466
|
at as DropZone,
|
|
465
|
-
|
|
467
|
+
Pa as FAButton,
|
|
466
468
|
Re as HeadRow,
|
|
467
469
|
Rt as Header,
|
|
468
470
|
ke as HeaderCell,
|
|
469
471
|
J as HelperComponent,
|
|
470
|
-
|
|
472
|
+
Nr as IconButton,
|
|
471
473
|
Va as Image,
|
|
472
474
|
Na as ImageGallery,
|
|
473
475
|
jt as Input,
|
|
474
476
|
_t as InputLegacy,
|
|
475
|
-
|
|
476
|
-
|
|
477
|
+
br as InputMultiple,
|
|
478
|
+
Bt as InputPassword,
|
|
477
479
|
za as InputSearch,
|
|
478
480
|
Et as Link,
|
|
479
481
|
Ua as ListItem,
|
|
@@ -482,12 +484,12 @@ export {
|
|
|
482
484
|
qt as MenuList,
|
|
483
485
|
xt as Modal,
|
|
484
486
|
Ce as NavbarCollapseButton,
|
|
485
|
-
|
|
487
|
+
Xa as OtpInput,
|
|
486
488
|
Kt as Pagination,
|
|
487
489
|
Ca as PlainTooltip,
|
|
488
490
|
wa as Popover,
|
|
489
|
-
|
|
490
|
-
|
|
491
|
+
er as PriorityChip,
|
|
492
|
+
vr as ProfilePictureUpload,
|
|
491
493
|
Xt as ProgressBar,
|
|
492
494
|
Ha as RadioButton,
|
|
493
495
|
la as RecurrentDatePicker,
|
|
@@ -497,19 +499,19 @@ export {
|
|
|
497
499
|
G as Select,
|
|
498
500
|
Ma as SelectSearch,
|
|
499
501
|
ge as SelectSearchLegacy,
|
|
500
|
-
|
|
502
|
+
Vr as Skeleton,
|
|
501
503
|
ea as Spinner,
|
|
502
|
-
|
|
504
|
+
yr as SplitButton,
|
|
503
505
|
aa as Steps,
|
|
504
506
|
xa as Subtitle,
|
|
505
|
-
|
|
507
|
+
Sr as Switch,
|
|
506
508
|
Je as Tab,
|
|
507
509
|
Ke as TabLinkItem,
|
|
508
510
|
Qe as TabLinks,
|
|
509
511
|
da as TabSwitch,
|
|
510
512
|
Me as Table,
|
|
511
|
-
|
|
512
|
-
|
|
513
|
+
Be as TableBody,
|
|
514
|
+
Pe as TableBodyLegacy,
|
|
513
515
|
_e as TableCaption,
|
|
514
516
|
He as TableCell,
|
|
515
517
|
Fe as TableFooter,
|
|
@@ -525,7 +527,7 @@ export {
|
|
|
525
527
|
pa as Title,
|
|
526
528
|
Oa as Toast,
|
|
527
529
|
ka as ToastProvider,
|
|
528
|
-
|
|
530
|
+
Tr as Toggle,
|
|
529
531
|
ga as Tooltip,
|
|
530
532
|
mt as groupMessagesBySender,
|
|
531
533
|
Aa as toastpyrion,
|
|
@@ -543,5 +545,5 @@ export {
|
|
|
543
545
|
Ct as useModalControl,
|
|
544
546
|
yt as useModalState,
|
|
545
547
|
we as usePopover,
|
|
546
|
-
|
|
548
|
+
jr as useScrollable
|
|
547
549
|
};
|