dan5py commited on
Commit
4ac90cc
Β·
unverified Β·
1 Parent(s): 3f29b72

feat: migrate to Vite5

Browse files
.eslintrc.cjs DELETED
@@ -1,14 +0,0 @@
1
- module.exports = {
2
- env: { browser: true, es2020: true },
3
- extends: [
4
- 'eslint:recommended',
5
- 'plugin:@typescript-eslint/recommended',
6
- 'plugin:react-hooks/recommended',
7
- ],
8
- parser: '@typescript-eslint/parser',
9
- parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
10
- plugins: ['react-refresh'],
11
- rules: {
12
- 'react-refresh/only-export-components': 'warn',
13
- },
14
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
README.md CHANGED
@@ -73,10 +73,10 @@ react-vite-ui/
73
  β”‚ β”œβ”€β”€ lib/ # Utility functions
74
  β”‚ β”œβ”€β”€ App.tsx # Application entry point
75
  β”‚ └── index.tsx # Main rendering file
76
- β”œβ”€β”€ .eslintrc.json # ESLint configuration
77
  β”œβ”€β”€ index.html # HTML entry point
78
  β”œβ”€β”€ postcss.config.js # PostCSS configuration
79
- β”œβ”€β”€ tailwind.config.js # Tailwind CSS configuration
80
  β”œβ”€β”€ tsconfig.json # TypeScript configuration
81
  └── vite.config.ts # Vite configuration
82
  ```
 
73
  β”‚ β”œβ”€β”€ lib/ # Utility functions
74
  β”‚ β”œβ”€β”€ App.tsx # Application entry point
75
  β”‚ └── index.tsx # Main rendering file
76
+ β”œβ”€β”€ eslint.config.js # ESLint configuration
77
  β”œβ”€β”€ index.html # HTML entry point
78
  β”œβ”€β”€ postcss.config.js # PostCSS configuration
79
+ β”œβ”€β”€ tailwind.config.ts # Tailwind CSS configuration
80
  β”œβ”€β”€ tsconfig.json # TypeScript configuration
81
  └── vite.config.ts # Vite configuration
82
  ```
components.json CHANGED
@@ -2,14 +2,20 @@
2
  "$schema": "https://ui.shadcn.com/schema.json",
3
  "style": "default",
4
  "rsc": false,
 
5
  "tailwind": {
6
- "config": "tailwind.config.js",
7
  "css": "src/styles/globals.css",
8
- "baseColor": "slate",
9
- "cssVariables": true
 
10
  },
11
  "aliases": {
12
  "components": "@/components",
13
- "utils": "@/lib/utils"
14
- }
15
- }
 
 
 
 
 
2
  "$schema": "https://ui.shadcn.com/schema.json",
3
  "style": "default",
4
  "rsc": false,
5
+ "tsx": true,
6
  "tailwind": {
7
+ "config": "tailwind.config.ts",
8
  "css": "src/styles/globals.css",
9
+ "baseColor": "zinc",
10
+ "cssVariables": true,
11
+ "prefix": ""
12
  },
13
  "aliases": {
14
  "components": "@/components",
15
+ "utils": "@/lib/utils",
16
+ "ui": "@/components/ui",
17
+ "lib": "@/lib",
18
+ "hooks": "@/hooks"
19
+ },
20
+ "iconLibrary": "lucide"
21
+ }
eslint.config.js ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import js from "@eslint/js";
2
+ import globals from "globals";
3
+ import reactHooks from "eslint-plugin-react-hooks";
4
+ import reactRefresh from "eslint-plugin-react-refresh";
5
+ import tseslint from "typescript-eslint";
6
+
7
+ export default tseslint.config(
8
+ { ignores: ["dist"] },
9
+ {
10
+ extends: [js.configs.recommended, ...tseslint.configs.recommended],
11
+ files: ["**/*.{ts,tsx}"],
12
+ languageOptions: {
13
+ ecmaVersion: 2020,
14
+ globals: globals.browser,
15
+ },
16
+ plugins: {
17
+ "react-hooks": reactHooks,
18
+ "react-refresh": reactRefresh,
19
+ },
20
+ rules: {
21
+ ...reactHooks.configs.recommended.rules,
22
+ },
23
+ }
24
+ );
package.json CHANGED
@@ -1,39 +1,39 @@
1
  {
2
  "name": "react-vite-ui",
3
  "private": true,
4
- "version": "0.2.1",
5
  "type": "module",
6
  "scripts": {
7
  "dev": "vite",
8
  "build": "tsc && vite build",
9
- "lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
10
  "preview": "vite preview"
11
  },
12
  "dependencies": {
13
- "@radix-ui/react-slot": "^1.0.2",
14
- "class-variance-authority": "^0.6.0",
15
- "clsx": "^1.2.1",
16
- "lucide-react": "^0.244.0",
17
- "react": "^18.2.0",
18
- "react-dom": "^18.2.0",
19
- "tailwindcss-animate": "^1.0.6"
20
  },
21
  "devDependencies": {
22
  "@types/node": "^20.8.0",
23
- "@types/react": "^18.0.37",
24
- "@types/react-dom": "^18.0.11",
25
- "@typescript-eslint/eslint-plugin": "^5.59.0",
26
- "@typescript-eslint/parser": "^5.59.0",
27
- "@vitejs/plugin-react": "^4.0.0",
28
- "autoprefixer": "^10.4.14",
29
- "eslint": "^8.38.0",
30
- "eslint-plugin-react-hooks": "^4.6.0",
31
- "eslint-plugin-react-refresh": "^0.3.4",
32
- "postcss": "^8.4.24",
33
- "prettier-plugin-tailwindcss": "0.2.5",
34
- "tailwind-merge": "^1.12.0",
35
- "tailwindcss": "^3.3.2",
36
- "typescript": "^5.0.2",
37
- "vite": "^4.3.9"
38
  }
39
  }
 
1
  {
2
  "name": "react-vite-ui",
3
  "private": true,
4
+ "version": "0.3.0",
5
  "type": "module",
6
  "scripts": {
7
  "dev": "vite",
8
  "build": "tsc && vite build",
9
+ "lint": "eslint .",
10
  "preview": "vite preview"
11
  },
12
  "dependencies": {
13
+ "@radix-ui/react-slot": "^1.1.0",
14
+ "class-variance-authority": "^0.7.0",
15
+ "clsx": "^2.1.1",
16
+ "lucide-react": "^0.455.0",
17
+ "react": "^18.3.1",
18
+ "react-dom": "^18.3.1",
19
+ "tailwindcss-animate": "^1.0.7"
20
  },
21
  "devDependencies": {
22
  "@types/node": "^20.8.0",
23
+ "@types/react": "^18.3.12",
24
+ "@types/react-dom": "^18.3.1",
25
+ "@vitejs/plugin-react": "^4.3.3",
26
+ "eslint": "^9.14.0",
27
+ "@eslint/js": "^9.14.0",
28
+ "eslint-plugin-react-hooks": "^5.0.0",
29
+ "eslint-plugin-react-refresh": "^0.4.14",
30
+ "globals": "^15.12.0",
31
+ "autoprefixer": "^10.4.20",
32
+ "postcss": "^8.4.47",
33
+ "tailwindcss": "^3.4.14",
34
+ "tailwind-merge": "^2.5.4",
35
+ "typescript": "^5.6.3",
36
+ "typescript-eslint": "^8.13.0",
37
+ "vite": "^5.4.10"
38
  }
39
  }
src/App.tsx CHANGED
@@ -1,6 +1,6 @@
1
- import CountBtn from '@/components/CountBtn';
2
- import ReactSVG from '@/assets/react.svg';
3
- import { Badge } from '@/components/ui/badge';
4
 
5
  function App() {
6
  return (
@@ -9,9 +9,13 @@ function App() {
9
  <div className="inline-flex items-center gap-x-4">
10
  <img src={ReactSVG} alt="React Logo" className="w-32" />
11
  <span className="text-6xl">+</span>
12
- <img src={'/vite.svg'} alt="Vite Logo" className="w-32" />
13
  </div>
14
- <a href="https://ui.shadcn.com" rel="noopener noreferrer nofollow" target="_blank">
 
 
 
 
15
  <Badge variant="outline">shadcn/ui</Badge>
16
  </a>
17
  <CountBtn />
 
1
+ import CountBtn from "@/components/count-btn";
2
+ import ReactSVG from "@/assets/react.svg";
3
+ import { Badge } from "@/components/ui/badge";
4
 
5
  function App() {
6
  return (
 
9
  <div className="inline-flex items-center gap-x-4">
10
  <img src={ReactSVG} alt="React Logo" className="w-32" />
11
  <span className="text-6xl">+</span>
12
+ <img src={"/vite.svg"} alt="Vite Logo" className="w-32" />
13
  </div>
14
+ <a
15
+ href="https://ui.shadcn.com"
16
+ rel="noopener noreferrer nofollow"
17
+ target="_blank"
18
+ >
19
  <Badge variant="outline">shadcn/ui</Badge>
20
  </a>
21
  <CountBtn />
src/components/{CountBtn.tsx β†’ count-btn.tsx} RENAMED
@@ -1,16 +1,18 @@
1
- import { useState } from 'react';
2
- import { cn } from '@/lib/utils';
3
- import { Button } from '@/components/ui/button';
4
 
5
- interface Props {
6
  className?: string;
7
  }
8
 
9
- export default function CountBtn({ className }: Props) {
10
  const [count, setCount] = useState(0);
11
 
12
  return (
13
- <Button onClick={() => setCount((count) => count + 1)} className={cn('', className)}>
 
 
 
14
  Count is: {count}
15
  </Button>
16
  );
 
1
+ import { useState } from "react";
2
+ import { Button } from "@/components/ui/button";
 
3
 
4
+ interface CountBtnProps {
5
  className?: string;
6
  }
7
 
8
+ export default function CountBtn({ className }: CountBtnProps) {
9
  const [count, setCount] = useState(0);
10
 
11
  return (
12
+ <Button
13
+ onClick={() => setCount((count) => count + 1)}
14
+ className={className}
15
+ >
16
  Count is: {count}
17
  </Button>
18
  );
src/components/ui/badge.tsx CHANGED
@@ -1,7 +1,7 @@
1
- import * as React from "react"
2
- import { cva, type VariantProps } from "class-variance-authority"
3
 
4
- import { cn } from "@/lib/utils"
5
 
6
  const badgeVariants = cva(
7
  "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
@@ -21,7 +21,7 @@ const badgeVariants = cva(
21
  variant: "default",
22
  },
23
  }
24
- )
25
 
26
  export interface BadgeProps
27
  extends React.HTMLAttributes<HTMLDivElement>,
@@ -30,7 +30,7 @@ export interface BadgeProps
30
  function Badge({ className, variant, ...props }: BadgeProps) {
31
  return (
32
  <div className={cn(badgeVariants({ variant }), className)} {...props} />
33
- )
34
  }
35
 
36
- export { Badge, badgeVariants }
 
1
+ import * as React from "react";
2
+ import { cva, type VariantProps } from "class-variance-authority";
3
 
4
+ import { cn } from "@/lib/utils";
5
 
6
  const badgeVariants = cva(
7
  "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
 
21
  variant: "default",
22
  },
23
  }
24
+ );
25
 
26
  export interface BadgeProps
27
  extends React.HTMLAttributes<HTMLDivElement>,
 
30
  function Badge({ className, variant, ...props }: BadgeProps) {
31
  return (
32
  <div className={cn(badgeVariants({ variant }), className)} {...props} />
33
+ );
34
  }
35
 
36
+ export { Badge, badgeVariants };
src/components/ui/button.tsx CHANGED
@@ -1,11 +1,11 @@
1
- import * as React from "react"
2
- import { Slot } from "@radix-ui/react-slot"
3
- import { cva, type VariantProps } from "class-variance-authority"
4
 
5
- import { cn } from "@/lib/utils"
6
 
7
  const buttonVariants = cva(
8
- "inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
9
  {
10
  variants: {
11
  variant: {
@@ -31,26 +31,26 @@ const buttonVariants = cva(
31
  size: "default",
32
  },
33
  }
34
- )
35
 
36
  export interface ButtonProps
37
  extends React.ButtonHTMLAttributes<HTMLButtonElement>,
38
  VariantProps<typeof buttonVariants> {
39
- asChild?: boolean
40
  }
41
 
42
  const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
43
  ({ className, variant, size, asChild = false, ...props }, ref) => {
44
- const Comp = asChild ? Slot : "button"
45
  return (
46
  <Comp
47
  className={cn(buttonVariants({ variant, size, className }))}
48
  ref={ref}
49
  {...props}
50
  />
51
- )
52
  }
53
- )
54
- Button.displayName = "Button"
55
 
56
- export { Button, buttonVariants }
 
1
+ import * as React from "react";
2
+ import { Slot } from "@radix-ui/react-slot";
3
+ import { cva, type VariantProps } from "class-variance-authority";
4
 
5
+ import { cn } from "@/lib/utils";
6
 
7
  const buttonVariants = cva(
8
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
9
  {
10
  variants: {
11
  variant: {
 
31
  size: "default",
32
  },
33
  }
34
+ );
35
 
36
  export interface ButtonProps
37
  extends React.ButtonHTMLAttributes<HTMLButtonElement>,
38
  VariantProps<typeof buttonVariants> {
39
+ asChild?: boolean;
40
  }
41
 
42
  const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
43
  ({ className, variant, size, asChild = false, ...props }, ref) => {
44
+ const Comp = asChild ? Slot : "button";
45
  return (
46
  <Comp
47
  className={cn(buttonVariants({ variant, size, className }))}
48
  ref={ref}
49
  {...props}
50
  />
51
+ );
52
  }
53
+ );
54
+ Button.displayName = "Button";
55
 
56
+ export { Button, buttonVariants };
src/lib/utils.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { type ClassValue, clsx } from "clsx"
2
- import { twMerge } from "tailwind-merge"
3
-
4
  export function cn(...inputs: ClassValue[]) {
5
- return twMerge(clsx(inputs))
6
  }
 
1
+ import { clsx, type ClassValue } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+
4
  export function cn(...inputs: ClassValue[]) {
5
+ return twMerge(clsx(inputs));
6
  }
src/main.tsx CHANGED
@@ -1,10 +1,10 @@
1
- import React from 'react';
2
- import ReactDOM from 'react-dom/client';
3
- import App from './App.tsx';
4
- import '@/styles/globals.css';
5
 
6
- ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
7
- <React.StrictMode>
8
  <App />
9
- </React.StrictMode>
10
  );
 
1
+ import { StrictMode } from "react";
2
+ import { createRoot } from "react-dom/client";
3
+ import App from "./App.tsx";
4
+ import "@/styles/globals.css";
5
 
6
+ createRoot(document.getElementById("root")!).render(
7
+ <StrictMode>
8
  <App />
9
+ </StrictMode>
10
  );
src/styles/globals.css CHANGED
@@ -1,73 +1,93 @@
1
  @tailwind base;
2
  @tailwind components;
3
  @tailwind utilities;
4
-
5
  @layer base {
6
  :root {
7
  --background: 0 0% 100%;
8
- --foreground: 222.2 84% 4.9%;
9
-
10
- --muted: 210 40% 96.1%;
11
- --muted-foreground: 215.4 16.3% 46.9%;
12
-
13
  --popover: 0 0% 100%;
14
- --popover-foreground: 222.2 84% 4.9%;
15
-
16
  --card: 0 0% 100%;
17
- --card-foreground: 222.2 84% 4.9%;
18
-
19
- --border: 214.3 31.8% 91.4%;
20
- --input: 214.3 31.8% 91.4%;
21
-
22
- --primary: 222.2 47.4% 11.2%;
23
- --primary-foreground: 210 40% 98%;
24
-
25
- --secondary: 210 40% 96.1%;
26
- --secondary-foreground: 222.2 47.4% 11.2%;
27
-
28
- --accent: 210 40% 96.1%;
29
- --accent-foreground: ;
30
-
31
  --destructive: 0 84.2% 60.2%;
32
- --destructive-foreground: 210 40% 98%;
33
-
34
- --ring: 215 20.2% 65.1%;
35
-
36
  --radius: 0.5rem;
 
 
 
 
 
 
 
 
 
 
37
  }
38
-
39
  .dark {
40
- --background: 222.2 84% 4.9%;
41
- --foreground: 210 40% 98%;
42
-
43
- --muted: 217.2 32.6% 17.5%;
44
- --muted-foreground: 215 20.2% 65.1%;
45
-
46
- --popover: 222.2 84% 4.9%;
47
- --popover-foreground: 210 40% 98%;
48
-
49
- --card: 222.2 84% 4.9%;
50
- --card-foreground: 210 40% 98%;
51
-
52
- --border: 217.2 32.6% 17.5%;
53
- --input: 217.2 32.6% 17.5%;
54
-
55
- --primary: 210 40% 98%;
56
- --primary-foreground: 222.2 47.4% 11.2%;
57
-
58
- --secondary: 217.2 32.6% 17.5%;
59
- --secondary-foreground: 210 40% 98%;
60
-
61
- --accent: 217.2 32.6% 17.5%;
62
- --accent-foreground: ;
63
-
64
  --destructive: 0 62.8% 30.6%;
65
- --destructive-foreground: 0 85.7% 97.3%;
66
-
67
- --ring: 217.2 32.6% 17.5%;
 
 
 
 
 
 
 
 
 
 
68
  }
69
  }
70
-
71
  @layer base {
72
  * {
73
  @apply border-border;
@@ -75,4 +95,4 @@
75
  body {
76
  @apply bg-background text-foreground;
77
  }
78
- }
 
1
  @tailwind base;
2
  @tailwind components;
3
  @tailwind utilities;
4
+
5
  @layer base {
6
  :root {
7
  --background: 0 0% 100%;
8
+ --foreground: 240 10% 3.9%;
9
+
10
+ --muted: 240 4.8% 95.9%;
11
+ --muted-foreground: 240 3.8% 46.1%;
12
+
13
  --popover: 0 0% 100%;
14
+ --popover-foreground: 240 10% 3.9%;
15
+
16
  --card: 0 0% 100%;
17
+ --card-foreground: 240 10% 3.9%;
18
+
19
+ --border: 240 5.9% 90%;
20
+ --input: 240 5.9% 90%;
21
+
22
+ --primary: 240 5.9% 10%;
23
+ --primary-foreground: 0 0% 98%;
24
+
25
+ --secondary: 240 4.8% 95.9%;
26
+ --secondary-foreground: 240 5.9% 10%;
27
+
28
+ --accent: 240 4.8% 95.9%;
29
+ --accent-foreground: 240 5.9% 10%;
30
+
31
  --destructive: 0 84.2% 60.2%;
32
+ --destructive-foreground: 0 0% 98%;
33
+
34
+ --ring: 240 10% 3.9%;
35
+
36
  --radius: 0.5rem;
37
+
38
+ --chart-1: 12 76% 61%;
39
+
40
+ --chart-2: 173 58% 39%;
41
+
42
+ --chart-3: 197 37% 24%;
43
+
44
+ --chart-4: 43 74% 66%;
45
+
46
+ --chart-5: 27 87% 67%;
47
  }
48
+
49
  .dark {
50
+ --background: 240 10% 3.9%;
51
+ --foreground: 0 0% 98%;
52
+
53
+ --muted: 240 3.7% 15.9%;
54
+ --muted-foreground: 240 5% 64.9%;
55
+
56
+ --popover: 240 10% 3.9%;
57
+ --popover-foreground: 0 0% 98%;
58
+
59
+ --card: 240 10% 3.9%;
60
+ --card-foreground: 0 0% 98%;
61
+
62
+ --border: 240 3.7% 15.9%;
63
+ --input: 240 3.7% 15.9%;
64
+
65
+ --primary: 0 0% 98%;
66
+ --primary-foreground: 240 5.9% 10%;
67
+
68
+ --secondary: 240 3.7% 15.9%;
69
+ --secondary-foreground: 0 0% 98%;
70
+
71
+ --accent: 240 3.7% 15.9%;
72
+ --accent-foreground: 0 0% 98%;
73
+
74
  --destructive: 0 62.8% 30.6%;
75
+ --destructive-foreground: 0 0% 98%;
76
+
77
+ --ring: 240 4.9% 83.9%;
78
+
79
+ --chart-1: 220 70% 50%;
80
+
81
+ --chart-2: 160 60% 45%;
82
+
83
+ --chart-3: 30 80% 55%;
84
+
85
+ --chart-4: 280 65% 60%;
86
+
87
+ --chart-5: 340 75% 55%;
88
  }
89
  }
90
+
91
  @layer base {
92
  * {
93
  @apply border-border;
 
95
  body {
96
  @apply bg-background text-foreground;
97
  }
98
+ }
tailwind.config.js DELETED
@@ -1,73 +0,0 @@
1
- import tailwindAnimate from 'tailwindcss-animate';
2
-
3
- /** @type {import('tailwindcss').Config} */
4
- export default {
5
- darkMode: ['class'],
6
- content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
7
- theme: {
8
- container: {
9
- center: true,
10
- padding: '2rem',
11
- screens: {
12
- '2xl': '1400px',
13
- },
14
- },
15
- extend: {
16
- colors: {
17
- border: 'hsl(var(--border))',
18
- input: 'hsl(var(--input))',
19
- ring: 'hsl(var(--ring))',
20
- background: 'hsl(var(--background))',
21
- foreground: 'hsl(var(--foreground))',
22
- primary: {
23
- DEFAULT: 'hsl(var(--primary))',
24
- foreground: 'hsl(var(--primary-foreground))',
25
- },
26
- secondary: {
27
- DEFAULT: 'hsl(var(--secondary))',
28
- foreground: 'hsl(var(--secondary-foreground))',
29
- },
30
- destructive: {
31
- DEFAULT: 'hsl(var(--destructive))',
32
- foreground: 'hsl(var(--destructive-foreground))',
33
- },
34
- muted: {
35
- DEFAULT: 'hsl(var(--muted))',
36
- foreground: 'hsl(var(--muted-foreground))',
37
- },
38
- accent: {
39
- DEFAULT: 'hsl(var(--accent))',
40
- foreground: 'hsl(var(--accent-foreground))',
41
- },
42
- popover: {
43
- DEFAULT: 'hsl(var(--popover))',
44
- foreground: 'hsl(var(--popover-foreground))',
45
- },
46
- card: {
47
- DEFAULT: 'hsl(var(--card))',
48
- foreground: 'hsl(var(--card-foreground))',
49
- },
50
- },
51
- borderRadius: {
52
- lg: 'var(--radius)',
53
- md: 'calc(var(--radius) - 2px)',
54
- sm: 'calc(var(--radius) - 4px)',
55
- },
56
- keyframes: {
57
- 'accordion-down': {
58
- from: { height: 0 },
59
- to: { height: 'var(--radix-accordion-content-height)' },
60
- },
61
- 'accordion-up': {
62
- from: { height: 'var(--radix-accordion-content-height)' },
63
- to: { height: 0 },
64
- },
65
- },
66
- animation: {
67
- 'accordion-down': 'accordion-down 0.2s ease-out',
68
- 'accordion-up': 'accordion-up 0.2s ease-out',
69
- },
70
- },
71
- },
72
- plugins: [tailwindAnimate],
73
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tailwind.config.ts ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import tailwindAnimate from "tailwindcss-animate";
2
+ import type { Config } from "tailwindcss";
3
+
4
+ const config: Config = {
5
+ darkMode: ["class"],
6
+ content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
7
+ theme: {
8
+ container: {
9
+ center: true,
10
+ padding: "2rem",
11
+ screens: {
12
+ "2xl": "1400px",
13
+ },
14
+ },
15
+ extend: {
16
+ colors: {
17
+ border: "hsl(var(--border))",
18
+ input: "hsl(var(--input))",
19
+ ring: "hsl(var(--ring))",
20
+ background: "hsl(var(--background))",
21
+ foreground: "hsl(var(--foreground))",
22
+ primary: {
23
+ DEFAULT: "hsl(var(--primary))",
24
+ foreground: "hsl(var(--primary-foreground))",
25
+ },
26
+ secondary: {
27
+ DEFAULT: "hsl(var(--secondary))",
28
+ foreground: "hsl(var(--secondary-foreground))",
29
+ },
30
+ destructive: {
31
+ DEFAULT: "hsl(var(--destructive))",
32
+ foreground: "hsl(var(--destructive-foreground))",
33
+ },
34
+ muted: {
35
+ DEFAULT: "hsl(var(--muted))",
36
+ foreground: "hsl(var(--muted-foreground))",
37
+ },
38
+ accent: {
39
+ DEFAULT: "hsl(var(--accent))",
40
+ foreground: "hsl(var(--accent-foreground))",
41
+ },
42
+ popover: {
43
+ DEFAULT: "hsl(var(--popover))",
44
+ foreground: "hsl(var(--popover-foreground))",
45
+ },
46
+ card: {
47
+ DEFAULT: "hsl(var(--card))",
48
+ foreground: "hsl(var(--card-foreground))",
49
+ },
50
+ chart: {
51
+ "1": "hsl(var(--chart-1))",
52
+ "2": "hsl(var(--chart-2))",
53
+ "3": "hsl(var(--chart-3))",
54
+ "4": "hsl(var(--chart-4))",
55
+ "5": "hsl(var(--chart-5))",
56
+ },
57
+ },
58
+ borderRadius: {
59
+ lg: "var(--radius)",
60
+ md: "calc(var(--radius) - 2px)",
61
+ sm: "calc(var(--radius) - 4px)",
62
+ },
63
+ keyframes: {
64
+ "accordion-down": {
65
+ from: {
66
+ height: "0",
67
+ },
68
+ to: {
69
+ height: "var(--radix-accordion-content-height)",
70
+ },
71
+ },
72
+ "accordion-up": {
73
+ from: {
74
+ height: "var(--radix-accordion-content-height)",
75
+ },
76
+ to: {
77
+ height: "0",
78
+ },
79
+ },
80
+ },
81
+ animation: {
82
+ "accordion-down": "accordion-down 0.2s ease-out",
83
+ "accordion-up": "accordion-up 0.2s ease-out",
84
+ },
85
+ },
86
+ },
87
+ plugins: [tailwindAnimate],
88
+ };
89
+
90
+ export default config;
tsconfig.app.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "compilerOptions": {
3
+ "composite": true,
4
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
5
+ "target": "ES2020",
6
+ "useDefineForClassFields": true,
7
+ "lib": ["ES2020", "DOM", "DOM.Iterable"],
8
+ "module": "ESNext",
9
+ "skipLibCheck": true,
10
+
11
+ /* Bundler mode */
12
+ "moduleResolution": "Bundler",
13
+ "allowImportingTsExtensions": true,
14
+ "isolatedModules": true,
15
+ "moduleDetection": "force",
16
+ "noEmit": true,
17
+ "jsx": "react-jsx",
18
+
19
+ /* Linting */
20
+ "strict": true,
21
+ "noUnusedLocals": true,
22
+ "noUnusedParameters": true,
23
+ "noFallthroughCasesInSwitch": true,
24
+
25
+ /* Paths */
26
+ "baseUrl": ".",
27
+ "paths": {
28
+ "@/*": ["./src/*"]
29
+ }
30
+ },
31
+ "include": ["src"]
32
+ }
tsconfig.json CHANGED
@@ -1,31 +1,15 @@
1
  {
2
  "compilerOptions": {
3
- "target": "ES2020",
4
- "useDefineForClassFields": true,
5
- "lib": ["ES2020", "DOM", "DOM.Iterable"],
6
- "module": "ESNext",
7
- "skipLibCheck": true,
8
-
9
- /* Bundler mode */
10
- "moduleResolution": "bundler",
11
- "allowImportingTsExtensions": true,
12
- "resolveJsonModule": true,
13
- "isolatedModules": true,
14
- "noEmit": true,
15
- "jsx": "react-jsx",
16
-
17
- /* Linting */
18
- "strict": true,
19
- "noUnusedLocals": true,
20
- "noUnusedParameters": true,
21
- "noFallthroughCasesInSwitch": true,
22
-
23
- /* Paths */
24
  "baseUrl": ".",
25
  "paths": {
26
- "@/*": ["src/*"]
27
  }
28
  },
29
- "include": ["src"],
30
- "references": [{ "path": "./tsconfig.node.json" }]
 
 
 
31
  }
 
1
  {
2
  "compilerOptions": {
3
+ "composite": true,
4
+ /* Paths (for shadcn/ui since paths in tsconfig.app.json are not working) */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  "baseUrl": ".",
6
  "paths": {
7
+ "@/*": ["./src/*"]
8
  }
9
  },
10
+ "files": [],
11
+ "references": [
12
+ { "path": "./tsconfig.app.json" },
13
+ { "path": "./tsconfig.node.json" }
14
+ ]
15
  }
tsconfig.node.json CHANGED
@@ -1,10 +1,24 @@
1
  {
2
  "compilerOptions": {
3
  "composite": true,
4
- "skipLibCheck": true,
 
 
5
  "module": "ESNext",
6
- "moduleResolution": "bundler",
7
- "allowSyntheticDefaultImports": true
 
 
 
 
 
 
 
 
 
 
 
 
8
  },
9
  "include": ["vite.config.ts"]
10
  }
 
1
  {
2
  "compilerOptions": {
3
  "composite": true,
4
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
5
+ "target": "ES2022",
6
+ "lib": ["ES2023"],
7
  "module": "ESNext",
8
+ "skipLibCheck": true,
9
+
10
+ /* Bundler mode */
11
+ "moduleResolution": "Bundler",
12
+ "allowImportingTsExtensions": true,
13
+ "isolatedModules": true,
14
+ "moduleDetection": "force",
15
+ "noEmit": true,
16
+
17
+ /* Linting */
18
+ "strict": true,
19
+ "noUnusedLocals": true,
20
+ "noUnusedParameters": true,
21
+ "noFallthroughCasesInSwitch": true
22
  },
23
  "include": ["vite.config.ts"]
24
  }
vite.config.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { defineConfig } from 'vite';
2
- import react from '@vitejs/plugin-react';
3
  import { resolve } from "path";
4
 
5
  // https://vitejs.dev/config/
@@ -7,7 +7,7 @@ export default defineConfig({
7
  plugins: [react()],
8
  resolve: {
9
  alias: {
10
- '@': resolve(__dirname, './src'),
11
  },
12
  },
13
  });
 
1
+ import { defineConfig } from "vite";
2
+ import react from "@vitejs/plugin-react";
3
  import { resolve } from "path";
4
 
5
  // https://vitejs.dev/config/
 
7
  plugins: [react()],
8
  resolve: {
9
  alias: {
10
+ "@": resolve(__dirname, "./src"),
11
  },
12
  },
13
  });