@ws-ui/ui-components 1.0.7 โ†’ 1.0.9

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 CHANGED
@@ -1,195 +1,195 @@
1
- # Web Studio Design System
2
-
3
- A comprehensive design system built with React, TypeScript, TailwindCSS, and Storybook for Qodly. This library provides a collection of reusable, accessible, and customizable UI components with consistent styling and behavior using a modern **configuration-driven architecture**.
4
-
5
- ## โœจ Features
6
-
7
- - **๐ŸŽจ Modern Design**: Clean, professional components with consistent styling
8
- - **โ™ฟ Accessibility First**: Full ARIA support and keyboard navigation
9
- - **๐Ÿ”ง Flexible & Configurable**: Separation of concerns with dedicated styling configurations
10
- - **๐Ÿ“š Well Documented**: Comprehensive Storybook documentation with interactive examples
11
- - **โšก Performance Optimized**: Built with modern React patterns and optimized bundle size
12
- - **๐ŸŽฏ TypeScript**: Full type safety and excellent developer experience
13
- - **๐ŸŒ™ Dark Theme**: Built-in support for dark mode styling
14
- - **๐Ÿ”„ Consistent Patterns**: Unified architecture across all components for maintainability
15
- - **๐Ÿงช Comprehensive Testing**: Unit tests and Storybook testing for each component
16
-
17
- ## ๐Ÿš€ Quick Start
18
-
19
- ### Installation from npm
20
-
21
- Install the package in your project:
22
-
23
- ```bash
24
- npm install @ws-ui/ui-components
25
- ```
26
-
27
- ### Using Components
28
-
29
- Import and use components in your React application:
30
-
31
- ```tsx
32
- import { Button, Input, Checkbox } from '@ws-ui/ui-components';
33
-
34
- function App() {
35
- return (
36
- <div>
37
- <Input placeholder="Enter your name" label="Name" />
38
- <Checkbox
39
- label="Accept terms and conditions"
40
- onChange={(checked) => console.log(checked)}
41
- />
42
- <Button variant="primary" size="md" onClick={() => alert('Hello!')}>
43
- Submit
44
- </Button>
45
- </div>
46
- );
47
- }
48
- ```
49
-
50
- ### Available Components
51
-
52
- - **Button**: Versatile button with multiple variants and sizes
53
- - **Input**: Text input with label, error states, and validation
54
- - **Checkbox**: Accessible checkbox with indeterminate state
55
- - **Radio**: Radio button with group management
56
- - **Dropdown**: Customizable dropdown with search and multi-select
57
- - **Menu**: Context menu with nested submenus and keyboard navigation
58
- - And more...
59
-
60
- Check the [Storybook documentation](#-storybook) for complete component APIs and examples.
61
-
62
- ---
63
-
64
- ## ๐Ÿ”ง Development Setup
65
-
66
- For contributors who want to develop and extend the design system:
67
-
68
- ### Clone and Install
69
-
70
- ```bash
71
- # Clone the repository
72
- git clone https://git.4d-ps.com/4d/web-studio/design-system.git
73
- cd design-system
74
-
75
- # Install dependencies
76
- npm install
77
- ```
78
-
79
- ### Development Commands
80
-
81
- ```bash
82
- # Start the development server
83
- npm run dev
84
-
85
- # Run Storybook for component development
86
- npm run storybook
87
-
88
- # Build the project
89
- npm run build
90
-
91
- # Run linting
92
- npm run lint
93
- ```
94
-
95
- ## ๐Ÿ“– Storybook
96
-
97
- View all components and their documentation in Storybook:
98
-
99
- ```bash
100
- npm run storybook
101
- ```
102
-
103
- This will start Storybook on `http://localhost:6006` where you can:
104
-
105
- - Browse all available components
106
- - Interact with component properties
107
- - View code examples
108
- - Test accessibility features
109
- - Explore different states and variants
110
-
111
- ## ๐Ÿ› ๏ธ Technical Stack
112
-
113
- - **React 19.1.0**: Latest React with modern features
114
- - **TypeScript 5.8.3**: Full type safety
115
- - **TailwindCSS 4.x**: Utility-first CSS framework
116
- - **Storybook 9.x**: Component development and documentation
117
- - **Vite 6.x**: Fast build tool and dev server
118
- - **Vitest 3.x**: Unit testing framework
119
- - **ESLint**: Code linting and formatting
120
-
121
- ## ๐Ÿ”ง Development
122
-
123
- ### Project Structure
124
-
125
- ```
126
- src/ # Reusable UI components
127
- โ”‚ โ”œโ”€โ”€ Checkbox/
128
- โ”‚ โ”‚ โ”œโ”€โ”€ Checkbox.tsx # Component logic & rendering
129
- โ”‚ โ”‚ โ”œโ”€โ”€ Checkbox.stories.tsx # Storybook documentation
130
- โ”‚ โ”‚ โ”œโ”€โ”€ Checkbox.test.ts # Unit tests
131
- โ”‚ โ”‚ โ”œโ”€โ”€ checkbox.types.ts # TypeScript definitions
132
- โ”‚ โ”‚ โ”œโ”€โ”€ checkbox.style.ts # Styling configuration
133
- โ”‚ โ”‚ โ””โ”€โ”€ index.ts # Clean exports
134
- โ”‚ โ”œโ”€โ”€ Radio/
135
- โ”‚ โ”‚ โ”œโ”€โ”€ Radio.tsx
136
- โ”‚ โ”‚ โ”œโ”€โ”€ Radio.stories.tsx
137
- โ”‚ โ”‚ โ”œโ”€โ”€ Radio.test.ts
138
- โ”‚ โ”‚ โ”œโ”€โ”€ radio.types.ts
139
- โ”‚ โ”‚ โ”œโ”€โ”€ radio.style.ts
140
- โ”‚ โ”‚ โ””โ”€โ”€ index.ts
141
- โ”‚ โ””โ”€โ”€ ... # Other components
142
- โ”œโ”€โ”€ styles/ # Global styles and themes
143
- ```
144
-
145
- ### Adding New Components
146
-
147
- 1. Create component directory in `src/components/ComponentName/`
148
- 2. Create the five core files:
149
- - `ComponentName.tsx` - Component logic & rendering
150
- - `ComponentName.stories.tsx` - Storybook documentation
151
- - `ComponentName.test.ts` - Unit tests
152
- - `ComponentName.types.ts` - TypeScript definitions
153
- - `ComponentName.style.ts` - Styling configuration
154
- - `index.ts` - Clean exports
155
- 3. Include TypeScript interfaces and props
156
- 4. Add comprehensive Storybook stories
157
- 5. Ensure accessibility compliance
158
- 6. Add unit tests
159
- 7. Update documentation
160
-
161
- ### Design Guidelines
162
-
163
- - **Consistency**: Follow established patterns and conventions
164
- - **Accessibility**: Ensure WCAG 2.1 AA compliance
165
- - **Performance**: Optimize for bundle size and runtime performance
166
- - **Flexibility**: Support multiple variants and customization options
167
- - **Documentation**: Provide clear examples and usage guidelines
168
- - **Separation of Concerns**: Keep logic, types, styling, stories, and tests in separate files
169
-
170
- ## ๐Ÿงช Testing
171
-
172
- ```bash
173
- # Run unit tests
174
- npm run test
175
-
176
- # Run tests with storybook
177
- npm run test-storybook
178
- ```
179
-
180
- ## ๐Ÿ“ Contributing
181
-
182
- 1. Fork the repository
183
- 2. Create a feature branch: `git checkout -b feature/amazing-component`
184
- 3. Follow the development guidelines
185
- 4. Add tests and documentation
186
- 5. Submit a pull request
187
-
188
- ### Code Standards
189
-
190
- - Use TypeScript for all components
191
- - Follow React best practices and hooks
192
- - Ensure accessibility compliance
193
- - Add comprehensive Storybook stories
194
- - Include unit tests for complex logic
195
- - Use semantic versioning for releases
1
+ # Web Studio Design System
2
+
3
+ A comprehensive design system built with React, TypeScript, TailwindCSS, and Storybook for Qodly. This library provides a collection of reusable, accessible, and customizable UI components with consistent styling and behavior using a modern **configuration-driven architecture**.
4
+
5
+ ## โœจ Features
6
+
7
+ - **๐ŸŽจ Modern Design**: Clean, professional components with consistent styling
8
+ - **โ™ฟ Accessibility First**: Full ARIA support and keyboard navigation
9
+ - **๐Ÿ”ง Flexible & Configurable**: Separation of concerns with dedicated styling configurations
10
+ - **๐Ÿ“š Well Documented**: Comprehensive Storybook documentation with interactive examples
11
+ - **โšก Performance Optimized**: Built with modern React patterns and optimized bundle size
12
+ - **๐ŸŽฏ TypeScript**: Full type safety and excellent developer experience
13
+ - **๐ŸŒ™ Dark Theme**: Built-in support for dark mode styling
14
+ - **๐Ÿ”„ Consistent Patterns**: Unified architecture across all components for maintainability
15
+ - **๐Ÿงช Comprehensive Testing**: Unit tests and Storybook testing for each component
16
+
17
+ ## ๐Ÿš€ Quick Start
18
+
19
+ ### Installation from npm
20
+
21
+ Install the package in your project:
22
+
23
+ ```bash
24
+ npm install @ws-ui/ui-components
25
+ ```
26
+
27
+ ### Using Components
28
+
29
+ Import and use components in your React application:
30
+
31
+ ```tsx
32
+ import { Button, Input, Checkbox } from '@ws-ui/ui-components';
33
+
34
+ function App() {
35
+ return (
36
+ <div>
37
+ <Input placeholder="Enter your name" label="Name" />
38
+ <Checkbox
39
+ label="Accept terms and conditions"
40
+ onChange={(checked) => console.log(checked)}
41
+ />
42
+ <Button variant="primary" size="md" onClick={() => alert('Hello!')}>
43
+ Submit
44
+ </Button>
45
+ </div>
46
+ );
47
+ }
48
+ ```
49
+
50
+ ### Available Components
51
+
52
+ - **Button**: Versatile button with multiple variants and sizes
53
+ - **Input**: Text input with label, error states, and validation
54
+ - **Checkbox**: Accessible checkbox with indeterminate state
55
+ - **Radio**: Radio button with group management
56
+ - **Dropdown**: Customizable dropdown with search and multi-select
57
+ - **Menu**: Context menu with nested submenus and keyboard navigation
58
+ - And more...
59
+
60
+ Check the [Storybook documentation](#-storybook) for complete component APIs and examples.
61
+
62
+ ---
63
+
64
+ ## ๐Ÿ”ง Development Setup
65
+
66
+ For contributors who want to develop and extend the design system:
67
+
68
+ ### Clone and Install
69
+
70
+ ```bash
71
+ # Clone the repository
72
+ git clone https://git.4d-ps.com/4d/web-studio/design-system.git
73
+ cd design-system
74
+
75
+ # Install dependencies
76
+ npm install
77
+ ```
78
+
79
+ ### Development Commands
80
+
81
+ ```bash
82
+ # Start the development server
83
+ npm run dev
84
+
85
+ # Run Storybook for component development
86
+ npm run storybook
87
+
88
+ # Build the project
89
+ npm run build
90
+
91
+ # Run linting
92
+ npm run lint
93
+ ```
94
+
95
+ ## ๐Ÿ“– Storybook
96
+
97
+ View all components and their documentation in Storybook:
98
+
99
+ ```bash
100
+ npm run storybook
101
+ ```
102
+
103
+ This will start Storybook on `http://localhost:6006` where you can:
104
+
105
+ - Browse all available components
106
+ - Interact with component properties
107
+ - View code examples
108
+ - Test accessibility features
109
+ - Explore different states and variants
110
+
111
+ ## ๐Ÿ› ๏ธ Technical Stack
112
+
113
+ - **React 19.1.0**: Latest React with modern features
114
+ - **TypeScript 5.8.3**: Full type safety
115
+ - **TailwindCSS 4.x**: Utility-first CSS framework
116
+ - **Storybook 9.x**: Component development and documentation
117
+ - **Vite 6.x**: Fast build tool and dev server
118
+ - **Vitest 3.x**: Unit testing framework
119
+ - **ESLint**: Code linting and formatting
120
+
121
+ ## ๐Ÿ”ง Development
122
+
123
+ ### Project Structure
124
+
125
+ ```
126
+ src/ # Reusable UI components
127
+ โ”‚ โ”œโ”€โ”€ Checkbox/
128
+ โ”‚ โ”‚ โ”œโ”€โ”€ Checkbox.tsx # Component logic & rendering
129
+ โ”‚ โ”‚ โ”œโ”€โ”€ Checkbox.stories.tsx # Storybook documentation
130
+ โ”‚ โ”‚ โ”œโ”€โ”€ Checkbox.test.ts # Unit tests
131
+ โ”‚ โ”‚ โ”œโ”€โ”€ checkbox.types.ts # TypeScript definitions
132
+ โ”‚ โ”‚ โ”œโ”€โ”€ checkbox.style.ts # Styling configuration
133
+ โ”‚ โ”‚ โ””โ”€โ”€ index.ts # Clean exports
134
+ โ”‚ โ”œโ”€โ”€ Radio/
135
+ โ”‚ โ”‚ โ”œโ”€โ”€ Radio.tsx
136
+ โ”‚ โ”‚ โ”œโ”€โ”€ Radio.stories.tsx
137
+ โ”‚ โ”‚ โ”œโ”€โ”€ Radio.test.ts
138
+ โ”‚ โ”‚ โ”œโ”€โ”€ radio.types.ts
139
+ โ”‚ โ”‚ โ”œโ”€โ”€ radio.style.ts
140
+ โ”‚ โ”‚ โ””โ”€โ”€ index.ts
141
+ โ”‚ โ””โ”€โ”€ ... # Other components
142
+ โ”œโ”€โ”€ styles/ # Global styles and themes
143
+ ```
144
+
145
+ ### Adding New Components
146
+
147
+ 1. Create component directory in `src/components/ComponentName/`
148
+ 2. Create the five core files:
149
+ - `ComponentName.tsx` - Component logic & rendering
150
+ - `ComponentName.stories.tsx` - Storybook documentation
151
+ - `ComponentName.test.ts` - Unit tests
152
+ - `ComponentName.types.ts` - TypeScript definitions
153
+ - `ComponentName.style.ts` - Styling configuration
154
+ - `index.ts` - Clean exports
155
+ 3. Include TypeScript interfaces and props
156
+ 4. Add comprehensive Storybook stories
157
+ 5. Ensure accessibility compliance
158
+ 6. Add unit tests
159
+ 7. Update documentation
160
+
161
+ ### Design Guidelines
162
+
163
+ - **Consistency**: Follow established patterns and conventions
164
+ - **Accessibility**: Ensure WCAG 2.1 AA compliance
165
+ - **Performance**: Optimize for bundle size and runtime performance
166
+ - **Flexibility**: Support multiple variants and customization options
167
+ - **Documentation**: Provide clear examples and usage guidelines
168
+ - **Separation of Concerns**: Keep logic, types, styling, stories, and tests in separate files
169
+
170
+ ## ๐Ÿงช Testing
171
+
172
+ ```bash
173
+ # Run unit tests
174
+ npm run test
175
+
176
+ # Run tests with storybook
177
+ npm run test-storybook
178
+ ```
179
+
180
+ ## ๐Ÿ“ Contributing
181
+
182
+ 1. Fork the repository
183
+ 2. Create a feature branch: `git checkout -b feature/amazing-component`
184
+ 3. Follow the development guidelines
185
+ 4. Add tests and documentation
186
+ 5. Submit a pull request
187
+
188
+ ### Code Standards
189
+
190
+ - Use TypeScript for all components
191
+ - Follow React best practices and hooks
192
+ - Ensure accessibility compliance
193
+ - Add comprehensive Storybook stories
194
+ - Include unit tests for complex logic
195
+ - Use semantic versioning for releases