diff --git a/src/components/default/auth/buttons/client/index.tsx b/src/components/default/auth/buttons/client/index.tsx index a04ec76..2adf938 100644 --- a/src/components/default/auth/buttons/client/index.tsx +++ b/src/components/default/auth/buttons/client/index.tsx @@ -1,3 +1,3 @@ -export { SignInWithApple } from './sign-in-with-apple'; -export { SignInWithMicrosoft } from './sign-in-with-microsoft'; +export { SignInWithApple, type SignInWithAppleProps } from './sign-in-with-apple'; +export { SignInWithMicrosoft, type SignInWithMicrosoftProps } from './sign-in-with-microsoft'; export { SignInLinkButton } from './sign-in-link'; diff --git a/src/components/default/auth/buttons/client/sign-in-link.tsx b/src/components/default/auth/buttons/client/sign-in-link.tsx index fc7b7d3..0531156 100644 --- a/src/components/default/auth/buttons/client/sign-in-link.tsx +++ b/src/components/default/auth/buttons/client/sign-in-link.tsx @@ -1,12 +1,11 @@ 'use client'; import Link from 'next/link'; -import { Button, type buttonVariants } from '@/components/ui'; +import { Button } from '@/components/ui'; import { type ComponentProps } from 'react'; -import { type VariantProps } from 'class-variance-authority'; -type SignInProps = ComponentProps<'button'> & VariantProps; +type SignInLinkButtonProps = Omit, 'asChild'>; -export const SignInLinkButton = (props: SignInProps) => { +export const SignInLinkButton = (props: SignInLinkButtonProps) => { return ( ); @@ -47,11 +58,9 @@ const ThemeToggle = ({ size = 1, ...props }: ThemeToggleProps) => { return ( ); }; diff --git a/src/lib/hooks/context/use-tv-mode.tsx b/src/lib/hooks/context/use-tv-mode.tsx index dce7512..b4acd2b 100644 --- a/src/lib/hooks/context/use-tv-mode.tsx +++ b/src/lib/hooks/context/use-tv-mode.tsx @@ -2,9 +2,9 @@ import Image from 'next/image'; import React, { createContext, useContext, useState } from 'react'; import type { ReactNode } from 'react'; -import { Button, type buttonVariants } from '@/components/ui'; +import { Button } from '@/components/ui'; import { type ComponentProps } from 'react'; -import { type VariantProps } from 'class-variance-authority'; +import { cn } from '@/lib/utils'; type TVModeContextProps = { tvMode: boolean; @@ -12,11 +12,9 @@ type TVModeContextProps = { }; type TVToggleProps = { - className?: ComponentProps<'button'>['className']; - buttonSize?: VariantProps['size']; - buttonVariant?: VariantProps['variant']; - imageWidth?: number; - imageHeight?: number; + buttonClassName?: ComponentProps['className']; + buttonProps?: Omit, 'className'>; + size: number; }; const TVModeContext = createContext(undefined); @@ -42,33 +40,33 @@ const useTVMode = () => { }; const TVToggle = ({ - className = 'my-auto cursor-pointer', - buttonSize = 'default', - buttonVariant = 'link', - imageWidth = 25, - imageHeight = 25, + buttonClassName, + buttonProps = { + variant: 'outline', + size: 'default', + }, + size = 25, }: TVToggleProps) => { const { tvMode, toggleTVMode } = useTVMode(); return ( diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 1ee4273..3303be9 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -16,5 +16,5 @@ export const ccn = ({ on: string; off: string; }) => { - return className + ' ' + (context ? on : off); + return twMerge(className, context ? on : off); }; diff --git a/src/styles/globals.css b/src/styles/globals.css index d7445f0..b72aecb 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -9,10 +9,6 @@ } @theme inline { - --radius-sm: calc(var(--radius) - 4px); - --radius-md: calc(var(--radius) - 2px); - --radius-lg: var(--radius); - --radius-xl: calc(var(--radius) + 4px); --color-background: var(--background); --color-foreground: var(--foreground); --color-card: var(--card); @@ -28,6 +24,7 @@ --color-accent: var(--accent); --color-accent-foreground: var(--accent-foreground); --color-destructive: var(--destructive); + --color-destructive-foreground: var(--destructive-foreground); --color-border: var(--border); --color-input: var(--input); --color-ring: var(--ring); @@ -44,102 +41,120 @@ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); --color-sidebar-border: var(--sidebar-border); --color-sidebar-ring: var(--sidebar-ring); + + --font-sans: var(--font-sans); + --font-mono: var(--font-mono); + --font-serif: var(--font-serif); + + --radius-sm: calc(var(--radius) - 4px); + --radius-md: calc(var(--radius) - 2px); + --radius-lg: var(--radius); + --radius-xl: calc(var(--radius) + 4px); + + --shadow-2xs: var(--shadow-2xs); + --shadow-xs: var(--shadow-xs); + --shadow-sm: var(--shadow-sm); + --shadow: var(--shadow); + --shadow-md: var(--shadow-md); + --shadow-lg: var(--shadow-lg); + --shadow-xl: var(--shadow-xl); + --shadow-2xl: var(--shadow-2xl); } :root { - --background: oklch(0.9785 0.0045 314.8050); - --foreground: oklch(0.3710 0.0333 301.6287); - --card: oklch(0.9940 0 0); - --card-foreground: oklch(0.3710 0.0333 301.6287); - --popover: oklch(0.9940 0 0); - --popover-foreground: oklch(0.3710 0.0333 301.6287); - --primary: oklch(0.4868 0.1488 286.5771); - --primary-foreground: oklch(0.9785 0.0045 314.8050); - --secondary: oklch(0.9139 0.0448 291.0467); - --secondary-foreground: oklch(0.3008 0.0773 288.1551); - --muted: oklch(0.8930 0.0149 312.2335); - --muted-foreground: oklch(0.5361 0.0391 305.8579); - --accent: oklch(0.8514 0.0535 342.1042); - --accent-foreground: oklch(0.3328 0.0528 311.4628); - --destructive: oklch(0.6984 0.1170 47.0382); - --destructive-foreground: oklch(0.9785 0.0045 314.8050); - --border: oklch(0.8488 0.0244 313.1102); - --input: oklch(0.9352 0.0136 314.7562); - --ring: oklch(0.4868 0.1488 286.5771); - --chart-1: oklch(0.4868 0.1488 286.5771); - --chart-2: oklch(0.8514 0.0535 342.1042); - --chart-3: oklch(0.7388 0.0664 194.5709); - --chart-4: oklch(0.9197 0.1140 104.6226); - --chart-5: oklch(0.7409 0.0895 280.3986); - --sidebar: oklch(0.9569 0.0090 314.7812); - --sidebar-foreground: oklch(0.3710 0.0333 301.6287); - --sidebar-primary: oklch(0.4868 0.1488 286.5771); - --sidebar-primary-foreground: oklch(0.9785 0.0045 314.8050); - --sidebar-accent: oklch(0.8514 0.0535 342.1042); - --sidebar-accent-foreground: oklch(0.3328 0.0528 311.4628); - --sidebar-border: oklch(0.8759 0.0218 316.4501); - --sidebar-ring: oklch(0.4868 0.1488 286.5771); + --background: oklch(0.9227 0.0011 17.1793); + --foreground: oklch(0.2840 0.0220 262.4967); + --card: oklch(0.9699 0.0013 106.4238); + --card-foreground: oklch(0.2840 0.0220 262.4967); + --popover: oklch(0.9699 0.0013 106.4238); + --popover-foreground: oklch(0.2840 0.0220 262.4967); + --primary: oklch(0.6378 0.1247 281.2150); + --primary-foreground: oklch(1.0000 0 0); + --secondary: oklch(0.8682 0.0026 48.7143); + --secondary-foreground: oklch(0.4507 0.0152 255.5845); + --muted: oklch(0.9227 0.0011 17.1793); + --muted-foreground: oklch(0.5551 0.0147 266.6154); + --accent: oklch(0.9409 0.0164 322.6966); + --accent-foreground: oklch(0.3774 0.0189 260.6754); + --destructive: oklch(0.6322 0.1310 21.4751); + --destructive-foreground: oklch(1.0000 0 0); + --border: oklch(0.8682 0.0026 48.7143); + --input: oklch(0.8682 0.0026 48.7143); + --ring: oklch(0.6378 0.1247 281.2150); + --chart-1: oklch(0.6378 0.1247 281.2150); + --chart-2: oklch(0.5608 0.1433 283.1275); + --chart-3: oklch(0.5008 0.1358 283.9499); + --chart-4: oklch(0.4372 0.1108 283.4322); + --chart-5: oklch(0.3928 0.0817 282.8932); + --sidebar: oklch(0.8682 0.0026 48.7143); + --sidebar-foreground: oklch(0.2840 0.0220 262.4967); + --sidebar-primary: oklch(0.6378 0.1247 281.2150); + --sidebar-primary-foreground: oklch(1.0000 0 0); + --sidebar-accent: oklch(0.9409 0.0164 322.6966); + --sidebar-accent-foreground: oklch(0.3774 0.0189 260.6754); + --sidebar-border: oklch(0.8682 0.0026 48.7143); + --sidebar-ring: oklch(0.6378 0.1247 281.2150); --font-sans: Inter, sans-serif; - --font-serif: "Lora", Georgia, serif; - --font-mono: "Fira Code", "Courier New", monospace; - --radius: 0.5rem; - --shadow-2xs: 1px 2px 5px 1px hsl(0 0% 10.1961% / 0.03); - --shadow-xs: 1px 2px 5px 1px hsl(0 0% 10.1961% / 0.03); - --shadow-sm: 1px 2px 5px 1px hsl(0 0% 10.1961% / 0.06), 1px 1px 2px 0px hsl(0 0% 10.1961% / 0.06); - --shadow: 1px 2px 5px 1px hsl(0 0% 10.1961% / 0.06), 1px 1px 2px 0px hsl(0 0% 10.1961% / 0.06); - --shadow-md: 1px 2px 5px 1px hsl(0 0% 10.1961% / 0.06), 1px 2px 4px 0px hsl(0 0% 10.1961% / 0.06); - --shadow-lg: 1px 2px 5px 1px hsl(0 0% 10.1961% / 0.06), 1px 4px 6px 0px hsl(0 0% 10.1961% / 0.06); - --shadow-xl: 1px 2px 5px 1px hsl(0 0% 10.1961% / 0.06), 1px 8px 10px 0px hsl(0 0% 10.1961% / 0.06); - --shadow-2xl: 1px 2px 5px 1px hsl(0 0% 10.1961% / 0.15); + --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; + --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + --radius: 1.0rem; + --shadow-2xs: 2px 2px 10px 4px hsl(240 1.9608% 60% / 0.09); + --shadow-xs: 2px 2px 10px 4px hsl(240 1.9608% 60% / 0.09); + --shadow-sm: 2px 2px 10px 4px hsl(240 1.9608% 60% / 0.18), 2px 1px 2px 3px hsl(240 1.9608% 60% / 0.18); + --shadow: 2px 2px 10px 4px hsl(240 1.9608% 60% / 0.18), 2px 1px 2px 3px hsl(240 1.9608% 60% / 0.18); + --shadow-md: 2px 2px 10px 4px hsl(240 1.9608% 60% / 0.18), 2px 2px 4px 3px hsl(240 1.9608% 60% / 0.18); + --shadow-lg: 2px 2px 10px 4px hsl(240 1.9608% 60% / 0.18), 2px 4px 6px 3px hsl(240 1.9608% 60% / 0.18); + --shadow-xl: 2px 2px 10px 4px hsl(240 1.9608% 60% / 0.18), 2px 8px 10px 3px hsl(240 1.9608% 60% / 0.18); + --shadow-2xl: 2px 2px 10px 4px hsl(240 1.9608% 60% / 0.45); --tracking-normal: 0em; --spacing: 0.25rem; } .dark { - --background: oklch(0.2213 0.0228 309.2819); - --foreground: oklch(0.9100 0.0260 308.1435); - --card: oklch(0.2671 0.0372 295.2445); - --card-foreground: oklch(0.9100 0.0260 308.1435); - --popover: oklch(0.2671 0.0372 295.2445); - --popover-foreground: oklch(0.9100 0.0260 308.1435); - --primary: oklch(0.6405 0.1338 286.4998); - --primary-foreground: oklch(0.2213 0.0228 309.2819); - --secondary: oklch(0.4071 0.0776 288.3025); - --secondary-foreground: oklch(0.9100 0.0260 308.1435); - --muted: oklch(0.2630 0.0340 310.8818); - --muted-foreground: oklch(0.7026 0.0304 313.2720); - --accent: oklch(0.3328 0.0528 311.4628); - --accent-foreground: oklch(0.8076 0.0881 341.1289); - --destructive: oklch(0.7501 0.1053 47.2117); - --destructive-foreground: oklch(0.2213 0.0228 309.2819); - --border: oklch(0.3139 0.0379 309.3053); - --input: oklch(0.2913 0.0360 305.8978); - --ring: oklch(0.6405 0.1338 286.4998); - --chart-1: oklch(0.6405 0.1338 286.4998); - --chart-2: oklch(0.8076 0.0881 341.1289); - --chart-3: oklch(0.7388 0.0664 194.5709); - --chart-4: oklch(0.9197 0.1140 104.6226); - --chart-5: oklch(0.4868 0.1488 286.5771); - --sidebar: oklch(0.2039 0.0232 309.1750); - --sidebar-foreground: oklch(0.9100 0.0260 308.1435); - --sidebar-primary: oklch(0.6405 0.1338 286.4998); - --sidebar-primary-foreground: oklch(0.2213 0.0228 309.2819); - --sidebar-accent: oklch(0.3328 0.0528 311.4628); - --sidebar-accent-foreground: oklch(0.8076 0.0881 341.1289); - --sidebar-border: oklch(0.2913 0.0360 305.8978); - --sidebar-ring: oklch(0.6405 0.1338 286.4998); + --background: oklch(0.2236 0.0049 67.5717); + --foreground: oklch(0.9301 0.0075 260.7315); + --card: oklch(0.2793 0.0057 56.1503); + --card-foreground: oklch(0.9301 0.0075 260.7315); + --popover: oklch(0.2793 0.0057 56.1503); + --popover-foreground: oklch(0.9301 0.0075 260.7315); + --primary: oklch(0.7223 0.0946 279.6746); + --primary-foreground: oklch(0.2236 0.0049 67.5717); + --secondary: oklch(0.3352 0.0055 56.2080); + --secondary-foreground: oklch(0.8726 0.0059 264.5296); + --muted: oklch(0.2793 0.0057 56.1503); + --muted-foreground: oklch(0.7176 0.0111 261.7826); + --accent: oklch(0.3889 0.0053 56.2463); + --accent-foreground: oklch(0.8726 0.0059 264.5296); + --destructive: oklch(0.6322 0.1310 21.4751); + --destructive-foreground: oklch(0.2236 0.0049 67.5717); + --border: oklch(0.3352 0.0055 56.2080); + --input: oklch(0.3352 0.0055 56.2080); + --ring: oklch(0.7223 0.0946 279.6746); + --chart-1: oklch(0.7223 0.0946 279.6746); + --chart-2: oklch(0.6378 0.1247 281.2150); + --chart-3: oklch(0.5608 0.1433 283.1275); + --chart-4: oklch(0.5008 0.1358 283.9499); + --chart-5: oklch(0.4372 0.1108 283.4322); + --sidebar: oklch(0.3352 0.0055 56.2080); + --sidebar-foreground: oklch(0.9301 0.0075 260.7315); + --sidebar-primary: oklch(0.7223 0.0946 279.6746); + --sidebar-primary-foreground: oklch(0.2236 0.0049 67.5717); + --sidebar-accent: oklch(0.3889 0.0053 56.2463); + --sidebar-accent-foreground: oklch(0.8726 0.0059 264.5296); + --sidebar-border: oklch(0.3352 0.0055 56.2080); + --sidebar-ring: oklch(0.7223 0.0946 279.6746); --font-sans: Inter, sans-serif; - --font-serif: "Lora", Georgia, serif; - --font-mono: "Fira Code", "Courier New", monospace; - --radius: 0.5rem; - --shadow-2xs: 1px 2px 5px 1px hsl(0 0% 10.1961% / 0.03); - --shadow-xs: 1px 2px 5px 1px hsl(0 0% 10.1961% / 0.03); - --shadow-sm: 1px 2px 5px 1px hsl(0 0% 10.1961% / 0.06), 1px 1px 2px 0px hsl(0 0% 10.1961% / 0.06); - --shadow: 1px 2px 5px 1px hsl(0 0% 10.1961% / 0.06), 1px 1px 2px 0px hsl(0 0% 10.1961% / 0.06); - --shadow-md: 1px 2px 5px 1px hsl(0 0% 10.1961% / 0.06), 1px 2px 4px 0px hsl(0 0% 10.1961% / 0.06); - --shadow-lg: 1px 2px 5px 1px hsl(0 0% 10.1961% / 0.06), 1px 4px 6px 0px hsl(0 0% 10.1961% / 0.06); - --shadow-xl: 1px 2px 5px 1px hsl(0 0% 10.1961% / 0.06), 1px 8px 10px 0px hsl(0 0% 10.1961% / 0.06); - --shadow-2xl: 1px 2px 5px 1px hsl(0 0% 10.1961% / 0.15); + --font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; + --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + --radius: 1.0rem; + --shadow-2xs: 2px 2px 10px 4px hsl(0 0% 10.1961% / 0.09); + --shadow-xs: 2px 2px 10px 4px hsl(0 0% 10.1961% / 0.09); + --shadow-sm: 2px 2px 10px 4px hsl(0 0% 10.1961% / 0.18), 2px 1px 2px 3px hsl(0 0% 10.1961% / 0.18); + --shadow: 2px 2px 10px 4px hsl(0 0% 10.1961% / 0.18), 2px 1px 2px 3px hsl(0 0% 10.1961% / 0.18); + --shadow-md: 2px 2px 10px 4px hsl(0 0% 10.1961% / 0.18), 2px 2px 4px 3px hsl(0 0% 10.1961% / 0.18); + --shadow-lg: 2px 2px 10px 4px hsl(0 0% 10.1961% / 0.18), 2px 4px 6px 3px hsl(0 0% 10.1961% / 0.18); + --shadow-xl: 2px 2px 10px 4px hsl(0 0% 10.1961% / 0.18), 2px 8px 10px 3px hsl(0 0% 10.1961% / 0.18); + --shadow-2xl: 2px 2px 10px 4px hsl(0 0% 10.1961% / 0.45); } @layer base {