dan5py
commited on
Update to [email protected]
Browse files- components.json +15 -0
- index.html +1 -1
- package.json +1 -1
- pnpm-lock.yaml +1 -1
- src/components/ui/badge.tsx +4 -4
- src/components/ui/button.tsx +7 -6
- src/lib/utils.ts +4 -4
- src/styles/globals.css +45 -48
- tsconfig.json +1 -1
components.json
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
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 |
+
}
|
index.html
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<!DOCTYPE html>
|
2 |
-
<html lang="en" class="">
|
3 |
|
4 |
<head>
|
5 |
<meta charset="UTF-8" />
|
|
|
1 |
<!DOCTYPE html>
|
2 |
+
<html lang="en" class="dark">
|
3 |
|
4 |
<head>
|
5 |
<meta charset="UTF-8" />
|
package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
{
|
2 |
"name": "react-vite-ui",
|
3 |
"private": true,
|
4 |
-
"version": "0.1
|
5 |
"type": "module",
|
6 |
"scripts": {
|
7 |
"dev": "vite",
|
|
|
1 |
{
|
2 |
"name": "react-vite-ui",
|
3 |
"private": true,
|
4 |
+
"version": "0.2.1",
|
5 |
"type": "module",
|
6 |
"scripts": {
|
7 |
"dev": "vite",
|
pnpm-lock.yaml
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
lockfileVersion: '6.
|
2 |
|
3 |
settings:
|
4 |
autoInstallPeers: true
|
|
|
1 |
+
lockfileVersion: '6.1'
|
2 |
|
3 |
settings:
|
4 |
autoInstallPeers: true
|
src/components/ui/badge.tsx
CHANGED
@@ -4,16 +4,16 @@ import { cva, type VariantProps } from "class-variance-authority"
|
|
4 |
import { cn } from "@/lib/utils"
|
5 |
|
6 |
const badgeVariants = cva(
|
7 |
-
"inline-flex items-center
|
8 |
{
|
9 |
variants: {
|
10 |
variant: {
|
11 |
default:
|
12 |
-
"bg-primary hover:bg-primary/80
|
13 |
secondary:
|
14 |
-
"bg-secondary hover:bg-secondary/80
|
15 |
destructive:
|
16 |
-
"bg-destructive hover:bg-destructive/80
|
17 |
outline: "text-foreground",
|
18 |
},
|
19 |
},
|
|
|
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",
|
8 |
{
|
9 |
variants: {
|
10 |
variant: {
|
11 |
default:
|
12 |
+
"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
13 |
secondary:
|
14 |
+
"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
15 |
destructive:
|
16 |
+
"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
17 |
outline: "text-foreground",
|
18 |
},
|
19 |
},
|
src/components/ui/button.tsx
CHANGED
@@ -5,7 +5,7 @@ import { cva, type VariantProps } from "class-variance-authority"
|
|
5 |
import { cn } from "@/lib/utils"
|
6 |
|
7 |
const buttonVariants = cva(
|
8 |
-
"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:
|
9 |
{
|
10 |
variants: {
|
11 |
variant: {
|
@@ -13,16 +13,17 @@ const buttonVariants = cva(
|
|
13 |
destructive:
|
14 |
"bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
15 |
outline:
|
16 |
-
"border border-input hover:bg-accent hover:text-accent-foreground",
|
17 |
secondary:
|
18 |
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
19 |
ghost: "hover:bg-accent hover:text-accent-foreground",
|
20 |
-
link: "underline-offset-4 hover:underline
|
21 |
},
|
22 |
size: {
|
23 |
-
default: "h-10 py-2
|
24 |
-
sm: "h-9 px-3
|
25 |
-
lg: "h-11 px-8
|
|
|
26 |
},
|
27 |
},
|
28 |
defaultVariants: {
|
|
|
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: {
|
|
|
13 |
destructive:
|
14 |
"bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
15 |
outline:
|
16 |
+
"border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
17 |
secondary:
|
18 |
"bg-secondary text-secondary-foreground 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-10 px-4 py-2",
|
24 |
+
sm: "h-9 rounded-md px-3",
|
25 |
+
lg: "h-11 rounded-md px-8",
|
26 |
+
icon: "h-10 w-10",
|
27 |
},
|
28 |
},
|
29 |
defaultVariants: {
|
src/lib/utils.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
import { ClassValue, clsx } from
|
2 |
-
import { twMerge } from
|
3 |
-
|
4 |
export function cn(...inputs: ClassValue[]) {
|
5 |
-
return twMerge(clsx(inputs))
|
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 |
}
|
src/styles/globals.css
CHANGED
@@ -1,81 +1,78 @@
|
|
1 |
@tailwind base;
|
2 |
@tailwind components;
|
3 |
@tailwind utilities;
|
4 |
-
|
5 |
@layer base {
|
6 |
:root {
|
7 |
--background: 0 0% 100%;
|
8 |
-
--foreground: 222.2
|
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
|
15 |
-
|
16 |
--card: 0 0% 100%;
|
17 |
-
--card-foreground: 222.2
|
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
|
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:
|
41 |
-
--foreground:
|
42 |
-
|
43 |
-
--muted:
|
44 |
-
--muted-foreground: 215
|
45 |
-
|
46 |
-
--popover:
|
47 |
-
--popover-foreground:
|
48 |
-
|
49 |
-
--card:
|
50 |
-
--card-foreground:
|
51 |
-
|
52 |
-
--border:
|
53 |
-
--input:
|
54 |
-
|
55 |
--primary: 210 40% 98%;
|
56 |
-
--primary-foreground: 222.2 47.4%
|
57 |
-
|
58 |
-
--secondary:
|
59 |
--secondary-foreground: 210 40% 98%;
|
60 |
-
|
61 |
-
--accent:
|
62 |
-
--accent-foreground:
|
63 |
-
|
64 |
-
--destructive: 0
|
65 |
-
--destructive-foreground:
|
66 |
-
|
67 |
-
--ring:
|
68 |
-
|
69 |
-
--radius: 0.5rem;
|
70 |
}
|
71 |
}
|
72 |
-
|
73 |
@layer base {
|
74 |
* {
|
75 |
@apply border-border;
|
76 |
}
|
77 |
body {
|
78 |
@apply bg-background text-foreground;
|
79 |
-
font-feature-settings: 'rlig' 1, 'calt' 1;
|
80 |
}
|
81 |
-
}
|
|
|
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;
|
74 |
}
|
75 |
body {
|
76 |
@apply bg-background text-foreground;
|
|
|
77 |
}
|
78 |
+
}
|
tsconfig.json
CHANGED
@@ -21,7 +21,7 @@
|
|
21 |
"noFallthroughCasesInSwitch": true,
|
22 |
|
23 |
/* Paths */
|
24 |
-
"baseUrl": "
|
25 |
"paths": {
|
26 |
"@/*": ["src/*"]
|
27 |
}
|
|
|
21 |
"noFallthroughCasesInSwitch": true,
|
22 |
|
23 |
/* Paths */
|
24 |
+
"baseUrl": ".",
|
25 |
"paths": {
|
26 |
"@/*": ["src/*"]
|
27 |
}
|