@bienui/core 0.1.13 โ†’ 1.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.
Files changed (2) hide show
  1. package/README.md +125 -116
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,66 +1,72 @@
1
- # Bien UI
1
+ # BienUI Core
2
2
 
3
- A production-ready, token-first React component library built with:
3
+ A production-ready, accessibility-first React component library built with:
4
4
 
5
- - **pnpm workspaces** for monorepo management
6
- - **TypeScript** for type safety
7
- - **Radix UI** primitives for accessibility
8
- - **vanilla-extract** for type-safe styling
5
+ - **TypeScript** for type safety and excellent DX
6
+ - **Radix UI** primitives for robust accessibility
7
+ - **Comprehensive Storybook** documentation with a11y testing
9
8
  - **Token-first theming** with light/dark modes + comfortable/compact density
10
- - **Storybook** for documentation
11
- - **tsup** for fast builds
12
- - **changesets** for versioning and publishing
9
+ - **Modern build system** with ESM/CJS dual output
10
+ - **CI/CD automation** for seamless publishing
13
11
 
14
- ## ๐Ÿ“ฆ Packages
12
+ ## ๐Ÿ“ฆ Installation
15
13
 
16
- - **`@bien/tokens`** - Design tokens (colors, spacing, typography, etc.)
17
- - **`@bien/ui`** - React component library
14
+ ```bash
15
+ npm install @bienui/core
16
+ # or
17
+ yarn add @bienui/core
18
+ # or
19
+ pnpm add @bienui/core
20
+ ```
18
21
 
19
- ## ๐Ÿš€ Quick Start
22
+ ## ๐Ÿš€ Development
20
23
 
21
- ### Installation
24
+ ### Quick Start
22
25
 
23
26
  ```bash
24
27
  # Install dependencies
25
- pnpm install
26
-
27
- # Build all packages
28
- pnpm build
28
+ yarn install
29
29
 
30
30
  # Start Storybook (development)
31
- pnpm storybook
31
+ yarn storybook
32
+
33
+ # Build library
34
+ yarn build:lib
32
35
  ```
33
36
 
34
37
  ### Build Commands
35
38
 
36
39
  ```bash
37
- # Build all packages in the workspace
38
- pnpm build
39
-
40
- # Build and watch for changes
41
- pnpm --filter @bien/tokens dev
42
- pnpm --filter @bien/ui dev
40
+ # Build the component library
41
+ yarn build:lib
43
42
 
44
43
  # Build Storybook for production
45
- pnpm build:storybook
44
+ yarn build-storybook
45
+
46
+ # Preview Vite build
47
+ yarn preview
46
48
  ```
47
49
 
48
50
  ### Development Commands
49
51
 
50
52
  ```bash
51
53
  # Run Storybook (development mode)
52
- pnpm dev
53
- # or
54
- pnpm storybook
54
+ yarn storybook
55
55
 
56
56
  # Lint code
57
- pnpm lint
57
+ yarn lint
58
+
59
+ # Fix linting issues
60
+ yarn lint:fix
58
61
 
59
62
  # Format code
60
- pnpm format
63
+ yarn format
61
64
 
62
65
  # Format check (CI)
63
- pnpm format:check
66
+ yarn format:check
67
+
68
+ # Dry run publish
69
+ yarn publish:dry
64
70
  ```
65
71
 
66
72
  ### Code Formatting (Auto-setup)
@@ -69,7 +75,7 @@ pnpm format:check
69
75
 
70
76
  - **On Commit**: Husky + lint-staged auto-formats staged files
71
77
  - **On Save**: VS Code auto-formats when you save (if you have Prettier extension)
72
- - **Manual**: Run `pnpm format` to format all files
78
+ - **Manual**: Run `yarn format` to format all files
73
79
 
74
80
  **Setup for new developers:**
75
81
  1. Install recommended VS Code extensions (prompted automatically)
@@ -85,19 +91,19 @@ pnpm format:check
85
91
  ### Versioning & Publishing
86
92
 
87
93
  ```bash
88
- # Create a changeset (describe your changes)
89
- pnpm changeset
94
+ # Manual version bumping
95
+ yarn version:patch # 1.0.0 -> 1.0.1
96
+ yarn version:minor # 1.0.0 -> 1.1.0
97
+ yarn version:major # 1.0.0 -> 2.0.0
90
98
 
91
- # Version packages based on changesets
92
- pnpm version-packages
99
+ # Build library
100
+ yarn build:lib
93
101
 
94
- # Build and publish packages to npm
95
- pnpm release
102
+ # Test publish (dry run)
103
+ yarn publish:dry
96
104
 
97
- # Manual version bumping
98
- npm run version:patch # 0.1.0 -> 0.1.1
99
- npm run version:minor # 0.1.0 -> 0.2.0
100
- npm run version:major # 0.1.0 -> 1.0.0
105
+ # Publish to npm (via GitHub Actions)
106
+ # Go to Actions -> Publish to NPM -> Run workflow
101
107
  ```
102
108
 
103
109
  ## ๐Ÿš€ Deployment & GitHub Pages
@@ -132,14 +138,18 @@ npm run deploy:storybook
132
138
  2. Set **Source** to "GitHub Actions"
133
139
  3. The workflow will handle the rest automatically
134
140
 
135
- **Live Storybook URL**: `https://<username>.github.io/<repository-name>/`
141
+ **Live Storybook URL**: `https://554-ventures.github.io/BienUI/`
136
142
 
137
- ## ๐Ÿ“š Using Bien UI in Your App
143
+ ## ๐Ÿ“š Using BienUI Core in Your App
138
144
 
139
- ### 1. Install packages
145
+ ### 1. Install package
140
146
 
141
147
  ```bash
142
- pnpm add @bien/tokens @bien/ui
148
+ npm install @bienui/core
149
+ # or
150
+ yarn add @bienui/core
151
+ # or
152
+ pnpm add @bienui/core
143
153
  ```
144
154
 
145
155
  ### 2. Setup providers and styles
@@ -147,8 +157,8 @@ pnpm add @bien/tokens @bien/ui
147
157
  In your app entry point (`main.tsx` or `App.tsx`):
148
158
 
149
159
  ```tsx
150
- import { BienProvider, TooltipProvider, ToastProvider } from '@bien/ui';
151
- import '@bien/tokens/styles.css';
160
+ import { BienProvider, TooltipProvider, ToastProvider } from '@bienui/core';
161
+ import '@bienui/core/styles';
152
162
 
153
163
  function App() {
154
164
  return (
@@ -166,7 +176,7 @@ function App() {
166
176
  ### 3. Use components
167
177
 
168
178
  ```tsx
169
- import { Button, Input, Card, Modal, Text } from '@bien/ui';
179
+ import { Button, Input, Card, Modal, Text } from '@bienui/core';
170
180
 
171
181
  function MyComponent() {
172
182
  return (
@@ -185,7 +195,7 @@ function MyComponent() {
185
195
 
186
196
  ```tsx
187
197
  import { useState } from 'react';
188
- import { BienProvider } from '@bien/ui';
198
+ import { BienProvider } from '@bienui/core';
189
199
 
190
200
  function App() {
191
201
  const [theme, setTheme] = useState<'light' | 'dark'>('light');
@@ -205,10 +215,10 @@ function App() {
205
215
  }
206
216
  ```
207
217
 
208
- ### Using tokens in custom components
218
+ ### Using design tokens in custom components
209
219
 
210
220
  ```tsx
211
- import { tokens } from '@bien/tokens';
221
+ import { tokens } from '@bienui/core';
212
222
  import { style } from '@vanilla-extract/css';
213
223
 
214
224
  export const myCustomStyle = style({
@@ -284,42 +294,30 @@ export const myCustomStyle = style({
284
294
  ## ๐Ÿ“‚ Project Structure
285
295
 
286
296
  ```
287
- bien-ui-monorepo/
288
- โ”œโ”€โ”€ .changeset/ # Changesets configuration
289
- โ”œโ”€โ”€ packages/
290
- โ”‚ โ”œโ”€โ”€ tokens/ # Design tokens package
291
- โ”‚ โ”‚ โ”œโ”€โ”€ src/
292
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ primitives.ts # Raw token values
293
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ contract.ts # Token contract
294
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ themes.ts # Light/dark themes
295
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ density.ts # Density variants
296
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ global.css.ts # Global styles
297
- โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ index.ts
298
- โ”‚ โ”‚ โ”œโ”€โ”€ package.json
299
- โ”‚ โ”‚ โ””โ”€โ”€ tsup.config.ts
300
- โ”‚ โ””โ”€โ”€ ui/ # Component library
301
- โ”‚ โ”œโ”€โ”€ src/
302
- โ”‚ โ”‚ โ”œโ”€โ”€ components/
303
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ Button/
304
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ Text/
305
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ Card/
306
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ Input/
307
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ Modal/
308
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ Tooltip/
309
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ Tabs/
310
- โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ Toast/
311
- โ”‚ โ”‚ โ”œโ”€โ”€ provider.tsx
312
- โ”‚ โ”‚ โ””โ”€โ”€ index.ts
313
- โ”‚ โ”œโ”€โ”€ package.json
314
- โ”‚ โ””โ”€โ”€ tsup.config.ts
315
- โ”œโ”€โ”€ apps/
316
- โ”‚ โ””โ”€โ”€ storybook/ # Storybook documentation
317
- โ”‚ โ”œโ”€โ”€ .storybook/
318
- โ”‚ โ”œโ”€โ”€ stories/
319
- โ”‚ โ””โ”€โ”€ package.json
320
- โ”œโ”€โ”€ package.json # Root package.json
321
- โ”œโ”€โ”€ pnpm-workspace.yaml # Workspace configuration
322
- โ”œโ”€โ”€ tsconfig.json # Shared TypeScript config
297
+ bienui-core/
298
+ โ”œโ”€โ”€ .github/
299
+ โ”‚ โ””โ”€โ”€ workflows/ # GitHub Actions
300
+ โ”‚ โ”œโ”€โ”€ deploy-storybook.yml
301
+ โ”‚ โ””โ”€โ”€ publish-npm.yml
302
+ โ”œโ”€โ”€ .storybook/ # Storybook configuration
303
+ โ”œโ”€โ”€ src/
304
+ โ”‚ โ”œโ”€โ”€ components/ # React components
305
+ โ”‚ โ”‚ โ”œโ”€โ”€ Display/ # Avatar, Badge, Card, Text, etc.
306
+ โ”‚ โ”‚ โ”œโ”€โ”€ Forms/ # Input, Checkbox, Select, etc.
307
+ โ”‚ โ”‚ โ”œโ”€โ”€ Interactive/ # Button, Menu, Panel, etc.
308
+ โ”‚ โ”‚ โ”œโ”€โ”€ Layout/ # Container, Grid, Stack, etc.
309
+ โ”‚ โ”‚ โ”œโ”€โ”€ Navigation/ # Breadcrumb, Header, Link, etc.
310
+ โ”‚ โ”‚ โ””โ”€โ”€ Feedback/ # Banner, Modal, Toast, etc.
311
+ โ”‚ โ”œโ”€โ”€ tokens/ # Design tokens
312
+ โ”‚ โ”‚ โ”œโ”€โ”€ primitives.ts # Raw token values
313
+ โ”‚ โ”‚ โ”œโ”€โ”€ themes.css.ts # Light/dark themes
314
+ โ”‚ โ”‚ โ””โ”€โ”€ index.ts
315
+ โ”‚ โ”œโ”€โ”€ provider.tsx # Main provider
316
+ โ”‚ โ””โ”€โ”€ index.ts
317
+ โ”œโ”€โ”€ stories/ # Storybook stories
318
+ โ”œโ”€โ”€ dist/ # Built output
319
+ โ”œโ”€โ”€ package.json
320
+ โ”œโ”€โ”€ vite.config.lib.ts # Library build config
323
321
  โ””โ”€โ”€ README.md
324
322
  ```
325
323
 
@@ -327,43 +325,53 @@ bien-ui-monorepo/
327
325
 
328
326
  ### Package Exports
329
327
 
330
- Both packages are configured with proper exports for ESM, CJS, and TypeScript:
328
+ The package is configured with proper exports for ESM, CJS, and TypeScript:
331
329
 
332
330
  ```json
333
331
  {
334
332
  "exports": {
335
333
  ".": {
336
- "import": "./dist/index.mjs",
337
- "require": "./dist/index.js",
338
- "types": "./dist/index.d.ts"
334
+ "types": "./dist/index.d.ts",
335
+ "import": "./dist/bien-ui.esm.js",
336
+ "require": "./dist/bien-ui.cjs.js"
339
337
  },
340
- "./styles.css": "./dist/index.css"
338
+ "./styles": "./dist/bien-ui.css"
341
339
  }
342
340
  }
343
341
  ```
344
342
 
345
343
  ### Peer Dependencies
346
344
 
347
- `@bien/ui` marks React as a peer dependency:
345
+ `@bienui/core` marks React as a peer dependency:
348
346
 
349
347
  ```json
350
348
  {
351
349
  "peerDependencies": {
352
- "react": "^18.0.0",
353
- "react-dom": "^18.0.0"
350
+ "react": "^17.0.0 || ^18.0.0",
351
+ "react-dom": "^17.0.0 || ^18.0.0"
354
352
  }
355
353
  }
356
354
  ```
357
355
 
358
356
  ## ๐Ÿงช Testing in Consuming Apps
359
357
 
360
- Before publishing, you can test the packages locally using pnpm link or by referencing the workspace:
358
+ Before publishing, you can test the package locally using npm/yarn link:
359
+
360
+ ```bash
361
+ # In BienUI Core project
362
+ yarn build:lib
363
+ yarn link
364
+
365
+ # In your test project
366
+ yarn link @bienui/core
367
+ ```
368
+
369
+ Or install directly from file:
361
370
 
362
371
  ```json
363
372
  {
364
373
  "dependencies": {
365
- "@bien/tokens": "workspace:*",
366
- "@bien/ui": "workspace:*"
374
+ "@bienui/core": "file:../path/to/BienUI"
367
375
  }
368
376
  }
369
377
  ```
@@ -373,40 +381,41 @@ Before publishing, you can test the packages locally using pnpm link or by refer
373
381
  Run Storybook to explore all components, variants, and usage examples:
374
382
 
375
383
  ```bash
376
- pnpm storybook
384
+ yarn storybook
377
385
  ```
378
386
 
379
387
  Storybook includes:
380
388
  - Interactive component playground
381
389
  - Auto-generated prop documentation
390
+ - Accessibility testing with @storybook/addon-a11y
382
391
  - Theme switcher (light/dark)
383
392
  - Density switcher (comfortable/compact)
384
393
  - Live code examples
385
394
 
386
395
  ## ๐Ÿšข Publishing Workflow
387
396
 
388
- 1. Make changes to packages
389
- 2. Create a changeset:
390
- ```bash
391
- pnpm changeset
392
- ```
393
- 3. Commit the changeset
394
- 4. When ready to release:
397
+ 1. Make changes to components
398
+ 2. Update version in package.json:
395
399
  ```bash
396
- pnpm version-packages # Updates versions
397
- pnpm release # Builds and publishes
400
+ yarn version:patch # or minor/major
398
401
  ```
402
+ 3. Commit and push changes
403
+ 4. Use GitHub Actions to publish:
404
+ - Go to **Actions** โ†’ **Publish to NPM**
405
+ - Click **Run workflow**
406
+ - Select version type and npm tag
407
+ - The workflow will build and publish automatically
399
408
 
400
409
  ## ๐Ÿ› ๏ธ Tech Stack
401
410
 
402
411
  - **React 18** - UI library
403
412
  - **TypeScript 5** - Type safety
404
- - **vanilla-extract** - Zero-runtime CSS-in-JS
405
- - **Radix UI** - Accessible component primitives
406
- - **tsup** - Fast TypeScript bundler
407
- - **Storybook 7** - Component documentation
408
- - **changesets** - Version management
409
- - **pnpm** - Fast, efficient package manager
413
+ - **Radix UI** - Accessible component primitives
414
+ - **Lucide React** - Icon library
415
+ - **Vite** - Fast build tool and dev server
416
+ - **Storybook 8** - Component documentation with a11y testing
417
+ - **GitHub Actions** - CI/CD automation
418
+ - **yarn** - Package manager
410
419
 
411
420
  ## ๐Ÿ“ License
412
421
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bienui/core",
3
- "version": "0.1.13",
4
- "description": "A comprehensive React component library with design tokens",
3
+ "version": "1.0.1",
4
+ "description": "Production-ready React component library with accessibility-first design, Radix UI primitives, and comprehensive Storybook documentation",
5
5
  "keywords": [
6
6
  "react",
7
7
  "components",