feat: add Typography EmptyState and Breadcrumbs
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
/* Adapted from HeroUI v3, ce90ea3. Copyright 2025 NextUI Inc.
|
||||
* See third-party/HEROUI-LICENSE. Modified: hv- class prefix. */
|
||||
|
||||
/* Base breadcrumbs container */
|
||||
.hv-breadcrumbs {
|
||||
@apply flex items-center gap-1.5;
|
||||
|
||||
/* Breadcrumb link */
|
||||
.hv-breadcrumbs__link {
|
||||
@apply relative text-sm leading-5 font-medium text-muted no-underline opacity-100;
|
||||
|
||||
&:hover,
|
||||
&[data-hovered="true"] {
|
||||
@apply underline;
|
||||
}
|
||||
|
||||
&[data-current="true"] {
|
||||
@apply text-link opacity-100;
|
||||
}
|
||||
}
|
||||
|
||||
/* Breadcrumb item wrapper */
|
||||
.hv-breadcrumbs__item {
|
||||
@apply flex shrink-0 items-center justify-center gap-1;
|
||||
}
|
||||
|
||||
/* Separator icon */
|
||||
.hv-breadcrumbs__separator {
|
||||
@apply size-3 text-muted rtl:rotate-180;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
/* Adapted from HeroUI v3, ce90ea3. Copyright 2025 NextUI Inc.
|
||||
* See third-party/HEROUI-LICENSE. Modified: hv- class prefix. */
|
||||
|
||||
/* Base empty-state styles */
|
||||
.hv-empty-state {
|
||||
@apply p-2 text-sm text-muted;
|
||||
}
|
||||
@@ -0,0 +1,166 @@
|
||||
/* Adapted from HeroUI v3, ce90ea3. Copyright 2025 NextUI Inc.
|
||||
* See third-party/HEROUI-LICENSE. Modified: hv- class prefix. */
|
||||
|
||||
.hv-typography {
|
||||
@apply text-foreground;
|
||||
}
|
||||
|
||||
.hv-typography-prose {
|
||||
@apply text-foreground;
|
||||
}
|
||||
|
||||
.hv-typography-prose h1 {
|
||||
@apply text-4xl font-semibold tracking-tight;
|
||||
}
|
||||
|
||||
.hv-typography-prose h2 {
|
||||
@apply text-3xl font-semibold tracking-tight;
|
||||
}
|
||||
|
||||
.hv-typography-prose h3 {
|
||||
@apply text-2xl font-semibold tracking-tight;
|
||||
}
|
||||
|
||||
.hv-typography-prose h4 {
|
||||
@apply text-xl font-semibold tracking-tight;
|
||||
}
|
||||
|
||||
.hv-typography-prose h5 {
|
||||
@apply text-lg font-semibold tracking-tight;
|
||||
}
|
||||
|
||||
.hv-typography-prose h6 {
|
||||
@apply text-base font-semibold tracking-tight;
|
||||
}
|
||||
|
||||
.hv-typography-prose p {
|
||||
@apply text-base leading-7;
|
||||
}
|
||||
|
||||
.hv-typography-prose code {
|
||||
@apply rounded-md bg-default px-1.5 py-0.5 font-mono text-sm text-foreground;
|
||||
}
|
||||
|
||||
.hv-typography-prose a {
|
||||
@apply font-medium text-link underline underline-offset-4;
|
||||
}
|
||||
|
||||
.hv-typography-prose blockquote {
|
||||
@apply mt-4 border-s-4 border-border ps-4 text-muted italic;
|
||||
}
|
||||
|
||||
.hv-typography-prose ul {
|
||||
@apply my-4 list-disc space-y-2 ps-6;
|
||||
}
|
||||
|
||||
.hv-typography-prose ol {
|
||||
@apply my-4 list-decimal space-y-2 ps-6;
|
||||
}
|
||||
|
||||
.hv-typography-prose li {
|
||||
@apply text-base leading-7;
|
||||
}
|
||||
|
||||
.hv-typography-prose hr {
|
||||
@apply my-8 border-separator;
|
||||
}
|
||||
|
||||
.hv-typography-prose pre {
|
||||
@apply my-4 overflow-x-auto rounded-xl bg-default p-4 font-mono text-sm leading-relaxed;
|
||||
}
|
||||
|
||||
.hv-typography-prose strong {
|
||||
@apply font-semibold text-foreground;
|
||||
}
|
||||
|
||||
.hv-typography-prose em {
|
||||
@apply italic;
|
||||
}
|
||||
|
||||
.hv-typography-prose img {
|
||||
@apply my-4 rounded-xl;
|
||||
}
|
||||
|
||||
.hv-typography--h1 {
|
||||
@apply text-4xl font-semibold tracking-tight;
|
||||
}
|
||||
|
||||
.hv-typography--h2 {
|
||||
@apply text-3xl font-semibold tracking-tight;
|
||||
}
|
||||
|
||||
.hv-typography--h3 {
|
||||
@apply text-2xl font-semibold tracking-tight;
|
||||
}
|
||||
|
||||
.hv-typography--h4 {
|
||||
@apply text-xl font-semibold tracking-tight;
|
||||
}
|
||||
|
||||
.hv-typography--h5 {
|
||||
@apply text-lg font-semibold tracking-tight;
|
||||
}
|
||||
|
||||
.hv-typography--h6 {
|
||||
@apply text-base font-semibold tracking-tight;
|
||||
}
|
||||
|
||||
.hv-typography--body {
|
||||
@apply text-base leading-7;
|
||||
}
|
||||
|
||||
.hv-typography--body-sm {
|
||||
@apply text-sm leading-6;
|
||||
}
|
||||
|
||||
.hv-typography--body-xs {
|
||||
@apply text-xs leading-5;
|
||||
}
|
||||
|
||||
.hv-typography--code {
|
||||
@apply rounded-md bg-default px-1.5 py-0.5 font-mono text-sm text-foreground;
|
||||
}
|
||||
|
||||
.hv-typography--align-start {
|
||||
@apply text-start;
|
||||
}
|
||||
|
||||
.hv-typography--align-center {
|
||||
@apply text-center;
|
||||
}
|
||||
|
||||
.hv-typography--align-end {
|
||||
@apply text-end;
|
||||
}
|
||||
|
||||
.hv-typography--align-justify {
|
||||
@apply text-justify;
|
||||
}
|
||||
|
||||
.hv-typography--color-default {
|
||||
@apply text-foreground;
|
||||
}
|
||||
|
||||
.hv-typography--color-muted {
|
||||
@apply text-muted;
|
||||
}
|
||||
|
||||
.hv-typography--truncate {
|
||||
@apply block truncate;
|
||||
}
|
||||
|
||||
.hv-typography--weight-normal {
|
||||
@apply font-normal;
|
||||
}
|
||||
|
||||
.hv-typography--weight-medium {
|
||||
@apply font-medium;
|
||||
}
|
||||
|
||||
.hv-typography--weight-semibold {
|
||||
@apply font-semibold;
|
||||
}
|
||||
|
||||
.hv-typography--weight-bold {
|
||||
@apply font-bold;
|
||||
}
|
||||
@@ -15,6 +15,10 @@
|
||||
@import "./components/label.css" layer(components);
|
||||
@import "./components/description.css" layer(components);
|
||||
@import "./components/surface.css" layer(components);
|
||||
/* Keep breadcrumbs before link.css, matching the baseline component order.
|
||||
* Breadcrumb link rules then override Link defaults, while Link's disabled
|
||||
* rule still applies to non-current breadcrumb links. */
|
||||
@import "./components/breadcrumbs.css" layer(components);
|
||||
@import "./components/link.css" layer(components);
|
||||
@import "./components/spinner.css" layer(components);
|
||||
@import "./components/avatar.css" layer(components);
|
||||
@@ -65,6 +69,10 @@
|
||||
|
||||
@import "./components/search-field.css" layer(components);
|
||||
|
||||
@import "./components/typography.css" layer(components);
|
||||
|
||||
@import "./components/empty-state.css" layer(components);
|
||||
|
||||
/* Vue disabled scopes preserve native first-legend semantics. A label in the
|
||||
* exempt legend must not pick up the baseline blanket ancestor opacity rule.
|
||||
* Local and outer disabled labels still carry hv-label--disabled. */
|
||||
|
||||
@@ -639,3 +639,67 @@ export const radioGroupVariants = tv({
|
||||
});
|
||||
|
||||
export type RadioGroupVariants = VariantProps<typeof radioGroupVariants>;
|
||||
|
||||
export const typographyVariants = tv({
|
||||
defaultVariants: {
|
||||
align: "start",
|
||||
color: "default",
|
||||
type: "body",
|
||||
},
|
||||
slots: {
|
||||
base: "hv-typography",
|
||||
prose: "hv-typography-prose",
|
||||
},
|
||||
variants: {
|
||||
align: {
|
||||
center: "hv-typography--align-center",
|
||||
end: "hv-typography--align-end",
|
||||
justify: "hv-typography--align-justify",
|
||||
start: "hv-typography--align-start",
|
||||
},
|
||||
color: {
|
||||
default: "hv-typography--color-default",
|
||||
muted: "hv-typography--color-muted",
|
||||
},
|
||||
truncate: {
|
||||
true: "hv-typography--truncate",
|
||||
},
|
||||
type: {
|
||||
body: "hv-typography--body",
|
||||
"body-sm": "hv-typography--body-sm",
|
||||
"body-xs": "hv-typography--body-xs",
|
||||
code: "hv-typography--code",
|
||||
h1: "hv-typography--h1",
|
||||
h2: "hv-typography--h2",
|
||||
h3: "hv-typography--h3",
|
||||
h4: "hv-typography--h4",
|
||||
h5: "hv-typography--h5",
|
||||
h6: "hv-typography--h6",
|
||||
},
|
||||
weight: {
|
||||
bold: "hv-typography--weight-bold",
|
||||
medium: "hv-typography--weight-medium",
|
||||
normal: "hv-typography--weight-normal",
|
||||
semibold: "hv-typography--weight-semibold",
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export type TypographyVariants = VariantProps<typeof typographyVariants>;
|
||||
|
||||
export const breadcrumbsVariants = tv({
|
||||
slots: {
|
||||
base: "hv-breadcrumbs",
|
||||
item: "hv-breadcrumbs__item",
|
||||
link: "hv-breadcrumbs__link",
|
||||
separator: "hv-breadcrumbs__separator",
|
||||
},
|
||||
});
|
||||
|
||||
export type BreadcrumbsVariants = VariantProps<typeof breadcrumbsVariants>;
|
||||
|
||||
export const emptyStateVariants = tv({
|
||||
base: "hv-empty-state",
|
||||
});
|
||||
|
||||
export type EmptyStateVariants = VariantProps<typeof emptyStateVariants>;
|
||||
|
||||
Reference in New Issue
Block a user