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,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { cn } from '../../lib/utils.js';
|
|
3
3
|
import { notificationVariants } from './Notification.js';
|
|
4
4
|
|
|
@@ -9,16 +9,16 @@ const NotificationBase = ({
|
|
|
9
9
|
children,
|
|
10
10
|
className,
|
|
11
11
|
dataTestId
|
|
12
|
-
}) => /* @__PURE__ */
|
|
12
|
+
}) => /* @__PURE__ */ React.createElement(
|
|
13
13
|
"div",
|
|
14
14
|
{
|
|
15
15
|
className: cn(notificationVariants({ variant }), className),
|
|
16
16
|
onMouseEnter,
|
|
17
17
|
onMouseLeave,
|
|
18
18
|
"data-testid": dataTestId,
|
|
19
|
-
"aria-hidden": "true"
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
"aria-hidden": "true"
|
|
20
|
+
},
|
|
21
|
+
children
|
|
22
22
|
);
|
|
23
23
|
|
|
24
24
|
export { NotificationBase };
|
|
@@ -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 { NotificationBase } from './NotificationBase.js';
|
|
@@ -48,42 +47,37 @@ const NotificationCallout = ({ ...props }) => {
|
|
|
48
47
|
if (isCollapsed && props.title) return "max-h-0 overflow-hidden";
|
|
49
48
|
return "no-collapse";
|
|
50
49
|
};
|
|
51
|
-
return /* @__PURE__ */
|
|
50
|
+
return /* @__PURE__ */ React.createElement(
|
|
52
51
|
NotificationBase,
|
|
53
52
|
{
|
|
54
53
|
variant: defaultVariant,
|
|
55
54
|
className: cn(getGridColumns(), isCollapsed && "place-items-center"),
|
|
56
|
-
dataTestId: "notification-callout"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
isCollapsed && getCollapseClass()
|
|
69
|
-
)
|
|
70
|
-
}
|
|
71
|
-
),
|
|
72
|
-
props.action
|
|
73
|
-
] }),
|
|
74
|
-
/* @__PURE__ */ jsx(
|
|
75
|
-
ChevronUp,
|
|
76
|
-
{
|
|
77
|
-
"data-testid": "collapse-icon",
|
|
78
|
-
onClick: handleCollapse,
|
|
79
|
-
ref: refCollapse,
|
|
80
|
-
className: cn(
|
|
81
|
-
shouldCollapse ? "opacity-100 size-5 text-grey-800 transition-transform duration-200 cursor-pointer hover:text-foreground group-hover:opacity-100" : "opacity-0 pointer-events-none h-0 w-0 absolute"
|
|
82
|
-
)
|
|
83
|
-
}
|
|
55
|
+
dataTestId: "notification-callout"
|
|
56
|
+
},
|
|
57
|
+
/* @__PURE__ */ React.createElement(NotificationIcon, { variant: defaultVariant }),
|
|
58
|
+
/* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-0.5" }, /* @__PURE__ */ React.createElement(
|
|
59
|
+
NotificationContent,
|
|
60
|
+
{
|
|
61
|
+
title: props.title,
|
|
62
|
+
content: props.content,
|
|
63
|
+
ref: contentRef,
|
|
64
|
+
className: cn(
|
|
65
|
+
"transition-all duration-300",
|
|
66
|
+
isCollapsed && getCollapseClass()
|
|
84
67
|
)
|
|
85
|
-
|
|
86
|
-
|
|
68
|
+
}
|
|
69
|
+
), props.action),
|
|
70
|
+
/* @__PURE__ */ React.createElement(
|
|
71
|
+
ChevronUp,
|
|
72
|
+
{
|
|
73
|
+
"data-testid": "collapse-icon",
|
|
74
|
+
onClick: handleCollapse,
|
|
75
|
+
ref: refCollapse,
|
|
76
|
+
className: cn(
|
|
77
|
+
shouldCollapse ? "opacity-100 size-5 text-grey-800 transition-transform duration-200 cursor-pointer hover:text-foreground group-hover:opacity-100" : "opacity-0 pointer-events-none h-0 w-0 absolute"
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
)
|
|
87
81
|
);
|
|
88
82
|
};
|
|
89
83
|
NotificationCallout.displayName = "NotificationCallout";
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
1
|
import { cn } from '../../lib/utils.js';
|
|
3
2
|
import X from '../../node_modules/lucide-react/dist/esm/icons/x.js';
|
|
4
3
|
|
|
5
4
|
const NotificationCloseButton = ({
|
|
6
5
|
onClose,
|
|
7
6
|
enableClose
|
|
8
|
-
}) => /* @__PURE__ */
|
|
7
|
+
}) => /* @__PURE__ */ React.createElement(
|
|
9
8
|
X,
|
|
10
9
|
{
|
|
11
10
|
className: cn(
|
|
@@ -1,30 +1,24 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { Typography } from '../Typography/Typography.js';
|
|
4
3
|
|
|
5
|
-
const NotificationContent = React.forwardRef(({ title, content, className, children }, ref) => /* @__PURE__ */
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
children
|
|
24
|
-
]
|
|
25
|
-
}
|
|
26
|
-
) })
|
|
27
|
-
] }));
|
|
4
|
+
const NotificationContent = React.forwardRef(({ title, content, className, children }, ref) => /* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-0.5 flex-1" }, title && /* @__PURE__ */ React.createElement(
|
|
5
|
+
Typography,
|
|
6
|
+
{
|
|
7
|
+
variant: "body-medium-500",
|
|
8
|
+
color: "grey-800",
|
|
9
|
+
"data-testid": "title"
|
|
10
|
+
},
|
|
11
|
+
title
|
|
12
|
+
), /* @__PURE__ */ React.createElement("div", { ref, className, "data-testid": "collapse-content" }, /* @__PURE__ */ React.createElement(
|
|
13
|
+
Typography,
|
|
14
|
+
{
|
|
15
|
+
variant: "body-medium-400",
|
|
16
|
+
color: "grey-800",
|
|
17
|
+
"data-testid": "content"
|
|
18
|
+
},
|
|
19
|
+
content,
|
|
20
|
+
children
|
|
21
|
+
))));
|
|
28
22
|
NotificationContent.displayName = "NotificationContent";
|
|
29
23
|
|
|
30
24
|
export { NotificationContent };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import TriangleAlert from '../../node_modules/lucide-react/dist/esm/icons/triangle-alert.js';
|
|
3
3
|
import Info from '../../node_modules/lucide-react/dist/esm/icons/info.js';
|
|
4
4
|
import CircleAlert from '../../node_modules/lucide-react/dist/esm/icons/circle-alert.js';
|
|
5
5
|
import CircleCheck from '../../node_modules/lucide-react/dist/esm/icons/circle-check.js';
|
|
6
6
|
|
|
7
7
|
const iconMap = {
|
|
8
|
-
success: /* @__PURE__ */
|
|
9
|
-
error: /* @__PURE__ */
|
|
10
|
-
information: /* @__PURE__ */
|
|
11
|
-
warning: /* @__PURE__ */
|
|
8
|
+
success: /* @__PURE__ */ React.createElement(CircleCheck, { className: "text-green-600 size-5" }),
|
|
9
|
+
error: /* @__PURE__ */ React.createElement(CircleAlert, { className: "text-red-600 size-5" }),
|
|
10
|
+
information: /* @__PURE__ */ React.createElement(Info, { className: "text-blue-600 size-5" }),
|
|
11
|
+
warning: /* @__PURE__ */ React.createElement(TriangleAlert, { className: "size-5 text-yellow-600" })
|
|
12
12
|
};
|
|
13
13
|
const NotificationIcon = ({
|
|
14
14
|
variant
|
|
@@ -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 { NotificationBase } from './NotificationBase.js';
|
|
@@ -46,32 +45,30 @@ const NotificationInline = ({
|
|
|
46
45
|
return getNonFullWidthColumns();
|
|
47
46
|
}
|
|
48
47
|
};
|
|
49
|
-
return /* @__PURE__ */
|
|
48
|
+
return /* @__PURE__ */ React.createElement(
|
|
50
49
|
NotificationBase,
|
|
51
50
|
{
|
|
52
51
|
variant: defaultVariant,
|
|
53
52
|
className: cn(getGridColumns()),
|
|
54
|
-
dataTestId: "notification-inline"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
]
|
|
74
|
-
}
|
|
53
|
+
dataTestId: "notification-inline"
|
|
54
|
+
},
|
|
55
|
+
/* @__PURE__ */ React.createElement(NotificationIcon, { variant: defaultVariant }),
|
|
56
|
+
/* @__PURE__ */ React.createElement(
|
|
57
|
+
NotificationContent,
|
|
58
|
+
{
|
|
59
|
+
title,
|
|
60
|
+
content,
|
|
61
|
+
className: "max-h-11 overflow-hidden"
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
action,
|
|
65
|
+
/* @__PURE__ */ React.createElement(
|
|
66
|
+
NotificationCloseButton,
|
|
67
|
+
{
|
|
68
|
+
enableClose: enableClose ?? false,
|
|
69
|
+
onClose: () => setIsVisible(false)
|
|
70
|
+
}
|
|
71
|
+
)
|
|
75
72
|
);
|
|
76
73
|
};
|
|
77
74
|
NotificationInline.displayName = "NotificationInline";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { cn } from '../../lib/utils.js';
|
|
4
3
|
import { NotificationBase } from './NotificationBase.js';
|
|
@@ -108,13 +107,14 @@ const NotificationToast = (props) => {
|
|
|
108
107
|
);
|
|
109
108
|
const renderAction = (action) => {
|
|
110
109
|
if (action) {
|
|
111
|
-
return /* @__PURE__ */
|
|
110
|
+
return /* @__PURE__ */ React.createElement("div", { className: cn(props.showProgress ? "py-2" : "pt-2") }, action);
|
|
112
111
|
}
|
|
113
112
|
return null;
|
|
114
113
|
};
|
|
115
|
-
return /* @__PURE__ */
|
|
114
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, toasts.map((toast) => /* @__PURE__ */ React.createElement(
|
|
116
115
|
NotificationBase,
|
|
117
116
|
{
|
|
117
|
+
key: toast.id,
|
|
118
118
|
variant: toast.variant,
|
|
119
119
|
className: cn(
|
|
120
120
|
"sm:w-[17.5rem] min-w-auto cursor-pointer",
|
|
@@ -122,32 +122,29 @@ const NotificationToast = (props) => {
|
|
|
122
122
|
),
|
|
123
123
|
onMouseEnter: () => handleMouseEnter(toast.id),
|
|
124
124
|
onMouseLeave: () => handleMouseLeave(toast.id),
|
|
125
|
-
dataTestId: "notification-toast"
|
|
126
|
-
children: [
|
|
127
|
-
/* @__PURE__ */ jsx(NotificationIcon, { variant: toast.variant }),
|
|
128
|
-
/* @__PURE__ */ jsx(NotificationContent, { title: toast.title, content: toast.content, children: renderAction(toast.action) }),
|
|
129
|
-
/* @__PURE__ */ jsx(
|
|
130
|
-
NotificationCloseButton,
|
|
131
|
-
{
|
|
132
|
-
enableClose: props.enableClose ?? false,
|
|
133
|
-
onClose: () => closeNotification(toast.id)
|
|
134
|
-
}
|
|
135
|
-
),
|
|
136
|
-
props.showProgress && /* @__PURE__ */ jsx(
|
|
137
|
-
"div",
|
|
138
|
-
{
|
|
139
|
-
"data-testid": "progress-bar",
|
|
140
|
-
className: cn(
|
|
141
|
-
`absolute bottom-0 left-0 h-1 rounded-b-lg transition-all`,
|
|
142
|
-
colorMap[toast.variant]
|
|
143
|
-
),
|
|
144
|
-
style: { width: `${progressMap[toast.id] ?? 100}%` }
|
|
145
|
-
}
|
|
146
|
-
)
|
|
147
|
-
]
|
|
125
|
+
dataTestId: "notification-toast"
|
|
148
126
|
},
|
|
149
|
-
toast.
|
|
150
|
-
|
|
127
|
+
/* @__PURE__ */ React.createElement(NotificationIcon, { variant: toast.variant }),
|
|
128
|
+
/* @__PURE__ */ React.createElement(NotificationContent, { title: toast.title, content: toast.content }, renderAction(toast.action)),
|
|
129
|
+
/* @__PURE__ */ React.createElement(
|
|
130
|
+
NotificationCloseButton,
|
|
131
|
+
{
|
|
132
|
+
enableClose: props.enableClose ?? false,
|
|
133
|
+
onClose: () => closeNotification(toast.id)
|
|
134
|
+
}
|
|
135
|
+
),
|
|
136
|
+
props.showProgress && /* @__PURE__ */ React.createElement(
|
|
137
|
+
"div",
|
|
138
|
+
{
|
|
139
|
+
"data-testid": "progress-bar",
|
|
140
|
+
className: cn(
|
|
141
|
+
`absolute bottom-0 left-0 h-1 rounded-b-lg transition-all`,
|
|
142
|
+
colorMap[toast.variant]
|
|
143
|
+
),
|
|
144
|
+
style: { width: `${progressMap[toast.id] ?? 100}%` }
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
)));
|
|
151
148
|
};
|
|
152
149
|
NotificationToast.displayName = "NotificationToast";
|
|
153
150
|
const MemoizedNotificationToast = React.memo(NotificationToast);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { Button } from '../Button/Button.js';
|
|
4
3
|
import { cn } from '../../lib/utils.js';
|
|
@@ -14,7 +13,7 @@ import ChevronFirst from '../../node_modules/lucide-react/dist/esm/icons/chevron
|
|
|
14
13
|
import ChevronLast from '../../node_modules/lucide-react/dist/esm/icons/chevron-last.js';
|
|
15
14
|
|
|
16
15
|
initializeI18n();
|
|
17
|
-
const PaginationContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
16
|
+
const PaginationContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
18
17
|
"ul",
|
|
19
18
|
{
|
|
20
19
|
ref,
|
|
@@ -23,14 +22,14 @@ const PaginationContent = React.forwardRef(({ className, ...props }, ref) => /*
|
|
|
23
22
|
}
|
|
24
23
|
));
|
|
25
24
|
PaginationContent.displayName = "PaginationContent";
|
|
26
|
-
const PaginationItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
25
|
+
const PaginationItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement("li", { ref, className: cn("", className), ...props }));
|
|
27
26
|
PaginationItem.displayName = "PaginationItem";
|
|
28
27
|
const PaginationFirst = ({
|
|
29
28
|
className,
|
|
30
29
|
disabled,
|
|
31
30
|
isActive,
|
|
32
31
|
onClick
|
|
33
|
-
}) => /* @__PURE__ */
|
|
32
|
+
}) => /* @__PURE__ */ React.createElement(
|
|
34
33
|
Button,
|
|
35
34
|
{
|
|
36
35
|
disabled,
|
|
@@ -39,9 +38,9 @@ const PaginationFirst = ({
|
|
|
39
38
|
color: "grey",
|
|
40
39
|
size: "small",
|
|
41
40
|
onClick,
|
|
42
|
-
className: cn(isActive && "bg-white", className)
|
|
43
|
-
|
|
44
|
-
}
|
|
41
|
+
className: cn(isActive && "bg-white", className)
|
|
42
|
+
},
|
|
43
|
+
/* @__PURE__ */ React.createElement(ChevronFirst, { size: 20 })
|
|
45
44
|
);
|
|
46
45
|
PaginationFirst.displayName = "PaginationFirst";
|
|
47
46
|
const PaginationLast = ({
|
|
@@ -49,7 +48,7 @@ const PaginationLast = ({
|
|
|
49
48
|
disabled,
|
|
50
49
|
isActive,
|
|
51
50
|
onClick
|
|
52
|
-
}) => /* @__PURE__ */
|
|
51
|
+
}) => /* @__PURE__ */ React.createElement(
|
|
53
52
|
Button,
|
|
54
53
|
{
|
|
55
54
|
disabled,
|
|
@@ -58,9 +57,9 @@ const PaginationLast = ({
|
|
|
58
57
|
color: "grey",
|
|
59
58
|
size: "small",
|
|
60
59
|
onClick,
|
|
61
|
-
className: cn(isActive && "bg-white", className)
|
|
62
|
-
|
|
63
|
-
}
|
|
60
|
+
className: cn(isActive && "bg-white", className)
|
|
61
|
+
},
|
|
62
|
+
/* @__PURE__ */ React.createElement(ChevronLast, { size: 20 })
|
|
64
63
|
);
|
|
65
64
|
PaginationLast.displayName = "PaginationLast";
|
|
66
65
|
const PaginationPrevious = ({
|
|
@@ -68,7 +67,7 @@ const PaginationPrevious = ({
|
|
|
68
67
|
disabled,
|
|
69
68
|
isActive,
|
|
70
69
|
onClick
|
|
71
|
-
}) => /* @__PURE__ */
|
|
70
|
+
}) => /* @__PURE__ */ React.createElement(
|
|
72
71
|
Button,
|
|
73
72
|
{
|
|
74
73
|
disabled,
|
|
@@ -77,9 +76,9 @@ const PaginationPrevious = ({
|
|
|
77
76
|
color: "grey",
|
|
78
77
|
size: "small",
|
|
79
78
|
onClick,
|
|
80
|
-
className: cn(isActive && "bg-white", className)
|
|
81
|
-
|
|
82
|
-
}
|
|
79
|
+
className: cn(isActive && "bg-white", className)
|
|
80
|
+
},
|
|
81
|
+
/* @__PURE__ */ React.createElement(ChevronLeft, { size: 20 })
|
|
83
82
|
);
|
|
84
83
|
PaginationPrevious.displayName = "PaginationPrevious";
|
|
85
84
|
const PaginationNext = ({
|
|
@@ -87,7 +86,7 @@ const PaginationNext = ({
|
|
|
87
86
|
disabled,
|
|
88
87
|
isActive,
|
|
89
88
|
onClick
|
|
90
|
-
}) => /* @__PURE__ */
|
|
89
|
+
}) => /* @__PURE__ */ React.createElement(
|
|
91
90
|
Button,
|
|
92
91
|
{
|
|
93
92
|
disabled,
|
|
@@ -96,9 +95,9 @@ const PaginationNext = ({
|
|
|
96
95
|
color: "grey",
|
|
97
96
|
size: "small",
|
|
98
97
|
onClick,
|
|
99
|
-
className: cn(isActive && "bg-white", className)
|
|
100
|
-
|
|
101
|
-
}
|
|
98
|
+
className: cn(isActive && "bg-white", className)
|
|
99
|
+
},
|
|
100
|
+
/* @__PURE__ */ React.createElement(ChevronRight, { size: 20 })
|
|
102
101
|
);
|
|
103
102
|
PaginationNext.displayName = "PaginationNext";
|
|
104
103
|
const PaginationEllipsis = ({
|
|
@@ -109,9 +108,9 @@ const PaginationEllipsis = ({
|
|
|
109
108
|
onClick
|
|
110
109
|
}) => {
|
|
111
110
|
if (asChild) {
|
|
112
|
-
return /* @__PURE__ */
|
|
111
|
+
return /* @__PURE__ */ React.createElement("div", { className: "w-8 h-8 flex items-center justify-center" }, /* @__PURE__ */ React.createElement(Ellipsis, { size: 20, className: "text-grey-800" }));
|
|
113
112
|
}
|
|
114
|
-
return /* @__PURE__ */
|
|
113
|
+
return /* @__PURE__ */ React.createElement(
|
|
115
114
|
Button,
|
|
116
115
|
{
|
|
117
116
|
disabled,
|
|
@@ -120,9 +119,9 @@ const PaginationEllipsis = ({
|
|
|
120
119
|
color: "grey",
|
|
121
120
|
size: "small",
|
|
122
121
|
onClick,
|
|
123
|
-
className: cn(isActive && "bg-white", className)
|
|
124
|
-
|
|
125
|
-
}
|
|
122
|
+
className: cn(isActive && "bg-white", className)
|
|
123
|
+
},
|
|
124
|
+
/* @__PURE__ */ React.createElement(Ellipsis, { size: 20 })
|
|
126
125
|
);
|
|
127
126
|
};
|
|
128
127
|
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
@@ -132,7 +131,7 @@ const PaginationIndex = ({
|
|
|
132
131
|
isActive,
|
|
133
132
|
onClick,
|
|
134
133
|
children
|
|
135
|
-
}) => /* @__PURE__ */
|
|
134
|
+
}) => /* @__PURE__ */ React.createElement(
|
|
136
135
|
Button,
|
|
137
136
|
{
|
|
138
137
|
disabled,
|
|
@@ -141,9 +140,9 @@ const PaginationIndex = ({
|
|
|
141
140
|
color: "grey",
|
|
142
141
|
size: "small",
|
|
143
142
|
onClick,
|
|
144
|
-
className: cn(isActive && "bg-white", className)
|
|
145
|
-
|
|
146
|
-
|
|
143
|
+
className: cn(isActive && "bg-white", className)
|
|
144
|
+
},
|
|
145
|
+
children
|
|
147
146
|
);
|
|
148
147
|
PaginationIndex.displayName = "PaginationIndex";
|
|
149
148
|
const Pagination = ({
|
|
@@ -174,17 +173,17 @@ const Pagination = ({
|
|
|
174
173
|
disabled: item.disabled
|
|
175
174
|
};
|
|
176
175
|
if (item.type === "page") {
|
|
177
|
-
return /* @__PURE__ */
|
|
176
|
+
return /* @__PURE__ */ React.createElement(
|
|
178
177
|
PaginationIndex,
|
|
179
178
|
{
|
|
180
179
|
isActive: item.page === currentPage,
|
|
181
|
-
...componentProps
|
|
182
|
-
|
|
183
|
-
|
|
180
|
+
...componentProps
|
|
181
|
+
},
|
|
182
|
+
item.page
|
|
184
183
|
);
|
|
185
184
|
}
|
|
186
185
|
if (item.type.includes("ellipsis")) {
|
|
187
|
-
return /* @__PURE__ */
|
|
186
|
+
return /* @__PURE__ */ React.createElement(PaginationEllipsis, { asChild: true });
|
|
188
187
|
}
|
|
189
188
|
const mappedComponents = {
|
|
190
189
|
first: PaginationFirst,
|
|
@@ -194,34 +193,16 @@ const Pagination = ({
|
|
|
194
193
|
};
|
|
195
194
|
return React.createElement(mappedComponents[item.type], componentProps);
|
|
196
195
|
};
|
|
197
|
-
return /* @__PURE__ */
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
DropdownMenuItem,
|
|
208
|
-
{
|
|
209
|
-
onSelect: () => {
|
|
210
|
-
onChangePerPage?.(option.value);
|
|
211
|
-
},
|
|
212
|
-
children: option.value.toString()
|
|
213
|
-
},
|
|
214
|
-
option.value
|
|
215
|
-
)) })
|
|
216
|
-
] }),
|
|
217
|
-
totalRowsSelected > 0 && /* @__PURE__ */ jsxs(Typography, { variant: "heading-xxsmall-600", textColor: "text-grey-800", children: [
|
|
218
|
-
totalRowsSelected,
|
|
219
|
-
" ",
|
|
220
|
-
t("pagination.selectedProcess")
|
|
221
|
-
] })
|
|
222
|
-
] }),
|
|
223
|
-
/* @__PURE__ */ jsx("nav", { role: "navigation", "aria-label": "pagination", children: /* @__PURE__ */ jsx(PaginationContent, { children: itemsPage.map((item) => /* @__PURE__ */ jsx(PaginationItem, { children: mapPaginationItem(item) }, item.id)) }) })
|
|
224
|
-
] });
|
|
196
|
+
return /* @__PURE__ */ React.createElement("div", { className: "flex items-center justify-between mt-6 gap-4" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React.createElement(DropdownMenu, null, /* @__PURE__ */ React.createElement(DropdownMenuTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(Button, { size: "small", color: "grey", variant: "outlined" }, /* @__PURE__ */ React.createElement("span", { className: "max-md:hidden" }, t("pagination.show")), " ", perPage, /* @__PURE__ */ React.createElement(ChevronDown, { size: 20 }))), /* @__PURE__ */ React.createElement(DropdownMenuContent, { side: "top", align: "center" }, perPageOptions.map((option) => /* @__PURE__ */ React.createElement(
|
|
197
|
+
DropdownMenuItem,
|
|
198
|
+
{
|
|
199
|
+
key: option.value,
|
|
200
|
+
onSelect: () => {
|
|
201
|
+
onChangePerPage?.(option.value);
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
option.value.toString()
|
|
205
|
+
)))), totalRowsSelected > 0 && /* @__PURE__ */ React.createElement(Typography, { variant: "heading-xxsmall-600", textColor: "text-grey-800" }, totalRowsSelected, " ", t("pagination.selectedProcess"))), /* @__PURE__ */ React.createElement("nav", { role: "navigation", "aria-label": "pagination" }, /* @__PURE__ */ React.createElement(PaginationContent, null, itemsPage.map((item) => /* @__PURE__ */ React.createElement(PaginationItem, { key: item.id }, mapPaginationItem(item))))));
|
|
225
206
|
};
|
|
226
207
|
Pagination.displayName = "Pagination";
|
|
227
208
|
|
|
@@ -1,11 +1,10 @@
|
|
|
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 { Portal, Content as Content2, Root as Root2, Trigger } from '../../node_modules/@radix-ui/react-popover/dist/index.js';
|
|
5
4
|
|
|
6
5
|
const Popover = Root2;
|
|
7
6
|
const PopoverTrigger = Trigger;
|
|
8
|
-
const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */
|
|
7
|
+
const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React.createElement(Portal, null, /* @__PURE__ */ React.createElement(
|
|
9
8
|
Content2,
|
|
10
9
|
{
|
|
11
10
|
ref,
|
|
@@ -17,7 +16,7 @@ const PopoverContent = React.forwardRef(({ className, align = "center", sideOffs
|
|
|
17
16
|
),
|
|
18
17
|
...props
|
|
19
18
|
}
|
|
20
|
-
)
|
|
19
|
+
)));
|
|
21
20
|
PopoverContent.displayName = Content2.displayName;
|
|
22
21
|
|
|
23
22
|
export { Popover, PopoverContent, PopoverTrigger };
|
|
@@ -1,10 +1,9 @@
|
|
|
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 { Root as Root2, Item as Item2, Indicator } from '../../node_modules/@radix-ui/react-radio-group/dist/index.js';
|
|
5
4
|
import Circle from '../../node_modules/lucide-react/dist/esm/icons/circle.js';
|
|
6
5
|
|
|
7
|
-
const RadioGroup = React.forwardRef(({ className, disabled, ...props }, ref) => /* @__PURE__ */
|
|
6
|
+
const RadioGroup = React.forwardRef(({ className, disabled, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
8
7
|
Root2,
|
|
9
8
|
{
|
|
10
9
|
className: cn("grid gap-2", className),
|
|
@@ -16,30 +15,27 @@ const RadioGroup = React.forwardRef(({ className, disabled, ...props }, ref) =>
|
|
|
16
15
|
RadioGroup.displayName = Root2.displayName;
|
|
17
16
|
const RadioGroupItem = React.forwardRef(({ className, children, disabled, ...props }, ref) => {
|
|
18
17
|
const id = React.useId();
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
)
|
|
42
|
-
] });
|
|
18
|
+
return /* @__PURE__ */ React.createElement("div", { className: "flex items-center space-x-2" }, /* @__PURE__ */ React.createElement(
|
|
19
|
+
Item2,
|
|
20
|
+
{
|
|
21
|
+
ref,
|
|
22
|
+
className: cn(
|
|
23
|
+
"peer relative aspect-square h-5 w-5 rounded-full border-2 border-grey-400 transition-all hover:border-grey-500 active:border-grey-700 disabled:cursor-not-allowed disabled:border-grey-300 focus-visible:outline-none focus-visible:before:absolute focus-visible:before:-z-10 focus-visible:before:top-1/2 focus-visible:before:left-1/2 focus-visible:before:transform focus-visible:before:-translate-x-1/2 focus-visible:before:-translate-y-1/2 focus-visible:before:w-10 focus-visible:before:h-10 focus-visible:before:rounded-full focus-visible:before:bg-blue-100 data-[state=checked]:border-blue-600 data-[state=checked]:text-blue-600 data-[state=checked]:hover:border-blue-700 data-[state=checked]:hover:text-blue-700 data-[state=checked]:active:border-blue-800 data-[state=checked]:active:text-blue-800 data-[state=checked]:disabled:border-blue-400 data-[state=checked]:disabled:text-blue-400",
|
|
24
|
+
className
|
|
25
|
+
),
|
|
26
|
+
disabled,
|
|
27
|
+
...props,
|
|
28
|
+
id
|
|
29
|
+
},
|
|
30
|
+
/* @__PURE__ */ React.createElement(Indicator, { className: "flex items-center justify-center" }, /* @__PURE__ */ React.createElement(Circle, { className: "h-2.5 w-2.5 fill-current text-current" }))
|
|
31
|
+
), /* @__PURE__ */ React.createElement(
|
|
32
|
+
"label",
|
|
33
|
+
{
|
|
34
|
+
htmlFor: id,
|
|
35
|
+
className: "body-medium-400 leading-none cursor-pointer peer-disabled:cursor-not-allowed peer-disabled:opacity-50 transition-opacity"
|
|
36
|
+
},
|
|
37
|
+
children
|
|
38
|
+
));
|
|
43
39
|
});
|
|
44
40
|
RadioGroupItem.displayName = Item2.displayName;
|
|
45
41
|
|