@angular/material 21.0.0-next.1 → 21.0.0-next.2

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 (99) hide show
  1. package/autocomplete/index.d.ts +1 -23
  2. package/bottom-sheet/index.d.ts +1 -10
  3. package/button/index.d.ts +1 -7
  4. package/button-toggle/index.d.ts +1 -1
  5. package/button-toggle.d.d.ts +1 -7
  6. package/checkbox/index.d.ts +1 -7
  7. package/core/index.d.ts +1 -1
  8. package/core/tokens/_classes.scss +20 -16
  9. package/date-adapter.d.d.ts +1 -7
  10. package/datepicker/index.d.ts +2 -55
  11. package/dialog/index.d.ts +1 -23
  12. package/expansion/index.d.ts +1 -36
  13. package/fesm2022/autocomplete.mjs +5 -33
  14. package/fesm2022/autocomplete.mjs.map +1 -1
  15. package/fesm2022/bottom-sheet.mjs +1 -82
  16. package/fesm2022/bottom-sheet.mjs.map +1 -1
  17. package/fesm2022/button-toggle.mjs +5 -13
  18. package/fesm2022/button-toggle.mjs.map +1 -1
  19. package/fesm2022/button.mjs +6 -14
  20. package/fesm2022/button.mjs.map +1 -1
  21. package/fesm2022/checkbox.mjs +10 -19
  22. package/fesm2022/checkbox.mjs.map +1 -1
  23. package/fesm2022/core.mjs +1 -2
  24. package/fesm2022/core.mjs.map +1 -1
  25. package/fesm2022/date-formats.mjs +2 -10
  26. package/fesm2022/date-formats.mjs.map +1 -1
  27. package/fesm2022/datepicker.mjs +26 -178
  28. package/fesm2022/datepicker.mjs.map +1 -1
  29. package/fesm2022/dialog/testing.mjs +5 -5
  30. package/fesm2022/dialog.mjs +882 -114
  31. package/fesm2022/dialog.mjs.map +1 -1
  32. package/fesm2022/expansion.mjs +1 -103
  33. package/fesm2022/expansion.mjs.map +1 -1
  34. package/fesm2022/form-field.mjs +37 -49
  35. package/fesm2022/form-field.mjs.map +1 -1
  36. package/fesm2022/icon-registry.mjs +2 -29
  37. package/fesm2022/icon-registry.mjs.map +1 -1
  38. package/fesm2022/icon.mjs +11 -17
  39. package/fesm2022/icon.mjs.map +1 -1
  40. package/fesm2022/input.mjs +1 -1
  41. package/fesm2022/menu.mjs +5 -152
  42. package/fesm2022/menu.mjs.map +1 -1
  43. package/fesm2022/paginator.mjs +7 -27
  44. package/fesm2022/paginator.mjs.map +1 -1
  45. package/fesm2022/progress-bar.mjs +13 -16
  46. package/fesm2022/progress-bar.mjs.map +1 -1
  47. package/fesm2022/progress-spinner.mjs +2 -10
  48. package/fesm2022/progress-spinner.mjs.map +1 -1
  49. package/fesm2022/radio.mjs +4 -12
  50. package/fesm2022/radio.mjs.map +1 -1
  51. package/fesm2022/ripple.mjs +2 -2
  52. package/fesm2022/ripple.mjs.map +1 -1
  53. package/fesm2022/select.mjs +1293 -90
  54. package/fesm2022/select.mjs.map +1 -1
  55. package/fesm2022/sidenav.mjs +2 -88
  56. package/fesm2022/sidenav.mjs.map +1 -1
  57. package/fesm2022/snack-bar.mjs +2 -80
  58. package/fesm2022/snack-bar.mjs.map +1 -1
  59. package/fesm2022/sort.mjs +3 -329
  60. package/fesm2022/sort.mjs.map +1 -1
  61. package/fesm2022/stepper.mjs +4 -171
  62. package/fesm2022/stepper.mjs.map +1 -1
  63. package/fesm2022/tabs.mjs +8 -153
  64. package/fesm2022/tabs.mjs.map +1 -1
  65. package/fesm2022/tooltip.mjs +21 -53
  66. package/fesm2022/tooltip.mjs.map +1 -1
  67. package/fesm2022/tooltip2.mjs +6 -33
  68. package/fesm2022/tooltip2.mjs.map +1 -1
  69. package/form-field/index.d.ts +1 -11
  70. package/icon/index.d.ts +2 -2
  71. package/icon-module.d.d.ts +1 -7
  72. package/icon-registry.d.d.ts +2 -18
  73. package/menu/index.d.ts +1 -42
  74. package/package.json +2 -2
  75. package/paginator/index.d.ts +3 -3
  76. package/paginator.d.d.ts +2 -18
  77. package/progress-bar/index.d.ts +1 -7
  78. package/progress-spinner/index.d.ts +1 -1
  79. package/progress-spinner.d.d.ts +3 -9
  80. package/radio/index.d.ts +1 -7
  81. package/ripple.d.d.ts +3 -3
  82. package/schematics/ng-add/index.js +1 -1
  83. package/select/index.d.ts +439 -27
  84. package/sidenav/index.d.ts +1 -17
  85. package/snack-bar/index.d.ts +1 -17
  86. package/sort/index.d.ts +2 -33
  87. package/stepper/index.d.ts +2 -29
  88. package/tabs/index.d.ts +1 -18
  89. package/tooltip/index.d.ts +302 -16
  90. package/fesm2022/dialog-module.mjs +0 -891
  91. package/fesm2022/dialog-module.mjs.map +0 -1
  92. package/fesm2022/form-field-module.mjs +0 -39
  93. package/fesm2022/form-field-module.mjs.map +0 -1
  94. package/fesm2022/select-module.mjs +0 -1318
  95. package/fesm2022/select-module.mjs.map +0 -1
  96. package/fesm2022/tooltip-module.mjs +0 -24
  97. package/fesm2022/tooltip-module.mjs.map +0 -1
  98. package/select-module.d.d.ts +0 -456
  99. package/tooltip-module.d.d.ts +0 -329
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, inject, ElementRef, NgZone, EventEmitter, Injector, Renderer2, afterNextRender, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, Optional, SkipSelf, InjectionToken, ChangeDetectorRef, ViewChild, ViewContainerRef, DOCUMENT, booleanAttribute, Directive, forwardRef, signal, HostAttributeToken, ContentChild, TemplateRef, NgModule } from '@angular/core';
2
+ import { Injectable, inject, ElementRef, NgZone, EventEmitter, Injector, Renderer2, afterNextRender, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, InjectionToken, ChangeDetectorRef, ViewChild, ViewContainerRef, DOCUMENT, booleanAttribute, Directive, forwardRef, signal, HostAttributeToken, ContentChild, TemplateRef, NgModule } from '@angular/core';
3
3
  import { Subject, Subscription, merge, of } from 'rxjs';
4
4
  import { DateAdapter, MAT_DATE_FORMATS } from './date-formats.mjs';
5
5
  import { _IdGenerator, CdkMonitorFocus, CdkTrapFocus, A11yModule } from '@angular/cdk/a11y';
@@ -809,43 +809,27 @@ class MatRangeDateSelectionModel extends MatDateSelectionModel {
809
809
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatRangeDateSelectionModel, decorators: [{
810
810
  type: Injectable
811
811
  }], ctorParameters: () => [{ type: DateAdapter }] });
812
- /**
813
- * @docs-private
814
- * @deprecated No longer used, will be removed.
815
- * @breaking-change 21.0.0
816
- */
817
- function MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY(parent, adapter) {
818
- return parent || new MatSingleDateSelectionModel(adapter);
819
- }
820
812
  /**
821
813
  * Used to provide a single selection model to a component.
822
814
  * @docs-private
823
- * @deprecated No longer used, will be removed.
824
- * @breaking-change 21.0.0
825
815
  */
826
816
  const MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER = {
827
817
  provide: MatDateSelectionModel,
828
- deps: [[new Optional(), new SkipSelf(), MatDateSelectionModel], DateAdapter],
829
- useFactory: MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY,
818
+ useFactory: () => {
819
+ const parent = inject(MatDateSelectionModel, { optional: true, skipSelf: true });
820
+ return parent || new MatSingleDateSelectionModel(inject(DateAdapter));
821
+ },
830
822
  };
831
- /**
832
- * @docs-private
833
- * @deprecated No longer used, will be removed.
834
- * @breaking-change 21.0.0
835
- */
836
- function MAT_RANGE_DATE_SELECTION_MODEL_FACTORY(parent, adapter) {
837
- return parent || new MatRangeDateSelectionModel(adapter);
838
- }
839
823
  /**
840
824
  * Used to provide a range selection model to a component.
841
825
  * @docs-private
842
- * @deprecated No longer used, will be removed.
843
- * @breaking-change 21.0.0
844
826
  */
845
827
  const MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER = {
846
828
  provide: MatDateSelectionModel,
847
- deps: [[new Optional(), new SkipSelf(), MatDateSelectionModel], DateAdapter],
848
- useFactory: MAT_RANGE_DATE_SELECTION_MODEL_FACTORY,
829
+ useFactory: () => {
830
+ const parent = inject(MatDateSelectionModel, { optional: true, skipSelf: true });
831
+ return parent || new MatRangeDateSelectionModel(inject(DateAdapter));
832
+ },
849
833
  };
850
834
 
851
835
  /** Injection token used to customize the date range selection behavior. */
@@ -923,24 +907,6 @@ class DefaultMatCalendarRangeStrategy {
923
907
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: DefaultMatCalendarRangeStrategy, decorators: [{
924
908
  type: Injectable
925
909
  }], ctorParameters: () => [{ type: DateAdapter }] });
926
- /**
927
- * @docs-private
928
- * @deprecated No longer used, will be removed.
929
- * @breaking-change 21.0.0
930
- */
931
- function MAT_CALENDAR_RANGE_STRATEGY_PROVIDER_FACTORY(parent, adapter) {
932
- return parent || new DefaultMatCalendarRangeStrategy(adapter);
933
- }
934
- /**
935
- * @docs-private
936
- * @deprecated No longer used, will be removed.
937
- * @breaking-change 21.0.0
938
- */
939
- const MAT_CALENDAR_RANGE_STRATEGY_PROVIDER = {
940
- provide: MAT_DATE_RANGE_SELECTION_STRATEGY,
941
- deps: [[new Optional(), new SkipSelf(), MAT_DATE_RANGE_SELECTION_STRATEGY], DateAdapter],
942
- useFactory: MAT_CALENDAR_RANGE_STRATEGY_PROVIDER_FACTORY,
943
- };
944
910
 
945
911
  const DAYS_PER_WEEK = 7;
946
912
  let uniqueIdCounter = 0;
@@ -2504,25 +2470,6 @@ const MAT_DATEPICKER_SCROLL_STRATEGY = new InjectionToken('mat-datepicker-scroll
2504
2470
  return () => createRepositionScrollStrategy(injector);
2505
2471
  },
2506
2472
  });
2507
- /**
2508
- * @docs-private
2509
- * @deprecated No longer used, will be removed.
2510
- * @breaking-change 21.0.0
2511
- */
2512
- function MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY(_overlay) {
2513
- const injector = inject(Injector);
2514
- return () => createRepositionScrollStrategy(injector);
2515
- }
2516
- /**
2517
- * @docs-private
2518
- * @deprecated No longer used, will be removed.
2519
- * @breaking-change 21.0.0
2520
- */
2521
- const MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER = {
2522
- provide: MAT_DATEPICKER_SCROLL_STRATEGY,
2523
- deps: [],
2524
- useFactory: MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY,
2525
- };
2526
2473
  /**
2527
2474
  * Component used as the content for the datepicker overlay. We use this instead of using
2528
2475
  * MatCalendar directly as the content so we can control the initial focus. This also gives us a
@@ -4595,7 +4542,13 @@ class MatDateRangePicker extends MatDatepickerBase {
4595
4542
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatDateRangePicker, deps: null, target: i0.ɵɵFactoryTarget.Component });
4596
4543
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.0-next.2", type: MatDateRangePicker, isStandalone: true, selector: "mat-date-range-picker", providers: [
4597
4544
  MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER,
4598
- MAT_CALENDAR_RANGE_STRATEGY_PROVIDER,
4545
+ {
4546
+ provide: MAT_DATE_RANGE_SELECTION_STRATEGY,
4547
+ useFactory: () => {
4548
+ const parent = inject(MAT_DATE_RANGE_SELECTION_STRATEGY, { optional: true, skipSelf: true });
4549
+ return parent || new DefaultMatCalendarRangeStrategy(inject(DateAdapter));
4550
+ },
4551
+ },
4599
4552
  { provide: MatDatepickerBase, useExisting: MatDateRangePicker },
4600
4553
  ], exportAs: ["matDateRangePicker"], usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
4601
4554
  }
@@ -4609,7 +4562,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2",
4609
4562
  encapsulation: ViewEncapsulation.None,
4610
4563
  providers: [
4611
4564
  MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER,
4612
- MAT_CALENDAR_RANGE_STRATEGY_PROVIDER,
4565
+ {
4566
+ provide: MAT_DATE_RANGE_SELECTION_STRATEGY,
4567
+ useFactory: () => {
4568
+ const parent = inject(MAT_DATE_RANGE_SELECTION_STRATEGY, { optional: true, skipSelf: true });
4569
+ return parent || new DefaultMatCalendarRangeStrategy(inject(DateAdapter));
4570
+ },
4571
+ },
4613
4572
  { provide: MatDatepickerBase, useExisting: MatDateRangePicker },
4614
4573
  ],
4615
4574
  }]
@@ -4734,7 +4693,7 @@ class MatDatepickerModule {
4734
4693
  MatDatepickerActions,
4735
4694
  MatDatepickerCancel,
4736
4695
  MatDatepickerApply] });
4737
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatDatepickerModule, providers: [MatDatepickerIntl, MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [MatButtonModule,
4696
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatDatepickerModule, providers: [MatDatepickerIntl], imports: [MatButtonModule,
4738
4697
  OverlayModule,
4739
4698
  A11yModule,
4740
4699
  PortalModule,
@@ -4792,120 +4751,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2",
4792
4751
  MatDatepickerCancel,
4793
4752
  MatDatepickerApply,
4794
4753
  ],
4795
- providers: [MatDatepickerIntl, MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER],
4754
+ providers: [MatDatepickerIntl],
4796
4755
  }]
4797
4756
  }] });
4798
4757
 
4799
- /**
4800
- * Animations used by the Material datepicker.
4801
- * @docs-private
4802
- * @deprecated No longer used, will be removed.
4803
- * @breaking-change 21.0.0
4804
- */
4805
- const matDatepickerAnimations = {
4806
- // Represents:
4807
- // trigger('transformPanel', [
4808
- // transition(
4809
- // 'void => enter-dropdown',
4810
- // animate(
4811
- // '120ms cubic-bezier(0, 0, 0.2, 1)',
4812
- // keyframes([
4813
- // style({opacity: 0, transform: 'scale(1, 0.8)'}),
4814
- // style({opacity: 1, transform: 'scale(1, 1)'}),
4815
- // ]),
4816
- // ),
4817
- // ),
4818
- // transition(
4819
- // 'void => enter-dialog',
4820
- // animate(
4821
- // '150ms cubic-bezier(0, 0, 0.2, 1)',
4822
- // keyframes([
4823
- // style({opacity: 0, transform: 'scale(0.7)'}),
4824
- // style({transform: 'none', opacity: 1}),
4825
- // ]),
4826
- // ),
4827
- // ),
4828
- // transition('* => void', animate('100ms linear', style({opacity: 0}))),
4829
- // ])
4830
- /** Transforms the height of the datepicker's calendar. */
4831
- transformPanel: {
4832
- type: 7,
4833
- name: 'transformPanel',
4834
- definitions: [
4835
- {
4836
- type: 1,
4837
- expr: 'void => enter-dropdown',
4838
- animation: {
4839
- type: 4,
4840
- styles: {
4841
- type: 5,
4842
- steps: [
4843
- { type: 6, styles: { opacity: 0, transform: 'scale(1, 0.8)' }, offset: null },
4844
- { type: 6, styles: { opacity: 1, transform: 'scale(1, 1)' }, offset: null },
4845
- ],
4846
- },
4847
- timings: '120ms cubic-bezier(0, 0, 0.2, 1)',
4848
- },
4849
- options: null,
4850
- },
4851
- {
4852
- type: 1,
4853
- expr: 'void => enter-dialog',
4854
- animation: {
4855
- type: 4,
4856
- styles: {
4857
- type: 5,
4858
- steps: [
4859
- { type: 6, styles: { opacity: 0, transform: 'scale(0.7)' }, offset: null },
4860
- { type: 6, styles: { transform: 'none', opacity: 1 }, offset: null },
4861
- ],
4862
- },
4863
- timings: '150ms cubic-bezier(0, 0, 0.2, 1)',
4864
- },
4865
- options: null,
4866
- },
4867
- {
4868
- type: 1,
4869
- expr: '* => void',
4870
- animation: {
4871
- type: 4,
4872
- styles: { type: 6, styles: { opacity: 0 }, offset: null },
4873
- timings: '100ms linear',
4874
- },
4875
- options: null,
4876
- },
4877
- ],
4878
- options: {},
4879
- },
4880
- // Represents:
4881
- // trigger('fadeInCalendar', [
4882
- // state('void', style({opacity: 0})),
4883
- // state('enter', style({opacity: 1})),
4884
- // // TODO(crisbeto): this animation should be removed since it isn't quite on spec, but we
4885
- // // need to keep it until #12440 gets in, otherwise the exit animation will look glitchy.
4886
- // transition('void => *', animate('120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)')),
4887
- // ])
4888
- /** Fades in the content of the calendar. */
4889
- fadeInCalendar: {
4890
- type: 7,
4891
- name: 'fadeInCalendar',
4892
- definitions: [
4893
- { type: 0, name: 'void', styles: { type: 6, styles: { opacity: 0 }, offset: null } },
4894
- { type: 0, name: 'enter', styles: { type: 6, styles: { opacity: 1 }, offset: null } },
4895
- {
4896
- type: 1,
4897
- expr: 'void => *',
4898
- animation: {
4899
- type: 4,
4900
- styles: null,
4901
- timings: '120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)',
4902
- },
4903
- options: null,
4904
- },
4905
- ],
4906
- options: {},
4907
- },
4908
- };
4909
-
4910
- export { DateRange, DefaultMatCalendarRangeStrategy, MAT_DATEPICKER_SCROLL_STRATEGY, MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY, MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER, MAT_DATEPICKER_VALIDATORS, MAT_DATEPICKER_VALUE_ACCESSOR, MAT_DATE_RANGE_SELECTION_STRATEGY, MAT_RANGE_DATE_SELECTION_MODEL_FACTORY, MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER, MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY, MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER, MatCalendar, MatCalendarBody, MatCalendarCell, MatCalendarHeader, MatDateRangeInput, MatDateRangePicker, MatDateSelectionModel, MatDatepicker, MatDatepickerActions, MatDatepickerApply, MatDatepickerCancel, MatDatepickerContent, MatDatepickerInput, MatDatepickerInputEvent, MatDatepickerIntl, MatDatepickerModule, MatDatepickerToggle, MatDatepickerToggleIcon, MatEndDate, MatMonthView, MatMultiYearView, MatRangeDateSelectionModel, MatSingleDateSelectionModel, MatStartDate, MatYearView, matDatepickerAnimations, yearsPerPage, yearsPerRow };
4758
+ export { DateRange, DefaultMatCalendarRangeStrategy, MAT_DATEPICKER_SCROLL_STRATEGY, MAT_DATEPICKER_VALIDATORS, MAT_DATEPICKER_VALUE_ACCESSOR, MAT_DATE_RANGE_SELECTION_STRATEGY, MatCalendar, MatCalendarBody, MatCalendarCell, MatCalendarHeader, MatDateRangeInput, MatDateRangePicker, MatDateSelectionModel, MatDatepicker, MatDatepickerActions, MatDatepickerApply, MatDatepickerCancel, MatDatepickerContent, MatDatepickerInput, MatDatepickerInputEvent, MatDatepickerIntl, MatDatepickerModule, MatDatepickerToggle, MatDatepickerToggleIcon, MatEndDate, MatMonthView, MatMultiYearView, MatRangeDateSelectionModel, MatSingleDateSelectionModel, MatStartDate, MatYearView, yearsPerPage, yearsPerRow };
4911
4759
  //# sourceMappingURL=datepicker.mjs.map