ng-primitives 0.67.0 → 0.69.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/accordion/accordion-content/accordion-content.d.ts +1 -8
- package/date-picker/date-picker/date-picker-state.d.ts +4 -1
- package/date-picker/date-picker/date-picker.d.ts +34 -0
- package/date-picker/date-picker-cell/date-picker-cell.d.ts +1 -1
- package/date-picker/date-picker-date-button/date-picker-date-button.d.ts +13 -6
- package/date-picker/date-picker-grid/date-picker-grid.d.ts +1 -1
- package/date-picker/date-picker-label/date-picker-label.d.ts +1 -1
- package/date-picker/date-picker-next-month/date-picker-next-month.d.ts +0 -4
- package/date-picker/date-picker-previous-month/date-picker-previous-month.d.ts +0 -4
- package/date-picker/date-range-picker/date-range-picker-state.d.ts +19 -0
- package/date-picker/date-range-picker/date-range-picker.d.ts +132 -0
- package/date-picker/index.d.ts +2 -1
- package/fesm2022/ng-primitives-accordion.mjs +25 -20
- package/fesm2022/ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/ng-primitives-date-picker.mjs +346 -49
- package/fesm2022/ng-primitives-date-picker.mjs.map +1 -1
- package/fesm2022/ng-primitives-menu.mjs +2 -1
- package/fesm2022/ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-popover.mjs +2 -1
- package/fesm2022/ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/ng-primitives-portal.mjs +4 -4
- package/fesm2022/ng-primitives-portal.mjs.map +1 -1
- package/fesm2022/ng-primitives-toast.mjs +19 -17
- package/fesm2022/ng-primitives-toast.mjs.map +1 -1
- package/fesm2022/ng-primitives-tooltip.mjs +3 -2
- package/fesm2022/ng-primitives-tooltip.mjs.map +1 -1
- package/package.json +5 -5
- package/schematics/ng-generate/templates/date-picker/date-picker.__fileSuffix@dasherize__.ts.template +5 -3
- package/toast/config/toast-config.d.ts +5 -1
- package/toast/toast/toast-manager.d.ts +1 -2
- package/toast/toast/toast-options.d.ts +2 -2
- package/toast/toast/toast.d.ts +2 -1
- package/tooltip/tooltip-trigger/tooltip-trigger-state.d.ts +1 -3
- package/tooltip/tooltip-trigger/tooltip-trigger.d.ts +1 -1
- package/date-picker/date-picker/date-picker-token.d.ts +0 -11
|
@@ -20,15 +20,8 @@ export declare class NgpAccordionContent<T> {
|
|
|
20
20
|
* The id of the content region
|
|
21
21
|
*/
|
|
22
22
|
readonly id: import("@angular/core").InputSignal<string>;
|
|
23
|
-
/**
|
|
24
|
-
* The content width
|
|
25
|
-
*/
|
|
26
|
-
readonly width: import("@angular/core").WritableSignal<number>;
|
|
27
|
-
/**
|
|
28
|
-
* The content height
|
|
29
|
-
*/
|
|
30
|
-
readonly height: import("@angular/core").WritableSignal<number>;
|
|
31
23
|
constructor();
|
|
24
|
+
private updateDimensions;
|
|
32
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgpAccordionContent<any>, never>;
|
|
33
26
|
static ɵdir: i0.ɵɵDirectiveDeclaration<NgpAccordionContent<any>, "[ngpAccordionContent]", ["ngpAccordionContent"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
34
27
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { InjectOptions } from '@angular/core';
|
|
1
2
|
import { InjectedState } from 'ng-primitives/state';
|
|
3
|
+
import { NgpDateRangePicker } from '../date-range-picker/date-range-picker';
|
|
2
4
|
import type { NgpDatePicker } from './date-picker';
|
|
3
5
|
export declare const NgpDatePickerStateToken: import("@angular/core").InjectionToken<NgpDatePicker<unknown>>;
|
|
4
6
|
export declare const provideDatePickerState: (options?: import("ng-primitives/state").CreateStateProviderOptions) => import("@angular/core").FactoryProvider;
|
|
5
|
-
export declare const injectDatePickerState: <T>() => InjectedState<NgpDatePicker<T>>;
|
|
7
|
+
export declare const injectDatePickerState: <T>(injectOptions?: InjectOptions) => InjectedState<NgpDatePicker<T>>;
|
|
6
8
|
export declare const datePickerState: <U>(state: U) => import("ng-primitives/state").CreatedState<U>;
|
|
9
|
+
export declare function injectDateControllerState<T>(): InjectedState<NgpDatePicker<T> | NgpDateRangePicker<T>>;
|
|
@@ -77,6 +77,40 @@ export declare class NgpDatePicker<T> {
|
|
|
77
77
|
* @internal
|
|
78
78
|
*/
|
|
79
79
|
unregisterButton(button: NgpDatePickerDateButton<T>): void;
|
|
80
|
+
/**
|
|
81
|
+
* Select a date.
|
|
82
|
+
* @param date The date to select.
|
|
83
|
+
* @internal
|
|
84
|
+
*/
|
|
85
|
+
select(date: T): void;
|
|
86
|
+
/**
|
|
87
|
+
* Determine if a date is selected.
|
|
88
|
+
* @param date The date to check.
|
|
89
|
+
* @returns True if the date is selected, false otherwise.
|
|
90
|
+
* @internal
|
|
91
|
+
*/
|
|
92
|
+
isSelected(date: T): boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Determine if a date is the start of a range. In a date picker, this is always false.
|
|
95
|
+
* @param date The date to check.
|
|
96
|
+
* @returns Always false.
|
|
97
|
+
* @internal
|
|
98
|
+
*/
|
|
99
|
+
isStartOfRange(_: T): boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Determine if a date is the end of a range. In a date picker, this is always false.
|
|
102
|
+
* @param date The date to check.
|
|
103
|
+
* @returns Always false.
|
|
104
|
+
* @internal
|
|
105
|
+
*/
|
|
106
|
+
isEndOfRange(_: T): boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Determine if a date is between the start and end dates. In a date picker, this is always false.
|
|
109
|
+
* @param date The date to check.
|
|
110
|
+
* @returns True if the date is between the start and end dates, false otherwise.
|
|
111
|
+
* @internal
|
|
112
|
+
*/
|
|
113
|
+
isBetweenRange(_: T): boolean;
|
|
80
114
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgpDatePicker<any>, never>;
|
|
81
115
|
static ɵdir: i0.ɵɵDirectiveDeclaration<NgpDatePicker<any>, "[ngpDatePicker]", ["ngpDatePicker"], { "min": { "alias": "ngpDatePickerMin"; "required": false; "isSignal": true; }; "max": { "alias": "ngpDatePickerMax"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpDatePickerDisabled"; "required": false; "isSignal": true; }; "dateDisabled": { "alias": "ngpDatePickerDateDisabled"; "required": false; "isSignal": true; }; "date": { "alias": "ngpDatePickerDate"; "required": false; "isSignal": true; }; "focusedDate": { "alias": "ngpDatePickerFocusedDate"; "required": false; "isSignal": true; }; }, { "dateChange": "ngpDatePickerDateChange"; "focusedDateChange": "ngpDatePickerFocusedDateChange"; }, ["label"], never, true, never>;
|
|
82
116
|
}
|
|
@@ -12,10 +12,6 @@ export declare class NgpDatePickerDateButton<T> implements OnDestroy {
|
|
|
12
12
|
* Access the focus monitor.
|
|
13
13
|
*/
|
|
14
14
|
private readonly focusMonitor;
|
|
15
|
-
/**
|
|
16
|
-
* Access the date picker.
|
|
17
|
-
*/
|
|
18
|
-
private readonly datePicker;
|
|
19
15
|
/**
|
|
20
16
|
* Access the date picker state.
|
|
21
17
|
*/
|
|
@@ -34,9 +30,20 @@ export declare class NgpDatePickerDateButton<T> implements OnDestroy {
|
|
|
34
30
|
protected readonly focused: import("@angular/core").Signal<boolean>;
|
|
35
31
|
/**
|
|
36
32
|
* Determine if this is the selected date.
|
|
37
|
-
* @internal
|
|
38
33
|
*/
|
|
39
|
-
readonly selected: import("@angular/core").Signal<boolean
|
|
34
|
+
protected readonly selected: import("@angular/core").Signal<boolean>;
|
|
35
|
+
/**
|
|
36
|
+
* Determine if this is the start date of the range.
|
|
37
|
+
*/
|
|
38
|
+
protected readonly start: import("@angular/core").Signal<boolean>;
|
|
39
|
+
/**
|
|
40
|
+
* Determine if this is the end date of the range.
|
|
41
|
+
*/
|
|
42
|
+
protected readonly end: import("@angular/core").Signal<boolean>;
|
|
43
|
+
/**
|
|
44
|
+
* Determine if this is between the start and end dates of the range.
|
|
45
|
+
*/
|
|
46
|
+
protected readonly betweenRange: import("@angular/core").Signal<boolean>;
|
|
40
47
|
/**
|
|
41
48
|
* Determine if this date is outside the current month.
|
|
42
49
|
*/
|
|
@@ -6,7 +6,7 @@ export declare class NgpDatePickerGrid<T> {
|
|
|
6
6
|
/**
|
|
7
7
|
* Access the date picker state.
|
|
8
8
|
*/
|
|
9
|
-
protected readonly state: import("ng-primitives/state").InjectedState<import("ng-primitives/date-picker").NgpDatePicker<T>>;
|
|
9
|
+
protected readonly state: import("ng-primitives/state").InjectedState<import("ng-primitives/date-picker").NgpDatePicker<T> | import("ng-primitives/date-picker").NgpDateRangePicker<T>>;
|
|
10
10
|
/**
|
|
11
11
|
* Determine the id for the label.
|
|
12
12
|
*/
|
|
@@ -6,7 +6,7 @@ export declare class NgpDatePickerLabel<T> {
|
|
|
6
6
|
/**
|
|
7
7
|
* Access the date picker.
|
|
8
8
|
*/
|
|
9
|
-
protected readonly state: import("ng-primitives/state").InjectedState<import("ng-primitives/date-picker").NgpDatePicker<T>>;
|
|
9
|
+
protected readonly state: import("ng-primitives/state").InjectedState<import("ng-primitives/date-picker").NgpDatePicker<T> | import("ng-primitives/date-picker").NgpDateRangePicker<T>>;
|
|
10
10
|
/**
|
|
11
11
|
* Define a unique id for the label.
|
|
12
12
|
*/
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { InjectOptions } from '@angular/core';
|
|
2
|
+
import { InjectedState } from 'ng-primitives/state';
|
|
3
|
+
import type { NgpDateRangePicker } from './date-range-picker';
|
|
4
|
+
/**
|
|
5
|
+
* The state token for the DateRangePicker primitive.
|
|
6
|
+
*/
|
|
7
|
+
export declare const NgpDateRangePickerStateToken: import("@angular/core").InjectionToken<NgpDateRangePicker<unknown>>;
|
|
8
|
+
/**
|
|
9
|
+
* Provides the DateRangePicker state.
|
|
10
|
+
*/
|
|
11
|
+
export declare const provideDateRangePickerState: (options?: import("ng-primitives/state").CreateStateProviderOptions) => import("@angular/core").FactoryProvider;
|
|
12
|
+
/**
|
|
13
|
+
* Injects the DateRangePicker state.
|
|
14
|
+
*/
|
|
15
|
+
export declare const injectDateRangePickerState: <T>(injectOptions?: InjectOptions) => InjectedState<NgpDateRangePicker<T>>;
|
|
16
|
+
/**
|
|
17
|
+
* The DateRangePicker state registration function.
|
|
18
|
+
*/
|
|
19
|
+
export declare const dateRangePickerState: <U>(state: U) => import("ng-primitives/state").CreatedState<U>;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { FocusOrigin } from '@angular/cdk/a11y';
|
|
2
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
3
|
+
import { NgpDatePickerDateButton } from '../date-picker-date-button/date-picker-date-button';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class NgpDateRangePicker<T> {
|
|
6
|
+
private readonly dateAdapter;
|
|
7
|
+
/**
|
|
8
|
+
* Access the injector.
|
|
9
|
+
*/
|
|
10
|
+
private readonly injector;
|
|
11
|
+
/**
|
|
12
|
+
* The minimum date that can be selected.
|
|
13
|
+
*/
|
|
14
|
+
readonly min: import("@angular/core").InputSignal<T | undefined>;
|
|
15
|
+
/**
|
|
16
|
+
* The maximum date that can be selected.
|
|
17
|
+
*/
|
|
18
|
+
readonly max: import("@angular/core").InputSignal<T | undefined>;
|
|
19
|
+
/**
|
|
20
|
+
* Determine if the date picker is disabled.
|
|
21
|
+
*/
|
|
22
|
+
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
|
|
23
|
+
/**
|
|
24
|
+
* A function that is called to determine if a specific date should be disabled.
|
|
25
|
+
*/
|
|
26
|
+
readonly dateDisabled: import("@angular/core").InputSignal<(date: T) => boolean>;
|
|
27
|
+
/**
|
|
28
|
+
* The selected start date
|
|
29
|
+
*/
|
|
30
|
+
readonly startDate: import("@angular/core").InputSignal<T | undefined>;
|
|
31
|
+
/**
|
|
32
|
+
* Emit when the date changes.
|
|
33
|
+
*/
|
|
34
|
+
readonly startDateChange: import("@angular/core").OutputEmitterRef<T | undefined>;
|
|
35
|
+
/**
|
|
36
|
+
* The selected end date
|
|
37
|
+
*/
|
|
38
|
+
readonly endDate: import("@angular/core").InputSignal<T | undefined>;
|
|
39
|
+
/**
|
|
40
|
+
* Emit when the end date changes.
|
|
41
|
+
*/
|
|
42
|
+
readonly endDateChange: import("@angular/core").OutputEmitterRef<T | undefined>;
|
|
43
|
+
/**
|
|
44
|
+
* The focused value.
|
|
45
|
+
*/
|
|
46
|
+
readonly focusedDate: import("@angular/core").InputSignal<T>;
|
|
47
|
+
/**
|
|
48
|
+
* Emit when the focused date changes.
|
|
49
|
+
*/
|
|
50
|
+
readonly focusedDateChange: import("@angular/core").OutputEmitterRef<T>;
|
|
51
|
+
/**
|
|
52
|
+
* Detect the label element.
|
|
53
|
+
* @internal
|
|
54
|
+
*/
|
|
55
|
+
readonly label: import("@angular/core").Signal<import("ng-primitives/date-picker").NgpDatePickerLabel<unknown> | undefined>;
|
|
56
|
+
/**
|
|
57
|
+
* Access all the date picker buttons
|
|
58
|
+
*/
|
|
59
|
+
private readonly buttons;
|
|
60
|
+
/**
|
|
61
|
+
* The date range picker state.
|
|
62
|
+
*/
|
|
63
|
+
private readonly state;
|
|
64
|
+
/**
|
|
65
|
+
* Set the focused date.
|
|
66
|
+
* @param date The date to focus.
|
|
67
|
+
* @internal
|
|
68
|
+
*/
|
|
69
|
+
setFocusedDate(date: T, origin: FocusOrigin | undefined, direction: 'forward' | 'backward'): void;
|
|
70
|
+
/**
|
|
71
|
+
* Register a date button.
|
|
72
|
+
* @param button The date button to register.
|
|
73
|
+
* @internal
|
|
74
|
+
*/
|
|
75
|
+
registerButton(button: NgpDatePickerDateButton<T>): void;
|
|
76
|
+
/**
|
|
77
|
+
* Unregister a date button.
|
|
78
|
+
* @param button The date button to unregister.
|
|
79
|
+
* @internal
|
|
80
|
+
*/
|
|
81
|
+
unregisterButton(button: NgpDatePickerDateButton<T>): void;
|
|
82
|
+
/**
|
|
83
|
+
* Select a date.
|
|
84
|
+
* @param date The date to select.
|
|
85
|
+
* @internal
|
|
86
|
+
*/
|
|
87
|
+
/**
|
|
88
|
+
* Handles the selection of a date within the date range picker.
|
|
89
|
+
*
|
|
90
|
+
* Selection logic:
|
|
91
|
+
* - If neither a start date nor an end date is selected:
|
|
92
|
+
* - Sets the selected date as the start date.
|
|
93
|
+
* - If a start date is selected but no end date:
|
|
94
|
+
* - If the selected date is after the start date, sets it as the end date.
|
|
95
|
+
* - If the selected date is before or equal to the start date, resets the start date to the selected date.
|
|
96
|
+
* - If both start and end dates are already selected:
|
|
97
|
+
* - Resets the selection, setting the selected date as the new start date and clearing the end date.
|
|
98
|
+
*
|
|
99
|
+
* @param date The date to select.
|
|
100
|
+
*/
|
|
101
|
+
select(date: T): void;
|
|
102
|
+
/**
|
|
103
|
+
* Determine if a date is selected. A date is selected if it is either the start date or the end date.
|
|
104
|
+
* @param date The date to check.
|
|
105
|
+
* @returns True if the date is selected, false otherwise.
|
|
106
|
+
* @internal
|
|
107
|
+
*/
|
|
108
|
+
isSelected(date: T): boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Determine if a date is the start of a range.
|
|
111
|
+
* @param date The date to check.
|
|
112
|
+
* @returns Always false.
|
|
113
|
+
* @internal
|
|
114
|
+
*/
|
|
115
|
+
isStartOfRange(date: T): boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Determine if a date is the end of a range.
|
|
118
|
+
* @param date The date to check.
|
|
119
|
+
* @returns Always false.
|
|
120
|
+
* @internal
|
|
121
|
+
*/
|
|
122
|
+
isEndOfRange(date: T): boolean;
|
|
123
|
+
/**
|
|
124
|
+
* Determine if a date is between the start and end dates.
|
|
125
|
+
* @param date The date to check.
|
|
126
|
+
* @returns True if the date is between the start and end dates, false otherwise.
|
|
127
|
+
* @internal
|
|
128
|
+
*/
|
|
129
|
+
isBetweenRange(date: T): boolean;
|
|
130
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgpDateRangePicker<any>, never>;
|
|
131
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgpDateRangePicker<any>, "[ngpDateRangePicker]", ["ngpDateRangePicker"], { "min": { "alias": "ngpDateRangePickerMin"; "required": false; "isSignal": true; }; "max": { "alias": "ngpDateRangePickerMax"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpDateRangePickerDisabled"; "required": false; "isSignal": true; }; "dateDisabled": { "alias": "ngpDateRangePickerDateDisabled"; "required": false; "isSignal": true; }; "startDate": { "alias": "ngpDateRangePickerStartDate"; "required": false; "isSignal": true; }; "endDate": { "alias": "ngpDateRangePickerEndDate"; "required": false; "isSignal": true; }; "focusedDate": { "alias": "ngpDateRangePickerFocusedDate"; "required": false; "isSignal": true; }; }, { "startDateChange": "ngpDateRangePickerStartDateChange"; "endDateChange": "ngpDateRangePickerEndDateChange"; "focusedDateChange": "ngpDateRangePickerFocusedDateChange"; }, ["label"], never, true, never>;
|
|
132
|
+
}
|
package/date-picker/index.d.ts
CHANGED
|
@@ -12,4 +12,5 @@ export { NgpDatePickerRowRender } from './date-picker-row-render/date-picker-row
|
|
|
12
12
|
export { injectDatePickerRowRender, injectDatePickerWeek, NgpDatePickerRowRenderToken, } from './date-picker-row-render/date-picker-row-render-token';
|
|
13
13
|
export { NgpDatePicker } from './date-picker/date-picker';
|
|
14
14
|
export { injectDatePickerState, provideDatePickerState } from './date-picker/date-picker-state';
|
|
15
|
-
export {
|
|
15
|
+
export { NgpDateRangePicker } from './date-range-picker/date-range-picker';
|
|
16
|
+
export { provideDateRangePickerState, injectDateRangePickerState, } from './date-range-picker/date-range-picker-state';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input,
|
|
3
|
-
import { injectElementRef } from 'ng-primitives/internal';
|
|
4
|
-
import { uniqueId } from 'ng-primitives/utils';
|
|
2
|
+
import { input, afterRenderEffect, computed, Directive, booleanAttribute, signal, inject, HOST_TAG_NAME, HostListener, InjectionToken, output } from '@angular/core';
|
|
3
|
+
import { injectElementRef, fromMutationObserver } from 'ng-primitives/internal';
|
|
4
|
+
import { uniqueId, safeTakeUntilDestroyed } from 'ng-primitives/utils';
|
|
5
|
+
import { debounceTime } from 'rxjs';
|
|
5
6
|
import { createStateToken, createStateProvider, createStateInjector, createState } from 'ng-primitives/state';
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -59,24 +60,30 @@ class NgpAccordionContent {
|
|
|
59
60
|
* The id of the content region
|
|
60
61
|
*/
|
|
61
62
|
this.id = input(uniqueId('ngp-accordion-content'));
|
|
62
|
-
/**
|
|
63
|
-
* The content width
|
|
64
|
-
*/
|
|
65
|
-
this.width = signal(0);
|
|
66
|
-
/**
|
|
67
|
-
* The content height
|
|
68
|
-
*/
|
|
69
|
-
this.height = signal(0);
|
|
70
63
|
this.accordionItem().content.set(this);
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
64
|
+
// any time the open state of the accordion item changes, update the dimensions
|
|
65
|
+
afterRenderEffect(() => this.updateDimensions());
|
|
66
|
+
// update dimensions when the content changes
|
|
67
|
+
fromMutationObserver(this.elementRef.nativeElement, {
|
|
68
|
+
childList: true,
|
|
69
|
+
subtree: true,
|
|
70
|
+
disabled: computed(() => !this.accordionItem().open()),
|
|
71
|
+
})
|
|
72
|
+
.pipe(debounceTime(0), safeTakeUntilDestroyed())
|
|
73
|
+
.subscribe(() => this.updateDimensions());
|
|
74
|
+
}
|
|
75
|
+
updateDimensions() {
|
|
76
|
+
if (this.accordionItem().open()) {
|
|
77
|
+
// remove the inline styles to reset them
|
|
78
|
+
this.elementRef.nativeElement.style.removeProperty('--ngp-accordion-content-width');
|
|
79
|
+
this.elementRef.nativeElement.style.removeProperty('--ngp-accordion-content-height');
|
|
80
|
+
// set the dimensions based on the content
|
|
81
|
+
this.elementRef.nativeElement.style.setProperty('--ngp-accordion-content-width', `${this.elementRef.nativeElement.scrollWidth}px`);
|
|
82
|
+
this.elementRef.nativeElement.style.setProperty('--ngp-accordion-content-height', `${this.elementRef.nativeElement.scrollHeight}px`);
|
|
83
|
+
}
|
|
77
84
|
}
|
|
78
85
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpAccordionContent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
79
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.11", type: NgpAccordionContent, isStandalone: true, selector: "[ngpAccordionContent]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "region" }, properties: { "id": "id()", "attr.data-orientation": "accordion().orientation()", "attr.data-open": "accordionItem().open() ? \"\" : null", "attr.data-closed": "accordionItem().open() ? null : \"\"", "attr.aria-labelledby": "accordionItem().triggerId()"
|
|
86
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.11", type: NgpAccordionContent, isStandalone: true, selector: "[ngpAccordionContent]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "region" }, properties: { "id": "id()", "attr.data-orientation": "accordion().orientation()", "attr.data-open": "accordionItem().open() ? \"\" : null", "attr.data-closed": "accordionItem().open() ? null : \"\"", "attr.aria-labelledby": "accordionItem().triggerId()" } }, exportAs: ["ngpAccordionContent"], ngImport: i0 }); }
|
|
80
87
|
}
|
|
81
88
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpAccordionContent, decorators: [{
|
|
82
89
|
type: Directive,
|
|
@@ -90,8 +97,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
|
|
|
90
97
|
'[attr.data-open]': 'accordionItem().open() ? "" : null',
|
|
91
98
|
'[attr.data-closed]': 'accordionItem().open() ? null : ""',
|
|
92
99
|
'[attr.aria-labelledby]': 'accordionItem().triggerId()',
|
|
93
|
-
'[style.--ngp-accordion-content-width.px]': 'width()',
|
|
94
|
-
'[style.--ngp-accordion-content-height.px]': 'height()',
|
|
95
100
|
},
|
|
96
101
|
}]
|
|
97
102
|
}], ctorParameters: () => [] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-primitives-accordion.mjs","sources":["../../../../packages/ng-primitives/accordion/src/accordion-item/accordion-item-state.ts","../../../../packages/ng-primitives/accordion/src/accordion/accordion-state.ts","../../../../packages/ng-primitives/accordion/src/accordion-content/accordion-content.ts","../../../../packages/ng-primitives/accordion/src/accordion-item/accordion-item.ts","../../../../packages/ng-primitives/accordion/src/accordion-trigger/accordion-trigger.ts","../../../../packages/ng-primitives/accordion/src/config/accordion-config.ts","../../../../packages/ng-primitives/accordion/src/accordion/accordion.ts","../../../../packages/ng-primitives/accordion/src/ng-primitives-accordion.ts"],"sourcesContent":["import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpAccordionItem } from './accordion-item';\n\n/**\n * The state token for the AccordionItem primitive.\n */\nexport const NgpAccordionItemStateToken =\n createStateToken<NgpAccordionItem<unknown>>('AccordionItem');\n\n/**\n * Provides the AccordionItem state.\n */\nexport const provideAccordionItemState = createStateProvider(NgpAccordionItemStateToken);\n\n/**\n * Injects the AccordionItem state.\n */\nexport const injectAccordionItemState = createStateInjector<NgpAccordionItem<unknown>>(\n NgpAccordionItemStateToken,\n);\n\n/**\n * The AccordionItem state registration function.\n */\nexport const accordionItemState = createState(NgpAccordionItemStateToken);\n","import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpAccordion } from './accordion';\n\n/**\n * The state token for the Accordion primitive.\n */\nexport const NgpAccordionStateToken = createStateToken<NgpAccordion<unknown>>('Accordion');\n\n/**\n * Provides the Accordion state.\n */\nexport const provideAccordionState = createStateProvider(NgpAccordionStateToken);\n\n/**\n * Injects the Accordion state.\n */\nexport const injectAccordionState =\n createStateInjector<NgpAccordion<unknown>>(NgpAccordionStateToken);\n\n/**\n * The Accordion state registration function.\n */\nexport const accordionState = createState(NgpAccordionStateToken);\n","import { afterRenderEffect, Directive, input, signal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectAccordionItemState } from '../accordion-item/accordion-item-state';\nimport type { NgpAccordion } from '../accordion/accordion';\nimport { injectAccordionState } from '../accordion/accordion-state';\n\n/**\n * Apply the `ngpAccordionContent` directive to an element that represents the content of an accordion item.\n */\n@Directive({\n selector: '[ngpAccordionContent]',\n exportAs: 'ngpAccordionContent',\n host: {\n role: 'region',\n '[id]': 'id()',\n '[attr.data-orientation]': 'accordion().orientation()',\n '[attr.data-open]': 'accordionItem().open() ? \"\" : null',\n '[attr.data-closed]': 'accordionItem().open() ? null : \"\"',\n '[attr.aria-labelledby]': 'accordionItem().triggerId()',\n '[style.--ngp-accordion-content-width.px]': 'width()',\n '[style.--ngp-accordion-content-height.px]': 'height()',\n },\n})\nexport class NgpAccordionContent<T> {\n /**\n * Access the accordion content element reference\n */\n private readonly elementRef = injectElementRef();\n\n /**\n * Access the accordion\n */\n protected readonly accordion = injectAccordionState<NgpAccordion<T>>();\n\n /**\n * Access the accordion item\n */\n protected readonly accordionItem = injectAccordionItemState();\n\n /**\n * The id of the content region\n */\n readonly id = input<string>(uniqueId('ngp-accordion-content'));\n\n /**\n * The content width\n */\n readonly width = signal<number>(0);\n\n /**\n * The content height\n */\n readonly height = signal<number>(0);\n\n constructor() {\n this.accordionItem().content.set(this);\n\n afterRenderEffect(() => {\n if (this.accordionItem().open()) {\n this.width.set(this.elementRef.nativeElement.scrollWidth);\n this.height.set(this.elementRef.nativeElement.scrollHeight);\n }\n });\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, booleanAttribute, computed, input, signal } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { NgpAccordionContent } from '../accordion-content/accordion-content';\nimport { NgpAccordionTrigger } from '../accordion-trigger/accordion-trigger';\nimport { NgpAccordion } from '../accordion/accordion';\nimport { injectAccordionState } from '../accordion/accordion-state';\nimport { accordionItemState, provideAccordionItemState } from './accordion-item-state';\n\n/**\n * Apply the `ngpAccordionItem` directive to an element that represents an accordion item.\n */\n@Directive({\n selector: '[ngpAccordionItem]',\n exportAs: 'ngpAccordionItem',\n providers: [provideAccordionItemState()],\n host: {\n '[attr.data-orientation]': 'accordion().orientation()',\n '[attr.data-open]': 'state.open() ? \"\" : null',\n '[attr.data-disabled]': 'state.disabled() || accordion().disabled() ? \"\" : null',\n },\n})\nexport class NgpAccordionItem<T> {\n /**\n * Access the accordion.\n */\n protected readonly accordion = injectAccordionState<NgpAccordion<T>>();\n\n /**\n * The value of the accordion item.\n */\n readonly value = input<T>(uniqueId('ngp-accordion-item') as T, {\n alias: 'ngpAccordionItemValue',\n });\n\n /**\n * Whether the accordion item is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpAccordionItemDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Access the accordion trigger\n * @internal\n */\n readonly trigger = signal<NgpAccordionTrigger<T> | undefined>(undefined);\n\n /**\n * Access the accordion content\n * @internal\n */\n readonly content = signal<NgpAccordionContent<T> | undefined>(undefined);\n\n /**\n * Whether the accordion item is expanded.\n */\n readonly open = computed<boolean>(() => this.accordion().isOpen(this.state.value()!));\n\n /**\n * The trigger id.\n */\n readonly triggerId = computed(() => this.trigger()?.id());\n\n /**\n * The content id.\n */\n readonly contentId = computed(() => this.content()?.id());\n\n /**\n * The accordion item state.\n */\n private readonly state = accordionItemState<NgpAccordionItem<T>>(this);\n}\n","import { Directive, HOST_TAG_NAME, HostListener, inject, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { NgpAccordionItem } from '../accordion-item/accordion-item';\nimport { injectAccordionItemState } from '../accordion-item/accordion-item-state';\nimport { NgpAccordion } from '../accordion/accordion';\nimport { injectAccordionState } from '../accordion/accordion-state';\n\n/**\n * Apply the `ngpAccordionTrigger` directive to an element that represents the trigger for an accordion item, such as a button.\n */\n@Directive({\n selector: '[ngpAccordionTrigger]',\n exportAs: 'ngpAccordionTrigger',\n host: {\n '[id]': 'id()',\n '[attr.type]': 'tagName === \"button\" ? \"button\" : null',\n '[attr.data-orientation]': 'accordion().orientation()',\n '[attr.data-open]': 'accordionItem().open() ? \"\" : null',\n '[attr.data-disabled]': 'accordionItem().disabled() || accordion().disabled() ? \"\" : null',\n '[attr.aria-controls]': 'accordionItem().contentId()',\n '[attr.aria-expanded]': 'accordionItem().open()',\n },\n})\nexport class NgpAccordionTrigger<T> {\n /**\n * The tag name of the element.\n */\n protected readonly tagName = inject(HOST_TAG_NAME);\n\n /**\n * Access the parent accordion.\n */\n protected readonly accordion = injectAccordionState<NgpAccordion<T>>();\n\n /**\n * The item instance.\n */\n protected readonly accordionItem = injectAccordionItemState<NgpAccordionItem<T>>();\n\n /**\n * The id of the trigger.\n */\n readonly id = input<string>(uniqueId('ngp-accordion-trigger'));\n\n constructor() {\n this.accordionItem().trigger.set(this);\n }\n\n /**\n * Toggle the accordion item.\n */\n @HostListener('click')\n toggle(): void {\n if (this.accordionItem().disabled() || this.accordion().disabled()) {\n return;\n }\n\n this.accordion().toggle(this.accordionItem().value()!);\n }\n}\n","import { InjectionToken, Provider, inject } from '@angular/core';\nimport { NgpAccordionType } from '../accordion/accordion';\n\nexport interface NgpAccordionConfig {\n /**\n * The default type of the accordion\n * @default 'single'\n */\n type: NgpAccordionType;\n /**\n * Whether the accordion is collapsible\n * @default false\n */\n collapsible: boolean;\n /**\n * The default orientation of the accordion\n * @default 'vertical'\n */\n orientation: 'vertical' | 'horizontal';\n}\n\nexport const defaultAccordionConfig: NgpAccordionConfig = {\n type: 'single',\n collapsible: false,\n orientation: 'vertical',\n};\n\nexport const NgpAccordionConfigToken = new InjectionToken<NgpAccordionConfig>(\n 'NgpAccordionConfigToken',\n);\n\n/**\n * Provide the default Accordion configuration\n * @param config The Accordion configuration\n * @returns The provider\n */\nexport function provideAccordionConfig(config: Partial<NgpAccordionConfig>): Provider[] {\n return [\n {\n provide: NgpAccordionConfigToken,\n useValue: { ...defaultAccordionConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Accordion configuration\n * @returns The global Accordion configuration\n */\nexport function injectAccordionConfig(): NgpAccordionConfig {\n return inject(NgpAccordionConfigToken, { optional: true }) ?? defaultAccordionConfig;\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, booleanAttribute, input, output } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { injectAccordionConfig } from '../config/accordion-config';\nimport { accordionState, provideAccordionState } from './accordion-state';\n\n/**\n * Apply the `ngpAccordion` directive to an element that represents the group of accordion items.\n */\n@Directive({\n selector: '[ngpAccordion]',\n exportAs: 'ngpAccordion',\n providers: [provideAccordionState()],\n host: {\n '[attr.data-orientation]': 'state.orientation()',\n '[attr.data-disabled]': 'state.disabled() ? \"\" : null',\n },\n})\nexport class NgpAccordion<T> {\n /**\n * Access the global accordion configuration.\n */\n private readonly config = injectAccordionConfig();\n\n /**\n * The type of the accordion.\n */\n readonly type = input<NgpAccordionType>(this.config.type, {\n alias: 'ngpAccordionType',\n });\n\n /**\n * Whether the accordion is collapsible.\n */\n readonly collapsible = input<boolean, BooleanInput>(this.config.collapsible, {\n alias: 'ngpAccordionCollapsible',\n transform: booleanAttribute,\n });\n\n /**\n * The value of the accordion.\n */\n readonly value = input<T | T[] | null>(null, {\n alias: 'ngpAccordionValue',\n });\n\n /**\n * Event emitted when the accordion value changes.\n */\n readonly valueChange = output<T | T[] | null>({\n alias: 'ngpAccordionValueChange',\n });\n\n /**\n * Whether the accordion is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpAccordionDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * The accordion orientation.\n */\n readonly orientation = input<NgpOrientation>(this.config.orientation, {\n alias: 'ngpAccordionOrientation',\n });\n\n /**\n * The accordion state.\n */\n private readonly state = accordionState<NgpAccordion<T>>(this);\n\n /**\n * @param value The value to check.\n * @returns Whether the value is open.\n * @internal\n */\n isOpen(value: T): boolean {\n if (this.state.type() === 'multiple') {\n return (this.state.value() as T[] | null)?.includes(value) ?? false;\n }\n\n return this.state.value() === value;\n }\n\n toggle(value: T): void {\n const isOpen = this.isOpen(value);\n\n // if we are in single mode and the value is already open and the accordion is not collapsible, do nothing\n if (this.state.type() === 'single' && isOpen && !this.state.collapsible()) {\n return;\n }\n\n // if we are in single mode then toggle the value\n if (this.state.type() === 'single') {\n const newValue = isOpen ? null : value;\n this.state.value.set(newValue);\n this.valueChange.emit(newValue);\n return;\n }\n\n // if we are in multiple mode then toggle the value\n let values = (this.state.value() as T[]) ?? [];\n\n if (isOpen) {\n values = values.filter(v => v !== value);\n } else {\n values = [...values, value];\n }\n this.state.value.set(values);\n this.valueChange.emit(values);\n }\n}\n\nexport type NgpAccordionType = 'single' | 'multiple';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAQA;;AAEG;AACI,MAAM,0BAA0B,GACrC,gBAAgB,CAA4B,eAAe,CAAC;AAE9D;;AAEG;MACU,yBAAyB,GAAG,mBAAmB,CAAC,0BAA0B;AAEvF;;AAEG;MACU,wBAAwB,GAAG,mBAAmB,CACzD,0BAA0B;AAG5B;;AAEG;AACI,MAAM,kBAAkB,GAAG,WAAW,CAAC,0BAA0B,CAAC;;ACrBzE;;AAEG;AACI,MAAM,sBAAsB,GAAG,gBAAgB,CAAwB,WAAW,CAAC;AAE1F;;AAEG;MACU,qBAAqB,GAAG,mBAAmB,CAAC,sBAAsB;AAE/E;;AAEG;MACU,oBAAoB,GAC/B,mBAAmB,CAAwB,sBAAsB;AAEnE;;AAEG;AACI,MAAM,cAAc,GAAG,WAAW,CAAC,sBAAsB,CAAC;;ACpBjE;;AAEG;MAeU,mBAAmB,CAAA;AA+B9B,IAAA,WAAA,GAAA;AA9BA;;AAEG;QACc,IAAA,CAAA,UAAU,GAAG,gBAAg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,EAAA,yBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,WAAA,EAAA,yBAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,uBAAA,EAAA,qBAAA,EAAA,oBAAA,EAAA,gCAAA,EAAA,EAAA,EAAA,SAAA,EANZ,CAAC,qBAAqB,EAAE,CAAC,EAAA,QAAA,EAAA,CAAA,cAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAMzB,YAAY,EAAA,UAAA,EAAA,CAAA;kBATxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,SAAS,EAAE,CAAC,qBAAqB,EAAE,CAAC;AACpC,oBAAA,IAAI,EAAE;AACJ,wBAAA,yBAAyB,EAAE,qBAAqB;AAChD,wBAAA,sBAAsB,EAAE,8BAA8B;AACvD,qBAAA;AACF,iBAAA;;;ACjBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-primitives-accordion.mjs","sources":["../../../../packages/ng-primitives/accordion/src/accordion-item/accordion-item-state.ts","../../../../packages/ng-primitives/accordion/src/accordion/accordion-state.ts","../../../../packages/ng-primitives/accordion/src/accordion-content/accordion-content.ts","../../../../packages/ng-primitives/accordion/src/accordion-item/accordion-item.ts","../../../../packages/ng-primitives/accordion/src/accordion-trigger/accordion-trigger.ts","../../../../packages/ng-primitives/accordion/src/config/accordion-config.ts","../../../../packages/ng-primitives/accordion/src/accordion/accordion.ts","../../../../packages/ng-primitives/accordion/src/ng-primitives-accordion.ts"],"sourcesContent":["import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpAccordionItem } from './accordion-item';\n\n/**\n * The state token for the AccordionItem primitive.\n */\nexport const NgpAccordionItemStateToken =\n createStateToken<NgpAccordionItem<unknown>>('AccordionItem');\n\n/**\n * Provides the AccordionItem state.\n */\nexport const provideAccordionItemState = createStateProvider(NgpAccordionItemStateToken);\n\n/**\n * Injects the AccordionItem state.\n */\nexport const injectAccordionItemState = createStateInjector<NgpAccordionItem<unknown>>(\n NgpAccordionItemStateToken,\n);\n\n/**\n * The AccordionItem state registration function.\n */\nexport const accordionItemState = createState(NgpAccordionItemStateToken);\n","import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpAccordion } from './accordion';\n\n/**\n * The state token for the Accordion primitive.\n */\nexport const NgpAccordionStateToken = createStateToken<NgpAccordion<unknown>>('Accordion');\n\n/**\n * Provides the Accordion state.\n */\nexport const provideAccordionState = createStateProvider(NgpAccordionStateToken);\n\n/**\n * Injects the Accordion state.\n */\nexport const injectAccordionState =\n createStateInjector<NgpAccordion<unknown>>(NgpAccordionStateToken);\n\n/**\n * The Accordion state registration function.\n */\nexport const accordionState = createState(NgpAccordionStateToken);\n","import { afterRenderEffect, computed, Directive, input } from '@angular/core';\nimport { fromMutationObserver, injectElementRef } from 'ng-primitives/internal';\nimport { safeTakeUntilDestroyed, uniqueId } from 'ng-primitives/utils';\nimport { debounceTime } from 'rxjs';\nimport { injectAccordionItemState } from '../accordion-item/accordion-item-state';\nimport type { NgpAccordion } from '../accordion/accordion';\nimport { injectAccordionState } from '../accordion/accordion-state';\n\n/**\n * Apply the `ngpAccordionContent` directive to an element that represents the content of an accordion item.\n */\n@Directive({\n selector: '[ngpAccordionContent]',\n exportAs: 'ngpAccordionContent',\n host: {\n role: 'region',\n '[id]': 'id()',\n '[attr.data-orientation]': 'accordion().orientation()',\n '[attr.data-open]': 'accordionItem().open() ? \"\" : null',\n '[attr.data-closed]': 'accordionItem().open() ? null : \"\"',\n '[attr.aria-labelledby]': 'accordionItem().triggerId()',\n },\n})\nexport class NgpAccordionContent<T> {\n /**\n * Access the accordion content element reference\n */\n private readonly elementRef = injectElementRef();\n\n /**\n * Access the accordion\n */\n protected readonly accordion = injectAccordionState<NgpAccordion<T>>();\n\n /**\n * Access the accordion item\n */\n protected readonly accordionItem = injectAccordionItemState();\n\n /**\n * The id of the content region\n */\n readonly id = input<string>(uniqueId('ngp-accordion-content'));\n\n constructor() {\n this.accordionItem().content.set(this);\n\n // any time the open state of the accordion item changes, update the dimensions\n afterRenderEffect(() => this.updateDimensions());\n\n // update dimensions when the content changes\n fromMutationObserver(this.elementRef.nativeElement, {\n childList: true,\n subtree: true,\n disabled: computed(() => !this.accordionItem().open()),\n })\n .pipe(debounceTime(0), safeTakeUntilDestroyed())\n .subscribe(() => this.updateDimensions());\n }\n\n private updateDimensions(): void {\n if (this.accordionItem().open()) {\n // remove the inline styles to reset them\n this.elementRef.nativeElement.style.removeProperty('--ngp-accordion-content-width');\n this.elementRef.nativeElement.style.removeProperty('--ngp-accordion-content-height');\n // set the dimensions based on the content\n this.elementRef.nativeElement.style.setProperty(\n '--ngp-accordion-content-width',\n `${this.elementRef.nativeElement.scrollWidth}px`,\n );\n this.elementRef.nativeElement.style.setProperty(\n '--ngp-accordion-content-height',\n `${this.elementRef.nativeElement.scrollHeight}px`,\n );\n }\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, booleanAttribute, computed, input, signal } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { NgpAccordionContent } from '../accordion-content/accordion-content';\nimport { NgpAccordionTrigger } from '../accordion-trigger/accordion-trigger';\nimport { NgpAccordion } from '../accordion/accordion';\nimport { injectAccordionState } from '../accordion/accordion-state';\nimport { accordionItemState, provideAccordionItemState } from './accordion-item-state';\n\n/**\n * Apply the `ngpAccordionItem` directive to an element that represents an accordion item.\n */\n@Directive({\n selector: '[ngpAccordionItem]',\n exportAs: 'ngpAccordionItem',\n providers: [provideAccordionItemState()],\n host: {\n '[attr.data-orientation]': 'accordion().orientation()',\n '[attr.data-open]': 'state.open() ? \"\" : null',\n '[attr.data-disabled]': 'state.disabled() || accordion().disabled() ? \"\" : null',\n },\n})\nexport class NgpAccordionItem<T> {\n /**\n * Access the accordion.\n */\n protected readonly accordion = injectAccordionState<NgpAccordion<T>>();\n\n /**\n * The value of the accordion item.\n */\n readonly value = input<T>(uniqueId('ngp-accordion-item') as T, {\n alias: 'ngpAccordionItemValue',\n });\n\n /**\n * Whether the accordion item is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpAccordionItemDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Access the accordion trigger\n * @internal\n */\n readonly trigger = signal<NgpAccordionTrigger<T> | undefined>(undefined);\n\n /**\n * Access the accordion content\n * @internal\n */\n readonly content = signal<NgpAccordionContent<T> | undefined>(undefined);\n\n /**\n * Whether the accordion item is expanded.\n */\n readonly open = computed<boolean>(() => this.accordion().isOpen(this.state.value()!));\n\n /**\n * The trigger id.\n */\n readonly triggerId = computed(() => this.trigger()?.id());\n\n /**\n * The content id.\n */\n readonly contentId = computed(() => this.content()?.id());\n\n /**\n * The accordion item state.\n */\n private readonly state = accordionItemState<NgpAccordionItem<T>>(this);\n}\n","import { Directive, HOST_TAG_NAME, HostListener, inject, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { NgpAccordionItem } from '../accordion-item/accordion-item';\nimport { injectAccordionItemState } from '../accordion-item/accordion-item-state';\nimport { NgpAccordion } from '../accordion/accordion';\nimport { injectAccordionState } from '../accordion/accordion-state';\n\n/**\n * Apply the `ngpAccordionTrigger` directive to an element that represents the trigger for an accordion item, such as a button.\n */\n@Directive({\n selector: '[ngpAccordionTrigger]',\n exportAs: 'ngpAccordionTrigger',\n host: {\n '[id]': 'id()',\n '[attr.type]': 'tagName === \"button\" ? \"button\" : null',\n '[attr.data-orientation]': 'accordion().orientation()',\n '[attr.data-open]': 'accordionItem().open() ? \"\" : null',\n '[attr.data-disabled]': 'accordionItem().disabled() || accordion().disabled() ? \"\" : null',\n '[attr.aria-controls]': 'accordionItem().contentId()',\n '[attr.aria-expanded]': 'accordionItem().open()',\n },\n})\nexport class NgpAccordionTrigger<T> {\n /**\n * The tag name of the element.\n */\n protected readonly tagName = inject(HOST_TAG_NAME);\n\n /**\n * Access the parent accordion.\n */\n protected readonly accordion = injectAccordionState<NgpAccordion<T>>();\n\n /**\n * The item instance.\n */\n protected readonly accordionItem = injectAccordionItemState<NgpAccordionItem<T>>();\n\n /**\n * The id of the trigger.\n */\n readonly id = input<string>(uniqueId('ngp-accordion-trigger'));\n\n constructor() {\n this.accordionItem().trigger.set(this);\n }\n\n /**\n * Toggle the accordion item.\n */\n @HostListener('click')\n toggle(): void {\n if (this.accordionItem().disabled() || this.accordion().disabled()) {\n return;\n }\n\n this.accordion().toggle(this.accordionItem().value()!);\n }\n}\n","import { InjectionToken, Provider, inject } from '@angular/core';\nimport { NgpAccordionType } from '../accordion/accordion';\n\nexport interface NgpAccordionConfig {\n /**\n * The default type of the accordion\n * @default 'single'\n */\n type: NgpAccordionType;\n /**\n * Whether the accordion is collapsible\n * @default false\n */\n collapsible: boolean;\n /**\n * The default orientation of the accordion\n * @default 'vertical'\n */\n orientation: 'vertical' | 'horizontal';\n}\n\nexport const defaultAccordionConfig: NgpAccordionConfig = {\n type: 'single',\n collapsible: false,\n orientation: 'vertical',\n};\n\nexport const NgpAccordionConfigToken = new InjectionToken<NgpAccordionConfig>(\n 'NgpAccordionConfigToken',\n);\n\n/**\n * Provide the default Accordion configuration\n * @param config The Accordion configuration\n * @returns The provider\n */\nexport function provideAccordionConfig(config: Partial<NgpAccordionConfig>): Provider[] {\n return [\n {\n provide: NgpAccordionConfigToken,\n useValue: { ...defaultAccordionConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Accordion configuration\n * @returns The global Accordion configuration\n */\nexport function injectAccordionConfig(): NgpAccordionConfig {\n return inject(NgpAccordionConfigToken, { optional: true }) ?? defaultAccordionConfig;\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, booleanAttribute, input, output } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { injectAccordionConfig } from '../config/accordion-config';\nimport { accordionState, provideAccordionState } from './accordion-state';\n\n/**\n * Apply the `ngpAccordion` directive to an element that represents the group of accordion items.\n */\n@Directive({\n selector: '[ngpAccordion]',\n exportAs: 'ngpAccordion',\n providers: [provideAccordionState()],\n host: {\n '[attr.data-orientation]': 'state.orientation()',\n '[attr.data-disabled]': 'state.disabled() ? \"\" : null',\n },\n})\nexport class NgpAccordion<T> {\n /**\n * Access the global accordion configuration.\n */\n private readonly config = injectAccordionConfig();\n\n /**\n * The type of the accordion.\n */\n readonly type = input<NgpAccordionType>(this.config.type, {\n alias: 'ngpAccordionType',\n });\n\n /**\n * Whether the accordion is collapsible.\n */\n readonly collapsible = input<boolean, BooleanInput>(this.config.collapsible, {\n alias: 'ngpAccordionCollapsible',\n transform: booleanAttribute,\n });\n\n /**\n * The value of the accordion.\n */\n readonly value = input<T | T[] | null>(null, {\n alias: 'ngpAccordionValue',\n });\n\n /**\n * Event emitted when the accordion value changes.\n */\n readonly valueChange = output<T | T[] | null>({\n alias: 'ngpAccordionValueChange',\n });\n\n /**\n * Whether the accordion is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpAccordionDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * The accordion orientation.\n */\n readonly orientation = input<NgpOrientation>(this.config.orientation, {\n alias: 'ngpAccordionOrientation',\n });\n\n /**\n * The accordion state.\n */\n private readonly state = accordionState<NgpAccordion<T>>(this);\n\n /**\n * @param value The value to check.\n * @returns Whether the value is open.\n * @internal\n */\n isOpen(value: T): boolean {\n if (this.state.type() === 'multiple') {\n return (this.state.value() as T[] | null)?.includes(value) ?? false;\n }\n\n return this.state.value() === value;\n }\n\n toggle(value: T): void {\n const isOpen = this.isOpen(value);\n\n // if we are in single mode and the value is already open and the accordion is not collapsible, do nothing\n if (this.state.type() === 'single' && isOpen && !this.state.collapsible()) {\n return;\n }\n\n // if we are in single mode then toggle the value\n if (this.state.type() === 'single') {\n const newValue = isOpen ? null : value;\n this.state.value.set(newValue);\n this.valueChange.emit(newValue);\n return;\n }\n\n // if we are in multiple mode then toggle the value\n let values = (this.state.value() as T[]) ?? [];\n\n if (isOpen) {\n values = values.filter(v => v !== value);\n } else {\n values = [...values, value];\n }\n this.state.value.set(values);\n this.valueChange.emit(values);\n }\n}\n\nexport type NgpAccordionType = 'single' | 'multiple';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAQA;;AAEG;AACI,MAAM,0BAA0B,GACrC,gBAAgB,CAA4B,eAAe,CAAC;AAE9D;;AAEG;MACU,yBAAyB,GAAG,mBAAmB,CAAC,0BAA0B;AAEvF;;AAEG;MACU,wBAAwB,GAAG,mBAAmB,CACzD,0BAA0B;AAG5B;;AAEG;AACI,MAAM,kBAAkB,GAAG,WAAW,CAAC,0BAA0B,CAAC;;ACrBzE;;AAEG;AACI,MAAM,sBAAsB,GAAG,gBAAgB,CAAwB,WAAW,CAAC;AAE1F;;AAEG;MACU,qBAAqB,GAAG,mBAAmB,CAAC,sBAAsB;AAE/E;;AAEG;MACU,oBAAoB,GAC/B,mBAAmB,CAAwB,sBAAsB;AAEnE;;AAEG;AACI,MAAM,cAAc,GAAG,WAAW,CAAC,sBAAsB,CAAC;;ACnBjE;;AAEG;MAaU,mBAAmB,CAAA;AAqB9B,IAAA,WAAA,GAAA;AApBA;;AAEG;QACc,IAAA,CAAA,UAAU,GAAG,gBAAgB,EAAE;AAEhD;;AAEG;QACgB,IAAA,CAAA,SAAS,GAAG,oBAAoB,EAAmB;AAEtE;;AAEG;QACgB,IAAA,CAAA,aAAa,GAAG,wBAAwB,EAAE;AAE7D;;AAEG;QACM,IAAA,CAAA,EAAE,GAAG,KAAK,CAAS,QAAQ,CAAC,uBAAuB,CAAC,CAAC;QAG5D,IAAI,CAAC,aAAa,EAAE,CAAC,OA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