@ws-ui/ui-components 1.0.0
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 +146 -0
- package/dist/index.cjs +45 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9962 -0
- package/dist/qodly.ico +0 -0
- package/dist/qodly.svg +14 -0
- package/dist/src/breadcrumbs/Breadcrumbs.d.ts +4 -0
- package/dist/src/breadcrumbs/Breadcrumbs.d.ts.map +1 -0
- package/dist/src/breadcrumbs/Breadcrumbs.style.d.ts +12 -0
- package/dist/src/breadcrumbs/Breadcrumbs.style.d.ts.map +1 -0
- package/dist/src/breadcrumbs/Breadcrumbs.types.d.ts +28 -0
- package/dist/src/breadcrumbs/Breadcrumbs.types.d.ts.map +1 -0
- package/dist/src/breadcrumbs/index.d.ts +3 -0
- package/dist/src/breadcrumbs/index.d.ts.map +1 -0
- package/dist/src/button/Button.d.ts +4 -0
- package/dist/src/button/Button.d.ts.map +1 -0
- package/dist/src/button/Button.style.d.ts +6 -0
- package/dist/src/button/Button.style.d.ts.map +1 -0
- package/dist/src/button/Button.types.d.ts +24 -0
- package/dist/src/button/Button.types.d.ts.map +1 -0
- package/dist/src/button/index.d.ts +3 -0
- package/dist/src/button/index.d.ts.map +1 -0
- package/dist/src/checkbox/Checkbox.d.ts +18 -0
- package/dist/src/checkbox/Checkbox.d.ts.map +1 -0
- package/dist/src/checkbox/Checkbox.style.d.ts +10 -0
- package/dist/src/checkbox/Checkbox.style.d.ts.map +1 -0
- package/dist/src/checkbox/Checkbox.types.d.ts +60 -0
- package/dist/src/checkbox/Checkbox.types.d.ts.map +1 -0
- package/dist/src/checkbox/index.d.ts +3 -0
- package/dist/src/checkbox/index.d.ts.map +1 -0
- package/dist/src/icons/Icon.types.d.ts +3 -0
- package/dist/src/icons/Icon.types.d.ts.map +1 -0
- package/dist/src/icons/Icons.d.ts +2078 -0
- package/dist/src/icons/Icons.d.ts.map +1 -0
- package/dist/src/icons/index.d.ts +5 -0
- package/dist/src/icons/index.d.ts.map +1 -0
- package/dist/src/index.d.ts +12 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/input/Input.context.d.ts +4 -0
- package/dist/src/input/Input.context.d.ts.map +1 -0
- package/dist/src/input/Input.d.ts +16 -0
- package/dist/src/input/Input.d.ts.map +1 -0
- package/dist/src/input/Input.style.d.ts +33 -0
- package/dist/src/input/Input.style.d.ts.map +1 -0
- package/dist/src/input/Input.types.d.ts +106 -0
- package/dist/src/input/Input.types.d.ts.map +1 -0
- package/dist/src/input/index.d.ts +16 -0
- package/dist/src/input/index.d.ts.map +1 -0
- package/dist/src/menu/Menu.d.ts +10 -0
- package/dist/src/menu/Menu.d.ts.map +1 -0
- package/dist/src/menu/Menu.style.d.ts +21 -0
- package/dist/src/menu/Menu.style.d.ts.map +1 -0
- package/dist/src/menu/Menu.types.d.ts +38 -0
- package/dist/src/menu/Menu.types.d.ts.map +1 -0
- package/dist/src/menu/index.d.ts +3 -0
- package/dist/src/menu/index.d.ts.map +1 -0
- package/dist/src/pill/Pill.d.ts +9 -0
- package/dist/src/pill/Pill.d.ts.map +1 -0
- package/dist/src/pill/Pill.style.d.ts +9 -0
- package/dist/src/pill/Pill.style.d.ts.map +1 -0
- package/dist/src/pill/Pill.types.d.ts +48 -0
- package/dist/src/pill/Pill.types.d.ts.map +1 -0
- package/dist/src/pill/index.d.ts +3 -0
- package/dist/src/pill/index.d.ts.map +1 -0
- package/dist/src/radio/Radio.context.d.ts +4 -0
- package/dist/src/radio/Radio.context.d.ts.map +1 -0
- package/dist/src/radio/Radio.d.ts +9 -0
- package/dist/src/radio/Radio.d.ts.map +1 -0
- package/dist/src/radio/Radio.style.d.ts +11 -0
- package/dist/src/radio/Radio.style.d.ts.map +1 -0
- package/dist/src/radio/Radio.types.d.ts +87 -0
- package/dist/src/radio/Radio.types.d.ts.map +1 -0
- package/dist/src/radio/index.d.ts +3 -0
- package/dist/src/radio/index.d.ts.map +1 -0
- package/dist/src/resizable/Handle.d.ts +14 -0
- package/dist/src/resizable/Handle.d.ts.map +1 -0
- package/dist/src/resizable/Resizable.d.ts +4 -0
- package/dist/src/resizable/Resizable.d.ts.map +1 -0
- package/dist/src/resizable/Resizable.types.d.ts +144 -0
- package/dist/src/resizable/Resizable.types.d.ts.map +1 -0
- package/dist/src/resizable/index.d.ts +4 -0
- package/dist/src/resizable/index.d.ts.map +1 -0
- package/dist/src/select/Select.context.d.ts +4 -0
- package/dist/src/select/Select.context.d.ts.map +1 -0
- package/dist/src/select/Select.d.ts +61 -0
- package/dist/src/select/Select.d.ts.map +1 -0
- package/dist/src/select/Select.helper.d.ts +9 -0
- package/dist/src/select/Select.helper.d.ts.map +1 -0
- package/dist/src/select/Select.style.d.ts +90 -0
- package/dist/src/select/Select.style.d.ts.map +1 -0
- package/dist/src/select/Select.types.d.ts +273 -0
- package/dist/src/select/Select.types.d.ts.map +1 -0
- package/dist/src/select/useSelectDownshift.d.ts +5 -0
- package/dist/src/select/useSelectDownshift.d.ts.map +1 -0
- package/dist/src/snackbar/Snackbar.d.ts +5 -0
- package/dist/src/snackbar/Snackbar.d.ts.map +1 -0
- package/dist/src/snackbar/Snackbar.style.d.ts +5 -0
- package/dist/src/snackbar/Snackbar.style.d.ts.map +1 -0
- package/dist/src/snackbar/Snackbar.types.d.ts +21 -0
- package/dist/src/snackbar/Snackbar.types.d.ts.map +1 -0
- package/dist/src/snackbar/index.d.ts +3 -0
- package/dist/src/snackbar/index.d.ts.map +1 -0
- package/dist/src/tabs/SortableFileTab.d.ts +10 -0
- package/dist/src/tabs/SortableFileTab.d.ts.map +1 -0
- package/dist/src/tabs/Tabs.d.ts +12 -0
- package/dist/src/tabs/Tabs.d.ts.map +1 -0
- package/dist/src/tabs/Tabs.style.d.ts +14 -0
- package/dist/src/tabs/Tabs.style.d.ts.map +1 -0
- package/dist/src/tabs/Tabs.types.d.ts +76 -0
- package/dist/src/tabs/Tabs.types.d.ts.map +1 -0
- package/dist/src/tabs/index.d.ts +3 -0
- package/dist/src/tabs/index.d.ts.map +1 -0
- package/dist/src/toast/Toast.context.d.ts +6 -0
- package/dist/src/toast/Toast.context.d.ts.map +1 -0
- package/dist/src/toast/Toast.types.d.ts +36 -0
- package/dist/src/toast/Toast.types.d.ts.map +1 -0
- package/dist/src/toast/useToast.d.ts +3 -0
- package/dist/src/toast/useToast.d.ts.map +1 -0
- package/dist/src/toggle/Toggle.d.ts +6 -0
- package/dist/src/toggle/Toggle.d.ts.map +1 -0
- package/dist/src/toggle/Toggle.style.d.ts +10 -0
- package/dist/src/toggle/Toggle.style.d.ts.map +1 -0
- package/dist/src/toggle/Toggle.types.d.ts +18 -0
- package/dist/src/toggle/Toggle.types.d.ts.map +1 -0
- package/dist/src/toggle/index.d.ts +3 -0
- package/dist/src/toggle/index.d.ts.map +1 -0
- package/dist/src/tooltip/Tooltip.d.ts +5 -0
- package/dist/src/tooltip/Tooltip.d.ts.map +1 -0
- package/dist/src/tooltip/Tooltip.style.d.ts +12 -0
- package/dist/src/tooltip/Tooltip.style.d.ts.map +1 -0
- package/dist/src/tooltip/Tooltip.types.d.ts +35 -0
- package/dist/src/tooltip/Tooltip.types.d.ts.map +1 -0
- package/dist/src/tooltip/index.d.ts +3 -0
- package/dist/src/tooltip/index.d.ts.map +1 -0
- package/package.json +104 -0
package/README.md
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
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
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# Clone the repository
|
|
23
|
+
git clone https://git.4d-ps.com/4d/web-studio/design-system.git
|
|
24
|
+
cd design-system
|
|
25
|
+
|
|
26
|
+
# Install dependencies
|
|
27
|
+
npm install
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Development
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Start the development server
|
|
34
|
+
npm run dev
|
|
35
|
+
|
|
36
|
+
# Run Storybook for component development
|
|
37
|
+
npm run storybook
|
|
38
|
+
|
|
39
|
+
# Build the project
|
|
40
|
+
npm run build
|
|
41
|
+
|
|
42
|
+
# Run linting
|
|
43
|
+
npm run lint
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## ๐ Storybook
|
|
47
|
+
|
|
48
|
+
View all components and their documentation in Storybook:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npm run storybook
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
This will start Storybook on `http://localhost:6006` where you can:
|
|
55
|
+
|
|
56
|
+
- Browse all available components
|
|
57
|
+
- Interact with component properties
|
|
58
|
+
- View code examples
|
|
59
|
+
- Test accessibility features
|
|
60
|
+
- Explore different states and variants
|
|
61
|
+
|
|
62
|
+
## ๐ ๏ธ Technical Stack
|
|
63
|
+
|
|
64
|
+
- **React 19.1.0**: Latest React with modern features
|
|
65
|
+
- **TypeScript 5.8.3**: Full type safety
|
|
66
|
+
- **TailwindCSS 4.x**: Utility-first CSS framework
|
|
67
|
+
- **Storybook 9.x**: Component development and documentation
|
|
68
|
+
- **Vite 6.x**: Fast build tool and dev server
|
|
69
|
+
- **Vitest 3.x**: Unit testing framework
|
|
70
|
+
- **ESLint**: Code linting and formatting
|
|
71
|
+
|
|
72
|
+
## ๐ง Development
|
|
73
|
+
|
|
74
|
+
### Project Structure
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
src/ # Reusable UI components
|
|
78
|
+
โ โโโ Checkbox/
|
|
79
|
+
โ โ โโโ Checkbox.tsx # Component logic & rendering
|
|
80
|
+
โ โ โโโ Checkbox.stories.tsx # Storybook documentation
|
|
81
|
+
โ โ โโโ Checkbox.test.ts # Unit tests
|
|
82
|
+
โ โ โโโ checkbox.types.ts # TypeScript definitions
|
|
83
|
+
โ โ โโโ checkbox.style.ts # Styling configuration
|
|
84
|
+
โ โ โโโ index.ts # Clean exports
|
|
85
|
+
โ โโโ Radio/
|
|
86
|
+
โ โ โโโ Radio.tsx
|
|
87
|
+
โ โ โโโ Radio.stories.tsx
|
|
88
|
+
โ โ โโโ Radio.test.ts
|
|
89
|
+
โ โ โโโ radio.types.ts
|
|
90
|
+
โ โ โโโ radio.style.ts
|
|
91
|
+
โ โ โโโ index.ts
|
|
92
|
+
โ โโโ ... # Other components
|
|
93
|
+
โโโ styles/ # Global styles and themes
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Adding New Components
|
|
97
|
+
|
|
98
|
+
1. Create component directory in `src/components/ComponentName/`
|
|
99
|
+
2. Create the five core files:
|
|
100
|
+
- `ComponentName.tsx` - Component logic & rendering
|
|
101
|
+
- `ComponentName.stories.tsx` - Storybook documentation
|
|
102
|
+
- `ComponentName.test.ts` - Unit tests
|
|
103
|
+
- `ComponentName.types.ts` - TypeScript definitions
|
|
104
|
+
- `ComponentName.style.ts` - Styling configuration
|
|
105
|
+
- `index.ts` - Clean exports
|
|
106
|
+
3. Include TypeScript interfaces and props
|
|
107
|
+
4. Add comprehensive Storybook stories
|
|
108
|
+
5. Ensure accessibility compliance
|
|
109
|
+
6. Add unit tests
|
|
110
|
+
7. Update documentation
|
|
111
|
+
|
|
112
|
+
### Design Guidelines
|
|
113
|
+
|
|
114
|
+
- **Consistency**: Follow established patterns and conventions
|
|
115
|
+
- **Accessibility**: Ensure WCAG 2.1 AA compliance
|
|
116
|
+
- **Performance**: Optimize for bundle size and runtime performance
|
|
117
|
+
- **Flexibility**: Support multiple variants and customization options
|
|
118
|
+
- **Documentation**: Provide clear examples and usage guidelines
|
|
119
|
+
- **Separation of Concerns**: Keep logic, types, styling, stories, and tests in separate files
|
|
120
|
+
|
|
121
|
+
## ๐งช Testing
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# Run unit tests
|
|
125
|
+
npm run test
|
|
126
|
+
|
|
127
|
+
# Run tests with storybook
|
|
128
|
+
npm run test-storybook
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## ๐ Contributing
|
|
132
|
+
|
|
133
|
+
1. Fork the repository
|
|
134
|
+
2. Create a feature branch: `git checkout -b feature/amazing-component`
|
|
135
|
+
3. Follow the development guidelines
|
|
136
|
+
4. Add tests and documentation
|
|
137
|
+
5. Submit a pull request
|
|
138
|
+
|
|
139
|
+
### Code Standards
|
|
140
|
+
|
|
141
|
+
- Use TypeScript for all components
|
|
142
|
+
- Follow React best practices and hooks
|
|
143
|
+
- Ensure accessibility compliance
|
|
144
|
+
- Add comprehensive Storybook stories
|
|
145
|
+
- Include unit tests for complex logic
|
|
146
|
+
- Use semantic versioning for releases
|