prometeo-design-system 1.5.4 → 1.5.6
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.d.ts +4 -0
- package/dist/Avatar.es.js +52 -0
- package/dist/Button.d.ts +6 -0
- package/dist/Button.es.js +147 -0
- package/dist/CardProfile-BZajBGbO.js +253 -0
- package/dist/CardProfile.d.ts +2 -0
- package/dist/CardProfile.es.js +4 -0
- package/dist/CheckBox.d.ts +6 -0
- package/dist/CheckBox.es.js +105 -0
- package/dist/CheckboxFormik.d.ts +6 -0
- package/dist/CheckboxFormik.es.js +88 -0
- package/dist/DialogModal.d.ts +6 -0
- package/dist/DialogModal.es.js +52 -0
- package/dist/DrawerDesktop.d.ts +6 -0
- package/dist/DrawerDesktop.es.js +67 -0
- package/dist/DrawerMobile.d.ts +6 -0
- package/dist/DrawerMobile.es.js +43 -0
- package/dist/DropZone.d.ts +2 -0
- package/dist/DropZone.es.js +86 -0
- package/dist/Header.d.ts +6 -0
- package/dist/Header.es.js +23 -0
- package/dist/Icons.d.ts +2 -0
- package/dist/Icons.es.js +516 -0
- package/dist/Input.d.ts +6 -0
- package/dist/Input.es.js +200 -0
- package/dist/InputFormik.d.ts +6 -0
- package/dist/InputFormik.es.js +95 -0
- package/dist/LayoutGeneric-jDE96L2N.js +24 -0
- package/dist/LayoutGeneric.d.ts +6 -0
- package/dist/LayoutGeneric.es.js +4 -0
- package/dist/Logo.d.ts +4 -0
- package/dist/Logo.es.js +9 -0
- package/dist/Menu.d.ts +2 -0
- package/dist/Menu.es.js +76 -0
- package/dist/OtpInput.d.ts +6 -0
- package/dist/OtpInput.es.js +244 -0
- package/dist/Pagination.d.ts +6 -0
- package/dist/Pagination.es.js +97 -0
- package/dist/ProgressBar.d.ts +6 -0
- package/dist/ProgressBar.es.js +27 -0
- package/dist/Select.d.ts +6 -0
- package/dist/Select.es.js +203 -0
- package/dist/Spinner.d.ts +6 -0
- package/dist/Spinner.es.js +52 -0
- package/dist/SwipeContainer.d.ts +4 -0
- package/dist/SwipeContainer.es.js +185 -0
- package/dist/TabLinks.d.ts +4 -0
- package/dist/TabLinks.es.js +83 -0
- package/dist/Table.d.ts +2 -0
- package/dist/Table.es.js +121 -0
- package/dist/TextArea.d.ts +4 -0
- package/dist/TextArea.es.js +52 -0
- package/dist/Tooltip.d.ts +6 -0
- package/dist/Tooltip.es.js +62 -0
- package/dist/cn-B6yFEsav.js +8 -0
- package/dist/components/Avatar/index.d.ts +1 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/exports/Avatar.d.ts +1 -0
- package/dist/exports/Button.d.ts +2 -0
- package/dist/exports/CardProfile.d.ts +2 -0
- package/dist/exports/CheckBox.d.ts +2 -0
- package/dist/exports/CheckboxFormik.d.ts +2 -0
- package/dist/exports/DialogModal.d.ts +2 -0
- package/dist/exports/DrawerDesktop.d.ts +2 -0
- package/dist/exports/DrawerMobile.d.ts +2 -0
- package/dist/exports/DropZone.d.ts +1 -0
- package/dist/exports/Header.d.ts +2 -0
- package/dist/exports/Icons.d.ts +1 -0
- package/dist/exports/Input.d.ts +2 -0
- package/dist/exports/InputFormik.d.ts +2 -0
- package/dist/exports/LayoutGeneric.d.ts +2 -0
- package/dist/exports/Logo.d.ts +1 -0
- package/dist/exports/Menu.d.ts +2 -0
- package/dist/exports/OtpInput.d.ts +2 -0
- package/dist/exports/Pagination.d.ts +2 -0
- package/dist/exports/ProgressBar.d.ts +2 -0
- package/dist/exports/Select.d.ts +2 -0
- package/dist/exports/Spinner.d.ts +2 -0
- package/dist/exports/SwipeContainer.d.ts +1 -0
- package/dist/exports/TabLinks.d.ts +1 -0
- package/dist/exports/Table.d.ts +1 -0
- package/dist/exports/TextArea.d.ts +1 -0
- package/dist/exports/Tooltip.d.ts +2 -0
- package/dist/index-BOQuZ0gG.js +34 -0
- package/dist/jsx-runtime-ByW6EXIE.js +283 -0
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +1866 -4935
- package/package.json +119 -4
- package/dist/prometeo-design-system.umd.js +0 -113
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { j as t } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { forwardRef as u, useState as p, useImperativeHandle as f, useRef as g } from "react";
|
|
3
|
+
import { c as i } from "./cn-B6yFEsav.js";
|
|
4
|
+
const x = u(({
|
|
5
|
+
children: e,
|
|
6
|
+
onClose: o,
|
|
7
|
+
className: s
|
|
8
|
+
}, n) => {
|
|
9
|
+
const [r, l] = p(!1), c = () => l(!0), a = () => {
|
|
10
|
+
l(!1), o?.();
|
|
11
|
+
};
|
|
12
|
+
return f(n, () => ({
|
|
13
|
+
open: c,
|
|
14
|
+
close: a,
|
|
15
|
+
isOpen: r
|
|
16
|
+
})), /* @__PURE__ */ t.jsx(t.Fragment, { children: r && /* @__PURE__ */ t.jsx(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/30 backdrop-blur-[1.5px]",
|
|
20
|
+
onClick: a,
|
|
21
|
+
children: /* @__PURE__ */ t.jsx(
|
|
22
|
+
"div",
|
|
23
|
+
{
|
|
24
|
+
className: i("bg-neutral-default-default w-3/4 h-3/4 xl:w-3/4 xl:h-10/12 rounded-lg shadow-lg border-neutral-strong-default border relative p-6", s),
|
|
25
|
+
onClick: (d) => d.stopPropagation(),
|
|
26
|
+
children: e
|
|
27
|
+
}
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
) });
|
|
31
|
+
}), m = ({ children: e, className: o }) => /* @__PURE__ */ t.jsx("div", { className: o, children: /* @__PURE__ */ t.jsx("div", { className: i("flex flex-col gap-4"), children: e }) }), j = ({ children: e, className: o }) => /* @__PURE__ */ t.jsx("h1", { className: o, children: e }), D = ({ children: e, className: o }) => /* @__PURE__ */ t.jsx("div", { className: o, children: e }), b = ({ children: e, className: o }) => /* @__PURE__ */ t.jsx("div", { className: o, children: e }), C = Object.assign(x, {
|
|
32
|
+
Content: m,
|
|
33
|
+
Header: D,
|
|
34
|
+
Footer: b,
|
|
35
|
+
Title: j
|
|
36
|
+
}), k = () => {
|
|
37
|
+
const e = g(null);
|
|
38
|
+
return {
|
|
39
|
+
ref: e,
|
|
40
|
+
open: () => {
|
|
41
|
+
e.current?.open();
|
|
42
|
+
},
|
|
43
|
+
close: () => {
|
|
44
|
+
e.current?.close();
|
|
45
|
+
},
|
|
46
|
+
isOpen: () => e.current?.isOpen ?? !1
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export {
|
|
50
|
+
C as default,
|
|
51
|
+
k as useDialogControl
|
|
52
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { j as e } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { Icons as j } from "./Icons.es.js";
|
|
3
|
+
import { c as m } from "./cn-B6yFEsav.js";
|
|
4
|
+
import { c as d } from "./index-BOQuZ0gG.js";
|
|
5
|
+
import { forwardRef as D, useState as b, useRef as x, useCallback as s, useImperativeHandle as v } from "react";
|
|
6
|
+
import { Drawer as o } from "vaul";
|
|
7
|
+
const C = d("text-sm cursor-pointer font-medium shadow-sm transition-all absolute z-30", {
|
|
8
|
+
variants: {
|
|
9
|
+
direction: {
|
|
10
|
+
left: "right-4 top-4",
|
|
11
|
+
right: "left-4 top-4"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}), O = d("right-0 top-0 bottom-0 fixed z-50 outline-none w-full md:w-[450px] lg:w-[550px] xl:w-[600px] h-full flex flex-col", {
|
|
15
|
+
variants: {
|
|
16
|
+
direction: {
|
|
17
|
+
left: "left-0",
|
|
18
|
+
right: "right-0"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}), N = D(({ children: t, direction: r, modal: a = !1, className: c, onClose: i, defaultOpen: w = !1 }, h) => {
|
|
22
|
+
const [l, n] = b(w), f = x(i);
|
|
23
|
+
f.current = i;
|
|
24
|
+
const u = s(() => {
|
|
25
|
+
n(!0);
|
|
26
|
+
}, []), p = s(() => {
|
|
27
|
+
n(!1);
|
|
28
|
+
}, []), g = s(() => {
|
|
29
|
+
n(!1), f.current?.();
|
|
30
|
+
}, []);
|
|
31
|
+
return v(h, () => ({
|
|
32
|
+
open: u,
|
|
33
|
+
close: p,
|
|
34
|
+
isOpen: l
|
|
35
|
+
}), [u, p, l]), /* @__PURE__ */ e.jsx(o.Root, { direction: r, open: l, onOpenChange: g, modal: a, children: /* @__PURE__ */ e.jsxs(o.Portal, { children: [
|
|
36
|
+
/* @__PURE__ */ e.jsx(o.Overlay, { className: "fixed inset-0 bg-black/60 z-50" }),
|
|
37
|
+
/* @__PURE__ */ e.jsxs(
|
|
38
|
+
o.Content,
|
|
39
|
+
{
|
|
40
|
+
className: m(O({ direction: r }), c),
|
|
41
|
+
style: { "--initial-transform": "calc(100% + 8px)" },
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ e.jsx(o.Close, { className: m(C({ direction: r })), children: /* @__PURE__ */ e.jsx(j.Close, { size: 24, className: "text-neutral-default-default" }) }),
|
|
44
|
+
/* @__PURE__ */ e.jsx("div", { className: "bg-neutral-default-default w-full flex-1 overflow-y-auto min-h-0 border-l border-neutral-strong-default", children: t })
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
] }) });
|
|
49
|
+
});
|
|
50
|
+
N.displayName = "DrawerDesktop";
|
|
51
|
+
const E = () => {
|
|
52
|
+
const t = x(null), r = s(() => {
|
|
53
|
+
t.current?.open();
|
|
54
|
+
}, []), a = s(() => {
|
|
55
|
+
t.current?.close();
|
|
56
|
+
}, []);
|
|
57
|
+
return {
|
|
58
|
+
isOpen: s(() => t.current?.isOpen ?? !1, []),
|
|
59
|
+
open: r,
|
|
60
|
+
close: a,
|
|
61
|
+
drawerRef: t
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export {
|
|
65
|
+
N as default,
|
|
66
|
+
E as useDrawerDesktop
|
|
67
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { j as r } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { forwardRef as v, useState as g, useRef as x, useCallback as s, useImperativeHandle as O } from "react";
|
|
3
|
+
import { Drawer as n } from "vaul";
|
|
4
|
+
const D = v(({ children: e, setSnap: t, snap: o, snapPoints: c, onClose: i, defaultOpen: m = !1, modal: b = !1, open: u }, h) => {
|
|
5
|
+
const [w, a] = g(m), l = u !== void 0 ? u : w, d = x(i);
|
|
6
|
+
d.current = i;
|
|
7
|
+
const f = s(() => {
|
|
8
|
+
a(!0);
|
|
9
|
+
}, []), p = s(() => {
|
|
10
|
+
a(!1);
|
|
11
|
+
}, []), j = s(() => {
|
|
12
|
+
a(!1), d.current?.();
|
|
13
|
+
}, []);
|
|
14
|
+
return O(h, () => ({
|
|
15
|
+
open: f,
|
|
16
|
+
close: p,
|
|
17
|
+
isOpen: l
|
|
18
|
+
}), [f, p, l]), /* @__PURE__ */ r.jsx(n.Root, { snapPoints: c, activeSnapPoint: o, setActiveSnapPoint: t, onClose: j, open: l, modal: b, children: /* @__PURE__ */ r.jsxs(n.Portal, { children: [
|
|
19
|
+
/* @__PURE__ */ r.jsx(n.Overlay, { className: "fixed inset-0 bg-black/40" }),
|
|
20
|
+
/* @__PURE__ */ r.jsx(n.Content, { className: "bg-gray-100 flex flex-col rounded-t-[10px] mt-24 fixed bottom-0 left-0 right-0 outline-none h-[90%]", children: /* @__PURE__ */ r.jsxs("div", { className: "p-4 bg-white rounded-t-[10px] flex-1 overflow-y-auto", children: [
|
|
21
|
+
/* @__PURE__ */ r.jsx("div", { "aria-hidden": !0, className: "mx-auto w-12 h-1.5 flex-shrink-0 rounded-full bg-gray-300 mb-8" }),
|
|
22
|
+
e
|
|
23
|
+
] }) })
|
|
24
|
+
] }) });
|
|
25
|
+
});
|
|
26
|
+
D.displayName = "DrawerMobile";
|
|
27
|
+
const C = () => {
|
|
28
|
+
const e = x(null), t = s(() => {
|
|
29
|
+
e.current?.open();
|
|
30
|
+
}, []), o = s(() => {
|
|
31
|
+
e.current?.close();
|
|
32
|
+
}, []);
|
|
33
|
+
return {
|
|
34
|
+
isOpen: s(() => e.current?.isOpen ?? !1, []),
|
|
35
|
+
open: t,
|
|
36
|
+
close: o,
|
|
37
|
+
drawerRef: e
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export {
|
|
41
|
+
D as default,
|
|
42
|
+
C as useDrawerMobile
|
|
43
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { j as e } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { c as i } from "./cn-B6yFEsav.js";
|
|
3
|
+
import w, { useCallback as z } from "react";
|
|
4
|
+
import { useDropzone as R } from "react-dropzone";
|
|
5
|
+
import { Icons as u } from "./Icons.es.js";
|
|
6
|
+
const E = w.forwardRef(
|
|
7
|
+
({
|
|
8
|
+
onFilesAccepted: d,
|
|
9
|
+
onFilesRejected: m,
|
|
10
|
+
className: x,
|
|
11
|
+
subtitle: p = "Arrastra y suelta el archivo aquí o haz clic para cargarlo desde tu computadora",
|
|
12
|
+
acceptedFormats: f = ".PNG, .JPG, .TXT o .PDF. Máx 100 BM.",
|
|
13
|
+
variant: h = "default",
|
|
14
|
+
disabled: l = !1,
|
|
15
|
+
showIcon: v = !0,
|
|
16
|
+
accept: g,
|
|
17
|
+
maxFiles: j = 1,
|
|
18
|
+
...N
|
|
19
|
+
}, b) => {
|
|
20
|
+
const y = z((s, o) => {
|
|
21
|
+
s.length > 0 && d?.(s), o.length > 0 && m?.(o);
|
|
22
|
+
}, [d, m]), {
|
|
23
|
+
getRootProps: D,
|
|
24
|
+
getInputProps: P,
|
|
25
|
+
isDragActive: a,
|
|
26
|
+
isDragReject: t,
|
|
27
|
+
fileRejections: n
|
|
28
|
+
} = R({
|
|
29
|
+
onDrop: y,
|
|
30
|
+
accept: g,
|
|
31
|
+
maxFiles: j,
|
|
32
|
+
disabled: l,
|
|
33
|
+
...N
|
|
34
|
+
}), r = n.length > 0;
|
|
35
|
+
return /* @__PURE__ */ e.jsx("div", { className: i("w-full", x), children: /* @__PURE__ */ e.jsxs(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
ref: b,
|
|
39
|
+
...D(),
|
|
40
|
+
className: i(
|
|
41
|
+
"relative rounded-lg border-[2px] border-dashed transition-all duration-200 h-36",
|
|
42
|
+
"flex flex-col items-center justify-center text-center",
|
|
43
|
+
h === "default" ? "p-8 min-h-[200px] " : "p-1 min-h-[120px] h-24 md:h-36",
|
|
44
|
+
!a && !r && !l && [
|
|
45
|
+
"border-neutral-default-default",
|
|
46
|
+
"hover:border-primary/50 hover:bg-primary/5"
|
|
47
|
+
],
|
|
48
|
+
a && !t && [
|
|
49
|
+
"border-primary bg-primary/10",
|
|
50
|
+
"ring-2 ring-primary/20"
|
|
51
|
+
],
|
|
52
|
+
(t || r) && [
|
|
53
|
+
"border-destructive bg-destructive/10",
|
|
54
|
+
"ring-2 ring-destructive/20"
|
|
55
|
+
],
|
|
56
|
+
l && [
|
|
57
|
+
"cursor-not-allowed opacity-60",
|
|
58
|
+
"border-muted-foreground/20 bg-muted/30"
|
|
59
|
+
]
|
|
60
|
+
),
|
|
61
|
+
children: [
|
|
62
|
+
/* @__PURE__ */ e.jsx("input", { ...P() }),
|
|
63
|
+
v && /* @__PURE__ */ e.jsx("div", { className: "mb-0.5 md:mb-4", children: r || t ? /* @__PURE__ */ e.jsx(u.Error, { size: 24, className: " text-destructive" }) : /* @__PURE__ */ e.jsx(u.Upload, { size: 24, className: i(
|
|
64
|
+
"w-8 h-8 transition-colors",
|
|
65
|
+
a ? "text-primary" : "text-neutral-default-default"
|
|
66
|
+
) }) }),
|
|
67
|
+
/* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
68
|
+
/* @__PURE__ */ e.jsx("p", { className: i(
|
|
69
|
+
"text-base font-medium text-neutral-default-default",
|
|
70
|
+
r || t ? "text-destructive" : a ? "text-primary " : "text-neutral-default-default text-sm font-[400]"
|
|
71
|
+
), children: a && !t ? "Suelta los archivos aquí..." : t || r ? "Archivo no válido" : p }),
|
|
72
|
+
!r && /* @__PURE__ */ e.jsx("p", { className: "text-xs text-neutral-medium-default", children: f })
|
|
73
|
+
] }),
|
|
74
|
+
r && /* @__PURE__ */ e.jsx("div", { className: "mt-4 space-y-1", children: n.map(({ file: s, errors: o }) => /* @__PURE__ */ e.jsxs("div", { className: "text-sm text-destructive", children: [
|
|
75
|
+
/* @__PURE__ */ e.jsx("p", { className: "font-medium", children: s.name }),
|
|
76
|
+
o.map((c) => /* @__PURE__ */ e.jsx("p", { className: "text-xs", children: c.message }, c.code))
|
|
77
|
+
] }, s.name)) })
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
) });
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
E.displayName = "DropZone";
|
|
84
|
+
export {
|
|
85
|
+
E as DropZone
|
|
86
|
+
};
|
package/dist/Header.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { j as e } from "./jsx-runtime-ByW6EXIE.js";
|
|
2
|
+
import { c as x } from "./cn-B6yFEsav.js";
|
|
3
|
+
import { motion as i } from "framer-motion";
|
|
4
|
+
import { memo as m } from "react";
|
|
5
|
+
const n = ({ title: t, subtitle: s, children: l, className: a }) => /* @__PURE__ */ e.jsx("header", { className: x("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", a), children: /* @__PURE__ */ e.jsxs(
|
|
6
|
+
i.div,
|
|
7
|
+
{
|
|
8
|
+
initial: { opacity: 0, y: -10 },
|
|
9
|
+
animate: { opacity: 1, y: 0 },
|
|
10
|
+
transition: { duration: 0.6, ease: "easeOut" },
|
|
11
|
+
className: "flex justify-between items-center w-full ",
|
|
12
|
+
children: [
|
|
13
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col leading-6", children: [
|
|
14
|
+
/* @__PURE__ */ e.jsx("h3", { className: "text-xs font-semibold text-neutral-medium-default leading-1 sm:leading-2", children: s }),
|
|
15
|
+
/* @__PURE__ */ e.jsx("h1", { className: "text-xl font-bold text-neutral-strong-default sm:text-2xl md:text-3xl xl:text-[32px] 2xl:text-[34px]", children: t })
|
|
16
|
+
] }),
|
|
17
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex gap-4", children: l })
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
) }), f = m(n);
|
|
21
|
+
export {
|
|
22
|
+
f as default
|
|
23
|
+
};
|
package/dist/Icons.d.ts
ADDED