prometeo-design-system 4.2.4 → 4.3.0
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 +1 -1
- package/dist/DialogModal.es.js +52 -46
- package/dist/Input.es.js +1 -1
- package/dist/NotificationCard.es.js +28 -21
- package/dist/PyrionLayout.es.js +894 -818
- package/dist/Scrollable.es.js +322 -177
- package/dist/Select.es.js +1 -1
- package/dist/SelectSearch.es.js +107 -103
- package/dist/TabLinks-DxqprStp.js +147 -0
- package/dist/TabLinks.es.js +2 -121
- package/dist/TicketCard.es.js +1 -1
- package/dist/Toast.es.js +95 -51
- package/dist/components/NotificationCard/NotificationCard.d.ts +3 -2
- package/dist/components/PyrionNavigationDrawer/PLNotificationsList.d.ts +5 -2
- package/dist/components/PyrionNavigationDrawer/PLSidebar.d.ts +3 -1
- package/dist/components/PyrionNavigationDrawer/PLSidebarContent.d.ts +2 -0
- package/dist/components/PyrionNavigationDrawer/PLayoutBase.d.ts +2 -0
- package/dist/components/PyrionNavigationDrawer/PyrionLayout.d.ts +4 -1
- package/dist/components/Scrollable/Scrollable.d.ts +29 -0
- package/dist/components/TabLinks/TabLinks.d.ts +19 -0
- package/dist/components/Toaster/Toaster.d.ts +13 -1
- package/dist/hooks/useLabelBackground.d.ts +1 -0
- package/dist/prometeo-design-system.es.js +7 -7
- package/dist/styles.css +1 -1
- package/dist/useLabelBackground-D5SzHhl_.js +32 -0
- package/package.json +3 -2
- package/src/styles/base.css +54 -0
- package/src/styles/intellisense.css +1 -0
- package/src/styles/utilities.css +8 -0
- package/dist/useLabelBackground-BDIHUdND.js +0 -26
package/dist/Avatar.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
-
import { g as v } from "./useLabelBackground-
|
|
2
|
+
import { g as v } from "./useLabelBackground-D5SzHhl_.js";
|
|
3
3
|
import { c as x } from "./cn-B6yFEsav.js";
|
|
4
4
|
import { useState as C, useRef as u, useLayoutEffect as N } from "react";
|
|
5
5
|
import { UserAvatar as y } from "./Icons/UserAvatar.es.js";
|
package/dist/DialogModal.es.js
CHANGED
|
@@ -1,78 +1,84 @@
|
|
|
1
1
|
import { j as o } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
-
import { forwardRef as
|
|
2
|
+
import { forwardRef as y, memo as r, useState as D, useRef as x, useCallback as l, useImperativeHandle as k } from "react";
|
|
3
3
|
import { c as j } from "./cn-B6yFEsav.js";
|
|
4
|
-
const
|
|
5
|
-
({ children: e, onClose: t, className:
|
|
6
|
-
const [
|
|
7
|
-
|
|
8
|
-
const m =
|
|
9
|
-
|
|
10
|
-
}, []), d =
|
|
11
|
-
|
|
4
|
+
const C = y(
|
|
5
|
+
({ children: e, onClose: t, className: c }, i) => {
|
|
6
|
+
const [n, s] = D(!1), [u, g] = D(null), f = x(t), p = x(u);
|
|
7
|
+
f.current = t, p.current = u;
|
|
8
|
+
const m = l((a) => {
|
|
9
|
+
g(a ?? null), s(!0);
|
|
10
|
+
}, []), d = l(() => {
|
|
11
|
+
s(!1), f.current?.(p.current), setTimeout(() => g(null), 300);
|
|
12
12
|
}, []);
|
|
13
|
-
return
|
|
13
|
+
return k(
|
|
14
14
|
i,
|
|
15
15
|
() => ({
|
|
16
16
|
open: m,
|
|
17
17
|
close: d,
|
|
18
|
-
isOpen:
|
|
19
|
-
getContext: () =>
|
|
18
|
+
isOpen: n,
|
|
19
|
+
getContext: () => p.current
|
|
20
20
|
}),
|
|
21
|
-
[m, d,
|
|
22
|
-
), /* @__PURE__ */ o.jsx(o.Fragment, { children:
|
|
21
|
+
[m, d, n]
|
|
22
|
+
), /* @__PURE__ */ o.jsx(o.Fragment, { children: n && /* @__PURE__ */ o.jsxs(
|
|
23
23
|
"div",
|
|
24
24
|
{
|
|
25
25
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/30 backdrop-blur-[1.5px]",
|
|
26
26
|
onClick: d,
|
|
27
|
-
children:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
27
|
+
children: [
|
|
28
|
+
/* @__PURE__ */ o.jsx(
|
|
29
|
+
"div",
|
|
30
|
+
{
|
|
31
|
+
onClick: (a) => a.stopPropagation(),
|
|
32
|
+
className: "absolute bg-transparent z-[-1] w-[calc(75%+10px)] h-[calc(75%+10px)] xl:w-[calc(75%+30px)] xl:h-[calc(83.33%+30px)] top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 "
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
/* @__PURE__ */ o.jsx(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
onClick: (a) => a.stopPropagation(),
|
|
39
|
+
className: j(
|
|
40
|
+
"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",
|
|
41
|
+
c
|
|
42
|
+
),
|
|
43
|
+
children: typeof e == "function" ? e(u) : e
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
]
|
|
41
47
|
}
|
|
42
48
|
) });
|
|
43
49
|
}
|
|
44
50
|
);
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
|
|
51
|
+
C.displayName = "Dialog";
|
|
52
|
+
const b = r(({ children: e, className: t }) => /* @__PURE__ */ o.jsx("div", { className: t, children: /* @__PURE__ */ o.jsx("div", { className: j("flex flex-col gap-4 h-full"), children: e }) }));
|
|
53
|
+
b.displayName = "DialogContent";
|
|
48
54
|
const N = r(({ children: e, className: t }) => /* @__PURE__ */ o.jsx("h1", { className: t, children: e }));
|
|
49
55
|
N.displayName = "DialogTitle";
|
|
56
|
+
const h = r(({ children: e, className: t }) => /* @__PURE__ */ o.jsx("div", { className: t, children: e }));
|
|
57
|
+
h.displayName = "DialogHeader";
|
|
50
58
|
const v = r(({ children: e, className: t }) => /* @__PURE__ */ o.jsx("div", { className: t, children: e }));
|
|
51
|
-
v.displayName = "
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
Header: v,
|
|
57
|
-
Footer: y,
|
|
59
|
+
v.displayName = "DialogFooter";
|
|
60
|
+
const w = Object.assign(C, {
|
|
61
|
+
Content: b,
|
|
62
|
+
Header: h,
|
|
63
|
+
Footer: v,
|
|
58
64
|
Title: N
|
|
59
65
|
});
|
|
60
|
-
|
|
66
|
+
w.displayName = "DialogModal";
|
|
61
67
|
const H = () => {
|
|
62
|
-
const e =
|
|
63
|
-
e.current?.open(
|
|
64
|
-
}, []),
|
|
68
|
+
const e = x(null), t = l((s) => {
|
|
69
|
+
e.current?.open(s);
|
|
70
|
+
}, []), c = l(() => {
|
|
65
71
|
e.current?.close();
|
|
66
|
-
}, []), i =
|
|
72
|
+
}, []), i = l(() => e.current?.isOpen ?? !1, []), n = l(() => e.current?.getContext() ?? null, []);
|
|
67
73
|
return {
|
|
68
74
|
ref: e,
|
|
69
75
|
open: t,
|
|
70
|
-
close:
|
|
76
|
+
close: c,
|
|
71
77
|
isOpen: i,
|
|
72
|
-
getContext:
|
|
78
|
+
getContext: n
|
|
73
79
|
};
|
|
74
80
|
};
|
|
75
81
|
export {
|
|
76
|
-
|
|
82
|
+
w as default,
|
|
77
83
|
H as useDialogControl
|
|
78
84
|
};
|
package/dist/Input.es.js
CHANGED
|
@@ -2,7 +2,7 @@ import { j as t } from "./jsx-runtime-GkKLlHH4.js";
|
|
|
2
2
|
import { c as e } from "./cn-B6yFEsav.js";
|
|
3
3
|
import { memo as q, forwardRef as V, useState as F } from "react";
|
|
4
4
|
import ee from "./Spinner.es.js";
|
|
5
|
-
import { u as te } from "./useLabelBackground-
|
|
5
|
+
import { u as te } from "./useLabelBackground-D5SzHhl_.js";
|
|
6
6
|
import { H as re } from "./HelperComponent-ljsn0xD6.js";
|
|
7
7
|
import { EyeVisibility as oe } from "./Icons/EyeVisibility.es.js";
|
|
8
8
|
import { EyeVisibilityOff as se } from "./Icons/EyeVisibilityOff.es.js";
|
|
@@ -1,50 +1,57 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
+
import { useCallback as h } from "react";
|
|
2
3
|
import { c as o } from "./cn-B6yFEsav.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
import b from "./Avatar.es.js";
|
|
5
|
+
import j from "./Button.es.js";
|
|
6
|
+
const z = ({ user: m, body: s, date: a, actions: r, read: d, className: f, metadata: t, onClick: i }) => {
|
|
7
|
+
const c = typeof s == "function" ? s(t) : s, u = a instanceof Date ? `${a.toLocaleDateString("es-AR", { day: "2-digit", month: "2-digit", year: "numeric" })} a las ${a.toLocaleTimeString("es-AR", { hour: "2-digit", minute: "2-digit", hour12: !1 })}` : a, x = h(
|
|
8
|
+
() => {
|
|
9
|
+
i?.(t);
|
|
10
|
+
},
|
|
11
|
+
[i, t]
|
|
12
|
+
);
|
|
13
|
+
return /* @__PURE__ */ e.jsxs("article", { className: o("flex flex-col gap-3 p-3 rounded-md bg-neutral-default-default ", f), onClick: x, children: [
|
|
14
|
+
/* @__PURE__ */ e.jsxs("div", { className: o("flex flex-col gap-2", i && "cursor-pointer"), children: [
|
|
9
15
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-start w-full", children: [
|
|
10
16
|
/* @__PURE__ */ e.jsxs("div", { className: " relative min-w-max", children: [
|
|
11
|
-
d && /* @__PURE__ */ e.jsx("div", { className: "size-3 border border-neutral-default bg-(--pyrion-orange-500) rounded-full absolute top-0 left-0 z-
|
|
17
|
+
!d && /* @__PURE__ */ e.jsx("div", { className: "size-3 border border-neutral-default bg-(--pyrion-orange-500) rounded-full absolute top-0 left-0 -translate-x-1/2 -translate-y-1/2 z-10" }),
|
|
12
18
|
/* @__PURE__ */ e.jsx(
|
|
13
|
-
|
|
19
|
+
b,
|
|
14
20
|
{
|
|
15
|
-
imageUrl:
|
|
16
|
-
fallbackText:
|
|
21
|
+
imageUrl: m.profile_picture,
|
|
22
|
+
fallbackText: m.name,
|
|
17
23
|
sizeFallback: "xs",
|
|
18
24
|
sizeImage: "xs"
|
|
19
25
|
}
|
|
20
26
|
)
|
|
21
27
|
] }),
|
|
22
|
-
/* @__PURE__ */ e.jsx("div", { className: "text-neutral-default-default prometeo-fonts-body-medium", children:
|
|
28
|
+
/* @__PURE__ */ e.jsx("div", { className: "text-neutral-default-default prometeo-fonts-body-medium", children: c })
|
|
23
29
|
] }),
|
|
24
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-neutral-medium-default prometeo-fonts-body-xsmall text-right", children:
|
|
30
|
+
/* @__PURE__ */ e.jsx("p", { className: "text-neutral-medium-default prometeo-fonts-body-xsmall text-right", children: u })
|
|
25
31
|
] }),
|
|
26
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex gap-2 w-full", children:
|
|
32
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex gap-2 w-full", children: r?.map((l, n) => {
|
|
27
33
|
if (l.hidden)
|
|
28
34
|
return null;
|
|
29
|
-
const
|
|
30
|
-
l.onClick(
|
|
35
|
+
const p = (g) => {
|
|
36
|
+
g.stopPropagation(), l.onClick?.(t);
|
|
31
37
|
};
|
|
32
38
|
return /* @__PURE__ */ e.jsx(
|
|
33
|
-
|
|
39
|
+
j,
|
|
34
40
|
{
|
|
35
|
-
className: o("flex-1 h-8", n === 0 &&
|
|
41
|
+
className: o("flex-1 h-8", n === 0 && r.length > 1 && "order-2"),
|
|
36
42
|
animate: !1,
|
|
37
43
|
animateIcon: !1,
|
|
38
44
|
label: l.label,
|
|
39
|
-
onClick:
|
|
40
|
-
variant: l.variant ||
|
|
45
|
+
onClick: p,
|
|
46
|
+
variant: l.variant || r.length > 1 ? n === 0 ? "fill" : "text" : "fill",
|
|
41
47
|
disabled: l.disabled,
|
|
42
48
|
size: "small"
|
|
43
|
-
}
|
|
49
|
+
},
|
|
50
|
+
l.label + n
|
|
44
51
|
);
|
|
45
52
|
}) })
|
|
46
53
|
] });
|
|
47
54
|
};
|
|
48
55
|
export {
|
|
49
|
-
|
|
56
|
+
z as default
|
|
50
57
|
};
|