@shival99/z-ui 2.4.3 → 2.4.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/assets/css/base.css +2 -1
- package/assets/css/global.css +23 -2
- package/assets/css/tailwind.css +7 -4
- package/fesm2022/shival99-z-ui-components-z-accordion.mjs +6 -6
- package/fesm2022/shival99-z-ui-components-z-accordion.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-audio-player.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-audio-player.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs +27 -12
- package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-avatar.mjs +6 -6
- package/fesm2022/shival99-z-ui-components-z-avatar.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-breadcrumb.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-breadcrumb.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-button-group.mjs +11 -11
- package/fesm2022/shival99-z-ui-components-z-button-group.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-button.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-button.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs +40 -40
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-card.mjs +7 -7
- package/fesm2022/shival99-z-ui-components-z-card.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-chat.mjs +4 -4
- package/fesm2022/shival99-z-ui-components-z-chat.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-checkbox.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-checkbox.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-code.mjs +58 -19
- package/fesm2022/shival99-z-ui-components-z-code.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-command.mjs +6 -5
- package/fesm2022/shival99-z-ui-components-z-command.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-drawer.mjs +17 -17
- package/fesm2022/shival99-z-ui-components-z-drawer.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-dropdown-menu.mjs +12 -4
- package/fesm2022/shival99-z-ui-components-z-dropdown-menu.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-editor.mjs +6 -6
- package/fesm2022/shival99-z-ui-components-z-editor.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-empty.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-empty.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-filter.mjs +27 -27
- package/fesm2022/shival99-z-ui-components-z-filter.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-gallery.mjs +42 -34
- package/fesm2022/shival99-z-ui-components-z-gallery.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-hover-glide.mjs +221 -0
- package/fesm2022/shival99-z-ui-components-z-hover-glide.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-icon.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-icon.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-input.mjs +5 -5
- package/fesm2022/shival99-z-ui-components-z-input.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-kanban.mjs +4 -4
- package/fesm2022/shival99-z-ui-components-z-kanban.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-loading.mjs +18 -4
- package/fesm2022/shival99-z-ui-components-z-loading.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-marquee.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-marquee.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-media-player.mjs +346 -956
- package/fesm2022/shival99-z-ui-components-z-media-player.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-menu.mjs +8 -8
- package/fesm2022/shival99-z-ui-components-z-menu.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-metric-card.mjs +5 -5
- package/fesm2022/shival99-z-ui-components-z-metric-card.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-modal.mjs +17 -17
- package/fesm2022/shival99-z-ui-components-z-modal.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-number-ticker.mjs +352 -0
- package/fesm2022/shival99-z-ui-components-z-number-ticker.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-overlay.mjs +9 -9
- package/fesm2022/shival99-z-ui-components-z-overlay.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-pagination.mjs +4 -4
- package/fesm2022/shival99-z-ui-components-z-pagination.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-popover.mjs +14 -14
- package/fesm2022/shival99-z-ui-components-z-popover.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-qrcode.mjs +32 -8
- package/fesm2022/shival99-z-ui-components-z-qrcode.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-radio.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-radio.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-scrollarea.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-scrollarea.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-select.mjs +181 -26
- package/fesm2022/shival99-z-ui-components-z-select.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-show-more.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-show-more.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-skeleton-auto.mjs +4 -4
- package/fesm2022/shival99-z-ui-components-z-skeleton-auto.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-skeleton.mjs +5 -5
- package/fesm2022/shival99-z-ui-components-z-skeleton.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-steps.mjs +4 -4
- package/fesm2022/shival99-z-ui-components-z-steps.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-switch.mjs +5 -5
- package/fesm2022/shival99-z-ui-components-z-switch.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-table.mjs +107 -105
- package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-tabs.mjs +327 -31
- package/fesm2022/shival99-z-ui-components-z-tabs.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-tags.mjs +15 -15
- package/fesm2022/shival99-z-ui-components-z-tags.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-timeline.mjs +4 -4
- package/fesm2022/shival99-z-ui-components-z-timeline.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-toast.mjs +10 -9
- package/fesm2022/shival99-z-ui-components-z-toast.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-tooltip.mjs +11 -11
- package/fesm2022/shival99-z-ui-components-z-tooltip.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-upload.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-upload.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-i18n.mjs +6 -26
- package/fesm2022/shival99-z-ui-i18n.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-pipes.mjs +18 -18
- package/fesm2022/shival99-z-ui-pipes.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-services.mjs +31 -31
- package/fesm2022/shival99-z-ui-services.mjs.map +1 -1
- package/package.json +21 -1
- package/types/shival99-z-ui-components-z-autocomplete.d.ts +6 -2
- package/types/shival99-z-ui-components-z-calendar.d.ts +4 -4
- package/types/shival99-z-ui-components-z-card.d.ts +21 -21
- package/types/shival99-z-ui-components-z-code.d.ts +16 -3
- package/types/shival99-z-ui-components-z-drawer.d.ts +1 -1
- package/types/shival99-z-ui-components-z-editor.d.ts +8 -8
- package/types/shival99-z-ui-components-z-gallery.d.ts +4 -1
- package/types/shival99-z-ui-components-z-hover-glide.d.ts +48 -0
- package/types/shival99-z-ui-components-z-icon.d.ts +1 -1
- package/types/shival99-z-ui-components-z-loading.d.ts +9 -2
- package/types/shival99-z-ui-components-z-media-player.d.ts +102 -172
- package/types/shival99-z-ui-components-z-metric-card.d.ts +19 -19
- package/types/shival99-z-ui-components-z-modal.d.ts +1 -1
- package/types/shival99-z-ui-components-z-number-ticker.d.ts +110 -0
- package/types/shival99-z-ui-components-z-overlay.d.ts +3 -3
- package/types/shival99-z-ui-components-z-popover.d.ts +11 -8
- package/types/shival99-z-ui-components-z-qrcode.d.ts +5 -2
- package/types/shival99-z-ui-components-z-select.d.ts +45 -7
- package/types/shival99-z-ui-components-z-switch.d.ts +22 -21
- package/types/shival99-z-ui-components-z-table.d.ts +1 -1
- package/types/shival99-z-ui-components-z-tabs.d.ts +59 -7
- package/types/shival99-z-ui-components-z-toast.d.ts +1 -1
- package/types/shival99-z-ui-components-z-tooltip.d.ts +2 -2
- package/types/shival99-z-ui-components-z-upload.d.ts +3 -3
- package/types/shival99-z-ui-services.d.ts +10 -10
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, inject, ElementRef, Renderer2, Directive } from '@angular/core';
|
|
3
|
+
import { zTransform } from '@shival99/z-ui/utils';
|
|
4
|
+
|
|
5
|
+
/** Counter-scales border-radius across a non-uniform scale() so corners don't squash into an ellipse mid-glide. */
|
|
6
|
+
function zHoverGlideRadiusKeyframes(radius, scaleX, scaleY) {
|
|
7
|
+
const steps = 12;
|
|
8
|
+
return Array.from({ length: steps }, (_, index) => {
|
|
9
|
+
const progress = index / (steps - 1);
|
|
10
|
+
const x = scaleX + (1 - scaleX) * progress;
|
|
11
|
+
const y = scaleY + (1 - scaleY) * progress;
|
|
12
|
+
return { borderRadius: `${radius / x}px / ${radius / y}px` };
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Shared sliding hover highlight for item lists (select options, autocomplete options, command
|
|
18
|
+
* items, dropdown-menu items, ...). One absolutely-positioned box glides between hovered items
|
|
19
|
+
* instead of each item toggling its own background — matches the "motion highlight" pattern from
|
|
20
|
+
* animate-ui.
|
|
21
|
+
*
|
|
22
|
+
* The box's width/height are written once per move (a single layout op, same as any re-render) and
|
|
23
|
+
* never transitioned — only `transform` (translate + a briefly non-1 scale) animates via the Web
|
|
24
|
+
* Animations API, so the glide runs on the compositor and never re-triggers layout on the frames in
|
|
25
|
+
* between, which is what a CSS `transition` on width/height would otherwise do on every tick.
|
|
26
|
+
*
|
|
27
|
+
* Usage: put `[zHoverGlide]` on the scrollable/list container and give each hoverable item a
|
|
28
|
+
* `data-glide-item` attribute (or pass a custom `[zHoverGlideSelector]`). Works with virtualized
|
|
29
|
+
* lists out of the box since it delegates from a single `pointerover` listener on the container
|
|
30
|
+
* instead of binding per item.
|
|
31
|
+
*/
|
|
32
|
+
class ZHoverGlideDirective {
|
|
33
|
+
/** CSS selector (relative to the container) matching hoverable items. */
|
|
34
|
+
zHoverGlideSelector = input('[data-glide-item]', /* @ts-ignore */
|
|
35
|
+
...(ngDevMode ? [{ debugName: "zHoverGlideSelector" }] : /* istanbul ignore next */ []));
|
|
36
|
+
/** Classes applied to the sliding highlight box. */
|
|
37
|
+
zHoverGlideClass = input('bg-muted rounded-(--radius-sm)', /* @ts-ignore */
|
|
38
|
+
...(ngDevMode ? [{ debugName: "zHoverGlideClass" }] : /* istanbul ignore next */ []));
|
|
39
|
+
zHoverGlideDisabled = input(false, { ...(ngDevMode ? { debugName: "zHoverGlideDisabled" } : /* istanbul ignore next */ {}), transform: zTransform });
|
|
40
|
+
_elementRef = inject(ElementRef);
|
|
41
|
+
_renderer = inject(Renderer2);
|
|
42
|
+
_highlightEl = null;
|
|
43
|
+
_currentTarget = null;
|
|
44
|
+
_box = null;
|
|
45
|
+
_animations = [];
|
|
46
|
+
_lastPointerPosition = null;
|
|
47
|
+
_scrollFrame = null;
|
|
48
|
+
_prefersReducedMotion = typeof window !== 'undefined' && window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
49
|
+
ngOnDestroy() {
|
|
50
|
+
if (this._scrollFrame !== null && typeof cancelAnimationFrame === 'function') {
|
|
51
|
+
cancelAnimationFrame(this._scrollFrame);
|
|
52
|
+
}
|
|
53
|
+
for (const animation of this._animations) {
|
|
54
|
+
animation.cancel();
|
|
55
|
+
}
|
|
56
|
+
this._highlightEl?.remove();
|
|
57
|
+
}
|
|
58
|
+
_onPointerOver(event) {
|
|
59
|
+
if (this.zHoverGlideDisabled() || event.pointerType === 'touch') {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
this._lastPointerPosition = { x: event.clientX, y: event.clientY };
|
|
63
|
+
const target = event.target?.closest(this.zHoverGlideSelector());
|
|
64
|
+
if (!target || target === this._currentTarget || !this._elementRef.nativeElement.contains(target)) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if (target.getAttribute('aria-disabled') === 'true' || target.disabled) {
|
|
68
|
+
this._currentTarget = null;
|
|
69
|
+
this._fadeOut();
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
this._currentTarget = target;
|
|
73
|
+
this._moveTo(target);
|
|
74
|
+
}
|
|
75
|
+
_onPointerMove(event) {
|
|
76
|
+
if (!this.zHoverGlideDisabled() && event.pointerType !== 'touch') {
|
|
77
|
+
this._lastPointerPosition = { x: event.clientX, y: event.clientY };
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
_onScroll() {
|
|
81
|
+
if (this.zHoverGlideDisabled() || !this._lastPointerPosition) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
if (typeof requestAnimationFrame !== 'function') {
|
|
85
|
+
this._syncToPointer();
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
if (this._scrollFrame !== null) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
this._scrollFrame = requestAnimationFrame(() => {
|
|
92
|
+
this._scrollFrame = null;
|
|
93
|
+
this._syncToPointer();
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
_onPointerLeave() {
|
|
97
|
+
this._currentTarget = null;
|
|
98
|
+
this._lastPointerPosition = null;
|
|
99
|
+
this._fadeOut();
|
|
100
|
+
}
|
|
101
|
+
_syncToPointer() {
|
|
102
|
+
const pointer = this._lastPointerPosition;
|
|
103
|
+
if (!pointer) {
|
|
104
|
+
this._currentTarget = null;
|
|
105
|
+
this._fadeOut();
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
const elementAtPointer = document.elementFromPoint(pointer.x, pointer.y);
|
|
109
|
+
const target = elementAtPointer?.closest(this.zHoverGlideSelector());
|
|
110
|
+
if (!target ||
|
|
111
|
+
!this._elementRef.nativeElement.contains(target) ||
|
|
112
|
+
target.getAttribute('aria-disabled') === 'true' ||
|
|
113
|
+
target.disabled) {
|
|
114
|
+
this._currentTarget = null;
|
|
115
|
+
this._fadeOut();
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
this._currentTarget = target;
|
|
119
|
+
this._moveTo(target, false);
|
|
120
|
+
}
|
|
121
|
+
_ensureHighlightEl() {
|
|
122
|
+
if (this._highlightEl) {
|
|
123
|
+
return this._highlightEl;
|
|
124
|
+
}
|
|
125
|
+
const el = this._renderer.createElement('div');
|
|
126
|
+
el.setAttribute('aria-hidden', 'true');
|
|
127
|
+
el.style.position = 'absolute';
|
|
128
|
+
el.style.top = '0';
|
|
129
|
+
el.style.left = '0';
|
|
130
|
+
el.style.margin = '0';
|
|
131
|
+
el.style.zIndex = '0';
|
|
132
|
+
el.style.opacity = '0';
|
|
133
|
+
el.style.pointerEvents = 'none';
|
|
134
|
+
el.style.transition = this._prefersReducedMotion ? 'none' : 'opacity 120ms ease-out';
|
|
135
|
+
el.className = this.zHoverGlideClass();
|
|
136
|
+
const container = this._elementRef.nativeElement;
|
|
137
|
+
container.insertBefore(el, container.firstChild);
|
|
138
|
+
this._highlightEl = el;
|
|
139
|
+
return el;
|
|
140
|
+
}
|
|
141
|
+
_moveTo(target, shouldAnimate = true) {
|
|
142
|
+
const el = this._ensureHighlightEl();
|
|
143
|
+
const container = this._elementRef.nativeElement;
|
|
144
|
+
const containerRect = container.getBoundingClientRect();
|
|
145
|
+
const targetRect = target.getBoundingClientRect();
|
|
146
|
+
// Whole pixels only — a fractional box makes the browser re-snap subpixel rounding on every
|
|
147
|
+
// frame, which reads as the surrounding content faintly jittering.
|
|
148
|
+
const next = {
|
|
149
|
+
x: Math.round(targetRect.left - containerRect.left + container.scrollLeft),
|
|
150
|
+
y: Math.round(targetRect.top - containerRect.top + container.scrollTop),
|
|
151
|
+
w: Math.round(targetRect.width),
|
|
152
|
+
h: Math.round(targetRect.height),
|
|
153
|
+
};
|
|
154
|
+
const previous = this._box;
|
|
155
|
+
this._box = next;
|
|
156
|
+
for (const animation of this._animations) {
|
|
157
|
+
animation.cancel();
|
|
158
|
+
}
|
|
159
|
+
this._animations = [];
|
|
160
|
+
// Size and final position are a single, un-animated write — identical cost to any other
|
|
161
|
+
// re-render. Only `transform` animates from here, so the glide itself never re-triggers layout.
|
|
162
|
+
el.style.width = `${next.w}px`;
|
|
163
|
+
el.style.height = `${next.h}px`;
|
|
164
|
+
el.style.transform = `translate(${next.x}px, ${next.y}px)`;
|
|
165
|
+
el.style.borderRadius = '';
|
|
166
|
+
el.style.opacity = '1';
|
|
167
|
+
if (!previous || !shouldAnimate || this._prefersReducedMotion || typeof el.animate !== 'function') {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
const scaleX = previous.w / next.w;
|
|
171
|
+
const scaleY = previous.h / next.h;
|
|
172
|
+
const options = { duration: 180, easing: 'cubic-bezier(0.22, 1, 0.36, 1)' };
|
|
173
|
+
// `will-change` only for the animation's own lifetime: pinning it permanently keeps this
|
|
174
|
+
// element on its own compositor layer at rest too, which makes Chromium periodically
|
|
175
|
+
// re-rasterize the item text sitting on top of it at a slightly different subpixel offset —
|
|
176
|
+
// seen as the text flashing blurry-then-sharp even though nothing has actually moved.
|
|
177
|
+
el.style.willChange = 'transform';
|
|
178
|
+
const transformAnimation = el.animate([
|
|
179
|
+
{ transform: `translate(${previous.x}px, ${previous.y}px) scale(${scaleX}, ${scaleY})` },
|
|
180
|
+
{ transform: `translate(${next.x}px, ${next.y}px)` },
|
|
181
|
+
], options);
|
|
182
|
+
const clearWillChange = () => {
|
|
183
|
+
el.style.willChange = 'auto';
|
|
184
|
+
};
|
|
185
|
+
transformAnimation.addEventListener('finish', clearWillChange);
|
|
186
|
+
transformAnimation.addEventListener('cancel', clearWillChange);
|
|
187
|
+
this._animations.push(transformAnimation);
|
|
188
|
+
const radius = parseFloat(getComputedStyle(el).borderTopLeftRadius) || 0;
|
|
189
|
+
if (radius > 0 && (scaleX !== 1 || scaleY !== 1)) {
|
|
190
|
+
this._animations.push(el.animate(zHoverGlideRadiusKeyframes(radius, scaleX, scaleY), options));
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
_fadeOut() {
|
|
194
|
+
if (this._highlightEl) {
|
|
195
|
+
this._highlightEl.style.opacity = '0';
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ZHoverGlideDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
199
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.6", type: ZHoverGlideDirective, isStandalone: true, selector: "[zHoverGlide]", inputs: { zHoverGlideSelector: { classPropertyName: "zHoverGlideSelector", publicName: "zHoverGlideSelector", isSignal: true, isRequired: false, transformFunction: null }, zHoverGlideClass: { classPropertyName: "zHoverGlideClass", publicName: "zHoverGlideClass", isSignal: true, isRequired: false, transformFunction: null }, zHoverGlideDisabled: { classPropertyName: "zHoverGlideDisabled", publicName: "zHoverGlideDisabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "pointerover": "_onPointerOver($event)", "pointermove": "_onPointerMove($event)", "pointerleave": "_onPointerLeave()", "scroll": "_onScroll()" }, classAttribute: "relative" }, ngImport: i0 });
|
|
200
|
+
}
|
|
201
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ZHoverGlideDirective, decorators: [{
|
|
202
|
+
type: Directive,
|
|
203
|
+
args: [{
|
|
204
|
+
selector: '[zHoverGlide]',
|
|
205
|
+
standalone: true,
|
|
206
|
+
host: {
|
|
207
|
+
class: 'relative',
|
|
208
|
+
'(pointerover)': '_onPointerOver($event)',
|
|
209
|
+
'(pointermove)': '_onPointerMove($event)',
|
|
210
|
+
'(pointerleave)': '_onPointerLeave()',
|
|
211
|
+
'(scroll)': '_onScroll()',
|
|
212
|
+
},
|
|
213
|
+
}]
|
|
214
|
+
}], propDecorators: { zHoverGlideSelector: [{ type: i0.Input, args: [{ isSignal: true, alias: "zHoverGlideSelector", required: false }] }], zHoverGlideClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "zHoverGlideClass", required: false }] }], zHoverGlideDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "zHoverGlideDisabled", required: false }] }] } });
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Generated bundle index. Do not edit.
|
|
218
|
+
*/
|
|
219
|
+
|
|
220
|
+
export { ZHoverGlideDirective };
|
|
221
|
+
//# sourceMappingURL=shival99-z-ui-components-z-hover-glide.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shival99-z-ui-components-z-hover-glide.mjs","sources":["../../../../libs/core-ui/components/z-hover-glide/z-hover-glide.util.ts","../../../../libs/core-ui/components/z-hover-glide/z-hover-glide.directive.ts","../../../../libs/core-ui/components/z-hover-glide/shival99-z-ui-components-z-hover-glide.ts"],"sourcesContent":["/** Counter-scales border-radius across a non-uniform scale() so corners don't squash into an ellipse mid-glide. */\nexport function zHoverGlideRadiusKeyframes(radius: number, scaleX: number, scaleY: number): Keyframe[] {\n const steps = 12;\n return Array.from({ length: steps }, (_, index) => {\n const progress = index / (steps - 1);\n const x = scaleX + (1 - scaleX) * progress;\n const y = scaleY + (1 - scaleY) * progress;\n return { borderRadius: `${radius / x}px / ${radius / y}px` };\n });\n}\n","import { Directive, ElementRef, inject, input, OnDestroy, Renderer2 } from '@angular/core';\nimport { zTransform } from '@shival99/z-ui/utils';\nimport type { ZHoverGlideBox } from './z-hover-glide.types';\nimport { zHoverGlideRadiusKeyframes } from './z-hover-glide.util';\n\n/**\n * Shared sliding hover highlight for item lists (select options, autocomplete options, command\n * items, dropdown-menu items, ...). One absolutely-positioned box glides between hovered items\n * instead of each item toggling its own background — matches the \"motion highlight\" pattern from\n * animate-ui.\n *\n * The box's width/height are written once per move (a single layout op, same as any re-render) and\n * never transitioned — only `transform` (translate + a briefly non-1 scale) animates via the Web\n * Animations API, so the glide runs on the compositor and never re-triggers layout on the frames in\n * between, which is what a CSS `transition` on width/height would otherwise do on every tick.\n *\n * Usage: put `[zHoverGlide]` on the scrollable/list container and give each hoverable item a\n * `data-glide-item` attribute (or pass a custom `[zHoverGlideSelector]`). Works with virtualized\n * lists out of the box since it delegates from a single `pointerover` listener on the container\n * instead of binding per item.\n */\n@Directive({\n selector: '[zHoverGlide]',\n standalone: true,\n host: {\n class: 'relative',\n '(pointerover)': '_onPointerOver($event)',\n '(pointermove)': '_onPointerMove($event)',\n '(pointerleave)': '_onPointerLeave()',\n '(scroll)': '_onScroll()',\n },\n})\nexport class ZHoverGlideDirective implements OnDestroy {\n /** CSS selector (relative to the container) matching hoverable items. */\n public readonly zHoverGlideSelector = input<string>('[data-glide-item]');\n\n /** Classes applied to the sliding highlight box. */\n public readonly zHoverGlideClass = input<string>('bg-muted rounded-(--radius-sm)');\n\n public readonly zHoverGlideDisabled = input(false, { transform: zTransform });\n\n private readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly _renderer = inject(Renderer2);\n\n private _highlightEl: HTMLElement | null = null;\n private _currentTarget: HTMLElement | null = null;\n private _box: ZHoverGlideBox | null = null;\n private _animations: Animation[] = [];\n private _lastPointerPosition: { x: number; y: number } | null = null;\n private _scrollFrame: number | null = null;\n private readonly _prefersReducedMotion =\n typeof window !== 'undefined' && window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n\n public ngOnDestroy(): void {\n if (this._scrollFrame !== null && typeof cancelAnimationFrame === 'function') {\n cancelAnimationFrame(this._scrollFrame);\n }\n for (const animation of this._animations) {\n animation.cancel();\n }\n this._highlightEl?.remove();\n }\n\n protected _onPointerOver(event: PointerEvent): void {\n if (this.zHoverGlideDisabled() || event.pointerType === 'touch') {\n return;\n }\n\n this._lastPointerPosition = { x: event.clientX, y: event.clientY };\n const target = (event.target as HTMLElement | null)?.closest(this.zHoverGlideSelector()) as HTMLElement | null;\n if (!target || target === this._currentTarget || !this._elementRef.nativeElement.contains(target)) {\n return;\n }\n\n if (target.getAttribute('aria-disabled') === 'true' || (target as HTMLButtonElement).disabled) {\n this._currentTarget = null;\n this._fadeOut();\n return;\n }\n\n this._currentTarget = target;\n this._moveTo(target);\n }\n\n protected _onPointerMove(event: PointerEvent): void {\n if (!this.zHoverGlideDisabled() && event.pointerType !== 'touch') {\n this._lastPointerPosition = { x: event.clientX, y: event.clientY };\n }\n }\n\n protected _onScroll(): void {\n if (this.zHoverGlideDisabled() || !this._lastPointerPosition) {\n return;\n }\n\n if (typeof requestAnimationFrame !== 'function') {\n this._syncToPointer();\n return;\n }\n\n if (this._scrollFrame !== null) {\n return;\n }\n\n this._scrollFrame = requestAnimationFrame(() => {\n this._scrollFrame = null;\n this._syncToPointer();\n });\n }\n\n protected _onPointerLeave(): void {\n this._currentTarget = null;\n this._lastPointerPosition = null;\n this._fadeOut();\n }\n\n private _syncToPointer(): void {\n const pointer = this._lastPointerPosition;\n if (!pointer) {\n this._currentTarget = null;\n this._fadeOut();\n return;\n }\n\n const elementAtPointer = document.elementFromPoint(pointer.x, pointer.y) as HTMLElement | null;\n const target = elementAtPointer?.closest(this.zHoverGlideSelector()) as HTMLElement | null;\n if (\n !target ||\n !this._elementRef.nativeElement.contains(target) ||\n target.getAttribute('aria-disabled') === 'true' ||\n (target as HTMLButtonElement).disabled\n ) {\n this._currentTarget = null;\n this._fadeOut();\n return;\n }\n\n this._currentTarget = target;\n this._moveTo(target, false);\n }\n\n private _ensureHighlightEl(): HTMLElement {\n if (this._highlightEl) {\n return this._highlightEl;\n }\n\n const el = this._renderer.createElement('div') as HTMLElement;\n el.setAttribute('aria-hidden', 'true');\n el.style.position = 'absolute';\n el.style.top = '0';\n el.style.left = '0';\n el.style.margin = '0';\n el.style.zIndex = '0';\n el.style.opacity = '0';\n el.style.pointerEvents = 'none';\n el.style.transition = this._prefersReducedMotion ? 'none' : 'opacity 120ms ease-out';\n el.className = this.zHoverGlideClass();\n\n const container = this._elementRef.nativeElement;\n container.insertBefore(el, container.firstChild);\n this._highlightEl = el;\n\n return el;\n }\n\n private _moveTo(target: HTMLElement, shouldAnimate = true): void {\n const el = this._ensureHighlightEl();\n const container = this._elementRef.nativeElement;\n const containerRect = container.getBoundingClientRect();\n const targetRect = target.getBoundingClientRect();\n\n // Whole pixels only — a fractional box makes the browser re-snap subpixel rounding on every\n // frame, which reads as the surrounding content faintly jittering.\n const next: ZHoverGlideBox = {\n x: Math.round(targetRect.left - containerRect.left + container.scrollLeft),\n y: Math.round(targetRect.top - containerRect.top + container.scrollTop),\n w: Math.round(targetRect.width),\n h: Math.round(targetRect.height),\n };\n\n const previous = this._box;\n this._box = next;\n\n for (const animation of this._animations) {\n animation.cancel();\n }\n this._animations = [];\n\n // Size and final position are a single, un-animated write — identical cost to any other\n // re-render. Only `transform` animates from here, so the glide itself never re-triggers layout.\n el.style.width = `${next.w}px`;\n el.style.height = `${next.h}px`;\n el.style.transform = `translate(${next.x}px, ${next.y}px)`;\n el.style.borderRadius = '';\n el.style.opacity = '1';\n\n if (!previous || !shouldAnimate || this._prefersReducedMotion || typeof el.animate !== 'function') {\n return;\n }\n\n const scaleX = previous.w / next.w;\n const scaleY = previous.h / next.h;\n const options: KeyframeAnimationOptions = { duration: 180, easing: 'cubic-bezier(0.22, 1, 0.36, 1)' };\n\n // `will-change` only for the animation's own lifetime: pinning it permanently keeps this\n // element on its own compositor layer at rest too, which makes Chromium periodically\n // re-rasterize the item text sitting on top of it at a slightly different subpixel offset —\n // seen as the text flashing blurry-then-sharp even though nothing has actually moved.\n el.style.willChange = 'transform';\n const transformAnimation = el.animate(\n [\n { transform: `translate(${previous.x}px, ${previous.y}px) scale(${scaleX}, ${scaleY})` },\n { transform: `translate(${next.x}px, ${next.y}px)` },\n ],\n options\n );\n const clearWillChange = (): void => {\n el.style.willChange = 'auto';\n };\n transformAnimation.addEventListener('finish', clearWillChange);\n transformAnimation.addEventListener('cancel', clearWillChange);\n this._animations.push(transformAnimation);\n\n const radius = parseFloat(getComputedStyle(el).borderTopLeftRadius) || 0;\n if (radius > 0 && (scaleX !== 1 || scaleY !== 1)) {\n this._animations.push(el.animate(zHoverGlideRadiusKeyframes(radius, scaleX, scaleY), options));\n }\n }\n\n private _fadeOut(): void {\n if (this._highlightEl) {\n this._highlightEl.style.opacity = '0';\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;SACgB,0BAA0B,CAAC,MAAc,EAAE,MAAc,EAAE,MAAc,EAAA;IACvF,MAAM,KAAK,GAAG,EAAE;AAChB,IAAA,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,KAAI;QAChD,MAAM,QAAQ,GAAG,KAAK,IAAI,KAAK,GAAG,CAAC,CAAC;QACpC,MAAM,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC,GAAG,MAAM,IAAI,QAAQ;QAC1C,MAAM,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC,GAAG,MAAM,IAA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
333
333
|
}
|
|
334
334
|
}
|
|
335
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
336
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
335
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ZIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
336
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: ZIconComponent, isStandalone: true, selector: "z-icon, [z-icon]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zType: { classPropertyName: "zType", publicName: "zType", isSignal: true, isRequired: false, transformFunction: null }, zAnimatedType: { classPropertyName: "zAnimatedType", publicName: "zAnimatedType", isSignal: true, isRequired: false, transformFunction: null }, zAnimate: { classPropertyName: "zAnimate", publicName: "zAnimate", isSignal: true, isRequired: false, transformFunction: null }, zAnimationTrigger: { classPropertyName: "zAnimationTrigger", publicName: "zAnimationTrigger", isSignal: true, isRequired: false, transformFunction: null }, zSize: { classPropertyName: "zSize", publicName: "zSize", isSignal: true, isRequired: false, transformFunction: null }, zStrokeWidth: { classPropertyName: "zStrokeWidth", publicName: "zStrokeWidth", isSignal: true, isRequired: false, transformFunction: null }, zSvg: { classPropertyName: "zSvg", publicName: "zSvg", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "setHoverActive(true)", "mouseleave": "setHoverActive(false)", "focusin": "setFocusActive(true)", "focusout": "setFocusActive(false)", "touchstart": "setTouchActive(true)", "touchend": "setTouchActive(false)" }, properties: { "class": "zClasses()", "style.width": "normalizedSize() + \"px\"", "style.height": "normalizedSize() + \"px\"" } }, viewQueries: [{ propertyName: "animatedIconHost", first: true, predicate: ["animatedIconHost"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: "@if (animatedIcon()) {\n <ng-container #animatedIconHost />\n} @else if (resolvedSvg()) {\n <ng-icon [svg]=\"resolvedSvg()\" [size]=\"normalizedSize()\" [strokeWidth]=\"zStrokeWidth()\" />\n} @else if (!zSvg()) {\n <ng-icon [name]=\"zType()\" [size]=\"normalizedSize()\" [strokeWidth]=\"zStrokeWidth()\" />\n}\n", dependencies: [{ kind: "component", type: NgIconComponent, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
337
337
|
}
|
|
338
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
338
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ZIconComponent, decorators: [{
|
|
339
339
|
type: Component,
|
|
340
340
|
args: [{ selector: 'z-icon, [z-icon]', imports: [NgIconComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
341
341
|
'[class]': 'zClasses()',
|