Skip to content

Commit 3ef88da

Browse files
committed
chore(shadcn): Setup initial workspace package
1 parent fba78c5 commit 3ef88da

File tree

13 files changed

+725
-168
lines changed

13 files changed

+725
-168
lines changed

packages/shadcn/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

packages/shadcn/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
TODO

packages/shadcn/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": "src/index.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+
}

packages/shadcn/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>shadcn</title>
8+
</head>
9+
<body>
10+
<div id="root"></div>
11+
<script type="module" src="/src/main.tsx"></script>
12+
</body>
13+
</html>

packages/shadcn/package.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "@firebase-ui/shadcn",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "tsc -b && vite build",
9+
"lint": "eslint .",
10+
"preview": "vite preview"
11+
},
12+
"devDependencies": {
13+
"@tailwindcss/vite": "^4.1.14",
14+
"@types/node": "catalog:",
15+
"@types/react": "catalog:",
16+
"@types/react-dom": "catalog:",
17+
"@vitejs/plugin-react": "catalog:",
18+
"react": "catalog:",
19+
"react-dom": "catalog:",
20+
"tailwindcss": "catalog:",
21+
"tw-animate-css": "^1.4.0",
22+
"typescript": "catalog:",
23+
"vite": "catalog:"
24+
},
25+
"dependencies": {
26+
"class-variance-authority": "^0.7.1",
27+
"clsx": "^2.1.1",
28+
"lucide-react": "^0.544.0",
29+
"tailwind-merge": "^3.3.1"
30+
}
31+
}

packages/shadcn/src/App.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function App() {
2+
return <></>;
3+
}
4+
5+
export default App;

packages/shadcn/src/index.css

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

packages/shadcn/src/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+
}

packages/shadcn/src/main.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { StrictMode } from "react";
2+
import { createRoot } from "react-dom/client";
3+
import "./index.css";
4+
import App from "./App";
5+
6+
createRoot(document.getElementById("root")!).render(
7+
<StrictMode>
8+
<App />
9+
</StrictMode>
10+
);

packages/shadcn/tsconfig.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"extends": "../../tsconfig.json",
3+
"compilerOptions": {
4+
"jsx": "react-jsx",
5+
"moduleResolution": "Bundler",
6+
"paths": {
7+
"@/*": ["./src/*"],
8+
"@firebase-ui/core": ["../core/src/index.ts"],
9+
"@firebase-ui/react": ["../react/src/index.ts"],
10+
"@firebase-ui/translations": ["../translations/src/index.ts"],
11+
"@firebase-ui/styles": ["../styles/src/index.ts"]
12+
}
13+
},
14+
"include": ["src", "vite.config.ts"]
15+
}

0 commit comments

Comments
 (0)