@szum-tech/design-system 1.18.3 → 2.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2022 Szum-Tech
3
+ Copyright (c) 2025 Szum-Tech
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,97 +1,151 @@
1
- # Szum-Tech Design System
1
+ <h1 align="center">@szum-tech/design-system</h1>
2
+ <p align="center">Szum-Tech design system.</p>
3
+ <br>
4
+ <div align="center" style="display: flex; flex-direction: column; gap: 1em;">
5
+ <div style="display: flex; gap: .5em; justify-content: center">
6
+ <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
+ <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
+ <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
+ <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
+ </div>
11
+ <div style="display: flex; gap: .5em; justify-content: center">
12
+ <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
+ <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
+ </div>
15
+ <div style="display: flex; gap: .5em; justify-content: center">
16
+ <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
+ <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
+ </div>
19
+ </div>
20
+ <br>
21
+ <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.
25
+ </p>
26
+
27
+ ---
28
+
29
+ ## 📚 Features
30
+
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)
37
+
38
+ ## 📖 Table of Contents
39
+
40
+ <!-- TOC -->
41
+
42
+ - [📚 Features](#-features)
43
+ - [📖 Table of Contents](#-table-of-contents)
44
+ - [🎯 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)
55
+ - [📓 Changelog](#-changelog)
56
+ - [📜 License](#-license)
57
+ <!-- TOC -->
58
+
59
+ ## 🎯 Getting Started
60
+
61
+ ### ⚙️ Installation
62
+
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.
2
67
 
3
- ![GitHub release (latest by date)](https://img.shields.io/github/v/release/JanSzewczyk/design-system)
4
- [![GitHub pull requests](https://img.shields.io/github/issues-pr/JanSzewczyk/design-system)](https://github.com/JanSzewczyk/design-system/pulls)
5
- [![GitHub issues](https://img.shields.io/github/issues/JanSzewczyk/design-system)](https://github.com/JanSzewczyk/design-system/issues)
6
- ![GitHub Repo stars](https://img.shields.io/github/stars/JanSzewczyk/design-system?style=social)
68
+ ```shell
69
+ # NPM
70
+ npm install tailwindcss @szum-tech/design-system
7
71
 
8
- [![released](https://github.com/JanSzewczyk/design-system/actions/workflows/publish.yml/badge.svg?branch=main)](https://github.com/JanSzewczyk/design-system/actions/workflows/publish.yml)
9
- [![deployed](https://github.com/JanSzewczyk/design-system/actions/workflows/gh-deploy.yml/badge.svg?branch=main)](https://github.com/JanSzewczyk/design-system/actions/workflows/gh-deploy.yml)
72
+ # YARN
73
+ yarn add tailwindcss @szum-tech/design-system
10
74
 
11
- [![npm](https://img.shields.io/npm/v/@szum-tech/design-system)](https://www.npmjs.com/package/@szum-tech/design-system)
12
- ![npm](https://img.shields.io/npm/dm/@szum-tech/design-system)
75
+ # PNPM
76
+ pnpm add tailwindcss @szum-tech/design-system
13
77
 
14
- [![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/JanSzewczyk/design-system/blob/main/LICENSE)
78
+ # BUN
79
+ bun add tailwindcss @szum-tech/design-system
80
+ ```
15
81
 
16
- Design system supported by [tailwindcss](https://tailwindcss.com/) library, it allows the creation of applications supporting light and dark themes, shares UI React Components and a color palette in compliance with the Szum-Tech standards.
82
+ ### Tailwindcss Configuration
17
83
 
18
- ## Installation
84
+ To configure Tailwind CSS, follow the [Installation](https://tailwindcss.com/docs/installation) section in the Tailwind
85
+ CSS documentation.
19
86
 
20
- Szum-Tech Design System is available as an [npm package](https://www.npmjs.com/package/@szum-tech/design-system).
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.
21
89
 
22
- **npm:**
90
+ ### CSS file
23
91
 
24
- ```shell
25
- npm install @szum-tech/design-system
26
- npm install -D tailwindcss
27
- ```
92
+ Add the following lines to your CSS file:
28
93
 
29
- **yarn:**
94
+ ```css
95
+ @import "tailwindcss";
30
96
 
31
- ```shell
32
- yarn add @szum-tech/design-system
33
- yarn add -D tailwindcss
34
- ```
97
+ /* Use the @import directive to inline import CSS file with predefined styles */
98
+ @import "@szum-tech/design-system/tailwind/global.css";
35
99
 
36
- ## Configuration
100
+ /* Use the @source directive to explicitly specify source files that aren't picked up by Tailwind's automatic content detection */
101
+ @source "../node_modules/@szum-tech/design-system";
102
+ ```
37
103
 
38
- After installing the [@szum-tech/design-system](https://www.npmjs.com/package/@szum-tech/design-system) package in accordance with paragraph [Installation](#Installation), during [Tailwind initialization](https://tailwindcss.com/docs/installation), follow these steps:
104
+ ### Usage
39
105
 
40
- ### 1. Add preset to `tailwind.config.js` file
106
+ #### Components
41
107
 
42
- > Add path to `@szum-tech/design-system` UI Components files and add preset file to Tailwind configuration
108
+ All components of the design system, context, hooks, functions, etc., are imported from `@szum-tech/design-system`
43
109
 
44
- ```js
45
- /** @type {import('tailwindcss').Config} */
46
- module.exports = {
47
- content: ["...", "./node_modules/@szum-tech/design-system/{components,hooks,contexts}/**/*{js,ts,jsx,tsx}"],
48
- theme: {
49
- extend: {}
50
- },
51
- plugins: [],
52
- presets: [require("@szum-tech/design-system/theme/main-preset")]
53
- };
110
+ ```tsx
111
+ import { Button } from "@szum-tech/design-system";
54
112
  ```
55
113
 
56
- ### 2. Import theme styles to CSS file with Tailwind directives
57
-
58
- > Import CSS file from `@szum-tech/design-system/theme` with colors palette for dark and light theme and default styles (see file with [theme styles](https://github.com/JanSzewczyk/design-system/blob/main/src/theme/global.css))
114
+ #### Icons
59
115
 
60
- ```css
61
- @import "@szum-tech/design-system/theme/global.css";
116
+ To use Icons you need to import them from `@szum-tech/design-system/icons`
62
117
 
63
- @tailwind base;
64
- @tailwind components;
65
- @tailwind utilities;
118
+ ```tsx
119
+ import { GoogleLogoIcon } from "@szum-tech/design-system/icons";
66
120
  ```
67
121
 
68
- ## Getting started
122
+ ## 🛠️ Developer Info
69
123
 
70
- ### Theme Provider
124
+ ### Dependencies
71
125
 
72
- `ThemeProvider` relies on the [context feature of React](https://reactjs.org/docs/context.html) to handle theme mode and pass it to components, so you need to make sure `ThemeProvider` is the parent of the components you are trying to customize.
126
+ ![NPM (prod) Dependency Version](https://img.shields.io/npm/dependency-version/%40szum-tech%2Fdesign-system/class-variance-authority)
127
+ ![NPM (prod) Dependency Version](https://img.shields.io/npm/dependency-version/%40szum-tech%2Fdesign-system/clsx)
128
+ ![NPM (prod) Dependency Version](https://img.shields.io/npm/dependency-version/%40szum-tech%2Fdesign-system/radix-ui)
129
+ ![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)
73
131
 
74
- Here is an example of a basic app using `ThemeProvider` component:
132
+ ### Peer Dependencies
75
133
 
76
- ```jsx
77
- import * as React from "react";
78
-
79
- import { ThemeProvider } from "@szum-tech/design-system";
80
-
81
- function Providers({ children }) {
82
- return <ThemeProvider>{children}</ThemeProvider>;
83
- }
84
- ```
134
+ ![NPM dev or peer Dependency Version](https://img.shields.io/npm/dependency-version/%40szum-tech%2Fdesign-system/peer/react)
135
+ ![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
+ ![NPM dev or peer Dependency Version](https://img.shields.io/npm/dependency-version/%40szum-tech%2Fdesign-system/peer/tailwindcss)
85
138
 
86
- ## Documentation
139
+ ### Documentation
87
140
 
88
141
  [Szum-Tech Design System](https://janszewczyk.github.io/design-system)
89
142
 
90
- ## Changelog
143
+ ## 📓 Changelog
91
144
 
92
- The [changelog](https://github.com/JanSzewczyk/design-system/blob/main/CHANGELOG.md) is regularly updated to reflect what's changed in each new release.
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.
93
147
 
94
- ## License
148
+ ## 📜 License
95
149
 
96
150
  This project is licensed under the terms of the
97
151
  [MIT license](https://github.com/JanSzewczyk/design-system/blob/main/LICENSE).