@radix-ng/primitives 1.0.1 → 1.0.3
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/composite/README.md +1 -1
- package/fesm2022/radix-ng-primitives-accordion.mjs +18 -36
- package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-checkbox.mjs +134 -58
- package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-collapsible.mjs +113 -64
- package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-composite.mjs +127 -43
- package/fesm2022/radix-ng-primitives-composite.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menu.mjs +288 -63
- package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menubar.mjs +24 -1
- package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-select.mjs +56 -29
- package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-slider.mjs +57 -13
- package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tabs.mjs +292 -59
- package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toolbar.mjs +19 -13
- package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
- package/package.json +2 -10
- package/types/radix-ng-primitives-accordion.d.ts +7 -15
- package/types/radix-ng-primitives-checkbox.d.ts +98 -70
- package/types/radix-ng-primitives-collapsible.d.ts +44 -24
- package/types/radix-ng-primitives-composite.d.ts +58 -15
- package/types/radix-ng-primitives-menu.d.ts +44 -16
- package/types/radix-ng-primitives-menubar.d.ts +2 -0
- package/types/radix-ng-primitives-select.d.ts +46 -32
- package/types/radix-ng-primitives-slider.d.ts +19 -4
- package/types/radix-ng-primitives-tabs.d.ts +63 -11
- package/types/radix-ng-primitives-toolbar.d.ts +80 -73
- package/collection/README.md +0 -1
- package/fesm2022/radix-ng-primitives-collection.mjs +0 -72
- package/fesm2022/radix-ng-primitives-collection.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-roving-focus.mjs +0 -420
- package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +0 -1
- package/roving-focus/README.md +0 -3
- package/types/radix-ng-primitives-collection.d.ts +0 -44
- package/types/radix-ng-primitives-roving-focus.d.ts +0 -201
|
@@ -1,17 +1,17 @@
|
|
|
1
|
+
import * as _radix_ng_primitives_types_radix_ng_primitives_core from '@radix-ng/primitives/types/radix-ng-primitives-core';
|
|
1
2
|
import * as _angular_core from '@angular/core';
|
|
2
3
|
import { Signal } from '@angular/core';
|
|
3
|
-
import * as i1 from '@radix-ng/primitives/presence';
|
|
4
|
-
import * as _radix_ng_primitives_types_radix_ng_primitives_core from '@radix-ng/primitives/types/radix-ng-primitives-core';
|
|
5
4
|
import * as _radix_ng_primitives_core from '@radix-ng/primitives/core';
|
|
6
5
|
import { BooleanInput, RdxCancelableChangeEventDetails, RdxFormCheckboxControl } from '@radix-ng/primitives/core';
|
|
7
6
|
import { ControlValueAccessor } from '@angular/forms';
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Directive: rdxCheckboxButton
|
|
10
|
+
* Purpose: Turns a native <button> into an accessible checkbox control bound to the Radix Checkbox context.
|
|
11
|
+
* It mirrors the checkbox state via ARIA/data attributes, toggles on click, and prevents Enter activation per WAI-ARIA.
|
|
12
|
+
* In forms, it stops the button's click from bubbling so only the hidden input emits the native event used for form/validator integration.
|
|
13
|
+
*/
|
|
14
|
+
declare class RdxCheckboxButtonDirective {
|
|
15
15
|
protected readonly rootContext: {
|
|
16
16
|
checked: _angular_core.Signal<boolean>;
|
|
17
17
|
indeterminate: _angular_core.Signal<boolean>;
|
|
@@ -21,26 +21,31 @@ declare class RdxCheckboxInputDirective {
|
|
|
21
21
|
name: _angular_core.InputSignal<string | undefined>;
|
|
22
22
|
parent: _angular_core.InputSignalWithTransform<boolean, _radix_ng_primitives_types_radix_ng_primitives_core.BooleanInput>;
|
|
23
23
|
form: _angular_core.InputSignal<string | undefined>;
|
|
24
|
-
readonly: _angular_core.
|
|
24
|
+
readonly: _angular_core.Signal<boolean>;
|
|
25
25
|
state: _angular_core.Signal<"indeterminate" | "checked" | "unchecked">;
|
|
26
|
+
uncheckedValue: _angular_core.InputSignal<string | undefined>;
|
|
26
27
|
toggle(event?: Event): void;
|
|
27
28
|
};
|
|
28
|
-
private readonly
|
|
29
|
+
private readonly group;
|
|
30
|
+
private readonly elementRef;
|
|
31
|
+
/** A `parent` checkbox lists the ids of the children it controls. */
|
|
32
|
+
protected readonly ariaControls: _angular_core.Signal<string | undefined>;
|
|
29
33
|
constructor();
|
|
30
|
-
|
|
31
|
-
static
|
|
34
|
+
protected clicked(event: MouseEvent): void;
|
|
35
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxCheckboxButtonDirective, never>;
|
|
36
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxCheckboxButtonDirective, "button[rdxCheckboxButton]", never, {}, {}, never, never, true, never>;
|
|
32
37
|
}
|
|
33
38
|
|
|
34
39
|
/**
|
|
35
40
|
* Internal tri-state used only for the derived `parent` (select-all) state in
|
|
36
|
-
* `rdxCheckboxGroup` and
|
|
41
|
+
* `rdxCheckboxGroup` and compatibility helpers. The public `checked` member is
|
|
37
42
|
* a plain `boolean`; mixed state is exposed via the separate `indeterminate`
|
|
38
43
|
* member (Base UI shape).
|
|
39
44
|
*/
|
|
40
45
|
type CheckedState = boolean | 'indeterminate';
|
|
41
46
|
declare function isIndeterminate(checked?: CheckedState): checked is 'indeterminate';
|
|
42
47
|
declare function getState(checked: CheckedState): "indeterminate" | "checked" | "unchecked";
|
|
43
|
-
type RdxCheckboxCheckedChangeReason = '
|
|
48
|
+
type RdxCheckboxCheckedChangeReason = 'none';
|
|
44
49
|
type RdxCheckboxCheckedChangeEventDetails = RdxCancelableChangeEventDetails<RdxCheckboxCheckedChangeReason>;
|
|
45
50
|
interface RdxCheckboxCheckedChangeEvent {
|
|
46
51
|
checked: boolean;
|
|
@@ -55,8 +60,9 @@ declare const rootContext: () => {
|
|
|
55
60
|
name: _angular_core.InputSignal<string | undefined>;
|
|
56
61
|
parent: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
57
62
|
form: _angular_core.InputSignal<string | undefined>;
|
|
58
|
-
readonly: _angular_core.
|
|
63
|
+
readonly: _angular_core.Signal<boolean>;
|
|
59
64
|
state: _angular_core.Signal<"indeterminate" | "checked" | "unchecked">;
|
|
65
|
+
uncheckedValue: _angular_core.InputSignal<string | undefined>;
|
|
60
66
|
toggle(event?: Event): void;
|
|
61
67
|
};
|
|
62
68
|
type CheckboxRootContext = ReturnType<typeof rootContext>;
|
|
@@ -69,8 +75,9 @@ declare const injectCheckboxRootContext: _radix_ng_primitives_core.InjectContext
|
|
|
69
75
|
name: _angular_core.InputSignal<string | undefined>;
|
|
70
76
|
parent: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
71
77
|
form: _angular_core.InputSignal<string | undefined>;
|
|
72
|
-
readonly: _angular_core.
|
|
78
|
+
readonly: _angular_core.Signal<boolean>;
|
|
73
79
|
state: _angular_core.Signal<"indeterminate" | "checked" | "unchecked">;
|
|
80
|
+
uncheckedValue: _angular_core.InputSignal<string | undefined>;
|
|
74
81
|
toggle(event?: Event): void;
|
|
75
82
|
}>;
|
|
76
83
|
declare const provideCheckboxRootContext: (useFactory: () => {
|
|
@@ -82,8 +89,9 @@ declare const provideCheckboxRootContext: (useFactory: () => {
|
|
|
82
89
|
name: _angular_core.InputSignal<string | undefined>;
|
|
83
90
|
parent: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
84
91
|
form: _angular_core.InputSignal<string | undefined>;
|
|
85
|
-
readonly: _angular_core.
|
|
92
|
+
readonly: _angular_core.Signal<boolean>;
|
|
86
93
|
state: _angular_core.Signal<"indeterminate" | "checked" | "unchecked">;
|
|
94
|
+
uncheckedValue: _angular_core.InputSignal<string | undefined>;
|
|
87
95
|
toggle(event?: Event): void;
|
|
88
96
|
}) => _angular_core.Provider;
|
|
89
97
|
/**
|
|
@@ -91,6 +99,9 @@ declare const provideCheckboxRootContext: (useFactory: () => {
|
|
|
91
99
|
*/
|
|
92
100
|
declare class RdxCheckboxRootDirective implements RdxFormCheckboxControl {
|
|
93
101
|
private readonly controlValueAccessor;
|
|
102
|
+
private readonly elementRef;
|
|
103
|
+
private readonly renderer;
|
|
104
|
+
private uncheckedInputElement;
|
|
94
105
|
/** The group this checkbox belongs to, if it is rendered inside a `rdxCheckboxGroup`. */
|
|
95
106
|
private readonly group;
|
|
96
107
|
/**
|
|
@@ -108,6 +119,13 @@ declare class RdxCheckboxRootDirective implements RdxFormCheckboxControl {
|
|
|
108
119
|
* @group Props
|
|
109
120
|
*/
|
|
110
121
|
readonly checked: _angular_core.ModelSignal<boolean>;
|
|
122
|
+
/**
|
|
123
|
+
* The state of the checkbox when it is initially rendered.
|
|
124
|
+
*
|
|
125
|
+
* @default false
|
|
126
|
+
* @group Props
|
|
127
|
+
*/
|
|
128
|
+
readonly defaultChecked: _angular_core.InputSignalWithTransform<boolean | undefined, BooleanInput>;
|
|
111
129
|
/**
|
|
112
130
|
* Whether the checkbox is in a mixed state: neither ticked nor unticked.
|
|
113
131
|
* Orthogonal to `checked` and not part of the submitted form value. A user
|
|
@@ -126,6 +144,13 @@ declare class RdxCheckboxRootDirective implements RdxFormCheckboxControl {
|
|
|
126
144
|
* @group Props
|
|
127
145
|
*/
|
|
128
146
|
readonly submitValue: _angular_core.InputSignal<string>;
|
|
147
|
+
/**
|
|
148
|
+
* The value submitted with the form when the checkbox is unchecked.
|
|
149
|
+
* By default, unchecked checkboxes do not submit any value, matching native checkbox behavior.
|
|
150
|
+
*
|
|
151
|
+
* @group Props
|
|
152
|
+
*/
|
|
153
|
+
readonly uncheckedValue: _angular_core.InputSignal<string | undefined>;
|
|
129
154
|
/**
|
|
130
155
|
* Whether or not the checkbox button is disabled. This prevents the user from interacting with it.
|
|
131
156
|
* @group Props
|
|
@@ -136,6 +161,8 @@ declare class RdxCheckboxRootDirective implements RdxFormCheckboxControl {
|
|
|
136
161
|
* @group Props
|
|
137
162
|
*/
|
|
138
163
|
readonly readonly: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
164
|
+
/** Alias matching Base UI's `readOnly` prop spelling. */
|
|
165
|
+
readonly readOnly: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
139
166
|
/**
|
|
140
167
|
* Whether or not the checkbox is required.
|
|
141
168
|
* @group Props
|
|
@@ -178,62 +205,20 @@ declare class RdxCheckboxRootDirective implements RdxFormCheckboxControl {
|
|
|
178
205
|
readonly indeterminateState: _angular_core.Signal<boolean>;
|
|
179
206
|
/** @ignore The effective disabled state, including the group. */
|
|
180
207
|
readonly disabledState: _angular_core.Signal<boolean>;
|
|
208
|
+
readonly readOnlyState: _angular_core.Signal<boolean>;
|
|
181
209
|
readonly state: _angular_core.Signal<"indeterminate" | "checked" | "unchecked">;
|
|
182
210
|
constructor();
|
|
183
211
|
toggle(event?: Event): void;
|
|
212
|
+
private syncUncheckedInput;
|
|
213
|
+
private ensureUncheckedInput;
|
|
214
|
+
private removeUncheckedInput;
|
|
215
|
+
private setOptionalAttribute;
|
|
216
|
+
private setBooleanAttribute;
|
|
184
217
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxCheckboxRootDirective, never>;
|
|
185
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxCheckboxRootDirective, "[rdxCheckboxRoot]", never, { "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "submitValue": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "parent": { "alias": "parent"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; "indeterminate": "indeterminateChange"; "onCheckedChange": "onCheckedChange"; }, never, never, true, [{ directive: typeof _radix_ng_primitives_core.RdxControlValueAccessor; inputs: { "value": "checked"; "disabled": "disabled"; }; outputs: {}; }]>;
|
|
218
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxCheckboxRootDirective, "[rdxCheckboxRoot]", never, { "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "defaultChecked": { "alias": "defaultChecked"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "submitValue": { "alias": "value"; "required": false; "isSignal": true; }; "uncheckedValue": { "alias": "uncheckedValue"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "parent": { "alias": "parent"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; "indeterminate": "indeterminateChange"; "onCheckedChange": "onCheckedChange"; }, never, never, true, [{ directive: typeof _radix_ng_primitives_core.RdxControlValueAccessor; inputs: { "value": "checked"; "disabled": "disabled"; }; outputs: {}; }]>;
|
|
186
219
|
}
|
|
187
220
|
|
|
188
|
-
|
|
189
|
-
* Directive: rdxCheckboxButton
|
|
190
|
-
* Purpose: Turns a native <button> into an accessible checkbox control bound to the Radix Checkbox context.
|
|
191
|
-
* It mirrors the checkbox state via ARIA/data attributes, toggles on click, and prevents Enter activation per WAI-ARIA.
|
|
192
|
-
* In forms, it stops the button's click from bubbling so only the hidden input emits the native event used for form/validator integration.
|
|
193
|
-
*/
|
|
194
|
-
declare class RdxCheckboxButtonDirective {
|
|
195
|
-
protected readonly rootContext: {
|
|
196
|
-
checked: _angular_core.Signal<boolean>;
|
|
197
|
-
indeterminate: _angular_core.Signal<boolean>;
|
|
198
|
-
disabled: _angular_core.Signal<boolean>;
|
|
199
|
-
required: _angular_core.InputSignalWithTransform<boolean, _radix_ng_primitives_types_radix_ng_primitives_core.BooleanInput>;
|
|
200
|
-
value: _angular_core.InputSignal<string>;
|
|
201
|
-
name: _angular_core.InputSignal<string | undefined>;
|
|
202
|
-
parent: _angular_core.InputSignalWithTransform<boolean, _radix_ng_primitives_types_radix_ng_primitives_core.BooleanInput>;
|
|
203
|
-
form: _angular_core.InputSignal<string | undefined>;
|
|
204
|
-
readonly: _angular_core.InputSignalWithTransform<boolean, _radix_ng_primitives_types_radix_ng_primitives_core.BooleanInput>;
|
|
205
|
-
state: _angular_core.Signal<"indeterminate" | "checked" | "unchecked">;
|
|
206
|
-
toggle(event?: Event): void;
|
|
207
|
-
};
|
|
208
|
-
private readonly group;
|
|
209
|
-
private readonly elementRef;
|
|
210
|
-
/** A `parent` checkbox lists the ids of the children it controls. */
|
|
211
|
-
protected readonly ariaControls: _angular_core.Signal<string | undefined>;
|
|
212
|
-
constructor();
|
|
213
|
-
protected clicked(event: MouseEvent): void;
|
|
214
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxCheckboxButtonDirective, never>;
|
|
215
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxCheckboxButtonDirective, "button[rdxCheckboxButton]", never, {}, {}, never, never, true, never>;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
declare class RdxCheckboxIndicatorDirective {
|
|
219
|
-
protected readonly rootContext: {
|
|
220
|
-
checked: _angular_core.Signal<boolean>;
|
|
221
|
-
indeterminate: _angular_core.Signal<boolean>;
|
|
222
|
-
disabled: _angular_core.Signal<boolean>;
|
|
223
|
-
required: _angular_core.InputSignalWithTransform<boolean, _radix_ng_primitives_types_radix_ng_primitives_core.BooleanInput>;
|
|
224
|
-
value: _angular_core.InputSignal<string>;
|
|
225
|
-
name: _angular_core.InputSignal<string | undefined>;
|
|
226
|
-
parent: _angular_core.InputSignalWithTransform<boolean, _radix_ng_primitives_types_radix_ng_primitives_core.BooleanInput>;
|
|
227
|
-
form: _angular_core.InputSignal<string | undefined>;
|
|
228
|
-
readonly: _angular_core.InputSignalWithTransform<boolean, _radix_ng_primitives_types_radix_ng_primitives_core.BooleanInput>;
|
|
229
|
-
state: _angular_core.Signal<"indeterminate" | "checked" | "unchecked">;
|
|
230
|
-
toggle(event?: Event): void;
|
|
231
|
-
};
|
|
232
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxCheckboxIndicatorDirective, never>;
|
|
233
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxCheckboxIndicatorDirective, "[rdxCheckboxIndicator]", never, {}, {}, never, never, true, never>;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
type RdxCheckboxGroupValueChangeReason = 'child-press' | 'parent-press' | 'none';
|
|
221
|
+
type RdxCheckboxGroupValueChangeReason = 'none';
|
|
237
222
|
type RdxCheckboxGroupValueChangeEventDetails = RdxCancelableChangeEventDetails<RdxCheckboxGroupValueChangeReason>;
|
|
238
223
|
interface RdxCheckboxGroupValueChangeEvent {
|
|
239
224
|
value: string[];
|
|
@@ -338,12 +323,55 @@ declare class RdxCheckboxGroupDirective implements ControlValueAccessor {
|
|
|
338
323
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxCheckboxGroupDirective, "[rdxCheckboxGroup]", ["rdxCheckboxGroup"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; "allValues": { "alias": "allValues"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "onValueChange": "onValueChange"; }, never, never, true, never>;
|
|
339
324
|
}
|
|
340
325
|
|
|
341
|
-
declare
|
|
326
|
+
declare class RdxCheckboxIndicatorDirective {
|
|
327
|
+
protected readonly rootContext: {
|
|
328
|
+
checked: _angular_core.Signal<boolean>;
|
|
329
|
+
indeterminate: _angular_core.Signal<boolean>;
|
|
330
|
+
disabled: _angular_core.Signal<boolean>;
|
|
331
|
+
required: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
332
|
+
value: _angular_core.InputSignal<string>;
|
|
333
|
+
name: _angular_core.InputSignal<string | undefined>;
|
|
334
|
+
parent: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
335
|
+
form: _angular_core.InputSignal<string | undefined>;
|
|
336
|
+
readonly: _angular_core.Signal<boolean>;
|
|
337
|
+
state: _angular_core.Signal<"indeterminate" | "checked" | "unchecked">;
|
|
338
|
+
uncheckedValue: _angular_core.InputSignal<string | undefined>;
|
|
339
|
+
toggle(event?: Event): void;
|
|
340
|
+
};
|
|
341
|
+
/** Keep the indicator in the DOM when unchecked so CSS exit animations can play. */
|
|
342
|
+
readonly keepMounted: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
343
|
+
protected readonly isVisible: _angular_core.Signal<boolean>;
|
|
344
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxCheckboxIndicatorDirective, never>;
|
|
345
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxCheckboxIndicatorDirective, "[rdxCheckboxIndicator]", never, { "keepMounted": { "alias": "keepMounted"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
declare class RdxCheckboxInputDirective {
|
|
349
|
+
protected readonly rootContext: {
|
|
350
|
+
checked: _angular_core.Signal<boolean>;
|
|
351
|
+
indeterminate: _angular_core.Signal<boolean>;
|
|
352
|
+
disabled: _angular_core.Signal<boolean>;
|
|
353
|
+
required: _angular_core.InputSignalWithTransform<boolean, _radix_ng_primitives_types_radix_ng_primitives_core.BooleanInput>;
|
|
354
|
+
value: _angular_core.InputSignal<string>;
|
|
355
|
+
name: _angular_core.InputSignal<string | undefined>;
|
|
356
|
+
parent: _angular_core.InputSignalWithTransform<boolean, _radix_ng_primitives_types_radix_ng_primitives_core.BooleanInput>;
|
|
357
|
+
form: _angular_core.InputSignal<string | undefined>;
|
|
358
|
+
readonly: _angular_core.Signal<boolean>;
|
|
359
|
+
state: _angular_core.Signal<"indeterminate" | "checked" | "unchecked">;
|
|
360
|
+
uncheckedValue: _angular_core.InputSignal<string | undefined>;
|
|
361
|
+
toggle(event?: Event): void;
|
|
362
|
+
};
|
|
363
|
+
private readonly input;
|
|
364
|
+
constructor();
|
|
365
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxCheckboxInputDirective, never>;
|
|
366
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxCheckboxInputDirective, "input[rdxCheckboxInput]", never, {}, {}, never, never, true, never>;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
declare const checkboxImports: (typeof RdxCheckboxRootDirective | typeof RdxCheckboxGroupDirective | typeof RdxCheckboxButtonDirective | typeof RdxCheckboxIndicatorDirective | typeof RdxCheckboxInputDirective)[];
|
|
342
370
|
declare class RdxCheckboxModule {
|
|
343
371
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxCheckboxModule, never>;
|
|
344
|
-
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<RdxCheckboxModule, never, [typeof RdxCheckboxInputDirective, typeof RdxCheckboxRootDirective, typeof RdxCheckboxButtonDirective, typeof RdxCheckboxIndicatorDirective, typeof
|
|
372
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<RdxCheckboxModule, never, [typeof RdxCheckboxInputDirective, typeof RdxCheckboxRootDirective, typeof RdxCheckboxButtonDirective, typeof RdxCheckboxIndicatorDirective, typeof RdxCheckboxGroupDirective], [typeof RdxCheckboxInputDirective, typeof RdxCheckboxRootDirective, typeof RdxCheckboxButtonDirective, typeof RdxCheckboxIndicatorDirective, typeof RdxCheckboxGroupDirective]>;
|
|
345
373
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<RdxCheckboxModule>;
|
|
346
374
|
}
|
|
347
375
|
|
|
348
|
-
export { RdxCheckboxButtonDirective, RdxCheckboxGroupDirective, RdxCheckboxIndicatorDirective,
|
|
376
|
+
export { RdxCheckboxButtonDirective, RdxCheckboxGroupDirective, RdxCheckboxIndicatorDirective, RdxCheckboxInputDirective, RdxCheckboxModule, RdxCheckboxRootDirective, checkboxImports, getState, injectCheckboxGroupContext, injectCheckboxRootContext, isIndeterminate, provideCheckboxGroupContext, provideCheckboxRootContext };
|
|
349
377
|
export type { CheckboxRootContext, CheckedState, RdxCheckboxCheckedChangeEvent, RdxCheckboxCheckedChangeEventDetails, RdxCheckboxCheckedChangeReason, RdxCheckboxGroupContext, RdxCheckboxGroupValueChangeEvent, RdxCheckboxGroupValueChangeEventDetails, RdxCheckboxGroupValueChangeReason };
|
|
@@ -2,19 +2,29 @@ import * as _angular_core from '@angular/core';
|
|
|
2
2
|
import { Signal, ModelSignal, WritableSignal } from '@angular/core';
|
|
3
3
|
import * as _radix_ng_primitives_collapsible from '@radix-ng/primitives/collapsible';
|
|
4
4
|
import * as _radix_ng_primitives_core from '@radix-ng/primitives/core';
|
|
5
|
-
import { BooleanInput, RdxTransitionStatus } from '@radix-ng/primitives/core';
|
|
6
|
-
import * as i1 from '@radix-ng/primitives/presence';
|
|
5
|
+
import { BooleanInput, RdxTransitionStatus, RdxCancelableChangeEventDetails } from '@radix-ng/primitives/core';
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* A panel with the collapsible contents.
|
|
10
9
|
*/
|
|
11
10
|
declare class RdxCollapsiblePanelDirective {
|
|
12
11
|
private readonly elementRef;
|
|
12
|
+
private readonly renderer;
|
|
13
|
+
private readonly destroyRef;
|
|
14
|
+
private readonly marker;
|
|
15
|
+
private parentNode;
|
|
16
|
+
private isAttached;
|
|
13
17
|
protected readonly rootContext: _radix_ng_primitives_collapsible.CollapsibleRootContext;
|
|
18
|
+
/**
|
|
19
|
+
* Optional explicit panel id. When set, the trigger's `aria-controls` points to this id.
|
|
20
|
+
*
|
|
21
|
+
* @group Props
|
|
22
|
+
*/
|
|
23
|
+
readonly id: _angular_core.InputSignal<string | undefined>;
|
|
14
24
|
/**
|
|
15
25
|
* Whether to keep the element in the DOM while the panel is closed.
|
|
16
|
-
* When `true`, the closed panel keeps its element
|
|
17
|
-
*
|
|
26
|
+
* When `true`, the closed panel keeps its element and receives the `hidden` attribute once the
|
|
27
|
+
* close transition finishes.
|
|
18
28
|
*
|
|
19
29
|
* @group Props
|
|
20
30
|
* @defaultValue false
|
|
@@ -30,10 +40,11 @@ declare class RdxCollapsiblePanelDirective {
|
|
|
30
40
|
readonly hiddenUntilFound: _angular_core.InputSignalWithTransform<boolean | undefined, BooleanInput>;
|
|
31
41
|
readonly height: _angular_core.WritableSignal<number | null>;
|
|
32
42
|
readonly width: _angular_core.WritableSignal<number | null>;
|
|
43
|
+
/** Mirrors Base UI's `shouldRender`: hidden panels unmount unless kept for search/measurement. */
|
|
44
|
+
readonly shouldRender: _angular_core.Signal<boolean>;
|
|
33
45
|
/**
|
|
34
|
-
* The `hidden` attribute value. The panel is shown while open or while its exit transition runs
|
|
35
|
-
*
|
|
36
|
-
* panel is hidden — with `until-found` when find-in-page support is requested.
|
|
46
|
+
* The `hidden` attribute value. The panel is shown while open or while its exit transition runs.
|
|
47
|
+
* A kept-mounted panel remains in the DOM but is still hidden while closed.
|
|
37
48
|
*/
|
|
38
49
|
readonly hidden: _angular_core.Signal<"" | "until-found" | undefined>;
|
|
39
50
|
/**
|
|
@@ -43,12 +54,21 @@ declare class RdxCollapsiblePanelDirective {
|
|
|
43
54
|
private isFirstMeasure;
|
|
44
55
|
private originalStyles?;
|
|
45
56
|
constructor();
|
|
57
|
+
private insertMarker;
|
|
58
|
+
private removeMarker;
|
|
59
|
+
private syncRenderedState;
|
|
46
60
|
private updateDimensions;
|
|
47
61
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxCollapsiblePanelDirective, never>;
|
|
48
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxCollapsiblePanelDirective, "[rdxCollapsiblePanel]", never, { "keepMounted": { "alias": "keepMounted"; "required": false; "isSignal": true; }; "hiddenUntilFound": { "alias": "hiddenUntilFound"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
62
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxCollapsiblePanelDirective, "[rdxCollapsiblePanel]", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "keepMounted": { "alias": "keepMounted"; "required": false; "isSignal": true; }; "hiddenUntilFound": { "alias": "hiddenUntilFound"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
49
63
|
}
|
|
50
64
|
|
|
51
65
|
type RdxCollapsibleState = 'open' | 'closed';
|
|
66
|
+
type RdxCollapsibleOpenChangeReason = 'trigger-press' | 'none';
|
|
67
|
+
type RdxCollapsibleOpenChangeEventDetails = RdxCancelableChangeEventDetails<RdxCollapsibleOpenChangeReason>;
|
|
68
|
+
interface RdxCollapsibleOpenChangeEvent {
|
|
69
|
+
open: boolean;
|
|
70
|
+
eventDetails: RdxCollapsibleOpenChangeEventDetails;
|
|
71
|
+
}
|
|
52
72
|
interface CollapsibleRootContext {
|
|
53
73
|
/** Stable id linking the trigger's `aria-controls` to the panel. */
|
|
54
74
|
panelId: Signal<string>;
|
|
@@ -65,7 +85,9 @@ interface CollapsibleRootContext {
|
|
|
65
85
|
*/
|
|
66
86
|
keepMounted: WritableSignal<boolean>;
|
|
67
87
|
hiddenUntilFound: WritableSignal<boolean>;
|
|
68
|
-
toggle: () => void;
|
|
88
|
+
toggle: (event: Event, trigger?: HTMLElement) => void;
|
|
89
|
+
setOpen: (open: boolean, reason: RdxCollapsibleOpenChangeReason, event: Event, trigger?: HTMLElement) => boolean;
|
|
90
|
+
setPanelIdState: (id: string | undefined) => void;
|
|
69
91
|
/** Registers the panel element whose transition duration gates the close completion. */
|
|
70
92
|
registerTransitionElement: (element: HTMLElement) => () => void;
|
|
71
93
|
}
|
|
@@ -78,6 +100,8 @@ declare const provideCollapsibleRootContext: (useFactory: () => CollapsibleRootC
|
|
|
78
100
|
*/
|
|
79
101
|
declare class RdxCollapsibleRootDirective {
|
|
80
102
|
private readonly transition;
|
|
103
|
+
private readonly generatedPanelId;
|
|
104
|
+
private readonly panelIdState;
|
|
81
105
|
/** Reactive open/close transition phase (`'starting'` | `'ending'` | `undefined`). */
|
|
82
106
|
readonly transitionStatus: Signal<RdxTransitionStatus>;
|
|
83
107
|
/** Registers the panel element whose transition duration gates the close completion. */
|
|
@@ -106,7 +130,9 @@ declare class RdxCollapsibleRootDirective {
|
|
|
106
130
|
*/
|
|
107
131
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
108
132
|
/** Stable id linking the trigger's `aria-controls` to the panel. */
|
|
109
|
-
readonly panelId: _angular_core.InputSignal<string>;
|
|
133
|
+
readonly panelId: _angular_core.InputSignal<string | undefined>;
|
|
134
|
+
/** Stable id linking the trigger's `aria-controls` to the panel. */
|
|
135
|
+
readonly resolvedPanelId: Signal<string>;
|
|
110
136
|
/** Composition fallbacks (see {@link CollapsibleRootContext}). Default `false`. */
|
|
111
137
|
readonly keepMountedContext: WritableSignal<boolean>;
|
|
112
138
|
readonly hiddenUntilFoundContext: WritableSignal<boolean>;
|
|
@@ -117,7 +143,7 @@ declare class RdxCollapsibleRootDirective {
|
|
|
117
143
|
*
|
|
118
144
|
* @group Emits
|
|
119
145
|
*/
|
|
120
|
-
readonly onOpenChange: _angular_core.OutputEmitterRef<
|
|
146
|
+
readonly onOpenChange: _angular_core.OutputEmitterRef<RdxCollapsibleOpenChangeEvent>;
|
|
121
147
|
/**
|
|
122
148
|
* Event handler called after the open/close transition has finished.
|
|
123
149
|
*
|
|
@@ -126,6 +152,8 @@ declare class RdxCollapsibleRootDirective {
|
|
|
126
152
|
readonly onOpenChangeComplete: _angular_core.OutputEmitterRef<boolean>;
|
|
127
153
|
private hasAppliedDefaultOpen;
|
|
128
154
|
private previousOpen;
|
|
155
|
+
setPanelIdState(id: string | undefined): void;
|
|
156
|
+
setOpen(nextOpen: boolean, reason: RdxCollapsibleOpenChangeReason, event: Event, trigger?: HTMLElement): boolean;
|
|
129
157
|
constructor();
|
|
130
158
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxCollapsibleRootDirective, never>;
|
|
131
159
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxCollapsibleRootDirective, "[rdxCollapsibleRoot]", ["rdxCollapsibleRoot"], { "open": { "alias": "open"; "required": false; "isSignal": true; }; "defaultOpen": { "alias": "defaultOpen"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "panelId": { "alias": "panelId"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "onOpenChange": "onOpenChange"; "onOpenChangeComplete": "onOpenChangeComplete"; }, never, never, true, never>;
|
|
@@ -135,26 +163,18 @@ declare class RdxCollapsibleRootDirective {
|
|
|
135
163
|
* A button that opens and closes the collapsible panel.
|
|
136
164
|
*/
|
|
137
165
|
declare class RdxCollapsibleTriggerDirective {
|
|
166
|
+
private readonly elementRef;
|
|
138
167
|
protected readonly rootContext: _radix_ng_primitives_collapsible.CollapsibleRootContext;
|
|
168
|
+
protected handleClick(event: MouseEvent): void;
|
|
139
169
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxCollapsibleTriggerDirective, never>;
|
|
140
170
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxCollapsibleTriggerDirective, "[rdxCollapsibleTrigger]", never, {}, {}, never, never, true, never>;
|
|
141
171
|
}
|
|
142
172
|
|
|
143
|
-
/**
|
|
144
|
-
* Structural directive that mounts the collapsible panel contents only while open, unmounting them
|
|
145
|
-
* once the exit animation finishes. Opt into this when the closed contents should leave the DOM;
|
|
146
|
-
* otherwise apply `rdxCollapsiblePanel` directly (optionally with `keepMounted`).
|
|
147
|
-
*/
|
|
148
|
-
declare class RdxCollapsiblePanelPresenceDirective {
|
|
149
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxCollapsiblePanelPresenceDirective, never>;
|
|
150
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxCollapsiblePanelPresenceDirective, "ng-template[rdxCollapsiblePanelPresence]", never, {}, {}, never, never, true, [{ directive: typeof i1.RdxPresenceDirective; inputs: {}; outputs: {}; }]>;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
173
|
declare class RdxCollapsibleModule {
|
|
154
174
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxCollapsibleModule, never>;
|
|
155
|
-
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<RdxCollapsibleModule, never, [typeof RdxCollapsiblePanelDirective, typeof RdxCollapsibleRootDirective, typeof RdxCollapsibleTriggerDirective
|
|
175
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<RdxCollapsibleModule, never, [typeof RdxCollapsiblePanelDirective, typeof RdxCollapsibleRootDirective, typeof RdxCollapsibleTriggerDirective], [typeof RdxCollapsiblePanelDirective, typeof RdxCollapsibleRootDirective, typeof RdxCollapsibleTriggerDirective]>;
|
|
156
176
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<RdxCollapsibleModule>;
|
|
157
177
|
}
|
|
158
178
|
|
|
159
|
-
export { RdxCollapsibleModule, RdxCollapsiblePanelDirective,
|
|
160
|
-
export type { CollapsibleRootContext, RdxCollapsibleState };
|
|
179
|
+
export { RdxCollapsibleModule, RdxCollapsiblePanelDirective, RdxCollapsibleRootDirective, RdxCollapsibleTriggerDirective, injectCollapsibleRootContext, provideCollapsibleRootContext };
|
|
180
|
+
export type { CollapsibleRootContext, RdxCollapsibleOpenChangeEvent, RdxCollapsibleOpenChangeEventDetails, RdxCollapsibleOpenChangeReason, RdxCollapsibleState };
|
|
@@ -2,6 +2,7 @@ import * as _angular_core from '@angular/core';
|
|
|
2
2
|
import { Signal, ElementRef } from '@angular/core';
|
|
3
3
|
import * as _radix_ng_primitives_core from '@radix-ng/primitives/core';
|
|
4
4
|
import { Direction, BooleanInput } from '@radix-ng/primitives/core';
|
|
5
|
+
import * as _radix_ng_primitives_composite from '@radix-ng/primitives/composite';
|
|
5
6
|
|
|
6
7
|
type RdxCompositeOrientation = 'horizontal' | 'vertical' | 'both';
|
|
7
8
|
type RdxCompositeModifierKey = 'Shift' | 'Control' | 'Alt' | 'Meta';
|
|
@@ -13,39 +14,82 @@ interface RdxCompositeItemRegistration<Metadata extends RdxCompositeItemMetadata
|
|
|
13
14
|
type RdxCompositeMetadata<Metadata extends RdxCompositeItemMetadata = RdxCompositeItemMetadata> = {
|
|
14
15
|
index: number;
|
|
15
16
|
} & Metadata;
|
|
17
|
+
interface RdxCompositeListContext {
|
|
18
|
+
listElement: HTMLElement;
|
|
19
|
+
items: Signal<RdxCompositeItemRegistration[]>;
|
|
20
|
+
itemMap: Signal<Map<HTMLElement, RdxCompositeMetadata>>;
|
|
21
|
+
registerItem: <Metadata extends RdxCompositeItemMetadata>(item: RdxCompositeItemRegistration<Metadata>) => () => void;
|
|
22
|
+
indexOf: (element: HTMLElement) => number;
|
|
23
|
+
}
|
|
16
24
|
interface RdxCompositeRootContext {
|
|
17
25
|
rootElement: HTMLElement;
|
|
18
26
|
highlightedIndex: Signal<number>;
|
|
19
27
|
highlightItemOnHover: Signal<boolean>;
|
|
20
28
|
orientation: Signal<RdxCompositeOrientation>;
|
|
21
29
|
dir: Signal<Direction>;
|
|
22
|
-
registerItem: <Metadata extends RdxCompositeItemMetadata>(item: RdxCompositeItemRegistration<Metadata>) => () => void;
|
|
23
|
-
indexOf: (element: HTMLElement) => number;
|
|
24
30
|
isIndexDisabled: (index: number) => boolean;
|
|
25
31
|
setHighlightedIndex: (index: number, shouldScrollIntoView?: boolean) => void;
|
|
26
32
|
relayKeyboardEvent: (event: KeyboardEvent) => void;
|
|
27
33
|
}
|
|
28
34
|
|
|
35
|
+
/**
|
|
36
|
+
* Registers the host with the nearest composite list without changing focus behavior.
|
|
37
|
+
*/
|
|
38
|
+
declare class RdxCompositeListItem {
|
|
39
|
+
private readonly listContext;
|
|
40
|
+
private readonly elementRef;
|
|
41
|
+
private readonly hasRendered;
|
|
42
|
+
/** Arbitrary metadata included in the list's ordered item map. */
|
|
43
|
+
readonly metadataInput: _angular_core.InputSignal<RdxCompositeItemMetadata | null | undefined>;
|
|
44
|
+
private readonly _metadata;
|
|
45
|
+
readonly index: _angular_core.Signal<number>;
|
|
46
|
+
readonly inListElement: _angular_core.Signal<boolean>;
|
|
47
|
+
constructor();
|
|
48
|
+
setMetadata(value: RdxCompositeItemMetadata | null | undefined): void;
|
|
49
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxCompositeListItem, never>;
|
|
50
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxCompositeListItem, "[rdxCompositeListItem]", ["rdxCompositeListItem"], { "metadataInput": { "alias": "metadata"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
51
|
+
}
|
|
52
|
+
|
|
29
53
|
/**
|
|
30
54
|
* Internal Base UI-style composite item. Registers itself with the nearest composite root and
|
|
31
55
|
* receives the roving `tabindex` from the root's highlighted index.
|
|
32
56
|
*/
|
|
33
57
|
declare class RdxCompositeItem {
|
|
34
58
|
private readonly rootContext;
|
|
59
|
+
private readonly listItem;
|
|
35
60
|
private readonly elementRef;
|
|
36
|
-
/** Arbitrary metadata included in the root's ordered item map. */
|
|
37
|
-
readonly metadataInput: _angular_core.InputSignal<RdxCompositeItemMetadata | null | undefined>;
|
|
38
|
-
private readonly _metadata;
|
|
39
61
|
readonly index: _angular_core.Signal<number>;
|
|
40
62
|
private readonly inRootElement;
|
|
41
63
|
protected readonly highlighted: _angular_core.Signal<boolean>;
|
|
42
64
|
protected readonly tabIndex: _angular_core.Signal<-1 | 0 | null>;
|
|
43
|
-
constructor();
|
|
44
65
|
setMetadata(value: RdxCompositeItemMetadata | null | undefined): void;
|
|
45
66
|
protected handleFocus(): void;
|
|
46
67
|
protected handleMouseMove(): void;
|
|
47
68
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxCompositeItem, never>;
|
|
48
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxCompositeItem, "[rdxCompositeItem]", ["rdxCompositeItem"], {
|
|
69
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxCompositeItem, "[rdxCompositeItem]", ["rdxCompositeItem"], {}, {}, never, never, true, [{ directive: typeof RdxCompositeListItem; inputs: { "metadata": "metadata"; }; outputs: {}; }]>;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
declare const injectRdxCompositeListContext: _radix_ng_primitives_core.InjectContext<RdxCompositeListContext>;
|
|
73
|
+
declare const provideRdxCompositeListContext: (useFactory: () => RdxCompositeListContext) => _angular_core.Provider;
|
|
74
|
+
/**
|
|
75
|
+
* Base UI-style composite list. Owns item registration and DOM-order metadata without applying
|
|
76
|
+
* roving tabindex or keyboard navigation.
|
|
77
|
+
*/
|
|
78
|
+
declare class RdxCompositeList {
|
|
79
|
+
readonly elementRef: ElementRef<HTMLElement>;
|
|
80
|
+
private readonly registeredItems;
|
|
81
|
+
/** Emits when the ordered item map changes. */
|
|
82
|
+
readonly onMapChange: _angular_core.OutputEmitterRef<Map<HTMLElement, RdxCompositeMetadata>>;
|
|
83
|
+
/** Items registered with this list, sorted in DOM order. */
|
|
84
|
+
readonly items: _angular_core.Signal<RdxCompositeItemRegistration<RdxCompositeItemMetadata>[]>;
|
|
85
|
+
/** Ordered metadata keyed by item element. */
|
|
86
|
+
readonly itemMap: _angular_core.Signal<Map<HTMLElement, RdxCompositeMetadata>>;
|
|
87
|
+
constructor();
|
|
88
|
+
registerItem<Metadata extends RdxCompositeItemMetadata>(item: RdxCompositeItemRegistration<Metadata>): () => void;
|
|
89
|
+
indexOf(element: HTMLElement): number;
|
|
90
|
+
elements(): HTMLElement[];
|
|
91
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxCompositeList, never>;
|
|
92
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxCompositeList, "[rdxCompositeList]", ["rdxCompositeList"], {}, { "onMapChange": "onMapChange"; }, never, never, true, never>;
|
|
49
93
|
}
|
|
50
94
|
|
|
51
95
|
declare const injectRdxCompositeRootContext: _radix_ng_primitives_core.InjectContext<RdxCompositeRootContext>;
|
|
@@ -55,7 +99,7 @@ declare const provideRdxCompositeRootContext: (useFactory: () => RdxCompositeRoo
|
|
|
55
99
|
*/
|
|
56
100
|
declare class RdxCompositeRoot {
|
|
57
101
|
readonly elementRef: ElementRef<HTMLElement>;
|
|
58
|
-
private readonly
|
|
102
|
+
private readonly compositeList;
|
|
59
103
|
private hasSetInitialIndex;
|
|
60
104
|
/** The composite orientation. */
|
|
61
105
|
readonly orientationInput: _angular_core.InputSignal<RdxCompositeOrientation>;
|
|
@@ -92,10 +136,9 @@ declare class RdxCompositeRoot {
|
|
|
92
136
|
readonly onHighlightedIndexChange: _angular_core.OutputEmitterRef<number>;
|
|
93
137
|
/** Emits when the ordered item map changes. */
|
|
94
138
|
readonly onMapChange: _angular_core.OutputEmitterRef<Map<HTMLElement, RdxCompositeMetadata>>;
|
|
95
|
-
readonly items: _angular_core.Signal<RdxCompositeItemRegistration<RdxCompositeItemMetadata>[]>;
|
|
139
|
+
readonly items: _angular_core.Signal<_radix_ng_primitives_composite.RdxCompositeItemRegistration<_radix_ng_primitives_composite.RdxCompositeItemMetadata>[]>;
|
|
96
140
|
readonly itemMap: _angular_core.Signal<Map<HTMLElement, RdxCompositeMetadata>>;
|
|
97
141
|
constructor();
|
|
98
|
-
registerItem<Metadata extends RdxCompositeItemMetadata>(item: RdxCompositeItemRegistration<Metadata>): () => void;
|
|
99
142
|
indexOf(element: HTMLElement): number;
|
|
100
143
|
setOrientation(value: RdxCompositeOrientation): void;
|
|
101
144
|
setLoopFocus(value: boolean): void;
|
|
@@ -111,7 +154,7 @@ declare class RdxCompositeRoot {
|
|
|
111
154
|
private getNextIndex;
|
|
112
155
|
private elements;
|
|
113
156
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxCompositeRoot, never>;
|
|
114
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxCompositeRoot, "[rdxCompositeRoot]", ["rdxCompositeRoot"], { "orientationInput": { "alias": "orientation"; "required": false; "isSignal": true; }; "dirInput": { "alias": "dir"; "required": false; "isSignal": true; }; "loopFocusInput": { "alias": "loopFocus"; "required": false; "isSignal": true; }; "enableHomeAndEndKeysInput": { "alias": "enableHomeAndEndKeys"; "required": false; "isSignal": true; }; "disabledIndicesInput": { "alias": "disabledIndices"; "required": false; "isSignal": true; }; "modifierKeysInput": { "alias": "modifierKeys"; "required": false; "isSignal": true; }; "highlightItemOnHover": { "alias": "highlightItemOnHover"; "required": false; "isSignal": true; }; "stopEventPropagation": { "alias": "stopEventPropagation"; "required": false; "isSignal": true; }; "highlightedIndex": { "alias": "highlightedIndex"; "required": false; "isSignal": true; }; }, { "highlightedIndex": "highlightedIndexChange"; "onHighlightedIndexChange": "onHighlightedIndexChange"; "onMapChange": "onMapChange"; }, never, never, true,
|
|
157
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxCompositeRoot, "[rdxCompositeRoot]", ["rdxCompositeRoot"], { "orientationInput": { "alias": "orientation"; "required": false; "isSignal": true; }; "dirInput": { "alias": "dir"; "required": false; "isSignal": true; }; "loopFocusInput": { "alias": "loopFocus"; "required": false; "isSignal": true; }; "enableHomeAndEndKeysInput": { "alias": "enableHomeAndEndKeys"; "required": false; "isSignal": true; }; "disabledIndicesInput": { "alias": "disabledIndices"; "required": false; "isSignal": true; }; "modifierKeysInput": { "alias": "modifierKeys"; "required": false; "isSignal": true; }; "highlightItemOnHover": { "alias": "highlightItemOnHover"; "required": false; "isSignal": true; }; "stopEventPropagation": { "alias": "stopEventPropagation"; "required": false; "isSignal": true; }; "highlightedIndex": { "alias": "highlightedIndex"; "required": false; "isSignal": true; }; }, { "highlightedIndex": "highlightedIndexChange"; "onHighlightedIndexChange": "onHighlightedIndexChange"; "onMapChange": "onMapChange"; }, never, never, true, [{ directive: typeof RdxCompositeList; inputs: {}; outputs: {}; }]>;
|
|
115
158
|
}
|
|
116
159
|
|
|
117
160
|
declare const ACTIVE_COMPOSITE_ITEM = "data-composite-item-active";
|
|
@@ -141,12 +184,12 @@ declare function isElementDisabled(element: HTMLElement | null): boolean;
|
|
|
141
184
|
declare function isElementVisible(element: HTMLElement | null): boolean;
|
|
142
185
|
declare function scrollIntoViewIfNeeded(scrollContainer: HTMLElement | null, element: HTMLElement | null, direction: Direction, orientation: RdxCompositeOrientation): void;
|
|
143
186
|
|
|
144
|
-
declare const compositeImports: (typeof RdxCompositeRoot | typeof RdxCompositeItem)[];
|
|
187
|
+
declare const compositeImports: (typeof RdxCompositeList | typeof RdxCompositeListItem | typeof RdxCompositeRoot | typeof RdxCompositeItem)[];
|
|
145
188
|
declare class RdxCompositeModule {
|
|
146
189
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxCompositeModule, never>;
|
|
147
|
-
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<RdxCompositeModule, never, [typeof RdxCompositeRoot, typeof RdxCompositeItem], [typeof RdxCompositeRoot, typeof RdxCompositeItem]>;
|
|
190
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<RdxCompositeModule, never, [typeof RdxCompositeList, typeof RdxCompositeListItem, typeof RdxCompositeRoot, typeof RdxCompositeItem], [typeof RdxCompositeList, typeof RdxCompositeListItem, typeof RdxCompositeRoot, typeof RdxCompositeItem]>;
|
|
148
191
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<RdxCompositeModule>;
|
|
149
192
|
}
|
|
150
193
|
|
|
151
|
-
export { ACTIVE_COMPOSITE_ITEM, ARROW_KEYS, COMPOSITE_KEYS, MODIFIER_KEYS, RdxCompositeItem, RdxCompositeModule, RdxCompositeRoot, compositeImports, findNonDisabledListIndex, getCompositeNavigationKeys, getMaxListIndex, getMinListIndex, injectRdxCompositeRootContext, isElementDisabled, isElementVisible, isIndexOutOfListBounds, isListIndexDisabled, isModifierKeySet, isNativeTextInput, provideRdxCompositeRootContext, scrollIntoViewIfNeeded, shouldKeepNativeTextInputBehavior, sortByDocumentPosition };
|
|
152
|
-
export type { RdxCompositeItemMetadata, RdxCompositeItemRegistration, RdxCompositeMetadata, RdxCompositeModifierKey, RdxCompositeOrientation, RdxCompositeRootContext };
|
|
194
|
+
export { ACTIVE_COMPOSITE_ITEM, ARROW_KEYS, COMPOSITE_KEYS, MODIFIER_KEYS, RdxCompositeItem, RdxCompositeList, RdxCompositeListItem, RdxCompositeModule, RdxCompositeRoot, compositeImports, findNonDisabledListIndex, getCompositeNavigationKeys, getMaxListIndex, getMinListIndex, injectRdxCompositeListContext, injectRdxCompositeRootContext, isElementDisabled, isElementVisible, isIndexOutOfListBounds, isListIndexDisabled, isModifierKeySet, isNativeTextInput, provideRdxCompositeListContext, provideRdxCompositeRootContext, scrollIntoViewIfNeeded, shouldKeepNativeTextInputBehavior, sortByDocumentPosition };
|
|
195
|
+
export type { RdxCompositeItemMetadata, RdxCompositeItemRegistration, RdxCompositeListContext, RdxCompositeMetadata, RdxCompositeModifierKey, RdxCompositeOrientation, RdxCompositeRootContext };
|