diff --git a/resources/css/app.css b/resources/css/app.css index b1b07633b..eed87baa2 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -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); @@ -67,6 +67,7 @@ color utility to any element that depends on these defaults. */ @layer base { + *, ::after, ::before, @@ -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 { @@ -155,4 +156,4 @@ body { @apply bg-background text-foreground; } -} +} \ No newline at end of file diff --git a/resources/js/components/ui/alert.tsx b/resources/js/components/ui/alert.tsx index 884d73852..3b8ee79eb 100644 --- a/resources/js/components/ui/alert.tsx +++ b/resources/js/components/ui/alert.tsx @@ -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 & VariantProps>( - ({ className, variant, ...props }, ref) =>
, -); -Alert.displayName = 'Alert'; +function Alert({ + className, + variant, + ...props +}: React.ComponentProps<"div"> & VariantProps) { + return ( +
+ ) +} -const AlertTitle = React.forwardRef>(({ className, ...props }, ref) => ( -
-)); -AlertTitle.displayName = 'AlertTitle'; +function AlertTitle({ className, ...props }: React.ComponentProps<"div">) { + return ( +
+ ) +} -const AlertDescription = React.forwardRef>(({ className, ...props }, ref) => ( -
-)); -AlertDescription.displayName = 'AlertDescription'; +function AlertDescription({ + className, + ...props +}: React.ComponentProps<"div">) { + return ( +
+ ) +} -export { Alert, AlertDescription, AlertTitle }; +export { Alert, AlertTitle, AlertDescription } diff --git a/resources/js/components/ui/avatar.tsx b/resources/js/components/ui/avatar.tsx index 4e3c2b104..b7224f001 100644 --- a/resources/js/components/ui/avatar.tsx +++ b/resources/js/components/ui/avatar.tsx @@ -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.ComponentPropsWithoutRef>( - ({ className, ...props }, ref) => ( - - ), -); -Avatar.displayName = AvatarPrimitive.Root.displayName; +function Avatar({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} -const AvatarImage = React.forwardRef, React.ComponentPropsWithoutRef>( - ({ className, ...props }, ref) => , -); -AvatarImage.displayName = AvatarPrimitive.Image.displayName; +function AvatarImage({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} -const AvatarFallback = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, ...props }, ref) => ( +function AvatarFallback({ + className, + ...props +}: React.ComponentProps) { + return ( -)); -AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName; + ) +} -export { Avatar, AvatarFallback, AvatarImage }; +export { Avatar, AvatarImage, AvatarFallback } diff --git a/resources/js/components/ui/badge.tsx b/resources/js/components/ui/badge.tsx index 4e6c1c8f5..268ea771c 100644 --- a/resources/js/components/ui/badge.tsx +++ b/resources/js/components/ui/badge.tsx @@ -1,29 +1,46 @@ -import { cva, type VariantProps } from 'class-variance-authority'; -import * as React from 'react'; +import * as React from "react" +import { Slot } from "@radix-ui/react-slot" +import { cva, type VariantProps } from "class-variance-authority" -import { cn } from '@/lib/utils'; +import { cn } from "@/lib/utils" const badgeVariants = cva( - 'inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2', - { - variants: { - variant: { - default: 'border-transparent bg-primary text-primary-foreground hover:bg-primary/80', - secondary: 'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80', - destructive: 'border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80', - outline: 'text-foreground', - }, - }, - defaultVariants: { - variant: 'default', - }, + "inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-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 transition-[color,box-shadow] overflow-auto", + { + variants: { + variant: { + default: + "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90", + secondary: + "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90", + destructive: + "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40", + outline: + "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground", + }, }, -); + defaultVariants: { + variant: "default", + }, + } +) -export interface BadgeProps extends React.HTMLAttributes, VariantProps {} +function Badge({ + className, + variant, + asChild = false, + ...props +}: React.ComponentProps<"span"> & + VariantProps & { asChild?: boolean }) { + const Comp = asChild ? Slot : "span" -function Badge({ className, variant, ...props }: BadgeProps) { - return
; + return ( + + ) } -export { Badge, badgeVariants }; +export { Badge, badgeVariants } diff --git a/resources/js/components/ui/breadcrumb.tsx b/resources/js/components/ui/breadcrumb.tsx index 6cee5415a..eb88f3212 100644 --- a/resources/js/components/ui/breadcrumb.tsx +++ b/resources/js/components/ui/breadcrumb.tsx @@ -1,57 +1,109 @@ -import { Slot } from '@radix-ui/react-slot'; -import { ChevronRight, MoreHorizontal } from 'lucide-react'; -import * as React from 'react'; - -import { cn } from '@/lib/utils'; - -const Breadcrumb = React.forwardRef< - HTMLElement, - React.ComponentPropsWithoutRef<'nav'> & { - separator?: React.ReactNode; - } ->(({ ...props }, ref) =>