ng-primitives 0.63.0 → 0.64.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/combobox/combobox/combobox.d.ts +6 -2
- package/combobox/config/combobox-config.d.ts +28 -0
- package/combobox/index.d.ts +1 -0
- package/fesm2022/ng-primitives-combobox.mjs +37 -4
- package/fesm2022/ng-primitives-combobox.mjs.map +1 -1
- package/fesm2022/ng-primitives-menu.mjs +12 -9
- package/fesm2022/ng-primitives-menu.mjs.map +1 -1
- package/menu/menu-item/menu-item.d.ts +6 -3
- package/package.json +17 -17
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
2
2
|
import { Injector } from '@angular/core';
|
|
3
|
-
import { Placement } from '@floating-ui/dom';
|
|
3
|
+
import type { Placement } from '@floating-ui/dom';
|
|
4
4
|
import type { NgpComboboxButton } from '../combobox-button/combobox-button';
|
|
5
5
|
import type { NgpComboboxDropdown } from '../combobox-dropdown/combobox-dropdown';
|
|
6
6
|
import type { NgpComboboxInput } from '../combobox-input/combobox-input';
|
|
@@ -20,6 +20,8 @@ import * as i0 from "@angular/core";
|
|
|
20
20
|
*/
|
|
21
21
|
type T = any;
|
|
22
22
|
export declare class NgpCombobox {
|
|
23
|
+
/** Access the combobox configuration. */
|
|
24
|
+
protected readonly config: import("../config/combobox-config").NgpComboboxConfig;
|
|
23
25
|
/** @internal Access the combobox element. */
|
|
24
26
|
readonly elementRef: import("@angular/core").ElementRef<HTMLElement>;
|
|
25
27
|
/** Access the injector. */
|
|
@@ -38,6 +40,8 @@ export declare class NgpCombobox {
|
|
|
38
40
|
readonly compareWith: import("@angular/core").InputSignal<(a: T | undefined, b: T | undefined) => boolean>;
|
|
39
41
|
/** The position of the dropdown. */
|
|
40
42
|
readonly placement: import("@angular/core").InputSignal<Placement>;
|
|
43
|
+
/** The container for the dropdown. */
|
|
44
|
+
readonly container: import("@angular/core").InputSignal<HTMLElement | null>;
|
|
41
45
|
/**
|
|
42
46
|
* Store the combobox input
|
|
43
47
|
* @internal
|
|
@@ -179,6 +183,6 @@ export declare class NgpCombobox {
|
|
|
179
183
|
*/
|
|
180
184
|
unregisterOption(option: NgpComboboxOption): void;
|
|
181
185
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgpCombobox, never>;
|
|
182
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NgpCombobox, "[ngpCombobox]", ["ngpCombobox"], { "value": { "alias": "ngpComboboxValue"; "required": false; "isSignal": true; }; "multiple": { "alias": "ngpComboboxMultiple"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpComboboxDisabled"; "required": false; "isSignal": true; }; "compareWith": { "alias": "ngpComboboxCompareWith"; "required": false; "isSignal": true; }; "placement": { "alias": "ngpComboboxDropdownPlacement"; "required": false; "isSignal": true; }; }, { "valueChange": "ngpComboboxValueChange"; "openChange": "ngpComboboxOpenChange"; }, never, never, true, never>;
|
|
186
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgpCombobox, "[ngpCombobox]", ["ngpCombobox"], { "value": { "alias": "ngpComboboxValue"; "required": false; "isSignal": true; }; "multiple": { "alias": "ngpComboboxMultiple"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpComboboxDisabled"; "required": false; "isSignal": true; }; "compareWith": { "alias": "ngpComboboxCompareWith"; "required": false; "isSignal": true; }; "placement": { "alias": "ngpComboboxDropdownPlacement"; "required": false; "isSignal": true; }; "container": { "alias": "ngpComboboxDropdownContainer"; "required": false; "isSignal": true; }; }, { "valueChange": "ngpComboboxValueChange"; "openChange": "ngpComboboxOpenChange"; }, never, never, true, never>;
|
|
183
187
|
}
|
|
184
188
|
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { InjectionToken, Provider } from '@angular/core';
|
|
2
|
+
import type { Placement } from '@floating-ui/dom';
|
|
3
|
+
export interface NgpComboboxConfig {
|
|
4
|
+
/**
|
|
5
|
+
* The default placement for the combobox dropdown.
|
|
6
|
+
* @default 'bottom'
|
|
7
|
+
*/
|
|
8
|
+
placement: Placement;
|
|
9
|
+
/**
|
|
10
|
+
* The container for the combobox dropdown.
|
|
11
|
+
* This can be used to control where the dropdown is rendered in the DOM.
|
|
12
|
+
* @default document.body
|
|
13
|
+
*/
|
|
14
|
+
container: HTMLElement | null;
|
|
15
|
+
}
|
|
16
|
+
export declare const defaultComboboxConfig: NgpComboboxConfig;
|
|
17
|
+
export declare const NgpComboboxConfigToken: InjectionToken<NgpComboboxConfig>;
|
|
18
|
+
/**
|
|
19
|
+
* Provide the default Combobox configuration
|
|
20
|
+
* @param config The Combobox configuration
|
|
21
|
+
* @returns The provider
|
|
22
|
+
*/
|
|
23
|
+
export declare function provideComboboxConfig(config: Partial<NgpComboboxConfig>): Provider[];
|
|
24
|
+
/**
|
|
25
|
+
* Inject the Combobox configuration
|
|
26
|
+
* @returns The global Combobox configuration
|
|
27
|
+
*/
|
|
28
|
+
export declare function injectComboboxConfig(): NgpComboboxConfig;
|
package/combobox/index.d.ts
CHANGED
|
@@ -5,3 +5,4 @@ export { NgpComboboxPortal } from './combobox-portal/combobox-portal';
|
|
|
5
5
|
export { NgpCombobox } from './combobox/combobox';
|
|
6
6
|
export { injectComboboxState, provideComboboxState } from './combobox/combobox-state';
|
|
7
7
|
export { NgpComboboxButton } from './combobox-button/combobox-button';
|
|
8
|
+
export { NgpComboboxConfig, provideComboboxConfig } from './config/combobox-config';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, Directive, computed, HostListener, booleanAttribute, inject, ViewContainerRef, TemplateRef, Injector, signal, output, afterRenderEffect } from '@angular/core';
|
|
2
|
+
import { input, Directive, computed, HostListener, booleanAttribute, inject, ViewContainerRef, TemplateRef, Injector, signal, InjectionToken, output, afterRenderEffect } from '@angular/core';
|
|
3
3
|
import { observeResize, injectElementRef, setupInteractions } from 'ng-primitives/internal';
|
|
4
4
|
import { uniqueId } from 'ng-primitives/utils';
|
|
5
5
|
import { createStateToken, createStateProvider, createStateInjector, createState } from 'ng-primitives/state';
|
|
@@ -390,6 +390,7 @@ class NgpComboboxPortal {
|
|
|
390
390
|
closeOnEscape: true,
|
|
391
391
|
restoreFocus: false,
|
|
392
392
|
scrollBehaviour: 'reposition',
|
|
393
|
+
container: this.state().container(),
|
|
393
394
|
};
|
|
394
395
|
this.overlay.set(createOverlay(config));
|
|
395
396
|
}
|
|
@@ -404,8 +405,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
|
404
405
|
}]
|
|
405
406
|
}], ctorParameters: () => [] });
|
|
406
407
|
|
|
408
|
+
const defaultComboboxConfig = {
|
|
409
|
+
placement: 'bottom',
|
|
410
|
+
container: null,
|
|
411
|
+
};
|
|
412
|
+
const NgpComboboxConfigToken = new InjectionToken('NgpComboboxConfigToken');
|
|
413
|
+
/**
|
|
414
|
+
* Provide the default Combobox configuration
|
|
415
|
+
* @param config The Combobox configuration
|
|
416
|
+
* @returns The provider
|
|
417
|
+
*/
|
|
418
|
+
function provideComboboxConfig(config) {
|
|
419
|
+
return [
|
|
420
|
+
{
|
|
421
|
+
provide: NgpComboboxConfigToken,
|
|
422
|
+
useValue: { ...defaultComboboxConfig, ...config },
|
|
423
|
+
},
|
|
424
|
+
];
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* Inject the Combobox configuration
|
|
428
|
+
* @returns The global Combobox configuration
|
|
429
|
+
*/
|
|
430
|
+
function injectComboboxConfig() {
|
|
431
|
+
return inject(NgpComboboxConfigToken, { optional: true }) ?? defaultComboboxConfig;
|
|
432
|
+
}
|
|
433
|
+
|
|
407
434
|
class NgpCombobox {
|
|
408
435
|
constructor() {
|
|
436
|
+
/** Access the combobox configuration. */
|
|
437
|
+
this.config = injectComboboxConfig();
|
|
409
438
|
/** @internal Access the combobox element. */
|
|
410
439
|
this.elementRef = injectElementRef();
|
|
411
440
|
/** Access the injector. */
|
|
@@ -437,9 +466,13 @@ class NgpCombobox {
|
|
|
437
466
|
alias: 'ngpComboboxCompareWith',
|
|
438
467
|
});
|
|
439
468
|
/** The position of the dropdown. */
|
|
440
|
-
this.placement = input(
|
|
469
|
+
this.placement = input(this.config.placement, {
|
|
441
470
|
alias: 'ngpComboboxDropdownPlacement',
|
|
442
471
|
});
|
|
472
|
+
/** The container for the dropdown. */
|
|
473
|
+
this.container = input(this.config.container, {
|
|
474
|
+
alias: 'ngpComboboxDropdownContainer',
|
|
475
|
+
});
|
|
443
476
|
/**
|
|
444
477
|
* Store the combobox input
|
|
445
478
|
* @internal
|
|
@@ -742,7 +775,7 @@ class NgpCombobox {
|
|
|
742
775
|
this.options.update(options => options.filter(o => o !== option));
|
|
743
776
|
}
|
|
744
777
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpCombobox, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
745
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.11", type: NgpCombobox, isStandalone: true, selector: "[ngpCombobox]", inputs: { value: { classPropertyName: "value", publicName: "ngpComboboxValue", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "ngpComboboxMultiple", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpComboboxDisabled", isSignal: true, isRequired: false, transformFunction: null }, compareWith: { classPropertyName: "compareWith", publicName: "ngpComboboxCompareWith", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "ngpComboboxDropdownPlacement", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "ngpComboboxValueChange", openChange: "ngpComboboxOpenChange" }, host: { properties: { "attr.data-open": "state.open() ? \"\" : undefined", "attr.data-disabled": "state.disabled() ? \"\" : undefined", "attr.data-multiple": "state.multiple() ? \"\" : undefined", "attr.data-invalid": "controlStatus()?.invalid ? \"\" : undefined", "attr.data-valid": "controlStatus()?.valid ? \"\" : undefined", "attr.data-touched": "controlStatus()?.touched ? \"\" : undefined", "attr.data-pristine": "controlStatus()?.pristine ? \"\" : undefined", "attr.data-dirty": "controlStatus()?.dirty ? \"\" : undefined", "attr.data-pending": "controlStatus()?.pending ? \"\" : undefined" } }, providers: [provideComboboxState()], exportAs: ["ngpCombobox"], ngImport: i0 }); }
|
|
778
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.11", type: NgpCombobox, isStandalone: true, selector: "[ngpCombobox]", inputs: { value: { classPropertyName: "value", publicName: "ngpComboboxValue", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "ngpComboboxMultiple", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpComboboxDisabled", isSignal: true, isRequired: false, transformFunction: null }, compareWith: { classPropertyName: "compareWith", publicName: "ngpComboboxCompareWith", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "ngpComboboxDropdownPlacement", isSignal: true, isRequired: false, transformFunction: null }, container: { classPropertyName: "container", publicName: "ngpComboboxDropdownContainer", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "ngpComboboxValueChange", openChange: "ngpComboboxOpenChange" }, host: { properties: { "attr.data-open": "state.open() ? \"\" : undefined", "attr.data-disabled": "state.disabled() ? \"\" : undefined", "attr.data-multiple": "state.multiple() ? \"\" : undefined", "attr.data-invalid": "controlStatus()?.invalid ? \"\" : undefined", "attr.data-valid": "controlStatus()?.valid ? \"\" : undefined", "attr.data-touched": "controlStatus()?.touched ? \"\" : undefined", "attr.data-pristine": "controlStatus()?.pristine ? \"\" : undefined", "attr.data-dirty": "controlStatus()?.dirty ? \"\" : undefined", "attr.data-pending": "controlStatus()?.pending ? \"\" : undefined" } }, providers: [provideComboboxState()], exportAs: ["ngpCombobox"], ngImport: i0 }); }
|
|
746
779
|
}
|
|
747
780
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpCombobox, decorators: [{
|
|
748
781
|
type: Directive,
|
|
@@ -818,5 +851,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
|
818
851
|
* Generated bundle index. Do not edit.
|
|
819
852
|
*/
|
|
820
853
|
|
|
821
|
-
export { NgpCombobox, NgpComboboxButton, NgpComboboxDropdown, NgpComboboxInput, NgpComboboxOption, NgpComboboxPortal, injectComboboxState, provideComboboxState };
|
|
854
|
+
export { NgpCombobox, NgpComboboxButton, NgpComboboxDropdown, NgpComboboxInput, NgpComboboxOption, NgpComboboxPortal, injectComboboxState, provideComboboxConfig, provideComboboxState };
|
|
822
855
|
//# sourceMappingURL=ng-primitives-combobox.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-primitives-combobox.mjs","sources":["../../../../packages/ng-primitives/combobox/src/combobox/combobox-state.ts","../../../../packages/ng-primitives/combobox/src/combobox-dropdown/combobox-dropdown.ts","../../../../packages/ng-primitives/combobox/src/combobox-input/combobox-input.ts","../../../../packages/ng-primitives/combobox/src/combobox-option/combobox-option.ts","../../../../packages/ng-primitives/combobox/src/combobox-portal/combobox-portal.ts","../../../../packages/ng-primitives/combobox/src/combobox/combobox.ts","../../../../packages/ng-primitives/combobox/src/combobox-button/combobox-button.ts","../../../../packages/ng-primitives/combobox/src/ng-primitives-combobox.ts"],"sourcesContent":["import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpCombobox } from './combobox';\n\n/**\n * The state token for the Combobox primitive.\n */\nexport const NgpComboboxStateToken = createStateToken<NgpCombobox>('Combobox');\n\n/**\n * Provides the Combobox state.\n */\nexport const provideComboboxState = createStateProvider(NgpComboboxStateToken);\n\n/**\n * Injects the Combobox state.\n */\nexport const injectComboboxState = createStateInjector<NgpCombobox>(NgpComboboxStateToken);\n\n/**\n * The Combobox state registration function.\n */\nexport const comboboxState = createState(NgpComboboxStateToken);\n","import { Directive, input } from '@angular/core';\nimport { injectElementRef, observeResize } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectComboboxState } from '../combobox/combobox-state';\n\n@Directive({\n selector: '[ngpComboboxDropdown]',\n exportAs: 'ngpComboboxDropdown',\n host: {\n role: 'listbox',\n '[id]': 'id()',\n '[style.left.px]': 'state().overlay()?.position()?.x',\n '[style.top.px]': 'state().overlay()?.position()?.y',\n '[style.--ngp-combobox-transform-origin]': 'state().overlay()?.transformOrigin()',\n '[style.--ngp-combobox-width.px]': 'comboboxDimensions().width',\n '[style.--ngp-combobox-input-width.px]': 'inputDimensions().width',\n '[style.--ngp-combobox-button-width.px]': 'buttonDimensions().width',\n },\n})\nexport class NgpComboboxDropdown {\n /** Access the combobox state. */\n protected readonly state = injectComboboxState();\n\n /** The dimensions of the combobox. */\n protected readonly comboboxDimensions = observeResize(\n () => this.state().elementRef.nativeElement,\n );\n\n /** The dimensions of the combobox. */\n protected readonly inputDimensions = observeResize(\n () => this.state().input()?.elementRef.nativeElement,\n );\n\n /** Store the combobox button dimensions. */\n protected readonly buttonDimensions = observeResize(\n () => this.state().button()?.elementRef.nativeElement,\n );\n\n /**\n * Access the element reference.\n * @internal\n */\n readonly elementRef = injectElementRef();\n\n /** The id of the dropdown. */\n readonly id = input<string>(uniqueId('ngp-combobox-dropdown'));\n\n constructor() {\n this.state().registerDropdown(this);\n }\n}\n","import { computed, Directive, HostListener, input } from '@angular/core';\nimport { setupFormControl } from 'ng-primitives/form-field';\nimport { injectElementRef, setupInteractions } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectComboboxState } from '../combobox/combobox-state';\n\n@Directive({\n selector: 'input[ngpComboboxInput]',\n exportAs: 'ngpComboboxInput',\n host: {\n role: 'combobox',\n type: 'text',\n autocomplete: 'off',\n autocorrect: 'off',\n spellcheck: 'false',\n 'aria-haspopup': 'listbox',\n 'aria-autocomplete': 'list',\n '[id]': 'id()',\n '[attr.aria-controls]': 'state().open() ? dropdownId() : undefined',\n '[attr.aria-expanded]': 'state().open()',\n '[attr.data-open]': 'state().open() ? \"\" : undefined',\n '[attr.data-disabled]': 'state().disabled() ? \"\" : undefined',\n '[attr.data-multiple]': 'state().multiple() ? \"\" : undefined',\n '[attr.aria-activedescendant]': 'activeDescendant()',\n '[disabled]': 'state().disabled()',\n },\n})\nexport class NgpComboboxInput {\n /** Access the combobox state. */\n protected readonly state = injectComboboxState();\n\n /**\n * Access the element reference.\n * @internal\n */\n readonly elementRef = injectElementRef<HTMLInputElement>();\n\n /** The id of the input. */\n readonly id = input<string>(uniqueId('ngp-combobox-input'));\n\n /** The id of the dropdown. */\n readonly dropdownId = computed(() => this.state().dropdown()?.id());\n\n /** The id of the active descendant. */\n protected readonly activeDescendant = computed(() =>\n this.state().activeDescendantManager.activeDescendant(),\n );\n\n /** Determine if the pointer was used to focus the input. */\n protected pointerFocused = false;\n\n /**\n * The control status - this is required as we apply them to the combobox element as well as the input element.\n * @internal\n */\n readonly controlStatus = setupFormControl({ id: this.id, disabled: this.state().disabled });\n\n constructor() {\n setupInteractions({\n focus: true,\n hover: true,\n press: true,\n disabled: this.state().disabled,\n });\n\n this.state().registerInput(this);\n }\n\n /** Handle keydown events for accessibility. */\n @HostListener('keydown', ['$event'])\n protected handleKeydown(event: KeyboardEvent): void {\n switch (event.key) {\n case 'ArrowDown':\n if (this.state().open()) {\n this.state().activateNextOption();\n } else {\n this.state().openDropdown();\n }\n event.preventDefault();\n break;\n case 'ArrowUp':\n if (this.state().open()) {\n this.state().activatePreviousOption();\n } else {\n this.state().openDropdown();\n this.state().activeDescendantManager.last();\n }\n event.preventDefault();\n break;\n case 'Home':\n if (this.state().open()) {\n this.state().activeDescendantManager.first();\n }\n event.preventDefault();\n break;\n case 'End':\n if (this.state().open()) {\n this.state().activeDescendantManager.last();\n }\n event.preventDefault();\n break;\n case 'Enter':\n if (this.state().open()) {\n this.state().selectOption(this.state().activeDescendantManager.activeItem());\n }\n event.preventDefault();\n break;\n case 'Escape':\n this.state().closeDropdown();\n event.preventDefault();\n break;\n case 'Backspace':\n // if the input is not empty then open the dropdown\n if (this.elementRef.nativeElement.value.length > 0) {\n this.state().openDropdown();\n }\n break;\n default:\n // Ignore keys with length > 1 (e.g., 'Shift', 'ArrowLeft', 'Enter', etc.)\n // Filter out control/meta key combos (e.g., Ctrl+C)\n if (event.key.length > 1 || event.ctrlKey || event.metaKey || event.altKey) {\n return;\n }\n\n // if this was a character key, we want to open the dropdown\n this.state().openDropdown();\n }\n }\n\n @HostListener('blur', ['$event'])\n protected closeDropdown(event: FocusEvent): void {\n const relatedTarget = event.relatedTarget as HTMLElement;\n\n // if the blur was caused by focus moving to the dropdown, don't close\n if (\n relatedTarget &&\n this.state().dropdown()?.elementRef.nativeElement.contains(relatedTarget)\n ) {\n return;\n }\n\n // if the blur was caused by focus moving to the button, don't close\n if (relatedTarget && this.state().button()?.elementRef.nativeElement.contains(relatedTarget)) {\n return;\n }\n\n this.state().closeDropdown();\n event.preventDefault();\n }\n\n /**\n * Focus the input field\n * @internal\n */\n focus(): void {\n this.elementRef.nativeElement.focus();\n }\n\n @HostListener('focus', ['$event'])\n protected highlightText(): void {\n if (this.pointerFocused) {\n this.pointerFocused = false;\n return;\n }\n\n // highlight the text in the input\n this.elementRef.nativeElement.setSelectionRange(0, this.elementRef.nativeElement.value.length);\n }\n\n @HostListener('pointerdown', ['$event'])\n protected handlePointerDown(): void {\n this.pointerFocused = true;\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n computed,\n Directive,\n HostListener,\n input,\n OnDestroy,\n OnInit,\n} from '@angular/core';\nimport { NgpActivatable } from 'ng-primitives/a11y';\nimport { injectElementRef, setupInteractions } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectComboboxState } from '../combobox/combobox-state';\n\n@Directive({\n selector: '[ngpComboboxOption]',\n exportAs: 'ngpComboboxOption',\n host: {\n role: 'option',\n '[id]': 'id()',\n '[attr.tabindex]': '-1',\n '[attr.aria-selected]': 'selected() ? \"true\" : undefined',\n '[attr.data-selected]': 'selected() ? \"\" : undefined',\n '[attr.data-active]': 'active() ? \"\" : undefined',\n '[attr.data-disabled]': 'disabled() ? \"\" : undefined',\n '(click)': 'select()',\n },\n})\nexport class NgpComboboxOption implements OnInit, OnDestroy, NgpActivatable {\n /** Access the combobox state. */\n protected readonly state = injectComboboxState();\n\n /**\n * The element reference of the option.\n * @internal\n */\n readonly elementRef = injectElementRef();\n\n /** The id of the option. */\n readonly id = input<string>(uniqueId('ngp-combobox-option'));\n\n /** @required The value of the option. */\n readonly value = input<any>(undefined, {\n alias: 'ngpComboboxOptionValue',\n });\n\n /** The disabled state of the option. */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpComboboxOptionDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Whether this option is the active descendant.\n * @internal\n */\n protected readonly active = computed(\n () => this.state().activeDescendantManager.activeDescendant() === this.id(),\n );\n\n /** Whether this option is selected. */\n protected readonly selected = computed(() => {\n const value = this.value();\n\n if (!value) {\n return false;\n }\n\n if (this.state().multiple()) {\n return (\n Array.isArray(value) && value.some(v => this.state().compareWith()(v, this.state().value()))\n );\n }\n\n return this.state().compareWith()(value, this.state().value());\n });\n\n constructor() {\n this.state().registerOption(this);\n\n setupInteractions({\n hover: true,\n press: true,\n disabled: this.disabled,\n });\n }\n\n ngOnInit(): void {\n if (this.value() === undefined) {\n throw new Error(\n 'ngpComboboxOption: The value input is required. Please provide a value for the option.',\n );\n }\n }\n\n ngOnDestroy(): void {\n this.state().unregisterOption(this);\n }\n\n /**\n * Select the option.\n * @internal\n */\n select(): void {\n if (this.disabled()) {\n return;\n }\n\n this.state().toggleOption(this);\n }\n\n /**\n * Scroll the option into view.\n * @internal\n */\n scrollIntoView(): void {\n this.elementRef.nativeElement.scrollIntoView({ block: 'nearest' });\n }\n\n /**\n * Whenever the pointer enters the option, activate it.\n * @internal\n */\n @HostListener('pointerenter')\n protected onPointerEnter(): void {\n this.state().activeDescendantManager.activate(this);\n }\n\n /**\n * Whenever the pointer leaves the option, deactivate it.\n * @internal\n */\n @HostListener('pointerleave')\n protected onPointerLeave(): void {\n this.state().activeDescendantManager.activate(undefined);\n }\n}\n","import {\n Directive,\n inject,\n Injector,\n OnDestroy,\n signal,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport { createOverlay, NgpOverlay, NgpOverlayConfig } from 'ng-primitives/portal';\nimport { injectComboboxState } from '../combobox/combobox-state';\n\n@Directive({\n selector: '[ngpComboboxPortal]',\n exportAs: 'ngpComboboxPortal',\n})\nexport class NgpComboboxPortal implements OnDestroy {\n /** Access the combobox state. */\n private readonly state = injectComboboxState();\n /** Access the view container reference. */\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n /** Access the template reference. */\n private readonly templateRef = inject(TemplateRef);\n\n /** Access the injector. */\n private readonly injector = inject(Injector);\n\n /**\n * The overlay that manages the popover\n * @internal\n */\n readonly overlay = signal<NgpOverlay<void> | null>(null);\n\n constructor() {\n this.state().registerPortal(this);\n }\n\n /** Cleanup the portal. */\n ngOnDestroy(): void {\n this.overlay()?.destroy();\n }\n\n /**\n * Attach the portal.\n * @internal\n */\n show(): Promise<void> {\n // Create the overlay if it doesn't exist yet\n if (!this.overlay()) {\n this.createOverlay();\n }\n\n // Show the overlay\n return this.overlay()!.show();\n }\n\n /**\n * Detach the portal.\n * @internal\n */\n async detach(): Promise<void> {\n this.overlay()?.hide();\n }\n\n /**\n * Create the overlay that will contain the dropdown\n */\n private createOverlay(): void {\n // Create config for the overlay\n const config: NgpOverlayConfig<void> = {\n content: this.templateRef,\n viewContainerRef: this.viewContainerRef,\n triggerElement: this.state().elementRef.nativeElement,\n injector: this.injector,\n placement: this.state().placement(),\n closeOnOutsideClick: true,\n closeOnEscape: true,\n restoreFocus: false,\n scrollBehaviour: 'reposition',\n };\n\n this.overlay.set(createOverlay(config));\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n afterRenderEffect,\n booleanAttribute,\n computed,\n Directive,\n inject,\n Injector,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { Placement } from '@floating-ui/dom';\nimport { activeDescendantManager } from 'ng-primitives/a11y';\nimport { injectElementRef, setupInteractions } from 'ng-primitives/internal';\nimport type { NgpComboboxButton } from '../combobox-button/combobox-button';\nimport type { NgpComboboxDropdown } from '../combobox-dropdown/combobox-dropdown';\nimport type { NgpComboboxInput } from '../combobox-input/combobox-input';\nimport { NgpComboboxOption } from '../combobox-option/combobox-option';\nimport type { NgpComboboxPortal } from '../combobox-portal/combobox-portal';\nimport { comboboxState, provideComboboxState } from './combobox-state';\n\n/**\n * Ideally we would use a generic type here, unfortunately, unlike in React,\n * we cannot infer the type based on another input. For example, if multiple\n * is true, we cannot infer that the value is an array of T. Using a union\n * type is not ideal either because it requires the user to handle multiple cases.\n * Using a generic also isn't ideal because we need to use T as both an array and\n * a single value.\n *\n * Any seems to be used by Angular Material, ng-select, and other libraries\n * so we will use it here as well.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype T = any;\n\n@Directive({\n selector: '[ngpCombobox]',\n exportAs: 'ngpCombobox',\n providers: [provideComboboxState()],\n host: {\n '[attr.data-open]': 'state.open() ? \"\" : undefined',\n '[attr.data-disabled]': 'state.disabled() ? \"\" : undefined',\n '[attr.data-multiple]': 'state.multiple() ? \"\" : undefined',\n '[attr.data-invalid]': 'controlStatus()?.invalid ? \"\" : undefined',\n '[attr.data-valid]': 'controlStatus()?.valid ? \"\" : undefined',\n '[attr.data-touched]': 'controlStatus()?.touched ? \"\" : undefined',\n '[attr.data-pristine]': 'controlStatus()?.pristine ? \"\" : undefined',\n '[attr.data-dirty]': 'controlStatus()?.dirty ? \"\" : undefined',\n '[attr.data-pending]': 'controlStatus()?.pending ? \"\" : undefined',\n },\n})\nexport class NgpCombobox {\n /** @internal Access the combobox element. */\n readonly elementRef = injectElementRef();\n\n /** Access the injector. */\n protected readonly injector = inject(Injector);\n\n /** The value of the combobox. */\n readonly value = input<T>(undefined, {\n alias: 'ngpComboboxValue',\n });\n\n /** Event emitted when the value changes. */\n readonly valueChange = output<T>({\n alias: 'ngpComboboxValueChange',\n });\n\n /** Whether the combobox is multiple selection. */\n readonly multiple = input<boolean, BooleanInput>(false, {\n alias: 'ngpComboboxMultiple',\n transform: booleanAttribute,\n });\n\n /** Whether the combobox is disabled. */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpComboboxDisabled',\n transform: booleanAttribute,\n });\n\n /** Emit when the dropdown open state changes. */\n readonly openChange = output<boolean>({\n alias: 'ngpComboboxOpenChange',\n });\n\n /** The comparator function used to compare options. */\n readonly compareWith = input<(a: T | undefined, b: T | undefined) => boolean>(Object.is, {\n alias: 'ngpComboboxCompareWith',\n });\n\n /** The position of the dropdown. */\n readonly placement = input<Placement>('bottom', {\n alias: 'ngpComboboxDropdownPlacement',\n });\n\n /**\n * Store the combobox input\n * @internal\n */\n readonly input = signal<NgpComboboxInput | undefined>(undefined);\n\n /**\n * Store the combobox button.\n * @internal\n */\n readonly button = signal<NgpComboboxButton | undefined>(undefined);\n\n /**\n * Store the combobox portal.\n * @internal\n */\n readonly portal = signal<NgpComboboxPortal | undefined>(undefined);\n\n /**\n * Store the combobox dropdown.\n * @internal\n */\n readonly dropdown = signal<NgpComboboxDropdown | undefined>(undefined);\n\n /**\n * Store the combobox options.\n * @internal\n */\n readonly options = signal<NgpComboboxOption[]>([]);\n\n /**\n * Access the overlay\n * @internal\n */\n readonly overlay = computed(() => this.portal()?.overlay());\n\n /**\n * The open state of the combobox.\n * @internal\n */\n readonly open = computed(() => this.overlay()?.isOpen() ?? false);\n\n /**\n * The active key descendant manager.\n * @internal\n */\n readonly activeDescendantManager = activeDescendantManager({\n // we must wrap the signal in a computed to ensure it is not used before it is defined\n disabled: computed(() => this.state.disabled()),\n items: this.options,\n });\n\n /** The control status */\n protected readonly controlStatus = computed(() => this.input()?.controlStatus());\n\n /** The state of the combobox. */\n protected readonly state = comboboxState<NgpCombobox>(this);\n\n constructor() {\n setupInteractions({\n focus: true,\n focusWithin: true,\n hover: true,\n press: true,\n disabled: this.state.disabled,\n });\n\n // any time the active descendant changes, ensure we scroll it into view\n // perform after next render to ensure the DOM is updated\n // e.g. the dropdown is open before the option is scrolled into view\n afterRenderEffect({\n write: () => {\n const isPositioned = this.portal()?.overlay()?.isPositioned() ?? false;\n const activeItem = this.activeDescendantManager.activeItem();\n\n if (!isPositioned || !activeItem) {\n return;\n }\n\n this.activeDescendantManager.activeItem()?.scrollIntoView?.();\n },\n });\n }\n\n /**\n * Open the dropdown.\n * @internal\n */\n async openDropdown(): Promise<void> {\n if (this.state.disabled() || this.open()) {\n return;\n }\n\n this.openChange.emit(true);\n await this.portal()?.show();\n\n // if there is a selected option(s), set the active descendant to the first selected option\n const selectedOption = this.options().find(option => this.isOptionSelected(option));\n\n // if there is no selected option, set the active descendant to the first option\n const targetOption = selectedOption ?? this.options()[0];\n\n // if there is no target option, do nothing\n if (!targetOption) {\n return;\n }\n\n // activate the selected option or the first option\n this.activeDescendantManager.activate(targetOption);\n }\n\n /**\n * Close the dropdown.\n * @internal\n */\n closeDropdown(): void {\n if (!this.open()) {\n return;\n }\n\n this.openChange.emit(false);\n this.portal()?.detach();\n\n // clear the active descendant\n this.activeDescendantManager.reset();\n }\n\n /**\n * Toggle the dropdown.\n * @internal\n */\n async toggleDropdown(): Promise<void> {\n if (this.open()) {\n this.closeDropdown();\n } else {\n await this.openDropdown();\n }\n }\n\n /**\n * Select an option.\n * @param option The option to select.\n * @internal\n */\n selectOption(option: NgpComboboxOption | undefined): void {\n if (this.state.disabled()) {\n return;\n }\n\n if (!option) {\n this.state.value.set(undefined);\n this.closeDropdown();\n return;\n }\n\n if (this.state.multiple()) {\n // if the option is already selected, do nothing\n if (this.isOptionSelected(option)) {\n return;\n }\n\n const value = [...(this.state.value() as T[]), option.value() as T];\n\n // add the option to the value\n this.state.value.set(value as T);\n this.valueChange.emit(value as T);\n } else {\n this.state.value.set(option.value() as T);\n this.valueChange.emit(option.value() as T);\n\n // close the dropdown on single selection\n this.closeDropdown();\n }\n }\n\n /**\n * Deselect an option.\n * @param option The option to deselect.\n * @internal\n */\n deselectOption(option: NgpComboboxOption): void {\n // if the combobox is disabled or the option is not selected, do nothing\n // if the combobox is single selection, we don't allow deselecting\n if (this.state.disabled() || !this.isOptionSelected(option) || !this.state.multiple()) {\n return;\n }\n\n const values = (this.state.value() as T[]) ?? [];\n\n const newValue = values.filter(v => !this.state.compareWith()(v, option.value() as T));\n\n // remove the option from the value\n this.state.value.set(newValue as T);\n this.valueChange.emit(newValue as T);\n }\n\n /**\n * Toggle the selection of an option.\n * @param option The option to toggle.\n * @internal\n */\n toggleOption(option: NgpComboboxOption): void {\n if (this.state.disabled()) {\n return;\n }\n\n // if the state is single selection, we don't allow toggling\n if (!this.state.multiple()) {\n // always select the option in single selection mode even if it is already selected so that we update the input\n this.selectOption(option);\n return;\n }\n\n // otherwise toggle the option\n if (this.isOptionSelected(option)) {\n this.deselectOption(option);\n } else {\n this.selectOption(option);\n }\n }\n\n /**\n * Determine if an option is selected.\n * @param option The option to check.\n * @internal\n */\n isOptionSelected(option: NgpComboboxOption): boolean {\n if (this.state.disabled()) {\n return false;\n }\n\n const value = this.state.value();\n\n if (!value) {\n return false;\n }\n\n if (this.state.multiple()) {\n return value && (value as T[]).some(v => this.state.compareWith()(option.value(), v));\n }\n\n return this.state.compareWith()(option.value(), value);\n }\n\n /**\n * Activate the next option in the list if there is one.\n * If there is no option currently active, activate the selected option or the first option.\n * @internal\n */\n activateNextOption(): void {\n if (this.state.disabled()) {\n return;\n }\n\n const options = this.options();\n\n // if there are no options, do nothing\n if (options.length === 0) {\n return;\n }\n\n // if there is no active option, activate the first option\n if (!this.activeDescendantManager.activeItem()) {\n const selectedOption = options.find(option => this.isOptionSelected(option));\n\n // if there is a selected option(s), set the active descendant to the first selected option\n const targetOption = selectedOption ?? options[0];\n\n this.activeDescendantManager.activate(targetOption);\n return;\n }\n\n // otherwise activate the next option\n this.activeDescendantManager.next();\n }\n\n /**\n * Activate the previous option in the list if there is one.\n * @internal\n */\n activatePreviousOption(): void {\n if (this.state.disabled()) {\n return;\n }\n const options = this.options();\n // if there are no options, do nothing\n if (options.length === 0) {\n return;\n }\n // if there is no active option, activate the last option\n if (!this.activeDescendantManager.activeItem()) {\n const selectedOption = options.find(option => this.isOptionSelected(option));\n // if there is a selected option(s), set the active descendant to the first selected option\n const targetOption = selectedOption ?? options[options.length - 1];\n this.activeDescendantManager.activate(targetOption);\n return;\n }\n // otherwise activate the previous option\n this.activeDescendantManager.previous();\n }\n\n /**\n * Register the dropdown portal with the combobox.\n * @param portal The dropdown portal.\n * @internal\n */\n registerPortal(portal: NgpComboboxPortal): void {\n this.portal.set(portal);\n }\n\n /**\n * Register the combobox input with the combobox.\n * @param input The combobox input.\n * @internal\n */\n registerInput(input: NgpComboboxInput): void {\n this.input.set(input);\n }\n\n /**\n * Register the combobox button with the combobox.\n * @param button The combobox button.\n * @internal\n */\n registerButton(button: NgpComboboxButton): void {\n this.button.set(button);\n }\n\n /**\n * Register the dropdown with the combobox.\n * @param dropdown The dropdown to register.\n * @internal\n */\n registerDropdown(dropdown: NgpComboboxDropdown): void {\n this.dropdown.set(dropdown);\n }\n\n /**\n * Register an option with the combobox.\n * @param option The option to register.\n * @internal\n */\n registerOption(option: NgpComboboxOption): void {\n this.options.update(options => [...options, option]);\n }\n\n /**\n * Unregister an option from the combobox.\n * @param option The option to unregister.\n * @internal\n */\n unregisterOption(option: NgpComboboxOption): void {\n this.options.update(options => options.filter(o => o !== option));\n }\n}\n","import { computed, Directive, HostListener, input } from '@angular/core';\nimport { injectElementRef, setupInteractions } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectComboboxState } from '../combobox/combobox-state';\n\n@Directive({\n selector: '[ngpComboboxButton]',\n exportAs: 'ngpComboboxButton',\n host: {\n type: 'button',\n tabindex: '-1',\n 'aria-haspopup': 'listbox',\n '[id]': 'id()',\n '[attr.aria-controls]': 'dropdownId()',\n '[attr.aria-expanded]': 'state().open()',\n '[attr.data-open]': 'state().open() ? \"\" : undefined',\n '[attr.data-disabled]': 'state().disabled() ? \"\" : undefined',\n '[attr.data-multiple]': 'state().multiple() ? \"\" : undefined',\n '[disabled]': 'state().disabled()',\n },\n})\nexport class NgpComboboxButton {\n /** Access the combobox state. */\n protected readonly state = injectComboboxState();\n\n /**\n * Access the element reference.\n * @internal\n */\n readonly elementRef = injectElementRef<HTMLButtonElement>();\n\n /** The id of the button. */\n readonly id = input<string>(uniqueId('ngp-combobox-button'));\n\n /** The id of the dropdown. */\n readonly dropdownId = computed(() => this.state().dropdown()?.id());\n\n constructor() {\n setupInteractions({\n hover: true,\n press: true,\n disabled: this.state().disabled,\n });\n\n this.state().registerButton(this);\n }\n\n @HostListener('click')\n protected async toggleDropdown(): Promise<void> {\n await this.state().toggleDropdown();\n this.state().input()?.focus();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAQA;;AAEG;AACI,MAAM,qBAAqB,GAAG,gBAAgB,CAAc,UAAU,CAAC;AAE9E;;AAEG;MACU,oBAAoB,GAAG,mBAAmB,CAAC,qBAAqB;AAE7E;;AAEG;MACU,mBAAmB,GAAG,mBAAmB,CAAc,qBAAqB;AAEzF;;AAEG;AACI,MAAM,aAAa,GAAG,WAAW,CAAC,qBAAqB,CAAC;;MCPlD,mBAAmB,CAAA;AA4B9B,IAAA,WAAA,GAAA;;QA1BmB,IAAA,CAAA,KAAK,GAAG,mBAAmB,EAAE;;AAG7B,QAAA,IAAA,CAAA,kBAAkB,GAAG,aAAa,CACnD,MAAM,IAAI,CAAC,KAAK,EAA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BAAA,EAAA,gBAAA,EAAA,mCAAA,EAAA,oBAAA,EAAA,uCAAA,EAAA,oBAAA,EAAA,uCAAA,EAAA,UAAA,EAAA,oBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAhB7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,IAAI,EAAE;AACJ,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,QAAQ,EAAE,IAAI;AACd,wBAAA,eAAe,EAAE,SAAS;AAC1B,wBAAA,MAAM,EAAE,MAAM;AACd,wBAAA,sBAAsB,EAAE,cAAc;AACtC,wBAAA,sBAAsB,EAAE,gBAAgB;AACxC,wBAAA,kBAAkB,EAAE,iCAAiC;AACrD,wBAAA,sBAAsB,EAAE,qCAAqC;AAC7D,wBAAA,sBAAsB,EAAE,qCAAqC;AAC7D,wBAAA,YAAY,EAAE,oBAAoB;AACnC,qBAAA;AACF,iBAAA;wDA4BiB,cAAc,EAAA,CAAA;sBAD7B,YAAY;uBAAC,OAAO;;;AC/CvB;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-primitives-combobox.mjs","sources":["../../../../packages/ng-primitives/combobox/src/combobox/combobox-state.ts","../../../../packages/ng-primitives/combobox/src/combobox-dropdown/combobox-dropdown.ts","../../../../packages/ng-primitives/combobox/src/combobox-input/combobox-input.ts","../../../../packages/ng-primitives/combobox/src/combobox-option/combobox-option.ts","../../../../packages/ng-primitives/combobox/src/combobox-portal/combobox-portal.ts","../../../../packages/ng-primitives/combobox/src/config/combobox-config.ts","../../../../packages/ng-primitives/combobox/src/combobox/combobox.ts","../../../../packages/ng-primitives/combobox/src/combobox-button/combobox-button.ts","../../../../packages/ng-primitives/combobox/src/ng-primitives-combobox.ts"],"sourcesContent":["import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpCombobox } from './combobox';\n\n/**\n * The state token for the Combobox primitive.\n */\nexport const NgpComboboxStateToken = createStateToken<NgpCombobox>('Combobox');\n\n/**\n * Provides the Combobox state.\n */\nexport const provideComboboxState = createStateProvider(NgpComboboxStateToken);\n\n/**\n * Injects the Combobox state.\n */\nexport const injectComboboxState = createStateInjector<NgpCombobox>(NgpComboboxStateToken);\n\n/**\n * The Combobox state registration function.\n */\nexport const comboboxState = createState(NgpComboboxStateToken);\n","import { Directive, input } from '@angular/core';\nimport { injectElementRef, observeResize } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectComboboxState } from '../combobox/combobox-state';\n\n@Directive({\n selector: '[ngpComboboxDropdown]',\n exportAs: 'ngpComboboxDropdown',\n host: {\n role: 'listbox',\n '[id]': 'id()',\n '[style.left.px]': 'state().overlay()?.position()?.x',\n '[style.top.px]': 'state().overlay()?.position()?.y',\n '[style.--ngp-combobox-transform-origin]': 'state().overlay()?.transformOrigin()',\n '[style.--ngp-combobox-width.px]': 'comboboxDimensions().width',\n '[style.--ngp-combobox-input-width.px]': 'inputDimensions().width',\n '[style.--ngp-combobox-button-width.px]': 'buttonDimensions().width',\n },\n})\nexport class NgpComboboxDropdown {\n /** Access the combobox state. */\n protected readonly state = injectComboboxState();\n\n /** The dimensions of the combobox. */\n protected readonly comboboxDimensions = observeResize(\n () => this.state().elementRef.nativeElement,\n );\n\n /** The dimensions of the combobox. */\n protected readonly inputDimensions = observeResize(\n () => this.state().input()?.elementRef.nativeElement,\n );\n\n /** Store the combobox button dimensions. */\n protected readonly buttonDimensions = observeResize(\n () => this.state().button()?.elementRef.nativeElement,\n );\n\n /**\n * Access the element reference.\n * @internal\n */\n readonly elementRef = injectElementRef();\n\n /** The id of the dropdown. */\n readonly id = input<string>(uniqueId('ngp-combobox-dropdown'));\n\n constructor() {\n this.state().registerDropdown(this);\n }\n}\n","import { computed, Directive, HostListener, input } from '@angular/core';\nimport { setupFormControl } from 'ng-primitives/form-field';\nimport { injectElementRef, setupInteractions } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectComboboxState } from '../combobox/combobox-state';\n\n@Directive({\n selector: 'input[ngpComboboxInput]',\n exportAs: 'ngpComboboxInput',\n host: {\n role: 'combobox',\n type: 'text',\n autocomplete: 'off',\n autocorrect: 'off',\n spellcheck: 'false',\n 'aria-haspopup': 'listbox',\n 'aria-autocomplete': 'list',\n '[id]': 'id()',\n '[attr.aria-controls]': 'state().open() ? dropdownId() : undefined',\n '[attr.aria-expanded]': 'state().open()',\n '[attr.data-open]': 'state().open() ? \"\" : undefined',\n '[attr.data-disabled]': 'state().disabled() ? \"\" : undefined',\n '[attr.data-multiple]': 'state().multiple() ? \"\" : undefined',\n '[attr.aria-activedescendant]': 'activeDescendant()',\n '[disabled]': 'state().disabled()',\n },\n})\nexport class NgpComboboxInput {\n /** Access the combobox state. */\n protected readonly state = injectComboboxState();\n\n /**\n * Access the element reference.\n * @internal\n */\n readonly elementRef = injectElementRef<HTMLInputElement>();\n\n /** The id of the input. */\n readonly id = input<string>(uniqueId('ngp-combobox-input'));\n\n /** The id of the dropdown. */\n readonly dropdownId = computed(() => this.state().dropdown()?.id());\n\n /** The id of the active descendant. */\n protected readonly activeDescendant = computed(() =>\n this.state().activeDescendantManager.activeDescendant(),\n );\n\n /** Determine if the pointer was used to focus the input. */\n protected pointerFocused = false;\n\n /**\n * The control status - this is required as we apply them to the combobox element as well as the input element.\n * @internal\n */\n readonly controlStatus = setupFormControl({ id: this.id, disabled: this.state().disabled });\n\n constructor() {\n setupInteractions({\n focus: true,\n hover: true,\n press: true,\n disabled: this.state().disabled,\n });\n\n this.state().registerInput(this);\n }\n\n /** Handle keydown events for accessibility. */\n @HostListener('keydown', ['$event'])\n protected handleKeydown(event: KeyboardEvent): void {\n switch (event.key) {\n case 'ArrowDown':\n if (this.state().open()) {\n this.state().activateNextOption();\n } else {\n this.state().openDropdown();\n }\n event.preventDefault();\n break;\n case 'ArrowUp':\n if (this.state().open()) {\n this.state().activatePreviousOption();\n } else {\n this.state().openDropdown();\n this.state().activeDescendantManager.last();\n }\n event.preventDefault();\n break;\n case 'Home':\n if (this.state().open()) {\n this.state().activeDescendantManager.first();\n }\n event.preventDefault();\n break;\n case 'End':\n if (this.state().open()) {\n this.state().activeDescendantManager.last();\n }\n event.preventDefault();\n break;\n case 'Enter':\n if (this.state().open()) {\n this.state().selectOption(this.state().activeDescendantManager.activeItem());\n }\n event.preventDefault();\n break;\n case 'Escape':\n this.state().closeDropdown();\n event.preventDefault();\n break;\n case 'Backspace':\n // if the input is not empty then open the dropdown\n if (this.elementRef.nativeElement.value.length > 0) {\n this.state().openDropdown();\n }\n break;\n default:\n // Ignore keys with length > 1 (e.g., 'Shift', 'ArrowLeft', 'Enter', etc.)\n // Filter out control/meta key combos (e.g., Ctrl+C)\n if (event.key.length > 1 || event.ctrlKey || event.metaKey || event.altKey) {\n return;\n }\n\n // if this was a character key, we want to open the dropdown\n this.state().openDropdown();\n }\n }\n\n @HostListener('blur', ['$event'])\n protected closeDropdown(event: FocusEvent): void {\n const relatedTarget = event.relatedTarget as HTMLElement;\n\n // if the blur was caused by focus moving to the dropdown, don't close\n if (\n relatedTarget &&\n this.state().dropdown()?.elementRef.nativeElement.contains(relatedTarget)\n ) {\n return;\n }\n\n // if the blur was caused by focus moving to the button, don't close\n if (relatedTarget && this.state().button()?.elementRef.nativeElement.contains(relatedTarget)) {\n return;\n }\n\n this.state().closeDropdown();\n event.preventDefault();\n }\n\n /**\n * Focus the input field\n * @internal\n */\n focus(): void {\n this.elementRef.nativeElement.focus();\n }\n\n @HostListener('focus', ['$event'])\n protected highlightText(): void {\n if (this.pointerFocused) {\n this.pointerFocused = false;\n return;\n }\n\n // highlight the text in the input\n this.elementRef.nativeElement.setSelectionRange(0, this.elementRef.nativeElement.value.length);\n }\n\n @HostListener('pointerdown', ['$event'])\n protected handlePointerDown(): void {\n this.pointerFocused = true;\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n computed,\n Directive,\n HostListener,\n input,\n OnDestroy,\n OnInit,\n} from '@angular/core';\nimport { NgpActivatable } from 'ng-primitives/a11y';\nimport { injectElementRef, setupInteractions } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectComboboxState } from '../combobox/combobox-state';\n\n@Directive({\n selector: '[ngpComboboxOption]',\n exportAs: 'ngpComboboxOption',\n host: {\n role: 'option',\n '[id]': 'id()',\n '[attr.tabindex]': '-1',\n '[attr.aria-selected]': 'selected() ? \"true\" : undefined',\n '[attr.data-selected]': 'selected() ? \"\" : undefined',\n '[attr.data-active]': 'active() ? \"\" : undefined',\n '[attr.data-disabled]': 'disabled() ? \"\" : undefined',\n '(click)': 'select()',\n },\n})\nexport class NgpComboboxOption implements OnInit, OnDestroy, NgpActivatable {\n /** Access the combobox state. */\n protected readonly state = injectComboboxState();\n\n /**\n * The element reference of the option.\n * @internal\n */\n readonly elementRef = injectElementRef();\n\n /** The id of the option. */\n readonly id = input<string>(uniqueId('ngp-combobox-option'));\n\n /** @required The value of the option. */\n readonly value = input<any>(undefined, {\n alias: 'ngpComboboxOptionValue',\n });\n\n /** The disabled state of the option. */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpComboboxOptionDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Whether this option is the active descendant.\n * @internal\n */\n protected readonly active = computed(\n () => this.state().activeDescendantManager.activeDescendant() === this.id(),\n );\n\n /** Whether this option is selected. */\n protected readonly selected = computed(() => {\n const value = this.value();\n\n if (!value) {\n return false;\n }\n\n if (this.state().multiple()) {\n return (\n Array.isArray(value) && value.some(v => this.state().compareWith()(v, this.state().value()))\n );\n }\n\n return this.state().compareWith()(value, this.state().value());\n });\n\n constructor() {\n this.state().registerOption(this);\n\n setupInteractions({\n hover: true,\n press: true,\n disabled: this.disabled,\n });\n }\n\n ngOnInit(): void {\n if (this.value() === undefined) {\n throw new Error(\n 'ngpComboboxOption: The value input is required. Please provide a value for the option.',\n );\n }\n }\n\n ngOnDestroy(): void {\n this.state().unregisterOption(this);\n }\n\n /**\n * Select the option.\n * @internal\n */\n select(): void {\n if (this.disabled()) {\n return;\n }\n\n this.state().toggleOption(this);\n }\n\n /**\n * Scroll the option into view.\n * @internal\n */\n scrollIntoView(): void {\n this.elementRef.nativeElement.scrollIntoView({ block: 'nearest' });\n }\n\n /**\n * Whenever the pointer enters the option, activate it.\n * @internal\n */\n @HostListener('pointerenter')\n protected onPointerEnter(): void {\n this.state().activeDescendantManager.activate(this);\n }\n\n /**\n * Whenever the pointer leaves the option, deactivate it.\n * @internal\n */\n @HostListener('pointerleave')\n protected onPointerLeave(): void {\n this.state().activeDescendantManager.activate(undefined);\n }\n}\n","import {\n Directive,\n inject,\n Injector,\n OnDestroy,\n signal,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport { createOverlay, NgpOverlay, NgpOverlayConfig } from 'ng-primitives/portal';\nimport { injectComboboxState } from '../combobox/combobox-state';\n\n@Directive({\n selector: '[ngpComboboxPortal]',\n exportAs: 'ngpComboboxPortal',\n})\nexport class NgpComboboxPortal implements OnDestroy {\n /** Access the combobox state. */\n private readonly state = injectComboboxState();\n /** Access the view container reference. */\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n /** Access the template reference. */\n private readonly templateRef = inject(TemplateRef);\n\n /** Access the injector. */\n private readonly injector = inject(Injector);\n\n /**\n * The overlay that manages the popover\n * @internal\n */\n readonly overlay = signal<NgpOverlay<void> | null>(null);\n\n constructor() {\n this.state().registerPortal(this);\n }\n\n /** Cleanup the portal. */\n ngOnDestroy(): void {\n this.overlay()?.destroy();\n }\n\n /**\n * Attach the portal.\n * @internal\n */\n show(): Promise<void> {\n // Create the overlay if it doesn't exist yet\n if (!this.overlay()) {\n this.createOverlay();\n }\n\n // Show the overlay\n return this.overlay()!.show();\n }\n\n /**\n * Detach the portal.\n * @internal\n */\n async detach(): Promise<void> {\n this.overlay()?.hide();\n }\n\n /**\n * Create the overlay that will contain the dropdown\n */\n private createOverlay(): void {\n // Create config for the overlay\n const config: NgpOverlayConfig<void> = {\n content: this.templateRef,\n viewContainerRef: this.viewContainerRef,\n triggerElement: this.state().elementRef.nativeElement,\n injector: this.injector,\n placement: this.state().placement(),\n closeOnOutsideClick: true,\n closeOnEscape: true,\n restoreFocus: false,\n scrollBehaviour: 'reposition',\n container: this.state().container(),\n };\n\n this.overlay.set(createOverlay(config));\n }\n}\n","import { InjectionToken, Provider, inject } from '@angular/core';\nimport type { Placement } from '@floating-ui/dom';\n\nexport interface NgpComboboxConfig {\n /**\n * The default placement for the combobox dropdown.\n * @default 'bottom'\n */\n placement: Placement;\n\n /**\n * The container for the combobox dropdown.\n * This can be used to control where the dropdown is rendered in the DOM.\n * @default document.body\n */\n container: HTMLElement | null;\n}\n\nexport const defaultComboboxConfig: NgpComboboxConfig = {\n placement: 'bottom',\n container: null,\n};\n\nexport const NgpComboboxConfigToken = new InjectionToken<NgpComboboxConfig>(\n 'NgpComboboxConfigToken',\n);\n\n/**\n * Provide the default Combobox configuration\n * @param config The Combobox configuration\n * @returns The provider\n */\nexport function provideComboboxConfig(config: Partial<NgpComboboxConfig>): Provider[] {\n return [\n {\n provide: NgpComboboxConfigToken,\n useValue: { ...defaultComboboxConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Combobox configuration\n * @returns The global Combobox configuration\n */\nexport function injectComboboxConfig(): NgpComboboxConfig {\n return inject(NgpComboboxConfigToken, { optional: true }) ?? defaultComboboxConfig;\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n afterRenderEffect,\n booleanAttribute,\n computed,\n Directive,\n inject,\n Injector,\n input,\n output,\n signal,\n} from '@angular/core';\nimport type { Placement } from '@floating-ui/dom';\nimport { activeDescendantManager } from 'ng-primitives/a11y';\nimport { injectElementRef, setupInteractions } from 'ng-primitives/internal';\nimport type { NgpComboboxButton } from '../combobox-button/combobox-button';\nimport type { NgpComboboxDropdown } from '../combobox-dropdown/combobox-dropdown';\nimport type { NgpComboboxInput } from '../combobox-input/combobox-input';\nimport { NgpComboboxOption } from '../combobox-option/combobox-option';\nimport type { NgpComboboxPortal } from '../combobox-portal/combobox-portal';\nimport { injectComboboxConfig } from '../config/combobox-config';\nimport { comboboxState, provideComboboxState } from './combobox-state';\n\n/**\n * Ideally we would use a generic type here, unfortunately, unlike in React,\n * we cannot infer the type based on another input. For example, if multiple\n * is true, we cannot infer that the value is an array of T. Using a union\n * type is not ideal either because it requires the user to handle multiple cases.\n * Using a generic also isn't ideal because we need to use T as both an array and\n * a single value.\n *\n * Any seems to be used by Angular Material, ng-select, and other libraries\n * so we will use it here as well.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype T = any;\n\n@Directive({\n selector: '[ngpCombobox]',\n exportAs: 'ngpCombobox',\n providers: [provideComboboxState()],\n host: {\n '[attr.data-open]': 'state.open() ? \"\" : undefined',\n '[attr.data-disabled]': 'state.disabled() ? \"\" : undefined',\n '[attr.data-multiple]': 'state.multiple() ? \"\" : undefined',\n '[attr.data-invalid]': 'controlStatus()?.invalid ? \"\" : undefined',\n '[attr.data-valid]': 'controlStatus()?.valid ? \"\" : undefined',\n '[attr.data-touched]': 'controlStatus()?.touched ? \"\" : undefined',\n '[attr.data-pristine]': 'controlStatus()?.pristine ? \"\" : undefined',\n '[attr.data-dirty]': 'controlStatus()?.dirty ? \"\" : undefined',\n '[attr.data-pending]': 'controlStatus()?.pending ? \"\" : undefined',\n },\n})\nexport class NgpCombobox {\n /** Access the combobox configuration. */\n protected readonly config = injectComboboxConfig();\n\n /** @internal Access the combobox element. */\n readonly elementRef = injectElementRef();\n\n /** Access the injector. */\n protected readonly injector = inject(Injector);\n\n /** The value of the combobox. */\n readonly value = input<T>(undefined, {\n alias: 'ngpComboboxValue',\n });\n\n /** Event emitted when the value changes. */\n readonly valueChange = output<T>({\n alias: 'ngpComboboxValueChange',\n });\n\n /** Whether the combobox is multiple selection. */\n readonly multiple = input<boolean, BooleanInput>(false, {\n alias: 'ngpComboboxMultiple',\n transform: booleanAttribute,\n });\n\n /** Whether the combobox is disabled. */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpComboboxDisabled',\n transform: booleanAttribute,\n });\n\n /** Emit when the dropdown open state changes. */\n readonly openChange = output<boolean>({\n alias: 'ngpComboboxOpenChange',\n });\n\n /** The comparator function used to compare options. */\n readonly compareWith = input<(a: T | undefined, b: T | undefined) => boolean>(Object.is, {\n alias: 'ngpComboboxCompareWith',\n });\n\n /** The position of the dropdown. */\n readonly placement = input<Placement>(this.config.placement, {\n alias: 'ngpComboboxDropdownPlacement',\n });\n\n /** The container for the dropdown. */\n readonly container = input<HTMLElement | null>(this.config.container, {\n alias: 'ngpComboboxDropdownContainer',\n });\n\n /**\n * Store the combobox input\n * @internal\n */\n readonly input = signal<NgpComboboxInput | undefined>(undefined);\n\n /**\n * Store the combobox button.\n * @internal\n */\n readonly button = signal<NgpComboboxButton | undefined>(undefined);\n\n /**\n * Store the combobox portal.\n * @internal\n */\n readonly portal = signal<NgpComboboxPortal | undefined>(undefined);\n\n /**\n * Store the combobox dropdown.\n * @internal\n */\n readonly dropdown = signal<NgpComboboxDropdown | undefined>(undefined);\n\n /**\n * Store the combobox options.\n * @internal\n */\n readonly options = signal<NgpComboboxOption[]>([]);\n\n /**\n * Access the overlay\n * @internal\n */\n readonly overlay = computed(() => this.portal()?.overlay());\n\n /**\n * The open state of the combobox.\n * @internal\n */\n readonly open = computed(() => this.overlay()?.isOpen() ?? false);\n\n /**\n * The active key descendant manager.\n * @internal\n */\n readonly activeDescendantManager = activeDescendantManager({\n // we must wrap the signal in a computed to ensure it is not used before it is defined\n disabled: computed(() => this.state.disabled()),\n items: this.options,\n });\n\n /** The control status */\n protected readonly controlStatus = computed(() => this.input()?.controlStatus());\n\n /** The state of the combobox. */\n protected readonly state = comboboxState<NgpCombobox>(this);\n\n constructor() {\n setupInteractions({\n focus: true,\n focusWithin: true,\n hover: true,\n press: true,\n disabled: this.state.disabled,\n });\n\n // any time the active descendant changes, ensure we scroll it into view\n // perform after next render to ensure the DOM is updated\n // e.g. the dropdown is open before the option is scrolled into view\n afterRenderEffect({\n write: () => {\n const isPositioned = this.portal()?.overlay()?.isPositioned() ?? false;\n const activeItem = this.activeDescendantManager.activeItem();\n\n if (!isPositioned || !activeItem) {\n return;\n }\n\n this.activeDescendantManager.activeItem()?.scrollIntoView?.();\n },\n });\n }\n\n /**\n * Open the dropdown.\n * @internal\n */\n async openDropdown(): Promise<void> {\n if (this.state.disabled() || this.open()) {\n return;\n }\n\n this.openChange.emit(true);\n await this.portal()?.show();\n\n // if there is a selected option(s), set the active descendant to the first selected option\n const selectedOption = this.options().find(option => this.isOptionSelected(option));\n\n // if there is no selected option, set the active descendant to the first option\n const targetOption = selectedOption ?? this.options()[0];\n\n // if there is no target option, do nothing\n if (!targetOption) {\n return;\n }\n\n // activate the selected option or the first option\n this.activeDescendantManager.activate(targetOption);\n }\n\n /**\n * Close the dropdown.\n * @internal\n */\n closeDropdown(): void {\n if (!this.open()) {\n return;\n }\n\n this.openChange.emit(false);\n this.portal()?.detach();\n\n // clear the active descendant\n this.activeDescendantManager.reset();\n }\n\n /**\n * Toggle the dropdown.\n * @internal\n */\n async toggleDropdown(): Promise<void> {\n if (this.open()) {\n this.closeDropdown();\n } else {\n await this.openDropdown();\n }\n }\n\n /**\n * Select an option.\n * @param option The option to select.\n * @internal\n */\n selectOption(option: NgpComboboxOption | undefined): void {\n if (this.state.disabled()) {\n return;\n }\n\n if (!option) {\n this.state.value.set(undefined);\n this.closeDropdown();\n return;\n }\n\n if (this.state.multiple()) {\n // if the option is already selected, do nothing\n if (this.isOptionSelected(option)) {\n return;\n }\n\n const value = [...(this.state.value() as T[]), option.value() as T];\n\n // add the option to the value\n this.state.value.set(value as T);\n this.valueChange.emit(value as T);\n } else {\n this.state.value.set(option.value() as T);\n this.valueChange.emit(option.value() as T);\n\n // close the dropdown on single selection\n this.closeDropdown();\n }\n }\n\n /**\n * Deselect an option.\n * @param option The option to deselect.\n * @internal\n */\n deselectOption(option: NgpComboboxOption): void {\n // if the combobox is disabled or the option is not selected, do nothing\n // if the combobox is single selection, we don't allow deselecting\n if (this.state.disabled() || !this.isOptionSelected(option) || !this.state.multiple()) {\n return;\n }\n\n const values = (this.state.value() as T[]) ?? [];\n\n const newValue = values.filter(v => !this.state.compareWith()(v, option.value() as T));\n\n // remove the option from the value\n this.state.value.set(newValue as T);\n this.valueChange.emit(newValue as T);\n }\n\n /**\n * Toggle the selection of an option.\n * @param option The option to toggle.\n * @internal\n */\n toggleOption(option: NgpComboboxOption): void {\n if (this.state.disabled()) {\n return;\n }\n\n // if the state is single selection, we don't allow toggling\n if (!this.state.multiple()) {\n // always select the option in single selection mode even if it is already selected so that we update the input\n this.selectOption(option);\n return;\n }\n\n // otherwise toggle the option\n if (this.isOptionSelected(option)) {\n this.deselectOption(option);\n } else {\n this.selectOption(option);\n }\n }\n\n /**\n * Determine if an option is selected.\n * @param option The option to check.\n * @internal\n */\n isOptionSelected(option: NgpComboboxOption): boolean {\n if (this.state.disabled()) {\n return false;\n }\n\n const value = this.state.value();\n\n if (!value) {\n return false;\n }\n\n if (this.state.multiple()) {\n return value && (value as T[]).some(v => this.state.compareWith()(option.value(), v));\n }\n\n return this.state.compareWith()(option.value(), value);\n }\n\n /**\n * Activate the next option in the list if there is one.\n * If there is no option currently active, activate the selected option or the first option.\n * @internal\n */\n activateNextOption(): void {\n if (this.state.disabled()) {\n return;\n }\n\n const options = this.options();\n\n // if there are no options, do nothing\n if (options.length === 0) {\n return;\n }\n\n // if there is no active option, activate the first option\n if (!this.activeDescendantManager.activeItem()) {\n const selectedOption = options.find(option => this.isOptionSelected(option));\n\n // if there is a selected option(s), set the active descendant to the first selected option\n const targetOption = selectedOption ?? options[0];\n\n this.activeDescendantManager.activate(targetOption);\n return;\n }\n\n // otherwise activate the next option\n this.activeDescendantManager.next();\n }\n\n /**\n * Activate the previous option in the list if there is one.\n * @internal\n */\n activatePreviousOption(): void {\n if (this.state.disabled()) {\n return;\n }\n const options = this.options();\n // if there are no options, do nothing\n if (options.length === 0) {\n return;\n }\n // if there is no active option, activate the last option\n if (!this.activeDescendantManager.activeItem()) {\n const selectedOption = options.find(option => this.isOptionSelected(option));\n // if there is a selected option(s), set the active descendant to the first selected option\n const targetOption = selectedOption ?? options[options.length - 1];\n this.activeDescendantManager.activate(targetOption);\n return;\n }\n // otherwise activate the previous option\n this.activeDescendantManager.previous();\n }\n\n /**\n * Register the dropdown portal with the combobox.\n * @param portal The dropdown portal.\n * @internal\n */\n registerPortal(portal: NgpComboboxPortal): void {\n this.portal.set(portal);\n }\n\n /**\n * Register the combobox input with the combobox.\n * @param input The combobox input.\n * @internal\n */\n registerInput(input: NgpComboboxInput): void {\n this.input.set(input);\n }\n\n /**\n * Register the combobox button with the combobox.\n * @param button The combobox button.\n * @internal\n */\n registerButton(button: NgpComboboxButton): void {\n this.button.set(button);\n }\n\n /**\n * Register the dropdown with the combobox.\n * @param dropdown The dropdown to register.\n * @internal\n */\n registerDropdown(dropdown: NgpComboboxDropdown): void {\n this.dropdown.set(dropdown);\n }\n\n /**\n * Register an option with the combobox.\n * @param option The option to register.\n * @internal\n */\n registerOption(option: NgpComboboxOption): void {\n this.options.update(options => [...options, option]);\n }\n\n /**\n * Unregister an option from the combobox.\n * @param option The option to unregister.\n * @internal\n */\n unregisterOption(option: NgpComboboxOption): void {\n this.options.update(options => options.filter(o => o !== option));\n }\n}\n","import { computed, Directive, HostListener, input } from '@angular/core';\nimport { injectElementRef, setupInteractions } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectComboboxState } from '../combobox/combobox-state';\n\n@Directive({\n selector: '[ngpComboboxButton]',\n exportAs: 'ngpComboboxButton',\n host: {\n type: 'button',\n tabindex: '-1',\n 'aria-haspopup': 'listbox',\n '[id]': 'id()',\n '[attr.aria-controls]': 'dropdownId()',\n '[attr.aria-expanded]': 'state().open()',\n '[attr.data-open]': 'state().open() ? \"\" : undefined',\n '[attr.data-disabled]': 'state().disabled() ? \"\" : undefined',\n '[attr.data-multiple]': 'state().multiple() ? \"\" : undefined',\n '[disabled]': 'state().disabled()',\n },\n})\nexport class NgpComboboxButton {\n /** Access the combobox state. */\n protected readonly state = injectComboboxState();\n\n /**\n * Access the element reference.\n * @internal\n */\n readonly elementRef = injectElementRef<HTMLButtonElement>();\n\n /** The id of the button. */\n readonly id = input<string>(uniqueId('ngp-combobox-button'));\n\n /** The id of the dropdown. */\n readonly dropdownId = computed(() => this.state().dropdown()?.id());\n\n constructor() {\n setupInteractions({\n hover: true,\n press: true,\n disabled: this.state().disabled,\n });\n\n this.state().registerButton(this);\n }\n\n @HostListener('click')\n protected async toggleDropdown(): Promise<void> {\n await this.state().toggleDropdown();\n this.state().input()?.focus();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAQA;;AAEG;AACI,MAAM,qBAAqB,GAAG,gBAAgB,CAAc,UAAU,CAAC;AAE9E;;AAEG;MACU,oBAAoB,GAAG,mBAAmB,CAAC,qBAAqB;AAE7E;;AAEG;MACU,mBAAmB,GAAG,mBAAmB,CAAc,qBAAqB;AAEzF;;AAEG;AACI,MAAM,aAAa,GAAG,WAAW,CAAC,qBAAqB,CAAC;;MCPlD,mBAAmB,CAAA;AA4B9B,IAAA,WAAA,GAAA;;QA1BmB,IAAA,CAAA,KAAK,GAAG,mBAAmB,EAAE;;AAG7B,QAAA,IAAA,CAAA,kBAAkB,GAAG,aAAa,CACnD,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC,UAAU,CAAC,aAAa,CAC5C;;AAGkB,QAAA,IAAA,CAAA,eAAe,GAAG,aAAa,CAChD,MAAM,IAAI,CAAC,KAAK,EAA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AAI;AACd,wBAAA,eAAe,EAAE,SAAS;AAC1B,wBAAA,MAAM,EAAE,MAAM;AACd,wBAAA,sBAAsB,EAAE,cAAc;AACtC,wBAAA,sBAAsB,EAAE,gBAAgB;AACxC,wBAAA,kBAAkB,EAAE,iCAAiC;AACrD,wBAAA,sBAAsB,EAAE,qCAAqC;AAC7D,wBAAA,sBAAsB,EAAE,qCAAqC;AAC7D,wBAAA,YAAY,EAAE,oBAAoB;AACnC,qBAAA;AACF,iBAAA;wDA4BiB,cAAc,EAAA,CAAA;sBAD7B,YAAY;uBAAC,OAAO;;;AC/CvB;;AAEG;;;;"}
|
|
@@ -2,14 +2,12 @@ import { createOverlay, injectOverlay } from 'ng-primitives/portal';
|
|
|
2
2
|
export { injectOverlayContext as injectMenuContext } from 'ng-primitives/portal';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { InjectionToken, inject, Injector, ViewContainerRef, input, booleanAttribute, numberAttribute, signal, computed, HostListener, Directive } from '@angular/core';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { injectElementRef } from 'ng-primitives/internal';
|
|
8
|
-
import * as i2 from 'ng-primitives/roving-focus';
|
|
5
|
+
import { injectElementRef, setupButton } from 'ng-primitives/internal';
|
|
6
|
+
import * as i1 from 'ng-primitives/roving-focus';
|
|
9
7
|
import { NgpRovingFocusItem, provideRovingFocusGroup, NgpRovingFocusGroup } from 'ng-primitives/roving-focus';
|
|
10
8
|
import { safeTakeUntilDestroyed } from 'ng-primitives/utils';
|
|
11
9
|
import { createStateToken, createStateProvider, createStateInjector, createState } from 'ng-primitives/state';
|
|
12
|
-
import * as i2
|
|
10
|
+
import * as i2 from 'ng-primitives/focus-trap';
|
|
13
11
|
import { NgpFocusTrap } from 'ng-primitives/focus-trap';
|
|
14
12
|
import { Subject } from 'rxjs';
|
|
15
13
|
|
|
@@ -278,6 +276,12 @@ class NgpMenuItem {
|
|
|
278
276
|
this.elementRef = injectElementRef();
|
|
279
277
|
/** Access the parent menu */
|
|
280
278
|
this.parentMenu = injectMenu();
|
|
279
|
+
/** Whether the menu item is disabled */
|
|
280
|
+
this.disabled = input(false, {
|
|
281
|
+
alias: 'ngpMenuItemDisabled',
|
|
282
|
+
transform: booleanAttribute,
|
|
283
|
+
});
|
|
284
|
+
setupButton({ disabled: this.disabled });
|
|
281
285
|
}
|
|
282
286
|
/** Close the menu when the item is clicked */
|
|
283
287
|
onClick(event) {
|
|
@@ -317,7 +321,7 @@ class NgpMenuItem {
|
|
|
317
321
|
this.parentMenu?.closeSubmenus.next(this.elementRef.nativeElement);
|
|
318
322
|
}
|
|
319
323
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpMenuItem, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
320
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
324
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.11", type: NgpMenuItem, isStandalone: true, selector: "[ngpMenuItem]", inputs: { disabled: { classPropertyName: "disabled", publicName: "ngpMenuItemDisabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "menuitem" }, listeners: { "click": "onClick($event)", "keydown.ArrowLeft": "handleArrowKey($event)", "keydown.ArrowRight": "handleArrowKey($event)", "mouseenter": "showSubmenuOnHover()" } }, exportAs: ["ngpMenuItem"], hostDirectives: [{ directive: i1.NgpRovingFocusItem, inputs: ["ngpRovingFocusItemDisabled", "ngpMenuItemDisabled"] }], ngImport: i0 }); }
|
|
321
325
|
}
|
|
322
326
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpMenuItem, decorators: [{
|
|
323
327
|
type: Directive,
|
|
@@ -325,7 +329,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
|
325
329
|
selector: '[ngpMenuItem]',
|
|
326
330
|
exportAs: 'ngpMenuItem',
|
|
327
331
|
hostDirectives: [
|
|
328
|
-
{ directive: NgpButton, inputs: ['disabled: ngpMenuItemDisabled'] },
|
|
329
332
|
{ directive: NgpRovingFocusItem, inputs: ['ngpRovingFocusItemDisabled: ngpMenuItemDisabled'] },
|
|
330
333
|
],
|
|
331
334
|
host: {
|
|
@@ -335,7 +338,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
|
335
338
|
'(keydown.ArrowRight)': 'handleArrowKey($event)',
|
|
336
339
|
},
|
|
337
340
|
}]
|
|
338
|
-
}], propDecorators: { showSubmenuOnHover: [{
|
|
341
|
+
}], ctorParameters: () => [], propDecorators: { showSubmenuOnHover: [{
|
|
339
342
|
type: HostListener,
|
|
340
343
|
args: ['mouseenter']
|
|
341
344
|
}] } });
|
|
@@ -564,7 +567,7 @@ class NgpMenu {
|
|
|
564
567
|
// ensure we don't inherit the focus group from the parent menu if there is one
|
|
565
568
|
provideRovingFocusGroup(NgpRovingFocusGroup, { inherit: false }),
|
|
566
569
|
provideMenu(NgpMenu),
|
|
567
|
-
], exportAs: ["ngpMenu"], hostDirectives: [{ directive:
|
|
570
|
+
], exportAs: ["ngpMenu"], hostDirectives: [{ directive: i1.NgpRovingFocusGroup }, { directive: i2.NgpFocusTrap }], ngImport: i0 }); }
|
|
568
571
|
}
|
|
569
572
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpMenu, decorators: [{
|
|
570
573
|
type: Directive,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-primitives-menu.mjs","sources":["../../../../packages/ng-primitives/menu/src/config/menu-config.ts","../../../../packages/ng-primitives/menu/src/menu/menu-token.ts","../../../../packages/ng-primitives/menu/src/submenu-trigger/submenu-trigger-state.ts","../../../../packages/ng-primitives/menu/src/submenu-trigger/submenu-trigger.ts","../../../../packages/ng-primitives/menu/src/menu-item/menu-item.ts","../../../../packages/ng-primitives/menu/src/menu-trigger/menu-trigger-state.ts","../../../../packages/ng-primitives/menu/src/menu-trigger/menu-trigger.ts","../../../../packages/ng-primitives/menu/src/menu/menu.ts","../../../../packages/ng-primitives/menu/src/ng-primitives-menu.ts"],"sourcesContent":["import { InjectionToken, Provider, inject } from '@angular/core';\nimport { Placement } from '@floating-ui/dom';\n\nexport interface NgpMenuConfig {\n /**\n * Define the offset of the menu relative to the trigger.\n * @default 4\n */\n offset: number;\n\n /**\n * Define the placement of the menu relative to the trigger.\n * @default 'bottom-start'\n */\n placement: Placement;\n\n /**\n * Define whether the menu should flip when there is not enough space for the menu.\n * @default true\n */\n flip: boolean;\n\n /**\n * Define the container in to which the menu should be attached.\n * @default document.body\n */\n container: HTMLElement | null;\n\n /**\n * Defines how the menu behaves when the window is scrolled.\n * @default scroll\n */\n scrollBehavior: 'reposition' | 'block';\n}\n\nexport const defaultMenuConfig: NgpMenuConfig = {\n offset: 4,\n placement: 'bottom-start',\n flip: true,\n container: null,\n scrollBehavior: 'block',\n};\n\nexport const NgpMenuConfigToken = new InjectionToken<NgpMenuConfig>('NgpMenuConfigToken');\n\n/**\n * Provide the default Menu configuration\n * @param config The Menu configuration\n * @returns The provider\n */\nexport function provideMenuConfig(config: Partial<NgpMenuConfig>): Provider[] {\n return [\n {\n provide: NgpMenuConfigToken,\n useValue: { ...defaultMenuConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Menu configuration\n * @returns The global Menu configuration\n */\nexport function injectMenuConfig(): NgpMenuConfig {\n return inject(NgpMenuConfigToken, { optional: true }) ?? defaultMenuConfig;\n}\n","import { ExistingProvider, inject, InjectionToken, Type } from '@angular/core';\nimport type { NgpMenu } from './menu';\n\nexport const NgpMenuToken = new InjectionToken<NgpMenu>('NgpMenuToken');\n\n/**\n * Inject the Menu directive instance\n */\nexport function injectMenu(): NgpMenu {\n return inject(NgpMenuToken);\n}\n\n/**\n * Provide the Menu directive instance\n */\nexport function provideMenu(type: Type<NgpMenu>): ExistingProvider {\n return { provide: NgpMenuToken, useExisting: type };\n}\n","import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpSubmenuTrigger } from './submenu-trigger';\n\n/**\n * The state token for the SubmenuTrigger primitive.\n */\nexport const NgpSubmenuTriggerStateToken = createStateToken<NgpSubmenuTrigger>('SubmenuTrigger');\n\n/**\n * Provides the SubmenuTrigger state.\n */\nexport const provideSubmenuTriggerState = createStateProvider(NgpSubmenuTriggerStateToken);\n\n/**\n * Injects the SubmenuTrigger state.\n */\nexport const injectSubmenuTriggerState = createStateInjector<NgpSubmenuTrigger>(\n NgpSubmenuTriggerStateToken,\n);\n\n/**\n * The SubmenuTrigger state registration function.\n */\nexport const submenuTriggerState = createState(NgpSubmenuTriggerStateToken);\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n computed,\n Directive,\n HostListener,\n inject,\n Injector,\n input,\n numberAttribute,\n signal,\n ViewContainerRef,\n} from '@angular/core';\nimport { Placement } from '@floating-ui/dom';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n createOverlay,\n NgpOverlay,\n NgpOverlayConfig,\n NgpOverlayContent,\n} from 'ng-primitives/portal';\nimport { safeTakeUntilDestroyed } from 'ng-primitives/utils';\nimport { NgpMenuToken } from '../menu/menu-token';\nimport { provideSubmenuTriggerState, submenuTriggerState } from './submenu-trigger-state';\n\n@Directive({\n selector: '[ngpSubmenuTrigger]',\n exportAs: 'ngpSubmenuTrigger',\n providers: [provideSubmenuTriggerState({ inherit: false })],\n host: {\n 'aria-haspopup': 'true',\n '[attr.aria-expanded]': 'open() ? \"true\" : \"false\"',\n '[attr.data-open]': 'open() ? \"\" : null',\n '(click)': 'toggle($event)',\n },\n})\nexport class NgpSubmenuTrigger<T = unknown> {\n /**\n * Access the menu trigger element.\n */\n private readonly trigger = injectElementRef();\n\n /**\n * Access the injector.\n */\n private readonly injector = inject(Injector);\n\n /**\n * Access the view container reference.\n */\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n /** Access the parent menu */\n private readonly parentMenu = inject(NgpMenuToken, { optional: true });\n\n /**\n * Access the submenu template ref.\n */\n readonly menu = input<NgpOverlayContent<T>>(undefined, {\n alias: 'ngpSubmenuTrigger',\n });\n\n /**\n * Define if the trigger should be disabled.\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpSubmenuTriggerDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Define the placement of the menu relative to the trigger.\n * @default 'right-start'\n */\n readonly placement = input<Placement>('right-start', {\n alias: 'ngpSubmenuTriggerPlacement',\n });\n\n /**\n * Define the offset of the menu relative to the trigger.\n * @default 0\n */\n readonly offset = input<number, NumberInput>(0, {\n alias: 'ngpSubmenuTriggerOffset',\n transform: numberAttribute,\n });\n\n /**\n * Define whether the menu should flip when there is not enough space for the menu.\n * @default true\n */\n readonly flip = input<boolean, BooleanInput>(true, {\n alias: 'ngpSubmenuTriggerFlip',\n transform: booleanAttribute,\n });\n\n /**\n * The overlay that manages the menu\n * @internal\n */\n readonly overlay = signal<NgpOverlay<T> | null>(null);\n\n /**\n * The open state of the menu.\n * @internal\n */\n readonly open = computed(() => this.overlay()?.isOpen() ?? false);\n\n /**\n * Access the menu trigger state.\n */\n readonly state = submenuTriggerState<NgpSubmenuTrigger<T>>(this);\n\n constructor() {\n this.parentMenu?.closeSubmenus.pipe(safeTakeUntilDestroyed()).subscribe(element => {\n // if the element is not the trigger, we want to close the menu\n if (element === this.trigger.nativeElement) {\n return;\n }\n\n this.hide('mouse');\n });\n }\n\n protected toggle(event: MouseEvent): void {\n // if the trigger is disabled then do not toggle the menu\n if (this.state.disabled()) {\n return;\n }\n\n // determine the origin of the event, 0 is keyboard, 1 is mouse\n const origin: FocusOrigin = event.detail === 0 ? 'keyboard' : 'mouse';\n\n // if the menu is open then hide it\n if (this.open()) {\n this.hide(origin);\n } else {\n this.show();\n }\n }\n\n /**\n * Show the menu.\n */\n show(): void {\n // If the trigger is disabled, don't show the menu\n if (this.state.disabled()) {\n return;\n }\n\n // Create the overlay if it doesn't exist yet\n if (!this.overlay()) {\n this.createOverlay();\n }\n\n // Show the overlay\n this.overlay()?.show();\n }\n\n /**\n * @internal\n * Hide the menu.\n */\n hide(origin: FocusOrigin = 'program'): void {\n // If the trigger is disabled or the menu is not open, do nothing\n if (this.state.disabled() || !this.open()) {\n return;\n }\n\n // Hide the overlay\n this.overlay()?.hide({ origin });\n }\n\n /**\n * Create the overlay that will contain the menu\n */\n private createOverlay(): void {\n const menu = this.state.menu();\n\n if (!menu) {\n throw new Error('Menu must be either a TemplateRef or a ComponentType');\n }\n\n // Create config for the overlay\n const config: NgpOverlayConfig<T> = {\n content: menu,\n triggerElement: this.trigger.nativeElement,\n injector: this.injector,\n placement: this.state.placement(),\n offset: this.state.offset(),\n flip: this.state.flip(),\n closeOnOutsideClick: true,\n closeOnEscape: true,\n restoreFocus: true,\n viewContainerRef: this.viewContainerRef,\n };\n\n this.overlay.set(createOverlay(config));\n }\n\n /**\n * If the user presses the right arrow key, we want to open the submenu\n * and focus the first item in the submenu.\n * This behavior will be inverted if the direction is RTL.\n * @param event\n */\n @HostListener('keydown.ArrowRight', ['$event'])\n @HostListener('keydown.ArrowLeft', ['$event'])\n protected showSubmenuOnArrow(event: KeyboardEvent): void {\n const direction = getComputedStyle(this.trigger.nativeElement).direction;\n\n const isRtl = direction === 'rtl';\n\n const isRightArrow = event.key === 'ArrowRight';\n const isLeftArrow = event.key === 'ArrowLeft';\n\n if ((isRightArrow && !isRtl) || (isLeftArrow && isRtl)) {\n event.preventDefault();\n this.show();\n }\n }\n\n /**\n * If the user hovers over the trigger, we want to open the submenu\n */\n @HostListener('pointerenter', ['$event'])\n protected showSubmenuOnHover(event: PointerEvent): void {\n // if this was triggered by a touch event, we don't want to show the submenu\n // as it will be shown by the click event - this prevents the submenu from being toggled\n if (event.pointerType === 'touch') {\n return;\n }\n\n this.show();\n }\n}\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { Directive, HostListener, inject, Injector } from '@angular/core';\nimport { NgpButton } from 'ng-primitives/button';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { NgpRovingFocusItem } from 'ng-primitives/roving-focus';\nimport { injectMenu } from '../menu/menu-token';\nimport { NgpSubmenuTrigger } from '../submenu-trigger/submenu-trigger';\n\n/**\n * The `NgpMenuItem` directive represents a menu item.\n */\n@Directive({\n selector: '[ngpMenuItem]',\n exportAs: 'ngpMenuItem',\n hostDirectives: [\n { directive: NgpButton, inputs: ['disabled: ngpMenuItemDisabled'] },\n { directive: NgpRovingFocusItem, inputs: ['ngpRovingFocusItemDisabled: ngpMenuItemDisabled'] },\n ],\n host: {\n role: 'menuitem',\n '(click)': 'onClick($event)',\n '(keydown.ArrowLeft)': 'handleArrowKey($event)',\n '(keydown.ArrowRight)': 'handleArrowKey($event)',\n },\n})\nexport class NgpMenuItem {\n /** Access the injector */\n private readonly injector = inject(Injector);\n /** Access the button element */\n private readonly elementRef = injectElementRef();\n\n /** Access the parent menu */\n private readonly parentMenu = injectMenu();\n\n /** Close the menu when the item is clicked */\n protected onClick(event: MouseEvent): void {\n // we do this here to avoid circular dependency issues\n const trigger = this.injector.get(NgpSubmenuTrigger, null, { self: true, optional: true });\n\n const origin: FocusOrigin = event.detail === 0 ? 'keyboard' : 'mouse';\n\n // if this is a submenu trigger, we don't want to close the menu, we want to open the submenu\n if (!trigger) {\n this.parentMenu?.closeAllMenus(origin);\n }\n }\n\n /**\n * If the user presses the left arrow key (in LTR) and there is a parent menu,\n * we want to close the menu and focus the parent menu item.\n */\n protected handleArrowKey(event: KeyboardEvent): void {\n // if there is no parent menu, we don't want to do anything\n const trigger = this.injector.get(NgpSubmenuTrigger, null, { optional: true });\n\n if (!trigger) {\n return;\n }\n\n const direction = getComputedStyle(this.elementRef.nativeElement).direction;\n const isRtl = direction === 'rtl';\n\n const isLeftArrow = event.key === 'ArrowLeft';\n const isRightArrow = event.key === 'ArrowRight';\n\n if ((isLeftArrow && !isRtl) || (isRightArrow && isRtl)) {\n event.preventDefault();\n\n if (trigger) {\n trigger.hide('keyboard');\n }\n }\n }\n\n /**\n * If the user hovers over the trigger, we want to open the submenu\n */\n @HostListener('mouseenter')\n protected showSubmenuOnHover(): void {\n this.parentMenu?.closeSubmenus.next(this.elementRef.nativeElement);\n }\n}\n","import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpMenuTrigger } from './menu-trigger';\n\n/**\n * The state token for the MenuTrigger primitive.\n */\nexport const NgpMenuTriggerStateToken = createStateToken<NgpMenuTrigger>('MenuTrigger');\n\n/**\n * Provides the MenuTrigger state.\n */\nexport const provideMenuTriggerState = createStateProvider(NgpMenuTriggerStateToken);\n\n/**\n * Injects the MenuTrigger state.\n */\nexport const injectMenuTriggerState = createStateInjector<NgpMenuTrigger>(NgpMenuTriggerStateToken);\n\n/**\n * The MenuTrigger state registration function.\n */\nexport const menuTriggerState = createState(NgpMenuTriggerStateToken);\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n computed,\n Directive,\n inject,\n Injector,\n input,\n numberAttribute,\n OnDestroy,\n signal,\n ViewContainerRef,\n} from '@angular/core';\nimport { Placement } from '@floating-ui/dom';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n createOverlay,\n NgpOverlay,\n NgpOverlayConfig,\n NgpOverlayContent,\n} from 'ng-primitives/portal';\nimport { injectMenuConfig } from '../config/menu-config';\nimport { menuTriggerState, provideMenuTriggerState } from './menu-trigger-state';\n\n/**\n * The `NgpMenuTrigger` directive allows you to turn an element into a menu trigger.\n */\n@Directive({\n selector: '[ngpMenuTrigger]',\n exportAs: 'ngpMenuTrigger',\n providers: [provideMenuTriggerState({ inherit: false })],\n host: {\n 'aria-haspopup': 'true',\n '[attr.aria-expanded]': 'open() ? \"true\" : \"false\"',\n '[attr.data-open]': 'open() ? \"\" : null',\n '[attr.data-placement]': 'state.placement()',\n '(click)': 'toggle($event)',\n },\n})\nexport class NgpMenuTrigger<T = unknown> implements OnDestroy {\n /**\n * Access the trigger element\n */\n private readonly trigger = injectElementRef();\n\n /**\n * Access the injector.\n */\n private readonly injector = inject(Injector);\n\n /**\n * Access the view container reference.\n */\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n /**\n * Access the global menu configuration.\n */\n private readonly config = injectMenuConfig();\n\n /**\n * Access the menu template ref.\n */\n readonly menu = input<NgpOverlayContent<T>>(undefined, {\n alias: 'ngpMenuTrigger',\n });\n\n /**\n * Define if the trigger should be disabled.\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpMenuTriggerDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Define the placement of the menu relative to the trigger.\n * @default 'bottom-start'\n */\n readonly placement = input<Placement>(this.config.placement, {\n alias: 'ngpMenuTriggerPlacement',\n });\n\n /**\n * Define the offset of the menu relative to the trigger.\n * @default 0\n */\n readonly offset = input<number, NumberInput>(this.config.offset, {\n alias: 'ngpMenuTriggerOffset',\n transform: numberAttribute,\n });\n\n /**\n * Define whether the menu should flip when there is not enough space for the menu.\n * @default true\n */\n readonly flip = input<boolean, BooleanInput>(this.config.flip, {\n alias: 'ngpMenuTriggerFlip',\n transform: booleanAttribute,\n });\n\n /**\n * Define the container in which the menu should be attached.\n * @default document.body\n */\n readonly container = input<HTMLElement | null>(this.config.container, {\n alias: 'ngpMenuTriggerContainer',\n });\n\n /**\n * Defines how the menu behaves when the window is scrolled.\n * @default 'block'\n */\n readonly scrollBehavior = input<'reposition' | 'block'>(this.config.scrollBehavior, {\n alias: 'ngpMenuTriggerScrollBehavior',\n });\n\n /**\n * Provide context to the menu. This can be used to pass data to the menu content.\n */\n readonly context = input<T>(undefined, {\n alias: 'ngpMenuTriggerContext',\n });\n\n /**\n * The overlay that manages the menu\n * @internal\n */\n readonly overlay = signal<NgpOverlay<T> | null>(null);\n\n /**\n * The open state of the menu.\n * @internal\n */\n readonly open = computed(() => this.overlay()?.isOpen() ?? false);\n\n /**\n * The menu trigger state.\n */\n readonly state = menuTriggerState<NgpMenuTrigger<T>>(this);\n\n ngOnDestroy(): void {\n this.overlay()?.destroy();\n }\n\n protected toggle(event: MouseEvent): void {\n // if the trigger is disabled then do not toggle the menu\n if (this.state.disabled()) {\n return;\n }\n\n // determine the origin of the event, 0 is keyboard, 1 is mouse\n const origin: FocusOrigin = event.detail === 0 ? 'keyboard' : 'mouse';\n\n // if the menu is open then hide it\n if (this.open()) {\n this.hide(origin);\n } else {\n this.show();\n }\n }\n\n /**\n * Show the menu.\n */\n show(): void {\n // If the trigger is disabled, don't show the menu\n if (this.state.disabled()) {\n return;\n }\n\n // Create the overlay if it doesn't exist yet\n if (!this.overlay()) {\n this.createOverlay();\n }\n\n // Show the overlay\n this.overlay()?.show();\n }\n\n /**\n * @internal\n * Hide the menu.\n */\n hide(origin: FocusOrigin = 'program'): void {\n // If the trigger is disabled or the menu is not open, do nothing\n if (this.state.disabled() || !this.open()) {\n return;\n }\n\n // Hide the overlay\n this.overlay()?.hide({ origin });\n }\n\n /**\n * Create the overlay that will contain the menu\n */\n private createOverlay(): void {\n const menu = this.state.menu();\n\n if (!menu) {\n throw new Error('Menu must be either a TemplateRef or a ComponentType');\n }\n\n // Create config for the overlay\n const config: NgpOverlayConfig<T> = {\n content: menu,\n triggerElement: this.trigger.nativeElement,\n viewContainerRef: this.viewContainerRef,\n injector: this.injector,\n context: this.state.context,\n container: this.state.container(),\n placement: this.state.placement(),\n offset: this.state.offset(),\n flip: this.state.flip(),\n closeOnOutsideClick: true,\n closeOnEscape: true,\n restoreFocus: true,\n scrollBehaviour: this.state.scrollBehavior(),\n };\n\n this.overlay.set(createOverlay(config));\n }\n}\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { Directive, inject } from '@angular/core';\nimport { NgpFocusTrap } from 'ng-primitives/focus-trap';\nimport { injectOverlay } from 'ng-primitives/portal';\nimport { NgpRovingFocusGroup, provideRovingFocusGroup } from 'ng-primitives/roving-focus';\nimport { Subject } from 'rxjs';\nimport { injectMenuTriggerState } from '../menu-trigger/menu-trigger-state';\nimport { NgpMenuToken, provideMenu } from './menu-token';\n\n/**\n * The `NgpMenu` is a container for menu items.\n */\n@Directive({\n selector: '[ngpMenu]',\n exportAs: 'ngpMenu',\n hostDirectives: [NgpRovingFocusGroup, NgpFocusTrap],\n providers: [\n // ensure we don't inherit the focus group from the parent menu if there is one\n provideRovingFocusGroup(NgpRovingFocusGroup, { inherit: false }),\n provideMenu(NgpMenu),\n ],\n host: {\n role: 'menu',\n '[style.left.px]': 'overlay.position().x',\n '[style.top.px]': 'overlay.position().y',\n '[style.--ngp-menu-trigger-width.px]': 'overlay.triggerWidth()',\n '[style.--ngp-menu-transform-origin]': 'overlay.transformOrigin()',\n },\n})\nexport class NgpMenu {\n /** Access the overlay. */\n protected readonly overlay = injectOverlay();\n\n /** Access the menu trigger state */\n private readonly menuTrigger = injectMenuTriggerState();\n\n /** Access any parent menus */\n private readonly parentMenu = inject(NgpMenuToken, { optional: true, skipSelf: true });\n\n /** @internal Whether we should close submenus */\n readonly closeSubmenus = new Subject<HTMLElement>();\n\n /** @internal Close the menu and any parent menus */\n closeAllMenus(origin: FocusOrigin): void {\n this.menuTrigger().hide(origin);\n this.parentMenu?.closeAllMenus(origin);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;;;AAmCO,MAAM,iBAAiB,GAAkB;AAC9C,IAAA,MAAM,EAAE,CAAC;AACT,IAAA,SAAS,EAAE,cAAc;AACzB,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,cAAc,EAAE,OAAO;CACxB;AAEM,MAAM,kBAAkB,GAAG,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AAA;AACD,oBAAA,IAAI,EAAE;AACJ,wBAAA,IAAI,EAAE,MAAM;AACZ,wBAAA,iBAAiB,EAAE,sBAAsB;AACzC,wBAAA,gBAAgB,EAAE,sBAAsB;AACxC,wBAAA,qCAAqC,EAAE,wBAAwB;AAC/D,wBAAA,qCAAqC,EAAE,2BAA2B;AACnE,qBAAA;AACF,iBAAA;;;AC5BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-primitives-menu.mjs","sources":["../../../../packages/ng-primitives/menu/src/config/menu-config.ts","../../../../packages/ng-primitives/menu/src/menu/menu-token.ts","../../../../packages/ng-primitives/menu/src/submenu-trigger/submenu-trigger-state.ts","../../../../packages/ng-primitives/menu/src/submenu-trigger/submenu-trigger.ts","../../../../packages/ng-primitives/menu/src/menu-item/menu-item.ts","../../../../packages/ng-primitives/menu/src/menu-trigger/menu-trigger-state.ts","../../../../packages/ng-primitives/menu/src/menu-trigger/menu-trigger.ts","../../../../packages/ng-primitives/menu/src/menu/menu.ts","../../../../packages/ng-primitives/menu/src/ng-primitives-menu.ts"],"sourcesContent":["import { InjectionToken, Provider, inject } from '@angular/core';\nimport { Placement } from '@floating-ui/dom';\n\nexport interface NgpMenuConfig {\n /**\n * Define the offset of the menu relative to the trigger.\n * @default 4\n */\n offset: number;\n\n /**\n * Define the placement of the menu relative to the trigger.\n * @default 'bottom-start'\n */\n placement: Placement;\n\n /**\n * Define whether the menu should flip when there is not enough space for the menu.\n * @default true\n */\n flip: boolean;\n\n /**\n * Define the container in to which the menu should be attached.\n * @default document.body\n */\n container: HTMLElement | null;\n\n /**\n * Defines how the menu behaves when the window is scrolled.\n * @default scroll\n */\n scrollBehavior: 'reposition' | 'block';\n}\n\nexport const defaultMenuConfig: NgpMenuConfig = {\n offset: 4,\n placement: 'bottom-start',\n flip: true,\n container: null,\n scrollBehavior: 'block',\n};\n\nexport const NgpMenuConfigToken = new InjectionToken<NgpMenuConfig>('NgpMenuConfigToken');\n\n/**\n * Provide the default Menu configuration\n * @param config The Menu configuration\n * @returns The provider\n */\nexport function provideMenuConfig(config: Partial<NgpMenuConfig>): Provider[] {\n return [\n {\n provide: NgpMenuConfigToken,\n useValue: { ...defaultMenuConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Menu configuration\n * @returns The global Menu configuration\n */\nexport function injectMenuConfig(): NgpMenuConfig {\n return inject(NgpMenuConfigToken, { optional: true }) ?? defaultMenuConfig;\n}\n","import { ExistingProvider, inject, InjectionToken, Type } from '@angular/core';\nimport type { NgpMenu } from './menu';\n\nexport const NgpMenuToken = new InjectionToken<NgpMenu>('NgpMenuToken');\n\n/**\n * Inject the Menu directive instance\n */\nexport function injectMenu(): NgpMenu {\n return inject(NgpMenuToken);\n}\n\n/**\n * Provide the Menu directive instance\n */\nexport function provideMenu(type: Type<NgpMenu>): ExistingProvider {\n return { provide: NgpMenuToken, useExisting: type };\n}\n","import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpSubmenuTrigger } from './submenu-trigger';\n\n/**\n * The state token for the SubmenuTrigger primitive.\n */\nexport const NgpSubmenuTriggerStateToken = createStateToken<NgpSubmenuTrigger>('SubmenuTrigger');\n\n/**\n * Provides the SubmenuTrigger state.\n */\nexport const provideSubmenuTriggerState = createStateProvider(NgpSubmenuTriggerStateToken);\n\n/**\n * Injects the SubmenuTrigger state.\n */\nexport const injectSubmenuTriggerState = createStateInjector<NgpSubmenuTrigger>(\n NgpSubmenuTriggerStateToken,\n);\n\n/**\n * The SubmenuTrigger state registration function.\n */\nexport const submenuTriggerState = createState(NgpSubmenuTriggerStateToken);\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n computed,\n Directive,\n HostListener,\n inject,\n Injector,\n input,\n numberAttribute,\n signal,\n ViewContainerRef,\n} from '@angular/core';\nimport { Placement } from '@floating-ui/dom';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n createOverlay,\n NgpOverlay,\n NgpOverlayConfig,\n NgpOverlayContent,\n} from 'ng-primitives/portal';\nimport { safeTakeUntilDestroyed } from 'ng-primitives/utils';\nimport { NgpMenuToken } from '../menu/menu-token';\nimport { provideSubmenuTriggerState, submenuTriggerState } from './submenu-trigger-state';\n\n@Directive({\n selector: '[ngpSubmenuTrigger]',\n exportAs: 'ngpSubmenuTrigger',\n providers: [provideSubmenuTriggerState({ inherit: false })],\n host: {\n 'aria-haspopup': 'true',\n '[attr.aria-expanded]': 'open() ? \"true\" : \"false\"',\n '[attr.data-open]': 'open() ? \"\" : null',\n '(click)': 'toggle($event)',\n },\n})\nexport class NgpSubmenuTrigger<T = unknown> {\n /**\n * Access the menu trigger element.\n */\n private readonly trigger = injectElementRef();\n\n /**\n * Access the injector.\n */\n private readonly injector = inject(Injector);\n\n /**\n * Access the view container reference.\n */\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n /** Access the parent menu */\n private readonly parentMenu = inject(NgpMenuToken, { optional: true });\n\n /**\n * Access the submenu template ref.\n */\n readonly menu = input<NgpOverlayContent<T>>(undefined, {\n alias: 'ngpSubmenuTrigger',\n });\n\n /**\n * Define if the trigger should be disabled.\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpSubmenuTriggerDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Define the placement of the menu relative to the trigger.\n * @default 'right-start'\n */\n readonly placement = input<Placement>('right-start', {\n alias: 'ngpSubmenuTriggerPlacement',\n });\n\n /**\n * Define the offset of the menu relative to the trigger.\n * @default 0\n */\n readonly offset = input<number, NumberInput>(0, {\n alias: 'ngpSubmenuTriggerOffset',\n transform: numberAttribute,\n });\n\n /**\n * Define whether the menu should flip when there is not enough space for the menu.\n * @default true\n */\n readonly flip = input<boolean, BooleanInput>(true, {\n alias: 'ngpSubmenuTriggerFlip',\n transform: booleanAttribute,\n });\n\n /**\n * The overlay that manages the menu\n * @internal\n */\n readonly overlay = signal<NgpOverlay<T> | null>(null);\n\n /**\n * The open state of the menu.\n * @internal\n */\n readonly open = computed(() => this.overlay()?.isOpen() ?? false);\n\n /**\n * Access the menu trigger state.\n */\n readonly state = submenuTriggerState<NgpSubmenuTrigger<T>>(this);\n\n constructor() {\n this.parentMenu?.closeSubmenus.pipe(safeTakeUntilDestroyed()).subscribe(element => {\n // if the element is not the trigger, we want to close the menu\n if (element === this.trigger.nativeElement) {\n return;\n }\n\n this.hide('mouse');\n });\n }\n\n protected toggle(event: MouseEvent): void {\n // if the trigger is disabled then do not toggle the menu\n if (this.state.disabled()) {\n return;\n }\n\n // determine the origin of the event, 0 is keyboard, 1 is mouse\n const origin: FocusOrigin = event.detail === 0 ? 'keyboard' : 'mouse';\n\n // if the menu is open then hide it\n if (this.open()) {\n this.hide(origin);\n } else {\n this.show();\n }\n }\n\n /**\n * Show the menu.\n */\n show(): void {\n // If the trigger is disabled, don't show the menu\n if (this.state.disabled()) {\n return;\n }\n\n // Create the overlay if it doesn't exist yet\n if (!this.overlay()) {\n this.createOverlay();\n }\n\n // Show the overlay\n this.overlay()?.show();\n }\n\n /**\n * @internal\n * Hide the menu.\n */\n hide(origin: FocusOrigin = 'program'): void {\n // If the trigger is disabled or the menu is not open, do nothing\n if (this.state.disabled() || !this.open()) {\n return;\n }\n\n // Hide the overlay\n this.overlay()?.hide({ origin });\n }\n\n /**\n * Create the overlay that will contain the menu\n */\n private createOverlay(): void {\n const menu = this.state.menu();\n\n if (!menu) {\n throw new Error('Menu must be either a TemplateRef or a ComponentType');\n }\n\n // Create config for the overlay\n const config: NgpOverlayConfig<T> = {\n content: menu,\n triggerElement: this.trigger.nativeElement,\n injector: this.injector,\n placement: this.state.placement(),\n offset: this.state.offset(),\n flip: this.state.flip(),\n closeOnOutsideClick: true,\n closeOnEscape: true,\n restoreFocus: true,\n viewContainerRef: this.viewContainerRef,\n };\n\n this.overlay.set(createOverlay(config));\n }\n\n /**\n * If the user presses the right arrow key, we want to open the submenu\n * and focus the first item in the submenu.\n * This behavior will be inverted if the direction is RTL.\n * @param event\n */\n @HostListener('keydown.ArrowRight', ['$event'])\n @HostListener('keydown.ArrowLeft', ['$event'])\n protected showSubmenuOnArrow(event: KeyboardEvent): void {\n const direction = getComputedStyle(this.trigger.nativeElement).direction;\n\n const isRtl = direction === 'rtl';\n\n const isRightArrow = event.key === 'ArrowRight';\n const isLeftArrow = event.key === 'ArrowLeft';\n\n if ((isRightArrow && !isRtl) || (isLeftArrow && isRtl)) {\n event.preventDefault();\n this.show();\n }\n }\n\n /**\n * If the user hovers over the trigger, we want to open the submenu\n */\n @HostListener('pointerenter', ['$event'])\n protected showSubmenuOnHover(event: PointerEvent): void {\n // if this was triggered by a touch event, we don't want to show the submenu\n // as it will be shown by the click event - this prevents the submenu from being toggled\n if (event.pointerType === 'touch') {\n return;\n }\n\n this.show();\n }\n}\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, HostListener, inject, Injector, input } from '@angular/core';\nimport { injectElementRef, setupButton } from 'ng-primitives/internal';\nimport { NgpRovingFocusItem } from 'ng-primitives/roving-focus';\nimport { injectMenu } from '../menu/menu-token';\nimport { NgpSubmenuTrigger } from '../submenu-trigger/submenu-trigger';\n\n/**\n * The `NgpMenuItem` directive represents a menu item.\n */\n@Directive({\n selector: '[ngpMenuItem]',\n exportAs: 'ngpMenuItem',\n hostDirectives: [\n { directive: NgpRovingFocusItem, inputs: ['ngpRovingFocusItemDisabled: ngpMenuItemDisabled'] },\n ],\n host: {\n role: 'menuitem',\n '(click)': 'onClick($event)',\n '(keydown.ArrowLeft)': 'handleArrowKey($event)',\n '(keydown.ArrowRight)': 'handleArrowKey($event)',\n },\n})\nexport class NgpMenuItem {\n /** Access the injector */\n private readonly injector = inject(Injector);\n /** Access the button element */\n private readonly elementRef = injectElementRef();\n\n /** Access the parent menu */\n private readonly parentMenu = injectMenu();\n\n /** Whether the menu item is disabled */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpMenuItemDisabled',\n transform: booleanAttribute,\n });\n\n constructor() {\n setupButton({ disabled: this.disabled });\n }\n\n /** Close the menu when the item is clicked */\n protected onClick(event: MouseEvent): void {\n // we do this here to avoid circular dependency issues\n const trigger = this.injector.get(NgpSubmenuTrigger, null, { self: true, optional: true });\n\n const origin: FocusOrigin = event.detail === 0 ? 'keyboard' : 'mouse';\n\n // if this is a submenu trigger, we don't want to close the menu, we want to open the submenu\n if (!trigger) {\n this.parentMenu?.closeAllMenus(origin);\n }\n }\n\n /**\n * If the user presses the left arrow key (in LTR) and there is a parent menu,\n * we want to close the menu and focus the parent menu item.\n */\n protected handleArrowKey(event: KeyboardEvent): void {\n // if there is no parent menu, we don't want to do anything\n const trigger = this.injector.get(NgpSubmenuTrigger, null, { optional: true });\n\n if (!trigger) {\n return;\n }\n\n const direction = getComputedStyle(this.elementRef.nativeElement).direction;\n const isRtl = direction === 'rtl';\n\n const isLeftArrow = event.key === 'ArrowLeft';\n const isRightArrow = event.key === 'ArrowRight';\n\n if ((isLeftArrow && !isRtl) || (isRightArrow && isRtl)) {\n event.preventDefault();\n\n if (trigger) {\n trigger.hide('keyboard');\n }\n }\n }\n\n /**\n * If the user hovers over the trigger, we want to open the submenu\n */\n @HostListener('mouseenter')\n protected showSubmenuOnHover(): void {\n this.parentMenu?.closeSubmenus.next(this.elementRef.nativeElement);\n }\n}\n","import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpMenuTrigger } from './menu-trigger';\n\n/**\n * The state token for the MenuTrigger primitive.\n */\nexport const NgpMenuTriggerStateToken = createStateToken<NgpMenuTrigger>('MenuTrigger');\n\n/**\n * Provides the MenuTrigger state.\n */\nexport const provideMenuTriggerState = createStateProvider(NgpMenuTriggerStateToken);\n\n/**\n * Injects the MenuTrigger state.\n */\nexport const injectMenuTriggerState = createStateInjector<NgpMenuTrigger>(NgpMenuTriggerStateToken);\n\n/**\n * The MenuTrigger state registration function.\n */\nexport const menuTriggerState = createState(NgpMenuTriggerStateToken);\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n computed,\n Directive,\n inject,\n Injector,\n input,\n numberAttribute,\n OnDestroy,\n signal,\n ViewContainerRef,\n} from '@angular/core';\nimport { Placement } from '@floating-ui/dom';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n createOverlay,\n NgpOverlay,\n NgpOverlayConfig,\n NgpOverlayContent,\n} from 'ng-primitives/portal';\nimport { injectMenuConfig } from '../config/menu-config';\nimport { menuTriggerState, provideMenuTriggerState } from './menu-trigger-state';\n\n/**\n * The `NgpMenuTrigger` directive allows you to turn an element into a menu trigger.\n */\n@Directive({\n selector: '[ngpMenuTrigger]',\n exportAs: 'ngpMenuTrigger',\n providers: [provideMenuTriggerState({ inherit: false })],\n host: {\n 'aria-haspopup': 'true',\n '[attr.aria-expanded]': 'open() ? \"true\" : \"false\"',\n '[attr.data-open]': 'open() ? \"\" : null',\n '[attr.data-placement]': 'state.placement()',\n '(click)': 'toggle($event)',\n },\n})\nexport class NgpMenuTrigger<T = unknown> implements OnDestroy {\n /**\n * Access the trigger element\n */\n private readonly trigger = injectElementRef();\n\n /**\n * Access the injector.\n */\n private readonly injector = inject(Injector);\n\n /**\n * Access the view container reference.\n */\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n /**\n * Access the global menu configuration.\n */\n private readonly config = injectMenuConfig();\n\n /**\n * Access the menu template ref.\n */\n readonly menu = input<NgpOverlayContent<T>>(undefined, {\n alias: 'ngpMenuTrigger',\n });\n\n /**\n * Define if the trigger should be disabled.\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpMenuTriggerDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Define the placement of the menu relative to the trigger.\n * @default 'bottom-start'\n */\n readonly placement = input<Placement>(this.config.placement, {\n alias: 'ngpMenuTriggerPlacement',\n });\n\n /**\n * Define the offset of the menu relative to the trigger.\n * @default 0\n */\n readonly offset = input<number, NumberInput>(this.config.offset, {\n alias: 'ngpMenuTriggerOffset',\n transform: numberAttribute,\n });\n\n /**\n * Define whether the menu should flip when there is not enough space for the menu.\n * @default true\n */\n readonly flip = input<boolean, BooleanInput>(this.config.flip, {\n alias: 'ngpMenuTriggerFlip',\n transform: booleanAttribute,\n });\n\n /**\n * Define the container in which the menu should be attached.\n * @default document.body\n */\n readonly container = input<HTMLElement | null>(this.config.container, {\n alias: 'ngpMenuTriggerContainer',\n });\n\n /**\n * Defines how the menu behaves when the window is scrolled.\n * @default 'block'\n */\n readonly scrollBehavior = input<'reposition' | 'block'>(this.config.scrollBehavior, {\n alias: 'ngpMenuTriggerScrollBehavior',\n });\n\n /**\n * Provide context to the menu. This can be used to pass data to the menu content.\n */\n readonly context = input<T>(undefined, {\n alias: 'ngpMenuTriggerContext',\n });\n\n /**\n * The overlay that manages the menu\n * @internal\n */\n readonly overlay = signal<NgpOverlay<T> | null>(null);\n\n /**\n * The open state of the menu.\n * @internal\n */\n readonly open = computed(() => this.overlay()?.isOpen() ?? false);\n\n /**\n * The menu trigger state.\n */\n readonly state = menuTriggerState<NgpMenuTrigger<T>>(this);\n\n ngOnDestroy(): void {\n this.overlay()?.destroy();\n }\n\n protected toggle(event: MouseEvent): void {\n // if the trigger is disabled then do not toggle the menu\n if (this.state.disabled()) {\n return;\n }\n\n // determine the origin of the event, 0 is keyboard, 1 is mouse\n const origin: FocusOrigin = event.detail === 0 ? 'keyboard' : 'mouse';\n\n // if the menu is open then hide it\n if (this.open()) {\n this.hide(origin);\n } else {\n this.show();\n }\n }\n\n /**\n * Show the menu.\n */\n show(): void {\n // If the trigger is disabled, don't show the menu\n if (this.state.disabled()) {\n return;\n }\n\n // Create the overlay if it doesn't exist yet\n if (!this.overlay()) {\n this.createOverlay();\n }\n\n // Show the overlay\n this.overlay()?.show();\n }\n\n /**\n * @internal\n * Hide the menu.\n */\n hide(origin: FocusOrigin = 'program'): void {\n // If the trigger is disabled or the menu is not open, do nothing\n if (this.state.disabled() || !this.open()) {\n return;\n }\n\n // Hide the overlay\n this.overlay()?.hide({ origin });\n }\n\n /**\n * Create the overlay that will contain the menu\n */\n private createOverlay(): void {\n const menu = this.state.menu();\n\n if (!menu) {\n throw new Error('Menu must be either a TemplateRef or a ComponentType');\n }\n\n // Create config for the overlay\n const config: NgpOverlayConfig<T> = {\n content: menu,\n triggerElement: this.trigger.nativeElement,\n viewContainerRef: this.viewContainerRef,\n injector: this.injector,\n context: this.state.context,\n container: this.state.container(),\n placement: this.state.placement(),\n offset: this.state.offset(),\n flip: this.state.flip(),\n closeOnOutsideClick: true,\n closeOnEscape: true,\n restoreFocus: true,\n scrollBehaviour: this.state.scrollBehavior(),\n };\n\n this.overlay.set(createOverlay(config));\n }\n}\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { Directive, inject } from '@angular/core';\nimport { NgpFocusTrap } from 'ng-primitives/focus-trap';\nimport { injectOverlay } from 'ng-primitives/portal';\nimport { NgpRovingFocusGroup, provideRovingFocusGroup } from 'ng-primitives/roving-focus';\nimport { Subject } from 'rxjs';\nimport { injectMenuTriggerState } from '../menu-trigger/menu-trigger-state';\nimport { NgpMenuToken, provideMenu } from './menu-token';\n\n/**\n * The `NgpMenu` is a container for menu items.\n */\n@Directive({\n selector: '[ngpMenu]',\n exportAs: 'ngpMenu',\n hostDirectives: [NgpRovingFocusGroup, NgpFocusTrap],\n providers: [\n // ensure we don't inherit the focus group from the parent menu if there is one\n provideRovingFocusGroup(NgpRovingFocusGroup, { inherit: false }),\n provideMenu(NgpMenu),\n ],\n host: {\n role: 'menu',\n '[style.left.px]': 'overlay.position().x',\n '[style.top.px]': 'overlay.position().y',\n '[style.--ngp-menu-trigger-width.px]': 'overlay.triggerWidth()',\n '[style.--ngp-menu-transform-origin]': 'overlay.transformOrigin()',\n },\n})\nexport class NgpMenu {\n /** Access the overlay. */\n protected readonly overlay = injectOverlay();\n\n /** Access the menu trigger state */\n private readonly menuTrigger = injectMenuTriggerState();\n\n /** Access any parent menus */\n private readonly parentMenu = inject(NgpMenuToken, { optional: true, skipSelf: true });\n\n /** @internal Whether we should close submenus */\n readonly closeSubmenus = new Subject<HTMLElement>();\n\n /** @internal Close the menu and any parent menus */\n closeAllMenus(origin: FocusOrigin): void {\n this.menuTrigger().hide(origin);\n this.parentMenu?.closeAllMenus(origin);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAmCO,MAAM,iBAAiB,GAAkB;AAC9C,IAAA,MAAM,EAAE,CAAC;AACT,IAAA,SAAS,EAAE,cAAc;AACzB,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,cAAc,EAAE,OAAO;CACxB;AAEM,MAAM,kBAAkB,GAAG,IAAI,cAAc,CAAgB,oBAAoB,CAAC;AAEzF;;;;AAIG;AACG,SAAU,iBAAiB,CAAC,MAA8B,EAAA;IAC9D,OAAO;AACL,QAAA;AACE,YAAA,OAAO,EAAE,kBAAkB;AAC3B,YAAA,QAAQ,EAAE,EAAE,GAAG,iBAAiB,EAAE,GAAG,MAAM,EAAE;AAC9C,SAAA;KACF;AACH;AAEA;;;AAGG;SACa,gBAAgB,GAAA;AAC9B,IAAA,OAAO,MAAM,CAAC,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,IAAI,iBAAiB;AAC5E;;MC9Da,YAAY,GAAG,IAAI,cAAc,CAAU,cAAc;AAEtE;;AAEG;SACa,UAAU,GAAA;AACxB,IAAA,OAAO,MAAM,CAAC,YAAY,CAAC;AAC7B;AAEA;;AAEG;AACG,SAAU,WAAW,CAAC,IAAmB,EAAA;IAC7C,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,IAAI,EAAE;AACrD;;ACTA;;AAEG;AACI,MAAM,2BA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,EAAA,sBAAA,EAAA,cAAA,EAAA,sBAAA,EAAA,mCAAA,EAAA,wBAAA,EAAA,mCAAA,EAAA,2BAAA,EAAA,EAAA,EAAA,SAAA,EAbP;;YAET,uBAAuB,CAAC,mBAAmB,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;YAChE,WAAW,CAAC,OAAO,CAAC;AACrB,SAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,mBAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EAAA,CAAA,YAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FASU,OAAO,EAAA,UAAA,EAAA,CAAA;kBAjBnB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,QAAQ,EAAE,SAAS;AACnB,oBAAA,cAAc,EAAE,CAAC,mBAAmB,EAAE,YAAY,CAAC;AACnD,oBAAA,SAAS,EAAE;;wBAET,uBAAuB,CAAC,mBAAmB,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;AAChE,wBAAA,WAAW,CAAA,OAAA,CAAS;AACrB,qBAAA;AACD,oBAAA,IAAI,EAAE;AACJ,wBAAA,IAAI,EAAE,MAAM;AACZ,wBAAA,iBAAiB,EAAE,sBAAsB;AACzC,wBAAA,gBAAgB,EAAE,sBAAsB;AACxC,wBAAA,qCAAqC,EAAE,wBAAwB;AAC/D,wBAAA,qCAAqC,EAAE,2BAA2B;AACnE,qBAAA;AACF,iBAAA;;;AC5BD;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "ng-primitives/
|
|
3
|
-
import * as i2 from "ng-primitives/roving-focus";
|
|
3
|
+
import * as i1 from "ng-primitives/roving-focus";
|
|
4
4
|
/**
|
|
5
5
|
* The `NgpMenuItem` directive represents a menu item.
|
|
6
6
|
*/
|
|
@@ -11,6 +11,9 @@ export declare class NgpMenuItem {
|
|
|
11
11
|
private readonly elementRef;
|
|
12
12
|
/** Access the parent menu */
|
|
13
13
|
private readonly parentMenu;
|
|
14
|
+
/** Whether the menu item is disabled */
|
|
15
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
|
|
16
|
+
constructor();
|
|
14
17
|
/** Close the menu when the item is clicked */
|
|
15
18
|
protected onClick(event: MouseEvent): void;
|
|
16
19
|
/**
|
|
@@ -23,5 +26,5 @@ export declare class NgpMenuItem {
|
|
|
23
26
|
*/
|
|
24
27
|
protected showSubmenuOnHover(): void;
|
|
25
28
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgpMenuItem, never>;
|
|
26
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NgpMenuItem, "[ngpMenuItem]", ["ngpMenuItem"], {
|
|
29
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgpMenuItem, "[ngpMenuItem]", ["ngpMenuItem"], { "disabled": { "alias": "ngpMenuItemDisabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.NgpRovingFocusItem; inputs: { "ngpRovingFocusItemDisabled": "ngpMenuItemDisabled"; }; outputs: {}; }]>;
|
|
27
30
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "ng-primitives",
|
|
3
3
|
"description": "Angular Primitives is a low-level headless UI component library with a focus on accessibility, customization, and developer experience. ",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.64.0",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"angular",
|
|
8
8
|
"primitives",
|
|
@@ -75,14 +75,14 @@
|
|
|
75
75
|
"types": "./autofill/index.d.ts",
|
|
76
76
|
"default": "./fesm2022/ng-primitives-autofill.mjs"
|
|
77
77
|
},
|
|
78
|
-
"./avatar": {
|
|
79
|
-
"types": "./avatar/index.d.ts",
|
|
80
|
-
"default": "./fesm2022/ng-primitives-avatar.mjs"
|
|
81
|
-
},
|
|
82
78
|
"./button": {
|
|
83
79
|
"types": "./button/index.d.ts",
|
|
84
80
|
"default": "./fesm2022/ng-primitives-button.mjs"
|
|
85
81
|
},
|
|
82
|
+
"./avatar": {
|
|
83
|
+
"types": "./avatar/index.d.ts",
|
|
84
|
+
"default": "./fesm2022/ng-primitives-avatar.mjs"
|
|
85
|
+
},
|
|
86
86
|
"./checkbox": {
|
|
87
87
|
"types": "./checkbox/index.d.ts",
|
|
88
88
|
"default": "./fesm2022/ng-primitives-checkbox.mjs"
|
|
@@ -155,10 +155,6 @@
|
|
|
155
155
|
"types": "./popover/index.d.ts",
|
|
156
156
|
"default": "./fesm2022/ng-primitives-popover.mjs"
|
|
157
157
|
},
|
|
158
|
-
"./portal": {
|
|
159
|
-
"types": "./portal/index.d.ts",
|
|
160
|
-
"default": "./fesm2022/ng-primitives-portal.mjs"
|
|
161
|
-
},
|
|
162
158
|
"./progress": {
|
|
163
159
|
"types": "./progress/index.d.ts",
|
|
164
160
|
"default": "./fesm2022/ng-primitives-progress.mjs"
|
|
@@ -167,6 +163,10 @@
|
|
|
167
163
|
"types": "./radio/index.d.ts",
|
|
168
164
|
"default": "./fesm2022/ng-primitives-radio.mjs"
|
|
169
165
|
},
|
|
166
|
+
"./portal": {
|
|
167
|
+
"types": "./portal/index.d.ts",
|
|
168
|
+
"default": "./fesm2022/ng-primitives-portal.mjs"
|
|
169
|
+
},
|
|
170
170
|
"./resize": {
|
|
171
171
|
"types": "./resize/index.d.ts",
|
|
172
172
|
"default": "./fesm2022/ng-primitives-resize.mjs"
|
|
@@ -207,18 +207,14 @@
|
|
|
207
207
|
"types": "./textarea/index.d.ts",
|
|
208
208
|
"default": "./fesm2022/ng-primitives-textarea.mjs"
|
|
209
209
|
},
|
|
210
|
-
"./toast": {
|
|
211
|
-
"types": "./toast/index.d.ts",
|
|
212
|
-
"default": "./fesm2022/ng-primitives-toast.mjs"
|
|
213
|
-
},
|
|
214
|
-
"./toggle": {
|
|
215
|
-
"types": "./toggle/index.d.ts",
|
|
216
|
-
"default": "./fesm2022/ng-primitives-toggle.mjs"
|
|
217
|
-
},
|
|
218
210
|
"./toggle-group": {
|
|
219
211
|
"types": "./toggle-group/index.d.ts",
|
|
220
212
|
"default": "./fesm2022/ng-primitives-toggle-group.mjs"
|
|
221
213
|
},
|
|
214
|
+
"./toast": {
|
|
215
|
+
"types": "./toast/index.d.ts",
|
|
216
|
+
"default": "./fesm2022/ng-primitives-toast.mjs"
|
|
217
|
+
},
|
|
222
218
|
"./toolbar": {
|
|
223
219
|
"types": "./toolbar/index.d.ts",
|
|
224
220
|
"default": "./fesm2022/ng-primitives-toolbar.mjs"
|
|
@@ -230,6 +226,10 @@
|
|
|
230
226
|
"./utils": {
|
|
231
227
|
"types": "./utils/index.d.ts",
|
|
232
228
|
"default": "./fesm2022/ng-primitives-utils.mjs"
|
|
229
|
+
},
|
|
230
|
+
"./toggle": {
|
|
231
|
+
"types": "./toggle/index.d.ts",
|
|
232
|
+
"default": "./fesm2022/ng-primitives-toggle.mjs"
|
|
233
233
|
}
|
|
234
234
|
},
|
|
235
235
|
"module": "fesm2022/ng-primitives.mjs",
|