rendous-template 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@/components/ui/button.tsx +66 -0
- package/@/lib/utils.ts +1 -0
- package/README.md +30 -0
- package/bin/index.js +20 -0
- package/components.json +25 -0
- package/index.html +13 -0
- package/package.json +47 -0
- package/postcss.config.js +6 -0
- package/src/App.tsx +12 -0
- package/src/components/modeToggle.tsx +33 -0
- package/src/components/theme-provider.tsx +73 -0
- package/src/components/ui/button.tsx +56 -0
- package/src/index.css +131 -0
- package/src/layouts/index.js +0 -0
- package/src/lib/utils.ts +6 -0
- package/src/main.tsx +13 -0
- package/src/pages/index.js +0 -0
- package/src/vite-env.d.ts +1 -0
- package/tailwind.config.js +71 -0
- package/tsconfig.app.json +25 -0
- package/tsconfig.json +7 -0
- package/tsconfig.node.json +15 -0
- package/vite.config.ts +12 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { cva, type VariantProps } from "class-variance-authority"
|
|
3
|
+
import { cn } from "cn"
|
|
4
|
+
import { Slot } from "radix-ui"
|
|
5
|
+
|
|
6
|
+
const buttonVariants = cva(
|
|
7
|
+
"group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
12
|
+
outline:
|
|
13
|
+
"border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
14
|
+
secondary:
|
|
15
|
+
"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
16
|
+
ghost:
|
|
17
|
+
"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
18
|
+
destructive:
|
|
19
|
+
"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
|
20
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
default:
|
|
24
|
+
"h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
25
|
+
xs: "h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
26
|
+
sm: "h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
|
|
27
|
+
lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
28
|
+
icon: "size-9",
|
|
29
|
+
"icon-xs":
|
|
30
|
+
"size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
31
|
+
"icon-sm":
|
|
32
|
+
"size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md",
|
|
33
|
+
"icon-lg": "size-10",
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
defaultVariants: {
|
|
37
|
+
variant: "default",
|
|
38
|
+
size: "default",
|
|
39
|
+
},
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
function Button({
|
|
44
|
+
className,
|
|
45
|
+
variant = "default",
|
|
46
|
+
size = "default",
|
|
47
|
+
asChild = false,
|
|
48
|
+
...props
|
|
49
|
+
}: React.ComponentProps<"button"> &
|
|
50
|
+
VariantProps<typeof buttonVariants> & {
|
|
51
|
+
asChild?: boolean
|
|
52
|
+
}) {
|
|
53
|
+
const Comp = asChild ? Slot.Root : "button"
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<Comp
|
|
57
|
+
data-slot="button"
|
|
58
|
+
data-variant={variant}
|
|
59
|
+
data-size={size}
|
|
60
|
+
className={cn(buttonVariants({ variant, size, className }))}
|
|
61
|
+
{...props}
|
|
62
|
+
/>
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export { Button, buttonVariants }
|
package/@/lib/utils.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { cn } from "cn"
|
package/README.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# rendous
|
|
2
|
+
|
|
3
|
+
Template React + Vite + TypeScript + Tailwind CSS + shadcn/ui, siap pakai.
|
|
4
|
+
|
|
5
|
+
## Mulai
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install
|
|
9
|
+
npm run dev
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Tambah komponen shadcn baru
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npx shadcn@latest add card
|
|
16
|
+
npx shadcn@latest add dialog
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Komponen baru otomatis masuk ke `src/components/ui/`.
|
|
20
|
+
|
|
21
|
+
## Struktur penting
|
|
22
|
+
|
|
23
|
+
- `src/index.css` — variabel warna tema (light/dark), diedit di sini kalau mau ganti palet
|
|
24
|
+
- `src/lib/utils.ts` — helper `cn()` dipakai semua komponen ui
|
|
25
|
+
- `components.json` — konfigurasi yang dibaca CLI shadcn
|
|
26
|
+
- `tailwind.config.js` — sudah terhubung ke variabel warna shadcn
|
|
27
|
+
|
|
28
|
+
## Alias import
|
|
29
|
+
|
|
30
|
+
`@/` mengarah ke folder `src/`, sudah dikonfigurasi di `tsconfig.app.json` dan `vite.config.ts`.
|
package/bin/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import degit from "degit";
|
|
3
|
+
import path from "path";
|
|
4
|
+
|
|
5
|
+
const targetName = process.argv[2] || "rendous-app";
|
|
6
|
+
const targetDir = path.resolve(process.cwd(), targetName);
|
|
7
|
+
|
|
8
|
+
console.log(`Membuat project di ${targetDir}...`);
|
|
9
|
+
|
|
10
|
+
const emitter = degit("username/rendous-template", {
|
|
11
|
+
cache: false,
|
|
12
|
+
force: true,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
await emitter.clone(targetDir);
|
|
16
|
+
|
|
17
|
+
console.log("Selesai! Jalankan:");
|
|
18
|
+
console.log(` cd ${targetName}`);
|
|
19
|
+
console.log(" npm install");
|
|
20
|
+
console.log(" npm run dev");
|
package/components.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
|
+
"style": "radix-vega",
|
|
4
|
+
"rsc": false,
|
|
5
|
+
"tsx": true,
|
|
6
|
+
"tailwind": {
|
|
7
|
+
"config": "tailwind.config.js",
|
|
8
|
+
"css": "src/index.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": "phosphor",
|
|
21
|
+
"rtl": false,
|
|
22
|
+
"menuColor": "default-translucent",
|
|
23
|
+
"menuAccent": "subtle",
|
|
24
|
+
"registries": {}
|
|
25
|
+
}
|
package/index.html
ADDED
|
@@ -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>rendous</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="root"></div>
|
|
11
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rendous-template",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "tsc -b && vite build",
|
|
9
|
+
"lint": "eslint .",
|
|
10
|
+
"preview": "vite preview"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@fontsource-variable/roboto": "^5.3.0",
|
|
14
|
+
"@phosphor-icons/react": "^2.1.10",
|
|
15
|
+
"@radix-ui/react-slot": "^1.1.0",
|
|
16
|
+
"class-variance-authority": "^0.7.0",
|
|
17
|
+
"clsx": "^2.1.1",
|
|
18
|
+
"cn": "^0.3.0",
|
|
19
|
+
"degit": "^3.10.0",
|
|
20
|
+
"kleur": "^4.1.5",
|
|
21
|
+
"lucide-react": "^0.468.0",
|
|
22
|
+
"prompts": "^2.4.2",
|
|
23
|
+
"radix-ui": "^1.6.7",
|
|
24
|
+
"react": "^18.3.1",
|
|
25
|
+
"react-dom": "^18.3.1",
|
|
26
|
+
"shadcn": "^4.21.0",
|
|
27
|
+
"tailwind-merge": "^2.5.5",
|
|
28
|
+
"tailwindcss-animate": "^1.0.7",
|
|
29
|
+
"tw-animate-css": "^1.4.0"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@types/node": "^20.14.0",
|
|
33
|
+
"@types/react": "^18.3.3",
|
|
34
|
+
"@types/react-dom": "^18.3.0",
|
|
35
|
+
"@vitejs/plugin-react": "^4.3.1",
|
|
36
|
+
"autoprefixer": "^10.4.19",
|
|
37
|
+
"eslint": "^9.9.0",
|
|
38
|
+
"postcss": "^8.4.38",
|
|
39
|
+
"tailwindcss": "^3.4.10",
|
|
40
|
+
"typescript": "^5.5.3",
|
|
41
|
+
"vite": "^5.4.0"
|
|
42
|
+
},
|
|
43
|
+
"bin": {
|
|
44
|
+
"create-rendous": "./bin/index.js"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
package/src/App.tsx
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { SunIcon, MoonIcon } from "@phosphor-icons/react"
|
|
2
|
+
|
|
3
|
+
import { Button } from "@/components/ui/button"
|
|
4
|
+
import { useTheme } from "@/components/theme-provider"
|
|
5
|
+
|
|
6
|
+
export function ModeToggle() {
|
|
7
|
+
const { theme, setTheme } = useTheme()
|
|
8
|
+
|
|
9
|
+
const isDark =
|
|
10
|
+
theme === "dark" ||
|
|
11
|
+
(theme === "system" &&
|
|
12
|
+
window.matchMedia("(prefers-color-scheme: dark)").matches)
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<Button
|
|
16
|
+
variant="outline"
|
|
17
|
+
size="icon"
|
|
18
|
+
className="relative"
|
|
19
|
+
onClick={() => setTheme(isDark ? "light" : "dark")}
|
|
20
|
+
aria-label="Toggle theme"
|
|
21
|
+
>
|
|
22
|
+
<SunIcon
|
|
23
|
+
weight="bold"
|
|
24
|
+
className="h-[1.2rem] w-[1.2rem] scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90"
|
|
25
|
+
/>
|
|
26
|
+
<MoonIcon
|
|
27
|
+
weight="bold"
|
|
28
|
+
className="absolute h-[1.2rem] w-[1.2rem] scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0"
|
|
29
|
+
/>
|
|
30
|
+
<span className="sr-only">Toggle theme</span>
|
|
31
|
+
</Button>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { createContext, useContext, useEffect, useState } from "react"
|
|
2
|
+
|
|
3
|
+
type Theme = "dark" | "light" | "system"
|
|
4
|
+
|
|
5
|
+
type ThemeProviderProps = {
|
|
6
|
+
children: React.ReactNode
|
|
7
|
+
defaultTheme?: Theme
|
|
8
|
+
storageKey?: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
type ThemeProviderState = {
|
|
12
|
+
theme: Theme
|
|
13
|
+
setTheme: (theme: Theme) => void
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const initialState: ThemeProviderState = {
|
|
17
|
+
theme: "system",
|
|
18
|
+
setTheme: () => null,
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const ThemeProviderContext = createContext<ThemeProviderState>(initialState)
|
|
22
|
+
|
|
23
|
+
export function ThemeProvider({
|
|
24
|
+
children,
|
|
25
|
+
defaultTheme = "system",
|
|
26
|
+
storageKey = "rendous-ui-theme",
|
|
27
|
+
...props
|
|
28
|
+
}: ThemeProviderProps) {
|
|
29
|
+
const [theme, setTheme] = useState<Theme>(
|
|
30
|
+
() => (localStorage.getItem(storageKey) as Theme) || defaultTheme
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
const root = window.document.documentElement
|
|
35
|
+
|
|
36
|
+
root.classList.remove("light", "dark")
|
|
37
|
+
|
|
38
|
+
if (theme === "system") {
|
|
39
|
+
const systemTheme = window.matchMedia("(prefers-color-scheme: dark)")
|
|
40
|
+
.matches
|
|
41
|
+
? "dark"
|
|
42
|
+
: "light"
|
|
43
|
+
|
|
44
|
+
root.classList.add(systemTheme)
|
|
45
|
+
return
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
root.classList.add(theme)
|
|
49
|
+
}, [theme])
|
|
50
|
+
|
|
51
|
+
const value = {
|
|
52
|
+
theme,
|
|
53
|
+
setTheme: (theme: Theme) => {
|
|
54
|
+
localStorage.setItem(storageKey, theme)
|
|
55
|
+
setTheme(theme)
|
|
56
|
+
},
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<ThemeProviderContext.Provider {...props} value={value}>
|
|
61
|
+
{children}
|
|
62
|
+
</ThemeProviderContext.Provider>
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const useTheme = () => {
|
|
67
|
+
const context = useContext(ThemeProviderContext)
|
|
68
|
+
|
|
69
|
+
if (context === undefined)
|
|
70
|
+
throw new Error("useTheme must be used within a ThemeProvider")
|
|
71
|
+
|
|
72
|
+
return context
|
|
73
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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 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",
|
|
9
|
+
{
|
|
10
|
+
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
13
|
+
destructive:
|
|
14
|
+
"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
15
|
+
outline:
|
|
16
|
+
"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
17
|
+
secondary:
|
|
18
|
+
"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
19
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
20
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
default: "h-9 px-4 py-2",
|
|
24
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
25
|
+
lg: "h-10 rounded-md px-8",
|
|
26
|
+
icon: "h-9 w-9",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
variant: "default",
|
|
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 }
|
package/src/index.css
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
@import "tw-animate-css";
|
|
2
|
+
@import "shadcn/tailwind.css";
|
|
3
|
+
@import "@fontsource-variable/roboto";
|
|
4
|
+
@tailwind base;
|
|
5
|
+
@tailwind components;
|
|
6
|
+
@tailwind utilities;
|
|
7
|
+
|
|
8
|
+
@layer base {
|
|
9
|
+
:root {
|
|
10
|
+
--background: oklch(1 0 0);
|
|
11
|
+
--foreground: oklch(0.141 0.005 285.823);
|
|
12
|
+
|
|
13
|
+
--card: oklch(1 0 0);
|
|
14
|
+
--card-foreground: oklch(0.141 0.005 285.823);
|
|
15
|
+
|
|
16
|
+
--popover: oklch(1 0 0);
|
|
17
|
+
--popover-foreground: oklch(0.141 0.005 285.823);
|
|
18
|
+
|
|
19
|
+
--primary: oklch(0.841 0.238 128.85);
|
|
20
|
+
--primary-foreground: oklch(0.405 0.101 131.063);
|
|
21
|
+
|
|
22
|
+
--secondary: oklch(0.967 0.001 286.375);
|
|
23
|
+
--secondary-foreground: oklch(0.21 0.006 285.885);
|
|
24
|
+
|
|
25
|
+
--muted: oklch(0.967 0.001 286.375);
|
|
26
|
+
--muted-foreground: oklch(0.552 0.016 285.938);
|
|
27
|
+
|
|
28
|
+
--accent: oklch(0.967 0.001 286.375);
|
|
29
|
+
--accent-foreground: oklch(0.21 0.006 285.885);
|
|
30
|
+
|
|
31
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
32
|
+
--destructive-foreground: 0 0% 98%;
|
|
33
|
+
|
|
34
|
+
--border: oklch(0.92 0.004 286.32);
|
|
35
|
+
--input: oklch(0.92 0.004 286.32);
|
|
36
|
+
--ring: oklch(0.705 0.015 286.067);
|
|
37
|
+
|
|
38
|
+
--radius: 0.625rem;
|
|
39
|
+
|
|
40
|
+
--chart-1: oklch(0.897 0.196 126.665);
|
|
41
|
+
|
|
42
|
+
--chart-2: oklch(0.768 0.233 130.85);
|
|
43
|
+
|
|
44
|
+
--chart-3: oklch(0.648 0.2 131.684);
|
|
45
|
+
|
|
46
|
+
--chart-4: oklch(0.532 0.157 131.589);
|
|
47
|
+
|
|
48
|
+
--chart-5: oklch(0.453 0.124 130.933);
|
|
49
|
+
|
|
50
|
+
--sidebar: oklch(0.985 0 0);
|
|
51
|
+
|
|
52
|
+
--sidebar-foreground: oklch(0.141 0.005 285.823);
|
|
53
|
+
|
|
54
|
+
--sidebar-primary: oklch(0.648 0.2 131.684);
|
|
55
|
+
|
|
56
|
+
--sidebar-primary-foreground: oklch(0.986 0.031 120.757);
|
|
57
|
+
|
|
58
|
+
--sidebar-accent: oklch(0.967 0.001 286.375);
|
|
59
|
+
|
|
60
|
+
--sidebar-accent-foreground: oklch(0.21 0.006 285.885);
|
|
61
|
+
|
|
62
|
+
--sidebar-border: oklch(0.92 0.004 286.32);
|
|
63
|
+
|
|
64
|
+
--sidebar-ring: oklch(0.705 0.015 286.067);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.dark {
|
|
68
|
+
--background: oklch(0.141 0.005 285.823);
|
|
69
|
+
--foreground: oklch(0.985 0 0);
|
|
70
|
+
|
|
71
|
+
--card: oklch(0.21 0.006 285.885);
|
|
72
|
+
--card-foreground: oklch(0.985 0 0);
|
|
73
|
+
|
|
74
|
+
--popover: oklch(0.21 0.006 285.885);
|
|
75
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
76
|
+
|
|
77
|
+
--primary: oklch(0.768 0.233 130.85);
|
|
78
|
+
--primary-foreground: oklch(0.405 0.101 131.063);
|
|
79
|
+
|
|
80
|
+
--secondary: oklch(0.274 0.006 286.033);
|
|
81
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
82
|
+
|
|
83
|
+
--muted: oklch(0.274 0.006 286.033);
|
|
84
|
+
--muted-foreground: oklch(0.705 0.015 286.067);
|
|
85
|
+
|
|
86
|
+
--accent: oklch(0.274 0.006 286.033);
|
|
87
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
88
|
+
|
|
89
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
90
|
+
--destructive-foreground: 0 0% 98%;
|
|
91
|
+
|
|
92
|
+
--border: oklch(1 0 0 / 10%);
|
|
93
|
+
--input: oklch(1 0 0 / 15%);
|
|
94
|
+
--ring: oklch(0.552 0.016 285.938);
|
|
95
|
+
--chart-1: oklch(0.897 0.196 126.665);
|
|
96
|
+
--chart-2: oklch(0.768 0.233 130.85);
|
|
97
|
+
--chart-3: oklch(0.648 0.2 131.684);
|
|
98
|
+
--chart-4: oklch(0.532 0.157 131.589);
|
|
99
|
+
--chart-5: oklch(0.453 0.124 130.933);
|
|
100
|
+
--sidebar: oklch(0.21 0.006 285.885);
|
|
101
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
102
|
+
--sidebar-primary: oklch(0.768 0.233 130.85);
|
|
103
|
+
--sidebar-primary-foreground: oklch(0.274 0.072 132.109);
|
|
104
|
+
--sidebar-accent: oklch(0.274 0.006 286.033);
|
|
105
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
106
|
+
--sidebar-border: oklch(1 0 0 / 10%);
|
|
107
|
+
--sidebar-ring: oklch(0.552 0.016 285.938);
|
|
108
|
+
}
|
|
109
|
+
.theme {
|
|
110
|
+
--font-heading: var(--font-sans);
|
|
111
|
+
--font-sans: 'Roboto Variable', sans-serif;
|
|
112
|
+
}
|
|
113
|
+
* {
|
|
114
|
+
@apply border-border;
|
|
115
|
+
}
|
|
116
|
+
body {
|
|
117
|
+
@apply bg-background text-foreground;
|
|
118
|
+
}
|
|
119
|
+
html {
|
|
120
|
+
@apply font-sans;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@layer base {
|
|
125
|
+
* {
|
|
126
|
+
@apply border-border;
|
|
127
|
+
}
|
|
128
|
+
body {
|
|
129
|
+
@apply bg-background text-foreground;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
File without changes
|
package/src/lib/utils.ts
ADDED
package/src/main.tsx
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StrictMode } from "react"
|
|
2
|
+
import ReactDOM from "react-dom/client"
|
|
3
|
+
import App from "./App"
|
|
4
|
+
import "./index.css"
|
|
5
|
+
import { ThemeProvider } from "@/components/theme-provider"
|
|
6
|
+
|
|
7
|
+
ReactDOM.createRoot(document.getElementById("root")!).render(
|
|
8
|
+
<StrictMode>
|
|
9
|
+
<ThemeProvider defaultTheme="dark" storageKey="rendous-ui-theme">
|
|
10
|
+
<App />
|
|
11
|
+
</ThemeProvider>
|
|
12
|
+
</StrictMode>
|
|
13
|
+
)
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/** @type {import('tailwindcss').Config} */
|
|
2
|
+
export default {
|
|
3
|
+
darkMode: ["class"],
|
|
4
|
+
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
|
|
5
|
+
theme: {
|
|
6
|
+
container: {
|
|
7
|
+
center: true,
|
|
8
|
+
padding: "2rem",
|
|
9
|
+
screens: {
|
|
10
|
+
"2xl": "1400px",
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
extend: {
|
|
14
|
+
colors: {
|
|
15
|
+
border: "var(--border)",
|
|
16
|
+
input: "var(--input)",
|
|
17
|
+
ring: "var(--ring)",
|
|
18
|
+
background: "var(--background)",
|
|
19
|
+
foreground: "var(--foreground)",
|
|
20
|
+
primary: {
|
|
21
|
+
DEFAULT: "var(--primary)",
|
|
22
|
+
foreground: "var(--primary-foreground)",
|
|
23
|
+
},
|
|
24
|
+
secondary: {
|
|
25
|
+
DEFAULT: "var(--secondary)",
|
|
26
|
+
foreground: "var(--secondary-foreground)",
|
|
27
|
+
},
|
|
28
|
+
destructive: {
|
|
29
|
+
DEFAULT: "var(--destructive)",
|
|
30
|
+
foreground: "var(--destructive-foreground)",
|
|
31
|
+
},
|
|
32
|
+
muted: {
|
|
33
|
+
DEFAULT: "var(--muted)",
|
|
34
|
+
foreground: "var(--muted-foreground)",
|
|
35
|
+
},
|
|
36
|
+
accent: {
|
|
37
|
+
DEFAULT: "var(--accent)",
|
|
38
|
+
foreground: "var(--accent-foreground)",
|
|
39
|
+
},
|
|
40
|
+
popover: {
|
|
41
|
+
DEFAULT: "var(--popover)",
|
|
42
|
+
foreground: "var(--popover-foreground)",
|
|
43
|
+
},
|
|
44
|
+
card: {
|
|
45
|
+
DEFAULT: "var(--card)",
|
|
46
|
+
foreground: "var(--card-foreground)",
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
borderRadius: {
|
|
50
|
+
lg: "var(--radius)",
|
|
51
|
+
md: "calc(var(--radius) - 2px)",
|
|
52
|
+
sm: "calc(var(--radius) - 4px)",
|
|
53
|
+
},
|
|
54
|
+
keyframes: {
|
|
55
|
+
"accordion-down": {
|
|
56
|
+
from: { height: "0" },
|
|
57
|
+
to: { height: "var(--radix-accordion-content-height)" },
|
|
58
|
+
},
|
|
59
|
+
"accordion-up": {
|
|
60
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
|
61
|
+
to: { height: "0" },
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
animation: {
|
|
65
|
+
"accordion-down": "accordion-down 0.2s ease-out",
|
|
66
|
+
"accordion-up": "accordion-up 0.2s ease-out",
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
plugins: [require("tailwindcss-animate")],
|
|
71
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
|
|
9
|
+
"moduleResolution": "bundler",
|
|
10
|
+
"allowImportingTsExtensions": true,
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"moduleDetection": "force",
|
|
13
|
+
"noEmit": true,
|
|
14
|
+
"jsx": "react-jsx",
|
|
15
|
+
|
|
16
|
+
"strict": true,
|
|
17
|
+
"noUnusedLocals": true,
|
|
18
|
+
"noUnusedParameters": true,
|
|
19
|
+
"noFallthroughCasesInSwitch": true,
|
|
20
|
+
"paths": {
|
|
21
|
+
"@/*": ["./src/*"]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"include": ["src"]
|
|
25
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"lib": ["ES2023"],
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"moduleResolution": "bundler",
|
|
8
|
+
"allowImportingTsExtensions": true,
|
|
9
|
+
"isolatedModules": true,
|
|
10
|
+
"moduleDetection": "force",
|
|
11
|
+
"noEmit": true,
|
|
12
|
+
"strict": true
|
|
13
|
+
},
|
|
14
|
+
"include": ["vite.config.ts"]
|
|
15
|
+
}
|
package/vite.config.ts
ADDED