prometeo-design-system 4.1.7 → 4.1.8
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 +37 -38
- package/dist/CardProfile.es.js +278 -3
- package/dist/Icons/UserAvatar.es.js +4 -4
- package/dist/Input.es.js +72 -71
- package/dist/PlainTooltip.es.js +19 -19
- package/dist/PyrionLayout.es.js +459 -409
- package/dist/Select.es.js +46 -46
- package/dist/TicketCard.es.js +33 -31
- package/dist/badge-BEx-0Q-K.js +35 -0
- package/dist/components/Avatar/Avatar.d.ts +1 -2
- package/dist/index.d.ts +0 -16
- package/dist/prometeo-design-system.es.js +119 -2906
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/CardProfile-C1F83KJV.js +0 -280
- package/dist/badge-CbqYNrl4.js +0 -87
- package/dist/components/Layout/LayoutGeneric.d.ts +0 -6
- package/dist/components/Sidebar/SecondaryBar/SecondaryBar.d.ts +0 -32
- package/dist/components/Sidebar/SecondaryBar/hooks/useSecondaryBarAnimation.d.ts +0 -2
- package/dist/components/Sidebar/SecondaryBar/index.d.ts +0 -1
- package/dist/components/Sidebar/SidebarComposable.d.ts +0 -43
- package/dist/components/Sidebar/components/NavigationLink.d.ts +0 -11
- package/dist/components/Sidebar/components/company-logo.d.ts +0 -5
- package/dist/components/Sidebar/components/nav-actions.d.ts +0 -7
- package/dist/components/Sidebar/components/nav-links.d.ts +0 -7
- package/dist/components/Sidebar/context/SidebarContext.d.ts +0 -13
- package/dist/components/Sidebar/hooks/SidebarProvider.d.ts +0 -3
- package/dist/components/Sidebar/hooks/useNavBarActions.d.ts +0 -9
- package/dist/components/Sidebar/hooks/useNavBarCollapse.d.ts +0 -4
- package/dist/components/Sidebar/hooks/useNavLinks.d.ts +0 -32
- package/dist/components/Sidebar/hooks/useSidebarHook.d.ts +0 -13
- package/dist/components/Sidebar/index.d.ts +0 -12
- package/dist/components/Sidebar/ui/useNavbarAnimation.d.ts +0 -2
package/dist/Input.es.js
CHANGED
|
@@ -8,7 +8,7 @@ import { EyeVisibility as oe } from "./Icons/EyeVisibility.es.js";
|
|
|
8
8
|
import { EyeVisibilityOff as se } from "./Icons/EyeVisibilityOff.es.js";
|
|
9
9
|
import le from "./Button.es.js";
|
|
10
10
|
import { Close as ae } from "./Icons/Close.es.js";
|
|
11
|
-
const
|
|
11
|
+
const x = {
|
|
12
12
|
default: {
|
|
13
13
|
container: "",
|
|
14
14
|
input: e(
|
|
@@ -44,45 +44,45 @@ const m = {
|
|
|
44
44
|
}
|
|
45
45
|
}, $ = V(
|
|
46
46
|
({
|
|
47
|
-
label:
|
|
48
|
-
icon:
|
|
49
|
-
iconPosition:
|
|
47
|
+
label: h,
|
|
48
|
+
icon: o,
|
|
49
|
+
iconPosition: l = "left",
|
|
50
50
|
onChange: I,
|
|
51
51
|
value: S,
|
|
52
|
-
name:
|
|
52
|
+
name: b,
|
|
53
53
|
width: i = "100%",
|
|
54
|
-
height:
|
|
55
|
-
variant:
|
|
56
|
-
labelVariant:
|
|
54
|
+
height: a,
|
|
55
|
+
variant: u = "default",
|
|
56
|
+
labelVariant: s = "default",
|
|
57
57
|
size: E = "medium",
|
|
58
|
-
disabled:
|
|
58
|
+
disabled: f = !1,
|
|
59
59
|
type: r = "text",
|
|
60
60
|
isFetching: n,
|
|
61
|
-
errorComponent:
|
|
62
|
-
helperComponent:
|
|
61
|
+
errorComponent: g,
|
|
62
|
+
helperComponent: w,
|
|
63
63
|
placeholder: L,
|
|
64
|
-
required:
|
|
65
|
-
onFocus:
|
|
66
|
-
onBlur:
|
|
67
|
-
onKeyDown:
|
|
68
|
-
onKeyUp:
|
|
69
|
-
className:
|
|
70
|
-
style:
|
|
71
|
-
readOnly:
|
|
72
|
-
onClear:
|
|
64
|
+
required: N = !1,
|
|
65
|
+
onFocus: R,
|
|
66
|
+
onBlur: k,
|
|
67
|
+
onKeyDown: B,
|
|
68
|
+
onKeyUp: D,
|
|
69
|
+
className: P,
|
|
70
|
+
style: M,
|
|
71
|
+
readOnly: O = !1,
|
|
72
|
+
onClear: m,
|
|
73
73
|
onClickIcon: z,
|
|
74
74
|
...v
|
|
75
|
-
},
|
|
76
|
-
const [
|
|
77
|
-
let
|
|
78
|
-
|
|
75
|
+
}, T) => {
|
|
76
|
+
const [y, A] = F(!1), { ref: C } = te();
|
|
77
|
+
let p = E;
|
|
78
|
+
a && (p = "customHeight");
|
|
79
79
|
const c = {
|
|
80
80
|
small: {
|
|
81
81
|
container: "text-sm",
|
|
82
82
|
input: "h-10 px-3 text-[1rem] prometeo-fonts-body-large",
|
|
83
83
|
label: ` prometeo-fonts-label-large
|
|
84
84
|
peer-focus:prometeo-fonts-label-large
|
|
85
|
-
peer-placeholder-shown:${
|
|
85
|
+
peer-placeholder-shown:${s === "default" ? "prometeo-fonts-body-large" : "prometeo-fonts-label-large"} peer-placeholder-shown:text-neutral-medium-default peer-focus:text-neutral-medium-default `,
|
|
86
86
|
icon: "w-4 h-4 right-3"
|
|
87
87
|
},
|
|
88
88
|
medium: {
|
|
@@ -90,7 +90,7 @@ const m = {
|
|
|
90
90
|
input: "h-12 px-3 prometeo-fonts-body-large",
|
|
91
91
|
label: ` prometeo-fonts-label-large
|
|
92
92
|
peer-focus:prometeo-fonts-label-large
|
|
93
|
-
peer-placeholder-shown:${
|
|
93
|
+
peer-placeholder-shown:${s === "default" ? "prometeo-fonts-body-large" : "prometeo-fonts-label-large"} peer-placeholder-shown:text-neutral-medium-default text-neutral-medium-default peer-focus:text-neutral-medium-default `,
|
|
94
94
|
icon: "w-5 h-5 right-3"
|
|
95
95
|
},
|
|
96
96
|
large: {
|
|
@@ -106,112 +106,113 @@ const m = {
|
|
|
106
106
|
icon: "w-6 h-6 right-3"
|
|
107
107
|
}
|
|
108
108
|
}, G = () => {
|
|
109
|
-
|
|
110
|
-
},
|
|
111
|
-
i && i !== "100%" && (
|
|
112
|
-
const H =
|
|
109
|
+
A(!y);
|
|
110
|
+
}, j = {};
|
|
111
|
+
i && i !== "100%" && (j.width = i), a && (j.height = a);
|
|
112
|
+
const H = u === "error" && g, J = !H && w, K = r === "password", Q = () => s === "static" ? "-top-1 -translate-y-full left-0 pl-3" : o ? `${d ? "peer-placeholder-shown:top-[calc(50%-12px)]" : "peer-placeholder-shown:top-1/2"} -translate-y-1/2 peer-focus:top-0 peer-focus:left-3 peer-focus:px-1 peer-focus:ml-0 peer-focus:mr-0 ${l === "left" ? "peer-placeholder-shown:ml-6" : "peer-placeholder-shown:mr-6"}` : `${d ? "peer-placeholder-shown:top-[calc(50%-12px)]" : "peer-placeholder-shown:top-1/2"} -translate-y-1/2 peer-focus:top-0 peer-focus:left-3 peer-focus:px-1`, U = () => a ? c.customHeight.label : c[p].label, W = () => a ? { height: a } : {}, X = () => s === "default" ? h : L || h || "", Y = () => K ? !o && !m ? "pr-10" : l === "left" ? "pl-10 pr-10" : "pr-16" : m ? o ? l === "left" ? "pl-10 pr-7" : "pr-10 pl-3" : "pr-7" : o ? l === "left" ? "pl-10 pr-3" : "pr-10 pl-3" : "", Z = s === "default" && "transition-all duration-200 ease-in-out", d = g || w;
|
|
113
113
|
return /* @__PURE__ */ t.jsxs(
|
|
114
114
|
"div",
|
|
115
115
|
{
|
|
116
116
|
className: e(
|
|
117
117
|
"relative",
|
|
118
|
-
c[
|
|
118
|
+
c[p].container,
|
|
119
119
|
!i && "w-full",
|
|
120
120
|
"bg-inherit",
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
s === "static" && "mt-2",
|
|
122
|
+
P
|
|
123
123
|
),
|
|
124
|
-
style: { ...
|
|
124
|
+
style: { ...M, ...j },
|
|
125
125
|
children: [
|
|
126
126
|
/* @__PURE__ */ t.jsx(
|
|
127
127
|
"input",
|
|
128
128
|
{
|
|
129
|
-
id:
|
|
130
|
-
name:
|
|
131
|
-
ref:
|
|
129
|
+
id: b,
|
|
130
|
+
name: b,
|
|
131
|
+
ref: T,
|
|
132
132
|
value: S,
|
|
133
133
|
placeholder: X(),
|
|
134
|
-
type: r === "password" &&
|
|
134
|
+
type: r === "password" && y ? "text" : r,
|
|
135
135
|
className: e(
|
|
136
136
|
"peer w-full border rounded-lg bg-transparent appearance-none transition-all duration-200 ease-in-out",
|
|
137
137
|
"focus:outline-none px-3",
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
c[
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
138
|
+
s === "default" && "placeholder:text-transparent",
|
|
139
|
+
s === "static" && "placeholder:text-neutral-medium-default ",
|
|
140
|
+
x[u].input,
|
|
141
|
+
c[p].input,
|
|
142
|
+
o && "pr-10",
|
|
143
|
+
f && "bg-transparent opacity-60 border-neutral-strong-default text-neutral-medium-disabled",
|
|
144
|
+
x[u].container,
|
|
145
145
|
Y()
|
|
146
146
|
),
|
|
147
147
|
style: W(),
|
|
148
148
|
onChange: I,
|
|
149
|
-
onFocus:
|
|
150
|
-
onBlur:
|
|
151
|
-
disabled:
|
|
152
|
-
required:
|
|
153
|
-
onKeyDown:
|
|
154
|
-
onKeyUp:
|
|
149
|
+
onFocus: R,
|
|
150
|
+
onBlur: k,
|
|
151
|
+
disabled: f,
|
|
152
|
+
required: N,
|
|
153
|
+
onKeyDown: B,
|
|
154
|
+
onKeyUp: D,
|
|
155
155
|
defaultValue: v.defaultValue,
|
|
156
|
-
readOnly:
|
|
156
|
+
readOnly: O,
|
|
157
157
|
...v
|
|
158
158
|
}
|
|
159
159
|
),
|
|
160
160
|
/* @__PURE__ */ t.jsx(
|
|
161
161
|
"label",
|
|
162
162
|
{
|
|
163
|
-
ref:
|
|
164
|
-
htmlFor:
|
|
163
|
+
ref: C,
|
|
164
|
+
htmlFor: b,
|
|
165
165
|
className: e(
|
|
166
166
|
"absolute left-3 pointer-events-none px-1 z-10",
|
|
167
167
|
Z,
|
|
168
168
|
U(),
|
|
169
|
-
|
|
169
|
+
x[u].label,
|
|
170
170
|
Q(),
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
N && "after:content-['*'] after:text-error-default after:ml-1",
|
|
172
|
+
f && "text-neutral-medium-disabled prometeo-fonts-label-large"
|
|
173
173
|
),
|
|
174
|
-
children:
|
|
174
|
+
children: h
|
|
175
175
|
}
|
|
176
176
|
),
|
|
177
|
-
(
|
|
177
|
+
(o || r === "password" || n) && /* @__PURE__ */ t.jsx(
|
|
178
178
|
"button",
|
|
179
179
|
{
|
|
180
180
|
tabIndex: -1,
|
|
181
181
|
type: "button",
|
|
182
182
|
className: e(
|
|
183
|
-
`absolute ${
|
|
184
|
-
c[
|
|
185
|
-
|
|
183
|
+
`absolute ${d ? "top-[calc(50%-12px)]" : "top-1/2"} -translate-y-1/2 flex items-center justify-center z-10`,
|
|
184
|
+
c[p].icon,
|
|
185
|
+
x[u].icon,
|
|
186
186
|
(r === "password" || z) && !n ? "cursor-pointer" : "pointer-events-none",
|
|
187
|
-
|
|
187
|
+
l === "right" ? "right-3" : "left-3"
|
|
188
188
|
),
|
|
189
189
|
onClick: n ? void 0 : r === "password" ? G : z,
|
|
190
190
|
onMouseDown: (_) => r === "password" && !n && _.preventDefault(),
|
|
191
191
|
children: /* @__PURE__ */ t.jsxs("div", { className: "flex items-center", children: [
|
|
192
|
-
n && r !== "password" ? /* @__PURE__ */ t.jsx(ee, { variant: "sync", size: "small", className: "size-5" }) :
|
|
193
|
-
r === "password" && (
|
|
192
|
+
n && r !== "password" ? /* @__PURE__ */ t.jsx(ee, { variant: "sync", size: "small", className: "size-5" }) : o,
|
|
193
|
+
r === "password" && (y ? /* @__PURE__ */ t.jsx(oe, { size: 24, className: "" }) : /* @__PURE__ */ t.jsx(se, { size: 24, className: "" }))
|
|
194
194
|
] })
|
|
195
195
|
}
|
|
196
196
|
),
|
|
197
|
-
|
|
197
|
+
m && /* @__PURE__ */ t.jsx(
|
|
198
198
|
le,
|
|
199
199
|
{
|
|
200
200
|
type: "button",
|
|
201
201
|
className: e(
|
|
202
|
-
`absolute ${
|
|
202
|
+
`absolute ${d ? "top-[calc(50%-12px)]" : "top-1/2"} -translate-y-1/2 flex items-center justify-center z-10 right-1`,
|
|
203
203
|
"size-6 p-1 rounded-full",
|
|
204
204
|
"hover:bg-neutral-medium-hover transition-colors",
|
|
205
|
-
|
|
205
|
+
f && "opacity-50 cursor-not-allowed",
|
|
206
|
+
(o && l === "right" || r === "password" || n) && "mr-9"
|
|
206
207
|
),
|
|
207
|
-
disabled:
|
|
208
|
-
onClick:
|
|
208
|
+
disabled: f,
|
|
209
|
+
onClick: m,
|
|
209
210
|
variant: "text",
|
|
210
211
|
color: "secondary",
|
|
211
212
|
icon: /* @__PURE__ */ t.jsx(ae, { size: 20, className: "" })
|
|
212
213
|
}
|
|
213
214
|
),
|
|
214
|
-
|
|
215
|
+
d && /* @__PURE__ */ t.jsx("div", { className: "min-h-6", children: (H || J) && /* @__PURE__ */ t.jsx(re, { className: "absolute ", variant: u, children: g || w }) })
|
|
215
216
|
]
|
|
216
217
|
}
|
|
217
218
|
);
|
package/dist/PlainTooltip.es.js
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
1
|
import { j as y } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
2
|
import { c as _ } from "./cn-B6yFEsav.js";
|
|
3
|
-
import { memo as j, useRef as v, useCallback as A, useEffect as
|
|
3
|
+
import { memo as j, useRef as v, useCallback as A, useEffect as u } from "react";
|
|
4
4
|
import { createPortal as C } from "react-dom";
|
|
5
5
|
const G = ({ title: w, children: p, delayToShow: x = 500, delayToClose: R = 1e3, className: B, attachToParent: d = !1, disabled: D = !1 }) => {
|
|
6
|
-
const s = v(null),
|
|
6
|
+
const s = v(null), n = v(null), r = v(null), o = A(() => {
|
|
7
7
|
if (typeof window > "u")
|
|
8
8
|
return;
|
|
9
|
-
const e =
|
|
9
|
+
const e = n.current, i = s.current;
|
|
10
10
|
if (!e || !i)
|
|
11
11
|
return;
|
|
12
12
|
const l = window.getComputedStyle(e).display, c = e.style.display, m = e.style.visibility, f = e.style.translate, h = l === "none";
|
|
13
13
|
h && (e.style.visibility = "hidden", e.style.display = "block"), f && e.style.removeProperty("translate");
|
|
14
14
|
const E = i.getBoundingClientRect();
|
|
15
15
|
d ? (e.style.removeProperty("position"), e.style.removeProperty("left"), e.style.removeProperty("top")) : (e.style.setProperty("position", "fixed"), e.style.setProperty("left", `${E.right}px`), e.style.setProperty("top", `${E.bottom}px`));
|
|
16
|
-
const
|
|
16
|
+
const a = e.getBoundingClientRect(), I = window.innerWidth, N = window.innerHeight, b = Math.max(0, 0 - a.left), M = Math.max(0, a.right - I), L = Math.max(0, 0 - a.top), P = Math.max(0, a.bottom - N), O = b > 0 ? b + 16 : M > 0 ? -(M + 16) : 0, T = L > 0 ? L + 16 : P > 0 ? -(P + 16) : 0;
|
|
17
17
|
O === 0 && T === 0 ? e.style.removeProperty("translate") : e.style.setProperty("translate", `${O}px ${T}px`), h && (e.style.display = c, e.style.visibility = m);
|
|
18
18
|
}, [d]);
|
|
19
|
-
if (
|
|
20
|
-
const t = s.current, e =
|
|
19
|
+
if (u(() => {
|
|
20
|
+
const t = s.current, e = n.current;
|
|
21
21
|
if (!t || !e)
|
|
22
22
|
return;
|
|
23
23
|
const i = (m, f) => {
|
|
24
|
-
|
|
24
|
+
r.current = setTimeout(() => {
|
|
25
25
|
f();
|
|
26
26
|
}, m);
|
|
27
27
|
}, l = () => {
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
r.current && clearTimeout(r.current), o(), i(x, () => {
|
|
29
|
+
n.current?.classList.add("visible");
|
|
30
30
|
});
|
|
31
31
|
}, c = () => {
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
r.current && clearTimeout(r.current), i(R, () => {
|
|
33
|
+
n.current?.classList.remove("visible");
|
|
34
34
|
});
|
|
35
35
|
};
|
|
36
36
|
return t.addEventListener("mouseenter", l), t.addEventListener("mouseleave", c), () => {
|
|
37
37
|
t.removeEventListener("mouseenter", l), t.removeEventListener("mouseleave", c);
|
|
38
38
|
};
|
|
39
|
-
}, [x, R, o]),
|
|
39
|
+
}, [x, R, o]), u(() => {
|
|
40
40
|
o();
|
|
41
|
-
}, [o, w]),
|
|
41
|
+
}, [o, w]), u(() => {
|
|
42
42
|
if (typeof window > "u")
|
|
43
43
|
return;
|
|
44
44
|
const t = () => {
|
|
45
|
-
|
|
45
|
+
n.current && n.current.classList.contains("visible") && o();
|
|
46
46
|
};
|
|
47
47
|
return window.addEventListener("resize", t), window.addEventListener("scroll", t, !0), () => {
|
|
48
48
|
window.removeEventListener("resize", t), window.removeEventListener("scroll", t, !0);
|
|
49
49
|
};
|
|
50
|
-
}, [o]),
|
|
51
|
-
|
|
50
|
+
}, [o]), u(() => () => {
|
|
51
|
+
r.current && clearTimeout(r.current);
|
|
52
52
|
}, []), D) return p;
|
|
53
|
-
const g = /* @__PURE__ */ y.jsx("span", { ref:
|
|
53
|
+
const g = /* @__PURE__ */ y.jsx("span", { ref: n, className: _(
|
|
54
54
|
"plain-tooltip ",
|
|
55
55
|
"absolute z-999",
|
|
56
56
|
"bg-neutral-weak-default px-2 py-1 rounded-lg w-max",
|
|
57
|
-
"text-neutral-strong-default prometeo-fonts-body-small ",
|
|
57
|
+
"text-neutral-strong-default prometeo-fonts-body-small text-balance ",
|
|
58
58
|
B,
|
|
59
|
-
|
|
59
|
+
n.current?.innerText?.length && n.current?.innerText?.length > Math.floor(450 / 10) ? "w-max line-clamp-1" : "max-w-[200px] line-clamp-none"
|
|
60
60
|
), children: w });
|
|
61
61
|
return !d && typeof document < "u" ? /* @__PURE__ */ y.jsxs("div", { ref: s, children: [
|
|
62
62
|
p,
|