@smitch/breeze 2.2.3 → 2.2.5
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 +43 -131
- package/package.json +11 -8
package/README.md
CHANGED
|
@@ -3,23 +3,19 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/@smitch/breeze)
|
|
4
4
|
[](https://www.npmjs.com/package/@smitch/breeze)
|
|
5
5
|
|
|
6
|
-
A Next.js/React UI component library.
|
|
6
|
+
A Next.js/React UI component library built with React 19, Next.js 15, and Tailwind CSS 3.
|
|
7
7
|
|
|
8
|
-
Live demo: https://breezeui.site
|
|
8
|
+
Live demo: [https://breezeui.site](https://breezeui.site)
|
|
9
9
|
|
|
10
10
|
- [Breeze UI](#breeze-ui)
|
|
11
11
|
- [Overview](#overview)
|
|
12
12
|
- [Features](#features)
|
|
13
13
|
- [Getting Started](#getting-started)
|
|
14
|
-
- [1.
|
|
14
|
+
- [1. Installation](#1-installation)
|
|
15
15
|
- [2. Configure Tailwind 3](#2-configure-tailwind-3)
|
|
16
|
+
- [1. Generate Tailwind Config Files](#1-generate-tailwind-config-files)
|
|
16
17
|
- [2. Configure `tailwind.config.js`](#2-configure-tailwindconfigjs)
|
|
17
|
-
|
|
18
|
-
- [Compatibility](#compatibility)
|
|
19
|
-
- [Supported stacks \& compatibility matrix](#supported-stacks--compatibility-matrix)
|
|
20
|
-
- [Node / environment](#node--environment)
|
|
21
|
-
- [Troubleshooting](#troubleshooting)
|
|
22
|
-
- [Peer dependencies](#peer-dependencies)
|
|
18
|
+
- [3. Add Tailwind Directives to CSS](#3-add-tailwind-directives-to-css)
|
|
23
19
|
- [Basic Usage](#basic-usage)
|
|
24
20
|
- [Charts Usage](#charts-usage)
|
|
25
21
|
- [Chart Usage Example](#chart-usage-example)
|
|
@@ -49,55 +45,49 @@ library is designed to streamline the development process and ensure consistency
|
|
|
49
45
|
## Features
|
|
50
46
|
|
|
51
47
|
- Reusable UI components
|
|
52
|
-
- Charts
|
|
53
|
-
- Maps
|
|
54
|
-
- Built with React 19, Next.js 15 and
|
|
48
|
+
- Charts (Bar, Line, Pie, etc.)
|
|
49
|
+
- Maps (Markers, Polygons, etc.)
|
|
50
|
+
- Built with React 19, Next.js 15, and Tailwind CSS 3
|
|
51
|
+
- Dark mode support via Tailwind's `selector` strategy
|
|
55
52
|
|
|
56
53
|
## Getting Started
|
|
57
54
|
|
|
58
|
-
To use Breeze UI in your Next.js/React project, follow these steps:
|
|
55
|
+
To use Breeze UI in your Next.js/React project, follow these steps. Note: Tailwind CSS 3 is a peer
|
|
56
|
+
dependency—install it if not already present (`npm install -D tailwindcss postcss autoprefixer`).
|
|
59
57
|
|
|
60
|
-
### 1.
|
|
61
|
-
|
|
62
|
-
If you haven't set up your Next.js project yet, start by initializing it:
|
|
58
|
+
### 1. Installation
|
|
63
59
|
|
|
64
60
|
```bash
|
|
65
|
-
|
|
61
|
+
npm install @smitch/breeze
|
|
66
62
|
```
|
|
67
63
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
- **Use TypeScript?**: Select **Yes** to enable TypeScript in your project.
|
|
71
|
-
- **Use TailwindCSS?**: Select **Yes** to install and configure TailwindCSS automatically.
|
|
64
|
+
### 2. Configure Tailwind 3
|
|
72
65
|
|
|
73
|
-
|
|
74
|
-
including `tsconfig.json`, `tailwind.config.js`, and PostCSS setup.
|
|
66
|
+
To ensure Breeze UI works correctly, configure Tailwind CSS v3. All releases use v3.x.
|
|
75
67
|
|
|
76
|
-
###
|
|
68
|
+
### 1. Generate Tailwind Config Files
|
|
77
69
|
|
|
78
|
-
|
|
79
|
-
|
|
70
|
+
```js
|
|
71
|
+
npx tailwindcss init -p
|
|
72
|
+
```
|
|
80
73
|
|
|
81
|
-
|
|
74
|
+
This creates `tailwind.config.js` and `postcss.config.js` (pre-filled with Tailwind + Autoprefixer).
|
|
82
75
|
|
|
83
|
-
|
|
76
|
+
### 2. Configure `tailwind.config.js`
|
|
84
77
|
|
|
85
|
-
Update your `tailwind.config.js`
|
|
78
|
+
Update your `tailwind.config.js` to include Breeze's content path and theme.
|
|
86
79
|
|
|
87
80
|
```js
|
|
88
81
|
import type { Config } from "tailwindcss";
|
|
89
|
-
/* Import colors if using Tailwind's color palette */
|
|
90
82
|
import colors from "tailwindcss/colors";
|
|
91
83
|
|
|
92
84
|
const config: Config = {
|
|
93
85
|
/* The selector strategy replaced the class strategy in Tailwind CSS v3.4.1.*/
|
|
94
86
|
darkMode: "selector",
|
|
95
87
|
content: [
|
|
96
|
-
"./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
|
|
97
|
-
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
|
|
98
88
|
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
|
|
99
89
|
/* IMPORTANT: Add this line: */
|
|
100
|
-
"./node_modules/@smitch/
|
|
90
|
+
"./node_modules/@smitch/breeze/**/*.js",
|
|
101
91
|
],
|
|
102
92
|
theme: {
|
|
103
93
|
extend: {
|
|
@@ -155,112 +145,41 @@ const config: Config = {
|
|
|
155
145
|
require("@tailwindcss/forms")({
|
|
156
146
|
strategy: "class",
|
|
157
147
|
}),
|
|
158
|
-
require("@tailwindcss/typography"),
|
|
159
148
|
],
|
|
160
149
|
};
|
|
161
150
|
export default config;
|
|
162
151
|
```
|
|
163
152
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
```bash
|
|
167
|
-
npm install @smitch/breeze
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
## Compatibility
|
|
171
|
-
|
|
172
|
-
### Supported stacks & compatibility matrix
|
|
173
|
-
|
|
174
|
-
Use the table below to pick the Breeze major line that matches your app's React / Next.js and
|
|
175
|
-
Tailwind versions. This helps avoid peer dependency conflicts.
|
|
176
|
-
|
|
177
|
-
- Breeze v4.x (current):
|
|
178
|
-
|
|
179
|
-
- React: 19.x
|
|
180
|
-
- Next.js: 15.x
|
|
181
|
-
- Tailwind: 3.x
|
|
182
|
-
- Install: `npm install @smitch/breeze`
|
|
183
|
-
|
|
184
|
-
- Breeze v3.x:
|
|
185
|
-
- React: 18.x
|
|
186
|
-
- Next.js: 14.x (and other releases built on React 18)
|
|
187
|
-
- Tailwind: 3.x
|
|
188
|
-
- Install: `npm install @smitch/Breeze@^3`
|
|
189
|
-
|
|
190
|
-
### Node / environment
|
|
191
|
-
|
|
192
|
-
- Recommended Node: use an LTS release (Node 18/20+ recommended depending on your Next version).
|
|
193
|
-
|
|
194
|
-
### Troubleshooting
|
|
195
|
-
|
|
196
|
-
- If a feature (charts, maps) fails because a peer package is missing, install the optional peers
|
|
197
|
-
indicated in the Peer dependencies section (e.g., `chart.js`, `react-chartjs-2`, `leaflet`).
|
|
198
|
-
|
|
199
|
-
## Peer dependencies
|
|
200
|
-
|
|
201
|
-
Breeze is a component library and expects the host app to provide framework/runtime dependencies.
|
|
202
|
-
Below are the packages you should have installed in your project when using `@smitch/Breeze`.
|
|
153
|
+
### 3. Add Tailwind Directives to CSS
|
|
203
154
|
|
|
204
|
-
|
|
155
|
+
Add to your global CSS file (e.g., `globals.css` in App Router):
|
|
205
156
|
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
Optional (feature-specific — install only if you use the feature)
|
|
211
|
-
|
|
212
|
-
Charts (optional)
|
|
213
|
-
|
|
214
|
-
If you use the chart components, install the Chart.js runtime and the React wrapper:
|
|
215
|
-
|
|
216
|
-
```bash
|
|
217
|
-
npm install chart.js react-chartjs-2
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
Maps (optional — Leaflet)
|
|
221
|
-
|
|
222
|
-
If you use the map components, install Leaflet and React Leaflet:
|
|
223
|
-
|
|
224
|
-
```bash
|
|
225
|
-
npm install leaflet react-leaflet
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
TypeScript notes:
|
|
229
|
-
|
|
230
|
-
- For some setups you may want `@types/leaflet` (install if your build complains about Leaflet
|
|
231
|
-
types):
|
|
232
|
-
|
|
233
|
-
```bash
|
|
234
|
-
npm install -D @types/leaflet
|
|
157
|
+
```css
|
|
158
|
+
@tailwind base;
|
|
159
|
+
@tailwind components;
|
|
160
|
+
@tailwind utilities;
|
|
235
161
|
```
|
|
236
162
|
|
|
237
163
|
## Basic Usage
|
|
238
164
|
|
|
239
|
-
|
|
165
|
+
Import and use [components](#components):
|
|
240
166
|
|
|
241
167
|
```jsx
|
|
242
|
-
import { Button } from "@smitch/
|
|
168
|
+
import { Button } from "@smitch/breeze";
|
|
243
169
|
|
|
244
170
|
const App = () => <Button>Click me</Button>;
|
|
245
171
|
|
|
246
172
|
export default App;
|
|
247
173
|
```
|
|
248
174
|
|
|
249
|
-
|
|
175
|
+
For charts/maps, see below.
|
|
250
176
|
|
|
251
|
-
Charts
|
|
177
|
+
## Charts Usage
|
|
252
178
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
- LineChart
|
|
256
|
-
- PieChart
|
|
257
|
-
- DoughnutChart
|
|
258
|
-
- ScatterChart
|
|
259
|
-
- RadarChart
|
|
260
|
-
- PolarAreaChart
|
|
261
|
-
- MixedChart
|
|
179
|
+
Charts include: BarChart, BubbleChart, LineChart, PieChart, DoughnutChart, ScatterChart, RadarChart,
|
|
180
|
+
PolarAreaChart, MixedChart.
|
|
262
181
|
|
|
263
|
-
|
|
182
|
+
Install deps:
|
|
264
183
|
|
|
265
184
|
```bash
|
|
266
185
|
npm install chart.js react-chartjs-2
|
|
@@ -269,7 +188,7 @@ npm install chart.js react-chartjs-2
|
|
|
269
188
|
### Chart Usage Example
|
|
270
189
|
|
|
271
190
|
```jsx
|
|
272
|
-
import { BarChart } from "@smitch/
|
|
191
|
+
import { BarChart } from "@smitch/breeze/charts";
|
|
273
192
|
|
|
274
193
|
const App = () => {
|
|
275
194
|
return (
|
|
@@ -287,8 +206,7 @@ const App = () => {
|
|
|
287
206
|
data: [22, 25, 20, 18, 24],
|
|
288
207
|
backgroundColor: 'rgba(255, 99, 132, 0.6)',
|
|
289
208
|
borderWidth: 0,
|
|
290
|
-
}
|
|
291
|
-
...
|
|
209
|
+
}
|
|
292
210
|
],
|
|
293
211
|
labels: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday']
|
|
294
212
|
}}
|
|
@@ -303,15 +221,9 @@ export default App;
|
|
|
303
221
|
|
|
304
222
|
## Map Usage
|
|
305
223
|
|
|
306
|
-
Map
|
|
307
|
-
|
|
308
|
-
- MapMarker
|
|
309
|
-
- MapCircle
|
|
310
|
-
- MapPolygon
|
|
311
|
-
- MapLine
|
|
312
|
-
- MapRectangle
|
|
224
|
+
Map components: MapMarker, MapCircle, MapPolygon, MapLine, MapRectangle.
|
|
313
225
|
|
|
314
|
-
Install
|
|
226
|
+
Install deps:
|
|
315
227
|
|
|
316
228
|
```bash
|
|
317
229
|
npm install leaflet react-leaflet leaflet.fullscreen
|
|
@@ -326,7 +238,7 @@ npm install -D @types/leaflet @types/leaflet.fullscreen
|
|
|
326
238
|
#### Static Map
|
|
327
239
|
|
|
328
240
|
```jsx
|
|
329
|
-
import { Map } from "@smitch/
|
|
241
|
+
import { Map } from "@smitch/breeze/map";
|
|
330
242
|
|
|
331
243
|
const App = () => {
|
|
332
244
|
return (
|
|
@@ -348,7 +260,7 @@ export default App;
|
|
|
348
260
|
#### Map with marker
|
|
349
261
|
|
|
350
262
|
```jsx
|
|
351
|
-
import { Map, MapMarker } from "@smitch/
|
|
263
|
+
import { Map, MapMarker } from "@smitch/breeze/map";
|
|
352
264
|
|
|
353
265
|
const App = () => {
|
|
354
266
|
return (
|
|
@@ -392,7 +304,7 @@ export default App;
|
|
|
392
304
|
- <a href='https://breezeui.site/?path=/docs/inputs-file-upload--docs'>File Upload</a>
|
|
393
305
|
- <a href='https://breezeui.site/?path=/docs/inputs-input--docs'>Input</a>
|
|
394
306
|
- <a href='https://breezeui.site/?path=/docs/inputs-password-input--docs'>Password Input</a>
|
|
395
|
-
- <a href='https://breezeui.site/?path=/docs/inputs-
|
|
307
|
+
- <a href='https://breezeui.site/?path=/docs/inputs-radio-group--docs'>Radio Group</a>
|
|
396
308
|
- <a href='https://breezeui.site/?path=/docs/inputs-range-input--docs'>Range Input</a>
|
|
397
309
|
- <a href='https://breezeui.site/?path=/docs/inputs-search-input--docs'>Search Input</a>
|
|
398
310
|
- <a href='https://breezeui.site/?path=/docs/inputs-select--docs'>Select</a>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smitch/breeze",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.5",
|
|
4
4
|
"description": "A lightweight, Tailwind-powered React/Next.js UI component library.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"keywords": [
|
|
@@ -22,18 +22,21 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@smitch/js-lib": "^0.3.22",
|
|
24
24
|
"react-icons": "^5.5.0",
|
|
25
|
-
"
|
|
25
|
+
"prismjs": "^1.30.0",
|
|
26
|
+
"tailwindcss": ">=3",
|
|
26
27
|
"@tailwindcss/forms": "^0.5.9",
|
|
27
|
-
"
|
|
28
|
-
"prismjs": "^1.30.0"
|
|
28
|
+
"tailwind-merge": "^2.5.4"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"react": ">=19",
|
|
32
32
|
"react-dom": "^19.0.0",
|
|
33
|
-
"next": ">=15"
|
|
34
|
-
"tailwindcss": ">=3"
|
|
33
|
+
"next": ">=15"
|
|
35
34
|
},
|
|
36
35
|
"devDependencies": {
|
|
37
|
-
"@types/prismjs": "^1.26.5"
|
|
38
|
-
|
|
36
|
+
"@types/prismjs": "^1.26.5",
|
|
37
|
+
"postcss-import": "^15.1.0"
|
|
38
|
+
},
|
|
39
|
+
"types": "index.d.ts",
|
|
40
|
+
"typings": "index.d.ts",
|
|
41
|
+
"sideEffects": false
|
|
39
42
|
}
|