Skip to content

Commit f4e5806

Browse files
committed
add shadcn
1 parent 2f3a7f8 commit f4e5806

6 files changed

Lines changed: 217 additions & 0 deletions

File tree

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,126 @@
11
@import 'tailwindcss';
2+
@import "tw-animate-css";
3+
4+
@custom-variant dark (&:is(.dark *));
25

36
@plugin '@tailwindcss/typography';
47
@plugin '@tailwindcss/forms';
8+
9+
@theme inline {
10+
--radius-sm: calc(var(--radius) - 4px);
11+
--radius-md: calc(var(--radius) - 2px);
12+
--radius-lg: var(--radius);
13+
--radius-xl: calc(var(--radius) + 4px);
14+
--radius-2xl: calc(var(--radius) + 8px);
15+
--radius-3xl: calc(var(--radius) + 12px);
16+
--radius-4xl: calc(var(--radius) + 16px);
17+
--color-background: var(--background);
18+
--color-foreground: var(--foreground);
19+
--color-card: var(--card);
20+
--color-card-foreground: var(--card-foreground);
21+
--color-popover: var(--popover);
22+
--color-popover-foreground: var(--popover-foreground);
23+
--color-primary: var(--primary);
24+
--color-primary-foreground: var(--primary-foreground);
25+
--color-secondary: var(--secondary);
26+
--color-secondary-foreground: var(--secondary-foreground);
27+
--color-muted: var(--muted);
28+
--color-muted-foreground: var(--muted-foreground);
29+
--color-accent: var(--accent);
30+
--color-accent-foreground: var(--accent-foreground);
31+
--color-destructive: var(--destructive);
32+
--color-border: var(--border);
33+
--color-input: var(--input);
34+
--color-ring: var(--ring);
35+
--color-chart-1: var(--chart-1);
36+
--color-chart-2: var(--chart-2);
37+
--color-chart-3: var(--chart-3);
38+
--color-chart-4: var(--chart-4);
39+
--color-chart-5: var(--chart-5);
40+
--color-sidebar: var(--sidebar);
41+
--color-sidebar-foreground: var(--sidebar-foreground);
42+
--color-sidebar-primary: var(--sidebar-primary);
43+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
44+
--color-sidebar-accent: var(--sidebar-accent);
45+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
46+
--color-sidebar-border: var(--sidebar-border);
47+
--color-sidebar-ring: var(--sidebar-ring);
48+
}
49+
50+
:root {
51+
--radius: 0.625rem;
52+
--background: oklch(1 0 0);
53+
--foreground: oklch(0.145 0 0);
54+
--card: oklch(1 0 0);
55+
--card-foreground: oklch(0.145 0 0);
56+
--popover: oklch(1 0 0);
57+
--popover-foreground: oklch(0.145 0 0);
58+
--primary: oklch(0.205 0 0);
59+
--primary-foreground: oklch(0.985 0 0);
60+
--secondary: oklch(0.97 0 0);
61+
--secondary-foreground: oklch(0.205 0 0);
62+
--muted: oklch(0.97 0 0);
63+
--muted-foreground: oklch(0.556 0 0);
64+
--accent: oklch(0.97 0 0);
65+
--accent-foreground: oklch(0.205 0 0);
66+
--destructive: oklch(0.577 0.245 27.325);
67+
--border: oklch(0.922 0 0);
68+
--input: oklch(0.922 0 0);
69+
--ring: oklch(0.708 0 0);
70+
--chart-1: oklch(0.646 0.222 41.116);
71+
--chart-2: oklch(0.6 0.118 184.704);
72+
--chart-3: oklch(0.398 0.07 227.392);
73+
--chart-4: oklch(0.828 0.189 84.429);
74+
--chart-5: oklch(0.769 0.188 70.08);
75+
--sidebar: oklch(0.985 0 0);
76+
--sidebar-foreground: oklch(0.145 0 0);
77+
--sidebar-primary: oklch(0.205 0 0);
78+
--sidebar-primary-foreground: oklch(0.985 0 0);
79+
--sidebar-accent: oklch(0.97 0 0);
80+
--sidebar-accent-foreground: oklch(0.205 0 0);
81+
--sidebar-border: oklch(0.922 0 0);
82+
--sidebar-ring: oklch(0.708 0 0);
83+
}
84+
85+
.dark {
86+
--background: oklch(0.145 0 0);
87+
--foreground: oklch(0.985 0 0);
88+
--card: oklch(0.205 0 0);
89+
--card-foreground: oklch(0.985 0 0);
90+
--popover: oklch(0.205 0 0);
91+
--popover-foreground: oklch(0.985 0 0);
92+
--primary: oklch(0.922 0 0);
93+
--primary-foreground: oklch(0.205 0 0);
94+
--secondary: oklch(0.269 0 0);
95+
--secondary-foreground: oklch(0.985 0 0);
96+
--muted: oklch(0.269 0 0);
97+
--muted-foreground: oklch(0.708 0 0);
98+
--accent: oklch(0.269 0 0);
99+
--accent-foreground: oklch(0.985 0 0);
100+
--destructive: oklch(0.704 0.191 22.216);
101+
--border: oklch(1 0 0 / 10%);
102+
--input: oklch(1 0 0 / 15%);
103+
--ring: oklch(0.556 0 0);
104+
--chart-1: oklch(0.488 0.243 264.376);
105+
--chart-2: oklch(0.696 0.17 162.48);
106+
--chart-3: oklch(0.769 0.188 70.08);
107+
--chart-4: oklch(0.627 0.265 303.9);
108+
--chart-5: oklch(0.645 0.246 16.439);
109+
--sidebar: oklch(0.205 0 0);
110+
--sidebar-foreground: oklch(0.985 0 0);
111+
--sidebar-primary: oklch(0.488 0.243 264.376);
112+
--sidebar-primary-foreground: oklch(0.985 0 0);
113+
--sidebar-accent: oklch(0.269 0 0);
114+
--sidebar-accent-foreground: oklch(0.985 0 0);
115+
--sidebar-border: oklch(1 0 0 / 10%);
116+
--sidebar-ring: oklch(0.556 0 0);
117+
}
118+
119+
@layer base {
120+
* {
121+
@apply border-border outline-ring/50;
122+
}
123+
body {
124+
@apply bg-background text-foreground;
125+
}
126+
}

app/javascript/lib/utils.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,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+
}

components.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "new-york",
4+
"rsc": false,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "",
8+
"css": "app/javascript/entrypoints/application.css",
9+
"baseColor": "neutral",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"iconLibrary": "lucide",
14+
"aliases": {
15+
"components": "@/components",
16+
"utils": "@/lib/utils",
17+
"ui": "@/components/ui",
18+
"lib": "@/lib",
19+
"hooks": "@/hooks"
20+
},
21+
"registries": {}
22+
}

package-lock.json

Lines changed: 55 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"private": true,
33
"type": "module",
44
"devDependencies": {
5+
"tw-animate-css": "^1.4.0",
56
"vite": "^7.3.1",
67
"vite-plugin-ruby": "^5.1.2"
78
},
@@ -13,8 +14,12 @@
1314
"@types/react": "^19.2.8",
1415
"@types/react-dom": "^19.2.3",
1516
"@vitejs/plugin-react": "^5.1.2",
17+
"class-variance-authority": "^0.7.1",
18+
"clsx": "^2.1.1",
19+
"lucide-react": "^0.562.0",
1620
"react": "^19.2.3",
1721
"react-dom": "^19.2.3",
22+
"tailwind-merge": "^3.4.0",
1823
"tailwindcss": "^4.1.18",
1924
"typescript": "^5.9.3"
2025
},

tsconfig.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
{
2+
"compilerOptions": {
3+
"baseUrl": ".",
4+
"paths": {
5+
"@/*": ["app/javascript/*"],
6+
"~/*": ["app/javascript/*"]
7+
}
8+
},
29
"files": [],
310
"references": [
411
{

0 commit comments

Comments
 (0)