@radix-ng/primitives 1.0.1 → 1.0.2
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 +10 -10
- 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-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 +4 -4
- package/types/radix-ng-primitives-checkbox.d.ts +98 -70
- 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,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 };
|