lecom-ui 2.5.3 → 2.5.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.
@@ -0,0 +1,43 @@
1
+ import * as React from 'react';
2
+ import { cn } from '../../lib/utils.js';
3
+ import { cva } from 'class-variance-authority';
4
+
5
+ const tagVariants = cva(
6
+ "h-6 gap-1 py-1 px-2 body-small-400 inline-flex items-center rounded-full transition-colors focus:outline-none focus:ring-4",
7
+ {
8
+ variants: {
9
+ color: {
10
+ grey: "bg-grey-200 text-grey-700 hover:bg-grey-300 active:bg-grey-400 focus:bg-grey-200 focus:ring-grey-50",
11
+ purple: "bg-purple-100 text-purple-600 hover:bg-purple-200 active:bg-purple-300 focus:bg-purple-100 focus:ring-purple-50",
12
+ yellow: "bg-yellow-100 text-yellow-600 hover:bg-yellow-200 active:bg-yellow-300 focus:bg-yellow-100 focus:ring-yellow-50",
13
+ red: "bg-red-100 text-red-600 hover:bg-red-200 active:bg-red-300 focus:bg-red-100 focus:ring-red-50",
14
+ orange: "bg-orange-100 text-orange-600 hover:bg-orange-200 active:bg-orange-300 focus:bg-orange-100 focus:ring-orange-50",
15
+ green: "bg-green-100 text-green-600 hover:bg-green-200 active:bg-green-300 focus:bg-green-100 focus:ring-green-50",
16
+ pink: "bg-pink-100 text-pink-600 hover:bg-pink-200 active:bg-pink-300 focus:bg-pink-100 focus:ring-pink-50",
17
+ turquoise: "bg-turquoise-100 text-turquoise-600 hover:bg-turquoise-200 active:bg-turquoise-300 focus:bg-turquoise-100 focus:ring-turquoise-50",
18
+ blue: "bg-blue-100 text-blue-600 hover:bg-blue-200 active:bg-blue-300 focus:bg-blue-100 focus:ring-blue-50"
19
+ }
20
+ },
21
+ defaultVariants: {
22
+ color: "grey"
23
+ }
24
+ }
25
+ );
26
+ const Tag = React.forwardRef(
27
+ ({ className, color, children, ...props }, ref) => {
28
+ const Comp = "div";
29
+ return /* @__PURE__ */ React.createElement(
30
+ Comp,
31
+ {
32
+ tabIndex: 0,
33
+ className: cn(tagVariants({ color }), className),
34
+ ref,
35
+ ...props
36
+ },
37
+ children
38
+ );
39
+ }
40
+ );
41
+ Tag.displayName = "Tag";
42
+
43
+ export { Tag, tagVariants };
package/dist/index.d.ts CHANGED
@@ -447,6 +447,14 @@ declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimit
447
447
 
448
448
  declare const Skeleton: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
449
449
 
450
+ declare const tagVariants: (props?: ({
451
+ color?: "blue" | "grey" | "green" | "orange" | "pink" | "purple" | "red" | "turquoise" | "yellow" | null | undefined;
452
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
453
+ interface TagProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'color'>, VariantProps<typeof tagVariants> {
454
+ children: React.ReactNode;
455
+ }
456
+ declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLDivElement>>;
457
+
450
458
  declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
451
459
  declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
452
460
  declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
@@ -480,4 +488,4 @@ declare const fonts: {
480
488
  ibm: string[];
481
489
  };
482
490
 
483
- export { type BgColor, Button, type ButtonProps, CadastroFacil, type CadastroFacilProps, type CalloutNotificationProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type Color, type ColorToken, type CustomStyles$1 as CustomStyles, DataTable, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type FillColor, type Fonts, type HeaderProps, type InlineNotificationProps, Layout, type LayoutProps, LogoLecom, LogoLecomBrand, type LogoLecomBrandProps, type LogoLecomProps, ModoTeste, type ModoTesteProps, Notification, type NotificationProps, Popover, PopoverContent, PopoverTrigger, Rpa, type RpaProps, type SideBarProps, Skeleton, TOAST_REMOVE_DELAY, type TextColor, type ToastNotificationProps, type ToasterToast, Tooltip, TooltipArrow, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, TypeMessageNotification, Typography, type TypographyProps, buttonVariants, colors, fonts, getPositionClass, notificationVariants, reducer, toast, typographyVariants, useNotificationToast };
491
+ export { type BgColor, Button, type ButtonProps, CadastroFacil, type CadastroFacilProps, type CalloutNotificationProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type Color, type ColorToken, type CustomStyles$1 as CustomStyles, DataTable, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type FillColor, type Fonts, type HeaderProps, type InlineNotificationProps, Layout, type LayoutProps, LogoLecom, LogoLecomBrand, type LogoLecomBrandProps, type LogoLecomProps, ModoTeste, type ModoTesteProps, Notification, type NotificationProps, 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, buttonVariants, colors, fonts, getPositionClass, notificationVariants, reducer, tagVariants, toast, typographyVariants, useNotificationToast };
package/dist/index.js CHANGED
@@ -12,6 +12,7 @@ export { Notification, TypeMessageNotification, getPositionClass, notificationVa
12
12
  export { TOAST_REMOVE_DELAY, reducer, toast, useNotificationToast } from './components/Notification/useNotificationToast.js';
13
13
  export { Popover, PopoverContent, PopoverTrigger } from './components/Popover/Popover.js';
14
14
  export { Skeleton } from './components/Skeleton/Skeleton.js';
15
+ export { Tag, tagVariants } from './components/Tag/Tag.js';
15
16
  export { Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger } from './components/Tooltip/Tooltip.js';
16
17
  export { Typography, typographyVariants } from './components/Typography/Typography.js';
17
18
  export { colors } from './tokens/colors.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lecom-ui",
3
- "version": "2.5.3",
3
+ "version": "2.5.5",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",