@angular/material 18.0.3 → 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 (95) hide show
  1. package/autocomplete/index.d.ts +3 -0
  2. package/bottom-sheet/index.d.ts +0 -1
  3. package/button/index.d.ts +7 -1
  4. package/checkbox/index.d.ts +5 -3
  5. package/chips/index.d.ts +9 -5
  6. package/core/_core-theme.scss +8 -14
  7. package/core/_core.scss +18 -4
  8. package/core/tokens/_density.scss +1 -0
  9. package/core/tokens/m2/mat/_app.scss +13 -1
  10. package/core/tokens/m2/mat/_menu.scss +3 -0
  11. package/core/tokens/m2/mat/_paginator.scss +1 -0
  12. package/core/tokens/m3/mat/_app.scss +9 -0
  13. package/core/tokens/m3/mat/_menu.scss +3 -0
  14. package/datepicker/index.d.ts +17 -1
  15. package/esm2022/autocomplete/autocomplete-trigger.mjs +28 -1
  16. package/esm2022/bottom-sheet/bottom-sheet-container.mjs +6 -7
  17. package/esm2022/button/button-base.mjs +1 -1
  18. package/esm2022/checkbox/checkbox.mjs +1 -1
  19. package/esm2022/chips/chip-grid.mjs +11 -4
  20. package/esm2022/chips/chip-row.mjs +8 -13
  21. package/esm2022/chips/chip-set.mjs +7 -3
  22. package/esm2022/chips/chip.mjs +1 -1
  23. package/esm2022/core/option/optgroup.mjs +2 -2
  24. package/esm2022/core/option/option.mjs +3 -3
  25. package/esm2022/core/version.mjs +1 -1
  26. package/esm2022/datepicker/date-range-input-parts.mjs +14 -10
  27. package/esm2022/datepicker/date-range-input.mjs +17 -7
  28. package/esm2022/datepicker/datepicker-base.mjs +5 -1
  29. package/esm2022/datepicker/datepicker-input.mjs +16 -5
  30. package/esm2022/form-field/form-field.mjs +12 -6
  31. package/esm2022/icon/icon.mjs +8 -2
  32. package/esm2022/list/list-option.mjs +3 -3
  33. package/esm2022/list/selection-list.mjs +9 -2
  34. package/esm2022/menu/menu.mjs +13 -4
  35. package/esm2022/paginator/paginator.mjs +3 -3
  36. package/esm2022/radio/radio.mjs +3 -3
  37. package/esm2022/slide-toggle/slide-toggle.mjs +1 -1
  38. package/esm2022/stepper/step-header.mjs +1 -1
  39. package/esm2022/stepper/stepper.mjs +1 -1
  40. package/esm2022/tabs/tab-header.mjs +3 -3
  41. package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +10 -4
  42. package/esm2022/toolbar/toolbar.mjs +1 -1
  43. package/fesm2022/autocomplete.mjs +27 -0
  44. package/fesm2022/autocomplete.mjs.map +1 -1
  45. package/fesm2022/bottom-sheet.mjs +5 -6
  46. package/fesm2022/bottom-sheet.mjs.map +1 -1
  47. package/fesm2022/button.mjs.map +1 -1
  48. package/fesm2022/checkbox.mjs.map +1 -1
  49. package/fesm2022/chips.mjs +15 -9
  50. package/fesm2022/chips.mjs.map +1 -1
  51. package/fesm2022/core.mjs +5 -5
  52. package/fesm2022/core.mjs.map +1 -1
  53. package/fesm2022/datepicker.mjs +37 -8
  54. package/fesm2022/datepicker.mjs.map +1 -1
  55. package/fesm2022/form-field.mjs +9 -3
  56. package/fesm2022/form-field.mjs.map +1 -1
  57. package/fesm2022/icon.mjs +7 -1
  58. package/fesm2022/icon.mjs.map +1 -1
  59. package/fesm2022/list.mjs +10 -3
  60. package/fesm2022/list.mjs.map +1 -1
  61. package/fesm2022/menu.mjs +12 -3
  62. package/fesm2022/menu.mjs.map +1 -1
  63. package/fesm2022/paginator.mjs +2 -2
  64. package/fesm2022/paginator.mjs.map +1 -1
  65. package/fesm2022/radio.mjs +2 -2
  66. package/fesm2022/radio.mjs.map +1 -1
  67. package/fesm2022/slide-toggle.mjs.map +1 -1
  68. package/fesm2022/stepper.mjs.map +1 -1
  69. package/fesm2022/tabs.mjs +11 -5
  70. package/fesm2022/tabs.mjs.map +1 -1
  71. package/fesm2022/toolbar.mjs.map +1 -1
  72. package/form-field/index.d.ts +12 -2
  73. package/icon/index.d.ts +14 -2
  74. package/list/_list-theme.scss +8 -5
  75. package/list/index.d.ts +8 -1
  76. package/package.json +2 -2
  77. package/paginator/index.d.ts +7 -1
  78. package/prebuilt-themes/azure-blue.css +1 -1
  79. package/prebuilt-themes/cyan-orange.css +1 -1
  80. package/prebuilt-themes/deeppurple-amber.css +1 -1
  81. package/prebuilt-themes/indigo-pink.css +1 -1
  82. package/prebuilt-themes/magenta-violet.css +1 -1
  83. package/prebuilt-themes/pink-bluegrey.css +1 -1
  84. package/prebuilt-themes/purple-green.css +1 -1
  85. package/prebuilt-themes/rose-red.css +1 -1
  86. package/radio/_radio-common.scss +238 -0
  87. package/radio/_radio-theme.scss +25 -32
  88. package/radio/index.d.ts +7 -1
  89. package/schematics/ng-add/index.js +1 -1
  90. package/schematics/ng-add/index.mjs +1 -1
  91. package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +1 -1
  92. package/slide-toggle/index.d.ts +7 -1
  93. package/stepper/index.d.ts +21 -3
  94. package/tabs/index.d.ts +7 -1
  95. package/toolbar/index.d.ts +7 -1
@@ -861,16 +861,11 @@ class MatChipRow extends MatChip {
861
861
  // The value depends on the DOM so we need to extract it before we flip the flag.
862
862
  const value = this.value;
863
863
  this._isEditing = this._editStartPending = true;
864
- // Starting the editing sequence below depends on the edit input
865
- // query resolving on time. Trigger a synchronous change detection to
866
- // ensure that it happens by the time we hit the timeout below.
867
- this._changeDetectorRef.detectChanges();
868
- // TODO(crisbeto): this timeout shouldn't be necessary given the `detectChange` call above.
869
- // Defer initializing the input so it has time to be added to the DOM.
870
- setTimeout(() => {
864
+ // Defer initializing the input until after it has been added to the DOM.
865
+ afterNextRender(() => {
871
866
  this._getEditInput().initialize(value);
872
867
  this._editStartPending = false;
873
- });
868
+ }, { injector: this._injector });
874
869
  }
875
870
  _onEditFinish() {
876
871
  this._isEditing = this._editStartPending = false;
@@ -1065,9 +1060,13 @@ class MatChipSet {
1065
1060
  if (this.tabIndex !== -1) {
1066
1061
  const previousTabIndex = this.tabIndex;
1067
1062
  this.tabIndex = -1;
1063
+ this._changeDetectorRef.markForCheck();
1068
1064
  // Note that this needs to be a `setTimeout`, because a `Promise.resolve`
1069
1065
  // doesn't allow enough time for the focus to escape.
1070
- setTimeout(() => (this.tabIndex = previousTabIndex));
1066
+ setTimeout(() => {
1067
+ this.tabIndex = previousTabIndex;
1068
+ this._changeDetectorRef.markForCheck();
1069
+ });
1071
1070
  }
1072
1071
  }
1073
1072
  /**
@@ -1718,6 +1717,13 @@ class MatChipGrid extends MatChipSet {
1718
1717
  }
1719
1718
  this._errorStateTracker = new _ErrorStateTracker(defaultErrorStateMatcher, ngControl, parentFormGroup, parentForm, this.stateChanges);
1720
1719
  }
1720
+ ngOnInit() {
1721
+ if (this.ngControl) {
1722
+ this.ngControl.control?.events.pipe(takeUntil(this._destroyed)).subscribe(() => {
1723
+ this._changeDetectorRef.markForCheck();
1724
+ });
1725
+ }
1726
+ }
1721
1727
  ngAfterContentInit() {
1722
1728
  this.chipBlurChanges.pipe(takeUntil(this._destroyed)).subscribe(() => {
1723
1729
  this._blur();