ng-primitives 0.91.2 → 0.93.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/a11y/index.d.ts +3 -1
- package/accordion/index.d.ts +8 -1
- package/autofill/index.d.ts +4 -0
- package/avatar/index.d.ts +11 -2
- package/breadcrumbs/index.d.ts +21 -7
- package/button/index.d.ts +3 -1
- package/checkbox/index.d.ts +3 -1
- package/fesm2022/ng-primitives-checkbox.mjs +7 -8
- package/fesm2022/ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/ng-primitives-file-upload.mjs +209 -202
- package/fesm2022/ng-primitives-file-upload.mjs.map +1 -1
- package/fesm2022/ng-primitives-focus-trap.mjs +107 -138
- package/fesm2022/ng-primitives-focus-trap.mjs.map +1 -1
- package/fesm2022/ng-primitives-form-field.mjs +323 -399
- package/fesm2022/ng-primitives-form-field.mjs.map +1 -1
- package/fesm2022/ng-primitives-interactions.mjs +57 -58
- package/fesm2022/ng-primitives-interactions.mjs.map +1 -1
- package/fesm2022/ng-primitives-listbox.mjs +2 -2
- package/fesm2022/ng-primitives-listbox.mjs.map +1 -1
- package/fesm2022/ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-portal.mjs +5 -1
- package/fesm2022/ng-primitives-portal.mjs.map +1 -1
- package/fesm2022/ng-primitives-slider.mjs +4 -5
- package/fesm2022/ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/ng-primitives-state.mjs +36 -8
- package/fesm2022/ng-primitives-state.mjs.map +1 -1
- package/fesm2022/ng-primitives-switch.mjs +4 -5
- package/fesm2022/ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/ng-primitives-tabs.mjs +194 -192
- package/fesm2022/ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/ng-primitives-toggle-group.mjs +4 -5
- package/fesm2022/ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/ng-primitives-toggle.mjs +4 -5
- package/fesm2022/ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/ng-primitives-tooltip.mjs +4 -4
- package/fesm2022/ng-primitives-tooltip.mjs.map +1 -1
- package/fesm2022/ng-primitives-utils.mjs +23 -14
- package/fesm2022/ng-primitives-utils.mjs.map +1 -1
- package/file-upload/index.d.ts +100 -52
- package/focus-trap/index.d.ts +33 -75
- package/form-field/index.d.ts +320 -123
- package/input/index.d.ts +6 -0
- package/interactions/index.d.ts +16 -16
- package/package.json +1 -1
- package/roving-focus/index.d.ts +6 -2
- package/schematics/ng-generate/templates/tabs/tabs.__fileSuffix@dasherize__.ts.template +2 -2
- package/slider/index.d.ts +14 -6
- package/state/index.d.ts +23 -8
- package/switch/index.d.ts +8 -4
- package/tabs/index.d.ts +333 -84
- package/textarea/index.d.ts +6 -0
- package/toggle/index.d.ts +5 -3
- package/toggle-group/index.d.ts +6 -2
- package/toolbar/index.d.ts +5 -0
- package/utils/index.d.ts +1 -1
package/tabs/index.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { Provider,
|
|
2
|
+
import { Provider, Signal, WritableSignal } from '@angular/core';
|
|
3
3
|
import { NgpOrientation } from 'ng-primitives/common';
|
|
4
|
-
import * as ng_primitives_state from 'ng-primitives/state';
|
|
5
|
-
import * as ng_primitives_tabs from 'ng-primitives/tabs';
|
|
6
4
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
7
|
-
import * as i1 from 'ng-primitives/roving-focus';
|
|
8
5
|
|
|
9
6
|
interface NgpTabsConfig {
|
|
10
7
|
/**
|
|
@@ -33,15 +30,7 @@ declare function provideTabsConfig(config: Partial<NgpTabsConfig>): Provider[];
|
|
|
33
30
|
/**
|
|
34
31
|
* Apply the `ngpTabButton` directive to an element within a tab list to represent a tab button. This directive should be applied to a button element.
|
|
35
32
|
*/
|
|
36
|
-
declare class NgpTabButton
|
|
37
|
-
/**
|
|
38
|
-
* Access the tag host name
|
|
39
|
-
*/
|
|
40
|
-
protected readonly tagName: string;
|
|
41
|
-
/**
|
|
42
|
-
* Access the tabset state
|
|
43
|
-
*/
|
|
44
|
-
protected readonly state: _angular_core.Signal<ng_primitives_state.State<ng_primitives_tabs.NgpTabset>>;
|
|
33
|
+
declare class NgpTabButton {
|
|
45
34
|
/**
|
|
46
35
|
* The value of the tab this trigger controls
|
|
47
36
|
* @required
|
|
@@ -57,55 +46,139 @@ declare class NgpTabButton implements OnInit, OnDestroy {
|
|
|
57
46
|
* @internal
|
|
58
47
|
*/
|
|
59
48
|
readonly id: _angular_core.InputSignal<string | undefined>;
|
|
49
|
+
private readonly state;
|
|
60
50
|
/**
|
|
61
|
-
*
|
|
62
|
-
* @internal
|
|
51
|
+
* Whether the tab is active
|
|
63
52
|
*/
|
|
64
|
-
readonly
|
|
53
|
+
readonly active: Signal<boolean>;
|
|
54
|
+
constructor();
|
|
65
55
|
/**
|
|
66
|
-
*
|
|
67
|
-
|
|
56
|
+
* Select the tab this trigger controls
|
|
57
|
+
*/
|
|
58
|
+
select(): void;
|
|
59
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpTabButton, never>;
|
|
60
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpTabButton, "[ngpTabButton]", ["ngpTabButton"], { "value": { "alias": "ngpTabButtonValue"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpTabButtonDisabled"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The state for the NgpTabButton directive.
|
|
65
|
+
*/
|
|
66
|
+
interface NgpTabButtonState {
|
|
67
|
+
/**
|
|
68
|
+
* The unique id for the tab button.
|
|
68
69
|
*/
|
|
69
|
-
readonly
|
|
70
|
+
readonly id: Signal<string>;
|
|
70
71
|
/**
|
|
71
|
-
* Whether the tab is active
|
|
72
|
+
* Whether the tab is active.
|
|
72
73
|
*/
|
|
73
|
-
readonly active:
|
|
74
|
-
constructor();
|
|
75
|
-
ngOnInit(): void;
|
|
76
|
-
ngOnDestroy(): void;
|
|
74
|
+
readonly active: Signal<boolean>;
|
|
77
75
|
/**
|
|
78
|
-
* Select the tab this trigger controls
|
|
76
|
+
* Select the tab this trigger controls.
|
|
79
77
|
*/
|
|
80
78
|
select(): void;
|
|
81
79
|
/**
|
|
82
|
-
*
|
|
80
|
+
* Register this tab with the tabset.
|
|
83
81
|
*/
|
|
84
|
-
|
|
85
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpTabButton, never>;
|
|
86
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpTabButton, "[ngpTabButton]", ["ngpTabButton"], { "value": { "alias": "ngpTabButtonValue"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpTabButtonDisabled"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.NgpRovingFocusItem; inputs: { "ngpRovingFocusItemDisabled": "ngpTabButtonDisabled"; }; outputs: {}; }]>;
|
|
82
|
+
register(): void;
|
|
87
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* The props for the NgpTabButton state.
|
|
86
|
+
*/
|
|
87
|
+
interface NgpTabButtonProps {
|
|
88
|
+
/**
|
|
89
|
+
* The value of the tab this trigger controls.
|
|
90
|
+
*/
|
|
91
|
+
readonly value: Signal<string>;
|
|
92
|
+
/**
|
|
93
|
+
* Whether the tab is disabled.
|
|
94
|
+
*/
|
|
95
|
+
readonly disabled?: Signal<boolean>;
|
|
96
|
+
/**
|
|
97
|
+
* The id of the tab button.
|
|
98
|
+
*/
|
|
99
|
+
readonly id?: Signal<string | undefined>;
|
|
100
|
+
}
|
|
101
|
+
declare const NgpTabButtonStateToken: _angular_core.InjectionToken<_angular_core.WritableSignal<{
|
|
102
|
+
id: Signal<string>;
|
|
103
|
+
active: Signal<boolean>;
|
|
104
|
+
select: () => void;
|
|
105
|
+
}>>;
|
|
106
|
+
declare const ngpTabButton: ({ value, disabled, id }: NgpTabButtonProps) => {
|
|
107
|
+
id: Signal<string>;
|
|
108
|
+
active: Signal<boolean>;
|
|
109
|
+
select: () => void;
|
|
110
|
+
};
|
|
111
|
+
declare const injectTabButtonState: {
|
|
112
|
+
(): Signal<{
|
|
113
|
+
id: Signal<string>;
|
|
114
|
+
active: Signal<boolean>;
|
|
115
|
+
select: () => void;
|
|
116
|
+
}>;
|
|
117
|
+
(options: {
|
|
118
|
+
hoisted: true;
|
|
119
|
+
optional?: boolean;
|
|
120
|
+
}): Signal<{
|
|
121
|
+
id: Signal<string>;
|
|
122
|
+
active: Signal<boolean>;
|
|
123
|
+
select: () => void;
|
|
124
|
+
} | null>;
|
|
125
|
+
(options?: {
|
|
126
|
+
hoisted?: boolean;
|
|
127
|
+
optional?: boolean;
|
|
128
|
+
}): Signal<{
|
|
129
|
+
id: Signal<string>;
|
|
130
|
+
active: Signal<boolean>;
|
|
131
|
+
select: () => void;
|
|
132
|
+
}> | Signal<{
|
|
133
|
+
id: Signal<string>;
|
|
134
|
+
active: Signal<boolean>;
|
|
135
|
+
select: () => void;
|
|
136
|
+
} | null>;
|
|
137
|
+
};
|
|
138
|
+
declare const provideTabButtonState: (opts?: {
|
|
139
|
+
inherit?: boolean;
|
|
140
|
+
}) => _angular_core.FactoryProvider;
|
|
88
141
|
|
|
89
142
|
/**
|
|
90
143
|
* Apply the `ngpTabList` directive to an element that represents the list of tab buttons.
|
|
91
144
|
*/
|
|
92
145
|
declare class NgpTabList {
|
|
93
|
-
|
|
94
|
-
* Access the tabset state
|
|
95
|
-
*/
|
|
96
|
-
protected readonly state: _angular_core.Signal<ng_primitives_state.State<ng_primitives_tabs.NgpTabset>>;
|
|
146
|
+
constructor();
|
|
97
147
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpTabList, never>;
|
|
98
148
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpTabList, "[ngpTabList]", ["ngpTabList"], {}, {}, never, never, true, never>;
|
|
99
149
|
}
|
|
100
150
|
|
|
151
|
+
/**
|
|
152
|
+
* The state for the NgpTabList directive.
|
|
153
|
+
*/
|
|
154
|
+
interface NgpTabListState {
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* The props for the NgpTabList state.
|
|
158
|
+
*/
|
|
159
|
+
interface NgpTabListProps {
|
|
160
|
+
}
|
|
161
|
+
declare const NgpTabListStateToken: _angular_core.InjectionToken<_angular_core.WritableSignal<{}>>;
|
|
162
|
+
declare const ngpTabList: ({}: NgpTabListProps) => {};
|
|
163
|
+
declare const injectTabListState: {
|
|
164
|
+
(): _angular_core.Signal<{}>;
|
|
165
|
+
(options: {
|
|
166
|
+
hoisted: true;
|
|
167
|
+
optional?: boolean;
|
|
168
|
+
}): _angular_core.Signal<{} | null>;
|
|
169
|
+
(options?: {
|
|
170
|
+
hoisted?: boolean;
|
|
171
|
+
optional?: boolean;
|
|
172
|
+
}): _angular_core.Signal<{}> | _angular_core.Signal<{} | null>;
|
|
173
|
+
};
|
|
174
|
+
declare const provideTabListState: (opts?: {
|
|
175
|
+
inherit?: boolean;
|
|
176
|
+
}) => _angular_core.FactoryProvider;
|
|
177
|
+
|
|
101
178
|
/**
|
|
102
179
|
* Apply the `ngpTabPanel` directive to an element that represents the content of a tab.
|
|
103
180
|
*/
|
|
104
|
-
declare class NgpTabPanel
|
|
105
|
-
/**
|
|
106
|
-
* Access the tabset
|
|
107
|
-
*/
|
|
108
|
-
protected readonly state: _angular_core.Signal<ng_primitives_state.State<ng_primitives_tabs.NgpTabset>>;
|
|
181
|
+
declare class NgpTabPanel {
|
|
109
182
|
/**
|
|
110
183
|
* The value of the tab
|
|
111
184
|
* @required
|
|
@@ -116,31 +189,85 @@ declare class NgpTabPanel implements OnInit {
|
|
|
116
189
|
* @internal
|
|
117
190
|
*/
|
|
118
191
|
readonly id: _angular_core.InputSignal<string | undefined>;
|
|
119
|
-
|
|
120
|
-
* Determine a unique id for the tab panel if not provided
|
|
121
|
-
* @internal
|
|
122
|
-
*/
|
|
123
|
-
protected readonly panelId: _angular_core.Signal<string>;
|
|
124
|
-
/**
|
|
125
|
-
* Determine the aria-labelledby of the tab panel
|
|
126
|
-
* @internal
|
|
127
|
-
*/
|
|
128
|
-
protected readonly labelledBy: _angular_core.Signal<string>;
|
|
192
|
+
private readonly state;
|
|
129
193
|
/**
|
|
130
194
|
* Whether the tab is active
|
|
131
195
|
*/
|
|
132
|
-
|
|
133
|
-
ngOnInit(): void;
|
|
196
|
+
readonly active: _angular_core.Signal<boolean>;
|
|
134
197
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpTabPanel, never>;
|
|
135
198
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpTabPanel, "[ngpTabPanel]", ["ngpTabPanel"], { "value": { "alias": "ngpTabPanelValue"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
136
199
|
}
|
|
137
200
|
|
|
138
|
-
declare const NgpTabPanelToken: InjectionToken<NgpTabPanel>;
|
|
139
201
|
/**
|
|
140
|
-
*
|
|
141
|
-
* @returns The TabPanel directive instance
|
|
202
|
+
* The state for the NgpTabPanel directive.
|
|
142
203
|
*/
|
|
143
|
-
|
|
204
|
+
interface NgpTabPanelState {
|
|
205
|
+
/**
|
|
206
|
+
* The unique id for the tab panel.
|
|
207
|
+
*/
|
|
208
|
+
readonly panelId: Signal<string>;
|
|
209
|
+
/**
|
|
210
|
+
* The aria-labelledby attribute for the tab panel.
|
|
211
|
+
*/
|
|
212
|
+
readonly labelledBy: Signal<string>;
|
|
213
|
+
/**
|
|
214
|
+
* Whether the tab panel is active.
|
|
215
|
+
*/
|
|
216
|
+
readonly active: Signal<boolean>;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* The props for the NgpTabPanel state.
|
|
220
|
+
*/
|
|
221
|
+
interface NgpTabPanelProps {
|
|
222
|
+
/**
|
|
223
|
+
* The value of the tab this panel represents.
|
|
224
|
+
*/
|
|
225
|
+
readonly value: Signal<string | undefined>;
|
|
226
|
+
/**
|
|
227
|
+
* The id of the tab panel.
|
|
228
|
+
*/
|
|
229
|
+
readonly id?: Signal<string | undefined>;
|
|
230
|
+
}
|
|
231
|
+
declare const NgpTabPanelStateToken: _angular_core.InjectionToken<_angular_core.WritableSignal<{
|
|
232
|
+
panelId: Signal<string>;
|
|
233
|
+
labelledBy: Signal<string>;
|
|
234
|
+
active: Signal<boolean>;
|
|
235
|
+
}>>;
|
|
236
|
+
declare const ngpTabPanel: ({ value, id }: NgpTabPanelProps) => {
|
|
237
|
+
panelId: Signal<string>;
|
|
238
|
+
labelledBy: Signal<string>;
|
|
239
|
+
active: Signal<boolean>;
|
|
240
|
+
};
|
|
241
|
+
declare const injectTabPanelState: {
|
|
242
|
+
(): Signal<{
|
|
243
|
+
panelId: Signal<string>;
|
|
244
|
+
labelledBy: Signal<string>;
|
|
245
|
+
active: Signal<boolean>;
|
|
246
|
+
}>;
|
|
247
|
+
(options: {
|
|
248
|
+
hoisted: true;
|
|
249
|
+
optional?: boolean;
|
|
250
|
+
}): Signal<{
|
|
251
|
+
panelId: Signal<string>;
|
|
252
|
+
labelledBy: Signal<string>;
|
|
253
|
+
active: Signal<boolean>;
|
|
254
|
+
} | null>;
|
|
255
|
+
(options?: {
|
|
256
|
+
hoisted?: boolean;
|
|
257
|
+
optional?: boolean;
|
|
258
|
+
}): Signal<{
|
|
259
|
+
panelId: Signal<string>;
|
|
260
|
+
labelledBy: Signal<string>;
|
|
261
|
+
active: Signal<boolean>;
|
|
262
|
+
}> | Signal<{
|
|
263
|
+
panelId: Signal<string>;
|
|
264
|
+
labelledBy: Signal<string>;
|
|
265
|
+
active: Signal<boolean>;
|
|
266
|
+
} | null>;
|
|
267
|
+
};
|
|
268
|
+
declare const provideTabPanelState: (opts?: {
|
|
269
|
+
inherit?: boolean;
|
|
270
|
+
}) => _angular_core.FactoryProvider;
|
|
144
271
|
|
|
145
272
|
/**
|
|
146
273
|
* Apply the `ngpTabset` directive to an element to manage the tabs.
|
|
@@ -150,10 +277,6 @@ declare class NgpTabset {
|
|
|
150
277
|
* Access the global tabset configuration
|
|
151
278
|
*/
|
|
152
279
|
private readonly config;
|
|
153
|
-
/**
|
|
154
|
-
* Access the roving focus group state
|
|
155
|
-
*/
|
|
156
|
-
private readonly rovingFocusGroupState;
|
|
157
280
|
/**
|
|
158
281
|
* Define the id for the tabset
|
|
159
282
|
*/
|
|
@@ -175,48 +298,174 @@ declare class NgpTabset {
|
|
|
175
298
|
* Whether tabs should activate on focus
|
|
176
299
|
*/
|
|
177
300
|
readonly activateOnFocus: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
178
|
-
|
|
179
|
-
* Access the tabs within the tabset
|
|
180
|
-
* @internal
|
|
181
|
-
*/
|
|
182
|
-
readonly buttons: _angular_core.WritableSignal<NgpTabButton[]>;
|
|
301
|
+
private readonly state;
|
|
183
302
|
/**
|
|
184
303
|
* @internal
|
|
185
304
|
* Get the id of the selected tab
|
|
186
305
|
*/
|
|
187
306
|
readonly selectedTab: _angular_core.Signal<string | undefined>;
|
|
188
|
-
/**
|
|
189
|
-
* The state of the tabset
|
|
190
|
-
*/
|
|
191
|
-
protected readonly state: ng_primitives_state.CreatedState<NgpTabset>;
|
|
192
307
|
constructor();
|
|
193
308
|
/**
|
|
194
309
|
* Select a tab by its value
|
|
195
310
|
* @param value The value of the tab to select
|
|
196
311
|
*/
|
|
197
312
|
select(value: string): void;
|
|
198
|
-
/**
|
|
199
|
-
* @internal
|
|
200
|
-
* Register a tab with the tabset
|
|
201
|
-
*/
|
|
202
|
-
registerTab(tab: NgpTabButton): void;
|
|
203
|
-
/**
|
|
204
|
-
* @internal
|
|
205
|
-
* Unregister a tab with the tabset
|
|
206
|
-
*/
|
|
207
|
-
unregisterTab(tab: NgpTabButton): void;
|
|
208
313
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgpTabset, never>;
|
|
209
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpTabset, "[ngpTabset]", ["ngpTabset"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "ngpTabsetValue"; "required": false; "isSignal": true; }; "orientation": { "alias": "ngpTabsetOrientation"; "required": false; "isSignal": true; }; "activateOnFocus": { "alias": "ngpTabsetActivateOnFocus"; "required": false; "isSignal": true; }; }, { "valueChange": "ngpTabsetValueChange"; }, never, never, true,
|
|
314
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpTabset, "[ngpTabset]", ["ngpTabset"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "ngpTabsetValue"; "required": false; "isSignal": true; }; "orientation": { "alias": "ngpTabsetOrientation"; "required": false; "isSignal": true; }; "activateOnFocus": { "alias": "ngpTabsetActivateOnFocus"; "required": false; "isSignal": true; }; }, { "valueChange": "ngpTabsetValueChange"; }, never, never, true, never>;
|
|
210
315
|
}
|
|
211
316
|
|
|
212
317
|
/**
|
|
213
|
-
*
|
|
318
|
+
* The state for the NgpTabset directive.
|
|
214
319
|
*/
|
|
215
|
-
|
|
320
|
+
interface NgpTabsetState {
|
|
321
|
+
/**
|
|
322
|
+
* The unique id for the tabset.
|
|
323
|
+
*/
|
|
324
|
+
readonly id: Signal<string>;
|
|
325
|
+
/**
|
|
326
|
+
* The orientation of the tabset.
|
|
327
|
+
*/
|
|
328
|
+
readonly orientation: Signal<NgpOrientation>;
|
|
329
|
+
/**
|
|
330
|
+
* Whether tabs should activate on focus.
|
|
331
|
+
*/
|
|
332
|
+
readonly activateOnFocus: Signal<boolean>;
|
|
333
|
+
/**
|
|
334
|
+
* The selected tab value.
|
|
335
|
+
*/
|
|
336
|
+
readonly value: WritableSignal<string | undefined>;
|
|
337
|
+
/**
|
|
338
|
+
* The selected tab computed value.
|
|
339
|
+
*/
|
|
340
|
+
readonly selectedTab: Signal<string | undefined>;
|
|
341
|
+
/**
|
|
342
|
+
* Select a tab by its value.
|
|
343
|
+
*/
|
|
344
|
+
select(value: string): void;
|
|
345
|
+
/**
|
|
346
|
+
* Set orientation of the tabset.
|
|
347
|
+
*/
|
|
348
|
+
setOrientation(orientation: NgpOrientation): void;
|
|
349
|
+
/**
|
|
350
|
+
* @internal Register a tab with the tabset.
|
|
351
|
+
*/
|
|
352
|
+
registerTab(value: string, disabled: () => boolean): void;
|
|
353
|
+
/**
|
|
354
|
+
* @internal Unregister a tab with the tabset.
|
|
355
|
+
*/
|
|
356
|
+
unregisterTab(value: string): void;
|
|
357
|
+
}
|
|
216
358
|
/**
|
|
217
|
-
*
|
|
359
|
+
* The props for the NgpTabset state.
|
|
218
360
|
*/
|
|
219
|
-
|
|
361
|
+
interface NgpTabsetProps {
|
|
362
|
+
/**
|
|
363
|
+
* The unique id for the tabset.
|
|
364
|
+
*/
|
|
365
|
+
readonly id?: Signal<string>;
|
|
366
|
+
/**
|
|
367
|
+
* The selected tab value.
|
|
368
|
+
*/
|
|
369
|
+
readonly value?: Signal<string | undefined>;
|
|
370
|
+
/**
|
|
371
|
+
* The orientation of the tabset.
|
|
372
|
+
*/
|
|
373
|
+
readonly orientation?: Signal<NgpOrientation>;
|
|
374
|
+
/**
|
|
375
|
+
* Whether tabs should activate on focus.
|
|
376
|
+
*/
|
|
377
|
+
readonly activateOnFocus?: Signal<boolean>;
|
|
378
|
+
/**
|
|
379
|
+
* Callback when the selected tab changes.
|
|
380
|
+
*/
|
|
381
|
+
readonly onValueChange?: (value: string | undefined) => void;
|
|
382
|
+
}
|
|
383
|
+
declare const NgpTabsetStateToken: _angular_core.InjectionToken<WritableSignal<{
|
|
384
|
+
id: Signal<string>;
|
|
385
|
+
orientation: WritableSignal<NgpOrientation>;
|
|
386
|
+
activateOnFocus: Signal<boolean>;
|
|
387
|
+
value: WritableSignal<string | undefined>;
|
|
388
|
+
selectedTab: Signal<string | undefined>;
|
|
389
|
+
select: (newValue: string) => void;
|
|
390
|
+
setOrientation: (newOrientation: NgpOrientation) => void;
|
|
391
|
+
registerTab: (tab: NgpTab) => void;
|
|
392
|
+
unregisterTab: (tabValue: string) => void;
|
|
393
|
+
}>>;
|
|
394
|
+
declare const ngpTabset: ({ id, value: _value, orientation: _orientation, activateOnFocus, onValueChange, }: NgpTabsetProps) => {
|
|
395
|
+
id: Signal<string>;
|
|
396
|
+
orientation: WritableSignal<NgpOrientation>;
|
|
397
|
+
activateOnFocus: Signal<boolean>;
|
|
398
|
+
value: WritableSignal<string | undefined>;
|
|
399
|
+
selectedTab: Signal<string | undefined>;
|
|
400
|
+
select: (newValue: string) => void;
|
|
401
|
+
setOrientation: (newOrientation: NgpOrientation) => void;
|
|
402
|
+
registerTab: (tab: NgpTab) => void;
|
|
403
|
+
unregisterTab: (tabValue: string) => void;
|
|
404
|
+
};
|
|
405
|
+
declare const injectTabsetState: {
|
|
406
|
+
(): Signal<{
|
|
407
|
+
id: Signal<string>;
|
|
408
|
+
orientation: WritableSignal<NgpOrientation>;
|
|
409
|
+
activateOnFocus: Signal<boolean>;
|
|
410
|
+
value: WritableSignal<string | undefined>;
|
|
411
|
+
selectedTab: Signal<string | undefined>;
|
|
412
|
+
select: (newValue: string) => void;
|
|
413
|
+
setOrientation: (newOrientation: NgpOrientation) => void;
|
|
414
|
+
registerTab: (tab: NgpTab) => void;
|
|
415
|
+
unregisterTab: (tabValue: string) => void;
|
|
416
|
+
}>;
|
|
417
|
+
(options: {
|
|
418
|
+
hoisted: true;
|
|
419
|
+
optional?: boolean;
|
|
420
|
+
}): Signal<{
|
|
421
|
+
id: Signal<string>;
|
|
422
|
+
orientation: WritableSignal<NgpOrientation>;
|
|
423
|
+
activateOnFocus: Signal<boolean>;
|
|
424
|
+
value: WritableSignal<string | undefined>;
|
|
425
|
+
selectedTab: Signal<string | undefined>;
|
|
426
|
+
select: (newValue: string) => void;
|
|
427
|
+
setOrientation: (newOrientation: NgpOrientation) => void;
|
|
428
|
+
registerTab: (tab: NgpTab) => void;
|
|
429
|
+
unregisterTab: (tabValue: string) => void;
|
|
430
|
+
} | null>;
|
|
431
|
+
(options?: {
|
|
432
|
+
hoisted?: boolean;
|
|
433
|
+
optional?: boolean;
|
|
434
|
+
}): Signal<{
|
|
435
|
+
id: Signal<string>;
|
|
436
|
+
orientation: WritableSignal<NgpOrientation>;
|
|
437
|
+
activateOnFocus: Signal<boolean>;
|
|
438
|
+
value: WritableSignal<string | undefined>;
|
|
439
|
+
selectedTab: Signal<string | undefined>;
|
|
440
|
+
select: (newValue: string) => void;
|
|
441
|
+
setOrientation: (newOrientation: NgpOrientation) => void;
|
|
442
|
+
registerTab: (tab: NgpTab) => void;
|
|
443
|
+
unregisterTab: (tabValue: string) => void;
|
|
444
|
+
}> | Signal<{
|
|
445
|
+
id: Signal<string>;
|
|
446
|
+
orientation: WritableSignal<NgpOrientation>;
|
|
447
|
+
activateOnFocus: Signal<boolean>;
|
|
448
|
+
value: WritableSignal<string | undefined>;
|
|
449
|
+
selectedTab: Signal<string | undefined>;
|
|
450
|
+
select: (newValue: string) => void;
|
|
451
|
+
setOrientation: (newOrientation: NgpOrientation) => void;
|
|
452
|
+
registerTab: (tab: NgpTab) => void;
|
|
453
|
+
unregisterTab: (tabValue: string) => void;
|
|
454
|
+
} | null>;
|
|
455
|
+
};
|
|
456
|
+
declare const provideTabsetState: (opts?: {
|
|
457
|
+
inherit?: boolean;
|
|
458
|
+
}) => _angular_core.FactoryProvider;
|
|
459
|
+
interface NgpTab {
|
|
460
|
+
/**
|
|
461
|
+
* The unique value for the tab.
|
|
462
|
+
*/
|
|
463
|
+
readonly value: Signal<string>;
|
|
464
|
+
/**
|
|
465
|
+
* Whether the tab is disabled.
|
|
466
|
+
*/
|
|
467
|
+
readonly disabled: Signal<boolean>;
|
|
468
|
+
}
|
|
220
469
|
|
|
221
|
-
export { NgpTabButton, NgpTabList, NgpTabPanel,
|
|
222
|
-
export type { NgpTabsConfig };
|
|
470
|
+
export { NgpTabButton, NgpTabButtonStateToken, NgpTabList, NgpTabListStateToken, NgpTabPanel, NgpTabPanelStateToken, NgpTabset, NgpTabsetStateToken, injectTabButtonState, injectTabListState, injectTabPanelState, injectTabsetState, ngpTabButton, ngpTabList, ngpTabPanel, ngpTabset, provideTabButtonState, provideTabListState, provideTabPanelState, provideTabsConfig, provideTabsetState };
|
|
471
|
+
export type { NgpTabButtonProps, NgpTabButtonState, NgpTabListProps, NgpTabListState, NgpTabPanelProps, NgpTabPanelState, NgpTabsConfig, NgpTabsetProps, NgpTabsetState };
|
package/textarea/index.d.ts
CHANGED
|
@@ -66,6 +66,7 @@ declare const injectTextareaState: {
|
|
|
66
66
|
}>;
|
|
67
67
|
(options: {
|
|
68
68
|
hoisted: true;
|
|
69
|
+
optional?: boolean;
|
|
69
70
|
}): Signal<{
|
|
70
71
|
id: Signal<string>;
|
|
71
72
|
disabled: WritableSignal<boolean>;
|
|
@@ -73,10 +74,15 @@ declare const injectTextareaState: {
|
|
|
73
74
|
} | null>;
|
|
74
75
|
(options?: {
|
|
75
76
|
hoisted?: boolean;
|
|
77
|
+
optional?: boolean;
|
|
76
78
|
}): Signal<{
|
|
77
79
|
id: Signal<string>;
|
|
78
80
|
disabled: WritableSignal<boolean>;
|
|
79
81
|
setDisabled: (value: boolean) => void;
|
|
82
|
+
}> | Signal<{
|
|
83
|
+
id: Signal<string>;
|
|
84
|
+
disabled: WritableSignal<boolean>;
|
|
85
|
+
setDisabled: (value: boolean) => void;
|
|
80
86
|
} | null>;
|
|
81
87
|
};
|
|
82
88
|
declare const provideTextareaState: (opts?: {
|
package/toggle/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { WritableSignal, Signal } from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
4
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -18,7 +18,7 @@ interface NgpToggleState {
|
|
|
18
18
|
/**
|
|
19
19
|
* Emits when the selected state changes.
|
|
20
20
|
*/
|
|
21
|
-
readonly selectedChange:
|
|
21
|
+
readonly selectedChange: Observable<boolean>;
|
|
22
22
|
/**
|
|
23
23
|
* Toggle the selected state.
|
|
24
24
|
*/
|
|
@@ -54,10 +54,12 @@ declare const injectToggleState: {
|
|
|
54
54
|
(): Signal<NgpToggleState>;
|
|
55
55
|
(options: {
|
|
56
56
|
hoisted: true;
|
|
57
|
+
optional?: boolean;
|
|
57
58
|
}): Signal<NgpToggleState | null>;
|
|
58
59
|
(options?: {
|
|
59
60
|
hoisted?: boolean;
|
|
60
|
-
|
|
61
|
+
optional?: boolean;
|
|
62
|
+
}): Signal<NgpToggleState> | Signal<NgpToggleState | null>;
|
|
61
63
|
};
|
|
62
64
|
declare const provideToggleState: (opts?: {
|
|
63
65
|
inherit?: boolean;
|
package/toggle-group/index.d.ts
CHANGED
|
@@ -55,10 +55,12 @@ declare const injectToggleGroupItemState: {
|
|
|
55
55
|
(): Signal<NgpToggleGroupItemState>;
|
|
56
56
|
(options: {
|
|
57
57
|
hoisted: true;
|
|
58
|
+
optional?: boolean;
|
|
58
59
|
}): Signal<NgpToggleGroupItemState | null>;
|
|
59
60
|
(options?: {
|
|
60
61
|
hoisted?: boolean;
|
|
61
|
-
|
|
62
|
+
optional?: boolean;
|
|
63
|
+
}): Signal<NgpToggleGroupItemState> | Signal<NgpToggleGroupItemState | null>;
|
|
62
64
|
};
|
|
63
65
|
declare const provideToggleGroupItemState: (opts?: {
|
|
64
66
|
inherit?: boolean;
|
|
@@ -113,10 +115,12 @@ declare const injectToggleGroupState: {
|
|
|
113
115
|
(): Signal<NgpToggleGroupState>;
|
|
114
116
|
(options: {
|
|
115
117
|
hoisted: true;
|
|
118
|
+
optional?: boolean;
|
|
116
119
|
}): Signal<NgpToggleGroupState | null>;
|
|
117
120
|
(options?: {
|
|
118
121
|
hoisted?: boolean;
|
|
119
|
-
|
|
122
|
+
optional?: boolean;
|
|
123
|
+
}): Signal<NgpToggleGroupState> | Signal<NgpToggleGroupState | null>;
|
|
120
124
|
};
|
|
121
125
|
declare const provideToggleGroupState: (opts?: {
|
|
122
126
|
inherit?: boolean;
|
package/toolbar/index.d.ts
CHANGED
|
@@ -25,15 +25,20 @@ declare const injectToolbarState: {
|
|
|
25
25
|
}>;
|
|
26
26
|
(options: {
|
|
27
27
|
hoisted: true;
|
|
28
|
+
optional?: boolean;
|
|
28
29
|
}): Signal<{
|
|
29
30
|
orientation: WritableSignal<NgpOrientation>;
|
|
30
31
|
setOrientation: (value: NgpOrientation) => void;
|
|
31
32
|
} | null>;
|
|
32
33
|
(options?: {
|
|
33
34
|
hoisted?: boolean;
|
|
35
|
+
optional?: boolean;
|
|
34
36
|
}): Signal<{
|
|
35
37
|
orientation: WritableSignal<NgpOrientation>;
|
|
36
38
|
setOrientation: (value: NgpOrientation) => void;
|
|
39
|
+
}> | Signal<{
|
|
40
|
+
orientation: WritableSignal<NgpOrientation>;
|
|
41
|
+
setOrientation: (value: NgpOrientation) => void;
|
|
37
42
|
} | null>;
|
|
38
43
|
};
|
|
39
44
|
declare const provideToolbarState: (opts?: {
|
package/utils/index.d.ts
CHANGED
|
@@ -152,7 +152,7 @@ declare function safeTakeUntilDestroyed<T>(destroyRef?: DestroyRef): MonoTypeOpe
|
|
|
152
152
|
* @param options.injector
|
|
153
153
|
* @internal
|
|
154
154
|
*/
|
|
155
|
-
declare function onChange<T>(source: Signal<T
|
|
155
|
+
declare function onChange<T>(source: Signal<T>, fn: (value: T, previousValue: T | null | undefined) => void, options?: {
|
|
156
156
|
injector: Injector;
|
|
157
157
|
}): void;
|
|
158
158
|
/**
|