@shival99/z-ui 1.0.3 → 1.0.4

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
@@ -42,6 +42,46 @@ pnpm add echarts ngx-echarts # Charts
42
42
  pnpm add @ngx-translate/core @ngx-translate/http-loader # i18n
43
43
  ```
44
44
 
45
+ ### Tailwind CSS v4 Setup
46
+
47
+ Z-UI requires Tailwind CSS v4. Install the dependencies:
48
+
49
+ ```bash
50
+ pnpm add -D tailwindcss @tailwindcss/postcss postcss
51
+ ```
52
+
53
+ Create `postcss.config.mjs` in your project root:
54
+
55
+ ```javascript
56
+ export default {
57
+ plugins: {
58
+ '@tailwindcss/postcss': {},
59
+ },
60
+ };
61
+ ```
62
+
63
+ Update your `project.json` or `angular.json` styles:
64
+
65
+ ```json
66
+ "styles": [
67
+ "node_modules/@shival99/z-ui/assets/css/themes/green.css",
68
+ "node_modules/@shival99/z-ui/assets/css/tailwind.css",
69
+ "src/styles.scss"
70
+ ]
71
+ ```
72
+
73
+ Copy theme files to assets for lazy loading (optional):
74
+
75
+ ```json
76
+ "assets": [
77
+ {
78
+ "glob": "*.css",
79
+ "input": "node_modules/@shival99/z-ui/assets/css/themes",
80
+ "output": "assets/css/themes"
81
+ }
82
+ ]
83
+ ```
84
+
45
85
  ## 🚀 Quick Start
46
86
 
47
87
  ### Import Components
@@ -115,6 +155,155 @@ export class AppComponent {
115
155
  }
116
156
  ```
117
157
 
158
+ ## 🎛️ CSS Variables
159
+
160
+ Z-UI uses CSS variables for customization. You can override these variables in your project's CSS to customize the look and feel.
161
+
162
+ ### Font Variables
163
+
164
+ Override these in your `styles.css` or `styles.scss`:
165
+
166
+ ```css
167
+ :root {
168
+ --font-sans: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
169
+ --font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'Courier New', monospace;
170
+ }
171
+ ```
172
+
173
+ Example - Using Inter font:
174
+
175
+ ```css
176
+ :root {
177
+ --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
178
+ }
179
+ ```
180
+
181
+ ### Theme Variables (Light Mode)
182
+
183
+ ```css
184
+ :root {
185
+ --radius: 0.625rem;
186
+ --background: oklch(1 0 0);
187
+ --foreground: oklch(0.145 0.031 264.539);
188
+ --card: oklch(1 0 0);
189
+ --card-foreground: oklch(0.145 0.031 264.539);
190
+ --popover: oklch(1 0 0);
191
+ --popover-foreground: oklch(0.145 0.031 264.539);
192
+ --primary: oklch(0.422 0.095 166.913);
193
+ --primary-foreground: oklch(0.982 0.018 166.913);
194
+ --secondary: oklch(0.967 0.004 264.539);
195
+ --secondary-foreground: oklch(0.209 0.021 264.539);
196
+ --muted: oklch(0.967 0.004 264.539);
197
+ --muted-foreground: oklch(0.556 0.024 264.539);
198
+ --accent: oklch(0.967 0.004 264.539);
199
+ --accent-foreground: oklch(0.209 0.021 264.539);
200
+ --destructive: oklch(0.577 0.245 27.325);
201
+ --destructive-foreground: oklch(0.985 0 0);
202
+ --border: oklch(0.929 0.007 264.539);
203
+ --input: oklch(0.929 0.007 264.539);
204
+ --input-autofill: oklch(1 0 0);
205
+ --ring: oklch(0.422 0.095 166.913);
206
+ --chart-1: oklch(0.646 0.222 41.116);
207
+ --chart-2: oklch(0.6 0.118 184.704);
208
+ --chart-3: oklch(0.398 0.07 227.334);
209
+ --chart-4: oklch(0.828 0.189 84.429);
210
+ --chart-5: oklch(0.769 0.188 70.08);
211
+ --sidebar: oklch(0.985 0.001 264.539);
212
+ --sidebar-foreground: oklch(0.145 0.031 264.539);
213
+ --sidebar-primary: oklch(0.422 0.095 166.913);
214
+ --sidebar-primary-foreground: oklch(0.982 0.018 166.913);
215
+ --sidebar-accent: oklch(0.967 0.004 264.539);
216
+ --sidebar-accent-foreground: oklch(0.209 0.021 264.539);
217
+ --sidebar-border: oklch(0.929 0.007 264.539);
218
+ --sidebar-ring: oklch(0.422 0.095 166.913);
219
+ }
220
+ ```
221
+
222
+ ### Theme Variables (Dark Mode)
223
+
224
+ ```css
225
+ .dark {
226
+ --background: oklch(0.145 0.031 264.539);
227
+ --foreground: oklch(0.985 0.001 264.539);
228
+ --card: oklch(0.209 0.021 264.539);
229
+ --card-foreground: oklch(0.985 0.001 264.539);
230
+ --popover: oklch(0.209 0.021 264.539);
231
+ --popover-foreground: oklch(0.985 0.001 264.539);
232
+ --primary: oklch(0.696 0.17 162.48);
233
+ --primary-foreground: oklch(0.209 0.021 264.539);
234
+ --secondary: oklch(0.268 0.019 264.539);
235
+ --secondary-foreground: oklch(0.985 0.001 264.539);
236
+ --muted: oklch(0.268 0.019 264.539);
237
+ --muted-foreground: oklch(0.708 0.019 264.539);
238
+ --accent: oklch(0.268 0.019 264.539);
239
+ --accent-foreground: oklch(0.985 0.001 264.539);
240
+ --destructive: oklch(0.704 0.191 22.216);
241
+ --destructive-foreground: oklch(0.985 0 0);
242
+ --border: oklch(1 0 0 / 10%);
243
+ --input: oklch(1 0 0 / 15%);
244
+ --input-autofill: oklch(0.19 0 0);
245
+ --ring: oklch(0.527 0.154 150.069);
246
+ --chart-1: oklch(0.488 0.243 264.376);
247
+ --chart-2: oklch(0.696 0.17 162.48);
248
+ --chart-3: oklch(0.769 0.188 70.08);
249
+ --chart-4: oklch(0.627 0.265 303.9);
250
+ --chart-5: oklch(0.645 0.246 16.439);
251
+ --sidebar: oklch(0.209 0.021 264.539);
252
+ --sidebar-foreground: oklch(0.985 0.001 264.539);
253
+ --sidebar-primary: oklch(0.696 0.17 162.48);
254
+ --sidebar-primary-foreground: oklch(0.209 0.021 264.539);
255
+ --sidebar-accent: oklch(0.268 0.019 264.539);
256
+ --sidebar-accent-foreground: oklch(0.985 0.001 264.539);
257
+ --sidebar-border: oklch(1 0 0 / 10%);
258
+ --sidebar-ring: oklch(0.527 0.154 150.069);
259
+ }
260
+ ```
261
+
262
+ ### Scrollbar Variables
263
+
264
+ ```css
265
+ :root {
266
+ --scrollbar-track-color: transparent;
267
+ --scrollbar-track-shape: 5px;
268
+ --scrollbar-track-thickness: 7px;
269
+ --scrollbar-thumb-color: #d1d5db;
270
+ --scrollbar-thumb-hover-color: #9ca3af;
271
+ --scrollbar-thumb-shape: 5px;
272
+ --scrollbar-thumb-min-size: 40;
273
+ --scrollbar-hover-opacity-transition-leave-duration: 0.3s;
274
+ --scrollbar-hover-opacity-transition-leave-delay: 0.5s;
275
+ }
276
+
277
+ .dark {
278
+ --scrollbar-thumb-color: #4b5563;
279
+ --scrollbar-thumb-hover-color: #6b7280;
280
+ }
281
+ ```
282
+
283
+ ### Example: Custom Override
284
+
285
+ Create a custom theme by overriding variables in your project:
286
+
287
+ ```css
288
+ /* styles.css */
289
+ :root {
290
+ /* Custom font */
291
+ --font-sans: 'Roboto', system-ui, sans-serif;
292
+
293
+ /* Custom primary color */
294
+ --primary: oklch(0.6 0.2 240);
295
+ --primary-foreground: oklch(1 0 0);
296
+
297
+ /* Custom border radius */
298
+ --radius: 0.5rem;
299
+ }
300
+
301
+ .dark {
302
+ /* Dark mode primary color */
303
+ --primary: oklch(0.7 0.2 240);
304
+ }
305
+ ```
306
+
118
307
  ## 📄 License
119
308
 
120
309
  MIT © [VuBoi](https://github.com/vuboi)
@@ -1,76 +1,63 @@
1
- /* ===== Base Styles ===== */
2
- @layer base {
3
- * {
4
- @apply border-border outline-ring/50;
5
- }
6
-
7
- body {
8
- @apply bg-background text-foreground;
9
- font-family:
10
- 'Be Vietnam Pro',
11
- system-ui,
12
- -apple-system,
13
- sans-serif;
14
- }
15
-
16
- /* ===== Custom Scrollbar Styles ===== */
17
- /* * {
18
- scrollbar-width: auto;
19
- scrollbar-color: #d1d5db transparent;
20
- }
1
+ :root {
2
+ --font-sans: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
3
+ --font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'Courier New', monospace;
4
+ --scrollbar-track-color: transparent;
5
+ --scrollbar-track-shape: 5px;
6
+ --scrollbar-track-thickness: 7px;
7
+ --scrollbar-thumb-color: #d1d5db;
8
+ --scrollbar-thumb-hover-color: #9ca3af;
9
+ --scrollbar-thumb-shape: 5px;
10
+ --scrollbar-thumb-min-size: 40;
11
+ --scrollbar-hover-opacity-transition-leave-duration: 0.3s;
12
+ --scrollbar-hover-opacity-transition-leave-delay: 0.5s;
13
+ }
21
14
 
22
- *:hover {
23
- scrollbar-color: #9ca3af transparent;
24
- } */
15
+ * {
16
+ border-color: var(--border);
17
+ outline-color: color-mix(in srgb, var(--ring) 50%, transparent);
18
+ }
25
19
 
26
- /* WebKit browsers (Chrome, Safari, Edge) */
27
- ::-webkit-scrollbar {
28
- width: 7px;
29
- height: 7px;
30
- }
20
+ body {
21
+ background-color: var(--background);
22
+ color: var(--foreground);
23
+ font-family: var(--font-sans);
24
+ -webkit-font-smoothing: antialiased;
25
+ -moz-osx-font-smoothing: grayscale;
26
+ }
31
27
 
32
- ::-webkit-scrollbar-track {
33
- background: transparent;
34
- }
28
+ ::-webkit-scrollbar {
29
+ width: 7px;
30
+ height: 7px;
31
+ }
35
32
 
36
- ::-webkit-scrollbar-thumb {
37
- background-color: #d1d5db;
38
- border-radius: 5px;
39
- }
33
+ ::-webkit-scrollbar-track {
34
+ background: transparent;
35
+ }
40
36
 
41
- ::-webkit-scrollbar-thumb:hover,
42
- ::-webkit-scrollbar-thumb:active {
43
- background-color: #9ca3af;
44
- }
37
+ ::-webkit-scrollbar-thumb {
38
+ background-color: #d1d5db;
39
+ border-radius: 5px;
40
+ }
45
41
 
46
- ::-webkit-scrollbar-corner {
47
- background: transparent;
48
- }
42
+ ::-webkit-scrollbar-thumb:hover,
43
+ ::-webkit-scrollbar-thumb:active {
44
+ background-color: #9ca3af;
45
+ }
49
46
 
50
- /* Dark mode scrollbar */
51
- .dark ::-webkit-scrollbar-thumb {
52
- background-color: #4b5563;
53
- }
47
+ ::-webkit-scrollbar-corner {
48
+ background: transparent;
49
+ }
54
50
 
55
- .dark ::-webkit-scrollbar-thumb:hover,
56
- .dark ::-webkit-scrollbar-thumb:active {
57
- background-color: #6b7280;
58
- }
51
+ .dark ::-webkit-scrollbar-thumb {
52
+ background-color: #4b5563;
53
+ }
59
54
 
60
- :root {
61
- --scrollbar-track-color: transparent;
62
- --scrollbar-track-shape: 5px;
63
- --scrollbar-track-thickness: 7px;
64
- --scrollbar-thumb-color: #d1d5db;
65
- --scrollbar-thumb-hover-color: #9ca3af;
66
- --scrollbar-thumb-shape: 5px;
67
- --scrollbar-thumb-min-size: 40;
68
- --scrollbar-hover-opacity-transition-leave-duration: 0.3s;
69
- --scrollbar-hover-opacity-transition-leave-delay: 0.5s;
70
- }
55
+ .dark ::-webkit-scrollbar-thumb:hover,
56
+ .dark ::-webkit-scrollbar-thumb:active {
57
+ background-color: #6b7280;
58
+ }
71
59
 
72
- .dark {
73
- --scrollbar-thumb-color: #4b5563;
74
- --scrollbar-thumb-hover-color: #6b7280;
75
- }
60
+ .dark {
61
+ --scrollbar-thumb-color: #4b5563;
62
+ --scrollbar-thumb-hover-color: #6b7280;
76
63
  }
@@ -1,5 +1,8 @@
1
1
  @import 'tailwindcss';
2
2
 
3
+ /* Scan z-ui compiled components for class generation */
4
+ @source '../../fesm2022';
5
+
3
6
  /* Configure dark mode to use class instead of prefers-color-scheme */
4
7
  @custom-variant dark (&:where(.dark, .dark *));
5
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shival99/z-ui",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Z-UI: Modern Angular UI Component Library - A comprehensive, high-performance design system built with Angular 20+, featuring 40+ customizable components with dark mode, accessibility, and enterprise-ready features.",
5
5
  "keywords": [
6
6
  "angular",