izen-react-starter 2.7.2 → 2.7.3
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 +61 -8
- package/dist/{2SSKDMRQ-CGMqH5PF.js → 2SSKDMRQ-Chn-NgZI.js} +2 -2
- package/dist/{AP7HFJJL-Dnup2inR.js → AP7HFJJL-BME9q2ff.js} +1 -1
- package/dist/{WDYDFRGG-BAxy4Yei.js → WDYDFRGG-CYAbLseR.js} +2 -2
- package/dist/{index-D6QTki-w.js → index-DPdV1XXU.js} +579 -512
- package/dist/react-starter.js +74 -72
- package/dist/react-starter.umd.cjs +121 -121
- package/dist/src/components/ui/alert.d.ts +1 -1
- package/dist/src/components/ui/badge.d.ts +1 -1
- package/dist/src/components/ui/button.d.ts +2 -2
- package/dist/src/components/ui/sidebar.d.ts +1 -1
- package/dist/src/components/ui/toast.d.ts +1 -1
- package/dist/src/components/ui/toggle-group.d.ts +2 -2
- package/dist/src/components/ui/toggle.d.ts +2 -2
- package/dist/src/config/tailwind.config.d.ts +24 -0
- package/dist/src/config/tailwind.config.d.ts.map +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -4,8 +4,12 @@ A modern React component library built with Vite, TypeScript, and best practices
|
|
|
4
4
|
|
|
5
5
|
## Changelog
|
|
6
6
|
|
|
7
|
-
- 2026-01-
|
|
8
|
-
-
|
|
7
|
+
- **2026-01-17**:
|
|
8
|
+
- **Tailwind CSS as peer dependency**: Library no longer bundles Tailwind. Consuming projects must install `tailwindcss` separately, reducing bundle size.
|
|
9
|
+
- **Exported `tailwindConfig`**: Can now import the library's default Tailwind config: `import { tailwindConfig } from 'izen-react-starter'`.
|
|
10
|
+
- **Custom sidebar support**: Added `customSidebar` and `useCustomSidebar` props to `DashboardLayout` for rendering custom sidebar components.
|
|
11
|
+
- **2026-01-12**: Added `publicResources` prop to `RBACConfig` for guest access without authentication. Added `DashboardLayout` component with integrated `AppSidebar`, header, and overlay support. Sidebar supports `collapsible: 'icon'` for desktop toggle and `'offcanvas'` for mobile sheet behavior.
|
|
12
|
+
- **2026-01-02**: `BrowserRouter` removed from inside `AppProvider`. Consumers must wrap `AppProvider` in their own router at the app root.
|
|
9
13
|
|
|
10
14
|
## Features
|
|
11
15
|
|
|
@@ -28,28 +32,77 @@ A modern React component library built with Vite, TypeScript, and best practices
|
|
|
28
32
|
## Installation
|
|
29
33
|
|
|
30
34
|
```bash
|
|
31
|
-
npm install izen-react-starter
|
|
35
|
+
npm install izen-react-starter tailwindcss
|
|
32
36
|
# or
|
|
33
|
-
yarn add izen-react-starter
|
|
37
|
+
yarn add izen-react-starter tailwindcss
|
|
34
38
|
# or
|
|
35
|
-
pnpm add izen-react-starter
|
|
39
|
+
pnpm add izen-react-starter tailwindcss
|
|
36
40
|
```
|
|
37
41
|
|
|
42
|
+
> **Important**: This library requires `tailwindcss` as a peer dependency. You must install it in your project for the styles to work correctly.
|
|
43
|
+
|
|
38
44
|
> **Note**: This library has a peer dependency of React ^18.2.0. If you're using React 19, you may need to install with `--legacy-peer-deps` flag:
|
|
39
45
|
> ```bash
|
|
40
|
-
> npm install izen-react-starter --legacy-peer-deps
|
|
46
|
+
> npm install izen-react-starter tailwindcss --legacy-peer-deps
|
|
41
47
|
> ```
|
|
42
48
|
|
|
49
|
+
### Setup Tailwind in Your Project
|
|
50
|
+
|
|
51
|
+
If you haven't already, initialize Tailwind in your consuming project:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npx tailwindcss init -p
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
#### Option 1: Use the library's default config (Recommended for simplicity)
|
|
58
|
+
|
|
59
|
+
```js
|
|
60
|
+
// tailwind.config.js
|
|
61
|
+
import { tailwindConfig } from 'izen-react-starter';
|
|
62
|
+
|
|
63
|
+
export default {
|
|
64
|
+
...tailwindConfig,
|
|
65
|
+
content: [
|
|
66
|
+
"./index.html",
|
|
67
|
+
"./src/**/*.{js,ts,jsx,tsx}",
|
|
68
|
+
"./node_modules/izen-react-starter/**/*.{js,ts,jsx,tsx}"
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
#### Option 2: Create your own config (For full customization)
|
|
74
|
+
|
|
75
|
+
Configure your `tailwind.config.js` to include the library's components:
|
|
76
|
+
|
|
77
|
+
```js
|
|
78
|
+
/** @type {import('tailwindcss').Config} */
|
|
79
|
+
export default {
|
|
80
|
+
darkMode: ['class'],
|
|
81
|
+
content: [
|
|
82
|
+
"./index.html",
|
|
83
|
+
"./src/**/*.{js,ts,jsx,tsx}",
|
|
84
|
+
"./node_modules/izen-react-starter/**/*.{js,ts,jsx,tsx}"
|
|
85
|
+
],
|
|
86
|
+
theme: {
|
|
87
|
+
extend: {
|
|
88
|
+
// Add your custom theme extensions here
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
plugins: [],
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
43
95
|
### Import Styles
|
|
44
96
|
|
|
45
97
|
Don't forget to import the CSS file in your app entry point:
|
|
46
98
|
|
|
47
99
|
```tsx
|
|
48
100
|
// In your main.tsx or App.tsx
|
|
49
|
-
import '
|
|
101
|
+
import 'tailwindcss/tailwind.css'; // Tailwind styles from your project
|
|
102
|
+
import 'izen-react-starter/style.css'; // Library styles
|
|
50
103
|
```
|
|
51
104
|
|
|
52
|
-
The library includes
|
|
105
|
+
The library includes pre-configured Tailwind theme variables for:
|
|
53
106
|
- Light/Dark modes
|
|
54
107
|
- Customizable color schemes
|
|
55
108
|
- Geist font family
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./AP7HFJJL-
|
|
2
|
-
import { g as h, c as v, a as e } from "./index-
|
|
1
|
+
import { c as s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./AP7HFJJL-BME9q2ff.js";
|
|
2
|
+
import { g as h, c as v, a as e } from "./index-DPdV1XXU.js";
|
|
3
3
|
var C = (r) => {
|
|
4
4
|
const [t, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var xs = Object.defineProperty;
|
|
2
2
|
var $s = (e, t, n) => t in e ? xs(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var Re = (e, t, n) => $s(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { b as $e, d as B, o as ft, e as H, c as P, a as m, P as No, m as ve, S as K, t as _, i as k, f as U, h as F, j as Cs, k as ur, u as Ce, l as V, s as Qn, n as Yn, p as gt, q as T, r as Ss, v as Ut, w as _t, x as qe, y as ks, z as Rt, A as Bt, B as Es, C as Ds, D as En, F as As, E as Ht, $ as Ho, G as Ms, H as Ts, I as W, J as Vr, K as Fs, L as Is, M as cr, N as Os, O as Ls, Q as Hn, R as Ps, T as qs, U as ie, V as _s, W as Rs } from "./index-
|
|
4
|
+
import { b as $e, d as B, o as ft, e as H, c as P, a as m, P as No, m as ve, S as K, t as _, i as k, f as U, h as F, j as Cs, k as ur, u as Ce, l as V, s as Qn, n as Yn, p as gt, q as T, r as Ss, v as Ut, w as _t, x as qe, y as ks, z as Rt, A as Bt, B as Es, C as Ds, D as En, F as As, E as Ht, $ as Ho, G as Ms, H as Ts, I as W, J as Vr, K as Fs, L as Is, M as cr, N as Os, O as Ls, Q as Hn, R as Ps, T as qs, U as ie, V as _s, W as Rs } from "./index-DPdV1XXU.js";
|
|
5
5
|
var zs = (e) => e != null, Ks = (e) => e.filter(zs);
|
|
6
6
|
function Bs(e) {
|
|
7
7
|
return (...t) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as u, D as v, Q as i } from "./AP7HFJJL-
|
|
2
|
-
import { g as d, c as f, a as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./AP7HFJJL-BME9q2ff.js";
|
|
2
|
+
import { g as d, c as f, a as e } from "./index-DPdV1XXU.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = c({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|