@szum-tech/design-system
Version:
Szum-Tech design system with tailwindcss support
90 lines (86 loc) • 2.74 kB
JavaScript
;
var chunkH2BWO3SI_cjs = require('./chunk-H2BWO3SI.cjs');
var jsxRuntime = require('react/jsx-runtime');
var classVarianceAuthority = require('class-variance-authority');
function Empty({ className, border = false, ...props }) {
return /* @__PURE__ */ jsxRuntime.jsx(
"div",
{
"data-slot": "empty",
className: chunkH2BWO3SI_cjs.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__ */ jsxRuntime.jsx(
"div",
{
"data-slot": "empty-header",
className: chunkH2BWO3SI_cjs.cn("flex max-w-sm flex-col items-center gap-2 text-center", className),
...props
}
);
}
function EmptyTitle({ className, ...props }) {
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "empty-title", className: chunkH2BWO3SI_cjs.cn("text-lg font-medium tracking-tight", className), ...props });
}
function EmptyDescription({ className, ...props }) {
return /* @__PURE__ */ jsxRuntime.jsx(
"p",
{
"data-slot": "empty-description",
className: chunkH2BWO3SI_cjs.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__ */ jsxRuntime.jsx(
"div",
{
"data-slot": "empty-content",
className: chunkH2BWO3SI_cjs.cn("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance", className),
...props
}
);
}
var emptyMediaVariants = classVarianceAuthority.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__ */ jsxRuntime.jsx(
"div",
{
"data-slot": "empty-icon",
"data-variant": variant,
className: chunkH2BWO3SI_cjs.cn(emptyMediaVariants({ variant, className })),
...props
}
);
}
exports.Empty = Empty;
exports.EmptyContent = EmptyContent;
exports.EmptyDescription = EmptyDescription;
exports.EmptyHeader = EmptyHeader;
exports.EmptyMedia = EmptyMedia;
exports.EmptyTitle = EmptyTitle;