@shival99/z-ui 2.1.20 → 2.1.22
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 +8 -27
- package/assets/css/tailwind.css +1 -1
- package/assets/css/themes.css +9 -0
- package/components/z-loading/THIRD_PARTY_NOTICES.md +26 -0
- package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs +6 -0
- package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-icon.mjs +28 -23
- package/fesm2022/shival99-z-ui-components-z-icon.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-loading.mjs +52 -14
- package/fesm2022/shival99-z-ui-components-z-loading.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-components-z-tabs.mjs +12 -3
- package/fesm2022/shival99-z-ui-components-z-tabs.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-services.mjs +4 -42
- package/fesm2022/shival99-z-ui-services.mjs.map +1 -1
- package/package.json +77 -24
- package/types/shival99-z-ui-components-z-autocomplete.d.ts +1 -1
- package/types/shival99-z-ui-components-z-calendar.d.ts +4 -4
- package/types/shival99-z-ui-components-z-editor.d.ts +1 -1
- package/types/shival99-z-ui-components-z-icon.d.ts +1 -1
- package/types/shival99-z-ui-components-z-loading.d.ts +13 -5
- package/types/shival99-z-ui-components-z-modal.d.ts +1 -1
- package/types/shival99-z-ui-components-z-popover.d.ts +1 -1
- package/types/shival99-z-ui-components-z-select.d.ts +1 -1
- package/types/shival99-z-ui-components-z-table.d.ts +5 -5
- package/types/shival99-z-ui-components-z-tabs.d.ts +7 -5
- package/types/shival99-z-ui-components-z-upload.d.ts +3 -3
- package/types/shival99-z-ui-services.d.ts +1 -2
package/README.md
CHANGED
|
@@ -17,27 +17,19 @@ A comprehensive, high-performance UI component library built with Angular 21+, f
|
|
|
17
17
|
## Installation
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
|
|
20
|
+
npx @shival99/z-ui-init init
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
The initializer installs the base library, all component peers, Tailwind CSS, providers, and theme configuration by default. For a smaller installation, use `init --minimal` and add feature peers incrementally:
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
npx @shival99/z-ui-init components
|
|
27
|
+
npx @shival99/z-ui-init init --minimal
|
|
28
|
+
npx @shival99/z-ui-init component editor
|
|
29
|
+
npx @shival99/z-ui-init add editor table
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
pnpm add @tiptap/core @tiptap/pm @tiptap/starter-kit @tiptap/extension-placeholder @tiptap/extension-image @tiptap/extension-link @tiptap/extension-mention @tiptap/extension-underline @tiptap/extension-text-align @tiptap/markdown # Rich Text Editor
|
|
36
|
-
pnpm add shiki dompurify # Syntax Highlighting
|
|
37
|
-
pnpm add echarts ngx-echarts # Charts
|
|
38
|
-
pnpm add @ngx-translate/core @ngx-translate/http-loader # i18n
|
|
39
|
-
pnpm add exceljs file-saver xlsx # Excel Export
|
|
40
|
-
```
|
|
32
|
+
`add` is only needed for minimal installations. It installs the optional peers required by the selected compiled secondary entrypoints and records them in `z-ui.json`. It does not copy or overwrite application source.
|
|
41
33
|
|
|
42
34
|
### Tailwind CSS v4 Setup
|
|
43
35
|
|
|
@@ -61,23 +53,12 @@ Update your `project.json` or `angular.json` styles:
|
|
|
61
53
|
|
|
62
54
|
```json
|
|
63
55
|
"styles": [
|
|
64
|
-
"node_modules/@shival99/z-ui/assets/css/themes/green.css",
|
|
65
56
|
"node_modules/@shival99/z-ui/assets/css/tailwind.css",
|
|
66
57
|
"src/styles.scss"
|
|
67
58
|
]
|
|
68
59
|
```
|
|
69
60
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
```json
|
|
73
|
-
"assets": [
|
|
74
|
-
{
|
|
75
|
-
"glob": "*.css",
|
|
76
|
-
"input": "node_modules/@shival99/z-ui/assets/css/themes",
|
|
77
|
-
"output": "assets/css/themes"
|
|
78
|
-
}
|
|
79
|
-
]
|
|
80
|
-
```
|
|
61
|
+
`tailwind.css` includes every Z-UI theme. `ZThemeService` switches themes through the `z-theme` attribute without loading additional runtime assets.
|
|
81
62
|
|
|
82
63
|
## Quick Start
|
|
83
64
|
|
package/assets/css/tailwind.css
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
@import './themes/neutral.css';
|
|
2
|
+
@import './themes/gray.css';
|
|
3
|
+
@import './themes/slate.css';
|
|
4
|
+
@import './themes/stone.css';
|
|
5
|
+
@import './themes/zinc.css';
|
|
6
|
+
@import './themes/green.css';
|
|
7
|
+
@import './themes/orange.css';
|
|
8
|
+
@import './themes/violet.css';
|
|
9
|
+
@import './themes/hospital.css';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
Parts of the `z-loading` spinner animations are adapted from
|
|
4
|
+
[react-spinners](https://github.com/davidhu2000/react-spinners).
|
|
5
|
+
|
|
6
|
+
The MIT License (MIT)
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2017 David Hu
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in
|
|
18
|
+
all copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
26
|
+
THE SOFTWARE.
|
|
@@ -638,6 +638,12 @@ class ZAutocompleteComponent {
|
|
|
638
638
|
this.uiState.update(s => ({ ...s, isOpen: true }));
|
|
639
639
|
this._resetOptionsScrollTop();
|
|
640
640
|
this._loadAsyncOptionsOnFocus();
|
|
641
|
+
// Panel chỉ mở khi user focus/click thật, tức ancestor (vd. modal) đã hết animation transform —
|
|
642
|
+
// đo lại ở đây để tránh dùng width "đóng băng" từ lúc effect khởi tạo đo hụt giữa lúc scale().
|
|
643
|
+
const triggerEl = this.triggerRef()?.nativeElement;
|
|
644
|
+
if (triggerEl) {
|
|
645
|
+
this.dropdownWidth.set(triggerEl.getBoundingClientRect().width);
|
|
646
|
+
}
|
|
641
647
|
setTimeout(() => {
|
|
642
648
|
this.inputRef()?.nativeElement.focus();
|
|
643
649
|
}, 50);
|