prometeo-design-system 2.7.0 → 2.7.2
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/Avatar.es.js +72 -33
- package/dist/Button.es.js +398 -2
- package/dist/DatePicker.es.js +2 -2
- package/dist/DrawerDesktop.es.js +31 -30
- package/dist/FAButton.es.js +69 -18
- package/dist/Header.es.js +14 -14
- package/dist/Icons/Icons.d.ts +5 -0
- package/dist/Icons.es.js +432 -330
- package/dist/{ImageGallery-DKzJg3un.js → ImageGallery-D8nIvBpV.js} +7 -7
- package/dist/ImageGallery.es.js +1 -1
- package/dist/Input-CnXDg2s7.js +253 -0
- package/dist/Input.es.js +1 -1
- package/dist/InputFormikV2.es.js +30 -18
- package/dist/ProgressBar.es.js +63 -35
- package/dist/{Select-BQMdfu1n.js → Select-CiaBY4E0.js} +332 -235
- package/dist/Select.es.js +1 -1
- package/dist/SelectFormik.es.js +21 -20
- package/dist/SelectSearch.es.js +1 -1
- package/dist/Switch.es.js +4 -4
- package/dist/Toast.es.js +1 -1
- package/dist/components/Avatar/Avatar.d.ts +9 -4
- package/dist/components/Button/Button.d.ts +8 -14
- package/dist/components/Button/Button_Legacy.d.ts +29 -0
- package/dist/components/Input/Input.d.ts +7 -10
- package/dist/components/ProgressBar/ProgressBar.d.ts +13 -3
- package/dist/components/RecurrentDatePicker/CustomFrequencySettings.d.ts +5 -5
- package/dist/components/Select/Select.d.ts +5 -5
- package/dist/exports/ProgressBar.d.ts +1 -1
- package/dist/index-BOQuZ0gG.js +34 -0
- package/dist/index.d.ts +1 -3
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +19 -21
- package/package.json +1 -5
- package/dist/Button-CvBWH1HX.js +0 -183
- package/dist/ButtonV2.d.ts +0 -6
- package/dist/ButtonV2.es.js +0 -217
- package/dist/Input-BTsR-vNF.js +0 -281
- package/dist/components/Button/ButtonV2.d.ts +0 -23
- package/dist/exports/ButtonV2.d.ts +0 -2
package/dist/DrawerDesktop.es.js
CHANGED
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
import { j as l } from "./jsx-runtime-DKDX3adD.js";
|
|
2
2
|
import { c as h } from "./cn-B6yFEsav.js";
|
|
3
|
-
import { c as k
|
|
4
|
-
import { createPortal as
|
|
5
|
-
import { Icons as
|
|
6
|
-
import { forwardRef as
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
import { c as k } from "./index-BOQuZ0gG.js";
|
|
4
|
+
import { createPortal as E } from "react-dom";
|
|
5
|
+
import { Icons as I } from "./Icons.es.js";
|
|
6
|
+
import { forwardRef as V, useRef as u, useState as N, useEffect as d, useCallback as f, useImperativeHandle as P } from "react";
|
|
7
|
+
import B from "./Button.es.js";
|
|
8
|
+
const L = V((t, s) => {
|
|
9
|
+
const n = u(null), [e, a] = N(t.defaultOpen || !1), [r, y] = N(null), b = u(t.onClose), c = u(r), {
|
|
9
10
|
modal: i = !1,
|
|
10
11
|
children: m,
|
|
11
12
|
className: w,
|
|
12
13
|
direction: C = "left",
|
|
13
14
|
attachToParent: x = !1,
|
|
14
|
-
closeOnOverlayClick:
|
|
15
|
+
closeOnOverlayClick: o = !1,
|
|
15
16
|
hideCloseButton: T = !1
|
|
16
|
-
} = t, g = u(
|
|
17
|
+
} = t, g = u(o), O = u(e);
|
|
17
18
|
c.current = r, d(() => {
|
|
18
19
|
O.current = e;
|
|
19
20
|
}, [e]), d(() => {
|
|
20
21
|
c.current = r;
|
|
21
22
|
}, [r]), d(() => {
|
|
22
|
-
g.current =
|
|
23
|
-
}, [
|
|
23
|
+
g.current = o;
|
|
24
|
+
}, [o]);
|
|
24
25
|
const R = (p) => {
|
|
25
|
-
if (!
|
|
26
|
+
if (!n.current)
|
|
26
27
|
return;
|
|
27
|
-
const z =
|
|
28
|
+
const z = n.current;
|
|
28
29
|
z && !z.contains(p.target) && g.current && O.current && v();
|
|
29
30
|
};
|
|
30
31
|
d(() => {
|
|
@@ -36,7 +37,7 @@ const L = B((t, s) => {
|
|
|
36
37
|
return () => {
|
|
37
38
|
clearTimeout(p), document.removeEventListener("click", R);
|
|
38
39
|
};
|
|
39
|
-
}, [
|
|
40
|
+
}, [o, e, i]), d(() => {
|
|
40
41
|
b.current = t.onClose;
|
|
41
42
|
}, [t.onClose]);
|
|
42
43
|
const j = f((p) => {
|
|
@@ -58,25 +59,25 @@ const L = B((t, s) => {
|
|
|
58
59
|
Y,
|
|
59
60
|
{
|
|
60
61
|
context: r,
|
|
61
|
-
ref:
|
|
62
|
+
ref: n,
|
|
62
63
|
isOpen: e,
|
|
63
64
|
close: v,
|
|
64
65
|
direction: C,
|
|
65
66
|
modal: i,
|
|
66
67
|
className: w,
|
|
67
68
|
attachToParent: x,
|
|
68
|
-
closeOnOverlayClick:
|
|
69
|
+
closeOnOverlayClick: o,
|
|
69
70
|
hideCloseButton: T,
|
|
70
71
|
children: typeof m == "function" ? m(r) : m
|
|
71
72
|
}
|
|
72
73
|
);
|
|
73
|
-
return x ? D :
|
|
74
|
+
return x ? D : E(D, document.body);
|
|
74
75
|
});
|
|
75
76
|
L.displayName = "DrawerDesktopV2";
|
|
76
77
|
const Y = ({
|
|
77
78
|
ref: t,
|
|
78
79
|
children: s,
|
|
79
|
-
direction:
|
|
80
|
+
direction: n = "left",
|
|
80
81
|
isOpen: e,
|
|
81
82
|
close: a,
|
|
82
83
|
modal: r = !1,
|
|
@@ -88,9 +89,9 @@ const Y = ({
|
|
|
88
89
|
}) => {
|
|
89
90
|
d(() => {
|
|
90
91
|
if (e && r) {
|
|
91
|
-
const
|
|
92
|
-
return document.body.style.position = "fixed", document.body.style.top = `-${
|
|
93
|
-
document.body.style.position = "", document.body.style.top = "", document.body.style.width = "", window.scrollTo(0,
|
|
92
|
+
const o = window.scrollY;
|
|
93
|
+
return document.body.style.position = "fixed", document.body.style.top = `-${o}px`, document.body.style.width = "100%", () => {
|
|
94
|
+
document.body.style.position = "", document.body.style.top = "", document.body.style.width = "", window.scrollTo(0, o);
|
|
94
95
|
};
|
|
95
96
|
}
|
|
96
97
|
}, [e, r]);
|
|
@@ -128,8 +129,8 @@ const Y = ({
|
|
|
128
129
|
"div",
|
|
129
130
|
{
|
|
130
131
|
className: h(C({ isOpen: e })),
|
|
131
|
-
onClick: (
|
|
132
|
-
|
|
132
|
+
onClick: (o) => {
|
|
133
|
+
o.preventDefault(), o.stopPropagation(), c && a();
|
|
133
134
|
},
|
|
134
135
|
"aria-hidden": "true"
|
|
135
136
|
}
|
|
@@ -141,7 +142,7 @@ const Y = ({
|
|
|
141
142
|
className: h(
|
|
142
143
|
"bg-neutral-strong-default h-full top-0 z-60 w-max overflow-y-auto",
|
|
143
144
|
b ? "absolute" : "fixed",
|
|
144
|
-
w({ isOpen: e, direction:
|
|
145
|
+
w({ isOpen: e, direction: n }),
|
|
145
146
|
!i && "p-4 pt-10",
|
|
146
147
|
y
|
|
147
148
|
),
|
|
@@ -149,9 +150,9 @@ const Y = ({
|
|
|
149
150
|
"aria-modal": r,
|
|
150
151
|
children: [
|
|
151
152
|
!i && /* @__PURE__ */ l.jsx(
|
|
152
|
-
|
|
153
|
+
B,
|
|
153
154
|
{
|
|
154
|
-
icon: /* @__PURE__ */ l.jsx(
|
|
155
|
+
icon: /* @__PURE__ */ l.jsx(I.Close, { size: 24 }),
|
|
155
156
|
animate: !1,
|
|
156
157
|
type: "button",
|
|
157
158
|
size: "small",
|
|
@@ -161,7 +162,7 @@ const Y = ({
|
|
|
161
162
|
color: "secondary",
|
|
162
163
|
className: h(
|
|
163
164
|
"absolute top-0 z-50",
|
|
164
|
-
x({ direction:
|
|
165
|
+
x({ direction: n })
|
|
165
166
|
),
|
|
166
167
|
"aria-label": "Close drawer"
|
|
167
168
|
}
|
|
@@ -171,21 +172,21 @@ const Y = ({
|
|
|
171
172
|
}
|
|
172
173
|
)
|
|
173
174
|
] });
|
|
174
|
-
},
|
|
175
|
+
}, J = () => {
|
|
175
176
|
const t = u(null), s = f((r) => {
|
|
176
177
|
t.current?.open(r);
|
|
177
|
-
}, []),
|
|
178
|
+
}, []), n = f(() => {
|
|
178
179
|
t.current?.close();
|
|
179
180
|
}, []), e = f(() => t.current?.isOpen ?? !1, []), a = f(() => t.current?.getContext() ?? null, []);
|
|
180
181
|
return {
|
|
181
182
|
isOpen: e,
|
|
182
183
|
open: s,
|
|
183
|
-
close:
|
|
184
|
+
close: n,
|
|
184
185
|
drawerRef: t,
|
|
185
186
|
getContext: a
|
|
186
187
|
};
|
|
187
188
|
};
|
|
188
189
|
export {
|
|
189
190
|
L as default,
|
|
190
|
-
|
|
191
|
+
J as useDrawerDesktop
|
|
191
192
|
};
|
package/dist/FAButton.es.js
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import { c as
|
|
4
|
-
import { Icons as
|
|
1
|
+
import { j as c } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
+
import u, { memo as n } from "react";
|
|
3
|
+
import { c as f } from "./cn-B6yFEsav.js";
|
|
4
|
+
import { Icons as v } from "./Icons.es.js";
|
|
5
5
|
import { createPortal as m } from "react-dom";
|
|
6
|
-
|
|
6
|
+
import { c as b } from "./index-BOQuZ0gG.js";
|
|
7
|
+
const h = {
|
|
7
8
|
right: 24,
|
|
8
9
|
bottom: 64,
|
|
9
10
|
left: "auto",
|
|
10
11
|
top: "auto"
|
|
11
|
-
},
|
|
12
|
-
|
|
12
|
+
}, r = {
|
|
13
|
+
fill: {
|
|
13
14
|
primary: "bg-primary-default-default hover:bg-primary-default-hover active:bg-primary-default-pressed",
|
|
14
15
|
secondary: "bg-neutral-medium-default hover:bg-neutral-medium-hover active:bg-neutral-medium-pressed",
|
|
15
16
|
success: "bg-success-default-default hover:bg-success-default-hover active:bg-success-default-pressed",
|
|
16
17
|
error: "bg-error-default-default hover:bg-error-default-hover active:bg-error-default-pressed",
|
|
17
18
|
warning: "bg-warning-default-default hover:bg-warning-default-hover active:bg-warning-default-pressed"
|
|
18
19
|
},
|
|
19
|
-
|
|
20
|
+
outline: {
|
|
20
21
|
primary: "border border-primary-default-default hover:border-primary-default-hover active:border-primary-default-pressed text-primary-default-default hover:text-primary-default-hover active:text-primary-default-pressed",
|
|
21
22
|
secondary: "border border-neutral-medium-default hover:border-neutral-medium-hover active:border-neutral-medium-pressed text-neutral-medium-default hover:text-neutral-medium-hover active:text-neutral-medium-pressed",
|
|
22
23
|
success: "border border-success-default-default hover:border-success-default-hover active:border-success-default-pressed text-success-default-default hover:text-success-default-hover active:text-success-default-pressed",
|
|
@@ -30,15 +31,58 @@ const v = {
|
|
|
30
31
|
error: "text-error-default-default hover:text-error-default-hover active:text-error-default-pressed",
|
|
31
32
|
warning: "text-warning-default-default hover:text-warning-default-hover active:text-warning-default-pressed"
|
|
32
33
|
}
|
|
33
|
-
},
|
|
34
|
-
|
|
34
|
+
}, g = "bg-primary-default-disabled text-neutral-default-disabled hover:bg-primary-default-disabled active:bg-primary-default-disabled cursor-default", x = b(
|
|
35
|
+
"transition-all duration-300 cursor-pointer text-neutral-default-default",
|
|
36
|
+
{
|
|
37
|
+
variants: {
|
|
38
|
+
color: {
|
|
39
|
+
primary: "",
|
|
40
|
+
secondary: "",
|
|
41
|
+
success: "",
|
|
42
|
+
error: "",
|
|
43
|
+
warning: ""
|
|
44
|
+
},
|
|
45
|
+
variant: {
|
|
46
|
+
fill: "",
|
|
47
|
+
outline: "",
|
|
48
|
+
text: ""
|
|
49
|
+
},
|
|
50
|
+
disabled: {
|
|
51
|
+
true: g,
|
|
52
|
+
false: ""
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
compoundVariants: [
|
|
56
|
+
{ variant: "fill", color: "primary", class: r.fill.primary },
|
|
57
|
+
{ variant: "fill", color: "secondary", class: r.fill.secondary },
|
|
58
|
+
{ variant: "fill", color: "error", class: r.fill.error },
|
|
59
|
+
{ variant: "fill", color: "success", class: r.fill.success },
|
|
60
|
+
{ variant: "fill", color: "warning", class: r.fill.warning },
|
|
61
|
+
{ variant: "outline", color: "primary", class: r.outline.primary },
|
|
62
|
+
{ variant: "outline", color: "secondary", class: r.outline.secondary },
|
|
63
|
+
{ variant: "outline", color: "success", class: r.outline.success },
|
|
64
|
+
{ variant: "outline", color: "error", class: r.outline.error },
|
|
65
|
+
{ variant: "outline", color: "warning", class: r.outline.warning },
|
|
66
|
+
{ variant: "text", color: "primary", class: r.text.primary },
|
|
67
|
+
{ variant: "text", color: "secondary", class: r.text.secondary },
|
|
68
|
+
{ variant: "text", color: "success", class: r.text.success },
|
|
69
|
+
{ variant: "text", color: "error", class: r.text.error },
|
|
70
|
+
{ variant: "text", color: "warning", class: r.text.warning }
|
|
71
|
+
],
|
|
72
|
+
defaultVariants: {
|
|
73
|
+
color: "primary",
|
|
74
|
+
variant: "fill"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
), y = (e) => {
|
|
78
|
+
const t = e.position || h, a = e.attachToParent || !1, i = e.color || "primary", s = e.icon || v.Add, o = e.disabled || !1, d = e.variant || "fill", l = /* @__PURE__ */ c.jsx(
|
|
35
79
|
"div",
|
|
36
80
|
{
|
|
37
81
|
style: {
|
|
38
82
|
width: "56px",
|
|
39
83
|
height: "56px",
|
|
40
84
|
borderRadius: "8px",
|
|
41
|
-
position:
|
|
85
|
+
position: a ? "absolute" : "fixed",
|
|
42
86
|
right: t.right,
|
|
43
87
|
bottom: t.bottom,
|
|
44
88
|
left: t.left,
|
|
@@ -47,14 +91,21 @@ const v = {
|
|
|
47
91
|
placeItems: "center",
|
|
48
92
|
padding: 16
|
|
49
93
|
},
|
|
50
|
-
className:
|
|
51
|
-
|
|
52
|
-
|
|
94
|
+
className: f(
|
|
95
|
+
x({
|
|
96
|
+
color: i,
|
|
97
|
+
variant: d,
|
|
98
|
+
disabled: o
|
|
99
|
+
}),
|
|
100
|
+
e.className
|
|
101
|
+
),
|
|
102
|
+
onClick: o ? void 0 : e.onClick,
|
|
103
|
+
children: u.createElement(s, { size: 24 })
|
|
53
104
|
}
|
|
54
105
|
);
|
|
55
|
-
return
|
|
56
|
-
},
|
|
57
|
-
|
|
106
|
+
return a ? l : m(l, document.body);
|
|
107
|
+
}, p = n(y, (e, t) => e.attachToParent === t.attachToParent && e.position === t.position && e.color === t.color && e.icon === t.icon && e.disabled === t.disabled && e.variant === t.variant && e.className === t.className && e.onClick === t.onClick);
|
|
108
|
+
p.displayName = "FAButton";
|
|
58
109
|
export {
|
|
59
|
-
|
|
110
|
+
p as default
|
|
60
111
|
};
|
package/dist/Header.es.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { c as
|
|
3
|
-
import { motion as
|
|
4
|
-
import { memo as
|
|
5
|
-
const
|
|
1
|
+
import { j as a } from "./jsx-runtime-DKDX3adD.js";
|
|
2
|
+
import { c as l } from "./cn-B6yFEsav.js";
|
|
3
|
+
import { motion as n } from "framer-motion";
|
|
4
|
+
import { memo as c } from "react";
|
|
5
|
+
const d = ({ title: e, subtitle: t, children: i, className: s, subtitleClassName: m, titleClassName: r }) => /* @__PURE__ */ a.jsx(
|
|
6
6
|
"header",
|
|
7
7
|
{
|
|
8
|
-
className:
|
|
8
|
+
className: l(
|
|
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
|
-
children: /* @__PURE__ */
|
|
13
|
-
|
|
12
|
+
children: /* @__PURE__ */ a.jsxs(
|
|
13
|
+
n.div,
|
|
14
14
|
{
|
|
15
15
|
initial: { opacity: 0, y: -10 },
|
|
16
16
|
animate: { opacity: 1, y: 0 },
|
|
17
17
|
transition: { duration: 0.6, ease: "easeOut" },
|
|
18
18
|
className: "flex justify-between items-center w-full",
|
|
19
19
|
children: [
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
-
t && /* @__PURE__ */
|
|
22
|
-
e && /* @__PURE__ */
|
|
20
|
+
/* @__PURE__ */ a.jsxs("div", { className: "flex flex-col leading-6", children: [
|
|
21
|
+
t && /* @__PURE__ */ a.jsx("h3", { className: l(" prometeo-fonts-body-medium text-neutral-medium-default ", m), children: t }),
|
|
22
|
+
e && /* @__PURE__ */ a.jsx("h1", { className: l("prometeo-fonts-headline-small text-neutral-strong-default", r), children: e })
|
|
23
23
|
] }),
|
|
24
|
-
i && /* @__PURE__ */
|
|
24
|
+
i && /* @__PURE__ */ a.jsx("div", { className: "flex gap-4", children: i })
|
|
25
25
|
]
|
|
26
26
|
}
|
|
27
27
|
)
|
|
28
28
|
}
|
|
29
|
-
),
|
|
29
|
+
), x = c(d, (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
|
+
x as default
|
|
32
32
|
};
|
package/dist/Icons/Icons.d.ts
CHANGED
|
@@ -54,6 +54,11 @@ declare const Icons: {
|
|
|
54
54
|
readonly CheckCircle: import('react').MemoExoticComponent<(props: IconProps) => ReactElement>;
|
|
55
55
|
readonly FormatColorText: import('react').MemoExoticComponent<(props: IconProps) => ReactElement>;
|
|
56
56
|
readonly CheckList: import('react').MemoExoticComponent<(props: IconProps) => ReactElement>;
|
|
57
|
+
readonly WhatsApp: import('react').MemoExoticComponent<(props: IconProps) => ReactElement>;
|
|
58
|
+
readonly File: import('react').MemoExoticComponent<(props: IconProps) => ReactElement>;
|
|
59
|
+
readonly Email: import('react').MemoExoticComponent<(props: IconProps) => ReactElement>;
|
|
60
|
+
readonly Download: import('react').MemoExoticComponent<(props: IconProps) => ReactElement>;
|
|
61
|
+
readonly Reload: import('react').MemoExoticComponent<(props: IconProps) => ReactElement>;
|
|
57
62
|
};
|
|
58
63
|
export { Icons };
|
|
59
64
|
export type IconName = keyof typeof Icons;
|