@radix-ng/primitives 1.0.0-beta.5 → 1.0.1

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.
Files changed (50) hide show
  1. package/composite/README.md +3 -0
  2. package/fesm2022/radix-ng-primitives-accordion.mjs +12 -36
  3. package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
  4. package/fesm2022/radix-ng-primitives-composite.mjs +515 -0
  5. package/fesm2022/radix-ng-primitives-composite.mjs.map +1 -0
  6. package/fesm2022/radix-ng-primitives-drawer.mjs +442 -2
  7. package/fesm2022/radix-ng-primitives-drawer.mjs.map +1 -1
  8. package/fesm2022/radix-ng-primitives-menu.mjs +38 -16
  9. package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
  10. package/fesm2022/radix-ng-primitives-menubar.mjs +68 -36
  11. package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
  12. package/fesm2022/radix-ng-primitives-navigation-menu.mjs +281 -88
  13. package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
  14. package/fesm2022/radix-ng-primitives-popover.mjs +40 -15
  15. package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
  16. package/fesm2022/radix-ng-primitives-popper.mjs +73 -65
  17. package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
  18. package/fesm2022/radix-ng-primitives-radio.mjs +63 -27
  19. package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
  20. package/fesm2022/radix-ng-primitives-roving-focus.mjs +40 -8
  21. package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +1 -1
  22. package/fesm2022/radix-ng-primitives-scroll-area.mjs +56 -25
  23. package/fesm2022/radix-ng-primitives-scroll-area.mjs.map +1 -1
  24. package/fesm2022/radix-ng-primitives-select.mjs +3 -0
  25. package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
  26. package/fesm2022/radix-ng-primitives-tabs.mjs +50 -21
  27. package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
  28. package/fesm2022/radix-ng-primitives-toggle-group.mjs +66 -21
  29. package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
  30. package/fesm2022/radix-ng-primitives-toggle.mjs +29 -11
  31. package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
  32. package/fesm2022/radix-ng-primitives-toolbar.mjs +50 -24
  33. package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
  34. package/navigation-menu/README.md +5 -2
  35. package/package.json +5 -1
  36. package/types/radix-ng-primitives-accordion.d.ts +9 -13
  37. package/types/radix-ng-primitives-composite.d.ts +152 -0
  38. package/types/radix-ng-primitives-drawer.d.ts +40 -2
  39. package/types/radix-ng-primitives-menu.d.ts +5 -3
  40. package/types/radix-ng-primitives-menubar.d.ts +10 -5
  41. package/types/radix-ng-primitives-navigation-menu.d.ts +65 -33
  42. package/types/radix-ng-primitives-popover.d.ts +9 -5
  43. package/types/radix-ng-primitives-popper.d.ts +1 -0
  44. package/types/radix-ng-primitives-radio.d.ts +11 -9
  45. package/types/radix-ng-primitives-roving-focus.d.ts +15 -1
  46. package/types/radix-ng-primitives-scroll-area.d.ts +4 -1
  47. package/types/radix-ng-primitives-tabs.d.ts +8 -5
  48. package/types/radix-ng-primitives-toggle-group.d.ts +27 -16
  49. package/types/radix-ng-primitives-toggle.d.ts +5 -5
  50. package/types/radix-ng-primitives-toolbar.d.ts +22 -14
@@ -1,8 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, model, input, booleanAttribute, output, signal, computed, effect, Directive, inject, ElementRef, Renderer2, DestroyRef } from '@angular/core';
2
+ import { InjectionToken, inject, ElementRef, model, input, booleanAttribute, output, signal, computed, effect, Directive, Renderer2, DestroyRef } from '@angular/core';
3
+ import * as i1 from '@radix-ng/primitives/composite';
4
+ import { RdxCompositeRoot, RdxCompositeItem } from '@radix-ng/primitives/composite';
3
5
  import { createCancelableChangeEventDetails, provideValueAccessor, provideToken } from '@radix-ng/primitives/core';
4
- import * as i1 from '@radix-ng/primitives/roving-focus';
5
- import { RdxRovingFocusGroupDirective, RdxRovingFocusItemDirective } from '@radix-ng/primitives/roving-focus';
6
6
  import * as i1$1 from '@radix-ng/primitives/visually-hidden';
7
7
  import { RdxVisuallyHiddenDirective } from '@radix-ng/primitives/visually-hidden';
8
8
 
@@ -10,6 +10,8 @@ const RDX_RADIO_GROUP = new InjectionToken('RdxRadioGroup');
10
10
 
11
11
  class RdxRadioGroupDirective {
12
12
  constructor() {
13
+ this.elementRef = inject(ElementRef);
14
+ this.compositeRoot = inject(RdxCompositeRoot, { self: true });
13
15
  this.value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
14
16
  this.defaultValue = input(...(ngDevMode ? [undefined, { debugName: "defaultValue" }] : /* istanbul ignore next */ []));
15
17
  this.name = input(...(ngDevMode ? [undefined, { debugName: "name" }] : /* istanbul ignore next */ []));
@@ -17,7 +19,6 @@ class RdxRadioGroupDirective {
17
19
  this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
18
20
  this.readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
19
21
  this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
20
- this.orientation = input(...(ngDevMode ? [undefined, { debugName: "orientation" }] : /* istanbul ignore next */ []));
21
22
  /**
22
23
  * Event handler called when the value changes.
23
24
  */
@@ -25,6 +26,17 @@ class RdxRadioGroupDirective {
25
26
  this.disable = signal(this.disabled(), ...(ngDevMode ? [{ debugName: "disable" }] : /* istanbul ignore next */ []));
26
27
  this.disabledState = computed(() => this.disable() || this.disabled(), ...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
27
28
  this.arrowNavigation = signal(false, ...(ngDevMode ? [{ debugName: "arrowNavigation" }] : /* istanbul ignore next */ []));
29
+ this.itemMetadata = computed(() => Array.from(this.compositeRoot.itemMap().values()).filter(isRadioItemMetadata), ...(ngDevMode ? [{ debugName: "itemMetadata" }] : /* istanbul ignore next */ []));
30
+ this.disabledIndices = computed(() => this.itemMetadata()
31
+ .filter((metadata) => metadata.disabled)
32
+ .map((metadata) => metadata.index), ...(ngDevMode ? [{ debugName: "disabledIndices" }] : /* istanbul ignore next */ []));
33
+ this.activeIndex = computed(() => {
34
+ const value = this.value();
35
+ if (value === null) {
36
+ return -1;
37
+ }
38
+ return this.itemMetadata().find((metadata) => metadata.value === value)?.index ?? -1;
39
+ }, ...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
28
40
  /**
29
41
  * The callback function to call when the value of the radio group changes.
30
42
  */
@@ -43,13 +55,31 @@ class RdxRadioGroupDirective {
43
55
  this.value.set(this.defaultValue());
44
56
  }
45
57
  });
58
+ effect(() => {
59
+ this.compositeRoot.setEnableHomeAndEndKeys(false);
60
+ this.compositeRoot.setModifierKeys(['Shift']);
61
+ });
62
+ effect(() => {
63
+ this.compositeRoot.setDisabledIndices(this.disabledIndices());
64
+ });
65
+ effect(() => {
66
+ const activeIndex = this.activeIndex();
67
+ if (activeIndex === -1 || this.disabledIndices().includes(activeIndex)) {
68
+ return;
69
+ }
70
+ const activeElement = this.elementRef.nativeElement.ownerDocument.activeElement;
71
+ if (activeElement && this.elementRef.nativeElement.contains(activeElement)) {
72
+ return;
73
+ }
74
+ this.compositeRoot.setHighlightedIndex(activeIndex);
75
+ });
46
76
  }
47
77
  /**
48
78
  * Select a radio item.
49
79
  * @param value The value of the radio item to select.
50
80
  * @ignore
51
81
  */
52
- select(value, event, reason = event ? 'trigger-press' : 'none') {
82
+ select(value, event, reason = 'none') {
53
83
  if (this.disabledState() || this.readonly() || this.value() === value) {
54
84
  return;
55
85
  }
@@ -104,10 +134,10 @@ class RdxRadioGroupDirective {
104
134
  return;
105
135
  }
106
136
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxRadioGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
107
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxRadioGroupDirective, isStandalone: true, selector: "[rdxRadioRoot]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", onValueChange: "onValueChange" }, host: { attributes: { "role": "radiogroup" }, listeners: { "keydown": "onKeydown()" }, properties: { "attr.aria-orientation": "orientation()", "attr.aria-required": "required() ? \"true\" : undefined", "attr.data-disabled": "disabledState() ? \"\" : undefined", "attr.data-readonly": "readonly() ? \"\" : undefined", "attr.data-required": "required() ? \"\" : undefined" } }, providers: [
137
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxRadioGroupDirective, isStandalone: true, selector: "[rdxRadioRoot]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", onValueChange: "onValueChange" }, host: { attributes: { "role": "radiogroup" }, listeners: { "keydown": "onKeydown()" }, properties: { "attr.aria-required": "required() ? \"true\" : undefined", "attr.aria-disabled": "disabledState() ? \"true\" : undefined", "attr.aria-readonly": "readonly() ? \"true\" : undefined", "attr.data-disabled": "disabledState() ? \"\" : undefined", "attr.data-readonly": "readonly() ? \"\" : undefined", "attr.data-required": "required() ? \"\" : undefined" } }, providers: [
108
138
  provideValueAccessor(RdxRadioGroupDirective),
109
139
  { provide: RDX_RADIO_GROUP, useExisting: RdxRadioGroupDirective }
110
- ], exportAs: ["rdxRadioRoot"], hostDirectives: [{ directive: i1.RdxRovingFocusGroupDirective, inputs: ["dir", "dir", "orientation", "orientation", "loop", "loop"] }], ngImport: i0 }); }
140
+ ], exportAs: ["rdxRadioRoot"], hostDirectives: [{ directive: i1.RdxCompositeRoot }], ngImport: i0 }); }
111
141
  }
112
142
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxRadioGroupDirective, decorators: [{
113
143
  type: Directive,
@@ -118,18 +148,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
118
148
  provideValueAccessor(RdxRadioGroupDirective),
119
149
  { provide: RDX_RADIO_GROUP, useExisting: RdxRadioGroupDirective }
120
150
  ],
121
- hostDirectives: [{ directive: RdxRovingFocusGroupDirective, inputs: ['dir', 'orientation', 'loop'] }],
151
+ hostDirectives: [RdxCompositeRoot],
122
152
  host: {
123
153
  role: 'radiogroup',
124
- '[attr.aria-orientation]': 'orientation()',
125
154
  '[attr.aria-required]': 'required() ? "true" : undefined',
155
+ '[attr.aria-disabled]': 'disabledState() ? "true" : undefined',
156
+ '[attr.aria-readonly]': 'readonly() ? "true" : undefined',
126
157
  '[attr.data-disabled]': 'disabledState() ? "" : undefined',
127
158
  '[attr.data-readonly]': 'readonly() ? "" : undefined',
128
159
  '[attr.data-required]': 'required() ? "" : undefined',
129
160
  '(keydown)': 'onKeydown()'
130
161
  }
131
162
  }]
132
- }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], onValueChange: [{ type: i0.Output, args: ["onValueChange"] }] } });
163
+ }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], onValueChange: [{ type: i0.Output, args: ["onValueChange"] }] } });
164
+ function isRadioItemMetadata(metadata) {
165
+ return typeof metadata['disabled'] === 'boolean' && typeof metadata['value'] === 'string';
166
+ }
133
167
 
134
168
  const RdxRadioItemToken = new InjectionToken('RadioItemToken');
135
169
  function injectRadioItem() {
@@ -140,7 +174,7 @@ class RdxRadioItemDirective {
140
174
  this.radioGroup = inject(RDX_RADIO_GROUP);
141
175
  this.elementRef = inject(ElementRef);
142
176
  this.renderer = inject(Renderer2);
143
- this.rovingFocusItem = inject(RdxRovingFocusItemDirective);
177
+ this.compositeItem = inject(RdxCompositeItem, { self: true });
144
178
  this.destroyRef = inject(DestroyRef);
145
179
  this.inputElement = this.renderer.createElement('input');
146
180
  this.value = input.required(...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
@@ -149,7 +183,7 @@ class RdxRadioItemDirective {
149
183
  this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
150
184
  this.readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
151
185
  this.nativeButton = input(false, { ...(ngDevMode ? { debugName: "nativeButton" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
152
- this.nativeButtonState = computed(() => this.nativeButton() || this.elementRef.nativeElement.tagName === 'BUTTON', ...(ngDevMode ? [{ debugName: "nativeButtonState" }] : /* istanbul ignore next */ []));
186
+ this.nativeButtonState = computed(() => this.nativeButton(), ...(ngDevMode ? [{ debugName: "nativeButtonState" }] : /* istanbul ignore next */ []));
153
187
  this.disabledState = computed(() => this.radioGroup.disabledState() || this.disabled(), ...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
154
188
  this.readonlyState = computed(() => this.radioGroup.readonly() || this.readonly(), ...(ngDevMode ? [{ debugName: "readonlyState" }] : /* istanbul ignore next */ []));
155
189
  this.requiredState = computed(() => this.radioGroup.required() || this.required(), ...(ngDevMode ? [{ debugName: "requiredState" }] : /* istanbul ignore next */ []));
@@ -158,7 +192,7 @@ class RdxRadioItemDirective {
158
192
  this.createHiddenInput();
159
193
  const unlistenInputChange = this.renderer.listen(this.inputElement, 'change', (event) => {
160
194
  if (this.inputElement.checked) {
161
- this.radioGroup.select(this.value(), event, 'trigger-press');
195
+ this.radioGroup.select(this.value(), event);
162
196
  }
163
197
  });
164
198
  this.destroyRef.onDestroy(() => {
@@ -169,24 +203,30 @@ class RdxRadioItemDirective {
169
203
  }
170
204
  });
171
205
  effect(() => {
172
- this.rovingFocusItem.setActive(this.checkedState());
173
- this.rovingFocusItem.setFocusable(!this.disabledState());
206
+ this.compositeItem.setMetadata({
207
+ disabled: this.disabledState(),
208
+ value: this.value()
209
+ });
174
210
  this.syncHiddenInput();
175
211
  });
176
212
  }
177
213
  /** @ignore */
178
214
  onClick(event) {
179
215
  if (!this.disabledState() && !this.readonlyState()) {
180
- this.radioGroup.select(this.value(), event, 'trigger-press');
216
+ this.radioGroup.select(this.value(), event);
181
217
  }
182
218
  }
183
219
  /** @ignore */
184
220
  onKeyDown(event) {
185
221
  const keyEvent = event;
186
- if (keyEvent.key === ' ' || keyEvent.key === 'Enter') {
222
+ if (keyEvent.key === ' ') {
187
223
  this.onClick(keyEvent);
188
224
  return;
189
225
  }
226
+ if (keyEvent.key === 'Enter') {
227
+ keyEvent.preventDefault();
228
+ return;
229
+ }
190
230
  if (this.isAllowedArrowKey(keyEvent.key)) {
191
231
  this.radioGroup.setArrowNavigation(true);
192
232
  }
@@ -199,7 +239,7 @@ class RdxRadioItemDirective {
199
239
  onFocus(event) {
200
240
  queueMicrotask(() => {
201
241
  if (this.radioGroup.isArrowNavigation()) {
202
- this.radioGroup.select(this.value(), event, 'keyboard');
242
+ this.radioGroup.select(this.value(), event);
203
243
  this.radioGroup.setArrowNavigation(false);
204
244
  }
205
245
  });
@@ -208,11 +248,7 @@ class RdxRadioItemDirective {
208
248
  if (!this.ARROW_KEYS.includes(key)) {
209
249
  return false;
210
250
  }
211
- const orientation = this.radioGroup.orientation() ?? 'horizontal';
212
- if (orientation === 'vertical') {
213
- return key === 'ArrowUp' || key === 'ArrowDown';
214
- }
215
- return key === 'ArrowLeft' || key === 'ArrowRight';
251
+ return true;
216
252
  }
217
253
  createHiddenInput() {
218
254
  const host = this.elementRef.nativeElement;
@@ -266,7 +302,7 @@ class RdxRadioItemDirective {
266
302
  }
267
303
  }
268
304
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxRadioItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
269
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxRadioItemDirective, isStandalone: true, selector: "[rdxRadioItem]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, nativeButton: { classPropertyName: "nativeButton", publicName: "nativeButton", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "radio" }, listeners: { "click": "onClick($event)", "keydown": "onKeyDown($event)", "keyup": "onKeyUp()", "focus": "onFocus($event)" }, properties: { "attr.type": "nativeButtonState() ? \"button\" : undefined", "attr.aria-checked": "checkedState()", "attr.aria-readonly": "readonlyState() ? \"true\" : undefined", "attr.aria-required": "requiredState() ? \"true\" : undefined", "attr.data-checked": "checkedState() ? \"\" : undefined", "attr.data-unchecked": "!checkedState() ? \"\" : undefined", "attr.data-disabled": "disabledState() ? \"\" : undefined", "attr.data-readonly": "readonlyState() ? \"\" : undefined", "attr.data-required": "requiredState() ? \"\" : undefined", "attr.data-state": "checkedState() ? \"checked\" : \"unchecked\"", "attr.disabled": "nativeButtonState() && disabledState() ? \"\" : undefined" } }, providers: [provideToken(RdxRadioItemToken, RdxRadioItemDirective)], exportAs: ["rdxRadioItem"], hostDirectives: [{ directive: i1.RdxRovingFocusItemDirective, inputs: ["tabStopId", "id", "focusable", "focusable", "active", "active", "allowShiftKey", "allowShiftKey"] }], ngImport: i0 }); }
305
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxRadioItemDirective, isStandalone: true, selector: "[rdxRadioItem]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, nativeButton: { classPropertyName: "nativeButton", publicName: "nativeButton", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "radio" }, listeners: { "click": "onClick($event)", "keydown": "onKeyDown($event)", "keyup": "onKeyUp()", "focus": "onFocus($event)" }, properties: { "attr.type": "nativeButtonState() ? \"button\" : undefined", "attr.aria-checked": "checkedState()", "attr.aria-disabled": "disabledState() ? \"true\" : undefined", "attr.aria-readonly": "readonlyState() ? \"true\" : undefined", "attr.aria-required": "requiredState() ? \"true\" : undefined", "attr.data-composite-item-active": "checkedState() ? \"\" : undefined", "attr.data-checked": "checkedState() ? \"\" : undefined", "attr.data-unchecked": "!checkedState() ? \"\" : undefined", "attr.data-disabled": "disabledState() ? \"\" : undefined", "attr.data-readonly": "readonlyState() ? \"\" : undefined", "attr.data-required": "requiredState() ? \"\" : undefined", "attr.data-state": "checkedState() ? \"checked\" : \"unchecked\"", "attr.disabled": "nativeButtonState() && disabledState() ? \"\" : undefined" } }, providers: [provideToken(RdxRadioItemToken, RdxRadioItemDirective)], exportAs: ["rdxRadioItem"], hostDirectives: [{ directive: i1.RdxCompositeItem }], ngImport: i0 }); }
270
306
  }
271
307
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxRadioItemDirective, decorators: [{
272
308
  type: Directive,
@@ -274,15 +310,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
274
310
  selector: '[rdxRadioItem]',
275
311
  exportAs: 'rdxRadioItem',
276
312
  providers: [provideToken(RdxRadioItemToken, RdxRadioItemDirective)],
277
- hostDirectives: [
278
- { directive: RdxRovingFocusItemDirective, inputs: ['tabStopId: id', 'focusable', 'active', 'allowShiftKey'] }
279
- ],
313
+ hostDirectives: [RdxCompositeItem],
280
314
  host: {
281
315
  '[attr.type]': 'nativeButtonState() ? "button" : undefined',
282
316
  role: 'radio',
283
317
  '[attr.aria-checked]': 'checkedState()',
318
+ '[attr.aria-disabled]': 'disabledState() ? "true" : undefined',
284
319
  '[attr.aria-readonly]': 'readonlyState() ? "true" : undefined',
285
320
  '[attr.aria-required]': 'requiredState() ? "true" : undefined',
321
+ '[attr.data-composite-item-active]': 'checkedState() ? "" : undefined',
286
322
  '[attr.data-checked]': 'checkedState() ? "" : undefined',
287
323
  '[attr.data-unchecked]': '!checkedState() ? "" : undefined',
288
324
  '[attr.data-disabled]': 'disabledState() ? "" : undefined',
@@ -1 +1 @@
1
- {"version":3,"file":"radix-ng-primitives-radio.mjs","sources":["../../../packages/primitives/radio/src/radio-tokens.ts","../../../packages/primitives/radio/src/radio-root.directive.ts","../../../packages/primitives/radio/src/radio-item.directive.ts","../../../packages/primitives/radio/src/radio-indicator.directive.ts","../../../packages/primitives/radio/src/radio-item-input.directive.ts","../../../packages/primitives/radio/radix-ng-primitives-radio.ts"],"sourcesContent":["import { InjectionToken, InputSignal, InputSignalWithTransform, ModelSignal, Signal } from '@angular/core';\nimport { BooleanInput } from '@radix-ng/primitives/core';\nimport { Orientation } from '@radix-ng/primitives/roving-focus';\n\nexport interface RadioGroupProps {\n value: ModelSignal<string | null>;\n defaultValue: InputSignal<string | undefined>;\n name: InputSignal<string | undefined>;\n form: InputSignal<string | undefined>;\n disabled: InputSignalWithTransform<boolean, BooleanInput>;\n readonly: InputSignalWithTransform<boolean, BooleanInput>;\n required: InputSignalWithTransform<boolean, BooleanInput>;\n orientation: InputSignal<Orientation | undefined>;\n disabledState: Signal<boolean>;\n}\n\nexport interface RadioGroupDirective extends RadioGroupProps {\n select(value: string | null, event?: Event, reason?: string): void;\n\n onTouched(): void;\n\n setArrowNavigation(value: boolean): void;\n\n isArrowNavigation(): boolean;\n}\n\nexport const RDX_RADIO_GROUP = new InjectionToken<RadioGroupDirective>('RdxRadioGroup');\n","import { booleanAttribute, computed, Directive, effect, input, model, output, signal } from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\nimport {\n BooleanInput,\n createCancelableChangeEventDetails,\n provideValueAccessor,\n RdxCancelableChangeEventDetails,\n RdxFormValueControl\n} from '@radix-ng/primitives/core';\nimport { Orientation, RdxRovingFocusGroupDirective } from '@radix-ng/primitives/roving-focus';\nimport { RadioGroupDirective, RadioGroupProps, RDX_RADIO_GROUP } from './radio-tokens';\n\nexport type RdxRadioValueChangeReason = 'trigger-press' | 'keyboard' | 'focus' | 'none';\nexport type RdxRadioValueChangeEventDetails = RdxCancelableChangeEventDetails<RdxRadioValueChangeReason>;\n\nexport interface RdxRadioValueChangeEvent {\n value: string;\n eventDetails: RdxRadioValueChangeEventDetails;\n}\n\n@Directive({\n selector: '[rdxRadioRoot]',\n exportAs: 'rdxRadioRoot',\n providers: [\n provideValueAccessor(RdxRadioGroupDirective),\n { provide: RDX_RADIO_GROUP, useExisting: RdxRadioGroupDirective }\n ],\n hostDirectives: [{ directive: RdxRovingFocusGroupDirective, inputs: ['dir', 'orientation', 'loop'] }],\n host: {\n role: 'radiogroup',\n '[attr.aria-orientation]': 'orientation()',\n '[attr.aria-required]': 'required() ? \"true\" : undefined',\n '[attr.data-disabled]': 'disabledState() ? \"\" : undefined',\n '[attr.data-readonly]': 'readonly() ? \"\" : undefined',\n '[attr.data-required]': 'required() ? \"\" : undefined',\n '(keydown)': 'onKeydown()'\n }\n})\nexport class RdxRadioGroupDirective\n implements RadioGroupProps, RadioGroupDirective, ControlValueAccessor, RdxFormValueControl<string | null>\n{\n readonly value = model<string | null>(null);\n\n readonly defaultValue = input<string>();\n\n readonly name = input<string>();\n\n readonly form = input<string>();\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly readonly = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly orientation = input<Orientation>();\n\n /**\n * Event handler called when the value changes.\n */\n readonly onValueChange = output<RdxRadioValueChangeEvent>();\n\n private readonly disable = signal<boolean>(this.disabled());\n readonly disabledState = computed(() => this.disable() || this.disabled());\n private readonly arrowNavigation = signal(false);\n\n /**\n * The callback function to call when the value of the radio group changes.\n */\n private onChange: (value: string | null) => void = () => {\n /* Empty */\n };\n\n /**\n * The callback function to call when the radio group is touched.\n * @ignore\n */\n onTouched: () => void = () => {\n /* Empty */\n };\n\n constructor() {\n effect(() => {\n if (this.value() === null && this.defaultValue() !== undefined) {\n this.value.set(this.defaultValue()!);\n }\n });\n }\n\n /**\n * Select a radio item.\n * @param value The value of the radio item to select.\n * @ignore\n */\n select(\n value: string | null,\n event?: Event,\n reason: RdxRadioValueChangeReason = event ? 'trigger-press' : 'none'\n ): void {\n if (this.disabledState() || this.readonly() || this.value() === value) {\n return;\n }\n\n if (value !== null) {\n const trigger = event?.currentTarget instanceof HTMLElement ? event.currentTarget : undefined;\n const { eventDetails } = createCancelableChangeEventDetails(\n reason,\n event ?? new Event('radio.value-change'),\n trigger\n );\n this.onValueChange.emit({ value, eventDetails });\n if (eventDetails.isCanceled()) {\n return;\n }\n }\n\n this.value.set(value);\n this.onChange?.(value);\n this.onTouched();\n }\n\n /**\n * Update the value of the radio group.\n * @param value The new value of the radio group.\n * @ignore\n */\n writeValue(value: string | null): void {\n this.value.set(value);\n }\n\n /**\n * Register a callback function to call when the value of the radio group changes.\n * @param fn The callback function to call when the value of the radio group changes.\n * @ignore\n */\n registerOnChange(fn: (value: string | null) => void): void {\n this.onChange = fn;\n }\n\n /** @ignore */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /**\n * Set the disabled state of the radio group.\n * @param isDisabled Whether the radio group is disabled.\n * @ignore\n */\n setDisabledState(isDisabled: boolean): void {\n this.disable.set(isDisabled);\n }\n\n setArrowNavigation(value: boolean): void {\n this.arrowNavigation.set(value);\n }\n\n isArrowNavigation(): boolean {\n return this.arrowNavigation();\n }\n\n protected onKeydown(): void {\n if (this.disabledState()) return;\n }\n}\n","import {\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n InjectionToken,\n input,\n Renderer2\n} from '@angular/core';\nimport { BooleanInput, provideToken } from '@radix-ng/primitives/core';\nimport { Orientation, RdxRovingFocusItemDirective } from '@radix-ng/primitives/roving-focus';\nimport { RDX_RADIO_GROUP } from './radio-tokens';\n\nexport const RdxRadioItemToken = new InjectionToken<RdxRadioItemDirective>('RadioItemToken');\n\nexport function injectRadioItem(): RdxRadioItemDirective {\n return inject(RdxRadioItemToken);\n}\n\n@Directive({\n selector: '[rdxRadioItem]',\n exportAs: 'rdxRadioItem',\n providers: [provideToken(RdxRadioItemToken, RdxRadioItemDirective)],\n hostDirectives: [\n { directive: RdxRovingFocusItemDirective, inputs: ['tabStopId: id', 'focusable', 'active', 'allowShiftKey'] }\n ],\n\n host: {\n '[attr.type]': 'nativeButtonState() ? \"button\" : undefined',\n role: 'radio',\n '[attr.aria-checked]': 'checkedState()',\n '[attr.aria-readonly]': 'readonlyState() ? \"true\" : undefined',\n '[attr.aria-required]': 'requiredState() ? \"true\" : undefined',\n '[attr.data-checked]': 'checkedState() ? \"\" : undefined',\n '[attr.data-unchecked]': '!checkedState() ? \"\" : undefined',\n '[attr.data-disabled]': 'disabledState() ? \"\" : undefined',\n '[attr.data-readonly]': 'readonlyState() ? \"\" : undefined',\n '[attr.data-required]': 'requiredState() ? \"\" : undefined',\n '[attr.data-state]': 'checkedState() ? \"checked\" : \"unchecked\"',\n '[attr.disabled]': 'nativeButtonState() && disabledState() ? \"\" : undefined',\n '(click)': 'onClick($event)',\n '(keydown)': 'onKeyDown($event)',\n '(keyup)': 'onKeyUp()',\n '(focus)': 'onFocus($event)'\n }\n})\nexport class RdxRadioItemDirective {\n private readonly radioGroup = inject(RDX_RADIO_GROUP);\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly renderer = inject(Renderer2);\n private readonly rovingFocusItem = inject(RdxRovingFocusItemDirective);\n private readonly destroyRef = inject(DestroyRef);\n private readonly inputElement = this.renderer.createElement('input') as HTMLInputElement;\n private previousCheckedState: boolean | undefined;\n\n readonly value = input.required<string>();\n\n readonly id = input<string>();\n\n readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly readonly = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly nativeButton = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly nativeButtonState = computed(\n () => this.nativeButton() || this.elementRef.nativeElement.tagName === 'BUTTON'\n );\n\n readonly disabledState = computed(() => this.radioGroup.disabledState() || this.disabled());\n\n readonly readonlyState = computed(() => this.radioGroup.readonly() || this.readonly());\n\n readonly requiredState = computed(() => this.radioGroup.required() || this.required());\n\n readonly checkedState = computed(() => this.radioGroup.value() === this.value());\n\n private readonly ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'] as const;\n\n constructor() {\n this.createHiddenInput();\n const unlistenInputChange = this.renderer.listen(this.inputElement, 'change', (event: Event) => {\n if (this.inputElement.checked) {\n this.radioGroup.select(this.value(), event, 'trigger-press');\n }\n });\n\n this.destroyRef.onDestroy(() => {\n unlistenInputChange();\n const parent = this.inputElement.parentNode;\n\n if (parent) {\n this.renderer.removeChild(parent, this.inputElement);\n }\n });\n\n effect(() => {\n this.rovingFocusItem.setActive(this.checkedState());\n this.rovingFocusItem.setFocusable(!this.disabledState());\n this.syncHiddenInput();\n });\n }\n\n /** @ignore */\n onClick(event?: Event) {\n if (!this.disabledState() && !this.readonlyState()) {\n this.radioGroup.select(this.value(), event, 'trigger-press');\n }\n }\n\n /** @ignore */\n onKeyDown(event: Event): void {\n const keyEvent = event as KeyboardEvent;\n if (keyEvent.key === ' ' || keyEvent.key === 'Enter') {\n this.onClick(keyEvent);\n return;\n }\n\n if (this.isAllowedArrowKey(keyEvent.key)) {\n this.radioGroup.setArrowNavigation(true);\n }\n }\n\n /** @ignore */\n onKeyUp() {\n this.radioGroup.setArrowNavigation(false);\n }\n\n /** @ignore */\n onFocus(event?: FocusEvent) {\n queueMicrotask(() => {\n if (this.radioGroup.isArrowNavigation()) {\n this.radioGroup.select(this.value(), event, 'keyboard');\n this.radioGroup.setArrowNavigation(false);\n }\n });\n }\n\n private isAllowedArrowKey(key: string): boolean {\n if (!(this.ARROW_KEYS as readonly string[]).includes(key)) {\n return false;\n }\n\n const orientation = this.radioGroup.orientation() ?? ('horizontal' satisfies Orientation);\n\n if (orientation === 'vertical') {\n return key === 'ArrowUp' || key === 'ArrowDown';\n }\n\n return key === 'ArrowLeft' || key === 'ArrowRight';\n }\n\n private createHiddenInput(): void {\n const host = this.elementRef.nativeElement;\n const parent = host.parentNode;\n\n this.renderer.setAttribute(this.inputElement, 'type', 'radio');\n this.renderer.setAttribute(this.inputElement, 'tabindex', '-1');\n this.renderer.setAttribute(this.inputElement, 'aria-hidden', 'true');\n this.renderer.setStyle(this.inputElement, 'position', 'absolute');\n this.renderer.setStyle(this.inputElement, 'pointer-events', 'none');\n this.renderer.setStyle(this.inputElement, 'opacity', '0');\n this.renderer.setStyle(this.inputElement, 'margin', '0');\n this.renderer.setStyle(this.inputElement, 'inset', '0');\n this.renderer.setStyle(this.inputElement, 'transform', 'translateX(-100%)');\n\n if (parent) {\n this.renderer.insertBefore(parent, this.inputElement, host.nextSibling);\n }\n }\n\n private syncHiddenInput(): void {\n const checked = this.checkedState();\n\n this.inputElement.name = this.radioGroup.name() ?? '';\n this.inputElement.value = this.value();\n this.inputElement.checked = checked;\n this.inputElement.required = this.requiredState();\n this.inputElement.disabled = this.disabledState();\n\n this.setOptionalAttribute('name', this.radioGroup.name());\n this.setOptionalAttribute('form', this.radioGroup.form());\n this.setBooleanAttribute('checked', checked);\n this.setBooleanAttribute('required', this.requiredState());\n this.setBooleanAttribute('disabled', this.disabledState());\n this.renderer.setAttribute(this.inputElement, 'value', this.value());\n\n if (this.previousCheckedState === false && checked) {\n this.inputElement.dispatchEvent(new Event('input', { bubbles: true }));\n this.inputElement.dispatchEvent(new Event('change', { bubbles: true }));\n }\n\n this.previousCheckedState = checked;\n }\n\n private setOptionalAttribute(name: string, value: string | undefined): void {\n if (value) {\n this.renderer.setAttribute(this.inputElement, name, value);\n } else {\n this.renderer.removeAttribute(this.inputElement, name);\n }\n }\n\n private setBooleanAttribute(name: string, value: boolean): void {\n if (value) {\n this.renderer.setAttribute(this.inputElement, name, '');\n } else {\n this.renderer.removeAttribute(this.inputElement, name);\n }\n }\n}\n","import { Directive, inject } from '@angular/core';\nimport { RdxRadioItemDirective } from './radio-item.directive';\nimport { RDX_RADIO_GROUP, RadioGroupDirective } from './radio-tokens';\n\n@Directive({\n selector: '[rdxRadioIndicator]',\n exportAs: 'rdxRadioIndicator',\n host: {\n '[attr.data-checked]': 'radioItem.checkedState() ? \"\" : undefined',\n '[attr.data-unchecked]': '!radioItem.checkedState() ? \"\" : undefined',\n '[attr.data-state]': 'radioItem.checkedState() ? \"checked\" : \"unchecked\"',\n '[attr.data-disabled]': 'radioItem.disabledState() ? \"\" : undefined',\n '[attr.data-readonly]': 'radioItem.readonlyState() ? \"\" : undefined',\n '[attr.data-required]': 'radioItem.requiredState() ? \"\" : undefined',\n '[hidden]': '!radioItem.checkedState()',\n '[style.pointer-events]': '\"none\"'\n }\n})\nexport class RdxRadioIndicatorDirective {\n protected readonly radioGroup: RadioGroupDirective = inject(RDX_RADIO_GROUP);\n protected readonly radioItem: RdxRadioItemDirective = inject(RdxRadioItemDirective);\n}\n","import { computed, Directive, effect, ElementRef, inject } from '@angular/core';\nimport { RdxVisuallyHiddenDirective } from '@radix-ng/primitives/visually-hidden';\nimport { injectRadioItem } from './radio-item.directive';\nimport { RDX_RADIO_GROUP } from './radio-tokens';\n\n@Directive({\n selector: 'input[rdxRadioItemInput]',\n exportAs: 'rdxRadioItemInput',\n hostDirectives: [{ directive: RdxVisuallyHiddenDirective, inputs: ['feature'] }],\n host: {\n type: 'radio',\n tabindex: '-1',\n 'aria-hidden': 'true',\n '[attr.name]': 'name()',\n '[attr.form]': 'form()',\n '[attr.required]': 'required() ? \"\" : undefined',\n '[attr.disabled]': 'disabled() ? \"\" : undefined',\n '[attr.checked]': 'checked() ? \"\" : undefined',\n '[checked]': 'checked()',\n '[attr.value]': 'value()',\n '[style]': `{\n position: 'absolute',\n pointerEvents: 'none',\n opacity: 0,\n margin: 0,\n inset: 0,\n transform: 'translateX(-100%)',\n }`\n }\n})\nexport class RdxRadioItemInputDirective {\n private readonly radioItem = injectRadioItem();\n private readonly radioGroup = inject(RDX_RADIO_GROUP);\n private readonly input = inject<ElementRef<HTMLInputElement>>(ElementRef).nativeElement;\n\n readonly name = computed(() => this.radioGroup.name());\n readonly form = computed(() => this.radioGroup.form());\n readonly value = computed(() => this.radioItem.value() || undefined);\n readonly checked = computed(() => this.radioItem.checkedState());\n readonly required = computed(() => this.radioItem.requiredState());\n readonly disabled = computed(() => this.radioItem.disabledState());\n\n constructor() {\n let isInitial = true;\n\n effect(() => {\n const checked = this.checked();\n\n if (isInitial) {\n isInitial = false;\n return;\n }\n\n if (checked) {\n this.input.dispatchEvent(new Event('input', { bubbles: true }));\n this.input.dispatchEvent(new Event('change', { bubbles: true }));\n }\n });\n }\n}\n","/**\n *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AAA,cAAc,EAAE,CAAC,EAAE,SAAS,EAAE,0BAA0B,EAAE,MAAM,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC;AAChF,oBAAA,IAAI,EAAE;AACF,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,QAAQ,EAAE,IAAI;AACd,wBAAA,aAAa,EAAE,MAAM;AACrB,wBAAA,aAAa,EAAE,QAAQ;AACvB,wBAAA,aAAa,EAAE,QAAQ;AACvB,wBAAA,iBAAiB,EAAE,6BAA6B;AAChD,wBAAA,iBAAiB,EAAE,6BAA6B;AAChD,wBAAA,gBAAgB,EAAE,4BAA4B;AAC9C,wBAAA,WAAW,EAAE,WAAW;AACxB,wBAAA,cAAc,EAAE,SAAS;AACzB,wBAAA,SAAS,EAAE,CAAA;;;;;;;AAOT,SAAA;AACL;AACJ,iBAAA;;;AC7BD;;AAEG;;;;"}
1
+ {"version":3,"file":"radix-ng-primitives-radio.mjs","sources":["../../../packages/primitives/radio/src/radio-tokens.ts","../../../packages/primitives/radio/src/radio-root.directive.ts","../../../packages/primitives/radio/src/radio-item.directive.ts","../../../packages/primitives/radio/src/radio-indicator.directive.ts","../../../packages/primitives/radio/src/radio-item-input.directive.ts","../../../packages/primitives/radio/radix-ng-primitives-radio.ts"],"sourcesContent":["import { InjectionToken, InputSignal, InputSignalWithTransform, ModelSignal, Signal } from '@angular/core';\nimport { BooleanInput } from '@radix-ng/primitives/core';\n\nexport type RdxRadioValueChangeReason = 'none';\n\nexport interface RadioGroupProps {\n value: ModelSignal<string | null>;\n defaultValue: InputSignal<string | undefined>;\n name: InputSignal<string | undefined>;\n form: InputSignal<string | undefined>;\n disabled: InputSignalWithTransform<boolean, BooleanInput>;\n readonly: InputSignalWithTransform<boolean, BooleanInput>;\n required: InputSignalWithTransform<boolean, BooleanInput>;\n disabledState: Signal<boolean>;\n}\n\nexport interface RadioGroupDirective extends RadioGroupProps {\n select(value: string | null, event?: Event, reason?: RdxRadioValueChangeReason): void;\n\n onTouched(): void;\n\n setArrowNavigation(value: boolean): void;\n\n isArrowNavigation(): boolean;\n}\n\nexport const RDX_RADIO_GROUP = new InjectionToken<RadioGroupDirective>('RdxRadioGroup');\n","import {\n booleanAttribute,\n computed,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n model,\n output,\n signal\n} from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\nimport { RdxCompositeMetadata, RdxCompositeRoot } from '@radix-ng/primitives/composite';\nimport {\n BooleanInput,\n createCancelableChangeEventDetails,\n provideValueAccessor,\n RdxCancelableChangeEventDetails,\n RdxFormValueControl\n} from '@radix-ng/primitives/core';\nimport { RadioGroupDirective, RadioGroupProps, RDX_RADIO_GROUP, RdxRadioValueChangeReason } from './radio-tokens';\n\nexport type { RdxRadioValueChangeReason } from './radio-tokens';\n\nexport type RdxRadioValueChangeEventDetails = RdxCancelableChangeEventDetails<RdxRadioValueChangeReason>;\n\nexport interface RdxRadioValueChangeEvent {\n value: string;\n eventDetails: RdxRadioValueChangeEventDetails;\n}\n\n@Directive({\n selector: '[rdxRadioRoot]',\n exportAs: 'rdxRadioRoot',\n providers: [\n provideValueAccessor(RdxRadioGroupDirective),\n { provide: RDX_RADIO_GROUP, useExisting: RdxRadioGroupDirective }\n ],\n hostDirectives: [RdxCompositeRoot],\n host: {\n role: 'radiogroup',\n '[attr.aria-required]': 'required() ? \"true\" : undefined',\n '[attr.aria-disabled]': 'disabledState() ? \"true\" : undefined',\n '[attr.aria-readonly]': 'readonly() ? \"true\" : undefined',\n '[attr.data-disabled]': 'disabledState() ? \"\" : undefined',\n '[attr.data-readonly]': 'readonly() ? \"\" : undefined',\n '[attr.data-required]': 'required() ? \"\" : undefined',\n '(keydown)': 'onKeydown()'\n }\n})\nexport class RdxRadioGroupDirective\n implements RadioGroupProps, RadioGroupDirective, ControlValueAccessor, RdxFormValueControl<string | null>\n{\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly compositeRoot = inject(RdxCompositeRoot, { self: true });\n\n readonly value = model<string | null>(null);\n\n readonly defaultValue = input<string>();\n\n readonly name = input<string>();\n\n readonly form = input<string>();\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly readonly = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Event handler called when the value changes.\n */\n readonly onValueChange = output<RdxRadioValueChangeEvent>();\n\n private readonly disable = signal<boolean>(this.disabled());\n readonly disabledState = computed(() => this.disable() || this.disabled());\n private readonly arrowNavigation = signal(false);\n private readonly itemMetadata = computed(() =>\n Array.from(this.compositeRoot.itemMap().values()).filter(isRadioItemMetadata)\n );\n private readonly disabledIndices = computed(() =>\n this.itemMetadata()\n .filter((metadata) => metadata.disabled)\n .map((metadata) => metadata.index)\n );\n private readonly activeIndex = computed(() => {\n const value = this.value();\n if (value === null) {\n return -1;\n }\n\n return this.itemMetadata().find((metadata) => metadata.value === value)?.index ?? -1;\n });\n\n /**\n * The callback function to call when the value of the radio group changes.\n */\n private onChange: (value: string | null) => void = () => {\n /* Empty */\n };\n\n /**\n * The callback function to call when the radio group is touched.\n * @ignore\n */\n onTouched: () => void = () => {\n /* Empty */\n };\n\n constructor() {\n effect(() => {\n if (this.value() === null && this.defaultValue() !== undefined) {\n this.value.set(this.defaultValue()!);\n }\n });\n\n effect(() => {\n this.compositeRoot.setEnableHomeAndEndKeys(false);\n this.compositeRoot.setModifierKeys(['Shift']);\n });\n\n effect(() => {\n this.compositeRoot.setDisabledIndices(this.disabledIndices());\n });\n\n effect(() => {\n const activeIndex = this.activeIndex();\n\n if (activeIndex === -1 || this.disabledIndices().includes(activeIndex)) {\n return;\n }\n\n const activeElement = this.elementRef.nativeElement.ownerDocument.activeElement;\n if (activeElement && this.elementRef.nativeElement.contains(activeElement)) {\n return;\n }\n\n this.compositeRoot.setHighlightedIndex(activeIndex);\n });\n }\n\n /**\n * Select a radio item.\n * @param value The value of the radio item to select.\n * @ignore\n */\n select(value: string | null, event?: Event, reason: RdxRadioValueChangeReason = 'none'): void {\n if (this.disabledState() || this.readonly() || this.value() === value) {\n return;\n }\n\n if (value !== null) {\n const trigger = event?.currentTarget instanceof HTMLElement ? event.currentTarget : undefined;\n const { eventDetails } = createCancelableChangeEventDetails(\n reason,\n event ?? new Event('radio.value-change'),\n trigger\n );\n this.onValueChange.emit({ value, eventDetails });\n if (eventDetails.isCanceled()) {\n return;\n }\n }\n\n this.value.set(value);\n this.onChange?.(value);\n this.onTouched();\n }\n\n /**\n * Update the value of the radio group.\n * @param value The new value of the radio group.\n * @ignore\n */\n writeValue(value: string | null): void {\n this.value.set(value);\n }\n\n /**\n * Register a callback function to call when the value of the radio group changes.\n * @param fn The callback function to call when the value of the radio group changes.\n * @ignore\n */\n registerOnChange(fn: (value: string | null) => void): void {\n this.onChange = fn;\n }\n\n /** @ignore */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /**\n * Set the disabled state of the radio group.\n * @param isDisabled Whether the radio group is disabled.\n * @ignore\n */\n setDisabledState(isDisabled: boolean): void {\n this.disable.set(isDisabled);\n }\n\n setArrowNavigation(value: boolean): void {\n this.arrowNavigation.set(value);\n }\n\n isArrowNavigation(): boolean {\n return this.arrowNavigation();\n }\n\n protected onKeydown(): void {\n if (this.disabledState()) return;\n }\n}\n\ninterface RdxRadioItemMetadata {\n [key: string]: unknown;\n disabled: boolean;\n value: string;\n}\n\nfunction isRadioItemMetadata(metadata: RdxCompositeMetadata): metadata is RdxCompositeMetadata<RdxRadioItemMetadata> {\n return typeof metadata['disabled'] === 'boolean' && typeof metadata['value'] === 'string';\n}\n","import {\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n InjectionToken,\n input,\n Renderer2\n} from '@angular/core';\nimport { RdxCompositeItem } from '@radix-ng/primitives/composite';\nimport { BooleanInput, provideToken } from '@radix-ng/primitives/core';\nimport { RDX_RADIO_GROUP } from './radio-tokens';\n\nexport const RdxRadioItemToken = new InjectionToken<RdxRadioItemDirective>('RadioItemToken');\n\nexport function injectRadioItem(): RdxRadioItemDirective {\n return inject(RdxRadioItemToken);\n}\n\n@Directive({\n selector: '[rdxRadioItem]',\n exportAs: 'rdxRadioItem',\n providers: [provideToken(RdxRadioItemToken, RdxRadioItemDirective)],\n hostDirectives: [RdxCompositeItem],\n\n host: {\n '[attr.type]': 'nativeButtonState() ? \"button\" : undefined',\n role: 'radio',\n '[attr.aria-checked]': 'checkedState()',\n '[attr.aria-disabled]': 'disabledState() ? \"true\" : undefined',\n '[attr.aria-readonly]': 'readonlyState() ? \"true\" : undefined',\n '[attr.aria-required]': 'requiredState() ? \"true\" : undefined',\n '[attr.data-composite-item-active]': 'checkedState() ? \"\" : undefined',\n '[attr.data-checked]': 'checkedState() ? \"\" : undefined',\n '[attr.data-unchecked]': '!checkedState() ? \"\" : undefined',\n '[attr.data-disabled]': 'disabledState() ? \"\" : undefined',\n '[attr.data-readonly]': 'readonlyState() ? \"\" : undefined',\n '[attr.data-required]': 'requiredState() ? \"\" : undefined',\n '[attr.data-state]': 'checkedState() ? \"checked\" : \"unchecked\"',\n '[attr.disabled]': 'nativeButtonState() && disabledState() ? \"\" : undefined',\n '(click)': 'onClick($event)',\n '(keydown)': 'onKeyDown($event)',\n '(keyup)': 'onKeyUp()',\n '(focus)': 'onFocus($event)'\n }\n})\nexport class RdxRadioItemDirective {\n private readonly radioGroup = inject(RDX_RADIO_GROUP);\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly renderer = inject(Renderer2);\n private readonly compositeItem = inject(RdxCompositeItem, { self: true });\n private readonly destroyRef = inject(DestroyRef);\n private readonly inputElement = this.renderer.createElement('input') as HTMLInputElement;\n private previousCheckedState: boolean | undefined;\n\n readonly value = input.required<string>();\n\n readonly id = input<string>();\n\n readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly readonly = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly nativeButton = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly nativeButtonState = computed(() => this.nativeButton());\n\n readonly disabledState = computed(() => this.radioGroup.disabledState() || this.disabled());\n\n readonly readonlyState = computed(() => this.radioGroup.readonly() || this.readonly());\n\n readonly requiredState = computed(() => this.radioGroup.required() || this.required());\n\n readonly checkedState = computed(() => this.radioGroup.value() === this.value());\n\n private readonly ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'] as const;\n\n constructor() {\n this.createHiddenInput();\n const unlistenInputChange = this.renderer.listen(this.inputElement, 'change', (event: Event) => {\n if (this.inputElement.checked) {\n this.radioGroup.select(this.value(), event);\n }\n });\n\n this.destroyRef.onDestroy(() => {\n unlistenInputChange();\n const parent = this.inputElement.parentNode;\n\n if (parent) {\n this.renderer.removeChild(parent, this.inputElement);\n }\n });\n\n effect(() => {\n this.compositeItem.setMetadata({\n disabled: this.disabledState(),\n value: this.value()\n });\n this.syncHiddenInput();\n });\n }\n\n /** @ignore */\n onClick(event?: Event) {\n if (!this.disabledState() && !this.readonlyState()) {\n this.radioGroup.select(this.value(), event);\n }\n }\n\n /** @ignore */\n onKeyDown(event: Event): void {\n const keyEvent = event as KeyboardEvent;\n if (keyEvent.key === ' ') {\n this.onClick(keyEvent);\n return;\n }\n\n if (keyEvent.key === 'Enter') {\n keyEvent.preventDefault();\n return;\n }\n\n if (this.isAllowedArrowKey(keyEvent.key)) {\n this.radioGroup.setArrowNavigation(true);\n }\n }\n\n /** @ignore */\n onKeyUp() {\n this.radioGroup.setArrowNavigation(false);\n }\n\n /** @ignore */\n onFocus(event?: FocusEvent) {\n queueMicrotask(() => {\n if (this.radioGroup.isArrowNavigation()) {\n this.radioGroup.select(this.value(), event);\n this.radioGroup.setArrowNavigation(false);\n }\n });\n }\n\n private isAllowedArrowKey(key: string): boolean {\n if (!(this.ARROW_KEYS as readonly string[]).includes(key)) {\n return false;\n }\n\n return true;\n }\n\n private createHiddenInput(): void {\n const host = this.elementRef.nativeElement;\n const parent = host.parentNode;\n\n this.renderer.setAttribute(this.inputElement, 'type', 'radio');\n this.renderer.setAttribute(this.inputElement, 'tabindex', '-1');\n this.renderer.setAttribute(this.inputElement, 'aria-hidden', 'true');\n this.renderer.setStyle(this.inputElement, 'position', 'absolute');\n this.renderer.setStyle(this.inputElement, 'pointer-events', 'none');\n this.renderer.setStyle(this.inputElement, 'opacity', '0');\n this.renderer.setStyle(this.inputElement, 'margin', '0');\n this.renderer.setStyle(this.inputElement, 'inset', '0');\n this.renderer.setStyle(this.inputElement, 'transform', 'translateX(-100%)');\n\n if (parent) {\n this.renderer.insertBefore(parent, this.inputElement, host.nextSibling);\n }\n }\n\n private syncHiddenInput(): void {\n const checked = this.checkedState();\n\n this.inputElement.name = this.radioGroup.name() ?? '';\n this.inputElement.value = this.value();\n this.inputElement.checked = checked;\n this.inputElement.required = this.requiredState();\n this.inputElement.disabled = this.disabledState();\n\n this.setOptionalAttribute('name', this.radioGroup.name());\n this.setOptionalAttribute('form', this.radioGroup.form());\n this.setBooleanAttribute('checked', checked);\n this.setBooleanAttribute('required', this.requiredState());\n this.setBooleanAttribute('disabled', this.disabledState());\n this.renderer.setAttribute(this.inputElement, 'value', this.value());\n\n if (this.previousCheckedState === false && checked) {\n this.inputElement.dispatchEvent(new Event('input', { bubbles: true }));\n this.inputElement.dispatchEvent(new Event('change', { bubbles: true }));\n }\n\n this.previousCheckedState = checked;\n }\n\n private setOptionalAttribute(name: string, value: string | undefined): void {\n if (value) {\n this.renderer.setAttribute(this.inputElement, name, value);\n } else {\n this.renderer.removeAttribute(this.inputElement, name);\n }\n }\n\n private setBooleanAttribute(name: string, value: boolean): void {\n if (value) {\n this.renderer.setAttribute(this.inputElement, name, '');\n } else {\n this.renderer.removeAttribute(this.inputElement, name);\n }\n }\n}\n","import { Directive, inject } from '@angular/core';\nimport { RdxRadioItemDirective } from './radio-item.directive';\nimport { RDX_RADIO_GROUP, RadioGroupDirective } from './radio-tokens';\n\n@Directive({\n selector: '[rdxRadioIndicator]',\n exportAs: 'rdxRadioIndicator',\n host: {\n '[attr.data-checked]': 'radioItem.checkedState() ? \"\" : undefined',\n '[attr.data-unchecked]': '!radioItem.checkedState() ? \"\" : undefined',\n '[attr.data-state]': 'radioItem.checkedState() ? \"checked\" : \"unchecked\"',\n '[attr.data-disabled]': 'radioItem.disabledState() ? \"\" : undefined',\n '[attr.data-readonly]': 'radioItem.readonlyState() ? \"\" : undefined',\n '[attr.data-required]': 'radioItem.requiredState() ? \"\" : undefined',\n '[hidden]': '!radioItem.checkedState()',\n '[style.pointer-events]': '\"none\"'\n }\n})\nexport class RdxRadioIndicatorDirective {\n protected readonly radioGroup: RadioGroupDirective = inject(RDX_RADIO_GROUP);\n protected readonly radioItem: RdxRadioItemDirective = inject(RdxRadioItemDirective);\n}\n","import { computed, Directive, effect, ElementRef, inject } from '@angular/core';\nimport { RdxVisuallyHiddenDirective } from '@radix-ng/primitives/visually-hidden';\nimport { injectRadioItem } from './radio-item.directive';\nimport { RDX_RADIO_GROUP } from './radio-tokens';\n\n@Directive({\n selector: 'input[rdxRadioItemInput]',\n exportAs: 'rdxRadioItemInput',\n hostDirectives: [{ directive: RdxVisuallyHiddenDirective, inputs: ['feature'] }],\n host: {\n type: 'radio',\n tabindex: '-1',\n 'aria-hidden': 'true',\n '[attr.name]': 'name()',\n '[attr.form]': 'form()',\n '[attr.required]': 'required() ? \"\" : undefined',\n '[attr.disabled]': 'disabled() ? \"\" : undefined',\n '[attr.checked]': 'checked() ? \"\" : undefined',\n '[checked]': 'checked()',\n '[attr.value]': 'value()',\n '[style]': `{\n position: 'absolute',\n pointerEvents: 'none',\n opacity: 0,\n margin: 0,\n inset: 0,\n transform: 'translateX(-100%)',\n }`\n }\n})\nexport class RdxRadioItemInputDirective {\n private readonly radioItem = injectRadioItem();\n private readonly radioGroup = inject(RDX_RADIO_GROUP);\n private readonly input = inject<ElementRef<HTMLInputElement>>(ElementRef).nativeElement;\n\n readonly name = computed(() => this.radioGroup.name());\n readonly form = computed(() => this.radioGroup.form());\n readonly value = computed(() => this.radioItem.value() || undefined);\n readonly checked = computed(() => this.radioItem.checkedState());\n readonly required = computed(() => this.radioItem.requiredState());\n readonly disabled = computed(() => this.radioItem.disabledState());\n\n constructor() {\n let isInitial = true;\n\n effect(() => {\n const checked = this.checked();\n\n if (isInitial) {\n isInitial = false;\n return;\n }\n\n if (checked) {\n this.input.dispatchEvent(new Event('input', { bubbles: true }));\n this.input.dispatchEvent(new Event('change', { bubbles: true }));\n }\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;AA0BO,MAAM,eAAe,GAAG,IAAI,cAAc,CAAsB,eAAe,CAAC;;MCyB1E,sBAAsB,CAAA;AA4D/B,IAAA,WAAA,GAAA;AAzDiB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC;QACxD,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAEhE,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAgB,IAAI,4EAAC;QAElC,IAAA,CAAA,YAAY,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,cAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;QAE9B,IAAA,CAAA,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;QAEtB,IAAA,CAAA,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;QAEtB,IA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A,OAAA,EAAA,8LAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAAA,IAAA,CAAA,0BAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA1B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAzBtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,0BAA0B;AACpC,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,cAAc,EAAE,CAAC,EAAE,SAAS,EAAE,0BAA0B,EAAE,MAAM,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC;AAChF,oBAAA,IAAI,EAAE;AACF,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,QAAQ,EAAE,IAAI;AACd,wBAAA,aAAa,EAAE,MAAM;AACrB,wBAAA,aAAa,EAAE,QAAQ;AACvB,wBAAA,aAAa,EAAE,QAAQ;AACvB,wBAAA,iBAAiB,EAAE,6BAA6B;AAChD,wBAAA,iBAAiB,EAAE,6BAA6B;AAChD,wBAAA,gBAAgB,EAAE,4BAA4B;AAC9C,wBAAA,WAAW,EAAE,WAAW;AACxB,wBAAA,cAAc,EAAE,SAAS;AACzB,wBAAA,SAAS,EAAE,CAAA;;;;;;;AAOT,SAAA;AACL;AACJ,iBAAA;;;AC7BD;;AAEG;;;;"}
@@ -61,6 +61,7 @@ function generateId() {
61
61
  const rootContext = () => {
62
62
  const rovingFocusGroup = inject(RdxRovingFocusGroupDirective);
63
63
  return {
64
+ enabled: rovingFocusGroup.enabled,
64
65
  loop: rovingFocusGroup.loop,
65
66
  dir: rovingFocusGroup.dir,
66
67
  orientation: rovingFocusGroup.orientation,
@@ -98,6 +99,11 @@ class RdxRovingFocusGroupDirective {
98
99
  * Whether keyboard navigation should loop around
99
100
  */
100
101
  this.loopInput = input(true, { ...(ngDevMode ? { debugName: "loopInput" } : /* istanbul ignore next */ {}), transform: booleanAttribute, alias: 'loop' });
102
+ /**
103
+ * Whether roving focus behavior is active for the group.
104
+ * @group Props
105
+ */
106
+ this.enabledInput = input(true, { ...(ngDevMode ? { debugName: "enabledInput" } : /* istanbul ignore next */ {}), transform: booleanAttribute, alias: 'enabled' });
101
107
  /**
102
108
  * When `true`, will prevent scrolling to the focus item when focused.
103
109
  * @group Props
@@ -126,6 +132,8 @@ class RdxRovingFocusGroupDirective {
126
132
  this.dir = this._dir.asReadonly();
127
133
  this._loop = linkedSignal(() => this.loopInput(), ...(ngDevMode ? [{ debugName: "_loop" }] : /* istanbul ignore next */ []));
128
134
  this.loop = this._loop.asReadonly();
135
+ this._enabled = linkedSignal(() => this.enabledInput(), ...(ngDevMode ? [{ debugName: "_enabled" }] : /* istanbul ignore next */ []));
136
+ this.enabled = this._enabled.asReadonly();
129
137
  this.focusableItems = signal([], ...(ngDevMode ? [{ debugName: "focusableItems" }] : /* istanbul ignore next */ []));
130
138
  this.isClickFocus = signal(false, ...(ngDevMode ? [{ debugName: "isClickFocus" }] : /* istanbul ignore next */ []));
131
139
  this.isTabbingBackOut = signal(false, ...(ngDevMode ? [{ debugName: "isTabbingBackOut" }] : /* istanbul ignore next */ []));
@@ -152,6 +160,9 @@ class RdxRovingFocusGroupDirective {
152
160
  setLoop(value) {
153
161
  this._loop.set(value);
154
162
  }
163
+ setEnabled(value) {
164
+ this._enabled.set(value);
165
+ }
155
166
  /** @ignore */
156
167
  registerItem(item, tabStopId) {
157
168
  this.itemIds.set(item, tabStopId);
@@ -184,7 +195,8 @@ class RdxRovingFocusGroupDirective {
184
195
  // We do this because Safari doesn't focus buttons when clicked, and
185
196
  // instead, the wrapper will get focused and not through a bubbling event.
186
197
  const isKeyboardFocus = !this.isClickFocus();
187
- if (event.currentTarget === this.elementRef.nativeElement &&
198
+ if (this.enabled() &&
199
+ event.currentTarget === this.elementRef.nativeElement &&
188
200
  event.target === event.currentTarget &&
189
201
  isKeyboardFocus &&
190
202
  !this.isTabbingBackOut()) {
@@ -205,7 +217,7 @@ class RdxRovingFocusGroupDirective {
205
217
  this.isClickFocus.set(false);
206
218
  }
207
219
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxRovingFocusGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
208
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxRovingFocusGroupDirective, isStandalone: true, selector: "[rdxRovingFocusGroup]", inputs: { orientationInput: { classPropertyName: "orientationInput", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, dirInput: { classPropertyName: "dirInput", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null }, loopInput: { classPropertyName: "loopInput", publicName: "loop", isSignal: true, isRequired: false, transformFunction: null }, preventScrollOnEntryFocus: { classPropertyName: "preventScrollOnEntryFocus", publicName: "preventScrollOnEntryFocus", isSignal: true, isRequired: false, transformFunction: null }, defaultCurrentTabStopId: { classPropertyName: "defaultCurrentTabStopId", publicName: "defaultCurrentTabStopId", isSignal: true, isRequired: false, transformFunction: null }, currentTabStopId: { classPropertyName: "currentTabStopId", publicName: "currentTabStopId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { currentTabStopId: "currentTabStopIdChange", entryFocus: "entryFocus" }, host: { listeners: { "focus": "handleFocus($event)", "focusout": "isTabbingBackOut.set(false)", "mouseup": "handleMouseUp()", "mousedown": "isClickFocus.set(true)" }, properties: { "attr.data-orientation": "orientation()", "attr.tabindex": "isTabbingBackOut() || focusableItems().length === 0 ? -1 : 0", "attr.dir": "dir()" } }, providers: [provideRovingFocusGroupContext(rootContext)], ngImport: i0 }); }
220
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxRovingFocusGroupDirective, isStandalone: true, selector: "[rdxRovingFocusGroup]", inputs: { orientationInput: { classPropertyName: "orientationInput", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, dirInput: { classPropertyName: "dirInput", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null }, loopInput: { classPropertyName: "loopInput", publicName: "loop", isSignal: true, isRequired: false, transformFunction: null }, enabledInput: { classPropertyName: "enabledInput", publicName: "enabled", isSignal: true, isRequired: false, transformFunction: null }, preventScrollOnEntryFocus: { classPropertyName: "preventScrollOnEntryFocus", publicName: "preventScrollOnEntryFocus", isSignal: true, isRequired: false, transformFunction: null }, defaultCurrentTabStopId: { classPropertyName: "defaultCurrentTabStopId", publicName: "defaultCurrentTabStopId", isSignal: true, isRequired: false, transformFunction: null }, currentTabStopId: { classPropertyName: "currentTabStopId", publicName: "currentTabStopId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { currentTabStopId: "currentTabStopIdChange", entryFocus: "entryFocus" }, host: { listeners: { "focus": "handleFocus($event)", "focusout": "isTabbingBackOut.set(false)", "mouseup": "handleMouseUp()", "mousedown": "isClickFocus.set(true)" }, properties: { "attr.data-orientation": "orientation()", "attr.tabindex": "enabled() ? (isTabbingBackOut() || focusableItems().length === 0 ? -1 : 0) : null", "attr.dir": "dir()" } }, providers: [provideRovingFocusGroupContext(rootContext)], ngImport: i0 }); }
209
221
  }
210
222
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxRovingFocusGroupDirective, decorators: [{
211
223
  type: Directive,
@@ -214,7 +226,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
214
226
  providers: [provideRovingFocusGroupContext(rootContext)],
215
227
  host: {
216
228
  '[attr.data-orientation]': 'orientation()',
217
- '[attr.tabindex]': 'isTabbingBackOut() || focusableItems().length === 0 ? -1 : 0',
229
+ '[attr.tabindex]': 'enabled() ? (isTabbingBackOut() || focusableItems().length === 0 ? -1 : 0) : null',
218
230
  '[attr.dir]': 'dir()',
219
231
  '(focus)': 'handleFocus($event)',
220
232
  '(focusout)': 'isTabbingBackOut.set(false)',
@@ -222,7 +234,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
222
234
  '(mousedown)': 'isClickFocus.set(true)'
223
235
  }
224
236
  }]
225
- }], ctorParameters: () => [], propDecorators: { orientationInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], dirInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "dir", required: false }] }], loopInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "loop", required: false }] }], preventScrollOnEntryFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "preventScrollOnEntryFocus", required: false }] }], defaultCurrentTabStopId: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultCurrentTabStopId", required: false }] }], currentTabStopId: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentTabStopId", required: false }] }, { type: i0.Output, args: ["currentTabStopIdChange"] }], entryFocus: [{ type: i0.Output, args: ["entryFocus"] }] } });
237
+ }], ctorParameters: () => [], propDecorators: { orientationInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], dirInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "dir", required: false }] }], loopInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "loop", required: false }] }], enabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "enabled", required: false }] }], preventScrollOnEntryFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "preventScrollOnEntryFocus", required: false }] }], defaultCurrentTabStopId: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultCurrentTabStopId", required: false }] }], currentTabStopId: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentTabStopId", required: false }] }, { type: i0.Output, args: ["currentTabStopIdChange"] }], entryFocus: [{ type: i0.Output, args: ["entryFocus"] }] } });
226
238
 
227
239
  /**
228
240
  * @group Components
@@ -261,6 +273,7 @@ class RdxRovingFocusItemDirective {
261
273
  this.isCurrentTabStop = computed(() => this.rootContext?.currentTabStopId() === this.id(), ...(ngDevMode ? [{ debugName: "isCurrentTabStop" }] : /* istanbul ignore next */ []));
262
274
  this.focusable = linkedSignal(() => this.focusableInput(), ...(ngDevMode ? [{ debugName: "focusable" }] : /* istanbul ignore next */ []));
263
275
  this.active = linkedSignal(() => this.activeInput(), ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
276
+ this.enabled = signal(true, ...(ngDevMode ? [{ debugName: "enabled" }] : /* istanbul ignore next */ []));
264
277
  this.tabStopId = linkedSignal(() => this.tabStopIdInput(), ...(ngDevMode ? [{ debugName: "tabStopId" }] : /* istanbul ignore next */ []));
265
278
  /**
266
279
  * The roving tabindex. Without a group the item keeps its natural tab order (`null`); inside a
@@ -270,6 +283,12 @@ class RdxRovingFocusItemDirective {
270
283
  if (!this.rootContext) {
271
284
  return null;
272
285
  }
286
+ if (!this.enabled()) {
287
+ return null;
288
+ }
289
+ if (!this.rootContext.enabled()) {
290
+ return null;
291
+ }
273
292
  return this.focusable() && this.isCurrentTabStop() ? 0 : -1;
274
293
  }, ...(ngDevMode ? [{ debugName: "tabindex" }] : /* istanbul ignore next */ []));
275
294
  // Keep the group's registry in sync with `focusable`, which can change after creation
@@ -277,7 +296,7 @@ class RdxRovingFocusItemDirective {
277
296
  // destroy, so a single effect covers register/unregister for the whole lifecycle.
278
297
  effect((onCleanup) => {
279
298
  const rootContext = this.rootContext;
280
- if (!rootContext || !this.focusable())
299
+ if (!rootContext || !this.enabled() || !this.focusable())
281
300
  return;
282
301
  const element = this.elementRef.nativeElement;
283
302
  // `registerItem` reads and writes the group's `focusableItems` signal; calling it
@@ -290,6 +309,9 @@ class RdxRovingFocusItemDirective {
290
309
  setFocusable(value) {
291
310
  this.focusable.set(value);
292
311
  }
312
+ setEnabled(value) {
313
+ this.enabled.set(value);
314
+ }
293
315
  setActive(value) {
294
316
  this.active.set(value);
295
317
  }
@@ -298,10 +320,16 @@ class RdxRovingFocusItemDirective {
298
320
  }
299
321
  /** @ignore */
300
322
  onFocus() {
323
+ if (!this.enabled()) {
324
+ return;
325
+ }
301
326
  this.rootContext?.onItemFocus(this.id());
302
327
  }
303
328
  /** @ignore */
304
329
  handleMouseDown(event) {
330
+ if (!this.enabled()) {
331
+ return;
332
+ }
305
333
  if (!this.focusable()) {
306
334
  // We prevent focusing non-focusable items on `mousedown`.
307
335
  // Even though the item has tabIndex={-1}, that only means take it out of the tab order.
@@ -323,6 +351,10 @@ class RdxRovingFocusItemDirective {
323
351
  const rootContext = this.rootContext;
324
352
  if (!rootContext)
325
353
  return;
354
+ if (!this.enabled())
355
+ return;
356
+ if (!rootContext.enabled())
357
+ return;
326
358
  const keyEvent = event;
327
359
  if (keyEvent.key === 'Tab' && keyEvent.shiftKey) {
328
360
  rootContext.onItemShiftTab();
@@ -360,7 +392,7 @@ class RdxRovingFocusItemDirective {
360
392
  }
361
393
  }
362
394
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxRovingFocusItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
363
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxRovingFocusItemDirective, isStandalone: true, selector: "[rdxRovingFocusItem]", inputs: { focusableInput: { classPropertyName: "focusableInput", publicName: "focusable", isSignal: true, isRequired: false, transformFunction: null }, activeInput: { classPropertyName: "activeInput", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, tabStopIdInput: { classPropertyName: "tabStopIdInput", publicName: "tabStopId", isSignal: true, isRequired: false, transformFunction: null }, allowShiftKey: { classPropertyName: "allowShiftKey", publicName: "allowShiftKey", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mousedown": "handleMouseDown($event)", "keydown": "handleKeydown($event)", "focus": "onFocus()" }, properties: { "attr.tabindex": "tabindex()", "attr.data-orientation": "rootContext?.orientation()", "attr.data-active": "active() ? \"true\" : undefined", "attr.data-disabled": "!focusable() ? \"\" : undefined" } }, ngImport: i0 }); }
395
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxRovingFocusItemDirective, isStandalone: true, selector: "[rdxRovingFocusItem]", inputs: { focusableInput: { classPropertyName: "focusableInput", publicName: "focusable", isSignal: true, isRequired: false, transformFunction: null }, activeInput: { classPropertyName: "activeInput", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, tabStopIdInput: { classPropertyName: "tabStopIdInput", publicName: "tabStopId", isSignal: true, isRequired: false, transformFunction: null }, allowShiftKey: { classPropertyName: "allowShiftKey", publicName: "allowShiftKey", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mousedown": "handleMouseDown($event)", "keydown": "handleKeydown($event)", "focus": "onFocus()" }, properties: { "attr.tabindex": "tabindex()", "attr.data-orientation": "enabled() ? rootContext?.orientation() : undefined", "attr.data-active": "active() ? \"true\" : undefined", "attr.data-disabled": "enabled() && !focusable() ? \"\" : undefined" } }, ngImport: i0 }); }
364
396
  }
365
397
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxRovingFocusItemDirective, decorators: [{
366
398
  type: Directive,
@@ -368,9 +400,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
368
400
  selector: '[rdxRovingFocusItem]',
369
401
  host: {
370
402
  '[attr.tabindex]': 'tabindex()',
371
- '[attr.data-orientation]': 'rootContext?.orientation()',
403
+ '[attr.data-orientation]': 'enabled() ? rootContext?.orientation() : undefined',
372
404
  '[attr.data-active]': 'active() ? "true" : undefined',
373
- '[attr.data-disabled]': '!focusable() ? "" : undefined',
405
+ '[attr.data-disabled]': 'enabled() && !focusable() ? "" : undefined',
374
406
  '(mousedown)': 'handleMouseDown($event)',
375
407
  '(keydown)': 'handleKeydown($event)',
376
408
  '(focus)': 'onFocus()'