@radix-ng/primitives 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/accordion/src/accordion-content.directive.d.ts +12 -60
  2. package/accordion/src/accordion-header.directive.d.ts +2 -18
  3. package/accordion/src/accordion-item.directive.d.ts +52 -26
  4. package/accordion/src/accordion-root.directive.d.ts +41 -20
  5. package/accordion/src/accordion-trigger.directive.d.ts +6 -22
  6. package/collapsible/src/collapsible-content.directive.d.ts +8 -2
  7. package/collapsible/src/collapsible-content.token.d.ts +3 -0
  8. package/collapsible/src/collapsible-root.directive.d.ts +7 -4
  9. package/compodoc/documentation.json +11395 -0
  10. package/esm2022/accordion/src/accordion-content.directive.mjs +21 -122
  11. package/esm2022/accordion/src/accordion-header.directive.mjs +10 -31
  12. package/esm2022/accordion/src/accordion-item.directive.mjs +144 -57
  13. package/esm2022/accordion/src/accordion-root.directive.mjs +101 -64
  14. package/esm2022/accordion/src/accordion-trigger.directive.mjs +22 -41
  15. package/esm2022/alert-dialog/src/alert-dialog-cancel.directive.mjs +3 -3
  16. package/esm2022/alert-dialog/src/alert-dialog-content.directive.mjs +3 -3
  17. package/esm2022/alert-dialog/src/alert-dialog-root.directive.mjs +3 -3
  18. package/esm2022/alert-dialog/src/alert-dialog-title.directive.mjs +3 -3
  19. package/esm2022/alert-dialog/src/alert-dialog-trigger.directive.mjs +3 -3
  20. package/esm2022/alert-dialog/src/alert-dialog.service.mjs +3 -3
  21. package/esm2022/avatar/src/avatar-fallback.directive.mjs +3 -3
  22. package/esm2022/avatar/src/avatar-image.directive.mjs +3 -3
  23. package/esm2022/avatar/src/avatar-root.directive.mjs +3 -3
  24. package/esm2022/checkbox/src/checkbox-button.directive.mjs +3 -3
  25. package/esm2022/checkbox/src/checkbox-indicator.directive.mjs +3 -3
  26. package/esm2022/checkbox/src/checkbox-input.directive.mjs +3 -3
  27. package/esm2022/checkbox/src/checkbox.directive.mjs +3 -3
  28. package/esm2022/collapsible/src/collapsible-content.directive.mjs +20 -7
  29. package/esm2022/collapsible/src/collapsible-content.token.mjs +3 -0
  30. package/esm2022/collapsible/src/collapsible-root.directive.mjs +17 -13
  31. package/esm2022/collapsible/src/collapsible-trigger.directive.mjs +3 -3
  32. package/esm2022/dropdown-menu/src/dropdown-menu-content.directive.mjs +3 -3
  33. package/esm2022/dropdown-menu/src/dropdown-menu-item-checkbox.directive.mjs +3 -3
  34. package/esm2022/dropdown-menu/src/dropdown-menu-item-indicator.directive.mjs +3 -3
  35. package/esm2022/dropdown-menu/src/dropdown-menu-item-radio-group.directive.mjs +3 -3
  36. package/esm2022/dropdown-menu/src/dropdown-menu-item-radio.directive.mjs +3 -3
  37. package/esm2022/dropdown-menu/src/dropdown-menu-item-selectable.mjs +3 -3
  38. package/esm2022/dropdown-menu/src/dropdown-menu-item.directive.mjs +3 -3
  39. package/esm2022/dropdown-menu/src/dropdown-menu-label.directive.mjs +3 -3
  40. package/esm2022/dropdown-menu/src/dropdown-menu-separator.directive.mjs +3 -3
  41. package/esm2022/dropdown-menu/src/dropdown-menu-trigger.directive.mjs +3 -3
  42. package/esm2022/label/src/label.directive.mjs +10 -5
  43. package/esm2022/menu/index.mjs +4 -4
  44. package/esm2022/menu/src/menu-content.directive.mjs +3 -3
  45. package/esm2022/menu/src/menu-directive.mjs +3 -3
  46. package/esm2022/menu/src/menu-group.directive.mjs +3 -3
  47. package/esm2022/menu/src/menu-item.directive.mjs +3 -3
  48. package/esm2022/menu/src/menu-label.directive.mjs +3 -3
  49. package/esm2022/menu/src/menu-separator.directive.mjs +3 -3
  50. package/esm2022/menubar/index.mjs +4 -4
  51. package/esm2022/menubar/src/menubar-content.directive.mjs +3 -3
  52. package/esm2022/menubar/src/menubar-item-checkbox.directive.mjs +3 -3
  53. package/esm2022/menubar/src/menubar-item-indicator.directive.mjs +3 -3
  54. package/esm2022/menubar/src/menubar-item-radio.directive.mjs +3 -3
  55. package/esm2022/menubar/src/menubar-item.directive.mjs +3 -3
  56. package/esm2022/menubar/src/menubar-radio-group.directive.mjs +3 -3
  57. package/esm2022/menubar/src/menubar-root.directive.mjs +3 -3
  58. package/esm2022/menubar/src/menubar-separator.directive.mjs +3 -3
  59. package/esm2022/menubar/src/menubar-trigger.directive.mjs +3 -3
  60. package/esm2022/progress/src/progress-indicator.directive.mjs +3 -3
  61. package/esm2022/progress/src/progress-root.directive.mjs +3 -3
  62. package/esm2022/radio/src/radio-indicator.directive.mjs +10 -10
  63. package/esm2022/radio/src/radio-item.directive.mjs +29 -18
  64. package/esm2022/radio/src/radio-root.directive.mjs +110 -16
  65. package/esm2022/radio/src/radio-tokens.mjs +3 -0
  66. package/esm2022/separator/src/separator.directive.mjs +3 -3
  67. package/esm2022/switch/index.mjs +4 -4
  68. package/esm2022/switch/src/switch-input.directive.mjs +3 -3
  69. package/esm2022/switch/src/switch-root.directive.mjs +3 -3
  70. package/esm2022/switch/src/switch-thumb.directive.mjs +3 -3
  71. package/esm2022/tabs/index.mjs +4 -4
  72. package/esm2022/tabs/src/tabs-content.directive.mjs +3 -3
  73. package/esm2022/tabs/src/tabs-context.service.mjs +3 -3
  74. package/esm2022/tabs/src/tabs-list.directive.mjs +3 -3
  75. package/esm2022/tabs/src/tabs-root.directive.mjs +3 -3
  76. package/esm2022/tabs/src/tabs-trigger.directive.mjs +3 -3
  77. package/esm2022/toggle/src/toggle.directive.mjs +3 -3
  78. package/esm2022/toggle-group/src/toggle-group-button.directive.mjs +3 -3
  79. package/esm2022/toggle-group/src/toggle-group-multi.directive.mjs +3 -3
  80. package/esm2022/toggle-group/src/toggle-group.directive.mjs +3 -3
  81. package/fesm2022/radix-ng-primitives-accordion.mjs +305 -324
  82. package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
  83. package/fesm2022/radix-ng-primitives-alert-dialog.mjs +18 -18
  84. package/fesm2022/radix-ng-primitives-avatar.mjs +9 -9
  85. package/fesm2022/radix-ng-primitives-checkbox.mjs +12 -12
  86. package/fesm2022/radix-ng-primitives-collapsible.mjs +61 -44
  87. package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
  88. package/fesm2022/radix-ng-primitives-dropdown-menu.mjs +30 -30
  89. package/fesm2022/radix-ng-primitives-label.mjs +9 -4
  90. package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
  91. package/fesm2022/radix-ng-primitives-menu.mjs +22 -22
  92. package/fesm2022/radix-ng-primitives-menubar.mjs +31 -31
  93. package/fesm2022/radix-ng-primitives-progress.mjs +6 -6
  94. package/fesm2022/radix-ng-primitives-radio.mjs +182 -77
  95. package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
  96. package/fesm2022/radix-ng-primitives-separator.mjs +3 -3
  97. package/fesm2022/radix-ng-primitives-switch.mjs +13 -13
  98. package/fesm2022/radix-ng-primitives-tabs.mjs +19 -19
  99. package/fesm2022/radix-ng-primitives-toggle-group.mjs +9 -9
  100. package/fesm2022/radix-ng-primitives-toggle.mjs +3 -3
  101. package/label/src/label.directive.d.ts +9 -3
  102. package/package.json +1 -1
  103. package/radio/src/radio-indicator.directive.d.ts +4 -2
  104. package/radio/src/radio-item.directive.d.ts +10 -5
  105. package/radio/src/radio-root.directive.d.ts +19 -18
  106. package/radio/src/radio-tokens.d.ts +12 -0
@@ -56,10 +56,10 @@ class RdxToggleGroupButtonDirective {
56
56
  updateDisabled() {
57
57
  // TODO
58
58
  }
59
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: RdxToggleGroupButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
60
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.1.2", type: RdxToggleGroupButtonDirective, isStandalone: true, selector: "button[rdxToggleGroupButton]", inputs: { value: "value", disabled: ["disabled", "disabled", booleanAttribute] }, host: { attributes: { "role": "radio" }, listeners: { "click": "toggle()" }, properties: { "attr.aria-checked": "checked", "attr.aria-disabled": "disabled || toggleGroup.disabled", "attr.data-disabled": "disabled || toggleGroup.disabled", "attr.data-state": "checked ? \"on\" : \"off\"", "attr.data-orientation": "toggleGroup.orientation" } }, providers: [{ provide: RdxToggleGroupButtonToken, useExisting: RdxToggleGroupButtonDirective }], usesOnChanges: true, ngImport: i0 }); }
59
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxToggleGroupButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
60
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.1", type: RdxToggleGroupButtonDirective, isStandalone: true, selector: "button[rdxToggleGroupButton]", inputs: { value: "value", disabled: ["disabled", "disabled", booleanAttribute] }, host: { attributes: { "role": "radio" }, listeners: { "click": "toggle()" }, properties: { "attr.aria-checked": "checked", "attr.aria-disabled": "disabled || toggleGroup.disabled", "attr.data-disabled": "disabled || toggleGroup.disabled", "attr.data-state": "checked ? \"on\" : \"off\"", "attr.data-orientation": "toggleGroup.orientation" } }, providers: [{ provide: RdxToggleGroupButtonToken, useExisting: RdxToggleGroupButtonDirective }], usesOnChanges: true, ngImport: i0 }); }
61
61
  }
62
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: RdxToggleGroupButtonDirective, decorators: [{
62
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxToggleGroupButtonDirective, decorators: [{
63
63
  type: Directive,
64
64
  args: [{
65
65
  selector: 'button[rdxToggleGroupButton]',
@@ -180,13 +180,13 @@ class RdxToggleGroupMultiDirective {
180
180
  this.disabled = isDisabled;
181
181
  this.buttons?.forEach((button) => button.updateDisabled());
182
182
  }
183
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: RdxToggleGroupMultiDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
184
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.1.2", type: RdxToggleGroupMultiDirective, isStandalone: true, selector: "[rdxToggleGroupMulti]", inputs: { value: ["rdxToggleGroupMultiValue", "value"], orientation: ["rdxToggleGroupMultiOrientation", "orientation"], disabled: ["rdxToggleGroupMultiDisabled", "disabled", booleanAttribute], wrap: ["rdxToggleGroupMultiWrap", "wrap", booleanAttribute], valueChange: ["rdxToggleGroupMultiValueChange", "valueChange"] }, host: { attributes: { "role": "group" }, listeners: { "focusout": "onTouched?.()" }, properties: { "attr.data-orientation": "orientation" } }, providers: [
183
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxToggleGroupMultiDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
184
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.1", type: RdxToggleGroupMultiDirective, isStandalone: true, selector: "[rdxToggleGroupMulti]", inputs: { value: ["rdxToggleGroupMultiValue", "value"], orientation: ["rdxToggleGroupMultiOrientation", "orientation"], disabled: ["rdxToggleGroupMultiDisabled", "disabled", booleanAttribute], wrap: ["rdxToggleGroupMultiWrap", "wrap", booleanAttribute], valueChange: ["rdxToggleGroupMultiValueChange", "valueChange"] }, host: { attributes: { "role": "group" }, listeners: { "focusout": "onTouched?.()" }, properties: { "attr.data-orientation": "orientation" } }, providers: [
185
185
  { provide: RdxToggleGroupToken, useExisting: RdxToggleGroupMultiDirective },
186
186
  { provide: NG_VALUE_ACCESSOR, useExisting: RdxToggleGroupMultiDirective, multi: true }
187
187
  ], queries: [{ propertyName: "buttons", predicate: RdxToggleGroupButtonToken }], usesOnChanges: true, ngImport: i0 }); }
188
188
  }
189
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: RdxToggleGroupMultiDirective, decorators: [{
189
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxToggleGroupMultiDirective, decorators: [{
190
190
  type: Directive,
191
191
  args: [{
192
192
  selector: '[rdxToggleGroupMulti]',
@@ -312,13 +312,13 @@ class RdxToggleGroupDirective {
312
312
  this.disabled = isDisabled;
313
313
  this.buttons?.forEach((button) => button.updateDisabled());
314
314
  }
315
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: RdxToggleGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
316
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.1.2", type: RdxToggleGroupDirective, isStandalone: true, selector: "[rdxToggleGroup]", inputs: { value: "value", orientation: "orientation", disabled: ["disabled", "disabled", booleanAttribute], wrap: ["wrap", "wrap", booleanAttribute], valueChange: "valueChange" }, host: { attributes: { "role": "group" }, listeners: { "focusout": "onTouched?.()" }, properties: { "attr.data-orientation": "orientation" } }, providers: [
315
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxToggleGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
316
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.1", type: RdxToggleGroupDirective, isStandalone: true, selector: "[rdxToggleGroup]", inputs: { value: "value", orientation: "orientation", disabled: ["disabled", "disabled", booleanAttribute], wrap: ["wrap", "wrap", booleanAttribute], valueChange: "valueChange" }, host: { attributes: { "role": "group" }, listeners: { "focusout": "onTouched?.()" }, properties: { "attr.data-orientation": "orientation" } }, providers: [
317
317
  { provide: RdxToggleGroupToken, useExisting: RdxToggleGroupDirective },
318
318
  { provide: NG_VALUE_ACCESSOR, useExisting: RdxToggleGroupDirective, multi: true }
319
319
  ], queries: [{ propertyName: "buttons", predicate: RdxToggleGroupButtonToken }], usesOnChanges: true, ngImport: i0 }); }
320
320
  }
321
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: RdxToggleGroupDirective, decorators: [{
321
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxToggleGroupDirective, decorators: [{
322
322
  type: Directive,
323
323
  args: [{
324
324
  selector: '[rdxToggleGroup]',
@@ -17,10 +17,10 @@ class RdxToggleDirective {
17
17
  this.onPressedChange.emit(this.pressed());
18
18
  }
19
19
  }
20
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: RdxToggleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
21
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.1.2", type: RdxToggleDirective, isStandalone: true, selector: "button[rdxToggle]", inputs: { defaultPressed: { classPropertyName: "defaultPressed", publicName: "defaultPressed", isSignal: true, isRequired: false, transformFunction: null }, pressed: { classPropertyName: "pressed", publicName: "pressed", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pressed: "pressedChange", onPressedChange: "onPressedChange" }, host: { attributes: { "type": "button" }, listeners: { "click": "toggle()" }, properties: { "attr.aria-pressed": "pressed()", "attr.data-state": "pressed() ? \"on\" : \"off\"", "attr.data-disabled": "disabled()" } }, exportAs: ["rdxToggle"], ngImport: i0 }); }
20
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxToggleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
21
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.1", type: RdxToggleDirective, isStandalone: true, selector: "button[rdxToggle]", inputs: { defaultPressed: { classPropertyName: "defaultPressed", publicName: "defaultPressed", isSignal: true, isRequired: false, transformFunction: null }, pressed: { classPropertyName: "pressed", publicName: "pressed", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pressed: "pressedChange", onPressedChange: "onPressedChange" }, host: { attributes: { "type": "button" }, listeners: { "click": "toggle()" }, properties: { "attr.aria-pressed": "pressed()", "attr.data-state": "pressed() ? \"on\" : \"off\"", "attr.data-disabled": "disabled()" } }, exportAs: ["rdxToggle"], ngImport: i0 }); }
22
22
  }
23
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.2", ngImport: i0, type: RdxToggleDirective, decorators: [{
23
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: RdxToggleDirective, decorators: [{
24
24
  type: Directive,
25
25
  args: [{
26
26
  selector: 'button[rdxToggle]',
@@ -1,15 +1,21 @@
1
+ import { InputSignal } from '@angular/core';
1
2
  import * as i0 from "@angular/core";
2
3
  export declare class RdxLabelDirective {
3
- readonly id: import("@angular/core").InputSignal<string>;
4
+ /**
5
+ * @type string
6
+ * @default 'rdx-label-{idIterator}'
7
+ */
8
+ readonly id: InputSignal<string>;
4
9
  /**
5
10
  * @ignore
6
11
  */
7
12
  protected readonly elementId: import("@angular/core").Signal<string | null>;
8
13
  /**
9
14
  * The id of the element the label is associated with.
10
- * @default '-'
15
+ * @type string
16
+ * @default false
11
17
  */
12
- readonly htmlFor: import("@angular/core").InputSignal<string>;
18
+ readonly htmlFor: InputSignal<string>;
13
19
  /**
14
20
  * @ignore
15
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radix-ng/primitives",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -1,7 +1,9 @@
1
+ import { RdxRadioItemDirective } from './radio-item.directive';
2
+ import { RadioGroupDirective } from './radio-tokens';
1
3
  import * as i0 from "@angular/core";
2
4
  export declare class RdxRadioIndicatorDirective {
3
- protected readonly radioGroup: import("./radio-root.directive").RdxRadioGroupDirective;
4
- protected readonly radioItem: import("./radio-item.directive").RdxRadioItemDirective;
5
+ protected readonly radioGroup: RadioGroupDirective;
6
+ protected readonly radioItem: RdxRadioItemDirective;
5
7
  static ɵfac: i0.ɵɵFactoryDeclaration<RdxRadioIndicatorDirective, never>;
6
8
  static ɵdir: i0.ɵɵDirectiveDeclaration<RdxRadioIndicatorDirective, "[RadioIndicator]", ["RadioIndicator"], {}, {}, never, never, true, never>;
7
9
  }
@@ -1,15 +1,20 @@
1
- import { InjectionToken } from '@angular/core';
1
+ import { FocusableOption } from '@angular/cdk/a11y';
2
+ import { ElementRef, InjectionToken, OnInit } from '@angular/core';
2
3
  import * as i0 from "@angular/core";
3
4
  export declare const RdxRadioItemToken: InjectionToken<RdxRadioItemDirective>;
4
5
  export declare function injectRadioItem(): RdxRadioItemDirective;
5
- export declare class RdxRadioItemDirective {
6
- protected readonly radioGroup: import("./radio-root.directive").RdxRadioGroupDirective;
6
+ export declare class RdxRadioItemDirective implements FocusableOption, OnInit {
7
+ private readonly radioGroup;
8
+ readonly element: ElementRef<any>;
7
9
  id: string;
8
10
  value: string;
9
11
  disabled: boolean;
10
- _onKeydown(event: KeyboardEvent): void;
11
- _onFocus(): void;
12
+ get tabIndex(): number;
13
+ get checked(): boolean;
14
+ ngOnInit(): void;
15
+ focus(): void;
12
16
  _onClick(): void;
17
+ _onBlur(): void;
13
18
  static ɵfac: i0.ɵɵFactoryDeclaration<RdxRadioItemDirective, never>;
14
19
  static ɵdir: i0.ɵɵDirectiveDeclaration<RdxRadioItemDirective, "[RadioItem]", ["RadioItem"], { "id": { "alias": "id"; "required": false; }; "value": { "alias": "value"; "required": true; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, never>;
15
20
  static ngAcceptInputType_disabled: unknown;
@@ -1,19 +1,17 @@
1
- import { EventEmitter, InjectionToken } from '@angular/core';
1
+ import { AfterContentInit, EventEmitter, OnDestroy, QueryList } from '@angular/core';
2
2
  import { ControlValueAccessor } from '@angular/forms';
3
+ import { RdxRadioItemDirective } from './radio-item.directive';
4
+ import { RadioGroupDirective, RadioGroupProps } from './radio-tokens';
3
5
  import * as i0 from "@angular/core";
4
- export declare const RdxRadioGroupToken: InjectionToken<RdxRadioGroupDirective>;
5
- export declare function injectRadioGroup(): RdxRadioGroupDirective;
6
- interface RadioGroupProps {
7
- name?: string;
8
- disabled?: boolean;
9
- defaultValue?: string;
10
- value?: string;
11
- onValueChange?: EventEmitter<string>;
12
- }
13
- export declare class RdxRadioGroupDirective implements RadioGroupProps, ControlValueAccessor {
6
+ export declare class RdxRadioGroupDirective implements RadioGroupProps, RadioGroupDirective, ControlValueAccessor, AfterContentInit, OnDestroy {
7
+ radioItems: QueryList<RdxRadioItemDirective>;
8
+ private focusKeyManager;
9
+ private destroy$;
10
+ name?: string | undefined;
14
11
  value?: string;
15
12
  disabled: boolean;
16
13
  dir?: string;
14
+ defaultValue?: string;
17
15
  /**
18
16
  * The orientation of the radio group only vertical.
19
17
  * Horizontal radio buttons can sometimes be challenging to scan and localize.
@@ -28,14 +26,14 @@ export declare class RdxRadioGroupDirective implements RadioGroupProps, ControlV
28
26
  readonly onValueChange: EventEmitter<string>;
29
27
  /**
30
28
  * The callback function to call when the value of the radio group changes.
31
- * @internal
32
29
  */
33
- private onChange?;
30
+ private onChange;
34
31
  /**
35
32
  * The callback function to call when the radio group is touched.
36
- * @internal
37
33
  */
38
- private onTouched?;
34
+ onTouched: () => void;
35
+ ngAfterContentInit(): void;
36
+ ngOnDestroy(): void;
39
37
  /**
40
38
  * Select a radio item.
41
39
  * @param value The value of the radio item to select.
@@ -63,9 +61,12 @@ export declare class RdxRadioGroupDirective implements RadioGroupProps, ControlV
63
61
  /**
64
62
  * When focus leaves the radio group.
65
63
  */
66
- _onFocusout(): void;
64
+ _onFocusin(event: FocusEvent): void;
65
+ _onKeydown(event: KeyboardEvent): void;
66
+ private selectFocusedItem;
67
+ private updateActiveItem;
68
+ private tabNavigation;
67
69
  static ɵfac: i0.ɵɵFactoryDeclaration<RdxRadioGroupDirective, never>;
68
- static ɵdir: i0.ɵɵDirectiveDeclaration<RdxRadioGroupDirective, "div[RadioRoot]", ["RadioRoot"], { "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "dir": { "alias": "dir"; "required": false; }; }, { "onValueChange": "onValueChange"; }, never, never, true, never>;
70
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxRadioGroupDirective, "div[RadioRoot]", ["RadioRoot"], { "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "dir": { "alias": "dir"; "required": false; }; "defaultValue": { "alias": "defaultValue"; "required": false; }; }, { "onValueChange": "onValueChange"; }, ["radioItems"], never, true, never>;
69
71
  static ngAcceptInputType_disabled: unknown;
70
72
  }
71
- export {};
@@ -0,0 +1,12 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ export interface RadioGroupProps {
3
+ name?: string;
4
+ disabled?: boolean;
5
+ defaultValue?: string;
6
+ value?: string;
7
+ }
8
+ export interface RadioGroupDirective extends RadioGroupProps {
9
+ select(value: string): void;
10
+ onTouched(): void;
11
+ }
12
+ export declare const RDX_RADIO_GROUP: InjectionToken<RadioGroupDirective>;