ng-primitives 0.120.4 → 0.121.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/example-theme/index.css +9 -0
- package/fesm2022/ng-primitives-a11y.mjs +5 -5
- package/fesm2022/ng-primitives-a11y.mjs.map +1 -1
- package/fesm2022/ng-primitives-accordion.mjs +34 -51
- package/fesm2022/ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/ng-primitives-ai.mjs +39 -52
- package/fesm2022/ng-primitives-ai.mjs.map +1 -1
- package/fesm2022/ng-primitives-autofill.mjs +4 -4
- package/fesm2022/ng-primitives-autofill.mjs.map +1 -1
- package/fesm2022/ng-primitives-avatar.mjs +14 -17
- package/fesm2022/ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/ng-primitives-breadcrumbs.mjs +21 -21
- package/fesm2022/ng-primitives-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ng-primitives-button.mjs +7 -9
- package/fesm2022/ng-primitives-button.mjs.map +1 -1
- package/fesm2022/ng-primitives-checkbox.mjs +15 -30
- package/fesm2022/ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/ng-primitives-combobox.mjs +60 -92
- package/fesm2022/ng-primitives-combobox.mjs.map +1 -1
- package/fesm2022/ng-primitives-common.mjs +4 -4
- package/fesm2022/ng-primitives-common.mjs.map +1 -1
- package/fesm2022/ng-primitives-context-menu.mjs +68 -121
- package/fesm2022/ng-primitives-context-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-date-picker.mjs +91 -115
- package/fesm2022/ng-primitives-date-picker.mjs.map +1 -1
- package/fesm2022/ng-primitives-dialog.mjs +35 -51
- package/fesm2022/ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/ng-primitives-file-upload.mjs +26 -53
- package/fesm2022/ng-primitives-file-upload.mjs.map +1 -1
- package/fesm2022/ng-primitives-focus-trap.mjs +5 -8
- package/fesm2022/ng-primitives-focus-trap.mjs.map +1 -1
- package/fesm2022/ng-primitives-form-field.mjs +39 -44
- package/fesm2022/ng-primitives-form-field.mjs.map +1 -1
- package/fesm2022/ng-primitives-input-otp.mjs +30 -43
- package/fesm2022/ng-primitives-input-otp.mjs.map +1 -1
- package/fesm2022/ng-primitives-input.mjs +6 -8
- package/fesm2022/ng-primitives-input.mjs.map +1 -1
- package/fesm2022/ng-primitives-interactions.mjs +31 -48
- package/fesm2022/ng-primitives-interactions.mjs.map +1 -1
- package/fesm2022/ng-primitives-internal.mjs +39 -35
- package/fesm2022/ng-primitives-internal.mjs.map +1 -1
- package/fesm2022/ng-primitives-listbox.mjs +34 -48
- package/fesm2022/ng-primitives-listbox.mjs.map +1 -1
- package/fesm2022/ng-primitives-menu.mjs +85 -151
- package/fesm2022/ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-meter.mjs +25 -36
- package/fesm2022/ng-primitives-meter.mjs.map +1 -1
- package/fesm2022/ng-primitives-navigation-menu.mjs +60 -108
- package/fesm2022/ng-primitives-navigation-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-number-field.mjs +35 -59
- package/fesm2022/ng-primitives-number-field.mjs.map +1 -1
- package/fesm2022/ng-primitives-pagination.mjs +270 -297
- package/fesm2022/ng-primitives-pagination.mjs.map +1 -1
- package/fesm2022/ng-primitives-popover.mjs +209 -223
- package/fesm2022/ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/ng-primitives-portal.mjs +88 -59
- package/fesm2022/ng-primitives-portal.mjs.map +1 -1
- package/fesm2022/ng-primitives-progress.mjs +30 -41
- package/fesm2022/ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/ng-primitives-radio.mjs +20 -30
- package/fesm2022/ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/ng-primitives-resize.mjs +3 -3
- package/fesm2022/ng-primitives-resize.mjs.map +1 -1
- package/fesm2022/ng-primitives-roving-focus.mjs +20 -34
- package/fesm2022/ng-primitives-roving-focus.mjs.map +1 -1
- package/fesm2022/ng-primitives-search.mjs +9 -9
- package/fesm2022/ng-primitives-search.mjs.map +1 -1
- package/fesm2022/ng-primitives-select.mjs +720 -620
- package/fesm2022/ng-primitives-select.mjs.map +1 -1
- package/fesm2022/ng-primitives-separator.mjs +4 -6
- package/fesm2022/ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/ng-primitives-slider.mjs +63 -100
- package/fesm2022/ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/ng-primitives-state.mjs +3 -3
- package/fesm2022/ng-primitives-state.mjs.map +1 -1
- package/fesm2022/ng-primitives-switch.mjs +15 -21
- package/fesm2022/ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/ng-primitives-tabs.mjs +31 -41
- package/fesm2022/ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/ng-primitives-textarea.mjs +5 -7
- package/fesm2022/ng-primitives-textarea.mjs.map +1 -1
- package/fesm2022/ng-primitives-toast.mjs +30 -23
- package/fesm2022/ng-primitives-toast.mjs.map +1 -1
- package/fesm2022/ng-primitives-toggle-group.mjs +20 -36
- package/fesm2022/ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/ng-primitives-toggle.mjs +10 -19
- package/fesm2022/ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/ng-primitives-toolbar.mjs +4 -6
- package/fesm2022/ng-primitives-toolbar.mjs.map +1 -1
- package/fesm2022/ng-primitives-tooltip.mjs +401 -402
- package/fesm2022/ng-primitives-tooltip.mjs.map +1 -1
- package/fesm2022/ng-primitives-utils.mjs +5 -4
- package/fesm2022/ng-primitives-utils.mjs.map +1 -1
- package/package.json +56 -55
- package/schematics/ng-generate/templates/select/select.__fileSuffix@dasherize__.ts.template +48 -48
- package/{a11y/index.d.ts → types/ng-primitives-a11y.d.ts} +18 -24
- package/{accordion/index.d.ts → types/ng-primitives-accordion.d.ts} +85 -98
- package/{autofill/index.d.ts → types/ng-primitives-autofill.d.ts} +3 -10
- package/{avatar/index.d.ts → types/ng-primitives-avatar.d.ts} +7 -30
- package/{breadcrumbs/index.d.ts → types/ng-primitives-breadcrumbs.d.ts} +15 -70
- package/{button/index.d.ts → types/ng-primitives-button.d.ts} +23 -29
- package/{checkbox/index.d.ts → types/ng-primitives-checkbox.d.ts} +68 -74
- package/{combobox/index.d.ts → types/ng-primitives-combobox.d.ts} +35 -35
- package/{context-menu/index.d.ts → types/ng-primitives-context-menu.d.ts} +2 -1
- package/{date-picker/index.d.ts → types/ng-primitives-date-picker.d.ts} +2 -2
- package/{dialog/index.d.ts → types/ng-primitives-dialog.d.ts} +7 -2
- package/{file-upload/index.d.ts → types/ng-primitives-file-upload.d.ts} +5 -20
- package/{focus-trap/index.d.ts → types/ng-primitives-focus-trap.d.ts} +3 -10
- package/{form-field/index.d.ts → types/ng-primitives-form-field.d.ts} +9 -40
- package/{input/index.d.ts → types/ng-primitives-input.d.ts} +3 -10
- package/{menu/index.d.ts → types/ng-primitives-menu.d.ts} +17 -63
- package/{navigation-menu/index.d.ts → types/ng-primitives-navigation-menu.d.ts} +15 -70
- package/{number-field/index.d.ts → types/ng-primitives-number-field.d.ts} +80 -110
- package/types/ng-primitives-pagination.d.ts +502 -0
- package/{popover/index.d.ts → types/ng-primitives-popover.d.ts} +244 -57
- package/{portal/index.d.ts → types/ng-primitives-portal.d.ts} +22 -13
- package/{progress/index.d.ts → types/ng-primitives-progress.d.ts} +3 -10
- package/{roving-focus/index.d.ts → types/ng-primitives-roving-focus.d.ts} +65 -79
- package/types/ng-primitives-select.d.ts +687 -0
- package/{separator/index.d.ts → types/ng-primitives-separator.d.ts} +3 -10
- package/{slider/index.d.ts → types/ng-primitives-slider.d.ts} +76 -138
- package/{state/index.d.ts → types/ng-primitives-state.d.ts} +26 -21
- package/{switch/index.d.ts → types/ng-primitives-switch.d.ts} +50 -64
- package/{tabs/index.d.ts → types/ng-primitives-tabs.d.ts} +9 -40
- package/{textarea/index.d.ts → types/ng-primitives-textarea.d.ts} +3 -10
- package/{toast/index.d.ts → types/ng-primitives-toast.d.ts} +13 -1
- package/{toggle-group/index.d.ts → types/ng-primitives-toggle-group.d.ts} +75 -89
- package/{toggle/index.d.ts → types/ng-primitives-toggle.d.ts} +50 -56
- package/{toolbar/index.d.ts → types/ng-primitives-toolbar.d.ts} +3 -10
- package/types/ng-primitives-tooltip.d.ts +691 -0
- package/pagination/index.d.ts +0 -211
- package/select/index.d.ts +0 -396
- package/tooltip/index.d.ts +0 -384
- /package/{ai/index.d.ts → types/ng-primitives-ai.d.ts} +0 -0
- /package/{common/index.d.ts → types/ng-primitives-common.d.ts} +0 -0
- /package/{date-time-luxon/index.d.ts → types/ng-primitives-date-time-luxon.d.ts} +0 -0
- /package/{date-time/index.d.ts → types/ng-primitives-date-time.d.ts} +0 -0
- /package/{input-otp/index.d.ts → types/ng-primitives-input-otp.d.ts} +0 -0
- /package/{interactions/index.d.ts → types/ng-primitives-interactions.d.ts} +0 -0
- /package/{internal/index.d.ts → types/ng-primitives-internal.d.ts} +0 -0
- /package/{listbox/index.d.ts → types/ng-primitives-listbox.d.ts} +0 -0
- /package/{meter/index.d.ts → types/ng-primitives-meter.d.ts} +0 -0
- /package/{radio/index.d.ts → types/ng-primitives-radio.d.ts} +0 -0
- /package/{resize/index.d.ts → types/ng-primitives-resize.d.ts} +0 -0
- /package/{search/index.d.ts → types/ng-primitives-search.d.ts} +0 -0
- /package/{utils/index.d.ts → types/ng-primitives-utils.d.ts} +0 -0
- /package/{index.d.ts → types/ng-primitives.d.ts} +0 -0
|
@@ -1,8 +1,73 @@
|
|
|
1
|
+
import * as ng_primitives_checkbox from 'ng-primitives/checkbox';
|
|
1
2
|
import * as _angular_core from '@angular/core';
|
|
2
3
|
import { Signal, WritableSignal } from '@angular/core';
|
|
4
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
5
|
+
import * as ng_primitives_state from 'ng-primitives/state';
|
|
3
6
|
import { SetterOptions } from 'ng-primitives/state';
|
|
4
7
|
import { Observable } from 'rxjs';
|
|
5
|
-
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Apply the `ngpCheckbox` directive to an element to that represents the checkbox, such as a `button`.
|
|
11
|
+
*/
|
|
12
|
+
declare class NgpCheckbox {
|
|
13
|
+
/**
|
|
14
|
+
* The id of the checkbox.
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
18
|
+
/**
|
|
19
|
+
* Defines whether the checkbox is checked.
|
|
20
|
+
*/
|
|
21
|
+
readonly checked: _angular_core.InputSignalWithTransform<boolean | undefined, BooleanInput>;
|
|
22
|
+
/**
|
|
23
|
+
* The default checked state for uncontrolled usage.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
readonly defaultChecked: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
27
|
+
/**
|
|
28
|
+
* The event that is emitted when the checkbox value changes.
|
|
29
|
+
*/
|
|
30
|
+
readonly checkedChange: _angular_core.OutputEmitterRef<boolean>;
|
|
31
|
+
/**
|
|
32
|
+
* Defines whether the checkbox is indeterminate.
|
|
33
|
+
*/
|
|
34
|
+
readonly indeterminate: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
35
|
+
/**
|
|
36
|
+
* The event that is emitted when the indeterminate value changes.
|
|
37
|
+
*/
|
|
38
|
+
readonly indeterminateChange: _angular_core.OutputEmitterRef<boolean>;
|
|
39
|
+
/**
|
|
40
|
+
* Whether the checkbox is required.
|
|
41
|
+
*/
|
|
42
|
+
readonly required: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
43
|
+
/**
|
|
44
|
+
* Defines whether the checkbox is disabled.
|
|
45
|
+
*/
|
|
46
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
47
|
+
/**
|
|
48
|
+
* The state of the checkbox.
|
|
49
|
+
*/
|
|
50
|
+
protected readonly state: ng_primitives_checkbox.NgpCheckboxState;
|
|
51
|
+
toggle(event?: Event): void;
|
|
52
|
+
/**
|
|
53
|
+
* Update the checked value.
|
|
54
|
+
*/
|
|
55
|
+
setChecked(value: boolean, options?: SetterOptions): void;
|
|
56
|
+
/**
|
|
57
|
+
* Set the default checked state.
|
|
58
|
+
*/
|
|
59
|
+
setDefaultChecked(value: boolean): void;
|
|
60
|
+
/**
|
|
61
|
+
* Update the indeterminate value.
|
|
62
|
+
*/
|
|
63
|
+
setIndeterminate(value: boolean): void;
|
|
64
|
+
/**
|
|
65
|
+
* Set the disabled value.
|
|
66
|
+
*/
|
|
67
|
+
setDisabled(value: boolean): void;
|
|
68
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpCheckbox, never>;
|
|
69
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpCheckbox, "[ngpCheckbox]", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "checked": { "alias": "ngpCheckboxChecked"; "required": false; "isSignal": true; }; "defaultChecked": { "alias": "ngpCheckboxDefaultChecked"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "ngpCheckboxIndeterminate"; "required": false; "isSignal": true; }; "required": { "alias": "ngpCheckboxRequired"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpCheckboxDisabled"; "required": false; "isSignal": true; }; }, { "checkedChange": "ngpCheckboxCheckedChange"; "indeterminateChange": "ngpCheckboxIndeterminateChange"; }, never, never, true, never>;
|
|
70
|
+
}
|
|
6
71
|
|
|
7
72
|
/**
|
|
8
73
|
* Public state surface for the Checkbox primitive.
|
|
@@ -89,83 +154,12 @@ interface NgpCheckboxProps {
|
|
|
89
154
|
declare const ngpCheckbox: ({ id, checked: _checked, defaultChecked: _defaultChecked, indeterminate: _indeterminate, disabled: _disabled, onCheckedChange, onIndeterminateChange, }: NgpCheckboxProps) => NgpCheckboxState;
|
|
90
155
|
declare const injectCheckboxState: {
|
|
91
156
|
(): Signal<NgpCheckboxState>;
|
|
92
|
-
(options:
|
|
93
|
-
|
|
94
|
-
optional?: boolean;
|
|
95
|
-
skipSelf?: boolean;
|
|
96
|
-
}): Signal<NgpCheckboxState | null>;
|
|
97
|
-
(options?: {
|
|
98
|
-
hoisted?: boolean;
|
|
99
|
-
optional?: boolean;
|
|
100
|
-
skipSelf?: boolean;
|
|
101
|
-
}): Signal<NgpCheckboxState> | Signal<NgpCheckboxState | null>;
|
|
157
|
+
(options: ng_primitives_state.StateInjectionOptions): Signal<NgpCheckboxState | null>;
|
|
158
|
+
(options?: ng_primitives_state.StateInjectionOptions): Signal<NgpCheckboxState> | Signal<NgpCheckboxState | null>;
|
|
102
159
|
};
|
|
103
160
|
declare const provideCheckboxState: (opts?: {
|
|
104
161
|
inherit?: boolean;
|
|
105
162
|
}) => _angular_core.FactoryProvider;
|
|
106
163
|
|
|
107
|
-
/**
|
|
108
|
-
* Apply the `ngpCheckbox` directive to an element to that represents the checkbox, such as a `button`.
|
|
109
|
-
*/
|
|
110
|
-
declare class NgpCheckbox {
|
|
111
|
-
/**
|
|
112
|
-
* The id of the checkbox.
|
|
113
|
-
* @internal
|
|
114
|
-
*/
|
|
115
|
-
readonly id: _angular_core.InputSignal<string>;
|
|
116
|
-
/**
|
|
117
|
-
* Defines whether the checkbox is checked.
|
|
118
|
-
*/
|
|
119
|
-
readonly checked: _angular_core.InputSignalWithTransform<boolean | undefined, BooleanInput>;
|
|
120
|
-
/**
|
|
121
|
-
* The default checked state for uncontrolled usage.
|
|
122
|
-
* @default false
|
|
123
|
-
*/
|
|
124
|
-
readonly defaultChecked: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
125
|
-
/**
|
|
126
|
-
* The event that is emitted when the checkbox value changes.
|
|
127
|
-
*/
|
|
128
|
-
readonly checkedChange: _angular_core.OutputEmitterRef<boolean>;
|
|
129
|
-
/**
|
|
130
|
-
* Defines whether the checkbox is indeterminate.
|
|
131
|
-
*/
|
|
132
|
-
readonly indeterminate: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
133
|
-
/**
|
|
134
|
-
* The event that is emitted when the indeterminate value changes.
|
|
135
|
-
*/
|
|
136
|
-
readonly indeterminateChange: _angular_core.OutputEmitterRef<boolean>;
|
|
137
|
-
/**
|
|
138
|
-
* Whether the checkbox is required.
|
|
139
|
-
*/
|
|
140
|
-
readonly required: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
141
|
-
/**
|
|
142
|
-
* Defines whether the checkbox is disabled.
|
|
143
|
-
*/
|
|
144
|
-
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
145
|
-
/**
|
|
146
|
-
* The state of the checkbox.
|
|
147
|
-
*/
|
|
148
|
-
protected readonly state: NgpCheckboxState;
|
|
149
|
-
toggle(event?: Event): void;
|
|
150
|
-
/**
|
|
151
|
-
* Update the checked value.
|
|
152
|
-
*/
|
|
153
|
-
setChecked(value: boolean, options?: SetterOptions): void;
|
|
154
|
-
/**
|
|
155
|
-
* Set the default checked state.
|
|
156
|
-
*/
|
|
157
|
-
setDefaultChecked(value: boolean): void;
|
|
158
|
-
/**
|
|
159
|
-
* Update the indeterminate value.
|
|
160
|
-
*/
|
|
161
|
-
setIndeterminate(value: boolean): void;
|
|
162
|
-
/**
|
|
163
|
-
* Set the disabled value.
|
|
164
|
-
*/
|
|
165
|
-
setDisabled(value: boolean): void;
|
|
166
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpCheckbox, never>;
|
|
167
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpCheckbox, "[ngpCheckbox]", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "checked": { "alias": "ngpCheckboxChecked"; "required": false; "isSignal": true; }; "defaultChecked": { "alias": "ngpCheckboxDefaultChecked"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "ngpCheckboxIndeterminate"; "required": false; "isSignal": true; }; "required": { "alias": "ngpCheckboxRequired"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpCheckboxDisabled"; "required": false; "isSignal": true; }; }, { "checkedChange": "ngpCheckboxCheckedChange"; "indeterminateChange": "ngpCheckboxIndeterminateChange"; }, never, never, true, never>;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
164
|
export { NgpCheckbox, injectCheckboxState, ngpCheckbox, provideCheckboxState };
|
|
171
165
|
export type { NgpCheckboxProps, NgpCheckboxState };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { OnDestroy,
|
|
2
|
+
import { OnDestroy, Injector, Provider } from '@angular/core';
|
|
3
3
|
import * as ng_primitives_state from 'ng-primitives/state';
|
|
4
4
|
import * as ng_primitives_combobox from 'ng-primitives/combobox';
|
|
5
5
|
import * as ng_primitives_internal from 'ng-primitives/internal';
|
|
6
6
|
import * as ng_primitives_utils from 'ng-primitives/utils';
|
|
7
7
|
import { BooleanInput, NumberInput } from '@angular/cdk/coercion';
|
|
8
8
|
import * as ng_primitives_portal from 'ng-primitives/portal';
|
|
9
|
-
import { NgpOverlay, NgpFlip,
|
|
9
|
+
import { NgpOverlay, NgpFlip, NgpFlipInput, NgpOffset, NgpOffsetInput } from 'ng-primitives/portal';
|
|
10
10
|
import * as ng_primitives_a11y from 'ng-primitives/a11y';
|
|
11
11
|
|
|
12
12
|
declare class NgpComboboxButton {
|
|
@@ -176,38 +176,6 @@ declare class NgpComboboxPortal implements OnDestroy {
|
|
|
176
176
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpComboboxPortal, "[ngpComboboxPortal]", ["ngpComboboxPortal"], {}, {}, never, never, true, never>;
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
interface NgpComboboxConfig {
|
|
180
|
-
/**
|
|
181
|
-
* The default placement for the combobox dropdown.
|
|
182
|
-
* @default 'bottom'
|
|
183
|
-
*/
|
|
184
|
-
placement: NgpComboboxPlacement;
|
|
185
|
-
/**
|
|
186
|
-
* The container element or selector for the combobox dropdown.
|
|
187
|
-
* This can be used to control where the dropdown is rendered in the DOM.
|
|
188
|
-
* @default 'body'
|
|
189
|
-
*/
|
|
190
|
-
container: HTMLElement | string | null;
|
|
191
|
-
/**
|
|
192
|
-
* Whether the combobox dropdown should flip when there is not enough space.
|
|
193
|
-
* Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options.
|
|
194
|
-
* @default true
|
|
195
|
-
*/
|
|
196
|
-
flip: NgpFlip;
|
|
197
|
-
/**
|
|
198
|
-
* Define the offset of the combobox dropdown relative to the trigger.
|
|
199
|
-
* Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.
|
|
200
|
-
* @default 0
|
|
201
|
-
*/
|
|
202
|
-
offset: NgpOffset;
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* Provide the default Combobox configuration
|
|
206
|
-
* @param config The Combobox configuration
|
|
207
|
-
* @returns The provider
|
|
208
|
-
*/
|
|
209
|
-
declare function provideComboboxConfig(config: Partial<NgpComboboxConfig>): Provider[];
|
|
210
|
-
|
|
211
179
|
/**
|
|
212
180
|
* Ideally we would use a generic type here, unfortunately, unlike in React,
|
|
213
181
|
* we cannot infer the type based on another input. For example, if multiple
|
|
@@ -222,7 +190,7 @@ declare function provideComboboxConfig(config: Partial<NgpComboboxConfig>): Prov
|
|
|
222
190
|
type T = any;
|
|
223
191
|
declare class NgpCombobox {
|
|
224
192
|
/** Access the combobox configuration. */
|
|
225
|
-
protected readonly config: NgpComboboxConfig;
|
|
193
|
+
protected readonly config: ng_primitives_combobox.NgpComboboxConfig;
|
|
226
194
|
/** @internal Access the combobox element. */
|
|
227
195
|
readonly elementRef: _angular_core.ElementRef<HTMLElement>;
|
|
228
196
|
/** Access the injector. */
|
|
@@ -467,5 +435,37 @@ declare const provideComboboxState: (options?: ng_primitives_state.CreateStatePr
|
|
|
467
435
|
*/
|
|
468
436
|
declare const injectComboboxState: <U = NgpCombobox>(injectOptions?: _angular_core.InjectOptions) => _angular_core.Signal<ng_primitives_state.State<U>>;
|
|
469
437
|
|
|
438
|
+
interface NgpComboboxConfig {
|
|
439
|
+
/**
|
|
440
|
+
* The default placement for the combobox dropdown.
|
|
441
|
+
* @default 'bottom'
|
|
442
|
+
*/
|
|
443
|
+
placement: NgpComboboxPlacement;
|
|
444
|
+
/**
|
|
445
|
+
* The container element or selector for the combobox dropdown.
|
|
446
|
+
* This can be used to control where the dropdown is rendered in the DOM.
|
|
447
|
+
* @default 'body'
|
|
448
|
+
*/
|
|
449
|
+
container: HTMLElement | string | null;
|
|
450
|
+
/**
|
|
451
|
+
* Whether the combobox dropdown should flip when there is not enough space.
|
|
452
|
+
* Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options.
|
|
453
|
+
* @default true
|
|
454
|
+
*/
|
|
455
|
+
flip: NgpFlip;
|
|
456
|
+
/**
|
|
457
|
+
* Define the offset of the combobox dropdown relative to the trigger.
|
|
458
|
+
* Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.
|
|
459
|
+
* @default 0
|
|
460
|
+
*/
|
|
461
|
+
offset: NgpOffset;
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Provide the default Combobox configuration
|
|
465
|
+
* @param config The Combobox configuration
|
|
466
|
+
* @returns The provider
|
|
467
|
+
*/
|
|
468
|
+
declare function provideComboboxConfig(config: Partial<NgpComboboxConfig>): Provider[];
|
|
469
|
+
|
|
470
470
|
export { NgpCombobox, NgpComboboxButton, NgpComboboxDropdown, NgpComboboxInput, NgpComboboxOption, NgpComboboxPortal, injectComboboxState, provideComboboxConfig, provideComboboxState };
|
|
471
471
|
export type { NgpComboboxConfig, NgpComboboxPlacement };
|
|
@@ -4,6 +4,7 @@ import { NgpOffset, NgpFlip, NgpShift, NgpOverlayContent, NgpOffsetInput, NgpFli
|
|
|
4
4
|
import { FocusOrigin } from '@angular/cdk/a11y';
|
|
5
5
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
6
6
|
import { NgpMenuPlacement } from 'ng-primitives/menu';
|
|
7
|
+
import { StateInjectionOptions } from 'ng-primitives/state';
|
|
7
8
|
|
|
8
9
|
interface NgpContextMenuConfig {
|
|
9
10
|
/**
|
|
@@ -278,7 +279,7 @@ declare const ngpContextMenuTrigger: <T>({ disabled: _disabled, menu: _menu, off
|
|
|
278
279
|
declare const provideContextMenuTriggerState: (opts?: {
|
|
279
280
|
inherit?: boolean;
|
|
280
281
|
}) => _angular_core.FactoryProvider;
|
|
281
|
-
declare function injectContextMenuTriggerState(): Signal<NgpContextMenuTriggerState>;
|
|
282
|
+
declare function injectContextMenuTriggerState(options?: StateInjectionOptions): Signal<NgpContextMenuTriggerState>;
|
|
282
283
|
|
|
283
284
|
export { NgpContextMenu, NgpContextMenuItem, NgpContextMenuItemCheckbox, NgpContextMenuItemIndicator, NgpContextMenuItemRadio, NgpContextMenuItemRadioGroup, NgpContextMenuSubmenuTrigger, NgpContextMenuTrigger, injectContextMenuTriggerState, ngpContextMenuTrigger, provideContextMenuConfig, provideContextMenuTriggerState };
|
|
284
285
|
export type { NgpContextMenuConfig, NgpContextMenuTriggerProps, NgpContextMenuTriggerState };
|
|
@@ -469,7 +469,7 @@ declare class NgpDatePicker<T> {
|
|
|
469
469
|
* Note: Update calendar header column order when changing from Sunday start.
|
|
470
470
|
* @default 7 (Sunday)
|
|
471
471
|
*/
|
|
472
|
-
readonly firstDayOfWeek: _angular_core.InputSignalWithTransform<NgpDatePickerFirstDayOfWeekNumber, NgpDatePickerFirstDayOfWeekNumberInput>;
|
|
472
|
+
readonly firstDayOfWeek: _angular_core.InputSignalWithTransform<ng_primitives_date_picker.NgpDatePickerFirstDayOfWeekNumber, ng_primitives_date_picker.NgpDatePickerFirstDayOfWeekNumberInput>;
|
|
473
473
|
/**
|
|
474
474
|
* The selected value.
|
|
475
475
|
*/
|
|
@@ -589,7 +589,7 @@ declare class NgpDateRangePicker<T> {
|
|
|
589
589
|
* Note: Update calendar header column order when changing from Sunday start.
|
|
590
590
|
* @default 7 (Sunday)
|
|
591
591
|
*/
|
|
592
|
-
readonly firstDayOfWeek: _angular_core.InputSignalWithTransform<NgpDatePickerFirstDayOfWeekNumber, NgpDatePickerFirstDayOfWeekNumberInput>;
|
|
592
|
+
readonly firstDayOfWeek: _angular_core.InputSignalWithTransform<ng_primitives_date_picker.NgpDatePickerFirstDayOfWeekNumber, ng_primitives_date_picker.NgpDatePickerFirstDayOfWeekNumberInput>;
|
|
593
593
|
/**
|
|
594
594
|
* The selected start date
|
|
595
595
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { ViewContainerRef, Injector, Provider, OnDestroy, TemplateRef, Type } from '@angular/core';
|
|
2
|
+
import { ViewContainerRef, Injector, Provider, OnDestroy, InjectOptions, TemplateRef, Type } from '@angular/core';
|
|
3
3
|
import { NgpDismissGuard, ScrollStrategy, NgpOverlayRef, NgpDismissGuardInput } from 'ng-primitives/portal';
|
|
4
4
|
import * as i1 from 'ng-primitives/internal';
|
|
5
5
|
import { Subject, Observable } from 'rxjs';
|
|
@@ -181,7 +181,12 @@ declare class NgpDialogRef<T = unknown, R = unknown> implements NgpOverlayRef {
|
|
|
181
181
|
*/
|
|
182
182
|
getElements(): HTMLElement[];
|
|
183
183
|
}
|
|
184
|
-
declare function injectDialogRef<T = unknown, R = unknown>(
|
|
184
|
+
declare function injectDialogRef<T = unknown, R = unknown>(options?: InjectOptions & {
|
|
185
|
+
optional?: false;
|
|
186
|
+
}): NgpDialogRef<T, R>;
|
|
187
|
+
declare function injectDialogRef<T = unknown, R = unknown>(options: InjectOptions & {
|
|
188
|
+
optional: true;
|
|
189
|
+
}): NgpDialogRef<T, R> | null;
|
|
185
190
|
|
|
186
191
|
/**
|
|
187
192
|
* Originally based on Angular CDK Dialog service.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { Signal } from '@angular/core';
|
|
3
3
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
4
|
+
import * as ng_primitives_state from 'ng-primitives/state';
|
|
4
5
|
import { Observable } from 'rxjs';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -142,11 +143,7 @@ declare const injectFileDropzoneState: {
|
|
|
142
143
|
dragOver: Observable<boolean>;
|
|
143
144
|
setDisabled: (value: boolean) => void;
|
|
144
145
|
}>;
|
|
145
|
-
(options: {
|
|
146
|
-
hoisted: true;
|
|
147
|
-
optional?: boolean;
|
|
148
|
-
skipSelf?: boolean;
|
|
149
|
-
}): Signal<{
|
|
146
|
+
(options: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
150
147
|
disabled: _angular_core.WritableSignal<boolean>;
|
|
151
148
|
fileTypes: Signal<string[] | undefined>;
|
|
152
149
|
multiple: Signal<boolean>;
|
|
@@ -157,11 +154,7 @@ declare const injectFileDropzoneState: {
|
|
|
157
154
|
dragOver: Observable<boolean>;
|
|
158
155
|
setDisabled: (value: boolean) => void;
|
|
159
156
|
} | null>;
|
|
160
|
-
(options?: {
|
|
161
|
-
hoisted?: boolean;
|
|
162
|
-
optional?: boolean;
|
|
163
|
-
skipSelf?: boolean;
|
|
164
|
-
}): Signal<{
|
|
157
|
+
(options?: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
165
158
|
disabled: _angular_core.WritableSignal<boolean>;
|
|
166
159
|
fileTypes: Signal<string[] | undefined>;
|
|
167
160
|
multiple: Signal<boolean>;
|
|
@@ -328,11 +321,7 @@ declare const injectFileUploadState: {
|
|
|
328
321
|
dragOver: Observable<boolean>;
|
|
329
322
|
showFileDialog: () => void;
|
|
330
323
|
}>;
|
|
331
|
-
(options: {
|
|
332
|
-
hoisted: true;
|
|
333
|
-
optional?: boolean;
|
|
334
|
-
skipSelf?: boolean;
|
|
335
|
-
}): Signal<{
|
|
324
|
+
(options: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
336
325
|
isDragOver: _angular_core.WritableSignal<boolean>;
|
|
337
326
|
selected: Observable<FileList | null>;
|
|
338
327
|
canceled: Observable<void>;
|
|
@@ -340,11 +329,7 @@ declare const injectFileUploadState: {
|
|
|
340
329
|
dragOver: Observable<boolean>;
|
|
341
330
|
showFileDialog: () => void;
|
|
342
331
|
} | null>;
|
|
343
|
-
(options?: {
|
|
344
|
-
hoisted?: boolean;
|
|
345
|
-
optional?: boolean;
|
|
346
|
-
skipSelf?: boolean;
|
|
347
|
-
}): Signal<{
|
|
332
|
+
(options?: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
348
333
|
isDragOver: _angular_core.WritableSignal<boolean>;
|
|
349
334
|
selected: Observable<FileList | null>;
|
|
350
335
|
canceled: Observable<void>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { Signal } from '@angular/core';
|
|
3
3
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
4
|
+
import * as ng_primitives_state from 'ng-primitives/state';
|
|
4
5
|
import { FocusOrigin } from '@angular/cdk/a11y';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -45,16 +46,8 @@ interface NgpFocusTrapProps {
|
|
|
45
46
|
declare const ngpFocusTrap: ({ disabled, focusOrigin }: NgpFocusTrapProps) => {};
|
|
46
47
|
declare const injectFocusTrapState: {
|
|
47
48
|
(): Signal<{}>;
|
|
48
|
-
(options: {
|
|
49
|
-
|
|
50
|
-
optional?: boolean;
|
|
51
|
-
skipSelf?: boolean;
|
|
52
|
-
}): Signal<{} | null>;
|
|
53
|
-
(options?: {
|
|
54
|
-
hoisted?: boolean;
|
|
55
|
-
optional?: boolean;
|
|
56
|
-
skipSelf?: boolean;
|
|
57
|
-
}): Signal<{}> | Signal<{} | null>;
|
|
49
|
+
(options: ng_primitives_state.StateInjectionOptions): Signal<{} | null>;
|
|
50
|
+
(options?: ng_primitives_state.StateInjectionOptions): Signal<{}> | Signal<{} | null>;
|
|
58
51
|
};
|
|
59
52
|
declare const provideFocusTrapState: (opts?: {
|
|
60
53
|
inherit?: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { Signal } from '@angular/core';
|
|
3
|
+
import * as ng_primitives_state from 'ng-primitives/state';
|
|
3
4
|
import * as ng_primitives_utils from 'ng-primitives/utils';
|
|
4
5
|
import { NgpControlStatus } from 'ng-primitives/utils';
|
|
5
6
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
@@ -46,18 +47,10 @@ declare const injectDescriptionState: {
|
|
|
46
47
|
(): Signal<{
|
|
47
48
|
id: Signal<string>;
|
|
48
49
|
}>;
|
|
49
|
-
(options: {
|
|
50
|
-
hoisted: true;
|
|
51
|
-
optional?: boolean;
|
|
52
|
-
skipSelf?: boolean;
|
|
53
|
-
}): Signal<{
|
|
50
|
+
(options: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
54
51
|
id: Signal<string>;
|
|
55
52
|
} | null>;
|
|
56
|
-
(options?: {
|
|
57
|
-
hoisted?: boolean;
|
|
58
|
-
optional?: boolean;
|
|
59
|
-
skipSelf?: boolean;
|
|
60
|
-
}): Signal<{
|
|
53
|
+
(options?: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
61
54
|
id: Signal<string>;
|
|
62
55
|
}> | Signal<{
|
|
63
56
|
id: Signal<string>;
|
|
@@ -128,20 +121,12 @@ declare const injectErrorState: {
|
|
|
128
121
|
hasError: Signal<boolean>;
|
|
129
122
|
state: Signal<"fail" | "pass">;
|
|
130
123
|
}>;
|
|
131
|
-
(options: {
|
|
132
|
-
hoisted: true;
|
|
133
|
-
optional?: boolean;
|
|
134
|
-
skipSelf?: boolean;
|
|
135
|
-
}): Signal<{
|
|
124
|
+
(options: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
136
125
|
id: Signal<string>;
|
|
137
126
|
hasError: Signal<boolean>;
|
|
138
127
|
state: Signal<"fail" | "pass">;
|
|
139
128
|
} | null>;
|
|
140
|
-
(options?: {
|
|
141
|
-
hoisted?: boolean;
|
|
142
|
-
optional?: boolean;
|
|
143
|
-
skipSelf?: boolean;
|
|
144
|
-
}): Signal<{
|
|
129
|
+
(options?: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
145
130
|
id: Signal<string>;
|
|
146
131
|
hasError: Signal<boolean>;
|
|
147
132
|
state: Signal<"fail" | "pass">;
|
|
@@ -327,11 +312,7 @@ declare const injectFormFieldState: {
|
|
|
327
312
|
removeLabel: (label: string) => void;
|
|
328
313
|
removeDescription: (description: string) => void;
|
|
329
314
|
}>;
|
|
330
|
-
(options: {
|
|
331
|
-
hoisted: true;
|
|
332
|
-
optional?: boolean;
|
|
333
|
-
skipSelf?: boolean;
|
|
334
|
-
}): Signal<{
|
|
315
|
+
(options: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
335
316
|
labels: _angular_core.WritableSignal<string[]>;
|
|
336
317
|
descriptions: _angular_core.WritableSignal<string[]>;
|
|
337
318
|
formControl: _angular_core.WritableSignal<string | null>;
|
|
@@ -350,11 +331,7 @@ declare const injectFormFieldState: {
|
|
|
350
331
|
removeLabel: (label: string) => void;
|
|
351
332
|
removeDescription: (description: string) => void;
|
|
352
333
|
} | null>;
|
|
353
|
-
(options?: {
|
|
354
|
-
hoisted?: boolean;
|
|
355
|
-
optional?: boolean;
|
|
356
|
-
skipSelf?: boolean;
|
|
357
|
-
}): Signal<{
|
|
334
|
+
(options?: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
358
335
|
labels: _angular_core.WritableSignal<string[]>;
|
|
359
336
|
descriptions: _angular_core.WritableSignal<string[]>;
|
|
360
337
|
formControl: _angular_core.WritableSignal<string | null>;
|
|
@@ -443,19 +420,11 @@ declare const injectLabelState: {
|
|
|
443
420
|
id: Signal<string>;
|
|
444
421
|
htmlFor: Signal<string | null>;
|
|
445
422
|
}>;
|
|
446
|
-
(options: {
|
|
447
|
-
hoisted: true;
|
|
448
|
-
optional?: boolean;
|
|
449
|
-
skipSelf?: boolean;
|
|
450
|
-
}): Signal<{
|
|
423
|
+
(options: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
451
424
|
id: Signal<string>;
|
|
452
425
|
htmlFor: Signal<string | null>;
|
|
453
426
|
} | null>;
|
|
454
|
-
(options?: {
|
|
455
|
-
hoisted?: boolean;
|
|
456
|
-
optional?: boolean;
|
|
457
|
-
skipSelf?: boolean;
|
|
458
|
-
}): Signal<{
|
|
427
|
+
(options?: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
459
428
|
id: Signal<string>;
|
|
460
429
|
htmlFor: Signal<string | null>;
|
|
461
430
|
}> | Signal<{
|
|
@@ -3,6 +3,7 @@ import { NgpControlStatus } from 'ng-primitives/utils';
|
|
|
3
3
|
import * as _angular_core from '@angular/core';
|
|
4
4
|
import { Signal, WritableSignal } from '@angular/core';
|
|
5
5
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
6
|
+
import * as ng_primitives_state from 'ng-primitives/state';
|
|
6
7
|
|
|
7
8
|
declare class NgpInput {
|
|
8
9
|
/**
|
|
@@ -74,21 +75,13 @@ declare const injectInputState: {
|
|
|
74
75
|
status: Signal<NgpControlStatus>;
|
|
75
76
|
setDisabled: (value: boolean) => void;
|
|
76
77
|
}>;
|
|
77
|
-
(options: {
|
|
78
|
-
hoisted: true;
|
|
79
|
-
optional?: boolean;
|
|
80
|
-
skipSelf?: boolean;
|
|
81
|
-
}): Signal<{
|
|
78
|
+
(options: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
82
79
|
id: Signal<string>;
|
|
83
80
|
disabled: WritableSignal<boolean>;
|
|
84
81
|
status: Signal<NgpControlStatus>;
|
|
85
82
|
setDisabled: (value: boolean) => void;
|
|
86
83
|
} | null>;
|
|
87
|
-
(options?: {
|
|
88
|
-
hoisted?: boolean;
|
|
89
|
-
optional?: boolean;
|
|
90
|
-
skipSelf?: boolean;
|
|
91
|
-
}): Signal<{
|
|
84
|
+
(options?: ng_primitives_state.StateInjectionOptions): Signal<{
|
|
92
85
|
id: Signal<string>;
|
|
93
86
|
disabled: WritableSignal<boolean>;
|
|
94
87
|
status: Signal<NgpControlStatus>;
|