prometeo-design-system 7.3.9 → 7.4.1
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.es.js +93 -79
- package/dist/Button.es.js +1 -1
- package/dist/CardBackground.es.js +29 -29
- package/dist/{DatePicker-CcRHWIOk.js → DatePicker-Bz5cUK6R.js} +964 -962
- package/dist/DatePicker.es.js +1 -1
- package/dist/Dialog.es.js +1 -1
- package/dist/HelperComponent.es.js +8 -8
- package/dist/Menu.es.js +1 -1
- package/dist/MenuFloating-CZ7dqXy2.js +128 -0
- package/dist/MessageCard.es.js +35 -37
- package/dist/Popover.css +1 -1
- package/dist/Popover.es.js +550 -361
- package/dist/RecurrentDatePicker.es.js +1 -1
- package/dist/RecurrentDatePickerRRule.es.js +1 -1
- package/dist/SelectLegacy.es.js +1 -1
- package/dist/components/AttachInput/AttachInput.types.d.ts +2 -0
- package/dist/components/Cards/Message/MessageCard.d.ts +1 -6
- package/dist/components/DatePicker/DatePicker.d.ts +5 -6
- package/dist/components/Input/types.d.ts +5 -0
- package/dist/components/Popover/Popover.d.ts +26 -6
- package/dist/exports/Popover.d.ts +2 -1
- package/dist/hooks/useTriggerRect.d.ts +14 -0
- package/dist/index.d.ts +1 -1
- package/dist/prometeo-design-system.es.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/useFloatingPosition-CSrirTF5.js +290 -0
- package/package.json +1 -1
- package/src/styles/base.css +1 -0
- package/dist/MenuFloating-Bew5qbpJ.js +0 -413
package/dist/AttachInput.es.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { c as
|
|
3
|
-
import { memo as
|
|
4
|
-
import { useDropzone as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { j as t } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
+
import { c as o } from "./cn-B6yFEsav.js";
|
|
3
|
+
import { memo as P, forwardRef as E, useCallback as G } from "react";
|
|
4
|
+
import { useDropzone as H } from "react-dropzone";
|
|
5
|
+
import _ from "./CardBackground.es.js";
|
|
6
|
+
import q from "./PlainTooltip.es.js";
|
|
7
|
+
import K from "./HelperComponent.es.js";
|
|
7
8
|
import { c as i } from "./index-BOQuZ0gG.js";
|
|
8
|
-
import { UploadCloud as
|
|
9
|
-
import { Info as
|
|
10
|
-
const
|
|
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",
|
|
9
|
+
import { UploadCloud as O } from "./Icons/UploadCloud.es.js";
|
|
10
|
+
import { Info as U } from "./Icons/Info.es.js";
|
|
11
|
+
const W = i(
|
|
12
|
+
"relative w-full radius-large transition-colors duration-200 overflow-hidden flex flex-col items-center justify-center text-center gap-1 p-3 flex-1",
|
|
12
13
|
{
|
|
13
14
|
variants: {
|
|
14
15
|
disabled: {
|
|
@@ -20,14 +21,14 @@ const O = i(
|
|
|
20
21
|
disabled: !1
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
|
-
),
|
|
24
|
+
), J = {
|
|
24
25
|
disabled: "text-[var(--border-disabled-ondisabled)]",
|
|
25
26
|
"drag-active": "text-[var(--border-brand-secondary-default)]",
|
|
26
27
|
"drag-reject": "text-[var(--border-error-onneutral-default)]",
|
|
27
28
|
default: "text-[var(--border-neutral-primary-default)]",
|
|
28
29
|
error: "text-[var(--border-error-onneutral-default)]",
|
|
29
30
|
success: "text-[var(--border-success-onneutral-default)]"
|
|
30
|
-
},
|
|
31
|
+
}, L = (r, e, n) => n ? "disabled" : e === "active" ? "drag-active" : e === "reject" ? "drag-reject" : r, Q = i(
|
|
31
32
|
"prometeo-fonts-body-medium text-balanced text-neutral-secondary-default",
|
|
32
33
|
{
|
|
33
34
|
variants: {
|
|
@@ -40,14 +41,14 @@ const O = i(
|
|
|
40
41
|
disabled: !1
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
|
-
),
|
|
44
|
+
), X = i("icon-neutral-tertiary-default", {
|
|
44
45
|
variants: {
|
|
45
46
|
disabled: {
|
|
46
47
|
true: "icon-disabled-default!",
|
|
47
48
|
false: ""
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
|
-
}),
|
|
51
|
+
}), Y = i(
|
|
51
52
|
"prometeo-fonts-label-large flex items-center px-3 gap-0.5",
|
|
52
53
|
{
|
|
53
54
|
variants: {
|
|
@@ -66,81 +67,92 @@ const O = i(
|
|
|
66
67
|
disabled: !1
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
|
-
),
|
|
70
|
-
const e =
|
|
71
|
-
return e < 1 ? `${Math.round(
|
|
72
|
-
},
|
|
73
|
-
if (
|
|
70
|
+
), Z = (r) => {
|
|
71
|
+
const e = r / 1048576;
|
|
72
|
+
return e < 1 ? `${Math.round(r / 1024)} KB` : e < 1024 ? `${e % 1 === 0 ? e : e.toFixed(1)} MB` : `${(e / 1024).toFixed(1)} GB`;
|
|
73
|
+
}, N = (r) => Object.keys(r).map((e) => r[e].join(", ")).join(" "), F = (r, e, n) => {
|
|
74
|
+
if (r.some(
|
|
74
75
|
(d) => d.errors.some((u) => u.code === "too-many-files")
|
|
75
76
|
))
|
|
76
77
|
return `Máximo ${e} ${e === 1 ? "archivo" : "archivos"} permitido${e === 1 ? "" : "s"}`;
|
|
77
|
-
const
|
|
78
|
-
return
|
|
79
|
-
},
|
|
78
|
+
const s = r.length;
|
|
79
|
+
return s === 1 ? "El archivo no pudo cargarse" : `${s} archivos no pudieron cargarse`;
|
|
80
|
+
}, ee = (r, e) => e ? "reject" : r ? "active" : "idle", w = E(
|
|
80
81
|
({
|
|
81
|
-
onFilesAccepted:
|
|
82
|
+
onFilesAccepted: r,
|
|
82
83
|
onFilesRejected: e,
|
|
83
84
|
className: n,
|
|
84
85
|
label: c,
|
|
85
|
-
subtitle:
|
|
86
|
+
subtitle: s = "Arrastra y suelta los archivos aquí, o haz clic para seleccionar",
|
|
86
87
|
acceptedFormats: d,
|
|
87
88
|
status: u,
|
|
88
89
|
supportingText: f,
|
|
89
|
-
showSupportingText:
|
|
90
|
+
showSupportingText: z,
|
|
90
91
|
disabled: a = !1,
|
|
91
92
|
accept: m,
|
|
92
93
|
maxFiles: h = 1,
|
|
93
|
-
maxSize:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
94
|
+
maxSize: v,
|
|
95
|
+
cardBackground: b,
|
|
96
|
+
...C
|
|
97
|
+
}, M) => {
|
|
98
|
+
const D = G(
|
|
99
|
+
(j, y) => {
|
|
100
|
+
j.length > 0 && r?.(j), y.length > 0 && e?.(y);
|
|
99
101
|
},
|
|
100
|
-
[
|
|
102
|
+
[r, e]
|
|
101
103
|
), {
|
|
102
104
|
getRootProps: V,
|
|
103
105
|
getInputProps: $,
|
|
104
106
|
isDragActive: k,
|
|
105
107
|
isDragReject: A,
|
|
106
|
-
fileRejections:
|
|
107
|
-
} =
|
|
108
|
+
fileRejections: g
|
|
109
|
+
} = H({
|
|
108
110
|
onDrop: D,
|
|
109
111
|
accept: m,
|
|
110
112
|
maxFiles: h,
|
|
111
113
|
disabled: a,
|
|
112
|
-
maxSize:
|
|
113
|
-
...
|
|
114
|
-
}),
|
|
115
|
-
return /* @__PURE__ */
|
|
116
|
-
c && /* @__PURE__ */
|
|
114
|
+
maxSize: v,
|
|
115
|
+
...C
|
|
116
|
+
}), p = g.length > 0, l = p ? "error" : u ?? "default", x = ee(k, A), R = L(l, x, a), S = J[R], I = p ? F([...g], h) : typeof f == "function" ? f() : f, B = d ?? N(m ?? {}), T = N(m ?? {});
|
|
117
|
+
return /* @__PURE__ */ t.jsxs("div", { className: o("w-full flex flex-col gap-1 h-[136px]", n), children: [
|
|
118
|
+
c && /* @__PURE__ */ t.jsx(
|
|
117
119
|
"label",
|
|
118
120
|
{
|
|
119
|
-
className:
|
|
121
|
+
className: Y({
|
|
120
122
|
visualStatus: l,
|
|
121
123
|
disabled: a
|
|
122
124
|
}),
|
|
123
125
|
children: c
|
|
124
126
|
}
|
|
125
127
|
),
|
|
126
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ t.jsxs(
|
|
127
129
|
"div",
|
|
128
130
|
{
|
|
129
|
-
ref:
|
|
131
|
+
ref: M,
|
|
130
132
|
...V(),
|
|
131
|
-
className:
|
|
133
|
+
className: W({ disabled: a }),
|
|
132
134
|
children: [
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
+
/* @__PURE__ */ t.jsx("input", { ...$() }),
|
|
136
|
+
/* @__PURE__ */ t.jsx(
|
|
137
|
+
_,
|
|
138
|
+
{
|
|
139
|
+
color: "neutral",
|
|
140
|
+
variant: "default",
|
|
141
|
+
forced: "default",
|
|
142
|
+
...b,
|
|
143
|
+
className: o("absolute inset-0", b?.className)
|
|
144
|
+
}
|
|
145
|
+
),
|
|
146
|
+
/* @__PURE__ */ t.jsx(
|
|
135
147
|
"svg",
|
|
136
148
|
{
|
|
137
149
|
"aria-hidden": !0,
|
|
138
|
-
className:
|
|
139
|
-
"absolute inset-0 w-full h-full pointer-events-none overflow-visible transition-colors duration-200",
|
|
150
|
+
className: o(
|
|
151
|
+
"absolute inset-0 z-[1] w-full h-full pointer-events-none overflow-visible transition-colors duration-200",
|
|
140
152
|
S,
|
|
141
153
|
!a && x === "idle" && "group-hover:text-[var(--border-brand-secondary-hover)] group-active:text-[var(--border-brand-secondary-pressed)]"
|
|
142
154
|
),
|
|
143
|
-
children: /* @__PURE__ */
|
|
155
|
+
children: /* @__PURE__ */ t.jsx(
|
|
144
156
|
"rect",
|
|
145
157
|
{
|
|
146
158
|
x: "0.5",
|
|
@@ -156,51 +168,53 @@ const O = i(
|
|
|
156
168
|
)
|
|
157
169
|
}
|
|
158
170
|
),
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
className: J({
|
|
163
|
-
disabled: a
|
|
164
|
-
}),
|
|
165
|
-
children: o
|
|
166
|
-
}
|
|
167
|
-
),
|
|
168
|
-
/* @__PURE__ */ r.jsx(
|
|
169
|
-
q,
|
|
171
|
+
s && /* @__PURE__ */ t.jsx("p", { className: o(Q({ disabled: a }), "relative z-[1]"), children: s }),
|
|
172
|
+
/* @__PURE__ */ t.jsx(
|
|
173
|
+
O,
|
|
170
174
|
{
|
|
171
175
|
size: 20,
|
|
172
|
-
className:
|
|
173
|
-
disabled: a
|
|
174
|
-
})
|
|
176
|
+
className: o(X({ disabled: a }), "relative z-[1]")
|
|
175
177
|
}
|
|
176
178
|
),
|
|
177
|
-
!
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
179
|
+
!p && /* @__PURE__ */ t.jsxs("div", { className: "relative z-[1] w-full overflow-hidden flex justify-center items-center gap-0.5", children: [
|
|
180
|
+
/* @__PURE__ */ t.jsxs(
|
|
181
|
+
"p",
|
|
182
|
+
{
|
|
183
|
+
className: o(
|
|
184
|
+
"prometeo-fonts-body-xsmall text-neutral-tertiary-default line-clamp-1",
|
|
185
|
+
a && "text-disabled-default!"
|
|
186
|
+
),
|
|
187
|
+
children: [
|
|
188
|
+
B,
|
|
189
|
+
v !== void 0 && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
190
|
+
" ",
|
|
191
|
+
"· Máx. ",
|
|
192
|
+
Z(v)
|
|
193
|
+
] })
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
),
|
|
197
|
+
/* @__PURE__ */ t.jsx(q, { title: T, children: /* @__PURE__ */ t.jsx(
|
|
198
|
+
U,
|
|
188
199
|
{
|
|
189
200
|
size: 12,
|
|
190
|
-
className:
|
|
201
|
+
className: o(
|
|
202
|
+
"icon-neutral-tertiary-default shrink-0",
|
|
203
|
+
a && "icon-disabled-default!"
|
|
204
|
+
)
|
|
191
205
|
}
|
|
192
206
|
) })
|
|
193
207
|
] })
|
|
194
208
|
]
|
|
195
209
|
}
|
|
196
210
|
),
|
|
197
|
-
|
|
211
|
+
z && /* @__PURE__ */ t.jsx(K, { variant: l, disabled: a, className: o(l === "default" && !a && "[&>p]:text-neutral-tertiary-default! [&>svg]:icon-neutral-tertiary-default!"), children: I })
|
|
198
212
|
] });
|
|
199
213
|
}
|
|
200
214
|
);
|
|
201
|
-
|
|
202
|
-
const
|
|
215
|
+
w.displayName = "AttachInput";
|
|
216
|
+
const ue = P(w);
|
|
203
217
|
export {
|
|
204
|
-
|
|
205
|
-
|
|
218
|
+
ue as AttachInput,
|
|
219
|
+
ue as default
|
|
206
220
|
};
|
package/dist/Button.es.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { j as b } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
-
import { memo as
|
|
3
|
-
import { c as
|
|
2
|
+
import { memo as S } from "react";
|
|
3
|
+
import { c as V } from "./index-BOQuZ0gG.js";
|
|
4
4
|
import { c as g } from "./cn-B6yFEsav.js";
|
|
5
|
-
const
|
|
6
|
-
function
|
|
7
|
-
return { [
|
|
5
|
+
const O = "data-interaction-group", k = "data-interaction-exclude";
|
|
6
|
+
function G() {
|
|
7
|
+
return { [O]: "" };
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function A(r) {
|
|
10
10
|
return r != null && r !== "self";
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function E(r, e) {
|
|
13
13
|
const t = r ?? "neutral";
|
|
14
14
|
return {
|
|
15
15
|
color: t,
|
|
16
16
|
variant: t === "brand" ? "primary" : e ?? "default"
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function _(r, e) {
|
|
20
20
|
return {
|
|
21
21
|
default: { color: r, variant: e },
|
|
22
22
|
hover: { color: r, variant: e, forced: "hover" },
|
|
23
23
|
pressed: { color: r, variant: e, forced: "pressed" }
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function p(r, e, t) {
|
|
27
27
|
if (r) return r;
|
|
28
|
-
const { color: a, variant: n } =
|
|
29
|
-
return
|
|
28
|
+
const { color: a, variant: n } = E(e, t);
|
|
29
|
+
return _(a, n);
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function x(r, e) {
|
|
32
32
|
return e || r !== void 0;
|
|
33
33
|
}
|
|
34
|
-
const
|
|
34
|
+
const m = "transition-colors duration-300 ease will-change-colors", i = V(m, {
|
|
35
35
|
variants: {
|
|
36
36
|
color: {
|
|
37
37
|
neutral: "",
|
|
@@ -183,7 +183,7 @@ const y = "transition-colors duration-300 ease will-change-colors", i = T(y, {
|
|
|
183
183
|
}
|
|
184
184
|
]
|
|
185
185
|
});
|
|
186
|
-
function
|
|
186
|
+
function y(r) {
|
|
187
187
|
return !("color" in r.default);
|
|
188
188
|
}
|
|
189
189
|
function s(r) {
|
|
@@ -210,15 +210,15 @@ function s(r) {
|
|
|
210
210
|
disabled: !1
|
|
211
211
|
}).split(" ").find((a) => a.startsWith("bg-") && !a.includes(":")) ?? "bg-neutral-default-default"})`;
|
|
212
212
|
}
|
|
213
|
-
function
|
|
214
|
-
const e =
|
|
213
|
+
function h(r) {
|
|
214
|
+
const e = y(r) ? r.default : r, t = y(r) ? r.selected : void 0, a = {
|
|
215
215
|
"--cell-bg": s(e.default),
|
|
216
216
|
"--cell-bg-hover": s(e.hover),
|
|
217
217
|
"--cell-bg-pressed": s(e.pressed)
|
|
218
218
|
};
|
|
219
219
|
return t && (a["--cell-bg-selected"] = s(t.default), a["--cell-bg-sel-hover"] = s(t.hover), a["--cell-bg-sel-pressed"] = s(t.pressed)), a;
|
|
220
220
|
}
|
|
221
|
-
const
|
|
221
|
+
const w = (r) => {
|
|
222
222
|
const e = {
|
|
223
223
|
color: "neutral",
|
|
224
224
|
variant: "default",
|
|
@@ -235,29 +235,29 @@ const _ = (r) => {
|
|
|
235
235
|
interactionSource: u,
|
|
236
236
|
...v
|
|
237
237
|
} = { ...e, ...r };
|
|
238
|
-
if (
|
|
239
|
-
const
|
|
240
|
-
return /* @__PURE__ */ b.jsx("div", { className: g(
|
|
238
|
+
if (x(n, d)) {
|
|
239
|
+
const T = i({ color: t, variant: a, forced: n, disabled: d }), N = p(o, t, a), R = h(N);
|
|
240
|
+
return /* @__PURE__ */ b.jsx("div", { className: g(T, c), "data-disabled": d, style: R, ...v, children: l && typeof l == "function" ? l() : l });
|
|
241
241
|
}
|
|
242
|
-
const
|
|
242
|
+
const C = p(o, t, a), I = h(C), f = A(u);
|
|
243
243
|
return /* @__PURE__ */ b.jsx(
|
|
244
244
|
"div",
|
|
245
245
|
{
|
|
246
246
|
"data-cell-interactive": "",
|
|
247
247
|
"data-interaction-grouped": f ? "" : void 0,
|
|
248
248
|
"data-interaction-source": f ? u : void 0,
|
|
249
|
-
className: g(
|
|
249
|
+
className: g(m, c),
|
|
250
250
|
"data-disabled": d,
|
|
251
|
-
style:
|
|
251
|
+
style: I,
|
|
252
252
|
...v,
|
|
253
253
|
children: l && typeof l == "function" ? l() : l
|
|
254
254
|
}
|
|
255
255
|
);
|
|
256
|
-
},
|
|
257
|
-
|
|
256
|
+
}, j = S(w);
|
|
257
|
+
j.displayName = "CardBackground";
|
|
258
258
|
export {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
259
|
+
k as INTERACTION_EXCLUDE_ATTR,
|
|
260
|
+
O as INTERACTION_GROUP_ATTR,
|
|
261
|
+
j as default,
|
|
262
|
+
G as interactionGroupProps
|
|
263
263
|
};
|