@open-ui-kit/core 1.6.0 โ†’ 2.0.0-beta.10

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 DELETED
@@ -1,397 +0,0 @@
1
- <!-- To update the table of contents, install globally `doctoc`, and run 'doctoc ./README.md'
2
- DO NOT UPDATE MANUALLY! -->
3
- <!-- START doctoc generated TOC please keep comment here to allow auto update -->
4
- <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
5
-
6
- - [Open UI Kit](#open-ui-kit)
7
- - [โœจ Features](#-features)
8
- - [๐Ÿš€ Quick Start](#-quick-start)
9
- - [๐Ÿ” Authentication](#-authentication)
10
- - [๐Ÿ“ฆ Installation](#-installation)
11
- - [NPM](#npm)
12
- - [Yarn](#yarn)
13
- - [๐Ÿ’ป Usage](#-usage)
14
- - [Basic Setup](#basic-setup)
15
- - [Using Components](#using-components)
16
- - [Theme Customization](#theme-customization)
17
- - [TypeScript Support](#typescript-support)
18
- - [๐Ÿ“š Available Components](#-available-components)
19
- - [๐Ÿ“– Documentation](#-documentation)
20
- - [๐Ÿงช Testing](#-testing)
21
- - [๐Ÿšข Releases](#-releases)
22
- - [Beta Releases](#beta-releases)
23
- - [๐Ÿค Contributing](#-contributing)
24
- - [๐Ÿ“„ License](#-license)
25
-
26
- <!-- END doctoc generated TOC please keep comment here to allow auto update -->
27
-
28
- <div align="center">
29
-
30
- <h1> ๐ŸŽจ Open UI Kit </h1>
31
-
32
- **A comprehensive React component library built on Material-UI for modern applications**
33
-
34
- <br />
35
- <br />
36
-
37
- [![npm](https://img.shields.io/badge/npm-package-CB3837?logo=npm)](https://www.npmjs.com/package/@open-ui-kit/core)
38
- [![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg)](http://www.typescriptlang.org/)
39
- [![Storybook](https://img.shields.io/badge/storybook-view%20docs-ff69b4)](https://main--68cc22452afe30d90e4ca977.chromatic.com)
40
- [![License](https://img.shields.io/github/license/outshift-open/open-ui-kit)](LICENSE)
41
-
42
- </div>
43
-
44
- ## โœจ Features
45
-
46
- - ๐ŸŽฏ **50+ Pre-built Components** - From basic buttons to complex data tables and interactive charts
47
- - ๐ŸŒ“ **Dark/Light Theme Support** - Built-in theme switching with seamless transitions
48
- - ๐Ÿ“ฑ **Responsive Design** - Mobile-first approach with flexible, adaptive layouts
49
- - โ™ฟ **Accessibility First** - WCAG compliant components with proper ARIA attributes
50
- - ๐Ÿ”ง **TypeScript Native** - Full TypeScript support with comprehensive type definitions
51
- - ๐Ÿ“Š **Data Visualization** - Rich chart components for analytics and dashboards
52
- - ๐ŸŽจ **Customizable Theming** - Extend and customize colors, typography, and spacing
53
- - ๐Ÿ“š **Interactive Documentation** - Comprehensive Storybook with live examples
54
-
55
- ## ๐Ÿš€ Quick Start
56
-
57
- ```bash
58
- # Install the package and peer dependencies
59
- npm install @open-ui-kit/core @mui/material @emotion/react @emotion/styled
60
-
61
- # Import CSS and start using components
62
- import '@open-ui-kit/core/typography.css';
63
- import { ThemeProvider, Button } from '@open-ui-kit/core';
64
- ```
65
-
66
- ## ๐Ÿ” Installation
67
-
68
- Open UI Kit is available as an open source package. You can install it directly from npm.
69
-
70
- ## ๐Ÿ“ฆ Installation
71
-
72
- > **Prerequisites**: Node.js 18+ and npm 8+ (or Yarn 1.22+)
73
-
74
- ### NPM
75
-
76
- ```bash
77
- npm install @open-ui-kit/core @mui/material @emotion/react @emotion/styled
78
- ```
79
-
80
- ### Yarn
81
-
82
- ```bash
83
- yarn add @open-ui-kit/core @mui/material @emotion/react @emotion/styled
84
- ```
85
-
86
- **Required Peer Dependencies:**
87
- - `@mui/material` ^5.0.0 - Core Material-UI components
88
- - `@emotion/react` ^11.0.0 - CSS-in-JS styling engine
89
- - `@emotion/styled` ^11.0.0 - Styled component utilities
90
- - `react` ^17.0.0 || ^18.0.0
91
- - `react-dom` ^17.0.0 || ^18.0.0
92
-
93
- ## ๐Ÿ’ป Usage
94
-
95
- ### Basic Setup
96
-
97
- Wrap your application with the `ThemeProvider` to enable Open UI Kit theming:
98
-
99
- ```jsx
100
- import React from 'react';
101
- import { ThemeProvider, useThemeMode } from '@open-ui-kit/core';
102
- import '@open-ui-kit/core/typography.css';
103
-
104
- function AppContent() {
105
- const { isDarkMode, toggleTheme } = useThemeMode();
106
-
107
- return (
108
- <div className="app">
109
- <header>
110
- <button type="button" onClick={toggleTheme}>
111
- Switch to {isDarkMode ? 'Light' : 'Dark'} Mode
112
- </button>
113
- </header>
114
- {/* Your app content goes here */}
115
- </div>
116
- );
117
- }
118
-
119
- function App() {
120
- return (
121
- <ThemeProvider>
122
- <AppContent />
123
- </ThemeProvider>
124
- );
125
- }
126
-
127
- export default App;
128
- ```
129
-
130
- ### Using Components
131
-
132
- Import and use components from the library:
133
-
134
- ```jsx
135
- import {
136
- Button,
137
- Card,
138
- TextField,
139
- Badge,
140
- Avatar,
141
- Modal,
142
- Typography
143
- } from '@open-ui-kit/core';
144
-
145
- function MyComponent() {
146
- const [open, setOpen] = useState(false);
147
-
148
- return (
149
- <Card sx={{ p: 3, maxWidth: 400 }}>
150
- <div style={{ display: 'flex', alignItems: 'center', mb: 2 }}>
151
- <Avatar src="/user-avatar.jpg" sx={{ mr: 2 }} />
152
- <Typography variant="h6">Welcome back!</Typography>
153
- </div>
154
-
155
- <TextField
156
- label="Enter your message"
157
- variant="outlined"
158
- fullWidth
159
- sx={{ mb: 2 }}
160
- />
161
-
162
- <Button
163
- variant="contained"
164
- color="primary"
165
- onClick={() => setOpen(true)}
166
- sx={{ mr: 1 }}
167
- >
168
- Open Modal
169
- </Button>
170
-
171
- <Badge badgeContent={4} color="secondary">
172
- <Button variant="outlined">Notifications</Button>
173
- </Badge>
174
-
175
- <Modal open={open} onClose={() => setOpen(false)}>
176
- <div>Modal content here</div>
177
- </Modal>
178
- </Card>
179
- );
180
- }
181
- ```
182
-
183
- ### Theme Customization
184
-
185
- Access theme variables for consistent styling across your application:
186
-
187
- ```jsx
188
- import { useTheme } from '@open-ui-kit/core';
189
-
190
- function StyledComponent() {
191
- const theme = useTheme();
192
-
193
- return (
194
- <div
195
- style={{
196
- backgroundColor: theme.palette.vars.controlBackgroundDefault,
197
- color: theme.palette.vars.textPrimary,
198
- padding: theme.spacing(2),
199
- borderRadius: theme.shape.borderRadius,
200
- border: `1px solid ${theme.palette.divider}`
201
- }}
202
- >
203
- <h3 style={{ color: theme.palette.primary.main }}>
204
- Themed Content
205
- </h3>
206
- <p>This component uses theme variables for consistent styling.</p>
207
- </div>
208
- );
209
- }
210
- ```
211
-
212
- ### TypeScript Support
213
-
214
- The library provides full TypeScript support with augmented Material-UI theme types:
215
-
216
- ```typescript
217
- import { useTheme, Theme } from '@open-ui-kit/core';
218
-
219
- const MyTypedComponent: React.FC = () => {
220
- const theme: Theme = useTheme();
221
-
222
- // Access custom theme variables with full type safety
223
- const backgroundColor = theme.palette.vars.controlBackgroundDefault;
224
- const primaryColor = theme.palette.primary.main;
225
- const spacing = theme.spacing(2);
226
-
227
- return (
228
- <div
229
- style={{
230
- backgroundColor,
231
- color: primaryColor,
232
- padding: spacing
233
- }}
234
- >
235
- Fully typed theme access
236
- </div>
237
- );
238
- };
239
- ```
240
-
241
- ## ๐Ÿ“š Available Components
242
-
243
- The library includes 50+ components organized into the following categories:
244
-
245
- **๐Ÿ”ง Layout & Structure**
246
- - `Card`, `Divider`, `Drawer`, `Modal`, `Tabs`, `Accordion`
247
-
248
- **๐Ÿ“ Form Controls**
249
- - `Button`, `TextField`, `Checkbox`, `Radio`, `Select`, `Slider`, `Toggle`
250
-
251
- **๐Ÿงญ Navigation**
252
- - `Breadcrumbs`, `Menu`, `Pagination`, `Stepper`, `Header`, `Footer`
253
-
254
- **๐Ÿ“Š Data Display**
255
- - `Avatar`, `Badge`, `Table`, `List`, `Typography`, `Code Block`
256
-
257
- **๐Ÿ’ฌ Feedback & Status**
258
- - `Toast`, `Spinner`, `Loading States`, `Empty State`, `Banner`
259
-
260
- **๐Ÿ“ˆ Data Visualization**
261
- - `Bar Chart`, `Line Chart`, `Donut Chart`, `Gauge Chart`, `Chart Widget`
262
-
263
- **๐Ÿ” Specialized**
264
- - `Search Field`, `Autocomplete Tree`, `Date Time`, `Copy Button`, `Filters`
265
-
266
- > **๐Ÿ’ก Tip**: All components are fully documented with interactive examples in our [Storybook](https://main--68cc22452afe30d90e4ca977.chromatic.com).
267
-
268
- ## ๐Ÿ“– Documentation
269
-
270
- ### Interactive Documentation
271
- We use **Storybook** for comprehensive component documentation with live examples:
272
-
273
- ```bash
274
- # Run Storybook locally
275
- yarn storybook
276
- ```
277
-
278
- ๐ŸŒ **[View Live Documentation](https://main--68cc22452afe30d90e4ca977.chromatic.com)**
279
-
280
- ### What you'll find in Storybook:
281
- - ๐Ÿ“– **Component API docs** - Props, types, and usage examples
282
- - ๐ŸŽฎ **Interactive playground** - Test components with different configurations
283
- - ๐ŸŽจ **Design tokens** - Colors, typography, spacing, and theme variables
284
- - ๐Ÿ“ฑ **Responsive examples** - See how components adapt to different screen sizes
285
- - โ™ฟ **Accessibility guidelines** - WCAG compliance information and best practices
286
-
287
- ## ๐Ÿงช Testing
288
-
289
- We use **Jest** and **React Testing Library** for comprehensive testing coverage.
290
-
291
- ### Writing Tests
292
- - Create test files alongside components: `ComponentName.test.tsx`
293
- - Test component functionality, accessibility, and user interactions
294
- - Ensure all custom (non-MUI) components have test coverage
295
-
296
- ### Running Tests
297
- ```bash
298
- # Run all tests
299
- yarn test
300
-
301
- # Run tests in watch mode
302
- yarn test --watch
303
-
304
- # Run tests with coverage report
305
- yarn test --coverage
306
- ```
307
-
308
- ### Example Test Structure
309
- ```typescript
310
- // src/components/Button/Button.test.tsx
311
- import { render, screen, fireEvent } from '@testing-library/react';
312
- import { ThemeProvider } from '@open-ui-kit/core';
313
- import { Button } from './Button';
314
-
315
- const renderWithTheme = (component: React.ReactElement) => {
316
- return render(
317
- <ThemeProvider>
318
- {component}
319
- </ThemeProvider>
320
- );
321
- };
322
-
323
- describe('Button Component', () => {
324
- it('renders correctly', () => {
325
- renderWithTheme(<Button>Click me</Button>);
326
- expect(screen.getByRole('button')).toBeInTheDocument();
327
- });
328
-
329
- it('handles click events', () => {
330
- const handleClick = jest.fn();
331
- renderWithTheme(<Button onClick={handleClick}>Click me</Button>);
332
-
333
- fireEvent.click(screen.getByRole('button'));
334
- expect(handleClick).toHaveBeenCalledTimes(1);
335
- });
336
- });
337
- ```
338
-
339
- ## ๐Ÿšข Releases
340
-
341
- This repository uses [**semantic-release**](https://github.com/semantic-release/semantic-release) for automated version management and package publishing.
342
-
343
- ### ๐ŸŽฏ Stable Releases
344
-
345
- When a pull request is merged into the `main` branch, changes are automatically bundled into a stable release.
346
-
347
- - **Format**: `vX.Y.Z` (e.g., `v1.2.3`)
348
- - **Purpose**: Production-ready releases with all new features, improvements, and bug fixes
349
- - **Availability**: Published to npm with `latest` tag
350
-
351
- ### ๐Ÿงช Beta Releases
352
-
353
- When a pull request is merged into the `beta` branch, changes are automatically bundled into a beta release.
354
-
355
- - **Format**: `vX.Y.Z-beta.N` (e.g., `v1.2.3-beta.4`)
356
- - **Purpose**: Pre-release testing and preview of upcoming features
357
- - **Availability**: Published to npm with `beta` tag
358
- - **โš ๏ธ Note**: Beta releases may be less stable than production releases
359
-
360
- ### ๐Ÿ“‹ Release Notes
361
-
362
- Each release includes:
363
- - ๐Ÿ“ **Changelog** - Detailed list of changes, additions, and fixes
364
- - ๐Ÿท๏ธ **Git Tags** - Semantic versioning tags for easy reference
365
- - ๐Ÿ“ฆ **Package Artifacts** - Built and tested distribution files
366
-
367
- ### ๐Ÿ†˜ Support
368
-
369
- Need help? Check out our [Contributing Guide](../../CONTRIBUTING.md#support) for support options.
370
-
371
- ## ๐Ÿค Contributing
372
-
373
- We welcome contributions from the open source community! Please read our [Contributing Guidelines](../../CONTRIBUTING.md) and [Code of Conduct](../../CODE_OF_CONDUCT.md) before getting started.
374
-
375
- ### Quick Start for Contributors
376
-
377
- 1. Fork the repository
378
- 2. Create a feature branch: `git checkout -b feature/my-feature`
379
- 3. Make your changes and add tests
380
- 4. Run tests: `yarn test`
381
- 5. Submit a pull request
382
-
383
- ## ๐Ÿ“„ License
384
-
385
- This project is licensed under the Apache License 2.0 - see the [LICENSE](../../LICENSE) file for details.
386
-
387
- ---
388
-
389
- <div align="center">
390
-
391
- **Built with โค๏ธ by the Open UI Kit community**
392
-
393
- <br/>
394
-
395
- [๐Ÿ“š Documentation](https://main--68cc22452afe30d90e4ca977.chromatic.com) โ€ข [๐Ÿ› Report Issues](https://github.com/outshift-open/open-ui-kit/issues) โ€ข [๐Ÿ’ฌ Discussions](https://github.com/outshift-open/open-ui-kit/discussions)
396
-
397
- </div>