@open-ui-kit/core 1.5.0 โ†’ 2.0.0-beta.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.
package/README.md DELETED
@@ -1,391 +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, { useState } from 'react';
101
- import { ThemeProvider } from '@open-ui-kit/core';
102
- import '@open-ui-kit/core/typography.css';
103
-
104
- function App() {
105
- const [isDarkMode, setIsDarkMode] = useState(false);
106
-
107
- return (
108
- <ThemeProvider isDarkMode={isDarkMode}>
109
- <div className="app">
110
- <header>
111
- <button onClick={() => setIsDarkMode(!isDarkMode)}>
112
- Switch to {isDarkMode ? 'Light' : 'Dark'} Mode
113
- </button>
114
- </header>
115
- {/* Your app content goes here */}
116
- </div>
117
- </ThemeProvider>
118
- );
119
- }
120
-
121
- export default App;
122
- ```
123
-
124
- ### Using Components
125
-
126
- Import and use components from the library:
127
-
128
- ```jsx
129
- import {
130
- Button,
131
- Card,
132
- TextField,
133
- Badge,
134
- Avatar,
135
- Modal,
136
- Typography
137
- } from '@open-ui-kit/core';
138
-
139
- function MyComponent() {
140
- const [open, setOpen] = useState(false);
141
-
142
- return (
143
- <Card sx={{ p: 3, maxWidth: 400 }}>
144
- <div style={{ display: 'flex', alignItems: 'center', mb: 2 }}>
145
- <Avatar src="/user-avatar.jpg" sx={{ mr: 2 }} />
146
- <Typography variant="h6">Welcome back!</Typography>
147
- </div>
148
-
149
- <TextField
150
- label="Enter your message"
151
- variant="outlined"
152
- fullWidth
153
- sx={{ mb: 2 }}
154
- />
155
-
156
- <Button
157
- variant="contained"
158
- color="primary"
159
- onClick={() => setOpen(true)}
160
- sx={{ mr: 1 }}
161
- >
162
- Open Modal
163
- </Button>
164
-
165
- <Badge badgeContent={4} color="secondary">
166
- <Button variant="outlined">Notifications</Button>
167
- </Badge>
168
-
169
- <Modal open={open} onClose={() => setOpen(false)}>
170
- <div>Modal content here</div>
171
- </Modal>
172
- </Card>
173
- );
174
- }
175
- ```
176
-
177
- ### Theme Customization
178
-
179
- Access theme variables for consistent styling across your application:
180
-
181
- ```jsx
182
- import { useTheme } from '@open-ui-kit/core';
183
-
184
- function StyledComponent() {
185
- const theme = useTheme();
186
-
187
- return (
188
- <div
189
- style={{
190
- backgroundColor: theme.palette.vars.controlBackgroundDefault,
191
- color: theme.palette.vars.textPrimary,
192
- padding: theme.spacing(2),
193
- borderRadius: theme.shape.borderRadius,
194
- border: `1px solid ${theme.palette.divider}`
195
- }}
196
- >
197
- <h3 style={{ color: theme.palette.primary.main }}>
198
- Themed Content
199
- </h3>
200
- <p>This component uses theme variables for consistent styling.</p>
201
- </div>
202
- );
203
- }
204
- ```
205
-
206
- ### TypeScript Support
207
-
208
- The library provides full TypeScript support with augmented Material-UI theme types:
209
-
210
- ```typescript
211
- import { useTheme, Theme } from '@open-ui-kit/core';
212
-
213
- const MyTypedComponent: React.FC = () => {
214
- const theme: Theme = useTheme();
215
-
216
- // Access custom theme variables with full type safety
217
- const backgroundColor = theme.palette.vars.controlBackgroundDefault;
218
- const primaryColor = theme.palette.primary.main;
219
- const spacing = theme.spacing(2);
220
-
221
- return (
222
- <div
223
- style={{
224
- backgroundColor,
225
- color: primaryColor,
226
- padding: spacing
227
- }}
228
- >
229
- Fully typed theme access
230
- </div>
231
- );
232
- };
233
- ```
234
-
235
- ## ๐Ÿ“š Available Components
236
-
237
- The library includes 50+ components organized into the following categories:
238
-
239
- **๐Ÿ”ง Layout & Structure**
240
- - `Card`, `Divider`, `Drawer`, `Modal`, `Tabs`, `Accordion`
241
-
242
- **๐Ÿ“ Form Controls**
243
- - `Button`, `TextField`, `Checkbox`, `Radio`, `Select`, `Slider`, `Toggle`
244
-
245
- **๐Ÿงญ Navigation**
246
- - `Breadcrumbs`, `Menu`, `Pagination`, `Stepper`, `Header`, `Footer`
247
-
248
- **๐Ÿ“Š Data Display**
249
- - `Avatar`, `Badge`, `Table`, `List`, `Typography`, `Code Block`
250
-
251
- **๐Ÿ’ฌ Feedback & Status**
252
- - `Toast`, `Spinner`, `Loading States`, `Empty State`, `Banner`
253
-
254
- **๐Ÿ“ˆ Data Visualization**
255
- - `Bar Chart`, `Line Chart`, `Donut Chart`, `Gauge Chart`, `Chart Widget`
256
-
257
- **๐Ÿ” Specialized**
258
- - `Search Field`, `Autocomplete Tree`, `Date Time`, `Copy Button`, `Filters`
259
-
260
- > **๐Ÿ’ก Tip**: All components are fully documented with interactive examples in our [Storybook](https://main--68cc22452afe30d90e4ca977.chromatic.com).
261
-
262
- ## ๐Ÿ“– Documentation
263
-
264
- ### Interactive Documentation
265
- We use **Storybook** for comprehensive component documentation with live examples:
266
-
267
- ```bash
268
- # Run Storybook locally
269
- yarn storybook
270
- ```
271
-
272
- ๐ŸŒ **[View Live Documentation](https://main--68cc22452afe30d90e4ca977.chromatic.com)**
273
-
274
- ### What you'll find in Storybook:
275
- - ๐Ÿ“– **Component API docs** - Props, types, and usage examples
276
- - ๐ŸŽฎ **Interactive playground** - Test components with different configurations
277
- - ๐ŸŽจ **Design tokens** - Colors, typography, spacing, and theme variables
278
- - ๐Ÿ“ฑ **Responsive examples** - See how components adapt to different screen sizes
279
- - โ™ฟ **Accessibility guidelines** - WCAG compliance information and best practices
280
-
281
- ## ๐Ÿงช Testing
282
-
283
- We use **Jest** and **React Testing Library** for comprehensive testing coverage.
284
-
285
- ### Writing Tests
286
- - Create test files alongside components: `ComponentName.test.tsx`
287
- - Test component functionality, accessibility, and user interactions
288
- - Ensure all custom (non-MUI) components have test coverage
289
-
290
- ### Running Tests
291
- ```bash
292
- # Run all tests
293
- yarn test
294
-
295
- # Run tests in watch mode
296
- yarn test --watch
297
-
298
- # Run tests with coverage report
299
- yarn test --coverage
300
- ```
301
-
302
- ### Example Test Structure
303
- ```typescript
304
- // src/components/Button/Button.test.tsx
305
- import { render, screen, fireEvent } from '@testing-library/react';
306
- import { ThemeProvider } from '@open-ui-kit/core';
307
- import { Button } from './Button';
308
-
309
- const renderWithTheme = (component: React.ReactElement) => {
310
- return render(
311
- <ThemeProvider>
312
- {component}
313
- </ThemeProvider>
314
- );
315
- };
316
-
317
- describe('Button Component', () => {
318
- it('renders correctly', () => {
319
- renderWithTheme(<Button>Click me</Button>);
320
- expect(screen.getByRole('button')).toBeInTheDocument();
321
- });
322
-
323
- it('handles click events', () => {
324
- const handleClick = jest.fn();
325
- renderWithTheme(<Button onClick={handleClick}>Click me</Button>);
326
-
327
- fireEvent.click(screen.getByRole('button'));
328
- expect(handleClick).toHaveBeenCalledTimes(1);
329
- });
330
- });
331
- ```
332
-
333
- ## ๐Ÿšข Releases
334
-
335
- This repository uses [**semantic-release**](https://github.com/semantic-release/semantic-release) for automated version management and package publishing.
336
-
337
- ### ๐ŸŽฏ Stable Releases
338
-
339
- When a pull request is merged into the `main` branch, changes are automatically bundled into a stable release.
340
-
341
- - **Format**: `vX.Y.Z` (e.g., `v1.2.3`)
342
- - **Purpose**: Production-ready releases with all new features, improvements, and bug fixes
343
- - **Availability**: Published to npm with `latest` tag
344
-
345
- ### ๐Ÿงช Beta Releases
346
-
347
- When a pull request is merged into the `beta` branch, changes are automatically bundled into a beta release.
348
-
349
- - **Format**: `vX.Y.Z-beta.N` (e.g., `v1.2.3-beta.4`)
350
- - **Purpose**: Pre-release testing and preview of upcoming features
351
- - **Availability**: Published to npm with `beta` tag
352
- - **โš ๏ธ Note**: Beta releases may be less stable than production releases
353
-
354
- ### ๐Ÿ“‹ Release Notes
355
-
356
- Each release includes:
357
- - ๐Ÿ“ **Changelog** - Detailed list of changes, additions, and fixes
358
- - ๐Ÿท๏ธ **Git Tags** - Semantic versioning tags for easy reference
359
- - ๐Ÿ“ฆ **Package Artifacts** - Built and tested distribution files
360
-
361
- ### ๐Ÿ†˜ Support
362
-
363
- Need help? Check out our [Contributing Guide](../../CONTRIBUTING.md#support) for support options.
364
-
365
- ## ๐Ÿค Contributing
366
-
367
- 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.
368
-
369
- ### Quick Start for Contributors
370
-
371
- 1. Fork the repository
372
- 2. Create a feature branch: `git checkout -b feature/my-feature`
373
- 3. Make your changes and add tests
374
- 4. Run tests: `yarn test`
375
- 5. Submit a pull request
376
-
377
- ## ๐Ÿ“„ License
378
-
379
- This project is licensed under the Apache License 2.0 - see the [LICENSE](../../LICENSE) file for details.
380
-
381
- ---
382
-
383
- <div align="center">
384
-
385
- **Built with โค๏ธ by the Open UI Kit community**
386
-
387
- <br/>
388
-
389
- [๐Ÿ“š 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)
390
-
391
- </div>