@shival99/z-ui 2.4.5 → 2.4.6
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-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-autocomplete.d.ts +1 -1
- package/types/shival99-z-ui-components-z-calendar.d.ts +8 -4
- package/types/shival99-z-ui-components-z-editor.d.ts +1 -1
- 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-select.d.ts +2 -2
- package/types/shival99-z-ui-components-z-table.d.ts +1 -1
|
@@ -45,23 +45,32 @@ class ZHoverGlideDirective {
|
|
|
45
45
|
_animations = [];
|
|
46
46
|
_lastPointerPosition = null;
|
|
47
47
|
_scrollFrame = null;
|
|
48
|
-
|
|
48
|
+
_animationGeneration = 0;
|
|
49
|
+
_prefersReducedMotion = typeof window !== 'undefined' &&
|
|
50
|
+
typeof window.matchMedia === 'function' &&
|
|
51
|
+
window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
49
52
|
ngOnDestroy() {
|
|
50
53
|
if (this._scrollFrame !== null && typeof cancelAnimationFrame === 'function') {
|
|
51
54
|
cancelAnimationFrame(this._scrollFrame);
|
|
52
55
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
this._highlightEl?.remove();
|
|
56
|
+
this._cancelAnimations();
|
|
57
|
+
this._removeHighlightElements();
|
|
57
58
|
}
|
|
58
59
|
_onPointerOver(event) {
|
|
59
60
|
if (this.zHoverGlideDisabled() || event.pointerType === 'touch') {
|
|
60
61
|
return;
|
|
61
62
|
}
|
|
62
63
|
this._lastPointerPosition = { x: event.clientX, y: event.clientY };
|
|
63
|
-
const
|
|
64
|
-
|
|
64
|
+
const source = event.target;
|
|
65
|
+
const target = this._getTarget(source);
|
|
66
|
+
if (!target) {
|
|
67
|
+
if (this._isNestedHostTarget(source)) {
|
|
68
|
+
this._currentTarget = null;
|
|
69
|
+
this._fadeOut();
|
|
70
|
+
}
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
if (target === this._currentTarget) {
|
|
65
74
|
return;
|
|
66
75
|
}
|
|
67
76
|
if (target.getAttribute('aria-disabled') === 'true' || target.disabled) {
|
|
@@ -72,6 +81,15 @@ class ZHoverGlideDirective {
|
|
|
72
81
|
this._currentTarget = target;
|
|
73
82
|
this._moveTo(target);
|
|
74
83
|
}
|
|
84
|
+
_onPointerOut(event) {
|
|
85
|
+
const relatedTarget = event.relatedTarget;
|
|
86
|
+
if (relatedTarget && this._elementRef.nativeElement.contains(relatedTarget)) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
this._currentTarget = null;
|
|
90
|
+
this._lastPointerPosition = null;
|
|
91
|
+
this._fadeOut();
|
|
92
|
+
}
|
|
75
93
|
_onPointerMove(event) {
|
|
76
94
|
if (!this.zHoverGlideDisabled() && event.pointerType !== 'touch') {
|
|
77
95
|
this._lastPointerPosition = { x: event.clientX, y: event.clientY };
|
|
@@ -105,12 +123,8 @@ class ZHoverGlideDirective {
|
|
|
105
123
|
this._fadeOut();
|
|
106
124
|
return;
|
|
107
125
|
}
|
|
108
|
-
const
|
|
109
|
-
|
|
110
|
-
if (!target ||
|
|
111
|
-
!this._elementRef.nativeElement.contains(target) ||
|
|
112
|
-
target.getAttribute('aria-disabled') === 'true' ||
|
|
113
|
-
target.disabled) {
|
|
126
|
+
const target = this._getTarget(document.elementFromPoint(pointer.x, pointer.y));
|
|
127
|
+
if (!target || target.getAttribute('aria-disabled') === 'true' || target.disabled) {
|
|
114
128
|
this._currentTarget = null;
|
|
115
129
|
this._fadeOut();
|
|
116
130
|
return;
|
|
@@ -118,12 +132,43 @@ class ZHoverGlideDirective {
|
|
|
118
132
|
this._currentTarget = target;
|
|
119
133
|
this._moveTo(target, false);
|
|
120
134
|
}
|
|
135
|
+
_getTarget(source) {
|
|
136
|
+
const target = source?.closest(this.zHoverGlideSelector());
|
|
137
|
+
if (!target) {
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
140
|
+
const container = this._elementRef.nativeElement;
|
|
141
|
+
if (!container.contains(target) || target.closest('[zhoverglide]') !== container) {
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
return target;
|
|
145
|
+
}
|
|
146
|
+
_isNestedHostTarget(source) {
|
|
147
|
+
const sourceElement = source;
|
|
148
|
+
if (!sourceElement) {
|
|
149
|
+
return false;
|
|
150
|
+
}
|
|
151
|
+
const nestedHost = sourceElement.closest('[zhoverglide]');
|
|
152
|
+
return nestedHost !== null && nestedHost !== this._elementRef.nativeElement;
|
|
153
|
+
}
|
|
121
154
|
_ensureHighlightEl() {
|
|
155
|
+
const container = this._elementRef.nativeElement;
|
|
156
|
+
const highlights = Array.from(container.children).filter(child => child.hasAttribute('data-z-hover-glide-highlight'));
|
|
157
|
+
const current = this._highlightEl?.parentElement === container ? this._highlightEl : null;
|
|
158
|
+
for (const highlight of highlights) {
|
|
159
|
+
if (highlight !== current) {
|
|
160
|
+
this._removeHighlightElement(highlight);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
if (current) {
|
|
164
|
+
return current;
|
|
165
|
+
}
|
|
122
166
|
if (this._highlightEl) {
|
|
123
|
-
|
|
167
|
+
this._removeHighlightElement(this._highlightEl);
|
|
124
168
|
}
|
|
125
169
|
const el = this._renderer.createElement('div');
|
|
126
170
|
el.setAttribute('aria-hidden', 'true');
|
|
171
|
+
el.setAttribute('data-z-hover-glide-highlight', '');
|
|
127
172
|
el.style.position = 'absolute';
|
|
128
173
|
el.style.top = '0';
|
|
129
174
|
el.style.left = '0';
|
|
@@ -133,7 +178,6 @@ class ZHoverGlideDirective {
|
|
|
133
178
|
el.style.pointerEvents = 'none';
|
|
134
179
|
el.style.transition = this._prefersReducedMotion ? 'none' : 'opacity 120ms ease-out';
|
|
135
180
|
el.className = this.zHoverGlideClass();
|
|
136
|
-
const container = this._elementRef.nativeElement;
|
|
137
181
|
container.insertBefore(el, container.firstChild);
|
|
138
182
|
this._highlightEl = el;
|
|
139
183
|
return el;
|
|
@@ -153,10 +197,7 @@ class ZHoverGlideDirective {
|
|
|
153
197
|
};
|
|
154
198
|
const previous = this._box;
|
|
155
199
|
this._box = next;
|
|
156
|
-
|
|
157
|
-
animation.cancel();
|
|
158
|
-
}
|
|
159
|
-
this._animations = [];
|
|
200
|
+
this._cancelAnimations();
|
|
160
201
|
// Size and final position are a single, un-animated write — identical cost to any other
|
|
161
202
|
// re-render. Only `transform` animates from here, so the glide itself never re-triggers layout.
|
|
162
203
|
el.style.width = `${next.w}px`;
|
|
@@ -170,6 +211,24 @@ class ZHoverGlideDirective {
|
|
|
170
211
|
const scaleX = previous.w / next.w;
|
|
171
212
|
const scaleY = previous.h / next.h;
|
|
172
213
|
const options = { duration: 180, easing: 'cubic-bezier(0.22, 1, 0.36, 1)' };
|
|
214
|
+
const animationGeneration = this._animationGeneration;
|
|
215
|
+
let activeAnimationCount = 0;
|
|
216
|
+
const trackAnimation = (animation) => {
|
|
217
|
+
activeAnimationCount += 1;
|
|
218
|
+
const cleanup = () => {
|
|
219
|
+
const index = this._animations.indexOf(animation);
|
|
220
|
+
if (index >= 0) {
|
|
221
|
+
this._animations.splice(index, 1);
|
|
222
|
+
}
|
|
223
|
+
activeAnimationCount = Math.max(0, activeAnimationCount - 1);
|
|
224
|
+
if (animationGeneration === this._animationGeneration && activeAnimationCount === 0) {
|
|
225
|
+
el.style.willChange = 'auto';
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
animation.addEventListener('finish', cleanup, { once: true });
|
|
229
|
+
animation.addEventListener('cancel', cleanup, { once: true });
|
|
230
|
+
this._animations.push(animation);
|
|
231
|
+
};
|
|
173
232
|
// `will-change` only for the animation's own lifetime: pinning it permanently keeps this
|
|
174
233
|
// element on its own compositor layer at rest too, which makes Chromium periodically
|
|
175
234
|
// re-rasterize the item text sitting on top of it at a slightly different subpixel offset —
|
|
@@ -179,24 +238,57 @@ class ZHoverGlideDirective {
|
|
|
179
238
|
{ transform: `translate(${previous.x}px, ${previous.y}px) scale(${scaleX}, ${scaleY})` },
|
|
180
239
|
{ transform: `translate(${next.x}px, ${next.y}px)` },
|
|
181
240
|
], options);
|
|
182
|
-
|
|
183
|
-
el.style.willChange = 'auto';
|
|
184
|
-
};
|
|
185
|
-
transformAnimation.addEventListener('finish', clearWillChange);
|
|
186
|
-
transformAnimation.addEventListener('cancel', clearWillChange);
|
|
187
|
-
this._animations.push(transformAnimation);
|
|
241
|
+
trackAnimation(transformAnimation);
|
|
188
242
|
const radius = parseFloat(getComputedStyle(el).borderTopLeftRadius) || 0;
|
|
189
243
|
if (radius > 0 && (scaleX !== 1 || scaleY !== 1)) {
|
|
190
|
-
|
|
244
|
+
trackAnimation(el.animate(zHoverGlideRadiusKeyframes(radius, scaleX, scaleY), options));
|
|
191
245
|
}
|
|
192
246
|
}
|
|
193
247
|
_fadeOut() {
|
|
194
|
-
|
|
195
|
-
|
|
248
|
+
this._cancelAnimations();
|
|
249
|
+
this._box = null;
|
|
250
|
+
if (!this._highlightEl) {
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
this._highlightEl.style.willChange = 'auto';
|
|
254
|
+
this._highlightEl.style.opacity = '0';
|
|
255
|
+
}
|
|
256
|
+
_cancelAnimations() {
|
|
257
|
+
this._animationGeneration += 1;
|
|
258
|
+
const animations = new Set(this._animations);
|
|
259
|
+
const highlight = this._highlightEl;
|
|
260
|
+
if (highlight && typeof highlight.getAnimations === 'function') {
|
|
261
|
+
for (const animation of highlight.getAnimations()) {
|
|
262
|
+
animations.add(animation);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
for (const animation of animations) {
|
|
266
|
+
animation.cancel();
|
|
267
|
+
}
|
|
268
|
+
this._animations = [];
|
|
269
|
+
if (highlight) {
|
|
270
|
+
highlight.style.willChange = 'auto';
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
_removeHighlightElements() {
|
|
274
|
+
const container = this._elementRef.nativeElement;
|
|
275
|
+
for (const child of Array.from(container.children)) {
|
|
276
|
+
if (child.hasAttribute('data-z-hover-glide-highlight')) {
|
|
277
|
+
this._removeHighlightElement(child);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
this._highlightEl = null;
|
|
281
|
+
}
|
|
282
|
+
_removeHighlightElement(element) {
|
|
283
|
+
if (typeof element.getAnimations === 'function') {
|
|
284
|
+
for (const animation of element.getAnimations()) {
|
|
285
|
+
animation.cancel();
|
|
286
|
+
}
|
|
196
287
|
}
|
|
288
|
+
element.remove();
|
|
197
289
|
}
|
|
198
290
|
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 });
|
|
291
|
+
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)", "pointerout": "_onPointerOut($event)", "pointermove": "_onPointerMove($event)", "pointerleave": "_onPointerLeave()", "scroll": "_onScroll()" }, classAttribute: "relative" }, ngImport: i0 });
|
|
200
292
|
}
|
|
201
293
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: ZHoverGlideDirective, decorators: [{
|
|
202
294
|
type: Directive,
|
|
@@ -206,6 +298,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
206
298
|
host: {
|
|
207
299
|
class: 'relative',
|
|
208
300
|
'(pointerover)': '_onPointerOver($event)',
|
|
301
|
+
'(pointerout)': '_onPointerOut($event)',
|
|
209
302
|
'(pointermove)': '_onPointerMove($event)',
|
|
210
303
|
'(pointerleave)': '_onPointerLeave()',
|
|
211
304
|
'(scroll)': '_onScroll()',
|
|
@@ -1 +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,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A,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,UAAU;AACjB,wBAAA,eAAe,EAAE,wBAAwB;AACzC,wBAAA,eAAe,EAAE,wBAAwB;AACzC,wBAAA,gBAAgB,EAAE,mBAAmB;AACrC,wBAAA,UAAU,EAAE,aAAa;AAC1B,qBAAA;AACF,iBAAA;;;AC/BD;;AAEG;;"}
|
|
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 '(pointerout)': '_onPointerOut($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 _animationGeneration = 0;\n private readonly _prefersReducedMotion =\n typeof window !== 'undefined' &&\n typeof window.matchMedia === 'function' &&\n 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 this._cancelAnimations();\n this._removeHighlightElements();\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 source = event.target as HTMLElement | null;\n const target = this._getTarget(source);\n if (!target) {\n if (this._isNestedHostTarget(source)) {\n this._currentTarget = null;\n this._fadeOut();\n }\n return;\n }\n\n if (target === this._currentTarget) {\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 _onPointerOut(event: PointerEvent): void {\n const relatedTarget = event.relatedTarget as Node | null;\n if (relatedTarget && this._elementRef.nativeElement.contains(relatedTarget)) {\n return;\n }\n\n this._currentTarget = null;\n this._lastPointerPosition = null;\n this._fadeOut();\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 target = this._getTarget(document.elementFromPoint(pointer.x, pointer.y));\n if (!target || 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, false);\n }\n\n private _getTarget(source: EventTarget | null): HTMLElement | null {\n const target = (source as HTMLElement | null)?.closest(this.zHoverGlideSelector()) as HTMLElement | null;\n if (!target) {\n return null;\n }\n\n const container = this._elementRef.nativeElement;\n if (!container.contains(target) || target.closest('[zhoverglide]') !== container) {\n return null;\n }\n\n return target;\n }\n\n private _isNestedHostTarget(source: EventTarget | null): boolean {\n const sourceElement = source as HTMLElement | null;\n if (!sourceElement) {\n return false;\n }\n\n const nestedHost = sourceElement.closest('[zhoverglide]');\n return nestedHost !== null && nestedHost !== this._elementRef.nativeElement;\n }\n\n private _ensureHighlightEl(): HTMLElement {\n const container = this._elementRef.nativeElement;\n const highlights = Array.from(container.children).filter(child =>\n child.hasAttribute('data-z-hover-glide-highlight')\n ) as HTMLElement[];\n const current = this._highlightEl?.parentElement === container ? this._highlightEl : null;\n\n for (const highlight of highlights) {\n if (highlight !== current) {\n this._removeHighlightElement(highlight);\n }\n }\n\n if (current) {\n return current;\n }\n\n if (this._highlightEl) {\n this._removeHighlightElement(this._highlightEl);\n }\n\n const el = this._renderer.createElement('div') as HTMLElement;\n el.setAttribute('aria-hidden', 'true');\n el.setAttribute('data-z-hover-glide-highlight', '');\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 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 this._cancelAnimations();\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 const animationGeneration = this._animationGeneration;\n let activeAnimationCount = 0;\n\n const trackAnimation = (animation: Animation): void => {\n activeAnimationCount += 1;\n const cleanup = (): void => {\n const index = this._animations.indexOf(animation);\n if (index >= 0) {\n this._animations.splice(index, 1);\n }\n activeAnimationCount = Math.max(0, activeAnimationCount - 1);\n if (animationGeneration === this._animationGeneration && activeAnimationCount === 0) {\n el.style.willChange = 'auto';\n }\n };\n animation.addEventListener('finish', cleanup, { once: true });\n animation.addEventListener('cancel', cleanup, { once: true });\n this._animations.push(animation);\n };\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 trackAnimation(transformAnimation);\n\n const radius = parseFloat(getComputedStyle(el).borderTopLeftRadius) || 0;\n if (radius > 0 && (scaleX !== 1 || scaleY !== 1)) {\n trackAnimation(el.animate(zHoverGlideRadiusKeyframes(radius, scaleX, scaleY), options));\n }\n }\n\n private _fadeOut(): void {\n this._cancelAnimations();\n this._box = null;\n if (!this._highlightEl) {\n return;\n }\n\n this._highlightEl.style.willChange = 'auto';\n this._highlightEl.style.opacity = '0';\n }\n\n private _cancelAnimations(): void {\n this._animationGeneration += 1;\n const animations = new Set(this._animations);\n const highlight = this._highlightEl;\n\n if (highlight && typeof highlight.getAnimations === 'function') {\n for (const animation of highlight.getAnimations()) {\n animations.add(animation);\n }\n }\n\n for (const animation of animations) {\n animation.cancel();\n }\n\n this._animations = [];\n if (highlight) {\n highlight.style.willChange = 'auto';\n }\n }\n\n private _removeHighlightElements(): void {\n const container = this._elementRef.nativeElement;\n for (const child of Array.from(container.children)) {\n if (child.hasAttribute('data-z-hover-glide-highlight')) {\n this._removeHighlightElement(child as HTMLElement);\n }\n }\n this._highlightEl = null;\n }\n\n private _removeHighlightElement(element: HTMLElement): void {\n if (typeof element.getAnimations === 'function') {\n for (const animation of element.getAnimations()) {\n animation.cancel();\n }\n }\n element.remove();\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,IAAI,QAAQ;AAC1C,QAAA,OAAO,EAAE,YAAY,EAAE,CAAA,EAAG,MAAM,GAAG,CAAC,CAAA,KAAA,EAAQ,MAAM,GAAG,CAAC,CAAA,EAAA,CAAI,EAAE;AAC9D,IAAA,CAAC,CAAC;AACJ;;ACJA;;;;;;;;;;;;;;;AAeG;MAaU,oBAAoB,CAAA;;IAEf,mBAAmB,GAAG,KAAK,CAAS,mBAAmB;4FAAC;;IAGxD,gBAAgB,GAAG,KAAK,CAAS,gCAAgC;yFAAC;IAElE,mBAAmB,GAAG,KAAK,CAAC,KAAK,2FAAI,SAAS,EAAE,UAAU,EAAA,CAAG;AAE5D,IAAA,WAAW,GAAG,MAAM,CAA0B,U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