ng-primitives 0.0.7 → 0.2.0
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 +14 -4
- package/accordion/accordion-trigger/accordion-trigger.directive.d.ts +2 -1
- package/autofill/README.md +3 -0
- package/autofill/autofill/autofill.directive.d.ts +19 -0
- package/{select/select-button/select-button.token.d.ts → autofill/autofill/autofill.token.d.ts} +4 -4
- package/autofill/index.d.ts +9 -0
- package/avatar/avatar/avatar.directive.d.ts +2 -1
- package/button/README.md +3 -0
- package/button/button/button.directive.d.ts +27 -0
- package/{select/select-option/select-option.token.d.ts → button/button/button.token.d.ts} +4 -4
- package/button/index.d.ts +9 -0
- package/checkbox/checkbox/checkbox.directive.d.ts +11 -61
- package/checkbox/index.d.ts +0 -4
- package/esm2022/a11y/visually-hidden/visually-hidden.directive.mjs +3 -3
- package/esm2022/accordion/accordion/accordion.directive.mjs +5 -4
- package/esm2022/accordion/accordion-content/accordion-content.directive.mjs +5 -6
- package/esm2022/accordion/accordion-item/accordion-item.directive.mjs +5 -5
- package/esm2022/accordion/accordion-trigger/accordion-trigger.directive.mjs +8 -5
- package/esm2022/autofill/autofill/autofill.directive.mjs +71 -0
- package/esm2022/autofill/autofill/autofill.token.mjs +16 -0
- package/esm2022/autofill/index.mjs +10 -0
- package/esm2022/autofill/ng-primitives-autofill.mjs +5 -0
- package/esm2022/avatar/avatar/avatar.directive.mjs +7 -4
- package/esm2022/avatar/avatar-fallback/avatar-fallback.directive.mjs +3 -3
- package/esm2022/avatar/avatar-image/avatar-image.directive.mjs +3 -3
- package/esm2022/button/button/button.directive.mjs +47 -0
- package/esm2022/button/button/button.token.mjs +16 -0
- package/esm2022/button/index.mjs +10 -0
- package/esm2022/button/ng-primitives-button.mjs +5 -0
- package/esm2022/checkbox/checkbox/checkbox.directive.mjs +29 -79
- package/esm2022/checkbox/index.mjs +1 -5
- package/esm2022/file-upload/file-upload/file-upload.directive.mjs +7 -4
- package/esm2022/focus-trap/focus-trap/focus-trap.directive.mjs +262 -0
- package/esm2022/focus-trap/focus-trap/focus-trap.token.mjs +16 -0
- package/esm2022/focus-trap/index.mjs +10 -0
- package/esm2022/focus-trap/ng-primitives-focus-trap.mjs +5 -0
- package/esm2022/form-field/description/description.directive.mjs +14 -14
- package/esm2022/form-field/error/error.directive.mjs +27 -29
- package/esm2022/form-field/form-control/form-control.directive.mjs +22 -16
- package/esm2022/form-field/form-field/form-field.directive.mjs +3 -3
- package/esm2022/form-field/form-field/form-field.token.mjs +3 -7
- package/esm2022/form-field/label/label.directive.mjs +56 -17
- package/esm2022/input/index.mjs +10 -0
- package/esm2022/input/input/input.directive.mjs +55 -0
- package/esm2022/input/input/input.token.mjs +16 -0
- package/esm2022/input/ng-primitives-input.mjs +5 -0
- package/esm2022/interactions/focus/focus.directive.mjs +15 -10
- package/esm2022/interactions/focus-visible/focus-visible.directive.mjs +12 -7
- package/esm2022/interactions/hover/hover.directive.mjs +16 -11
- package/esm2022/interactions/index.mjs +5 -1
- package/esm2022/interactions/move/move.directive.mjs +216 -0
- package/esm2022/interactions/move/move.token.mjs +16 -0
- package/esm2022/interactions/press/press.directive.mjs +118 -0
- package/esm2022/interactions/press/press.token.mjs +16 -0
- package/esm2022/internal/disabled/disabled.mjs +19 -0
- package/esm2022/internal/index.mjs +11 -0
- package/esm2022/internal/ng-primitives-internal.mjs +5 -0
- package/esm2022/internal/orientation/orientation.mjs +19 -0
- package/esm2022/internal/style-injector/style-injector.mjs +81 -0
- package/esm2022/progress/progress/progress.directive.mjs +3 -3
- package/esm2022/progress/progress-indicator/progress-indicator.directive.mjs +3 -3
- package/esm2022/radio/radio-group/radio-group.directive.mjs +14 -54
- package/esm2022/radio/radio-indicator/radio-indicator.directive.mjs +8 -5
- package/esm2022/radio/radio-item/radio-item.directive.mjs +8 -6
- package/esm2022/resize/resize/resize.directive.mjs +3 -3
- package/esm2022/roving-focus/roving-focus-group/roving-focus-group.directive.mjs +14 -9
- package/esm2022/roving-focus/roving-focus-item/roving-focus-item.directive.mjs +3 -3
- package/esm2022/search/index.mjs +10 -0
- package/esm2022/search/ng-primitives-search.mjs +5 -0
- package/esm2022/search/search-field/search-field.directive.mjs +47 -0
- package/esm2022/search/search-field/search-field.token.mjs +16 -0
- package/esm2022/select/index.mjs +1 -7
- package/esm2022/select/select/select.directive.mjs +23 -36
- package/esm2022/select/select/select.token.mjs +1 -1
- package/esm2022/slider/slider/slider.directive.mjs +18 -5
- package/esm2022/slider/slider-range/slider-range.directive.mjs +6 -5
- package/esm2022/slider/slider-thumb/slider-thumb.directive.mjs +7 -4
- package/esm2022/slider/slider-track/slider-track.directive.mjs +8 -4
- package/esm2022/switch/switch/switch.directive.mjs +18 -58
- package/esm2022/switch/switch-thumb/switch-thumb.directive.mjs +9 -6
- package/esm2022/tabs/tab-button/tab-button.directive.mjs +8 -6
- package/esm2022/tabs/tab-list/tab-list.directive.mjs +3 -3
- package/esm2022/tabs/tab-panel/tab-panel.directive.mjs +5 -6
- package/esm2022/tabs/tabset/tabset.directive.mjs +14 -18
- package/esm2022/textarea/index.mjs +10 -0
- package/esm2022/textarea/ng-primitives-textarea.mjs +5 -0
- package/esm2022/textarea/textarea/textarea.directive.mjs +37 -0
- package/esm2022/textarea/textarea/textarea.token.mjs +16 -0
- package/esm2022/toggle/toggle/toggle.directive.mjs +33 -13
- package/esm2022/tooltip/tooltip/tooltip.directive.mjs +3 -3
- package/esm2022/tooltip/tooltip-trigger/tooltip-trigger.directive.mjs +7 -7
- package/esm2022/utils/helpers/focus-manager.mjs +3 -3
- package/esm2022/utils/index.mjs +2 -2
- package/esm2022/utils/signals/async.mjs +11 -17
- package/fesm2022/ng-primitives-a11y.mjs +3 -3
- package/fesm2022/ng-primitives-accordion.mjs +19 -16
- package/fesm2022/ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/ng-primitives-autofill.mjs +100 -0
- package/fesm2022/ng-primitives-autofill.mjs.map +1 -0
- package/fesm2022/ng-primitives-avatar.mjs +13 -10
- package/fesm2022/ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/ng-primitives-button.mjs +76 -0
- package/fesm2022/ng-primitives-button.mjs.map +1 -0
- package/fesm2022/ng-primitives-checkbox.mjs +25 -203
- package/fesm2022/ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/ng-primitives-file-upload.mjs +6 -3
- package/fesm2022/ng-primitives-file-upload.mjs.map +1 -1
- package/fesm2022/ng-primitives-focus-trap.mjs +291 -0
- package/fesm2022/ng-primitives-focus-trap.mjs.map +1 -0
- package/fesm2022/ng-primitives-form-field.mjs +119 -80
- package/fesm2022/ng-primitives-form-field.mjs.map +1 -1
- package/fesm2022/ng-primitives-input.mjs +84 -0
- package/fesm2022/ng-primitives-input.mjs.map +1 -0
- package/fesm2022/ng-primitives-interactions.mjs +394 -26
- package/fesm2022/ng-primitives-interactions.mjs.map +1 -1
- package/fesm2022/ng-primitives-internal.mjs +132 -0
- package/fesm2022/ng-primitives-internal.mjs.map +1 -0
- package/fesm2022/ng-primitives-progress.mjs +6 -6
- package/fesm2022/ng-primitives-radio.mjs +25 -62
- package/fesm2022/ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/ng-primitives-resize.mjs +3 -3
- package/fesm2022/ng-primitives-roving-focus.mjs +15 -10
- package/fesm2022/ng-primitives-roving-focus.mjs.map +1 -1
- package/fesm2022/ng-primitives-search.mjs +76 -0
- package/fesm2022/ng-primitives-search.mjs.map +1 -0
- package/fesm2022/ng-primitives-select.mjs +23 -395
- package/fesm2022/ng-primitives-select.mjs.map +1 -1
- package/fesm2022/ng-primitives-slider.mjs +35 -14
- package/fesm2022/ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/ng-primitives-switch.mjs +23 -62
- package/fesm2022/ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/ng-primitives-tabs.mjs +27 -30
- package/fesm2022/ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/ng-primitives-textarea.mjs +66 -0
- package/fesm2022/ng-primitives-textarea.mjs.map +1 -0
- package/fesm2022/ng-primitives-toggle.mjs +32 -12
- package/fesm2022/ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/ng-primitives-tooltip.mjs +9 -9
- package/fesm2022/ng-primitives-tooltip.mjs.map +1 -1
- package/fesm2022/ng-primitives-utils.mjs +14 -20
- package/fesm2022/ng-primitives-utils.mjs.map +1 -1
- package/file-upload/file-upload/file-upload.directive.d.ts +2 -1
- package/focus-trap/README.md +3 -0
- package/focus-trap/focus-trap/focus-trap.directive.d.ts +64 -0
- package/{select/select-options/select-options.token.d.ts → focus-trap/focus-trap/focus-trap.token.d.ts} +4 -4
- package/focus-trap/index.d.ts +9 -0
- package/form-field/description/description.directive.d.ts +1 -1
- package/form-field/error/error.directive.d.ts +9 -5
- package/form-field/form-control/form-control.directive.d.ts +7 -3
- package/form-field/form-field/form-field.token.d.ts +1 -1
- package/form-field/label/label.directive.d.ts +3 -2
- package/input/README.md +3 -0
- package/input/index.d.ts +9 -0
- package/input/input/input.directive.d.ts +33 -0
- package/input/input/input.token.d.ts +14 -0
- package/interactions/focus/focus.directive.d.ts +6 -2
- package/interactions/focus-visible/focus-visible.directive.d.ts +5 -1
- package/interactions/hover/hover.directive.d.ts +5 -1
- package/interactions/index.d.ts +4 -0
- package/interactions/move/move.directive.d.ts +126 -0
- package/interactions/move/move.token.d.ts +14 -0
- package/interactions/press/press.directive.d.ts +59 -0
- package/interactions/press/press.token.d.ts +14 -0
- package/internal/README.md +3 -0
- package/internal/disabled/disabled.d.ts +21 -0
- package/internal/index.d.ts +10 -0
- package/internal/orientation/orientation.d.ts +22 -0
- package/internal/style-injector/style-injector.d.ts +36 -0
- package/package.json +49 -7
- package/radio/radio-group/radio-group.directive.d.ts +4 -41
- package/radio/radio-indicator/radio-indicator.directive.d.ts +2 -1
- package/radio/radio-item/radio-item.directive.d.ts +2 -1
- package/roving-focus/roving-focus-group/roving-focus-group.directive.d.ts +7 -2
- package/search/README.md +3 -0
- package/search/index.d.ts +9 -0
- package/search/search-field/search-field.directive.d.ts +15 -0
- package/search/search-field/search-field.token.d.ts +14 -0
- package/select/index.d.ts +0 -6
- package/select/select/select.directive.d.ts +7 -22
- package/select/select/select.token.d.ts +2 -2
- package/slider/slider/slider.directive.d.ts +4 -2
- package/slider/slider-thumb/slider-thumb.directive.d.ts +2 -1
- package/slider/slider-track/slider-track.directive.d.ts +1 -1
- package/switch/switch/switch.directive.d.ts +5 -45
- package/switch/switch-thumb/switch-thumb.directive.d.ts +2 -1
- package/tabs/tab-button/tab-button.directive.d.ts +2 -1
- package/tabs/tabset/tabset.directive.d.ts +3 -9
- package/textarea/README.md +3 -0
- package/textarea/index.d.ts +9 -0
- package/textarea/textarea/textarea.directive.d.ts +20 -0
- package/textarea/textarea/textarea.token.d.ts +14 -0
- package/toggle/toggle/toggle.directive.d.ts +16 -4
- package/utils/index.d.ts +1 -1
- package/utils/signals/async.d.ts +10 -12
- package/checkbox/checkbox-indicator/checkbox-indicator.directive.d.ts +0 -19
- package/checkbox/checkbox-indicator/checkbox-indicator.token.d.ts +0 -15
- package/checkbox/checkbox-input/checkbox-input.directive.d.ts +0 -10
- package/checkbox/checkbox-label/checkbox-label.directive.d.ts +0 -9
- package/esm2022/checkbox/checkbox-indicator/checkbox-indicator.directive.mjs +0 -51
- package/esm2022/checkbox/checkbox-indicator/checkbox-indicator.token.mjs +0 -17
- package/esm2022/checkbox/checkbox-input/checkbox-input.directive.mjs +0 -40
- package/esm2022/checkbox/checkbox-label/checkbox-label.directive.mjs +0 -32
- package/esm2022/select/select-button/select-button.directive.mjs +0 -84
- package/esm2022/select/select-button/select-button.token.mjs +0 -16
- package/esm2022/select/select-option/select-option.directive.mjs +0 -90
- package/esm2022/select/select-option/select-option.token.mjs +0 -16
- package/esm2022/select/select-options/select-options.directive.mjs +0 -157
- package/esm2022/select/select-options/select-options.token.mjs +0 -16
- package/select/select-button/select-button.directive.d.ts +0 -51
- package/select/select-option/select-option.directive.d.ts +0 -57
- package/select/select-options/select-options.directive.d.ts +0 -65
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { DOCUMENT, isPlatformBrowser } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { InjectionToken, inject, PLATFORM_ID, Injectable, input, booleanAttribute, signal, output, Directive, HostListener, ElementRef } from '@angular/core';
|
|
4
|
+
import { injectDisabled } from 'ng-primitives/internal';
|
|
4
5
|
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
5
6
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
7
|
+
import { injectDisposables } from 'ng-primitives/utils';
|
|
6
8
|
|
|
7
9
|
/**
|
|
8
10
|
* Copyright © 2024 Angular Primitives.
|
|
@@ -60,10 +62,10 @@ class GlobalPointerEvents {
|
|
|
60
62
|
this.setGlobalIgnoreEmulatedMouseEvents();
|
|
61
63
|
}
|
|
62
64
|
}
|
|
63
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
64
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.
|
|
65
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: GlobalPointerEvents, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
66
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: GlobalPointerEvents, providedIn: 'root' }); }
|
|
65
67
|
}
|
|
66
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: GlobalPointerEvents, decorators: [{
|
|
67
69
|
type: Injectable,
|
|
68
70
|
args: [{
|
|
69
71
|
providedIn: 'root',
|
|
@@ -88,6 +90,10 @@ class NgpHover {
|
|
|
88
90
|
alias: 'ngpHoverDisabled',
|
|
89
91
|
transform: booleanAttribute,
|
|
90
92
|
});
|
|
93
|
+
/**
|
|
94
|
+
* Access the disabled state from any parent.
|
|
95
|
+
*/
|
|
96
|
+
this.isDisabled = injectDisabled(this.disabled);
|
|
91
97
|
/**
|
|
92
98
|
* Store the current hover state.
|
|
93
99
|
*/
|
|
@@ -107,7 +113,7 @@ class NgpHover {
|
|
|
107
113
|
/**
|
|
108
114
|
* Emit an event when the hover state changes.
|
|
109
115
|
*/
|
|
110
|
-
this.hoverChange = output({ alias: '
|
|
116
|
+
this.hoverChange = output({ alias: 'ngpHover' });
|
|
111
117
|
}
|
|
112
118
|
ngOnChanges(changes) {
|
|
113
119
|
if ('disabled' in changes) {
|
|
@@ -124,7 +130,7 @@ class NgpHover {
|
|
|
124
130
|
* @param pointerType
|
|
125
131
|
*/
|
|
126
132
|
onHoverStart(event, pointerType) {
|
|
127
|
-
if (this.
|
|
133
|
+
if (this.isDisabled() ||
|
|
128
134
|
pointerType === 'touch' ||
|
|
129
135
|
this.hovered() ||
|
|
130
136
|
!event.currentTarget?.contains(event.target)) {
|
|
@@ -153,7 +159,7 @@ class NgpHover {
|
|
|
153
159
|
this.onHoverStart(event, event.pointerType);
|
|
154
160
|
}
|
|
155
161
|
onPointerLeave(event) {
|
|
156
|
-
if (!this.
|
|
162
|
+
if (!this.isDisabled() && event.currentTarget?.contains(event.target)) {
|
|
157
163
|
this.onHoverEnd(event.pointerType);
|
|
158
164
|
}
|
|
159
165
|
}
|
|
@@ -167,14 +173,14 @@ class NgpHover {
|
|
|
167
173
|
this.ignoreEmulatedMouseEvents = false;
|
|
168
174
|
}
|
|
169
175
|
onMouseLeave(event) {
|
|
170
|
-
if (!this.
|
|
176
|
+
if (!this.isDisabled() && event.currentTarget?.contains(event.target)) {
|
|
171
177
|
this.onHoverEnd('mouse');
|
|
172
178
|
}
|
|
173
179
|
}
|
|
174
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
175
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.
|
|
180
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgpHover, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
181
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.1.1", type: NgpHover, isStandalone: true, selector: "[ngpHover]", inputs: { disabled: { classPropertyName: "disabled", publicName: "ngpHoverDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { hoverStart: "ngpHoverStart", hoverEnd: "ngpHoverEnd", hoverChange: "ngpHover" }, host: { listeners: { "pointerenter": "onPointerEnter($event)", "pointerleave": "onPointerLeave($event)", "touchstart": "onTouchStart()", "mouseenter": "onMouseEnter($event)", "mouseleave": "onMouseLeave($event)" }, properties: { "attr.data-hover": "hovered()" } }, providers: [{ provide: NgpHoverToken, useExisting: NgpHover }], exportAs: ["ngpHover"], usesOnChanges: true, ngImport: i0 }); }
|
|
176
182
|
}
|
|
177
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
183
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgpHover, decorators: [{
|
|
178
184
|
type: Directive,
|
|
179
185
|
args: [{
|
|
180
186
|
standalone: true,
|
|
@@ -234,23 +240,27 @@ class NgpFocus {
|
|
|
234
240
|
alias: 'ngpFocusDisabled',
|
|
235
241
|
transform: booleanAttribute,
|
|
236
242
|
});
|
|
243
|
+
/**
|
|
244
|
+
* Access the disabled state from any parent.
|
|
245
|
+
*/
|
|
246
|
+
this.isDisabled = injectDisabled(this.disabled);
|
|
237
247
|
/**
|
|
238
248
|
* Emit when the focus state changes.
|
|
239
249
|
*/
|
|
240
|
-
this.
|
|
250
|
+
this.focus = output({ alias: 'ngpFocus' });
|
|
241
251
|
}
|
|
242
252
|
/**
|
|
243
253
|
* Listen for focus events.
|
|
244
254
|
* @param event
|
|
245
255
|
*/
|
|
246
256
|
onFocus(event) {
|
|
247
|
-
if (this.
|
|
257
|
+
if (this.isDisabled()) {
|
|
248
258
|
return;
|
|
249
259
|
}
|
|
250
260
|
const ownerDocument = event.target?.ownerDocument ?? document;
|
|
251
261
|
// ensure this element is still focused
|
|
252
262
|
if (ownerDocument.activeElement === event.target && event.currentTarget === event.target) {
|
|
253
|
-
this.
|
|
263
|
+
this.focus.emit(true);
|
|
254
264
|
this.isFocused.set(true);
|
|
255
265
|
}
|
|
256
266
|
}
|
|
@@ -259,18 +269,18 @@ class NgpFocus {
|
|
|
259
269
|
* @param event
|
|
260
270
|
*/
|
|
261
271
|
onBlur(event) {
|
|
262
|
-
if (this.
|
|
272
|
+
if (this.isDisabled()) {
|
|
263
273
|
return;
|
|
264
274
|
}
|
|
265
275
|
if (event.currentTarget === event.target) {
|
|
266
|
-
this.
|
|
276
|
+
this.focus.emit(false);
|
|
267
277
|
this.isFocused.set(false);
|
|
268
278
|
}
|
|
269
279
|
}
|
|
270
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
271
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.
|
|
280
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgpFocus, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
281
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.1.1", type: NgpFocus, isStandalone: true, selector: "[ngpFocus]", inputs: { disabled: { classPropertyName: "disabled", publicName: "ngpFocusDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { focus: "ngpFocus" }, host: { listeners: { "focus": "onFocus($event)", "blur": "onBlur($event)" }, properties: { "attr.data-focus": "isFocused()" } }, providers: [{ provide: NgpFocusToken, useExisting: NgpFocus }], exportAs: ["ngpFocus"], ngImport: i0 }); }
|
|
272
282
|
}
|
|
273
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
283
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgpFocus, decorators: [{
|
|
274
284
|
type: Directive,
|
|
275
285
|
args: [{
|
|
276
286
|
standalone: true,
|
|
@@ -278,7 +288,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
|
|
|
278
288
|
exportAs: 'ngpFocus',
|
|
279
289
|
providers: [{ provide: NgpFocusToken, useExisting: NgpFocus }],
|
|
280
290
|
host: {
|
|
281
|
-
'[attr.data-
|
|
291
|
+
'[attr.data-focus]': 'isFocused()',
|
|
282
292
|
},
|
|
283
293
|
}]
|
|
284
294
|
}], propDecorators: { onFocus: [{
|
|
@@ -328,11 +338,15 @@ class NgpFocusVisible {
|
|
|
328
338
|
alias: 'ngpFocusVisibleDisabled',
|
|
329
339
|
transform: booleanAttribute,
|
|
330
340
|
});
|
|
341
|
+
/**
|
|
342
|
+
* Access the disabled state from any parent.
|
|
343
|
+
*/
|
|
344
|
+
this.isDisabled = injectDisabled(this.disabled);
|
|
331
345
|
/**
|
|
332
346
|
* Emit when the element is visually focused.
|
|
333
347
|
*/
|
|
334
348
|
this.focusChange = output({
|
|
335
|
-
alias: '
|
|
349
|
+
alias: 'ngpFocusVisible',
|
|
336
350
|
});
|
|
337
351
|
/**
|
|
338
352
|
* Whether the element is currently focused.
|
|
@@ -344,7 +358,7 @@ class NgpFocusVisible {
|
|
|
344
358
|
.subscribe(origin => this.onFocus(origin));
|
|
345
359
|
}
|
|
346
360
|
onFocus(origin) {
|
|
347
|
-
if (this.
|
|
361
|
+
if (this.isDisabled() || this.isFocused()) {
|
|
348
362
|
return;
|
|
349
363
|
}
|
|
350
364
|
// for some elements the focus visible state should always appear on focus
|
|
@@ -364,7 +378,7 @@ class NgpFocusVisible {
|
|
|
364
378
|
* Listen for blur events.
|
|
365
379
|
*/
|
|
366
380
|
onBlur() {
|
|
367
|
-
if (this.
|
|
381
|
+
if (this.isDisabled() || !this.isFocused()) {
|
|
368
382
|
return;
|
|
369
383
|
}
|
|
370
384
|
this.isFocused.set(false);
|
|
@@ -398,10 +412,10 @@ class NgpFocusVisible {
|
|
|
398
412
|
}
|
|
399
413
|
return false;
|
|
400
414
|
}
|
|
401
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
|
402
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.
|
|
415
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgpFocusVisible, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
416
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.1.1", type: NgpFocusVisible, isStandalone: true, selector: "[ngpFocusVisible]", inputs: { disabled: { classPropertyName: "disabled", publicName: "ngpFocusVisibleDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { focusChange: "ngpFocusVisible" }, host: { listeners: { "blur": "onBlur()" }, properties: { "attr.data-focus-visible": "isFocused()" } }, providers: [{ provide: NgpFocusVisibleToken, useExisting: NgpFocusVisible }], exportAs: ["ngpFocusVisible"], ngImport: i0 }); }
|
|
403
417
|
}
|
|
404
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
|
418
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgpFocusVisible, decorators: [{
|
|
405
419
|
type: Directive,
|
|
406
420
|
args: [{
|
|
407
421
|
standalone: true,
|
|
@@ -417,6 +431,360 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
|
|
|
417
431
|
args: ['blur']
|
|
418
432
|
}] } });
|
|
419
433
|
|
|
434
|
+
/**
|
|
435
|
+
* Copyright © 2024 Angular Primitives.
|
|
436
|
+
* https://github.com/ng-primitives/ng-primitives
|
|
437
|
+
*
|
|
438
|
+
* This source code is licensed under the CC BY-ND 4.0 license found in the
|
|
439
|
+
* LICENSE file in the root directory of this source tree.
|
|
440
|
+
*/
|
|
441
|
+
const NgpPressToken = new InjectionToken('NgpPressToken');
|
|
442
|
+
/**
|
|
443
|
+
* Inject the Press directive instance
|
|
444
|
+
*/
|
|
445
|
+
function injectPress() {
|
|
446
|
+
return inject(NgpPressToken);
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* This was inpsired by Headless UI's active-press hook:
|
|
451
|
+
* https://github.com/tailwindlabs/headlessui/blob/main/packages/%40headlessui-react/src/hooks/use-active-press.tsx
|
|
452
|
+
*/
|
|
453
|
+
class NgpPress {
|
|
454
|
+
constructor() {
|
|
455
|
+
/**
|
|
456
|
+
* Access the HTML Element.
|
|
457
|
+
*/
|
|
458
|
+
this.element = inject(ElementRef);
|
|
459
|
+
/**
|
|
460
|
+
* Access the disposables.
|
|
461
|
+
*/
|
|
462
|
+
this.disposables = injectDisposables();
|
|
463
|
+
/**
|
|
464
|
+
* Whether listening for press events is disabled.
|
|
465
|
+
*/
|
|
466
|
+
this.disabled = input(false, {
|
|
467
|
+
alias: 'ngpPressDisabled',
|
|
468
|
+
transform: booleanAttribute,
|
|
469
|
+
});
|
|
470
|
+
/**
|
|
471
|
+
* Access the disabled state from any parent.
|
|
472
|
+
*/
|
|
473
|
+
this.isDisabled = injectDisabled(this.disabled);
|
|
474
|
+
/**
|
|
475
|
+
* Emit when the press begins.
|
|
476
|
+
*/
|
|
477
|
+
this.pressStart = output({
|
|
478
|
+
alias: 'ngpPressStart',
|
|
479
|
+
});
|
|
480
|
+
/**
|
|
481
|
+
* Emit when the press ends.
|
|
482
|
+
*/
|
|
483
|
+
this.pressEnd = output({
|
|
484
|
+
alias: 'ngpPressEnd',
|
|
485
|
+
});
|
|
486
|
+
/**
|
|
487
|
+
* Emit when the press changes.
|
|
488
|
+
*/
|
|
489
|
+
this.pressChange = output({
|
|
490
|
+
alias: 'ngpPress',
|
|
491
|
+
});
|
|
492
|
+
/**
|
|
493
|
+
* The press state.
|
|
494
|
+
*/
|
|
495
|
+
this.pressed = signal(false);
|
|
496
|
+
/**
|
|
497
|
+
* Store the list of disposables.
|
|
498
|
+
*/
|
|
499
|
+
this.disposableListeners = [];
|
|
500
|
+
}
|
|
501
|
+
/**
|
|
502
|
+
* Reset the press state.
|
|
503
|
+
*/
|
|
504
|
+
reset() {
|
|
505
|
+
// if we are not pressing, then do nothing
|
|
506
|
+
if (!this.pressed()) {
|
|
507
|
+
return;
|
|
508
|
+
}
|
|
509
|
+
// clear any existing disposables
|
|
510
|
+
this.disposableListeners.forEach(dispose => dispose());
|
|
511
|
+
this.pressed.set(false);
|
|
512
|
+
this.pressEnd.emit();
|
|
513
|
+
this.pressChange.emit(false);
|
|
514
|
+
}
|
|
515
|
+
onPointerDown() {
|
|
516
|
+
if (this.isDisabled()) {
|
|
517
|
+
return;
|
|
518
|
+
}
|
|
519
|
+
// clear any existing disposables
|
|
520
|
+
this.disposableListeners.forEach(dispose => dispose());
|
|
521
|
+
// update the press state
|
|
522
|
+
this.pressed.set(true);
|
|
523
|
+
this.pressStart.emit();
|
|
524
|
+
this.pressChange.emit(true);
|
|
525
|
+
// setup global event listeners to catch events on elements outside the directive
|
|
526
|
+
const ownerDocument = this.element.nativeElement.ownerDocument ?? document;
|
|
527
|
+
// if the pointer up event happens on any elements, then we are no longer pressing on this element
|
|
528
|
+
const pointerUp = this.disposables.addEventListener(ownerDocument, 'pointerup', this.reset.bind(this), false);
|
|
529
|
+
// Instead of relying on the `pointerleave` event, which is not consistently called on iOS Safari,
|
|
530
|
+
// we use the `pointermove` event to determine if we are still "pressing".
|
|
531
|
+
// By checking if the target is still within the element, we can determine if the press is ongoing.
|
|
532
|
+
const pointerMove = this.disposables.addEventListener(ownerDocument, 'pointermove', this.onPointerMove.bind(this), false);
|
|
533
|
+
// if the pointer is cancelled, then we are no longer pressing on this element
|
|
534
|
+
const pointerCancel = this.disposables.addEventListener(ownerDocument, 'pointercancel', this.reset.bind(this), false);
|
|
535
|
+
this.disposableListeners = [pointerUp, pointerMove, pointerCancel];
|
|
536
|
+
}
|
|
537
|
+
onPointerMove(event) {
|
|
538
|
+
if (this.element.nativeElement !== event.target &&
|
|
539
|
+
!this.element.nativeElement.contains(event.target)) {
|
|
540
|
+
this.reset();
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgpPress, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
544
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.1.1", type: NgpPress, isStandalone: true, selector: "[ngpPress]", inputs: { disabled: { classPropertyName: "disabled", publicName: "ngpPressDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pressStart: "ngpPressStart", pressEnd: "ngpPressEnd", pressChange: "ngpPress" }, host: { listeners: { "pointerdown": "onPointerDown()" }, properties: { "attr.data-press": "pressed()" } }, providers: [{ provide: NgpPressToken, useExisting: NgpPress }], exportAs: ["ngpPress"], ngImport: i0 }); }
|
|
545
|
+
}
|
|
546
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgpPress, decorators: [{
|
|
547
|
+
type: Directive,
|
|
548
|
+
args: [{
|
|
549
|
+
standalone: true,
|
|
550
|
+
selector: '[ngpPress]',
|
|
551
|
+
exportAs: 'ngpPress',
|
|
552
|
+
providers: [{ provide: NgpPressToken, useExisting: NgpPress }],
|
|
553
|
+
host: {
|
|
554
|
+
'[attr.data-press]': 'pressed()',
|
|
555
|
+
},
|
|
556
|
+
}]
|
|
557
|
+
}], propDecorators: { onPointerDown: [{
|
|
558
|
+
type: HostListener,
|
|
559
|
+
args: ['pointerdown']
|
|
560
|
+
}] } });
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* Copyright © 2024 Angular Primitives.
|
|
564
|
+
* https://github.com/ng-primitives/ng-primitives
|
|
565
|
+
*
|
|
566
|
+
* This source code is licensed under the CC BY-ND 4.0 license found in the
|
|
567
|
+
* LICENSE file in the root directory of this source tree.
|
|
568
|
+
*/
|
|
569
|
+
const NgpMoveToken = new InjectionToken('NgpMoveToken');
|
|
570
|
+
/**
|
|
571
|
+
* Inject the Move directive instance
|
|
572
|
+
*/
|
|
573
|
+
function injectMove() {
|
|
574
|
+
return inject(NgpMoveToken);
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
/**
|
|
578
|
+
* Inspired by react-aria useMove hook:
|
|
579
|
+
* https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/interactions/src/useMove.ts
|
|
580
|
+
*/
|
|
581
|
+
class NgpMove {
|
|
582
|
+
constructor() {
|
|
583
|
+
/**
|
|
584
|
+
* Access the disposable helper.
|
|
585
|
+
*/
|
|
586
|
+
this.disposables = injectDisposables();
|
|
587
|
+
/**
|
|
588
|
+
* Whether movement is disabled.
|
|
589
|
+
*/
|
|
590
|
+
this.disabled = input(false, {
|
|
591
|
+
alias: 'ngpMoveDisabled',
|
|
592
|
+
transform: booleanAttribute,
|
|
593
|
+
});
|
|
594
|
+
/**
|
|
595
|
+
* Access the disabled state from any parent.
|
|
596
|
+
*/
|
|
597
|
+
this.isDisabled = injectDisabled(this.disabled);
|
|
598
|
+
/**
|
|
599
|
+
* Emit when the move event begins.
|
|
600
|
+
*/
|
|
601
|
+
this.start = output({
|
|
602
|
+
alias: 'ngpMoveStart',
|
|
603
|
+
});
|
|
604
|
+
/**
|
|
605
|
+
* Emit when the element is moved.
|
|
606
|
+
*/
|
|
607
|
+
this.move = output({
|
|
608
|
+
alias: 'ngpMove',
|
|
609
|
+
});
|
|
610
|
+
/**
|
|
611
|
+
* Emit when the move event ends.
|
|
612
|
+
*/
|
|
613
|
+
this.end = output({
|
|
614
|
+
alias: 'ngpMoveEnd',
|
|
615
|
+
});
|
|
616
|
+
/**
|
|
617
|
+
* Whether the element is currently being moved.
|
|
618
|
+
*/
|
|
619
|
+
this.isMoving = signal(false);
|
|
620
|
+
/**
|
|
621
|
+
* Store the last x position of the element.
|
|
622
|
+
*/
|
|
623
|
+
this.x = null;
|
|
624
|
+
/**
|
|
625
|
+
* Store the last y position of the element.
|
|
626
|
+
*/
|
|
627
|
+
this.y = null;
|
|
628
|
+
/**
|
|
629
|
+
* Store the id of the last pointer.
|
|
630
|
+
*/
|
|
631
|
+
this.pointerId = null;
|
|
632
|
+
/**
|
|
633
|
+
* Store the disposable event listeners.
|
|
634
|
+
*/
|
|
635
|
+
this.disposableListeners = [];
|
|
636
|
+
}
|
|
637
|
+
/**
|
|
638
|
+
* Handle a move start.
|
|
639
|
+
*/
|
|
640
|
+
onMoveStart(event, pointerType) {
|
|
641
|
+
this.start.emit({
|
|
642
|
+
pointerType,
|
|
643
|
+
shiftKey: event.shiftKey,
|
|
644
|
+
ctrlKey: event.ctrlKey,
|
|
645
|
+
metaKey: event.metaKey,
|
|
646
|
+
altKey: event.altKey,
|
|
647
|
+
});
|
|
648
|
+
this.isMoving.set(true);
|
|
649
|
+
}
|
|
650
|
+
/**
|
|
651
|
+
* Handle a move event.
|
|
652
|
+
*/
|
|
653
|
+
onMove(event, pointerType, deltaX, deltaY) {
|
|
654
|
+
if (deltaX === 0 && deltaY === 0) {
|
|
655
|
+
return;
|
|
656
|
+
}
|
|
657
|
+
this.move.emit({
|
|
658
|
+
deltaX,
|
|
659
|
+
deltaY,
|
|
660
|
+
pointerType,
|
|
661
|
+
shiftKey: event.shiftKey,
|
|
662
|
+
ctrlKey: event.ctrlKey,
|
|
663
|
+
metaKey: event.metaKey,
|
|
664
|
+
altKey: event.altKey,
|
|
665
|
+
});
|
|
666
|
+
}
|
|
667
|
+
/**
|
|
668
|
+
* Handle a move end.
|
|
669
|
+
*/
|
|
670
|
+
onMoveEnd(event, pointerType) {
|
|
671
|
+
this.end.emit({
|
|
672
|
+
pointerType,
|
|
673
|
+
shiftKey: event.shiftKey,
|
|
674
|
+
ctrlKey: event.ctrlKey,
|
|
675
|
+
metaKey: event.metaKey,
|
|
676
|
+
altKey: event.altKey,
|
|
677
|
+
});
|
|
678
|
+
this.isMoving.set(false);
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* Handle the pointer down event.
|
|
682
|
+
*/
|
|
683
|
+
onPointerDown(event) {
|
|
684
|
+
// ignore right-click or additional pointers
|
|
685
|
+
if (event.button !== 0 || this.pointerId !== null || this.isDisabled()) {
|
|
686
|
+
return;
|
|
687
|
+
}
|
|
688
|
+
// prevent the default behavior
|
|
689
|
+
event.preventDefault();
|
|
690
|
+
event.stopPropagation();
|
|
691
|
+
this.onMoveStart(event, event.pointerType);
|
|
692
|
+
// store the pointer id and initial position
|
|
693
|
+
this.pointerId = event.pointerId;
|
|
694
|
+
this.x = event.pageX;
|
|
695
|
+
this.y = event.pageY;
|
|
696
|
+
// add global event listeners
|
|
697
|
+
const pointerMove = this.disposables.addEventListener(window, 'pointermove', this.onPointerMove.bind(this), false);
|
|
698
|
+
const pointerUp = this.disposables.addEventListener(window, 'pointerup', this.onPointerUp.bind(this), false);
|
|
699
|
+
const pointerCancel = this.disposables.addEventListener(window, 'pointercancel', this.onPointerUp.bind(this), false);
|
|
700
|
+
// store the disposable event listeners
|
|
701
|
+
this.disposableListeners = [pointerMove, pointerUp, pointerCancel];
|
|
702
|
+
}
|
|
703
|
+
/**
|
|
704
|
+
* Handle the pointer up event.
|
|
705
|
+
*/
|
|
706
|
+
onPointerUp(event) {
|
|
707
|
+
if (this.pointerId !== event.pointerId) {
|
|
708
|
+
return;
|
|
709
|
+
}
|
|
710
|
+
const pointerType = (event.pointerType ?? 'mouse');
|
|
711
|
+
this.onMoveEnd(event, pointerType);
|
|
712
|
+
this.pointerId = null;
|
|
713
|
+
this.disposableListeners.forEach(dispose => dispose());
|
|
714
|
+
}
|
|
715
|
+
/**
|
|
716
|
+
* Handle the pointer move event.
|
|
717
|
+
*/
|
|
718
|
+
onPointerMove(event) {
|
|
719
|
+
if (this.pointerId !== event.pointerId) {
|
|
720
|
+
return;
|
|
721
|
+
}
|
|
722
|
+
// Problems with PointerEvent#movementX/movementY:
|
|
723
|
+
// 1. it is always 0 on macOS Safari.
|
|
724
|
+
// 2. On Chrome Android, it's scaled by devicePixelRatio, but not on Chrome macOS
|
|
725
|
+
this.onMove(event, event.pointerType, event.pageX - (this.x ?? 0), event.pageY - (this.y ?? 0));
|
|
726
|
+
this.x = event.pageX;
|
|
727
|
+
this.y = event.pageY;
|
|
728
|
+
}
|
|
729
|
+
triggerKeyboardMove(event, deltaX, deltaY) {
|
|
730
|
+
if (this.isDisabled()) {
|
|
731
|
+
return;
|
|
732
|
+
}
|
|
733
|
+
this.onMoveStart(event, 'keyboard');
|
|
734
|
+
this.onMove(event, 'keyboard', deltaX, deltaY);
|
|
735
|
+
this.onMoveEnd(event, 'keyboard');
|
|
736
|
+
}
|
|
737
|
+
onArrowUp(event) {
|
|
738
|
+
event.preventDefault();
|
|
739
|
+
event.stopPropagation();
|
|
740
|
+
this.triggerKeyboardMove(event, 0, -1);
|
|
741
|
+
}
|
|
742
|
+
onArrowDown(event) {
|
|
743
|
+
event.preventDefault();
|
|
744
|
+
event.stopPropagation();
|
|
745
|
+
this.triggerKeyboardMove(event, 0, 1);
|
|
746
|
+
}
|
|
747
|
+
onArrowLeft(event) {
|
|
748
|
+
event.preventDefault();
|
|
749
|
+
event.stopPropagation();
|
|
750
|
+
this.triggerKeyboardMove(event, -1, 0);
|
|
751
|
+
}
|
|
752
|
+
onArrowRight(event) {
|
|
753
|
+
event.preventDefault();
|
|
754
|
+
event.stopPropagation();
|
|
755
|
+
this.triggerKeyboardMove(event, 1, 0);
|
|
756
|
+
}
|
|
757
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgpMove, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
758
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.1.1", type: NgpMove, isStandalone: true, selector: "[ngpMove]", inputs: { disabled: { classPropertyName: "disabled", publicName: "ngpMoveDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { start: "ngpMoveStart", move: "ngpMove", end: "ngpMoveEnd" }, host: { listeners: { "pointerdown": "onPointerDown($event)", "keydown.ArrowUp": "onArrowUp($event)", "keydown.ArrowDown": "onArrowDown($event)", "keydown.ArrowLeft": "onArrowLeft($event)", "keydown.ArrowRight": "onArrowRight($event)" }, properties: { "attr.data-move": "isMoving()" } }, providers: [{ provide: NgpMoveToken, useExisting: NgpMove }], exportAs: ["ngpMove"], ngImport: i0 }); }
|
|
759
|
+
}
|
|
760
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgpMove, decorators: [{
|
|
761
|
+
type: Directive,
|
|
762
|
+
args: [{
|
|
763
|
+
standalone: true,
|
|
764
|
+
selector: '[ngpMove]',
|
|
765
|
+
exportAs: 'ngpMove',
|
|
766
|
+
providers: [{ provide: NgpMoveToken, useExisting: NgpMove }],
|
|
767
|
+
host: {
|
|
768
|
+
'[attr.data-move]': 'isMoving()',
|
|
769
|
+
},
|
|
770
|
+
}]
|
|
771
|
+
}], propDecorators: { onPointerDown: [{
|
|
772
|
+
type: HostListener,
|
|
773
|
+
args: ['pointerdown', ['$event']]
|
|
774
|
+
}], onArrowUp: [{
|
|
775
|
+
type: HostListener,
|
|
776
|
+
args: ['keydown.ArrowUp', ['$event']]
|
|
777
|
+
}], onArrowDown: [{
|
|
778
|
+
type: HostListener,
|
|
779
|
+
args: ['keydown.ArrowDown', ['$event']]
|
|
780
|
+
}], onArrowLeft: [{
|
|
781
|
+
type: HostListener,
|
|
782
|
+
args: ['keydown.ArrowLeft', ['$event']]
|
|
783
|
+
}], onArrowRight: [{
|
|
784
|
+
type: HostListener,
|
|
785
|
+
args: ['keydown.ArrowRight', ['$event']]
|
|
786
|
+
}] } });
|
|
787
|
+
|
|
420
788
|
/**
|
|
421
789
|
* Copyright © 2024 Angular Primitives.
|
|
422
790
|
* https://github.com/ng-primitives/ng-primitives
|
|
@@ -429,5 +797,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
|
|
|
429
797
|
* Generated bundle index. Do not edit.
|
|
430
798
|
*/
|
|
431
799
|
|
|
432
|
-
export { NgpFocus, NgpFocusToken, NgpFocusVisible, NgpFocusVisibleToken, NgpHover, NgpHoverToken, injectHover };
|
|
800
|
+
export { NgpFocus, NgpFocusToken, NgpFocusVisible, NgpFocusVisibleToken, NgpHover, NgpHoverToken, NgpMove, NgpMoveToken, NgpPress, NgpPressToken, injectHover };
|
|
433
801
|
//# sourceMappingURL=ng-primitives-interactions.mjs.map
|