Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
135 changes: 68 additions & 67 deletions resources/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
--color-chart-4: var(--chart-4);
--color-chart-5: var(--chart-5);

--color-sidebar: var(--sidebar-background);
--color-sidebar: var(--sidebar);
--color-sidebar-foreground: var(--sidebar-foreground);
--color-sidebar-primary: var(--sidebar-primary);
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
Expand All @@ -67,6 +67,7 @@
color utility to any element that depends on these defaults.
*/
@layer base {

*,
::after,
::before,
Expand All @@ -77,74 +78,74 @@
}

:root {
--background: hsl(0, 0%, 100%);
--foreground: hsl(0, 0%, 3.9%);
--card: hsl(0, 0%, 100%);
--card-foreground: hsl(0, 0%, 3.9%);
--popover: hsl(0, 0%, 100%);
--popover-foreground: hsl(0, 0%, 3.9%);
--primary: hsl(0, 0%, 9%);
--primary-foreground: hsl(0, 0%, 98%);
--secondary: hsl(0, 0%, 96.1%);
--secondary-foreground: hsl(0, 0%, 9%);
--muted: hsl(0, 0%, 96.1%);
--muted-foreground: hsl(0, 0%, 45.1%);
--accent: hsl(0, 0%, 96.1%);
--accent-foreground: hsl(0, 0%, 9%);
--destructive: hsl(0, 84.2%, 60.2%);
--destructive-foreground: hsl(0, 0%, 98%);
--border: hsl(0, 0%, 92.8%);
--input: hsl(0, 0%, 89.8%);
--ring: hsl(0, 0%, 3.9%);
--chart-1: hsl(12, 76%, 61%);
--chart-2: hsl(173, 58%, 39%);
--chart-3: hsl(197, 37%, 24%);
--chart-4: hsl(43, 74%, 66%);
--chart-5: hsl(27, 87%, 67%);
--radius: 0.5rem;
--sidebar-background: hsl(0, 0%, 98%);
--sidebar-foreground: hsl(240, 5.3%, 30%);
--sidebar-primary: hsl(0, 0%, 10%);
--sidebar-primary-foreground: hsl(0, 0%, 98%);
--sidebar-accent: hsl(0, 0%, 94%);
--sidebar-accent-foreground: hsl(0, 0%, 30%);
--sidebar-border: hsl(0, 0%, 91%);
--sidebar-ring: hsl(217.2, 91.2%, 59.8%);
--background: oklch(1 0 0);
--foreground: oklch(0.145 0 0);
--card: oklch(1 0 0);
--card-foreground: oklch(0.145 0 0);
--popover: oklch(1 0 0);
--popover-foreground: oklch(0.145 0 0);
--primary: oklch(0.205 0 0);
--primary-foreground: oklch(0.985 0 0);
--secondary: oklch(0.97 0 0);
--secondary-foreground: oklch(0.205 0 0);
--muted: oklch(0.97 0 0);
--muted-foreground: oklch(0.556 0 0);
--accent: oklch(0.97 0 0);
--accent-foreground: oklch(0.205 0 0);
--destructive: oklch(0.577 0.245 27.325);
--destructive-foreground: oklch(0.577 0.245 27.325);
--border: oklch(0.922 0 0);
--input: oklch(0.922 0 0);
--ring: oklch(0.87 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);
--radius: 0.625rem;
--sidebar: oklch(0.985 0 0);
--sidebar-foreground: oklch(0.145 0 0);
--sidebar-primary: oklch(0.205 0 0);
--sidebar-primary-foreground: oklch(0.985 0 0);
--sidebar-accent: oklch(0.97 0 0);
--sidebar-accent-foreground: oklch(0.205 0 0);
--sidebar-border: oklch(0.922 0 0);
--sidebar-ring: oklch(0.87 0 0);
}

.dark {
--background: hsl(0, 0%, 3.9%);
--foreground: hsl(0, 0%, 98%);
--card: hsl(0, 0%, 3.9%);
--card-foreground: hsl(0, 0%, 98%);
--popover: hsl(0, 0%, 3.9%);
--popover-foreground: hsl(0, 0%, 98%);
--primary: hsl(0, 0%, 98%);
--primary-foreground: hsl(0, 0%, 9%);
--secondary: hsl(0, 0%, 14.9%);
--secondary-foreground: hsl(0, 0%, 98%);
--muted: hsl(0, 0%, 6.9%);
--muted-foreground: hsl(0, 0%, 63.9%);
--accent: hsl(0, 0%, 14.9%);
--accent-foreground: hsl(0, 0%, 98%);
--destructive: hsl(0, 84%, 60%);
--destructive-foreground: hsl(0, 0%, 98%);
--border: hsl(0, 0%, 14.9%);
--input: hsl(0, 0%, 14.9%);
--ring: hsl(0, 0%, 83.1%);
--chart-1: hsl(220, 70%, 50%);
--chart-2: hsl(160, 60%, 45%);
--chart-3: hsl(30, 80%, 55%);
--chart-4: hsl(280, 65%, 60%);
--chart-5: hsl(340, 75%, 55%);
--sidebar-background: hsl(0, 0%, 7%);
--sidebar-foreground: hsl(0, 0%, 80%);
--sidebar-primary: hsl(360, 100%, 100%);
--sidebar-primary-foreground: hsl(0, 0%, 100%);
--sidebar-accent: hsl(0, 0%, 15.9%);
--sidebar-accent-foreground: hsl(240, 4.8%, 95.9%);
--sidebar-border: hsl(0, 0%, 15.9%);
--sidebar-ring: hsl(217.2, 91.2%, 59.8%);
--background: oklch(0.145 0 0);
--foreground: oklch(0.985 0 0);
--card: oklch(0.145 0 0);
--card-foreground: oklch(0.985 0 0);
--popover: oklch(0.145 0 0);
--popover-foreground: oklch(0.985 0 0);
--primary: oklch(0.985 0 0);
--primary-foreground: oklch(0.205 0 0);
--secondary: oklch(0.269 0 0);
--secondary-foreground: oklch(0.985 0 0);
--muted: oklch(0.269 0 0);
--muted-foreground: oklch(0.708 0 0);
--accent: oklch(0.269 0 0);
--accent-foreground: oklch(0.985 0 0);
--destructive: oklch(0.396 0.141 25.723);
--destructive-foreground: oklch(0.637 0.237 25.331);
--border: oklch(0.269 0 0);
--input: oklch(0.269 0 0);
--ring: oklch(0.439 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);
--sidebar: oklch(0.205 0 0);
--sidebar-foreground: oklch(0.985 0 0);
--sidebar-primary: oklch(0.985 0 0);
--sidebar-primary-foreground: oklch(0.985 0 0);
--sidebar-accent: oklch(0.269 0 0);
--sidebar-accent-foreground: oklch(0.985 0 0);
--sidebar-border: oklch(0.269 0 0);
--sidebar-ring: oklch(0.439 0 0);
}

@layer base {
Expand All @@ -155,4 +156,4 @@
body {
@apply bg-background text-foreground;
}
}
}
86 changes: 58 additions & 28 deletions resources/js/components/ui/alert.tsx
Original file line number Diff line number Diff line change
@@ -1,36 +1,66 @@
import { cva, type VariantProps } from 'class-variance-authority';
import * as React from 'react';
import * as React from "react"
import { cva, type VariantProps } from "class-variance-authority"

import { cn } from '@/lib/utils';
import { cn } from "@/lib/utils"

const alertVariants = cva(
'relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground',
{
variants: {
variant: {
default: 'bg-background text-foreground',
destructive: 'border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive',
},
},
defaultVariants: {
variant: 'default',
},
"relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
{
variants: {
variant: {
default: "bg-background text-foreground",
destructive:
"text-destructive-foreground [&>svg]:text-current *:data-[slot=alert-description]:text-destructive-foreground/80",
},
},
);
defaultVariants: {
variant: "default",
},
}
)

const Alert = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>>(
({ className, variant, ...props }, ref) => <div ref={ref} role="alert" className={cn(alertVariants({ variant }), className)} {...props} />,
);
Alert.displayName = 'Alert';
function Alert({
className,
variant,
...props
}: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>) {
return (
<div
data-slot="alert"
role="alert"
className={cn(alertVariants({ variant }), className)}
{...props}
/>
)
}

const AlertTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(({ className, ...props }, ref) => (
<h5 ref={ref} className={cn('mb-1 font-medium leading-none tracking-tight', className)} {...props} />
));
AlertTitle.displayName = 'AlertTitle';
function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
return (
<div
data-slot="alert-title"
className={cn(
"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
className
)}
{...props}
/>
)
}

const AlertDescription = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(({ className, ...props }, ref) => (
<div ref={ref} className={cn('text-sm [&_p]:leading-relaxed', className)} {...props} />
));
AlertDescription.displayName = 'AlertDescription';
function AlertDescription({
className,
...props
}: React.ComponentProps<"div">) {
return (
<div
data-slot="alert-description"
className={cn(
"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
className
)}
{...props}
/>
)
}

export { Alert, AlertDescription, AlertTitle };
export { Alert, AlertTitle, AlertDescription }
67 changes: 44 additions & 23 deletions resources/js/components/ui/avatar.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,51 @@
import * as AvatarPrimitive from '@radix-ui/react-avatar';
import * as React from 'react';
import * as React from "react"
import * as AvatarPrimitive from "@radix-ui/react-avatar"

import { cn } from '@/lib/utils';
import { cn } from "@/lib/utils"

const Avatar = React.forwardRef<React.ElementRef<typeof AvatarPrimitive.Root>, React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>>(
({ className, ...props }, ref) => (
<AvatarPrimitive.Root ref={ref} className={cn('relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full', className)} {...props} />
),
);
Avatar.displayName = AvatarPrimitive.Root.displayName;
function Avatar({
className,
...props
}: React.ComponentProps<typeof AvatarPrimitive.Root>) {
return (
<AvatarPrimitive.Root
data-slot="avatar"
className={cn(
"relative flex size-8 shrink-0 overflow-hidden rounded-full",
className
)}
{...props}
/>
)
}

const AvatarImage = React.forwardRef<React.ElementRef<typeof AvatarPrimitive.Image>, React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>>(
({ className, ...props }, ref) => <AvatarPrimitive.Image ref={ref} className={cn('aspect-square h-full w-full', className)} {...props} />,
);
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
function AvatarImage({
className,
...props
}: React.ComponentProps<typeof AvatarPrimitive.Image>) {
return (
<AvatarPrimitive.Image
data-slot="avatar-image"
className={cn("aspect-square size-full", className)}
{...props}
/>
)
}

const AvatarFallback = React.forwardRef<
React.ElementRef<typeof AvatarPrimitive.Fallback>,
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
>(({ className, ...props }, ref) => (
function AvatarFallback({
className,
...props
}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {
return (
<AvatarPrimitive.Fallback
ref={ref}
className={cn('flex h-full w-full items-center justify-center rounded-full bg-sidebar-primary text-sidebar-primary-foreground', className)}
{...props}
data-slot="avatar-fallback"
className={cn(
"bg-muted flex size-full items-center justify-center rounded-full",
className
)}
{...props}
/>
));
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
)
}

export { Avatar, AvatarFallback, AvatarImage };
export { Avatar, AvatarImage, AvatarFallback }
Loading