@shival99/z-ui 2.3.3 → 2.3.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/assets/css/overlay.css +18 -8
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs +2 -2
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-drawer.mjs +45 -3
- package/fesm2022/shival99-z-ui-components-z-drawer.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-modal.mjs +3 -1
- package/fesm2022/shival99-z-ui-components-z-modal.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-overlay.mjs +106 -15
- package/fesm2022/shival99-z-ui-components-z-overlay.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-tabs.mjs +8 -10
- package/fesm2022/shival99-z-ui-components-z-tabs.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-services.mjs +2 -1
- package/fesm2022/shival99-z-ui-services.mjs.map +1 -1
- package/package.json +1 -1
- package/types/shival99-z-ui-components-z-autocomplete.d.ts +1 -1
- package/types/shival99-z-ui-components-z-drawer.d.ts +12 -0
- package/types/shival99-z-ui-components-z-editor.d.ts +1 -1
- package/types/shival99-z-ui-components-z-gallery.d.ts +4 -4
- package/types/shival99-z-ui-components-z-modal.d.ts +1 -1
- package/types/shival99-z-ui-components-z-overlay.d.ts +60 -4
- 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-tabs.d.ts +3 -2
- package/types/shival99-z-ui-components-z-toast.d.ts +2 -2
package/assets/css/overlay.css
CHANGED
|
@@ -77,12 +77,6 @@
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
/* Khoá scroll trang nhưng giữ nguyên document flow bằng compensation ở body. */
|
|
81
|
-
html.z-scroll-locked {
|
|
82
|
-
overflow: hidden;
|
|
83
|
-
scrollbar-gutter: auto;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
80
|
@media (prefers-reduced-motion: reduce) {
|
|
87
81
|
.z-overlay-pane,
|
|
88
82
|
.z-overlay-backdrop {
|
|
@@ -91,7 +85,23 @@
|
|
|
91
85
|
}
|
|
92
86
|
}
|
|
93
87
|
|
|
94
|
-
/*
|
|
88
|
+
/*
|
|
89
|
+
* Khoá scroll trang. Phải nằm NGOÀI `@layer base` để thắng rule `html { ... }` mà app khai báo
|
|
90
|
+
* không-layer (rule trong layer luôn thua rule không-layer, bất kể specificity).
|
|
91
|
+
*/
|
|
95
92
|
html.z-scroll-locked {
|
|
96
|
-
|
|
93
|
+
overflow: hidden;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/*
|
|
97
|
+
* `overflow: hidden` làm scrollbar biến mất và nhả lại đúng chiều rộng của nó -> toàn bộ UI (kể cả
|
|
98
|
+
* element `position: fixed`) nở ra rồi co lại khi đóng overlay. `scrollbar-gutter: stable` giữ nguyên
|
|
99
|
+
* chỗ đó nên không có gì dịch chuyển. ZScrollLockService chỉ gắn class này khi trang vốn đã dành chỗ
|
|
100
|
+
* cho scrollbar — trang không có scrollbar (hoặc scrollbar dạng overlay) mà giữ gutter thì lại co vào.
|
|
101
|
+
* Trình duyệt không hỗ trợ `scrollbar-gutter`: service đo hiệu số thật rồi bù `padding-right` vào body
|
|
102
|
+
* và ghi ra `--z-scroll-lock-gutter` (0px khi không nhả) để app tự bù cho element fixed của mình:
|
|
103
|
+
* `.my-fixed-bar { padding-right: var(--z-scroll-lock-gutter, 0px); }`
|
|
104
|
+
*/
|
|
105
|
+
html.z-scroll-locked.z-scroll-locked-gutter {
|
|
106
|
+
scrollbar-gutter: stable;
|
|
97
107
|
}
|