@alkimi.org/ui-kit 0.1.4 → 0.1.6

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/README.md CHANGED
@@ -258,13 +258,55 @@ Run TypeScript type checking:
258
258
  npm run type-check
259
259
  ```
260
260
 
261
+ ### Storybook
262
+
263
+ View and develop components in isolation using Storybook:
264
+
265
+ ```bash
266
+ npm run storybook
267
+ ```
268
+
269
+ This will start Storybook on [http://localhost:6006](http://localhost:6006).
270
+
271
+ #### Building Storybook for Deployment
272
+
273
+ To build a static version of Storybook for deployment:
274
+
275
+ ```bash
276
+ npm run build-storybook
277
+ ```
278
+
279
+ This will generate a static site in the `storybook-static` directory that you can deploy to any static hosting service.
280
+
281
+ #### Deploying to Vercel
282
+
283
+ **Option 1: Using Vercel Dashboard (No Terminal Required)**
284
+
285
+ 1. Build Storybook locally: `npm run build-storybook`
286
+ 2. Go to [vercel.com](https://vercel.com) and log in
287
+ 3. Click "Add New..." → "Project"
288
+ 4. If this is your first time:
289
+ - Import your repository from GitHub/GitLab/Bitbucket
290
+ - In the project settings, configure:
291
+ - **Build Command**: `npm run build-storybook`
292
+ - **Output Directory**: `storybook-static`
293
+ - **Install Command**: `npm install`
294
+ 5. Click "Deploy"
295
+
296
+ Vercel will automatically deploy your Storybook and provide you with a URL. Every time you push to your main branch, Vercel will rebuild and redeploy automatically.
297
+
298
+ **Option 2: Using Vercel CLI**
299
+
300
+ 1. Build Storybook: `npm run build-storybook`
301
+ 2. Install Vercel CLI (if not already installed): `npm i -g vercel`
302
+ 3. Deploy: `vercel storybook-static`
303
+
261
304
  ## Publishing to npm
262
305
 
263
- 1. Update the package name in [package.json](package.json) to the npm scope (e.g., `@alkimi.org/ui-kit`)
264
- 2. Update the version number in [package.json](package.json) (e.g., from `0.1.2` to `0.1.3`)
265
- 3. Build the library: `npm run build`
266
- 4. Login to npm: `npm login`
267
- 5. Publish: `npm publish --access public`
306
+ 1. Update the version number in [package.json](package.json) (e.g., from `0.1.3` to `0.1.4`)
307
+ 2. Build the library: `npm run build`
308
+ 3. Login to npm (if not already logged in): `npm login`
309
+ 4. Publish: `npm publish`
268
310
 
269
311
  **Note:** Make sure to bump the version in [package.json](package.json) before publishing any changes to avoid conflicts with existing versions on npm.
270
312
 
package/README.npm.md ADDED
@@ -0,0 +1,197 @@
1
+ # Alkimi UI Kit
2
+
3
+ A React component library built with [shadcn/ui](https://ui.shadcn.com/) and [Tailwind CSS](https://tailwindcss.com/).
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @alkimi.org/ui-kit
9
+ ```
10
+
11
+ ## Setup
12
+
13
+ ### 1. Install Tailwind CSS
14
+
15
+ If you haven't already, install Tailwind CSS in your project:
16
+
17
+ ```bash
18
+ npm install -D tailwindcss postcss autoprefixer
19
+ npx tailwindcss init -p
20
+ ```
21
+
22
+ ### 2. Configure Tailwind
23
+
24
+ Update your `tailwind.config.js` to include the library's content:
25
+
26
+ ```js
27
+ /** @type {import('tailwindcss').Config} */
28
+ module.exports = {
29
+ darkMode: ["class"],
30
+ content: [
31
+ "./src/**/*.{js,jsx,ts,tsx}",
32
+ "./node_modules/@alkimi/ui-kit/dist/**/*.{js,mjs}",
33
+ ],
34
+ theme: {
35
+ extend: {
36
+ colors: {
37
+ border: "hsl(var(--border))",
38
+ input: "hsl(var(--input))",
39
+ ring: "hsl(var(--ring))",
40
+ background: "hsl(var(--background))",
41
+ foreground: "hsl(var(--foreground))",
42
+ primary: {
43
+ DEFAULT: "hsl(var(--primary))",
44
+ foreground: "hsl(var(--primary-foreground))",
45
+ },
46
+ secondary: {
47
+ DEFAULT: "hsl(var(--secondary))",
48
+ foreground: "hsl(var(--secondary-foreground))",
49
+ },
50
+ destructive: {
51
+ DEFAULT: "hsl(var(--destructive))",
52
+ foreground: "hsl(var(--destructive-foreground))",
53
+ },
54
+ muted: {
55
+ DEFAULT: "hsl(var(--muted))",
56
+ foreground: "hsl(var(--muted-foreground))",
57
+ },
58
+ accent: {
59
+ DEFAULT: "hsl(var(--accent))",
60
+ foreground: "hsl(var(--accent-foreground))",
61
+ },
62
+ popover: {
63
+ DEFAULT: "hsl(var(--popover))",
64
+ foreground: "hsl(var(--popover-foreground))",
65
+ },
66
+ card: {
67
+ DEFAULT: "hsl(var(--card))",
68
+ foreground: "hsl(var(--card-foreground))",
69
+ },
70
+ },
71
+ borderRadius: {
72
+ lg: "var(--radius)",
73
+ md: "calc(var(--radius) - 2px)",
74
+ sm: "calc(var(--radius) - 4px)",
75
+ },
76
+ },
77
+ },
78
+ plugins: [require("tailwindcss-animate")],
79
+ }
80
+ ```
81
+
82
+ ### 3. Import Styles
83
+
84
+ Import the library's CSS in your main application file (e.g., `App.tsx` or `index.tsx`):
85
+
86
+ ```tsx
87
+ import "@alkimi.org/ui-kit/styles.css"
88
+ ```
89
+
90
+ Or if you prefer, add the CSS variables to your own CSS file:
91
+
92
+ ```css
93
+ @layer base {
94
+ :root {
95
+ --background: 0 0% 100%;
96
+ --foreground: 222.2 84% 4.9%;
97
+ --card: 0 0% 100%;
98
+ --card-foreground: 222.2 84% 4.9%;
99
+ --popover: 0 0% 100%;
100
+ --popover-foreground: 222.2 84% 4.9%;
101
+ --primary: 222.2 47.4% 11.2%;
102
+ --primary-foreground: 210 40% 98%;
103
+ --secondary: 210 40% 96.1%;
104
+ --secondary-foreground: 222.2 47.4% 11.2%;
105
+ --muted: 210 40% 96.1%;
106
+ --muted-foreground: 215.4 16.3% 46.9%;
107
+ --accent: 210 40% 96.1%;
108
+ --accent-foreground: 222.2 47.4% 11.2%;
109
+ --destructive: 0 84.2% 60.2%;
110
+ --destructive-foreground: 210 40% 98%;
111
+ --border: 214.3 31.8% 91.4%;
112
+ --input: 214.3 31.8% 91.4%;
113
+ --ring: 222.2 84% 4.9%;
114
+ --radius: 0.5rem;
115
+ }
116
+
117
+ .dark {
118
+ --background: 222.2 84% 4.9%;
119
+ --foreground: 210 40% 98%;
120
+ --card: 222.2 84% 4.9%;
121
+ --card-foreground: 210 40% 98%;
122
+ --popover: 222.2 84% 4.9%;
123
+ --popover-foreground: 210 40% 98%;
124
+ --primary: 210 40% 98%;
125
+ --primary-foreground: 222.2 47.4% 11.2%;
126
+ --secondary: 217.2 32.6% 17.5%;
127
+ --secondary-foreground: 210 40% 98%;
128
+ --muted: 217.2 32.6% 17.5%;
129
+ --muted-foreground: 215 20.2% 65.1%;
130
+ --accent: 217.2 32.6% 17.5%;
131
+ --accent-foreground: 210 40% 98%;
132
+ --destructive: 0 62.8% 30.6%;
133
+ --destructive-foreground: 210 40% 98%;
134
+ --border: 217.2 32.6% 17.5%;
135
+ --input: 217.2 32.6% 17.5%;
136
+ --ring: 212.7 26.8% 83.9%;
137
+ }
138
+ }
139
+ ```
140
+
141
+ ## Usage
142
+
143
+ ### Button Component
144
+
145
+ ```tsx
146
+ import { Button } from "@alkimi/ui-kit"
147
+
148
+ function App() {
149
+ return (
150
+ <div>
151
+ <Button>Click me</Button>
152
+ <Button variant="secondary">Secondary</Button>
153
+ <Button variant="destructive">Delete</Button>
154
+ <Button variant="outline">Outline</Button>
155
+ <Button variant="ghost">Ghost</Button>
156
+ <Button variant="link">Link</Button>
157
+ <Button size="sm">Small</Button>
158
+ <Button size="lg">Large</Button>
159
+ </div>
160
+ )
161
+ }
162
+ ```
163
+
164
+ ### Card Component
165
+
166
+ ```tsx
167
+ import {
168
+ Card,
169
+ CardHeader,
170
+ CardTitle,
171
+ CardDescription,
172
+ CardContent,
173
+ CardFooter,
174
+ Button,
175
+ } from "@alkimi/ui-kit"
176
+
177
+ function App() {
178
+ return (
179
+ <Card>
180
+ <CardHeader>
181
+ <CardTitle>Card Title</CardTitle>
182
+ <CardDescription>Card Description</CardDescription>
183
+ </CardHeader>
184
+ <CardContent>
185
+ <p>Card Content</p>
186
+ </CardContent>
187
+ <CardFooter>
188
+ <Button>Action</Button>
189
+ </CardFooter>
190
+ </Card>
191
+ )
192
+ }
193
+ ```
194
+
195
+ ## License
196
+
197
+ MIT
package/dist/README.md ADDED
@@ -0,0 +1,197 @@
1
+ # Alkimi UI Kit
2
+
3
+ A React component library built with [shadcn/ui](https://ui.shadcn.com/) and [Tailwind CSS](https://tailwindcss.com/).
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @alkimi.org/ui-kit
9
+ ```
10
+
11
+ ## Setup
12
+
13
+ ### 1. Install Tailwind CSS
14
+
15
+ If you haven't already, install Tailwind CSS in your project:
16
+
17
+ ```bash
18
+ npm install -D tailwindcss postcss autoprefixer
19
+ npx tailwindcss init -p
20
+ ```
21
+
22
+ ### 2. Configure Tailwind
23
+
24
+ Update your `tailwind.config.js` to include the library's content:
25
+
26
+ ```js
27
+ /** @type {import('tailwindcss').Config} */
28
+ module.exports = {
29
+ darkMode: ["class"],
30
+ content: [
31
+ "./src/**/*.{js,jsx,ts,tsx}",
32
+ "./node_modules/@alkimi/ui-kit/dist/**/*.{js,mjs}",
33
+ ],
34
+ theme: {
35
+ extend: {
36
+ colors: {
37
+ border: "hsl(var(--border))",
38
+ input: "hsl(var(--input))",
39
+ ring: "hsl(var(--ring))",
40
+ background: "hsl(var(--background))",
41
+ foreground: "hsl(var(--foreground))",
42
+ primary: {
43
+ DEFAULT: "hsl(var(--primary))",
44
+ foreground: "hsl(var(--primary-foreground))",
45
+ },
46
+ secondary: {
47
+ DEFAULT: "hsl(var(--secondary))",
48
+ foreground: "hsl(var(--secondary-foreground))",
49
+ },
50
+ destructive: {
51
+ DEFAULT: "hsl(var(--destructive))",
52
+ foreground: "hsl(var(--destructive-foreground))",
53
+ },
54
+ muted: {
55
+ DEFAULT: "hsl(var(--muted))",
56
+ foreground: "hsl(var(--muted-foreground))",
57
+ },
58
+ accent: {
59
+ DEFAULT: "hsl(var(--accent))",
60
+ foreground: "hsl(var(--accent-foreground))",
61
+ },
62
+ popover: {
63
+ DEFAULT: "hsl(var(--popover))",
64
+ foreground: "hsl(var(--popover-foreground))",
65
+ },
66
+ card: {
67
+ DEFAULT: "hsl(var(--card))",
68
+ foreground: "hsl(var(--card-foreground))",
69
+ },
70
+ },
71
+ borderRadius: {
72
+ lg: "var(--radius)",
73
+ md: "calc(var(--radius) - 2px)",
74
+ sm: "calc(var(--radius) - 4px)",
75
+ },
76
+ },
77
+ },
78
+ plugins: [require("tailwindcss-animate")],
79
+ }
80
+ ```
81
+
82
+ ### 3. Import Styles
83
+
84
+ Import the library's CSS in your main application file (e.g., `App.tsx` or `index.tsx`):
85
+
86
+ ```tsx
87
+ import "@alkimi.org/ui-kit/styles.css"
88
+ ```
89
+
90
+ Or if you prefer, add the CSS variables to your own CSS file:
91
+
92
+ ```css
93
+ @layer base {
94
+ :root {
95
+ --background: 0 0% 100%;
96
+ --foreground: 222.2 84% 4.9%;
97
+ --card: 0 0% 100%;
98
+ --card-foreground: 222.2 84% 4.9%;
99
+ --popover: 0 0% 100%;
100
+ --popover-foreground: 222.2 84% 4.9%;
101
+ --primary: 222.2 47.4% 11.2%;
102
+ --primary-foreground: 210 40% 98%;
103
+ --secondary: 210 40% 96.1%;
104
+ --secondary-foreground: 222.2 47.4% 11.2%;
105
+ --muted: 210 40% 96.1%;
106
+ --muted-foreground: 215.4 16.3% 46.9%;
107
+ --accent: 210 40% 96.1%;
108
+ --accent-foreground: 222.2 47.4% 11.2%;
109
+ --destructive: 0 84.2% 60.2%;
110
+ --destructive-foreground: 210 40% 98%;
111
+ --border: 214.3 31.8% 91.4%;
112
+ --input: 214.3 31.8% 91.4%;
113
+ --ring: 222.2 84% 4.9%;
114
+ --radius: 0.5rem;
115
+ }
116
+
117
+ .dark {
118
+ --background: 222.2 84% 4.9%;
119
+ --foreground: 210 40% 98%;
120
+ --card: 222.2 84% 4.9%;
121
+ --card-foreground: 210 40% 98%;
122
+ --popover: 222.2 84% 4.9%;
123
+ --popover-foreground: 210 40% 98%;
124
+ --primary: 210 40% 98%;
125
+ --primary-foreground: 222.2 47.4% 11.2%;
126
+ --secondary: 217.2 32.6% 17.5%;
127
+ --secondary-foreground: 210 40% 98%;
128
+ --muted: 217.2 32.6% 17.5%;
129
+ --muted-foreground: 215 20.2% 65.1%;
130
+ --accent: 217.2 32.6% 17.5%;
131
+ --accent-foreground: 210 40% 98%;
132
+ --destructive: 0 62.8% 30.6%;
133
+ --destructive-foreground: 210 40% 98%;
134
+ --border: 217.2 32.6% 17.5%;
135
+ --input: 217.2 32.6% 17.5%;
136
+ --ring: 212.7 26.8% 83.9%;
137
+ }
138
+ }
139
+ ```
140
+
141
+ ## Usage
142
+
143
+ ### Button Component
144
+
145
+ ```tsx
146
+ import { Button } from "@alkimi/ui-kit"
147
+
148
+ function App() {
149
+ return (
150
+ <div>
151
+ <Button>Click me</Button>
152
+ <Button variant="secondary">Secondary</Button>
153
+ <Button variant="destructive">Delete</Button>
154
+ <Button variant="outline">Outline</Button>
155
+ <Button variant="ghost">Ghost</Button>
156
+ <Button variant="link">Link</Button>
157
+ <Button size="sm">Small</Button>
158
+ <Button size="lg">Large</Button>
159
+ </div>
160
+ )
161
+ }
162
+ ```
163
+
164
+ ### Card Component
165
+
166
+ ```tsx
167
+ import {
168
+ Card,
169
+ CardHeader,
170
+ CardTitle,
171
+ CardDescription,
172
+ CardContent,
173
+ CardFooter,
174
+ Button,
175
+ } from "@alkimi/ui-kit"
176
+
177
+ function App() {
178
+ return (
179
+ <Card>
180
+ <CardHeader>
181
+ <CardTitle>Card Title</CardTitle>
182
+ <CardDescription>Card Description</CardDescription>
183
+ </CardHeader>
184
+ <CardContent>
185
+ <p>Card Content</p>
186
+ </CardContent>
187
+ <CardFooter>
188
+ <Button>Action</Button>
189
+ </CardFooter>
190
+ </Card>
191
+ )
192
+ }
193
+ ```
194
+
195
+ ## License
196
+
197
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alkimi.org/ui-kit",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "A React component library built with shadcn/ui and Tailwind CSS",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -17,9 +17,11 @@
17
17
  "dist"
18
18
  ],
19
19
  "scripts": {
20
- "build": "tsup && cp dist/index.css dist/styles.css && cp dist/index.css.map dist/styles.css.map",
20
+ "build": "tsup && cp dist/index.css dist/styles.css && cp dist/index.css.map dist/styles.css.map && cp README.npm.md dist/README.md",
21
21
  "dev": "tsup --watch",
22
22
  "type-check": "tsc --noEmit",
23
+ "storybook": "storybook dev -p 6006",
24
+ "build-storybook": "storybook build",
23
25
  "prepublishOnly": "npm run build"
24
26
  },
25
27
  "keywords": [
@@ -44,6 +46,13 @@
44
46
  "react-dom": "^18.0.0 || ^19.0.0"
45
47
  },
46
48
  "devDependencies": {
49
+ "@storybook/addon-essentials": "^8.6.14",
50
+ "@storybook/addon-interactions": "^8.6.14",
51
+ "@storybook/addon-links": "^8.6.14",
52
+ "@storybook/blocks": "^8.6.14",
53
+ "@storybook/react": "^8.6.14",
54
+ "@storybook/react-vite": "^8.6.14",
55
+ "@storybook/test": "^8.6.14",
47
56
  "@types/node": "^20.10.0",
48
57
  "@types/react": "^18.2.45",
49
58
  "@types/react-dom": "^18.2.18",
@@ -51,10 +60,12 @@
51
60
  "postcss": "^8.4.32",
52
61
  "react": "^18.2.0",
53
62
  "react-dom": "^18.2.0",
63
+ "storybook": "^8.6.14",
54
64
  "tailwindcss": "^3.4.0",
55
65
  "tailwindcss-animate": "^1.0.7",
56
66
  "tsup": "^8.0.1",
57
- "typescript": "^5.3.3"
67
+ "typescript": "^5.3.3",
68
+ "vite": "^5.4.21"
58
69
  },
59
70
  "dependencies": {
60
71
  "@radix-ui/react-slot": "^1.0.2",