lecom-ui 4.3.5 → 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/dist/plugin/pluginNext.cjs +5 -0
- package/dist/plugin/pluginVite.cjs +5 -0
- package/package.json +1 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { useReactTable, flexRender } from '../../node_modules/@tanstack/react-table/build/lib/index.js';
|
|
4
3
|
import { Pagination } from '../Pagination/Pagination.js';
|
|
@@ -36,7 +35,7 @@ function DataTable({
|
|
|
36
35
|
if (!pagination) {
|
|
37
36
|
return null;
|
|
38
37
|
}
|
|
39
|
-
return /* @__PURE__ */
|
|
38
|
+
return /* @__PURE__ */ React.createElement(Pagination, { ...pagination });
|
|
40
39
|
};
|
|
41
40
|
const styleColumn = (meta, elem) => {
|
|
42
41
|
if (elem === "td" && meta.truncate) {
|
|
@@ -107,87 +106,78 @@ function DataTable({
|
|
|
107
106
|
document.querySelector("[data-radix-scroll-area-viewport]")?.addEventListener("scroll", onScroll);
|
|
108
107
|
return () => document.querySelector("[data-radix-scroll-area-viewport]")?.removeEventListener("scroll", onScroll);
|
|
109
108
|
}, []);
|
|
110
|
-
return /* @__PURE__ */
|
|
111
|
-
|
|
109
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
110
|
+
"div",
|
|
111
|
+
{
|
|
112
|
+
className: "bg-white rounded-[8px] p-2 transition-all duration-500",
|
|
113
|
+
style: { width: styleDataTableContainer().width }
|
|
114
|
+
},
|
|
115
|
+
/* @__PURE__ */ React.createElement(ScrollArea, { type: "always", className: "p-2" }, /* @__PURE__ */ React.createElement(
|
|
112
116
|
"div",
|
|
113
117
|
{
|
|
114
|
-
className: "
|
|
115
|
-
style: {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
{
|
|
132
|
-
className: "h-12 px-4 [&:has([role=checkbox])]:pr-0 bg-white shadow-[0_-1.5px_0px_0px_#c9c9c9_inset] text-left",
|
|
133
|
-
"data-header": header.id,
|
|
134
|
-
"data-fixed": getFixed(
|
|
135
|
-
header.column.columnDef.meta
|
|
136
|
-
),
|
|
137
|
-
style: styleColumn(
|
|
138
|
-
header.column.columnDef.meta,
|
|
139
|
-
"th"
|
|
140
|
-
),
|
|
141
|
-
children: header.isPlaceholder ? null : flexRender(
|
|
142
|
-
header.column.columnDef.header,
|
|
143
|
-
header.getContext()
|
|
144
|
-
)
|
|
145
|
-
},
|
|
146
|
-
header.id
|
|
147
|
-
)) }, headerGroup.id)) }),
|
|
148
|
-
/* @__PURE__ */ jsx("tbody", { className: "[&_tr:last-child]:border-0 [&_tr:last-child_td]:shadow-none", children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx(
|
|
149
|
-
"tr",
|
|
150
|
-
{
|
|
151
|
-
"data-state": onIsSelected?.(row) ? "selected" : "",
|
|
152
|
-
className: "[&_td]:hover:bg-grey-100 [&_td]:data-[state=selected]:bg-grey-100",
|
|
153
|
-
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx(
|
|
154
|
-
"td",
|
|
155
|
-
{
|
|
156
|
-
className: "p-4 py-0 h-10 [&:has([role=checkbox])]:pr-0 transition-colors bg-white shadow-[0_-0.5px_0px_0px_#c9c9c9_inset] text-left",
|
|
157
|
-
"data-column": cell.column.id,
|
|
158
|
-
"data-fixed": getFixed(
|
|
159
|
-
cell.column.columnDef.meta
|
|
160
|
-
),
|
|
161
|
-
style: styleColumn(
|
|
162
|
-
cell.column.columnDef.meta,
|
|
163
|
-
"td"
|
|
164
|
-
),
|
|
165
|
-
children: flexRender(
|
|
166
|
-
cell.column.columnDef.cell,
|
|
167
|
-
cell.getContext()
|
|
168
|
-
)
|
|
169
|
-
},
|
|
170
|
-
cell.id
|
|
171
|
-
))
|
|
172
|
-
},
|
|
173
|
-
row.id
|
|
174
|
-
)) : /* @__PURE__ */ jsx("tr", { className: "border-b-[0.5px] [&_td]:hover:bg-grey-100 [&_td]:data-[state=selected]:bg-grey-100", children: /* @__PURE__ */ jsx(
|
|
175
|
-
"td",
|
|
176
|
-
{
|
|
177
|
-
colSpan: columns.length,
|
|
178
|
-
className: "p-4 py-0 h-10 align-middle [&:has([role=checkbox])]:pr-0 transition-colors bg-white",
|
|
179
|
-
children: noResults ?? /* @__PURE__ */ jsx("div", { className: "text-center", children: "-" })
|
|
180
|
-
}
|
|
181
|
-
) }) })
|
|
182
|
-
] })
|
|
183
|
-
}
|
|
118
|
+
className: "transition-all duration-500",
|
|
119
|
+
style: { maxHeight: styleDataTableContainer().height }
|
|
120
|
+
},
|
|
121
|
+
isLoading ? /* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-4" }, arrSkeleton.map((id) => /* @__PURE__ */ React.createElement(
|
|
122
|
+
Skeleton,
|
|
123
|
+
{
|
|
124
|
+
key: id,
|
|
125
|
+
className: "w-full h-[25px] rounded-lg bg-grey-200"
|
|
126
|
+
}
|
|
127
|
+
))) : /* @__PURE__ */ React.createElement("table", { id: "data-table", className: "w-full" }, /* @__PURE__ */ React.createElement("thead", { className: "sticky top-0 z-10" }, table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ React.createElement("tr", { key: headerGroup.id }, headerGroup.headers.map((header) => /* @__PURE__ */ React.createElement(
|
|
128
|
+
"th",
|
|
129
|
+
{
|
|
130
|
+
key: header.id,
|
|
131
|
+
className: "h-12 px-4 [&:has([role=checkbox])]:pr-0 bg-white shadow-[0_-1.5px_0px_0px_#c9c9c9_inset] text-left",
|
|
132
|
+
"data-header": header.id,
|
|
133
|
+
"data-fixed": getFixed(
|
|
134
|
+
header.column.columnDef.meta
|
|
184
135
|
),
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
136
|
+
style: styleColumn(
|
|
137
|
+
header.column.columnDef.meta,
|
|
138
|
+
"th"
|
|
139
|
+
)
|
|
140
|
+
},
|
|
141
|
+
header.isPlaceholder ? null : flexRender(
|
|
142
|
+
header.column.columnDef.header,
|
|
143
|
+
header.getContext()
|
|
144
|
+
)
|
|
145
|
+
))))), /* @__PURE__ */ React.createElement("tbody", { className: "[&_tr:last-child]:border-0 [&_tr:last-child_td]:shadow-none" }, table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ React.createElement(
|
|
146
|
+
"tr",
|
|
147
|
+
{
|
|
148
|
+
key: row.id,
|
|
149
|
+
"data-state": onIsSelected?.(row) ? "selected" : "",
|
|
150
|
+
className: "[&_td]:hover:bg-grey-100 [&_td]:data-[state=selected]:bg-grey-100"
|
|
151
|
+
},
|
|
152
|
+
row.getVisibleCells().map((cell) => /* @__PURE__ */ React.createElement(
|
|
153
|
+
"td",
|
|
154
|
+
{
|
|
155
|
+
key: cell.id,
|
|
156
|
+
className: "p-4 py-0 h-10 [&:has([role=checkbox])]:pr-0 transition-colors bg-white shadow-[0_-0.5px_0px_0px_#c9c9c9_inset] text-left",
|
|
157
|
+
"data-column": cell.column.id,
|
|
158
|
+
"data-fixed": getFixed(
|
|
159
|
+
cell.column.columnDef.meta
|
|
160
|
+
),
|
|
161
|
+
style: styleColumn(
|
|
162
|
+
cell.column.columnDef.meta,
|
|
163
|
+
"td"
|
|
164
|
+
)
|
|
165
|
+
},
|
|
166
|
+
flexRender(
|
|
167
|
+
cell.column.columnDef.cell,
|
|
168
|
+
cell.getContext()
|
|
169
|
+
)
|
|
170
|
+
))
|
|
171
|
+
)) : /* @__PURE__ */ React.createElement("tr", { className: "border-b-[0.5px] [&_td]:hover:bg-grey-100 [&_td]:data-[state=selected]:bg-grey-100" }, /* @__PURE__ */ React.createElement(
|
|
172
|
+
"td",
|
|
173
|
+
{
|
|
174
|
+
colSpan: columns.length,
|
|
175
|
+
className: "p-4 py-0 h-10 align-middle [&:has([role=checkbox])]:pr-0 transition-colors bg-white"
|
|
176
|
+
},
|
|
177
|
+
noResults ?? /* @__PURE__ */ React.createElement("div", { className: "text-center" }, "-")
|
|
178
|
+
))))
|
|
179
|
+
), /* @__PURE__ */ React.createElement(ScrollBar, { orientation: "horizontal" }))
|
|
180
|
+
), hasPagination());
|
|
191
181
|
}
|
|
192
182
|
DataTable.displayName = "DataTable";
|
|
193
183
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { clsx } from '../../node_modules/clsx/dist/clsx.js';
|
|
3
3
|
import { Checkbox } from '../Checkbox/Checkbox.js';
|
|
4
4
|
import { Typography } from '../Typography/Typography.js';
|
|
@@ -10,7 +10,7 @@ function buildHeaderSelect({
|
|
|
10
10
|
checkedHeader,
|
|
11
11
|
onCheckedHeaderChange
|
|
12
12
|
}) {
|
|
13
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ React.createElement(
|
|
14
14
|
Checkbox,
|
|
15
15
|
{
|
|
16
16
|
checked: !!checkedHeader?.({ table, column }),
|
|
@@ -23,7 +23,7 @@ function buildCellSelect({
|
|
|
23
23
|
checkedCell,
|
|
24
24
|
onCheckedCellChange
|
|
25
25
|
}) {
|
|
26
|
-
return /* @__PURE__ */
|
|
26
|
+
return /* @__PURE__ */ React.createElement(
|
|
27
27
|
Checkbox,
|
|
28
28
|
{
|
|
29
29
|
checked: !!checkedCell?.({ row }),
|
|
@@ -50,25 +50,23 @@ function buildColumns({
|
|
|
50
50
|
}
|
|
51
51
|
const hasSort = !!externalColumn.onSort;
|
|
52
52
|
const title = typeof externalColumn.title === "function" ? externalColumn.title({ table, column }) : externalColumn.title;
|
|
53
|
-
return /* @__PURE__ */
|
|
53
|
+
return /* @__PURE__ */ React.createElement(
|
|
54
54
|
"div",
|
|
55
55
|
{
|
|
56
56
|
className: clsx(
|
|
57
57
|
"group flex items-center gap-1",
|
|
58
58
|
hasSort && "hover:cursor-pointer"
|
|
59
59
|
),
|
|
60
|
-
onClick: () => externalColumn.onSort?.({ table, column })
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
]
|
|
71
|
-
}
|
|
60
|
+
onClick: () => externalColumn.onSort?.({ table, column })
|
|
61
|
+
},
|
|
62
|
+
typeof externalColumn.title === "string" ? /* @__PURE__ */ React.createElement(Typography, { variant: "body-large-500", textColor: "text-grey-950" }, externalColumn.title) : title,
|
|
63
|
+
hasSort && /* @__PURE__ */ React.createElement(
|
|
64
|
+
ArrowUpDown,
|
|
65
|
+
{
|
|
66
|
+
size: 16,
|
|
67
|
+
className: "text-grey-400 group-hover:text-grey-950"
|
|
68
|
+
}
|
|
69
|
+
)
|
|
72
70
|
);
|
|
73
71
|
},
|
|
74
72
|
cell: ({ row }) => {
|
|
@@ -88,7 +86,7 @@ function buildColumns({
|
|
|
88
86
|
}
|
|
89
87
|
return externalColumn.render;
|
|
90
88
|
}
|
|
91
|
-
return /* @__PURE__ */
|
|
89
|
+
return /* @__PURE__ */ React.createElement(Typography, { variant: "body-large-400", textColor: "text-grey-800" }, row.getValue(externalColumn.key));
|
|
92
90
|
},
|
|
93
91
|
meta: {
|
|
94
92
|
width: externalColumn.width,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { cn } from '../../lib/utils.js';
|
|
4
3
|
import { Overlay, Portal, Content, Close, Title, Description, Root, Trigger } from '../../node_modules/@radix-ui/react-dialog/dist/index.js';
|
|
@@ -8,7 +7,7 @@ const Dialog = Root;
|
|
|
8
7
|
const DialogTrigger = Trigger;
|
|
9
8
|
const DialogPortal = Portal;
|
|
10
9
|
const DialogClose = Close;
|
|
11
|
-
const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
10
|
+
const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
12
11
|
Overlay,
|
|
13
12
|
{
|
|
14
13
|
ref,
|
|
@@ -20,32 +19,24 @@ const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
20
19
|
}
|
|
21
20
|
));
|
|
22
21
|
DialogOverlay.displayName = Overlay.displayName;
|
|
23
|
-
const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
className
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
/* @__PURE__ */ jsxs(Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
37
|
-
/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
|
|
38
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
39
|
-
] })
|
|
40
|
-
]
|
|
41
|
-
}
|
|
42
|
-
)
|
|
43
|
-
] }));
|
|
22
|
+
const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React.createElement(DialogPortal, null, /* @__PURE__ */ React.createElement(DialogOverlay, null), /* @__PURE__ */ React.createElement(
|
|
23
|
+
Content,
|
|
24
|
+
{
|
|
25
|
+
ref,
|
|
26
|
+
className: cn(
|
|
27
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
28
|
+
className
|
|
29
|
+
),
|
|
30
|
+
...props
|
|
31
|
+
},
|
|
32
|
+
children,
|
|
33
|
+
/* @__PURE__ */ React.createElement(Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground" }, /* @__PURE__ */ React.createElement(X, { className: "h-4 w-4" }), /* @__PURE__ */ React.createElement("span", { className: "sr-only" }, "Close"))
|
|
34
|
+
)));
|
|
44
35
|
DialogContent.displayName = Content.displayName;
|
|
45
36
|
const DialogHeader = ({
|
|
46
37
|
className,
|
|
47
38
|
...props
|
|
48
|
-
}) => /* @__PURE__ */
|
|
39
|
+
}) => /* @__PURE__ */ React.createElement(
|
|
49
40
|
"div",
|
|
50
41
|
{
|
|
51
42
|
className: cn(
|
|
@@ -59,7 +50,7 @@ DialogHeader.displayName = "DialogHeader";
|
|
|
59
50
|
const DialogFooter = ({
|
|
60
51
|
className,
|
|
61
52
|
...props
|
|
62
|
-
}) => /* @__PURE__ */
|
|
53
|
+
}) => /* @__PURE__ */ React.createElement(
|
|
63
54
|
"div",
|
|
64
55
|
{
|
|
65
56
|
className: cn(
|
|
@@ -70,7 +61,7 @@ const DialogFooter = ({
|
|
|
70
61
|
}
|
|
71
62
|
);
|
|
72
63
|
DialogFooter.displayName = "DialogFooter";
|
|
73
|
-
const DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
64
|
+
const DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
74
65
|
Title,
|
|
75
66
|
{
|
|
76
67
|
ref,
|
|
@@ -82,7 +73,7 @@ const DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
82
73
|
}
|
|
83
74
|
));
|
|
84
75
|
DialogTitle.displayName = Title.displayName;
|
|
85
|
-
const DialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
76
|
+
const DialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
86
77
|
Description,
|
|
87
78
|
{
|
|
88
79
|
ref,
|
|
@@ -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 { SubTrigger as SubTrigger2, SubContent as SubContent2, Portal as Portal2, Content as Content2, Item as Item2, CheckboxItem as CheckboxItem2, ItemIndicator as ItemIndicator2, RadioItem as RadioItem2, Label as Label2, Separator as Separator2, Root as Root2, Trigger, Group as Group2, Sub as Sub2, RadioGroup as RadioGroup2 } from '../../node_modules/@radix-ui/react-dropdown-menu/dist/index.js';
|
|
@@ -12,7 +11,7 @@ const DropdownMenuGroup = Group2;
|
|
|
12
11
|
const DropdownMenuPortal = Portal2;
|
|
13
12
|
const DropdownMenuSub = Sub2;
|
|
14
13
|
const DropdownMenuRadioGroup = RadioGroup2;
|
|
15
|
-
const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */
|
|
14
|
+
const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
16
15
|
SubTrigger2,
|
|
17
16
|
{
|
|
18
17
|
ref,
|
|
@@ -21,15 +20,13 @@ const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, .
|
|
|
21
20
|
inset && "pl-8",
|
|
22
21
|
className
|
|
23
22
|
),
|
|
24
|
-
...props
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
]
|
|
29
|
-
}
|
|
23
|
+
...props
|
|
24
|
+
},
|
|
25
|
+
children,
|
|
26
|
+
/* @__PURE__ */ React.createElement(ChevronRight, { className: "ml-auto" })
|
|
30
27
|
));
|
|
31
28
|
DropdownMenuSubTrigger.displayName = SubTrigger2.displayName;
|
|
32
|
-
const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
29
|
+
const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
33
30
|
SubContent2,
|
|
34
31
|
{
|
|
35
32
|
ref,
|
|
@@ -41,7 +38,7 @@ const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) =
|
|
|
41
38
|
}
|
|
42
39
|
));
|
|
43
40
|
DropdownMenuSubContent.displayName = SubContent2.displayName;
|
|
44
|
-
const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */
|
|
41
|
+
const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React.createElement(Portal2, null, /* @__PURE__ */ React.createElement(
|
|
45
42
|
Content2,
|
|
46
43
|
{
|
|
47
44
|
ref,
|
|
@@ -52,9 +49,9 @@ const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...pr
|
|
|
52
49
|
),
|
|
53
50
|
...props
|
|
54
51
|
}
|
|
55
|
-
)
|
|
52
|
+
)));
|
|
56
53
|
DropdownMenuContent.displayName = Content2.displayName;
|
|
57
|
-
const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */
|
|
54
|
+
const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
58
55
|
Item2,
|
|
59
56
|
{
|
|
60
57
|
ref,
|
|
@@ -67,7 +64,7 @@ const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref)
|
|
|
67
64
|
}
|
|
68
65
|
));
|
|
69
66
|
DropdownMenuItem.displayName = Item2.displayName;
|
|
70
|
-
const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */
|
|
67
|
+
const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
71
68
|
CheckboxItem2,
|
|
72
69
|
{
|
|
73
70
|
ref,
|
|
@@ -76,15 +73,13 @@ const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checke
|
|
|
76
73
|
className
|
|
77
74
|
),
|
|
78
75
|
checked,
|
|
79
|
-
...props
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
]
|
|
84
|
-
}
|
|
76
|
+
...props
|
|
77
|
+
},
|
|
78
|
+
/* @__PURE__ */ React.createElement("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" }, /* @__PURE__ */ React.createElement(ItemIndicator2, null, /* @__PURE__ */ React.createElement(Check, { className: "h-4 w-4" }))),
|
|
79
|
+
children
|
|
85
80
|
));
|
|
86
81
|
DropdownMenuCheckboxItem.displayName = CheckboxItem2.displayName;
|
|
87
|
-
const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
82
|
+
const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
88
83
|
RadioItem2,
|
|
89
84
|
{
|
|
90
85
|
ref,
|
|
@@ -92,15 +87,13 @@ const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props
|
|
|
92
87
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
93
88
|
className
|
|
94
89
|
),
|
|
95
|
-
...props
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
]
|
|
100
|
-
}
|
|
90
|
+
...props
|
|
91
|
+
},
|
|
92
|
+
/* @__PURE__ */ React.createElement("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" }, /* @__PURE__ */ React.createElement(ItemIndicator2, null, /* @__PURE__ */ React.createElement(Circle, { className: "h-2 w-2 fill-current" }))),
|
|
93
|
+
children
|
|
101
94
|
));
|
|
102
95
|
DropdownMenuRadioItem.displayName = RadioItem2.displayName;
|
|
103
|
-
const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */
|
|
96
|
+
const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
104
97
|
Label2,
|
|
105
98
|
{
|
|
106
99
|
ref,
|
|
@@ -113,7 +106,7 @@ const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref)
|
|
|
113
106
|
}
|
|
114
107
|
));
|
|
115
108
|
DropdownMenuLabel.displayName = Label2.displayName;
|
|
116
|
-
const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
109
|
+
const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
117
110
|
Separator2,
|
|
118
111
|
{
|
|
119
112
|
ref,
|
|
@@ -125,7 +118,7 @@ DropdownMenuSeparator.displayName = Separator2.displayName;
|
|
|
125
118
|
const DropdownMenuShortcut = ({
|
|
126
119
|
className,
|
|
127
120
|
...props
|
|
128
|
-
}) => /* @__PURE__ */
|
|
121
|
+
}) => /* @__PURE__ */ React.createElement(
|
|
129
122
|
"span",
|
|
130
123
|
{
|
|
131
124
|
className: cn("ml-auto text-xs tracking-widest opacity-60", className),
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsxs } from 'react/jsx-runtime';
|
|
2
1
|
import { cn } from '../../lib/utils.js';
|
|
3
2
|
|
|
4
3
|
const ErrorEmptyDisplay = ({
|
|
@@ -13,7 +12,7 @@ const ErrorEmptyDisplay = ({
|
|
|
13
12
|
if (render) {
|
|
14
13
|
return render;
|
|
15
14
|
}
|
|
16
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ React.createElement(
|
|
17
16
|
"div",
|
|
18
17
|
{
|
|
19
18
|
id: "error-empty-display",
|
|
@@ -21,25 +20,21 @@ const ErrorEmptyDisplay = ({
|
|
|
21
20
|
className: cn(
|
|
22
21
|
"flex flex-col justify-center items-center space-y-8 p-6",
|
|
23
22
|
className
|
|
24
|
-
)
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
),
|
|
34
|
-
children: [
|
|
35
|
-
title,
|
|
36
|
-
description,
|
|
37
|
-
footer
|
|
38
|
-
]
|
|
39
|
-
}
|
|
23
|
+
)
|
|
24
|
+
},
|
|
25
|
+
image,
|
|
26
|
+
/* @__PURE__ */ React.createElement(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
className: cn(
|
|
30
|
+
"flex flex-col items-center justify-center space-y-2",
|
|
31
|
+
classContent
|
|
40
32
|
)
|
|
41
|
-
|
|
42
|
-
|
|
33
|
+
},
|
|
34
|
+
title,
|
|
35
|
+
description,
|
|
36
|
+
footer
|
|
37
|
+
)
|
|
43
38
|
);
|
|
44
39
|
};
|
|
45
40
|
ErrorEmptyDisplay.displayName = "ErrorEmptyDisplay";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { Typography } from '../Typography/Typography.js';
|
|
3
3
|
import { cn } from '../../lib/utils.js';
|
|
4
4
|
import { cva } from '../../node_modules/class-variance-authority/dist/index.js';
|
|
@@ -54,55 +54,39 @@ const Header = ({
|
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
56
|
};
|
|
57
|
-
return /* @__PURE__ */
|
|
57
|
+
return /* @__PURE__ */ React.createElement(
|
|
58
58
|
"header",
|
|
59
59
|
{
|
|
60
60
|
className: cn(headerVariants({ className }), ""),
|
|
61
61
|
style: { backgroundColor: customStyles.bgColor },
|
|
62
|
-
...props
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
borderColor: customStyles.textColor
|
|
91
|
-
},
|
|
92
|
-
children: module
|
|
93
|
-
}
|
|
94
|
-
)
|
|
95
|
-
] }),
|
|
96
|
-
/* @__PURE__ */ jsx("div", { className: "max-md:hidden", children: extraContent && extraContent })
|
|
97
|
-
] }),
|
|
98
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
|
|
99
|
-
/* @__PURE__ */ jsx(SocialMenu, { customStyles: getCustomStyles(), ...socialMenu }),
|
|
100
|
-
/* @__PURE__ */ jsx(UserMenu, { customStyles: getCustomStyles(), ...userMenu }),
|
|
101
|
-
/* @__PURE__ */ jsx(HelpMenu, { customStyles: getCustomStyles(), ...helpMenu }),
|
|
102
|
-
/* @__PURE__ */ jsx(ModulesMenu, { customStyles: getCustomStyles(), ...modulesMenu })
|
|
103
|
-
] })
|
|
104
|
-
]
|
|
105
|
-
}
|
|
62
|
+
...props
|
|
63
|
+
},
|
|
64
|
+
/* @__PURE__ */ React.createElement(Tooltip, { delayDuration: 0 }, /* @__PURE__ */ React.createElement(TooltipTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(
|
|
65
|
+
Menu,
|
|
66
|
+
{
|
|
67
|
+
className: "text-white transition-all duration-300 hover:cursor-pointer hover:opacity-70 shrink-0",
|
|
68
|
+
size: 32,
|
|
69
|
+
onClick: () => {
|
|
70
|
+
onOpenMenuChange?.();
|
|
71
|
+
toggleSidebar();
|
|
72
|
+
},
|
|
73
|
+
style: { color: customStyles.textColor }
|
|
74
|
+
}
|
|
75
|
+
)), /* @__PURE__ */ React.createElement(TooltipContent, { color: "black", align: "start", side: "bottom" }, open ? t("header.collapseMenu") : t("header.expandMenu"))),
|
|
76
|
+
/* @__PURE__ */ React.createElement("div", { className: "flex items-center grow gap-24" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-12" }, /* @__PURE__ */ React.createElement(ImgBrand, { src: customImgSrc }), module && /* @__PURE__ */ React.createElement(
|
|
77
|
+
Typography,
|
|
78
|
+
{
|
|
79
|
+
variant: "heading-medium-600",
|
|
80
|
+
textColor: "text-white",
|
|
81
|
+
className: "border-l-2 border-white pl-2 max-md:hidden",
|
|
82
|
+
style: {
|
|
83
|
+
color: customStyles.textColor,
|
|
84
|
+
borderColor: customStyles.textColor
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
module
|
|
88
|
+
)), /* @__PURE__ */ React.createElement("div", { className: "max-md:hidden" }, extraContent && extraContent)),
|
|
89
|
+
/* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React.createElement(SocialMenu, { customStyles: getCustomStyles(), ...socialMenu }), /* @__PURE__ */ React.createElement(UserMenu, { customStyles: getCustomStyles(), ...userMenu }), /* @__PURE__ */ React.createElement(HelpMenu, { customStyles: getCustomStyles(), ...helpMenu }), /* @__PURE__ */ React.createElement(ModulesMenu, { customStyles: getCustomStyles(), ...modulesMenu }))
|
|
106
90
|
);
|
|
107
91
|
};
|
|
108
92
|
Header.displayName = "Header";
|