UNPKG

@szum-tech/design-system

Version:

Szum-Tech design system with tailwindcss support

83 lines (80 loc) 2.37 kB
import { cn } from './chunk-ZD2QRAOX.js'; import { jsx } from 'react/jsx-runtime'; import { cva } from 'class-variance-authority'; function Empty({ className, border = false, ...props }) { return /* @__PURE__ */ jsx( "div", { "data-slot": "empty", className: cn( "border-border flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded p-6 text-center text-balance md:p-12", border ? "border" : "", border === "dashed" ? "border-dashed" : "", className ), ...props } ); } function EmptyHeader({ className, ...props }) { return /* @__PURE__ */ jsx( "div", { "data-slot": "empty-header", className: cn("flex max-w-sm flex-col items-center gap-2 text-center", className), ...props } ); } function EmptyTitle({ className, ...props }) { return /* @__PURE__ */ jsx("div", { "data-slot": "empty-title", className: cn("text-lg font-medium tracking-tight", className), ...props }); } function EmptyDescription({ className, ...props }) { return /* @__PURE__ */ jsx( "p", { "data-slot": "empty-description", className: cn( "text-muted-foreground [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4", className ), ...props } ); } function EmptyContent({ className, ...props }) { return /* @__PURE__ */ jsx( "div", { "data-slot": "empty-content", className: cn("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance", className), ...props } ); } var emptyMediaVariants = cva( "mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", { variants: { variant: { default: "bg-transparent", icon: "bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded [&_svg:not([class*='size-'])]:size-6" } }, defaultVariants: { variant: "default" } } ); function EmptyMedia({ className, variant = "default", ...props }) { return /* @__PURE__ */ jsx( "div", { "data-slot": "empty-icon", "data-variant": variant, className: cn(emptyMediaVariants({ variant, className })), ...props } ); } export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle };