@angular/material 18.0.3 → 18.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/autocomplete/index.d.ts +3 -0
  2. package/bottom-sheet/index.d.ts +0 -1
  3. package/button/_button-base.scss +3 -1
  4. package/button/index.d.ts +7 -1
  5. package/button-toggle/index.d.ts +2 -2
  6. package/checkbox/index.d.ts +5 -3
  7. package/chips/index.d.ts +9 -5
  8. package/core/_core-theme.scss +8 -14
  9. package/core/_core.scss +18 -4
  10. package/core/style/_vendor-prefixes.scss +5 -0
  11. package/core/tokens/_density.scss +2 -1
  12. package/core/tokens/m2/_index.scss +2 -2
  13. package/core/tokens/m2/mat/_app.scss +13 -1
  14. package/core/tokens/m2/mat/_menu.scss +3 -0
  15. package/core/tokens/m2/mat/_paginator.scss +1 -0
  16. package/core/tokens/m2/mdc/{_tab.scss → _secondary-navigation-tab.scss} +1 -1
  17. package/core/tokens/m3/_index.scss +2 -2
  18. package/core/tokens/m3/mat/_app.scss +9 -0
  19. package/core/tokens/m3/mat/_menu.scss +3 -0
  20. package/core/tokens/m3/mdc/{_tab.scss → _secondary-navigation-tab.scss} +1 -1
  21. package/datepicker/index.d.ts +17 -1
  22. package/esm2022/autocomplete/autocomplete-trigger.mjs +28 -1
  23. package/esm2022/bottom-sheet/bottom-sheet-container.mjs +6 -7
  24. package/esm2022/button/button-base.mjs +1 -1
  25. package/esm2022/button/button.mjs +4 -4
  26. package/esm2022/button/fab.mjs +8 -8
  27. package/esm2022/button/icon-button.mjs +4 -4
  28. package/esm2022/button-toggle/button-toggle.mjs +30 -21
  29. package/esm2022/checkbox/checkbox.mjs +1 -1
  30. package/esm2022/chips/chip-grid.mjs +11 -4
  31. package/esm2022/chips/chip-row.mjs +8 -13
  32. package/esm2022/chips/chip-set.mjs +7 -3
  33. package/esm2022/chips/chip.mjs +1 -1
  34. package/esm2022/core/option/optgroup.mjs +2 -2
  35. package/esm2022/core/option/option.mjs +3 -3
  36. package/esm2022/core/version.mjs +1 -1
  37. package/esm2022/datepicker/calendar.mjs +6 -3
  38. package/esm2022/datepicker/date-range-input-parts.mjs +14 -10
  39. package/esm2022/datepicker/date-range-input.mjs +17 -7
  40. package/esm2022/datepicker/datepicker-base.mjs +5 -1
  41. package/esm2022/datepicker/datepicker-input.mjs +16 -5
  42. package/esm2022/form-field/form-field.mjs +12 -6
  43. package/esm2022/icon/icon.mjs +8 -2
  44. package/esm2022/list/list-option.mjs +10 -4
  45. package/esm2022/list/selection-list.mjs +9 -2
  46. package/esm2022/menu/menu.mjs +13 -4
  47. package/esm2022/paginator/paginator.mjs +3 -3
  48. package/esm2022/progress-bar/progress-bar.mjs +10 -4
  49. package/esm2022/progress-spinner/progress-spinner.mjs +8 -2
  50. package/esm2022/radio/radio.mjs +12 -6
  51. package/esm2022/sidenav/drawer.mjs +4 -1
  52. package/esm2022/slide-toggle/slide-toggle-config.mjs +1 -1
  53. package/esm2022/slide-toggle/slide-toggle.mjs +1 -1
  54. package/esm2022/slider/slider.mjs +1 -1
  55. package/esm2022/stepper/step-header.mjs +1 -1
  56. package/esm2022/stepper/stepper.mjs +1 -1
  57. package/esm2022/tabs/tab-group.mjs +9 -4
  58. package/esm2022/tabs/tab-header.mjs +3 -3
  59. package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +19 -7
  60. package/esm2022/toolbar/toolbar.mjs +1 -1
  61. package/esm2022/tooltip/tooltip.mjs +3 -3
  62. package/fesm2022/autocomplete.mjs +27 -0
  63. package/fesm2022/autocomplete.mjs.map +1 -1
  64. package/fesm2022/bottom-sheet.mjs +5 -6
  65. package/fesm2022/bottom-sheet.mjs.map +1 -1
  66. package/fesm2022/button-toggle.mjs +29 -20
  67. package/fesm2022/button-toggle.mjs.map +1 -1
  68. package/fesm2022/button.mjs +16 -16
  69. package/fesm2022/button.mjs.map +1 -1
  70. package/fesm2022/checkbox.mjs.map +1 -1
  71. package/fesm2022/chips.mjs +15 -9
  72. package/fesm2022/chips.mjs.map +1 -1
  73. package/fesm2022/core.mjs +5 -5
  74. package/fesm2022/core.mjs.map +1 -1
  75. package/fesm2022/datepicker.mjs +42 -10
  76. package/fesm2022/datepicker.mjs.map +1 -1
  77. package/fesm2022/form-field.mjs +9 -3
  78. package/fesm2022/form-field.mjs.map +1 -1
  79. package/fesm2022/icon.mjs +7 -1
  80. package/fesm2022/icon.mjs.map +1 -1
  81. package/fesm2022/list.mjs +17 -4
  82. package/fesm2022/list.mjs.map +1 -1
  83. package/fesm2022/menu.mjs +12 -3
  84. package/fesm2022/menu.mjs.map +1 -1
  85. package/fesm2022/paginator.mjs +2 -2
  86. package/fesm2022/paginator.mjs.map +1 -1
  87. package/fesm2022/progress-bar.mjs +9 -3
  88. package/fesm2022/progress-bar.mjs.map +1 -1
  89. package/fesm2022/progress-spinner.mjs +7 -1
  90. package/fesm2022/progress-spinner.mjs.map +1 -1
  91. package/fesm2022/radio.mjs +11 -5
  92. package/fesm2022/radio.mjs.map +1 -1
  93. package/fesm2022/sidenav.mjs +4 -1
  94. package/fesm2022/sidenav.mjs.map +1 -1
  95. package/fesm2022/slide-toggle.mjs.map +1 -1
  96. package/fesm2022/slider.mjs.map +1 -1
  97. package/fesm2022/stepper.mjs.map +1 -1
  98. package/fesm2022/tabs.mjs +28 -11
  99. package/fesm2022/tabs.mjs.map +1 -1
  100. package/fesm2022/toolbar.mjs.map +1 -1
  101. package/fesm2022/tooltip.mjs +2 -2
  102. package/fesm2022/tooltip.mjs.map +1 -1
  103. package/form-field/index.d.ts +12 -2
  104. package/icon/index.d.ts +14 -2
  105. package/list/_list-theme.scss +8 -5
  106. package/list/index.d.ts +15 -2
  107. package/package.json +2 -2
  108. package/paginator/index.d.ts +7 -1
  109. package/prebuilt-themes/azure-blue.css +1 -1
  110. package/prebuilt-themes/cyan-orange.css +1 -1
  111. package/prebuilt-themes/deeppurple-amber.css +1 -1
  112. package/prebuilt-themes/indigo-pink.css +1 -1
  113. package/prebuilt-themes/magenta-violet.css +1 -1
  114. package/prebuilt-themes/pink-bluegrey.css +1 -1
  115. package/prebuilt-themes/purple-green.css +1 -1
  116. package/prebuilt-themes/rose-red.css +1 -1
  117. package/progress-bar/_progress-bar-theme.scss +10 -7
  118. package/progress-bar/index.d.ts +14 -2
  119. package/progress-spinner/index.d.ts +14 -2
  120. package/radio/_radio-common.scss +238 -0
  121. package/radio/_radio-theme.scss +25 -32
  122. package/radio/index.d.ts +21 -2
  123. package/schematics/ng-add/index.js +1 -1
  124. package/schematics/ng-add/index.mjs +1 -1
  125. package/schematics/ng-generate/m3-theme/index_bundled.js +2 -2
  126. package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +1 -1
  127. package/schematics/ng-update/index_bundled.js +31 -31
  128. package/sidenav/index.d.ts +1 -0
  129. package/slide-toggle/index.d.ts +14 -2
  130. package/slider/index.d.ts +7 -1
  131. package/stepper/index.d.ts +21 -3
  132. package/tabs/_tabs-common.scss +94 -36
  133. package/tabs/_tabs-theme.scss +33 -25
  134. package/tabs/index.d.ts +27 -4
  135. package/toolbar/index.d.ts +7 -1
  136. package/tooltip/_tooltip-theme.scss +18 -16
@@ -4,7 +4,7 @@ import { Overlay, FlexibleConnectedPositionStrategy, OverlayConfig, OverlayModul
4
4
  import { ComponentPortal, CdkPortalOutlet, TemplatePortal, PortalModule } from '@angular/cdk/portal';
5
5
  import { NgClass, DOCUMENT, CommonModule } from '@angular/common';
6
6
  import * as i0 from '@angular/core';
7
- import { Injectable, inject, EventEmitter, Injector, afterNextRender, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, Optional, SkipSelf, InjectionToken, Inject, ViewChild, forwardRef, booleanAttribute, Directive, Attribute, ContentChild, Self, TemplateRef, NgModule } from '@angular/core';
7
+ import { Injectable, inject, EventEmitter, Injector, afterNextRender, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, Optional, SkipSelf, InjectionToken, Inject, ViewChild, forwardRef, ChangeDetectorRef, booleanAttribute, Directive, signal, Attribute, ContentChild, Self, TemplateRef, NgModule } from '@angular/core';
8
8
  import { MatButton, MatIconButton, MatButtonModule } from '@angular/material/button';
9
9
  import { CdkScrollableModule } from '@angular/cdk/scrolling';
10
10
  import * as i1 from '@angular/material/core';
@@ -2177,10 +2177,13 @@ class MatCalendar {
2177
2177
  !this._dateAdapter.sameDate(changes['maxDate'].previousValue, changes['maxDate'].currentValue)
2178
2178
  ? changes['maxDate']
2179
2179
  : undefined;
2180
- const change = minDateChange || maxDateChange || changes['dateFilter'];
2181
- if (change && !change.firstChange) {
2180
+ const changeRequiringRerender = minDateChange || maxDateChange || changes['dateFilter'];
2181
+ if (changeRequiringRerender && !changeRequiringRerender.firstChange) {
2182
2182
  const view = this._getCurrentViewComponent();
2183
2183
  if (view) {
2184
+ // Schedule focus to be moved to the active date since re-rendering
2185
+ // can blur the active cell. See #29265.
2186
+ this._moveFocusOnNextTick = true;
2184
2187
  // We need to `detectChanges` manually here, because the `minDate`, `maxDate` etc. are
2185
2188
  // passed down to the view via data bindings which won't be up-to-date when we call `_init`.
2186
2189
  this._changeDetectorRef.detectChanges();
@@ -2594,10 +2597,14 @@ class MatDatepickerBase {
2594
2597
  /** Emits when the datepicker's state changes. */
2595
2598
  this.stateChanges = new Subject();
2596
2599
  this._injector = inject(Injector);
2600
+ this._changeDetectorRef = inject(ChangeDetectorRef);
2597
2601
  if (!this._dateAdapter && (typeof ngDevMode === 'undefined' || ngDevMode)) {
2598
2602
  throw createMissingDateImplError('DateAdapter');
2599
2603
  }
2600
2604
  this._scrollStrategy = scrollStrategy;
2605
+ this._model.selectionChanged.subscribe(() => {
2606
+ this._changeDetectorRef.markForCheck();
2607
+ });
2601
2608
  }
2602
2609
  ngOnChanges(changes) {
2603
2610
  const positionChange = changes['xPosition'] || changes['yPosition'];
@@ -3251,7 +3258,14 @@ class MatDatepickerInput extends MatDatepickerInputBase {
3251
3258
  set matDatepicker(datepicker) {
3252
3259
  if (datepicker) {
3253
3260
  this._datepicker = datepicker;
3254
- this._closedSubscription = datepicker.closedStream.subscribe(() => this._onTouched());
3261
+ this._ariaOwns.set(datepicker.opened ? datepicker.id : null);
3262
+ this._closedSubscription = datepicker.closedStream.subscribe(() => {
3263
+ this._onTouched();
3264
+ this._ariaOwns.set(null);
3265
+ });
3266
+ this._openedSubscription = datepicker.openedStream.subscribe(() => {
3267
+ this._ariaOwns.set(datepicker.id);
3268
+ });
3255
3269
  this._registerModel(datepicker.registerInput(this));
3256
3270
  }
3257
3271
  }
@@ -3292,6 +3306,9 @@ class MatDatepickerInput extends MatDatepickerInputBase {
3292
3306
  super(elementRef, dateAdapter, dateFormats);
3293
3307
  this._formField = _formField;
3294
3308
  this._closedSubscription = Subscription.EMPTY;
3309
+ this._openedSubscription = Subscription.EMPTY;
3310
+ /** The id of the panel owned by this input. */
3311
+ this._ariaOwns = signal(null);
3295
3312
  this._validator = Validators.compose(super._getValidators());
3296
3313
  }
3297
3314
  /**
@@ -3319,6 +3336,7 @@ class MatDatepickerInput extends MatDatepickerInputBase {
3319
3336
  ngOnDestroy() {
3320
3337
  super.ngOnDestroy();
3321
3338
  this._closedSubscription.unsubscribe();
3339
+ this._openedSubscription.unsubscribe();
3322
3340
  }
3323
3341
  /** Opens the associated datepicker. */
3324
3342
  _openPopup() {
@@ -3350,7 +3368,7 @@ class MatDatepickerInput extends MatDatepickerInputBase {
3350
3368
  return event.source !== this;
3351
3369
  }
3352
3370
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: MatDatepickerInput, deps: [{ token: i0.ElementRef }, { token: i1.DateAdapter, optional: true }, { token: MAT_DATE_FORMATS, optional: true }, { token: MAT_FORM_FIELD, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
3353
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: MatDatepickerInput, isStandalone: true, selector: "input[matDatepicker]", inputs: { matDatepicker: "matDatepicker", min: "min", max: "max", dateFilter: ["matDatepickerFilter", "dateFilter"] }, host: { listeners: { "input": "_onInput($event.target.value)", "change": "_onChange()", "blur": "_onBlur()", "keydown": "_onKeydown($event)" }, properties: { "attr.aria-haspopup": "_datepicker ? \"dialog\" : null", "attr.aria-owns": "(_datepicker?.opened && _datepicker.id) || null", "attr.min": "min ? _dateAdapter.toIso8601(min) : null", "attr.max": "max ? _dateAdapter.toIso8601(max) : null", "attr.data-mat-calendar": "_datepicker ? _datepicker.id : null", "disabled": "disabled" }, classAttribute: "mat-datepicker-input" }, providers: [
3371
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: MatDatepickerInput, isStandalone: true, selector: "input[matDatepicker]", inputs: { matDatepicker: "matDatepicker", min: "min", max: "max", dateFilter: ["matDatepickerFilter", "dateFilter"] }, host: { listeners: { "input": "_onInput($event.target.value)", "change": "_onChange()", "blur": "_onBlur()", "keydown": "_onKeydown($event)" }, properties: { "attr.aria-haspopup": "_datepicker ? \"dialog\" : null", "attr.aria-owns": "_ariaOwns()", "attr.min": "min ? _dateAdapter.toIso8601(min) : null", "attr.max": "max ? _dateAdapter.toIso8601(max) : null", "attr.data-mat-calendar": "_datepicker ? _datepicker.id : null", "disabled": "disabled" }, classAttribute: "mat-datepicker-input" }, providers: [
3354
3372
  MAT_DATEPICKER_VALUE_ACCESSOR,
3355
3373
  MAT_DATEPICKER_VALIDATORS,
3356
3374
  { provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: MatDatepickerInput },
@@ -3368,7 +3386,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImpor
3368
3386
  host: {
3369
3387
  'class': 'mat-datepicker-input',
3370
3388
  '[attr.aria-haspopup]': '_datepicker ? "dialog" : null',
3371
- '[attr.aria-owns]': '(_datepicker?.opened && _datepicker.id) || null',
3389
+ '[attr.aria-owns]': '_ariaOwns()',
3372
3390
  '[attr.min]': 'min ? _dateAdapter.toIso8601(min) : null',
3373
3391
  '[attr.max]': 'max ? _dateAdapter.toIso8601(max) : null',
3374
3392
  // Used by the test harness to tie this input to its calendar. We can't depend on
@@ -3853,7 +3871,7 @@ class MatStartDate extends MatDateRangeInputPartBase {
3853
3871
  }
3854
3872
  }
3855
3873
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: MatStartDate, deps: [{ token: MAT_DATE_RANGE_INPUT_PARENT }, { token: i0.ElementRef }, { token: i1.ErrorStateMatcher }, { token: i0.Injector }, { token: i2$1.NgForm, optional: true }, { token: i2$1.FormGroupDirective, optional: true }, { token: i1.DateAdapter, optional: true }, { token: MAT_DATE_FORMATS, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
3856
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: MatStartDate, isStandalone: true, selector: "input[matStartDate]", outputs: { dateChange: "dateChange", dateInput: "dateInput" }, host: { attributes: { "type": "text" }, listeners: { "input": "_onInput($event.target.value)", "change": "_onChange()", "keydown": "_onKeydown($event)", "blur": "_onBlur()" }, properties: { "disabled": "disabled", "attr.aria-haspopup": "_rangeInput.rangePicker ? \"dialog\" : null", "attr.aria-owns": "(_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null", "attr.min": "_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null", "attr.max": "_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null" }, classAttribute: "mat-start-date mat-date-range-input-inner" }, providers: [
3874
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: MatStartDate, isStandalone: true, selector: "input[matStartDate]", outputs: { dateChange: "dateChange", dateInput: "dateInput" }, host: { attributes: { "type": "text" }, listeners: { "input": "_onInput($event.target.value)", "change": "_onChange()", "keydown": "_onKeydown($event)", "blur": "_onBlur()" }, properties: { "disabled": "disabled", "attr.aria-haspopup": "_rangeInput.rangePicker ? \"dialog\" : null", "attr.aria-owns": "_rangeInput._ariaOwns\n ? _rangeInput._ariaOwns()\n : (_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null", "attr.min": "_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null", "attr.max": "_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null" }, classAttribute: "mat-start-date mat-date-range-input-inner" }, providers: [
3857
3875
  { provide: NG_VALUE_ACCESSOR, useExisting: MatStartDate, multi: true },
3858
3876
  { provide: NG_VALIDATORS, useExisting: MatStartDate, multi: true },
3859
3877
  ], usesInheritance: true, ngImport: i0 }); }
@@ -3869,7 +3887,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImpor
3869
3887
  '(change)': '_onChange()',
3870
3888
  '(keydown)': '_onKeydown($event)',
3871
3889
  '[attr.aria-haspopup]': '_rangeInput.rangePicker ? "dialog" : null',
3872
- '[attr.aria-owns]': '(_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null',
3890
+ '[attr.aria-owns]': `_rangeInput._ariaOwns
3891
+ ? _rangeInput._ariaOwns()
3892
+ : (_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null`,
3873
3893
  '[attr.min]': '_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null',
3874
3894
  '[attr.max]': '_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null',
3875
3895
  '(blur)': '_onBlur()',
@@ -3961,7 +3981,7 @@ class MatEndDate extends MatDateRangeInputPartBase {
3961
3981
  }
3962
3982
  }
3963
3983
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: MatEndDate, deps: [{ token: MAT_DATE_RANGE_INPUT_PARENT }, { token: i0.ElementRef }, { token: i1.ErrorStateMatcher }, { token: i0.Injector }, { token: i2$1.NgForm, optional: true }, { token: i2$1.FormGroupDirective, optional: true }, { token: i1.DateAdapter, optional: true }, { token: MAT_DATE_FORMATS, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
3964
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: MatEndDate, isStandalone: true, selector: "input[matEndDate]", outputs: { dateChange: "dateChange", dateInput: "dateInput" }, host: { attributes: { "type": "text" }, listeners: { "input": "_onInput($event.target.value)", "change": "_onChange()", "keydown": "_onKeydown($event)", "blur": "_onBlur()" }, properties: { "disabled": "disabled", "attr.aria-haspopup": "_rangeInput.rangePicker ? \"dialog\" : null", "attr.aria-owns": "(_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null", "attr.min": "_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null", "attr.max": "_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null" }, classAttribute: "mat-end-date mat-date-range-input-inner" }, providers: [
3984
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.0", type: MatEndDate, isStandalone: true, selector: "input[matEndDate]", outputs: { dateChange: "dateChange", dateInput: "dateInput" }, host: { attributes: { "type": "text" }, listeners: { "input": "_onInput($event.target.value)", "change": "_onChange()", "keydown": "_onKeydown($event)", "blur": "_onBlur()" }, properties: { "disabled": "disabled", "attr.aria-haspopup": "_rangeInput.rangePicker ? \"dialog\" : null", "attr.aria-owns": "_rangeInput._ariaOwns\n ? _rangeInput._ariaOwns()\n : (_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null", "attr.min": "_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null", "attr.max": "_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null" }, classAttribute: "mat-end-date mat-date-range-input-inner" }, providers: [
3965
3985
  { provide: NG_VALUE_ACCESSOR, useExisting: MatEndDate, multi: true },
3966
3986
  { provide: NG_VALIDATORS, useExisting: MatEndDate, multi: true },
3967
3987
  ], usesInheritance: true, ngImport: i0 }); }
@@ -3977,7 +3997,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImpor
3977
3997
  '(change)': '_onChange()',
3978
3998
  '(keydown)': '_onKeydown($event)',
3979
3999
  '[attr.aria-haspopup]': '_rangeInput.rangePicker ? "dialog" : null',
3980
- '[attr.aria-owns]': '(_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null',
4000
+ '[attr.aria-owns]': `_rangeInput._ariaOwns
4001
+ ? _rangeInput._ariaOwns()
4002
+ : (_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null`,
3981
4003
  '[attr.min]': '_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null',
3982
4004
  '[attr.max]': '_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null',
3983
4005
  '(blur)': '_onBlur()',
@@ -4037,9 +4059,15 @@ class MatDateRangeInput {
4037
4059
  this._model = rangePicker.registerInput(this);
4038
4060
  this._rangePicker = rangePicker;
4039
4061
  this._closedSubscription.unsubscribe();
4062
+ this._openedSubscription.unsubscribe();
4063
+ this._ariaOwns.set(this.rangePicker.opened ? rangePicker.id : null);
4040
4064
  this._closedSubscription = rangePicker.closedStream.subscribe(() => {
4041
4065
  this._startInput?._onTouched();
4042
4066
  this._endInput?._onTouched();
4067
+ this._ariaOwns.set(null);
4068
+ });
4069
+ this._openedSubscription = rangePicker.openedStream.subscribe(() => {
4070
+ this._ariaOwns.set(rangePicker.id);
4043
4071
  });
4044
4072
  this._registerModel(this._model);
4045
4073
  }
@@ -4125,12 +4153,15 @@ class MatDateRangeInput {
4125
4153
  this._dateAdapter = _dateAdapter;
4126
4154
  this._formField = _formField;
4127
4155
  this._closedSubscription = Subscription.EMPTY;
4156
+ this._openedSubscription = Subscription.EMPTY;
4128
4157
  /** Unique ID for the group. */
4129
4158
  this.id = `mat-date-range-input-${nextUniqueId++}`;
4130
4159
  /** Whether the control is focused. */
4131
4160
  this.focused = false;
4132
4161
  /** Name of the form control. */
4133
4162
  this.controlType = 'mat-date-range-input';
4163
+ /** The id of the panel owned by this input. */
4164
+ this._ariaOwns = signal(null);
4134
4165
  this._groupDisabled = false;
4135
4166
  /** Value for the `aria-describedby` attribute of the inputs. */
4136
4167
  this._ariaDescribedBy = null;
@@ -4204,6 +4235,7 @@ class MatDateRangeInput {
4204
4235
  }
4205
4236
  ngOnDestroy() {
4206
4237
  this._closedSubscription.unsubscribe();
4238
+ this._openedSubscription.unsubscribe();
4207
4239
  this.stateChanges.complete();
4208
4240
  }
4209
4241
  /** Gets the date at which the calendar should start. */