prometeo-design-system 7.2.3 → 7.2.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/Chip.es.js +54 -52
- package/dist/Table.es.js +74 -73
- package/dist/components/Autocomplete/Autocomplete.d.ts +2 -2
- package/dist/components/Chips/chipTypes.d.ts +1 -1
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/SelectSearch/SelectSearch.d.ts +3 -3
- package/dist/components/SelectSearch/SelectSearchLegacy.d.ts +3 -3
- package/dist/components/Table/TableRow.d.ts +1 -1
- package/dist/components/Table/types.d.ts +3 -0
- package/dist/exports/Select.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/Chip.es.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { j as o } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
-
import { memo as C, forwardRef as
|
|
2
|
+
import { memo as C, forwardRef as F, useMemo as N, useCallback as p } from "react";
|
|
3
3
|
import { c as h } from "./index-BOQuZ0gG.js";
|
|
4
4
|
import { c as v } from "./cn-B6yFEsav.js";
|
|
5
5
|
import { i as V } from "./iconUtils-rTOfKDxE.js";
|
|
6
|
-
import { Close as
|
|
7
|
-
import { A as
|
|
8
|
-
const
|
|
6
|
+
import { Close as K } from "./Icons/Close.es.js";
|
|
7
|
+
import { A as q } from "./AvatarBase-sKVPLn_O.js";
|
|
8
|
+
const Q = {
|
|
9
9
|
small: "h-5 px-2 text-xs prometeo-fonts-body-small",
|
|
10
10
|
medium: "h-8 px-3 text-sm prometeo-fonts-body-medium",
|
|
11
11
|
large: "h-9 px-3 text-sm prometeo-fonts-body-medium"
|
|
12
|
-
},
|
|
12
|
+
}, Z = {
|
|
13
13
|
default: "text-neutral-default-default border-neutral-default-default bg-inherit rounded-lg font-semibold",
|
|
14
14
|
error: "",
|
|
15
15
|
success: ""
|
|
16
|
-
},
|
|
17
|
-
function
|
|
18
|
-
return
|
|
16
|
+
}, $ = "border-neutral-strong-default text-neutral-default-disabled", J = "text-neutral-default-disabled", W = ["leading", "avatar"], X = ["default", "error", "success"];
|
|
17
|
+
function ee(e) {
|
|
18
|
+
return W.includes(e);
|
|
19
19
|
}
|
|
20
20
|
function H(e) {
|
|
21
|
-
return
|
|
21
|
+
return X.includes(e);
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
const a = e.layout ?? (
|
|
23
|
+
function ae(e) {
|
|
24
|
+
const a = e.layout ?? (ee(e.variant) ? e.variant : void 0), s = e.semanticVariant ?? (H(e.variant) ? e.variant : void 0), i = a ?? (e.avatar ? "avatar" : "leading"), m = !!e.onRemove || !!e.size || !!s || !!e.semanticVariant || H(e.variant);
|
|
25
25
|
return {
|
|
26
26
|
layout: i,
|
|
27
27
|
legacySemanticVariant: s,
|
|
28
|
-
legacySizeClass: e.size ?
|
|
29
|
-
legacySemanticContainerClass: s ?
|
|
28
|
+
legacySizeClass: e.size ? Q[e.size] : void 0,
|
|
29
|
+
legacySemanticContainerClass: s ? Z[s] : void 0,
|
|
30
30
|
useLegacyRemoveHandler: !!e.onRemove,
|
|
31
31
|
isLegacyMode: m
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
const
|
|
34
|
+
const re = h(
|
|
35
35
|
"group/chip flex items-center gap-1 p-2 w-max h-8 radius-medium border transition-all duration-300 ease-in-out",
|
|
36
36
|
{
|
|
37
37
|
variants: {
|
|
@@ -118,7 +118,7 @@ const ae = h(
|
|
|
118
118
|
}
|
|
119
119
|
]
|
|
120
120
|
}
|
|
121
|
-
),
|
|
121
|
+
), te = h(
|
|
122
122
|
"pyrion-fonts-label-medium transition-all duration-300 ease-in-out select-none",
|
|
123
123
|
{
|
|
124
124
|
variants: {
|
|
@@ -211,7 +211,7 @@ const ae = h(
|
|
|
211
211
|
}
|
|
212
212
|
]
|
|
213
213
|
}
|
|
214
|
-
),
|
|
214
|
+
), se = h("transition-all duration-300 ease-in-out", {
|
|
215
215
|
variants: {
|
|
216
216
|
isSelected: {
|
|
217
217
|
true: "",
|
|
@@ -295,7 +295,7 @@ const ae = h(
|
|
|
295
295
|
className: "icon-disabled-ondisabled group-hover/chip:icon-disabled-ondisabled group-active/chip:icon-disabled-ondisabled"
|
|
296
296
|
}
|
|
297
297
|
]
|
|
298
|
-
}),
|
|
298
|
+
}), de = h(
|
|
299
299
|
"transition-all duration-300 ease-in-out border-neutral-default-default border",
|
|
300
300
|
{
|
|
301
301
|
variants: {
|
|
@@ -349,24 +349,24 @@ const ae = h(
|
|
|
349
349
|
}
|
|
350
350
|
]
|
|
351
351
|
}
|
|
352
|
-
),
|
|
352
|
+
), oe = {
|
|
353
353
|
size: "xsmall",
|
|
354
354
|
name: "A B"
|
|
355
355
|
};
|
|
356
|
-
function
|
|
356
|
+
function ne(e, a, s) {
|
|
357
357
|
return {
|
|
358
358
|
isSelected: !!e,
|
|
359
359
|
disabled: !!a,
|
|
360
360
|
forcedStatus: s
|
|
361
361
|
};
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function ie(e) {
|
|
364
364
|
return N(
|
|
365
365
|
() => ({
|
|
366
|
-
container:
|
|
367
|
-
label:
|
|
368
|
-
icon:
|
|
369
|
-
avatar:
|
|
366
|
+
container: re(e),
|
|
367
|
+
label: te(e),
|
|
368
|
+
icon: se(e),
|
|
369
|
+
avatar: de(e)
|
|
370
370
|
}),
|
|
371
371
|
[e.isSelected, e.disabled, e.forcedStatus]
|
|
372
372
|
);
|
|
@@ -377,17 +377,17 @@ const D = C(function({
|
|
|
377
377
|
size: i = 16
|
|
378
378
|
}) {
|
|
379
379
|
return /* @__PURE__ */ o.jsx(a, { size: i, className: s });
|
|
380
|
-
}),
|
|
380
|
+
}), le = C(function({
|
|
381
381
|
avatar: a,
|
|
382
382
|
className: s
|
|
383
383
|
}) {
|
|
384
|
-
return /* @__PURE__ */ o.jsx(
|
|
384
|
+
return /* @__PURE__ */ o.jsx(q, { ...a, className: s });
|
|
385
385
|
});
|
|
386
|
-
function
|
|
386
|
+
function ce(e, a) {
|
|
387
387
|
return e.label === a.label && e.isSelected === a.isSelected && e.disabled === a.disabled && e.forcedStatus === a.forcedStatus && e.layout === a.layout && e.variant === a.variant && e.semanticVariant === a.semanticVariant && e.className === a.className && e.onRemove === a.onRemove && e.id === a.id && e.size === a.size && e.tabIndex === a.tabIndex && e.leadingIcon === a.leadingIcon && e.leadingSlot === a.leadingSlot && e.trailingIcon === a.trailingIcon && e.onClick === a.onClick && e.onTrailingIconClick === a.onTrailingIconClick && e.avatar?.imageUrl === a.avatar?.imageUrl && e.avatar?.name === a.avatar?.name;
|
|
388
388
|
}
|
|
389
|
-
const
|
|
390
|
-
|
|
389
|
+
const ue = C(
|
|
390
|
+
F(function({
|
|
391
391
|
isSelected: a = !1,
|
|
392
392
|
label: s,
|
|
393
393
|
leadingIcon: i,
|
|
@@ -405,10 +405,11 @@ const ce = C(
|
|
|
405
405
|
id: g,
|
|
406
406
|
size: _,
|
|
407
407
|
tabIndex: y,
|
|
408
|
-
className: j
|
|
409
|
-
|
|
408
|
+
className: j,
|
|
409
|
+
...T
|
|
410
|
+
}, z) {
|
|
410
411
|
const t = N(
|
|
411
|
-
() =>
|
|
412
|
+
() => ae({
|
|
412
413
|
layout: A,
|
|
413
414
|
variant: L,
|
|
414
415
|
semanticVariant: I,
|
|
@@ -417,34 +418,35 @@ const ce = C(
|
|
|
417
418
|
size: _
|
|
418
419
|
}),
|
|
419
420
|
[A, L, I, c, u, _]
|
|
420
|
-
),
|
|
421
|
-
() => ({ ...
|
|
421
|
+
), M = ne(a, r, P), b = ie(M), E = V(i) ? i : null, S = V(x) ? x : t.useLegacyRemoveHandler ? K : null, w = N(
|
|
422
|
+
() => ({ ...oe, ...c }),
|
|
422
423
|
[c?.imageUrl, c?.name]
|
|
423
|
-
), n = !r && !!l, R = t.layout === "avatar",
|
|
424
|
+
), n = !r && !!l, R = t.layout === "avatar", Y = y !== void 0 ? y : n ? 0 : void 0, k = p(
|
|
424
425
|
(d) => {
|
|
425
426
|
r || (d.preventDefault(), d.stopPropagation(), f?.(d));
|
|
426
427
|
},
|
|
427
428
|
[r, f]
|
|
428
|
-
),
|
|
429
|
+
), G = p(
|
|
429
430
|
(d) => {
|
|
430
431
|
r || (d.stopPropagation(), d.preventDefault(), g != null && u?.(g));
|
|
431
432
|
},
|
|
432
433
|
[r, g, u]
|
|
433
|
-
),
|
|
434
|
+
), O = p(
|
|
434
435
|
(d) => {
|
|
435
436
|
r || l?.(d);
|
|
436
437
|
},
|
|
437
438
|
[r, l]
|
|
438
|
-
),
|
|
439
|
+
), U = p(
|
|
439
440
|
(d) => {
|
|
440
441
|
!n || r || d.key !== "Enter" && d.key !== " " || (d.preventDefault(), l?.(d));
|
|
441
442
|
},
|
|
442
443
|
[r, n, l]
|
|
443
|
-
),
|
|
444
|
+
), B = !!S && (!!f || t.useLegacyRemoveHandler);
|
|
444
445
|
return /* @__PURE__ */ o.jsxs(
|
|
445
446
|
"div",
|
|
446
447
|
{
|
|
447
|
-
|
|
448
|
+
...T,
|
|
449
|
+
ref: z,
|
|
448
450
|
className: v(
|
|
449
451
|
b.container,
|
|
450
452
|
!t.legacySizeClass && "h-8",
|
|
@@ -452,29 +454,29 @@ const ce = C(
|
|
|
452
454
|
t.legacySemanticContainerClass,
|
|
453
455
|
t.isLegacyMode && "inline-flex font-semibold",
|
|
454
456
|
n && "cursor-pointer",
|
|
455
|
-
r && t.isLegacyMode &&
|
|
457
|
+
r && t.isLegacyMode && $,
|
|
456
458
|
r && "pointer-events-none",
|
|
457
459
|
j
|
|
458
460
|
),
|
|
459
|
-
onClick: n ?
|
|
460
|
-
onKeyDown: n ?
|
|
461
|
+
onClick: n ? O : void 0,
|
|
462
|
+
onKeyDown: n ? U : void 0,
|
|
461
463
|
"aria-disabled": r || void 0,
|
|
462
464
|
role: n ? "button" : void 0,
|
|
463
|
-
tabIndex:
|
|
465
|
+
tabIndex: Y,
|
|
464
466
|
children: [
|
|
465
467
|
/* @__PURE__ */ o.jsxs("div", { className: "flex items-center gap-1 min-w-0", children: [
|
|
466
468
|
!R && (m ?? (E && /* @__PURE__ */ o.jsx(D, { icon: E, className: b.icon }))),
|
|
467
|
-
R && /* @__PURE__ */ o.jsx(
|
|
469
|
+
R && /* @__PURE__ */ o.jsx(le, { avatar: w, className: b.avatar }),
|
|
468
470
|
/* @__PURE__ */ o.jsx("span", { className: v(b.label, "truncate"), children: s })
|
|
469
471
|
] }),
|
|
470
|
-
|
|
472
|
+
B && S && /* @__PURE__ */ o.jsx(
|
|
471
473
|
"button",
|
|
472
474
|
{
|
|
473
475
|
type: "button",
|
|
474
476
|
disabled: r,
|
|
475
477
|
tabIndex: y,
|
|
476
|
-
onMouseDown: t.useLegacyRemoveHandler ?
|
|
477
|
-
onClick: t.useLegacyRemoveHandler ? void 0 :
|
|
478
|
+
onMouseDown: t.useLegacyRemoveHandler ? G : void 0,
|
|
479
|
+
onClick: t.useLegacyRemoveHandler ? void 0 : k,
|
|
478
480
|
className: v(
|
|
479
481
|
"shrink-0",
|
|
480
482
|
(f || u) && !r && "cursor-pointer",
|
|
@@ -488,7 +490,7 @@ const ce = C(
|
|
|
488
490
|
icon: S,
|
|
489
491
|
className: v(
|
|
490
492
|
b.icon,
|
|
491
|
-
r && t.isLegacyMode &&
|
|
493
|
+
r && t.isLegacyMode && J
|
|
492
494
|
),
|
|
493
495
|
size: t.useLegacyRemoveHandler ? 18 : 16
|
|
494
496
|
}
|
|
@@ -499,9 +501,9 @@ const ce = C(
|
|
|
499
501
|
}
|
|
500
502
|
);
|
|
501
503
|
}),
|
|
502
|
-
|
|
504
|
+
ce
|
|
503
505
|
);
|
|
504
|
-
|
|
506
|
+
ue.displayName = "Chip";
|
|
505
507
|
export {
|
|
506
|
-
|
|
508
|
+
ue as default
|
|
507
509
|
};
|
package/dist/Table.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as a } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
2
|
import { c as s } from "./cn-B6yFEsav.js";
|
|
3
|
-
import * as
|
|
4
|
-
import { memo as
|
|
3
|
+
import * as f from "react";
|
|
4
|
+
import { memo as u, createContext as _, useContext as D, useMemo as H, useCallback as S, useState as B, Children as A, isValidElement as E } from "react";
|
|
5
5
|
import { i as k, C as b } from "./CardBackground-D5SgTU1i.js";
|
|
6
6
|
import F from "./Pagination.es.js";
|
|
7
7
|
import { ArrowUpDown as L } from "./Icons/ArrowUpDown.es.js";
|
|
@@ -9,7 +9,7 @@ import { ArrowUpward as I } from "./Icons/ArrowUpward.es.js";
|
|
|
9
9
|
import { ArrowDownward as z } from "./Icons/ArrowDownward.es.js";
|
|
10
10
|
import { c as P } from "./index-BOQuZ0gG.js";
|
|
11
11
|
import { D as U } from "./Divider-BxsuAgUn.js";
|
|
12
|
-
const $ =
|
|
12
|
+
const $ = f.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ a.jsx("div", { className: "w-full", children: /* @__PURE__ */ a.jsx(
|
|
13
13
|
"table",
|
|
14
14
|
{
|
|
15
15
|
ref: t,
|
|
@@ -21,7 +21,7 @@ const $ = m.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ a.jsx("div
|
|
|
21
21
|
}
|
|
22
22
|
) }));
|
|
23
23
|
$.displayName = "Table";
|
|
24
|
-
const M =
|
|
24
|
+
const M = f.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ a.jsx(
|
|
25
25
|
"thead",
|
|
26
26
|
{
|
|
27
27
|
ref: t,
|
|
@@ -30,7 +30,7 @@ const M = m.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ a.jsx(
|
|
|
30
30
|
}
|
|
31
31
|
));
|
|
32
32
|
M.displayName = "TableHeader";
|
|
33
|
-
const O =
|
|
33
|
+
const O = f.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ a.jsx(
|
|
34
34
|
"tbody",
|
|
35
35
|
{
|
|
36
36
|
ref: t,
|
|
@@ -39,7 +39,7 @@ const O = m.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ a.jsx(
|
|
|
39
39
|
}
|
|
40
40
|
));
|
|
41
41
|
O.displayName = "TableBody";
|
|
42
|
-
const J =
|
|
42
|
+
const J = f.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ a.jsx(
|
|
43
43
|
"tfoot",
|
|
44
44
|
{
|
|
45
45
|
ref: t,
|
|
@@ -51,7 +51,7 @@ const J = m.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ a.jsx(
|
|
|
51
51
|
}
|
|
52
52
|
));
|
|
53
53
|
J.displayName = "TableFooter";
|
|
54
|
-
const G =
|
|
54
|
+
const G = f.forwardRef(({ className: e, isSelected: r, ...t }, o) => {
|
|
55
55
|
const l = `
|
|
56
56
|
after:content-["<span id='selected-span'></span>"]
|
|
57
57
|
after:absolute
|
|
@@ -84,7 +84,7 @@ const G = m.forwardRef(({ className: e, isSelected: r, ...t }, o) => {
|
|
|
84
84
|
);
|
|
85
85
|
});
|
|
86
86
|
G.displayName = "TableRow";
|
|
87
|
-
const K =
|
|
87
|
+
const K = f.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ a.jsx(
|
|
88
88
|
"th",
|
|
89
89
|
{
|
|
90
90
|
ref: t,
|
|
@@ -96,7 +96,7 @@ const K = m.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ a.jsx(
|
|
|
96
96
|
}
|
|
97
97
|
));
|
|
98
98
|
K.displayName = "TableHead";
|
|
99
|
-
const V =
|
|
99
|
+
const V = f.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ a.jsx(
|
|
100
100
|
"td",
|
|
101
101
|
{
|
|
102
102
|
ref: t,
|
|
@@ -108,7 +108,7 @@ const V = m.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ a.jsx(
|
|
|
108
108
|
}
|
|
109
109
|
));
|
|
110
110
|
V.displayName = "TableCell";
|
|
111
|
-
const W =
|
|
111
|
+
const W = f.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ a.jsx(
|
|
112
112
|
"caption",
|
|
113
113
|
{
|
|
114
114
|
ref: t,
|
|
@@ -127,7 +127,7 @@ const Z = ({ className: e, children: r }) => /* @__PURE__ */ a.jsx(
|
|
|
127
127
|
),
|
|
128
128
|
children: r
|
|
129
129
|
}
|
|
130
|
-
), v =
|
|
130
|
+
), v = u(Z);
|
|
131
131
|
v.displayName = "HeadRow";
|
|
132
132
|
const q = ({ className: e, children: r }) => /* @__PURE__ */ a.jsx(
|
|
133
133
|
"div",
|
|
@@ -139,19 +139,20 @@ const q = ({ className: e, children: r }) => /* @__PURE__ */ a.jsx(
|
|
|
139
139
|
),
|
|
140
140
|
children: r
|
|
141
141
|
}
|
|
142
|
-
), w =
|
|
142
|
+
), w = u(q);
|
|
143
143
|
w.displayName = "TableBody";
|
|
144
|
-
const N = _({}), Q = N.Provider, X = () =>
|
|
144
|
+
const N = _({}), Q = N.Provider, X = () => D(N), Y = ({
|
|
145
145
|
selected: e,
|
|
146
146
|
disabled: r,
|
|
147
147
|
forced: t,
|
|
148
148
|
onClick: o,
|
|
149
149
|
className: l,
|
|
150
|
-
children:
|
|
150
|
+
children: d,
|
|
151
|
+
showDivider: n = !0
|
|
151
152
|
}) => {
|
|
152
|
-
const c =
|
|
153
|
+
const c = H(() => ({ disabled: r, showDivider: n }), [r, n]), i = S((m) => {
|
|
153
154
|
o?.({
|
|
154
|
-
...
|
|
155
|
+
...m,
|
|
155
156
|
disabled: r ?? !1,
|
|
156
157
|
selected: e ?? !1
|
|
157
158
|
});
|
|
@@ -164,17 +165,17 @@ const N = _({}), Q = N.Provider, X = () => H(N), Y = ({
|
|
|
164
165
|
"data-selected": e ? "true" : void 0,
|
|
165
166
|
"data-disabled": r ? "true" : void 0,
|
|
166
167
|
"data-forced": t,
|
|
167
|
-
onClick:
|
|
168
|
+
onClick: i,
|
|
168
169
|
className: s(
|
|
169
170
|
"grid [grid-template-columns:subgrid] [grid-column:1/-1]",
|
|
170
171
|
o && !r && "cursor-pointer",
|
|
171
172
|
r && "[&_[role=cell]>*:not(.row-cell-divider)]:opacity-30",
|
|
172
173
|
l
|
|
173
174
|
),
|
|
174
|
-
children:
|
|
175
|
+
children: d
|
|
175
176
|
}
|
|
176
177
|
) });
|
|
177
|
-
}, j =
|
|
178
|
+
}, j = u(Y);
|
|
178
179
|
j.displayName = "TableRow";
|
|
179
180
|
const ee = ({ cardBackground: e, className: r, children: t }) => {
|
|
180
181
|
const l = {
|
|
@@ -186,7 +187,7 @@ const ee = ({ cardBackground: e, className: r, children: t }) => {
|
|
|
186
187
|
...e
|
|
187
188
|
};
|
|
188
189
|
return /* @__PURE__ */ a.jsx(b, { ...l, className: s("radius-medium px-0.5 py-2", r), children: t });
|
|
189
|
-
}, T =
|
|
190
|
+
}, T = u(ee);
|
|
190
191
|
T.displayName = "TableHeader";
|
|
191
192
|
const ae = {
|
|
192
193
|
default: {
|
|
@@ -199,7 +200,7 @@ const ae = {
|
|
|
199
200
|
hover: { color: "brand", variant: "primary", forced: "default" },
|
|
200
201
|
pressed: { color: "brand", variant: "primary", forced: "pressed" }
|
|
201
202
|
}
|
|
202
|
-
}, re = [5, 10, 25, 50, 100], te =
|
|
203
|
+
}, re = [5, 10, 25, 50, 100], te = u(function({
|
|
203
204
|
pageSize: r,
|
|
204
205
|
options: t,
|
|
205
206
|
onChange: o
|
|
@@ -219,18 +220,18 @@ const ae = {
|
|
|
219
220
|
}
|
|
220
221
|
)
|
|
221
222
|
] });
|
|
222
|
-
}), le =
|
|
223
|
+
}), le = u(function({
|
|
223
224
|
totalPages: r = 1,
|
|
224
225
|
onJump: t
|
|
225
226
|
}) {
|
|
226
|
-
const [o, l] =
|
|
227
|
-
const
|
|
228
|
-
if (!Number.isFinite(
|
|
227
|
+
const [o, l] = B(""), d = () => {
|
|
228
|
+
const c = Number(o);
|
|
229
|
+
if (!Number.isFinite(c))
|
|
229
230
|
return;
|
|
230
|
-
const
|
|
231
|
-
t?.(
|
|
232
|
-
},
|
|
233
|
-
|
|
231
|
+
const i = Math.min(Math.max(1, c), r);
|
|
232
|
+
t?.(i), l(String(i));
|
|
233
|
+
}, n = (c) => {
|
|
234
|
+
c.key === "Enter" && d();
|
|
234
235
|
};
|
|
235
236
|
return /* @__PURE__ */ a.jsxs("label", { className: "table-jump-to-page flex items-center gap-2", children: [
|
|
236
237
|
/* @__PURE__ */ a.jsx("span", { className: "pyrion-fonts-body-small text-neutral-secondary-default", children: "Ir hasta página:" }),
|
|
@@ -242,9 +243,9 @@ const ae = {
|
|
|
242
243
|
min: 1,
|
|
243
244
|
max: r,
|
|
244
245
|
value: o,
|
|
245
|
-
onChange: (
|
|
246
|
-
onBlur:
|
|
247
|
-
onKeyDown:
|
|
246
|
+
onChange: (c) => l(c.target.value),
|
|
247
|
+
onBlur: d,
|
|
248
|
+
onKeyDown: n,
|
|
248
249
|
className: s(
|
|
249
250
|
"h-8 bg-neutral-default-default",
|
|
250
251
|
"text-neutral-primary-default",
|
|
@@ -261,16 +262,16 @@ const ae = {
|
|
|
261
262
|
showPageSize: t,
|
|
262
263
|
pageSize: o,
|
|
263
264
|
pageSizeOptions: l = [...re],
|
|
264
|
-
onPageSizeChange:
|
|
265
|
-
showPagination:
|
|
266
|
-
currentPage:
|
|
267
|
-
totalPages:
|
|
268
|
-
onPageChange:
|
|
265
|
+
onPageSizeChange: d,
|
|
266
|
+
showPagination: n,
|
|
267
|
+
currentPage: c,
|
|
268
|
+
totalPages: i,
|
|
269
|
+
onPageChange: m,
|
|
269
270
|
showJumpToPage: p,
|
|
270
271
|
className: x,
|
|
271
|
-
children:
|
|
272
|
+
children: h
|
|
272
273
|
}) => {
|
|
273
|
-
const R =
|
|
274
|
+
const R = h ?? /* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-between px-4 py-3 flex-wrap", children: [
|
|
274
275
|
r && /* @__PURE__ */ a.jsx("span", { className: "pyrion-fonts-body-small text-neutral-tertiary-default", children: r }),
|
|
275
276
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-4 flex-wrap ml-auto", children: [
|
|
276
277
|
t && /* @__PURE__ */ a.jsx(
|
|
@@ -278,18 +279,18 @@ const ae = {
|
|
|
278
279
|
{
|
|
279
280
|
pageSize: o,
|
|
280
281
|
options: l,
|
|
281
|
-
onChange:
|
|
282
|
+
onChange: d
|
|
282
283
|
}
|
|
283
284
|
),
|
|
284
|
-
|
|
285
|
+
n && /* @__PURE__ */ a.jsx(
|
|
285
286
|
F,
|
|
286
287
|
{
|
|
287
|
-
currentPage:
|
|
288
|
-
totalPages:
|
|
289
|
-
onPageChange:
|
|
288
|
+
currentPage: c,
|
|
289
|
+
totalPages: i,
|
|
290
|
+
onPageChange: m
|
|
290
291
|
}
|
|
291
292
|
),
|
|
292
|
-
p && /* @__PURE__ */ a.jsx(le, { totalPages:
|
|
293
|
+
p && /* @__PURE__ */ a.jsx(le, { totalPages: i, onJump: m })
|
|
293
294
|
] })
|
|
294
295
|
] });
|
|
295
296
|
return /* @__PURE__ */ a.jsx(
|
|
@@ -303,7 +304,7 @@ const ae = {
|
|
|
303
304
|
children: R
|
|
304
305
|
}
|
|
305
306
|
);
|
|
306
|
-
}, C =
|
|
307
|
+
}, C = u(oe);
|
|
307
308
|
C.displayName = "TableFooter";
|
|
308
309
|
function se(e) {
|
|
309
310
|
let r = null, t = null;
|
|
@@ -313,7 +314,7 @@ function se(e) {
|
|
|
313
314
|
}), { header: r, footer: t, grid: o };
|
|
314
315
|
}
|
|
315
316
|
const ne = ({ columns: e, maxHeight: r, className: t, children: o }) => {
|
|
316
|
-
const { header: l, footer:
|
|
317
|
+
const { header: l, footer: d, grid: n } = se(o);
|
|
317
318
|
return /* @__PURE__ */ a.jsxs(
|
|
318
319
|
"div",
|
|
319
320
|
{
|
|
@@ -331,19 +332,19 @@ const ne = ({ columns: e, maxHeight: r, className: t, children: o }) => {
|
|
|
331
332
|
gridTemplateRows: "auto 1fr",
|
|
332
333
|
minWidth: "max-content"
|
|
333
334
|
},
|
|
334
|
-
children:
|
|
335
|
+
children: n
|
|
335
336
|
}
|
|
336
337
|
) }),
|
|
337
|
-
|
|
338
|
+
d
|
|
338
339
|
]
|
|
339
340
|
}
|
|
340
341
|
);
|
|
341
|
-
}, y =
|
|
342
|
+
}, y = u(ne);
|
|
342
343
|
y.displayName = "Table";
|
|
343
344
|
y.HeadRow = v;
|
|
344
345
|
y.Body = w;
|
|
345
346
|
y.Row = j;
|
|
346
|
-
const
|
|
347
|
+
const g = {
|
|
347
348
|
color: "neutral",
|
|
348
349
|
variant: "primary",
|
|
349
350
|
forced: "default"
|
|
@@ -379,16 +380,16 @@ const ie = ({
|
|
|
379
380
|
showLeadingIcon: t,
|
|
380
381
|
sort: o,
|
|
381
382
|
onSort: l,
|
|
382
|
-
cardBackground:
|
|
383
|
-
disabled:
|
|
384
|
-
forced:
|
|
385
|
-
className:
|
|
383
|
+
cardBackground: d,
|
|
384
|
+
disabled: n,
|
|
385
|
+
forced: c,
|
|
386
|
+
className: i
|
|
386
387
|
}) => {
|
|
387
|
-
const
|
|
388
|
-
...
|
|
389
|
-
...
|
|
390
|
-
disabled:
|
|
391
|
-
forced:
|
|
388
|
+
const m = o !== void 0, p = !!l && !n, x = o !== void 0 ? de(o) : null, h = {
|
|
389
|
+
...g,
|
|
390
|
+
...d,
|
|
391
|
+
disabled: n ?? d?.disabled ?? !1,
|
|
392
|
+
forced: c ?? d?.forced ?? g.forced
|
|
392
393
|
};
|
|
393
394
|
return /* @__PURE__ */ a.jsx(
|
|
394
395
|
"div",
|
|
@@ -397,13 +398,13 @@ const ie = ({
|
|
|
397
398
|
className: s(
|
|
398
399
|
"min-w-0 select-none",
|
|
399
400
|
p && "cursor-pointer",
|
|
400
|
-
|
|
401
|
+
i
|
|
401
402
|
),
|
|
402
403
|
onClick: p ? l : void 0,
|
|
403
404
|
children: /* @__PURE__ */ a.jsx(
|
|
404
405
|
b,
|
|
405
406
|
{
|
|
406
|
-
...
|
|
407
|
+
...h,
|
|
407
408
|
className: "group/header-cell px-4 py-3 h-full border-b border-neutral-default-default",
|
|
408
409
|
children: /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
409
410
|
t && r && /* @__PURE__ */ a.jsx(
|
|
@@ -414,11 +415,11 @@ const ie = ({
|
|
|
414
415
|
}
|
|
415
416
|
),
|
|
416
417
|
/* @__PURE__ */ a.jsx("span", { className: "pyrion-fonts-label-medium text-neutral-default-default truncate", children: e }),
|
|
417
|
-
|
|
418
|
+
m && x && /* @__PURE__ */ a.jsx(
|
|
418
419
|
x,
|
|
419
420
|
{
|
|
420
421
|
size: 20,
|
|
421
|
-
className: ce({ sort: o, disabled:
|
|
422
|
+
className: ce({ sort: o, disabled: n })
|
|
422
423
|
}
|
|
423
424
|
)
|
|
424
425
|
] })
|
|
@@ -426,7 +427,7 @@ const ie = ({
|
|
|
426
427
|
)
|
|
427
428
|
}
|
|
428
429
|
);
|
|
429
|
-
}, ue =
|
|
430
|
+
}, ue = u(ie);
|
|
430
431
|
ue.displayName = "HeaderCell";
|
|
431
432
|
const me = {
|
|
432
433
|
left: "items-start text-left",
|
|
@@ -486,29 +487,29 @@ function fe(e) {
|
|
|
486
487
|
}
|
|
487
488
|
}
|
|
488
489
|
const pe = (e) => {
|
|
489
|
-
const { disabled: r } = X(),
|
|
490
|
+
const { disabled: r, showDivider: t } = X(), o = e.disabled ?? r ?? !1, { className: l, forced: d, cardBackground: n, showDivider: c } = e, i = {
|
|
490
491
|
color: "neutral",
|
|
491
492
|
variant: "default",
|
|
492
493
|
...n,
|
|
493
|
-
forced:
|
|
494
|
+
forced: d ?? n?.forced,
|
|
494
495
|
interactionConfig: n?.interactionConfig ?? ae,
|
|
495
496
|
interactionSource: n?.interactionSource ?? "row"
|
|
496
|
-
};
|
|
497
|
-
return /* @__PURE__ */ a.jsxs("div", { role: "cell", className: s("min-w-0 flex flex-col gap-1",
|
|
497
|
+
}, m = c !== void 0 ? c : t;
|
|
498
|
+
return /* @__PURE__ */ a.jsxs("div", { role: "cell", className: s("min-w-0 flex flex-col gap-1", l), children: [
|
|
498
499
|
/* @__PURE__ */ a.jsxs("div", { className: "relative flex flex-col gap-1 min-h-20 items-center justify-center overflow-hidden", children: [
|
|
499
500
|
/* @__PURE__ */ a.jsx(
|
|
500
501
|
b,
|
|
501
502
|
{
|
|
502
|
-
...
|
|
503
|
-
disabled:
|
|
503
|
+
...i,
|
|
504
|
+
disabled: o,
|
|
504
505
|
className: "absolute inset-0"
|
|
505
506
|
}
|
|
506
507
|
),
|
|
507
508
|
/* @__PURE__ */ a.jsx("div", { className: "relative z-10 w-full", children: fe(e) })
|
|
508
509
|
] }),
|
|
509
|
-
/* @__PURE__ */ a.jsx(U, { className: "row-cell-divider" })
|
|
510
|
+
m && /* @__PURE__ */ a.jsx(U, { className: "row-cell-divider" })
|
|
510
511
|
] });
|
|
511
|
-
}, xe =
|
|
512
|
+
}, xe = u(pe);
|
|
512
513
|
xe.displayName = "RowCell";
|
|
513
514
|
export {
|
|
514
515
|
re as DEFAULT_PAGE_SIZE_OPTIONS,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentType } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { SelectOptionRendererProps } from '../Select/Select';
|
|
3
3
|
import { OptionAccessor } from '../Shared/types';
|
|
4
4
|
export interface AutocompleteProps<T> {
|
|
5
5
|
label?: string;
|
|
@@ -14,7 +14,7 @@ export interface AutocompleteProps<T> {
|
|
|
14
14
|
debounceDelay?: number;
|
|
15
15
|
labelVariant?: 'static' | 'default';
|
|
16
16
|
disabled?: boolean;
|
|
17
|
-
renderOption?: ComponentType<
|
|
17
|
+
renderOption?: ComponentType<SelectOptionRendererProps<T>>;
|
|
18
18
|
}
|
|
19
19
|
declare const Autocomplete: <T extends object>(props: AutocompleteProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
export default Autocomplete;
|
|
@@ -7,7 +7,7 @@ export type ChipAvatarProps = Pick<AvatarBaseProps, "imageUrl" | "name">;
|
|
|
7
7
|
export type ChipForcedStatus = "default" | "hovered" | "pressed" | "disabled";
|
|
8
8
|
/** Layout del chip o variante semántica legacy. */
|
|
9
9
|
export type ChipVariantProp = ChipLayout | ComponentVariant;
|
|
10
|
-
interface ChipBaseProps {
|
|
10
|
+
interface ChipBaseProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'id'> {
|
|
11
11
|
label: string;
|
|
12
12
|
layout?: ChipLayout;
|
|
13
13
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MultipleSelectProps, SingleSelectProps } from './types';
|
|
2
|
-
export type { ChipItem, CustomSelectionDisplayProps,
|
|
2
|
+
export type { ChipItem, CustomSelectionDisplayProps, SelectGroupHeaderRendererProps, SelectOptionRendererProps, DropdownOptionsProps, MultipleSelectProps, SelectControlsHandler, SelectControlsHandle, SelectControlsRef, SelectDisplayMode, SelectDropdownOptions, SelectOptionActivatePayload, SelectOptionType, SelectOverflow, SelectProps, SelectPropsCompat, SelectSize, SelectVariant, SelectionDisplayProps, SingleSelectProps, } from './types';
|
|
3
3
|
declare function Select<T>(props: SingleSelectProps<T>): React.ReactElement;
|
|
4
4
|
declare function Select<T>(props: MultipleSelectProps<T>): React.ReactElement;
|
|
5
5
|
export default Select;
|