prometeo-design-system 7.2.3 → 7.2.5
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/AttachInput.d.ts +6 -0
- package/dist/AttachInput.es.js +206 -0
- package/dist/Chip.es.js +54 -52
- package/dist/Drawer.es.js +293 -239
- package/dist/DropZone.es.js +10 -107
- package/dist/HelperComponent-BFzIO-0g.js +66 -0
- package/dist/Input.es.js +1 -1
- package/dist/InputMultiple.es.js +1 -1
- package/dist/RadioButton.es.js +1 -1
- package/dist/RecurrentDatePicker.es.js +1 -1
- package/dist/SelectLegacy.es.js +1 -1
- package/dist/Table.es.js +74 -73
- package/dist/TextArea.es.js +1 -1
- package/dist/components/AttachInput/AttachInput.d.ts +8 -0
- package/dist/components/AttachInput/AttachInput.styles.d.ts +16 -0
- package/dist/components/AttachInput/AttachInput.types.d.ts +15 -0
- package/dist/components/Autocomplete/Autocomplete.d.ts +2 -2
- package/dist/components/Chips/chipTypes.d.ts +1 -1
- package/dist/components/Drawer/Drawer.d.ts +2 -0
- 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/AttachInput.d.ts +2 -0
- package/dist/exports/DropZone.d.ts +10 -3
- package/dist/exports/Select.d.ts +1 -1
- package/dist/index.d.ts +8 -5
- package/dist/prometeo-design-system.es.js +360 -380
- package/dist/styles.css +1 -1
- package/package.json +5 -1
- package/dist/HelperComponent-CNmmLxWc.js +0 -26
- package/dist/components/DropZone/DropZone.d.ts +0 -24
- package/dist/components/DropZone/DropzoneCompossable.d.ts +0 -54
- package/dist/components/DropZone/useFileDropzone.d.ts +0 -29
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { j as r } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
+
import { c as s } from "./cn-B6yFEsav.js";
|
|
3
|
+
import { memo as T, forwardRef as H, useCallback as P } from "react";
|
|
4
|
+
import { useDropzone as E } from "react-dropzone";
|
|
5
|
+
import G from "./PlainTooltip.es.js";
|
|
6
|
+
import { H as _ } from "./HelperComponent-BFzIO-0g.js";
|
|
7
|
+
import { c as i } from "./index-BOQuZ0gG.js";
|
|
8
|
+
import { UploadCloud as q } from "./Icons/UploadCloud.es.js";
|
|
9
|
+
import { Info as K } from "./Icons/Info.es.js";
|
|
10
|
+
const O = i(
|
|
11
|
+
"relative w-full radius-large transition-colors duration-200 overflow-hidden flex flex-col items-center justify-center text-center gap-1 p-3",
|
|
12
|
+
{
|
|
13
|
+
variants: {
|
|
14
|
+
disabled: {
|
|
15
|
+
true: "cursor-default",
|
|
16
|
+
false: "hover:cursor-pointer group"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
disabled: !1
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
), U = {
|
|
24
|
+
disabled: "text-[var(--border-disabled-ondisabled)]",
|
|
25
|
+
"drag-active": "text-[var(--border-brand-secondary-default)]",
|
|
26
|
+
"drag-reject": "text-[var(--border-error-onneutral-default)]",
|
|
27
|
+
default: "text-[var(--border-neutral-primary-default)]",
|
|
28
|
+
error: "text-[var(--border-error-onneutral-default)]",
|
|
29
|
+
success: "text-[var(--border-success-onneutral-default)]"
|
|
30
|
+
}, W = (t, e, n) => n ? "disabled" : e === "active" ? "drag-active" : e === "reject" ? "drag-reject" : t, J = i(
|
|
31
|
+
"prometeo-fonts-body-medium text-balanced text-neutral-secondary-default",
|
|
32
|
+
{
|
|
33
|
+
variants: {
|
|
34
|
+
disabled: {
|
|
35
|
+
true: "text-disabled-default!",
|
|
36
|
+
false: ""
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
defaultVariants: {
|
|
40
|
+
disabled: !1
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
), L = i("icon-neutral-tertiary-default", {
|
|
44
|
+
variants: {
|
|
45
|
+
disabled: {
|
|
46
|
+
true: "icon-disabled-default!",
|
|
47
|
+
false: ""
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}), Q = i(
|
|
51
|
+
"prometeo-fonts-label-large flex items-center px-3 gap-0.5",
|
|
52
|
+
{
|
|
53
|
+
variants: {
|
|
54
|
+
visualStatus: {
|
|
55
|
+
default: "text-neutral-secondary-default",
|
|
56
|
+
error: "text-semantic-error-onneutral-default",
|
|
57
|
+
success: "text-semantic-success-onneutral-default"
|
|
58
|
+
},
|
|
59
|
+
disabled: {
|
|
60
|
+
true: "text-disabled-default!",
|
|
61
|
+
false: ""
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
defaultVariants: {
|
|
65
|
+
visualStatus: "default",
|
|
66
|
+
disabled: !1
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
), X = (t) => {
|
|
70
|
+
const e = t / 1048576;
|
|
71
|
+
return e < 1 ? `${Math.round(t / 1024)} KB` : e < 1024 ? `${e % 1 === 0 ? e : e.toFixed(1)} MB` : `${(e / 1024).toFixed(1)} GB`;
|
|
72
|
+
}, y = (t) => Object.keys(t).map((e) => t[e].join(", ")).join(" "), Y = (t, e, n) => {
|
|
73
|
+
if (t.some(
|
|
74
|
+
(d) => d.errors.some((u) => u.code === "too-many-files")
|
|
75
|
+
))
|
|
76
|
+
return `Máximo ${e} ${e === 1 ? "archivo" : "archivos"} permitido${e === 1 ? "" : "s"}`;
|
|
77
|
+
const o = t.length;
|
|
78
|
+
return o === 1 ? "El archivo no pudo cargarse" : `${o} archivos no pudieron cargarse`;
|
|
79
|
+
}, Z = (t, e) => e ? "reject" : t ? "active" : "idle", N = H(
|
|
80
|
+
({
|
|
81
|
+
onFilesAccepted: t,
|
|
82
|
+
onFilesRejected: e,
|
|
83
|
+
className: n,
|
|
84
|
+
label: c,
|
|
85
|
+
subtitle: o = "Arrastra y suelta los archivos aquí, o haz clic para seleccionar",
|
|
86
|
+
acceptedFormats: d,
|
|
87
|
+
status: u,
|
|
88
|
+
supportingText: f,
|
|
89
|
+
showSupportingText: w,
|
|
90
|
+
disabled: a = !1,
|
|
91
|
+
accept: m,
|
|
92
|
+
maxFiles: h = 1,
|
|
93
|
+
maxSize: p,
|
|
94
|
+
...M
|
|
95
|
+
}, C) => {
|
|
96
|
+
const D = P(
|
|
97
|
+
(g, j) => {
|
|
98
|
+
g.length > 0 && t?.(g), j.length > 0 && e?.(j);
|
|
99
|
+
},
|
|
100
|
+
[t, e]
|
|
101
|
+
), {
|
|
102
|
+
getRootProps: V,
|
|
103
|
+
getInputProps: $,
|
|
104
|
+
isDragActive: k,
|
|
105
|
+
isDragReject: A,
|
|
106
|
+
fileRejections: b
|
|
107
|
+
} = E({
|
|
108
|
+
onDrop: D,
|
|
109
|
+
accept: m,
|
|
110
|
+
maxFiles: h,
|
|
111
|
+
disabled: a,
|
|
112
|
+
maxSize: p,
|
|
113
|
+
...M
|
|
114
|
+
}), v = b.length > 0, l = v ? "error" : u ?? "default", x = Z(k, A), R = W(l, x, a), S = U[R], I = v ? Y([...b], h) : typeof f == "function" ? f() : f, z = d ?? y(m ?? {}), B = y(m ?? {});
|
|
115
|
+
return /* @__PURE__ */ r.jsxs("div", { className: s("w-full flex flex-col gap-1", n), children: [
|
|
116
|
+
c && /* @__PURE__ */ r.jsx(
|
|
117
|
+
"label",
|
|
118
|
+
{
|
|
119
|
+
className: Q({
|
|
120
|
+
visualStatus: l,
|
|
121
|
+
disabled: a
|
|
122
|
+
}),
|
|
123
|
+
children: c
|
|
124
|
+
}
|
|
125
|
+
),
|
|
126
|
+
/* @__PURE__ */ r.jsxs(
|
|
127
|
+
"div",
|
|
128
|
+
{
|
|
129
|
+
ref: C,
|
|
130
|
+
...V(),
|
|
131
|
+
className: O({ disabled: a }),
|
|
132
|
+
children: [
|
|
133
|
+
/* @__PURE__ */ r.jsx("input", { ...$() }),
|
|
134
|
+
/* @__PURE__ */ r.jsx(
|
|
135
|
+
"svg",
|
|
136
|
+
{
|
|
137
|
+
"aria-hidden": !0,
|
|
138
|
+
className: s(
|
|
139
|
+
"absolute inset-0 w-full h-full pointer-events-none overflow-visible transition-colors duration-200",
|
|
140
|
+
S,
|
|
141
|
+
!a && x === "idle" && "group-hover:text-[var(--border-brand-secondary-hover)] group-active:text-[var(--border-brand-secondary-pressed)]"
|
|
142
|
+
),
|
|
143
|
+
children: /* @__PURE__ */ r.jsx(
|
|
144
|
+
"rect",
|
|
145
|
+
{
|
|
146
|
+
x: "0.5",
|
|
147
|
+
y: "0.5",
|
|
148
|
+
width: "99%",
|
|
149
|
+
height: "99%",
|
|
150
|
+
rx: "15.5",
|
|
151
|
+
fill: "none",
|
|
152
|
+
stroke: "currentColor",
|
|
153
|
+
strokeDasharray: "8 8",
|
|
154
|
+
strokeWidth: x === "active" ? 2 : 1
|
|
155
|
+
}
|
|
156
|
+
)
|
|
157
|
+
}
|
|
158
|
+
),
|
|
159
|
+
o && /* @__PURE__ */ r.jsx(
|
|
160
|
+
"p",
|
|
161
|
+
{
|
|
162
|
+
className: J({
|
|
163
|
+
disabled: a
|
|
164
|
+
}),
|
|
165
|
+
children: o
|
|
166
|
+
}
|
|
167
|
+
),
|
|
168
|
+
/* @__PURE__ */ r.jsx(
|
|
169
|
+
q,
|
|
170
|
+
{
|
|
171
|
+
size: 20,
|
|
172
|
+
className: L({
|
|
173
|
+
disabled: a
|
|
174
|
+
})
|
|
175
|
+
}
|
|
176
|
+
),
|
|
177
|
+
!v && /* @__PURE__ */ r.jsxs("div", { className: "w-full overflow-hidden flex justify-center items-center gap-0.5", children: [
|
|
178
|
+
/* @__PURE__ */ r.jsxs("p", { className: s("prometeo-fonts-body-xsmall text-neutral-tertiary-default line-clamp-1", a && "text-disabled-default!"), children: [
|
|
179
|
+
z,
|
|
180
|
+
p !== void 0 && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
181
|
+
" ",
|
|
182
|
+
"· Máx. ",
|
|
183
|
+
X(p)
|
|
184
|
+
] })
|
|
185
|
+
] }),
|
|
186
|
+
/* @__PURE__ */ r.jsx(G, { title: B, children: /* @__PURE__ */ r.jsx(
|
|
187
|
+
K,
|
|
188
|
+
{
|
|
189
|
+
size: 12,
|
|
190
|
+
className: s("icon-neutral-tertiary-default shrink-0", a && "icon-disabled-default!")
|
|
191
|
+
}
|
|
192
|
+
) })
|
|
193
|
+
] })
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
),
|
|
197
|
+
w && /* @__PURE__ */ r.jsx(_, { variant: l, disabled: a, className: s(l === "default" && !a && "[&>p]:text-neutral-tertiary-default! [&>svg]:icon-neutral-tertiary-default!"), children: I })
|
|
198
|
+
] });
|
|
199
|
+
}
|
|
200
|
+
);
|
|
201
|
+
N.displayName = "AttachInput";
|
|
202
|
+
const ie = T(N);
|
|
203
|
+
export {
|
|
204
|
+
ie as AttachInput,
|
|
205
|
+
ie as default
|
|
206
|
+
};
|
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
|
};
|