@szum-tech/design-system 3.19.3 → 3.21.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 CHANGED
@@ -1,151 +1,220 @@
1
- <h1 align="center">@szum-tech/design-system</h1>
2
- <p align="center">Szum-Tech design system.</p>
1
+ <div align="center">
2
+ <h1 align="center">@szum-tech/design-system</h1>
3
+ <img style="max-width: 100%; height: auto;" alt="Szum-Tech Design System Banner" src="https://github.com/user-attachments/assets/59791086-c549-4cf8-8f3c-ab10e531bafa" />
4
+ <p align="center">A comprehensive, accessible, and highly customizable React design system tailored to Szum-Tech standards.</p>
5
+ </div>
6
+
3
7
  <br>
8
+
4
9
  <div align="center" style="display: flex; flex-direction: column; gap: 1em;">
5
- <div style="display: flex; gap: .5em; justify-content: center">
10
+ <div style="display: flex; gap: .5em; justify-content: center; flex-wrap: wrap;">
6
11
  <a href="https://github.com/JanSzewczyk/design-system"><img alt="GitHub Release" src="https://img.shields.io/github/v/release/JanSzewczyk/design-system"></a>
7
12
  <a href="https://github.com/JanSzewczyk/design-system/pulls"><img alt="GitHub pull requests" src="https://img.shields.io/github/issues-pr/JanSzewczyk/design-system"></a>
8
13
  <a href="https://github.com/JanSzewczyk/design-system/issues"><img alt="GitHub issues" src="https://img.shields.io/github/issues/JanSzewczyk/design-system"></a>
9
14
  <a href="https://github.com/JanSzewczyk/design-system"><img alt="Github stars" src="https://img.shields.io/github/stars/JanSzewczyk/design-system?style=social"></a>
10
15
  </div>
11
- <div style="display: flex; gap: .5em; justify-content: center">
16
+ <div style="display: flex; gap: .5em; justify-content: center; flex-wrap: wrap;">
12
17
  <a href="https://github.com/JanSzewczyk/design-system/actions/workflows/publish.yml"><img alt="Publish action" src="https://github.com/JanSzewczyk/design-system/actions/workflows/publish.yml/badge.svg?branch=main"></a>
13
18
  <a href="https://github.com/JanSzewczyk/design-system/actions/workflows/codeql.yml"><img alt="CodeQL action" src="https://github.com/JanSzewczyk/design-system/actions/workflows/codeql.yml/badge.svg"></a>
14
19
  </div>
15
- <div style="display: flex; gap: .5em; justify-content: center">
20
+ <div style="display: flex; gap: .5em; justify-content: center; flex-wrap: wrap;">
16
21
  <a href="https://www.npmjs.com/package/@szum-tech/design-system"><img alt="NPM version" src="https://img.shields.io/npm/v/@szum-tech/design-system"></a>
17
22
  <a href="https://www.npmjs.com/package/@szum-tech/design-system"><img alt="Downloads" src="https://img.shields.io/npm/dm/@szum-tech/design-system"></a>
18
23
  </div>
19
24
  </div>
25
+
20
26
  <br>
27
+
21
28
  <p align="center">
22
- Design system supported by <a href="https://tailwindcss.com/">Tailwind CSS</a> library, it allows the creation of applications
23
- supporting light and dark themes, shares UI React Components and a color palette in compliance with the Szum-Tech
24
- standards.
29
+ Built with <a href="https://tailwindcss.com/">Tailwind CSS</a> and <a href="https://www.radix-ui.com/">Radix UI</a>, this design system provides a robust collection of over 50+ modern, resuable UI components supporting light and dark themes. It ensures accessibility out of the box and seamlessly integrates with React 19+.
25
30
  </p>
26
31
 
27
32
  ---
28
33
 
29
- ## 📚 Features
34
+ ## Features
30
35
 
31
- - Predefined [Tailwind CSS](https://tailwindcss.com/) 4+ configuration, custom color palettes and more
32
- - Support for two themes:
33
- - `light`
34
- - `dark`
35
- - Ready to use [Components](#components) created based on [Radix UI](https://www.radix-ui.com/)
36
- - [Icons collection](#icons)
36
+ - 🎨 **Modern Stack**: Ready to go with [Tailwind CSS v4+](https://tailwindcss.com/) & React 19+.
37
+ - 🧩 **Extensive Kit**: Over 50+ crafted components (Carousel, Sortable, Drawers, Comboboxes, Pickers & more).
38
+ - ♿ **Accessible**: Built around [Radix UI](https://www.radix-ui.com/) and [@base-ui/react](https://base-ui.com/) to
39
+ ensure WAI-ARIA compliance.
40
+ - 🌓 **Themes**: Native support for configurable `light` and `dark` color palettes.
41
+ - 📐 **Animations**: Smooth motion and interactions powered by `motion`, `tailwindcss-animate`, and `@dnd-kit`.
42
+ - 🗃️ **Iconography**: Bundled optimized icon set with Lucide React.
43
+ - 📘 **Interactive Docs**: Fully documented and play-tested in a Storybook environment.
37
44
 
38
45
  ## 📖 Table of Contents
39
46
 
40
- <!-- TOC -->
41
-
42
- - [📚 Features](#-features)
43
- - [📖 Table of Contents](#-table-of-contents)
47
+ - [✨ Features](#-features)
44
48
  - [🎯 Getting Started](#-getting-started)
45
- - [⚙️ Installation](#-installation)
46
- - [Tailwindcss Configuration](#tailwindcss-configuration)
47
- - [CSS file](#css-file)
48
- - [Usage](#usage)
49
- - [Components](#components)
50
- - [Icons](#icons)
51
- - [🛠️ Developer Info](#-developer-info)
52
- - [Dependencies](#dependencies)
53
- - [Peer Dependencies](#peer-dependencies)
54
- - [Documentation](#documentation)
49
+ - [⚙️ Installation](#️-installation)
50
+ - [🎨 Tailwind CSS Configuration](#-tailwind-css-configuration)
51
+ - [🚀 Usage](#-usage)
52
+ - [🧩 Components](#-components)
53
+ - [🖼️ Icons](#️-icons)
54
+ - [🪝 Hooks \& Utils](#-hooks--utils)
55
+ - [📚 Documentation](#-documentation)
56
+ - [🛠️ Developer Info](#️-developer-info)
55
57
  - [📓 Changelog](#-changelog)
56
58
  - [📜 License](#-license)
57
- <!-- TOC -->
59
+
60
+ ---
58
61
 
59
62
  ## 🎯 Getting Started
60
63
 
61
64
  ### ⚙️ Installation
62
65
 
63
- [@szum-tech/design-system](https://www.npmjs.com/package/@szum-tech/design-system) is available as
64
- [npm package](https://www.npmjs.com/package/@szum-tech/design-system),
65
-
66
- Install `tailwindcss` and `@szum-tech/design-system` via npm.
66
+ The package and its peer dependencies are available on npm. Start by adding it to your project:
67
67
 
68
68
  ```shell
69
69
  # NPM
70
- npm install tailwindcss @szum-tech/design-system
70
+ npm install @szum-tech/design-system
71
71
 
72
72
  # YARN
73
- yarn add tailwindcss @szum-tech/design-system
73
+ yarn add @szum-tech/design-system
74
74
 
75
75
  # PNPM
76
- pnpm add tailwindcss @szum-tech/design-system
76
+ pnpm add @szum-tech/design-system
77
77
 
78
78
  # BUN
79
- bun add tailwindcss @szum-tech/design-system
79
+ bun add @szum-tech/design-system
80
80
  ```
81
81
 
82
- ### Tailwindcss Configuration
83
-
84
- To configure Tailwind CSS, follow the [Installation](https://tailwindcss.com/docs/installation) section in the Tailwind
85
- CSS documentation.
86
-
87
- On this page, you can find all the necessary information for integrating Tailwind in various ways - you can choose the
88
- one that suits you best.
82
+ _Note: You must have `react`, `react-dom` (>=19) and `tailwindcss` (>=4) installed as peer dependencies._
89
83
 
90
- ### CSS file
84
+ ### 🎨 Tailwind CSS Configuration
91
85
 
92
- Add the following lines to your CSS file:
86
+ To use the design system components correctly, ensure Tailwind compiles its CSS framework. If you are using Tailwind v4+
87
+ with `@import` methodology, append the following lines to your main CSS file:
93
88
 
94
89
  ```css
95
90
  @import "tailwindcss";
96
91
 
97
- /* Use the @import directive to inline import CSS file with predefined styles */
92
+ /* Import the design system's predefined styles, tokens, and theme layers */
98
93
  @import "@szum-tech/design-system/tailwind/global.css";
99
94
 
100
- /* Use the @source directive to explicitly specify source files that aren't picked up by Tailwind's automatic content detection */
95
+ /* Specify source path to allow Tailwind's JIT scanner to pick up the component classes */
101
96
  @source "../node_modules/@szum-tech/design-system";
102
97
  ```
103
98
 
104
- ### Usage
99
+ > For additional installation methods, refer to the
100
+ > [Tailwind CSS Installation Docs](https://tailwindcss.com/docs/installation).
105
101
 
106
- #### Components
102
+ ---
103
+
104
+ ## 🚀 Usage
105
+
106
+ ### 🧩 Components
107
107
 
108
- All components of the design system, context, hooks, functions, etc., are imported from `@szum-tech/design-system`
108
+ All available components, contexts, and specific providers are exported from the root `@szum-tech/design-system`.
109
109
 
110
110
  ```tsx
111
- import { Button } from "@szum-tech/design-system";
111
+ import { Button, Card, CardHeader, CardTitle, CardContent } from "@szum-tech/design-system";
112
+
113
+ export default function App() {
114
+ return (
115
+ <Card>
116
+ <CardHeader>
117
+ <CardTitle>Welcome to Szum-Tech!</CardTitle>
118
+ </CardHeader>
119
+ <CardContent>
120
+ <Button variant="primary">Click me</Button>
121
+ </CardContent>
122
+ </Card>
123
+ );
124
+ }
112
125
  ```
113
126
 
114
- #### Icons
127
+ ### 🖼️ Icons
115
128
 
116
- To use Icons you need to import them from `@szum-tech/design-system/icons`
129
+ The system provides an optimized endpoint for fetching icons (using tree-shaking best practices):
117
130
 
118
131
  ```tsx
119
132
  import { GoogleLogoIcon } from "@szum-tech/design-system/icons";
133
+
134
+ export function CustomButton() {
135
+ return <Button leftIcon={<GoogleLogoIcon />}>Login with Google</Button>;
136
+ }
120
137
  ```
121
138
 
139
+ ### 🪝 Hooks & Utils
140
+
141
+ Utilities and React hooks can be imported from their respective paths:
142
+
143
+ ```tsx
144
+ import { useMediaQuery } from "@szum-tech/design-system/hooks";
145
+ import { cn } from "@szum-tech/design-system/utils";
146
+ ```
147
+
148
+ ### 🌓 Theming (Light & Dark Mode)
149
+
150
+ The design system inherits native support for both `light` and `dark` themes. Theme switching relies on Tailwind CSS's
151
+ selector strategies (custom variant `.dark`).
152
+
153
+ To activate the dark mode, append the `.dark` class to the `<html>` or `<body>` tag of your application:
154
+
155
+ ```tsx
156
+ import { useEffect, useState } from "react";
157
+ import { Button } from "@szum-tech/design-system";
158
+
159
+ export default function ThemeToggle() {
160
+ const [isDark, setIsDark] = useState(false);
161
+
162
+ useEffect(() => {
163
+ if (isDark) {
164
+ document.documentElement.classList.add("dark");
165
+ } else {
166
+ document.documentElement.classList.remove("dark");
167
+ }
168
+ }, [isDark]);
169
+
170
+ return <Button onClick={() => setIsDark(!isDark)}>Toggle to {isDark ? "Light" : "Dark"} Mode</Button>;
171
+ }
172
+ ```
173
+
174
+ ---
175
+
176
+ ## 📚 Documentation
177
+
178
+ Detailed documentation and an interactive component sandbox is generated via [Storybook](https://storybook.js.org/).
179
+ View it here:
180
+
181
+ 👉 **[Szum-Tech Design System Docs](https://janszewczyk.github.io/design-system)**
182
+
183
+ ---
184
+
122
185
  ## 🛠️ Developer Info
123
186
 
124
- ### Dependencies
187
+ ### Core Dependencies
125
188
 
126
189
  ![NPM (prod) Dependency Version](https://img.shields.io/npm/dependency-version/%40szum-tech%2Fdesign-system/class-variance-authority)
127
190
  ![NPM (prod) Dependency Version](https://img.shields.io/npm/dependency-version/%40szum-tech%2Fdesign-system/clsx)
128
191
  ![NPM (prod) Dependency Version](https://img.shields.io/npm/dependency-version/%40szum-tech%2Fdesign-system/radix-ui)
129
192
  ![NPM (prod) Dependency Version](https://img.shields.io/npm/dependency-version/%40szum-tech%2Fdesign-system/tailwind-merge)
130
- ![NPM (prod) Dependency Version](https://img.shields.io/npm/dependency-version/%40szum-tech%2Fdesign-system/tailwindcss-animate)
131
193
 
132
194
  ### Peer Dependencies
133
195
 
134
196
  ![NPM dev or peer Dependency Version](https://img.shields.io/npm/dependency-version/%40szum-tech%2Fdesign-system/peer/react)
135
197
  ![NPM dev or peer Dependency Version](https://img.shields.io/npm/dependency-version/%40szum-tech%2Fdesign-system/peer/react-dom)
136
- ![NPM dev or peer Dependency Version](https://img.shields.io/npm/dependency-version/%40szum-tech%2Fdesign-system/peer/react-hook-form)
137
198
  ![NPM dev or peer Dependency Version](https://img.shields.io/npm/dependency-version/%40szum-tech%2Fdesign-system/peer/tailwindcss)
138
199
 
139
- ### Documentation
200
+ ### Commands
140
201
 
141
- [Szum-Tech Design System](https://janszewczyk.github.io/design-system)
202
+ For running the environment locally:
203
+
204
+ - **Build**: `npm run build`
205
+ - **Storybook**: `npm run storybook:dev`
206
+ - **Lint**: `npm run lint`
207
+ - **Test**: `npm run test` or `npm run test:ui`
208
+
209
+ ---
142
210
 
143
211
  ## 📓 Changelog
144
212
 
145
- The [changelog](https://github.com/JanSzewczyk/design-system/blob/main/CHANGELOG.md) is regularly updated to reflect
146
- what's changed in each new release.
213
+ We use Semantic Release for semantic versioning. For a complete list of updates, please see the
214
+ [CHANGELOG.md](https://github.com/JanSzewczyk/design-system/blob/main/CHANGELOG.md).
215
+
216
+ ---
147
217
 
148
218
  ## 📜 License
149
219
 
150
- This project is licensed under the terms of the
151
- [MIT license](https://github.com/JanSzewczyk/design-system/blob/main/LICENSE).
220
+ Available under the terms of the [MIT license](https://github.com/JanSzewczyk/design-system/blob/main/LICENSE).