ng-primitives 0.99.3 → 0.99.5
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-dialog.mjs +2 -1
- package/fesm2022/ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/ng-primitives-file-upload.mjs +3 -2
- package/fesm2022/ng-primitives-file-upload.mjs.map +1 -1
- package/fesm2022/ng-primitives-interactions.mjs +2 -2
- package/fesm2022/ng-primitives-interactions.mjs.map +1 -1
- package/fesm2022/ng-primitives-internal.mjs +2 -2
- package/fesm2022/ng-primitives-internal.mjs.map +1 -1
- package/fesm2022/ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-portal.mjs +2 -1
- package/fesm2022/ng-primitives-portal.mjs.map +1 -1
- package/fesm2022/ng-primitives-progress.mjs +1 -1
- package/fesm2022/ng-primitives-toggle-group.mjs +1 -1
- package/fesm2022/ng-primitives-toolbar.mjs +1 -1
- package/file-upload/index.d.ts +165 -1
- package/menu/index.d.ts +1 -1
- package/package.json +1 -1
- package/progress/index.d.ts +107 -2
- package/toggle-group/index.d.ts +51 -2
- package/toolbar/index.d.ts +28 -1
package/file-upload/index.d.ts
CHANGED
|
@@ -45,6 +45,91 @@ declare class NgpFileDropzone {
|
|
|
45
45
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpFileDropzone, "[ngpFileDropzone]", ["ngpFileDropzone"], { "fileTypes": { "alias": "ngpFileDropzoneFileTypes"; "required": false; "isSignal": true; }; "multiple": { "alias": "ngpFileDropzoneMultiple"; "required": false; "isSignal": true; }; "directory": { "alias": "ngpFileDropzoneDirectory"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpFileDropzoneDisabled"; "required": false; "isSignal": true; }; }, { "selected": "ngpFileDropzoneSelected"; "rejected": "ngpFileDropzoneRejected"; "dragOver": "ngpFileDropzoneDragOver"; }, never, never, true, never>;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
/**
|
|
49
|
+
* The state for the NgpFileDropzone directive.
|
|
50
|
+
*/
|
|
51
|
+
interface NgpFileDropzoneState {
|
|
52
|
+
/**
|
|
53
|
+
* Whether the file dropzone is disabled.
|
|
54
|
+
*/
|
|
55
|
+
readonly disabled: Signal<boolean | undefined>;
|
|
56
|
+
/**
|
|
57
|
+
* Whether the user is currently dragging over the element.
|
|
58
|
+
*/
|
|
59
|
+
readonly isDragOver: Signal<boolean>;
|
|
60
|
+
/**
|
|
61
|
+
* Observable that emits when files are selected.
|
|
62
|
+
*/
|
|
63
|
+
readonly selected: Observable<FileList | null>;
|
|
64
|
+
/**
|
|
65
|
+
* Observable that emits when files are rejected.
|
|
66
|
+
*/
|
|
67
|
+
readonly rejected: Observable<void>;
|
|
68
|
+
/**
|
|
69
|
+
* Observable that emits when drag over state changes.
|
|
70
|
+
*/
|
|
71
|
+
readonly dragOver: Observable<boolean>;
|
|
72
|
+
/**
|
|
73
|
+
* Set the accepted file types.
|
|
74
|
+
*/
|
|
75
|
+
readonly fileTypes: Signal<string[] | undefined>;
|
|
76
|
+
/**
|
|
77
|
+
* Whether multiple files can be selected.
|
|
78
|
+
*/
|
|
79
|
+
readonly multiple: Signal<boolean | undefined>;
|
|
80
|
+
/**
|
|
81
|
+
* Whether directories can be selected.
|
|
82
|
+
*/
|
|
83
|
+
readonly directory: Signal<boolean | undefined>;
|
|
84
|
+
/**
|
|
85
|
+
* Set the disabled state.
|
|
86
|
+
*/
|
|
87
|
+
setDisabled(value: boolean): void;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* The props for the NgpFileDropzone state.
|
|
91
|
+
*/
|
|
92
|
+
interface NgpFileDropzoneProps {
|
|
93
|
+
/**
|
|
94
|
+
* The accepted file types.
|
|
95
|
+
*/
|
|
96
|
+
readonly fileTypes?: Signal<string[] | undefined>;
|
|
97
|
+
/**
|
|
98
|
+
* Whether multiple files can be selected.
|
|
99
|
+
*/
|
|
100
|
+
readonly multiple?: Signal<boolean>;
|
|
101
|
+
/**
|
|
102
|
+
* Whether directories can be selected.
|
|
103
|
+
*/
|
|
104
|
+
readonly directory?: Signal<boolean>;
|
|
105
|
+
/**
|
|
106
|
+
* Whether the file dropzone is disabled.
|
|
107
|
+
*/
|
|
108
|
+
readonly disabled?: Signal<boolean>;
|
|
109
|
+
/**
|
|
110
|
+
* Callback when files are selected.
|
|
111
|
+
*/
|
|
112
|
+
readonly onSelected?: (files: FileList | null) => void;
|
|
113
|
+
/**
|
|
114
|
+
* Callback when files are rejected.
|
|
115
|
+
*/
|
|
116
|
+
readonly onRejected?: () => void;
|
|
117
|
+
/**
|
|
118
|
+
* Callback when drag over state changes.
|
|
119
|
+
*/
|
|
120
|
+
readonly onDragOver?: (isDragOver: boolean) => void;
|
|
121
|
+
}
|
|
122
|
+
declare const ngpFileDropzone: ({ fileTypes, multiple, directory, disabled: _disabled, onSelected, onRejected, onDragOver, }: NgpFileDropzoneProps) => {
|
|
123
|
+
disabled: _angular_core.WritableSignal<boolean>;
|
|
124
|
+
fileTypes: Signal<string[] | undefined>;
|
|
125
|
+
multiple: Signal<boolean>;
|
|
126
|
+
directory: Signal<boolean>;
|
|
127
|
+
isDragOver: _angular_core.WritableSignal<boolean>;
|
|
128
|
+
selected: Observable<FileList | null>;
|
|
129
|
+
rejected: Observable<void>;
|
|
130
|
+
dragOver: Observable<boolean>;
|
|
131
|
+
setDisabled: (value: boolean) => void;
|
|
132
|
+
};
|
|
48
133
|
declare const injectFileDropzoneState: {
|
|
49
134
|
(): Signal<{
|
|
50
135
|
disabled: _angular_core.WritableSignal<boolean>;
|
|
@@ -156,6 +241,84 @@ declare class NgpFileUpload {
|
|
|
156
241
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpFileUpload, "[ngpFileUpload]", ["ngpFileUpload"], { "fileTypes": { "alias": "ngpFileUploadFileTypes"; "required": false; "isSignal": true; }; "multiple": { "alias": "ngpFileUploadMultiple"; "required": false; "isSignal": true; }; "directory": { "alias": "ngpFileUploadDirectory"; "required": false; "isSignal": true; }; "dragAndDrop": { "alias": "ngpFileUploadDragDrop"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpFileUploadDisabled"; "required": false; "isSignal": true; }; }, { "selected": "ngpFileUploadSelected"; "canceled": "ngpFileUploadCanceled"; "rejected": "ngpFileUploadRejected"; "dragOver": "ngpFileUploadDragOver"; }, never, never, true, never>;
|
|
157
242
|
}
|
|
158
243
|
|
|
244
|
+
/**
|
|
245
|
+
* The state for the NgpFileUpload directive.
|
|
246
|
+
*/
|
|
247
|
+
interface NgpFileUploadState {
|
|
248
|
+
/**
|
|
249
|
+
* Whether the user is currently dragging over the element.
|
|
250
|
+
*/
|
|
251
|
+
readonly isDragOver: Signal<boolean>;
|
|
252
|
+
/**
|
|
253
|
+
* Observable that emits when files are selected.
|
|
254
|
+
*/
|
|
255
|
+
readonly selected: Observable<FileList | null>;
|
|
256
|
+
/**
|
|
257
|
+
* Observable that emits when file selection is canceled.
|
|
258
|
+
*/
|
|
259
|
+
readonly canceled: Observable<void>;
|
|
260
|
+
/**
|
|
261
|
+
* Observable that emits when files are rejected.
|
|
262
|
+
*/
|
|
263
|
+
readonly rejected: Observable<void>;
|
|
264
|
+
/**
|
|
265
|
+
* Observable that emits when drag over state changes.
|
|
266
|
+
*/
|
|
267
|
+
readonly dragOver: Observable<boolean>;
|
|
268
|
+
/**
|
|
269
|
+
* Show the file dialog.
|
|
270
|
+
*/
|
|
271
|
+
showFileDialog(): void;
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* The props for the NgpFileUpload state.
|
|
275
|
+
*/
|
|
276
|
+
interface NgpFileUploadProps {
|
|
277
|
+
/**
|
|
278
|
+
* The accepted file types.
|
|
279
|
+
*/
|
|
280
|
+
readonly fileTypes?: Signal<string[] | undefined>;
|
|
281
|
+
/**
|
|
282
|
+
* Whether multiple files can be selected.
|
|
283
|
+
*/
|
|
284
|
+
readonly multiple?: Signal<boolean>;
|
|
285
|
+
/**
|
|
286
|
+
* Whether directories can be selected.
|
|
287
|
+
*/
|
|
288
|
+
readonly directory?: Signal<boolean>;
|
|
289
|
+
/**
|
|
290
|
+
* Whether drag and drop is enabled.
|
|
291
|
+
*/
|
|
292
|
+
readonly dragAndDrop?: Signal<boolean>;
|
|
293
|
+
/**
|
|
294
|
+
* Whether the file upload is disabled.
|
|
295
|
+
*/
|
|
296
|
+
readonly disabled?: Signal<boolean>;
|
|
297
|
+
/**
|
|
298
|
+
* Callback when files are selected.
|
|
299
|
+
*/
|
|
300
|
+
readonly onSelected?: (files: FileList | null) => void;
|
|
301
|
+
/**
|
|
302
|
+
* Callback when file selection is canceled.
|
|
303
|
+
*/
|
|
304
|
+
readonly onCanceled?: () => void;
|
|
305
|
+
/**
|
|
306
|
+
* Callback when files are rejected.
|
|
307
|
+
*/
|
|
308
|
+
readonly onRejected?: () => void;
|
|
309
|
+
/**
|
|
310
|
+
* Callback when drag over state changes.
|
|
311
|
+
*/
|
|
312
|
+
readonly onDragOver?: (isDragOver: boolean) => void;
|
|
313
|
+
}
|
|
314
|
+
declare const ngpFileUpload: ({ fileTypes, multiple, directory, dragAndDrop, disabled, onSelected, onCanceled, onRejected, onDragOver, }: NgpFileUploadProps) => {
|
|
315
|
+
isDragOver: _angular_core.WritableSignal<boolean>;
|
|
316
|
+
selected: Observable<FileList | null>;
|
|
317
|
+
canceled: Observable<void>;
|
|
318
|
+
rejected: Observable<void>;
|
|
319
|
+
dragOver: Observable<boolean>;
|
|
320
|
+
showFileDialog: () => void;
|
|
321
|
+
};
|
|
159
322
|
declare const injectFileUploadState: {
|
|
160
323
|
(): Signal<{
|
|
161
324
|
isDragOver: _angular_core.WritableSignal<boolean>;
|
|
@@ -201,4 +364,5 @@ declare const provideFileUploadState: (opts?: {
|
|
|
201
364
|
inherit?: boolean;
|
|
202
365
|
}) => _angular_core.FactoryProvider;
|
|
203
366
|
|
|
204
|
-
export { NgpFileDropzone, NgpFileUpload, injectFileDropzoneState, injectFileUploadState, provideFileDropzoneState, provideFileUploadState };
|
|
367
|
+
export { NgpFileDropzone, NgpFileUpload, injectFileDropzoneState, injectFileUploadState, ngpFileDropzone, ngpFileUpload, provideFileDropzoneState, provideFileUploadState };
|
|
368
|
+
export type { NgpFileDropzoneProps, NgpFileDropzoneState, NgpFileUploadProps, NgpFileUploadState };
|
package/menu/index.d.ts
CHANGED
|
@@ -188,7 +188,7 @@ interface NgpMenuTriggerState<T = unknown> {
|
|
|
188
188
|
/**
|
|
189
189
|
* The context provided to the menu.
|
|
190
190
|
*/
|
|
191
|
-
readonly context
|
|
191
|
+
readonly context: WritableSignal<T>;
|
|
192
192
|
/**
|
|
193
193
|
* Set whether the trigger is disabled.
|
|
194
194
|
* @param isDisabled - Whether the trigger is disabled
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "ng-primitives",
|
|
3
3
|
"description": "Angular Primitives is a low-level headless UI component library with a focus on accessibility, customization, and developer experience. ",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
|
-
"version": "0.99.
|
|
5
|
+
"version": "0.99.5",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"angular",
|
|
8
8
|
"primitives",
|
package/progress/index.d.ts
CHANGED
|
@@ -77,6 +77,111 @@ declare class NgpProgress {
|
|
|
77
77
|
}
|
|
78
78
|
type NgpProgressValueTextFn = (value: number, max: number) => string;
|
|
79
79
|
|
|
80
|
+
interface NgpProgressProps {
|
|
81
|
+
/**
|
|
82
|
+
* The unique identifier for the progress.
|
|
83
|
+
*/
|
|
84
|
+
readonly id?: Signal<string>;
|
|
85
|
+
/**
|
|
86
|
+
* Define the progress value.
|
|
87
|
+
*/
|
|
88
|
+
readonly value?: Signal<number | null>;
|
|
89
|
+
/**
|
|
90
|
+
* Define the progress min value.
|
|
91
|
+
* @default '0'
|
|
92
|
+
*/
|
|
93
|
+
readonly min?: Signal<number>;
|
|
94
|
+
/**
|
|
95
|
+
* Define the progress max value.
|
|
96
|
+
* @default 100
|
|
97
|
+
*/
|
|
98
|
+
readonly max?: Signal<number>;
|
|
99
|
+
/**
|
|
100
|
+
* Define a function that returns the progress value label.
|
|
101
|
+
* @param value The current value
|
|
102
|
+
* @param max The maximum value
|
|
103
|
+
* @returns The value label
|
|
104
|
+
*/
|
|
105
|
+
readonly valueLabel?: Signal<NgpProgressValueTextFn>;
|
|
106
|
+
}
|
|
107
|
+
interface NgpProgressState {
|
|
108
|
+
/**
|
|
109
|
+
* The unique identifier for the progress.
|
|
110
|
+
*/
|
|
111
|
+
readonly id: Signal<string>;
|
|
112
|
+
/**
|
|
113
|
+
* Define the progress value.
|
|
114
|
+
*/
|
|
115
|
+
readonly value: WritableSignal<number | null>;
|
|
116
|
+
/**
|
|
117
|
+
* Define the progress min value.
|
|
118
|
+
* @default '0'
|
|
119
|
+
*/
|
|
120
|
+
readonly min: WritableSignal<number>;
|
|
121
|
+
/**
|
|
122
|
+
* Define the progress max value.
|
|
123
|
+
* @default 100
|
|
124
|
+
*/
|
|
125
|
+
readonly max: WritableSignal<number>;
|
|
126
|
+
/**
|
|
127
|
+
* Get the progress value text.
|
|
128
|
+
*/
|
|
129
|
+
readonly valueText: Signal<string>;
|
|
130
|
+
/**
|
|
131
|
+
* The id of label associated with the progress bar.
|
|
132
|
+
* @internal
|
|
133
|
+
*/
|
|
134
|
+
readonly labelId: Signal<string | undefined>;
|
|
135
|
+
/**
|
|
136
|
+
* Determine if the progress is indeterminate.
|
|
137
|
+
* @internal
|
|
138
|
+
*/
|
|
139
|
+
readonly indeterminate: Signal<boolean>;
|
|
140
|
+
/**
|
|
141
|
+
* Determine if the progress is in a progressing state.
|
|
142
|
+
* @internal
|
|
143
|
+
*/
|
|
144
|
+
readonly progressing: Signal<boolean>;
|
|
145
|
+
/**
|
|
146
|
+
* Determine if the progress is complete.
|
|
147
|
+
* @internal
|
|
148
|
+
*/
|
|
149
|
+
readonly complete: Signal<boolean>;
|
|
150
|
+
/**
|
|
151
|
+
* Set the label of the progress bar.
|
|
152
|
+
*/
|
|
153
|
+
setLabel(id: string): void;
|
|
154
|
+
/**
|
|
155
|
+
* Set the value of the progress bar.
|
|
156
|
+
* @param value The progress value
|
|
157
|
+
*/
|
|
158
|
+
setValue(value: number | null): void;
|
|
159
|
+
/**
|
|
160
|
+
* Set the minimum value of the progress bar.
|
|
161
|
+
* @param min The minimum value
|
|
162
|
+
*/
|
|
163
|
+
setMin(min: number): void;
|
|
164
|
+
/**
|
|
165
|
+
* Set the maximum value of the progress bar.
|
|
166
|
+
* @param max The maximum value
|
|
167
|
+
*/
|
|
168
|
+
setMax(max: number): void;
|
|
169
|
+
}
|
|
170
|
+
declare const ngpProgress: ({ valueLabel: _valueLabel, value: _value, min: _min, max: _max, id, }: NgpProgressProps) => {
|
|
171
|
+
max: WritableSignal<number>;
|
|
172
|
+
min: WritableSignal<number>;
|
|
173
|
+
value: WritableSignal<number | null>;
|
|
174
|
+
labelId: WritableSignal<string | undefined>;
|
|
175
|
+
valueText: Signal<string>;
|
|
176
|
+
id: Signal<string>;
|
|
177
|
+
indeterminate: Signal<boolean>;
|
|
178
|
+
progressing: Signal<boolean>;
|
|
179
|
+
complete: Signal<boolean>;
|
|
180
|
+
setLabel: (id: string) => void;
|
|
181
|
+
setValue: (newValue: number | null) => void;
|
|
182
|
+
setMin: (newMin: number) => void;
|
|
183
|
+
setMax: (newMax: number) => void;
|
|
184
|
+
};
|
|
80
185
|
declare const injectProgressState: {
|
|
81
186
|
(): Signal<{
|
|
82
187
|
max: WritableSignal<number>;
|
|
@@ -150,5 +255,5 @@ declare const provideProgressState: (opts?: {
|
|
|
150
255
|
inherit?: boolean;
|
|
151
256
|
}) => i0.FactoryProvider;
|
|
152
257
|
|
|
153
|
-
export { NgpProgress, NgpProgressIndicator, NgpProgressLabel, NgpProgressTrack, NgpProgressValue, injectProgressState, provideProgressState };
|
|
154
|
-
export type { NgpProgressValueTextFn };
|
|
258
|
+
export { NgpProgress, NgpProgressIndicator, NgpProgressLabel, NgpProgressTrack, NgpProgressValue, injectProgressState, ngpProgress, provideProgressState };
|
|
259
|
+
export type { NgpProgressProps, NgpProgressState, NgpProgressValueTextFn };
|
package/toggle-group/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import * as _angular_core from '@angular/core';
|
|
|
2
2
|
import { Provider, OnInit, Signal, WritableSignal } from '@angular/core';
|
|
3
3
|
import { NgpOrientation } from 'ng-primitives/common';
|
|
4
4
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
5
|
+
import { NgpRovingFocusGroupState } from 'ng-primitives/roving-focus';
|
|
5
6
|
import { Observable } from 'rxjs';
|
|
6
7
|
|
|
7
8
|
interface NgpToggleGroupConfig {
|
|
@@ -51,6 +52,20 @@ interface NgpToggleGroupItemState {
|
|
|
51
52
|
selected: Signal<boolean>;
|
|
52
53
|
toggle(): void;
|
|
53
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* The props interface for the ToggleGroupItem pattern.
|
|
57
|
+
*/
|
|
58
|
+
interface NgpToggleGroupItemProps {
|
|
59
|
+
/**
|
|
60
|
+
* The value of the toggle group item.
|
|
61
|
+
*/
|
|
62
|
+
value: Signal<string>;
|
|
63
|
+
/**
|
|
64
|
+
* Whether the toggle group item is disabled.
|
|
65
|
+
*/
|
|
66
|
+
disabled?: Signal<boolean>;
|
|
67
|
+
}
|
|
68
|
+
declare const ngpToggleGroupItem: ({ value, disabled }: NgpToggleGroupItemProps) => NgpToggleGroupItemState;
|
|
54
69
|
declare const injectToggleGroupItemState: {
|
|
55
70
|
(): Signal<NgpToggleGroupItemState>;
|
|
56
71
|
(options: {
|
|
@@ -117,6 +132,40 @@ interface NgpToggleGroupState {
|
|
|
117
132
|
*/
|
|
118
133
|
setOrientation(newOrientation: NgpOrientation): void;
|
|
119
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* The props interface for the ToggleGroup pattern.
|
|
137
|
+
*/
|
|
138
|
+
interface NgpToggleGroupProps {
|
|
139
|
+
/**
|
|
140
|
+
* The roving focus group state for the toggle-group.
|
|
141
|
+
*/
|
|
142
|
+
readonly rovingFocusGroup: NgpRovingFocusGroupState;
|
|
143
|
+
/**
|
|
144
|
+
* The orientation of the toggle-group.
|
|
145
|
+
*/
|
|
146
|
+
readonly orientation?: Signal<NgpOrientation>;
|
|
147
|
+
/**
|
|
148
|
+
* Whether deselection is allowed in the toggle-group.
|
|
149
|
+
*/
|
|
150
|
+
readonly allowDeselection?: Signal<boolean>;
|
|
151
|
+
/**
|
|
152
|
+
* The type of the toggle-group (e.g., 'single' or 'multiple').
|
|
153
|
+
*/
|
|
154
|
+
readonly type?: Signal<'single' | 'multiple'>;
|
|
155
|
+
/**
|
|
156
|
+
* The value(s) of the toggle-group.
|
|
157
|
+
*/
|
|
158
|
+
readonly value?: Signal<string[] | undefined>;
|
|
159
|
+
/**
|
|
160
|
+
* Whether the toggle-group is disabled.
|
|
161
|
+
*/
|
|
162
|
+
readonly disabled?: Signal<boolean>;
|
|
163
|
+
/**
|
|
164
|
+
* Emit when the value changes.
|
|
165
|
+
*/
|
|
166
|
+
readonly onValueChange?: (value: string[]) => void;
|
|
167
|
+
}
|
|
168
|
+
declare const ngpToggleGroup: ({ rovingFocusGroup, orientation: _orientation, allowDeselection, type, value: _value, disabled: _disabled, onValueChange, }: NgpToggleGroupProps) => NgpToggleGroupState;
|
|
120
169
|
declare const injectToggleGroupState: {
|
|
121
170
|
(): Signal<NgpToggleGroupState>;
|
|
122
171
|
(options: {
|
|
@@ -188,5 +237,5 @@ declare class NgpToggleGroup {
|
|
|
188
237
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpToggleGroup, "[ngpToggleGroup]", ["ngpToggleGroup"], { "orientation": { "alias": "ngpToggleGroupOrientation"; "required": false; "isSignal": true; }; "allowDeselection": { "alias": "ngpToggleGroupAllowDeselection"; "required": false; "isSignal": true; }; "type": { "alias": "ngpToggleGroupType"; "required": false; "isSignal": true; }; "value": { "alias": "ngpToggleGroupValue"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpToggleGroupDisabled"; "required": false; "isSignal": true; }; }, { "valueChange": "ngpToggleGroupValueChange"; }, never, never, true, never>;
|
|
189
238
|
}
|
|
190
239
|
|
|
191
|
-
export { NgpToggleGroup, NgpToggleGroupItem, injectToggleGroupItemState, injectToggleGroupState, provideToggleGroupConfig, provideToggleGroupItemState, provideToggleGroupState };
|
|
192
|
-
export type { NgpToggleGroupConfig };
|
|
240
|
+
export { NgpToggleGroup, NgpToggleGroupItem, injectToggleGroupItemState, injectToggleGroupState, ngpToggleGroup, ngpToggleGroupItem, provideToggleGroupConfig, provideToggleGroupItemState, provideToggleGroupState };
|
|
241
|
+
export type { NgpToggleGroupConfig, NgpToggleGroupItemProps, NgpToggleGroupItemState, NgpToggleGroupProps, NgpToggleGroupState };
|
package/toolbar/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { Signal, WritableSignal } from '@angular/core';
|
|
3
3
|
import { NgpOrientation } from 'ng-primitives/common';
|
|
4
|
+
import { NgpRovingFocusGroupState } from 'ng-primitives/roving-focus';
|
|
4
5
|
|
|
5
6
|
declare class NgpToolbar {
|
|
6
7
|
/**
|
|
@@ -18,6 +19,31 @@ declare class NgpToolbar {
|
|
|
18
19
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgpToolbar, "[ngpToolbar]", ["ngpToolbar"], { "orientation": { "alias": "ngpToolbarOrientation"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
19
20
|
}
|
|
20
21
|
|
|
22
|
+
interface NgpToolbarState {
|
|
23
|
+
/**
|
|
24
|
+
* The orientation of the toolbar.
|
|
25
|
+
*/
|
|
26
|
+
readonly orientation: WritableSignal<NgpOrientation>;
|
|
27
|
+
/**
|
|
28
|
+
* Set the orientation of the toolbar.
|
|
29
|
+
* @param value The orientation value
|
|
30
|
+
*/
|
|
31
|
+
setOrientation(value: NgpOrientation): void;
|
|
32
|
+
}
|
|
33
|
+
interface NgpToolbarProps {
|
|
34
|
+
/**
|
|
35
|
+
* The roving focus group state.
|
|
36
|
+
*/
|
|
37
|
+
readonly rovingFocusGroup: NgpRovingFocusGroupState;
|
|
38
|
+
/**
|
|
39
|
+
* The orientation of the toolbar.
|
|
40
|
+
*/
|
|
41
|
+
readonly orientation: Signal<NgpOrientation>;
|
|
42
|
+
}
|
|
43
|
+
declare const ngpToolbar: ({ rovingFocusGroup, orientation: _orientation }: NgpToolbarProps) => {
|
|
44
|
+
orientation: WritableSignal<NgpOrientation>;
|
|
45
|
+
setOrientation: (value: NgpOrientation) => void;
|
|
46
|
+
};
|
|
21
47
|
declare const injectToolbarState: {
|
|
22
48
|
(): Signal<{
|
|
23
49
|
orientation: WritableSignal<NgpOrientation>;
|
|
@@ -47,4 +73,5 @@ declare const provideToolbarState: (opts?: {
|
|
|
47
73
|
inherit?: boolean;
|
|
48
74
|
}) => _angular_core.FactoryProvider;
|
|
49
75
|
|
|
50
|
-
export { NgpToolbar, injectToolbarState, provideToolbarState };
|
|
76
|
+
export { NgpToolbar, injectToolbarState, ngpToolbar, provideToolbarState };
|
|
77
|
+
export type { NgpToolbarProps, NgpToolbarState };
|