shadcn-chart 0.1.0

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.
@@ -0,0 +1,124 @@
1
+ @import "tailwindcss";
2
+ @import "tw-animate-css";
3
+
4
+ @custom-variant dark (&:is(.dark *));
5
+
6
+ :root {
7
+ --background: oklch(1 0 0);
8
+ --foreground: oklch(0.145 0 0);
9
+ --card: oklch(1 0 0);
10
+ --card-foreground: oklch(0.145 0 0);
11
+ --popover: oklch(1 0 0);
12
+ --popover-foreground: oklch(0.145 0 0);
13
+ --primary: oklch(0.205 0 0);
14
+ --primary-foreground: oklch(0.985 0 0);
15
+ --secondary: oklch(0.97 0 0);
16
+ --secondary-foreground: oklch(0.205 0 0);
17
+ --muted: oklch(0.97 0 0);
18
+ --muted-foreground: oklch(0.556 0 0);
19
+ --accent: oklch(0.97 0 0);
20
+ --accent-foreground: oklch(0.205 0 0);
21
+ --destructive: oklch(0.577 0.245 27.325);
22
+ --destructive-foreground: oklch(0.577 0.245 27.325);
23
+ --border: oklch(0.922 0 0);
24
+ --input: oklch(0.922 0 0);
25
+ --ring: oklch(0.708 0 0);
26
+ --chart-1: oklch(0.646 0.222 41.116);
27
+ --chart-2: oklch(0.6 0.118 184.704);
28
+ --chart-3: oklch(0.398 0.07 227.392);
29
+ --chart-4: oklch(0.828 0.189 84.429);
30
+ --chart-5: oklch(0.769 0.188 70.08);
31
+ --radius: 0.625rem;
32
+ --sidebar: oklch(0.985 0 0);
33
+ --sidebar-foreground: oklch(0.145 0 0);
34
+ --sidebar-primary: oklch(0.205 0 0);
35
+ --sidebar-primary-foreground: oklch(0.985 0 0);
36
+ --sidebar-accent: oklch(0.97 0 0);
37
+ --sidebar-accent-foreground: oklch(0.205 0 0);
38
+ --sidebar-border: oklch(0.922 0 0);
39
+ --sidebar-ring: oklch(0.708 0 0);
40
+ }
41
+
42
+ .dark {
43
+ --background: oklch(0.145 0 0);
44
+ --foreground: oklch(0.985 0 0);
45
+ --card: oklch(0.145 0 0);
46
+ --card-foreground: oklch(0.985 0 0);
47
+ --popover: oklch(0.145 0 0);
48
+ --popover-foreground: oklch(0.985 0 0);
49
+ --primary: oklch(0.985 0 0);
50
+ --primary-foreground: oklch(0.205 0 0);
51
+ --secondary: oklch(0.269 0 0);
52
+ --secondary-foreground: oklch(0.985 0 0);
53
+ --muted: oklch(0.269 0 0);
54
+ --muted-foreground: oklch(0.708 0 0);
55
+ --accent: oklch(0.269 0 0);
56
+ --accent-foreground: oklch(0.985 0 0);
57
+ --destructive: oklch(0.396 0.141 25.723);
58
+ --destructive-foreground: oklch(0.637 0.237 25.331);
59
+ --border: oklch(0.269 0 0);
60
+ --input: oklch(0.269 0 0);
61
+ --ring: oklch(0.439 0 0);
62
+ --chart-1: oklch(0.488 0.243 264.376);
63
+ --chart-2: oklch(0.696 0.17 162.48);
64
+ --chart-3: oklch(0.769 0.188 70.08);
65
+ --chart-4: oklch(0.627 0.265 303.9);
66
+ --chart-5: oklch(0.645 0.246 16.439);
67
+ --sidebar: oklch(0.205 0 0);
68
+ --sidebar-foreground: oklch(0.985 0 0);
69
+ --sidebar-primary: oklch(0.488 0.243 264.376);
70
+ --sidebar-primary-foreground: oklch(0.985 0 0);
71
+ --sidebar-accent: oklch(0.269 0 0);
72
+ --sidebar-accent-foreground: oklch(0.985 0 0);
73
+ --sidebar-border: oklch(0.269 0 0);
74
+ --sidebar-ring: oklch(0.439 0 0);
75
+ }
76
+
77
+ @theme inline {
78
+ --color-background: var(--background);
79
+ --color-foreground: var(--foreground);
80
+ --color-card: var(--card);
81
+ --color-card-foreground: var(--card-foreground);
82
+ --color-popover: var(--popover);
83
+ --color-popover-foreground: var(--popover-foreground);
84
+ --color-primary: var(--primary);
85
+ --color-primary-foreground: var(--primary-foreground);
86
+ --color-secondary: var(--secondary);
87
+ --color-secondary-foreground: var(--secondary-foreground);
88
+ --color-muted: var(--muted);
89
+ --color-muted-foreground: var(--muted-foreground);
90
+ --color-accent: var(--accent);
91
+ --color-accent-foreground: var(--accent-foreground);
92
+ --color-destructive: var(--destructive);
93
+ --color-destructive-foreground: var(--destructive-foreground);
94
+ --color-border: var(--border);
95
+ --color-input: var(--input);
96
+ --color-ring: var(--ring);
97
+ --color-chart-1: var(--chart-1);
98
+ --color-chart-2: var(--chart-2);
99
+ --color-chart-3: var(--chart-3);
100
+ --color-chart-4: var(--chart-4);
101
+ --color-chart-5: var(--chart-5);
102
+ --radius-sm: calc(var(--radius) - 4px);
103
+ --radius-md: calc(var(--radius) - 2px);
104
+ --radius-lg: var(--radius);
105
+ --radius-xl: calc(var(--radius) + 4px);
106
+ --color-sidebar: var(--sidebar);
107
+ --color-sidebar-foreground: var(--sidebar-foreground);
108
+ --color-sidebar-primary: var(--sidebar-primary);
109
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
110
+ --color-sidebar-accent: var(--sidebar-accent);
111
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
112
+ --color-sidebar-border: var(--sidebar-border);
113
+ --color-sidebar-ring: var(--sidebar-ring);
114
+ }
115
+
116
+ @layer base {
117
+ * {
118
+ @apply border-border outline-ring/50;
119
+ }
120
+
121
+ body {
122
+ @apply bg-background text-foreground;
123
+ }
124
+ }
package/package.json ADDED
@@ -0,0 +1,75 @@
1
+ {
2
+ "name": "shadcn-chart",
3
+ "version": "0.1.0",
4
+ "description": "Headless and styled chart components built with shadcn/ui conventions",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.mjs",
12
+ "require": "./dist/index.js"
13
+ },
14
+ "./styles": "./dist/styles/global.css"
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "README.md"
19
+ ],
20
+ "sideEffects": [
21
+ "**/*.css"
22
+ ],
23
+ "scripts": {
24
+ "build": "tsup",
25
+ "dev": "tsup --watch",
26
+ "typecheck": "tsc --noEmit",
27
+ "prepublishOnly": "npm run build",
28
+ "test": "echo \"Error: no test specified\" && exit 1"
29
+ },
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/mnhtng/shadcn-chart.git"
33
+ },
34
+ "keywords": [
35
+ "shadcn",
36
+ "chart",
37
+ "react",
38
+ "ui",
39
+ "components",
40
+ "recharts",
41
+ "visualization"
42
+ ],
43
+ "author": "MnhTng",
44
+ "license": "MIT",
45
+ "bugs": {
46
+ "url": "https://github.com/mnhtng/shadcn-chart/issues"
47
+ },
48
+ "homepage": "https://github.com/mnhtng/shadcn-chart#readme",
49
+ "dependencies": {
50
+ "@radix-ui/react-slot": "^1.2.4",
51
+ "class-variance-authority": "^0.7.1",
52
+ "clsx": "^2.1.1",
53
+ "motion": "^12.24.0",
54
+ "tailwind-merge": "^3.4.0"
55
+ },
56
+ "peerDependencies": {
57
+ "lucide-react": "^0.400.0",
58
+ "react": "^18.0.0 || ^19.0.0",
59
+ "react-dom": "^18.0.0 || ^19.0.0",
60
+ "recharts": "^2.0.0"
61
+ },
62
+ "devDependencies": {
63
+ "@tailwindcss/postcss": "^4.1.18",
64
+ "@types/node": "^25.0.3",
65
+ "@types/react": "^19.2.7",
66
+ "@types/react-dom": "^19.2.3",
67
+ "lucide-react": "^0.562.0",
68
+ "react": "^19.2.3",
69
+ "react-dom": "^19.2.3",
70
+ "recharts": "^2.15.4",
71
+ "tailwindcss": "^4.1.18",
72
+ "tsup": "^8.3.5",
73
+ "typescript": "^5.9.3"
74
+ }
75
+ }