Merge pull request 'refactor: create styling structure and restyle components to reflect brand design' (#85)
Reviewed-on: #85 Reviewed-by: Dominik <mail@dominikstahl.dev>
This commit is contained in:
commit
6cf0b59a9e
17 changed files with 606 additions and 48 deletions
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
--font-heading: 'Comfortaa', sans-serif;
|
--font-heading: 'Comfortaa', sans-serif;
|
||||||
--font-label: 'Varela Round', sans-serif;
|
--font-label: 'Varela Round', sans-serif;
|
||||||
|
--font-button: 'Varela Round', sans-serif;
|
||||||
|
|
||||||
--transparent: transparent;
|
--transparent: transparent;
|
||||||
|
|
||||||
|
@ -26,6 +27,7 @@
|
||||||
--neutral-900: oklch(1 0 0);
|
--neutral-900: oklch(1 0 0);
|
||||||
|
|
||||||
--background: var(--neutral-800);
|
--background: var(--neutral-800);
|
||||||
|
--background-reversed: var(--neutral-000);
|
||||||
--base: var(--neutral-800);
|
--base: var(--neutral-800);
|
||||||
--text: var(--neutral-000);
|
--text: var(--neutral-000);
|
||||||
--text-alt: var(--neutral-900);
|
--text-alt: var(--neutral-900);
|
||||||
|
@ -46,6 +48,11 @@
|
||||||
--active-secondary: oklch(0.4254 0.133 272.15);
|
--active-secondary: oklch(0.4254 0.133 272.15);
|
||||||
--disabled-secondary: oklch(0.4937 0.1697 271.26 / 0.5);
|
--disabled-secondary: oklch(0.4937 0.1697 271.26 / 0.5);
|
||||||
|
|
||||||
|
--muted: var(--color-neutral-700);
|
||||||
|
--hover-muted: var(--color-neutral-600);
|
||||||
|
--active-muted: var(--color-neutral-400);
|
||||||
|
--disabled-muted: var(--color-neutral-400);
|
||||||
|
|
||||||
--card: var(--neutral-800);
|
--card: var(--neutral-800);
|
||||||
|
|
||||||
/* ------------------- */
|
/* ------------------- */
|
||||||
|
@ -64,8 +71,6 @@
|
||||||
|
|
||||||
--secondary-foreground: oklch(0.21 0.034 264.665);
|
--secondary-foreground: oklch(0.21 0.034 264.665);
|
||||||
|
|
||||||
--muted: oklch(0.967 0.003 264.542);
|
|
||||||
|
|
||||||
--muted-foreground: oklch(0.551 0.027 264.364);
|
--muted-foreground: oklch(0.551 0.027 264.364);
|
||||||
|
|
||||||
--accent: oklch(0.967 0.003 264.542);
|
--accent: oklch(0.967 0.003 264.542);
|
||||||
|
@ -125,6 +130,7 @@
|
||||||
@theme inline {
|
@theme inline {
|
||||||
--font-heading: var(--font-heading);
|
--font-heading: var(--font-heading);
|
||||||
--font-label: var(--font-label);
|
--font-label: var(--font-label);
|
||||||
|
--font-button: var(--font-button);
|
||||||
|
|
||||||
--transparent: var(--transparent);
|
--transparent: var(--transparent);
|
||||||
|
|
||||||
|
@ -136,12 +142,14 @@
|
||||||
--color-neutral-400: var(--neutral-400);
|
--color-neutral-400: var(--neutral-400);
|
||||||
--color-neutral-500: var(--neutral-500);
|
--color-neutral-500: var(--neutral-500);
|
||||||
--color-neutral-600: var(--neutral-600);
|
--color-neutral-600: var(--neutral-600);
|
||||||
|
--color-neutral-650: var(--neutral-650);
|
||||||
--color-neutral-700: var(--neutral-700);
|
--color-neutral-700: var(--neutral-700);
|
||||||
--color-neutral-750: var(--neutral-750);
|
--color-neutral-750: var(--neutral-750);
|
||||||
--color-neutral-800: var(--neutral-800);
|
--color-neutral-800: var(--neutral-800);
|
||||||
--color-neutral-900: var(--neutral-900);
|
--color-neutral-900: var(--neutral-900);
|
||||||
|
|
||||||
--color-background: var(--neutral-750);
|
--color-background: var(--neutral-750);
|
||||||
|
--color-background-reversed: var(--background-reversed);
|
||||||
--color-base: var(--neutral-800);
|
--color-base: var(--neutral-800);
|
||||||
--color-text: var(--text);
|
--color-text: var(--text);
|
||||||
--color-text-alt: var(--text-alt);
|
--color-text-alt: var(--text-alt);
|
||||||
|
@ -163,6 +171,11 @@
|
||||||
--color-active-secondary: var(--active-secondary);
|
--color-active-secondary: var(--active-secondary);
|
||||||
--color-disabled-secondary: var(--disabled-secondary);
|
--color-disabled-secondary: var(--disabled-secondary);
|
||||||
|
|
||||||
|
--color-muted: var(--muted);
|
||||||
|
--color-hover-muted: var(--hover-muted);
|
||||||
|
--color-active-muted: var(--active-muted);
|
||||||
|
--color-disabled-muted: var(--disabled-muted);
|
||||||
|
|
||||||
/* Custom values */
|
/* Custom values */
|
||||||
|
|
||||||
--radius-sm: calc(var(--radius) - 4px);
|
--radius-sm: calc(var(--radius) - 4px);
|
||||||
|
@ -252,12 +265,14 @@
|
||||||
--neutral-450: oklch(0.6 0 0);
|
--neutral-450: oklch(0.6 0 0);
|
||||||
--neutral-500: oklch(0.5486 0 0);
|
--neutral-500: oklch(0.5486 0 0);
|
||||||
--neutral-600: oklch(0.4495 0 0);
|
--neutral-600: oklch(0.4495 0 0);
|
||||||
|
--neutral-650: oklch(0.425 0 0);
|
||||||
--neutral-700: oklch(0.3407 0 0);
|
--neutral-700: oklch(0.3407 0 0);
|
||||||
--neutral-750: oklch(0.2972 0 0);
|
--neutral-750: oklch(0.2972 0 0);
|
||||||
--neutral-800: oklch(0.2264 0 0);
|
--neutral-800: oklch(0.2264 0 0);
|
||||||
--neutral-900: oklch(0 0 0);
|
--neutral-900: oklch(0 0 0);
|
||||||
|
|
||||||
--background: var(--neutral-750);
|
--background: var(--neutral-750);
|
||||||
|
--background-reversed: var(--neutral-000);
|
||||||
--base: var(--neutral-750);
|
--base: var(--neutral-750);
|
||||||
--text: var(--neutral-000);
|
--text: var(--neutral-000);
|
||||||
--text-alt: var(--neutral-900);
|
--text-alt: var(--neutral-900);
|
||||||
|
@ -277,6 +292,11 @@
|
||||||
--active-secondary: oklch(0.4471 0.15 271.61);
|
--active-secondary: oklch(0.4471 0.15 271.61);
|
||||||
--disabled-secondary: oklch(0.6065 0.213 271.11 / 0.4);
|
--disabled-secondary: oklch(0.6065 0.213 271.11 / 0.4);
|
||||||
|
|
||||||
|
--muted: var(--color-neutral-650);
|
||||||
|
--hover-muted: var(--color-neutral-500);
|
||||||
|
--active-muted: var(--color-neutral-400);
|
||||||
|
--disabled-muted: var(--color-neutral-400);
|
||||||
|
|
||||||
--card: var(--neutral-750);
|
--card: var(--neutral-750);
|
||||||
|
|
||||||
/* ------------------- */
|
/* ------------------- */
|
||||||
|
@ -295,8 +315,6 @@
|
||||||
|
|
||||||
--secondary-foreground: oklch(0.985 0.002 247.839);
|
--secondary-foreground: oklch(0.985 0.002 247.839);
|
||||||
|
|
||||||
--muted: oklch(0.278 0.033 256.848);
|
|
||||||
|
|
||||||
--muted-foreground: oklch(0.707 0.022 261.325);
|
--muted-foreground: oklch(0.707 0.022 261.325);
|
||||||
|
|
||||||
--accent: oklch(0.278 0.033 256.848);
|
--accent: oklch(0.278 0.033 256.848);
|
||||||
|
|
|
@ -41,7 +41,7 @@ export default async function LoginPage() {
|
||||||
<CardContent className='gap-6 flex flex-col items-center'>
|
<CardContent className='gap-6 flex flex-col items-center'>
|
||||||
<LoginForm />
|
<LoginForm />
|
||||||
|
|
||||||
<Separator className='h-[1px] rounded-sm w-[60%] bg-neutral-000' />
|
<Separator className='h-[1px] rounded-sm w-[60%] bg-border' />
|
||||||
|
|
||||||
{providerMap.length > 0}
|
{providerMap.length > 0}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ export default async function LoginPage() {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<HoverCard>
|
<HoverCard>
|
||||||
<HoverCardTrigger className='text-sm text-neutral-000 hover:underline'>
|
<HoverCardTrigger>
|
||||||
<Button variant='link'>made with love</Button>
|
<Button variant='link'>made with love</Button>
|
||||||
</HoverCardTrigger>
|
</HoverCardTrigger>
|
||||||
<HoverCardContent className='flex items-center justify-center'>
|
<HoverCardContent className='flex items-center justify-center'>
|
||||||
|
|
|
@ -251,7 +251,7 @@ export default function SettingsPage() {
|
||||||
Define your typical available hours (e.g.,
|
Define your typical available hours (e.g.,
|
||||||
Monday-Friday, 9 AM - 5 PM).
|
Monday-Friday, 9 AM - 5 PM).
|
||||||
</p>
|
</p>
|
||||||
<Button variant='outline' size='sm'>
|
<Button variant='outline_muted' size='sm'>
|
||||||
Set Working Hours
|
Set Working Hours
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -302,10 +302,14 @@ export default function SettingsPage() {
|
||||||
</div>
|
</div>
|
||||||
<div className='space-y-2'>
|
<div className='space-y-2'>
|
||||||
<Label>Export Your Calendar</Label>
|
<Label>Export Your Calendar</Label>
|
||||||
<Button variant='outline' size='sm'>
|
<Button variant='outline_muted' size='sm'>
|
||||||
Get iCal Export URL
|
Get iCal Export URL
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant='outline' size='sm' className='ml-2'>
|
<Button
|
||||||
|
variant='outline_muted'
|
||||||
|
size='sm'
|
||||||
|
className='ml-2'
|
||||||
|
>
|
||||||
Download .ics File
|
Download .ics File
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -398,7 +402,9 @@ export default function SettingsPage() {
|
||||||
</div>
|
</div>
|
||||||
<div className='space-y-2'>
|
<div className='space-y-2'>
|
||||||
<Label>Blocked Users</Label>
|
<Label>Blocked Users</Label>
|
||||||
<Button variant='outline'>Manage Blocked Users</Button>
|
<Button variant='outline_muted'>
|
||||||
|
Manage Blocked Users
|
||||||
|
</Button>
|
||||||
<p className='text-sm text-muted-foreground'>
|
<p className='text-sm text-muted-foreground'>
|
||||||
Prevent specific users from seeing your calendar or
|
Prevent specific users from seeing your calendar or
|
||||||
booking time.
|
booking time.
|
||||||
|
|
|
@ -5,24 +5,29 @@ import { cva, type VariantProps } from 'class-variance-authority';
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
const buttonVariants = cva(
|
const buttonVariants = cva(
|
||||||
"radius-lg inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-label transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
"radius-lg inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-button transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
||||||
{
|
{
|
||||||
variants: {
|
variants: {
|
||||||
variant: {
|
variant: {
|
||||||
primary:
|
primary:
|
||||||
'bg-primary text-text shadow-xs hover:bg-hover-primary active:bg-active-primary',
|
'bg-primary text-text shadow-xs hover:bg-hover-primary active:bg-active-primary disabled:bg-disabled-primary',
|
||||||
secondary:
|
secondary:
|
||||||
'bg-secondary text-text-alt shadow-xs hover:bg-hover-secondary active:bg-active-secondary',
|
'bg-secondary text-text-alt shadow-xs hover:bg-hover-secondary active:bg-active-secondary disabled:bg-disabled-secondary',
|
||||||
outline:
|
muted:
|
||||||
'border-2 border-primary bg-transparent text-text shadow-xs hover:bg-primary hover:border-neutral-000 hover:border-1.5 hover:text-neutral-000 active:bg-active-primary',
|
'bg-muted text-text shadow-xs hover:bg-hover-muted active:bg-active-muted disabled:bg-disabled-muted',
|
||||||
ghost:
|
outline_primary:
|
||||||
'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',
|
'bg-background border-2 text-text shadow-xs hover:bg-primary border-primary hover:border-background-reversed active:bg-active-primary disabled:bg-disabled-primary',
|
||||||
|
outline_secondary:
|
||||||
|
'bg-background border-2 text-text shadow-xs hover:bg-secondary border-secondary hover:border-background-reversed active:bg-active-secondary disabled:bg-disabled-secondary',
|
||||||
|
outline_muted:
|
||||||
|
'bg-background border-2 text-text shadow-xs hover:bg-muted border-muted hover:border-background-reversed active:bg-active-muted disabled:bg-disabled-muted',
|
||||||
|
|
||||||
link: 'text-text underline-offset-4 hover:underline',
|
link: 'text-text underline-offset-4 hover:underline',
|
||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
default: 'h-9 px-4 py-2 has-[>svg]:px-3',
|
default: 'h-9 px-4 py-2 has-[>svg]:px-3',
|
||||||
sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',
|
sm: 'h-8 gap-1.5 px-3 has-[>svg]:px-2.5',
|
||||||
lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',
|
lg: 'h-10 px-6 has-[>svg]:px-4',
|
||||||
icon: 'size-9',
|
icon: 'size-9',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -34,7 +39,7 @@ const buttonVariants = cva(
|
||||||
);
|
);
|
||||||
|
|
||||||
function Button({
|
function Button({
|
||||||
className = 'font-label',
|
className,
|
||||||
variant,
|
variant,
|
||||||
size,
|
size,
|
||||||
asChild = false,
|
asChild = false,
|
||||||
|
|
|
@ -7,7 +7,33 @@ function Card({ className, ...props }: React.ComponentProps<'div'>) {
|
||||||
<div
|
<div
|
||||||
data-slot='card'
|
data-slot='card'
|
||||||
className={cn(
|
className={cn(
|
||||||
'bg-card flex flex-col gap-6 py-6 shadow-[4px_4px_9px_9px_rgba(0,0,0,0.25)] rounded-[11px]',
|
/* Text */
|
||||||
|
'',
|
||||||
|
/* Background */
|
||||||
|
'bg-card',
|
||||||
|
/* Border */
|
||||||
|
'rounded-[11px]',
|
||||||
|
/* Font */
|
||||||
|
'',
|
||||||
|
/* Cursor */
|
||||||
|
'',
|
||||||
|
/* Ring */
|
||||||
|
'',
|
||||||
|
/* Outline */
|
||||||
|
'',
|
||||||
|
/* Shadow */
|
||||||
|
'shadow-[4px_4px_9px_9px_rgba(0,0,0,0.25)]',
|
||||||
|
/* Opacity */
|
||||||
|
'',
|
||||||
|
/* Scaling */
|
||||||
|
'',
|
||||||
|
/* Spacing */
|
||||||
|
'gap-6 py-6',
|
||||||
|
/* Alignment */
|
||||||
|
'flex flex-col',
|
||||||
|
/* Miscellaneous */
|
||||||
|
'',
|
||||||
|
/* ////////// */
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
|
|
@ -15,7 +15,7 @@ export default function LabeledInput({
|
||||||
name?: string;
|
name?: string;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<div className='grid grid-cols-1 gap-1 font-label'>
|
<div className='grid grid-cols-1 gap-1'>
|
||||||
<Label htmlFor={name}>{label}</Label>
|
<Label htmlFor={name}>{label}</Label>
|
||||||
|
|
||||||
<Input
|
<Input
|
||||||
|
|
|
@ -7,7 +7,31 @@ function Card({ className, ...props }: React.ComponentProps<'div'>) {
|
||||||
<div
|
<div
|
||||||
data-slot='card'
|
data-slot='card'
|
||||||
className={cn(
|
className={cn(
|
||||||
'bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm',
|
/* Text */
|
||||||
|
'text-card-foreground',
|
||||||
|
/* Background */
|
||||||
|
'bg-card',
|
||||||
|
/* Border */
|
||||||
|
'border rounded-xl',
|
||||||
|
/* Font */
|
||||||
|
'',
|
||||||
|
/* Cursor */
|
||||||
|
'',
|
||||||
|
/* Ring */
|
||||||
|
'',
|
||||||
|
/* Outline */
|
||||||
|
'',
|
||||||
|
/* Shadow */
|
||||||
|
'shadow-sm',
|
||||||
|
/* Opacity */
|
||||||
|
'',
|
||||||
|
/* Scaling */
|
||||||
|
'',
|
||||||
|
/* Spacing */
|
||||||
|
'py-6 gap-6',
|
||||||
|
/* Alignment */
|
||||||
|
'flex flex-col',
|
||||||
|
/* ////////// */
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
@ -20,7 +44,34 @@ function CardHeader({ className, ...props }: React.ComponentProps<'div'>) {
|
||||||
<div
|
<div
|
||||||
data-slot='card-header'
|
data-slot='card-header'
|
||||||
className={cn(
|
className={cn(
|
||||||
'@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6',
|
/* Text */
|
||||||
|
'',
|
||||||
|
/* Background */
|
||||||
|
'',
|
||||||
|
/* Border */
|
||||||
|
'',
|
||||||
|
/* Font */
|
||||||
|
'',
|
||||||
|
/* Cursor */
|
||||||
|
'',
|
||||||
|
/* Ring */
|
||||||
|
'',
|
||||||
|
/* Outline */
|
||||||
|
'',
|
||||||
|
/* Shadow */
|
||||||
|
'',
|
||||||
|
/* Opacity */
|
||||||
|
'',
|
||||||
|
/* Scaling */
|
||||||
|
'',
|
||||||
|
/* Spacing */
|
||||||
|
'gap-1.5 px-6 [.border-b]:pb-6',
|
||||||
|
/* Alignment */
|
||||||
|
'grid auto-rows-min grid-rows-[auto_auto]',
|
||||||
|
'items-start has-data-[slot=card-action]:grid-cols-[1fr_auto]',
|
||||||
|
/* Miscellanneous */
|
||||||
|
'@container/card-header',
|
||||||
|
/* ////////// */
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
|
|
@ -42,7 +42,38 @@ function DropdownMenuContent({
|
||||||
data-slot='dropdown-menu-content'
|
data-slot='dropdown-menu-content'
|
||||||
sideOffset={sideOffset}
|
sideOffset={sideOffset}
|
||||||
className={cn(
|
className={cn(
|
||||||
'bg-popover text-text data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md',
|
/* Text */
|
||||||
|
'text-text',
|
||||||
|
/* Background */
|
||||||
|
'bg-popover',
|
||||||
|
/* Border */
|
||||||
|
'border rounded-md',
|
||||||
|
/* Font */
|
||||||
|
'',
|
||||||
|
/* Cursor */
|
||||||
|
'',
|
||||||
|
/* Ring */
|
||||||
|
'',
|
||||||
|
/* Outline */
|
||||||
|
'',
|
||||||
|
/* Shadow */
|
||||||
|
'shadow-md',
|
||||||
|
/* Opacity */
|
||||||
|
'',
|
||||||
|
/* Scaling */
|
||||||
|
'max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem]',
|
||||||
|
/* Spacing */
|
||||||
|
'p-1',
|
||||||
|
/* Alignment */
|
||||||
|
'z-50 origin-(--radix-dropdown-menu-content-transform-origin)',
|
||||||
|
/* Miscellaneous */
|
||||||
|
'overflow-x-hidden overflow-y-auto',
|
||||||
|
'data-[state=open]:animate-in data-[state=closed]:animate-out',
|
||||||
|
'data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',
|
||||||
|
'data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95',
|
||||||
|
'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2',
|
||||||
|
'data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
|
||||||
|
/* ////////// */
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
@ -74,7 +105,38 @@ function DropdownMenuItem({
|
||||||
data-inset={inset}
|
data-inset={inset}
|
||||||
data-variant={variant}
|
data-variant={variant}
|
||||||
className={cn(
|
className={cn(
|
||||||
"focus:bg-popover-hover focus:text-text data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
/* Text */
|
||||||
|
'text-sm focus:text-text data-[variant=destructive]:text-destructive',
|
||||||
|
'data-[variant=destructive]:focus:text-destructive',
|
||||||
|
'data-[variant=destructive]:*:[svg]:!text-destructive',
|
||||||
|
"[&_svg:not([class*='text-'])]:text-muted-foreground",
|
||||||
|
/* Background */
|
||||||
|
'focus:bg-popover-hover data-[variant=destructive]:focus:bg-destructive/10',
|
||||||
|
'dark:data-[variant=destructive]:focus:bg-destructive/20',
|
||||||
|
/* Border */
|
||||||
|
'rounded-sm',
|
||||||
|
/* Font */
|
||||||
|
'',
|
||||||
|
/* Cursor */
|
||||||
|
'cursor-default data-[disabled]:pointer-events-none data-[inset]:pl-8',
|
||||||
|
'[&_svg]:pointer-events-none',
|
||||||
|
/* Ring */
|
||||||
|
'',
|
||||||
|
/* Outline */
|
||||||
|
'outline-hidden',
|
||||||
|
/* Shadow */
|
||||||
|
'',
|
||||||
|
/* Opacity */
|
||||||
|
'data-[disabled]:opacity-50',
|
||||||
|
/* Scaling */
|
||||||
|
" [&_svg:not([class*='size-'])]:size-4",
|
||||||
|
/* Spacing */
|
||||||
|
'gap-2 px-2 py-1.5',
|
||||||
|
/* Alignment */
|
||||||
|
'relative flex items-center [&_svg]:shrink-0',
|
||||||
|
/* Miscellaneous */
|
||||||
|
'select-none',
|
||||||
|
/* ////////// */
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
@ -92,7 +154,35 @@ function DropdownMenuCheckboxItem({
|
||||||
<DropdownMenuPrimitive.CheckboxItem
|
<DropdownMenuPrimitive.CheckboxItem
|
||||||
data-slot='dropdown-menu-checkbox-item'
|
data-slot='dropdown-menu-checkbox-item'
|
||||||
className={cn(
|
className={cn(
|
||||||
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
' ',
|
||||||
|
/* Text */
|
||||||
|
'focus:text-accent-foreground text-sm',
|
||||||
|
/* Background */
|
||||||
|
'focus:bg-accent',
|
||||||
|
/* Border */
|
||||||
|
'rounded-sm',
|
||||||
|
/* Font */
|
||||||
|
'',
|
||||||
|
/* Cursor */
|
||||||
|
'cursor-default select-none data-[disabled]:pointer-events-none',
|
||||||
|
'[&_svg]:pointer-events-none',
|
||||||
|
/* Ring */
|
||||||
|
'',
|
||||||
|
/* Outline */
|
||||||
|
'outline-hidden',
|
||||||
|
/* Shadow */
|
||||||
|
'',
|
||||||
|
/* Opacity */
|
||||||
|
'data-[disabled]:opacity-50',
|
||||||
|
/* Scaling */
|
||||||
|
"[&_svg:not([class*='size-'])]:size-4",
|
||||||
|
/* Spacing */
|
||||||
|
'gap-2 py-1.5 pr-2 pl-8',
|
||||||
|
/* Alignment */
|
||||||
|
'relative flex items-center [&_svg]:shrink-0',
|
||||||
|
/* Miscellaneous */
|
||||||
|
'',
|
||||||
|
/* ////////// */
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
checked={checked}
|
checked={checked}
|
||||||
|
@ -128,7 +218,33 @@ function DropdownMenuRadioItem({
|
||||||
<DropdownMenuPrimitive.RadioItem
|
<DropdownMenuPrimitive.RadioItem
|
||||||
data-slot='dropdown-menu-radio-item'
|
data-slot='dropdown-menu-radio-item'
|
||||||
className={cn(
|
className={cn(
|
||||||
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
/* Text */
|
||||||
|
'focus:text-accent-foreground text-sm',
|
||||||
|
/* Background */
|
||||||
|
'focus:bg-accent',
|
||||||
|
/* Border */
|
||||||
|
'rounded-sm',
|
||||||
|
/* Font */
|
||||||
|
'',
|
||||||
|
/* Cursor */
|
||||||
|
'cursor-default select-none data-[disabled]:pointer-events-none [&_svg]:pointer-events-none',
|
||||||
|
/* Ring */
|
||||||
|
'',
|
||||||
|
/* Outline */
|
||||||
|
'outline-hidden',
|
||||||
|
/* Shadow */
|
||||||
|
'',
|
||||||
|
/* Opacity */
|
||||||
|
'data-[disabled]:opacity-50',
|
||||||
|
/* Scaling */
|
||||||
|
"[&_svg:not([class*='size-'])]:size-4",
|
||||||
|
/* Spacing */
|
||||||
|
'gap-2 py-1.5 pr-2 pl-8',
|
||||||
|
/* Alignment */
|
||||||
|
'relative flex items-center [&_svg]:shrink-0',
|
||||||
|
/* Miscellaneous */
|
||||||
|
'',
|
||||||
|
/* ////////// */
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
@ -211,7 +327,34 @@ function DropdownMenuSubTrigger({
|
||||||
data-slot='dropdown-menu-sub-trigger'
|
data-slot='dropdown-menu-sub-trigger'
|
||||||
data-inset={inset}
|
data-inset={inset}
|
||||||
className={cn(
|
className={cn(
|
||||||
'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8',
|
' ',
|
||||||
|
/* Text */
|
||||||
|
'text-sm focus:text-accent-foreground data-[state=open]:text-accent-foreground',
|
||||||
|
/* Background */
|
||||||
|
'focus:bg-accent data-[state=open]:bg-accent',
|
||||||
|
/* Border */
|
||||||
|
'rounded-sm',
|
||||||
|
/* Font */
|
||||||
|
'',
|
||||||
|
/* Cursor */
|
||||||
|
'cursor-default select-none',
|
||||||
|
/* Ring */
|
||||||
|
'',
|
||||||
|
/* Outline */
|
||||||
|
'outline-hidden',
|
||||||
|
/* Shadow */
|
||||||
|
'',
|
||||||
|
/* Opacity */
|
||||||
|
'',
|
||||||
|
/* Scaling */
|
||||||
|
'',
|
||||||
|
/* Spacing */
|
||||||
|
'px-2 py-1.5 data-[inset]:pl-8',
|
||||||
|
/* Alignment */
|
||||||
|
'flex items-center',
|
||||||
|
/* Miscellaneous */
|
||||||
|
'',
|
||||||
|
/* ////////// */
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
@ -230,7 +373,38 @@ function DropdownMenuSubContent({
|
||||||
<DropdownMenuPrimitive.SubContent
|
<DropdownMenuPrimitive.SubContent
|
||||||
data-slot='dropdown-menu-sub-content'
|
data-slot='dropdown-menu-sub-content'
|
||||||
className={cn(
|
className={cn(
|
||||||
'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg',
|
' ',
|
||||||
|
/* Text */
|
||||||
|
'text-popover-foreground',
|
||||||
|
/* Background */
|
||||||
|
'bg-popover',
|
||||||
|
/* Border */
|
||||||
|
'border rounded-md',
|
||||||
|
/* Font */
|
||||||
|
'',
|
||||||
|
/* Cursor */
|
||||||
|
'',
|
||||||
|
/* Ring */
|
||||||
|
'',
|
||||||
|
/* Outline */
|
||||||
|
'',
|
||||||
|
/* Shadow */
|
||||||
|
'shadow-lg',
|
||||||
|
/* Opacity */
|
||||||
|
'',
|
||||||
|
/* Scaling */
|
||||||
|
'min-w-[8rem]',
|
||||||
|
/* Spacing */
|
||||||
|
'p-1',
|
||||||
|
/* Alignment */
|
||||||
|
'z-50 origin-(--radix-dropdown-menu-content-transform-origin)',
|
||||||
|
/* Miscellaneous */
|
||||||
|
'overflow-hidden',
|
||||||
|
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0',
|
||||||
|
'data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95',
|
||||||
|
'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2',
|
||||||
|
'data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
|
||||||
|
/* ////////// */
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
|
|
@ -32,7 +32,37 @@ function HoverCardContent({
|
||||||
align={align}
|
align={align}
|
||||||
sideOffset={sideOffset}
|
sideOffset={sideOffset}
|
||||||
className={cn(
|
className={cn(
|
||||||
'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden',
|
/* Text */
|
||||||
|
'text-text',
|
||||||
|
/* Background */
|
||||||
|
'bg-popover',
|
||||||
|
/* Border */
|
||||||
|
'border rounded-md',
|
||||||
|
/* Font */
|
||||||
|
'',
|
||||||
|
/* Cursor */
|
||||||
|
'',
|
||||||
|
/* Ring */
|
||||||
|
'',
|
||||||
|
/* Outline */
|
||||||
|
'outline-hidden',
|
||||||
|
/* Shadow */
|
||||||
|
'shadow-md',
|
||||||
|
/* Opacity */
|
||||||
|
'',
|
||||||
|
/* Scaling */
|
||||||
|
'w-64',
|
||||||
|
/* Spacing */
|
||||||
|
'p-4',
|
||||||
|
/* Alignment */
|
||||||
|
'z-50',
|
||||||
|
/* Miscellanneous */
|
||||||
|
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0',
|
||||||
|
'data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95',
|
||||||
|
'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2',
|
||||||
|
'data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
|
||||||
|
'origin-(--radix-hover-card-content-transform-origin)',
|
||||||
|
/* ////////// */
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
|
|
@ -8,9 +8,32 @@ function Input({ className, type, ...props }: React.ComponentProps<'input'>) {
|
||||||
type={type}
|
type={type}
|
||||||
data-slot='input'
|
data-slot='input'
|
||||||
className={cn(
|
className={cn(
|
||||||
'file:text-destructive placeholder:text-text-muted-input selection:bg-muted-input selection:text-text dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-text-input shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-label disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
|
/* Text */
|
||||||
'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',
|
'text-text-input selection:text-text md:text-sm file:text-destructive file:text-sm placeholder:text-text-muted-input',
|
||||||
'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',
|
/* Background */
|
||||||
|
'bg-transparent selection:bg-muted-input file:bg-transparent',
|
||||||
|
/* Border */
|
||||||
|
'rounded-md border border-input focus-visible:border-ring aria-invalid:border-destructive file:border-0',
|
||||||
|
/* Font */
|
||||||
|
'file:font-label',
|
||||||
|
/* Cursor */
|
||||||
|
'disabled:pointer-events-none disabled:cursor-not-allowed',
|
||||||
|
/* Ring */
|
||||||
|
'focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40',
|
||||||
|
/* Outline */
|
||||||
|
'outline-none',
|
||||||
|
/* Shadow */
|
||||||
|
'shadow-md transition-[color,box-shadow] ',
|
||||||
|
/* Opacity */
|
||||||
|
'disabled:opacity-50 ',
|
||||||
|
/* Scaling */
|
||||||
|
'h-9 w-full min-w-0 file:h-7',
|
||||||
|
/* Spacing */
|
||||||
|
'px-3 py-1',
|
||||||
|
/* Alignment */
|
||||||
|
'flex file:inline-flex',
|
||||||
|
/* Miscellaneous */
|
||||||
|
/* ////////// */
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
|
|
@ -13,7 +13,33 @@ function Label({
|
||||||
<LabelPrimitive.Root
|
<LabelPrimitive.Root
|
||||||
data-slot='label'
|
data-slot='label'
|
||||||
className={cn(
|
className={cn(
|
||||||
'flex items-center gap-2 text-sm leading-none font-label select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',
|
/* Text */
|
||||||
|
'text-sm',
|
||||||
|
/* Background */
|
||||||
|
'',
|
||||||
|
/* Border */
|
||||||
|
'',
|
||||||
|
/* Font */
|
||||||
|
'font-label',
|
||||||
|
/* Cursor */
|
||||||
|
'group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed',
|
||||||
|
/* Ring */
|
||||||
|
'',
|
||||||
|
/* Outline */
|
||||||
|
'',
|
||||||
|
/* Shadow */
|
||||||
|
'',
|
||||||
|
/* Opacity */
|
||||||
|
'group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50',
|
||||||
|
/* Scaling */
|
||||||
|
'',
|
||||||
|
/* Spacing */
|
||||||
|
'gap-2',
|
||||||
|
/* Alignment */
|
||||||
|
'flex items-center',
|
||||||
|
/* Miscellaneous */
|
||||||
|
'select-none leading-none',
|
||||||
|
/* ////////// */
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
|
|
@ -37,7 +37,37 @@ function SelectTrigger({
|
||||||
data-slot='select-trigger'
|
data-slot='select-trigger'
|
||||||
data-size={size}
|
data-size={size}
|
||||||
className={cn(
|
className={cn(
|
||||||
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
/* Text */
|
||||||
|
'text-sm data-[placeholder]:text-muted-foreground',
|
||||||
|
"[&_svg:not([class*='text-'])]:text-muted-foreground",
|
||||||
|
/* Background */
|
||||||
|
'bg-transparent dark:bg-input/30 dark:hover:bg-input/50',
|
||||||
|
/* Border */
|
||||||
|
'border rounded-md border-input focus-visible:border-ring aria-invalid:border-destructive',
|
||||||
|
/* Font */
|
||||||
|
'',
|
||||||
|
/* Cursor */
|
||||||
|
'disabled:cursor-not-allowed [&_svg]:pointer-events-none',
|
||||||
|
/* Ring */
|
||||||
|
'focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:ring-destructive/20',
|
||||||
|
'dark:aria-invalid:ring-destructive/40',
|
||||||
|
/* Outline */
|
||||||
|
'outline-none',
|
||||||
|
/* Shadow */
|
||||||
|
'shadow-xs',
|
||||||
|
/* Opacity */
|
||||||
|
'disabled:opacity-50',
|
||||||
|
/* Scaling */
|
||||||
|
'w-fit data-[size=default]:h-9 data-[size=sm]:h-8 [&_svg]:shrink-0',
|
||||||
|
"[&_svg:not([class*='size-'])]:size-4",
|
||||||
|
/* Spacing */
|
||||||
|
'gap-2 px-3 py-2 *:data-[slot=select-value]:gap-2',
|
||||||
|
/* Alignment */
|
||||||
|
'flex items-center justify-between *:data-[slot=select-value]:flex',
|
||||||
|
'*:data-[slot=select-value]:items-center',
|
||||||
|
/* Miscellaneous */
|
||||||
|
'whitespace-nowrap transition-[color,box-shadow] *:data-[slot=select-value]:line-clamp-1',
|
||||||
|
/* ////////// */
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
@ -61,9 +91,42 @@ function SelectContent({
|
||||||
<SelectPrimitive.Content
|
<SelectPrimitive.Content
|
||||||
data-slot='select-content'
|
data-slot='select-content'
|
||||||
className={cn(
|
className={cn(
|
||||||
'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md',
|
' ',
|
||||||
|
/* Text */
|
||||||
|
'text-popover-foreground',
|
||||||
|
/* Background */
|
||||||
|
'bg-popover',
|
||||||
|
/* Border */
|
||||||
|
'border rounded-md',
|
||||||
|
/* Font */
|
||||||
|
'',
|
||||||
|
/* Cursor */
|
||||||
|
'',
|
||||||
|
/* Ring */
|
||||||
|
'',
|
||||||
|
/* Outline */
|
||||||
|
'',
|
||||||
|
/* Shadow */
|
||||||
|
'shadow-md',
|
||||||
|
/* Opacity */
|
||||||
|
'',
|
||||||
|
/* Scaling */
|
||||||
|
'max-h-(--radix-select-content-available-height) min-w-[8rem]',
|
||||||
|
/* Spacing */
|
||||||
|
'',
|
||||||
|
/* Alignment */
|
||||||
|
'relative z-50 origin-(--radix-select-content-transform-origin)',
|
||||||
|
/* Miscellaneous */
|
||||||
|
'overflow-x-hidden overflow-y-auto data-[side=top]:slide-in-from-bottom-2',
|
||||||
|
'data-[side=right]:slide-in-from-left-2 data-[side=left]:slide-in-from-right-2',
|
||||||
|
'data-[side=bottom]:slide-in-from-top-2',
|
||||||
|
'data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95',
|
||||||
|
'data-[state=open]:fade-in-0 data-[state=open]:animate-in',
|
||||||
|
'data-[state=closed]:animate-out data-[state=closed]:fade-out-0',
|
||||||
|
/* ////////// */
|
||||||
position === 'popper' &&
|
position === 'popper' &&
|
||||||
'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',
|
'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1',
|
||||||
|
'data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
position={position}
|
position={position}
|
||||||
|
@ -74,7 +137,8 @@ function SelectContent({
|
||||||
className={cn(
|
className={cn(
|
||||||
'p-1',
|
'p-1',
|
||||||
position === 'popper' &&
|
position === 'popper' &&
|
||||||
'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1',
|
'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]',
|
||||||
|
'scroll-my-1',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
@ -107,7 +171,34 @@ function SelectItem({
|
||||||
<SelectPrimitive.Item
|
<SelectPrimitive.Item
|
||||||
data-slot='select-item'
|
data-slot='select-item'
|
||||||
className={cn(
|
className={cn(
|
||||||
"focus:bg-accent focus:text-text [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
' ',
|
||||||
|
/* Text */
|
||||||
|
"text-sm focus:text-text [&_svg:not([class*='text-'])]:text-muted-foreground",
|
||||||
|
/* Background */
|
||||||
|
'focus:bg-accent',
|
||||||
|
/* Border */
|
||||||
|
'rounded-sm',
|
||||||
|
/* Font */
|
||||||
|
'',
|
||||||
|
/* Cursor */
|
||||||
|
'cursor-default select-none data-[disabled]:pointer-events-none [&_svg]:pointer-events-none',
|
||||||
|
/* Ring */
|
||||||
|
'',
|
||||||
|
/* Outline */
|
||||||
|
'outline-hidden',
|
||||||
|
/* Shadow */
|
||||||
|
'',
|
||||||
|
/* Opacity */
|
||||||
|
'data-[disabled]:opacity-50',
|
||||||
|
/* Scaling */
|
||||||
|
"w-full [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
||||||
|
/* Spacing */
|
||||||
|
'gap-2 py-1.5 pr-8 pl-2 *:[span]:last:gap-2',
|
||||||
|
/* Alignment */
|
||||||
|
'relative flex items-center *:[span]:last:flex *:[span]:last:items-center',
|
||||||
|
/* Miscellaneous */
|
||||||
|
'',
|
||||||
|
/* ////////// */
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
|
|
@ -13,7 +13,33 @@ function Switch({
|
||||||
<SwitchPrimitive.Root
|
<SwitchPrimitive.Root
|
||||||
data-slot='switch'
|
data-slot='switch'
|
||||||
className={cn(
|
className={cn(
|
||||||
'peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50',
|
/* Text */
|
||||||
|
'',
|
||||||
|
/* Background */
|
||||||
|
'data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring dark:data-[state=unchecked]:bg-input/80',
|
||||||
|
/* Border */
|
||||||
|
'border border-transparent rounded-full',
|
||||||
|
/* Font */
|
||||||
|
'',
|
||||||
|
/* Cursor */
|
||||||
|
'disabled:cursor-not-allowed',
|
||||||
|
/* Ring */
|
||||||
|
'focus-visible:ring-ring/50',
|
||||||
|
/* Outline */
|
||||||
|
'outline-none',
|
||||||
|
/* Shadow */
|
||||||
|
'shadow-xs',
|
||||||
|
/* Opacity */
|
||||||
|
'disabled:opacity-50',
|
||||||
|
/* Scaling */
|
||||||
|
'h-[1.15rem] w-8',
|
||||||
|
/* Spacing */
|
||||||
|
'',
|
||||||
|
/* Alignment */
|
||||||
|
'inline-flex shrink-0 items-center',
|
||||||
|
/* Miscellaneous */
|
||||||
|
'peer transition-all focus-visible:ring-[3px]',
|
||||||
|
/* ////////// */
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
@ -21,7 +47,35 @@ function Switch({
|
||||||
<SwitchPrimitive.Thumb
|
<SwitchPrimitive.Thumb
|
||||||
data-slot='switch-thumb'
|
data-slot='switch-thumb'
|
||||||
className={cn(
|
className={cn(
|
||||||
'bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0',
|
/* Text */
|
||||||
|
'',
|
||||||
|
/* Background */
|
||||||
|
'bg-background dark:data-[state=unchecked]:bg-foreground',
|
||||||
|
'dark:data-[state=checked]:bg-primary-foreground',
|
||||||
|
/* Border */
|
||||||
|
'rounded-full',
|
||||||
|
/* Font */
|
||||||
|
'',
|
||||||
|
/* Cursor */
|
||||||
|
'pointer-events-none',
|
||||||
|
/* Ring */
|
||||||
|
'ring-0',
|
||||||
|
/* Outline */
|
||||||
|
'',
|
||||||
|
/* Shadow */
|
||||||
|
'',
|
||||||
|
/* Opacity */
|
||||||
|
'',
|
||||||
|
/* Scaling */
|
||||||
|
'size-4',
|
||||||
|
/* Spacing */
|
||||||
|
'',
|
||||||
|
/* Alignment */
|
||||||
|
'',
|
||||||
|
/* Miscellaneous */
|
||||||
|
'block transition-transform data-[state=checked]:translate-x-[calc(100%-2px)]',
|
||||||
|
'data-[state=unchecked]:translate-x-0',
|
||||||
|
/* ////////// */
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</SwitchPrimitive.Root>
|
</SwitchPrimitive.Root>
|
||||||
|
|
|
@ -26,8 +26,34 @@ function TabsList({
|
||||||
<TabsPrimitive.List
|
<TabsPrimitive.List
|
||||||
data-slot='tabs-list'
|
data-slot='tabs-list'
|
||||||
className={cn(
|
className={cn(
|
||||||
'bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]',
|
' ',
|
||||||
className,
|
/* Text */
|
||||||
|
'text-muted-foreground',
|
||||||
|
/* Background */
|
||||||
|
'bg-muted',
|
||||||
|
/* Border */
|
||||||
|
'rounded-lg',
|
||||||
|
/* Font */
|
||||||
|
'',
|
||||||
|
/* Cursor */
|
||||||
|
'',
|
||||||
|
/* Ring */
|
||||||
|
'',
|
||||||
|
/* Outline */
|
||||||
|
'',
|
||||||
|
/* Shadow */
|
||||||
|
'',
|
||||||
|
/* Opacity */
|
||||||
|
'',
|
||||||
|
/* Scaling */
|
||||||
|
'h-9 w-fit',
|
||||||
|
/* Spacing */
|
||||||
|
'p-[3px]',
|
||||||
|
/* Alignment */
|
||||||
|
'inline-flex items-center justify-center',
|
||||||
|
/* Miscellaneous */
|
||||||
|
'',
|
||||||
|
/* ////////// */ className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
@ -42,7 +68,35 @@ function TabsTrigger({
|
||||||
<TabsPrimitive.Trigger
|
<TabsPrimitive.Trigger
|
||||||
data-slot='tabs-trigger'
|
data-slot='tabs-trigger'
|
||||||
className={cn(
|
className={cn(
|
||||||
"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
/* Text */
|
||||||
|
'text-sm dark:data-[state=active]:text-foreground text-foreground dark:text-muted-foreground',
|
||||||
|
/* Background */
|
||||||
|
'data-[state=active]:bg-background dark:data-[state=active]:bg-input/30',
|
||||||
|
/* Border */
|
||||||
|
'border rounded-md focus-visible:border-ring dark:data-[state=active]:border-input',
|
||||||
|
'border-transparent',
|
||||||
|
/* Font */
|
||||||
|
'font-medium',
|
||||||
|
/* Cursor */
|
||||||
|
'disabled:pointer-events-none [&_svg]:pointer-events-none',
|
||||||
|
/* Ring */
|
||||||
|
'focus-visible:ring-ring/50 focus-visible:ring-[3px]',
|
||||||
|
/* Outline */
|
||||||
|
'focus-visible:outline-ring focus-visible:outline-1',
|
||||||
|
/* Shadow */
|
||||||
|
'data-[state=active]:shadow-sm',
|
||||||
|
/* Opacity */
|
||||||
|
'disabled:opacity-50',
|
||||||
|
/* Scaling */
|
||||||
|
"h-[calc(100%-1px)] [&_svg:not([class*='size-'])]:size-4",
|
||||||
|
/* Spacing */
|
||||||
|
'gap-1.5 px-2 py-1 [&_svg]:shrink-0',
|
||||||
|
/* Alignment */
|
||||||
|
'inline-flex flex-1 items-center justify-center whitespace-nowrap',
|
||||||
|
'transition-[color,box-shadow]',
|
||||||
|
/* Miscellaneous */
|
||||||
|
'',
|
||||||
|
/* ////////// */
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
|
|
@ -38,7 +38,7 @@ export default function LoginForm() {
|
||||||
<Button type='submit' variant='primary'>
|
<Button type='submit' variant='primary'>
|
||||||
Login
|
Login
|
||||||
</Button>
|
</Button>
|
||||||
<Button type='submit' variant='outline'>
|
<Button type='submit' variant='outline_primary'>
|
||||||
Sign Up
|
Sign Up
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -11,7 +11,7 @@ export default function SSOLogin({
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<form
|
<form
|
||||||
className='flex flex-col items-center gap-4 w-full'
|
className='flex flex-col items-center w-full'
|
||||||
action={async () => {
|
action={async () => {
|
||||||
'use server';
|
'use server';
|
||||||
await signIn(provider);
|
await signIn(provider);
|
||||||
|
|
|
@ -18,7 +18,7 @@ export function ThemePicker() {
|
||||||
return (
|
return (
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
<Button variant='outline' size='icon'>
|
<Button variant='outline_primary' size='icon'>
|
||||||
<Sun className='h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0' />
|
<Sun className='h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0' />
|
||||||
<Moon className='absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100' />
|
<Moon className='absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100' />
|
||||||
<span className='sr-only'>Toggle theme</span>
|
<span className='sr-only'>Toggle theme</span>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue