@angular/material 18.0.2 → 18.0.4

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 (117) hide show
  1. package/_index.scss +1 -1
  2. package/autocomplete/index.d.ts +3 -0
  3. package/badge/index.d.ts +4 -1
  4. package/bottom-sheet/index.d.ts +0 -1
  5. package/button/index.d.ts +7 -1
  6. package/checkbox/index.d.ts +12 -2
  7. package/chips/index.d.ts +11 -3
  8. package/core/_core-theme.scss +8 -14
  9. package/core/_core.scss +18 -4
  10. package/core/m2/_typography.scss +1 -1
  11. package/core/theming/_palettes.scss +2 -0
  12. package/core/tokens/_density.scss +1 -0
  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/m3/mat/_app.scss +9 -0
  17. package/core/tokens/m3/mat/_menu.scss +3 -0
  18. package/datepicker/index.d.ts +27 -3
  19. package/dialog/index.d.ts +0 -1
  20. package/dialog/testing/index.d.ts +1 -0
  21. package/esm2022/autocomplete/autocomplete-trigger.mjs +35 -7
  22. package/esm2022/badge/badge.mjs +5 -2
  23. package/esm2022/bottom-sheet/bottom-sheet-container.mjs +6 -7
  24. package/esm2022/button/button-base.mjs +1 -1
  25. package/esm2022/checkbox/checkbox-config.mjs +1 -1
  26. package/esm2022/checkbox/checkbox.mjs +3 -10
  27. package/esm2022/chips/chip-grid.mjs +11 -4
  28. package/esm2022/chips/chip-row.mjs +8 -13
  29. package/esm2022/chips/chip-set.mjs +7 -3
  30. package/esm2022/chips/chip.mjs +6 -6
  31. package/esm2022/core/option/optgroup.mjs +2 -2
  32. package/esm2022/core/option/option.mjs +3 -3
  33. package/esm2022/core/version.mjs +1 -1
  34. package/esm2022/datepicker/date-range-input-parts.mjs +14 -10
  35. package/esm2022/datepicker/date-range-input.mjs +17 -7
  36. package/esm2022/datepicker/datepicker-base.mjs +18 -17
  37. package/esm2022/datepicker/datepicker-input.mjs +16 -5
  38. package/esm2022/dialog/dialog-container.mjs +1 -6
  39. package/esm2022/dialog/testing/dialog-opener.mjs +4 -3
  40. package/esm2022/form-field/form-field.mjs +12 -6
  41. package/esm2022/icon/icon.mjs +8 -2
  42. package/esm2022/list/list-option.mjs +3 -3
  43. package/esm2022/list/selection-list.mjs +9 -2
  44. package/esm2022/menu/menu.mjs +13 -4
  45. package/esm2022/paginator/paginator.mjs +3 -3
  46. package/esm2022/radio/radio.mjs +4 -3
  47. package/esm2022/slide-toggle/slide-toggle.mjs +1 -1
  48. package/esm2022/slider/slider-interface.mjs +2 -2
  49. package/esm2022/stepper/step-header.mjs +1 -1
  50. package/esm2022/stepper/stepper.mjs +1 -1
  51. package/esm2022/tabs/tab-header.mjs +3 -3
  52. package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +10 -4
  53. package/esm2022/toolbar/toolbar.mjs +1 -1
  54. package/fesm2022/autocomplete.mjs +28 -0
  55. package/fesm2022/autocomplete.mjs.map +1 -1
  56. package/fesm2022/badge.mjs +4 -1
  57. package/fesm2022/badge.mjs.map +1 -1
  58. package/fesm2022/bottom-sheet.mjs +5 -6
  59. package/fesm2022/bottom-sheet.mjs.map +1 -1
  60. package/fesm2022/button.mjs.map +1 -1
  61. package/fesm2022/checkbox.mjs.map +1 -1
  62. package/fesm2022/chips.mjs +19 -13
  63. package/fesm2022/chips.mjs.map +1 -1
  64. package/fesm2022/core.mjs +5 -5
  65. package/fesm2022/core.mjs.map +1 -1
  66. package/fesm2022/datepicker.mjs +42 -9
  67. package/fesm2022/datepicker.mjs.map +1 -1
  68. package/fesm2022/dialog/testing.mjs +3 -2
  69. package/fesm2022/dialog/testing.mjs.map +1 -1
  70. package/fesm2022/dialog.mjs +0 -5
  71. package/fesm2022/dialog.mjs.map +1 -1
  72. package/fesm2022/form-field.mjs +9 -3
  73. package/fesm2022/form-field.mjs.map +1 -1
  74. package/fesm2022/icon.mjs +7 -1
  75. package/fesm2022/icon.mjs.map +1 -1
  76. package/fesm2022/list.mjs +10 -3
  77. package/fesm2022/list.mjs.map +1 -1
  78. package/fesm2022/menu.mjs +12 -3
  79. package/fesm2022/menu.mjs.map +1 -1
  80. package/fesm2022/paginator.mjs +2 -2
  81. package/fesm2022/paginator.mjs.map +1 -1
  82. package/fesm2022/radio.mjs +3 -2
  83. package/fesm2022/radio.mjs.map +1 -1
  84. package/fesm2022/slide-toggle.mjs.map +1 -1
  85. package/fesm2022/slider.mjs +1 -1
  86. package/fesm2022/slider.mjs.map +1 -1
  87. package/fesm2022/stepper.mjs.map +1 -1
  88. package/fesm2022/tabs.mjs +11 -5
  89. package/fesm2022/tabs.mjs.map +1 -1
  90. package/fesm2022/toolbar.mjs.map +1 -1
  91. package/form-field/index.d.ts +12 -2
  92. package/icon/index.d.ts +14 -2
  93. package/list/_list-theme.scss +8 -5
  94. package/list/index.d.ts +8 -1
  95. package/package.json +2 -2
  96. package/paginator/index.d.ts +7 -1
  97. package/prebuilt-themes/azure-blue.css +1 -1
  98. package/prebuilt-themes/cyan-orange.css +1 -1
  99. package/prebuilt-themes/deeppurple-amber.css +1 -1
  100. package/prebuilt-themes/indigo-pink.css +1 -1
  101. package/prebuilt-themes/magenta-violet.css +1 -1
  102. package/prebuilt-themes/pink-bluegrey.css +1 -1
  103. package/prebuilt-themes/purple-green.css +1 -1
  104. package/prebuilt-themes/rose-red.css +1 -1
  105. package/radio/_radio-common.scss +238 -0
  106. package/radio/_radio-theme.scss +25 -32
  107. package/radio/index.d.ts +7 -1
  108. package/schematics/ng-add/index.js +1 -1
  109. package/schematics/ng-add/index.mjs +1 -1
  110. package/schematics/ng-generate/m3-theme/index_bundled.js +81 -2
  111. package/schematics/ng-generate/m3-theme/index_bundled.js.map +3 -3
  112. package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +1 -1
  113. package/slide-toggle/index.d.ts +7 -1
  114. package/slider/index.d.ts +1 -1
  115. package/stepper/index.d.ts +21 -3
  116. package/tabs/index.d.ts +7 -1
  117. package/toolbar/index.d.ts +7 -1
@@ -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';
@@ -2483,7 +2483,11 @@ class MatDatepickerBase {
2483
2483
  set startAt(value) {
2484
2484
  this._startAt = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
2485
2485
  }
2486
- /** Color palette to use on the datepicker's calendar. */
2486
+ /**
2487
+ * Color palette to use on the datepicker's calendar. This API is supported in M2 themes only, it
2488
+ * has no effect in M3 themes. For information on applying color variants in M3, see
2489
+ * https://material.angular.io/guide/theming#using-component-color-variants
2490
+ */
2487
2491
  get color() {
2488
2492
  return (this._color || (this.datepickerInput ? this.datepickerInput.getThemePalette() : undefined));
2489
2493
  }
@@ -2590,10 +2594,14 @@ class MatDatepickerBase {
2590
2594
  /** Emits when the datepicker's state changes. */
2591
2595
  this.stateChanges = new Subject();
2592
2596
  this._injector = inject(Injector);
2597
+ this._changeDetectorRef = inject(ChangeDetectorRef);
2593
2598
  if (!this._dateAdapter && (typeof ngDevMode === 'undefined' || ngDevMode)) {
2594
2599
  throw createMissingDateImplError('DateAdapter');
2595
2600
  }
2596
2601
  this._scrollStrategy = scrollStrategy;
2602
+ this._model.selectionChanged.subscribe(() => {
2603
+ this._changeDetectorRef.markForCheck();
2604
+ });
2597
2605
  }
2598
2606
  ngOnChanges(changes) {
2599
2607
  const positionChange = changes['xPosition'] || changes['yPosition'];
@@ -3247,7 +3255,14 @@ class MatDatepickerInput extends MatDatepickerInputBase {
3247
3255
  set matDatepicker(datepicker) {
3248
3256
  if (datepicker) {
3249
3257
  this._datepicker = datepicker;
3250
- this._closedSubscription = datepicker.closedStream.subscribe(() => this._onTouched());
3258
+ this._ariaOwns.set(datepicker.opened ? datepicker.id : null);
3259
+ this._closedSubscription = datepicker.closedStream.subscribe(() => {
3260
+ this._onTouched();
3261
+ this._ariaOwns.set(null);
3262
+ });
3263
+ this._openedSubscription = datepicker.openedStream.subscribe(() => {
3264
+ this._ariaOwns.set(datepicker.id);
3265
+ });
3251
3266
  this._registerModel(datepicker.registerInput(this));
3252
3267
  }
3253
3268
  }
@@ -3288,6 +3303,9 @@ class MatDatepickerInput extends MatDatepickerInputBase {
3288
3303
  super(elementRef, dateAdapter, dateFormats);
3289
3304
  this._formField = _formField;
3290
3305
  this._closedSubscription = Subscription.EMPTY;
3306
+ this._openedSubscription = Subscription.EMPTY;
3307
+ /** The id of the panel owned by this input. */
3308
+ this._ariaOwns = signal(null);
3291
3309
  this._validator = Validators.compose(super._getValidators());
3292
3310
  }
3293
3311
  /**
@@ -3315,6 +3333,7 @@ class MatDatepickerInput extends MatDatepickerInputBase {
3315
3333
  ngOnDestroy() {
3316
3334
  super.ngOnDestroy();
3317
3335
  this._closedSubscription.unsubscribe();
3336
+ this._openedSubscription.unsubscribe();
3318
3337
  }
3319
3338
  /** Opens the associated datepicker. */
3320
3339
  _openPopup() {
@@ -3346,7 +3365,7 @@ class MatDatepickerInput extends MatDatepickerInputBase {
3346
3365
  return event.source !== this;
3347
3366
  }
3348
3367
  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 }); }
3349
- 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: [
3368
+ 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: [
3350
3369
  MAT_DATEPICKER_VALUE_ACCESSOR,
3351
3370
  MAT_DATEPICKER_VALIDATORS,
3352
3371
  { provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: MatDatepickerInput },
@@ -3364,7 +3383,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImpor
3364
3383
  host: {
3365
3384
  'class': 'mat-datepicker-input',
3366
3385
  '[attr.aria-haspopup]': '_datepicker ? "dialog" : null',
3367
- '[attr.aria-owns]': '(_datepicker?.opened && _datepicker.id) || null',
3386
+ '[attr.aria-owns]': '_ariaOwns()',
3368
3387
  '[attr.min]': 'min ? _dateAdapter.toIso8601(min) : null',
3369
3388
  '[attr.max]': 'max ? _dateAdapter.toIso8601(max) : null',
3370
3389
  // Used by the test harness to tie this input to its calendar. We can't depend on
@@ -3849,7 +3868,7 @@ class MatStartDate extends MatDateRangeInputPartBase {
3849
3868
  }
3850
3869
  }
3851
3870
  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 }); }
3852
- 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: [
3871
+ 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: [
3853
3872
  { provide: NG_VALUE_ACCESSOR, useExisting: MatStartDate, multi: true },
3854
3873
  { provide: NG_VALIDATORS, useExisting: MatStartDate, multi: true },
3855
3874
  ], usesInheritance: true, ngImport: i0 }); }
@@ -3865,7 +3884,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImpor
3865
3884
  '(change)': '_onChange()',
3866
3885
  '(keydown)': '_onKeydown($event)',
3867
3886
  '[attr.aria-haspopup]': '_rangeInput.rangePicker ? "dialog" : null',
3868
- '[attr.aria-owns]': '(_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null',
3887
+ '[attr.aria-owns]': `_rangeInput._ariaOwns
3888
+ ? _rangeInput._ariaOwns()
3889
+ : (_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null`,
3869
3890
  '[attr.min]': '_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null',
3870
3891
  '[attr.max]': '_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null',
3871
3892
  '(blur)': '_onBlur()',
@@ -3957,7 +3978,7 @@ class MatEndDate extends MatDateRangeInputPartBase {
3957
3978
  }
3958
3979
  }
3959
3980
  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 }); }
3960
- 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: [
3981
+ 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: [
3961
3982
  { provide: NG_VALUE_ACCESSOR, useExisting: MatEndDate, multi: true },
3962
3983
  { provide: NG_VALIDATORS, useExisting: MatEndDate, multi: true },
3963
3984
  ], usesInheritance: true, ngImport: i0 }); }
@@ -3973,7 +3994,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImpor
3973
3994
  '(change)': '_onChange()',
3974
3995
  '(keydown)': '_onKeydown($event)',
3975
3996
  '[attr.aria-haspopup]': '_rangeInput.rangePicker ? "dialog" : null',
3976
- '[attr.aria-owns]': '(_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null',
3997
+ '[attr.aria-owns]': `_rangeInput._ariaOwns
3998
+ ? _rangeInput._ariaOwns()
3999
+ : (_rangeInput.rangePicker?.opened && _rangeInput.rangePicker.id) || null`,
3977
4000
  '[attr.min]': '_getMinDate() ? _dateAdapter.toIso8601(_getMinDate()) : null',
3978
4001
  '[attr.max]': '_getMaxDate() ? _dateAdapter.toIso8601(_getMaxDate()) : null',
3979
4002
  '(blur)': '_onBlur()',
@@ -4033,9 +4056,15 @@ class MatDateRangeInput {
4033
4056
  this._model = rangePicker.registerInput(this);
4034
4057
  this._rangePicker = rangePicker;
4035
4058
  this._closedSubscription.unsubscribe();
4059
+ this._openedSubscription.unsubscribe();
4060
+ this._ariaOwns.set(this.rangePicker.opened ? rangePicker.id : null);
4036
4061
  this._closedSubscription = rangePicker.closedStream.subscribe(() => {
4037
4062
  this._startInput?._onTouched();
4038
4063
  this._endInput?._onTouched();
4064
+ this._ariaOwns.set(null);
4065
+ });
4066
+ this._openedSubscription = rangePicker.openedStream.subscribe(() => {
4067
+ this._ariaOwns.set(rangePicker.id);
4039
4068
  });
4040
4069
  this._registerModel(this._model);
4041
4070
  }
@@ -4121,12 +4150,15 @@ class MatDateRangeInput {
4121
4150
  this._dateAdapter = _dateAdapter;
4122
4151
  this._formField = _formField;
4123
4152
  this._closedSubscription = Subscription.EMPTY;
4153
+ this._openedSubscription = Subscription.EMPTY;
4124
4154
  /** Unique ID for the group. */
4125
4155
  this.id = `mat-date-range-input-${nextUniqueId++}`;
4126
4156
  /** Whether the control is focused. */
4127
4157
  this.focused = false;
4128
4158
  /** Name of the form control. */
4129
4159
  this.controlType = 'mat-date-range-input';
4160
+ /** The id of the panel owned by this input. */
4161
+ this._ariaOwns = signal(null);
4130
4162
  this._groupDisabled = false;
4131
4163
  /** Value for the `aria-describedby` attribute of the inputs. */
4132
4164
  this._ariaDescribedBy = null;
@@ -4200,6 +4232,7 @@ class MatDateRangeInput {
4200
4232
  }
4201
4233
  ngOnDestroy() {
4202
4234
  this._closedSubscription.unsubscribe();
4235
+ this._openedSubscription.unsubscribe();
4203
4236
  this.stateChanges.complete();
4204
4237
  }
4205
4238
  /** Gets the date at which the calendar should start. */