diff --git a/apps/dashboard/.vscode/settings.json b/apps/dashboard/.vscode/settings.json index 97fa2b8f5f2..d60cb6f6757 100644 --- a/apps/dashboard/.vscode/settings.json +++ b/apps/dashboard/.vscode/settings.json @@ -1,3 +1,7 @@ { - "typescript.preferences.importModuleSpecifier": "non-relative" + "typescript.preferences.importModuleSpecifier": "non-relative", + "tailwindCSS.experimental.classRegex": [ + ["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"], + ["cx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"] + ] } diff --git a/apps/dashboard/src/components/primitives/button.tsx b/apps/dashboard/src/components/primitives/button.tsx index 43a95d4e712..ea7f6ea3425 100644 --- a/apps/dashboard/src/components/primitives/button.tsx +++ b/apps/dashboard/src/components/primitives/button.tsx @@ -1,36 +1,34 @@ -import * as React from "react"; -import { Slot } from "@radix-ui/react-slot"; -import { cva, type VariantProps } from "class-variance-authority"; -import { cn } from "@/utils/ui"; +import * as React from 'react'; +import { Slot } from '@radix-ui/react-slot'; +import { cva, type VariantProps } from 'class-variance-authority'; +import { cn } from '@/utils/ui'; const buttonVariants = cva( - "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", + `relative isolate inline-flex items-center justify-center whitespace-nowrap rounded-lg text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50`, { variants: { variant: { default: - "bg-primary text-primary-foreground shadow hover:bg-primary/90", + 'bg-gradient-to-b from-primary/90 to-primary text-primary-foreground shadow-[inset_0_-4px_2px_-2px_hsl(var(--primary)),inset_0_0_0_1px_rgba(255,255,255,0.16),0_0_0_1px_hsl(var(--primary)),0px_1px_2px_0px_#0E121B3D] after:content-[""] after:absolute after:w-full after:h-full after:bg-gradient-to-b after:from-background/10 after:opacity-0 hover:after:opacity-100 after:rounded-lg after:transition-opacity after:duration-300', + novu: 'bg-gradient-to-b from-novu/90 to-novu text-novu-foreground shadow-[inset_0_-4px_2px_-2px_hsl(var(--novu)),inset_0_0_0_1px_rgba(255,255,255,0.16),0_0_0_1px_hsl(var(--novu)),0px_1px_2px_0px_#0E121B3D] after:content-[""] after:absolute after:w-full after:h-full after:bg-gradient-to-b after:from-background/10 after:opacity-0 hover:after:opacity-100 after:rounded-lg after:transition-opacity after:duration-300', destructive: - "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90", - outline: - "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground", - secondary: - "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80", - ghost: "hover:bg-accent hover:text-accent-foreground", - link: "text-primary underline-offset-4 hover:underline", + 'bg-gradient-to-b from-destructive/90 to-destructive text-destructive-foreground shadow-[inset_0_-4px_2px_-2px_hsl(var(--destructive)),inset_0_0_0_1px_rgba(255,255,255,0.16),0_0_0_1px_hsl(var(--destructive)),0px_1px_2px_0px_#0E121B3D] after:content-[""] after:absolute after:w-full after:h-full after:bg-gradient-to-b after:from-background/10 after:opacity-0 hover:after:opacity-100 after:rounded-lg after:transition-opacity after:duration-300', + outline: 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground', + ghost: 'hover:bg-accent hover:text-accent-foreground', + link: 'text-primary underline-offset-4 hover:underline', }, size: { - default: "h-9 px-4 py-2", - sm: "h-8 rounded-md px-3 text-xs", - lg: "h-10 rounded-md px-8", - icon: "h-9 w-9", + default: 'h-9 p-2.5', + sm: 'h-8 rounded-md text-xs', + lg: 'h-10 rounded-md px-8', + icon: 'h-9 w-9', }, }, defaultVariants: { - variant: "default", - size: "default", + variant: 'default', + size: 'default', }, - }, + } ); export interface ButtonProps @@ -41,16 +39,10 @@ export interface ButtonProps const Button = React.forwardRef( ({ className, variant, size, asChild = false, ...props }, ref) => { - const Comp = asChild ? Slot : "button"; - return ( - - ); - }, + const Comp = asChild ? Slot : 'button'; + return ; + } ); -Button.displayName = "Button"; +Button.displayName = 'Button'; export { Button, buttonVariants }; diff --git a/apps/dashboard/src/index.css b/apps/dashboard/src/index.css index 9adcfd4c8a2..265de2d813f 100644 --- a/apps/dashboard/src/index.css +++ b/apps/dashboard/src/index.css @@ -4,57 +4,41 @@ @layer base { :root { --background: 0 0% 100%; - --foreground: 0 0% 3.9%; + --foreground: 222 32% 8%; + --card: 0 0% 100%; - --card-foreground: 0 0% 3.9%; + --card-foreground: 222 32% 8%; + --popover: 0 0% 100%; - --popover-foreground: 0 0% 3.9%; - --primary: 0 0% 9%; - --primary-foreground: 0 0% 98%; - --secondary: 0 0% 96.1%; - --secondary-foreground: 0 0% 9%; + --popover-foreground: 222 32% 8%; + + --novu: 346 73% 50%; + --novu-foreground: 0 0% 100%; + + --primary: 222 32% 8%; + --primary-foreground: 0 0% 100%; + --muted: 0 0% 96.1%; --muted-foreground: 0 0% 45.1%; + --accent: 0 0% 96.1%; - --accent-foreground: 0 0% 9%; - --destructive: 0 84.2% 60.2%; - --destructive-foreground: 0 0% 98%; + --accent-foreground: 222 32% 8%; + + --destructive: 355 96% 60%; + --destructive-foreground: 0 0% 100%; + --border: 0 0% 89.8%; --input: 0 0% 89.8%; - --ring: 0 0% 3.9%; + --ring: 222 32% 8%; + --chart-1: 12 76% 61%; --chart-2: 173 58% 39%; --chart-3: 197 37% 24%; --chart-4: 43 74% 66%; --chart-5: 27 87% 67%; + --radius: 0.5rem; } - .dark { - --background: 0 0% 3.9%; - --foreground: 0 0% 98%; - --card: 0 0% 3.9%; - --card-foreground: 0 0% 98%; - --popover: 0 0% 3.9%; - --popover-foreground: 0 0% 98%; - --primary: 0 0% 98%; - --primary-foreground: 0 0% 9%; - --secondary: 0 0% 14.9%; - --secondary-foreground: 0 0% 98%; - --muted: 0 0% 14.9%; - --muted-foreground: 0 0% 63.9%; - --accent: 0 0% 14.9%; - --accent-foreground: 0 0% 98%; - --destructive: 0 62.8% 30.6%; - --destructive-foreground: 0 0% 98%; - --border: 0 0% 14.9%; - --input: 0 0% 14.9%; - --ring: 0 0% 83.1%; - --chart-1: 220 70% 50%; - --chart-2: 160 60% 45%; - --chart-3: 30 80% 55%; - --chart-4: 280 65% 60%; - --chart-5: 340 75% 55%; - } } @layer base { * { diff --git a/apps/dashboard/src/main.tsx b/apps/dashboard/src/main.tsx index 455ff5216e8..a2f7eadae39 100644 --- a/apps/dashboard/src/main.tsx +++ b/apps/dashboard/src/main.tsx @@ -1,27 +1,29 @@ -import { StrictMode } from "react"; -import { createRoot } from "react-dom/client"; -import { createBrowserRouter, RouterProvider } from "react-router-dom"; -import "./index.css"; -import ErrorPage from "@/components/error-page"; -import Root from "@/routes/root"; -import { Workflows } from "@/routes/workflows"; +import { StrictMode } from 'react'; +import { createRoot } from 'react-dom/client'; +import { createBrowserRouter, RouterProvider } from 'react-router-dom'; +import './index.css'; +import ErrorPage from '@/components/error-page'; +import Root from '@/routes/root'; +import { Workflows } from '@/routes/workflows'; +import { Home } from '@/routes/home'; const router = createBrowserRouter([ { - path: "/", + path: '/', element: , errorElement: , children: [ + { path: '/', element: }, { - path: "workflows", + path: 'workflows', element: , }, ], }, ]); -createRoot(document.getElementById("root")!).render( +createRoot(document.getElementById('root')!).render( - , + ); diff --git a/apps/dashboard/src/routes/home.tsx b/apps/dashboard/src/routes/home.tsx new file mode 100644 index 00000000000..0b8936dde34 --- /dev/null +++ b/apps/dashboard/src/routes/home.tsx @@ -0,0 +1,17 @@ +import { Button } from '@/components/primitives/button'; + +export const Home = () => { + return ( +
+

Home page

+
+

Buttons

+ + + + + +
+
+ ); +}; diff --git a/apps/dashboard/src/routes/root.tsx b/apps/dashboard/src/routes/root.tsx index 36b58c10bba..2aefacc8961 100644 --- a/apps/dashboard/src/routes/root.tsx +++ b/apps/dashboard/src/routes/root.tsx @@ -12,7 +12,7 @@ export default function Root() {
-
+