lecom-ui 2.6.3 → 2.6.4
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/Switch/Switch.js +26 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -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?: ({
|
|
@@ -532,6 +533,8 @@ declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimit
|
|
|
532
533
|
|
|
533
534
|
declare const Skeleton: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
|
|
534
535
|
|
|
536
|
+
declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
537
|
+
|
|
535
538
|
declare const tagVariants: (props?: ({
|
|
536
539
|
color?: "blue" | "grey" | "green" | "orange" | "pink" | "purple" | "red" | "turquoise" | "yellow" | null | undefined;
|
|
537
540
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
@@ -573,4 +576,4 @@ declare const fonts: {
|
|
|
573
576
|
ibm: string[];
|
|
574
577
|
};
|
|
575
578
|
|
|
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 };
|
|
579
|
+
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';
|