@szum-tech/design-system
Version:
Szum-Tech design system with tailwindcss support
1 lines • 1.95 kB
JavaScript
import {a}from'./chunk-JUNHRB4B.js';import {Slot}from'radix-ui';import {cva}from'class-variance-authority';import {jsx}from'react/jsx-runtime';var n=cva("border-border focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-error/20 dark:aria-invalid:ring-error/40 aria-invalid:border-error inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded border px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{primary:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90 border-transparent",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90 border-transparent",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",success:"bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 border-transparent",warning:"bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 border-transparent",error:"bg-error [a&]:hover:bg-error/90 focus-visible:ring-error/20 dark:focus-visible:ring-error/40 dark:bg-error/60 text-error-foreground border-transparent"}},defaultVariants:{variant:"primary"}});function x({className:o,variant:e="primary",asChild:t=false,...a$1}){let i=t?Slot.Slot:"span";return jsx(i,{"data-slot":"badge",className:a(n({variant:e}),o),...a$1})}function w({className:o,asChild:e=false,...t}){let a$1=e?Slot.Slot:"span";return jsx(a$1,{"data-slot":"badge-button",className:a("-me-0.5 inline-flex size-3.5 cursor-pointer items-center justify-center rounded-md p-0 leading-none opacity-60 transition-all hover:opacity-100 [&>svg]:size-3.5! [&>svg]:opacity-100!",o),role:"button",...t})}function V({className:o,...e}){return jsx("span",{"data-slot":"badge-dot",className:a("size-1.5 rounded-full bg-[currentColor] opacity-75",o),...e})}export{x as a,w as b,V as c};