lecom-ui 2.6.3 → 2.6.5
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.
|
@@ -27,7 +27,8 @@ PaginationItem.displayName = "PaginationItem";
|
|
|
27
27
|
const PaginationPrevious = ({
|
|
28
28
|
className,
|
|
29
29
|
disabled,
|
|
30
|
-
isActive
|
|
30
|
+
isActive,
|
|
31
|
+
onClick
|
|
31
32
|
}) => /* @__PURE__ */ React.createElement(
|
|
32
33
|
Button,
|
|
33
34
|
{
|
|
@@ -36,6 +37,7 @@ const PaginationPrevious = ({
|
|
|
36
37
|
variant: "ghost",
|
|
37
38
|
color: "grey",
|
|
38
39
|
size: "small",
|
|
40
|
+
onClick,
|
|
39
41
|
className: cn(isActive && "bg-white", className)
|
|
40
42
|
},
|
|
41
43
|
/* @__PURE__ */ React.createElement(ChevronLeft, { size: 20 })
|
|
@@ -44,7 +46,8 @@ PaginationPrevious.displayName = "PaginationPrevious";
|
|
|
44
46
|
const PaginationNext = ({
|
|
45
47
|
className,
|
|
46
48
|
disabled,
|
|
47
|
-
isActive
|
|
49
|
+
isActive,
|
|
50
|
+
onClick
|
|
48
51
|
}) => /* @__PURE__ */ React.createElement(
|
|
49
52
|
Button,
|
|
50
53
|
{
|
|
@@ -53,6 +56,7 @@ const PaginationNext = ({
|
|
|
53
56
|
variant: "ghost",
|
|
54
57
|
color: "grey",
|
|
55
58
|
size: "small",
|
|
59
|
+
onClick,
|
|
56
60
|
className: cn(isActive && "bg-white", className)
|
|
57
61
|
},
|
|
58
62
|
/* @__PURE__ */ React.createElement(ChevronRight, { size: 20 })
|
|
@@ -61,7 +65,8 @@ PaginationNext.displayName = "PaginationNext";
|
|
|
61
65
|
const PaginationEllipsis = ({
|
|
62
66
|
className,
|
|
63
67
|
disabled,
|
|
64
|
-
isActive
|
|
68
|
+
isActive,
|
|
69
|
+
onClick
|
|
65
70
|
}) => /* @__PURE__ */ React.createElement(
|
|
66
71
|
Button,
|
|
67
72
|
{
|
|
@@ -70,6 +75,7 @@ const PaginationEllipsis = ({
|
|
|
70
75
|
variant: "ghost",
|
|
71
76
|
color: "grey",
|
|
72
77
|
size: "small",
|
|
78
|
+
onClick,
|
|
73
79
|
className: cn(isActive && "bg-white", className)
|
|
74
80
|
},
|
|
75
81
|
/* @__PURE__ */ React.createElement(MoreHorizontal, { size: 20 })
|
|
@@ -79,6 +85,7 @@ const PaginationIndex = ({
|
|
|
79
85
|
className,
|
|
80
86
|
disabled,
|
|
81
87
|
isActive,
|
|
88
|
+
onClick,
|
|
82
89
|
children
|
|
83
90
|
}) => /* @__PURE__ */ React.createElement(
|
|
84
91
|
Button,
|
|
@@ -88,6 +95,7 @@ const PaginationIndex = ({
|
|
|
88
95
|
variant: "ghost",
|
|
89
96
|
color: "grey",
|
|
90
97
|
size: "small",
|
|
98
|
+
onClick,
|
|
91
99
|
className: cn(isActive && "bg-white", className)
|
|
92
100
|
},
|
|
93
101
|
children
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { cn } from '../../lib/utils.js';
|
|
3
|
+
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
4
|
+
|
|
5
|
+
const Switch = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
|
6
|
+
SwitchPrimitives.Root,
|
|
7
|
+
{
|
|
8
|
+
className: cn(
|
|
9
|
+
"peer flex items-center shrink-0 h-6 w-12 p-[2px] group rounded-full cursor-pointer bg-transparent focus:outline-none transition-colors data-[state=unchecked]:border-2 data-[state=unchecked]:border-grey-400 data-[state=unchecked]:hover:border-grey-500 data-[state=unchecked]:active:border-grey-700 data-[state=unchecked]:disabled:border-grey-300 data-[state=checked]:bg-blue-600 data-[state=checked]:hover:bg-blue-700 data-[state=checked]:active:bg-blue-800 data-[state=checked]:disabled:bg-blue-200 disabled:cursor-not-allowed",
|
|
10
|
+
className
|
|
11
|
+
),
|
|
12
|
+
ref,
|
|
13
|
+
...props
|
|
14
|
+
},
|
|
15
|
+
/* @__PURE__ */ React.createElement(
|
|
16
|
+
SwitchPrimitives.Thumb,
|
|
17
|
+
{
|
|
18
|
+
className: cn(
|
|
19
|
+
"pointer-events-none rounded-full shadow-sm transition-all h-4 w-4 data-[state=unchecked]:bg-grey-400 data-[state=unchecked]:translate-x-1 group-hover:data-[state=unchecked]:bg-grey-500 group-focus:ring-8 group-focus:ring-blue-200 group-focus:ring-opacity-50 group-active:group-enabled:h-5 group-active:group-enabled:w-5 group-active:data-[state=unchecked]:bg-grey-700 group-active:group-enabled:data-[state=unchecked]:translate-x-[-2px] group-disabled:data-[state=unchecked]:bg-grey-300 group-disabled:data-[state=unchecked]:bg-opacity-65 data-[state=checked]:bg-white data-[state=checked]:translate-x-6"
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
)
|
|
23
|
+
));
|
|
24
|
+
Switch.displayName = "Switch";
|
|
25
|
+
|
|
26
|
+
export { Switch };
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
|
8
8
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
9
9
|
import { CustomStyles as CustomStyles$2 } from '@/components/Button';
|
|
10
10
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
11
|
+
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
11
12
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
12
13
|
|
|
13
14
|
declare const accordionVariants: (props?: ({
|
|
@@ -499,6 +500,7 @@ type PaginationButtonProps = {
|
|
|
499
500
|
className?: string;
|
|
500
501
|
disabled?: boolean;
|
|
501
502
|
isActive?: boolean;
|
|
503
|
+
onClick?: () => void;
|
|
502
504
|
};
|
|
503
505
|
interface PaginationIndexProps extends PaginationButtonProps {
|
|
504
506
|
children: React.ReactNode;
|
|
@@ -510,19 +512,19 @@ declare const Pagination: {
|
|
|
510
512
|
declare const PaginationContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & React.RefAttributes<HTMLUListElement>>;
|
|
511
513
|
declare const PaginationItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
512
514
|
declare const PaginationPrevious: {
|
|
513
|
-
({ className, disabled, isActive, }: PaginationButtonProps): React.JSX.Element;
|
|
515
|
+
({ className, disabled, isActive, onClick, }: PaginationButtonProps): React.JSX.Element;
|
|
514
516
|
displayName: string;
|
|
515
517
|
};
|
|
516
518
|
declare const PaginationNext: {
|
|
517
|
-
({ className, disabled, isActive, }: PaginationButtonProps): React.JSX.Element;
|
|
519
|
+
({ className, disabled, isActive, onClick, }: PaginationButtonProps): React.JSX.Element;
|
|
518
520
|
displayName: string;
|
|
519
521
|
};
|
|
520
522
|
declare const PaginationEllipsis: {
|
|
521
|
-
({ className, disabled, isActive, }: PaginationButtonProps): React.JSX.Element;
|
|
523
|
+
({ className, disabled, isActive, onClick, }: PaginationButtonProps): React.JSX.Element;
|
|
522
524
|
displayName: string;
|
|
523
525
|
};
|
|
524
526
|
declare const PaginationIndex: {
|
|
525
|
-
({ className, disabled, isActive, children, }: PaginationIndexProps): React.JSX.Element;
|
|
527
|
+
({ className, disabled, isActive, onClick, children, }: PaginationIndexProps): React.JSX.Element;
|
|
526
528
|
displayName: string;
|
|
527
529
|
};
|
|
528
530
|
|
|
@@ -532,6 +534,8 @@ declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimit
|
|
|
532
534
|
|
|
533
535
|
declare const Skeleton: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
|
|
534
536
|
|
|
537
|
+
declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
538
|
+
|
|
535
539
|
declare const tagVariants: (props?: ({
|
|
536
540
|
color?: "blue" | "grey" | "green" | "orange" | "pink" | "purple" | "red" | "turquoise" | "yellow" | null | undefined;
|
|
537
541
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
@@ -573,4 +577,4 @@ declare const fonts: {
|
|
|
573
577
|
ibm: string[];
|
|
574
578
|
};
|
|
575
579
|
|
|
576
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, type BgColor, Button, type ButtonProps, CadastroFacil, type CadastroFacilProps, type CalloutNotificationProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, type CheckboxProps, type Color, type ColorToken, type CustomStyles$1 as CustomStyles, DataTable, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type FillColor, type Fonts, type HeaderProps, type InlineNotificationProps, Layout, type LayoutProps, LogoLecom, LogoLecomBrand, type LogoLecomBrandProps, type LogoLecomProps, ModoTeste, type ModoTesteProps, Notification, type NotificationProps, Pagination, PaginationContent, PaginationEllipsis, PaginationIndex, PaginationItem, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverTrigger, Rpa, type RpaProps, type SideBarProps, Skeleton, TOAST_REMOVE_DELAY, Tag, type TagProps, type TextColor, type ToastNotificationProps, type ToasterToast, Tooltip, TooltipArrow, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, TypeMessageNotification, Typography, type TypographyProps, accordionVariants, buttonVariants, colors, fonts, getPositionClass, notificationVariants, reducer, tagVariants, toast, typographyVariants, useNotificationToast };
|
|
580
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, type BgColor, Button, type ButtonProps, CadastroFacil, type CadastroFacilProps, type CalloutNotificationProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, type CheckboxProps, type Color, type ColorToken, type CustomStyles$1 as CustomStyles, DataTable, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type FillColor, type Fonts, type HeaderProps, type InlineNotificationProps, Layout, type LayoutProps, LogoLecom, LogoLecomBrand, type LogoLecomBrandProps, type LogoLecomProps, ModoTeste, type ModoTesteProps, Notification, type NotificationProps, Pagination, PaginationContent, PaginationEllipsis, PaginationIndex, PaginationItem, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverTrigger, Rpa, type RpaProps, type SideBarProps, Skeleton, Switch, TOAST_REMOVE_DELAY, Tag, type TagProps, type TextColor, type ToastNotificationProps, type ToasterToast, Tooltip, TooltipArrow, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, TypeMessageNotification, Typography, type TypographyProps, accordionVariants, buttonVariants, colors, fonts, getPositionClass, notificationVariants, reducer, tagVariants, toast, typographyVariants, useNotificationToast };
|
package/dist/index.js
CHANGED
|
@@ -16,6 +16,7 @@ export { TOAST_REMOVE_DELAY, reducer, toast, useNotificationToast } from './comp
|
|
|
16
16
|
export { Pagination, PaginationContent, PaginationEllipsis, PaginationIndex, PaginationItem, PaginationNext, PaginationPrevious } from './components/Pagination/Pagination.js';
|
|
17
17
|
export { Popover, PopoverContent, PopoverTrigger } from './components/Popover/Popover.js';
|
|
18
18
|
export { Skeleton } from './components/Skeleton/Skeleton.js';
|
|
19
|
+
export { Switch } from './components/Switch/Switch.js';
|
|
19
20
|
export { Tag, tagVariants } from './components/Tag/Tag.js';
|
|
20
21
|
export { Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger } from './components/Tooltip/Tooltip.js';
|
|
21
22
|
export { Typography, typographyVariants } from './components/Typography/Typography.js';
|