prometeo-design-system 2.6.5 → 2.6.7
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/DrawerDesktop.es.js +133 -84
- package/dist/Header.es.js +10 -10
- package/dist/ProfilePictureUpload.es.js +1 -1
- package/dist/ProgressBar.es.js +31 -16
- package/dist/{Select-B9faRcN1.js → Select-D3aU7dXF.js} +45 -45
- package/dist/Select.es.js +1 -1
- package/dist/SelectFormik.es.js +1 -1
- package/dist/SelectSearch.es.js +1 -1
- package/dist/components/CardProfile/CardProfile.d.ts +8 -1
- package/dist/components/Drawer/DrawerDesktop.d.ts +9 -7
- package/dist/components/Drawer/useDrawerDesktop.d.ts +4 -3
- package/dist/components/Header/Header.d.ts +2 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +1 -0
- package/dist/components/RecurrentDatePicker/CustomFrequencySettings.d.ts +14 -0
- package/dist/components/RecurrentDatePicker/FrequencySettings.d.ts +8 -2
- package/dist/components/RecurrentDatePicker/MonthlyFrequencySettings.d.ts +29 -0
- package/dist/components/RecurrentDatePicker/RecurrentDatePicker.d.ts +6 -1
- package/dist/components/RecurrentDatePicker/WeekdaysSelector.d.ts +3 -2
- package/dist/components/RecurrentDatePicker/WeeklyFrequencySetting.d.ts +8 -0
- package/dist/components/RecurrentDatePicker/YearlyFrequencySettings.d.ts +10 -0
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +22 -22
- package/package.json +9 -9
package/dist/DrawerDesktop.es.js
CHANGED
|
@@ -1,57 +1,100 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { c as
|
|
3
|
-
import { c as
|
|
4
|
-
import { createPortal as
|
|
5
|
-
import { Icons as
|
|
6
|
-
import { forwardRef as
|
|
7
|
-
const
|
|
8
|
-
const [
|
|
9
|
-
modal:
|
|
10
|
-
children:
|
|
11
|
-
className:
|
|
12
|
-
direction:
|
|
13
|
-
attachToParent:
|
|
14
|
-
closeOnOverlayClick:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}, []),
|
|
22
|
-
|
|
1
|
+
import { j as l } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
+
import { c as h } from "./cn-B6yFEsav.js";
|
|
3
|
+
import { c as k, B as E } from "./Button-DsbEyjth.js";
|
|
4
|
+
import { createPortal as I } from "react-dom";
|
|
5
|
+
import { Icons as V } from "./Icons.es.js";
|
|
6
|
+
import { forwardRef as B, useRef as u, useState as N, useEffect as d, useCallback as f, useImperativeHandle as P } from "react";
|
|
7
|
+
const L = B((t, s) => {
|
|
8
|
+
const o = u(null), [e, a] = N(t.defaultOpen || !1), [r, y] = N(null), b = u(t.onClose), c = u(r), {
|
|
9
|
+
modal: i = !1,
|
|
10
|
+
children: m,
|
|
11
|
+
className: w,
|
|
12
|
+
direction: C = "left",
|
|
13
|
+
attachToParent: x = !1,
|
|
14
|
+
closeOnOverlayClick: n = !1,
|
|
15
|
+
hideCloseButton: T = !1
|
|
16
|
+
} = t, g = u(n), O = u(e);
|
|
17
|
+
c.current = r, d(() => {
|
|
18
|
+
O.current = e;
|
|
19
|
+
}, [e]), d(() => {
|
|
20
|
+
c.current = r;
|
|
21
|
+
}, [r]), d(() => {
|
|
22
|
+
g.current = n;
|
|
23
|
+
}, [n]);
|
|
24
|
+
const R = (p) => {
|
|
25
|
+
if (!o.current)
|
|
26
|
+
return;
|
|
27
|
+
const z = o.current;
|
|
28
|
+
z && !z.contains(p.target) && g.current && O.current && v();
|
|
29
|
+
};
|
|
30
|
+
d(() => {
|
|
31
|
+
if (!g.current || i || !e)
|
|
32
|
+
return;
|
|
33
|
+
const p = setTimeout(() => {
|
|
34
|
+
document.addEventListener("click", R);
|
|
35
|
+
}, 0);
|
|
36
|
+
return () => {
|
|
37
|
+
clearTimeout(p), document.removeEventListener("click", R);
|
|
38
|
+
};
|
|
39
|
+
}, [n, e, i]), d(() => {
|
|
40
|
+
b.current = t.onClose;
|
|
41
|
+
}, [t.onClose]);
|
|
42
|
+
const j = f((p) => {
|
|
43
|
+
y(p ?? null), a(!0);
|
|
44
|
+
}, []), v = f(() => {
|
|
45
|
+
a(!1), b.current?.(c.current), setTimeout(() => y(null), 300);
|
|
23
46
|
}, []);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
47
|
+
P(
|
|
48
|
+
s,
|
|
49
|
+
() => ({
|
|
50
|
+
open: j,
|
|
51
|
+
close: v,
|
|
52
|
+
isOpen: e,
|
|
53
|
+
getContext: () => c.current
|
|
54
|
+
}),
|
|
55
|
+
[e, j, v]
|
|
56
|
+
);
|
|
57
|
+
const D = /* @__PURE__ */ l.jsx(
|
|
58
|
+
Y,
|
|
31
59
|
{
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
60
|
+
context: r,
|
|
61
|
+
ref: o,
|
|
62
|
+
isOpen: e,
|
|
63
|
+
close: v,
|
|
64
|
+
direction: C,
|
|
65
|
+
modal: i,
|
|
66
|
+
className: w,
|
|
67
|
+
attachToParent: x,
|
|
68
|
+
closeOnOverlayClick: n,
|
|
69
|
+
hideCloseButton: T,
|
|
70
|
+
children: typeof m == "function" ? m(r) : m
|
|
40
71
|
}
|
|
41
72
|
);
|
|
42
|
-
return
|
|
73
|
+
return x ? D : I(D, document.body);
|
|
43
74
|
});
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
75
|
+
L.displayName = "DrawerDesktopV2";
|
|
76
|
+
const Y = ({
|
|
77
|
+
ref: t,
|
|
78
|
+
children: s,
|
|
79
|
+
direction: o = "left",
|
|
80
|
+
isOpen: e,
|
|
81
|
+
close: a,
|
|
82
|
+
modal: r = !1,
|
|
83
|
+
className: y,
|
|
84
|
+
attachToParent: b = !1,
|
|
85
|
+
closeOnOverlayClick: c = !1,
|
|
86
|
+
hideCloseButton: i = !1,
|
|
87
|
+
context: m
|
|
88
|
+
}) => {
|
|
89
|
+
d(() => {
|
|
90
|
+
if (e && r) {
|
|
91
|
+
const n = window.scrollY;
|
|
92
|
+
return document.body.style.position = "fixed", document.body.style.top = `-${n}px`, document.body.style.width = "100%", () => {
|
|
93
|
+
document.body.style.position = "", document.body.style.top = "", document.body.style.width = "", window.scrollTo(0, n);
|
|
51
94
|
};
|
|
52
95
|
}
|
|
53
|
-
}, [
|
|
54
|
-
const
|
|
96
|
+
}, [e, r]);
|
|
97
|
+
const w = k("border-neutral-strong-default", {
|
|
55
98
|
variants: {
|
|
56
99
|
isOpen: {
|
|
57
100
|
true: "desktop-drawer-visible",
|
|
@@ -62,14 +105,17 @@ const z = ({ children: e, direction: a = "left", isOpen: t, close: n, modal: o =
|
|
|
62
105
|
right: "right-0 border-l-[1px] border-r-0"
|
|
63
106
|
}
|
|
64
107
|
}
|
|
65
|
-
}),
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
108
|
+
}), C = k(
|
|
109
|
+
"fixed inset-0 bg-black/60 z-[55] cursor-default",
|
|
110
|
+
{
|
|
111
|
+
variants: {
|
|
112
|
+
isOpen: {
|
|
113
|
+
true: "drawer-overlay-visible",
|
|
114
|
+
false: "drawer-overlay-hidden"
|
|
115
|
+
}
|
|
70
116
|
}
|
|
71
117
|
}
|
|
72
|
-
|
|
118
|
+
), x = k("", {
|
|
73
119
|
variants: {
|
|
74
120
|
direction: {
|
|
75
121
|
left: "right-0",
|
|
@@ -77,66 +123,69 @@ const z = ({ children: e, direction: a = "left", isOpen: t, close: n, modal: o =
|
|
|
77
123
|
}
|
|
78
124
|
}
|
|
79
125
|
});
|
|
80
|
-
return /* @__PURE__ */
|
|
81
|
-
|
|
126
|
+
return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
|
127
|
+
r && /* @__PURE__ */ l.jsx(
|
|
82
128
|
"div",
|
|
83
129
|
{
|
|
84
|
-
className:
|
|
85
|
-
onClick: (
|
|
86
|
-
|
|
130
|
+
className: h(C({ isOpen: e })),
|
|
131
|
+
onClick: (n) => {
|
|
132
|
+
n.preventDefault(), n.stopPropagation(), c && a();
|
|
87
133
|
},
|
|
88
134
|
"aria-hidden": "true"
|
|
89
135
|
}
|
|
90
136
|
),
|
|
91
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ l.jsxs(
|
|
92
138
|
"div",
|
|
93
139
|
{
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
140
|
+
ref: t,
|
|
141
|
+
className: h(
|
|
142
|
+
"bg-neutral-strong-default h-full top-0 z-60 w-max overflow-y-auto",
|
|
143
|
+
b ? "absolute" : "fixed",
|
|
144
|
+
w({ isOpen: e, direction: o }),
|
|
145
|
+
!i && "p-4 pt-10",
|
|
146
|
+
y
|
|
99
147
|
),
|
|
100
148
|
role: "dialog",
|
|
101
|
-
"aria-modal":
|
|
149
|
+
"aria-modal": r,
|
|
102
150
|
children: [
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
|
|
151
|
+
!i && /* @__PURE__ */ l.jsx(
|
|
152
|
+
E,
|
|
105
153
|
{
|
|
106
|
-
icon: /* @__PURE__ */
|
|
154
|
+
icon: /* @__PURE__ */ l.jsx(V.Close, { size: 24 }),
|
|
107
155
|
animate: !1,
|
|
108
156
|
type: "button",
|
|
109
157
|
size: "small",
|
|
110
158
|
variant: "text",
|
|
111
|
-
onClick:
|
|
159
|
+
onClick: a,
|
|
112
160
|
label: "",
|
|
113
161
|
color: "secondary",
|
|
114
|
-
className:
|
|
162
|
+
className: h(
|
|
115
163
|
"absolute top-0 z-50",
|
|
116
|
-
|
|
164
|
+
x({ direction: o })
|
|
117
165
|
),
|
|
118
166
|
"aria-label": "Close drawer"
|
|
119
167
|
}
|
|
120
168
|
),
|
|
121
|
-
|
|
169
|
+
typeof s == "function" ? s(m) : s
|
|
122
170
|
]
|
|
123
171
|
}
|
|
124
172
|
)
|
|
125
173
|
] });
|
|
126
|
-
},
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
}, []),
|
|
130
|
-
|
|
131
|
-
}, []);
|
|
174
|
+
}, G = () => {
|
|
175
|
+
const t = u(null), s = f((r) => {
|
|
176
|
+
t.current?.open(r);
|
|
177
|
+
}, []), o = f(() => {
|
|
178
|
+
t.current?.close();
|
|
179
|
+
}, []), e = f(() => t.current?.isOpen ?? !1, []), a = f(() => t.current?.getContext() ?? null, []);
|
|
132
180
|
return {
|
|
133
|
-
isOpen:
|
|
134
|
-
open:
|
|
135
|
-
close:
|
|
136
|
-
drawerRef:
|
|
181
|
+
isOpen: e,
|
|
182
|
+
open: s,
|
|
183
|
+
close: o,
|
|
184
|
+
drawerRef: t,
|
|
185
|
+
getContext: a
|
|
137
186
|
};
|
|
138
187
|
};
|
|
139
188
|
export {
|
|
140
|
-
|
|
141
|
-
|
|
189
|
+
L as default,
|
|
190
|
+
G as useDrawerDesktop
|
|
142
191
|
};
|
package/dist/Header.es.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { j as l } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
-
import { c as
|
|
3
|
-
import { motion as
|
|
4
|
-
import { memo as
|
|
5
|
-
const
|
|
2
|
+
import { c as i } from "./cn-B6yFEsav.js";
|
|
3
|
+
import { motion as n } from "framer-motion";
|
|
4
|
+
import { memo as r } from "react";
|
|
5
|
+
const x = ({ title: e, subtitle: t, children: a, className: s, subtitleClassName: m }) => /* @__PURE__ */ l.jsx(
|
|
6
6
|
"header",
|
|
7
7
|
{
|
|
8
|
-
className:
|
|
8
|
+
className: i(
|
|
9
9
|
"h-16 flex items-center px-4 sm:h-20 md:h-24 md:px-6 lg:h-28 xl:h-32 2xl:h-36",
|
|
10
|
-
|
|
10
|
+
s
|
|
11
11
|
),
|
|
12
12
|
children: /* @__PURE__ */ l.jsxs(
|
|
13
|
-
|
|
13
|
+
n.div,
|
|
14
14
|
{
|
|
15
15
|
initial: { opacity: 0, y: -10 },
|
|
16
16
|
animate: { opacity: 1, y: 0 },
|
|
@@ -18,7 +18,7 @@ const r = ({ title: e, subtitle: t, children: a, className: i }) => /* @__PURE__
|
|
|
18
18
|
className: "flex justify-between items-center w-full",
|
|
19
19
|
children: [
|
|
20
20
|
/* @__PURE__ */ l.jsxs("div", { className: "flex flex-col leading-6", children: [
|
|
21
|
-
t && /* @__PURE__ */ l.jsx("h3", { className: "text-xs font-semibold text-neutral-medium-default leading-1 sm:leading-2 prometeo-fonts-headline-large", children: t }),
|
|
21
|
+
t && /* @__PURE__ */ l.jsx("h3", { className: i("text-xs font-semibold text-neutral-medium-default leading-1 sm:leading-2 prometeo-fonts-headline-large ", m), children: t }),
|
|
22
22
|
e && /* @__PURE__ */ l.jsx("h1", { className: "text-xl font-bold text-neutral-strong-default sm:text-2xl md:text-3xl xl:text-[32px] 2xl:text-[34px]", children: e })
|
|
23
23
|
] }),
|
|
24
24
|
a && /* @__PURE__ */ l.jsx("div", { className: "flex gap-4", children: a })
|
|
@@ -26,7 +26,7 @@ const r = ({ title: e, subtitle: t, children: a, className: i }) => /* @__PURE__
|
|
|
26
26
|
}
|
|
27
27
|
)
|
|
28
28
|
}
|
|
29
|
-
),
|
|
29
|
+
), u = r(x, (e, t) => e.title !== t.title || e.subtitle !== t.subtitle || e.className !== t.className ? !1 : e.children !== t.children ? !e.children && !t.children : !0);
|
|
30
30
|
export {
|
|
31
|
-
|
|
31
|
+
u as default
|
|
32
32
|
};
|
|
@@ -118,7 +118,7 @@ function O({
|
|
|
118
118
|
{
|
|
119
119
|
ref: u,
|
|
120
120
|
className: l(
|
|
121
|
-
"absolute bg-primary-default-default rounded-lg border-
|
|
121
|
+
"absolute bg-primary-default-default rounded-lg border-2 hover:bg-primary-default-hover cursor-pointer grid place-content-center",
|
|
122
122
|
H[i],
|
|
123
123
|
z[i],
|
|
124
124
|
o && "opacity-50 cursor-not-allowed"
|
package/dist/ProgressBar.es.js
CHANGED
|
@@ -1,27 +1,42 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
-
import { c as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
import { c as j } from "./cn-B6yFEsav.js";
|
|
3
|
+
import v from "react";
|
|
4
|
+
const V = v.forwardRef(
|
|
5
|
+
({
|
|
6
|
+
className: u,
|
|
7
|
+
startDate: h,
|
|
8
|
+
endDate: x,
|
|
9
|
+
label: o,
|
|
10
|
+
...g
|
|
11
|
+
}, p) => {
|
|
12
|
+
const d = new Date(h), a = new Date(x), s = /* @__PURE__ */ new Date(), c = a.getTime() - d.getTime(), m = s.getTime() - d.getTime(), y = Math.min(100, Math.max(0, m / c * 100)), n = 1440 * 60 * 1e3, l = Math.max(0, Math.ceil((a.getTime() - s.getTime()) / n)), i = Math.floor((s.getTime() - a.getTime()) / n), f = Math.ceil(c / n), T = Math.min(f, Math.max(0, Math.floor(m / n))), r = s > a, w = l === 0 && !r, b = r && i === 0;
|
|
13
|
+
let t = o;
|
|
14
|
+
return o || (r ? i === 0 ? t = "Vence hoy" : i === 1 ? t = "Vencido hace 1 día" : t = `Vencido hace ${i} días` : l === 0 ? t = "Vence hoy" : l === 1 ? t = "Falta 1 día" : t = `Faltan ${l} días`), /* @__PURE__ */ e.jsxs("div", { ref: p, className: u, ...g, children: [
|
|
15
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-end mb-2 gap-4 px-2", children: [
|
|
16
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
17
|
+
/* @__PURE__ */ e.jsx("span", { className: "text-sm text-neutral-medium-default", children: "Tiempo restante de resolución" }),
|
|
18
|
+
/* @__PURE__ */ e.jsx("span", { className: "font-semibold text-base text-neutral-default-default", children: t })
|
|
19
|
+
] }),
|
|
20
|
+
/* @__PURE__ */ e.jsxs("span", { className: "text-sm text-neutral-medium-default whitespace-nowrap", children: [
|
|
21
|
+
T,
|
|
22
|
+
" / ",
|
|
23
|
+
f,
|
|
24
|
+
" días"
|
|
25
|
+
] })
|
|
26
|
+
] }),
|
|
27
|
+
/* @__PURE__ */ e.jsx("div", { className: "w-full bg-neutral-800 dark:bg-neutral-900 border border-neutral-600 dark:border-neutral-700 rounded-sm h-4 overflow-hidden", children: /* @__PURE__ */ e.jsx(
|
|
13
28
|
"div",
|
|
14
29
|
{
|
|
15
|
-
className:
|
|
16
|
-
"h-
|
|
17
|
-
|
|
30
|
+
className: j(
|
|
31
|
+
"h-full transition-all duration-300",
|
|
32
|
+
w || b ? "bg-yellow-500" : r ? "bg-red-500" : "bg-primary-default-default"
|
|
18
33
|
),
|
|
19
|
-
style: { width: `${
|
|
34
|
+
style: { width: `${y}%` }
|
|
20
35
|
}
|
|
21
36
|
) })
|
|
22
37
|
] });
|
|
23
38
|
}
|
|
24
39
|
);
|
|
25
40
|
export {
|
|
26
|
-
|
|
41
|
+
V as default
|
|
27
42
|
};
|