hans-ui-design-lib 0.0.35 → 0.0.37
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 +20 -8
- package/dist/index.d.ts +4 -3
- package/package.json +8 -5
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Hans UI Design Library
|
|
2
2
|
|
|
3
|
-
A **React + TypeScript
|
|
3
|
+
A **React + TypeScript Component Library** that serves as the base design system for personal projects.
|
|
4
4
|
This library provides reusable, styled and documented UI components with a consistent structure and best practices.
|
|
5
5
|
|
|
6
6
|
## 🚀 Features
|
|
7
7
|
|
|
8
|
-
- ⚛️ **React 19** with **TypeScript** for type safety
|
|
8
|
+
- ⚛️ **React 19.1.1** with **TypeScript 5.8.3** for type safety
|
|
9
9
|
- 🎨 **TailwindCSS + SCSS** for styling flexibility
|
|
10
10
|
- 📖 **Storybook** for interactive component documentation
|
|
11
11
|
- ✅ **Vitest + React Testing Library + JSDOM** for unit and integration testing
|
|
@@ -65,7 +65,7 @@ npm run dev
|
|
|
65
65
|
Run tests:
|
|
66
66
|
|
|
67
67
|
```bash
|
|
68
|
-
npm test
|
|
68
|
+
npm run test
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
Run tests with coverage:
|
|
@@ -86,6 +86,12 @@ Build the package:
|
|
|
86
86
|
npm run build
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
+
Start the server:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npm run start
|
|
93
|
+
```
|
|
94
|
+
|
|
89
95
|
## 🚢 Exporting
|
|
90
96
|
|
|
91
97
|
When developing a component, to export it to the lib, you can add those lines into the files:
|
|
@@ -135,8 +141,8 @@ UPDATE-TYPES: patch | minor | major
|
|
|
135
141
|
|
|
136
142
|
## 🛠️ Tech Stack
|
|
137
143
|
|
|
138
|
-
- **React 19**
|
|
139
|
-
- **TypeScript**
|
|
144
|
+
- **React 19.1.1**
|
|
145
|
+
- **TypeScript 5.8.3**
|
|
140
146
|
- **Vite**
|
|
141
147
|
- **Storybook**
|
|
142
148
|
- **TailwindCSS**
|
|
@@ -149,8 +155,8 @@ UPDATE-TYPES: patch | minor | major
|
|
|
149
155
|
|
|
150
156
|
## 📜 History of commands used to build this project:
|
|
151
157
|
|
|
152
|
-
```
|
|
153
|
-
npm create vite@latest
|
|
158
|
+
```bash
|
|
159
|
+
npm create vite@latest hans-ui-design-lib -- --template react-ts
|
|
154
160
|
|
|
155
161
|
npm i -D eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-config-prettier eslint-plugin-react eslint-plugin-react-hooks prettier
|
|
156
162
|
|
|
@@ -160,7 +166,13 @@ npx storybook@latest init --builder @storybook/builder-vite
|
|
|
160
166
|
|
|
161
167
|
npm i -D vitest @testing-library/react @testing-library/jest-dom @types/testing-library\_\_jest-dom jsdom
|
|
162
168
|
|
|
169
|
+
npm i -D @vitest/coverage-v8 @vitest/ui
|
|
170
|
+
|
|
163
171
|
npm i -D sass
|
|
164
172
|
|
|
165
|
-
npm i react-icons
|
|
173
|
+
npm i -D react-icons
|
|
174
|
+
|
|
175
|
+
npm i -D @originjs/vite-plugin-federation
|
|
176
|
+
|
|
177
|
+
npm i -D react-to-webcomponent
|
|
166
178
|
```
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { default as default_2 } from 'react';
|
|
1
|
+
import { default as default_2 } from '../../../../node_modules/react';
|
|
2
|
+
import { default as default_3 } from '../../../node_modules/react';
|
|
2
3
|
import { JSX } from 'react/jsx-runtime';
|
|
3
4
|
|
|
4
5
|
export declare const Button: default_2.MemoExoticComponent<(props: ButtonProps) => JSX.Element>;
|
|
@@ -18,9 +19,9 @@ declare type Color = 'primary' | 'secondary' | 'success' | 'danger' | 'warning'
|
|
|
18
19
|
|
|
19
20
|
export declare const DynamicIconImports: Record<string, () => Promise<IconLibrary>>;
|
|
20
21
|
|
|
21
|
-
export declare const Icon:
|
|
22
|
+
export declare const Icon: default_3.FC<IconProps>;
|
|
22
23
|
|
|
23
|
-
export declare type IconLibrary = Record<string,
|
|
24
|
+
export declare type IconLibrary = Record<string, default_3.ComponentType<default_3.SVGProps<SVGSVGElement>>>;
|
|
24
25
|
|
|
25
26
|
export declare interface IconProps {
|
|
26
27
|
name?: string;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "hans-ui-design-lib",
|
|
3
3
|
"description": "UI Design System Base Lib",
|
|
4
4
|
"author": "Victor Hanszman",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.37",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "dist/index.cjs.js",
|
|
@@ -31,9 +31,10 @@
|
|
|
31
31
|
"start": "vite",
|
|
32
32
|
"preview": "vite preview",
|
|
33
33
|
"storybook": "storybook dev -p 6006",
|
|
34
|
-
"build-storybook": "storybook build",
|
|
35
|
-
"build": "vite build && npm run copy:assets",
|
|
36
34
|
"copy:assets": "cpx \"src/assets/**/*\" dist/assets",
|
|
35
|
+
"build": "vite build && npm run copy:assets",
|
|
36
|
+
"build-storybook": "storybook build",
|
|
37
|
+
"build-cdn": "vite --config vite-mf.config.ts build",
|
|
37
38
|
"publish:patch": "npm version patch --no-git-tag-version && npm publish",
|
|
38
39
|
"publish:minor": "npm version minor --no-git-tag-version && npm publish",
|
|
39
40
|
"publish:major": "npm version major --no-git-tag-version && npm publish",
|
|
@@ -59,14 +60,15 @@
|
|
|
59
60
|
"devDependencies": {
|
|
60
61
|
"@chromatic-com/storybook": "^4.1.1",
|
|
61
62
|
"@eslint/js": "^9.36.0",
|
|
63
|
+
"@originjs/vite-plugin-federation": "^1.4.1",
|
|
62
64
|
"@storybook/addon-a11y": "^9.1.8",
|
|
63
65
|
"@storybook/addon-docs": "^9.1.8",
|
|
64
66
|
"@storybook/react-vite": "^9.1.8",
|
|
65
67
|
"@tailwindcss/vite": "^4.1.14",
|
|
66
68
|
"@testing-library/jest-dom": "^6.8.0",
|
|
67
69
|
"@testing-library/react": "^16.3.0",
|
|
68
|
-
"@types/react": "^19.
|
|
69
|
-
"@types/react-dom": "^19.
|
|
70
|
+
"@types/react": "^19.2.2",
|
|
71
|
+
"@types/react-dom": "^19.2.2",
|
|
70
72
|
"@types/testing-library__jest-dom": "^5.14.9",
|
|
71
73
|
"@typescript-eslint/eslint-plugin": "^8.44.1",
|
|
72
74
|
"@typescript-eslint/parser": "^8.44.1",
|
|
@@ -87,6 +89,7 @@
|
|
|
87
89
|
"playwright": "^1.55.1",
|
|
88
90
|
"prettier": "^3.6.2",
|
|
89
91
|
"react-icons": "^5.5.0",
|
|
92
|
+
"react-to-webcomponent": "^2.0.1",
|
|
90
93
|
"sass": "^1.93.2",
|
|
91
94
|
"storybook": "^9.1.8",
|
|
92
95
|
"tailwindcss": "^4.1.14",
|