@kubit-ui-web/react-components 2.0.0-beta.1 → 2.0.0-beta.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 +320 -46
- package/dist/cjs/lib/provider/cssProvider/stats/stats.js +1 -1
- package/dist/esm/lib/provider/cssProvider/stats/stats.js +1 -1
- package/package.json +21 -5
- package/dist/cjs/lib/designSystem/kubit/css/kubit.css +0 -1683
- package/dist/cjs/lib/designSystem/kubit/css/kubit.min.css +0 -1
- package/dist/cjs/node_modules/react/cjs/react-jsx-runtime.production.min.js +0 -1
- package/dist/cjs/node_modules/react/jsx-runtime.js +0 -1
- package/dist/esm/lib/designSystem/kubit/css/kubit.css +0 -1683
- package/dist/esm/lib/designSystem/kubit/css/kubit.min.css +0 -1
- package/dist/esm/node_modules/react/cjs/react-jsx-runtime.production.min.js +0 -1
- package/dist/esm/node_modules/react/jsx-runtime.js +0 -1
package/README.md
CHANGED
|
@@ -7,16 +7,20 @@
|
|
|
7
7
|
</a>
|
|
8
8
|
</p>
|
|
9
9
|
|
|
10
|
-
<div align=
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
<div align="center">
|
|
11
|
+
|
|
12
|
+
[](https://www.npmjs.com/package/@kubit-ui-web/react-components)
|
|
13
|
+
[](https://www.npmjs.com/package/@kubit-ui-web/react-components)
|
|
14
|
+
[](https://bundlephobia.com/package/@kubit-ui-web/react-components)
|
|
15
|
+
|
|
16
|
+
[](./LICENSE.md)
|
|
17
|
+
[](https://github.com/kubit-ui/kubit-react-components/stargazers)
|
|
18
|
+
[](https://github.com/kubit-ui/kubit-react-components/issues)
|
|
19
|
+
|
|
20
|
+
[](https://www.typescriptlang.org/)
|
|
21
|
+
[](https://reactjs.org/)
|
|
22
|
+
[](https://storybook.js.org/)
|
|
23
|
+
|
|
20
24
|
</div>
|
|
21
25
|
|
|
22
26
|
<br />
|
|
@@ -27,9 +31,23 @@
|
|
|
27
31
|
|
|
28
32
|
# Getting Started
|
|
29
33
|
|
|
34
|
+
> **Kubit React Components** is a customizable, accessible library of React web components, designed to enhance your application's user experience with production-ready components.
|
|
35
|
+
|
|
36
|
+
## 📋 Table of Contents
|
|
37
|
+
|
|
38
|
+
- [Installation](#installation)
|
|
39
|
+
- [Quick Start](#quick-start)
|
|
40
|
+
- [Usage](#usage)
|
|
41
|
+
- [Documentation](#documentation)
|
|
42
|
+
- [Storybook](#storybook)
|
|
43
|
+
- [Features](#features)
|
|
44
|
+
- [Browser Support](#browser-support)
|
|
45
|
+
- [Contributing](#contributing)
|
|
46
|
+
- [License](#license)
|
|
47
|
+
|
|
30
48
|
## Installation
|
|
31
49
|
|
|
32
|
-
|
|
50
|
+
Install the package using your preferred package manager:
|
|
33
51
|
|
|
34
52
|
### npm
|
|
35
53
|
|
|
@@ -43,16 +61,33 @@ npm install @kubit-ui-web/react-components
|
|
|
43
61
|
yarn add @kubit-ui-web/react-components
|
|
44
62
|
```
|
|
45
63
|
|
|
46
|
-
|
|
64
|
+
### pnpm
|
|
47
65
|
|
|
48
|
-
|
|
66
|
+
```bash
|
|
67
|
+
pnpm add @kubit-ui-web/react-components
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Package Info:**
|
|
71
|
+
|
|
72
|
+
- 📦 Size: ~235 KB (gzipped)
|
|
73
|
+
- 🎯 Tree-shakeable: Yes
|
|
74
|
+
- 📘 TypeScript: Full support
|
|
75
|
+
- ⚛️ React: 17+ and 18+
|
|
76
|
+
|
|
77
|
+
## Quick Start
|
|
78
|
+
|
|
79
|
+
Import and use components in your application:
|
|
80
|
+
|
|
81
|
+
## Quick Start
|
|
49
82
|
|
|
50
|
-
|
|
83
|
+
Import and use components in your application:
|
|
51
84
|
|
|
52
85
|
```tsx
|
|
53
|
-
import { Button, KubitProvider } from '@kubit-ui-web/react-components';
|
|
54
86
|
import React from 'react';
|
|
55
87
|
|
|
88
|
+
import { Button, KubitProvider } from '@kubit-ui-web/react-components';
|
|
89
|
+
import '@kubit-ui-web/react-components/styles/default/default.min.css';
|
|
90
|
+
|
|
56
91
|
const App = () => {
|
|
57
92
|
return (
|
|
58
93
|
<KubitProvider>
|
|
@@ -66,74 +101,313 @@ const App = () => {
|
|
|
66
101
|
export default App;
|
|
67
102
|
```
|
|
68
103
|
|
|
69
|
-
|
|
104
|
+
> **Note:** The `KubitProvider` is required to use the components. It provides the theme and other context.
|
|
105
|
+
|
|
106
|
+
## Usage
|
|
107
|
+
|
|
108
|
+
### Basic Components
|
|
109
|
+
|
|
110
|
+
```tsx
|
|
111
|
+
import {
|
|
112
|
+
Button,
|
|
113
|
+
Input,
|
|
114
|
+
KubitProvider,
|
|
115
|
+
Modal,
|
|
116
|
+
Tooltip,
|
|
117
|
+
} from '@kubit-ui-web/react-components';
|
|
118
|
+
|
|
119
|
+
function MyApp() {
|
|
120
|
+
return (
|
|
121
|
+
<KubitProvider>
|
|
122
|
+
<Input label="Email" placeholder="Enter your email" type="email" />
|
|
123
|
+
|
|
124
|
+
<Button variant="PRIMARY" onClick={handleClick}>
|
|
125
|
+
Submit
|
|
126
|
+
</Button>
|
|
127
|
+
|
|
128
|
+
<Tooltip content="Helpful information">
|
|
129
|
+
<span>Hover me</span>
|
|
130
|
+
</Tooltip>
|
|
131
|
+
</KubitProvider>
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Custom Theme
|
|
137
|
+
|
|
138
|
+
Customize the theme to match your brand:
|
|
139
|
+
|
|
140
|
+
```tsx
|
|
141
|
+
import { KubitProvider } from '@kubit-ui-web/react-components';
|
|
142
|
+
|
|
143
|
+
const customTheme = {
|
|
144
|
+
colors: {
|
|
145
|
+
primary: '#your-color',
|
|
146
|
+
secondary: '#your-secondary',
|
|
147
|
+
},
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
function App() {
|
|
151
|
+
return (
|
|
152
|
+
<KubitProvider theme={customTheme}>{/* Your components */}</KubitProvider>
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
For more information about theme customization, visit [Kubit UI Documentation](https://kubit-ui.com).
|
|
158
|
+
|
|
159
|
+
## Features
|
|
160
|
+
|
|
161
|
+
✨ **50+ Production-Ready Components**
|
|
70
162
|
|
|
71
|
-
|
|
163
|
+
- Buttons, Inputs, Modals, Tooltips, and more
|
|
164
|
+
- Fully customizable and themeable
|
|
72
165
|
|
|
73
|
-
|
|
166
|
+
♿ **Accessible by Default**
|
|
167
|
+
|
|
168
|
+
- WCAG 2.1 AA compliant
|
|
169
|
+
- Keyboard navigation support
|
|
170
|
+
- Screen reader friendly
|
|
171
|
+
|
|
172
|
+
🎨 **Design System Integration**
|
|
173
|
+
|
|
174
|
+
- Built with design tokens
|
|
175
|
+
- CSS variables for easy customization
|
|
176
|
+
- Bernova CSS generation
|
|
177
|
+
|
|
178
|
+
📦 **Developer Experience**
|
|
179
|
+
|
|
180
|
+
- Full TypeScript support
|
|
181
|
+
- Tree-shakeable exports
|
|
182
|
+
- Comprehensive documentation
|
|
183
|
+
- Rich Storybook examples
|
|
184
|
+
|
|
185
|
+
🚀 **Performance Optimized**
|
|
186
|
+
|
|
187
|
+
- Small bundle size (~235 KB gzipped)
|
|
188
|
+
- Code splitting ready
|
|
189
|
+
- Minimal runtime overhead
|
|
190
|
+
|
|
191
|
+
## Browser Support
|
|
192
|
+
|
|
193
|
+
| Browser | Version |
|
|
194
|
+
| ------- | --------------- |
|
|
195
|
+
| Chrome | Last 2 versions |
|
|
196
|
+
| Firefox | Last 2 versions |
|
|
197
|
+
| Safari | Last 2 versions |
|
|
198
|
+
| Edge | Last 2 versions |
|
|
74
199
|
|
|
75
200
|
## Documentation
|
|
76
201
|
|
|
77
|
-
You can find
|
|
202
|
+
You can find comprehensive documentation for all components at:
|
|
203
|
+
|
|
204
|
+
🌐 **[Kubit UI Website](https://kubit-ui.com)**
|
|
205
|
+
|
|
206
|
+
- Component API documentation
|
|
207
|
+
- Interactive examples
|
|
208
|
+
- Design guidelines
|
|
209
|
+
- Migration guides
|
|
78
210
|
|
|
79
211
|
## Storybook
|
|
80
212
|
|
|
81
|
-
|
|
213
|
+
Explore all components interactively in Storybook.
|
|
82
214
|
|
|
83
|
-
|
|
84
|
-
npm run storybook
|
|
215
|
+
### View Online
|
|
85
216
|
|
|
86
|
-
|
|
87
|
-
```
|
|
217
|
+
🎭 **[View Storybook](https://kubit-ui.com/storybook)** - Browse all components online
|
|
88
218
|
|
|
89
|
-
|
|
219
|
+
### Run Locally
|
|
220
|
+
|
|
221
|
+
To run Storybook locally:
|
|
222
|
+
|
|
223
|
+
1. Clone the repository:
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
git clone https://github.com/kubit-ui/kubit-react-components.git
|
|
227
|
+
cd kubit-react-components
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
2. Install dependencies:
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
npm install
|
|
234
|
+
# or
|
|
235
|
+
yarn install
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
3. Start Storybook:
|
|
239
|
+
```bash
|
|
240
|
+
npm run storybook
|
|
241
|
+
# or
|
|
242
|
+
yarn storybook
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
This will start the Storybook server at `http://localhost:6006` where you can see all components in action.
|
|
90
246
|
|
|
91
247
|
## Tests
|
|
92
248
|
|
|
93
|
-
|
|
249
|
+
Run the test suite to ensure everything works correctly:
|
|
94
250
|
|
|
95
251
|
```bash
|
|
252
|
+
# Run all tests
|
|
96
253
|
npm run test
|
|
97
|
-
|
|
254
|
+
# or
|
|
98
255
|
yarn test
|
|
256
|
+
|
|
257
|
+
# Watch mode (for development)
|
|
258
|
+
npm run test:watch
|
|
259
|
+
# or
|
|
260
|
+
yarn test:watch
|
|
261
|
+
|
|
262
|
+
# Coverage report
|
|
263
|
+
npm run test:coverage
|
|
264
|
+
# or
|
|
265
|
+
yarn test:coverage
|
|
99
266
|
```
|
|
100
267
|
|
|
101
|
-
|
|
268
|
+
**Test Stack:**
|
|
269
|
+
|
|
270
|
+
- ✅ Vitest - Fast unit testing
|
|
271
|
+
- 🧪 Testing Library - Component testing
|
|
272
|
+
- ♿ vitest-axe - Accessibility testing
|
|
102
273
|
|
|
103
274
|
## Contributing
|
|
104
275
|
|
|
105
|
-
We
|
|
276
|
+
We welcome contributions from the community! Here's how you can help:
|
|
277
|
+
|
|
278
|
+
### Ways to Contribute
|
|
106
279
|
|
|
107
|
-
|
|
280
|
+
- 🐛 Report bugs
|
|
281
|
+
- 💡 Suggest new features
|
|
282
|
+
- 📝 Improve documentation
|
|
283
|
+
- 🔧 Submit pull requests
|
|
284
|
+
- ⭐ Star the repository
|
|
108
285
|
|
|
109
|
-
|
|
286
|
+
### Contribution Steps
|
|
110
287
|
|
|
111
|
-
|
|
112
|
-
|
|
288
|
+
1. **Fork the Repository**: Click the "Fork" button in the upper right corner of the [repository's page](https://github.com/kubit-ui/kubit-react-components) on GitHub.
|
|
289
|
+
|
|
290
|
+
2. **Clone the Repository**: Clone your fork to your local machine.
|
|
291
|
+
|
|
292
|
+
```bash
|
|
293
|
+
git clone https://github.com/YOUR_USERNAME/kubit-react-components.git
|
|
294
|
+
cd kubit-react-components
|
|
113
295
|
```
|
|
114
296
|
|
|
115
|
-
3. **Create a Branch**:
|
|
297
|
+
3. **Create a Branch**: Create a new branch for your changes.
|
|
116
298
|
|
|
117
|
-
```
|
|
118
|
-
git checkout -b
|
|
299
|
+
```bash
|
|
300
|
+
git checkout -b feature/your-feature-name
|
|
119
301
|
```
|
|
120
302
|
|
|
121
|
-
4. **
|
|
303
|
+
4. **Install Dependencies**:
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
yarn install
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
5. **Make Changes**: Make your changes and test them thoroughly.
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
yarn test
|
|
313
|
+
yarn lint
|
|
314
|
+
yarn typecheck
|
|
315
|
+
```
|
|
122
316
|
|
|
123
|
-
|
|
317
|
+
6. **Commit Changes**: Use conventional commits for your messages.
|
|
124
318
|
|
|
125
|
-
```
|
|
126
|
-
git commit -m "
|
|
319
|
+
```bash
|
|
320
|
+
git commit -m "feat: add new component feature"
|
|
127
321
|
```
|
|
128
322
|
|
|
129
|
-
|
|
323
|
+
**Commit Types:**
|
|
324
|
+
- `feat:` - New feature
|
|
325
|
+
- `fix:` - Bug fix
|
|
326
|
+
- `docs:` - Documentation changes
|
|
327
|
+
- `style:` - Code style changes (formatting)
|
|
328
|
+
- `refactor:` - Code refactoring
|
|
329
|
+
- `test:` - Adding or updating tests
|
|
330
|
+
- `chore:` - Maintenance tasks
|
|
130
331
|
|
|
131
|
-
|
|
132
|
-
|
|
332
|
+
7. **Push Changes**: Push your changes to your fork.
|
|
333
|
+
|
|
334
|
+
```bash
|
|
335
|
+
git push origin feature/your-feature-name
|
|
133
336
|
```
|
|
134
337
|
|
|
135
|
-
|
|
338
|
+
8. **Open a Pull Request**: Go to the original repository and click "New pull request". Fill out the PR template with details about your changes.
|
|
339
|
+
|
|
340
|
+
### Development Commands
|
|
136
341
|
|
|
137
|
-
|
|
342
|
+
```bash
|
|
343
|
+
# Start development server
|
|
344
|
+
yarn dev
|
|
138
345
|
|
|
139
|
-
|
|
346
|
+
# Run Storybook
|
|
347
|
+
yarn storybook
|
|
348
|
+
|
|
349
|
+
# Build library
|
|
350
|
+
yarn dist
|
|
351
|
+
|
|
352
|
+
# Run tests
|
|
353
|
+
yarn test
|
|
354
|
+
|
|
355
|
+
# Lint code
|
|
356
|
+
yarn lint
|
|
357
|
+
|
|
358
|
+
# Type check
|
|
359
|
+
yarn typecheck
|
|
360
|
+
|
|
361
|
+
# Check package size
|
|
362
|
+
yarn pack:size
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
For more detailed information, please refer to the [CONTRIBUTING.md](./CONTRIBUTING.md) file.
|
|
366
|
+
|
|
367
|
+
## Community & Support
|
|
368
|
+
|
|
369
|
+
- 💬 [GitHub Discussions](https://github.com/kubit-ui/kubit-react-components/discussions) - Ask questions and share ideas
|
|
370
|
+
- 🐛 [Issue Tracker](https://github.com/kubit-ui/kubit-react-components/issues) - Report bugs and request features
|
|
371
|
+
- 📧 [Email](mailto:kubit@opendigitalservices.com) - Contact the team
|
|
372
|
+
- 🐦 [Twitter](https://twitter.com/kubit_ui) - Follow for updates
|
|
373
|
+
|
|
374
|
+
## Related Projects
|
|
375
|
+
|
|
376
|
+
- [Kubit Design System](https://kubit-ui.com) - Complete design system documentation
|
|
377
|
+
- [Kubit Figma Kit](https://figma.com/@kubit) - Design files and components
|
|
378
|
+
|
|
379
|
+
## Changelog
|
|
380
|
+
|
|
381
|
+
See [CHANGELOG.md](./CHANGELOG.md) for a list of changes and migration guides.
|
|
382
|
+
|
|
383
|
+
## Migration Guides
|
|
384
|
+
|
|
385
|
+
- [v1.x to v2.0.0](./MIGRATION_GUIDE.md) - Complete migration guide for major version
|
|
386
|
+
|
|
387
|
+
## License
|
|
388
|
+
|
|
389
|
+
This project is licensed under the **Apache License 2.0** - see the [LICENSE.md](./LICENSE.md) file for details.
|
|
390
|
+
|
|
391
|
+
```
|
|
392
|
+
Copyright 2025 Kubit
|
|
393
|
+
|
|
394
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
395
|
+
you may not use this file except in compliance with the License.
|
|
396
|
+
You may obtain a copy of the License at
|
|
397
|
+
|
|
398
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
---
|
|
402
|
+
|
|
403
|
+
<div align="center">
|
|
404
|
+
|
|
405
|
+
**Made with ❤️ by the Kubit Team**
|
|
406
|
+
|
|
407
|
+
[](https://github.com/kubit-ui/kubit-react-components)
|
|
408
|
+
[](https://www.npmjs.com/package/@kubit-ui-web/react-components)
|
|
409
|
+
[](https://kubit-ui.com)
|
|
410
|
+
|
|
411
|
+
If you find this project useful, please consider giving it a ⭐️!
|
|
412
|
+
|
|
413
|
+
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* CssThemes */
|
|
2
2
|
export const cssThemes = {
|
|
3
|
-
'kubit': { css: '/Users/n128691/PROJECTS/
|
|
3
|
+
'kubit': { css: '/Users/n128691/PROJECTS/OPEN_SOURCE/kubit-react-components/src/lib/designSystem/kubit/css/kubit.css', foreign: { before: [], after: [], }, },
|
|
4
4
|
}
|
|
5
5
|
/* CssThemes */
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* CssThemes */
|
|
2
2
|
export const cssThemes = {
|
|
3
|
-
'kubit': { css: '/Users/n128691/PROJECTS/
|
|
3
|
+
'kubit': { css: '/Users/n128691/PROJECTS/OPEN_SOURCE/kubit-react-components/src/lib/designSystem/kubit/css/kubit.css', foreign: { before: [], after: [], }, },
|
|
4
4
|
}
|
|
5
5
|
/* CssThemes */
|
|
6
6
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubit-ui-web/react-components",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.2",
|
|
4
4
|
"description": "Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Kubit",
|
|
@@ -55,15 +55,27 @@
|
|
|
55
55
|
"*.ico"
|
|
56
56
|
],
|
|
57
57
|
"files": [
|
|
58
|
-
"dist",
|
|
58
|
+
"dist/cjs",
|
|
59
|
+
"dist/esm",
|
|
60
|
+
"dist/types",
|
|
59
61
|
"dist/styles",
|
|
60
62
|
"package.json",
|
|
61
63
|
"README.md",
|
|
62
64
|
"LICENSE.md",
|
|
65
|
+
"CHANGELOG.md",
|
|
66
|
+
"!dist/cjs/lib/designSystem/**/css/*.css",
|
|
67
|
+
"!dist/esm/lib/designSystem/**/css/*.css",
|
|
68
|
+
"!dist/**/*.test.*",
|
|
69
|
+
"!dist/**/*.test.d.ts",
|
|
70
|
+
"!dist/**/*.stories.*",
|
|
71
|
+
"!dist/**/__tests__",
|
|
72
|
+
"!dist/**/__mocks__",
|
|
73
|
+
"!dist/**/__fixtures__",
|
|
63
74
|
"!dist/**/tests",
|
|
64
|
-
"!dist/**/**/*.test.*",
|
|
65
75
|
"!dist/**/storybook",
|
|
66
|
-
"!dist
|
|
76
|
+
"!dist/**/node_modules",
|
|
77
|
+
"!dist/**/.tsbuildinfo",
|
|
78
|
+
"!dist/**/*.map"
|
|
67
79
|
],
|
|
68
80
|
"exports": {
|
|
69
81
|
".": {
|
|
@@ -105,7 +117,11 @@
|
|
|
105
117
|
"test:coverage": "vitest --coverage.enabled=true --run",
|
|
106
118
|
"typecheck": "tsc --noEmit",
|
|
107
119
|
"validate": "yarn lint && yarn typecheck && yarn dist",
|
|
108
|
-
"publish-figma": "npx figma connect publish"
|
|
120
|
+
"publish-figma": "npx figma connect publish",
|
|
121
|
+
"pack:check": "npm pack --dry-run",
|
|
122
|
+
"pack:size": "npm pack --dry-run 2>&1 | grep -E '(unpacked size|package size|total files)'",
|
|
123
|
+
"pack:analyze": "npm pack && tar -tzf *.tgz | head -50 && rm *.tgz",
|
|
124
|
+
"prepublishOnly": "yarn dist && yarn pack:size"
|
|
109
125
|
},
|
|
110
126
|
"peerDependencies": {
|
|
111
127
|
"react": ">=17.0.0 || >=18.3.1",
|