lecom-ui 4.3.6 → 4.3.7
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/components/Accordion/Accordion.js +29 -32
- package/dist/components/Button/Button.js +8 -9
- package/dist/components/Button/CustomButton.js +4 -5
- package/dist/components/Card/Card.js +6 -7
- package/dist/components/Checkbox/Checkbox.js +26 -30
- package/dist/components/CustomIcon/Icons/CadastroFacil.js +5 -15
- package/dist/components/CustomIcon/Icons/LogoLecom.js +12 -15
- package/dist/components/CustomIcon/Icons/LogoLecomBrand.js +5 -8
- package/dist/components/CustomIcon/Icons/ModoTeste.js +5 -13
- package/dist/components/CustomIcon/Icons/Rpa.js +5 -17
- package/dist/components/DataTable/DataTable.js +70 -80
- package/dist/components/DataTable/DataTable.utils.js +15 -17
- package/dist/components/Dialog/Dialog.js +18 -27
- package/dist/components/DropdownMenu/DropdownMenu.js +22 -29
- package/dist/components/ErrorEmptyDisplay/ErrorEmptyDisplay.js +15 -20
- package/dist/components/Header/Header.js +30 -46
- package/dist/components/Header/HelpMenu.js +38 -49
- package/dist/components/Header/ImgBrand.js +1 -2
- package/dist/components/Header/ModulesMenu.js +48 -62
- package/dist/components/Header/SocialMenu.js +5 -5
- package/dist/components/Header/UserMenu.js +45 -74
- package/dist/components/Input/Input.js +1 -10
- package/dist/components/Layout/Layout.js +42 -68
- package/dist/components/Notification/Notification.js +7 -8
- package/dist/components/Notification/NotificationBase.js +5 -5
- package/dist/components/Notification/NotificationCallout.js +26 -32
- package/dist/components/Notification/NotificationCloseButton.js +1 -2
- package/dist/components/Notification/NotificationContent.js +18 -24
- package/dist/components/Notification/NotificationIcon.js +5 -5
- package/dist/components/Notification/NotificationInline.js +20 -23
- package/dist/components/Notification/NotificationToast.js +25 -28
- package/dist/components/Pagination/Pagination.js +42 -61
- package/dist/components/Popover/Popover.js +2 -3
- package/dist/components/RadioGroup/RadioGroup.js +22 -26
- package/dist/components/ScrollArea/ScrollArea.js +10 -13
- package/dist/components/Select/Select.js +36 -43
- package/dist/components/Separator/Separator.js +1 -2
- package/dist/components/Sheet/Sheet.js +14 -23
- package/dist/components/Sidebar/Sidebar.js +90 -104
- package/dist/components/Skeleton/Skeleton.js +2 -2
- package/dist/components/Spin/Spin.js +22 -25
- package/dist/components/Switch/Switch.js +11 -12
- package/dist/components/Tag/Tag.js +4 -5
- package/dist/components/Tooltip/Tooltip.js +5 -8
- package/dist/components/Typography/Typography.js +5 -5
- package/dist/index.d.ts +15 -16
- package/package.json +1 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { Button } from '../Button/Button.js';
|
|
4
3
|
import { Popover, PopoverContent, PopoverTrigger } from '../Popover/Popover.js';
|
|
@@ -24,19 +23,17 @@ const Item = ({
|
|
|
24
23
|
}
|
|
25
24
|
onClick?.();
|
|
26
25
|
};
|
|
27
|
-
return /* @__PURE__ */
|
|
26
|
+
return /* @__PURE__ */ React.createElement(
|
|
28
27
|
"div",
|
|
29
28
|
{
|
|
30
29
|
onClick: handleClickItem,
|
|
31
30
|
className: cn(
|
|
32
31
|
"flex gap-4 items-center justify-center p-2 rounded-md hover:bg-grey-200/70 hover:cursor-pointer transition-all duration-300",
|
|
33
32
|
!!disabled && "opacity-50 hover:cursor-not-allowed"
|
|
34
|
-
)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
]
|
|
39
|
-
}
|
|
33
|
+
)
|
|
34
|
+
},
|
|
35
|
+
icon && /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-center [&>svg]:!w-5 [&>svg]:!h-5" }, icon),
|
|
36
|
+
description && /* @__PURE__ */ React.createElement("div", { className: "grow" }, /* @__PURE__ */ React.createElement("span", { className: "body-large-400" }, description))
|
|
40
37
|
);
|
|
41
38
|
};
|
|
42
39
|
const HelpMenu = ({
|
|
@@ -50,48 +47,40 @@ const HelpMenu = ({
|
|
|
50
47
|
if (!title && !items) {
|
|
51
48
|
return null;
|
|
52
49
|
}
|
|
53
|
-
const renderButtonTrigger = () => /* @__PURE__ */
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
{
|
|
81
|
-
|
|
82
|
-
align: "end",
|
|
83
|
-
className: "w-[200x] p-2",
|
|
84
|
-
sideOffset: 16,
|
|
85
|
-
onOpenAutoFocus: (e) => {
|
|
86
|
-
e.preventDefault();
|
|
87
|
-
},
|
|
88
|
-
children: [
|
|
89
|
-
title && /* @__PURE__ */ jsx("span", { className: "body-large-400 p-2 block", children: title }),
|
|
90
|
-
/* @__PURE__ */ jsx(ScrollArea, { style: { height: scrollAreaHeight }, children: items?.map((item, i) => /* @__PURE__ */ jsx(Item, { ...item }, i)) })
|
|
91
|
-
]
|
|
50
|
+
const renderButtonTrigger = () => /* @__PURE__ */ React.createElement(Tooltip, { delayDuration: 0 }, /* @__PURE__ */ React.createElement(TooltipTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(
|
|
51
|
+
Button,
|
|
52
|
+
{
|
|
53
|
+
size: "small",
|
|
54
|
+
iconButton: true,
|
|
55
|
+
customStyles,
|
|
56
|
+
className: "flex-shrink-0 max-md:hidden",
|
|
57
|
+
isActive: isOpen
|
|
58
|
+
},
|
|
59
|
+
/* @__PURE__ */ React.createElement(CircleHelp, null)
|
|
60
|
+
))), /* @__PURE__ */ React.createElement(TooltipPortal, null, /* @__PURE__ */ React.createElement(
|
|
61
|
+
TooltipContent,
|
|
62
|
+
{
|
|
63
|
+
color: "black",
|
|
64
|
+
align: "center",
|
|
65
|
+
side: "bottom",
|
|
66
|
+
hidden: isOpen
|
|
67
|
+
},
|
|
68
|
+
t("header.help")
|
|
69
|
+
)));
|
|
70
|
+
return /* @__PURE__ */ React.createElement(Popover, { open: isOpen, onOpenChange: setIsOpen }, renderButtonTrigger(), /* @__PURE__ */ React.createElement(
|
|
71
|
+
PopoverContent,
|
|
72
|
+
{
|
|
73
|
+
side: "bottom",
|
|
74
|
+
align: "end",
|
|
75
|
+
className: "w-[200x] p-2",
|
|
76
|
+
sideOffset: 16,
|
|
77
|
+
onOpenAutoFocus: (e) => {
|
|
78
|
+
e.preventDefault();
|
|
92
79
|
}
|
|
93
|
-
|
|
94
|
-
|
|
80
|
+
},
|
|
81
|
+
title && /* @__PURE__ */ React.createElement("span", { className: "body-large-400 p-2 block" }, title),
|
|
82
|
+
/* @__PURE__ */ React.createElement(ScrollArea, { style: { height: scrollAreaHeight } }, items?.map((item, i) => /* @__PURE__ */ React.createElement(Item, { key: i, ...item })))
|
|
83
|
+
));
|
|
95
84
|
};
|
|
96
85
|
HelpMenu.displayName = "HelpMenu";
|
|
97
86
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
1
|
import img from '../../public/imgs/logo-lecom.png.js';
|
|
3
2
|
|
|
4
3
|
const ImgBrand = ({ src }) => {
|
|
5
4
|
const DEFAULT_LOGO = img;
|
|
6
|
-
return /* @__PURE__ */
|
|
5
|
+
return /* @__PURE__ */ React.createElement(
|
|
7
6
|
"img",
|
|
8
7
|
{
|
|
9
8
|
loading: "lazy",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { Button } from '../Button/Button.js';
|
|
4
3
|
import '../CustomIcon/Icons/CadastroFacil.js';
|
|
@@ -22,7 +21,7 @@ const Icon = ({
|
|
|
22
21
|
return null;
|
|
23
22
|
}
|
|
24
23
|
const containerIconStyles = !containerIconBgColor ? { style: { backgroundColor: bgColor, color: textColor } } : {};
|
|
25
|
-
return /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ React.createElement(
|
|
26
25
|
"div",
|
|
27
26
|
{
|
|
28
27
|
className: cn(
|
|
@@ -30,9 +29,9 @@ const Icon = ({
|
|
|
30
29
|
containerIconBgColor,
|
|
31
30
|
containerIconBgColor && "text-white"
|
|
32
31
|
),
|
|
33
|
-
...containerIconStyles
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
...containerIconStyles
|
|
33
|
+
},
|
|
34
|
+
icon
|
|
36
35
|
);
|
|
37
36
|
};
|
|
38
37
|
const Item = ({
|
|
@@ -62,31 +61,26 @@ const Item = ({
|
|
|
62
61
|
}
|
|
63
62
|
return highlight;
|
|
64
63
|
};
|
|
65
|
-
return /* @__PURE__ */
|
|
64
|
+
return /* @__PURE__ */ React.createElement(
|
|
66
65
|
"div",
|
|
67
66
|
{
|
|
68
67
|
onClick: handleClickItem,
|
|
69
68
|
className: cn(
|
|
70
69
|
"flex gap-4 items-center p-2 rounded-md hover:bg-grey-200/70 hover:cursor-pointer transition-all duration-300",
|
|
71
70
|
!!disabled && "opacity-50 hover:cursor-not-allowed"
|
|
72
|
-
)
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
description && /* @__PURE__ */ jsx("span", { className: "body-medium-400 block", children: description })
|
|
86
|
-
] }),
|
|
87
|
-
renderHighlight()
|
|
88
|
-
]
|
|
89
|
-
}
|
|
71
|
+
)
|
|
72
|
+
},
|
|
73
|
+
/* @__PURE__ */ React.createElement(
|
|
74
|
+
Icon,
|
|
75
|
+
{
|
|
76
|
+
icon,
|
|
77
|
+
containerIconBgColor,
|
|
78
|
+
bgColor,
|
|
79
|
+
textColor
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
/* @__PURE__ */ React.createElement("div", { className: "grow" }, title && /* @__PURE__ */ React.createElement("span", { className: "body-large-500 block" }, title), description && /* @__PURE__ */ React.createElement("span", { className: "body-medium-400 block" }, description)),
|
|
83
|
+
renderHighlight()
|
|
90
84
|
);
|
|
91
85
|
};
|
|
92
86
|
const ModulesMenu = ({
|
|
@@ -100,47 +94,39 @@ const ModulesMenu = ({
|
|
|
100
94
|
if (!title && !items) {
|
|
101
95
|
return null;
|
|
102
96
|
}
|
|
103
|
-
const renderButtonTrigger = () => /* @__PURE__ */
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
97
|
+
const renderButtonTrigger = () => /* @__PURE__ */ React.createElement(Tooltip, { delayDuration: 0 }, /* @__PURE__ */ React.createElement(TooltipTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(
|
|
98
|
+
Button,
|
|
99
|
+
{
|
|
100
|
+
size: "small",
|
|
101
|
+
iconButton: true,
|
|
102
|
+
customStyles,
|
|
103
|
+
isActive: isOpen,
|
|
104
|
+
className: "flex-shrink-0"
|
|
105
|
+
},
|
|
106
|
+
/* @__PURE__ */ React.createElement(LogoLecom, null)
|
|
107
|
+
))), /* @__PURE__ */ React.createElement(TooltipPortal, null, /* @__PURE__ */ React.createElement(TooltipContent, { color: "black", align: "end", side: "bottom", hidden: isOpen }, t("header.modules"))));
|
|
108
|
+
return /* @__PURE__ */ React.createElement(Popover, { open: isOpen, onOpenChange: setIsOpen }, renderButtonTrigger(), /* @__PURE__ */ React.createElement(
|
|
109
|
+
PopoverContent,
|
|
110
|
+
{
|
|
111
|
+
side: "bottom",
|
|
112
|
+
align: "end",
|
|
113
|
+
className: "w-[424px] p-2 max-md:w-full",
|
|
114
|
+
sideOffset: 16,
|
|
115
|
+
onOpenAutoFocus: (e) => {
|
|
116
|
+
e.preventDefault();
|
|
113
117
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
renderButtonTrigger(),
|
|
119
|
-
/* @__PURE__ */ jsxs(
|
|
120
|
-
PopoverContent,
|
|
118
|
+
},
|
|
119
|
+
title && /* @__PURE__ */ React.createElement("span", { className: "body-large-400 p-2 block" }, title),
|
|
120
|
+
/* @__PURE__ */ React.createElement(ScrollArea, { style: { height: scrollAreaHeight } }, items?.map((item, i) => /* @__PURE__ */ React.createElement(
|
|
121
|
+
Item,
|
|
121
122
|
{
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
onOpenAutoFocus: (e) => {
|
|
127
|
-
e.preventDefault();
|
|
128
|
-
},
|
|
129
|
-
children: [
|
|
130
|
-
title && /* @__PURE__ */ jsx("span", { className: "body-large-400 p-2 block", children: title }),
|
|
131
|
-
/* @__PURE__ */ jsx(ScrollArea, { style: { height: scrollAreaHeight }, children: items?.map((item, i) => /* @__PURE__ */ jsx(
|
|
132
|
-
Item,
|
|
133
|
-
{
|
|
134
|
-
bgColor: customStyles.focus.textColor,
|
|
135
|
-
textColor: customStyles.normal.textColor,
|
|
136
|
-
...item
|
|
137
|
-
},
|
|
138
|
-
i
|
|
139
|
-
)) })
|
|
140
|
-
]
|
|
123
|
+
key: i,
|
|
124
|
+
bgColor: customStyles.focus.textColor,
|
|
125
|
+
textColor: customStyles.normal.textColor,
|
|
126
|
+
...item
|
|
141
127
|
}
|
|
142
|
-
)
|
|
143
|
-
|
|
128
|
+
)))
|
|
129
|
+
));
|
|
144
130
|
};
|
|
145
131
|
ModulesMenu.displayName = "ModulesMenu";
|
|
146
132
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { Button } from '../Button/Button.js';
|
|
3
3
|
import MessageSquare from '../../node_modules/lucide-react/dist/esm/icons/message-square.js';
|
|
4
4
|
|
|
@@ -9,16 +9,16 @@ const SocialMenu = ({
|
|
|
9
9
|
if (!onOpenSocialMenuChange) {
|
|
10
10
|
return null;
|
|
11
11
|
}
|
|
12
|
-
return /* @__PURE__ */
|
|
12
|
+
return /* @__PURE__ */ React.createElement(
|
|
13
13
|
Button,
|
|
14
14
|
{
|
|
15
15
|
size: "small",
|
|
16
16
|
iconButton: true,
|
|
17
17
|
customStyles,
|
|
18
18
|
onClick: onOpenSocialMenuChange,
|
|
19
|
-
className: "flex-shrink-0"
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
className: "flex-shrink-0"
|
|
20
|
+
},
|
|
21
|
+
/* @__PURE__ */ React.createElement(MessageSquare, null)
|
|
22
22
|
);
|
|
23
23
|
};
|
|
24
24
|
SocialMenu.displayName = "SocialMenu";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { Button } from '../Button/Button.js';
|
|
4
3
|
import { Popover, PopoverContent, PopoverTrigger } from '../Popover/Popover.js';
|
|
@@ -31,23 +30,15 @@ const UserMenu = ({
|
|
|
31
30
|
instance.changeLanguage(value);
|
|
32
31
|
language.select?.onChange?.(value);
|
|
33
32
|
};
|
|
34
|
-
return /* @__PURE__ */
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
language.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
onValueChange: handleValueChange,
|
|
44
|
-
children: [
|
|
45
|
-
/* @__PURE__ */ jsx(SelectTrigger, { className: "h-7", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
|
|
46
|
-
/* @__PURE__ */ jsx(SelectContent, { children: language.select?.options.map((option) => /* @__PURE__ */ jsx(SelectItem, { value: option.id, children: option.name }, option.id)) })
|
|
47
|
-
]
|
|
48
|
-
}
|
|
49
|
-
)
|
|
50
|
-
] });
|
|
33
|
+
return /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-4 p-2 rounded-md hover:bg-grey-200/70 hover:cursor-pointer transition-all duration-300" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-center gap-2 body-large-400 [&>svg]:!w-5 [&>svg]:!h-5" }, language.icon, language.label), /* @__PURE__ */ React.createElement(
|
|
34
|
+
Select,
|
|
35
|
+
{
|
|
36
|
+
value: language.select?.value,
|
|
37
|
+
onValueChange: handleValueChange
|
|
38
|
+
},
|
|
39
|
+
/* @__PURE__ */ React.createElement(SelectTrigger, { className: "h-7" }, /* @__PURE__ */ React.createElement(SelectValue, null)),
|
|
40
|
+
/* @__PURE__ */ React.createElement(SelectContent, null, language.select?.options.map((option) => /* @__PURE__ */ React.createElement(SelectItem, { key: option.id, value: option.id }, option.name)))
|
|
41
|
+
));
|
|
51
42
|
};
|
|
52
43
|
const renderLogout = () => {
|
|
53
44
|
if (!logout) {
|
|
@@ -56,68 +47,48 @@ const UserMenu = ({
|
|
|
56
47
|
if (logout.render) {
|
|
57
48
|
return logout.render;
|
|
58
49
|
}
|
|
59
|
-
return /* @__PURE__ */
|
|
50
|
+
return /* @__PURE__ */ React.createElement(
|
|
60
51
|
"div",
|
|
61
52
|
{
|
|
62
53
|
className: "flex items-center gap-2 body-large-400 p-2 rounded-md hover:bg-grey-200/70 hover:cursor-pointer transition-all duration-300 [&>svg]:!w-5 [&>svg]:!h-5",
|
|
63
|
-
onClick: logout.onClick
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
]
|
|
68
|
-
}
|
|
54
|
+
onClick: logout.onClick
|
|
55
|
+
},
|
|
56
|
+
logout.icon,
|
|
57
|
+
logout.label
|
|
69
58
|
);
|
|
70
59
|
};
|
|
71
|
-
const renderButtonTrigger = () => /* @__PURE__ */
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
{
|
|
98
|
-
|
|
99
|
-
align: "end",
|
|
100
|
-
className: "w-[274px] p-2",
|
|
101
|
-
sideOffset: 16,
|
|
102
|
-
onOpenAutoFocus: (e) => {
|
|
103
|
-
e.preventDefault();
|
|
104
|
-
},
|
|
105
|
-
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col justify-center", children: [
|
|
106
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 p-2", children: [
|
|
107
|
-
/* @__PURE__ */ jsx("div", { className: "bg-grey-400/30 rounded-full w-9 h-9 flex items-center justify-center [&>svg]:!w-6 [&>svg]:!h-6 shrink-0", children: /* @__PURE__ */ jsx(User, { className: "text-grey-600" }) }),
|
|
108
|
-
/* @__PURE__ */ jsxs("div", { className: "grow", children: [
|
|
109
|
-
/* @__PURE__ */ jsx("span", { className: "block body-large-400 break-words", children: user?.name }),
|
|
110
|
-
/* @__PURE__ */ jsx("span", { className: "block body-medium-400 break-all", children: user?.email })
|
|
111
|
-
] })
|
|
112
|
-
] }),
|
|
113
|
-
/* @__PURE__ */ jsx(ScrollArea, { style: { height: scrollAreaHeight }, children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col justify-center", children: [
|
|
114
|
-
renderLanguage(),
|
|
115
|
-
renderLogout()
|
|
116
|
-
] }) })
|
|
117
|
-
] })
|
|
60
|
+
const renderButtonTrigger = () => /* @__PURE__ */ React.createElement(Tooltip, { delayDuration: 0 }, /* @__PURE__ */ React.createElement(TooltipTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(PopoverTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(
|
|
61
|
+
Button,
|
|
62
|
+
{
|
|
63
|
+
size: "small",
|
|
64
|
+
iconButton: isMobile,
|
|
65
|
+
customStyles,
|
|
66
|
+
isActive: isOpen
|
|
67
|
+
},
|
|
68
|
+
isMobile ? /* @__PURE__ */ React.createElement(User, null) : user?.name
|
|
69
|
+
))), /* @__PURE__ */ React.createElement(TooltipPortal, null, /* @__PURE__ */ React.createElement(
|
|
70
|
+
TooltipContent,
|
|
71
|
+
{
|
|
72
|
+
color: "black",
|
|
73
|
+
align: "center",
|
|
74
|
+
side: "bottom",
|
|
75
|
+
hidden: isOpen
|
|
76
|
+
},
|
|
77
|
+
t("header.settings")
|
|
78
|
+
)));
|
|
79
|
+
return /* @__PURE__ */ React.createElement(Popover, { open: isOpen, onOpenChange: setIsOpen }, renderButtonTrigger(), /* @__PURE__ */ React.createElement(
|
|
80
|
+
PopoverContent,
|
|
81
|
+
{
|
|
82
|
+
side: "bottom",
|
|
83
|
+
align: "end",
|
|
84
|
+
className: "w-[274px] p-2",
|
|
85
|
+
sideOffset: 16,
|
|
86
|
+
onOpenAutoFocus: (e) => {
|
|
87
|
+
e.preventDefault();
|
|
118
88
|
}
|
|
119
|
-
|
|
120
|
-
|
|
89
|
+
},
|
|
90
|
+
/* @__PURE__ */ React.createElement("div", { className: "flex flex-col justify-center" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2 p-2" }, /* @__PURE__ */ React.createElement("div", { className: "bg-grey-400/30 rounded-full w-9 h-9 flex items-center justify-center [&>svg]:!w-6 [&>svg]:!h-6 shrink-0" }, /* @__PURE__ */ React.createElement(User, { className: "text-grey-600" })), /* @__PURE__ */ React.createElement("div", { className: "grow" }, /* @__PURE__ */ React.createElement("span", { className: "block body-large-400 break-words" }, user?.name), /* @__PURE__ */ React.createElement("span", { className: "block body-medium-400 break-all" }, user?.email))), /* @__PURE__ */ React.createElement(ScrollArea, { style: { height: scrollAreaHeight } }, /* @__PURE__ */ React.createElement("div", { className: "flex flex-col justify-center" }, renderLanguage(), renderLogout())))
|
|
91
|
+
));
|
|
121
92
|
};
|
|
122
93
|
UserMenu.displayName = "UserMenu";
|
|
123
94
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { cn } from '../../lib/utils.js';
|
|
4
3
|
import { cva } from '../../node_modules/class-variance-authority/dist/index.js';
|
|
@@ -72,15 +71,7 @@ const Input = React.forwardRef(
|
|
|
72
71
|
}
|
|
73
72
|
return sufix;
|
|
74
73
|
};
|
|
75
|
-
return /* @__PURE__ */
|
|
76
|
-
renderPrefix(),
|
|
77
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center relative", children: [
|
|
78
|
-
/* @__PURE__ */ jsx("div", { className: "shrink-0 absolute left-3", children: /* @__PURE__ */ jsx(Icon, { icon: iconBefore }) }),
|
|
79
|
-
/* @__PURE__ */ jsx("input", { type, className: inputStyles(), ref, ...props }),
|
|
80
|
-
/* @__PURE__ */ jsx("div", { className: "shrink-0 absolute right-3", children: /* @__PURE__ */ jsx(Icon, { icon: iconAfter }) })
|
|
81
|
-
] }),
|
|
82
|
-
renderSufix()
|
|
83
|
-
] });
|
|
74
|
+
return /* @__PURE__ */ React.createElement("div", { className: "flex justify-center" }, renderPrefix(), /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-center relative" }, /* @__PURE__ */ React.createElement("div", { className: "shrink-0 absolute left-3" }, /* @__PURE__ */ React.createElement(Icon, { icon: iconBefore })), /* @__PURE__ */ React.createElement("input", { type, className: inputStyles(), ref, ...props }), /* @__PURE__ */ React.createElement("div", { className: "shrink-0 absolute right-3" }, /* @__PURE__ */ React.createElement(Icon, { icon: iconAfter }))), renderSufix());
|
|
84
75
|
}
|
|
85
76
|
);
|
|
86
77
|
Input.displayName = "Input";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { initializeI18n } from '../../i18n/index.js';
|
|
4
3
|
import { getCookie } from '../../utils/cookie.js';
|
|
@@ -21,73 +20,48 @@ const Layout = ({ children, header, sideBar }) => {
|
|
|
21
20
|
const cookieState = getCookie("sidebar:state") === "true";
|
|
22
21
|
setSidebarState(cookieState);
|
|
23
22
|
}, []);
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
" - ",
|
|
67
|
-
info.cycle,
|
|
68
|
-
" ",
|
|
69
|
-
info.build
|
|
70
|
-
]
|
|
71
|
-
}
|
|
72
|
-
),
|
|
73
|
-
/* @__PURE__ */ jsxs(
|
|
74
|
-
Typography,
|
|
75
|
-
{
|
|
76
|
-
variant: "body-medium-400",
|
|
77
|
-
textColor: "text-grey-800",
|
|
78
|
-
className: "w-[200px]",
|
|
79
|
-
children: [
|
|
80
|
-
info.authorizedForText,
|
|
81
|
-
" ",
|
|
82
|
-
info.authorizedFor
|
|
83
|
-
]
|
|
84
|
-
}
|
|
85
|
-
)
|
|
86
|
-
] })
|
|
87
|
-
] }),
|
|
88
|
-
/* @__PURE__ */ jsx("main", { className: "grow w-full", children })
|
|
89
|
-
] })
|
|
90
|
-
] });
|
|
23
|
+
return /* @__PURE__ */ React.createElement(SidebarProvider, { className: "flex-col", defaultOpen: sidebarState }, /* @__PURE__ */ React.createElement(Header, { ...header }), /* @__PURE__ */ React.createElement("div", { className: "flex grow" }, /* @__PURE__ */ React.createElement(Sidebar, { collapsible: "icon", variant: "sidebar" }, /* @__PURE__ */ React.createElement(SidebarContent, null, /* @__PURE__ */ React.createElement(SidebarGroup, null, /* @__PURE__ */ React.createElement(SidebarGroupContent, null, /* @__PURE__ */ React.createElement(SidebarMenu, null, items.map((item) => /* @__PURE__ */ React.createElement(SidebarMenuItem, { key: item.title }, /* @__PURE__ */ React.createElement(
|
|
24
|
+
SidebarMenuButton,
|
|
25
|
+
{
|
|
26
|
+
asChild: true,
|
|
27
|
+
tooltip: item.title,
|
|
28
|
+
isActive: !!item.isActive
|
|
29
|
+
},
|
|
30
|
+
item.url ? /* @__PURE__ */ React.createElement("a", { href: item.url }, item.icon, /* @__PURE__ */ React.createElement("span", null, item.title)) : /* @__PURE__ */ React.createElement("div", { onClick: item.onClick }, item.icon, /* @__PURE__ */ React.createElement("span", null, item.title))
|
|
31
|
+
))))))), /* @__PURE__ */ React.createElement(SidebarFooter, { className: "p-6 pt-0 gap-1" }, /* @__PURE__ */ React.createElement(
|
|
32
|
+
Typography,
|
|
33
|
+
{
|
|
34
|
+
variant: "heading-xsmall-600",
|
|
35
|
+
textColor: "text-grey-800",
|
|
36
|
+
className: "flex items-center gap-2 w-[200px]"
|
|
37
|
+
},
|
|
38
|
+
info.platformText,
|
|
39
|
+
/* @__PURE__ */ React.createElement(LogoLecomBrand, { className: "w-16 shrink-0" })
|
|
40
|
+
), /* @__PURE__ */ React.createElement(
|
|
41
|
+
Typography,
|
|
42
|
+
{
|
|
43
|
+
variant: "body-medium-400",
|
|
44
|
+
textColor: "text-grey-800",
|
|
45
|
+
className: "w-[200px]"
|
|
46
|
+
},
|
|
47
|
+
info.versionText,
|
|
48
|
+
" ",
|
|
49
|
+
info.version,
|
|
50
|
+
" - ",
|
|
51
|
+
info.cycle,
|
|
52
|
+
" ",
|
|
53
|
+
info.build
|
|
54
|
+
), /* @__PURE__ */ React.createElement(
|
|
55
|
+
Typography,
|
|
56
|
+
{
|
|
57
|
+
variant: "body-medium-400",
|
|
58
|
+
textColor: "text-grey-800",
|
|
59
|
+
className: "w-[200px]"
|
|
60
|
+
},
|
|
61
|
+
info.authorizedForText,
|
|
62
|
+
" ",
|
|
63
|
+
info.authorizedFor
|
|
64
|
+
))), /* @__PURE__ */ React.createElement("main", { className: "grow w-full" }, children)));
|
|
91
65
|
};
|
|
92
66
|
Layout.displayName = "Layout";
|
|
93
67
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { cn } from '../../lib/utils.js';
|
|
4
3
|
import { cva } from '../../node_modules/class-variance-authority/dist/index.js';
|
|
@@ -38,11 +37,11 @@ const posistionMap = {
|
|
|
38
37
|
const renderNotification = (props) => {
|
|
39
38
|
switch (props.type) {
|
|
40
39
|
case "toast":
|
|
41
|
-
return /* @__PURE__ */
|
|
40
|
+
return /* @__PURE__ */ React.createElement(MemoizedNotificationToast, { ...props });
|
|
42
41
|
case "inline":
|
|
43
|
-
return /* @__PURE__ */
|
|
42
|
+
return /* @__PURE__ */ React.createElement(NotificationInline, { ...props });
|
|
44
43
|
case "callout":
|
|
45
|
-
return /* @__PURE__ */
|
|
44
|
+
return /* @__PURE__ */ React.createElement(NotificationCallout, { ...props });
|
|
46
45
|
default:
|
|
47
46
|
return null;
|
|
48
47
|
}
|
|
@@ -59,7 +58,7 @@ const Notification = React.forwardRef(
|
|
|
59
58
|
const { fullWidth } = props;
|
|
60
59
|
const widthStyle = fullWidth ? "w-full" : "inline-block";
|
|
61
60
|
const positionClass = getPositionClass(type, placement);
|
|
62
|
-
return /* @__PURE__ */
|
|
61
|
+
return /* @__PURE__ */ React.createElement(
|
|
63
62
|
"main",
|
|
64
63
|
{
|
|
65
64
|
className: cn(
|
|
@@ -67,9 +66,9 @@ const Notification = React.forwardRef(
|
|
|
67
66
|
type === "toast" && "fixed z-50 p-4 space-y-2",
|
|
68
67
|
positionClass
|
|
69
68
|
),
|
|
70
|
-
ref
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
ref
|
|
70
|
+
},
|
|
71
|
+
renderNotification(props)
|
|
73
72
|
);
|
|
74
73
|
}
|
|
75
74
|
);
|