ng-primitives 0.120.5 → 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/fesm2022/ng-primitives-a11y.mjs +5 -5
- package/fesm2022/ng-primitives-a11y.mjs.map +1 -1
- package/fesm2022/ng-primitives-accordion.mjs +30 -47
- 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 +66 -119
- package/fesm2022/ng-primitives-context-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-date-picker.mjs +70 -108
- package/fesm2022/ng-primitives-date-picker.mjs.map +1 -1
- package/fesm2022/ng-primitives-dialog.mjs +33 -49
- 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 +12 -12
- 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 +83 -149
- 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 +42 -87
- package/fesm2022/ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/ng-primitives-portal.mjs +81 -57
- 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 +50 -81
- 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 +19 -19
- 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/{a11y/index.d.ts → types/ng-primitives-a11y.d.ts} +15 -14
- package/{accordion/index.d.ts → types/ng-primitives-accordion.d.ts} +78 -77
- package/{button/index.d.ts → types/ng-primitives-button.d.ts} +21 -20
- package/{checkbox/index.d.ts → types/ng-primitives-checkbox.d.ts} +67 -66
- package/{combobox/index.d.ts → types/ng-primitives-combobox.d.ts} +35 -35
- package/{date-picker/index.d.ts → types/ng-primitives-date-picker.d.ts} +2 -2
- package/{number-field/index.d.ts → types/ng-primitives-number-field.d.ts} +72 -71
- package/types/ng-primitives-pagination.d.ts +502 -0
- package/{popover/index.d.ts → types/ng-primitives-popover.d.ts} +3 -2
- package/{portal/index.d.ts → types/ng-primitives-portal.d.ts} +19 -3
- package/{roving-focus/index.d.ts → types/ng-primitives-roving-focus.d.ts} +61 -60
- package/{select/index.d.ts → types/ng-primitives-select.d.ts} +39 -38
- package/{slider/index.d.ts → types/ng-primitives-slider.d.ts} +59 -58
- package/{switch/index.d.ts → types/ng-primitives-switch.d.ts} +45 -44
- package/{toast/index.d.ts → types/ng-primitives-toast.d.ts} +2 -1
- package/{toggle-group/index.d.ts → types/ng-primitives-toggle-group.d.ts} +69 -68
- package/{toggle/index.d.ts → types/ng-primitives-toggle.d.ts} +48 -47
- package/types/ng-primitives-tooltip.d.ts +691 -0
- package/pagination/index.d.ts +0 -211
- package/tooltip/index.d.ts +0 -376
- /package/{ai/index.d.ts → types/ng-primitives-ai.d.ts} +0 -0
- /package/{autofill/index.d.ts → types/ng-primitives-autofill.d.ts} +0 -0
- /package/{avatar/index.d.ts → types/ng-primitives-avatar.d.ts} +0 -0
- /package/{breadcrumbs/index.d.ts → types/ng-primitives-breadcrumbs.d.ts} +0 -0
- /package/{common/index.d.ts → types/ng-primitives-common.d.ts} +0 -0
- /package/{context-menu/index.d.ts → types/ng-primitives-context-menu.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/{dialog/index.d.ts → types/ng-primitives-dialog.d.ts} +0 -0
- /package/{file-upload/index.d.ts → types/ng-primitives-file-upload.d.ts} +0 -0
- /package/{focus-trap/index.d.ts → types/ng-primitives-focus-trap.d.ts} +0 -0
- /package/{form-field/index.d.ts → types/ng-primitives-form-field.d.ts} +0 -0
- /package/{input-otp/index.d.ts → types/ng-primitives-input-otp.d.ts} +0 -0
- /package/{input/index.d.ts → types/ng-primitives-input.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/{menu/index.d.ts → types/ng-primitives-menu.d.ts} +0 -0
- /package/{meter/index.d.ts → types/ng-primitives-meter.d.ts} +0 -0
- /package/{navigation-menu/index.d.ts → types/ng-primitives-navigation-menu.d.ts} +0 -0
- /package/{progress/index.d.ts → types/ng-primitives-progress.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/{separator/index.d.ts → types/ng-primitives-separator.d.ts} +0 -0
- /package/{state/index.d.ts → types/ng-primitives-state.d.ts} +0 -0
- /package/{tabs/index.d.ts → types/ng-primitives-tabs.d.ts} +0 -0
- /package/{textarea/index.d.ts → types/ng-primitives-textarea.d.ts} +0 -0
- /package/{toolbar/index.d.ts → types/ng-primitives-toolbar.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,9 +1,73 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { SetterOptions } from 'ng-primitives/state';
|
|
1
|
+
import * as ng_primitives_checkbox from 'ng-primitives/checkbox';
|
|
3
2
|
import * as _angular_core from '@angular/core';
|
|
4
3
|
import { Signal, WritableSignal } from '@angular/core';
|
|
5
|
-
import { Observable } from 'rxjs';
|
|
6
4
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
5
|
+
import * as ng_primitives_state from 'ng-primitives/state';
|
|
6
|
+
import { SetterOptions } from 'ng-primitives/state';
|
|
7
|
+
import { Observable } from 'rxjs';
|
|
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
|
+
}
|
|
7
71
|
|
|
8
72
|
/**
|
|
9
73
|
* Public state surface for the Checkbox primitive.
|
|
@@ -97,68 +161,5 @@ declare const provideCheckboxState: (opts?: {
|
|
|
97
161
|
inherit?: boolean;
|
|
98
162
|
}) => _angular_core.FactoryProvider;
|
|
99
163
|
|
|
100
|
-
/**
|
|
101
|
-
* Apply the `ngpCheckbox` directive to an element to that represents the checkbox, such as a `button`.
|
|
102
|
-
*/
|
|
103
|
-
declare class NgpCheckbox {
|
|
104
|
-
/**
|
|
105
|
-
* The id of the checkbox.
|
|
106
|
-
* @internal
|
|
107
|
-
*/
|
|
108
|
-
readonly id: _angular_core.InputSignal<string>;
|
|
109
|
-
/**
|
|
110
|
-
* Defines whether the checkbox is checked.
|
|
111
|
-
*/
|
|
112
|
-
readonly checked: _angular_core.InputSignalWithTransform<boolean | undefined, BooleanInput>;
|
|
113
|
-
/**
|
|
114
|
-
* The default checked state for uncontrolled usage.
|
|
115
|
-
* @default false
|
|
116
|
-
*/
|
|
117
|
-
readonly defaultChecked: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
118
|
-
/**
|
|
119
|
-
* The event that is emitted when the checkbox value changes.
|
|
120
|
-
*/
|
|
121
|
-
readonly checkedChange: _angular_core.OutputEmitterRef<boolean>;
|
|
122
|
-
/**
|
|
123
|
-
* Defines whether the checkbox is indeterminate.
|
|
124
|
-
*/
|
|
125
|
-
readonly indeterminate: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
126
|
-
/**
|
|
127
|
-
* The event that is emitted when the indeterminate value changes.
|
|
128
|
-
*/
|
|
129
|
-
readonly indeterminateChange: _angular_core.OutputEmitterRef<boolean>;
|
|
130
|
-
/**
|
|
131
|
-
* Whether the checkbox is required.
|
|
132
|
-
*/
|
|
133
|
-
readonly required: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
134
|
-
/**
|
|
135
|
-
* Defines whether the checkbox is disabled.
|
|
136
|
-
*/
|
|
137
|
-
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
138
|
-
/**
|
|
139
|
-
* The state of the checkbox.
|
|
140
|
-
*/
|
|
141
|
-
protected readonly state: NgpCheckboxState;
|
|
142
|
-
toggle(event?: Event): void;
|
|
143
|
-
/**
|
|
144
|
-
* Update the checked value.
|
|
145
|
-
*/
|
|
146
|
-
setChecked(value: boolean, options?: SetterOptions): void;
|
|
147
|
-
/**
|
|
148
|
-
* Set the default checked state.
|
|
149
|
-
*/
|
|
150
|
-
setDefaultChecked(value: boolean): void;
|
|
151
|
-
/**
|
|
152
|
-
* Update the indeterminate value.
|
|
153
|
-
*/
|
|
154
|
-
setIndeterminate(value: boolean): void;
|
|
155
|
-
/**
|
|
156
|
-
* Set the disabled value.
|
|
157
|
-
*/
|
|
158
|
-
setDisabled(value: boolean): void;
|
|
159
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpCheckbox, never>;
|
|
160
|
-
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>;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
164
|
export { NgpCheckbox, injectCheckboxState, ngpCheckbox, provideCheckboxState };
|
|
164
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 };
|
|
@@ -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,8 +1,78 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as ng_primitives_number_field from 'ng-primitives/number-field';
|
|
2
2
|
import * as _angular_core from '@angular/core';
|
|
3
3
|
import { Signal, WritableSignal } from '@angular/core';
|
|
4
|
-
import { Observable } from 'rxjs';
|
|
5
4
|
import { NumberInput, BooleanInput } from '@angular/cdk/coercion';
|
|
5
|
+
import * as ng_primitives_state from 'ng-primitives/state';
|
|
6
|
+
import { Observable } from 'rxjs';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Apply the `ngpNumberField` directive to an element that represents the number field
|
|
10
|
+
* and contains the input, increment, and decrement buttons.
|
|
11
|
+
*/
|
|
12
|
+
declare class NgpNumberField {
|
|
13
|
+
/**
|
|
14
|
+
* The id of the number field. If not provided, a unique id will be generated.
|
|
15
|
+
*/
|
|
16
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
17
|
+
/**
|
|
18
|
+
* The value of the number field.
|
|
19
|
+
*/
|
|
20
|
+
readonly value: _angular_core.InputSignalWithTransform<number | null, NumberInput>;
|
|
21
|
+
/**
|
|
22
|
+
* Emits when the value changes.
|
|
23
|
+
*/
|
|
24
|
+
readonly valueChange: _angular_core.OutputEmitterRef<number | null>;
|
|
25
|
+
/**
|
|
26
|
+
* The minimum value.
|
|
27
|
+
*/
|
|
28
|
+
readonly min: _angular_core.InputSignalWithTransform<number, NumberInput>;
|
|
29
|
+
/**
|
|
30
|
+
* The maximum value.
|
|
31
|
+
*/
|
|
32
|
+
readonly max: _angular_core.InputSignalWithTransform<number, NumberInput>;
|
|
33
|
+
/**
|
|
34
|
+
* The step value.
|
|
35
|
+
*/
|
|
36
|
+
readonly step: _angular_core.InputSignalWithTransform<number, NumberInput>;
|
|
37
|
+
/**
|
|
38
|
+
* The large step value (used with Shift key).
|
|
39
|
+
*/
|
|
40
|
+
readonly largeStep: _angular_core.InputSignalWithTransform<number, NumberInput>;
|
|
41
|
+
/**
|
|
42
|
+
* The disabled state of the number field.
|
|
43
|
+
*/
|
|
44
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
45
|
+
/**
|
|
46
|
+
* The readonly state of the number field.
|
|
47
|
+
*/
|
|
48
|
+
readonly readonly: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
49
|
+
/**
|
|
50
|
+
* @internal
|
|
51
|
+
*/
|
|
52
|
+
protected readonly state: ng_primitives_number_field.NgpNumberFieldState;
|
|
53
|
+
/**
|
|
54
|
+
* Set the value of the number field.
|
|
55
|
+
*/
|
|
56
|
+
setValue(value: number | null): void;
|
|
57
|
+
/**
|
|
58
|
+
* Increment the value.
|
|
59
|
+
*/
|
|
60
|
+
increment(multiplier?: number): void;
|
|
61
|
+
/**
|
|
62
|
+
* Decrement the value.
|
|
63
|
+
*/
|
|
64
|
+
decrement(multiplier?: number): void;
|
|
65
|
+
/**
|
|
66
|
+
* Set the disabled state.
|
|
67
|
+
*/
|
|
68
|
+
setDisabled(disabled: boolean): void;
|
|
69
|
+
/**
|
|
70
|
+
* Set the readonly state.
|
|
71
|
+
*/
|
|
72
|
+
setReadonly(readonly: boolean): void;
|
|
73
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpNumberField, never>;
|
|
74
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpNumberField, "[ngpNumberField]", ["ngpNumberField"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "ngpNumberFieldValue"; "required": false; "isSignal": true; }; "min": { "alias": "ngpNumberFieldMin"; "required": false; "isSignal": true; }; "max": { "alias": "ngpNumberFieldMax"; "required": false; "isSignal": true; }; "step": { "alias": "ngpNumberFieldStep"; "required": false; "isSignal": true; }; "largeStep": { "alias": "ngpNumberFieldLargeStep"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpNumberFieldDisabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "ngpNumberFieldReadonly"; "required": false; "isSignal": true; }; }, { "valueChange": "ngpNumberFieldValueChange"; }, never, never, true, never>;
|
|
75
|
+
}
|
|
6
76
|
|
|
7
77
|
/**
|
|
8
78
|
* Public state surface for the NumberField primitive.
|
|
@@ -126,75 +196,6 @@ declare const provideNumberFieldState: (opts?: {
|
|
|
126
196
|
inherit?: boolean;
|
|
127
197
|
}) => _angular_core.FactoryProvider;
|
|
128
198
|
|
|
129
|
-
/**
|
|
130
|
-
* Apply the `ngpNumberField` directive to an element that represents the number field
|
|
131
|
-
* and contains the input, increment, and decrement buttons.
|
|
132
|
-
*/
|
|
133
|
-
declare class NgpNumberField {
|
|
134
|
-
/**
|
|
135
|
-
* The id of the number field. If not provided, a unique id will be generated.
|
|
136
|
-
*/
|
|
137
|
-
readonly id: _angular_core.InputSignal<string>;
|
|
138
|
-
/**
|
|
139
|
-
* The value of the number field.
|
|
140
|
-
*/
|
|
141
|
-
readonly value: _angular_core.InputSignalWithTransform<number | null, NumberInput>;
|
|
142
|
-
/**
|
|
143
|
-
* Emits when the value changes.
|
|
144
|
-
*/
|
|
145
|
-
readonly valueChange: _angular_core.OutputEmitterRef<number | null>;
|
|
146
|
-
/**
|
|
147
|
-
* The minimum value.
|
|
148
|
-
*/
|
|
149
|
-
readonly min: _angular_core.InputSignalWithTransform<number, NumberInput>;
|
|
150
|
-
/**
|
|
151
|
-
* The maximum value.
|
|
152
|
-
*/
|
|
153
|
-
readonly max: _angular_core.InputSignalWithTransform<number, NumberInput>;
|
|
154
|
-
/**
|
|
155
|
-
* The step value.
|
|
156
|
-
*/
|
|
157
|
-
readonly step: _angular_core.InputSignalWithTransform<number, NumberInput>;
|
|
158
|
-
/**
|
|
159
|
-
* The large step value (used with Shift key).
|
|
160
|
-
*/
|
|
161
|
-
readonly largeStep: _angular_core.InputSignalWithTransform<number, NumberInput>;
|
|
162
|
-
/**
|
|
163
|
-
* The disabled state of the number field.
|
|
164
|
-
*/
|
|
165
|
-
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
166
|
-
/**
|
|
167
|
-
* The readonly state of the number field.
|
|
168
|
-
*/
|
|
169
|
-
readonly readonly: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
170
|
-
/**
|
|
171
|
-
* @internal
|
|
172
|
-
*/
|
|
173
|
-
protected readonly state: NgpNumberFieldState;
|
|
174
|
-
/**
|
|
175
|
-
* Set the value of the number field.
|
|
176
|
-
*/
|
|
177
|
-
setValue(value: number | null): void;
|
|
178
|
-
/**
|
|
179
|
-
* Increment the value.
|
|
180
|
-
*/
|
|
181
|
-
increment(multiplier?: number): void;
|
|
182
|
-
/**
|
|
183
|
-
* Decrement the value.
|
|
184
|
-
*/
|
|
185
|
-
decrement(multiplier?: number): void;
|
|
186
|
-
/**
|
|
187
|
-
* Set the disabled state.
|
|
188
|
-
*/
|
|
189
|
-
setDisabled(disabled: boolean): void;
|
|
190
|
-
/**
|
|
191
|
-
* Set the readonly state.
|
|
192
|
-
*/
|
|
193
|
-
setReadonly(readonly: boolean): void;
|
|
194
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpNumberField, never>;
|
|
195
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpNumberField, "[ngpNumberField]", ["ngpNumberField"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "ngpNumberFieldValue"; "required": false; "isSignal": true; }; "min": { "alias": "ngpNumberFieldMin"; "required": false; "isSignal": true; }; "max": { "alias": "ngpNumberFieldMax"; "required": false; "isSignal": true; }; "step": { "alias": "ngpNumberFieldStep"; "required": false; "isSignal": true; }; "largeStep": { "alias": "ngpNumberFieldLargeStep"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpNumberFieldDisabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "ngpNumberFieldReadonly"; "required": false; "isSignal": true; }; }, { "valueChange": "ngpNumberFieldValueChange"; }, never, never, true, never>;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
199
|
/**
|
|
199
200
|
* Apply the `ngpNumberFieldInput` directive to an input element within a number field.
|
|
200
201
|
*/
|