mirror of
https://github.com/hunvreus/basecoat.git
synced 2026-11-18 16:08:19 +00:00
Prepare 1.0.0-beta.3
This commit is contained in:
+10
-10
@@ -20,11 +20,11 @@
|
||||
--border: oklch(0.922 0 0);
|
||||
--input: oklch(0.922 0 0);
|
||||
--ring: oklch(0.708 0 0);
|
||||
--chart-1: oklch(0.646 0.222 41.116);
|
||||
--chart-2: oklch(0.6 0.118 184.704);
|
||||
--chart-3: oklch(0.398 0.07 227.392);
|
||||
--chart-4: oklch(0.828 0.189 84.429);
|
||||
--chart-5: oklch(0.769 0.188 70.08);
|
||||
--chart-1: #93c5fd;
|
||||
--chart-2: #3b82f6;
|
||||
--chart-3: #2563eb;
|
||||
--chart-4: #1d4ed8;
|
||||
--chart-5: #1e40af;
|
||||
--sidebar: oklch(0.985 0 0);
|
||||
--sidebar-foreground: oklch(0.145 0 0);
|
||||
--sidebar-primary: oklch(0.205 0 0);
|
||||
@@ -64,11 +64,11 @@
|
||||
--border: oklch(1 0 0 / 10%);
|
||||
--input: oklch(1 0 0 / 15%);
|
||||
--ring: oklch(0.556 0 0);
|
||||
--chart-1: oklch(0.488 0.243 264.376);
|
||||
--chart-2: oklch(0.696 0.17 162.48);
|
||||
--chart-3: oklch(0.769 0.188 70.08);
|
||||
--chart-4: oklch(0.627 0.265 303.9);
|
||||
--chart-5: oklch(0.645 0.246 16.439);
|
||||
--chart-1: #93c5fd;
|
||||
--chart-2: #3b82f6;
|
||||
--chart-3: #2563eb;
|
||||
--chart-4: #1d4ed8;
|
||||
--chart-5: #1e40af;
|
||||
--sidebar: oklch(0.205 0 0);
|
||||
--sidebar-foreground: oklch(0.985 0 0);
|
||||
--sidebar-primary: oklch(0.488 0.243 264.376);
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
@import "tailwindcss" source(none);
|
||||
@reference "./basecoat.css";
|
||||
@import "./basecoat-compat.css";
|
||||
@@ -0,0 +1 @@
|
||||
@import "./compat/legacy.css";
|
||||
@@ -15,12 +15,12 @@
|
||||
@import "./components/field.css";
|
||||
@import "./components/checkbox.css";
|
||||
@import "./components/input.css";
|
||||
@import "./components/input-group.css";
|
||||
@import "./components/item.css";
|
||||
@import "./components/kbd.css";
|
||||
@import "./components/label.css";
|
||||
@import "./components/native-select.css";
|
||||
@import "./components/popover.css";
|
||||
@import "./components/progress.css";
|
||||
@import "./components/radio.css";
|
||||
@import "./components/range.css";
|
||||
@import "./components/select.css";
|
||||
@@ -30,5 +30,6 @@
|
||||
@import "./components/table.css";
|
||||
@import "./components/tabs.css";
|
||||
@import "./components/textarea.css";
|
||||
@import "./components/input-group.css";
|
||||
@import "./components/toast.css";
|
||||
@import "./components/tooltip.css";
|
||||
|
||||
@@ -0,0 +1,429 @@
|
||||
/* Legacy Basecoat class API compatibility.
|
||||
This layer preserves pre-1.0 visual classes for the default Basecoat style only. */
|
||||
|
||||
@layer components {
|
||||
.btn-primary,
|
||||
.btn-secondary,
|
||||
.btn-outline,
|
||||
.btn-ghost,
|
||||
.btn-link,
|
||||
.btn-destructive,
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-xs-secondary,
|
||||
.btn-xs-outline,
|
||||
.btn-xs-ghost,
|
||||
.btn-xs-link,
|
||||
.btn-xs-destructive,
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-sm-secondary,
|
||||
.btn-sm-outline,
|
||||
.btn-sm-ghost,
|
||||
.btn-sm-link,
|
||||
.btn-sm-destructive,
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-lg-secondary,
|
||||
.btn-lg-outline,
|
||||
.btn-lg-ghost,
|
||||
.btn-lg-link,
|
||||
.btn-lg-destructive,
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-icon-secondary,
|
||||
.btn-icon-outline,
|
||||
.btn-icon-ghost,
|
||||
.btn-icon-link,
|
||||
.btn-icon-destructive,
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-xs-icon-link,
|
||||
.btn-xs-icon-destructive,
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-sm-icon-link,
|
||||
.btn-sm-icon-destructive,
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary,
|
||||
.btn-lg-icon-secondary,
|
||||
.btn-lg-icon-outline,
|
||||
.btn-lg-icon-ghost,
|
||||
.btn-lg-icon-link,
|
||||
.btn-lg-icon-destructive {
|
||||
@apply inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Button */
|
||||
@layer components {
|
||||
.btn-primary,
|
||||
.btn-secondary,
|
||||
.btn-outline,
|
||||
.btn-ghost,
|
||||
.btn-link,
|
||||
.btn-destructive,
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-xs-secondary,
|
||||
.btn-xs-outline,
|
||||
.btn-xs-ghost,
|
||||
.btn-xs-link,
|
||||
.btn-xs-destructive,
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-sm-secondary,
|
||||
.btn-sm-outline,
|
||||
.btn-sm-ghost,
|
||||
.btn-sm-link,
|
||||
.btn-sm-destructive,
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-lg-secondary,
|
||||
.btn-lg-outline,
|
||||
.btn-lg-ghost,
|
||||
.btn-lg-link,
|
||||
.btn-lg-destructive,
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-icon-secondary,
|
||||
.btn-icon-outline,
|
||||
.btn-icon-ghost,
|
||||
.btn-icon-link,
|
||||
.btn-icon-destructive,
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-xs-icon-link,
|
||||
.btn-xs-icon-destructive,
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-sm-icon-link,
|
||||
.btn-sm-icon-destructive,
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary,
|
||||
.btn-lg-icon-secondary,
|
||||
.btn-lg-icon-outline,
|
||||
.btn-lg-icon-ghost,
|
||||
.btn-lg-icon-link,
|
||||
.btn-lg-icon-destructive {
|
||||
@apply rounded-md border border-transparent bg-clip-padding text-sm font-medium focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 active:not-aria-[haspopup]:translate-y-px [&_svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.btn-primary,
|
||||
.btn-secondary,
|
||||
.btn-outline,
|
||||
.btn-ghost,
|
||||
.btn-link,
|
||||
.btn-destructive {
|
||||
@apply h-9 gap-1.5 px-2.5;
|
||||
}
|
||||
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-xs-secondary,
|
||||
.btn-xs-outline,
|
||||
.btn-xs-ghost,
|
||||
.btn-xs-link,
|
||||
.btn-xs-destructive {
|
||||
@apply h-6 gap-1 px-2 text-xs rounded-[min(var(--radius-md),8px)] [&_svg:not([class*='size-'])]:size-3;
|
||||
}
|
||||
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-sm-secondary,
|
||||
.btn-sm-outline,
|
||||
.btn-sm-ghost,
|
||||
.btn-sm-link,
|
||||
.btn-sm-destructive {
|
||||
@apply h-8 gap-1 px-2.5 rounded-[min(var(--radius-md),10px)];
|
||||
}
|
||||
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-lg-secondary,
|
||||
.btn-lg-outline,
|
||||
.btn-lg-ghost,
|
||||
.btn-lg-link,
|
||||
.btn-lg-destructive {
|
||||
@apply h-10 gap-1.5 px-2.5;
|
||||
}
|
||||
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-icon-secondary,
|
||||
.btn-icon-outline,
|
||||
.btn-icon-ghost,
|
||||
.btn-icon-link,
|
||||
.btn-icon-destructive {
|
||||
@apply size-9;
|
||||
}
|
||||
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-xs-icon-link,
|
||||
.btn-xs-icon-destructive {
|
||||
@apply size-6 rounded-[min(var(--radius-md),8px)] [&_svg:not([class*='size-'])]:size-3;
|
||||
}
|
||||
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-sm-icon-link,
|
||||
.btn-sm-icon-destructive {
|
||||
@apply size-8 rounded-[min(var(--radius-md),10px)];
|
||||
}
|
||||
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary,
|
||||
.btn-lg-icon-secondary,
|
||||
.btn-lg-icon-outline,
|
||||
.btn-lg-icon-ghost,
|
||||
.btn-lg-icon-link,
|
||||
.btn-lg-icon-destructive {
|
||||
@apply size-10;
|
||||
}
|
||||
|
||||
.btn-primary,
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary {
|
||||
@apply bg-primary text-primary-foreground hover:bg-primary/80;
|
||||
}
|
||||
|
||||
.btn-secondary,
|
||||
.btn-xs-secondary,
|
||||
.btn-sm-secondary,
|
||||
.btn-lg-secondary,
|
||||
.btn-icon-secondary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-lg-icon-secondary {
|
||||
@apply bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground;
|
||||
}
|
||||
|
||||
.btn-outline,
|
||||
.btn-xs-outline,
|
||||
.btn-sm-outline,
|
||||
.btn-lg-outline,
|
||||
.btn-icon-outline,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-lg-icon-outline {
|
||||
@apply border-border bg-background shadow-xs hover:bg-muted hover:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground;
|
||||
}
|
||||
|
||||
.btn-ghost,
|
||||
.btn-xs-ghost,
|
||||
.btn-sm-ghost,
|
||||
.btn-lg-ghost,
|
||||
.btn-icon-ghost,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-lg-icon-ghost {
|
||||
@apply hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground;
|
||||
}
|
||||
|
||||
.btn-link,
|
||||
.btn-xs-link,
|
||||
.btn-sm-link,
|
||||
.btn-lg-link,
|
||||
.btn-icon-link,
|
||||
.btn-xs-icon-link,
|
||||
.btn-sm-icon-link,
|
||||
.btn-lg-icon-link {
|
||||
@apply text-primary underline-offset-4 hover:underline;
|
||||
}
|
||||
|
||||
.btn-destructive,
|
||||
.btn-xs-destructive,
|
||||
.btn-sm-destructive,
|
||||
.btn-lg-destructive,
|
||||
.btn-icon-destructive,
|
||||
.btn-xs-icon-destructive,
|
||||
.btn-sm-icon-destructive,
|
||||
.btn-lg-icon-destructive {
|
||||
@apply bg-destructive/10 text-destructive hover:bg-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Badge legacy aliases */
|
||||
@layer components {
|
||||
.badge-primary,
|
||||
.badge-secondary,
|
||||
.badge-destructive,
|
||||
.badge-outline,
|
||||
.badge-ghost,
|
||||
.badge-link {
|
||||
@apply inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none;
|
||||
@apply h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all [&>svg]:size-3!;
|
||||
}
|
||||
|
||||
.badge-primary {
|
||||
@apply bg-primary text-primary-foreground [a]:hover:bg-primary/80;
|
||||
}
|
||||
|
||||
.badge-secondary {
|
||||
@apply bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80;
|
||||
}
|
||||
|
||||
.badge-outline {
|
||||
@apply border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground;
|
||||
}
|
||||
|
||||
.badge-destructive {
|
||||
@apply bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20;
|
||||
}
|
||||
|
||||
.badge-ghost {
|
||||
@apply hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50;
|
||||
}
|
||||
|
||||
.badge-link {
|
||||
@apply text-primary underline-offset-4 hover:underline;
|
||||
}
|
||||
}
|
||||
|
||||
/* Alert legacy aliases */
|
||||
@layer components {
|
||||
.alert-destructive {
|
||||
@apply relative w-full;
|
||||
@apply grid gap-0.5 rounded-lg border px-4 py-3 text-start text-sm has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 [&>svg]:row-span-2 [&>svg]:translate-y-0.5 [&>svg]:text-current [&>svg:not([class*='size-'])]:size-4;
|
||||
@apply text-destructive bg-card;
|
||||
}
|
||||
|
||||
.alert-destructive:has(> footer) {
|
||||
@apply pe-18;
|
||||
}
|
||||
|
||||
.alert-destructive > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
@apply min-h-4 font-medium;
|
||||
}
|
||||
|
||||
.alert-destructive:has(> svg) > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
@apply col-start-2;
|
||||
}
|
||||
|
||||
.alert-destructive > section {
|
||||
@apply grid justify-items-start gap-1 text-destructive/90 text-sm text-balance md:text-pretty [&_p:not(:last-child)]:mb-4;
|
||||
|
||||
ul {
|
||||
@apply list-inside list-disc;
|
||||
}
|
||||
}
|
||||
|
||||
.alert-destructive > footer {
|
||||
@apply absolute top-2.5 end-3;
|
||||
}
|
||||
}
|
||||
|
||||
/* Card legacy aliases */
|
||||
@layer components {
|
||||
.card-sm {
|
||||
@apply flex flex-col;
|
||||
@apply ring-foreground/10 bg-card text-card-foreground overflow-hidden rounded-xl text-sm shadow-xs ring-1 has-[>img:first-child]:pt-0 [&>img:first-child]:rounded-t-xl [&>img:last-child]:rounded-b-xl;
|
||||
@apply gap-4 py-4;
|
||||
|
||||
> header {
|
||||
@apply @container/card-header grid auto-rows-min items-start has-[>[data-slot=card-action],>.card-action]:grid-cols-[1fr_auto] has-[>p]:grid-rows-[auto_auto];
|
||||
@apply gap-1 rounded-t-xl px-4 [.border-b]:pb-4;
|
||||
}
|
||||
|
||||
> header > :is(h2, h3, [data-title], .card-title) {
|
||||
@apply text-sm leading-normal font-medium;
|
||||
}
|
||||
|
||||
> header > :is(p, [data-description], .card-description) {
|
||||
@apply text-muted-foreground text-sm;
|
||||
}
|
||||
|
||||
> header > :is([data-slot='card-action'], .card-action) {
|
||||
@apply col-start-2 row-span-2 row-start-1 self-start justify-self-end;
|
||||
}
|
||||
|
||||
> section {
|
||||
@apply px-4;
|
||||
}
|
||||
|
||||
> footer {
|
||||
@apply flex items-center rounded-b-xl px-4 [.border-t]:pt-4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Avatar legacy aliases */
|
||||
@layer components {
|
||||
.avatar-sm,
|
||||
.avatar-lg {
|
||||
@apply relative inline-flex shrink-0 select-none appearance-none border-0 bg-transparent p-0 align-middle outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 after:absolute after:inset-0 after:rounded-[inherit] after:border after:border-border after:mix-blend-darken dark:after:mix-blend-lighten;
|
||||
@apply rounded-full after:rounded-[inherit];
|
||||
}
|
||||
|
||||
.avatar-sm {
|
||||
@apply size-6;
|
||||
}
|
||||
|
||||
.avatar-lg {
|
||||
@apply size-10;
|
||||
}
|
||||
|
||||
.avatar-sm > img,
|
||||
.avatar-lg > img {
|
||||
@apply absolute inset-0 aspect-square size-full rounded-[inherit] object-cover;
|
||||
}
|
||||
|
||||
.avatar-sm > span:not([data-badge]),
|
||||
.avatar-lg > span:not([data-badge]) {
|
||||
@apply flex size-full items-center justify-center rounded-[inherit] bg-muted text-muted-foreground;
|
||||
}
|
||||
|
||||
.avatar-sm > span:not([data-badge]) {
|
||||
@apply text-xs;
|
||||
}
|
||||
|
||||
.avatar-sm > [data-badge],
|
||||
.avatar-lg > [data-badge] {
|
||||
@apply absolute end-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-blend-color ring-2 select-none;
|
||||
@apply bg-primary text-primary-foreground ring-background;
|
||||
}
|
||||
|
||||
.avatar-sm > [data-badge] {
|
||||
@apply size-2 [&>svg]:hidden;
|
||||
}
|
||||
|
||||
.avatar-lg > [data-badge] {
|
||||
@apply size-3 [&>svg]:size-2;
|
||||
}
|
||||
|
||||
.avatar-group > :is(.avatar-sm, .avatar-lg) {
|
||||
@apply ring-2 ring-background;
|
||||
}
|
||||
}
|
||||
@@ -1,22 +1,18 @@
|
||||
/* Alert */
|
||||
@layer components {
|
||||
.alert,
|
||||
.alert-destructive {
|
||||
.alert {
|
||||
@apply relative w-full;
|
||||
}
|
||||
|
||||
.alert:has(> footer),
|
||||
.alert-destructive:has(> footer) {
|
||||
@apply pe-18;
|
||||
.alert:has(> footer) {
|
||||
@apply pe-[4.5rem];
|
||||
}
|
||||
|
||||
.alert > :is(h2, h3, h4, h5, h6, strong, [data-title]),
|
||||
.alert-destructive > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
.alert > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
@apply min-h-4;
|
||||
}
|
||||
|
||||
.alert > section,
|
||||
.alert-destructive > section {
|
||||
.alert > section {
|
||||
@apply grid justify-items-start gap-1;
|
||||
|
||||
ul {
|
||||
@@ -24,8 +20,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.alert > footer,
|
||||
.alert-destructive > footer {
|
||||
.alert > footer {
|
||||
@apply absolute;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,34 +1,26 @@
|
||||
/* Avatar */
|
||||
@layer components {
|
||||
.avatar,
|
||||
.avatar-sm,
|
||||
.avatar-lg {
|
||||
.avatar {
|
||||
@apply relative inline-flex shrink-0 select-none appearance-none border-0 bg-transparent p-0 align-middle outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 after:absolute after:inset-0 after:rounded-[inherit] after:border after:border-border after:mix-blend-darken dark:after:mix-blend-lighten;
|
||||
}
|
||||
|
||||
.avatar > img,
|
||||
.avatar-sm > img,
|
||||
.avatar-lg > img {
|
||||
.avatar > img {
|
||||
@apply absolute inset-0 aspect-square size-full rounded-[inherit] object-cover;
|
||||
}
|
||||
|
||||
.avatar > span:not([data-badge]),
|
||||
.avatar-sm > span:not([data-badge]),
|
||||
.avatar-lg > span:not([data-badge]) {
|
||||
.avatar > span:not([data-badge]) {
|
||||
@apply flex size-full items-center justify-center rounded-[inherit] text-sm;
|
||||
}
|
||||
|
||||
.avatar-sm > span:not([data-badge]) {
|
||||
.avatar[data-size='sm'] > span:not([data-badge]) {
|
||||
@apply text-xs;
|
||||
}
|
||||
|
||||
.avatar > [data-badge],
|
||||
.avatar-sm > [data-badge],
|
||||
.avatar-lg > [data-badge] {
|
||||
.avatar > [data-badge] {
|
||||
@apply absolute end-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-blend-color ring-2 select-none;
|
||||
}
|
||||
|
||||
.avatar-sm > [data-badge] {
|
||||
.avatar[data-size='sm'] > [data-badge] {
|
||||
@apply size-2 [&>svg]:hidden;
|
||||
}
|
||||
|
||||
@@ -36,7 +28,7 @@
|
||||
@apply size-2.5 [&>svg]:size-2;
|
||||
}
|
||||
|
||||
.avatar-lg > [data-badge] {
|
||||
.avatar[data-size='lg'] > [data-badge] {
|
||||
@apply size-3 [&>svg]:size-2;
|
||||
}
|
||||
|
||||
@@ -44,7 +36,7 @@
|
||||
@apply flex -space-x-2;
|
||||
}
|
||||
|
||||
.avatar-group > :is(.avatar, .avatar-sm, .avatar-lg),
|
||||
.avatar-group > .avatar,
|
||||
.avatar-group > [data-count] {
|
||||
@apply ring-2 ring-background;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
/* Badge */
|
||||
@layer components {
|
||||
.badge,
|
||||
.badge-primary,
|
||||
.badge-secondary,
|
||||
.badge-destructive,
|
||||
.badge-outline,
|
||||
.badge-ghost,
|
||||
.badge-link {
|
||||
.badge {
|
||||
@apply inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
@apply relative z-10;
|
||||
}
|
||||
|
||||
> :is(hr[role='separator'], .button-group-separator) {
|
||||
> hr[role='separator'] {
|
||||
@apply relative w-px h-auto self-stretch shrink-0 border-0 my-px mx-0;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
&[data-orientation='vertical'] {
|
||||
@apply flex-col;
|
||||
|
||||
> :is(hr[role='separator'], .button-group-separator) {
|
||||
> hr[role='separator'] {
|
||||
@apply w-auto h-px mx-px my-0;
|
||||
}
|
||||
|
||||
@@ -51,8 +51,4 @@
|
||||
.button-group > :is(span, label, output) {
|
||||
@apply flex items-center [&_svg]:pointer-events-none;
|
||||
}
|
||||
|
||||
.button-group-separator {
|
||||
@apply relative self-stretch shrink-0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,61 +1,6 @@
|
||||
/* Button */
|
||||
@layer components {
|
||||
.btn,
|
||||
.btn-primary,
|
||||
.btn-secondary,
|
||||
.btn-outline,
|
||||
.btn-ghost,
|
||||
.btn-link,
|
||||
.btn-destructive,
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-xs-secondary,
|
||||
.btn-xs-outline,
|
||||
.btn-xs-ghost,
|
||||
.btn-xs-link,
|
||||
.btn-xs-destructive,
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-sm-secondary,
|
||||
.btn-sm-outline,
|
||||
.btn-sm-ghost,
|
||||
.btn-sm-link,
|
||||
.btn-sm-destructive,
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-lg-secondary,
|
||||
.btn-lg-outline,
|
||||
.btn-lg-ghost,
|
||||
.btn-lg-link,
|
||||
.btn-lg-destructive,
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-icon-secondary,
|
||||
.btn-icon-outline,
|
||||
.btn-icon-ghost,
|
||||
.btn-icon-link,
|
||||
.btn-icon-destructive,
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-xs-icon-link,
|
||||
.btn-xs-icon-destructive,
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-sm-icon-link,
|
||||
.btn-sm-icon-destructive,
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary,
|
||||
.btn-lg-icon-secondary,
|
||||
.btn-lg-icon-outline,
|
||||
.btn-lg-icon-ghost,
|
||||
.btn-lg-icon-link,
|
||||
.btn-lg-icon-destructive {
|
||||
.btn {
|
||||
@apply inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/* Card */
|
||||
@layer components {
|
||||
.card,
|
||||
.card-sm {
|
||||
.card {
|
||||
@apply flex flex-col;
|
||||
|
||||
> header {
|
||||
|
||||
@@ -24,8 +24,16 @@
|
||||
@apply border-0;
|
||||
}
|
||||
|
||||
.dropdown-menu :is([data-shortcut], kbd:last-child, .kbd:last-child) {
|
||||
@apply ms-auto shrink-0 text-end;
|
||||
}
|
||||
|
||||
.dropdown-menu [data-shortcut] {
|
||||
@apply ms-auto;
|
||||
@apply ps-8;
|
||||
}
|
||||
|
||||
.dropdown-menu :is(kbd:last-child, .kbd:last-child):not([data-shortcut]) {
|
||||
@apply ms-8;
|
||||
}
|
||||
|
||||
.dropdown-menu [data-indicator] {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
@apply flex w-full max-w-sm min-w-0 flex-col items-center text-balance;
|
||||
}
|
||||
|
||||
.empty p {
|
||||
.empty > header > p {
|
||||
@apply [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,29 +10,26 @@
|
||||
}
|
||||
|
||||
.field {
|
||||
@apply flex w-full flex-col data-[invalid=true]:text-destructive [&>*]:w-full [&>.sr-only]:w-auto;
|
||||
@apply flex w-full flex-col data-invalid:text-destructive data-[invalid=true]:text-destructive [&>*]:w-full [&>.sr-only]:w-auto;
|
||||
|
||||
&[data-orientation='horizontal'] {
|
||||
@apply flex-row items-center [&>label]:flex-auto has-[>section]:items-start has-[>section]:[&>[type=checkbox],[type=radio]]:mt-px [&_p]:text-balance;
|
||||
@apply flex-row items-center [&>*]:w-auto [&>label]:flex-auto has-[>section]:items-start has-[>section]:[&>section]:flex-1 has-[>section]:[&>[type=checkbox],[type=radio]]:mt-px [&_p]:text-balance;
|
||||
}
|
||||
|
||||
&[data-orientation='responsive'] {
|
||||
@apply flex-col @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto @md/field-group:has-[>section]:items-start @md/field-group:[&>label]:flex-auto @md/field-group:has-[>section]:[&>[type=checkbox],[type=radio]]:mt-px;
|
||||
}
|
||||
|
||||
section,
|
||||
.field-content {
|
||||
section {
|
||||
@apply flex flex-1 flex-col leading-snug;
|
||||
}
|
||||
|
||||
h2,
|
||||
h3,
|
||||
.field-title {
|
||||
h3 {
|
||||
@apply flex w-fit items-center;
|
||||
}
|
||||
|
||||
[role='alert'],
|
||||
.field-error {
|
||||
[role='alert'] {
|
||||
@apply font-normal;
|
||||
|
||||
ul {
|
||||
@@ -42,6 +39,7 @@
|
||||
}
|
||||
|
||||
.field > label,
|
||||
.field > section > label,
|
||||
label:has(> .field) {
|
||||
@apply w-fit;
|
||||
}
|
||||
@@ -59,7 +57,6 @@
|
||||
@apply flex-col;
|
||||
}
|
||||
|
||||
.field-description,
|
||||
.fieldset legend + p,
|
||||
.field > p,
|
||||
.field section > p {
|
||||
@@ -67,8 +64,7 @@
|
||||
}
|
||||
|
||||
.field > p,
|
||||
.field section > p,
|
||||
.field-description {
|
||||
.field section > p {
|
||||
@apply last:mt-0 nth-last-2:-mt-1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
/* Input Group */
|
||||
@layer components {
|
||||
.input-group {
|
||||
@apply relative isolate flex w-full min-w-0 items-center overflow-hidden outline-none;
|
||||
@apply relative isolate flex w-full min-w-0 items-center outline-none;
|
||||
|
||||
&[data-orientation='vertical'] {
|
||||
&[data-orientation='vertical'],
|
||||
&:has(> [data-align='block-start']),
|
||||
&:has(> [data-align='block-end']) {
|
||||
@apply h-auto flex-col items-stretch;
|
||||
}
|
||||
}
|
||||
|
||||
.input-group > :is(input, textarea, select, [data-control]) {
|
||||
@apply text-foreground placeholder:text-muted-foreground block min-w-0 flex-1 appearance-none rounded-none border-0 bg-transparent shadow-none outline-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 disabled:bg-transparent;
|
||||
@apply text-foreground placeholder:text-muted-foreground block min-w-0 flex-1 appearance-none rounded-none border-0 bg-transparent shadow-none outline-none ring-0 focus-visible:ring-0 aria-invalid:ring-0;
|
||||
}
|
||||
|
||||
.input-group > :is(input, select, [data-control]) {
|
||||
@@ -20,10 +22,20 @@
|
||||
@apply w-full;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(input, select, [data-control]) {
|
||||
.input-group:is([data-orientation='vertical'], :has(> [data-align='block-start']), :has(> [data-align='block-end'])) > :is(input, select, [data-control]) {
|
||||
@apply h-auto flex-none;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical']:has(> footer[data-align='end']) > :is(input, select, [data-control]),
|
||||
.input-group:has(> [data-align='block-end']) > :is(input, select, [data-control]) {
|
||||
@apply pt-3;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical']:has(> header[data-align='start']) > :is(input, select, [data-control]),
|
||||
.input-group:has(> [data-align='block-start']) > :is(input, select, [data-control]) {
|
||||
@apply pb-3;
|
||||
}
|
||||
|
||||
.input-group > textarea {
|
||||
@apply field-sizing-content min-h-20 w-full resize-none;
|
||||
}
|
||||
@@ -40,11 +52,23 @@
|
||||
@apply pointer-events-none;
|
||||
}
|
||||
|
||||
.input-group > [data-align='start'] {
|
||||
.input-group > :is([data-align='start'], [data-align='inline-start'], [data-align='block-start']) {
|
||||
@apply order-first;
|
||||
}
|
||||
|
||||
.input-group > [data-align='end'] {
|
||||
.input-group > :is([data-align='end'], [data-align='inline-end'], [data-align='block-end']) {
|
||||
@apply order-last;
|
||||
}
|
||||
|
||||
.input-group > :is([data-align='block-start'], [data-align='block-end']) {
|
||||
@apply w-full justify-start;
|
||||
}
|
||||
|
||||
.input-group > button:is([data-align='start'], [data-align='inline-start']) {
|
||||
@apply ms-1;
|
||||
}
|
||||
|
||||
.input-group > button:is([data-align='end'], [data-align='inline-end']) {
|
||||
@apply me-1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
@apply flex shrink-0 items-center justify-center [&_svg]:pointer-events-none;
|
||||
}
|
||||
|
||||
.item > figure:has(img) {
|
||||
.item > figure:has(> img) {
|
||||
@apply overflow-hidden [&_img]:size-full [&_img]:object-cover;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,4 @@
|
||||
.kbd {
|
||||
@apply pointer-events-none inline-flex items-center justify-center select-none;
|
||||
}
|
||||
|
||||
.kbd-group {
|
||||
@apply inline-flex items-center;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* Label */
|
||||
@layer components {
|
||||
.field > label,
|
||||
.field > section > label,
|
||||
.label {
|
||||
@apply flex items-center select-none peer-disabled:pointer-events-none;
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
/* Progress */
|
||||
@layer components {
|
||||
.progress {
|
||||
@apply flex w-full items-center overflow-hidden;
|
||||
}
|
||||
|
||||
.progress:dir(rtl) {
|
||||
@apply flex-row-reverse;
|
||||
}
|
||||
|
||||
.progress > span {
|
||||
@apply h-full transition-all;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
@layer theme, base, components, utilities;
|
||||
@import "tailwindcss" source("../pages");
|
||||
|
||||
.theme-neutral {
|
||||
--chart-1: oklch(0.87 0 0);
|
||||
--chart-2: oklch(0.556 0 0);
|
||||
--color-chart-1: var(--chart-1);
|
||||
--color-chart-2: var(--chart-2);
|
||||
}
|
||||
|
||||
:root {
|
||||
--landing-demo-surface-radius: 0.375rem;
|
||||
--chart-bar-radius: 6px;
|
||||
}
|
||||
|
||||
[data-style-variant="nova"] {
|
||||
--landing-demo-surface-radius: 0.5rem;
|
||||
}
|
||||
|
||||
[data-style-variant="maia"],
|
||||
[data-style-variant="luma"],
|
||||
[data-style-variant="rhea"] {
|
||||
--landing-demo-surface-radius: 1rem;
|
||||
}
|
||||
|
||||
[data-style-variant="lyra"],
|
||||
[data-style-variant="sera"] {
|
||||
--landing-demo-surface-radius: 0;
|
||||
--chart-bar-radius: 0;
|
||||
}
|
||||
|
||||
.landing-demo-surface {
|
||||
border-radius: var(--landing-demo-surface-radius);
|
||||
}
|
||||
|
||||
.theme-neutral .card > footer,
|
||||
.theme-neutral hr {
|
||||
border-color: var(--border);
|
||||
}
|
||||
|
||||
.landing-demo-chart-bar {
|
||||
border-start-start-radius: var(--chart-bar-radius);
|
||||
border-start-end-radius: var(--chart-bar-radius);
|
||||
}
|
||||
+145
-299
@@ -1,247 +1,64 @@
|
||||
/* Button */
|
||||
@layer components {
|
||||
.btn,
|
||||
.btn-primary,
|
||||
.btn-secondary,
|
||||
.btn-outline,
|
||||
.btn-ghost,
|
||||
.btn-link,
|
||||
.btn-destructive,
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-xs-secondary,
|
||||
.btn-xs-outline,
|
||||
.btn-xs-ghost,
|
||||
.btn-xs-link,
|
||||
.btn-xs-destructive,
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-sm-secondary,
|
||||
.btn-sm-outline,
|
||||
.btn-sm-ghost,
|
||||
.btn-sm-link,
|
||||
.btn-sm-destructive,
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-lg-secondary,
|
||||
.btn-lg-outline,
|
||||
.btn-lg-ghost,
|
||||
.btn-lg-link,
|
||||
.btn-lg-destructive,
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-icon-secondary,
|
||||
.btn-icon-outline,
|
||||
.btn-icon-ghost,
|
||||
.btn-icon-link,
|
||||
.btn-icon-destructive,
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-xs-icon-link,
|
||||
.btn-xs-icon-destructive,
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-sm-icon-link,
|
||||
.btn-sm-icon-destructive,
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary,
|
||||
.btn-lg-icon-secondary,
|
||||
.btn-lg-icon-outline,
|
||||
.btn-lg-icon-ghost,
|
||||
.btn-lg-icon-link,
|
||||
.btn-lg-icon-destructive {
|
||||
.btn {
|
||||
@apply rounded-4xl border border-transparent bg-clip-padding text-sm font-medium focus-visible:border-ring focus-visible:ring-ring/30 focus-visible:ring-[3px] aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 active:not-aria-[haspopup]:translate-y-px [&_svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.btn,
|
||||
.btn-primary,
|
||||
.btn-secondary,
|
||||
.btn-outline,
|
||||
.btn-ghost,
|
||||
.btn-link,
|
||||
.btn-destructive {
|
||||
@apply h-9 gap-1.5 px-3;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-2.5;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-2.5;
|
||||
}
|
||||
.btn:not([data-size]),
|
||||
.btn[data-size='default'] {
|
||||
@apply h-9 gap-1.5 px-3 has-[[data-icon='inline-end']]:pr-2.5 has-[[data-icon='inline-start']]:pl-2.5;
|
||||
}
|
||||
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-xs-secondary,
|
||||
.btn-xs-outline,
|
||||
.btn-xs-ghost,
|
||||
.btn-xs-link,
|
||||
.btn-xs-destructive {
|
||||
@apply h-6 gap-1 px-2.5 text-xs [&_svg:not([class*='size-'])]:size-3;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-2;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-2;
|
||||
}
|
||||
.btn[data-size='xs'] {
|
||||
@apply h-6 gap-1 px-2.5 text-xs [&_svg:not([class*='size-'])]:size-3 has-[[data-icon='inline-end']]:pr-2 has-[[data-icon='inline-start']]:pl-2;
|
||||
}
|
||||
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-sm-secondary,
|
||||
.btn-sm-outline,
|
||||
.btn-sm-ghost,
|
||||
.btn-sm-link,
|
||||
.btn-sm-destructive {
|
||||
@apply h-8 gap-1 px-3;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-2;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-2;
|
||||
}
|
||||
.btn[data-size='sm'] {
|
||||
@apply h-8 gap-1 px-3 has-[[data-icon='inline-end']]:pr-2 has-[[data-icon='inline-start']]:pl-2;
|
||||
}
|
||||
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-lg-secondary,
|
||||
.btn-lg-outline,
|
||||
.btn-lg-ghost,
|
||||
.btn-lg-link,
|
||||
.btn-lg-destructive {
|
||||
@apply h-10 gap-1.5 px-4;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-3;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-3;
|
||||
}
|
||||
.btn[data-size='lg'] {
|
||||
@apply h-10 gap-1.5 px-4 has-[[data-icon='inline-end']]:pr-3 has-[[data-icon='inline-start']]:pl-3;
|
||||
}
|
||||
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-icon-secondary,
|
||||
.btn-icon-outline,
|
||||
.btn-icon-ghost,
|
||||
.btn-icon-link,
|
||||
.btn-icon-destructive {
|
||||
.btn[data-size='icon'] {
|
||||
@apply size-9;
|
||||
}
|
||||
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-xs-icon-link,
|
||||
.btn-xs-icon-destructive {
|
||||
.btn[data-size='icon-xs'] {
|
||||
@apply size-6 [&_svg:not([class*='size-'])]:size-3;
|
||||
}
|
||||
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-sm-icon-link,
|
||||
.btn-sm-icon-destructive {
|
||||
.btn[data-size='icon-sm'] {
|
||||
@apply size-8;
|
||||
}
|
||||
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary,
|
||||
.btn-lg-icon-secondary,
|
||||
.btn-lg-icon-outline,
|
||||
.btn-lg-icon-ghost,
|
||||
.btn-lg-icon-link,
|
||||
.btn-lg-icon-destructive {
|
||||
.btn[data-size='icon-lg'] {
|
||||
@apply size-10;
|
||||
}
|
||||
|
||||
.btn,
|
||||
.btn-primary,
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary {
|
||||
.btn:not([data-variant]),
|
||||
.btn[data-variant='primary'] {
|
||||
@apply bg-primary text-primary-foreground hover:bg-primary/80;
|
||||
}
|
||||
|
||||
.btn-secondary,
|
||||
.btn-xs-secondary,
|
||||
.btn-sm-secondary,
|
||||
.btn-lg-secondary,
|
||||
.btn-icon-secondary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-lg-icon-secondary {
|
||||
.btn[data-variant='secondary'] {
|
||||
@apply bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground;
|
||||
}
|
||||
|
||||
.btn-outline,
|
||||
.btn-xs-outline,
|
||||
.btn-sm-outline,
|
||||
.btn-lg-outline,
|
||||
.btn-icon-outline,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-lg-icon-outline {
|
||||
.btn[data-variant='outline'] {
|
||||
@apply border-border bg-background hover:bg-muted hover:text-foreground dark:bg-transparent dark:hover:bg-input/30 aria-expanded:bg-muted aria-expanded:text-foreground;
|
||||
}
|
||||
|
||||
.btn-ghost,
|
||||
.btn-xs-ghost,
|
||||
.btn-sm-ghost,
|
||||
.btn-lg-ghost,
|
||||
.btn-icon-ghost,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-lg-icon-ghost {
|
||||
.btn[data-variant='ghost'] {
|
||||
@apply hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground;
|
||||
}
|
||||
|
||||
.btn-link,
|
||||
.btn-xs-link,
|
||||
.btn-sm-link,
|
||||
.btn-lg-link,
|
||||
.btn-icon-link,
|
||||
.btn-xs-icon-link,
|
||||
.btn-sm-icon-link,
|
||||
.btn-lg-icon-link {
|
||||
.btn[data-variant='link'] {
|
||||
@apply text-primary underline-offset-4 hover:underline;
|
||||
}
|
||||
|
||||
.btn-destructive,
|
||||
.btn-xs-destructive,
|
||||
.btn-sm-destructive,
|
||||
.btn-lg-destructive,
|
||||
.btn-icon-destructive,
|
||||
.btn-xs-icon-destructive,
|
||||
.btn-sm-icon-destructive,
|
||||
.btn-lg-icon-destructive {
|
||||
.btn[data-variant='destructive'] {
|
||||
@apply bg-destructive/10 text-destructive hover:bg-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40;
|
||||
}
|
||||
|
||||
@@ -250,8 +67,8 @@
|
||||
@apply has-[>.button-group]:gap-2;
|
||||
}
|
||||
|
||||
.button-group:has(> :is(.btn-outline, .btn-icon-outline, .btn-xs-outline, .btn-xs-icon-outline, .btn-sm-outline, .btn-sm-icon-outline, .btn-lg-outline, .btn-lg-icon-outline)),
|
||||
.button-group:has(> .select > button:is(.btn-outline, .btn-icon-outline, .btn-xs-outline, .btn-xs-icon-outline, .btn-sm-outline, .btn-sm-icon-outline, .btn-lg-outline, .btn-lg-icon-outline)) {
|
||||
.button-group:has(> .btn[data-variant='outline']),
|
||||
.button-group:has(> .select > button.btn[data-variant='outline']) {
|
||||
> .input,
|
||||
> .select > button {
|
||||
@apply border-border focus-visible:border-ring;
|
||||
@@ -276,8 +93,7 @@
|
||||
@apply bg-muted gap-2 rounded-4xl border px-2.5 text-sm font-medium [&_svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.button-group > hr[role='separator'],
|
||||
.button-group-separator {
|
||||
.button-group > hr[role='separator'] {
|
||||
@apply bg-input;
|
||||
}
|
||||
|
||||
@@ -389,8 +205,7 @@
|
||||
}
|
||||
|
||||
/* Alert */
|
||||
.alert,
|
||||
.alert-destructive {
|
||||
.alert {
|
||||
@apply grid gap-0.5 rounded-2xl border px-4 py-3 text-start text-sm has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 [&>svg]:row-span-2 [&>svg]:translate-y-0.5 [&>svg]:text-current [&>svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
@@ -398,35 +213,33 @@
|
||||
@apply bg-card text-card-foreground;
|
||||
}
|
||||
|
||||
.alert-destructive {
|
||||
.alert[data-variant='destructive'] {
|
||||
@apply text-destructive bg-card [&>svg]:text-current;
|
||||
}
|
||||
|
||||
.alert > :is(h2, h3, h4, h5, h6, strong, [data-title]),
|
||||
.alert-destructive > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
.alert[data-variant='destructive'] > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
@apply font-medium;
|
||||
}
|
||||
|
||||
|
||||
:is(.alert, .alert-destructive):has(> svg) > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
.alert:has(> svg) > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
@apply col-start-2;
|
||||
}
|
||||
.alert > section {
|
||||
@apply text-muted-foreground text-sm text-balance md:text-pretty [&_p:not(:last-child)]:mb-4;
|
||||
}
|
||||
|
||||
.alert-destructive > section {
|
||||
.alert[data-variant='destructive'] > section {
|
||||
@apply text-destructive/90 text-sm text-balance md:text-pretty [&_p:not(:last-child)]:mb-4;
|
||||
}
|
||||
|
||||
.alert > footer,
|
||||
.alert-destructive > footer {
|
||||
.alert[data-variant='destructive'] > footer {
|
||||
@apply top-2.5 end-3;
|
||||
}
|
||||
/* Avatar */
|
||||
.avatar,
|
||||
.avatar-sm,
|
||||
.avatar-lg {
|
||||
.avatar {
|
||||
@apply rounded-full after:rounded-[inherit];
|
||||
}
|
||||
|
||||
@@ -434,29 +247,23 @@
|
||||
@apply size-8;
|
||||
}
|
||||
|
||||
.avatar-sm {
|
||||
.avatar[data-size='sm'] {
|
||||
@apply size-6;
|
||||
}
|
||||
|
||||
.avatar-lg {
|
||||
.avatar[data-size='lg'] {
|
||||
@apply size-10;
|
||||
}
|
||||
|
||||
.avatar > span:not([data-badge]),
|
||||
.avatar-sm > span:not([data-badge]),
|
||||
.avatar-lg > span:not([data-badge]) {
|
||||
.avatar > span:not([data-badge]) {
|
||||
@apply bg-muted text-muted-foreground rounded-[inherit];
|
||||
}
|
||||
|
||||
.avatar > img,
|
||||
.avatar-sm > img,
|
||||
.avatar-lg > img {
|
||||
.avatar > img {
|
||||
@apply rounded-[inherit];
|
||||
}
|
||||
|
||||
.avatar > [data-badge],
|
||||
.avatar-sm > [data-badge],
|
||||
.avatar-lg > [data-badge] {
|
||||
.avatar > [data-badge] {
|
||||
@apply bg-primary text-primary-foreground ring-background;
|
||||
}
|
||||
|
||||
@@ -464,47 +271,41 @@
|
||||
@apply bg-muted text-muted-foreground size-8 rounded-full text-sm [&>svg]:size-4;
|
||||
}
|
||||
|
||||
.avatar-group:has(> .avatar-sm) > [data-count] {
|
||||
.avatar-group:has(> .avatar[data-size='sm']) > [data-count] {
|
||||
@apply size-6 [&>svg]:size-3;
|
||||
}
|
||||
|
||||
.avatar-group:has(> .avatar-lg) > [data-count] {
|
||||
.avatar-group:has(> .avatar[data-size='lg']) > [data-count] {
|
||||
@apply size-10 [&>svg]:size-5;
|
||||
}
|
||||
|
||||
/* Badge */
|
||||
.badge,
|
||||
.badge-primary,
|
||||
.badge-secondary,
|
||||
.badge-destructive,
|
||||
.badge-outline,
|
||||
.badge-ghost,
|
||||
.badge-link {
|
||||
@apply h-5 gap-1 rounded-3xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&>svg]:size-3!;
|
||||
.badge {
|
||||
@apply h-5 gap-1 rounded-3xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all [&>svg]:size-3!;
|
||||
}
|
||||
|
||||
.badge,
|
||||
.badge-primary {
|
||||
.badge:not([data-variant]),
|
||||
.badge[data-variant='primary'] {
|
||||
@apply bg-primary text-primary-foreground [a]:hover:bg-primary/80;
|
||||
}
|
||||
|
||||
.badge-secondary {
|
||||
.badge[data-variant='secondary'] {
|
||||
@apply bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80;
|
||||
}
|
||||
|
||||
.badge-outline {
|
||||
.badge[data-variant='outline'] {
|
||||
@apply border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground;
|
||||
}
|
||||
|
||||
.badge-destructive {
|
||||
.badge[data-variant='destructive'] {
|
||||
@apply bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20;
|
||||
}
|
||||
|
||||
.badge-ghost {
|
||||
.badge[data-variant='ghost'] {
|
||||
@apply hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50;
|
||||
}
|
||||
|
||||
.badge-link {
|
||||
.badge[data-variant='link'] {
|
||||
@apply text-primary underline-offset-4 hover:underline;
|
||||
}
|
||||
|
||||
@@ -598,7 +399,7 @@
|
||||
|
||||
.combobox [role='option'].active,
|
||||
.combobox [role='option']:focus-visible {
|
||||
@apply bg-accent text-accent-foreground [&_svg]:text-accent-foreground;
|
||||
@apply bg-muted text-foreground [&_svg]:text-foreground;
|
||||
}
|
||||
|
||||
.combobox [role='group'] {
|
||||
@@ -658,7 +459,7 @@
|
||||
|
||||
*:not(select).select [role='option'].active,
|
||||
*:not(select).select [role='option']:focus-visible {
|
||||
@apply bg-accent text-accent-foreground [&_svg]:text-accent-foreground;
|
||||
@apply bg-muted text-foreground [&_svg]:text-foreground;
|
||||
}
|
||||
|
||||
*:not(select).select [role='group'] {
|
||||
@@ -716,7 +517,7 @@
|
||||
}
|
||||
|
||||
.dropdown-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']).active {
|
||||
@apply bg-accent text-accent-foreground;
|
||||
@apply bg-muted text-foreground;
|
||||
}
|
||||
|
||||
.dropdown-menu [data-variant='destructive'] {
|
||||
@@ -752,11 +553,11 @@
|
||||
@apply bg-border/50 -mx-1.5 my-1.5 h-px;
|
||||
}
|
||||
|
||||
.dropdown-menu [data-shortcut] {
|
||||
@apply text-muted-foreground text-xs tracking-widest;
|
||||
.dropdown-menu :is([data-shortcut], kbd:last-child) {
|
||||
@apply text-muted-foreground font-sans text-xs tracking-widest;
|
||||
}
|
||||
|
||||
.dropdown-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']):is(:focus-visible, .active) [data-shortcut] {
|
||||
.dropdown-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']):is(:focus-visible, .active) :is([data-shortcut], kbd:last-child) {
|
||||
@apply text-accent-foreground;
|
||||
}
|
||||
|
||||
@@ -780,8 +581,7 @@
|
||||
}
|
||||
|
||||
/* Card */
|
||||
.card,
|
||||
.card-sm {
|
||||
.card {
|
||||
@apply bg-card text-card-foreground ring-foreground/5 dark:ring-foreground/10 overflow-hidden rounded-4xl text-sm shadow-md ring-1 has-[>img:first-child]:pt-0 [&>img:first-child]:rounded-t-4xl [&>img:last-child]:rounded-b-4xl;
|
||||
}
|
||||
|
||||
@@ -789,48 +589,47 @@
|
||||
@apply gap-6 py-6;
|
||||
}
|
||||
|
||||
.card-sm {
|
||||
.card[data-size='sm'] {
|
||||
@apply gap-4 py-4;
|
||||
}
|
||||
|
||||
.card > header,
|
||||
.card-sm > header {
|
||||
.card > header {
|
||||
@apply gap-1.5 rounded-t-4xl px-6 [.border-b]:pb-6;
|
||||
}
|
||||
|
||||
.card-sm > header {
|
||||
.card[data-size='sm'] > header {
|
||||
@apply px-4 [.border-b]:pb-4;
|
||||
}
|
||||
|
||||
.card > header > :is(h2, h3, [data-title], .card-title),
|
||||
.card-sm > header > :is(h2, h3, [data-title], .card-title) {
|
||||
.card > header > :is(h2, h3, [data-title], .card-title) {
|
||||
@apply text-base font-medium;
|
||||
}
|
||||
|
||||
.card > header > :is(p, [data-description], .card-description),
|
||||
.card-sm > header > :is(p, [data-description], .card-description) {
|
||||
.card > header > :is(p, [data-description], .card-description) {
|
||||
@apply text-muted-foreground text-sm;
|
||||
}
|
||||
|
||||
.card > section,
|
||||
.card-sm > section {
|
||||
.card > section {
|
||||
@apply px-6;
|
||||
}
|
||||
|
||||
.card-sm > section {
|
||||
.card[data-size='sm'] > section {
|
||||
@apply px-4;
|
||||
}
|
||||
|
||||
.card > footer,
|
||||
.card-sm > footer {
|
||||
.card > footer {
|
||||
@apply rounded-b-4xl px-6 [.border-t]:pt-6;
|
||||
}
|
||||
|
||||
.card-sm > footer {
|
||||
.card[data-size='sm'] > footer {
|
||||
@apply px-4 [.border-t]:pt-4;
|
||||
}
|
||||
|
||||
/* Chart */
|
||||
.chart {
|
||||
--chart-bar-radius: 6px;
|
||||
}
|
||||
|
||||
.chart-tooltip {
|
||||
@apply border-border/50 bg-background text-foreground gap-1.5 rounded-2xl border px-2.5 py-1.5 text-xs shadow-xl;
|
||||
}
|
||||
@@ -923,8 +722,7 @@
|
||||
@apply gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3;
|
||||
}
|
||||
|
||||
.fieldset > legend,
|
||||
.field-legend {
|
||||
.fieldset > legend {
|
||||
@apply mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base;
|
||||
}
|
||||
|
||||
@@ -933,6 +731,8 @@
|
||||
@apply gap-7;
|
||||
|
||||
&[role='radiogroup'],
|
||||
&:has(> .field > input[type='checkbox']:not([role='switch'])),
|
||||
&:has(> .field > input[type='radio']),
|
||||
&[data-slot='checkbox-group'],
|
||||
&[data-slot='radio-group'] {
|
||||
@apply gap-3;
|
||||
@@ -945,15 +745,15 @@
|
||||
}
|
||||
|
||||
.field {
|
||||
@apply data-[invalid=true]:text-destructive gap-3;
|
||||
@apply data-invalid:text-destructive data-[invalid=true]:text-destructive gap-3;
|
||||
}
|
||||
|
||||
.field > section,
|
||||
.field-content {
|
||||
.field > section {
|
||||
@apply gap-1;
|
||||
}
|
||||
|
||||
.field > label,
|
||||
.field > section > label,
|
||||
label:has(> .field) {
|
||||
@apply has-[:checked]:bg-input/30 gap-2 leading-snug in-data-[disabled=true]:opacity-50;
|
||||
}
|
||||
@@ -976,18 +776,25 @@
|
||||
@apply p-4;
|
||||
}
|
||||
.field h2,
|
||||
.field h3,
|
||||
.field-title {
|
||||
.field h3 {
|
||||
@apply gap-2 leading-snug text-sm font-medium in-data-[disabled=true]:opacity-50;
|
||||
}
|
||||
|
||||
.fieldset legend + p,
|
||||
.field > p,
|
||||
.field section > p,
|
||||
.field-description {
|
||||
.field section > p {
|
||||
@apply text-muted-foreground text-start text-sm [[data-variant=legend]+&]:-mt-1.5;
|
||||
}
|
||||
|
||||
.fieldset > legend[data-variant='label'] {
|
||||
@apply mb-0;
|
||||
}
|
||||
|
||||
.fieldset > legend:not([data-variant]) + p,
|
||||
.fieldset > legend[data-variant='legend'] + p {
|
||||
@apply -mt-1.5;
|
||||
}
|
||||
|
||||
.field-separator {
|
||||
@apply -my-2 h-5 text-sm in-data-[variant=outline]:-mb-2;
|
||||
}
|
||||
@@ -996,8 +803,7 @@
|
||||
@apply text-muted-foreground px-2;
|
||||
}
|
||||
|
||||
.field [role="alert"],
|
||||
.field-error {
|
||||
.field [role="alert"] {
|
||||
@apply text-destructive text-sm;
|
||||
}
|
||||
|
||||
@@ -1006,23 +812,22 @@
|
||||
@apply h-9 has-[>textarea]:h-auto rounded-4xl border border-transparent bg-input/50 transition-[color,box-shadow,background-color] focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/30 has-[[aria-invalid=true]]:border-destructive has-[[aria-invalid=true]]:ring-3 has-[[aria-invalid=true]]:ring-destructive/20 has-[>textarea]:rounded-2xl dark:has-[[aria-invalid=true]]:ring-destructive/40;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] {
|
||||
@apply rounded-3xl;
|
||||
}
|
||||
|
||||
.input-group:has(> :is(input, textarea, select, [data-control]):disabled) {
|
||||
@apply opacity-50;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] {
|
||||
@apply rounded-3xl;
|
||||
}
|
||||
.input-group > :is(input, select, [data-control]) {
|
||||
@apply px-3 py-1 text-sm;
|
||||
}
|
||||
|
||||
.input-group:not([data-orientation='vertical']):has(> [data-align='start']) > :is(input, select, [data-control]) {
|
||||
.input-group:not([data-orientation='vertical']):has(> :is([data-align='start'], [data-align='inline-start'])) > :is(input, select, [data-control]) {
|
||||
@apply ps-1.5;
|
||||
}
|
||||
|
||||
.input-group:not([data-orientation='vertical']):has(> [data-align='end']) > :is(input, select, [data-control]) {
|
||||
.input-group:not([data-orientation='vertical']):has(> :is([data-align='end'], [data-align='inline-end'])) > :is(input, select, [data-control]) {
|
||||
@apply pe-1.5;
|
||||
}
|
||||
|
||||
@@ -1035,33 +840,66 @@
|
||||
@apply gap-2 py-2 text-sm font-medium text-muted-foreground select-none [&>svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.input-group > [data-align='start'] {
|
||||
.input-group > :is([data-align='start'], [data-align='inline-start']) {
|
||||
@apply ps-3;
|
||||
}
|
||||
|
||||
.input-group > [data-align='end'] {
|
||||
.input-group > :is([data-align='end'], [data-align='inline-end']) {
|
||||
@apply pe-3;
|
||||
}
|
||||
|
||||
.input-group > [data-align='start']:has(> button) {
|
||||
.input-group > :is([data-align='start'], [data-align='inline-start']):has(> button) {
|
||||
@apply -ms-1;
|
||||
}
|
||||
|
||||
.input-group > [data-align='end']:has(> button) {
|
||||
.input-group > :is([data-align='end'], [data-align='inline-end']):has(> button) {
|
||||
@apply -me-1;
|
||||
}
|
||||
|
||||
.input-group > [data-align='start']:has(> kbd) {
|
||||
.input-group > :is([data-align='start'], [data-align='inline-start']):has(> kbd) {
|
||||
@apply -ms-0.5;
|
||||
}
|
||||
|
||||
.input-group > [data-align='end']:has(> kbd) {
|
||||
.input-group > :is([data-align='end'], [data-align='inline-end']):has(> kbd) {
|
||||
@apply -me-0.5;
|
||||
}
|
||||
.input-group[data-orientation='vertical'] > :is(header, footer, [role='group'], [data-align]) {
|
||||
@apply px-3;
|
||||
}
|
||||
|
||||
.input-group > [data-align='block-start'] {
|
||||
@apply px-3 pt-2;
|
||||
}
|
||||
|
||||
.input-group > [data-align='block-end'] {
|
||||
@apply px-3 pb-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(header[data-align='start'], [data-align='block-start']) {
|
||||
@apply px-3 pt-3;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(footer[data-align='end'], [data-align='block-end']) {
|
||||
@apply px-3 pb-3;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical']:has(> input) > :is(header[data-align='start'], [data-align='block-start']) {
|
||||
@apply pt-3.5;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical']:has(> input) > :is(footer[data-align='end'], [data-align='block-end']) {
|
||||
@apply pb-3.5;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(header[data-align='start'], [data-align='block-start']).border-b {
|
||||
@apply pb-3.5;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(footer[data-align='end'], [data-align='block-end']).border-t {
|
||||
@apply pt-3.5;
|
||||
}
|
||||
|
||||
|
||||
.input-group > :is(kbd, span > kbd, [role='group'] > kbd, header > kbd, footer > kbd) {
|
||||
@apply rounded-3xl bg-muted-foreground/10 px-1.5;
|
||||
}
|
||||
@@ -1096,7 +934,7 @@
|
||||
@apply text-lg font-medium tracking-tight;
|
||||
}
|
||||
|
||||
.empty p {
|
||||
.empty > header > p {
|
||||
@apply text-muted-foreground text-sm/relaxed;
|
||||
}
|
||||
|
||||
@@ -1147,15 +985,15 @@
|
||||
@apply [&_svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.item > figure:has(img) {
|
||||
.item > figure:has(> img) {
|
||||
@apply size-10 overflow-hidden rounded-xl;
|
||||
}
|
||||
|
||||
.item[data-size='sm'] > figure:has(img) {
|
||||
.item[data-size='sm'] > figure:has(> img) {
|
||||
@apply size-8;
|
||||
}
|
||||
|
||||
.item[data-size='xs'] > figure:has(img) {
|
||||
.item[data-size='xs'] > figure:has(> img) {
|
||||
@apply size-6 rounded-lg;
|
||||
}
|
||||
|
||||
@@ -1205,16 +1043,16 @@
|
||||
@apply bg-muted text-muted-foreground in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 h-5.5 w-fit min-w-5.5 gap-1 rounded-lg px-1.5 font-sans text-xs font-medium [&_svg:not([class*='size-'])]:size-3;
|
||||
}
|
||||
|
||||
.kbd-group {
|
||||
@apply gap-1;
|
||||
}
|
||||
|
||||
/* Label */
|
||||
.field > label,
|
||||
.label {
|
||||
@apply gap-2 text-sm leading-none font-medium in-data-[disabled=true]:opacity-50 peer-disabled:opacity-50;
|
||||
}
|
||||
|
||||
.field > section > label {
|
||||
@apply gap-2 text-sm leading-snug font-medium in-data-[disabled=true]:opacity-50 peer-disabled:opacity-50;
|
||||
}
|
||||
|
||||
/* Sidebar */
|
||||
.sidebar nav {
|
||||
@apply bg-sidebar text-sidebar-foreground;
|
||||
@@ -1304,6 +1142,14 @@
|
||||
.sidebar nav ul ul > li > details > summary {
|
||||
@apply text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground h-7 gap-2 rounded-xl px-3 text-sm focus-visible:ring-2 [&>svg]:size-4;
|
||||
}
|
||||
/* Progress */
|
||||
.progress {
|
||||
@apply bg-muted h-3 rounded-full;
|
||||
}
|
||||
|
||||
.progress > span {
|
||||
@apply bg-primary;
|
||||
}
|
||||
|
||||
/* Skeleton */
|
||||
.skeleton {
|
||||
|
||||
+150
-295
@@ -1,247 +1,64 @@
|
||||
/* Button */
|
||||
@layer components {
|
||||
.btn,
|
||||
.btn-primary,
|
||||
.btn-secondary,
|
||||
.btn-outline,
|
||||
.btn-ghost,
|
||||
.btn-link,
|
||||
.btn-destructive,
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-xs-secondary,
|
||||
.btn-xs-outline,
|
||||
.btn-xs-ghost,
|
||||
.btn-xs-link,
|
||||
.btn-xs-destructive,
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-sm-secondary,
|
||||
.btn-sm-outline,
|
||||
.btn-sm-ghost,
|
||||
.btn-sm-link,
|
||||
.btn-sm-destructive,
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-lg-secondary,
|
||||
.btn-lg-outline,
|
||||
.btn-lg-ghost,
|
||||
.btn-lg-link,
|
||||
.btn-lg-destructive,
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-icon-secondary,
|
||||
.btn-icon-outline,
|
||||
.btn-icon-ghost,
|
||||
.btn-icon-link,
|
||||
.btn-icon-destructive,
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-xs-icon-link,
|
||||
.btn-xs-icon-destructive,
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-sm-icon-link,
|
||||
.btn-sm-icon-destructive,
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary,
|
||||
.btn-lg-icon-secondary,
|
||||
.btn-lg-icon-outline,
|
||||
.btn-lg-icon-ghost,
|
||||
.btn-lg-icon-link,
|
||||
.btn-lg-icon-destructive {
|
||||
.btn {
|
||||
@apply rounded-none border border-transparent bg-clip-padding text-xs font-medium focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[1px] aria-invalid:border-destructive aria-invalid:ring-[1px] aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 active:not-aria-[haspopup]:translate-y-px [&_svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.btn,
|
||||
.btn-primary,
|
||||
.btn-secondary,
|
||||
.btn-outline,
|
||||
.btn-ghost,
|
||||
.btn-link,
|
||||
.btn-destructive {
|
||||
@apply h-8 gap-1.5 px-2.5;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-2;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-2;
|
||||
}
|
||||
.btn:not([data-size]),
|
||||
.btn[data-size='default'] {
|
||||
@apply h-8 gap-1.5 px-2.5 has-[[data-icon='inline-end']]:pr-2 has-[[data-icon='inline-start']]:pl-2;
|
||||
}
|
||||
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-xs-secondary,
|
||||
.btn-xs-outline,
|
||||
.btn-xs-ghost,
|
||||
.btn-xs-link,
|
||||
.btn-xs-destructive {
|
||||
@apply h-6 gap-1 px-2 text-xs rounded-none [&_svg:not([class*='size-'])]:size-3;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-1.5;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-1.5;
|
||||
}
|
||||
.btn[data-size='xs'] {
|
||||
@apply h-6 gap-1 px-2 text-xs rounded-none [&_svg:not([class*='size-'])]:size-3 has-[[data-icon='inline-end']]:pr-1.5 has-[[data-icon='inline-start']]:pl-1.5;
|
||||
}
|
||||
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-sm-secondary,
|
||||
.btn-sm-outline,
|
||||
.btn-sm-ghost,
|
||||
.btn-sm-link,
|
||||
.btn-sm-destructive {
|
||||
@apply h-7 gap-1 px-2.5 rounded-none [&_svg:not([class*='size-'])]:size-3.5;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-1.5;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-1.5;
|
||||
}
|
||||
.btn[data-size='sm'] {
|
||||
@apply h-7 gap-1 px-2.5 rounded-none [&_svg:not([class*='size-'])]:size-3.5 has-[[data-icon='inline-end']]:pr-1.5 has-[[data-icon='inline-start']]:pl-1.5;
|
||||
}
|
||||
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-lg-secondary,
|
||||
.btn-lg-outline,
|
||||
.btn-lg-ghost,
|
||||
.btn-lg-link,
|
||||
.btn-lg-destructive {
|
||||
@apply h-9 gap-1.5 px-2.5;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-2;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-2;
|
||||
}
|
||||
.btn[data-size='lg'] {
|
||||
@apply h-9 gap-1.5 px-2.5 has-[[data-icon='inline-end']]:pr-2 has-[[data-icon='inline-start']]:pl-2;
|
||||
}
|
||||
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-icon-secondary,
|
||||
.btn-icon-outline,
|
||||
.btn-icon-ghost,
|
||||
.btn-icon-link,
|
||||
.btn-icon-destructive {
|
||||
.btn[data-size='icon'] {
|
||||
@apply size-8;
|
||||
}
|
||||
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-xs-icon-link,
|
||||
.btn-xs-icon-destructive {
|
||||
.btn[data-size='icon-xs'] {
|
||||
@apply size-6 rounded-none [&_svg:not([class*='size-'])]:size-3;
|
||||
}
|
||||
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-sm-icon-link,
|
||||
.btn-sm-icon-destructive {
|
||||
.btn[data-size='icon-sm'] {
|
||||
@apply size-7 rounded-none;
|
||||
}
|
||||
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary,
|
||||
.btn-lg-icon-secondary,
|
||||
.btn-lg-icon-outline,
|
||||
.btn-lg-icon-ghost,
|
||||
.btn-lg-icon-link,
|
||||
.btn-lg-icon-destructive {
|
||||
.btn[data-size='icon-lg'] {
|
||||
@apply size-9;
|
||||
}
|
||||
|
||||
.btn,
|
||||
.btn-primary,
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary {
|
||||
.btn:not([data-variant]),
|
||||
.btn[data-variant='primary'] {
|
||||
@apply bg-primary text-primary-foreground hover:bg-primary/80;
|
||||
}
|
||||
|
||||
.btn-secondary,
|
||||
.btn-xs-secondary,
|
||||
.btn-sm-secondary,
|
||||
.btn-lg-secondary,
|
||||
.btn-icon-secondary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-lg-icon-secondary {
|
||||
.btn[data-variant='secondary'] {
|
||||
@apply bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground;
|
||||
}
|
||||
|
||||
.btn-outline,
|
||||
.btn-xs-outline,
|
||||
.btn-sm-outline,
|
||||
.btn-lg-outline,
|
||||
.btn-icon-outline,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-lg-icon-outline {
|
||||
.btn[data-variant='outline'] {
|
||||
@apply border-border bg-background hover:bg-muted hover:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground;
|
||||
}
|
||||
|
||||
.btn-ghost,
|
||||
.btn-xs-ghost,
|
||||
.btn-sm-ghost,
|
||||
.btn-lg-ghost,
|
||||
.btn-icon-ghost,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-lg-icon-ghost {
|
||||
.btn[data-variant='ghost'] {
|
||||
@apply hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground;
|
||||
}
|
||||
|
||||
.btn-link,
|
||||
.btn-xs-link,
|
||||
.btn-sm-link,
|
||||
.btn-lg-link,
|
||||
.btn-icon-link,
|
||||
.btn-xs-icon-link,
|
||||
.btn-sm-icon-link,
|
||||
.btn-lg-icon-link {
|
||||
.btn[data-variant='link'] {
|
||||
@apply text-primary underline-offset-4 hover:underline;
|
||||
}
|
||||
|
||||
.btn-destructive,
|
||||
.btn-xs-destructive,
|
||||
.btn-sm-destructive,
|
||||
.btn-lg-destructive,
|
||||
.btn-icon-destructive,
|
||||
.btn-xs-icon-destructive,
|
||||
.btn-sm-icon-destructive,
|
||||
.btn-lg-icon-destructive {
|
||||
.btn[data-variant='destructive'] {
|
||||
@apply bg-destructive/10 text-destructive hover:bg-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40;
|
||||
}
|
||||
|
||||
@@ -268,8 +85,7 @@
|
||||
@apply bg-muted gap-2 rounded-none border px-2.5 text-xs font-medium [&_svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.button-group > hr[role='separator'],
|
||||
.button-group-separator {
|
||||
.button-group > hr[role='separator'] {
|
||||
@apply bg-input;
|
||||
}
|
||||
|
||||
@@ -381,8 +197,7 @@
|
||||
}
|
||||
|
||||
/* Alert */
|
||||
.alert,
|
||||
.alert-destructive {
|
||||
.alert {
|
||||
@apply grid gap-0.5 rounded-none border px-2.5 py-2 text-start text-xs has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 [&>svg]:row-span-2 [&>svg]:translate-y-0 [&>svg]:text-current [&>svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
@@ -390,35 +205,33 @@
|
||||
@apply bg-card text-card-foreground;
|
||||
}
|
||||
|
||||
.alert-destructive {
|
||||
.alert[data-variant='destructive'] {
|
||||
@apply text-destructive bg-card [&>svg]:text-current;
|
||||
}
|
||||
|
||||
.alert > :is(h2, h3, h4, h5, h6, strong, [data-title]),
|
||||
.alert-destructive > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
.alert[data-variant='destructive'] > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
@apply font-medium;
|
||||
}
|
||||
|
||||
|
||||
:is(.alert, .alert-destructive):has(> svg) > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
.alert:has(> svg) > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
@apply col-start-2;
|
||||
}
|
||||
.alert > section {
|
||||
@apply text-muted-foreground text-xs/relaxed text-balance md:text-pretty [&_p:not(:last-child)]:mb-2;
|
||||
}
|
||||
|
||||
.alert-destructive > section {
|
||||
.alert[data-variant='destructive'] > section {
|
||||
@apply text-destructive/90 text-xs/relaxed text-balance md:text-pretty [&_p:not(:last-child)]:mb-2;
|
||||
}
|
||||
|
||||
.alert > footer,
|
||||
.alert-destructive > footer {
|
||||
.alert[data-variant='destructive'] > footer {
|
||||
@apply top-[calc(--spacing(1.25))] end-[calc(--spacing(1.25))];
|
||||
}
|
||||
/* Avatar */
|
||||
.avatar,
|
||||
.avatar-sm,
|
||||
.avatar-lg {
|
||||
.avatar {
|
||||
@apply rounded-full after:rounded-[inherit];
|
||||
}
|
||||
|
||||
@@ -426,29 +239,23 @@
|
||||
@apply size-8;
|
||||
}
|
||||
|
||||
.avatar-sm {
|
||||
.avatar[data-size='sm'] {
|
||||
@apply size-6;
|
||||
}
|
||||
|
||||
.avatar-lg {
|
||||
.avatar[data-size='lg'] {
|
||||
@apply size-10;
|
||||
}
|
||||
|
||||
.avatar > span:not([data-badge]),
|
||||
.avatar-sm > span:not([data-badge]),
|
||||
.avatar-lg > span:not([data-badge]) {
|
||||
.avatar > span:not([data-badge]) {
|
||||
@apply bg-muted text-muted-foreground rounded-[inherit];
|
||||
}
|
||||
|
||||
.avatar > img,
|
||||
.avatar-sm > img,
|
||||
.avatar-lg > img {
|
||||
.avatar > img {
|
||||
@apply rounded-[inherit];
|
||||
}
|
||||
|
||||
.avatar > [data-badge],
|
||||
.avatar-sm > [data-badge],
|
||||
.avatar-lg > [data-badge] {
|
||||
.avatar > [data-badge] {
|
||||
@apply bg-primary text-primary-foreground ring-background;
|
||||
}
|
||||
|
||||
@@ -456,47 +263,41 @@
|
||||
@apply bg-muted text-muted-foreground size-8 rounded-full text-xs [&>svg]:size-4;
|
||||
}
|
||||
|
||||
.avatar-group:has(> .avatar-sm) > [data-count] {
|
||||
.avatar-group:has(> .avatar[data-size='sm']) > [data-count] {
|
||||
@apply size-6 [&>svg]:size-3;
|
||||
}
|
||||
|
||||
.avatar-group:has(> .avatar-lg) > [data-count] {
|
||||
.avatar-group:has(> .avatar[data-size='lg']) > [data-count] {
|
||||
@apply size-10 [&>svg]:size-5;
|
||||
}
|
||||
|
||||
/* Badge */
|
||||
.badge,
|
||||
.badge-primary,
|
||||
.badge-secondary,
|
||||
.badge-destructive,
|
||||
.badge-outline,
|
||||
.badge-ghost,
|
||||
.badge-link {
|
||||
@apply h-5 gap-1 rounded-none border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&>svg]:size-3!;
|
||||
.badge {
|
||||
@apply h-5 gap-1 rounded-none border border-transparent px-2 py-0.5 text-xs font-medium transition-all [&>svg]:size-3!;
|
||||
}
|
||||
|
||||
.badge,
|
||||
.badge-primary {
|
||||
.badge:not([data-variant]),
|
||||
.badge[data-variant='primary'] {
|
||||
@apply bg-primary text-primary-foreground [a]:hover:bg-primary/80;
|
||||
}
|
||||
|
||||
.badge-secondary {
|
||||
.badge[data-variant='secondary'] {
|
||||
@apply bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80;
|
||||
}
|
||||
|
||||
.badge-outline {
|
||||
.badge[data-variant='outline'] {
|
||||
@apply border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground;
|
||||
}
|
||||
|
||||
.badge-destructive {
|
||||
.badge[data-variant='destructive'] {
|
||||
@apply bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20;
|
||||
}
|
||||
|
||||
.badge-ghost {
|
||||
.badge[data-variant='ghost'] {
|
||||
@apply hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50;
|
||||
}
|
||||
|
||||
.badge-link {
|
||||
.badge[data-variant='link'] {
|
||||
@apply text-primary underline-offset-4 hover:underline;
|
||||
}
|
||||
|
||||
@@ -590,7 +391,7 @@
|
||||
|
||||
.combobox [role='option'].active,
|
||||
.combobox [role='option']:focus-visible {
|
||||
@apply bg-accent text-accent-foreground [&_svg]:text-accent-foreground;
|
||||
@apply bg-muted text-foreground [&_svg]:text-foreground;
|
||||
}
|
||||
|
||||
.combobox [role='separator'] {
|
||||
@@ -646,7 +447,7 @@
|
||||
|
||||
*:not(select).select [role='option'].active,
|
||||
*:not(select).select [role='option']:focus-visible {
|
||||
@apply bg-accent text-accent-foreground [&_svg]:text-accent-foreground;
|
||||
@apply bg-muted text-foreground [&_svg]:text-foreground;
|
||||
}
|
||||
|
||||
*:not(select).select [role='group'] {
|
||||
@@ -700,7 +501,7 @@
|
||||
}
|
||||
|
||||
.dropdown-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']).active {
|
||||
@apply bg-accent text-accent-foreground;
|
||||
@apply bg-muted text-foreground;
|
||||
}
|
||||
|
||||
.dropdown-menu [data-variant='destructive'] {
|
||||
@@ -736,11 +537,11 @@
|
||||
@apply bg-border -mx-1 h-px;
|
||||
}
|
||||
|
||||
.dropdown-menu [data-shortcut] {
|
||||
@apply text-muted-foreground text-xs tracking-widest;
|
||||
.dropdown-menu :is([data-shortcut], kbd:last-child) {
|
||||
@apply text-muted-foreground font-sans text-xs tracking-widest;
|
||||
}
|
||||
|
||||
.dropdown-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']):is(:focus-visible, .active) [data-shortcut] {
|
||||
.dropdown-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']):is(:focus-visible, .active) :is([data-shortcut], kbd:last-child) {
|
||||
@apply text-accent-foreground;
|
||||
}
|
||||
|
||||
@@ -764,8 +565,7 @@
|
||||
}
|
||||
|
||||
/* Card */
|
||||
.card,
|
||||
.card-sm {
|
||||
.card {
|
||||
@apply ring-foreground/10 bg-card text-card-foreground overflow-hidden rounded-none text-xs/relaxed ring-1 has-[>footer]:pb-0 has-[>img:first-child]:pt-0 [&>img:first-child]:rounded-none [&>img:last-child]:rounded-none;
|
||||
}
|
||||
|
||||
@@ -773,52 +573,51 @@
|
||||
@apply gap-4 py-4;
|
||||
}
|
||||
|
||||
.card-sm {
|
||||
.card[data-size='sm'] {
|
||||
@apply gap-2 py-3;
|
||||
}
|
||||
|
||||
.card > header,
|
||||
.card-sm > header {
|
||||
.card > header {
|
||||
@apply gap-1 rounded-none px-4 [.border-b]:pb-4;
|
||||
}
|
||||
|
||||
.card-sm > header {
|
||||
.card[data-size='sm'] > header {
|
||||
@apply px-3 [.border-b]:pb-3;
|
||||
}
|
||||
|
||||
.card > header > :is(h2, h3, [data-title], .card-title),
|
||||
.card-sm > header > :is(h2, h3, [data-title], .card-title) {
|
||||
.card > header > :is(h2, h3, [data-title], .card-title) {
|
||||
@apply text-sm font-medium;
|
||||
}
|
||||
|
||||
.card-sm > header > :is(h2, h3, [data-title], .card-title) {
|
||||
.card[data-size='sm'] > header > :is(h2, h3, [data-title], .card-title) {
|
||||
@apply text-sm;
|
||||
}
|
||||
|
||||
.card > header > :is(p, [data-description], .card-description),
|
||||
.card-sm > header > :is(p, [data-description], .card-description) {
|
||||
.card > header > :is(p, [data-description], .card-description) {
|
||||
@apply text-muted-foreground text-xs/relaxed;
|
||||
}
|
||||
|
||||
.card > section,
|
||||
.card-sm > section {
|
||||
.card > section {
|
||||
@apply px-4;
|
||||
}
|
||||
|
||||
.card-sm > section {
|
||||
.card[data-size='sm'] > section {
|
||||
@apply px-3;
|
||||
}
|
||||
|
||||
.card > footer,
|
||||
.card-sm > footer {
|
||||
.card > footer {
|
||||
@apply rounded-none border-t p-4;
|
||||
}
|
||||
|
||||
.card-sm > footer {
|
||||
.card[data-size='sm'] > footer {
|
||||
@apply p-3;
|
||||
}
|
||||
|
||||
/* Chart */
|
||||
.chart {
|
||||
--chart-bar-radius: 0;
|
||||
}
|
||||
|
||||
.chart-tooltip {
|
||||
@apply border-border/50 bg-background text-foreground gap-1.5 rounded-none border px-2.5 py-1.5 text-xs shadow-xl;
|
||||
}
|
||||
@@ -911,8 +710,7 @@
|
||||
@apply gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3;
|
||||
}
|
||||
|
||||
.fieldset > legend,
|
||||
.field-legend {
|
||||
.fieldset > legend {
|
||||
@apply mb-2.5 font-medium data-[variant=label]:text-xs data-[variant=legend]:text-sm;
|
||||
}
|
||||
|
||||
@@ -921,6 +719,8 @@
|
||||
@apply gap-5;
|
||||
|
||||
&[role='radiogroup'],
|
||||
&:has(> .field > input[type='checkbox']:not([role='switch'])),
|
||||
&:has(> .field > input[type='radio']),
|
||||
&[data-slot='checkbox-group'],
|
||||
&[data-slot='radio-group'] {
|
||||
@apply gap-3;
|
||||
@@ -933,15 +733,15 @@
|
||||
}
|
||||
|
||||
.field {
|
||||
@apply data-[invalid=true]:text-destructive gap-2;
|
||||
@apply data-invalid:text-destructive data-[invalid=true]:text-destructive gap-2;
|
||||
}
|
||||
|
||||
.field > section,
|
||||
.field-content {
|
||||
.field > section {
|
||||
@apply gap-0.5;
|
||||
}
|
||||
|
||||
.field > label,
|
||||
.field > section > label,
|
||||
label:has(> .field) {
|
||||
@apply has-[:checked]:bg-primary/5 has-[:checked]:border-primary/30 dark:has-[:checked]:border-primary/20 dark:has-[:checked]:bg-primary/10 gap-2 leading-snug in-data-[disabled=true]:opacity-50;
|
||||
}
|
||||
@@ -964,18 +764,25 @@
|
||||
@apply p-2;
|
||||
}
|
||||
.field h2,
|
||||
.field h3,
|
||||
.field-title {
|
||||
.field h3 {
|
||||
@apply gap-2 text-xs/relaxed in-data-[disabled=true]:opacity-50;
|
||||
}
|
||||
|
||||
.fieldset legend + p,
|
||||
.field > p,
|
||||
.field section > p,
|
||||
.field-description {
|
||||
.field section > p {
|
||||
@apply text-muted-foreground text-start text-xs/relaxed [[data-variant=legend]+&]:-mt-1.5;
|
||||
}
|
||||
|
||||
.fieldset > legend[data-variant='label'] {
|
||||
@apply mb-0;
|
||||
}
|
||||
|
||||
.fieldset > legend:not([data-variant]) + p,
|
||||
.fieldset > legend[data-variant='legend'] + p {
|
||||
@apply -mt-1.5;
|
||||
}
|
||||
|
||||
.field-separator {
|
||||
@apply -my-2 h-5 text-xs in-data-[variant=outline]:-mb-2;
|
||||
}
|
||||
@@ -984,8 +791,7 @@
|
||||
@apply text-muted-foreground px-2;
|
||||
}
|
||||
|
||||
.field [role="alert"],
|
||||
.field-error {
|
||||
.field [role="alert"] {
|
||||
@apply text-destructive text-xs;
|
||||
}
|
||||
|
||||
@@ -996,18 +802,18 @@
|
||||
|
||||
|
||||
.input-group:has(> :is(input, textarea, select, [data-control]):disabled) {
|
||||
@apply opacity-50;
|
||||
@apply bg-input/50 opacity-50 dark:bg-input/80;
|
||||
}
|
||||
|
||||
.input-group > :is(input, select, [data-control]) {
|
||||
@apply px-2.5 py-1 text-xs;
|
||||
}
|
||||
|
||||
.input-group:not([data-orientation='vertical']):has(> [data-align='start']) > :is(input, select, [data-control]) {
|
||||
.input-group:not([data-orientation='vertical']):has(> :is([data-align='start'], [data-align='inline-start'])) > :is(input, select, [data-control]) {
|
||||
@apply ps-1.5;
|
||||
}
|
||||
|
||||
.input-group:not([data-orientation='vertical']):has(> [data-align='end']) > :is(input, select, [data-control]) {
|
||||
.input-group:not([data-orientation='vertical']):has(> :is([data-align='end'], [data-align='inline-end'])) > :is(input, select, [data-control]) {
|
||||
@apply pe-1.5;
|
||||
}
|
||||
|
||||
@@ -1020,33 +826,74 @@
|
||||
@apply gap-2 py-1.5 text-xs font-medium text-muted-foreground select-none [&>svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.input-group > [data-align='start'] {
|
||||
.input-group > :is([data-align='start'], [data-align='inline-start']) {
|
||||
@apply ps-2;
|
||||
}
|
||||
|
||||
.input-group > [data-align='end'] {
|
||||
.input-group > :is([data-align='end'], [data-align='inline-end']) {
|
||||
@apply pe-2;
|
||||
}
|
||||
|
||||
.input-group > [data-align='start']:has(> button) {
|
||||
.input-group > :is([data-align='start'], [data-align='inline-start']):has(> button) {
|
||||
@apply -ms-1;
|
||||
}
|
||||
|
||||
.input-group > [data-align='end']:has(> button) {
|
||||
.input-group > :is([data-align='end'], [data-align='inline-end']):has(> button) {
|
||||
@apply -me-1;
|
||||
}
|
||||
|
||||
.input-group > [data-align='start']:has(> kbd) {
|
||||
.input-group > :is([data-align='start'], [data-align='inline-start']):has(> kbd) {
|
||||
@apply -ms-0.5;
|
||||
}
|
||||
|
||||
.input-group > [data-align='end']:has(> kbd) {
|
||||
.input-group > :is([data-align='end'], [data-align='inline-end']):has(> kbd) {
|
||||
@apply -me-0.5;
|
||||
}
|
||||
|
||||
.input-group > [data-align='block-start'] {
|
||||
@apply px-2.5 pt-2;
|
||||
}
|
||||
|
||||
.input-group > [data-align='block-end'] {
|
||||
@apply px-2.5 pb-2;
|
||||
}
|
||||
|
||||
.input-group > [data-align='block-start'].border-b {
|
||||
@apply pb-2;
|
||||
}
|
||||
|
||||
.input-group > [data-align='block-end'].border-t {
|
||||
@apply pt-2;
|
||||
}
|
||||
.input-group[data-orientation='vertical'] > :is(header, footer, [role='group'], [data-align]) {
|
||||
@apply px-2.5;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(header[data-align='start'], [data-align='block-start']) {
|
||||
@apply px-2.5 pt-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(footer[data-align='end'], [data-align='block-end']) {
|
||||
@apply px-2.5 pb-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical']:has(> input) > :is(header[data-align='start'], [data-align='block-start']) {
|
||||
@apply pt-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical']:has(> input) > :is(footer[data-align='end'], [data-align='block-end']) {
|
||||
@apply pb-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(header[data-align='start'], [data-align='block-start']).border-b {
|
||||
@apply pb-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(footer[data-align='end'], [data-align='block-end']).border-t {
|
||||
@apply pt-2;
|
||||
}
|
||||
|
||||
|
||||
.input-group > :is(kbd, span > kbd, [role='group'] > kbd, header > kbd, footer > kbd) {
|
||||
@apply rounded-none;
|
||||
}
|
||||
@@ -1081,7 +928,7 @@
|
||||
@apply text-sm font-medium;
|
||||
}
|
||||
|
||||
.empty p {
|
||||
.empty > header > p {
|
||||
@apply text-muted-foreground text-xs/relaxed;
|
||||
}
|
||||
|
||||
@@ -1132,15 +979,15 @@
|
||||
@apply [&_svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.item > figure:has(img) {
|
||||
.item > figure:has(> img) {
|
||||
@apply size-10 overflow-hidden rounded-none;
|
||||
}
|
||||
|
||||
.item[data-size='sm'] > figure:has(img) {
|
||||
.item[data-size='sm'] > figure:has(> img) {
|
||||
@apply size-8;
|
||||
}
|
||||
|
||||
.item[data-size='xs'] > figure:has(img) {
|
||||
.item[data-size='xs'] > figure:has(> img) {
|
||||
@apply size-6;
|
||||
}
|
||||
|
||||
@@ -1190,16 +1037,16 @@
|
||||
@apply bg-muted text-muted-foreground in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 h-5 w-fit min-w-5 gap-1 rounded-none px-1 font-sans text-xs font-medium [&_svg:not([class*='size-'])]:size-3;
|
||||
}
|
||||
|
||||
.kbd-group {
|
||||
@apply gap-1;
|
||||
}
|
||||
|
||||
/* Label */
|
||||
.field > label,
|
||||
.label {
|
||||
@apply gap-2 text-xs leading-none in-data-[disabled=true]:opacity-50 peer-disabled:opacity-50;
|
||||
}
|
||||
|
||||
.field > section > label {
|
||||
@apply gap-2 text-xs leading-snug in-data-[disabled=true]:opacity-50 peer-disabled:opacity-50;
|
||||
}
|
||||
|
||||
/* Sidebar */
|
||||
.sidebar nav {
|
||||
@apply bg-sidebar text-sidebar-foreground;
|
||||
@@ -1289,6 +1136,14 @@
|
||||
.sidebar nav ul ul > li > details > summary {
|
||||
@apply text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground h-7 gap-2 rounded-none px-2 text-xs focus-visible:ring-2 [&>svg]:size-4;
|
||||
}
|
||||
/* Progress */
|
||||
.progress {
|
||||
@apply bg-muted h-1 rounded-none;
|
||||
}
|
||||
|
||||
.progress > span {
|
||||
@apply bg-primary;
|
||||
}
|
||||
|
||||
/* Skeleton */
|
||||
.skeleton {
|
||||
|
||||
+143
-297
@@ -1,247 +1,64 @@
|
||||
/* Button */
|
||||
@layer components {
|
||||
.btn,
|
||||
.btn-primary,
|
||||
.btn-secondary,
|
||||
.btn-outline,
|
||||
.btn-ghost,
|
||||
.btn-link,
|
||||
.btn-destructive,
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-xs-secondary,
|
||||
.btn-xs-outline,
|
||||
.btn-xs-ghost,
|
||||
.btn-xs-link,
|
||||
.btn-xs-destructive,
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-sm-secondary,
|
||||
.btn-sm-outline,
|
||||
.btn-sm-ghost,
|
||||
.btn-sm-link,
|
||||
.btn-sm-destructive,
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-lg-secondary,
|
||||
.btn-lg-outline,
|
||||
.btn-lg-ghost,
|
||||
.btn-lg-link,
|
||||
.btn-lg-destructive,
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-icon-secondary,
|
||||
.btn-icon-outline,
|
||||
.btn-icon-ghost,
|
||||
.btn-icon-link,
|
||||
.btn-icon-destructive,
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-xs-icon-link,
|
||||
.btn-xs-icon-destructive,
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-sm-icon-link,
|
||||
.btn-sm-icon-destructive,
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary,
|
||||
.btn-lg-icon-secondary,
|
||||
.btn-lg-icon-outline,
|
||||
.btn-lg-icon-ghost,
|
||||
.btn-lg-icon-link,
|
||||
.btn-lg-icon-destructive {
|
||||
.btn {
|
||||
@apply rounded-4xl border border-transparent bg-clip-padding text-sm font-medium focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 active:not-aria-[haspopup]:translate-y-px [&_svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.btn,
|
||||
.btn-primary,
|
||||
.btn-secondary,
|
||||
.btn-outline,
|
||||
.btn-ghost,
|
||||
.btn-link,
|
||||
.btn-destructive {
|
||||
@apply h-9 gap-1.5 px-3;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-2.5;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-2.5;
|
||||
}
|
||||
.btn:not([data-size]),
|
||||
.btn[data-size='default'] {
|
||||
@apply h-9 gap-1.5 px-3 has-[[data-icon='inline-end']]:pr-2.5 has-[[data-icon='inline-start']]:pl-2.5;
|
||||
}
|
||||
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-xs-secondary,
|
||||
.btn-xs-outline,
|
||||
.btn-xs-ghost,
|
||||
.btn-xs-link,
|
||||
.btn-xs-destructive {
|
||||
@apply h-6 gap-1 px-2.5 text-xs [&_svg:not([class*='size-'])]:size-3;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-2;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-2;
|
||||
}
|
||||
.btn[data-size='xs'] {
|
||||
@apply h-6 gap-1 px-2.5 text-xs [&_svg:not([class*='size-'])]:size-3 has-[[data-icon='inline-end']]:pr-2 has-[[data-icon='inline-start']]:pl-2;
|
||||
}
|
||||
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-sm-secondary,
|
||||
.btn-sm-outline,
|
||||
.btn-sm-ghost,
|
||||
.btn-sm-link,
|
||||
.btn-sm-destructive {
|
||||
@apply h-8 gap-1 px-3;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-2;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-2;
|
||||
}
|
||||
.btn[data-size='sm'] {
|
||||
@apply h-8 gap-1 px-3 has-[[data-icon='inline-end']]:pr-2 has-[[data-icon='inline-start']]:pl-2;
|
||||
}
|
||||
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-lg-secondary,
|
||||
.btn-lg-outline,
|
||||
.btn-lg-ghost,
|
||||
.btn-lg-link,
|
||||
.btn-lg-destructive {
|
||||
@apply h-10 gap-1.5 px-4;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-3;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-3;
|
||||
}
|
||||
.btn[data-size='lg'] {
|
||||
@apply h-10 gap-1.5 px-4 has-[[data-icon='inline-end']]:pr-3 has-[[data-icon='inline-start']]:pl-3;
|
||||
}
|
||||
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-icon-secondary,
|
||||
.btn-icon-outline,
|
||||
.btn-icon-ghost,
|
||||
.btn-icon-link,
|
||||
.btn-icon-destructive {
|
||||
.btn[data-size='icon'] {
|
||||
@apply size-9;
|
||||
}
|
||||
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-xs-icon-link,
|
||||
.btn-xs-icon-destructive {
|
||||
.btn[data-size='icon-xs'] {
|
||||
@apply size-6 [&_svg:not([class*='size-'])]:size-3;
|
||||
}
|
||||
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-sm-icon-link,
|
||||
.btn-sm-icon-destructive {
|
||||
.btn[data-size='icon-sm'] {
|
||||
@apply size-8;
|
||||
}
|
||||
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary,
|
||||
.btn-lg-icon-secondary,
|
||||
.btn-lg-icon-outline,
|
||||
.btn-lg-icon-ghost,
|
||||
.btn-lg-icon-link,
|
||||
.btn-lg-icon-destructive {
|
||||
.btn[data-size='icon-lg'] {
|
||||
@apply size-10;
|
||||
}
|
||||
|
||||
.btn,
|
||||
.btn-primary,
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary {
|
||||
.btn:not([data-variant]),
|
||||
.btn[data-variant='primary'] {
|
||||
@apply bg-primary text-primary-foreground hover:bg-primary/80;
|
||||
}
|
||||
|
||||
.btn-secondary,
|
||||
.btn-xs-secondary,
|
||||
.btn-sm-secondary,
|
||||
.btn-lg-secondary,
|
||||
.btn-icon-secondary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-lg-icon-secondary {
|
||||
.btn[data-variant='secondary'] {
|
||||
@apply bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground;
|
||||
}
|
||||
|
||||
.btn-outline,
|
||||
.btn-xs-outline,
|
||||
.btn-sm-outline,
|
||||
.btn-lg-outline,
|
||||
.btn-icon-outline,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-lg-icon-outline {
|
||||
.btn[data-variant='outline'] {
|
||||
@apply border-border bg-input/30 hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground;
|
||||
}
|
||||
|
||||
.btn-ghost,
|
||||
.btn-xs-ghost,
|
||||
.btn-sm-ghost,
|
||||
.btn-lg-ghost,
|
||||
.btn-icon-ghost,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-lg-icon-ghost {
|
||||
.btn[data-variant='ghost'] {
|
||||
@apply hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground;
|
||||
}
|
||||
|
||||
.btn-link,
|
||||
.btn-xs-link,
|
||||
.btn-sm-link,
|
||||
.btn-lg-link,
|
||||
.btn-icon-link,
|
||||
.btn-xs-icon-link,
|
||||
.btn-sm-icon-link,
|
||||
.btn-lg-icon-link {
|
||||
.btn[data-variant='link'] {
|
||||
@apply text-primary underline-offset-4 hover:underline;
|
||||
}
|
||||
|
||||
.btn-destructive,
|
||||
.btn-xs-destructive,
|
||||
.btn-sm-destructive,
|
||||
.btn-lg-destructive,
|
||||
.btn-icon-destructive,
|
||||
.btn-xs-icon-destructive,
|
||||
.btn-sm-icon-destructive,
|
||||
.btn-lg-icon-destructive {
|
||||
.btn[data-variant='destructive'] {
|
||||
@apply bg-destructive/10 text-destructive hover:bg-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40;
|
||||
}
|
||||
|
||||
@@ -268,8 +85,7 @@
|
||||
@apply bg-muted gap-2 rounded-4xl border px-2.5 text-sm font-medium [&_svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.button-group > hr[role='separator'],
|
||||
.button-group-separator {
|
||||
.button-group > hr[role='separator'] {
|
||||
@apply bg-input;
|
||||
}
|
||||
|
||||
@@ -381,8 +197,7 @@
|
||||
}
|
||||
|
||||
/* Alert */
|
||||
.alert,
|
||||
.alert-destructive {
|
||||
.alert {
|
||||
@apply grid gap-0.5 rounded-lg border px-4 py-3 text-start text-sm has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 [&>svg]:row-span-2 [&>svg]:translate-y-0.5 [&>svg]:text-current [&>svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
@@ -390,35 +205,33 @@
|
||||
@apply bg-card text-card-foreground;
|
||||
}
|
||||
|
||||
.alert-destructive {
|
||||
.alert[data-variant='destructive'] {
|
||||
@apply text-destructive bg-card [&>svg]:text-current;
|
||||
}
|
||||
|
||||
.alert > :is(h2, h3, h4, h5, h6, strong, [data-title]),
|
||||
.alert-destructive > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
.alert[data-variant='destructive'] > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
@apply font-medium;
|
||||
}
|
||||
|
||||
|
||||
:is(.alert, .alert-destructive):has(> svg) > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
.alert:has(> svg) > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
@apply col-start-2;
|
||||
}
|
||||
.alert > section {
|
||||
@apply text-muted-foreground text-sm text-balance md:text-pretty [&_p:not(:last-child)]:mb-4;
|
||||
}
|
||||
|
||||
.alert-destructive > section {
|
||||
.alert[data-variant='destructive'] > section {
|
||||
@apply text-destructive/90 text-sm text-balance md:text-pretty [&_p:not(:last-child)]:mb-4;
|
||||
}
|
||||
|
||||
.alert > footer,
|
||||
.alert-destructive > footer {
|
||||
.alert[data-variant='destructive'] > footer {
|
||||
@apply top-2.5 end-3;
|
||||
}
|
||||
/* Avatar */
|
||||
.avatar,
|
||||
.avatar-sm,
|
||||
.avatar-lg {
|
||||
.avatar {
|
||||
@apply rounded-full after:rounded-[inherit];
|
||||
}
|
||||
|
||||
@@ -426,29 +239,23 @@
|
||||
@apply size-8;
|
||||
}
|
||||
|
||||
.avatar-sm {
|
||||
.avatar[data-size='sm'] {
|
||||
@apply size-6;
|
||||
}
|
||||
|
||||
.avatar-lg {
|
||||
.avatar[data-size='lg'] {
|
||||
@apply size-10;
|
||||
}
|
||||
|
||||
.avatar > span:not([data-badge]),
|
||||
.avatar-sm > span:not([data-badge]),
|
||||
.avatar-lg > span:not([data-badge]) {
|
||||
.avatar > span:not([data-badge]) {
|
||||
@apply bg-muted text-muted-foreground rounded-[inherit];
|
||||
}
|
||||
|
||||
.avatar > img,
|
||||
.avatar-sm > img,
|
||||
.avatar-lg > img {
|
||||
.avatar > img {
|
||||
@apply rounded-[inherit];
|
||||
}
|
||||
|
||||
.avatar > [data-badge],
|
||||
.avatar-sm > [data-badge],
|
||||
.avatar-lg > [data-badge] {
|
||||
.avatar > [data-badge] {
|
||||
@apply bg-primary text-primary-foreground ring-background;
|
||||
}
|
||||
|
||||
@@ -456,47 +263,41 @@
|
||||
@apply bg-muted text-muted-foreground size-8 rounded-full text-sm [&>svg]:size-4;
|
||||
}
|
||||
|
||||
.avatar-group:has(> .avatar-sm) > [data-count] {
|
||||
.avatar-group:has(> .avatar[data-size='sm']) > [data-count] {
|
||||
@apply size-6 [&>svg]:size-3;
|
||||
}
|
||||
|
||||
.avatar-group:has(> .avatar-lg) > [data-count] {
|
||||
.avatar-group:has(> .avatar[data-size='lg']) > [data-count] {
|
||||
@apply size-10 [&>svg]:size-5;
|
||||
}
|
||||
|
||||
/* Badge */
|
||||
.badge,
|
||||
.badge-primary,
|
||||
.badge-secondary,
|
||||
.badge-destructive,
|
||||
.badge-outline,
|
||||
.badge-ghost,
|
||||
.badge-link {
|
||||
@apply h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&>svg]:size-3!;
|
||||
.badge {
|
||||
@apply h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all [&>svg]:size-3!;
|
||||
}
|
||||
|
||||
.badge,
|
||||
.badge-primary {
|
||||
.badge:not([data-variant]),
|
||||
.badge[data-variant='primary'] {
|
||||
@apply bg-primary text-primary-foreground [a]:hover:bg-primary/80;
|
||||
}
|
||||
|
||||
.badge-secondary {
|
||||
.badge[data-variant='secondary'] {
|
||||
@apply bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80;
|
||||
}
|
||||
|
||||
.badge-outline {
|
||||
.badge[data-variant='outline'] {
|
||||
@apply border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground bg-input/30;
|
||||
}
|
||||
|
||||
.badge-destructive {
|
||||
.badge[data-variant='destructive'] {
|
||||
@apply bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20;
|
||||
}
|
||||
|
||||
.badge-ghost {
|
||||
.badge[data-variant='ghost'] {
|
||||
@apply hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50;
|
||||
}
|
||||
|
||||
.badge-link {
|
||||
.badge[data-variant='link'] {
|
||||
@apply text-primary underline-offset-4 hover:underline;
|
||||
}
|
||||
|
||||
@@ -590,7 +391,7 @@
|
||||
|
||||
.combobox [role='option'].active,
|
||||
.combobox [role='option']:focus-visible {
|
||||
@apply bg-accent text-accent-foreground [&_svg]:text-accent-foreground;
|
||||
@apply bg-muted text-foreground [&_svg]:text-foreground;
|
||||
}
|
||||
|
||||
.combobox [role='group'] {
|
||||
@@ -650,7 +451,7 @@
|
||||
|
||||
*:not(select).select [role='option'].active,
|
||||
*:not(select).select [role='option']:focus-visible {
|
||||
@apply bg-accent text-accent-foreground [&_svg]:text-accent-foreground;
|
||||
@apply bg-muted text-foreground [&_svg]:text-foreground;
|
||||
}
|
||||
|
||||
*:not(select).select [role='group'] {
|
||||
@@ -704,7 +505,7 @@
|
||||
}
|
||||
|
||||
.dropdown-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']).active {
|
||||
@apply bg-accent text-accent-foreground;
|
||||
@apply bg-muted text-foreground;
|
||||
}
|
||||
|
||||
.dropdown-menu [data-variant='destructive'] {
|
||||
@@ -740,11 +541,11 @@
|
||||
@apply bg-border/50 -mx-1 my-1 h-px;
|
||||
}
|
||||
|
||||
.dropdown-menu [data-shortcut] {
|
||||
@apply text-muted-foreground text-xs tracking-widest;
|
||||
.dropdown-menu :is([data-shortcut], kbd:last-child) {
|
||||
@apply text-muted-foreground font-sans text-xs tracking-widest;
|
||||
}
|
||||
|
||||
.dropdown-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']):is(:focus-visible, .active) [data-shortcut] {
|
||||
.dropdown-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']):is(:focus-visible, .active) :is([data-shortcut], kbd:last-child) {
|
||||
@apply text-accent-foreground;
|
||||
}
|
||||
|
||||
@@ -768,8 +569,7 @@
|
||||
}
|
||||
|
||||
/* Card */
|
||||
.card,
|
||||
.card-sm {
|
||||
.card {
|
||||
@apply ring-foreground/10 bg-card text-card-foreground overflow-hidden rounded-2xl text-sm ring-1 has-[>img:first-child]:pt-0 [&>img:first-child]:rounded-t-xl [&>img:last-child]:rounded-b-xl;
|
||||
}
|
||||
|
||||
@@ -777,48 +577,47 @@
|
||||
@apply gap-6 py-6;
|
||||
}
|
||||
|
||||
.card-sm {
|
||||
.card[data-size='sm'] {
|
||||
@apply gap-4 py-4;
|
||||
}
|
||||
|
||||
.card > header,
|
||||
.card-sm > header {
|
||||
.card > header {
|
||||
@apply gap-2 rounded-t-xl px-6 [.border-b]:pb-6;
|
||||
}
|
||||
|
||||
.card-sm > header {
|
||||
.card[data-size='sm'] > header {
|
||||
@apply px-4 [.border-b]:pb-4;
|
||||
}
|
||||
|
||||
.card > header > :is(h2, h3, [data-title], .card-title),
|
||||
.card-sm > header > :is(h2, h3, [data-title], .card-title) {
|
||||
.card > header > :is(h2, h3, [data-title], .card-title) {
|
||||
@apply text-base font-medium;
|
||||
}
|
||||
|
||||
.card > header > :is(p, [data-description], .card-description),
|
||||
.card-sm > header > :is(p, [data-description], .card-description) {
|
||||
.card > header > :is(p, [data-description], .card-description) {
|
||||
@apply text-muted-foreground text-sm;
|
||||
}
|
||||
|
||||
.card > section,
|
||||
.card-sm > section {
|
||||
.card > section {
|
||||
@apply px-6;
|
||||
}
|
||||
|
||||
.card-sm > section {
|
||||
.card[data-size='sm'] > section {
|
||||
@apply px-4;
|
||||
}
|
||||
|
||||
.card > footer,
|
||||
.card-sm > footer {
|
||||
.card > footer {
|
||||
@apply rounded-b-xl px-6 [.border-t]:pt-6;
|
||||
}
|
||||
|
||||
.card-sm > footer {
|
||||
.card[data-size='sm'] > footer {
|
||||
@apply px-4 [.border-t]:pt-4;
|
||||
}
|
||||
|
||||
/* Chart */
|
||||
.chart {
|
||||
--chart-bar-radius: 6px;
|
||||
}
|
||||
|
||||
.chart-tooltip {
|
||||
@apply border-border/50 bg-background text-foreground gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl;
|
||||
}
|
||||
@@ -911,8 +710,7 @@
|
||||
@apply gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3;
|
||||
}
|
||||
|
||||
.fieldset > legend,
|
||||
.field-legend {
|
||||
.fieldset > legend {
|
||||
@apply mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base;
|
||||
}
|
||||
|
||||
@@ -921,6 +719,8 @@
|
||||
@apply gap-7;
|
||||
|
||||
&[role='radiogroup'],
|
||||
&:has(> .field > input[type='checkbox']:not([role='switch'])),
|
||||
&:has(> .field > input[type='radio']),
|
||||
&[data-slot='checkbox-group'],
|
||||
&[data-slot='radio-group'] {
|
||||
@apply gap-3;
|
||||
@@ -933,15 +733,15 @@
|
||||
}
|
||||
|
||||
.field {
|
||||
@apply data-[invalid=true]:text-destructive gap-3;
|
||||
@apply data-invalid:text-destructive data-[invalid=true]:text-destructive gap-3;
|
||||
}
|
||||
|
||||
.field > section,
|
||||
.field-content {
|
||||
.field > section {
|
||||
@apply gap-1;
|
||||
}
|
||||
|
||||
.field > label,
|
||||
.field > section > label,
|
||||
label:has(> .field) {
|
||||
@apply has-[:checked]:bg-primary/5 has-[:checked]:border-primary/30 dark:has-[:checked]:border-primary/20 dark:has-[:checked]:bg-primary/10 gap-2 leading-snug in-data-[disabled=true]:opacity-50;
|
||||
}
|
||||
@@ -964,18 +764,25 @@
|
||||
@apply p-4;
|
||||
}
|
||||
.field h2,
|
||||
.field h3,
|
||||
.field-title {
|
||||
.field h3 {
|
||||
@apply gap-2 leading-snug text-sm font-medium in-data-[disabled=true]:opacity-50;
|
||||
}
|
||||
|
||||
.fieldset legend + p,
|
||||
.field > p,
|
||||
.field section > p,
|
||||
.field-description {
|
||||
.field section > p {
|
||||
@apply text-muted-foreground text-start text-sm [[data-variant=legend]+&]:-mt-1.5;
|
||||
}
|
||||
|
||||
.fieldset > legend[data-variant='label'] {
|
||||
@apply mb-0;
|
||||
}
|
||||
|
||||
.fieldset > legend:not([data-variant]) + p,
|
||||
.fieldset > legend[data-variant='legend'] + p {
|
||||
@apply -mt-1.5;
|
||||
}
|
||||
|
||||
.field-separator {
|
||||
@apply -my-2 h-5 text-sm in-data-[variant=outline]:-mb-2;
|
||||
}
|
||||
@@ -984,8 +791,7 @@
|
||||
@apply text-muted-foreground px-2;
|
||||
}
|
||||
|
||||
.field [role="alert"],
|
||||
.field-error {
|
||||
.field [role="alert"] {
|
||||
@apply text-destructive text-sm;
|
||||
}
|
||||
|
||||
@@ -994,23 +800,22 @@
|
||||
@apply h-9 has-[>textarea]:h-auto rounded-4xl border border-input bg-input/30 transition-colors focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50 has-[[aria-invalid=true]]:border-destructive has-[[aria-invalid=true]]:ring-[3px] has-[[aria-invalid=true]]:ring-destructive/20 has-[>textarea]:rounded-xl dark:has-[[aria-invalid=true]]:ring-destructive/40;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] {
|
||||
@apply rounded-2xl;
|
||||
}
|
||||
|
||||
.input-group:has(> :is(input, textarea, select, [data-control]):disabled) {
|
||||
@apply opacity-50;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] {
|
||||
@apply rounded-2xl;
|
||||
}
|
||||
.input-group > :is(input, select, [data-control]) {
|
||||
@apply px-3 py-1 text-sm;
|
||||
}
|
||||
|
||||
.input-group:not([data-orientation='vertical']):has(> [data-align='start']) > :is(input, select, [data-control]) {
|
||||
.input-group:not([data-orientation='vertical']):has(> :is([data-align='start'], [data-align='inline-start'])) > :is(input, select, [data-control]) {
|
||||
@apply ps-1.5;
|
||||
}
|
||||
|
||||
.input-group:not([data-orientation='vertical']):has(> [data-align='end']) > :is(input, select, [data-control]) {
|
||||
.input-group:not([data-orientation='vertical']):has(> :is([data-align='end'], [data-align='inline-end'])) > :is(input, select, [data-control]) {
|
||||
@apply pe-1.5;
|
||||
}
|
||||
|
||||
@@ -1023,33 +828,66 @@
|
||||
@apply gap-2 py-2 text-sm font-medium text-muted-foreground select-none [&>svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.input-group > [data-align='start'] {
|
||||
.input-group > :is([data-align='start'], [data-align='inline-start']) {
|
||||
@apply ps-3;
|
||||
}
|
||||
|
||||
.input-group > [data-align='end'] {
|
||||
.input-group > :is([data-align='end'], [data-align='inline-end']) {
|
||||
@apply pe-3;
|
||||
}
|
||||
|
||||
.input-group > [data-align='start']:has(> button) {
|
||||
.input-group > :is([data-align='start'], [data-align='inline-start']):has(> button) {
|
||||
@apply -ms-1;
|
||||
}
|
||||
|
||||
.input-group > [data-align='end']:has(> button) {
|
||||
.input-group > :is([data-align='end'], [data-align='inline-end']):has(> button) {
|
||||
@apply -me-1;
|
||||
}
|
||||
|
||||
.input-group > [data-align='start']:has(> kbd) {
|
||||
.input-group > :is([data-align='start'], [data-align='inline-start']):has(> kbd) {
|
||||
@apply -ms-0.5;
|
||||
}
|
||||
|
||||
.input-group > [data-align='end']:has(> kbd) {
|
||||
.input-group > :is([data-align='end'], [data-align='inline-end']):has(> kbd) {
|
||||
@apply -me-0.5;
|
||||
}
|
||||
.input-group[data-orientation='vertical'] > :is(header, footer, [role='group'], [data-align]) {
|
||||
@apply px-3;
|
||||
}
|
||||
|
||||
.input-group > [data-align='block-start'] {
|
||||
@apply px-3 pt-2;
|
||||
}
|
||||
|
||||
.input-group > [data-align='block-end'] {
|
||||
@apply px-3 pb-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(header[data-align='start'], [data-align='block-start']) {
|
||||
@apply px-3 pt-3;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(footer[data-align='end'], [data-align='block-end']) {
|
||||
@apply px-3 pb-3;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical']:has(> input) > :is(header[data-align='start'], [data-align='block-start']) {
|
||||
@apply pt-3;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical']:has(> input) > :is(footer[data-align='end'], [data-align='block-end']) {
|
||||
@apply pb-3;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(header[data-align='start'], [data-align='block-start']).border-b {
|
||||
@apply pb-3;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(footer[data-align='end'], [data-align='block-end']).border-t {
|
||||
@apply pt-3;
|
||||
}
|
||||
|
||||
|
||||
.input-group > :is(kbd, span > kbd, [role='group'] > kbd, header > kbd, footer > kbd) {
|
||||
@apply rounded-4xl bg-muted-foreground/10 px-1.5;
|
||||
}
|
||||
@@ -1084,7 +922,7 @@
|
||||
@apply text-lg font-medium tracking-tight;
|
||||
}
|
||||
|
||||
.empty p {
|
||||
.empty > header > p {
|
||||
@apply text-muted-foreground text-sm/relaxed;
|
||||
}
|
||||
|
||||
@@ -1135,15 +973,15 @@
|
||||
@apply [&_svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.item > figure:has(img) {
|
||||
.item > figure:has(> img) {
|
||||
@apply size-10 overflow-hidden rounded-lg;
|
||||
}
|
||||
|
||||
.item[data-size='sm'] > figure:has(img) {
|
||||
.item[data-size='sm'] > figure:has(> img) {
|
||||
@apply size-8;
|
||||
}
|
||||
|
||||
.item[data-size='xs'] > figure:has(img) {
|
||||
.item[data-size='xs'] > figure:has(> img) {
|
||||
@apply size-6 rounded-md;
|
||||
}
|
||||
|
||||
@@ -1193,16 +1031,16 @@
|
||||
@apply bg-muted text-muted-foreground in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 h-5 w-fit min-w-5 gap-1 rounded-sm px-1 font-sans text-xs font-medium [&_svg:not([class*='size-'])]:size-3;
|
||||
}
|
||||
|
||||
.kbd-group {
|
||||
@apply gap-1;
|
||||
}
|
||||
|
||||
/* Label */
|
||||
.field > label,
|
||||
.label {
|
||||
@apply gap-2 text-sm leading-none font-medium in-data-[disabled=true]:opacity-50 peer-disabled:opacity-50;
|
||||
}
|
||||
|
||||
.field > section > label {
|
||||
@apply gap-2 text-sm leading-snug font-medium in-data-[disabled=true]:opacity-50 peer-disabled:opacity-50;
|
||||
}
|
||||
|
||||
/* Sidebar */
|
||||
.sidebar nav {
|
||||
@apply bg-sidebar text-sidebar-foreground;
|
||||
@@ -1292,6 +1130,14 @@
|
||||
.sidebar nav ul ul > li > details > summary {
|
||||
@apply text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground h-7 gap-2 rounded-md px-2 text-sm focus-visible:ring-2 [&>svg]:size-4;
|
||||
}
|
||||
/* Progress */
|
||||
.progress {
|
||||
@apply bg-muted h-3 rounded-4xl;
|
||||
}
|
||||
|
||||
.progress > span {
|
||||
@apply bg-primary;
|
||||
}
|
||||
|
||||
/* Skeleton */
|
||||
.skeleton {
|
||||
|
||||
+148
-294
@@ -1,247 +1,64 @@
|
||||
/* Button */
|
||||
@layer components {
|
||||
.btn,
|
||||
.btn-primary,
|
||||
.btn-secondary,
|
||||
.btn-outline,
|
||||
.btn-ghost,
|
||||
.btn-link,
|
||||
.btn-destructive,
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-xs-secondary,
|
||||
.btn-xs-outline,
|
||||
.btn-xs-ghost,
|
||||
.btn-xs-link,
|
||||
.btn-xs-destructive,
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-sm-secondary,
|
||||
.btn-sm-outline,
|
||||
.btn-sm-ghost,
|
||||
.btn-sm-link,
|
||||
.btn-sm-destructive,
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-lg-secondary,
|
||||
.btn-lg-outline,
|
||||
.btn-lg-ghost,
|
||||
.btn-lg-link,
|
||||
.btn-lg-destructive,
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-icon-secondary,
|
||||
.btn-icon-outline,
|
||||
.btn-icon-ghost,
|
||||
.btn-icon-link,
|
||||
.btn-icon-destructive,
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-xs-icon-link,
|
||||
.btn-xs-icon-destructive,
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-sm-icon-link,
|
||||
.btn-sm-icon-destructive,
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary,
|
||||
.btn-lg-icon-secondary,
|
||||
.btn-lg-icon-outline,
|
||||
.btn-lg-icon-ghost,
|
||||
.btn-lg-icon-link,
|
||||
.btn-lg-icon-destructive {
|
||||
.btn {
|
||||
@apply rounded-md border border-transparent bg-clip-padding text-xs/relaxed font-medium focus-visible:border-ring focus-visible:ring-ring/30 focus-visible:ring-[2px] aria-invalid:border-destructive aria-invalid:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 active:not-aria-[haspopup]:translate-y-px [&_svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.btn,
|
||||
.btn-primary,
|
||||
.btn-secondary,
|
||||
.btn-outline,
|
||||
.btn-ghost,
|
||||
.btn-link,
|
||||
.btn-destructive {
|
||||
@apply h-7 gap-1 px-2 text-xs/relaxed;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-1.5;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-1.5;
|
||||
}
|
||||
.btn:not([data-size]),
|
||||
.btn[data-size='default'] {
|
||||
@apply h-7 gap-1 px-2 text-xs/relaxed has-[[data-icon='inline-end']]:pr-1.5 has-[[data-icon='inline-start']]:pl-1.5;
|
||||
}
|
||||
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-xs-secondary,
|
||||
.btn-xs-outline,
|
||||
.btn-xs-ghost,
|
||||
.btn-xs-link,
|
||||
.btn-xs-destructive {
|
||||
@apply h-5 gap-1 px-2 text-[0.625rem] rounded-sm [&_svg:not([class*='size-'])]:size-2.5;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-1.5;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-1.5;
|
||||
}
|
||||
.btn[data-size='xs'] {
|
||||
@apply h-5 gap-1 px-2 text-[0.625rem] rounded-sm [&_svg:not([class*='size-'])]:size-2.5 has-[[data-icon='inline-end']]:pr-1.5 has-[[data-icon='inline-start']]:pl-1.5;
|
||||
}
|
||||
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-sm-secondary,
|
||||
.btn-sm-outline,
|
||||
.btn-sm-ghost,
|
||||
.btn-sm-link,
|
||||
.btn-sm-destructive {
|
||||
@apply h-6 gap-1 px-2 text-xs/relaxed [&_svg:not([class*='size-'])]:size-3;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-1.5;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-1.5;
|
||||
}
|
||||
.btn[data-size='sm'] {
|
||||
@apply h-6 gap-1 px-2 text-xs/relaxed [&_svg:not([class*='size-'])]:size-3 has-[[data-icon='inline-end']]:pr-1.5 has-[[data-icon='inline-start']]:pl-1.5;
|
||||
}
|
||||
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-lg-secondary,
|
||||
.btn-lg-outline,
|
||||
.btn-lg-ghost,
|
||||
.btn-lg-link,
|
||||
.btn-lg-destructive {
|
||||
@apply h-8 gap-1 px-2.5 text-xs/relaxed;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-2;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-2;
|
||||
}
|
||||
.btn[data-size='lg'] {
|
||||
@apply h-8 gap-1 px-2.5 text-xs/relaxed has-[[data-icon='inline-end']]:pr-2 has-[[data-icon='inline-start']]:pl-2;
|
||||
}
|
||||
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-icon-secondary,
|
||||
.btn-icon-outline,
|
||||
.btn-icon-ghost,
|
||||
.btn-icon-link,
|
||||
.btn-icon-destructive {
|
||||
.btn[data-size='icon'] {
|
||||
@apply size-7 [&_svg:not([class*='size-'])]:size-3.5;
|
||||
}
|
||||
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-xs-icon-link,
|
||||
.btn-xs-icon-destructive {
|
||||
.btn[data-size='icon-xs'] {
|
||||
@apply size-5 rounded-sm [&_svg:not([class*='size-'])]:size-2.5;
|
||||
}
|
||||
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-sm-icon-link,
|
||||
.btn-sm-icon-destructive {
|
||||
.btn[data-size='icon-sm'] {
|
||||
@apply size-6 [&_svg:not([class*='size-'])]:size-3;
|
||||
}
|
||||
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary,
|
||||
.btn-lg-icon-secondary,
|
||||
.btn-lg-icon-outline,
|
||||
.btn-lg-icon-ghost,
|
||||
.btn-lg-icon-link,
|
||||
.btn-lg-icon-destructive {
|
||||
.btn[data-size='icon-lg'] {
|
||||
@apply size-8 [&_svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.btn,
|
||||
.btn-primary,
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary {
|
||||
.btn:not([data-variant]),
|
||||
.btn[data-variant='primary'] {
|
||||
@apply bg-primary text-primary-foreground hover:bg-primary/80;
|
||||
}
|
||||
|
||||
.btn-secondary,
|
||||
.btn-xs-secondary,
|
||||
.btn-sm-secondary,
|
||||
.btn-lg-secondary,
|
||||
.btn-icon-secondary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-lg-icon-secondary {
|
||||
.btn[data-variant='secondary'] {
|
||||
@apply bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground;
|
||||
}
|
||||
|
||||
.btn-outline,
|
||||
.btn-xs-outline,
|
||||
.btn-sm-outline,
|
||||
.btn-lg-outline,
|
||||
.btn-icon-outline,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-lg-icon-outline {
|
||||
.btn[data-variant='outline'] {
|
||||
@apply border-border hover:bg-input/50 hover:text-foreground dark:border-input dark:bg-input/30 aria-expanded:bg-muted aria-expanded:text-foreground;
|
||||
}
|
||||
|
||||
.btn-ghost,
|
||||
.btn-xs-ghost,
|
||||
.btn-sm-ghost,
|
||||
.btn-lg-ghost,
|
||||
.btn-icon-ghost,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-lg-icon-ghost {
|
||||
.btn[data-variant='ghost'] {
|
||||
@apply hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground;
|
||||
}
|
||||
|
||||
.btn-link,
|
||||
.btn-xs-link,
|
||||
.btn-sm-link,
|
||||
.btn-lg-link,
|
||||
.btn-icon-link,
|
||||
.btn-xs-icon-link,
|
||||
.btn-sm-icon-link,
|
||||
.btn-lg-icon-link {
|
||||
.btn[data-variant='link'] {
|
||||
@apply text-primary underline-offset-4 hover:underline;
|
||||
}
|
||||
|
||||
.btn-destructive,
|
||||
.btn-xs-destructive,
|
||||
.btn-sm-destructive,
|
||||
.btn-lg-destructive,
|
||||
.btn-icon-destructive,
|
||||
.btn-xs-icon-destructive,
|
||||
.btn-sm-icon-destructive,
|
||||
.btn-lg-icon-destructive {
|
||||
.btn[data-variant='destructive'] {
|
||||
@apply bg-destructive/10 text-destructive hover:bg-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40;
|
||||
}
|
||||
|
||||
@@ -268,8 +85,7 @@
|
||||
@apply bg-muted gap-2 rounded-md border px-2.5 text-xs/relaxed font-medium [&_svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.button-group > hr[role='separator'],
|
||||
.button-group-separator {
|
||||
.button-group > hr[role='separator'] {
|
||||
@apply bg-input;
|
||||
}
|
||||
|
||||
@@ -381,8 +197,7 @@
|
||||
}
|
||||
|
||||
/* Alert */
|
||||
.alert,
|
||||
.alert-destructive {
|
||||
.alert {
|
||||
@apply grid gap-0.5 rounded-lg border px-2 py-1.5 text-start text-xs/relaxed has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-1.5 [&>svg]:row-span-2 [&>svg]:translate-y-0.5 [&>svg]:text-current [&>svg:not([class*='size-'])]:size-3.5;
|
||||
}
|
||||
|
||||
@@ -390,35 +205,33 @@
|
||||
@apply bg-card text-card-foreground;
|
||||
}
|
||||
|
||||
.alert-destructive {
|
||||
.alert[data-variant='destructive'] {
|
||||
@apply text-destructive bg-card [&>svg]:text-current;
|
||||
}
|
||||
|
||||
.alert > :is(h2, h3, h4, h5, h6, strong, [data-title]),
|
||||
.alert-destructive > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
.alert[data-variant='destructive'] > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
@apply font-medium;
|
||||
}
|
||||
|
||||
|
||||
:is(.alert, .alert-destructive):has(> svg) > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
.alert:has(> svg) > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
@apply col-start-2;
|
||||
}
|
||||
.alert > section {
|
||||
@apply text-muted-foreground text-xs/relaxed text-balance md:text-pretty [&_p:not(:last-child)]:mb-4;
|
||||
}
|
||||
|
||||
.alert-destructive > section {
|
||||
.alert[data-variant='destructive'] > section {
|
||||
@apply text-destructive/90 text-xs/relaxed text-balance md:text-pretty [&_p:not(:last-child)]:mb-4;
|
||||
}
|
||||
|
||||
.alert > footer,
|
||||
.alert-destructive > footer {
|
||||
.alert[data-variant='destructive'] > footer {
|
||||
@apply top-1.5 end-2;
|
||||
}
|
||||
/* Avatar */
|
||||
.avatar,
|
||||
.avatar-sm,
|
||||
.avatar-lg {
|
||||
.avatar {
|
||||
@apply rounded-full after:rounded-[inherit];
|
||||
}
|
||||
|
||||
@@ -426,29 +239,23 @@
|
||||
@apply size-8;
|
||||
}
|
||||
|
||||
.avatar-sm {
|
||||
.avatar[data-size='sm'] {
|
||||
@apply size-6;
|
||||
}
|
||||
|
||||
.avatar-lg {
|
||||
.avatar[data-size='lg'] {
|
||||
@apply size-10;
|
||||
}
|
||||
|
||||
.avatar > span:not([data-badge]),
|
||||
.avatar-sm > span:not([data-badge]),
|
||||
.avatar-lg > span:not([data-badge]) {
|
||||
.avatar > span:not([data-badge]) {
|
||||
@apply bg-muted text-muted-foreground rounded-[inherit];
|
||||
}
|
||||
|
||||
.avatar > img,
|
||||
.avatar-sm > img,
|
||||
.avatar-lg > img {
|
||||
.avatar > img {
|
||||
@apply rounded-[inherit];
|
||||
}
|
||||
|
||||
.avatar > [data-badge],
|
||||
.avatar-sm > [data-badge],
|
||||
.avatar-lg > [data-badge] {
|
||||
.avatar > [data-badge] {
|
||||
@apply bg-primary text-primary-foreground ring-background;
|
||||
}
|
||||
|
||||
@@ -456,47 +263,41 @@
|
||||
@apply bg-muted text-muted-foreground size-8 rounded-full text-xs/relaxed [&>svg]:size-4;
|
||||
}
|
||||
|
||||
.avatar-group:has(> .avatar-sm) > [data-count] {
|
||||
.avatar-group:has(> .avatar[data-size='sm']) > [data-count] {
|
||||
@apply size-6 [&>svg]:size-3;
|
||||
}
|
||||
|
||||
.avatar-group:has(> .avatar-lg) > [data-count] {
|
||||
.avatar-group:has(> .avatar[data-size='lg']) > [data-count] {
|
||||
@apply size-10 [&>svg]:size-5;
|
||||
}
|
||||
|
||||
/* Badge */
|
||||
.badge,
|
||||
.badge-primary,
|
||||
.badge-secondary,
|
||||
.badge-destructive,
|
||||
.badge-outline,
|
||||
.badge-ghost,
|
||||
.badge-link {
|
||||
@apply h-5 gap-1 rounded-full border border-transparent px-2 py-0.5 text-[0.625rem] font-medium transition-all has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&>svg]:size-2.5!;
|
||||
.badge {
|
||||
@apply h-5 gap-1 rounded-full border border-transparent px-2 py-0.5 text-[0.625rem] font-medium transition-all [&>svg]:size-2.5!;
|
||||
}
|
||||
|
||||
.badge,
|
||||
.badge-primary {
|
||||
.badge:not([data-variant]),
|
||||
.badge[data-variant='primary'] {
|
||||
@apply bg-primary text-primary-foreground [a]:hover:bg-primary/80;
|
||||
}
|
||||
|
||||
.badge-secondary {
|
||||
.badge[data-variant='secondary'] {
|
||||
@apply bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80;
|
||||
}
|
||||
|
||||
.badge-outline {
|
||||
.badge[data-variant='outline'] {
|
||||
@apply border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground bg-input/20 dark:bg-input/30;
|
||||
}
|
||||
|
||||
.badge-destructive {
|
||||
.badge[data-variant='destructive'] {
|
||||
@apply bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20;
|
||||
}
|
||||
|
||||
.badge-ghost {
|
||||
.badge[data-variant='ghost'] {
|
||||
@apply hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50;
|
||||
}
|
||||
|
||||
.badge-link {
|
||||
.badge[data-variant='link'] {
|
||||
@apply text-primary underline-offset-4 hover:underline;
|
||||
}
|
||||
|
||||
@@ -590,7 +391,7 @@
|
||||
|
||||
.combobox [role='option'].active,
|
||||
.combobox [role='option']:focus-visible {
|
||||
@apply bg-accent text-accent-foreground [&_svg]:text-accent-foreground;
|
||||
@apply bg-muted text-foreground [&_svg]:text-foreground;
|
||||
}
|
||||
|
||||
.combobox [role='group'] {
|
||||
@@ -654,7 +455,7 @@
|
||||
|
||||
*:not(select).select [role='option'].active,
|
||||
*:not(select).select [role='option']:focus-visible {
|
||||
@apply bg-accent text-accent-foreground [&_svg]:text-accent-foreground;
|
||||
@apply bg-muted text-foreground [&_svg]:text-foreground;
|
||||
}
|
||||
|
||||
*:not(select).select [role='group'] {
|
||||
@@ -708,7 +509,7 @@
|
||||
}
|
||||
|
||||
.dropdown-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']).active {
|
||||
@apply bg-accent text-accent-foreground;
|
||||
@apply bg-muted text-foreground;
|
||||
}
|
||||
|
||||
.dropdown-menu [data-variant='destructive'] {
|
||||
@@ -744,11 +545,11 @@
|
||||
@apply bg-border/50 -mx-1 my-1 h-px;
|
||||
}
|
||||
|
||||
.dropdown-menu [data-shortcut] {
|
||||
@apply text-muted-foreground text-[0.625rem] tracking-widest;
|
||||
.dropdown-menu :is([data-shortcut], kbd:last-child) {
|
||||
@apply text-muted-foreground font-sans text-[0.625rem] tracking-widest;
|
||||
}
|
||||
|
||||
.dropdown-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']):is(:focus-visible, .active) [data-shortcut] {
|
||||
.dropdown-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']):is(:focus-visible, .active) :is([data-shortcut], kbd:last-child) {
|
||||
@apply text-accent-foreground;
|
||||
}
|
||||
|
||||
@@ -772,8 +573,7 @@
|
||||
}
|
||||
|
||||
/* Card */
|
||||
.card,
|
||||
.card-sm {
|
||||
.card {
|
||||
@apply ring-foreground/10 bg-card text-card-foreground overflow-hidden rounded-lg text-xs/relaxed ring-1 has-[>img:first-child]:pt-0 [&>img:first-child]:rounded-t-lg [&>img:last-child]:rounded-b-lg;
|
||||
}
|
||||
|
||||
@@ -781,48 +581,47 @@
|
||||
@apply gap-4 py-4;
|
||||
}
|
||||
|
||||
.card-sm {
|
||||
.card[data-size='sm'] {
|
||||
@apply gap-3 py-3;
|
||||
}
|
||||
|
||||
.card > header,
|
||||
.card-sm > header {
|
||||
.card > header {
|
||||
@apply gap-1 rounded-t-lg px-4 [.border-b]:pb-4;
|
||||
}
|
||||
|
||||
.card-sm > header {
|
||||
.card[data-size='sm'] > header {
|
||||
@apply px-3 [.border-b]:pb-3;
|
||||
}
|
||||
|
||||
.card > header > :is(h2, h3, [data-title], .card-title),
|
||||
.card-sm > header > :is(h2, h3, [data-title], .card-title) {
|
||||
.card > header > :is(h2, h3, [data-title], .card-title) {
|
||||
@apply text-sm font-medium;
|
||||
}
|
||||
|
||||
.card > header > :is(p, [data-description], .card-description),
|
||||
.card-sm > header > :is(p, [data-description], .card-description) {
|
||||
.card > header > :is(p, [data-description], .card-description) {
|
||||
@apply text-muted-foreground text-xs/relaxed;
|
||||
}
|
||||
|
||||
.card > section,
|
||||
.card-sm > section {
|
||||
.card > section {
|
||||
@apply px-4;
|
||||
}
|
||||
|
||||
.card-sm > section {
|
||||
.card[data-size='sm'] > section {
|
||||
@apply px-3;
|
||||
}
|
||||
|
||||
.card > footer,
|
||||
.card-sm > footer {
|
||||
.card > footer {
|
||||
@apply rounded-b-lg px-4 [.border-t]:pt-4;
|
||||
}
|
||||
|
||||
.card-sm > footer {
|
||||
.card[data-size='sm'] > footer {
|
||||
@apply px-3 [.border-t]:pt-3;
|
||||
}
|
||||
|
||||
/* Chart */
|
||||
.chart {
|
||||
--chart-bar-radius: 6px;
|
||||
}
|
||||
|
||||
.chart-tooltip {
|
||||
@apply border-border/50 bg-background text-foreground gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl;
|
||||
}
|
||||
@@ -915,8 +714,7 @@
|
||||
@apply gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3;
|
||||
}
|
||||
|
||||
.fieldset > legend,
|
||||
.field-legend {
|
||||
.fieldset > legend {
|
||||
@apply mb-2 font-medium data-[variant=label]:text-xs/relaxed data-[variant=legend]:text-sm;
|
||||
}
|
||||
|
||||
@@ -925,6 +723,8 @@
|
||||
@apply gap-4;
|
||||
|
||||
&[role='radiogroup'],
|
||||
&:has(> .field > input[type='checkbox']:not([role='switch'])),
|
||||
&:has(> .field > input[type='radio']),
|
||||
&[data-slot='checkbox-group'],
|
||||
&[data-slot='radio-group'] {
|
||||
@apply gap-3;
|
||||
@@ -937,15 +737,15 @@
|
||||
}
|
||||
|
||||
.field {
|
||||
@apply data-[invalid=true]:text-destructive gap-2;
|
||||
@apply data-invalid:text-destructive data-[invalid=true]:text-destructive gap-2;
|
||||
}
|
||||
|
||||
.field > section,
|
||||
.field-content {
|
||||
.field > section {
|
||||
@apply gap-0.5;
|
||||
}
|
||||
|
||||
.field > label,
|
||||
.field > section > label,
|
||||
label:has(> .field) {
|
||||
@apply has-[:checked]:bg-primary/5 dark:has-[:checked]:bg-primary/10 gap-2 leading-snug in-data-[disabled=true]:opacity-50;
|
||||
}
|
||||
@@ -968,18 +768,25 @@
|
||||
@apply p-2;
|
||||
}
|
||||
.field h2,
|
||||
.field h3,
|
||||
.field-title {
|
||||
.field h3 {
|
||||
@apply gap-2 text-xs/relaxed font-medium in-data-[disabled=true]:opacity-50;
|
||||
}
|
||||
|
||||
.fieldset legend + p,
|
||||
.field > p,
|
||||
.field section > p,
|
||||
.field-description {
|
||||
.field section > p {
|
||||
@apply text-muted-foreground text-start text-xs/relaxed [[data-variant=legend]+&]:-mt-1.5;
|
||||
}
|
||||
|
||||
.fieldset > legend[data-variant='label'] {
|
||||
@apply mb-0;
|
||||
}
|
||||
|
||||
.fieldset > legend:not([data-variant]) + p,
|
||||
.fieldset > legend[data-variant='legend'] + p {
|
||||
@apply -mt-1.5;
|
||||
}
|
||||
|
||||
.field-separator {
|
||||
@apply -my-2 h-5 text-xs/relaxed in-data-[variant=outline]:-mb-2;
|
||||
}
|
||||
@@ -988,8 +795,7 @@
|
||||
@apply text-muted-foreground px-2;
|
||||
}
|
||||
|
||||
.field [role="alert"],
|
||||
.field-error {
|
||||
.field [role="alert"] {
|
||||
@apply text-destructive text-xs/relaxed;
|
||||
}
|
||||
|
||||
@@ -1002,16 +808,15 @@
|
||||
.input-group:has(> :is(input, textarea, select, [data-control]):disabled) {
|
||||
@apply opacity-50;
|
||||
}
|
||||
|
||||
.input-group > :is(input, select, [data-control]) {
|
||||
@apply px-2 py-0.5 text-xs/relaxed;
|
||||
}
|
||||
|
||||
.input-group:not([data-orientation='vertical']):has(> [data-align='start']) > :is(input, select, [data-control]) {
|
||||
.input-group:not([data-orientation='vertical']):has(> :is([data-align='start'], [data-align='inline-start'])) > :is(input, select, [data-control]) {
|
||||
@apply ps-1.5;
|
||||
}
|
||||
|
||||
.input-group:not([data-orientation='vertical']):has(> [data-align='end']) > :is(input, select, [data-control]) {
|
||||
.input-group:not([data-orientation='vertical']):has(> :is([data-align='end'], [data-align='inline-end'])) > :is(input, select, [data-control]) {
|
||||
@apply pe-1.5;
|
||||
}
|
||||
|
||||
@@ -1024,33 +829,74 @@
|
||||
@apply gap-1 py-2 text-xs/relaxed font-medium text-muted-foreground select-none [&>svg:not([class*='size-'])]:size-3.5;
|
||||
}
|
||||
|
||||
.input-group > [data-align='start'] {
|
||||
.input-group > :is([data-align='start'], [data-align='inline-start']) {
|
||||
@apply ps-2;
|
||||
}
|
||||
|
||||
.input-group > [data-align='end'] {
|
||||
.input-group > :is([data-align='end'], [data-align='inline-end']) {
|
||||
@apply pe-2;
|
||||
}
|
||||
|
||||
.input-group > [data-align='start']:has(> button) {
|
||||
.input-group > :is([data-align='start'], [data-align='inline-start']):has(> button) {
|
||||
@apply -ms-1;
|
||||
}
|
||||
|
||||
.input-group > [data-align='end']:has(> button) {
|
||||
.input-group > :is([data-align='end'], [data-align='inline-end']):has(> button) {
|
||||
@apply -me-1;
|
||||
}
|
||||
|
||||
.input-group > [data-align='start']:has(> kbd) {
|
||||
.input-group > :is([data-align='start'], [data-align='inline-start']):has(> kbd) {
|
||||
@apply -ms-0.5;
|
||||
}
|
||||
|
||||
.input-group > [data-align='end']:has(> kbd) {
|
||||
.input-group > :is([data-align='end'], [data-align='inline-end']):has(> kbd) {
|
||||
@apply -me-0.5;
|
||||
}
|
||||
|
||||
.input-group > [data-align='block-start'] {
|
||||
@apply px-2.5 pt-2;
|
||||
}
|
||||
|
||||
.input-group > [data-align='block-end'] {
|
||||
@apply px-2.5 pb-2;
|
||||
}
|
||||
|
||||
.input-group > [data-align='block-start'].border-b {
|
||||
@apply pb-2;
|
||||
}
|
||||
|
||||
.input-group > [data-align='block-end'].border-t {
|
||||
@apply pt-2;
|
||||
}
|
||||
.input-group[data-orientation='vertical'] > :is(header, footer, [role='group'], [data-align]) {
|
||||
@apply px-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(header[data-align='start'], [data-align='block-start']) {
|
||||
@apply px-2 pt-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(footer[data-align='end'], [data-align='block-end']) {
|
||||
@apply px-2 pb-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical']:has(> input) > :is(header[data-align='start'], [data-align='block-start']) {
|
||||
@apply pt-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical']:has(> input) > :is(footer[data-align='end'], [data-align='block-end']) {
|
||||
@apply pb-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(header[data-align='start'], [data-align='block-start']).border-b {
|
||||
@apply pb-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(footer[data-align='end'], [data-align='block-end']).border-t {
|
||||
@apply pt-2;
|
||||
}
|
||||
|
||||
|
||||
.input-group > :is(kbd, span > kbd, [role='group'] > kbd, header > kbd, footer > kbd) {
|
||||
@apply rounded-[calc(var(--radius-sm)-2px)] bg-muted-foreground/10 px-1 text-[0.625rem];
|
||||
}
|
||||
@@ -1085,7 +931,7 @@
|
||||
@apply text-sm font-medium tracking-tight;
|
||||
}
|
||||
|
||||
.empty p {
|
||||
.empty > header > p {
|
||||
@apply text-muted-foreground text-xs/relaxed;
|
||||
}
|
||||
|
||||
@@ -1136,15 +982,15 @@
|
||||
@apply [&_svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.item > figure:has(img) {
|
||||
.item > figure:has(> img) {
|
||||
@apply size-8 overflow-hidden rounded-sm;
|
||||
}
|
||||
|
||||
.item[data-size='sm'] > figure:has(img) {
|
||||
.item[data-size='sm'] > figure:has(> img) {
|
||||
@apply size-8;
|
||||
}
|
||||
|
||||
.item[data-size='xs'] > figure:has(img) {
|
||||
.item[data-size='xs'] > figure:has(> img) {
|
||||
@apply size-6;
|
||||
}
|
||||
|
||||
@@ -1194,16 +1040,16 @@
|
||||
@apply bg-muted text-muted-foreground in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 h-5 w-fit min-w-5 gap-1 rounded-xs px-1 font-sans text-[0.625rem] font-medium [&_svg:not([class*='size-'])]:size-3;
|
||||
}
|
||||
|
||||
.kbd-group {
|
||||
@apply gap-1;
|
||||
}
|
||||
|
||||
/* Label */
|
||||
.field > label,
|
||||
.label {
|
||||
@apply gap-2 text-xs/relaxed leading-none font-medium in-data-[disabled=true]:opacity-50 peer-disabled:opacity-50;
|
||||
}
|
||||
|
||||
.field > section > label {
|
||||
@apply gap-2 text-xs/relaxed font-medium in-data-[disabled=true]:opacity-50 peer-disabled:opacity-50;
|
||||
}
|
||||
|
||||
/* Sidebar */
|
||||
.sidebar nav {
|
||||
@apply bg-sidebar text-sidebar-foreground;
|
||||
@@ -1293,6 +1139,14 @@
|
||||
.sidebar nav ul ul > li > details > summary {
|
||||
@apply text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground h-7 gap-2 rounded-md px-2 text-xs focus-visible:ring-2 [&>svg]:size-4;
|
||||
}
|
||||
/* Progress */
|
||||
.progress {
|
||||
@apply bg-muted h-1 rounded-md;
|
||||
}
|
||||
|
||||
.progress > span {
|
||||
@apply bg-primary;
|
||||
}
|
||||
|
||||
/* Skeleton */
|
||||
.skeleton {
|
||||
|
||||
+150
-295
@@ -1,247 +1,64 @@
|
||||
/* Button */
|
||||
@layer components {
|
||||
.btn,
|
||||
.btn-primary,
|
||||
.btn-secondary,
|
||||
.btn-outline,
|
||||
.btn-ghost,
|
||||
.btn-link,
|
||||
.btn-destructive,
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-xs-secondary,
|
||||
.btn-xs-outline,
|
||||
.btn-xs-ghost,
|
||||
.btn-xs-link,
|
||||
.btn-xs-destructive,
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-sm-secondary,
|
||||
.btn-sm-outline,
|
||||
.btn-sm-ghost,
|
||||
.btn-sm-link,
|
||||
.btn-sm-destructive,
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-lg-secondary,
|
||||
.btn-lg-outline,
|
||||
.btn-lg-ghost,
|
||||
.btn-lg-link,
|
||||
.btn-lg-destructive,
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-icon-secondary,
|
||||
.btn-icon-outline,
|
||||
.btn-icon-ghost,
|
||||
.btn-icon-link,
|
||||
.btn-icon-destructive,
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-xs-icon-link,
|
||||
.btn-xs-icon-destructive,
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-sm-icon-link,
|
||||
.btn-sm-icon-destructive,
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary,
|
||||
.btn-lg-icon-secondary,
|
||||
.btn-lg-icon-outline,
|
||||
.btn-lg-icon-ghost,
|
||||
.btn-lg-icon-link,
|
||||
.btn-lg-icon-destructive {
|
||||
.btn {
|
||||
@apply rounded-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 active:not-aria-[haspopup]:translate-y-px [&_svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.btn,
|
||||
.btn-primary,
|
||||
.btn-secondary,
|
||||
.btn-outline,
|
||||
.btn-ghost,
|
||||
.btn-link,
|
||||
.btn-destructive {
|
||||
@apply h-8 gap-1.5 px-2.5;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-2;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-2;
|
||||
}
|
||||
.btn:not([data-size]),
|
||||
.btn[data-size='default'] {
|
||||
@apply h-8 gap-1.5 px-2.5 has-[[data-icon='inline-end']]:pr-2 has-[[data-icon='inline-start']]:pl-2;
|
||||
}
|
||||
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-xs-secondary,
|
||||
.btn-xs-outline,
|
||||
.btn-xs-ghost,
|
||||
.btn-xs-link,
|
||||
.btn-xs-destructive {
|
||||
@apply h-6 gap-1 px-2 text-xs rounded-[min(var(--radius-md),10px)] [&_svg:not([class*='size-'])]:size-3;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-1.5;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-1.5;
|
||||
}
|
||||
.btn[data-size='xs'] {
|
||||
@apply h-6 gap-1 px-2 text-xs rounded-[min(var(--radius-md),10px)] [&_svg:not([class*='size-'])]:size-3 has-[[data-icon='inline-end']]:pr-1.5 has-[[data-icon='inline-start']]:pl-1.5;
|
||||
}
|
||||
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-sm-secondary,
|
||||
.btn-sm-outline,
|
||||
.btn-sm-ghost,
|
||||
.btn-sm-link,
|
||||
.btn-sm-destructive {
|
||||
@apply h-7 gap-1 px-2.5 text-[0.8rem] rounded-[min(var(--radius-md),12px)] [&_svg:not([class*='size-'])]:size-3.5;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-1.5;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-1.5;
|
||||
}
|
||||
.btn[data-size='sm'] {
|
||||
@apply h-7 gap-1 px-2.5 text-[0.8rem] rounded-[min(var(--radius-md),12px)] [&_svg:not([class*='size-'])]:size-3.5 has-[[data-icon='inline-end']]:pr-1.5 has-[[data-icon='inline-start']]:pl-1.5;
|
||||
}
|
||||
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-lg-secondary,
|
||||
.btn-lg-outline,
|
||||
.btn-lg-ghost,
|
||||
.btn-lg-link,
|
||||
.btn-lg-destructive {
|
||||
@apply h-9 gap-1.5 px-2.5;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-2;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-2;
|
||||
}
|
||||
.btn[data-size='lg'] {
|
||||
@apply h-9 gap-1.5 px-2.5 has-[[data-icon='inline-end']]:pr-2 has-[[data-icon='inline-start']]:pl-2;
|
||||
}
|
||||
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-icon-secondary,
|
||||
.btn-icon-outline,
|
||||
.btn-icon-ghost,
|
||||
.btn-icon-link,
|
||||
.btn-icon-destructive {
|
||||
.btn[data-size='icon'] {
|
||||
@apply size-8;
|
||||
}
|
||||
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-xs-icon-link,
|
||||
.btn-xs-icon-destructive {
|
||||
.btn[data-size='icon-xs'] {
|
||||
@apply size-6 rounded-[min(var(--radius-md),10px)] [&_svg:not([class*='size-'])]:size-3;
|
||||
}
|
||||
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-sm-icon-link,
|
||||
.btn-sm-icon-destructive {
|
||||
.btn[data-size='icon-sm'] {
|
||||
@apply size-7 rounded-[min(var(--radius-md),12px)];
|
||||
}
|
||||
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary,
|
||||
.btn-lg-icon-secondary,
|
||||
.btn-lg-icon-outline,
|
||||
.btn-lg-icon-ghost,
|
||||
.btn-lg-icon-link,
|
||||
.btn-lg-icon-destructive {
|
||||
.btn[data-size='icon-lg'] {
|
||||
@apply size-9;
|
||||
}
|
||||
|
||||
.btn,
|
||||
.btn-primary,
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary {
|
||||
.btn:not([data-variant]),
|
||||
.btn[data-variant='primary'] {
|
||||
@apply bg-primary text-primary-foreground hover:bg-primary/80;
|
||||
}
|
||||
|
||||
.btn-secondary,
|
||||
.btn-xs-secondary,
|
||||
.btn-sm-secondary,
|
||||
.btn-lg-secondary,
|
||||
.btn-icon-secondary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-lg-icon-secondary {
|
||||
.btn[data-variant='secondary'] {
|
||||
@apply bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground;
|
||||
}
|
||||
|
||||
.btn-outline,
|
||||
.btn-xs-outline,
|
||||
.btn-sm-outline,
|
||||
.btn-lg-outline,
|
||||
.btn-icon-outline,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-lg-icon-outline {
|
||||
.btn[data-variant='outline'] {
|
||||
@apply border-border bg-background hover:bg-muted hover:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground;
|
||||
}
|
||||
|
||||
.btn-ghost,
|
||||
.btn-xs-ghost,
|
||||
.btn-sm-ghost,
|
||||
.btn-lg-ghost,
|
||||
.btn-icon-ghost,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-lg-icon-ghost {
|
||||
.btn[data-variant='ghost'] {
|
||||
@apply hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground;
|
||||
}
|
||||
|
||||
.btn-link,
|
||||
.btn-xs-link,
|
||||
.btn-sm-link,
|
||||
.btn-lg-link,
|
||||
.btn-icon-link,
|
||||
.btn-xs-icon-link,
|
||||
.btn-sm-icon-link,
|
||||
.btn-lg-icon-link {
|
||||
.btn[data-variant='link'] {
|
||||
@apply text-primary underline-offset-4 hover:underline;
|
||||
}
|
||||
|
||||
.btn-destructive,
|
||||
.btn-xs-destructive,
|
||||
.btn-sm-destructive,
|
||||
.btn-lg-destructive,
|
||||
.btn-icon-destructive,
|
||||
.btn-xs-icon-destructive,
|
||||
.btn-sm-icon-destructive,
|
||||
.btn-lg-icon-destructive {
|
||||
.btn[data-variant='destructive'] {
|
||||
@apply bg-destructive/10 text-destructive hover:bg-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40;
|
||||
}
|
||||
|
||||
@@ -268,8 +85,7 @@
|
||||
@apply bg-muted gap-2 rounded-lg border px-2.5 text-sm font-medium [&_svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.button-group > hr[role='separator'],
|
||||
.button-group-separator {
|
||||
.button-group > hr[role='separator'] {
|
||||
@apply bg-input;
|
||||
}
|
||||
|
||||
@@ -381,8 +197,7 @@
|
||||
}
|
||||
|
||||
/* Alert */
|
||||
.alert,
|
||||
.alert-destructive {
|
||||
.alert {
|
||||
@apply grid gap-0.5 rounded-lg border px-2.5 py-2 text-start text-sm has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 [&>svg]:row-span-2 [&>svg]:translate-y-0.5 [&>svg]:text-current [&>svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
@@ -390,35 +205,33 @@
|
||||
@apply bg-card text-card-foreground;
|
||||
}
|
||||
|
||||
.alert-destructive {
|
||||
.alert[data-variant='destructive'] {
|
||||
@apply text-destructive bg-card [&>svg]:text-current;
|
||||
}
|
||||
|
||||
.alert > :is(h2, h3, h4, h5, h6, strong, [data-title]),
|
||||
.alert-destructive > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
.alert[data-variant='destructive'] > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
@apply font-medium;
|
||||
}
|
||||
|
||||
|
||||
:is(.alert, .alert-destructive):has(> svg) > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
.alert:has(> svg) > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
@apply col-start-2;
|
||||
}
|
||||
.alert > section {
|
||||
@apply text-muted-foreground text-sm text-balance md:text-pretty [&_p:not(:last-child)]:mb-4;
|
||||
}
|
||||
|
||||
.alert-destructive > section {
|
||||
.alert[data-variant='destructive'] > section {
|
||||
@apply text-destructive/90 text-sm text-balance md:text-pretty [&_p:not(:last-child)]:mb-4;
|
||||
}
|
||||
|
||||
.alert > footer,
|
||||
.alert-destructive > footer {
|
||||
.alert[data-variant='destructive'] > footer {
|
||||
@apply top-2 end-2;
|
||||
}
|
||||
/* Avatar */
|
||||
.avatar,
|
||||
.avatar-sm,
|
||||
.avatar-lg {
|
||||
.avatar {
|
||||
@apply rounded-full after:rounded-[inherit];
|
||||
}
|
||||
|
||||
@@ -426,29 +239,23 @@
|
||||
@apply size-8;
|
||||
}
|
||||
|
||||
.avatar-sm {
|
||||
.avatar[data-size='sm'] {
|
||||
@apply size-6;
|
||||
}
|
||||
|
||||
.avatar-lg {
|
||||
.avatar[data-size='lg'] {
|
||||
@apply size-10;
|
||||
}
|
||||
|
||||
.avatar > span:not([data-badge]),
|
||||
.avatar-sm > span:not([data-badge]),
|
||||
.avatar-lg > span:not([data-badge]) {
|
||||
.avatar > span:not([data-badge]) {
|
||||
@apply bg-muted text-muted-foreground rounded-[inherit];
|
||||
}
|
||||
|
||||
.avatar > img,
|
||||
.avatar-sm > img,
|
||||
.avatar-lg > img {
|
||||
.avatar > img {
|
||||
@apply rounded-[inherit];
|
||||
}
|
||||
|
||||
.avatar > [data-badge],
|
||||
.avatar-sm > [data-badge],
|
||||
.avatar-lg > [data-badge] {
|
||||
.avatar > [data-badge] {
|
||||
@apply bg-primary text-primary-foreground ring-background;
|
||||
}
|
||||
|
||||
@@ -456,47 +263,41 @@
|
||||
@apply bg-muted text-muted-foreground size-8 rounded-full text-sm [&>svg]:size-4;
|
||||
}
|
||||
|
||||
.avatar-group:has(> .avatar-sm) > [data-count] {
|
||||
.avatar-group:has(> .avatar[data-size='sm']) > [data-count] {
|
||||
@apply size-6 [&>svg]:size-3;
|
||||
}
|
||||
|
||||
.avatar-group:has(> .avatar-lg) > [data-count] {
|
||||
.avatar-group:has(> .avatar[data-size='lg']) > [data-count] {
|
||||
@apply size-10 [&>svg]:size-5;
|
||||
}
|
||||
|
||||
/* Badge */
|
||||
.badge,
|
||||
.badge-primary,
|
||||
.badge-secondary,
|
||||
.badge-destructive,
|
||||
.badge-outline,
|
||||
.badge-ghost,
|
||||
.badge-link {
|
||||
@apply h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&>svg]:size-3!;
|
||||
.badge {
|
||||
@apply h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all [&>svg]:size-3!;
|
||||
}
|
||||
|
||||
.badge,
|
||||
.badge-primary {
|
||||
.badge:not([data-variant]),
|
||||
.badge[data-variant='primary'] {
|
||||
@apply bg-primary text-primary-foreground [a]:hover:bg-primary/80;
|
||||
}
|
||||
|
||||
.badge-secondary {
|
||||
.badge[data-variant='secondary'] {
|
||||
@apply bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80;
|
||||
}
|
||||
|
||||
.badge-outline {
|
||||
.badge[data-variant='outline'] {
|
||||
@apply border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground;
|
||||
}
|
||||
|
||||
.badge-destructive {
|
||||
.badge[data-variant='destructive'] {
|
||||
@apply bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20;
|
||||
}
|
||||
|
||||
.badge-ghost {
|
||||
.badge[data-variant='ghost'] {
|
||||
@apply hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50;
|
||||
}
|
||||
|
||||
.badge-link {
|
||||
.badge[data-variant='link'] {
|
||||
@apply text-primary underline-offset-4 hover:underline;
|
||||
}
|
||||
|
||||
@@ -590,7 +391,7 @@
|
||||
|
||||
.combobox [role='option'].active,
|
||||
.combobox [role='option']:focus-visible {
|
||||
@apply bg-accent text-accent-foreground [&_svg]:text-accent-foreground;
|
||||
@apply bg-muted text-foreground [&_svg]:text-foreground;
|
||||
}
|
||||
|
||||
.combobox [role='group'] {
|
||||
@@ -650,7 +451,7 @@
|
||||
|
||||
*:not(select).select [role='option'].active,
|
||||
*:not(select).select [role='option']:focus-visible {
|
||||
@apply bg-accent text-accent-foreground [&_svg]:text-accent-foreground;
|
||||
@apply bg-muted text-foreground [&_svg]:text-foreground;
|
||||
}
|
||||
|
||||
*:not(select).select [role='group'] {
|
||||
@@ -704,7 +505,7 @@
|
||||
}
|
||||
|
||||
.dropdown-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']).active {
|
||||
@apply bg-accent text-accent-foreground;
|
||||
@apply bg-muted text-foreground;
|
||||
}
|
||||
|
||||
.dropdown-menu [data-variant='destructive'] {
|
||||
@@ -740,11 +541,11 @@
|
||||
@apply bg-border -mx-1 my-1 h-px;
|
||||
}
|
||||
|
||||
.dropdown-menu [data-shortcut] {
|
||||
@apply text-muted-foreground text-xs tracking-widest;
|
||||
.dropdown-menu :is([data-shortcut], kbd:last-child) {
|
||||
@apply text-muted-foreground font-sans text-xs tracking-widest;
|
||||
}
|
||||
|
||||
.dropdown-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']):is(:focus-visible, .active) [data-shortcut] {
|
||||
.dropdown-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']):is(:focus-visible, .active) :is([data-shortcut], kbd:last-child) {
|
||||
@apply text-accent-foreground;
|
||||
}
|
||||
|
||||
@@ -768,8 +569,7 @@
|
||||
}
|
||||
|
||||
/* Card */
|
||||
.card,
|
||||
.card-sm {
|
||||
.card {
|
||||
@apply ring-foreground/10 bg-card text-card-foreground overflow-hidden rounded-xl text-sm ring-1 has-[>footer]:pb-0 has-[>img:first-child]:pt-0 [&>img:first-child]:rounded-t-xl [&>img:last-child]:rounded-b-xl;
|
||||
}
|
||||
|
||||
@@ -777,52 +577,51 @@
|
||||
@apply gap-4 py-4;
|
||||
}
|
||||
|
||||
.card-sm {
|
||||
.card[data-size='sm'] {
|
||||
@apply gap-3 py-3;
|
||||
}
|
||||
|
||||
.card > header,
|
||||
.card-sm > header {
|
||||
.card > header {
|
||||
@apply gap-1 rounded-t-xl px-4 [.border-b]:pb-4;
|
||||
}
|
||||
|
||||
.card-sm > header {
|
||||
.card[data-size='sm'] > header {
|
||||
@apply px-3 [.border-b]:pb-3;
|
||||
}
|
||||
|
||||
.card > header > :is(h2, h3, [data-title], .card-title),
|
||||
.card-sm > header > :is(h2, h3, [data-title], .card-title) {
|
||||
.card > header > :is(h2, h3, [data-title], .card-title) {
|
||||
@apply text-base leading-snug font-medium;
|
||||
}
|
||||
|
||||
.card-sm > header > :is(h2, h3, [data-title], .card-title) {
|
||||
.card[data-size='sm'] > header > :is(h2, h3, [data-title], .card-title) {
|
||||
@apply text-sm;
|
||||
}
|
||||
|
||||
.card > header > :is(p, [data-description], .card-description),
|
||||
.card-sm > header > :is(p, [data-description], .card-description) {
|
||||
.card > header > :is(p, [data-description], .card-description) {
|
||||
@apply text-muted-foreground text-sm;
|
||||
}
|
||||
|
||||
.card > section,
|
||||
.card-sm > section {
|
||||
.card > section {
|
||||
@apply px-4;
|
||||
}
|
||||
|
||||
.card-sm > section {
|
||||
.card[data-size='sm'] > section {
|
||||
@apply px-3;
|
||||
}
|
||||
|
||||
.card > footer,
|
||||
.card-sm > footer {
|
||||
.card > footer {
|
||||
@apply bg-muted/50 rounded-b-xl border-t p-4;
|
||||
}
|
||||
|
||||
.card-sm > footer {
|
||||
.card[data-size='sm'] > footer {
|
||||
@apply p-3;
|
||||
}
|
||||
|
||||
/* Chart */
|
||||
.chart {
|
||||
--chart-bar-radius: 6px;
|
||||
}
|
||||
|
||||
.chart-tooltip {
|
||||
@apply border-border/50 bg-background text-foreground gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl;
|
||||
}
|
||||
@@ -915,8 +714,7 @@
|
||||
@apply gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3;
|
||||
}
|
||||
|
||||
.fieldset > legend,
|
||||
.field-legend {
|
||||
.fieldset > legend {
|
||||
@apply mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base;
|
||||
}
|
||||
|
||||
@@ -925,6 +723,8 @@
|
||||
@apply gap-5;
|
||||
|
||||
&[role='radiogroup'],
|
||||
&:has(> .field > input[type='checkbox']:not([role='switch'])),
|
||||
&:has(> .field > input[type='radio']),
|
||||
&[data-slot='checkbox-group'],
|
||||
&[data-slot='radio-group'] {
|
||||
@apply gap-3;
|
||||
@@ -937,15 +737,15 @@
|
||||
}
|
||||
|
||||
.field {
|
||||
@apply data-[invalid=true]:text-destructive gap-2;
|
||||
@apply data-invalid:text-destructive data-[invalid=true]:text-destructive gap-2;
|
||||
}
|
||||
|
||||
.field > section,
|
||||
.field-content {
|
||||
.field > section {
|
||||
@apply gap-0.5;
|
||||
}
|
||||
|
||||
.field > label,
|
||||
.field > section > label,
|
||||
label:has(> .field) {
|
||||
@apply has-[:checked]:bg-primary/5 has-[:checked]:border-primary/30 dark:has-[:checked]:border-primary/20 dark:has-[:checked]:bg-primary/10 gap-2 leading-snug in-data-[disabled=true]:opacity-50;
|
||||
}
|
||||
@@ -968,18 +768,25 @@
|
||||
@apply p-2.5;
|
||||
}
|
||||
.field h2,
|
||||
.field h3,
|
||||
.field-title {
|
||||
.field h3 {
|
||||
@apply gap-2 leading-snug text-sm font-medium in-data-[disabled=true]:opacity-50;
|
||||
}
|
||||
|
||||
.fieldset legend + p,
|
||||
.field > p,
|
||||
.field section > p,
|
||||
.field-description {
|
||||
.field section > p {
|
||||
@apply text-muted-foreground text-start text-sm [[data-variant=legend]+&]:-mt-1.5;
|
||||
}
|
||||
|
||||
.fieldset > legend[data-variant='label'] {
|
||||
@apply mb-0;
|
||||
}
|
||||
|
||||
.fieldset > legend:not([data-variant]) + p,
|
||||
.fieldset > legend[data-variant='legend'] + p {
|
||||
@apply -mt-1.5;
|
||||
}
|
||||
|
||||
.field-separator {
|
||||
@apply -my-2 h-5 text-sm in-data-[variant=outline]:-mb-2;
|
||||
}
|
||||
@@ -988,8 +795,7 @@
|
||||
@apply text-muted-foreground px-2;
|
||||
}
|
||||
|
||||
.field [role="alert"],
|
||||
.field-error {
|
||||
.field [role="alert"] {
|
||||
@apply text-destructive text-sm;
|
||||
}
|
||||
|
||||
@@ -1000,18 +806,18 @@
|
||||
|
||||
|
||||
.input-group:has(> :is(input, textarea, select, [data-control]):disabled) {
|
||||
@apply opacity-50;
|
||||
@apply bg-input/50 opacity-50 dark:bg-input/80;
|
||||
}
|
||||
|
||||
.input-group > :is(input, select, [data-control]) {
|
||||
@apply px-2.5 py-1 text-sm;
|
||||
}
|
||||
|
||||
.input-group:not([data-orientation='vertical']):has(> [data-align='start']) > :is(input, select, [data-control]) {
|
||||
.input-group:not([data-orientation='vertical']):has(> :is([data-align='start'], [data-align='inline-start'])) > :is(input, select, [data-control]) {
|
||||
@apply ps-1.5;
|
||||
}
|
||||
|
||||
.input-group:not([data-orientation='vertical']):has(> [data-align='end']) > :is(input, select, [data-control]) {
|
||||
.input-group:not([data-orientation='vertical']):has(> :is([data-align='end'], [data-align='inline-end'])) > :is(input, select, [data-control]) {
|
||||
@apply pe-1.5;
|
||||
}
|
||||
|
||||
@@ -1024,33 +830,74 @@
|
||||
@apply gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none [&>svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.input-group > [data-align='start'] {
|
||||
.input-group > :is([data-align='start'], [data-align='inline-start']) {
|
||||
@apply ps-2;
|
||||
}
|
||||
|
||||
.input-group > [data-align='end'] {
|
||||
.input-group > :is([data-align='end'], [data-align='inline-end']) {
|
||||
@apply pe-2;
|
||||
}
|
||||
|
||||
.input-group > [data-align='start']:has(> button) {
|
||||
.input-group > :is([data-align='start'], [data-align='inline-start']):has(> button) {
|
||||
@apply -ms-1;
|
||||
}
|
||||
|
||||
.input-group > [data-align='end']:has(> button) {
|
||||
.input-group > :is([data-align='end'], [data-align='inline-end']):has(> button) {
|
||||
@apply -me-1;
|
||||
}
|
||||
|
||||
.input-group > [data-align='start']:has(> kbd) {
|
||||
.input-group > :is([data-align='start'], [data-align='inline-start']):has(> kbd) {
|
||||
@apply -ms-0.5;
|
||||
}
|
||||
|
||||
.input-group > [data-align='end']:has(> kbd) {
|
||||
.input-group > :is([data-align='end'], [data-align='inline-end']):has(> kbd) {
|
||||
@apply -me-0.5;
|
||||
}
|
||||
|
||||
.input-group > [data-align='block-start'] {
|
||||
@apply px-2.5 pt-2;
|
||||
}
|
||||
|
||||
.input-group > [data-align='block-end'] {
|
||||
@apply px-2.5 pb-2;
|
||||
}
|
||||
|
||||
.input-group > [data-align='block-start'].border-b {
|
||||
@apply pb-2;
|
||||
}
|
||||
|
||||
.input-group > [data-align='block-end'].border-t {
|
||||
@apply pt-2;
|
||||
}
|
||||
.input-group[data-orientation='vertical'] > :is(header, footer, [role='group'], [data-align]) {
|
||||
@apply px-2.5;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(header[data-align='start'], [data-align='block-start']) {
|
||||
@apply px-2.5 pt-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(footer[data-align='end'], [data-align='block-end']) {
|
||||
@apply px-2.5 pb-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical']:has(> input) > :is(header[data-align='start'], [data-align='block-start']) {
|
||||
@apply pt-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical']:has(> input) > :is(footer[data-align='end'], [data-align='block-end']) {
|
||||
@apply pb-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(header[data-align='start'], [data-align='block-start']).border-b {
|
||||
@apply pb-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(footer[data-align='end'], [data-align='block-end']).border-t {
|
||||
@apply pt-2;
|
||||
}
|
||||
|
||||
|
||||
.input-group > :is(kbd, span > kbd, [role='group'] > kbd, header > kbd, footer > kbd) {
|
||||
@apply rounded-[calc(var(--radius)-5px)];
|
||||
}
|
||||
@@ -1085,7 +932,7 @@
|
||||
@apply text-sm font-medium tracking-tight;
|
||||
}
|
||||
|
||||
.empty p {
|
||||
.empty > header > p {
|
||||
@apply text-muted-foreground text-sm/relaxed;
|
||||
}
|
||||
|
||||
@@ -1136,15 +983,15 @@
|
||||
@apply [&_svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.item > figure:has(img) {
|
||||
.item > figure:has(> img) {
|
||||
@apply size-10 overflow-hidden rounded-sm;
|
||||
}
|
||||
|
||||
.item[data-size='sm'] > figure:has(img) {
|
||||
.item[data-size='sm'] > figure:has(> img) {
|
||||
@apply size-8;
|
||||
}
|
||||
|
||||
.item[data-size='xs'] > figure:has(img) {
|
||||
.item[data-size='xs'] > figure:has(> img) {
|
||||
@apply size-6;
|
||||
}
|
||||
|
||||
@@ -1194,16 +1041,16 @@
|
||||
@apply bg-muted text-muted-foreground in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 h-5 w-fit min-w-5 gap-1 rounded-sm px-1 font-sans text-xs font-medium [&_svg:not([class*='size-'])]:size-3;
|
||||
}
|
||||
|
||||
.kbd-group {
|
||||
@apply gap-1;
|
||||
}
|
||||
|
||||
/* Label */
|
||||
.field > label,
|
||||
.label {
|
||||
@apply gap-2 text-sm leading-none font-medium in-data-[disabled=true]:opacity-50 peer-disabled:opacity-50;
|
||||
}
|
||||
|
||||
.field > section > label {
|
||||
@apply gap-2 text-sm leading-snug font-medium in-data-[disabled=true]:opacity-50 peer-disabled:opacity-50;
|
||||
}
|
||||
|
||||
/* Sidebar */
|
||||
.sidebar nav {
|
||||
@apply bg-sidebar text-sidebar-foreground;
|
||||
@@ -1293,6 +1140,14 @@
|
||||
.sidebar nav ul ul > li > details > summary {
|
||||
@apply text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground h-7 gap-2 rounded-md px-2 text-sm focus-visible:ring-2 [&>svg]:size-4;
|
||||
}
|
||||
/* Progress */
|
||||
.progress {
|
||||
@apply bg-muted h-1 rounded-full;
|
||||
}
|
||||
|
||||
.progress > span {
|
||||
@apply bg-primary;
|
||||
}
|
||||
|
||||
/* Skeleton */
|
||||
.skeleton {
|
||||
|
||||
+150
-296
@@ -1,247 +1,64 @@
|
||||
/* Button */
|
||||
@layer components {
|
||||
.btn,
|
||||
.btn-primary,
|
||||
.btn-secondary,
|
||||
.btn-outline,
|
||||
.btn-ghost,
|
||||
.btn-link,
|
||||
.btn-destructive,
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-xs-secondary,
|
||||
.btn-xs-outline,
|
||||
.btn-xs-ghost,
|
||||
.btn-xs-link,
|
||||
.btn-xs-destructive,
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-sm-secondary,
|
||||
.btn-sm-outline,
|
||||
.btn-sm-ghost,
|
||||
.btn-sm-link,
|
||||
.btn-sm-destructive,
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-lg-secondary,
|
||||
.btn-lg-outline,
|
||||
.btn-lg-ghost,
|
||||
.btn-lg-link,
|
||||
.btn-lg-destructive,
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-icon-secondary,
|
||||
.btn-icon-outline,
|
||||
.btn-icon-ghost,
|
||||
.btn-icon-link,
|
||||
.btn-icon-destructive,
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-xs-icon-link,
|
||||
.btn-xs-icon-destructive,
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-sm-icon-link,
|
||||
.btn-sm-icon-destructive,
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary,
|
||||
.btn-lg-icon-secondary,
|
||||
.btn-lg-icon-outline,
|
||||
.btn-lg-icon-ghost,
|
||||
.btn-lg-icon-link,
|
||||
.btn-lg-icon-destructive {
|
||||
.btn {
|
||||
@apply rounded-2xl border border-transparent bg-clip-padding text-sm font-medium focus-visible:border-ring focus-visible:ring-ring/30 focus-visible:ring-[3px] aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 active:not-aria-[haspopup]:translate-y-px [&_svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.btn,
|
||||
.btn-primary,
|
||||
.btn-secondary,
|
||||
.btn-outline,
|
||||
.btn-ghost,
|
||||
.btn-link,
|
||||
.btn-destructive {
|
||||
@apply h-8 gap-1.5 px-3;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-2.5;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-2.5;
|
||||
}
|
||||
.btn:not([data-size]),
|
||||
.btn[data-size='default'] {
|
||||
@apply h-8 gap-1.5 px-3 has-[[data-icon='inline-end']]:pr-2.5 has-[[data-icon='inline-start']]:pl-2.5;
|
||||
}
|
||||
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-xs-secondary,
|
||||
.btn-xs-outline,
|
||||
.btn-xs-ghost,
|
||||
.btn-xs-link,
|
||||
.btn-xs-destructive {
|
||||
@apply h-6 gap-1 px-2.5 text-xs [&_svg:not([class*='size-'])]:size-3;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-2;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-2;
|
||||
}
|
||||
.btn[data-size='xs'] {
|
||||
@apply h-6 gap-1 px-2.5 text-xs [&_svg:not([class*='size-'])]:size-3 has-[[data-icon='inline-end']]:pr-2 has-[[data-icon='inline-start']]:pl-2;
|
||||
}
|
||||
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-sm-secondary,
|
||||
.btn-sm-outline,
|
||||
.btn-sm-ghost,
|
||||
.btn-sm-link,
|
||||
.btn-sm-destructive {
|
||||
@apply h-7 gap-1 px-3;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-2;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-2;
|
||||
}
|
||||
.btn[data-size='sm'] {
|
||||
@apply h-7 gap-1 px-3 has-[[data-icon='inline-end']]:pr-2 has-[[data-icon='inline-start']]:pl-2;
|
||||
}
|
||||
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-lg-secondary,
|
||||
.btn-lg-outline,
|
||||
.btn-lg-ghost,
|
||||
.btn-lg-link,
|
||||
.btn-lg-destructive {
|
||||
@apply h-9 gap-1.5 px-4;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-3;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-3;
|
||||
}
|
||||
.btn[data-size='lg'] {
|
||||
@apply h-9 gap-1.5 px-4 has-[[data-icon='inline-end']]:pr-3 has-[[data-icon='inline-start']]:pl-3;
|
||||
}
|
||||
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-icon-secondary,
|
||||
.btn-icon-outline,
|
||||
.btn-icon-ghost,
|
||||
.btn-icon-link,
|
||||
.btn-icon-destructive {
|
||||
.btn[data-size='icon'] {
|
||||
@apply size-8;
|
||||
}
|
||||
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-xs-icon-link,
|
||||
.btn-xs-icon-destructive {
|
||||
.btn[data-size='icon-xs'] {
|
||||
@apply size-6 [&_svg:not([class*='size-'])]:size-3;
|
||||
}
|
||||
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-sm-icon-link,
|
||||
.btn-sm-icon-destructive {
|
||||
.btn[data-size='icon-sm'] {
|
||||
@apply size-7;
|
||||
}
|
||||
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary,
|
||||
.btn-lg-icon-secondary,
|
||||
.btn-lg-icon-outline,
|
||||
.btn-lg-icon-ghost,
|
||||
.btn-lg-icon-link,
|
||||
.btn-lg-icon-destructive {
|
||||
.btn[data-size='icon-lg'] {
|
||||
@apply size-9;
|
||||
}
|
||||
|
||||
.btn,
|
||||
.btn-primary,
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary {
|
||||
.btn:not([data-variant]),
|
||||
.btn[data-variant='primary'] {
|
||||
@apply bg-primary text-primary-foreground hover:bg-primary/80;
|
||||
}
|
||||
|
||||
.btn-secondary,
|
||||
.btn-xs-secondary,
|
||||
.btn-sm-secondary,
|
||||
.btn-lg-secondary,
|
||||
.btn-icon-secondary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-lg-icon-secondary {
|
||||
.btn[data-variant='secondary'] {
|
||||
@apply bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground;
|
||||
}
|
||||
|
||||
.btn-outline,
|
||||
.btn-xs-outline,
|
||||
.btn-sm-outline,
|
||||
.btn-lg-outline,
|
||||
.btn-icon-outline,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-lg-icon-outline {
|
||||
.btn[data-variant='outline'] {
|
||||
@apply border-border bg-background hover:bg-muted hover:text-foreground dark:bg-transparent dark:hover:bg-input/30 aria-expanded:bg-muted aria-expanded:text-foreground;
|
||||
}
|
||||
|
||||
.btn-ghost,
|
||||
.btn-xs-ghost,
|
||||
.btn-sm-ghost,
|
||||
.btn-lg-ghost,
|
||||
.btn-icon-ghost,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-lg-icon-ghost {
|
||||
.btn[data-variant='ghost'] {
|
||||
@apply hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground;
|
||||
}
|
||||
|
||||
.btn-link,
|
||||
.btn-xs-link,
|
||||
.btn-sm-link,
|
||||
.btn-lg-link,
|
||||
.btn-icon-link,
|
||||
.btn-xs-icon-link,
|
||||
.btn-sm-icon-link,
|
||||
.btn-lg-icon-link {
|
||||
.btn[data-variant='link'] {
|
||||
@apply text-primary underline-offset-4 hover:underline;
|
||||
}
|
||||
|
||||
.btn-destructive,
|
||||
.btn-xs-destructive,
|
||||
.btn-sm-destructive,
|
||||
.btn-lg-destructive,
|
||||
.btn-icon-destructive,
|
||||
.btn-xs-icon-destructive,
|
||||
.btn-sm-icon-destructive,
|
||||
.btn-lg-icon-destructive {
|
||||
.btn[data-variant='destructive'] {
|
||||
@apply bg-destructive/10 text-destructive hover:bg-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40;
|
||||
}
|
||||
|
||||
@@ -250,8 +67,8 @@
|
||||
@apply has-[>.button-group]:gap-2;
|
||||
}
|
||||
|
||||
.button-group:has(> :is(.btn-outline, .btn-icon-outline, .btn-xs-outline, .btn-xs-icon-outline, .btn-sm-outline, .btn-sm-icon-outline, .btn-lg-outline, .btn-lg-icon-outline)),
|
||||
.button-group:has(> .select > button:is(.btn-outline, .btn-icon-outline, .btn-xs-outline, .btn-xs-icon-outline, .btn-sm-outline, .btn-sm-icon-outline, .btn-lg-outline, .btn-lg-icon-outline)) {
|
||||
.button-group:has(> .btn[data-variant='outline']),
|
||||
.button-group:has(> .select > button.btn[data-variant='outline']) {
|
||||
> .input,
|
||||
> .select > button {
|
||||
@apply border-border focus-visible:border-ring;
|
||||
@@ -276,8 +93,7 @@
|
||||
@apply bg-muted gap-2 rounded-2xl border px-2.5 text-sm font-medium [&_svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.button-group > hr[role='separator'],
|
||||
.button-group-separator {
|
||||
.button-group > hr[role='separator'] {
|
||||
@apply bg-input;
|
||||
}
|
||||
|
||||
@@ -389,8 +205,7 @@
|
||||
}
|
||||
|
||||
/* Alert */
|
||||
.alert,
|
||||
.alert-destructive {
|
||||
.alert {
|
||||
@apply grid gap-0.5 rounded-2xl border px-4 py-3 text-start text-sm has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 [&>svg]:row-span-2 [&>svg]:translate-y-0.5 [&>svg]:text-current [&>svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
@@ -398,35 +213,33 @@
|
||||
@apply bg-card text-card-foreground;
|
||||
}
|
||||
|
||||
.alert-destructive {
|
||||
.alert[data-variant='destructive'] {
|
||||
@apply text-destructive bg-card [&>svg]:text-current;
|
||||
}
|
||||
|
||||
.alert > :is(h2, h3, h4, h5, h6, strong, [data-title]),
|
||||
.alert-destructive > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
.alert[data-variant='destructive'] > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
@apply font-medium;
|
||||
}
|
||||
|
||||
|
||||
:is(.alert, .alert-destructive):has(> svg) > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
.alert:has(> svg) > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
@apply col-start-2;
|
||||
}
|
||||
.alert > section {
|
||||
@apply text-muted-foreground text-sm text-balance md:text-pretty [&_p:not(:last-child)]:mb-4;
|
||||
}
|
||||
|
||||
.alert-destructive > section {
|
||||
.alert[data-variant='destructive'] > section {
|
||||
@apply text-destructive/90 text-sm text-balance md:text-pretty [&_p:not(:last-child)]:mb-4;
|
||||
}
|
||||
|
||||
.alert > footer,
|
||||
.alert-destructive > footer {
|
||||
.alert[data-variant='destructive'] > footer {
|
||||
@apply top-2.5 end-3;
|
||||
}
|
||||
/* Avatar */
|
||||
.avatar,
|
||||
.avatar-sm,
|
||||
.avatar-lg {
|
||||
.avatar {
|
||||
@apply rounded-full after:rounded-[inherit];
|
||||
}
|
||||
|
||||
@@ -434,29 +247,23 @@
|
||||
@apply size-8;
|
||||
}
|
||||
|
||||
.avatar-sm {
|
||||
.avatar[data-size='sm'] {
|
||||
@apply size-6;
|
||||
}
|
||||
|
||||
.avatar-lg {
|
||||
.avatar[data-size='lg'] {
|
||||
@apply size-10;
|
||||
}
|
||||
|
||||
.avatar > span:not([data-badge]),
|
||||
.avatar-sm > span:not([data-badge]),
|
||||
.avatar-lg > span:not([data-badge]) {
|
||||
.avatar > span:not([data-badge]) {
|
||||
@apply bg-muted text-muted-foreground rounded-[inherit];
|
||||
}
|
||||
|
||||
.avatar > img,
|
||||
.avatar-sm > img,
|
||||
.avatar-lg > img {
|
||||
.avatar > img {
|
||||
@apply rounded-[inherit];
|
||||
}
|
||||
|
||||
.avatar > [data-badge],
|
||||
.avatar-sm > [data-badge],
|
||||
.avatar-lg > [data-badge] {
|
||||
.avatar > [data-badge] {
|
||||
@apply bg-primary text-primary-foreground ring-background;
|
||||
}
|
||||
|
||||
@@ -464,47 +271,41 @@
|
||||
@apply bg-muted text-muted-foreground size-8 rounded-full text-sm [&>svg]:size-4;
|
||||
}
|
||||
|
||||
.avatar-group:has(> .avatar-sm) > [data-count] {
|
||||
.avatar-group:has(> .avatar[data-size='sm']) > [data-count] {
|
||||
@apply size-6 [&>svg]:size-3;
|
||||
}
|
||||
|
||||
.avatar-group:has(> .avatar-lg) > [data-count] {
|
||||
.avatar-group:has(> .avatar[data-size='lg']) > [data-count] {
|
||||
@apply size-10 [&>svg]:size-5;
|
||||
}
|
||||
|
||||
/* Badge */
|
||||
.badge,
|
||||
.badge-primary,
|
||||
.badge-secondary,
|
||||
.badge-destructive,
|
||||
.badge-outline,
|
||||
.badge-ghost,
|
||||
.badge-link {
|
||||
@apply h-5 gap-1 rounded-2xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&>svg]:size-3!;
|
||||
.badge {
|
||||
@apply h-5 gap-1 rounded-2xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all [&>svg]:size-3!;
|
||||
}
|
||||
|
||||
.badge,
|
||||
.badge-primary {
|
||||
.badge:not([data-variant]),
|
||||
.badge[data-variant='primary'] {
|
||||
@apply bg-primary text-primary-foreground [a]:hover:bg-primary/80;
|
||||
}
|
||||
|
||||
.badge-secondary {
|
||||
.badge[data-variant='secondary'] {
|
||||
@apply bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80;
|
||||
}
|
||||
|
||||
.badge-outline {
|
||||
.badge[data-variant='outline'] {
|
||||
@apply border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground;
|
||||
}
|
||||
|
||||
.badge-destructive {
|
||||
.badge[data-variant='destructive'] {
|
||||
@apply bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20;
|
||||
}
|
||||
|
||||
.badge-ghost {
|
||||
.badge[data-variant='ghost'] {
|
||||
@apply hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50;
|
||||
}
|
||||
|
||||
.badge-link {
|
||||
.badge[data-variant='link'] {
|
||||
@apply text-primary underline-offset-4 hover:underline;
|
||||
}
|
||||
|
||||
@@ -598,7 +399,7 @@
|
||||
|
||||
.combobox [role='option'].active,
|
||||
.combobox [role='option']:focus-visible {
|
||||
@apply bg-accent text-accent-foreground [&_svg]:text-accent-foreground;
|
||||
@apply bg-muted text-foreground [&_svg]:text-foreground;
|
||||
}
|
||||
|
||||
.combobox [role='group'] {
|
||||
@@ -658,7 +459,7 @@
|
||||
|
||||
*:not(select).select [role='option'].active,
|
||||
*:not(select).select [role='option']:focus-visible {
|
||||
@apply bg-accent text-accent-foreground [&_svg]:text-accent-foreground;
|
||||
@apply bg-muted text-foreground [&_svg]:text-foreground;
|
||||
}
|
||||
|
||||
*:not(select).select [role='group'] {
|
||||
@@ -716,7 +517,7 @@
|
||||
}
|
||||
|
||||
.dropdown-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']).active {
|
||||
@apply bg-accent text-accent-foreground;
|
||||
@apply bg-muted text-foreground;
|
||||
}
|
||||
|
||||
.dropdown-menu [data-variant='destructive'] {
|
||||
@@ -752,11 +553,11 @@
|
||||
@apply bg-border/50 -mx-1 my-1 h-px;
|
||||
}
|
||||
|
||||
.dropdown-menu [data-shortcut] {
|
||||
@apply text-muted-foreground text-xs tracking-widest;
|
||||
.dropdown-menu :is([data-shortcut], kbd:last-child) {
|
||||
@apply text-muted-foreground font-sans text-xs tracking-widest;
|
||||
}
|
||||
|
||||
.dropdown-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']):is(:focus-visible, .active) [data-shortcut] {
|
||||
.dropdown-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']):is(:focus-visible, .active) :is([data-shortcut], kbd:last-child) {
|
||||
@apply text-accent-foreground;
|
||||
}
|
||||
|
||||
@@ -780,8 +581,7 @@
|
||||
}
|
||||
|
||||
/* Card */
|
||||
.card,
|
||||
.card-sm {
|
||||
.card {
|
||||
@apply bg-card text-card-foreground ring-foreground/5 dark:ring-foreground/10 overflow-hidden rounded-[min(var(--radius-4xl),24px)] text-sm shadow-sm ring-1 has-[>img:first-child]:pt-0 [&>img:first-child]:rounded-t-[min(var(--radius-4xl),24px)] [&>img:last-child]:rounded-b-[min(var(--radius-4xl),24px)];
|
||||
}
|
||||
|
||||
@@ -789,48 +589,47 @@
|
||||
@apply gap-5 py-5;
|
||||
}
|
||||
|
||||
.card-sm {
|
||||
.card[data-size='sm'] {
|
||||
@apply gap-4 py-4;
|
||||
}
|
||||
|
||||
.card > header,
|
||||
.card-sm > header {
|
||||
.card > header {
|
||||
@apply gap-1.5 rounded-t-[min(var(--radius-4xl),24px)] px-5 [.border-b]:pb-5;
|
||||
}
|
||||
|
||||
.card-sm > header {
|
||||
.card[data-size='sm'] > header {
|
||||
@apply px-4 [.border-b]:pb-4;
|
||||
}
|
||||
|
||||
.card > header > :is(h2, h3, [data-title], .card-title),
|
||||
.card-sm > header > :is(h2, h3, [data-title], .card-title) {
|
||||
.card > header > :is(h2, h3, [data-title], .card-title) {
|
||||
@apply text-base font-medium;
|
||||
}
|
||||
|
||||
.card > header > :is(p, [data-description], .card-description),
|
||||
.card-sm > header > :is(p, [data-description], .card-description) {
|
||||
.card > header > :is(p, [data-description], .card-description) {
|
||||
@apply text-muted-foreground text-sm;
|
||||
}
|
||||
|
||||
.card > section,
|
||||
.card-sm > section {
|
||||
.card > section {
|
||||
@apply px-5;
|
||||
}
|
||||
|
||||
.card-sm > section {
|
||||
.card[data-size='sm'] > section {
|
||||
@apply px-4;
|
||||
}
|
||||
|
||||
.card > footer,
|
||||
.card-sm > footer {
|
||||
.card > footer {
|
||||
@apply rounded-b-[min(var(--radius-4xl),24px)] px-5 [.border-t]:pt-5;
|
||||
}
|
||||
|
||||
.card-sm > footer {
|
||||
.card[data-size='sm'] > footer {
|
||||
@apply px-4 [.border-t]:pt-4;
|
||||
}
|
||||
|
||||
/* Chart */
|
||||
.chart {
|
||||
--chart-bar-radius: 6px;
|
||||
}
|
||||
|
||||
.chart-tooltip {
|
||||
@apply border-border/50 bg-background text-foreground gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl;
|
||||
}
|
||||
@@ -923,8 +722,7 @@
|
||||
@apply gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3;
|
||||
}
|
||||
|
||||
.fieldset > legend,
|
||||
.field-legend {
|
||||
.fieldset > legend {
|
||||
@apply mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base;
|
||||
}
|
||||
|
||||
@@ -933,6 +731,8 @@
|
||||
@apply gap-6;
|
||||
|
||||
&[role='radiogroup'],
|
||||
&:has(> .field > input[type='checkbox']:not([role='switch'])),
|
||||
&:has(> .field > input[type='radio']),
|
||||
&[data-slot='checkbox-group'],
|
||||
&[data-slot='radio-group'] {
|
||||
@apply gap-3;
|
||||
@@ -945,15 +745,15 @@
|
||||
}
|
||||
|
||||
.field {
|
||||
@apply data-[invalid=true]:text-destructive gap-3;
|
||||
@apply data-invalid:text-destructive data-[invalid=true]:text-destructive gap-3;
|
||||
}
|
||||
|
||||
.field > section,
|
||||
.field-content {
|
||||
.field > section {
|
||||
@apply gap-1;
|
||||
}
|
||||
|
||||
.field > label,
|
||||
.field > section > label,
|
||||
label:has(> .field) {
|
||||
@apply has-[:checked]:bg-input/30 gap-2 leading-snug in-data-[disabled=true]:opacity-50;
|
||||
}
|
||||
@@ -976,18 +776,25 @@
|
||||
@apply p-4;
|
||||
}
|
||||
.field h2,
|
||||
.field h3,
|
||||
.field-title {
|
||||
.field h3 {
|
||||
@apply gap-2 leading-snug text-sm font-medium in-data-[disabled=true]:opacity-50;
|
||||
}
|
||||
|
||||
.fieldset legend + p,
|
||||
.field > p,
|
||||
.field section > p,
|
||||
.field-description {
|
||||
.field section > p {
|
||||
@apply text-muted-foreground text-start text-sm [[data-variant=legend]+&]:-mt-1.5;
|
||||
}
|
||||
|
||||
.fieldset > legend[data-variant='label'] {
|
||||
@apply mb-0;
|
||||
}
|
||||
|
||||
.fieldset > legend:not([data-variant]) + p,
|
||||
.fieldset > legend[data-variant='legend'] + p {
|
||||
@apply -mt-1.5;
|
||||
}
|
||||
|
||||
.field-separator {
|
||||
@apply -my-2 h-5 text-sm in-data-[variant=outline]:-mb-2;
|
||||
}
|
||||
@@ -996,8 +803,7 @@
|
||||
@apply text-muted-foreground px-2;
|
||||
}
|
||||
|
||||
.field [role="alert"],
|
||||
.field-error {
|
||||
.field [role="alert"] {
|
||||
@apply text-destructive text-sm;
|
||||
}
|
||||
|
||||
@@ -1010,16 +816,15 @@
|
||||
.input-group:has(> :is(input, textarea, select, [data-control]):disabled) {
|
||||
@apply opacity-50;
|
||||
}
|
||||
|
||||
.input-group > :is(input, select, [data-control]) {
|
||||
@apply px-2.5 py-1 text-sm;
|
||||
}
|
||||
|
||||
.input-group:not([data-orientation='vertical']):has(> [data-align='start']) > :is(input, select, [data-control]) {
|
||||
.input-group:not([data-orientation='vertical']):has(> :is([data-align='start'], [data-align='inline-start'])) > :is(input, select, [data-control]) {
|
||||
@apply ps-1.5;
|
||||
}
|
||||
|
||||
.input-group:not([data-orientation='vertical']):has(> [data-align='end']) > :is(input, select, [data-control]) {
|
||||
.input-group:not([data-orientation='vertical']):has(> :is([data-align='end'], [data-align='inline-end'])) > :is(input, select, [data-control]) {
|
||||
@apply pe-1.5;
|
||||
}
|
||||
|
||||
@@ -1032,33 +837,74 @@
|
||||
@apply gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none [&>svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.input-group > [data-align='start'] {
|
||||
.input-group > :is([data-align='start'], [data-align='inline-start']) {
|
||||
@apply ps-2;
|
||||
}
|
||||
|
||||
.input-group > [data-align='end'] {
|
||||
.input-group > :is([data-align='end'], [data-align='inline-end']) {
|
||||
@apply pe-2;
|
||||
}
|
||||
|
||||
.input-group > [data-align='start']:has(> button) {
|
||||
.input-group > :is([data-align='start'], [data-align='inline-start']):has(> button) {
|
||||
@apply -ms-1;
|
||||
}
|
||||
|
||||
.input-group > [data-align='end']:has(> button) {
|
||||
.input-group > :is([data-align='end'], [data-align='inline-end']):has(> button) {
|
||||
@apply -me-1;
|
||||
}
|
||||
|
||||
.input-group > [data-align='start']:has(> kbd) {
|
||||
.input-group > :is([data-align='start'], [data-align='inline-start']):has(> kbd) {
|
||||
@apply -ms-0.5;
|
||||
}
|
||||
|
||||
.input-group > [data-align='end']:has(> kbd) {
|
||||
.input-group > :is([data-align='end'], [data-align='inline-end']):has(> kbd) {
|
||||
@apply -me-0.5;
|
||||
}
|
||||
|
||||
.input-group > [data-align='block-start'] {
|
||||
@apply px-2.5 pt-2;
|
||||
}
|
||||
|
||||
.input-group > [data-align='block-end'] {
|
||||
@apply px-2.5 pb-2;
|
||||
}
|
||||
|
||||
.input-group > [data-align='block-start'].border-b {
|
||||
@apply pb-2;
|
||||
}
|
||||
|
||||
.input-group > [data-align='block-end'].border-t {
|
||||
@apply pt-2;
|
||||
}
|
||||
.input-group[data-orientation='vertical'] > :is(header, footer, [role='group'], [data-align]) {
|
||||
@apply px-2.5;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(header[data-align='start'], [data-align='block-start']) {
|
||||
@apply px-2.5 pt-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(footer[data-align='end'], [data-align='block-end']) {
|
||||
@apply px-2.5 pb-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical']:has(> input) > :is(header[data-align='start'], [data-align='block-start']) {
|
||||
@apply pt-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical']:has(> input) > :is(footer[data-align='end'], [data-align='block-end']) {
|
||||
@apply pb-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(header[data-align='start'], [data-align='block-start']).border-b {
|
||||
@apply pb-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(footer[data-align='end'], [data-align='block-end']).border-t {
|
||||
@apply pt-2;
|
||||
}
|
||||
|
||||
|
||||
.input-group > :is(kbd, span > kbd, [role='group'] > kbd, header > kbd, footer > kbd) {
|
||||
@apply rounded-2xl bg-muted-foreground/10 px-1.5;
|
||||
}
|
||||
@@ -1093,7 +939,7 @@
|
||||
@apply text-lg font-medium tracking-tight;
|
||||
}
|
||||
|
||||
.empty p {
|
||||
.empty > header > p {
|
||||
@apply text-muted-foreground text-sm/relaxed;
|
||||
}
|
||||
|
||||
@@ -1144,15 +990,15 @@
|
||||
@apply [&_svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.item > figure:has(img) {
|
||||
.item > figure:has(> img) {
|
||||
@apply size-10 overflow-hidden rounded-xl;
|
||||
}
|
||||
|
||||
.item[data-size='sm'] > figure:has(img) {
|
||||
.item[data-size='sm'] > figure:has(> img) {
|
||||
@apply size-8;
|
||||
}
|
||||
|
||||
.item[data-size='xs'] > figure:has(img) {
|
||||
.item[data-size='xs'] > figure:has(> img) {
|
||||
@apply size-6 rounded-lg;
|
||||
}
|
||||
|
||||
@@ -1202,16 +1048,16 @@
|
||||
@apply bg-muted text-muted-foreground in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 h-5 w-fit min-w-5 gap-1 rounded-lg px-1 font-sans text-xs font-medium [&_svg:not([class*='size-'])]:size-3;
|
||||
}
|
||||
|
||||
.kbd-group {
|
||||
@apply gap-1;
|
||||
}
|
||||
|
||||
/* Label */
|
||||
.field > label,
|
||||
.label {
|
||||
@apply gap-2 text-sm leading-none font-medium in-data-[disabled=true]:opacity-50 peer-disabled:opacity-50;
|
||||
}
|
||||
|
||||
.field > section > label {
|
||||
@apply gap-2 text-sm leading-snug font-medium in-data-[disabled=true]:opacity-50 peer-disabled:opacity-50;
|
||||
}
|
||||
|
||||
/* Sidebar */
|
||||
.sidebar nav {
|
||||
@apply bg-sidebar text-sidebar-foreground;
|
||||
@@ -1301,6 +1147,14 @@
|
||||
.sidebar nav ul ul > li > details > summary {
|
||||
@apply text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground h-7 gap-2 rounded-xl px-3 text-sm focus-visible:ring-3 [&>svg]:size-4;
|
||||
}
|
||||
/* Progress */
|
||||
.progress {
|
||||
@apply bg-muted h-2 rounded-2xl;
|
||||
}
|
||||
|
||||
.progress > span {
|
||||
@apply bg-primary;
|
||||
}
|
||||
|
||||
/* Skeleton */
|
||||
.skeleton {
|
||||
|
||||
+144
-298
@@ -1,247 +1,64 @@
|
||||
/* Button */
|
||||
@layer components {
|
||||
.btn,
|
||||
.btn-primary,
|
||||
.btn-secondary,
|
||||
.btn-outline,
|
||||
.btn-ghost,
|
||||
.btn-link,
|
||||
.btn-destructive,
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-xs-secondary,
|
||||
.btn-xs-outline,
|
||||
.btn-xs-ghost,
|
||||
.btn-xs-link,
|
||||
.btn-xs-destructive,
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-sm-secondary,
|
||||
.btn-sm-outline,
|
||||
.btn-sm-ghost,
|
||||
.btn-sm-link,
|
||||
.btn-sm-destructive,
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-lg-secondary,
|
||||
.btn-lg-outline,
|
||||
.btn-lg-ghost,
|
||||
.btn-lg-link,
|
||||
.btn-lg-destructive,
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-icon-secondary,
|
||||
.btn-icon-outline,
|
||||
.btn-icon-ghost,
|
||||
.btn-icon-link,
|
||||
.btn-icon-destructive,
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-xs-icon-link,
|
||||
.btn-xs-icon-destructive,
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-sm-icon-link,
|
||||
.btn-sm-icon-destructive,
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary,
|
||||
.btn-lg-icon-secondary,
|
||||
.btn-lg-icon-outline,
|
||||
.btn-lg-icon-ghost,
|
||||
.btn-lg-icon-link,
|
||||
.btn-lg-icon-destructive {
|
||||
.btn {
|
||||
@apply rounded-none border border-transparent bg-clip-padding text-xs font-semibold uppercase tracking-widest focus-visible:border-ring focus-visible:ring-ring/30 focus-visible:ring-[2px] aria-invalid:border-destructive aria-invalid:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 active:not-aria-[haspopup]:translate-y-px [&_svg:not([class*='size-'])]:size-3.5;
|
||||
}
|
||||
|
||||
.btn,
|
||||
.btn-primary,
|
||||
.btn-secondary,
|
||||
.btn-outline,
|
||||
.btn-ghost,
|
||||
.btn-link,
|
||||
.btn-destructive {
|
||||
@apply h-10 gap-1.5 px-6;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-4;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-4;
|
||||
}
|
||||
.btn:not([data-size]),
|
||||
.btn[data-size='default'] {
|
||||
@apply h-10 gap-1.5 px-6 has-[[data-icon='inline-end']]:pr-4 has-[[data-icon='inline-start']]:pl-4;
|
||||
}
|
||||
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-xs-secondary,
|
||||
.btn-xs-outline,
|
||||
.btn-xs-ghost,
|
||||
.btn-xs-link,
|
||||
.btn-xs-destructive {
|
||||
@apply h-7 gap-1 px-3 [&_svg:not([class*='size-'])]:size-3;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-2;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-2;
|
||||
}
|
||||
.btn[data-size='xs'] {
|
||||
@apply h-7 gap-1 px-3 [&_svg:not([class*='size-'])]:size-3 has-[[data-icon='inline-end']]:pr-2 has-[[data-icon='inline-start']]:pl-2;
|
||||
}
|
||||
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-sm-secondary,
|
||||
.btn-sm-outline,
|
||||
.btn-sm-ghost,
|
||||
.btn-sm-link,
|
||||
.btn-sm-destructive {
|
||||
@apply h-9 gap-1 px-4;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-3;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-3;
|
||||
}
|
||||
.btn[data-size='sm'] {
|
||||
@apply h-9 gap-1 px-4 has-[[data-icon='inline-end']]:pr-3 has-[[data-icon='inline-start']]:pl-3;
|
||||
}
|
||||
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-lg-secondary,
|
||||
.btn-lg-outline,
|
||||
.btn-lg-ghost,
|
||||
.btn-lg-link,
|
||||
.btn-lg-destructive {
|
||||
@apply h-11 gap-1.5 px-8;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-5;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-5;
|
||||
}
|
||||
.btn[data-size='lg'] {
|
||||
@apply h-11 gap-1.5 px-8 has-[[data-icon='inline-end']]:pr-5 has-[[data-icon='inline-start']]:pl-5;
|
||||
}
|
||||
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-icon-secondary,
|
||||
.btn-icon-outline,
|
||||
.btn-icon-ghost,
|
||||
.btn-icon-link,
|
||||
.btn-icon-destructive {
|
||||
.btn[data-size='icon'] {
|
||||
@apply size-10;
|
||||
}
|
||||
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-xs-icon-link,
|
||||
.btn-xs-icon-destructive {
|
||||
.btn[data-size='icon-xs'] {
|
||||
@apply size-7 [&_svg:not([class*='size-'])]:size-3;
|
||||
}
|
||||
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-sm-icon-link,
|
||||
.btn-sm-icon-destructive {
|
||||
.btn[data-size='icon-sm'] {
|
||||
@apply size-9;
|
||||
}
|
||||
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary,
|
||||
.btn-lg-icon-secondary,
|
||||
.btn-lg-icon-outline,
|
||||
.btn-lg-icon-ghost,
|
||||
.btn-lg-icon-link,
|
||||
.btn-lg-icon-destructive {
|
||||
.btn[data-size='icon-lg'] {
|
||||
@apply size-11;
|
||||
}
|
||||
|
||||
.btn,
|
||||
.btn-primary,
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary {
|
||||
.btn:not([data-variant]),
|
||||
.btn[data-variant='primary'] {
|
||||
@apply bg-primary text-primary-foreground hover:bg-primary/80;
|
||||
}
|
||||
|
||||
.btn-secondary,
|
||||
.btn-xs-secondary,
|
||||
.btn-sm-secondary,
|
||||
.btn-lg-secondary,
|
||||
.btn-icon-secondary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-lg-icon-secondary {
|
||||
.btn[data-variant='secondary'] {
|
||||
@apply bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground;
|
||||
}
|
||||
|
||||
.btn-outline,
|
||||
.btn-xs-outline,
|
||||
.btn-sm-outline,
|
||||
.btn-lg-outline,
|
||||
.btn-icon-outline,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-lg-icon-outline {
|
||||
.btn[data-variant='outline'] {
|
||||
@apply border-border bg-transparent hover:bg-muted hover:text-foreground dark:hover:bg-input/30 aria-expanded:bg-muted aria-expanded:text-foreground;
|
||||
}
|
||||
|
||||
.btn-ghost,
|
||||
.btn-xs-ghost,
|
||||
.btn-sm-ghost,
|
||||
.btn-lg-ghost,
|
||||
.btn-icon-ghost,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-lg-icon-ghost {
|
||||
.btn[data-variant='ghost'] {
|
||||
@apply hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground;
|
||||
}
|
||||
|
||||
.btn-link,
|
||||
.btn-xs-link,
|
||||
.btn-sm-link,
|
||||
.btn-lg-link,
|
||||
.btn-icon-link,
|
||||
.btn-xs-icon-link,
|
||||
.btn-sm-icon-link,
|
||||
.btn-lg-icon-link {
|
||||
.btn[data-variant='link'] {
|
||||
@apply text-primary underline underline-offset-4 hover:underline;
|
||||
}
|
||||
|
||||
.btn-destructive,
|
||||
.btn-xs-destructive,
|
||||
.btn-sm-destructive,
|
||||
.btn-lg-destructive,
|
||||
.btn-icon-destructive,
|
||||
.btn-xs-icon-destructive,
|
||||
.btn-sm-icon-destructive,
|
||||
.btn-lg-icon-destructive {
|
||||
.btn[data-variant='destructive'] {
|
||||
@apply bg-destructive/10 text-destructive hover:bg-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40;
|
||||
}
|
||||
|
||||
@@ -254,8 +71,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
.button-group:has(> :is(.btn-outline, .btn-icon-outline, .btn-xs-outline, .btn-xs-icon-outline, .btn-sm-outline, .btn-sm-icon-outline, .btn-lg-outline, .btn-lg-icon-outline)),
|
||||
.button-group:has(> .select > button:is(.btn-outline, .btn-icon-outline, .btn-xs-outline, .btn-xs-icon-outline, .btn-sm-outline, .btn-sm-icon-outline, .btn-lg-outline, .btn-lg-icon-outline)) {
|
||||
.button-group:has(> .btn[data-variant='outline']),
|
||||
.button-group:has(> .select > button.btn[data-variant='outline']) {
|
||||
> .input,
|
||||
> .select > button {
|
||||
@apply border-border focus-visible:border-ring;
|
||||
@@ -284,8 +101,7 @@
|
||||
@apply gap-2 border border-transparent border-b-input bg-transparent px-2.5 text-xs font-semibold uppercase [&_svg:not([class*='size-'])]:size-3.5;
|
||||
}
|
||||
|
||||
.button-group > hr[role='separator'],
|
||||
.button-group-separator {
|
||||
.button-group > hr[role='separator'] {
|
||||
@apply bg-input;
|
||||
}
|
||||
|
||||
@@ -397,8 +213,7 @@
|
||||
}
|
||||
|
||||
/* Alert */
|
||||
.alert,
|
||||
.alert-destructive {
|
||||
.alert {
|
||||
@apply grid gap-1 bg-background border px-4 py-3 text-start text-sm has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 [&>svg]:row-span-2 [&>svg]:translate-y-0.5 [&>svg]:text-current [&>svg:not([class*='size-'])]:size-4 relative after:-inset-y-px after:-start-px after:w-0.5 after:absolute;
|
||||
}
|
||||
|
||||
@@ -406,35 +221,33 @@
|
||||
@apply bg-card text-card-foreground after:bg-foreground;
|
||||
}
|
||||
|
||||
.alert-destructive {
|
||||
.alert[data-variant='destructive'] {
|
||||
@apply text-destructive bg-card [&>svg]:text-current after:bg-destructive;
|
||||
}
|
||||
|
||||
.alert > :is(h2, h3, h4, h5, h6, strong, [data-title]),
|
||||
.alert-destructive > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
.alert[data-variant='destructive'] > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
@apply font-semibold text-sm;
|
||||
}
|
||||
|
||||
|
||||
:is(.alert, .alert-destructive):has(> svg) > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
.alert:has(> svg) > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
@apply col-start-2;
|
||||
}
|
||||
.alert > section {
|
||||
@apply text-muted-foreground text-sm text-balance md:text-pretty [&_p:not(:last-child)]:mb-4;
|
||||
}
|
||||
|
||||
.alert-destructive > section {
|
||||
.alert[data-variant='destructive'] > section {
|
||||
@apply text-destructive/90 text-sm text-balance md:text-pretty [&_p:not(:last-child)]:mb-4;
|
||||
}
|
||||
|
||||
.alert > footer,
|
||||
.alert-destructive > footer {
|
||||
.alert[data-variant='destructive'] > footer {
|
||||
@apply top-2.5 end-3;
|
||||
}
|
||||
/* Avatar */
|
||||
.avatar,
|
||||
.avatar-sm,
|
||||
.avatar-lg {
|
||||
.avatar {
|
||||
@apply rounded-full after:rounded-[inherit];
|
||||
}
|
||||
|
||||
@@ -442,29 +255,23 @@
|
||||
@apply size-8;
|
||||
}
|
||||
|
||||
.avatar-sm {
|
||||
.avatar[data-size='sm'] {
|
||||
@apply size-6;
|
||||
}
|
||||
|
||||
.avatar-lg {
|
||||
.avatar[data-size='lg'] {
|
||||
@apply size-10;
|
||||
}
|
||||
|
||||
.avatar > span:not([data-badge]),
|
||||
.avatar-sm > span:not([data-badge]),
|
||||
.avatar-lg > span:not([data-badge]) {
|
||||
.avatar > span:not([data-badge]) {
|
||||
@apply bg-muted text-muted-foreground rounded-[inherit];
|
||||
}
|
||||
|
||||
.avatar > img,
|
||||
.avatar-sm > img,
|
||||
.avatar-lg > img {
|
||||
.avatar > img {
|
||||
@apply rounded-[inherit];
|
||||
}
|
||||
|
||||
.avatar > [data-badge],
|
||||
.avatar-sm > [data-badge],
|
||||
.avatar-lg > [data-badge] {
|
||||
.avatar > [data-badge] {
|
||||
@apply bg-primary text-primary-foreground ring-background;
|
||||
}
|
||||
|
||||
@@ -472,47 +279,41 @@
|
||||
@apply bg-muted text-muted-foreground size-8 rounded-full text-sm [&>svg]:size-4;
|
||||
}
|
||||
|
||||
.avatar-group:has(> .avatar-sm) > [data-count] {
|
||||
.avatar-group:has(> .avatar[data-size='sm']) > [data-count] {
|
||||
@apply size-6 [&>svg]:size-3;
|
||||
}
|
||||
|
||||
.avatar-group:has(> .avatar-lg) > [data-count] {
|
||||
.avatar-group:has(> .avatar[data-size='lg']) > [data-count] {
|
||||
@apply size-10 [&>svg]:size-5;
|
||||
}
|
||||
|
||||
/* Badge */
|
||||
.badge,
|
||||
.badge-primary,
|
||||
.badge-secondary,
|
||||
.badge-destructive,
|
||||
.badge-outline,
|
||||
.badge-ghost,
|
||||
.badge-link {
|
||||
@apply gap-1.5 rounded-none border-0 bg-transparent px-0 py-0 text-[0.625rem] font-semibold uppercase tracking-widest transition-colors has-data-[icon=inline-end]:pe-0 has-data-[icon=inline-start]:ps-0 [&>svg]:size-3!;
|
||||
.badge {
|
||||
@apply gap-1.5 rounded-none border-0 bg-transparent px-0 py-0 text-[0.625rem] font-semibold uppercase tracking-widest transition-colors [&>svg]:size-3!;
|
||||
}
|
||||
|
||||
.badge,
|
||||
.badge-primary {
|
||||
.badge:not([data-variant]),
|
||||
.badge[data-variant='primary'] {
|
||||
@apply text-foreground [a]:hover:text-foreground/70;
|
||||
}
|
||||
|
||||
.badge-secondary {
|
||||
.badge[data-variant='secondary'] {
|
||||
@apply text-muted-foreground [a]:hover:text-foreground;
|
||||
}
|
||||
|
||||
.badge-outline {
|
||||
.badge[data-variant='outline'] {
|
||||
@apply text-foreground [a]:hover:text-foreground/70;
|
||||
}
|
||||
|
||||
.badge-destructive {
|
||||
.badge[data-variant='destructive'] {
|
||||
@apply text-destructive [a]:hover:text-destructive/70 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40;
|
||||
}
|
||||
|
||||
.badge-ghost {
|
||||
.badge[data-variant='ghost'] {
|
||||
@apply text-muted-foreground hover:text-foreground;
|
||||
}
|
||||
|
||||
.badge-link {
|
||||
.badge[data-variant='link'] {
|
||||
@apply text-foreground underline-offset-4 hover:underline;
|
||||
}
|
||||
|
||||
@@ -606,7 +407,7 @@
|
||||
|
||||
.combobox [role='option'].active,
|
||||
.combobox [role='option']:focus-visible {
|
||||
@apply bg-accent text-accent-foreground [&_svg]:text-accent-foreground;
|
||||
@apply bg-muted text-foreground [&_svg]:text-foreground;
|
||||
}
|
||||
|
||||
.combobox [role='group'] {
|
||||
@@ -666,7 +467,7 @@
|
||||
|
||||
*:not(select).select [role='option'].active,
|
||||
*:not(select).select [role='option']:focus-visible {
|
||||
@apply bg-accent text-accent-foreground [&_svg]:text-accent-foreground;
|
||||
@apply bg-muted text-foreground [&_svg]:text-foreground;
|
||||
}
|
||||
|
||||
*:not(select).select [role='group'] {
|
||||
@@ -724,7 +525,7 @@
|
||||
}
|
||||
|
||||
.dropdown-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']).active {
|
||||
@apply bg-accent text-accent-foreground;
|
||||
@apply bg-muted text-foreground;
|
||||
}
|
||||
|
||||
.dropdown-menu [data-variant='destructive'] {
|
||||
@@ -760,11 +561,11 @@
|
||||
@apply bg-border/50 -mx-1.5 my-1.5 h-px;
|
||||
}
|
||||
|
||||
.dropdown-menu [data-shortcut] {
|
||||
@apply text-muted-foreground text-xs tracking-widest;
|
||||
.dropdown-menu :is([data-shortcut], kbd:last-child) {
|
||||
@apply text-muted-foreground font-sans text-xs tracking-widest;
|
||||
}
|
||||
|
||||
.dropdown-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']):is(:focus-visible, .active) [data-shortcut] {
|
||||
.dropdown-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']):is(:focus-visible, .active) :is([data-shortcut], kbd:last-child) {
|
||||
@apply text-accent-foreground;
|
||||
}
|
||||
|
||||
@@ -788,8 +589,7 @@
|
||||
}
|
||||
|
||||
/* Card */
|
||||
.card,
|
||||
.card-sm {
|
||||
.card {
|
||||
@apply bg-card text-card-foreground ring-foreground/5 overflow-hidden text-sm shadow-sm ring-1 has-[>img:first-child]:pt-0 [&>img:first-child]:rounded-none [&>img:last-child]:rounded-none;
|
||||
}
|
||||
|
||||
@@ -797,48 +597,47 @@
|
||||
@apply gap-8 py-8;
|
||||
}
|
||||
|
||||
.card-sm {
|
||||
.card[data-size='sm'] {
|
||||
@apply gap-5 py-5;
|
||||
}
|
||||
|
||||
.card > header,
|
||||
.card-sm > header {
|
||||
.card > header {
|
||||
@apply gap-1.5 rounded-none px-8 [.border-b]:pb-8;
|
||||
}
|
||||
|
||||
.card-sm > header {
|
||||
.card[data-size='sm'] > header {
|
||||
@apply px-5 [.border-b]:pb-5;
|
||||
}
|
||||
|
||||
.card > header > :is(h2, h3, [data-title], .card-title),
|
||||
.card-sm > header > :is(h2, h3, [data-title], .card-title) {
|
||||
.card > header > :is(h2, h3, [data-title], .card-title) {
|
||||
@apply text-lg font-semibold tracking-wider uppercase;
|
||||
}
|
||||
|
||||
.card > header > :is(p, [data-description], .card-description),
|
||||
.card-sm > header > :is(p, [data-description], .card-description) {
|
||||
.card > header > :is(p, [data-description], .card-description) {
|
||||
@apply text-muted-foreground text-sm leading-relaxed;
|
||||
}
|
||||
|
||||
.card > section,
|
||||
.card-sm > section {
|
||||
.card > section {
|
||||
@apply px-8;
|
||||
}
|
||||
|
||||
.card-sm > section {
|
||||
.card[data-size='sm'] > section {
|
||||
@apply px-5;
|
||||
}
|
||||
|
||||
.card > footer,
|
||||
.card-sm > footer {
|
||||
.card > footer {
|
||||
@apply px-8 [.border-t]:pt-8;
|
||||
}
|
||||
|
||||
.card-sm > footer {
|
||||
.card[data-size='sm'] > footer {
|
||||
@apply px-5 [.border-t]:pt-5;
|
||||
}
|
||||
|
||||
/* Chart */
|
||||
.chart {
|
||||
--chart-bar-radius: 0;
|
||||
}
|
||||
|
||||
.chart-tooltip {
|
||||
@apply border-border/50 bg-background text-foreground gap-1.5 rounded-none border px-2.5 py-1.5 text-xs shadow-xl;
|
||||
}
|
||||
@@ -935,8 +734,7 @@
|
||||
@apply gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3;
|
||||
}
|
||||
|
||||
.fieldset > legend,
|
||||
.field-legend {
|
||||
.fieldset > legend {
|
||||
@apply mb-3 font-semibold uppercase data-[variant=label]:text-xs data-[variant=legend]:text-xs;
|
||||
}
|
||||
|
||||
@@ -945,6 +743,8 @@
|
||||
@apply gap-10;
|
||||
|
||||
&[role='radiogroup'],
|
||||
&:has(> .field > input[type='checkbox']:not([role='switch'])),
|
||||
&:has(> .field > input[type='radio']),
|
||||
&[data-slot='checkbox-group'],
|
||||
&[data-slot='radio-group'] {
|
||||
@apply gap-3;
|
||||
@@ -957,15 +757,15 @@
|
||||
}
|
||||
|
||||
.field {
|
||||
@apply data-[invalid=true]:text-destructive gap-3;
|
||||
@apply data-invalid:text-destructive data-[invalid=true]:text-destructive gap-3;
|
||||
}
|
||||
|
||||
.field > section,
|
||||
.field-content {
|
||||
.field > section {
|
||||
@apply gap-1;
|
||||
}
|
||||
|
||||
.field > label,
|
||||
.field > section > label,
|
||||
label:has(> .field) {
|
||||
@apply has-[:checked]:bg-primary/5 has-[:checked]:border-primary/30 dark:has-[:checked]:border-primary/20 dark:has-[:checked]:bg-primary/10 gap-2 in-data-[disabled=true]:opacity-50 leading-relaxed;
|
||||
}
|
||||
@@ -988,18 +788,25 @@
|
||||
@apply p-4;
|
||||
}
|
||||
.field h2,
|
||||
.field h3,
|
||||
.field-title {
|
||||
.field h3 {
|
||||
@apply gap-2 in-data-[disabled=true]:opacity-50 leading-normal font-semibold uppercase text-xs;
|
||||
}
|
||||
|
||||
.fieldset legend + p,
|
||||
.field > p,
|
||||
.field section > p,
|
||||
.field-description {
|
||||
.field section > p {
|
||||
@apply text-muted-foreground text-start text-sm [[data-variant=legend]+&]:-mt-1.5 normal-case tracking-normal;
|
||||
}
|
||||
|
||||
.fieldset > legend[data-variant='label'] {
|
||||
@apply mb-0;
|
||||
}
|
||||
|
||||
.fieldset > legend:not([data-variant]) + p,
|
||||
.fieldset > legend[data-variant='legend'] + p {
|
||||
@apply -mt-1.5;
|
||||
}
|
||||
|
||||
.field-separator {
|
||||
@apply -my-2 h-5 text-sm in-data-[variant=outline]:-mb-2;
|
||||
}
|
||||
@@ -1008,8 +815,7 @@
|
||||
@apply text-muted-foreground px-2;
|
||||
}
|
||||
|
||||
.field [role="alert"],
|
||||
.field-error {
|
||||
.field [role="alert"] {
|
||||
@apply text-destructive text-sm;
|
||||
}
|
||||
|
||||
@@ -1022,16 +828,15 @@
|
||||
.input-group:has(> :is(input, textarea, select, [data-control]):disabled) {
|
||||
@apply opacity-50;
|
||||
}
|
||||
|
||||
.input-group > :is(input, select, [data-control]) {
|
||||
@apply px-0 py-1 text-sm;
|
||||
}
|
||||
|
||||
.input-group:not([data-orientation='vertical']):has(> [data-align='start']) > :is(input, select, [data-control]) {
|
||||
.input-group:not([data-orientation='vertical']):has(> :is([data-align='start'], [data-align='inline-start'])) > :is(input, select, [data-control]) {
|
||||
@apply ps-2;
|
||||
}
|
||||
|
||||
.input-group:not([data-orientation='vertical']):has(> [data-align='end']) > :is(input, select, [data-control]) {
|
||||
.input-group:not([data-orientation='vertical']):has(> :is([data-align='end'], [data-align='inline-end'])) > :is(input, select, [data-control]) {
|
||||
@apply pe-2;
|
||||
}
|
||||
|
||||
@@ -1044,25 +849,58 @@
|
||||
@apply gap-2 py-2 text-sm font-medium text-muted-foreground select-none [&>svg:not([class*='size-'])]:size-3.5;
|
||||
}
|
||||
|
||||
.input-group > [data-align='start']:has(> button) {
|
||||
.input-group > :is([data-align='start'], [data-align='inline-start']):has(> button) {
|
||||
@apply -ms-1;
|
||||
}
|
||||
|
||||
.input-group > [data-align='end']:has(> button) {
|
||||
.input-group > :is([data-align='end'], [data-align='inline-end']):has(> button) {
|
||||
@apply -me-1;
|
||||
}
|
||||
|
||||
.input-group > [data-align='start']:has(> kbd) {
|
||||
.input-group > :is([data-align='start'], [data-align='inline-start']):has(> kbd) {
|
||||
@apply -ms-0.5;
|
||||
}
|
||||
|
||||
.input-group > [data-align='end']:has(> kbd) {
|
||||
.input-group > :is([data-align='end'], [data-align='inline-end']):has(> kbd) {
|
||||
@apply -me-0.5;
|
||||
}
|
||||
.input-group[data-orientation='vertical'] > :is(header, footer, [role='group'], [data-align]) {
|
||||
@apply px-0;
|
||||
}
|
||||
|
||||
.input-group > [data-align='block-start'] {
|
||||
@apply px-0 pt-2;
|
||||
}
|
||||
|
||||
.input-group > [data-align='block-end'] {
|
||||
@apply px-0 pb-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(header[data-align='start'], [data-align='block-start']) {
|
||||
@apply px-0 pt-3;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(footer[data-align='end'], [data-align='block-end']) {
|
||||
@apply px-0 pb-3;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical']:has(> input) > :is(header[data-align='start'], [data-align='block-start']) {
|
||||
@apply pt-3.5;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical']:has(> input) > :is(footer[data-align='end'], [data-align='block-end']) {
|
||||
@apply pb-3.5;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(header[data-align='start'], [data-align='block-start']).border-b {
|
||||
@apply pb-3.5;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(footer[data-align='end'], [data-align='block-end']).border-t {
|
||||
@apply pt-3.5;
|
||||
}
|
||||
|
||||
|
||||
.input-group > :is(kbd, span > kbd, [role='group'] > kbd, header > kbd, footer > kbd) {
|
||||
@apply rounded-none bg-muted-foreground/10 px-1.5;
|
||||
}
|
||||
@@ -1097,7 +935,7 @@
|
||||
@apply text-lg font-semibold tracking-wider uppercase;
|
||||
}
|
||||
|
||||
.empty p {
|
||||
.empty > header > p {
|
||||
@apply text-muted-foreground mt-0.5 text-sm/relaxed;
|
||||
}
|
||||
|
||||
@@ -1148,15 +986,15 @@
|
||||
@apply [&_svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.item > figure:has(img) {
|
||||
.item > figure:has(> img) {
|
||||
@apply size-10 overflow-hidden rounded-none;
|
||||
}
|
||||
|
||||
.item[data-size='sm'] > figure:has(img) {
|
||||
.item[data-size='sm'] > figure:has(> img) {
|
||||
@apply size-8;
|
||||
}
|
||||
|
||||
.item[data-size='xs'] > figure:has(img) {
|
||||
.item[data-size='xs'] > figure:has(> img) {
|
||||
@apply size-6 rounded-none;
|
||||
}
|
||||
|
||||
@@ -1206,20 +1044,20 @@
|
||||
@apply bg-muted text-muted-foreground in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 h-5.5 w-fit min-w-5.5 gap-1 rounded-none px-1.5 font-sans text-xs font-medium [&_svg:not([class*='size-'])]:size-3;
|
||||
}
|
||||
|
||||
.kbd-group {
|
||||
@apply gap-1;
|
||||
}
|
||||
|
||||
/* Label */
|
||||
.field > label,
|
||||
.label {
|
||||
@apply gap-2 font-semibold leading-relaxed in-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 uppercase text-xs tracking-wide;
|
||||
}
|
||||
|
||||
:is(.field > label, .label):has(input[type='checkbox']),
|
||||
:is(.field > label, .label):has(input[type='radio']),
|
||||
:is(.field > label, .label):has(input[role='switch']),
|
||||
:is(input[type='checkbox'], input[type='radio'], input[role='switch']) + :is(.field > label, .label) {
|
||||
.field > section > label {
|
||||
@apply gap-2 font-semibold leading-relaxed in-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 uppercase text-xs tracking-wide;
|
||||
}
|
||||
|
||||
:is(.field > label, .field > section > label, .label):has(input[type='checkbox']),
|
||||
:is(.field > label, .field > section > label, .label):has(input[type='radio']),
|
||||
:is(.field > label, .field > section > label, .label):has(input[role='switch']),
|
||||
:is(input[type='checkbox'], input[type='radio'], input[role='switch']) + :is(.field > label, .field > section > label, .label) {
|
||||
@apply text-sm font-normal normal-case tracking-normal;
|
||||
}
|
||||
|
||||
@@ -1312,6 +1150,14 @@
|
||||
.sidebar nav ul ul > li > details > summary {
|
||||
@apply text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground h-7 gap-2 rounded-none px-3 text-sm focus-visible:ring-2 [&>svg]:size-3.5;
|
||||
}
|
||||
/* Progress */
|
||||
.progress {
|
||||
@apply bg-muted h-0.5 rounded-none;
|
||||
}
|
||||
|
||||
.progress > span {
|
||||
@apply bg-primary;
|
||||
}
|
||||
|
||||
/* Skeleton */
|
||||
.skeleton {
|
||||
|
||||
+149
-295
@@ -1,247 +1,64 @@
|
||||
/* Button */
|
||||
@layer components {
|
||||
.btn,
|
||||
.btn-primary,
|
||||
.btn-secondary,
|
||||
.btn-outline,
|
||||
.btn-ghost,
|
||||
.btn-link,
|
||||
.btn-destructive,
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-xs-secondary,
|
||||
.btn-xs-outline,
|
||||
.btn-xs-ghost,
|
||||
.btn-xs-link,
|
||||
.btn-xs-destructive,
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-sm-secondary,
|
||||
.btn-sm-outline,
|
||||
.btn-sm-ghost,
|
||||
.btn-sm-link,
|
||||
.btn-sm-destructive,
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-lg-secondary,
|
||||
.btn-lg-outline,
|
||||
.btn-lg-ghost,
|
||||
.btn-lg-link,
|
||||
.btn-lg-destructive,
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-icon-secondary,
|
||||
.btn-icon-outline,
|
||||
.btn-icon-ghost,
|
||||
.btn-icon-link,
|
||||
.btn-icon-destructive,
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-xs-icon-link,
|
||||
.btn-xs-icon-destructive,
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-sm-icon-link,
|
||||
.btn-sm-icon-destructive,
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary,
|
||||
.btn-lg-icon-secondary,
|
||||
.btn-lg-icon-outline,
|
||||
.btn-lg-icon-ghost,
|
||||
.btn-lg-icon-link,
|
||||
.btn-lg-icon-destructive {
|
||||
.btn {
|
||||
@apply rounded-md border border-transparent bg-clip-padding text-sm font-medium focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 active:not-aria-[haspopup]:translate-y-px [&_svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.btn,
|
||||
.btn-primary,
|
||||
.btn-secondary,
|
||||
.btn-outline,
|
||||
.btn-ghost,
|
||||
.btn-link,
|
||||
.btn-destructive {
|
||||
@apply h-9 gap-1.5 px-2.5;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-2;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-2;
|
||||
}
|
||||
.btn:not([data-size]),
|
||||
.btn[data-size='default'] {
|
||||
@apply h-9 gap-1.5 px-2.5 has-[[data-icon='inline-end']]:pr-2 has-[[data-icon='inline-start']]:pl-2;
|
||||
}
|
||||
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-xs-secondary,
|
||||
.btn-xs-outline,
|
||||
.btn-xs-ghost,
|
||||
.btn-xs-link,
|
||||
.btn-xs-destructive {
|
||||
@apply h-6 gap-1 px-2 text-xs rounded-[min(var(--radius-md),8px)] [&_svg:not([class*='size-'])]:size-3;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-1.5;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-1.5;
|
||||
}
|
||||
.btn[data-size='xs'] {
|
||||
@apply h-6 gap-1 px-2 text-xs rounded-[min(var(--radius-md),8px)] [&_svg:not([class*='size-'])]:size-3 has-[[data-icon='inline-end']]:pr-1.5 has-[[data-icon='inline-start']]:pl-1.5;
|
||||
}
|
||||
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-sm-secondary,
|
||||
.btn-sm-outline,
|
||||
.btn-sm-ghost,
|
||||
.btn-sm-link,
|
||||
.btn-sm-destructive {
|
||||
@apply h-8 gap-1 px-2.5 rounded-[min(var(--radius-md),10px)];
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-1.5;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-1.5;
|
||||
}
|
||||
.btn[data-size='sm'] {
|
||||
@apply h-8 gap-1 px-2.5 rounded-[min(var(--radius-md),10px)] has-[[data-icon='inline-end']]:pr-1.5 has-[[data-icon='inline-start']]:pl-1.5;
|
||||
}
|
||||
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-lg-secondary,
|
||||
.btn-lg-outline,
|
||||
.btn-lg-ghost,
|
||||
.btn-lg-link,
|
||||
.btn-lg-destructive {
|
||||
@apply h-10 gap-1.5 px-2.5;
|
||||
|
||||
&:has(> [data-icon=inline-start]) {
|
||||
@apply ps-2;
|
||||
}
|
||||
|
||||
&:has(> [data-icon=inline-end]) {
|
||||
@apply pe-2;
|
||||
}
|
||||
.btn[data-size='lg'] {
|
||||
@apply h-10 gap-1.5 px-2.5 has-[[data-icon='inline-end']]:pr-2 has-[[data-icon='inline-start']]:pl-2;
|
||||
}
|
||||
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-icon-secondary,
|
||||
.btn-icon-outline,
|
||||
.btn-icon-ghost,
|
||||
.btn-icon-link,
|
||||
.btn-icon-destructive {
|
||||
.btn[data-size='icon'] {
|
||||
@apply size-9;
|
||||
}
|
||||
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-xs-icon-link,
|
||||
.btn-xs-icon-destructive {
|
||||
.btn[data-size='icon-xs'] {
|
||||
@apply size-6 rounded-[min(var(--radius-md),8px)] [&_svg:not([class*='size-'])]:size-3;
|
||||
}
|
||||
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-sm-icon-link,
|
||||
.btn-sm-icon-destructive {
|
||||
.btn[data-size='icon-sm'] {
|
||||
@apply size-8 rounded-[min(var(--radius-md),10px)];
|
||||
}
|
||||
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary,
|
||||
.btn-lg-icon-secondary,
|
||||
.btn-lg-icon-outline,
|
||||
.btn-lg-icon-ghost,
|
||||
.btn-lg-icon-link,
|
||||
.btn-lg-icon-destructive {
|
||||
.btn[data-size='icon-lg'] {
|
||||
@apply size-10;
|
||||
}
|
||||
|
||||
.btn,
|
||||
.btn-primary,
|
||||
.btn-xs,
|
||||
.btn-xs-primary,
|
||||
.btn-sm,
|
||||
.btn-sm-primary,
|
||||
.btn-lg,
|
||||
.btn-lg-primary,
|
||||
.btn-icon,
|
||||
.btn-icon-primary,
|
||||
.btn-xs-icon,
|
||||
.btn-xs-icon-primary,
|
||||
.btn-sm-icon,
|
||||
.btn-sm-icon-primary,
|
||||
.btn-lg-icon,
|
||||
.btn-lg-icon-primary {
|
||||
.btn:not([data-variant]),
|
||||
.btn[data-variant='primary'] {
|
||||
@apply bg-primary text-primary-foreground hover:bg-primary/80;
|
||||
}
|
||||
|
||||
.btn-secondary,
|
||||
.btn-xs-secondary,
|
||||
.btn-sm-secondary,
|
||||
.btn-lg-secondary,
|
||||
.btn-icon-secondary,
|
||||
.btn-xs-icon-secondary,
|
||||
.btn-sm-icon-secondary,
|
||||
.btn-lg-icon-secondary {
|
||||
.btn[data-variant='secondary'] {
|
||||
@apply bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground;
|
||||
}
|
||||
|
||||
.btn-outline,
|
||||
.btn-xs-outline,
|
||||
.btn-sm-outline,
|
||||
.btn-lg-outline,
|
||||
.btn-icon-outline,
|
||||
.btn-xs-icon-outline,
|
||||
.btn-sm-icon-outline,
|
||||
.btn-lg-icon-outline {
|
||||
.btn[data-variant='outline'] {
|
||||
@apply border-border bg-background shadow-xs hover:bg-muted hover:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground;
|
||||
}
|
||||
|
||||
.btn-ghost,
|
||||
.btn-xs-ghost,
|
||||
.btn-sm-ghost,
|
||||
.btn-lg-ghost,
|
||||
.btn-icon-ghost,
|
||||
.btn-xs-icon-ghost,
|
||||
.btn-sm-icon-ghost,
|
||||
.btn-lg-icon-ghost {
|
||||
.btn[data-variant='ghost'] {
|
||||
@apply hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground;
|
||||
}
|
||||
|
||||
.btn-link,
|
||||
.btn-xs-link,
|
||||
.btn-sm-link,
|
||||
.btn-lg-link,
|
||||
.btn-icon-link,
|
||||
.btn-xs-icon-link,
|
||||
.btn-sm-icon-link,
|
||||
.btn-lg-icon-link {
|
||||
.btn[data-variant='link'] {
|
||||
@apply text-primary underline-offset-4 hover:underline;
|
||||
}
|
||||
|
||||
.btn-destructive,
|
||||
.btn-xs-destructive,
|
||||
.btn-sm-destructive,
|
||||
.btn-lg-destructive,
|
||||
.btn-icon-destructive,
|
||||
.btn-xs-icon-destructive,
|
||||
.btn-sm-icon-destructive,
|
||||
.btn-lg-icon-destructive {
|
||||
.btn[data-variant='destructive'] {
|
||||
@apply bg-destructive/10 text-destructive hover:bg-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40;
|
||||
}
|
||||
|
||||
@@ -268,8 +85,7 @@
|
||||
@apply bg-muted gap-2 rounded-md border px-2.5 text-sm font-medium shadow-xs [&_svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.button-group > hr[role='separator'],
|
||||
.button-group-separator {
|
||||
.button-group > hr[role='separator'] {
|
||||
@apply bg-input;
|
||||
}
|
||||
|
||||
@@ -381,8 +197,7 @@
|
||||
}
|
||||
|
||||
/* Alert */
|
||||
.alert,
|
||||
.alert-destructive {
|
||||
.alert {
|
||||
@apply grid gap-0.5 rounded-lg border px-4 py-3 text-start text-sm has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 [&>svg]:row-span-2 [&>svg]:translate-y-0.5 [&>svg]:text-current [&>svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
@@ -390,35 +205,33 @@
|
||||
@apply bg-card text-card-foreground;
|
||||
}
|
||||
|
||||
.alert-destructive {
|
||||
.alert[data-variant='destructive'] {
|
||||
@apply text-destructive bg-card [&>svg]:text-current;
|
||||
}
|
||||
|
||||
.alert > :is(h2, h3, h4, h5, h6, strong, [data-title]),
|
||||
.alert-destructive > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
.alert[data-variant='destructive'] > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
@apply font-medium;
|
||||
}
|
||||
|
||||
|
||||
:is(.alert, .alert-destructive):has(> svg) > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
.alert:has(> svg) > :is(h2, h3, h4, h5, h6, strong, [data-title]) {
|
||||
@apply col-start-2;
|
||||
}
|
||||
.alert > section {
|
||||
@apply text-muted-foreground text-sm text-balance md:text-pretty [&_p:not(:last-child)]:mb-4;
|
||||
}
|
||||
|
||||
.alert-destructive > section {
|
||||
.alert[data-variant='destructive'] > section {
|
||||
@apply text-destructive/90 text-sm text-balance md:text-pretty [&_p:not(:last-child)]:mb-4;
|
||||
}
|
||||
|
||||
.alert > footer,
|
||||
.alert-destructive > footer {
|
||||
.alert[data-variant='destructive'] > footer {
|
||||
@apply top-2.5 end-3;
|
||||
}
|
||||
/* Avatar */
|
||||
.avatar,
|
||||
.avatar-sm,
|
||||
.avatar-lg {
|
||||
.avatar {
|
||||
@apply rounded-full after:rounded-[inherit];
|
||||
}
|
||||
|
||||
@@ -426,29 +239,23 @@
|
||||
@apply size-8;
|
||||
}
|
||||
|
||||
.avatar-sm {
|
||||
.avatar[data-size='sm'] {
|
||||
@apply size-6;
|
||||
}
|
||||
|
||||
.avatar-lg {
|
||||
.avatar[data-size='lg'] {
|
||||
@apply size-10;
|
||||
}
|
||||
|
||||
.avatar > span:not([data-badge]),
|
||||
.avatar-sm > span:not([data-badge]),
|
||||
.avatar-lg > span:not([data-badge]) {
|
||||
.avatar > span:not([data-badge]) {
|
||||
@apply bg-muted text-muted-foreground rounded-[inherit];
|
||||
}
|
||||
|
||||
.avatar > img,
|
||||
.avatar-sm > img,
|
||||
.avatar-lg > img {
|
||||
.avatar > img {
|
||||
@apply rounded-[inherit];
|
||||
}
|
||||
|
||||
.avatar > [data-badge],
|
||||
.avatar-sm > [data-badge],
|
||||
.avatar-lg > [data-badge] {
|
||||
.avatar > [data-badge] {
|
||||
@apply bg-primary text-primary-foreground ring-background;
|
||||
}
|
||||
|
||||
@@ -456,47 +263,41 @@
|
||||
@apply bg-muted text-muted-foreground size-8 rounded-full text-sm [&>svg]:size-4;
|
||||
}
|
||||
|
||||
.avatar-group:has(> .avatar-sm) > [data-count] {
|
||||
.avatar-group:has(> .avatar[data-size='sm']) > [data-count] {
|
||||
@apply size-6 [&>svg]:size-3;
|
||||
}
|
||||
|
||||
.avatar-group:has(> .avatar-lg) > [data-count] {
|
||||
.avatar-group:has(> .avatar[data-size='lg']) > [data-count] {
|
||||
@apply size-10 [&>svg]:size-5;
|
||||
}
|
||||
|
||||
/* Badge */
|
||||
.badge,
|
||||
.badge-primary,
|
||||
.badge-secondary,
|
||||
.badge-destructive,
|
||||
.badge-outline,
|
||||
.badge-ghost,
|
||||
.badge-link {
|
||||
@apply h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&>svg]:size-3!;
|
||||
.badge {
|
||||
@apply h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all [&>svg]:size-3!;
|
||||
}
|
||||
|
||||
.badge,
|
||||
.badge-primary {
|
||||
.badge:not([data-variant]),
|
||||
.badge[data-variant='primary'] {
|
||||
@apply bg-primary text-primary-foreground [a]:hover:bg-primary/80;
|
||||
}
|
||||
|
||||
.badge-secondary {
|
||||
.badge[data-variant='secondary'] {
|
||||
@apply bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80;
|
||||
}
|
||||
|
||||
.badge-outline {
|
||||
.badge[data-variant='outline'] {
|
||||
@apply border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground;
|
||||
}
|
||||
|
||||
.badge-destructive {
|
||||
.badge[data-variant='destructive'] {
|
||||
@apply bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20;
|
||||
}
|
||||
|
||||
.badge-ghost {
|
||||
.badge[data-variant='ghost'] {
|
||||
@apply hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50;
|
||||
}
|
||||
|
||||
.badge-link {
|
||||
.badge[data-variant='link'] {
|
||||
@apply text-primary underline-offset-4 hover:underline;
|
||||
}
|
||||
|
||||
@@ -590,7 +391,7 @@
|
||||
|
||||
.combobox [role='option'].active,
|
||||
.combobox [role='option']:focus-visible {
|
||||
@apply bg-accent text-accent-foreground [&_svg]:text-accent-foreground;
|
||||
@apply bg-muted text-foreground [&_svg]:text-foreground;
|
||||
}
|
||||
|
||||
.combobox [role='group'] {
|
||||
@@ -650,7 +451,7 @@
|
||||
|
||||
*:not(select).select [role='option'].active,
|
||||
*:not(select).select [role='option']:focus-visible {
|
||||
@apply bg-accent text-accent-foreground [&_svg]:text-accent-foreground;
|
||||
@apply bg-muted text-foreground [&_svg]:text-foreground;
|
||||
}
|
||||
|
||||
*:not(select).select [role='group'] {
|
||||
@@ -704,7 +505,7 @@
|
||||
}
|
||||
|
||||
.dropdown-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']).active {
|
||||
@apply bg-accent text-accent-foreground;
|
||||
@apply bg-muted text-foreground;
|
||||
}
|
||||
|
||||
.dropdown-menu [data-variant='destructive'] {
|
||||
@@ -740,11 +541,11 @@
|
||||
@apply bg-border -mx-1 my-1 h-px;
|
||||
}
|
||||
|
||||
.dropdown-menu [data-shortcut] {
|
||||
@apply text-muted-foreground text-xs tracking-widest;
|
||||
.dropdown-menu :is([data-shortcut], kbd:last-child) {
|
||||
@apply text-muted-foreground font-sans text-xs tracking-widest;
|
||||
}
|
||||
|
||||
.dropdown-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']):is(:focus-visible, .active) [data-shortcut] {
|
||||
.dropdown-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']):is(:focus-visible, .active) :is([data-shortcut], kbd:last-child) {
|
||||
@apply text-accent-foreground;
|
||||
}
|
||||
|
||||
@@ -768,8 +569,7 @@
|
||||
}
|
||||
|
||||
/* Card */
|
||||
.card,
|
||||
.card-sm {
|
||||
.card {
|
||||
@apply ring-foreground/10 bg-card text-card-foreground overflow-hidden rounded-xl text-sm shadow-xs ring-1 has-[>img:first-child]:pt-0 [&>img:first-child]:rounded-t-xl [&>img:last-child]:rounded-b-xl;
|
||||
}
|
||||
|
||||
@@ -777,52 +577,51 @@
|
||||
@apply gap-6 py-6;
|
||||
}
|
||||
|
||||
.card-sm {
|
||||
.card[data-size='sm'] {
|
||||
@apply gap-4 py-4;
|
||||
}
|
||||
|
||||
.card > header,
|
||||
.card-sm > header {
|
||||
.card > header {
|
||||
@apply gap-1 rounded-t-xl px-6 [.border-b]:pb-6;
|
||||
}
|
||||
|
||||
.card-sm > header {
|
||||
.card[data-size='sm'] > header {
|
||||
@apply px-4 [.border-b]:pb-4;
|
||||
}
|
||||
|
||||
.card > header > :is(h2, h3, [data-title], .card-title),
|
||||
.card-sm > header > :is(h2, h3, [data-title], .card-title) {
|
||||
.card > header > :is(h2, h3, [data-title], .card-title) {
|
||||
@apply text-base leading-normal font-medium;
|
||||
}
|
||||
|
||||
.card-sm > header > :is(h2, h3, [data-title], .card-title) {
|
||||
.card[data-size='sm'] > header > :is(h2, h3, [data-title], .card-title) {
|
||||
@apply text-sm;
|
||||
}
|
||||
|
||||
.card > header > :is(p, [data-description], .card-description),
|
||||
.card-sm > header > :is(p, [data-description], .card-description) {
|
||||
.card > header > :is(p, [data-description], .card-description) {
|
||||
@apply text-muted-foreground text-sm;
|
||||
}
|
||||
|
||||
.card > section,
|
||||
.card-sm > section {
|
||||
.card > section {
|
||||
@apply px-6;
|
||||
}
|
||||
|
||||
.card-sm > section {
|
||||
.card[data-size='sm'] > section {
|
||||
@apply px-4;
|
||||
}
|
||||
|
||||
.card > footer,
|
||||
.card-sm > footer {
|
||||
.card > footer {
|
||||
@apply rounded-b-xl px-6 [.border-t]:pt-6;
|
||||
}
|
||||
|
||||
.card-sm > footer {
|
||||
.card[data-size='sm'] > footer {
|
||||
@apply px-4 [.border-t]:pt-4;
|
||||
}
|
||||
|
||||
/* Chart */
|
||||
.chart {
|
||||
--chart-bar-radius: 6px;
|
||||
}
|
||||
|
||||
.chart-tooltip {
|
||||
@apply border-border/50 bg-background text-foreground gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl;
|
||||
}
|
||||
@@ -915,8 +714,7 @@
|
||||
@apply gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3;
|
||||
}
|
||||
|
||||
.fieldset > legend,
|
||||
.field-legend {
|
||||
.fieldset > legend {
|
||||
@apply mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base;
|
||||
}
|
||||
|
||||
@@ -925,6 +723,8 @@
|
||||
@apply gap-7;
|
||||
|
||||
&[role='radiogroup'],
|
||||
&:has(> .field > input[type='checkbox']:not([role='switch'])),
|
||||
&:has(> .field > input[type='radio']),
|
||||
&[data-slot='checkbox-group'],
|
||||
&[data-slot='radio-group'] {
|
||||
@apply gap-3;
|
||||
@@ -937,15 +737,15 @@
|
||||
}
|
||||
|
||||
.field {
|
||||
@apply data-[invalid=true]:text-destructive gap-3;
|
||||
@apply data-invalid:text-destructive data-[invalid=true]:text-destructive gap-3;
|
||||
}
|
||||
|
||||
.field > section,
|
||||
.field-content {
|
||||
.field > section {
|
||||
@apply gap-1;
|
||||
}
|
||||
|
||||
.field > label,
|
||||
.field > section > label,
|
||||
label:has(> .field) {
|
||||
@apply has-[:checked]:bg-primary/5 has-[:checked]:border-primary/30 dark:has-[:checked]:border-primary/20 dark:has-[:checked]:bg-primary/10 gap-2 leading-snug in-data-[disabled=true]:opacity-50;
|
||||
}
|
||||
@@ -968,18 +768,25 @@
|
||||
@apply p-3;
|
||||
}
|
||||
.field h2,
|
||||
.field h3,
|
||||
.field-title {
|
||||
.field h3 {
|
||||
@apply gap-2 leading-snug text-sm font-medium in-data-[disabled=true]:opacity-50;
|
||||
}
|
||||
|
||||
.fieldset legend + p,
|
||||
.field > p,
|
||||
.field section > p,
|
||||
.field-description {
|
||||
.field section > p {
|
||||
@apply text-muted-foreground text-start text-sm [[data-variant=legend]+&]:-mt-1.5;
|
||||
}
|
||||
|
||||
.fieldset > legend[data-variant='label'] {
|
||||
@apply mb-0;
|
||||
}
|
||||
|
||||
.fieldset > legend:not([data-variant]) + p,
|
||||
.fieldset > legend[data-variant='legend'] + p {
|
||||
@apply -mt-1.5;
|
||||
}
|
||||
|
||||
.field-separator {
|
||||
@apply -my-2 h-5 text-sm in-data-[variant=outline]:-mb-2;
|
||||
}
|
||||
@@ -988,8 +795,7 @@
|
||||
@apply text-muted-foreground px-2;
|
||||
}
|
||||
|
||||
.field [role="alert"],
|
||||
.field-error {
|
||||
.field [role="alert"] {
|
||||
@apply text-destructive text-sm;
|
||||
}
|
||||
|
||||
@@ -1002,16 +808,15 @@
|
||||
.input-group:has(> :is(input, textarea, select, [data-control]):disabled) {
|
||||
@apply opacity-50;
|
||||
}
|
||||
|
||||
.input-group > :is(input, select, [data-control]) {
|
||||
@apply px-2.5 py-1 text-sm;
|
||||
}
|
||||
|
||||
.input-group:not([data-orientation='vertical']):has(> [data-align='start']) > :is(input, select, [data-control]) {
|
||||
.input-group:not([data-orientation='vertical']):has(> :is([data-align='start'], [data-align='inline-start'])) > :is(input, select, [data-control]) {
|
||||
@apply ps-1.5;
|
||||
}
|
||||
|
||||
.input-group:not([data-orientation='vertical']):has(> [data-align='end']) > :is(input, select, [data-control]) {
|
||||
.input-group:not([data-orientation='vertical']):has(> :is([data-align='end'], [data-align='inline-end'])) > :is(input, select, [data-control]) {
|
||||
@apply pe-1.5;
|
||||
}
|
||||
|
||||
@@ -1024,33 +829,74 @@
|
||||
@apply gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none [&>svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.input-group > [data-align='start'] {
|
||||
.input-group > :is([data-align='start'], [data-align='inline-start']) {
|
||||
@apply ps-2;
|
||||
}
|
||||
|
||||
.input-group > [data-align='end'] {
|
||||
.input-group > :is([data-align='end'], [data-align='inline-end']) {
|
||||
@apply pe-2;
|
||||
}
|
||||
|
||||
.input-group > [data-align='start']:has(> button) {
|
||||
.input-group > :is([data-align='start'], [data-align='inline-start']):has(> button) {
|
||||
@apply -ms-1;
|
||||
}
|
||||
|
||||
.input-group > [data-align='end']:has(> button) {
|
||||
.input-group > :is([data-align='end'], [data-align='inline-end']):has(> button) {
|
||||
@apply -me-1;
|
||||
}
|
||||
|
||||
.input-group > [data-align='start']:has(> kbd) {
|
||||
.input-group > :is([data-align='start'], [data-align='inline-start']):has(> kbd) {
|
||||
@apply -ms-0.5;
|
||||
}
|
||||
|
||||
.input-group > [data-align='end']:has(> kbd) {
|
||||
.input-group > :is([data-align='end'], [data-align='inline-end']):has(> kbd) {
|
||||
@apply -me-0.5;
|
||||
}
|
||||
|
||||
.input-group > [data-align='block-start'] {
|
||||
@apply px-2.5 pt-2;
|
||||
}
|
||||
|
||||
.input-group > [data-align='block-end'] {
|
||||
@apply px-2.5 pb-2;
|
||||
}
|
||||
|
||||
.input-group > [data-align='block-start'].border-b {
|
||||
@apply pb-2;
|
||||
}
|
||||
|
||||
.input-group > [data-align='block-end'].border-t {
|
||||
@apply pt-2;
|
||||
}
|
||||
.input-group[data-orientation='vertical'] > :is(header, footer, [role='group'], [data-align]) {
|
||||
@apply px-2.5;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(header[data-align='start'], [data-align='block-start']) {
|
||||
@apply px-2.5 pt-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(footer[data-align='end'], [data-align='block-end']) {
|
||||
@apply px-2.5 pb-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical']:has(> input) > :is(header[data-align='start'], [data-align='block-start']) {
|
||||
@apply pt-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical']:has(> input) > :is(footer[data-align='end'], [data-align='block-end']) {
|
||||
@apply pb-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(header[data-align='start'], [data-align='block-start']).border-b {
|
||||
@apply pb-2;
|
||||
}
|
||||
|
||||
.input-group[data-orientation='vertical'] > :is(footer[data-align='end'], [data-align='block-end']).border-t {
|
||||
@apply pt-2;
|
||||
}
|
||||
|
||||
|
||||
.input-group > :is(kbd, span > kbd, [role='group'] > kbd, header > kbd, footer > kbd) {
|
||||
@apply rounded-[calc(var(--radius)-5px)];
|
||||
}
|
||||
@@ -1085,7 +931,7 @@
|
||||
@apply text-lg font-medium tracking-tight;
|
||||
}
|
||||
|
||||
.empty p {
|
||||
.empty > header > p {
|
||||
@apply text-muted-foreground text-sm/relaxed;
|
||||
}
|
||||
|
||||
@@ -1136,15 +982,15 @@
|
||||
@apply [&_svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
.item > figure:has(img) {
|
||||
.item > figure:has(> img) {
|
||||
@apply size-10 overflow-hidden rounded-sm;
|
||||
}
|
||||
|
||||
.item[data-size='sm'] > figure:has(img) {
|
||||
.item[data-size='sm'] > figure:has(> img) {
|
||||
@apply size-8;
|
||||
}
|
||||
|
||||
.item[data-size='xs'] > figure:has(img) {
|
||||
.item[data-size='xs'] > figure:has(> img) {
|
||||
@apply size-6;
|
||||
}
|
||||
|
||||
@@ -1194,16 +1040,16 @@
|
||||
@apply bg-muted text-muted-foreground in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 h-5 w-fit min-w-5 gap-1 rounded-sm px-1 font-sans text-xs font-medium [&_svg:not([class*='size-'])]:size-3;
|
||||
}
|
||||
|
||||
.kbd-group {
|
||||
@apply gap-1;
|
||||
}
|
||||
|
||||
/* Label */
|
||||
.field > label,
|
||||
.label {
|
||||
@apply gap-2 text-sm leading-none font-medium in-data-[disabled=true]:opacity-50 peer-disabled:opacity-50;
|
||||
}
|
||||
|
||||
.field > section > label {
|
||||
@apply gap-2 text-sm leading-snug font-medium in-data-[disabled=true]:opacity-50 peer-disabled:opacity-50;
|
||||
}
|
||||
|
||||
/* Sidebar */
|
||||
.sidebar nav {
|
||||
@apply bg-sidebar text-sidebar-foreground;
|
||||
@@ -1293,6 +1139,14 @@
|
||||
.sidebar nav ul ul > li > details > summary {
|
||||
@apply text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground h-7 gap-2 rounded-md px-2 text-sm focus-visible:ring-2 [&>svg]:size-4;
|
||||
}
|
||||
/* Progress */
|
||||
.progress {
|
||||
@apply bg-muted h-1.5 rounded-full;
|
||||
}
|
||||
|
||||
.progress > span {
|
||||
@apply bg-primary;
|
||||
}
|
||||
|
||||
/* Skeleton */
|
||||
.skeleton {
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
</footer>
|
||||
{% endif %}
|
||||
{% if close_button %}
|
||||
<button type="button" class="btn-sm-icon-ghost" aria-label="Close dialog" onclick="this.closest('dialog').close()">
|
||||
<button type="button" class="btn" data-variant="ghost" data-size="icon-sm" aria-label="Close dialog" onclick="this.closest('dialog').close()">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-x-icon lucide-x"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>
|
||||
</button>
|
||||
{% endif %}
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
{% if action.href %}
|
||||
<a
|
||||
href="{{ action.href }}"
|
||||
class="btn-sm"
|
||||
class="btn" data-size="sm"
|
||||
data-toast-action
|
||||
>{{ action.label }}</a>
|
||||
{% else %}
|
||||
@@ -105,7 +105,7 @@
|
||||
{% if cancel %}
|
||||
<button
|
||||
type="button"
|
||||
class="btn-sm-outline"
|
||||
class="btn" data-variant="outline" data-size="sm"
|
||||
data-toast-cancel
|
||||
{% if cancel.onclick %}onclick="{{ cancel.onclick }}"{% endif %}
|
||||
>{{ cancel.label }}</button>
|
||||
|
||||
@@ -129,6 +129,7 @@
|
||||
const dark = mode === 'dark';
|
||||
document.documentElement.classList.toggle('dark', dark);
|
||||
try { localStorage.setItem('themeMode', dark ? 'dark' : 'light'); } catch (_) {}
|
||||
document.dispatchEvent(new CustomEvent('basecoat:themechange', { detail: { mode: dark ? 'dark' : 'light' } }));
|
||||
};
|
||||
|
||||
const getTheme = () => document.documentElement.classList.contains('dark') ? 'dark' : 'light';
|
||||
|
||||
+112
-9
@@ -1,6 +1,8 @@
|
||||
(() => {
|
||||
const instances = new WeakMap();
|
||||
const activeCanvases = new Set();
|
||||
const defaultColors = ['var(--chart-1)', 'var(--chart-2)', 'var(--chart-3)', 'var(--chart-4)', 'var(--chart-5)'];
|
||||
let refreshFrame = null;
|
||||
|
||||
const isChartJsData = (data) => {
|
||||
return data && typeof data === 'object' && Array.isArray(data.datasets);
|
||||
@@ -54,6 +56,32 @@
|
||||
|
||||
const colorForIndex = (index) => defaultColors[index % defaultColors.length];
|
||||
|
||||
const cloneChartData = (chartData) => {
|
||||
if (!isChartJsData(chartData)) return chartData;
|
||||
|
||||
return {
|
||||
...chartData,
|
||||
labels: Array.isArray(chartData.labels) ? [...chartData.labels] : chartData.labels,
|
||||
datasets: chartData.datasets.map((dataset) => ({
|
||||
...dataset,
|
||||
data: Array.isArray(dataset.data) ? [...dataset.data] : dataset.data,
|
||||
backgroundColor: Array.isArray(dataset.backgroundColor) ? [...dataset.backgroundColor] : dataset.backgroundColor,
|
||||
borderColor: Array.isArray(dataset.borderColor) ? [...dataset.borderColor] : dataset.borderColor,
|
||||
hoverBackgroundColor: Array.isArray(dataset.hoverBackgroundColor) ? [...dataset.hoverBackgroundColor] : dataset.hoverBackgroundColor,
|
||||
hoverBorderColor: Array.isArray(dataset.hoverBorderColor) ? [...dataset.hoverBorderColor] : dataset.hoverBorderColor,
|
||||
})),
|
||||
};
|
||||
};
|
||||
|
||||
const clonePlainObject = (value) => {
|
||||
if (!value || typeof value !== 'object' || Array.isArray(value)) return value;
|
||||
|
||||
return Object.fromEntries(Object.entries(value).map(([key, item]) => [
|
||||
key,
|
||||
item && typeof item === 'object' && !Array.isArray(item) ? clonePlainObject(item) : item,
|
||||
]));
|
||||
};
|
||||
|
||||
const resolveColor = (color, element) => {
|
||||
if (Array.isArray(color)) return color.map(item => resolveColor(item, element));
|
||||
if (typeof color !== 'string') return color;
|
||||
@@ -148,15 +176,25 @@
|
||||
|
||||
const usesCartesianScales = (type) => !['pie', 'doughnut', 'polarArea', 'radar'].includes(type);
|
||||
|
||||
const moveCanvasClassesToContainer = (canvas, container) => {
|
||||
const classes = Array.from(canvas.classList).filter((className) => className !== 'chart');
|
||||
if (classes.length === 0) return;
|
||||
|
||||
container.classList.add(...classes);
|
||||
canvas.classList.remove(...classes);
|
||||
};
|
||||
|
||||
const ensureContainer = (canvas) => {
|
||||
if (canvas.parentElement?.classList.contains('chart')) {
|
||||
canvas.parentElement.dataset.basecoatChartContainer = 'true';
|
||||
moveCanvasClassesToContainer(canvas, canvas.parentElement);
|
||||
return canvas.parentElement;
|
||||
}
|
||||
|
||||
const container = document.createElement('div');
|
||||
container.className = 'chart';
|
||||
container.dataset.basecoatChartContainer = 'true';
|
||||
moveCanvasClassesToContainer(canvas, container);
|
||||
canvas.insertAdjacentElement('beforebegin', container);
|
||||
container.append(canvas);
|
||||
return container;
|
||||
@@ -170,7 +208,7 @@
|
||||
};
|
||||
|
||||
const toChartData = ({ type, labelKey, data, series }) => {
|
||||
if (isChartJsData(data)) return data;
|
||||
if (isChartJsData(data)) return cloneChartData(data);
|
||||
|
||||
const rows = Array.isArray(data) ? data : [];
|
||||
const entries = seriesEntries(series);
|
||||
@@ -223,6 +261,23 @@
|
||||
return typeof value === 'number' ? value.toLocaleString() : String(value);
|
||||
};
|
||||
|
||||
const colorForTooltipItem = (item) => {
|
||||
const elementColor = item.element?.options?.backgroundColor || item.element?.options?.borderColor;
|
||||
if (typeof elementColor === 'string') return elementColor;
|
||||
|
||||
const backgroundColor = Array.isArray(item.dataset.backgroundColor)
|
||||
? item.dataset.backgroundColor[item.dataIndex]
|
||||
: item.dataset.backgroundColor;
|
||||
if (typeof backgroundColor === 'string') return backgroundColor;
|
||||
|
||||
const borderColor = Array.isArray(item.dataset.borderColor)
|
||||
? item.dataset.borderColor[item.dataIndex]
|
||||
: item.dataset.borderColor;
|
||||
if (typeof borderColor === 'string') return borderColor;
|
||||
|
||||
return colorForIndex(item.datasetIndex);
|
||||
};
|
||||
|
||||
const ensureTooltip = (canvas) => {
|
||||
let tooltip = canvas._basecoatChartTooltip;
|
||||
if (tooltip) return tooltip;
|
||||
@@ -258,7 +313,7 @@
|
||||
const items = document.createElement('div');
|
||||
items.className = 'chart-tooltip-items';
|
||||
tooltip.dataPoints.forEach((item) => {
|
||||
const color = item.dataset.borderColor || item.dataset.backgroundColor || colorForIndex(item.datasetIndex);
|
||||
const color = colorForTooltipItem(item);
|
||||
const value = item.formattedValue || formatValue(item.raw);
|
||||
|
||||
const row = document.createElement('div');
|
||||
@@ -284,8 +339,8 @@
|
||||
const rect = chart.canvas.getBoundingClientRect();
|
||||
element.replaceChildren(...children);
|
||||
element.hidden = false;
|
||||
element.style.left = `${rect.left + window.scrollX + tooltip.caretX}px`;
|
||||
element.style.top = `${rect.top + window.scrollY + tooltip.caretY}px`;
|
||||
element.style.left = `${rect.left + tooltip.caretX}px`;
|
||||
element.style.top = `${rect.top + tooltip.caretY}px`;
|
||||
};
|
||||
|
||||
const createLegendPlugin = (canvas, enabled) => ({
|
||||
@@ -308,7 +363,12 @@
|
||||
|
||||
const indicator = document.createElement('span');
|
||||
indicator.className = 'chart-legend-indicator';
|
||||
indicator.style.setProperty('--chart-indicator-color', item.fillStyle || item.strokeStyle || colorForIndex(item.datasetIndex || item.index || 0));
|
||||
const indicatorColor = typeof item.fillStyle === 'string'
|
||||
? item.fillStyle
|
||||
: typeof item.strokeStyle === 'string'
|
||||
? item.strokeStyle
|
||||
: colorForIndex(item.datasetIndex || item.index || 0);
|
||||
indicator.style.setProperty('--chart-indicator-color', indicatorColor);
|
||||
|
||||
const label = document.createElement('span');
|
||||
label.textContent = item.text;
|
||||
@@ -345,7 +405,7 @@
|
||||
const tooltip = readBoolean(canvas, config, 'tooltip', 'chartTooltip', true);
|
||||
const data = config.data || readJsonAttribute(canvas, 'data-chart-data') || [];
|
||||
const series = config.series || readJsonAttribute(canvas, 'data-chart-series') || {};
|
||||
const chartData = config.chartData || toChartData({ type, labelKey, data, series });
|
||||
const chartData = config.chartData ? cloneChartData(config.chartData) : toChartData({ type, labelKey, data, series });
|
||||
const userOptions = config.options || {};
|
||||
const legendPlugin = createLegendPlugin(canvas, legend);
|
||||
const container = ensureContainer(canvas);
|
||||
@@ -359,19 +419,21 @@
|
||||
border: { display: false, color: borderColor },
|
||||
grid: { display: false, color: gridColor },
|
||||
ticks: { color: mutedColor, padding: 8 },
|
||||
...(userOptions.scales?.x || {}),
|
||||
...clonePlainObject(userOptions.scales?.x || {}),
|
||||
},
|
||||
y: {
|
||||
border: { display: false, color: borderColor },
|
||||
grid: { color: gridColor },
|
||||
ticks: { display: false, color: mutedColor },
|
||||
...(userOptions.scales?.y || {}),
|
||||
...clonePlainObject(userOptions.scales?.y || {}),
|
||||
},
|
||||
}
|
||||
: {};
|
||||
const scales = {
|
||||
...defaultScales,
|
||||
...(Object.fromEntries(Object.entries(userOptions.scales || {}).filter(([key]) => key !== 'x' && key !== 'y'))),
|
||||
...(Object.fromEntries(Object.entries(userOptions.scales || {})
|
||||
.filter(([key]) => key !== 'x' && key !== 'y')
|
||||
.map(([key, value]) => [key, clonePlainObject(value)]))),
|
||||
};
|
||||
|
||||
canvas.classList.remove('chart');
|
||||
@@ -407,14 +469,18 @@
|
||||
});
|
||||
|
||||
instances.set(canvas, chart);
|
||||
activeCanvases.add(canvas);
|
||||
canvas.dataset.chartInitialized = 'true';
|
||||
canvas.chart = chart;
|
||||
canvas._basecoatChartConfig = config;
|
||||
canvas._destroy = () => {
|
||||
chart.destroy();
|
||||
removeGeneratedElements(canvas);
|
||||
instances.delete(canvas);
|
||||
activeCanvases.delete(canvas);
|
||||
canvas.removeAttribute('data-chart-initialized');
|
||||
delete canvas._basecoatChartContainer;
|
||||
delete canvas._basecoatChartConfig;
|
||||
delete canvas.chart;
|
||||
delete canvas._destroy;
|
||||
};
|
||||
@@ -428,7 +494,44 @@
|
||||
return charts.length === 1 ? charts[0] : charts;
|
||||
};
|
||||
|
||||
const refreshCharts = () => {
|
||||
refreshFrame = null;
|
||||
|
||||
Array.from(activeCanvases).forEach((canvas) => {
|
||||
if (!canvas.isConnected) {
|
||||
canvas._destroy?.();
|
||||
activeCanvases.delete(canvas);
|
||||
return;
|
||||
}
|
||||
|
||||
initChart(canvas, canvas._basecoatChartConfig || {});
|
||||
});
|
||||
};
|
||||
|
||||
const scheduleRefresh = () => {
|
||||
if (refreshFrame !== null) return;
|
||||
refreshFrame = requestAnimationFrame(refreshCharts);
|
||||
};
|
||||
|
||||
const observeTokenChanges = () => {
|
||||
const observer = new MutationObserver((mutations) => {
|
||||
if (mutations.some((mutation) => mutation.attributeName === 'class' || mutation.attributeName === 'data-style-variant')) {
|
||||
scheduleRefresh();
|
||||
}
|
||||
});
|
||||
|
||||
observer.observe(document.documentElement, {
|
||||
attributes: true,
|
||||
attributeFilter: ['class', 'data-style-variant'],
|
||||
});
|
||||
|
||||
document.addEventListener('basecoat:themechange', scheduleRefresh);
|
||||
document.addEventListener('basecoat:stylechange', scheduleRefresh);
|
||||
};
|
||||
|
||||
if (window.basecoat) {
|
||||
window.basecoat.chart = chart;
|
||||
}
|
||||
|
||||
observeTokenChanges();
|
||||
})();
|
||||
|
||||
+1
-1
@@ -151,7 +151,7 @@
|
||||
? `<button type="button" class="btn" data-toast-action onclick="${action.onclick}">${action.label}</button>`
|
||||
: '';
|
||||
const cancelHtml = cancel
|
||||
? `<button type="button" class="btn-outline h-6 text-xs px-2.5 rounded-sm" data-toast-cancel onclick="${cancel?.onclick || ''}">${cancel.label}</button>`
|
||||
? `<button type="button" class="btn h-6 text-xs px-2.5 rounded-sm" data-variant="outline" data-toast-cancel onclick="${cancel?.onclick || ''}">${cancel.label}</button>`
|
||||
: '';
|
||||
|
||||
const footerHtml = actionHtml || cancelHtml ? `<footer>${actionHtml}${cancelHtml}</footer>` : '';
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
</footer>
|
||||
{% endif %}
|
||||
{% if close_button %}
|
||||
<button type="button" class="btn-sm-icon-ghost" aria-label="Close dialog" onclick="this.closest('dialog').close()">
|
||||
<button type="button" class="btn" data-variant="ghost" data-size="icon-sm" aria-label="Close dialog" onclick="this.closest('dialog').close()">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-x-icon lucide-x"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>
|
||||
</button>
|
||||
{% endif %}
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
{% if action.href %}
|
||||
<a
|
||||
href="{{ action.href }}"
|
||||
class="btn-sm"
|
||||
class="btn" data-size="sm"
|
||||
data-toast-action
|
||||
>{{ action.label }}</a>
|
||||
{% else %}
|
||||
@@ -105,7 +105,7 @@
|
||||
{% if cancel %}
|
||||
<button
|
||||
type="button"
|
||||
class="btn-sm-outline"
|
||||
class="btn" data-variant="outline" data-size="sm"
|
||||
data-toast-cancel
|
||||
{% if cancel.onclick %}onclick="{{ cancel.onclick }}"{% endif %}
|
||||
>{{ cancel.label }}</button>
|
||||
|
||||
@@ -0,0 +1,730 @@
|
||||
---
|
||||
import "../css/landing.css";
|
||||
|
||||
import basecoatJsUrl from "basecoat-css/basecoat.min?url";
|
||||
import dropdownMenuJsUrl from "basecoat-css/dropdown-menu.min?url";
|
||||
import vegaUrl from "../../docs/src/assets/styles/style-vega.css?url";
|
||||
import novaUrl from "../../docs/src/assets/styles/style-nova.css?url";
|
||||
import maiaUrl from "../../docs/src/assets/styles/style-maia.css?url";
|
||||
import lyraUrl from "../../docs/src/assets/styles/style-lyra.css?url";
|
||||
import miraUrl from "../../docs/src/assets/styles/style-mira.css?url";
|
||||
import lumaUrl from "../../docs/src/assets/styles/style-luma.css?url";
|
||||
import seraUrl from "../../docs/src/assets/styles/style-sera.css?url";
|
||||
import rheaUrl from "../../docs/src/assets/styles/style-rhea.css?url";
|
||||
import socialImage from "../../docs/src/assets/social.png";
|
||||
import favicon from "../../docs/src/assets/favicon.svg";
|
||||
import ArrowRight from "lucide-static/icons/arrow-right.svg?raw";
|
||||
import Activity from "lucide-static/icons/activity.svg?raw";
|
||||
import BanknoteArrowUp from "lucide-static/icons/banknote-arrow-up.svg?raw";
|
||||
import Bell from "lucide-static/icons/bell.svg?raw";
|
||||
import BookOpen from "lucide-static/icons/book-open.svg?raw";
|
||||
import Calendar from "lucide-static/icons/calendar-days.svg?raw";
|
||||
import Chart from "lucide-static/icons/chart-no-axes-combined.svg?raw";
|
||||
import ChevronRight from "lucide-static/icons/chevron-right.svg?raw";
|
||||
import ChevronUp from "lucide-static/icons/chevron-up.svg?raw";
|
||||
import Code from "lucide-static/icons/code.svg?raw";
|
||||
import CreditCard from "lucide-static/icons/credit-card.svg?raw";
|
||||
import Ellipsis from "lucide-static/icons/ellipsis.svg?raw";
|
||||
import FileText from "lucide-static/icons/file-text.svg?raw";
|
||||
import Globe from "lucide-static/icons/globe.svg?raw";
|
||||
import HelpCircle from "lucide-static/icons/circle-help.svg?raw";
|
||||
import Info from "lucide-static/icons/info.svg?raw";
|
||||
import Landmark from "lucide-static/icons/landmark.svg?raw";
|
||||
import Lock from "lucide-static/icons/lock.svg?raw";
|
||||
import MessageCircle from "lucide-static/icons/message-circle.svg?raw";
|
||||
import Moon from "lucide-static/icons/moon.svg?raw";
|
||||
import Paintbrush from "lucide-static/icons/paintbrush.svg?raw";
|
||||
import PieChart from "lucide-static/icons/chart-pie.svg?raw";
|
||||
import Plus from "lucide-static/icons/plus.svg?raw";
|
||||
import Refresh from "lucide-static/icons/refresh-cw.svg?raw";
|
||||
import Search from "lucide-static/icons/search.svg?raw";
|
||||
import Shield from "lucide-static/icons/shield.svg?raw";
|
||||
import Settings from "lucide-static/icons/settings.svg?raw";
|
||||
import Target from "lucide-static/icons/target.svg?raw";
|
||||
import TrendingUp from "lucide-static/icons/trending-up.svg?raw";
|
||||
import User from "lucide-static/icons/user.svg?raw";
|
||||
import Wallet from "lucide-static/icons/wallet.svg?raw";
|
||||
import Sun from "lucide-static/icons/sun.svg?raw";
|
||||
|
||||
const title = "All of the shadcn/ui magic, none of the React";
|
||||
const description = "A component library built with Tailwind CSS that works with any web stack.";
|
||||
const styleUrls = {
|
||||
vega: vegaUrl,
|
||||
nova: novaUrl,
|
||||
maia: maiaUrl,
|
||||
lyra: lyraUrl,
|
||||
mira: miraUrl,
|
||||
luma: lumaUrl,
|
||||
sera: seraUrl,
|
||||
rhea: rheaUrl,
|
||||
};
|
||||
|
||||
const logoSvg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" aria-hidden="true"><rect width="256" height="256" fill="none"></rect><line x1="208" y1="128" x2="128" y2="208" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"></line><line x1="192" y1="40" x2="40" y2="192" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32"></line></svg>`;
|
||||
const qrRows = [
|
||||
"111111100101101111111",
|
||||
"100000101001001000001",
|
||||
"101110101111101011101",
|
||||
"101110100100001011101",
|
||||
"101110101010101011101",
|
||||
"100000100111001000001",
|
||||
"111111101010101111111",
|
||||
"000000001101000000000",
|
||||
"101011111001111010110",
|
||||
"010100001110010101001",
|
||||
"111010111011101111010",
|
||||
"001101000101000010101",
|
||||
"110111101111010111011",
|
||||
"000000001001010001010",
|
||||
"111111101101111101001",
|
||||
"100000100010001001111",
|
||||
"101110101011101110100",
|
||||
"101110100110100010011",
|
||||
"101110101000111101110",
|
||||
"100000101101000011001",
|
||||
"111111101011101101111",
|
||||
];
|
||||
const holdings = [
|
||||
["Vanguard", "450 Shares", "$1,842.10", [58, 64, 60, 100]],
|
||||
["S&P 500 VOO", "112 Shares", "$928.40", [56, 66, 100, 68]],
|
||||
["Apple AAPL", "85 Shares", "$340.00", [50, 58, 100, 75]],
|
||||
["Realty Income", "320 Shares", "$1,139.50", [67, 72, 78, 100]],
|
||||
];
|
||||
const sidebarSections = [
|
||||
{
|
||||
label: "Overview",
|
||||
className: "xl:col-start-1 xl:row-start-2",
|
||||
active: "Analytics",
|
||||
items: [
|
||||
["Analytics", Chart],
|
||||
["Transactions", BanknoteArrowUp],
|
||||
["Investments", TrendingUp],
|
||||
["Accounts", Landmark],
|
||||
["Spending", PieChart],
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Planning",
|
||||
className: "xl:col-start-1 xl:row-start-1",
|
||||
items: [
|
||||
["Documents", FileText],
|
||||
["Budget", Wallet],
|
||||
["Reports", Chart],
|
||||
["Goals", Target],
|
||||
["Calendar", Calendar],
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Support",
|
||||
className: "xl:col-start-2 xl:row-start-1",
|
||||
items: [
|
||||
["Help Center", HelpCircle],
|
||||
["Docs", BookOpen],
|
||||
["Contact Us", MessageCircle],
|
||||
["Status", Activity],
|
||||
["Community", Globe],
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Account",
|
||||
className: "xl:col-start-2 xl:row-start-2",
|
||||
active: "Billing",
|
||||
items: [
|
||||
["Profile", User],
|
||||
["Billing", CreditCard],
|
||||
["Notifications", Bell],
|
||||
["Security", Shield],
|
||||
["Appearance", Paintbrush],
|
||||
],
|
||||
},
|
||||
];
|
||||
---
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<script is:inline>
|
||||
(() => {
|
||||
const media = matchMedia("(prefers-color-scheme: dark)");
|
||||
const getStoredTheme = () => {
|
||||
try {
|
||||
return localStorage.getItem("themeMode");
|
||||
} catch (_) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
const syncTheme = () => {
|
||||
const stored = getStoredTheme();
|
||||
document.documentElement.classList.toggle("dark", stored ? stored === "dark" : media.matches);
|
||||
};
|
||||
try {
|
||||
syncTheme();
|
||||
} catch (_) {}
|
||||
media.addEventListener("change", () => {
|
||||
if (!getStoredTheme()) syncTheme();
|
||||
});
|
||||
document.addEventListener("basecoat:theme", (event) => {
|
||||
const mode = event.detail?.mode;
|
||||
if (mode === "system") {
|
||||
try {
|
||||
localStorage.removeItem("themeMode");
|
||||
} catch (_) {}
|
||||
syncTheme();
|
||||
return;
|
||||
}
|
||||
const dark = mode === "dark" || (!mode && !document.documentElement.classList.contains("dark"));
|
||||
document.documentElement.classList.toggle("dark", dark);
|
||||
try {
|
||||
localStorage.setItem("themeMode", dark ? "dark" : "light");
|
||||
} catch (_) {}
|
||||
document.dispatchEvent(new CustomEvent("basecoat:themechange", { detail: { mode: dark ? "dark" : "light" } }));
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
<style id="docs-style-gate" is:inline>
|
||||
html[data-style-pending] body {
|
||||
visibility: hidden;
|
||||
}
|
||||
</style>
|
||||
<script is:inline define:vars={{ styleUrls }}>
|
||||
(() => {
|
||||
const styleGateId = "docs-style-gate";
|
||||
const styleLinkId = "docs-style-variant";
|
||||
const getStoredStyle = () => {
|
||||
try {
|
||||
return localStorage.getItem("styleVariant") || "vega";
|
||||
} catch (_) {
|
||||
return "vega";
|
||||
}
|
||||
};
|
||||
const getStyleHref = (style) => {
|
||||
const href = styleUrls[style];
|
||||
return href?.startsWith("/docs/src/assets/styles/") ? `${href}?direct` : href;
|
||||
};
|
||||
const nextStyle = Object.prototype.hasOwnProperty.call(styleUrls, getStoredStyle()) ? getStoredStyle() : "vega";
|
||||
const href = getStyleHref(nextStyle);
|
||||
document.documentElement.dataset.styleVariant = nextStyle;
|
||||
if (!href) return;
|
||||
document.documentElement.setAttribute("data-style-pending", "");
|
||||
document.write(
|
||||
`<link id="${styleLinkId}" rel="stylesheet" href="${href}" onload="document.documentElement.removeAttribute('data-style-pending');document.getElementById('${styleGateId}')?.remove()" onerror="document.documentElement.removeAttribute('data-style-pending');document.getElementById('${styleGateId}')?.remove()">`,
|
||||
);
|
||||
})();
|
||||
</script>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>{title} | Basecoat</title>
|
||||
<meta name="description" content={description} />
|
||||
<link rel="icon" type="image/svg+xml" href={favicon.src} />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content={`${title} | Basecoat`} />
|
||||
<meta property="og:description" content={description} />
|
||||
<meta property="og:image" content={socialImage.src} />
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:title" content={`${title} | Basecoat`} />
|
||||
<meta name="twitter:description" content={description} />
|
||||
<meta name="twitter:image" content={socialImage.src} />
|
||||
<script src={basecoatJsUrl} defer></script>
|
||||
<script src={dropdownMenuJsUrl} defer></script>
|
||||
</head>
|
||||
<body class="min-h-dvh overflow-x-clip bg-background text-foreground antialiased">
|
||||
<header class="bg-background sticky inset-x-0 top-0 isolate z-30 flex shrink-0 items-center gap-2">
|
||||
<div class="flex h-14 w-full items-center justify-between gap-2 px-4">
|
||||
<div class="flex min-w-0 items-center gap-1">
|
||||
<a href="/" class="btn" data-variant="ghost" aria-label="Basecoat home">
|
||||
<span class="[&_svg]:size-4" set:html={logoSvg} />
|
||||
<span class="truncate font-semibold">Basecoat</span>
|
||||
</a>
|
||||
<nav class="hidden items-center gap-1 sm:flex" aria-label="Primary">
|
||||
<a class="btn" data-variant="ghost" href="/introduction">Docs</a>
|
||||
<a class="btn" data-variant="ghost" href="https://github.com/hunvreus/basecoat" target="_blank" rel="noopener">GitHub</a>
|
||||
<a class="btn" data-variant="ghost" href="https://basecoatui.com/chat" target="_blank" rel="noopener">Discord</a>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="ml-auto flex min-w-0 flex-1 items-center justify-end gap-2">
|
||||
<select id="style-variant-select" class="select hidden h-8 w-28 shrink-0 text-sm leading-none sm:block" aria-label="Style pack">
|
||||
<option value="vega">Vega</option>
|
||||
<option value="nova">Nova</option>
|
||||
<option value="maia">Maia</option>
|
||||
<option value="lyra">Lyra</option>
|
||||
<option value="mira">Mira</option>
|
||||
<option value="luma">Luma</option>
|
||||
<option value="sera">Sera</option>
|
||||
<option value="rhea">Rhea</option>
|
||||
</select>
|
||||
<button
|
||||
type="button"
|
||||
aria-label="Toggle dark mode"
|
||||
data-tooltip="Toggle dark mode"
|
||||
data-side="bottom"
|
||||
data-align="end"
|
||||
onclick="document.dispatchEvent(new CustomEvent('basecoat:theme'))"
|
||||
class="btn hidden sm:inline-flex"
|
||||
data-size="icon"
|
||||
data-variant="ghost"
|
||||
>
|
||||
<span class="hidden dark:block"><Fragment set:html={Sun} /></span>
|
||||
<span class="block dark:hidden"><Fragment set:html={Moon} /></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="flex flex-1 flex-col">
|
||||
<section class="md:**:[.container]:pb-8 lg:**:[.container]:pb-12">
|
||||
<div class="container-wrapper">
|
||||
<div class="container mx-auto flex flex-col items-center gap-2 px-6 py-8 text-center md:py-16 lg:py-20 xl:gap-4">
|
||||
<h1 class="leading-tighter text-3xl font-semibold tracking-tight text-balance text-primary lg:leading-[1.1] lg:font-semibold xl:text-5xl xl:tracking-tighter max-w-4xl">
|
||||
{title}
|
||||
</h1>
|
||||
<p class="max-w-4xl text-base text-balance text-foreground sm:text-lg">
|
||||
{description}
|
||||
</p>
|
||||
<div class="flex w-full items-center justify-center gap-2 pt-2">
|
||||
<a class="btn" href="/installation">Get started</a>
|
||||
<a class="btn" data-variant="outline" href="https://github.com/hunvreus/basecoat" target="_blank" rel="noopener">Source code</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="flex-1 p-0">
|
||||
<div class="w-full overflow-hidden">
|
||||
<div class="theme-neutral relative flex h-[980px] max-h-[calc(100svh-14rem)] min-h-[680px] w-full max-w-none flex-col gap-(--gap) overflow-hidden bg-muted p-12 pb-0! [--gap:--spacing(8)] min-[1900px]:h-[1120px] min-[1900px]:p-12 min-[1900px]:[--gap:--spacing(10)]! lg:p-6 lg:[--gap:--spacing(6)] dark:bg-background">
|
||||
<div class="relative z-10 mx-auto grid w-full grid-cols-1 gap-(--gap) [&_.card]:w-full md:max-w-3xl md:grid-cols-2 lg:max-w-none lg:grid-cols-3 xl:max-w-[1600px] min-[1400px]:grid-cols-4! 2xl:max-w-[1900px] min-[1900px]:grid-cols-5!">
|
||||
<div class="flex min-w-0 flex-col gap-(--gap)">
|
||||
<article class="card relative">
|
||||
<section class="flex flex-col gap-6">
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<button class="btn" type="button">Button <span data-icon="inline-end"><Fragment set:html={ArrowRight} /></span></button>
|
||||
<button class="btn" data-variant="secondary" type="button">Secondary</button>
|
||||
<button class="btn" data-variant="outline" type="button">Outline</button>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="input-group">
|
||||
<input placeholder="Name" />
|
||||
<span data-align="end"><Fragment set:html={Search} /></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field flex-1">
|
||||
<textarea class="textarea min-h-20 resize-none" placeholder="Message"></textarea>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="flex gap-2">
|
||||
<span class="badge">Badge</span>
|
||||
<span class="badge" data-variant="secondary">Secondary</span>
|
||||
<span class="badge hidden min-[1900px]:flex" data-variant="outline">Outline</span>
|
||||
</div>
|
||||
<div class="ml-auto flex w-fit gap-3" role="radiogroup" aria-label="Fruit preference">
|
||||
<input class="input" type="radio" name="fruit" aria-label="Apple" checked />
|
||||
<input class="input" type="radio" name="fruit" aria-label="Banana" />
|
||||
</div>
|
||||
<div class="flex gap-3">
|
||||
<input class="input" type="checkbox" aria-label="Enable email alerts" checked />
|
||||
<input class="input hidden min-[1900px]:flex" type="checkbox" aria-label="Enable push alerts" />
|
||||
</div>
|
||||
<input class="input flex min-[1900px]:hidden" type="checkbox" role="switch" aria-label="Enable compact notifications" checked />
|
||||
</div>
|
||||
<div class="flex flex-wrap items-center gap-3">
|
||||
<button class="btn" data-variant="outline" type="button" onclick="document.getElementById('landing-alert-dialog').showModal()">Alert Dialog</button>
|
||||
<div class="button-group ml-auto max-w-full">
|
||||
<button class="btn min-w-0" data-variant="outline" type="button"><span class="truncate">Button Group</span></button>
|
||||
<div id="landing-quick-actions" class="dropdown-menu">
|
||||
<button id="landing-quick-actions-trigger" class="btn" data-size="icon" data-variant="outline" type="button" aria-label="Open quick actions" aria-haspopup="menu" aria-controls="landing-quick-actions-menu" aria-expanded="false"><Fragment set:html={ChevronUp} /></button>
|
||||
<div id="landing-quick-actions-popover" data-popover data-side="top" data-align="end" aria-hidden="true" class="w-40">
|
||||
<div role="menu" id="landing-quick-actions-menu" aria-labelledby="landing-quick-actions-trigger">
|
||||
<div role="group" aria-labelledby="landing-quick-actions-heading">
|
||||
<div role="heading" id="landing-quick-actions-heading">Quick Actions</div>
|
||||
<div role="menuitem">Mute Conversation</div>
|
||||
<div role="menuitem">Mark as Read</div>
|
||||
<div role="menuitem">Block User</div>
|
||||
</div>
|
||||
<hr role="separator" />
|
||||
<div role="group">
|
||||
<div role="menuitem" data-variant="destructive">Delete Conversation</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<dialog id="landing-alert-dialog" class="dialog" aria-labelledby="landing-alert-dialog-title" aria-describedby="landing-alert-dialog-description">
|
||||
<div>
|
||||
<header>
|
||||
<h2 id="landing-alert-dialog-title">Allow accessory to connect?</h2>
|
||||
<p id="landing-alert-dialog-description">Do you want to allow the USB accessory to connect to this device and your data?</p>
|
||||
</header>
|
||||
<footer>
|
||||
<button class="btn" data-variant="outline" type="button" onclick="document.getElementById('landing-alert-dialog').close()">Don't allow</button>
|
||||
<button class="btn" type="button" onclick="document.getElementById('landing-alert-dialog').close()">Allow</button>
|
||||
</footer>
|
||||
</div>
|
||||
</dialog>
|
||||
</article>
|
||||
|
||||
<div class="grid w-full grid-cols-2 gap-4 xl:gap-6">
|
||||
{sidebarSections.map((section) => (
|
||||
<article data-size="sm" class:list={["card", section.className]}>
|
||||
<section>
|
||||
<h3 class="mb-2 text-xs font-medium text-muted-foreground">{section.label}</h3>
|
||||
<ul class="grid gap-1">
|
||||
{section.items.map(([item, icon]) => (
|
||||
<li>
|
||||
<a href="#" class:list={["btn w-full min-w-0 justify-start", section.active === item && "bg-muted font-medium"]} data-size="sm" data-variant="ghost">
|
||||
<span class="shrink-0" set:html={icon} /> <span class="truncate">{item}</span>
|
||||
</a>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</section>
|
||||
</article>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<article class="card relative">
|
||||
<header>
|
||||
<h2>Savings Targets</h2>
|
||||
<p>Active milestones for 2024 across your portfolio. Monitor how close you are to each savings goal.</p>
|
||||
</header>
|
||||
<section class="grid gap-3">
|
||||
{[
|
||||
["Retirement", "$420,000", "65% achieved", "$273,000", "65%"],
|
||||
["Real Estate", "$85,000", "32% achieved", "$27,200", "32%"],
|
||||
].map(([label, amount, progress, value, width]) => (
|
||||
<div class="landing-demo-surface bg-muted/50 p-4">
|
||||
<p class="text-xs font-medium tracking-wider text-muted-foreground uppercase">{label}</p>
|
||||
<p class="mt-3 text-3xl font-semibold tabular-nums">{amount}</p>
|
||||
<div class="progress mt-3" role="progressbar" aria-label={`${label} savings progress`} aria-valuenow={parseInt(width, 10)} aria-valuemin="0" aria-valuemax="100"><span style={`width:${width}`}></span></div>
|
||||
<div class="mt-3 flex justify-between text-sm"><span class="text-muted-foreground">{progress}</span><span class="font-medium tabular-nums">{value}</span></div>
|
||||
</div>
|
||||
))}
|
||||
</section>
|
||||
<footer><p class="mx-auto text-center text-sm text-muted-foreground">You have not met your targets for this year.</p></footer>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
<div class="hidden min-w-0 flex-col gap-(--gap) lg:flex">
|
||||
<article class="card relative">
|
||||
<header><h2>Contribution History</h2><p>Last 6 months of activity</p></header>
|
||||
<section>
|
||||
<div class="flex h-[200px] w-full items-end gap-3" role="img" aria-label="Last 6 months of contribution activity">
|
||||
{[
|
||||
["Dec", 57],
|
||||
["Jan", 79],
|
||||
["Feb", 64],
|
||||
["Mar", 93],
|
||||
["Apr", 54],
|
||||
["May", 100],
|
||||
].map(([month, height]) => (
|
||||
<div class="flex h-full flex-1 flex-col justify-end gap-2">
|
||||
<div class="landing-demo-chart-bar min-h-2 bg-chart-2" style={`height:${height}%`}></div>
|
||||
<span class="text-center text-xs text-muted-foreground">{month}</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<div class="grid w-full grid-cols-1 gap-3 xl:grid-cols-2">
|
||||
<div class="landing-demo-surface bg-muted/50 p-4"><p class="text-xs font-medium tracking-wider text-muted-foreground uppercase">Upcoming</p><p class="text-base font-semibold">May 2024</p><p class="text-sm text-muted-foreground">Scheduled</p></div>
|
||||
<div class="landing-demo-surface hidden bg-muted/50 p-4 xl:block"><p class="text-xs font-medium tracking-wider text-muted-foreground uppercase">Savings Plan</p><p class="text-base font-semibold">Accelerated</p><p class="text-sm text-muted-foreground">Recurring</p></div>
|
||||
</div>
|
||||
</section>
|
||||
<footer><button class="btn w-full" type="button">View Full Report</button></footer>
|
||||
</article>
|
||||
|
||||
<article class="card relative">
|
||||
<header>
|
||||
<p class="text-sm text-muted-foreground">Claimable Balance</p>
|
||||
<h2 class="text-4xl tabular-nums">$1,211.29</h2>
|
||||
<span class="badge" data-variant="outline"><span class="size-2 rounded-full bg-yellow-500"></span> Pending Setup</span>
|
||||
</header>
|
||||
<section class="flex flex-1 flex-col justify-end">
|
||||
<article class="item landing-demo-surface" data-variant="muted">
|
||||
<section class="gap-3">
|
||||
<div class="flex justify-between"><span class="text-muted-foreground">Net Royalties</span><span class="font-medium tabular-nums">$1,248.75</span></div>
|
||||
<div class="mt-3 flex justify-between"><span class="text-muted-foreground">Processing Fee</span><span class="font-medium tabular-nums">-$37.46</span></div>
|
||||
<hr class="my-3 border-border" />
|
||||
<div class="flex justify-between"><span class="text-muted-foreground">Total Ready to Claim</span><span class="font-semibold tabular-nums">$1,211.29 USD</span></div>
|
||||
</section>
|
||||
</article>
|
||||
</section>
|
||||
<footer><p>Once your bank is connected, balances over $10.00 are automatically eligible for monthly distribution on the 15th of each month.</p></footer>
|
||||
</article>
|
||||
|
||||
<article class="card relative hidden lg:flex">
|
||||
<header>
|
||||
<h2>Q2 Dividend Income</h2>
|
||||
<p>Quarterly dividend payouts across your portfolio holdings.</p>
|
||||
</header>
|
||||
<section>
|
||||
<div class="grid gap-2">
|
||||
{holdings.map(([name, shares, _amount, data]) => (
|
||||
<div class="landing-demo-surface flex items-center gap-3 bg-muted/50 p-3">
|
||||
<div class="mr-auto"><p class="text-sm font-medium">{name}</p><p class="text-sm text-muted-foreground">{shares}</p></div>
|
||||
<div class="hidden h-8 w-24 items-end gap-1 md:flex">{data.map((height) => <span class="landing-demo-chart-bar min-h-1 flex-1 bg-chart-2" style={`height:${height}%`}></span>)}</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
<div class="hidden min-w-0 flex-col gap-(--gap) min-[1900px]:flex">
|
||||
<article class="card relative">
|
||||
<header><h2>Set a new milestone</h2><p>Define your financial target and we'll help you pace your savings.</p></header>
|
||||
<section class="grid gap-4">
|
||||
<div class="field"><label for="goal-name">Goal Name</label><input id="goal-name" class="input" placeholder="e.g. New Car, Home Downpayment" /></div>
|
||||
<div class="grid grid-cols-2 gap-3">
|
||||
<div class="field"><label for="target-amount">Target Amount</label><input id="target-amount" class="input" value="$15,000" /></div>
|
||||
<div class="field"><label for="target-date">Target Date</label><input id="target-date" class="input" value="Dec 2025" /></div>
|
||||
</div>
|
||||
</section>
|
||||
<footer class="flex-col gap-2"><button class="btn w-full" type="button">Create Goal</button><button class="btn w-full" data-variant="outline" type="button">Cancel</button></footer>
|
||||
</article>
|
||||
|
||||
<article class="card relative">
|
||||
<header><h2>Payout Threshold</h2><p>Set the minimum balance required before a payout is triggered.</p></header>
|
||||
<section class="grid gap-4">
|
||||
<div class="field"><label for="preferred-currency">Preferred Currency</label><select id="preferred-currency" class="select"><option>USD — United States Dollar</option></select></div>
|
||||
<div class="field"><div class="flex items-baseline justify-between"><label id="min-payout-label">Minimum Payout Amount</label><span class="text-2xl font-semibold tabular-nums">$2500.00</span></div><div class="progress" role="progressbar" aria-labelledby="min-payout-label" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100" aria-valuetext="$2,500 of $10,000"><span style="width:25%"></span></div><div class="flex justify-between text-sm text-muted-foreground"><span>$50 (MIN)</span><span>$10,000 (MAX)</span></div></div>
|
||||
<div class="field"><label for="payout-notes">Notes</label><textarea id="payout-notes" class="textarea min-h-[100px]" placeholder="Add any notes for this payout configuration..."></textarea></div>
|
||||
</section>
|
||||
<footer><button class="btn w-full" type="button">Save Threshold</button></footer>
|
||||
</article>
|
||||
|
||||
<article class="card relative">
|
||||
<header><h2>Account Access</h2><p>Update your credentials or re-authenticate.</p></header>
|
||||
<section class="grid gap-4">
|
||||
<div class="field"><label for="email-address">Email Address</label><input id="email-address" class="input" type="email" placeholder="artist@studio.inc" /></div>
|
||||
<div class="field"><div class="flex items-center justify-between"><label for="current-password">Current Password</label><a href="#" class="text-xs font-medium tracking-wider text-muted-foreground uppercase hover:text-foreground">Forgot?</a></div><input id="current-password" class="input" type="password" placeholder="••••••••••••••••••••••••" /></div>
|
||||
</section>
|
||||
<footer class="flex-col gap-4"><button class="btn w-full" type="button"><Fragment set:html={Lock} /> Update Security</button><a href="#" class="item landing-demo-surface" data-variant="muted"><figure class="text-destructive"><Fragment set:html={Info} /></figure><section><h3>Danger Zone</h3><p class="line-clamp-1">Archive account and remove catalog</p></section><aside class="text-muted-foreground [&_svg]:size-4"><Fragment set:html={ChevronRight} /></aside></a></footer>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
<div class="hidden min-w-0 flex-col gap-(--gap) md:flex">
|
||||
<article class="card relative">
|
||||
<section class="flex justify-center pt-6">
|
||||
<div class="landing-demo-surface border border-border bg-white p-4">
|
||||
<svg viewBox="0 0 21 21" class="size-40 text-black" role="img" aria-label="Connect device QR code" shape-rendering="crispEdges">
|
||||
<rect width="21" height="21" fill="white" />
|
||||
{qrRows.map((row, y) => [...row].map((cell, x) => cell === "1" && <rect x={x} y={y} width="1" height="1" />))}
|
||||
</svg>
|
||||
</div>
|
||||
</section>
|
||||
<header class="text-center"><h2>Scan to connect your mobile device</h2><p class="text-balance">Open the Ledger mobile app and scan this code to link your device.</p></header>
|
||||
</article>
|
||||
|
||||
<article class="card relative">
|
||||
<header><h2>Transfer Funds</h2><p>Move money between your connected accounts.</p></header>
|
||||
<section class="grid gap-4">
|
||||
<div class="field w-full"><label for="transfer-amount">Amount to Transfer</label><div class="input-group w-full"><span data-align="start">$</span><input id="transfer-amount" class="w-full" value="1,200.00" /></div></div>
|
||||
<div class="field w-full"><label for="from-account">From Account</label><select id="from-account" class="select w-full"><option>Main Checking (··8402) — $12,450.00</option></select></div>
|
||||
<div class="field w-full"><label for="to-account">To Account</label><select id="to-account" class="select w-full"><option>High Yield Savings (··1192) — $42,100.00</option></select></div>
|
||||
<article class="item landing-demo-surface" data-variant="muted">
|
||||
<section class="gap-3">
|
||||
<div class="flex justify-between"><span class="text-muted-foreground">Estimated arrival</span><span class="font-medium">Today, Apr 14</span></div><hr class="my-3 border-border" />
|
||||
<div class="flex justify-between"><span class="text-muted-foreground">Transaction fee</span><span class="font-medium tabular-nums">$0.00</span></div><hr class="my-3 border-border" />
|
||||
<div class="flex justify-between"><span class="font-medium">Total amount</span><span class="font-semibold tabular-nums">$1,200.00</span></div>
|
||||
</section>
|
||||
</article>
|
||||
</section>
|
||||
<footer><button class="btn w-full" type="button">Confirm Transfer</button></footer>
|
||||
</article>
|
||||
|
||||
<article class="card">
|
||||
<header class="flex flex-col gap-3">
|
||||
<nav aria-label="Breadcrumb">
|
||||
<ol class="text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5">
|
||||
<li class="inline-flex items-center gap-1.5">
|
||||
<a href="#" class="hover:text-foreground transition-colors">Home</a>
|
||||
</li>
|
||||
<li aria-hidden="true" class="text-muted-foreground">
|
||||
<span class="[&_svg]:size-3.5" set:html={ChevronRight} />
|
||||
</li>
|
||||
<li class="inline-flex items-center gap-1.5">
|
||||
<div id="landing-payments-breadcrumb" class="dropdown-menu">
|
||||
<button type="button" id="landing-payments-breadcrumb-trigger" aria-haspopup="menu" aria-controls="landing-payments-breadcrumb-menu" aria-expanded="false" class="flex size-9 h-4 w-4 cursor-pointer items-center justify-center hover:text-foreground [&_svg]:size-4" aria-label="Account options"><Fragment set:html={Ellipsis} /></button>
|
||||
<div id="landing-payments-breadcrumb-popover" data-popover aria-hidden="true">
|
||||
<div role="menu" id="landing-payments-breadcrumb-menu" aria-labelledby="landing-payments-breadcrumb-trigger">
|
||||
<nav role="menu">
|
||||
<button type="button" role="menuitem">Profile</button>
|
||||
<button type="button" role="menuitem">Statements</button>
|
||||
<button type="button" role="menuitem">Documents</button>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li aria-hidden="true" class="text-muted-foreground">
|
||||
<span class="[&_svg]:size-3.5" set:html={ChevronRight} />
|
||||
</li>
|
||||
<li class="inline-flex items-center gap-1.5">
|
||||
<span class="font-normal text-foreground">Payments</span>
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</header>
|
||||
<section>
|
||||
<div class="grid gap-2">
|
||||
{[
|
||||
["Change transfer limit", "Adjust how much you can send from your balance."],
|
||||
["Scheduled transfers", "Set up a transfer to send at a later date."],
|
||||
["Recurring card payments", "Manage your repeated card transactions."],
|
||||
].map(([name, desc], index) => (
|
||||
<a href="#" class="item landing-demo-surface" data-variant="muted">
|
||||
<figure><Fragment set:html={index === 0 ? Settings : index === 1 ? Calendar : Refresh} /></figure>
|
||||
<section><h3>{name}</h3><p>{desc}</p></section>
|
||||
<aside class="text-muted-foreground [&_svg]:size-4"><Fragment set:html={ChevronRight} /></aside>
|
||||
</a>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
<div class="hidden min-w-0 flex-col gap-(--gap) min-[1400px]:flex">
|
||||
<article class="card hidden min-[1400px]:flex">
|
||||
<section>
|
||||
<section class="empty p-4">
|
||||
<header>
|
||||
<figure><Fragment set:html={Plus} /></figure>
|
||||
<h2>Distribute Track</h2>
|
||||
<p>Upload your first master to start reaching listeners on Spotify, Apple Music, and more.</p>
|
||||
</header>
|
||||
<footer><button class="btn" type="button">Create Release</button></footer>
|
||||
</section>
|
||||
</section>
|
||||
</article>
|
||||
|
||||
<article class="card relative w-full pb-0">
|
||||
<header>
|
||||
<h2>Analytics</h2>
|
||||
<p>418.2K Visitors <span class="badge">+10%</span></p>
|
||||
<a class="btn absolute end-4 top-4" data-size="sm" data-variant="outline" href="/components/chart">View Analytics</a>
|
||||
</header>
|
||||
<svg viewBox="0 0 100 86" preserveAspectRatio="none" class="aspect-[1/0.35] w-full text-chart-1" role="img" aria-label="Visitor trend"><path d="M0 52L18 40L36 46L54 70L72 50L100 49V86H0Z" fill="currentColor" opacity="0.28" /><path d="M0 52L18 40L36 46L54 70L72 50L100 49" fill="none" stroke="currentColor" stroke-width="1.5" vector-effect="non-scaling-stroke" /></svg>
|
||||
</article>
|
||||
|
||||
<article class="card hidden min-[1400px]:flex">
|
||||
<header><h2>Notifications</h2><p>Choose which email and push alerts you want to receive.</p></header>
|
||||
<section class="grid gap-4">
|
||||
{[
|
||||
["transactions", "Transaction alerts", "Deposits, withdrawals, and transfers.", true],
|
||||
["security", "Security alerts", "Login attempts and account changes.", true],
|
||||
["goals", "Goal milestones", "Updates at 25%, 50%, 75%, and 100%.", false],
|
||||
["market", "Market updates", "Daily portfolio summary and price alerts.", false],
|
||||
].map(([id, label, desc, checked]) => (
|
||||
<label class="field" data-orientation="horizontal">
|
||||
<input class="input" type="checkbox" checked={checked} />
|
||||
<section><span class="font-medium">{label}</span><p>{desc}</p></section>
|
||||
</label>
|
||||
))}
|
||||
</section>
|
||||
<footer><button class="btn w-full" type="button">Save Preferences</button></footer>
|
||||
</article>
|
||||
|
||||
<article class="card hidden min-[1400px]:flex">
|
||||
<header><h2>Power Usage</h2><p>Whole Home</p></header>
|
||||
<section class="flex flex-col gap-4">
|
||||
<div class="flex h-[140px] w-full items-end gap-2" role="img" aria-label="Power usage by hour">
|
||||
{[32, 74, 82, 63, 89, 76, 100, 84].map((height, index) => (
|
||||
<div class="flex h-full flex-1 flex-col justify-end gap-1.5"><div class="landing-demo-chart-bar min-h-2 bg-chart-2" style={`height:${height}%`}></div><span class="text-center text-xs text-muted-foreground">{["6a", "8a", "10a", "12p", "2p", "4p", "6p", "8p"][index]}</span></div>
|
||||
))}
|
||||
</div>
|
||||
<hr class="border-border" />
|
||||
<div class="grid grid-cols-2 gap-4">
|
||||
<div><span class="text-sm text-muted-foreground">Currently Using</span><p class="text-lg font-semibold tabular-nums">3.4 kW</p></div>
|
||||
<div><span class="text-sm text-muted-foreground">Solar Gen</span><p class="text-lg font-semibold tabular-nums">+1.2 kW</p></div>
|
||||
</div>
|
||||
</section>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
<div class="absolute inset-x-0 top-0 z-1 h-120 bg-linear-to-b from-background via-muted to-transparent dark:hidden"></div>
|
||||
<div class="absolute inset-x-0 bottom-0 z-20 h-48 bg-linear-to-t from-background via-muted/80 to-transparent lg:h-80 xl:h-64 dark:via-background/80"></div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<script is:inline define:vars={{ styleUrls }}>
|
||||
(() => {
|
||||
const styleSelect = document.getElementById("style-variant-select");
|
||||
const styleLinkId = "docs-style-variant";
|
||||
const pendingStyleLinkId = "docs-style-variant-pending";
|
||||
const styleGateId = "docs-style-gate";
|
||||
const getStyleLink = () => document.getElementById(styleLinkId);
|
||||
const clearStylePending = () => {
|
||||
document.documentElement.removeAttribute("data-style-pending");
|
||||
document.getElementById(styleGateId)?.remove();
|
||||
};
|
||||
const applyStyle = (style) => {
|
||||
const nextStyle = Object.prototype.hasOwnProperty.call(styleUrls, style) ? style : "vega";
|
||||
const href = styleUrls[nextStyle]?.startsWith("/docs/src/assets/styles/")
|
||||
? `${styleUrls[nextStyle]}?direct`
|
||||
: styleUrls[nextStyle];
|
||||
const link = getStyleLink();
|
||||
if (!href) {
|
||||
link?.remove();
|
||||
document.getElementById(pendingStyleLinkId)?.remove();
|
||||
clearStylePending();
|
||||
return;
|
||||
}
|
||||
|
||||
const sameHref = link?.getAttribute("href") === href;
|
||||
if (sameHref || link?.sheet) {
|
||||
clearStylePending();
|
||||
}
|
||||
if (sameHref) return;
|
||||
|
||||
document.getElementById(pendingStyleLinkId)?.remove();
|
||||
|
||||
const pendingLink = document.createElement("link");
|
||||
pendingLink.id = pendingStyleLinkId;
|
||||
pendingLink.rel = "stylesheet";
|
||||
pendingLink.addEventListener(
|
||||
"load",
|
||||
() => {
|
||||
link?.remove();
|
||||
pendingLink.id = styleLinkId;
|
||||
document.documentElement.dataset.styleVariant = nextStyle;
|
||||
clearStylePending();
|
||||
document.dispatchEvent(new CustomEvent("basecoat:stylechange", { detail: { style: nextStyle } }));
|
||||
},
|
||||
{ once: true },
|
||||
);
|
||||
pendingLink.addEventListener(
|
||||
"error",
|
||||
() => {
|
||||
pendingLink.remove();
|
||||
clearStylePending();
|
||||
},
|
||||
{ once: true },
|
||||
);
|
||||
pendingLink.href = href;
|
||||
document.head.appendChild(pendingLink);
|
||||
};
|
||||
const getStoredStyle = () => {
|
||||
try {
|
||||
return localStorage.getItem("styleVariant") || "vega";
|
||||
} catch (_) {
|
||||
return "vega";
|
||||
}
|
||||
};
|
||||
const initialStyle = getStoredStyle();
|
||||
if (styleSelect) styleSelect.value = initialStyle;
|
||||
applyStyle(initialStyle);
|
||||
styleSelect?.addEventListener("change", () => {
|
||||
const nextStyle = styleSelect.value || "vega";
|
||||
applyStyle(nextStyle);
|
||||
try {
|
||||
localStorage.setItem("styleVariant", nextStyle);
|
||||
} catch (_) {}
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user