prometeo-design-system 3.1.7 → 4.1.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/{CardProfile-y9Knsg26.js → CardProfile-C1F83KJV.js} +1 -1
- package/dist/CardProfile.es.js +1 -1
- package/dist/{DatePicker-6eb-0Ns5.js → DatePicker-QuBgR5DQ.js} +799 -794
- package/dist/DatePicker.es.js +1 -1
- package/dist/DialogModal.es.js +25 -22
- package/dist/Icons/ReassignmentFill.es.js +1 -1
- package/dist/Icons/StarFill.d.ts +6 -0
- package/dist/Icons/StarFill.es.js +19 -0
- package/dist/Icons/components/StarFill.d.ts +4 -0
- package/dist/Icons/index.d.ts +1 -0
- package/dist/Icons/types.d.ts +4 -2
- package/dist/Icons.es.js +18 -16
- package/dist/Input.es.js +56 -52
- package/dist/PlainTooltip.d.ts +6 -0
- package/dist/PlainTooltip.es.js +72 -0
- package/dist/PyrionLayout.d.ts +6 -0
- package/dist/PyrionLayout.es.js +1357 -0
- package/dist/RecurrentDatePicker.es.js +2 -2
- package/dist/RecurrentDatePickerRRule.es.js +1 -1
- package/dist/Scrollable.es.js +118 -86
- package/dist/Select.es.js +524 -524
- package/dist/SelectSearch.es.js +44 -43
- package/dist/TabLinks.es.js +81 -52
- package/dist/{badge-B1IK_-i5.js → badge-CbqYNrl4.js} +28 -28
- package/dist/components/DatePicker/DatePicker.d.ts +1 -0
- package/dist/components/Input/Input.d.ts +1 -0
- package/dist/components/NavigationDrawer/NavigationDrawer.d.ts +19 -11
- package/dist/components/NavigationDrawer/NavigationDrawerActionItem.d.ts +5 -3
- package/dist/components/NavigationDrawer/NavigationDrawerActions.d.ts +3 -3
- package/dist/components/NavigationDrawer/NavigationDrawerItemBase.d.ts +1 -0
- package/dist/components/NavigationDrawer/NavigationDrawerLinkItem.d.ts +3 -2
- package/dist/components/NavigationDrawer/NavigationDrawerNavlinks.d.ts +2 -2
- package/dist/components/NavigationDrawer/NavigationDrawerSidebar.d.ts +11 -0
- package/dist/components/NotificationCard/NotificationCard.d.ts +3 -2
- package/dist/components/PlainTooltip/PlainTooltip.d.ts +11 -0
- package/dist/components/PyrionNavigationDrawer/PLContent.d.ts +10 -0
- package/dist/components/PyrionNavigationDrawer/PLFooter.d.ts +21 -0
- package/dist/components/PyrionNavigationDrawer/PLHeader.d.ts +10 -0
- package/dist/components/PyrionNavigationDrawer/PLHelpSection.d.ts +8 -0
- package/dist/components/PyrionNavigationDrawer/{PyrionNavigationDrawerMobileAppSwitcher.d.ts → PLMobileAppSwitcher.d.ts} +3 -3
- package/dist/components/PyrionNavigationDrawer/PLNotificationsList.d.ts +15 -0
- package/dist/components/PyrionNavigationDrawer/PLSidebar.d.ts +12 -0
- package/dist/components/PyrionNavigationDrawer/PLSidebarContent.d.ts +17 -0
- package/dist/components/PyrionNavigationDrawer/{PyrionNavigationDrawerSystemLogo.d.ts → PLSystemLogo.d.ts} +1 -1
- package/dist/components/PyrionNavigationDrawer/PLSystemSessions.d.ts +14 -0
- package/dist/components/PyrionNavigationDrawer/PLayoutBase.d.ts +42 -0
- package/dist/components/PyrionNavigationDrawer/PyrionLayout.d.ts +146 -0
- package/dist/components/PyrionNavigationDrawer/index.d.ts +3 -2
- package/dist/components/Scrollable/Scrollable.d.ts +1 -0
- package/dist/components/Select/Select.d.ts +1 -0
- package/dist/components/TabLinks/TabLinks.d.ts +10 -1
- package/dist/components/TabSwitch/TabSwitch.d.ts +2 -0
- package/dist/exports/PlainTooltip.d.ts +2 -0
- package/dist/exports/PyrionLayout.d.ts +2 -0
- package/dist/exports/usePyrionNavigation.d.ts +1 -1
- package/dist/hooks/useDevice.d.ts +1 -0
- package/dist/index.d.ts +0 -1
- package/dist/prometeo-design-system.es.js +2421 -402
- package/dist/styles.css +1 -1
- package/dist/useDevice-vwn4GLwK.js +16 -0
- package/dist/useDevice.es.js +2 -11
- package/dist/usePyrionNavigation.es.js +1 -1
- package/package.json +8 -16
- package/src/styles/base.css +1 -0
- package/dist/LayoutGeneric-CfWhV1ov.js +0 -26
- package/dist/LayoutGeneric.d.ts +0 -6
- package/dist/LayoutGeneric.es.js +0 -4
- package/dist/PyrionNavigationDrawer.d.ts +0 -6
- package/dist/PyrionNavigationDrawer.es.js +0 -962
- package/dist/SwipeContainer.d.ts +0 -4
- package/dist/SwipeContainer.es.js +0 -185
- package/dist/components/PyrionNavigationDrawer/PyrionHelpSection.d.ts +0 -8
- package/dist/components/PyrionNavigationDrawer/PyrionNavigationDrawer.d.ts +0 -130
- package/dist/components/PyrionNavigationDrawer/PyrionNotificationsList.d.ts +0 -8
- package/dist/components/PyrionNavigationDrawer/SidebarContent.d.ts +0 -13
- package/dist/components/PyrionNavigationDrawer/SystemSessions.d.ts +0 -12
- package/dist/components/SwipeContainer/SwipeContainer.d.ts +0 -19
- package/dist/exports/LayoutGeneric.d.ts +0 -2
- package/dist/exports/PyrionNavigationDrawer.d.ts +0 -2
- package/dist/exports/SwipeContainer.d.ts +0 -1
package/dist/DatePicker.es.js
CHANGED
package/dist/DialogModal.es.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { j as o } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
-
import { forwardRef as h, memo as
|
|
2
|
+
import { forwardRef as h, memo as r, useState as D, useRef as p, useCallback as n, useImperativeHandle as R } from "react";
|
|
3
3
|
import { c as j } from "./cn-B6yFEsav.js";
|
|
4
|
-
const
|
|
4
|
+
const b = h(
|
|
5
5
|
({ children: e, onClose: t, className: a }, i) => {
|
|
6
|
-
const [
|
|
6
|
+
const [s, l] = D(!1), [c, f] = D(null), x = p(t), u = p(c);
|
|
7
7
|
x.current = t, u.current = c;
|
|
8
8
|
const m = n((g) => {
|
|
9
|
-
f(g ?? null),
|
|
9
|
+
f(g ?? null), l(!0);
|
|
10
10
|
}, []), d = n(() => {
|
|
11
|
-
|
|
11
|
+
l(!1), x.current?.(u.current), setTimeout(() => f(null), 300);
|
|
12
12
|
}, []);
|
|
13
13
|
return R(
|
|
14
14
|
i,
|
|
15
15
|
() => ({
|
|
16
16
|
open: m,
|
|
17
17
|
close: d,
|
|
18
|
-
isOpen:
|
|
18
|
+
isOpen: s,
|
|
19
19
|
getContext: () => u.current
|
|
20
20
|
}),
|
|
21
|
-
[m, d,
|
|
22
|
-
), /* @__PURE__ */ o.jsx(o.Fragment, { children:
|
|
21
|
+
[m, d, s]
|
|
22
|
+
), /* @__PURE__ */ o.jsx(o.Fragment, { children: s && /* @__PURE__ */ o.jsx(
|
|
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: /* @__PURE__ */ o.
|
|
27
|
+
children: /* @__PURE__ */ o.jsxs(
|
|
28
28
|
"div",
|
|
29
29
|
{
|
|
30
30
|
className: j(
|
|
@@ -32,41 +32,44 @@ const C = h(
|
|
|
32
32
|
a
|
|
33
33
|
),
|
|
34
34
|
onClick: (g) => g.stopPropagation(),
|
|
35
|
-
children:
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ o.jsx("div", { className: "absolute bg-transparent -inset-4 z-[-1]" }),
|
|
37
|
+
typeof e == "function" ? e(c) : e
|
|
38
|
+
]
|
|
36
39
|
}
|
|
37
40
|
)
|
|
38
41
|
}
|
|
39
42
|
) });
|
|
40
43
|
}
|
|
41
44
|
);
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
const N =
|
|
45
|
+
b.displayName = "Dialog";
|
|
46
|
+
const C = 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 }) }));
|
|
47
|
+
C.displayName = "DialogContent";
|
|
48
|
+
const N = r(({ children: e, className: t }) => /* @__PURE__ */ o.jsx("h1", { className: t, children: e }));
|
|
46
49
|
N.displayName = "DialogTitle";
|
|
47
|
-
const v =
|
|
50
|
+
const v = r(({ children: e, className: t }) => /* @__PURE__ */ o.jsx("div", { className: t, children: e }));
|
|
48
51
|
v.displayName = "DialogHeader";
|
|
49
|
-
const y =
|
|
52
|
+
const y = r(({ children: e, className: t }) => /* @__PURE__ */ o.jsx("div", { className: t, children: e }));
|
|
50
53
|
y.displayName = "DialogFooter";
|
|
51
|
-
const k = Object.assign(
|
|
52
|
-
Content:
|
|
54
|
+
const k = Object.assign(b, {
|
|
55
|
+
Content: C,
|
|
53
56
|
Header: v,
|
|
54
57
|
Footer: y,
|
|
55
58
|
Title: N
|
|
56
59
|
});
|
|
57
60
|
k.displayName = "DialogModal";
|
|
58
61
|
const H = () => {
|
|
59
|
-
const e = p(null), t = n((
|
|
60
|
-
e.current?.open(
|
|
62
|
+
const e = p(null), t = n((l) => {
|
|
63
|
+
e.current?.open(l);
|
|
61
64
|
}, []), a = n(() => {
|
|
62
65
|
e.current?.close();
|
|
63
|
-
}, []), i = n(() => e.current?.isOpen ?? !1, []),
|
|
66
|
+
}, []), i = n(() => e.current?.isOpen ?? !1, []), s = n(() => e.current?.getContext() ?? null, []);
|
|
64
67
|
return {
|
|
65
68
|
ref: e,
|
|
66
69
|
open: t,
|
|
67
70
|
close: a,
|
|
68
71
|
isOpen: i,
|
|
69
|
-
getContext:
|
|
72
|
+
getContext: s
|
|
70
73
|
};
|
|
71
74
|
};
|
|
72
75
|
export {
|
|
@@ -2,7 +2,7 @@ import { j as s } from "../jsx-runtime-GkKLlHH4.js";
|
|
|
2
2
|
import { m as a } from "../iconUtils-D0lVAgGT.js";
|
|
3
3
|
const c = a(
|
|
4
4
|
({ size: t = 24, className: h, ...i }) => {
|
|
5
|
-
const e = "translate(480,-480) scale(
|
|
5
|
+
const e = "translate(480,-480) scale(58,56) translate(-8,-8)";
|
|
6
6
|
return /* @__PURE__ */ s.jsxs(
|
|
7
7
|
"svg",
|
|
8
8
|
{
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { j as r } from "../jsx-runtime-GkKLlHH4.js";
|
|
2
|
+
import { m as L } from "../iconUtils-D0lVAgGT.js";
|
|
3
|
+
const i = L(({ size: t = 24, className: o, ...s }) => /* @__PURE__ */ r.jsx(
|
|
4
|
+
"svg",
|
|
5
|
+
{
|
|
6
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7
|
+
...s,
|
|
8
|
+
viewBox: "0 -960 960 960",
|
|
9
|
+
width: t,
|
|
10
|
+
height: t,
|
|
11
|
+
fill: "currentColor",
|
|
12
|
+
className: o,
|
|
13
|
+
children: /* @__PURE__ */ r.jsx("path", { d: "M233 -100L298 -381L80 -570L368 -595L480 -860L592 -595L880 -570L662 -381L727 -100L480 -249L233 -100Z" })
|
|
14
|
+
}
|
|
15
|
+
));
|
|
16
|
+
export {
|
|
17
|
+
i as StarFill,
|
|
18
|
+
i as default
|
|
19
|
+
};
|
package/dist/Icons/index.d.ts
CHANGED
|
@@ -61,5 +61,6 @@ export { UserAddFill } from './components/UserAddFill';
|
|
|
61
61
|
export { Reassignment } from './components/Reassignment';
|
|
62
62
|
export { ReassignmentFill } from './components/ReassignmentFill';
|
|
63
63
|
export { Send } from './components/Send';
|
|
64
|
+
export { StarFill } from './components/StarFill';
|
|
64
65
|
export type { IconProps } from './iconUtils';
|
|
65
66
|
export type { IconComponent } from './types';
|
package/dist/Icons/types.d.ts
CHANGED
|
@@ -59,8 +59,9 @@ import { TrashFill } from './components/TrashFill';
|
|
|
59
59
|
import { MessageSquareFill } from './components/MessageSquareFill';
|
|
60
60
|
import { UserAddFill } from './components/UserAddFill';
|
|
61
61
|
import { Reassignment } from './components/Reassignment';
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
62
|
+
import { ReassignmentFill } from './components/ReassignmentFill';
|
|
63
|
+
import { Send } from './components/Send';
|
|
64
|
+
import { StarFill } from './components/StarFill';
|
|
64
65
|
export type IconsMap = {
|
|
65
66
|
Ticket: typeof Ticket;
|
|
66
67
|
Home: typeof Home;
|
|
@@ -125,6 +126,7 @@ export type IconsMap = {
|
|
|
125
126
|
Reassignment: typeof Reassignment;
|
|
126
127
|
ReassignmentFill: typeof ReassignmentFill;
|
|
127
128
|
Send: typeof Send;
|
|
129
|
+
StarFill: typeof StarFill;
|
|
128
130
|
};
|
|
129
131
|
export type IconName = keyof IconsMap;
|
|
130
132
|
export type IconComponent = IconsMap[IconName];
|
package/dist/Icons.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Ticket as e } from "./Icons/Ticket.es.js";
|
|
2
2
|
import { Home as p } from "./Icons/Home.es.js";
|
|
3
3
|
import { Boards as f } from "./Icons/Boards.es.js";
|
|
4
|
-
import { Notifications as
|
|
4
|
+
import { Notifications as l } from "./Icons/Notifications.es.js";
|
|
5
5
|
import { Help as a } from "./Icons/Help.es.js";
|
|
6
6
|
import { Settings as n } from "./Icons/Settings.es.js";
|
|
7
7
|
import { CrevronLeft as C } from "./Icons/CrevronLeft.es.js";
|
|
8
8
|
import { CrevronRight as F } from "./Icons/CrevronRight.es.js";
|
|
9
9
|
import { ArrowLeft as A } from "./Icons/ArrowLeft.es.js";
|
|
10
|
-
import { Shared as
|
|
11
|
-
import { ChevronDown as
|
|
10
|
+
import { Shared as g } from "./Icons/Shared.es.js";
|
|
11
|
+
import { ChevronDown as y } from "./Icons/ChevronDown.es.js";
|
|
12
12
|
import { Collapse as w } from "./Icons/Collapse.es.js";
|
|
13
13
|
import { Calendar as U } from "./Icons/Calendar.es.js";
|
|
14
14
|
import { Close as D } from "./Icons/Close.es.js";
|
|
@@ -28,13 +28,13 @@ import { AccountCircle as oo } from "./Icons/AccountCircle.es.js";
|
|
|
28
28
|
import { UserAdd as eo } from "./Icons/UserAdd.es.js";
|
|
29
29
|
import { AttachFile as po } from "./Icons/AttachFile.es.js";
|
|
30
30
|
import { HistoryActivity as fo } from "./Icons/HistoryActivity.es.js";
|
|
31
|
-
import { MessageSquare as
|
|
31
|
+
import { MessageSquare as lo } from "./Icons/MessageSquare.es.js";
|
|
32
32
|
import { CloseNavBarDesktop as ao } from "./Icons/CloseNavBarDesktop.es.js";
|
|
33
33
|
import { EyeVisibility as no } from "./Icons/EyeVisibility.es.js";
|
|
34
34
|
import { EyeVisibilityOff as co } from "./Icons/EyeVisibilityOff.es.js";
|
|
35
35
|
import { Check as ho } from "./Icons/Check.es.js";
|
|
36
|
-
import { Info as
|
|
37
|
-
import { Error as
|
|
36
|
+
import { Info as So } from "./Icons/Info.es.js";
|
|
37
|
+
import { Error as ko } from "./Icons/Error.es.js";
|
|
38
38
|
import { TicketFilled as uo } from "./Icons/TicketFilled.es.js";
|
|
39
39
|
import { UploadCloud as Eo } from "./Icons/UploadCloud.es.js";
|
|
40
40
|
import { Clock as vo } from "./Icons/Clock.es.js";
|
|
@@ -55,12 +55,13 @@ import { Image as rr } from "./Icons/Image.es.js";
|
|
|
55
55
|
import { DocumentFill as tr } from "./Icons/DocumentFill.es.js";
|
|
56
56
|
import { Company as mr } from "./Icons/Company.es.js";
|
|
57
57
|
import { EditFill as xr } from "./Icons/EditFill.es.js";
|
|
58
|
-
import { TrashFill as
|
|
58
|
+
import { TrashFill as ir } from "./Icons/TrashFill.es.js";
|
|
59
59
|
import { MessageSquareFill as sr } from "./Icons/MessageSquareFill.es.js";
|
|
60
60
|
import { UserAddFill as dr } from "./Icons/UserAddFill.es.js";
|
|
61
61
|
import { Reassignment as cr } from "./Icons/Reassignment.es.js";
|
|
62
62
|
import { ReassignmentFill as hr } from "./Icons/ReassignmentFill.es.js";
|
|
63
|
-
import { Send as
|
|
63
|
+
import { Send as Sr } from "./Icons/Send.es.js";
|
|
64
|
+
import { StarFill as kr } from "./Icons/StarFill.es.js";
|
|
64
65
|
export {
|
|
65
66
|
oo as AccountCircle,
|
|
66
67
|
z as Add,
|
|
@@ -73,7 +74,7 @@ export {
|
|
|
73
74
|
ho as Check,
|
|
74
75
|
No as CheckCircle,
|
|
75
76
|
jo as CheckList,
|
|
76
|
-
|
|
77
|
+
y as ChevronDown,
|
|
77
78
|
vo as Clock,
|
|
78
79
|
D as Close,
|
|
79
80
|
ao as CloseNavBarDesktop,
|
|
@@ -87,7 +88,7 @@ export {
|
|
|
87
88
|
J as Edit,
|
|
88
89
|
xr as EditFill,
|
|
89
90
|
Xo as Email,
|
|
90
|
-
|
|
91
|
+
ko as Error,
|
|
91
92
|
no as EyeVisibility,
|
|
92
93
|
co as EyeVisibilityOff,
|
|
93
94
|
_ as FaLock,
|
|
@@ -99,26 +100,27 @@ export {
|
|
|
99
100
|
fo as HistoryActivity,
|
|
100
101
|
p as Home,
|
|
101
102
|
rr as Image,
|
|
102
|
-
|
|
103
|
+
So as Info,
|
|
103
104
|
H as Logout,
|
|
104
|
-
|
|
105
|
+
lo as MessageSquare,
|
|
105
106
|
sr as MessageSquareFill,
|
|
106
107
|
W as MoreVert,
|
|
107
|
-
|
|
108
|
+
l as Notifications,
|
|
108
109
|
Lo as Pause,
|
|
109
110
|
cr as Reassignment,
|
|
110
111
|
hr as ReassignmentFill,
|
|
111
112
|
$o as Reload,
|
|
112
113
|
I as Search,
|
|
113
|
-
|
|
114
|
+
Sr as Send,
|
|
114
115
|
n as Settings,
|
|
115
|
-
|
|
116
|
+
g as Shared,
|
|
116
117
|
bo as Sort,
|
|
118
|
+
kr as StarFill,
|
|
117
119
|
P as Stars,
|
|
118
120
|
e as Ticket,
|
|
119
121
|
uo as TicketFilled,
|
|
120
122
|
Mo as Trash,
|
|
121
|
-
|
|
123
|
+
ir as TrashFill,
|
|
122
124
|
Q as Upload,
|
|
123
125
|
Eo as UploadCloud,
|
|
124
126
|
eo as UserAdd,
|
package/dist/Input.es.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
2
|
import { c as e } from "./cn-B6yFEsav.js";
|
|
3
|
-
import { memo as
|
|
4
|
-
import
|
|
5
|
-
import { u as
|
|
6
|
-
import { H as
|
|
7
|
-
import { EyeVisibility as
|
|
8
|
-
import { EyeVisibilityOff as
|
|
9
|
-
import
|
|
3
|
+
import { memo as q, forwardRef as V, useState as F } from "react";
|
|
4
|
+
import ee from "./Spinner.es.js";
|
|
5
|
+
import { u as te } from "./useLabelBackground-BDIHUdND.js";
|
|
6
|
+
import { H as re } from "./HelperComponent-ljsn0xD6.js";
|
|
7
|
+
import { EyeVisibility as oe } from "./Icons/EyeVisibility.es.js";
|
|
8
|
+
import { EyeVisibilityOff as se } from "./Icons/EyeVisibilityOff.es.js";
|
|
9
|
+
import le from "./Button.es.js";
|
|
10
|
+
import { Close as ae } from "./Icons/Close.es.js";
|
|
10
11
|
const m = {
|
|
11
12
|
default: {
|
|
12
13
|
container: "",
|
|
@@ -41,38 +42,39 @@ const m = {
|
|
|
41
42
|
label: e("text-success", "peer-focus:text-success-light"),
|
|
42
43
|
icon: e("text-success-light", "peer-focus:text-success-light")
|
|
43
44
|
}
|
|
44
|
-
},
|
|
45
|
+
}, $ = V(
|
|
45
46
|
({
|
|
46
47
|
label: x,
|
|
47
48
|
icon: s,
|
|
48
49
|
iconPosition: d = "left",
|
|
49
|
-
onChange:
|
|
50
|
-
value:
|
|
50
|
+
onChange: I,
|
|
51
|
+
value: S,
|
|
51
52
|
name: h,
|
|
52
53
|
width: i = "100%",
|
|
53
54
|
height: l,
|
|
54
55
|
variant: a = "default",
|
|
55
56
|
labelVariant: o = "default",
|
|
56
|
-
size:
|
|
57
|
+
size: E = "medium",
|
|
57
58
|
disabled: u = !1,
|
|
58
59
|
type: r = "text",
|
|
59
60
|
isFetching: n,
|
|
60
61
|
errorComponent: b,
|
|
61
62
|
helperComponent: g,
|
|
62
|
-
placeholder:
|
|
63
|
+
placeholder: L,
|
|
63
64
|
required: j = !1,
|
|
64
|
-
onFocus:
|
|
65
|
-
onBlur:
|
|
65
|
+
onFocus: P,
|
|
66
|
+
onBlur: R,
|
|
66
67
|
onKeyDown: k,
|
|
67
|
-
onKeyUp:
|
|
68
|
-
className:
|
|
68
|
+
onKeyUp: B,
|
|
69
|
+
className: C,
|
|
69
70
|
style: D,
|
|
70
|
-
readOnly:
|
|
71
|
+
readOnly: M = !1,
|
|
71
72
|
onClear: N,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
onClickIcon: z,
|
|
74
|
+
...v
|
|
75
|
+
}, O) => {
|
|
76
|
+
const [w, T] = F(!1), { ref: A } = te();
|
|
77
|
+
let f = E;
|
|
76
78
|
l && (f = "customHeight");
|
|
77
79
|
const c = {
|
|
78
80
|
small: {
|
|
@@ -103,11 +105,11 @@ const m = {
|
|
|
103
105
|
label: "text-sm peer-focus:text-sm peer-placeholder-shown:text-xs ",
|
|
104
106
|
icon: "w-6 h-6 right-3"
|
|
105
107
|
}
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
+
}, G = () => {
|
|
109
|
+
T(!w);
|
|
108
110
|
}, y = {};
|
|
109
111
|
i && i !== "100%" && (y.width = i), l && (y.height = l);
|
|
110
|
-
const
|
|
112
|
+
const H = a === "error" && b, J = !H && g, K = r === "password", Q = () => o === "static" ? "-top-1 -translate-y-full left-0 pl-3" : s ? `${p ? "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 ${d === "left" ? "peer-placeholder-shown:ml-6" : "peer-placeholder-shown:mr-6"}` : `${p ? "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 = () => l ? c.customHeight.label : c[f].label, W = () => l ? { height: l } : {}, X = () => o === "default" ? x : L || x || "", Y = () => K ? s ? d === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : s ? d === "left" ? "pl-10 pr-3" : "pr-10 pl-3" : "", Z = o === "default" && "transition-all duration-200 ease-in-out", p = b || g;
|
|
111
113
|
return /* @__PURE__ */ t.jsxs(
|
|
112
114
|
"div",
|
|
113
115
|
{
|
|
@@ -117,7 +119,7 @@ const m = {
|
|
|
117
119
|
!i && "w-full",
|
|
118
120
|
"bg-inherit",
|
|
119
121
|
o === "static" && "mt-2",
|
|
120
|
-
|
|
122
|
+
C
|
|
121
123
|
),
|
|
122
124
|
style: { ...D, ...y },
|
|
123
125
|
children: [
|
|
@@ -126,9 +128,9 @@ const m = {
|
|
|
126
128
|
{
|
|
127
129
|
id: h,
|
|
128
130
|
name: h,
|
|
129
|
-
ref:
|
|
130
|
-
value:
|
|
131
|
-
placeholder:
|
|
131
|
+
ref: O,
|
|
132
|
+
value: S,
|
|
133
|
+
placeholder: X(),
|
|
132
134
|
type: r === "password" && w ? "text" : r,
|
|
133
135
|
className: e(
|
|
134
136
|
"peer w-full border rounded-lg bg-transparent appearance-none transition-all duration-200 ease-in-out",
|
|
@@ -140,32 +142,32 @@ const m = {
|
|
|
140
142
|
s && "pr-10",
|
|
141
143
|
u && "bg-transparent opacity-60 border-neutral-strong-default text-neutral-medium-disabled",
|
|
142
144
|
m[a].container,
|
|
143
|
-
|
|
145
|
+
Y()
|
|
144
146
|
),
|
|
145
|
-
style:
|
|
146
|
-
onChange:
|
|
147
|
-
onFocus:
|
|
148
|
-
onBlur:
|
|
147
|
+
style: W(),
|
|
148
|
+
onChange: I,
|
|
149
|
+
onFocus: P,
|
|
150
|
+
onBlur: R,
|
|
149
151
|
disabled: u,
|
|
150
152
|
required: j,
|
|
151
153
|
onKeyDown: k,
|
|
152
|
-
onKeyUp:
|
|
153
|
-
defaultValue:
|
|
154
|
-
readOnly:
|
|
155
|
-
...
|
|
154
|
+
onKeyUp: B,
|
|
155
|
+
defaultValue: v.defaultValue,
|
|
156
|
+
readOnly: M,
|
|
157
|
+
...v
|
|
156
158
|
}
|
|
157
159
|
),
|
|
158
160
|
/* @__PURE__ */ t.jsx(
|
|
159
161
|
"label",
|
|
160
162
|
{
|
|
161
|
-
ref:
|
|
163
|
+
ref: A,
|
|
162
164
|
htmlFor: h,
|
|
163
165
|
className: e(
|
|
164
166
|
"absolute left-3 pointer-events-none px-1 z-10",
|
|
165
|
-
|
|
166
|
-
|
|
167
|
+
Z,
|
|
168
|
+
U(),
|
|
167
169
|
m[a].label,
|
|
168
|
-
|
|
170
|
+
Q(),
|
|
169
171
|
j && "after:content-['*'] after:text-error-default after:ml-1",
|
|
170
172
|
u && "text-neutral-medium-disabled prometeo-fonts-label-large"
|
|
171
173
|
),
|
|
@@ -181,19 +183,19 @@ const m = {
|
|
|
181
183
|
`absolute ${p ? "top-[calc(50%-12px)]" : "top-1/2"} -translate-y-1/2 flex items-center justify-center z-10`,
|
|
182
184
|
c[f].icon,
|
|
183
185
|
m[a].icon,
|
|
184
|
-
r === "password" && !n ? "cursor-pointer" : "pointer-events-none",
|
|
186
|
+
(r === "password" || z) && !n ? "cursor-pointer" : "pointer-events-none",
|
|
185
187
|
d === "right" ? "right-3" : "left-3"
|
|
186
188
|
),
|
|
187
|
-
onClick: r === "password"
|
|
188
|
-
onMouseDown: (
|
|
189
|
+
onClick: n ? void 0 : r === "password" ? G : z,
|
|
190
|
+
onMouseDown: (_) => r === "password" && !n && _.preventDefault(),
|
|
189
191
|
children: /* @__PURE__ */ t.jsxs("div", { className: "flex items-center", children: [
|
|
190
|
-
n && r !== "password" ? /* @__PURE__ */ t.jsx(
|
|
191
|
-
r === "password" && (w ? /* @__PURE__ */ t.jsx(
|
|
192
|
+
n && r !== "password" ? /* @__PURE__ */ t.jsx(ee, { variant: "sync", size: "small", className: "size-5" }) : s,
|
|
193
|
+
r === "password" && (w ? /* @__PURE__ */ t.jsx(oe, { size: 24, className: "" }) : /* @__PURE__ */ t.jsx(se, { size: 24, className: "" }))
|
|
192
194
|
] })
|
|
193
195
|
}
|
|
194
196
|
),
|
|
195
197
|
N && /* @__PURE__ */ t.jsx(
|
|
196
|
-
|
|
198
|
+
le,
|
|
197
199
|
{
|
|
198
200
|
type: "button",
|
|
199
201
|
className: e(
|
|
@@ -204,17 +206,19 @@ const m = {
|
|
|
204
206
|
),
|
|
205
207
|
disabled: u,
|
|
206
208
|
onClick: N,
|
|
207
|
-
|
|
209
|
+
variant: "text",
|
|
210
|
+
color: "secondary",
|
|
211
|
+
icon: /* @__PURE__ */ t.jsx(ae, { size: 20, className: "" })
|
|
208
212
|
}
|
|
209
213
|
),
|
|
210
|
-
p && /* @__PURE__ */ t.jsx("div", { className: "min-h-6", children: (
|
|
214
|
+
p && /* @__PURE__ */ t.jsx("div", { className: "min-h-6", children: (H || J) && /* @__PURE__ */ t.jsx(re, { className: "absolute ", variant: a, children: b || g }) })
|
|
211
215
|
]
|
|
212
216
|
}
|
|
213
217
|
);
|
|
214
218
|
}
|
|
215
219
|
);
|
|
216
|
-
|
|
217
|
-
const
|
|
220
|
+
$.displayName = "Input";
|
|
221
|
+
const be = q($);
|
|
218
222
|
export {
|
|
219
|
-
|
|
223
|
+
be as default
|
|
220
224
|
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { j as y } from "./jsx-runtime-GkKLlHH4.js";
|
|
2
|
+
import { c as _ } from "./cn-B6yFEsav.js";
|
|
3
|
+
import { memo as j, useRef as v, useCallback as A, useEffect as a } from "react";
|
|
4
|
+
import { createPortal as C } from "react-dom";
|
|
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), r = v(null), n = v(null), o = A(() => {
|
|
7
|
+
if (typeof window > "u")
|
|
8
|
+
return;
|
|
9
|
+
const e = r.current, i = s.current;
|
|
10
|
+
if (!e || !i)
|
|
11
|
+
return;
|
|
12
|
+
const l = window.getComputedStyle(e).display, c = e.style.display, m = e.style.visibility, f = e.style.translate, h = l === "none";
|
|
13
|
+
h && (e.style.visibility = "hidden", e.style.display = "block"), f && e.style.removeProperty("translate");
|
|
14
|
+
const E = i.getBoundingClientRect();
|
|
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 u = e.getBoundingClientRect(), I = window.innerWidth, N = window.innerHeight, b = Math.max(0, 0 - u.left), M = Math.max(0, u.right - I), L = Math.max(0, 0 - u.top), P = Math.max(0, u.bottom - N), O = b > 0 ? b + 16 : M > 0 ? -(M + 16) : 0, T = L > 0 ? L + 16 : P > 0 ? -(P + 16) : 0;
|
|
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
|
+
}, [d]);
|
|
19
|
+
if (a(() => {
|
|
20
|
+
const t = s.current, e = r.current;
|
|
21
|
+
if (!t || !e)
|
|
22
|
+
return;
|
|
23
|
+
const i = (m, f) => {
|
|
24
|
+
n.current = setTimeout(() => {
|
|
25
|
+
f();
|
|
26
|
+
}, m);
|
|
27
|
+
}, l = () => {
|
|
28
|
+
n.current && clearTimeout(n.current), o(), i(x, () => {
|
|
29
|
+
r.current?.classList.add("visible");
|
|
30
|
+
});
|
|
31
|
+
}, c = () => {
|
|
32
|
+
n.current && clearTimeout(n.current), i(R, () => {
|
|
33
|
+
r.current?.classList.remove("visible");
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
return t.addEventListener("mouseenter", l), t.addEventListener("mouseleave", c), () => {
|
|
37
|
+
t.removeEventListener("mouseenter", l), t.removeEventListener("mouseleave", c);
|
|
38
|
+
};
|
|
39
|
+
}, [x, R, o]), a(() => {
|
|
40
|
+
o();
|
|
41
|
+
}, [o, w]), a(() => {
|
|
42
|
+
if (typeof window > "u")
|
|
43
|
+
return;
|
|
44
|
+
const t = () => {
|
|
45
|
+
r.current && r.current.classList.contains("visible") && o();
|
|
46
|
+
};
|
|
47
|
+
return window.addEventListener("resize", t), window.addEventListener("scroll", t, !0), () => {
|
|
48
|
+
window.removeEventListener("resize", t), window.removeEventListener("scroll", t, !0);
|
|
49
|
+
};
|
|
50
|
+
}, [o]), a(() => () => {
|
|
51
|
+
n.current && clearTimeout(n.current);
|
|
52
|
+
}, []), D) return p;
|
|
53
|
+
const g = /* @__PURE__ */ y.jsx("span", { ref: r, className: _(
|
|
54
|
+
"plain-tooltip ",
|
|
55
|
+
"absolute z-999",
|
|
56
|
+
"bg-neutral-weak-default px-2 py-1 rounded-lg w-max",
|
|
57
|
+
"text-neutral-strong-default prometeo-fonts-body-small ",
|
|
58
|
+
B,
|
|
59
|
+
r.current?.innerText?.length && r.current?.innerText?.length > Math.floor(450 / 10) ? "w-max line-clamp-1" : "max-w-[200px] line-clamp-none"
|
|
60
|
+
), children: w });
|
|
61
|
+
return !d && typeof document < "u" ? /* @__PURE__ */ y.jsxs("div", { ref: s, children: [
|
|
62
|
+
p,
|
|
63
|
+
C(g, document.body)
|
|
64
|
+
] }) : /* @__PURE__ */ y.jsxs("div", { ref: s, children: [
|
|
65
|
+
p,
|
|
66
|
+
g
|
|
67
|
+
] });
|
|
68
|
+
}, $ = j(G);
|
|
69
|
+
$.displayName = "PlainTooltip";
|
|
70
|
+
export {
|
|
71
|
+
$ as default
|
|
72
|
+
};
|