@shival99/z-ui 2.4.5 → 2.4.7
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 +47 -7
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs +102 -22
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-hover-glide.mjs +122 -29
- package/fesm2022/shival99-z-ui-components-z-hover-glide.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-menu.mjs +7 -4
- package/fesm2022/shival99-z-ui-components-z-menu.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-overlay.mjs +4 -1
- package/fesm2022/shival99-z-ui-components-z-overlay.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-popover.mjs +37 -26
- package/fesm2022/shival99-z-ui-components-z-popover.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-table.mjs +2 -2
- package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-i18n.mjs +2 -0
- package/fesm2022/shival99-z-ui-i18n.mjs.map +1 -1
- package/package.json +2 -2
- package/types/shival99-z-ui-components-z-calendar.d.ts +8 -4
- package/types/shival99-z-ui-components-z-hover-glide.d.ts +7 -0
- package/types/shival99-z-ui-components-z-popover.d.ts +2 -0
- package/types/shival99-z-ui-components-z-table.d.ts +2 -2
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Z-UI - Modern Angular Component Library
|
|
2
2
|
|
|
3
|
-
A comprehensive, high-performance UI component library built with Angular
|
|
3
|
+
A comprehensive, high-performance UI component library built with Angular 22+, featuring 45+ customizable components with dark mode, accessibility, and enterprise-ready features.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
|
-
- **
|
|
7
|
+
- **45+ Components** - Buttons, Inputs, Tables, Modals, Calendars, and more
|
|
8
8
|
- **Dark Mode** - Built-in theme support with 9 color themes
|
|
9
9
|
- **Accessible** - WCAG 2.1 compliant components
|
|
10
10
|
- **Responsive** - Mobile-first responsive design
|
|
@@ -58,7 +58,8 @@ Update your `project.json` or `angular.json` styles:
|
|
|
58
58
|
]
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
`tailwind.css` includes every Z-UI theme. `ZThemeService` switches themes through the
|
|
61
|
+
`tailwind.css` includes every Z-UI theme and the Tailwind radius scale. `ZThemeService` switches themes through the
|
|
62
|
+
`z-theme` attribute without loading additional runtime assets. The base radius is `--radius: 0.375rem`.
|
|
62
63
|
|
|
63
64
|
## Quick Start
|
|
64
65
|
|
|
@@ -88,7 +89,7 @@ import { provideZTranslate } from '@shival99/z-ui/providers';
|
|
|
88
89
|
import { provideZNgxMask } from '@shival99/z-ui/providers';
|
|
89
90
|
|
|
90
91
|
export const appConfig: ApplicationConfig = {
|
|
91
|
-
providers: [provideZTranslate({ defaultLang: 'vi',
|
|
92
|
+
providers: [provideZTranslate({ defaultLang: 'vi', translationPath: '/assets/i18n/' }), provideZNgxMask()],
|
|
92
93
|
};
|
|
93
94
|
```
|
|
94
95
|
|
|
@@ -118,13 +119,32 @@ import { Z_UI_TRANSLATIONS } from '@shival99/z-ui/i18n';
|
|
|
118
119
|
|
|
119
120
|
## Theming
|
|
120
121
|
|
|
121
|
-
Available themes: `green`, `orange`, `violet`, `neutral`, `zinc`, `slate`, `stone`, `gray`, `hospital
|
|
122
|
+
Available themes: `green`, `orange`, `violet`, `neutral`, `zinc`, `slate`, `stone`, `gray`, `hospital`.
|
|
123
|
+
For startup defaults, dark mode, and preference isolation, configure `provideZTheme()`:
|
|
124
|
+
|
|
125
|
+
```typescript
|
|
126
|
+
import { provideZTheme } from '@shival99/z-ui/providers';
|
|
127
|
+
|
|
128
|
+
export const appConfig: ApplicationConfig = {
|
|
129
|
+
providers: [
|
|
130
|
+
provideZTheme({
|
|
131
|
+
defaultTheme: 'green',
|
|
132
|
+
defaultDarkMode: false,
|
|
133
|
+
cacheKey: 'MY_APP_THEME_PREFERENCES',
|
|
134
|
+
}),
|
|
135
|
+
],
|
|
136
|
+
};
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Change the active theme at runtime with `ZThemeService.setTheme()` and `toggleDarkMode()`. Preferences are read from
|
|
140
|
+
the configured cache key and override provider defaults when present. Themes are bundled in `tailwind.css`; do not
|
|
141
|
+
add per-theme stylesheet entries or new `preloadTheme()` calls.
|
|
122
142
|
|
|
123
143
|
```typescript
|
|
124
144
|
import { ZThemeService } from '@shival99/z-ui/services';
|
|
125
145
|
|
|
126
146
|
export class AppComponent {
|
|
127
|
-
private themeService = inject(ZThemeService);
|
|
147
|
+
private readonly themeService = inject(ZThemeService);
|
|
128
148
|
|
|
129
149
|
ngOnInit() {
|
|
130
150
|
this.themeService.setTheme('violet');
|
|
@@ -143,7 +163,7 @@ Override these in your `styles.css` or `styles.scss`:
|
|
|
143
163
|
|
|
144
164
|
```css
|
|
145
165
|
:root {
|
|
146
|
-
--font-sans: '
|
|
166
|
+
--font-sans: 'Outfit', system-ui, -apple-system, sans-serif;
|
|
147
167
|
--font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'Courier New', monospace;
|
|
148
168
|
}
|
|
149
169
|
```
|
|
@@ -237,6 +257,26 @@ Example - Using Inter font:
|
|
|
237
257
|
}
|
|
238
258
|
```
|
|
239
259
|
|
|
260
|
+
### Radius and Shadow Scale
|
|
261
|
+
|
|
262
|
+
`--radius` defaults to `0.375rem` (`6px`). Tailwind derives the component radius scale from it:
|
|
263
|
+
|
|
264
|
+
```css
|
|
265
|
+
:root {
|
|
266
|
+
--radius-xs: max(0px, calc(var(--radius) - 6px));
|
|
267
|
+
--radius-sm: max(0px, calc(var(--radius) - 4px));
|
|
268
|
+
--radius-md: max(0px, calc(var(--radius) - 2px));
|
|
269
|
+
--radius-lg: var(--radius);
|
|
270
|
+
--radius-xl: calc(var(--radius) * 1.2);
|
|
271
|
+
--radius-2xl: calc(var(--radius) * 1.4);
|
|
272
|
+
--radius-pill: calc(infinity * 1px);
|
|
273
|
+
}
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
Popover-backed controls keep a placement-aware `--z-popover-shadow` on their floating panel. Preserve
|
|
277
|
+
`shadow-[var(--z-popover-shadow)]` and avoid putting `overflow-hidden` on the popover content shell, or the
|
|
278
|
+
dropdown/calendar shadow will be clipped.
|
|
279
|
+
|
|
240
280
|
### Scrollbar Variables
|
|
241
281
|
|
|
242
282
|
```css
|