@sehgaltech/psui 1.0.1 โ 1.0.2
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 +15 -49
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ A scalable and customizable UI library built with Tailwind CSS v4, TypeScript, a
|
|
|
7
7
|
- ๐จ **Tailwind CSS v4** - Modern CSS-first configuration with `@theme` blocks
|
|
8
8
|
- ๐ฆ **TypeScript** - Full type safety and excellent developer experience
|
|
9
9
|
- โก **tsup** - Fast and efficient builds with ESM/CJS dual output
|
|
10
|
-
- ๐ **
|
|
10
|
+
- ๐ **Documentation** - Custom interactive component documentation using Vite
|
|
11
11
|
- ๐งช **Vitest** - Fast unit testing with React Testing Library
|
|
12
12
|
- ๐ฏ **Tree-shakeable** - Optimized bundle size with side-effect free exports
|
|
13
13
|
- ๐จ **Customizable** - Easy theme customization via CSS variables
|
|
@@ -154,8 +154,8 @@ npm install
|
|
|
154
154
|
# Start development build in watch mode
|
|
155
155
|
npm run dev
|
|
156
156
|
|
|
157
|
-
# Run
|
|
158
|
-
npm run
|
|
157
|
+
# Run documentation site locally
|
|
158
|
+
cd docs && npm run dev
|
|
159
159
|
|
|
160
160
|
# Run tests
|
|
161
161
|
npm test
|
|
@@ -179,9 +179,9 @@ psui/
|
|
|
179
179
|
โ โ โโโ base.css # Tailwind import
|
|
180
180
|
โ โ โโโ theme.css # Theme tokens
|
|
181
181
|
โ โโโ types/ # TypeScript types
|
|
182
|
+
โ โโโ utils/ # Shared utilities
|
|
182
183
|
โ โโโ index.ts # Main entry point
|
|
183
|
-
โโโ
|
|
184
|
-
โโโ .storybook/ # Storybook config
|
|
184
|
+
โโโ docs/ # Custom Vite React documentation site
|
|
185
185
|
โโโ dist/ # Build output
|
|
186
186
|
```
|
|
187
187
|
|
|
@@ -237,28 +237,8 @@ export { MyComponent } from './components';
|
|
|
237
237
|
export type { MyComponentProps } from './components';
|
|
238
238
|
```
|
|
239
239
|
|
|
240
|
-
1. Create
|
|
240
|
+
1. Create a documentation page in `docs/src/pages/MyComponentPage.tsx` and add it to the routing in `docs/src/App.tsx`.
|
|
241
241
|
|
|
242
|
-
```tsx
|
|
243
|
-
// stories/MyComponent.stories.tsx
|
|
244
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
245
|
-
import { MyComponent } from '../src/components/MyComponent';
|
|
246
|
-
|
|
247
|
-
const meta: Meta<typeof MyComponent> = {
|
|
248
|
-
title: 'Components/MyComponent',
|
|
249
|
-
component: MyComponent,
|
|
250
|
-
tags: ['autodocs'],
|
|
251
|
-
};
|
|
252
|
-
|
|
253
|
-
export default meta;
|
|
254
|
-
type Story = StoryObj<typeof MyComponent>;
|
|
255
|
-
|
|
256
|
-
export const Default: Story = {
|
|
257
|
-
args: {
|
|
258
|
-
// Your args
|
|
259
|
-
},
|
|
260
|
-
};
|
|
261
|
-
```
|
|
262
242
|
|
|
263
243
|
## Building and Publishing
|
|
264
244
|
|
|
@@ -281,9 +261,9 @@ This generates:
|
|
|
281
261
|
2. Build the library: `npm run build`
|
|
282
262
|
3. Publish to npm: `npm publish`
|
|
283
263
|
|
|
284
|
-
## Deployment (
|
|
264
|
+
## Deployment (Documentation)
|
|
285
265
|
|
|
286
|
-
Deploy the component documentation (
|
|
266
|
+
Deploy the custom component documentation site (`docs/`) to Vercel so others can browse the library online.
|
|
287
267
|
|
|
288
268
|
### Prerequisites
|
|
289
269
|
|
|
@@ -292,30 +272,16 @@ Deploy the component documentation (Storybook) to Vercel so others can browse th
|
|
|
292
272
|
|
|
293
273
|
### Steps
|
|
294
274
|
|
|
295
|
-
1. **
|
|
296
|
-
From the project root:
|
|
297
|
-
Output is written to the `storybook-static` directory.
|
|
298
|
-
2. **Deploy via Vercel**
|
|
275
|
+
1. **Deploy via Vercel**
|
|
299
276
|
- In [Vercel](https://vercel.com): **Add New Project** โ import your repository.
|
|
300
277
|
- Configure the project:
|
|
301
|
-
- **
|
|
302
|
-
- **
|
|
303
|
-
- **
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
To fix build settings in the repo, add a `vercel.json` in the project root:
|
|
309
|
-
|
|
310
|
-
```json
|
|
311
|
-
{
|
|
312
|
-
"buildCommand": "npm run build-storybook",
|
|
313
|
-
"outputDirectory": "storybook-static",
|
|
314
|
-
"installCommand": "npm install"
|
|
315
|
-
}
|
|
316
|
-
```
|
|
278
|
+
- **Framework Preset:** Vite
|
|
279
|
+
- **Root Directory:** `docs`
|
|
280
|
+
- **Build Command:** `npm run build`
|
|
281
|
+
- **Output Directory:** `dist`
|
|
282
|
+
- **Install Command:** `npm install`
|
|
283
|
+
- Deploy. The published URL will serve your custom Vite React documentation site.
|
|
317
284
|
|
|
318
|
-
Then deploying from Git or the Vercel CLI will use these values automatically.
|
|
319
285
|
|
|
320
286
|
## TypeScript Support
|
|
321
287
|
|