@angular/material 13.2.2 → 13.2.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 (104) hide show
  1. package/autocomplete/autocomplete-trigger.d.ts +1 -0
  2. package/button-toggle/_button-toggle-theme.scss +14 -2
  3. package/checkbox/_checkbox-theme.scss +7 -1
  4. package/core/datetime/index.d.ts +1 -2
  5. package/core/ripple/index.d.ts +1 -2
  6. package/core/theming/_theming.scss +9 -0
  7. package/esm2020/autocomplete/autocomplete-trigger.mjs +19 -6
  8. package/esm2020/button-toggle/button-toggle.mjs +2 -2
  9. package/esm2020/checkbox/checkbox.mjs +4 -2
  10. package/esm2020/core/datetime/index.mjs +3 -5
  11. package/esm2020/core/ripple/index.mjs +4 -5
  12. package/esm2020/core/version.mjs +1 -1
  13. package/esm2020/datepicker/calendar.mjs +9 -9
  14. package/esm2020/datepicker/datepicker-input-base.mjs +9 -4
  15. package/esm2020/dialog/dialog.mjs +2 -2
  16. package/esm2020/form-field/form-field.mjs +3 -3
  17. package/esm2020/menu/menu-item.mjs +5 -1
  18. package/esm2020/menu/menu-trigger.mjs +15 -6
  19. package/esm2020/menu/menu.mjs +30 -9
  20. package/esm2020/progress-spinner/progress-spinner-module.mjs +5 -5
  21. package/esm2020/progress-spinner/progress-spinner.mjs +8 -48
  22. package/esm2020/progress-spinner/public-api.mjs +10 -2
  23. package/esm2020/radio/radio.mjs +3 -3
  24. package/esm2020/select/select.mjs +3 -3
  25. package/esm2020/sidenav/drawer.mjs +3 -3
  26. package/esm2020/sidenav/sidenav-module.mjs +4 -5
  27. package/esm2020/sidenav/sidenav.mjs +3 -3
  28. package/esm2020/sort/sort-header.mjs +4 -4
  29. package/esm2020/tabs/tab-body.mjs +3 -3
  30. package/esm2020/tabs/tab-header.mjs +3 -3
  31. package/esm2020/tooltip/tooltip.mjs +30 -7
  32. package/fesm2015/autocomplete.mjs +19 -6
  33. package/fesm2015/autocomplete.mjs.map +1 -1
  34. package/fesm2015/button-toggle.mjs +2 -2
  35. package/fesm2015/checkbox.mjs +3 -1
  36. package/fesm2015/checkbox.mjs.map +1 -1
  37. package/fesm2015/core.mjs +7 -8
  38. package/fesm2015/core.mjs.map +1 -1
  39. package/fesm2015/datepicker.mjs +15 -10
  40. package/fesm2015/datepicker.mjs.map +1 -1
  41. package/fesm2015/dialog.mjs +1 -1
  42. package/fesm2015/dialog.mjs.map +1 -1
  43. package/fesm2015/form-field.mjs +2 -2
  44. package/fesm2015/form-field.mjs.map +1 -1
  45. package/fesm2015/menu.mjs +47 -11
  46. package/fesm2015/menu.mjs.map +1 -1
  47. package/fesm2015/progress-spinner.mjs +22 -57
  48. package/fesm2015/progress-spinner.mjs.map +1 -1
  49. package/fesm2015/radio.mjs +2 -2
  50. package/fesm2015/radio.mjs.map +1 -1
  51. package/fesm2015/select.mjs +2 -2
  52. package/fesm2015/select.mjs.map +1 -1
  53. package/fesm2015/sidenav.mjs +8 -9
  54. package/fesm2015/sidenav.mjs.map +1 -1
  55. package/fesm2015/sort.mjs +3 -3
  56. package/fesm2015/sort.mjs.map +1 -1
  57. package/fesm2015/tabs.mjs +4 -4
  58. package/fesm2015/tabs.mjs.map +1 -1
  59. package/fesm2015/tooltip.mjs +31 -6
  60. package/fesm2015/tooltip.mjs.map +1 -1
  61. package/fesm2020/autocomplete.mjs +19 -6
  62. package/fesm2020/autocomplete.mjs.map +1 -1
  63. package/fesm2020/button-toggle.mjs +2 -2
  64. package/fesm2020/checkbox.mjs +3 -1
  65. package/fesm2020/checkbox.mjs.map +1 -1
  66. package/fesm2020/core.mjs +7 -8
  67. package/fesm2020/core.mjs.map +1 -1
  68. package/fesm2020/datepicker.mjs +15 -10
  69. package/fesm2020/datepicker.mjs.map +1 -1
  70. package/fesm2020/dialog.mjs +1 -1
  71. package/fesm2020/dialog.mjs.map +1 -1
  72. package/fesm2020/form-field.mjs +2 -2
  73. package/fesm2020/form-field.mjs.map +1 -1
  74. package/fesm2020/menu.mjs +45 -11
  75. package/fesm2020/menu.mjs.map +1 -1
  76. package/fesm2020/progress-spinner.mjs +22 -55
  77. package/fesm2020/progress-spinner.mjs.map +1 -1
  78. package/fesm2020/radio.mjs +2 -2
  79. package/fesm2020/radio.mjs.map +1 -1
  80. package/fesm2020/select.mjs +2 -2
  81. package/fesm2020/select.mjs.map +1 -1
  82. package/fesm2020/sidenav.mjs +8 -9
  83. package/fesm2020/sidenav.mjs.map +1 -1
  84. package/fesm2020/sort.mjs +3 -3
  85. package/fesm2020/sort.mjs.map +1 -1
  86. package/fesm2020/tabs.mjs +4 -4
  87. package/fesm2020/tabs.mjs.map +1 -1
  88. package/fesm2020/tooltip.mjs +29 -6
  89. package/fesm2020/tooltip.mjs.map +1 -1
  90. package/menu/menu-item.d.ts +3 -2
  91. package/menu/menu-trigger.d.ts +7 -1
  92. package/menu/menu.d.ts +7 -2
  93. package/package.json +2 -2
  94. package/prebuilt-themes/deeppurple-amber.css +1 -1
  95. package/prebuilt-themes/indigo-pink.css +1 -1
  96. package/prebuilt-themes/pink-bluegrey.css +1 -1
  97. package/prebuilt-themes/purple-green.css +1 -1
  98. package/progress-spinner/progress-spinner-module.d.ts +1 -1
  99. package/progress-spinner/progress-spinner.d.ts +1 -18
  100. package/progress-spinner/public-api.d.ts +8 -1
  101. package/schematics/ng-add/index.js +1 -1
  102. package/schematics/ng-add/index.mjs +1 -1
  103. package/sidenav/sidenav-module.d.ts +2 -3
  104. package/tooltip/tooltip.d.ts +13 -1
@@ -1,11 +1,11 @@
1
- import * as i0 from '@angular/core';
2
- import { InjectionToken, Component, ChangeDetectionStrategy, ViewEncapsulation, Optional, Inject, Input, NgModule } from '@angular/core';
3
- import * as i3 from '@angular/common';
4
- import { DOCUMENT, CommonModule } from '@angular/common';
5
- import { mixinColor, MatCommonModule } from '@angular/material/core';
6
1
  import { coerceNumberProperty } from '@angular/cdk/coercion';
7
2
  import * as i1 from '@angular/cdk/platform';
8
3
  import { _getShadowRoot } from '@angular/cdk/platform';
4
+ import * as i3 from '@angular/common';
5
+ import { DOCUMENT, CommonModule } from '@angular/common';
6
+ import * as i0 from '@angular/core';
7
+ import { InjectionToken, Component, ChangeDetectionStrategy, ViewEncapsulation, Optional, Inject, Input, NgModule } from '@angular/core';
8
+ import { mixinColor, MatCommonModule } from '@angular/material/core';
9
9
  import { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';
10
10
  import { Subscription } from 'rxjs';
11
11
  import * as i2 from '@angular/cdk/scrolling';
@@ -97,6 +97,9 @@ class MatProgressSpinner extends _MatProgressSpinnerBase {
97
97
  }
98
98
  this._noopAnimations =
99
99
  animationMode === 'NoopAnimations' && !!defaults && !defaults._forceAnimations;
100
+ if (elementRef.nativeElement.nodeName.toLowerCase() === 'mat-spinner') {
101
+ this.mode = 'indeterminate';
102
+ }
100
103
  if (defaults) {
101
104
  if (defaults.diameter) {
102
105
  this.diameter = defaults.diameter;
@@ -235,12 +238,13 @@ class MatProgressSpinner extends _MatProgressSpinnerBase {
235
238
  */
236
239
  MatProgressSpinner._diameters = new WeakMap();
237
240
  MatProgressSpinner.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatProgressSpinner, deps: [{ token: i0.ElementRef }, { token: i1.Platform }, { token: DOCUMENT, optional: true }, { token: ANIMATION_MODULE_TYPE, optional: true }, { token: MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS }, { token: i0.ChangeDetectorRef }, { token: i2.ViewportRuler }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
238
- MatProgressSpinner.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: MatProgressSpinner, selector: "mat-progress-spinner", inputs: { color: "color", diameter: "diameter", strokeWidth: "strokeWidth", mode: "mode", value: "value" }, host: { attributes: { "role": "progressbar", "tabindex": "-1" }, properties: { "class._mat-animation-noopable": "_noopAnimations", "style.width.px": "diameter", "style.height.px": "diameter", "attr.aria-valuemin": "mode === \"determinate\" ? 0 : null", "attr.aria-valuemax": "mode === \"determinate\" ? 100 : null", "attr.aria-valuenow": "mode === \"determinate\" ? value : null", "attr.mode": "mode" }, classAttribute: "mat-progress-spinner" }, exportAs: ["matProgressSpinner"], usesInheritance: true, ngImport: i0, template: "<!--\n preserveAspectRatio of xMidYMid meet as the center of the viewport is the circle's\n center. The center of the circle will remain at the center of the mat-progress-spinner\n element containing the SVG.\n-->\n<!--\n All children need to be hidden for screen readers in order to support ChromeVox.\n More context in the issue: https://github.com/angular/components/issues/22165.\n-->\n<svg\n [style.width.px]=\"diameter\"\n [style.height.px]=\"diameter\"\n [attr.viewBox]=\"_getViewBox()\"\n preserveAspectRatio=\"xMidYMid meet\"\n focusable=\"false\"\n [ngSwitch]=\"mode === 'indeterminate'\"\n aria-hidden=\"true\"\n #svg>\n\n <!--\n Technically we can reuse the same `circle` element, however Safari has an issue that breaks\n the SVG rendering in determinate mode, after switching between indeterminate and determinate.\n Using a different element avoids the issue. An alternative to this is adding `display: none`\n for a split second and then removing it when switching between modes, but it's hard to know\n for how long to hide the element and it can cause the UI to blink.\n -->\n <circle\n *ngSwitchCase=\"true\"\n cx=\"50%\"\n cy=\"50%\"\n [attr.r]=\"_getCircleRadius()\"\n [style.animation-name]=\"'mat-progress-spinner-stroke-rotate-' + _spinnerAnimationLabel\"\n [style.stroke-dashoffset.px]=\"_getStrokeDashOffset()\"\n [style.stroke-dasharray.px]=\"_getStrokeCircumference()\"\n [style.stroke-width.%]=\"_getCircleStrokeWidth()\"\n [style.transform-origin]=\"_getCircleTransformOrigin(svg)\"></circle>\n\n <circle\n *ngSwitchCase=\"false\"\n cx=\"50%\"\n cy=\"50%\"\n [attr.r]=\"_getCircleRadius()\"\n [style.stroke-dashoffset.px]=\"_getStrokeDashOffset()\"\n [style.stroke-dasharray.px]=\"_getStrokeCircumference()\"\n [style.stroke-width.%]=\"_getCircleStrokeWidth()\"\n [style.transform-origin]=\"_getCircleTransformOrigin(svg)\"></circle>\n</svg>\n", styles: [".mat-progress-spinner{display:block;position:relative;overflow:hidden}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:transparent;transition:stroke-dashoffset 225ms linear}._mat-animation-noopable.mat-progress-spinner circle{transition:none;animation:none}.cdk-high-contrast-active .mat-progress-spinner circle{stroke:CanvasText}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] svg{animation:mat-progress-spinner-linear-rotate 2000ms linear infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] svg{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition-property:stroke;animation-duration:4000ms;animation-timing-function:cubic-bezier(0.35, 0, 0.25, 1);animation-iteration-count:infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition:none;animation:none}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.606171575px;transform:rotate(0)}12.5%{stroke-dashoffset:56.5486677px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.606171575px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.5486677px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.606171575px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.5486677px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.606171575px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.5486677px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(341.5deg)}}\n"], directives: [{ type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
241
+ MatProgressSpinner.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: { color: "color", diameter: "diameter", strokeWidth: "strokeWidth", mode: "mode", value: "value" }, host: { attributes: { "role": "progressbar", "tabindex": "-1" }, properties: { "class._mat-animation-noopable": "_noopAnimations", "style.width.px": "diameter", "style.height.px": "diameter", "attr.aria-valuemin": "mode === \"determinate\" ? 0 : null", "attr.aria-valuemax": "mode === \"determinate\" ? 100 : null", "attr.aria-valuenow": "mode === \"determinate\" ? value : null", "attr.mode": "mode" }, classAttribute: "mat-progress-spinner mat-spinner" }, exportAs: ["matProgressSpinner"], usesInheritance: true, ngImport: i0, template: "<!--\n preserveAspectRatio of xMidYMid meet as the center of the viewport is the circle's\n center. The center of the circle will remain at the center of the mat-progress-spinner\n element containing the SVG.\n-->\n<!--\n All children need to be hidden for screen readers in order to support ChromeVox.\n More context in the issue: https://github.com/angular/components/issues/22165.\n-->\n<svg\n [style.width.px]=\"diameter\"\n [style.height.px]=\"diameter\"\n [attr.viewBox]=\"_getViewBox()\"\n preserveAspectRatio=\"xMidYMid meet\"\n focusable=\"false\"\n [ngSwitch]=\"mode === 'indeterminate'\"\n aria-hidden=\"true\"\n #svg>\n\n <!--\n Technically we can reuse the same `circle` element, however Safari has an issue that breaks\n the SVG rendering in determinate mode, after switching between indeterminate and determinate.\n Using a different element avoids the issue. An alternative to this is adding `display: none`\n for a split second and then removing it when switching between modes, but it's hard to know\n for how long to hide the element and it can cause the UI to blink.\n -->\n <circle\n *ngSwitchCase=\"true\"\n cx=\"50%\"\n cy=\"50%\"\n [attr.r]=\"_getCircleRadius()\"\n [style.animation-name]=\"'mat-progress-spinner-stroke-rotate-' + _spinnerAnimationLabel\"\n [style.stroke-dashoffset.px]=\"_getStrokeDashOffset()\"\n [style.stroke-dasharray.px]=\"_getStrokeCircumference()\"\n [style.stroke-width.%]=\"_getCircleStrokeWidth()\"\n [style.transform-origin]=\"_getCircleTransformOrigin(svg)\"></circle>\n\n <circle\n *ngSwitchCase=\"false\"\n cx=\"50%\"\n cy=\"50%\"\n [attr.r]=\"_getCircleRadius()\"\n [style.stroke-dashoffset.px]=\"_getStrokeDashOffset()\"\n [style.stroke-dasharray.px]=\"_getStrokeCircumference()\"\n [style.stroke-width.%]=\"_getCircleStrokeWidth()\"\n [style.transform-origin]=\"_getCircleTransformOrigin(svg)\"></circle>\n</svg>\n", styles: [".mat-progress-spinner{display:block;position:relative;overflow:hidden}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:transparent;transition:stroke-dashoffset 225ms linear}._mat-animation-noopable.mat-progress-spinner circle{transition:none;animation:none}.cdk-high-contrast-active .mat-progress-spinner circle{stroke:CanvasText}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] svg{animation:mat-progress-spinner-linear-rotate 2000ms linear infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] svg{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition-property:stroke;animation-duration:4000ms;animation-timing-function:cubic-bezier(0.35, 0, 0.25, 1);animation-iteration-count:infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition:none;animation:none}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.606171575px;transform:rotate(0)}12.5%{stroke-dashoffset:56.5486677px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.606171575px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.5486677px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.606171575px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.5486677px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.606171575px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.5486677px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(341.5deg)}}\n"], directives: [{ type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
239
242
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatProgressSpinner, decorators: [{
240
243
  type: Component,
241
- args: [{ selector: 'mat-progress-spinner', exportAs: 'matProgressSpinner', host: {
244
+ args: [{ selector: 'mat-progress-spinner, mat-spinner', exportAs: 'matProgressSpinner', host: {
242
245
  'role': 'progressbar',
243
- 'class': 'mat-progress-spinner',
246
+ // `mat-spinner` is here for backward compatibility.
247
+ 'class': 'mat-progress-spinner mat-spinner',
244
248
  // set tab index to -1 so screen readers will read the aria-label
245
249
  // Note: there is a known issue with JAWS that does not read progressbar aria labels on FireFox
246
250
  'tabindex': '-1',
@@ -276,52 +280,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
276
280
  }], value: [{
277
281
  type: Input
278
282
  }] } });
279
- /**
280
- * `<mat-spinner>` component.
281
- *
282
- * This is a component definition to be used as a convenience reference to create an
283
- * indeterminate `<mat-progress-spinner>` instance.
284
- */
285
- class MatSpinner extends MatProgressSpinner {
286
- constructor(elementRef, platform, document, animationMode, defaults,
287
- /**
288
- * @deprecated `changeDetectorRef`, `viewportRuler` and `ngZone`
289
- * parameters to become required.
290
- * @breaking-change 14.0.0
291
- */
292
- changeDetectorRef, viewportRuler, ngZone) {
293
- super(elementRef, platform, document, animationMode, defaults, changeDetectorRef, viewportRuler, ngZone);
294
- this.mode = 'indeterminate';
295
- }
296
- }
297
- MatSpinner.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatSpinner, deps: [{ token: i0.ElementRef }, { token: i1.Platform }, { token: DOCUMENT, optional: true }, { token: ANIMATION_MODULE_TYPE, optional: true }, { token: MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS }, { token: i0.ChangeDetectorRef }, { token: i2.ViewportRuler }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
298
- MatSpinner.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: MatSpinner, selector: "mat-spinner", inputs: { color: "color" }, host: { attributes: { "role": "progressbar", "mode": "indeterminate" }, properties: { "class._mat-animation-noopable": "_noopAnimations", "style.width.px": "diameter", "style.height.px": "diameter" }, classAttribute: "mat-spinner mat-progress-spinner" }, usesInheritance: true, ngImport: i0, template: "<!--\n preserveAspectRatio of xMidYMid meet as the center of the viewport is the circle's\n center. The center of the circle will remain at the center of the mat-progress-spinner\n element containing the SVG.\n-->\n<!--\n All children need to be hidden for screen readers in order to support ChromeVox.\n More context in the issue: https://github.com/angular/components/issues/22165.\n-->\n<svg\n [style.width.px]=\"diameter\"\n [style.height.px]=\"diameter\"\n [attr.viewBox]=\"_getViewBox()\"\n preserveAspectRatio=\"xMidYMid meet\"\n focusable=\"false\"\n [ngSwitch]=\"mode === 'indeterminate'\"\n aria-hidden=\"true\"\n #svg>\n\n <!--\n Technically we can reuse the same `circle` element, however Safari has an issue that breaks\n the SVG rendering in determinate mode, after switching between indeterminate and determinate.\n Using a different element avoids the issue. An alternative to this is adding `display: none`\n for a split second and then removing it when switching between modes, but it's hard to know\n for how long to hide the element and it can cause the UI to blink.\n -->\n <circle\n *ngSwitchCase=\"true\"\n cx=\"50%\"\n cy=\"50%\"\n [attr.r]=\"_getCircleRadius()\"\n [style.animation-name]=\"'mat-progress-spinner-stroke-rotate-' + _spinnerAnimationLabel\"\n [style.stroke-dashoffset.px]=\"_getStrokeDashOffset()\"\n [style.stroke-dasharray.px]=\"_getStrokeCircumference()\"\n [style.stroke-width.%]=\"_getCircleStrokeWidth()\"\n [style.transform-origin]=\"_getCircleTransformOrigin(svg)\"></circle>\n\n <circle\n *ngSwitchCase=\"false\"\n cx=\"50%\"\n cy=\"50%\"\n [attr.r]=\"_getCircleRadius()\"\n [style.stroke-dashoffset.px]=\"_getStrokeDashOffset()\"\n [style.stroke-dasharray.px]=\"_getStrokeCircumference()\"\n [style.stroke-width.%]=\"_getCircleStrokeWidth()\"\n [style.transform-origin]=\"_getCircleTransformOrigin(svg)\"></circle>\n</svg>\n", styles: [".mat-progress-spinner{display:block;position:relative;overflow:hidden}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:transparent;transition:stroke-dashoffset 225ms linear}._mat-animation-noopable.mat-progress-spinner circle{transition:none;animation:none}.cdk-high-contrast-active .mat-progress-spinner circle{stroke:CanvasText}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] svg{animation:mat-progress-spinner-linear-rotate 2000ms linear infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] svg{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition-property:stroke;animation-duration:4000ms;animation-timing-function:cubic-bezier(0.35, 0, 0.25, 1);animation-iteration-count:infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition:none;animation:none}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.606171575px;transform:rotate(0)}12.5%{stroke-dashoffset:56.5486677px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.606171575px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.5486677px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.606171575px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.5486677px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.606171575px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.5486677px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(341.5deg)}}\n"], directives: [{ type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
299
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatSpinner, decorators: [{
300
- type: Component,
301
- args: [{ selector: 'mat-spinner', host: {
302
- 'role': 'progressbar',
303
- 'mode': 'indeterminate',
304
- 'class': 'mat-spinner mat-progress-spinner',
305
- '[class._mat-animation-noopable]': `_noopAnimations`,
306
- '[style.width.px]': 'diameter',
307
- '[style.height.px]': 'diameter',
308
- }, inputs: ['color'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<!--\n preserveAspectRatio of xMidYMid meet as the center of the viewport is the circle's\n center. The center of the circle will remain at the center of the mat-progress-spinner\n element containing the SVG.\n-->\n<!--\n All children need to be hidden for screen readers in order to support ChromeVox.\n More context in the issue: https://github.com/angular/components/issues/22165.\n-->\n<svg\n [style.width.px]=\"diameter\"\n [style.height.px]=\"diameter\"\n [attr.viewBox]=\"_getViewBox()\"\n preserveAspectRatio=\"xMidYMid meet\"\n focusable=\"false\"\n [ngSwitch]=\"mode === 'indeterminate'\"\n aria-hidden=\"true\"\n #svg>\n\n <!--\n Technically we can reuse the same `circle` element, however Safari has an issue that breaks\n the SVG rendering in determinate mode, after switching between indeterminate and determinate.\n Using a different element avoids the issue. An alternative to this is adding `display: none`\n for a split second and then removing it when switching between modes, but it's hard to know\n for how long to hide the element and it can cause the UI to blink.\n -->\n <circle\n *ngSwitchCase=\"true\"\n cx=\"50%\"\n cy=\"50%\"\n [attr.r]=\"_getCircleRadius()\"\n [style.animation-name]=\"'mat-progress-spinner-stroke-rotate-' + _spinnerAnimationLabel\"\n [style.stroke-dashoffset.px]=\"_getStrokeDashOffset()\"\n [style.stroke-dasharray.px]=\"_getStrokeCircumference()\"\n [style.stroke-width.%]=\"_getCircleStrokeWidth()\"\n [style.transform-origin]=\"_getCircleTransformOrigin(svg)\"></circle>\n\n <circle\n *ngSwitchCase=\"false\"\n cx=\"50%\"\n cy=\"50%\"\n [attr.r]=\"_getCircleRadius()\"\n [style.stroke-dashoffset.px]=\"_getStrokeDashOffset()\"\n [style.stroke-dasharray.px]=\"_getStrokeCircumference()\"\n [style.stroke-width.%]=\"_getCircleStrokeWidth()\"\n [style.transform-origin]=\"_getCircleTransformOrigin(svg)\"></circle>\n</svg>\n", styles: [".mat-progress-spinner{display:block;position:relative;overflow:hidden}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:transparent;transition:stroke-dashoffset 225ms linear}._mat-animation-noopable.mat-progress-spinner circle{transition:none;animation:none}.cdk-high-contrast-active .mat-progress-spinner circle{stroke:CanvasText}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] svg{animation:mat-progress-spinner-linear-rotate 2000ms linear infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] svg{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition-property:stroke;animation-duration:4000ms;animation-timing-function:cubic-bezier(0.35, 0, 0.25, 1);animation-iteration-count:infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition:none;animation:none}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.606171575px;transform:rotate(0)}12.5%{stroke-dashoffset:56.5486677px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.606171575px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.5486677px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.606171575px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.5486677px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.606171575px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.5486677px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(341.5deg)}}\n"] }]
309
- }], ctorParameters: function () {
310
- return [{ type: i0.ElementRef }, { type: i1.Platform }, { type: undefined, decorators: [{
311
- type: Optional
312
- }, {
313
- type: Inject,
314
- args: [DOCUMENT]
315
- }] }, { type: undefined, decorators: [{
316
- type: Optional
317
- }, {
318
- type: Inject,
319
- args: [ANIMATION_MODULE_TYPE]
320
- }] }, { type: undefined, decorators: [{
321
- type: Inject,
322
- args: [MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS]
323
- }] }, { type: i0.ChangeDetectorRef }, { type: i2.ViewportRuler }, { type: i0.NgZone }];
324
- } });
325
283
 
326
284
  /**
327
285
  * @license
@@ -333,14 +291,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
333
291
  class MatProgressSpinnerModule {
334
292
  }
335
293
  MatProgressSpinnerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatProgressSpinnerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
336
- MatProgressSpinnerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatProgressSpinnerModule, declarations: [MatProgressSpinner, MatSpinner], imports: [MatCommonModule, CommonModule], exports: [MatProgressSpinner, MatSpinner, MatCommonModule] });
294
+ MatProgressSpinnerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatProgressSpinnerModule, declarations: [MatProgressSpinner], imports: [MatCommonModule, CommonModule], exports: [MatProgressSpinner, MatCommonModule] });
337
295
  MatProgressSpinnerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatProgressSpinnerModule, imports: [[MatCommonModule, CommonModule], MatCommonModule] });
338
296
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatProgressSpinnerModule, decorators: [{
339
297
  type: NgModule,
340
298
  args: [{
341
299
  imports: [MatCommonModule, CommonModule],
342
- exports: [MatProgressSpinner, MatSpinner, MatCommonModule],
343
- declarations: [MatProgressSpinner, MatSpinner],
300
+ exports: [MatProgressSpinner, MatCommonModule],
301
+ declarations: [MatProgressSpinner],
344
302
  }]
345
303
  }] });
346
304
 
@@ -351,6 +309,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
351
309
  * Use of this source code is governed by an MIT-style license that can be
352
310
  * found in the LICENSE file at https://angular.io/license
353
311
  */
312
+ /**
313
+ * @deprecated Import `MatProgressSpinner` instead. Note that the
314
+ * `mat-spinner` selector isn't deprecated.
315
+ * @breaking-change 8.0.0
316
+ */
317
+ // tslint:disable-next-line:variable-name
318
+ const MatSpinner = MatProgressSpinner;
354
319
 
355
320
  /**
356
321
  * @license
@@ -1 +1 @@
1
- {"version":3,"file":"progress-spinner.mjs","sources":["../../../../../../src/material/progress-spinner/progress-spinner.ts","../../../../../../src/material/progress-spinner/progress-spinner.html","../../../../../../src/material/progress-spinner/progress-spinner-module.ts","../../../../../../src/material/progress-spinner/public-api.ts","../../../../../../src/material/progress-spinner/index.ts","../../../../../../src/material/progress-spinner/progress-spinner_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceNumberProperty, NumberInput} from '@angular/cdk/coercion';\nimport {Platform, _getShadowRoot} from '@angular/cdk/platform';\nimport {ViewportRuler} from '@angular/cdk/scrolling';\nimport {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Inject,\n InjectionToken,\n Input,\n Optional,\n ViewEncapsulation,\n OnInit,\n ChangeDetectorRef,\n OnDestroy,\n NgZone,\n} from '@angular/core';\nimport {CanColor, mixinColor} from '@angular/material/core';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\nimport {Subscription} from 'rxjs';\n\n/** Possible mode for a progress spinner. */\nexport type ProgressSpinnerMode = 'determinate' | 'indeterminate';\n\n/**\n * Base reference size of the spinner.\n * @docs-private\n */\nconst BASE_SIZE = 100;\n\n/**\n * Base reference stroke width of the spinner.\n * @docs-private\n */\nconst BASE_STROKE_WIDTH = 10;\n\n// Boilerplate for applying mixins to MatProgressSpinner.\n/** @docs-private */\nconst _MatProgressSpinnerBase = mixinColor(\n class {\n constructor(public _elementRef: ElementRef) {}\n },\n 'primary',\n);\n\n/** Default `mat-progress-spinner` options that can be overridden. */\nexport interface MatProgressSpinnerDefaultOptions {\n /** Diameter of the spinner. */\n diameter?: number;\n /** Width of the spinner's stroke. */\n strokeWidth?: number;\n /**\n * Whether the animations should be force to be enabled, ignoring if the current environment is\n * using NoopAnimationsModule.\n */\n _forceAnimations?: boolean;\n}\n\n/** Injection token to be used to override the default options for `mat-progress-spinner`. */\nexport const MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS =\n new InjectionToken<MatProgressSpinnerDefaultOptions>('mat-progress-spinner-default-options', {\n providedIn: 'root',\n factory: MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY,\n });\n\n/** @docs-private */\nexport function MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY(): MatProgressSpinnerDefaultOptions {\n return {diameter: BASE_SIZE};\n}\n\n// .0001 percentage difference is necessary in order to avoid unwanted animation frames\n// for example because the animation duration is 4 seconds, .1% accounts to 4ms\n// which are enough to see the flicker described in\n// https://github.com/angular/components/issues/8984\nconst INDETERMINATE_ANIMATION_TEMPLATE = `\n @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {\n 0% { stroke-dashoffset: START_VALUE; transform: rotate(0); }\n 12.5% { stroke-dashoffset: END_VALUE; transform: rotate(0); }\n 12.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n 25% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n\n 25.0001% { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }\n 37.5% { stroke-dashoffset: END_VALUE; transform: rotate(270deg); }\n 37.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n 50% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n\n 50.0001% { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }\n 62.5% { stroke-dashoffset: END_VALUE; transform: rotate(180deg); }\n 62.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n 75% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n\n 75.0001% { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }\n 87.5% { stroke-dashoffset: END_VALUE; transform: rotate(90deg); }\n 87.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n 100% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n }\n`;\n\n/**\n * `<mat-progress-spinner>` component.\n */\n@Component({\n selector: 'mat-progress-spinner',\n exportAs: 'matProgressSpinner',\n host: {\n 'role': 'progressbar',\n 'class': 'mat-progress-spinner',\n // set tab index to -1 so screen readers will read the aria-label\n // Note: there is a known issue with JAWS that does not read progressbar aria labels on FireFox\n 'tabindex': '-1',\n '[class._mat-animation-noopable]': `_noopAnimations`,\n '[style.width.px]': 'diameter',\n '[style.height.px]': 'diameter',\n '[attr.aria-valuemin]': 'mode === \"determinate\" ? 0 : null',\n '[attr.aria-valuemax]': 'mode === \"determinate\" ? 100 : null',\n '[attr.aria-valuenow]': 'mode === \"determinate\" ? value : null',\n '[attr.mode]': 'mode',\n },\n inputs: ['color'],\n templateUrl: 'progress-spinner.html',\n styleUrls: ['progress-spinner.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatProgressSpinner\n extends _MatProgressSpinnerBase\n implements OnInit, OnDestroy, CanColor\n{\n private _diameter = BASE_SIZE;\n private _value = 0;\n private _strokeWidth: number;\n private _resizeSubscription = Subscription.EMPTY;\n\n /**\n * Element to which we should add the generated style tags for the indeterminate animation.\n * For most elements this is the document, but for the ones in the Shadow DOM we need to\n * use the shadow root.\n */\n private _styleRoot: Node;\n\n /**\n * Tracks diameters of existing instances to de-dupe generated styles (default d = 100).\n * We need to keep track of which elements the diameters were attached to, because for\n * elements in the Shadow DOM the style tags are attached to the shadow root, rather\n * than the document head.\n */\n private static _diameters = new WeakMap<Node, Set<number>>();\n\n /** Whether the _mat-animation-noopable class should be applied, disabling animations. */\n _noopAnimations: boolean;\n\n /** A string that is used for setting the spinner animation-name CSS property */\n _spinnerAnimationLabel: string;\n\n /** The diameter of the progress spinner (will set width and height of svg). */\n @Input()\n get diameter(): number {\n return this._diameter;\n }\n set diameter(size: NumberInput) {\n this._diameter = coerceNumberProperty(size);\n this._spinnerAnimationLabel = this._getSpinnerAnimationLabel();\n\n // If this is set before `ngOnInit`, the style root may not have been resolved yet.\n if (this._styleRoot) {\n this._attachStyleNode();\n }\n }\n\n /** Stroke width of the progress spinner. */\n @Input()\n get strokeWidth(): number {\n return this._strokeWidth || this.diameter / 10;\n }\n set strokeWidth(value: NumberInput) {\n this._strokeWidth = coerceNumberProperty(value);\n }\n\n /** Mode of the progress circle */\n @Input() mode: ProgressSpinnerMode = 'determinate';\n\n /** Value of the progress circle. */\n @Input()\n get value(): number {\n return this.mode === 'determinate' ? this._value : 0;\n }\n set value(newValue: NumberInput) {\n this._value = Math.max(0, Math.min(100, coerceNumberProperty(newValue)));\n }\n\n constructor(\n elementRef: ElementRef<HTMLElement>,\n _platform: Platform,\n @Optional() @Inject(DOCUMENT) private _document: any,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode: string,\n @Inject(MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS)\n defaults?: MatProgressSpinnerDefaultOptions,\n /**\n * @deprecated `changeDetectorRef`, `viewportRuler` and `ngZone`\n * parameters to become required.\n * @breaking-change 14.0.0\n */\n changeDetectorRef?: ChangeDetectorRef,\n viewportRuler?: ViewportRuler,\n ngZone?: NgZone,\n ) {\n super(elementRef);\n\n const trackedDiameters = MatProgressSpinner._diameters;\n this._spinnerAnimationLabel = this._getSpinnerAnimationLabel();\n\n // The base size is already inserted via the component's structural styles. We still\n // need to track it so we don't end up adding the same styles again.\n if (!trackedDiameters.has(_document.head)) {\n trackedDiameters.set(_document.head, new Set<number>([BASE_SIZE]));\n }\n\n this._noopAnimations =\n animationMode === 'NoopAnimations' && !!defaults && !defaults._forceAnimations;\n\n if (defaults) {\n if (defaults.diameter) {\n this.diameter = defaults.diameter;\n }\n\n if (defaults.strokeWidth) {\n this.strokeWidth = defaults.strokeWidth;\n }\n }\n\n // Safari has an issue where the circle isn't positioned correctly when the page has a\n // different zoom level from the default. This handler triggers a recalculation of the\n // `transform-origin` when the page zoom level changes.\n // See `_getCircleTransformOrigin` for more info.\n // @breaking-change 14.0.0 Remove null checks for `_changeDetectorRef`,\n // `viewportRuler` and `ngZone`.\n if (_platform.isBrowser && _platform.SAFARI && viewportRuler && changeDetectorRef && ngZone) {\n this._resizeSubscription = viewportRuler.change(150).subscribe(() => {\n // When the window is resize while the spinner is in `indeterminate` mode, we\n // have to mark for check so the transform origin of the circle can be recomputed.\n if (this.mode === 'indeterminate') {\n ngZone.run(() => changeDetectorRef.markForCheck());\n }\n });\n }\n }\n\n ngOnInit() {\n const element = this._elementRef.nativeElement;\n\n // Note that we need to look up the root node in ngOnInit, rather than the constructor, because\n // Angular seems to create the element outside the shadow root and then moves it inside, if the\n // node is inside an `ngIf` and a ShadowDom-encapsulated component.\n this._styleRoot = _getShadowRoot(element) || this._document.head;\n this._attachStyleNode();\n element.classList.add('mat-progress-spinner-indeterminate-animation');\n }\n\n ngOnDestroy() {\n this._resizeSubscription.unsubscribe();\n }\n\n /** The radius of the spinner, adjusted for stroke width. */\n _getCircleRadius() {\n return (this.diameter - BASE_STROKE_WIDTH) / 2;\n }\n\n /** The view box of the spinner's svg element. */\n _getViewBox() {\n const viewBox = this._getCircleRadius() * 2 + this.strokeWidth;\n return `0 0 ${viewBox} ${viewBox}`;\n }\n\n /** The stroke circumference of the svg circle. */\n _getStrokeCircumference(): number {\n return 2 * Math.PI * this._getCircleRadius();\n }\n\n /** The dash offset of the svg circle. */\n _getStrokeDashOffset() {\n if (this.mode === 'determinate') {\n return (this._getStrokeCircumference() * (100 - this._value)) / 100;\n }\n\n return null;\n }\n\n /** Stroke width of the circle in percent. */\n _getCircleStrokeWidth() {\n return (this.strokeWidth / this.diameter) * 100;\n }\n\n /** Gets the `transform-origin` for the inner circle element. */\n _getCircleTransformOrigin(svg: HTMLElement): string {\n // Safari has an issue where the `transform-origin` doesn't work as expected when the page\n // has a different zoom level from the default. The problem appears to be that a zoom\n // is applied on the `svg` node itself. We can work around it by calculating the origin\n // based on the zoom level. On all other browsers the `currentScale` appears to always be 1.\n const scale = ((svg as unknown as SVGSVGElement).currentScale ?? 1) * 50;\n return `${scale}% ${scale}%`;\n }\n\n /** Dynamically generates a style tag containing the correct animation for this diameter. */\n private _attachStyleNode(): void {\n const styleRoot = this._styleRoot;\n const currentDiameter = this._diameter;\n const diameters = MatProgressSpinner._diameters;\n let diametersForElement = diameters.get(styleRoot);\n\n if (!diametersForElement || !diametersForElement.has(currentDiameter)) {\n const styleTag: HTMLStyleElement = this._document.createElement('style');\n styleTag.setAttribute('mat-spinner-animation', this._spinnerAnimationLabel);\n styleTag.textContent = this._getAnimationText();\n styleRoot.appendChild(styleTag);\n\n if (!diametersForElement) {\n diametersForElement = new Set<number>();\n diameters.set(styleRoot, diametersForElement);\n }\n\n diametersForElement.add(currentDiameter);\n }\n }\n\n /** Generates animation styles adjusted for the spinner's diameter. */\n private _getAnimationText(): string {\n const strokeCircumference = this._getStrokeCircumference();\n return (\n INDETERMINATE_ANIMATION_TEMPLATE\n // Animation should begin at 5% and end at 80%\n .replace(/START_VALUE/g, `${0.95 * strokeCircumference}`)\n .replace(/END_VALUE/g, `${0.2 * strokeCircumference}`)\n .replace(/DIAMETER/g, `${this._spinnerAnimationLabel}`)\n );\n }\n\n /** Returns the circle diameter formatted for use with the animation-name CSS property. */\n private _getSpinnerAnimationLabel(): string {\n // The string of a float point number will include a period ‘.’ character,\n // which is not valid for a CSS animation-name.\n return this.diameter.toString().replace('.', '_');\n }\n}\n\n/**\n * `<mat-spinner>` component.\n *\n * This is a component definition to be used as a convenience reference to create an\n * indeterminate `<mat-progress-spinner>` instance.\n */\n@Component({\n selector: 'mat-spinner',\n host: {\n 'role': 'progressbar',\n 'mode': 'indeterminate',\n 'class': 'mat-spinner mat-progress-spinner',\n '[class._mat-animation-noopable]': `_noopAnimations`,\n '[style.width.px]': 'diameter',\n '[style.height.px]': 'diameter',\n },\n inputs: ['color'],\n templateUrl: 'progress-spinner.html',\n styleUrls: ['progress-spinner.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatSpinner extends MatProgressSpinner {\n constructor(\n elementRef: ElementRef<HTMLElement>,\n platform: Platform,\n @Optional() @Inject(DOCUMENT) document: any,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode: string,\n @Inject(MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS)\n defaults?: MatProgressSpinnerDefaultOptions,\n /**\n * @deprecated `changeDetectorRef`, `viewportRuler` and `ngZone`\n * parameters to become required.\n * @breaking-change 14.0.0\n */\n changeDetectorRef?: ChangeDetectorRef,\n viewportRuler?: ViewportRuler,\n ngZone?: NgZone,\n ) {\n super(\n elementRef,\n platform,\n document,\n animationMode,\n defaults,\n changeDetectorRef,\n viewportRuler,\n ngZone,\n );\n this.mode = 'indeterminate';\n }\n}\n","<!--\n preserveAspectRatio of xMidYMid meet as the center of the viewport is the circle's\n center. The center of the circle will remain at the center of the mat-progress-spinner\n element containing the SVG.\n-->\n<!--\n All children need to be hidden for screen readers in order to support ChromeVox.\n More context in the issue: https://github.com/angular/components/issues/22165.\n-->\n<svg\n [style.width.px]=\"diameter\"\n [style.height.px]=\"diameter\"\n [attr.viewBox]=\"_getViewBox()\"\n preserveAspectRatio=\"xMidYMid meet\"\n focusable=\"false\"\n [ngSwitch]=\"mode === 'indeterminate'\"\n aria-hidden=\"true\"\n #svg>\n\n <!--\n Technically we can reuse the same `circle` element, however Safari has an issue that breaks\n the SVG rendering in determinate mode, after switching between indeterminate and determinate.\n Using a different element avoids the issue. An alternative to this is adding `display: none`\n for a split second and then removing it when switching between modes, but it's hard to know\n for how long to hide the element and it can cause the UI to blink.\n -->\n <circle\n *ngSwitchCase=\"true\"\n cx=\"50%\"\n cy=\"50%\"\n [attr.r]=\"_getCircleRadius()\"\n [style.animation-name]=\"'mat-progress-spinner-stroke-rotate-' + _spinnerAnimationLabel\"\n [style.stroke-dashoffset.px]=\"_getStrokeDashOffset()\"\n [style.stroke-dasharray.px]=\"_getStrokeCircumference()\"\n [style.stroke-width.%]=\"_getCircleStrokeWidth()\"\n [style.transform-origin]=\"_getCircleTransformOrigin(svg)\"></circle>\n\n <circle\n *ngSwitchCase=\"false\"\n cx=\"50%\"\n cy=\"50%\"\n [attr.r]=\"_getCircleRadius()\"\n [style.stroke-dashoffset.px]=\"_getStrokeDashOffset()\"\n [style.stroke-dasharray.px]=\"_getStrokeCircumference()\"\n [style.stroke-width.%]=\"_getCircleStrokeWidth()\"\n [style.transform-origin]=\"_getCircleTransformOrigin(svg)\"></circle>\n</svg>\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MatProgressSpinner, MatSpinner} from './progress-spinner';\n\n@NgModule({\n imports: [MatCommonModule, CommonModule],\n exports: [MatProgressSpinner, MatSpinner, MatCommonModule],\n declarations: [MatProgressSpinner, MatSpinner],\n})\nexport class MatProgressSpinnerModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './progress-spinner-module';\nexport {\n MatProgressSpinner,\n MatSpinner,\n MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS,\n ProgressSpinnerMode,\n MatProgressSpinnerDefaultOptions,\n MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY,\n} from './progress-spinner';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAiC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R,aAAa,EACb,QAAQ,EACR,iBAAiB,EACjB,aAAa,EACb,MAAM,CACP,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;KAC7B;;uGA5BU,UAAU,oEAIC,QAAQ,6BACR,qBAAqB,6BACjC,oCAAoC;2FANnC,UAAU,qWCvXvB,s6DA+CA;2FDwUa,UAAU;kBAhBtB,SAAS;+BACE,aAAa,QACjB;wBACJ,MAAM,EAAE,aAAa;wBACrB,MAAM,EAAE,eAAe;wBACvB,OAAO,EAAE,kCAAkC;wBAC3C,iCAAiC,EAAE,iBAAiB;wBACpD,kBAAkB,EAAE,UAAU;wBAC9B,mBAAmB,EAAE,UAAU;qBAChC,UACO,CAAC,OAAO,CAAC,mBAGA,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI;;;8BAMlC,QAAQ;;8BAAI,MAAM;+BAAC,QAAQ;;8BAC3B,QAAQ;;8BAAI,MAAM;+BAAC,qBAAqB;;8BACxC,MAAM;+BAAC,oCAAoC;;;;AE7XhD;;;;;;;MAiBa,wBAAwB;;qHAAxB,wBAAwB;sHAAxB,wBAAwB,iBAFpB,kBAAkB,EAAE,UAAU,aAFnC,eAAe,EAAE,YAAY,aAC7B,kBAAkB,EAAE,UAAU,EAAE,eAAe;sHAG9C,wBAAwB,YAJ1B,CAAC,eAAe,EAAE,YAAY,CAAC,EACE,eAAe;2FAG9C,wBAAwB;kBALpC,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,eAAe,EAAE,YAAY,CAAC;oBACxC,OAAO,EAAE,CAAC,kBAAkB,EAAE,UAAU,EAAE,eAAe,CAAC;oBAC1D,YAAY,EAAE,CAAC,kBAAkB,EAAE,UAAU,CAAC;iBAC/C;;;AChBD;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"progress-spinner.mjs","sources":["../../../../../../src/material/progress-spinner/progress-spinner.ts","../../../../../../src/material/progress-spinner/progress-spinner.html","../../../../../../src/material/progress-spinner/progress-spinner-module.ts","../../../../../../src/material/progress-spinner/public-api.ts","../../../../../../src/material/progress-spinner/index.ts","../../../../../../src/material/progress-spinner/progress-spinner_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceNumberProperty, NumberInput} from '@angular/cdk/coercion';\nimport {Platform, _getShadowRoot} from '@angular/cdk/platform';\nimport {ViewportRuler} from '@angular/cdk/scrolling';\nimport {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Inject,\n InjectionToken,\n Input,\n Optional,\n ViewEncapsulation,\n OnInit,\n ChangeDetectorRef,\n OnDestroy,\n NgZone,\n} from '@angular/core';\nimport {CanColor, mixinColor} from '@angular/material/core';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\nimport {Subscription} from 'rxjs';\n\n/** Possible mode for a progress spinner. */\nexport type ProgressSpinnerMode = 'determinate' | 'indeterminate';\n\n/**\n * Base reference size of the spinner.\n * @docs-private\n */\nconst BASE_SIZE = 100;\n\n/**\n * Base reference stroke width of the spinner.\n * @docs-private\n */\nconst BASE_STROKE_WIDTH = 10;\n\n// Boilerplate for applying mixins to MatProgressSpinner.\n/** @docs-private */\nconst _MatProgressSpinnerBase = mixinColor(\n class {\n constructor(public _elementRef: ElementRef) {}\n },\n 'primary',\n);\n\n/** Default `mat-progress-spinner` options that can be overridden. */\nexport interface MatProgressSpinnerDefaultOptions {\n /** Diameter of the spinner. */\n diameter?: number;\n /** Width of the spinner's stroke. */\n strokeWidth?: number;\n /**\n * Whether the animations should be force to be enabled, ignoring if the current environment is\n * using NoopAnimationsModule.\n */\n _forceAnimations?: boolean;\n}\n\n/** Injection token to be used to override the default options for `mat-progress-spinner`. */\nexport const MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS =\n new InjectionToken<MatProgressSpinnerDefaultOptions>('mat-progress-spinner-default-options', {\n providedIn: 'root',\n factory: MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY,\n });\n\n/** @docs-private */\nexport function MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY(): MatProgressSpinnerDefaultOptions {\n return {diameter: BASE_SIZE};\n}\n\n// .0001 percentage difference is necessary in order to avoid unwanted animation frames\n// for example because the animation duration is 4 seconds, .1% accounts to 4ms\n// which are enough to see the flicker described in\n// https://github.com/angular/components/issues/8984\nconst INDETERMINATE_ANIMATION_TEMPLATE = `\n @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {\n 0% { stroke-dashoffset: START_VALUE; transform: rotate(0); }\n 12.5% { stroke-dashoffset: END_VALUE; transform: rotate(0); }\n 12.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n 25% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n\n 25.0001% { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }\n 37.5% { stroke-dashoffset: END_VALUE; transform: rotate(270deg); }\n 37.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n 50% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n\n 50.0001% { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }\n 62.5% { stroke-dashoffset: END_VALUE; transform: rotate(180deg); }\n 62.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n 75% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n\n 75.0001% { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }\n 87.5% { stroke-dashoffset: END_VALUE; transform: rotate(90deg); }\n 87.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n 100% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n }\n`;\n\n/**\n * `<mat-progress-spinner>` component.\n */\n@Component({\n selector: 'mat-progress-spinner, mat-spinner',\n exportAs: 'matProgressSpinner',\n host: {\n 'role': 'progressbar',\n // `mat-spinner` is here for backward compatibility.\n 'class': 'mat-progress-spinner mat-spinner',\n // set tab index to -1 so screen readers will read the aria-label\n // Note: there is a known issue with JAWS that does not read progressbar aria labels on FireFox\n 'tabindex': '-1',\n '[class._mat-animation-noopable]': `_noopAnimations`,\n '[style.width.px]': 'diameter',\n '[style.height.px]': 'diameter',\n '[attr.aria-valuemin]': 'mode === \"determinate\" ? 0 : null',\n '[attr.aria-valuemax]': 'mode === \"determinate\" ? 100 : null',\n '[attr.aria-valuenow]': 'mode === \"determinate\" ? value : null',\n '[attr.mode]': 'mode',\n },\n inputs: ['color'],\n templateUrl: 'progress-spinner.html',\n styleUrls: ['progress-spinner.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatProgressSpinner\n extends _MatProgressSpinnerBase\n implements OnInit, OnDestroy, CanColor\n{\n private _diameter = BASE_SIZE;\n private _value = 0;\n private _strokeWidth: number;\n private _resizeSubscription = Subscription.EMPTY;\n\n /**\n * Element to which we should add the generated style tags for the indeterminate animation.\n * For most elements this is the document, but for the ones in the Shadow DOM we need to\n * use the shadow root.\n */\n private _styleRoot: Node;\n\n /**\n * Tracks diameters of existing instances to de-dupe generated styles (default d = 100).\n * We need to keep track of which elements the diameters were attached to, because for\n * elements in the Shadow DOM the style tags are attached to the shadow root, rather\n * than the document head.\n */\n private static _diameters = new WeakMap<Node, Set<number>>();\n\n /** Whether the _mat-animation-noopable class should be applied, disabling animations. */\n _noopAnimations: boolean;\n\n /** A string that is used for setting the spinner animation-name CSS property */\n _spinnerAnimationLabel: string;\n\n /** The diameter of the progress spinner (will set width and height of svg). */\n @Input()\n get diameter(): number {\n return this._diameter;\n }\n set diameter(size: NumberInput) {\n this._diameter = coerceNumberProperty(size);\n this._spinnerAnimationLabel = this._getSpinnerAnimationLabel();\n\n // If this is set before `ngOnInit`, the style root may not have been resolved yet.\n if (this._styleRoot) {\n this._attachStyleNode();\n }\n }\n\n /** Stroke width of the progress spinner. */\n @Input()\n get strokeWidth(): number {\n return this._strokeWidth || this.diameter / 10;\n }\n set strokeWidth(value: NumberInput) {\n this._strokeWidth = coerceNumberProperty(value);\n }\n\n /** Mode of the progress circle */\n @Input() mode: ProgressSpinnerMode = 'determinate';\n\n /** Value of the progress circle. */\n @Input()\n get value(): number {\n return this.mode === 'determinate' ? this._value : 0;\n }\n set value(newValue: NumberInput) {\n this._value = Math.max(0, Math.min(100, coerceNumberProperty(newValue)));\n }\n\n constructor(\n elementRef: ElementRef<HTMLElement>,\n _platform: Platform,\n @Optional() @Inject(DOCUMENT) private _document: any,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode: string,\n @Inject(MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS)\n defaults?: MatProgressSpinnerDefaultOptions,\n /**\n * @deprecated `changeDetectorRef`, `viewportRuler` and `ngZone`\n * parameters to become required.\n * @breaking-change 14.0.0\n */\n changeDetectorRef?: ChangeDetectorRef,\n viewportRuler?: ViewportRuler,\n ngZone?: NgZone,\n ) {\n super(elementRef);\n\n const trackedDiameters = MatProgressSpinner._diameters;\n this._spinnerAnimationLabel = this._getSpinnerAnimationLabel();\n\n // The base size is already inserted via the component's structural styles. We still\n // need to track it so we don't end up adding the same styles again.\n if (!trackedDiameters.has(_document.head)) {\n trackedDiameters.set(_document.head, new Set<number>([BASE_SIZE]));\n }\n\n this._noopAnimations =\n animationMode === 'NoopAnimations' && !!defaults && !defaults._forceAnimations;\n\n if (elementRef.nativeElement.nodeName.toLowerCase() === 'mat-spinner') {\n this.mode = 'indeterminate';\n }\n\n if (defaults) {\n if (defaults.diameter) {\n this.diameter = defaults.diameter;\n }\n\n if (defaults.strokeWidth) {\n this.strokeWidth = defaults.strokeWidth;\n }\n }\n\n // Safari has an issue where the circle isn't positioned correctly when the page has a\n // different zoom level from the default. This handler triggers a recalculation of the\n // `transform-origin` when the page zoom level changes.\n // See `_getCircleTransformOrigin` for more info.\n // @breaking-change 14.0.0 Remove null checks for `_changeDetectorRef`,\n // `viewportRuler` and `ngZone`.\n if (_platform.isBrowser && _platform.SAFARI && viewportRuler && changeDetectorRef && ngZone) {\n this._resizeSubscription = viewportRuler.change(150).subscribe(() => {\n // When the window is resize while the spinner is in `indeterminate` mode, we\n // have to mark for check so the transform origin of the circle can be recomputed.\n if (this.mode === 'indeterminate') {\n ngZone.run(() => changeDetectorRef.markForCheck());\n }\n });\n }\n }\n\n ngOnInit() {\n const element = this._elementRef.nativeElement;\n\n // Note that we need to look up the root node in ngOnInit, rather than the constructor, because\n // Angular seems to create the element outside the shadow root and then moves it inside, if the\n // node is inside an `ngIf` and a ShadowDom-encapsulated component.\n this._styleRoot = _getShadowRoot(element) || this._document.head;\n this._attachStyleNode();\n element.classList.add('mat-progress-spinner-indeterminate-animation');\n }\n\n ngOnDestroy() {\n this._resizeSubscription.unsubscribe();\n }\n\n /** The radius of the spinner, adjusted for stroke width. */\n _getCircleRadius() {\n return (this.diameter - BASE_STROKE_WIDTH) / 2;\n }\n\n /** The view box of the spinner's svg element. */\n _getViewBox() {\n const viewBox = this._getCircleRadius() * 2 + this.strokeWidth;\n return `0 0 ${viewBox} ${viewBox}`;\n }\n\n /** The stroke circumference of the svg circle. */\n _getStrokeCircumference(): number {\n return 2 * Math.PI * this._getCircleRadius();\n }\n\n /** The dash offset of the svg circle. */\n _getStrokeDashOffset() {\n if (this.mode === 'determinate') {\n return (this._getStrokeCircumference() * (100 - this._value)) / 100;\n }\n\n return null;\n }\n\n /** Stroke width of the circle in percent. */\n _getCircleStrokeWidth() {\n return (this.strokeWidth / this.diameter) * 100;\n }\n\n /** Gets the `transform-origin` for the inner circle element. */\n _getCircleTransformOrigin(svg: HTMLElement): string {\n // Safari has an issue where the `transform-origin` doesn't work as expected when the page\n // has a different zoom level from the default. The problem appears to be that a zoom\n // is applied on the `svg` node itself. We can work around it by calculating the origin\n // based on the zoom level. On all other browsers the `currentScale` appears to always be 1.\n const scale = ((svg as unknown as SVGSVGElement).currentScale ?? 1) * 50;\n return `${scale}% ${scale}%`;\n }\n\n /** Dynamically generates a style tag containing the correct animation for this diameter. */\n private _attachStyleNode(): void {\n const styleRoot = this._styleRoot;\n const currentDiameter = this._diameter;\n const diameters = MatProgressSpinner._diameters;\n let diametersForElement = diameters.get(styleRoot);\n\n if (!diametersForElement || !diametersForElement.has(currentDiameter)) {\n const styleTag: HTMLStyleElement = this._document.createElement('style');\n styleTag.setAttribute('mat-spinner-animation', this._spinnerAnimationLabel);\n styleTag.textContent = this._getAnimationText();\n styleRoot.appendChild(styleTag);\n\n if (!diametersForElement) {\n diametersForElement = new Set<number>();\n diameters.set(styleRoot, diametersForElement);\n }\n\n diametersForElement.add(currentDiameter);\n }\n }\n\n /** Generates animation styles adjusted for the spinner's diameter. */\n private _getAnimationText(): string {\n const strokeCircumference = this._getStrokeCircumference();\n return (\n INDETERMINATE_ANIMATION_TEMPLATE\n // Animation should begin at 5% and end at 80%\n .replace(/START_VALUE/g, `${0.95 * strokeCircumference}`)\n .replace(/END_VALUE/g, `${0.2 * strokeCircumference}`)\n .replace(/DIAMETER/g, `${this._spinnerAnimationLabel}`)\n );\n }\n\n /** Returns the circle diameter formatted for use with the animation-name CSS property. */\n private _getSpinnerAnimationLabel(): string {\n // The string of a float point number will include a period ‘.’ character,\n // which is not valid for a CSS animation-name.\n return this.diameter.toString().replace('.', '_');\n }\n}\n","<!--\n preserveAspectRatio of xMidYMid meet as the center of the viewport is the circle's\n center. The center of the circle will remain at the center of the mat-progress-spinner\n element containing the SVG.\n-->\n<!--\n All children need to be hidden for screen readers in order to support ChromeVox.\n More context in the issue: https://github.com/angular/components/issues/22165.\n-->\n<svg\n [style.width.px]=\"diameter\"\n [style.height.px]=\"diameter\"\n [attr.viewBox]=\"_getViewBox()\"\n preserveAspectRatio=\"xMidYMid meet\"\n focusable=\"false\"\n [ngSwitch]=\"mode === 'indeterminate'\"\n aria-hidden=\"true\"\n #svg>\n\n <!--\n Technically we can reuse the same `circle` element, however Safari has an issue that breaks\n the SVG rendering in determinate mode, after switching between indeterminate and determinate.\n Using a different element avoids the issue. An alternative to this is adding `display: none`\n for a split second and then removing it when switching between modes, but it's hard to know\n for how long to hide the element and it can cause the UI to blink.\n -->\n <circle\n *ngSwitchCase=\"true\"\n cx=\"50%\"\n cy=\"50%\"\n [attr.r]=\"_getCircleRadius()\"\n [style.animation-name]=\"'mat-progress-spinner-stroke-rotate-' + _spinnerAnimationLabel\"\n [style.stroke-dashoffset.px]=\"_getStrokeDashOffset()\"\n [style.stroke-dasharray.px]=\"_getStrokeCircumference()\"\n [style.stroke-width.%]=\"_getCircleStrokeWidth()\"\n [style.transform-origin]=\"_getCircleTransformOrigin(svg)\"></circle>\n\n <circle\n *ngSwitchCase=\"false\"\n cx=\"50%\"\n cy=\"50%\"\n [attr.r]=\"_getCircleRadius()\"\n [style.stroke-dashoffset.px]=\"_getStrokeDashOffset()\"\n [style.stroke-dasharray.px]=\"_getStrokeCircumference()\"\n [style.stroke-width.%]=\"_getCircleStrokeWidth()\"\n [style.transform-origin]=\"_getCircleTransformOrigin(svg)\"></circle>\n</svg>\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MatProgressSpinner} from './progress-spinner';\n\n@NgModule({\n imports: [MatCommonModule, CommonModule],\n exports: [MatProgressSpinner, MatCommonModule],\n declarations: [MatProgressSpinner],\n})\nexport class MatProgressSpinnerModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {MatProgressSpinner} from './progress-spinner';\n\nexport * from './progress-spinner-module';\nexport {\n MatProgressSpinner,\n MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS,\n ProgressSpinnerMode,\n MatProgressSpinnerDefaultOptions,\n MAT_PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY,\n} from './progress-spinner';\n\n/**\n * @deprecated Import `MatProgressSpinner` instead. Note that the\n * `mat-spinner` selector isn't deprecated.\n * @breaking-change 8.0.0\n */\n// tslint:disable-next-line:variable-name\nexport const MatSpinner = MatProgressSpinner;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAiCA;;;;AAIA,MAAM,SAAS,GAAG,GAAG,CAAC;AAEtB;;;;AAIA,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAE7B;AACA;AACA,MAAM,uBAAuB,GAAG,UAAU,CACxC;IACE,YAAmB,WAAuB;QAAvB,gBAAW,GAAX,WAAW,CAAY;KAAI;CAC/C,EACD,SAAS,CACV,CAAC;AAeF;MACa,oCAAoC,GAC/C,IAAI,cAAc,CAAmC,sCAAsC,EAAE;IAC3F,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,4CAA4C;CACtD,EAAE;AAEL;SACgB,4CAA4C;IAC1D,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAC,CAAC;AAC/B,CAAC;AAED;AACA;AACA;AACA;AACA,MAAM,gCAAgC,GAAG;;;;;;;;;;;;;;;;;;;;;;CAsBxC,CAAC;AAEF;;;MA2Ba,2BACH,uBAAuB;IAiE/B,YACE,UAAmC,EACnC,SAAmB,EACmB,SAAc,EACT,aAAqB,EAEhE,QAA2C;;;;;;IAM3C,iBAAqC,EACrC,aAA6B,EAC7B,MAAe;QAEf,KAAK,CAAC,UAAU,CAAC,CAAC;QAboB,cAAS,GAAT,SAAS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AsB,EAAE,mCAAmC;wBAC3D,sBAAsB,EAAE,qCAAqC;wBAC7D,sBAAsB,EAAE,uCAAuC;wBAC/D,aAAa,EAAE,MAAM;qBACtB,UACO,CAAC,OAAO,CAAC,mBAGA,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI;;;8BAuElC,QAAQ;;8BAAI,MAAM;+BAAC,QAAQ;;8BAC3B,QAAQ;;8BAAI,MAAM;+BAAC,qBAAqB;;8BACxC,MAAM;+BAAC,oCAAoC;;yBAvC1C,QAAQ;sBADX,KAAK;gBAgBF,WAAW;sBADd,KAAK;gBASG,IAAI;sBAAZ,KAAK;gBAIF,KAAK;sBADR,KAAK;;;AEhMR;;;;;;;MAiBa,wBAAwB;;qHAAxB,wBAAwB;sHAAxB,wBAAwB,iBAFpB,kBAAkB,aAFvB,eAAe,EAAE,YAAY,aAC7B,kBAAkB,EAAE,eAAe;sHAGlC,wBAAwB,YAJ1B,CAAC,eAAe,EAAE,YAAY,CAAC,EACV,eAAe;2FAGlC,wBAAwB;kBALpC,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,eAAe,EAAE,YAAY,CAAC;oBACxC,OAAO,EAAE,CAAC,kBAAkB,EAAE,eAAe,CAAC;oBAC9C,YAAY,EAAE,CAAC,kBAAkB,CAAC;iBACnC;;;AChBD;;;;;;;AAmBA;;;;;AAKA;MACa,UAAU,GAAG;;ACzB1B;;;;;;;;ACAA;;;;;;"}
@@ -534,7 +534,7 @@ class MatRadioButton extends _MatRadioButtonBase {
534
534
  }
535
535
  }
536
536
  MatRadioButton.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatRadioButton, deps: [{ token: MAT_RADIO_GROUP, optional: true }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.FocusMonitor }, { token: i2.UniqueSelectionDispatcher }, { token: ANIMATION_MODULE_TYPE, optional: true }, { token: MAT_RADIO_DEFAULT_OPTIONS, optional: true }, { token: 'tabindex', attribute: true }], target: i0.ɵɵFactoryTarget.Component });
537
- MatRadioButton.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: MatRadioButton, selector: "mat-radio-button", inputs: { disableRipple: "disableRipple", tabIndex: "tabIndex" }, host: { listeners: { "focus": "_inputElement.nativeElement.focus()" }, properties: { "class.mat-radio-checked": "checked", "class.mat-radio-disabled": "disabled", "class._mat-animation-noopable": "_noopAnimations", "class.mat-primary": "color === \"primary\"", "class.mat-accent": "color === \"accent\"", "class.mat-warn": "color === \"warn\"", "attr.tabindex": "null", "attr.id": "id", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.aria-describedby": "null" }, classAttribute: "mat-radio-button" }, exportAs: ["matRadioButton"], usesInheritance: true, ngImport: i0, template: "<!-- TODO(jelbourn): render the radio on either side of the content -->\n<!-- TODO(mtlin): Evaluate trade-offs of using native radio vs. cost of additional bindings. -->\n<label [attr.for]=\"inputId\" class=\"mat-radio-label\" #label>\n <!-- The actual 'radio' part of the control. -->\n <span class=\"mat-radio-container\">\n <span class=\"mat-radio-outer-circle\"></span>\n <span class=\"mat-radio-inner-circle\"></span>\n <input #input class=\"mat-radio-input cdk-visually-hidden\" type=\"radio\"\n [id]=\"inputId\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [tabIndex]=\"tabIndex\"\n [attr.name]=\"name\"\n [attr.value]=\"value\"\n [required]=\"required\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n (change)=\"_onInputInteraction($event)\"\n (click)=\"_onInputClick($event)\">\n\n <!-- The ripple comes after the input so that we can target it with a CSS\n sibling selector when the input is focused. -->\n <span mat-ripple class=\"mat-radio-ripple mat-focus-indicator\"\n [matRippleTrigger]=\"label\"\n [matRippleDisabled]=\"_isRippleDisabled()\"\n [matRippleCentered]=\"true\"\n [matRippleRadius]=\"20\"\n [matRippleAnimation]=\"{enterDuration: _noopAnimations ? 0 : 150}\">\n\n <span class=\"mat-ripple-element mat-radio-persistent-ripple\"></span>\n </span>\n </span>\n\n <!-- The label content for radio control. -->\n <span class=\"mat-radio-label-content\" [class.mat-radio-label-before]=\"labelPosition == 'before'\">\n <!-- Add an invisible span so JAWS can read the label -->\n <span style=\"display:none\">&nbsp;</span>\n <ng-content></ng-content>\n </span>\n</label>\n", styles: [".mat-radio-button{display:inline-block;-webkit-tap-highlight-color:transparent;outline:0}.mat-radio-label{-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle;width:100%}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}._mat-animation-noopable .mat-radio-outer-circle{transition:none}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;opacity:0;transition:transform ease 280ms,background-color ease 280ms,opacity linear 1ms 280ms;width:20px;transform:scale(0.001);-webkit-print-color-adjust:exact;color-adjust:exact}.mat-radio-checked .mat-radio-inner-circle{transform:scale(0.5);opacity:1;transition:transform ease 280ms,background-color ease 280ms}.cdk-high-contrast-active .mat-radio-checked .mat-radio-inner-circle{border:solid 10px}._mat-animation-noopable .mat-radio-inner-circle{transition:none}.mat-radio-label-content{-webkit-user-select:auto;-moz-user-select:auto;user-select:auto;display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-button .mat-radio-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-radio-button .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple){opacity:.16}.mat-radio-persistent-ripple{width:100%;height:100%;transform:none;top:0;left:0}.mat-radio-container:hover .mat-radio-persistent-ripple{opacity:.04}.mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-persistent-ripple,.mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-persistent-ripple{opacity:.12}.mat-radio-persistent-ripple,.mat-radio-disabled .mat-radio-container:hover .mat-radio-persistent-ripple{opacity:0}@media(hover: none){.mat-radio-container:hover .mat-radio-persistent-ripple{display:none}}.mat-radio-input{bottom:0;left:50%}.cdk-high-contrast-active .mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-ripple,.cdk-high-contrast-active .mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-ripple{outline:solid 3px}.cdk-high-contrast-active .mat-radio-disabled{opacity:.5}\n"], directives: [{ type: i3.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
537
+ MatRadioButton.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: MatRadioButton, selector: "mat-radio-button", inputs: { disableRipple: "disableRipple", tabIndex: "tabIndex" }, host: { listeners: { "focus": "_inputElement.nativeElement.focus()" }, properties: { "class.mat-radio-checked": "checked", "class.mat-radio-disabled": "disabled", "class._mat-animation-noopable": "_noopAnimations", "class.mat-primary": "color === \"primary\"", "class.mat-accent": "color === \"accent\"", "class.mat-warn": "color === \"warn\"", "attr.tabindex": "null", "attr.id": "id", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.aria-describedby": "null" }, classAttribute: "mat-radio-button" }, exportAs: ["matRadioButton"], usesInheritance: true, ngImport: i0, template: "<!-- TODO(jelbourn): render the radio on either side of the content -->\n<!-- TODO(mtlin): Evaluate trade-offs of using native radio vs. cost of additional bindings. -->\n<label [attr.for]=\"inputId\" class=\"mat-radio-label\" #label>\n <!-- The actual 'radio' part of the control. -->\n <span class=\"mat-radio-container\">\n <span class=\"mat-radio-outer-circle\"></span>\n <span class=\"mat-radio-inner-circle\"></span>\n <input #input class=\"mat-radio-input\" type=\"radio\"\n [id]=\"inputId\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [tabIndex]=\"tabIndex\"\n [attr.name]=\"name\"\n [attr.value]=\"value\"\n [required]=\"required\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n (change)=\"_onInputInteraction($event)\"\n (click)=\"_onInputClick($event)\">\n\n <!-- The ripple comes after the input so that we can target it with a CSS\n sibling selector when the input is focused. -->\n <span mat-ripple class=\"mat-radio-ripple mat-focus-indicator\"\n [matRippleTrigger]=\"label\"\n [matRippleDisabled]=\"_isRippleDisabled()\"\n [matRippleCentered]=\"true\"\n [matRippleRadius]=\"20\"\n [matRippleAnimation]=\"{enterDuration: _noopAnimations ? 0 : 150}\">\n\n <span class=\"mat-ripple-element mat-radio-persistent-ripple\"></span>\n </span>\n </span>\n\n <!-- The label content for radio control. -->\n <span class=\"mat-radio-label-content\" [class.mat-radio-label-before]=\"labelPosition == 'before'\">\n <!-- Add an invisible span so JAWS can read the label -->\n <span style=\"display:none\">&nbsp;</span>\n <ng-content></ng-content>\n </span>\n</label>\n", styles: [".mat-radio-button{display:inline-block;-webkit-tap-highlight-color:transparent;outline:0}.mat-radio-label{-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle;width:100%}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}._mat-animation-noopable .mat-radio-outer-circle{transition:none}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;opacity:0;transition:transform ease 280ms,background-color ease 280ms,opacity linear 1ms 280ms;width:20px;transform:scale(0.001);-webkit-print-color-adjust:exact;color-adjust:exact}.mat-radio-checked .mat-radio-inner-circle{transform:scale(0.5);opacity:1;transition:transform ease 280ms,background-color ease 280ms}.cdk-high-contrast-active .mat-radio-checked .mat-radio-inner-circle{border:solid 10px}._mat-animation-noopable .mat-radio-inner-circle{transition:none}.mat-radio-label-content{-webkit-user-select:auto;-moz-user-select:auto;user-select:auto;display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-button .mat-radio-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-radio-button .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple){opacity:.16}.mat-radio-persistent-ripple{width:100%;height:100%;transform:none;top:0;left:0}.mat-radio-container:hover .mat-radio-persistent-ripple{opacity:.04}.mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-persistent-ripple,.mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-persistent-ripple{opacity:.12}.mat-radio-persistent-ripple,.mat-radio-disabled .mat-radio-container:hover .mat-radio-persistent-ripple{opacity:0}@media(hover: none){.mat-radio-container:hover .mat-radio-persistent-ripple{display:none}}.mat-radio-input{opacity:0;position:absolute;top:0;left:0;margin:0;width:100%;height:100%;cursor:inherit;z-index:-1}.cdk-high-contrast-active .mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-ripple,.cdk-high-contrast-active .mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-ripple{outline:solid 3px}.cdk-high-contrast-active .mat-radio-disabled{opacity:.5}\n"], directives: [{ type: i3.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
538
538
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: MatRadioButton, decorators: [{
539
539
  type: Component,
540
540
  args: [{ selector: 'mat-radio-button', inputs: ['disableRipple', 'tabIndex'], encapsulation: ViewEncapsulation.None, exportAs: 'matRadioButton', host: {
@@ -555,7 +555,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
555
555
  // programmatically set, for example inside of a focus trap, in this case we want to forward
556
556
  // the focus to the native element.
557
557
  '(focus)': '_inputElement.nativeElement.focus()',
558
- }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- TODO(jelbourn): render the radio on either side of the content -->\n<!-- TODO(mtlin): Evaluate trade-offs of using native radio vs. cost of additional bindings. -->\n<label [attr.for]=\"inputId\" class=\"mat-radio-label\" #label>\n <!-- The actual 'radio' part of the control. -->\n <span class=\"mat-radio-container\">\n <span class=\"mat-radio-outer-circle\"></span>\n <span class=\"mat-radio-inner-circle\"></span>\n <input #input class=\"mat-radio-input cdk-visually-hidden\" type=\"radio\"\n [id]=\"inputId\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [tabIndex]=\"tabIndex\"\n [attr.name]=\"name\"\n [attr.value]=\"value\"\n [required]=\"required\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n (change)=\"_onInputInteraction($event)\"\n (click)=\"_onInputClick($event)\">\n\n <!-- The ripple comes after the input so that we can target it with a CSS\n sibling selector when the input is focused. -->\n <span mat-ripple class=\"mat-radio-ripple mat-focus-indicator\"\n [matRippleTrigger]=\"label\"\n [matRippleDisabled]=\"_isRippleDisabled()\"\n [matRippleCentered]=\"true\"\n [matRippleRadius]=\"20\"\n [matRippleAnimation]=\"{enterDuration: _noopAnimations ? 0 : 150}\">\n\n <span class=\"mat-ripple-element mat-radio-persistent-ripple\"></span>\n </span>\n </span>\n\n <!-- The label content for radio control. -->\n <span class=\"mat-radio-label-content\" [class.mat-radio-label-before]=\"labelPosition == 'before'\">\n <!-- Add an invisible span so JAWS can read the label -->\n <span style=\"display:none\">&nbsp;</span>\n <ng-content></ng-content>\n </span>\n</label>\n", styles: [".mat-radio-button{display:inline-block;-webkit-tap-highlight-color:transparent;outline:0}.mat-radio-label{-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle;width:100%}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}._mat-animation-noopable .mat-radio-outer-circle{transition:none}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;opacity:0;transition:transform ease 280ms,background-color ease 280ms,opacity linear 1ms 280ms;width:20px;transform:scale(0.001);-webkit-print-color-adjust:exact;color-adjust:exact}.mat-radio-checked .mat-radio-inner-circle{transform:scale(0.5);opacity:1;transition:transform ease 280ms,background-color ease 280ms}.cdk-high-contrast-active .mat-radio-checked .mat-radio-inner-circle{border:solid 10px}._mat-animation-noopable .mat-radio-inner-circle{transition:none}.mat-radio-label-content{-webkit-user-select:auto;-moz-user-select:auto;user-select:auto;display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-button .mat-radio-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-radio-button .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple){opacity:.16}.mat-radio-persistent-ripple{width:100%;height:100%;transform:none;top:0;left:0}.mat-radio-container:hover .mat-radio-persistent-ripple{opacity:.04}.mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-persistent-ripple,.mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-persistent-ripple{opacity:.12}.mat-radio-persistent-ripple,.mat-radio-disabled .mat-radio-container:hover .mat-radio-persistent-ripple{opacity:0}@media(hover: none){.mat-radio-container:hover .mat-radio-persistent-ripple{display:none}}.mat-radio-input{bottom:0;left:50%}.cdk-high-contrast-active .mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-ripple,.cdk-high-contrast-active .mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-ripple{outline:solid 3px}.cdk-high-contrast-active .mat-radio-disabled{opacity:.5}\n"] }]
558
+ }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- TODO(jelbourn): render the radio on either side of the content -->\n<!-- TODO(mtlin): Evaluate trade-offs of using native radio vs. cost of additional bindings. -->\n<label [attr.for]=\"inputId\" class=\"mat-radio-label\" #label>\n <!-- The actual 'radio' part of the control. -->\n <span class=\"mat-radio-container\">\n <span class=\"mat-radio-outer-circle\"></span>\n <span class=\"mat-radio-inner-circle\"></span>\n <input #input class=\"mat-radio-input\" type=\"radio\"\n [id]=\"inputId\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [tabIndex]=\"tabIndex\"\n [attr.name]=\"name\"\n [attr.value]=\"value\"\n [required]=\"required\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n (change)=\"_onInputInteraction($event)\"\n (click)=\"_onInputClick($event)\">\n\n <!-- The ripple comes after the input so that we can target it with a CSS\n sibling selector when the input is focused. -->\n <span mat-ripple class=\"mat-radio-ripple mat-focus-indicator\"\n [matRippleTrigger]=\"label\"\n [matRippleDisabled]=\"_isRippleDisabled()\"\n [matRippleCentered]=\"true\"\n [matRippleRadius]=\"20\"\n [matRippleAnimation]=\"{enterDuration: _noopAnimations ? 0 : 150}\">\n\n <span class=\"mat-ripple-element mat-radio-persistent-ripple\"></span>\n </span>\n </span>\n\n <!-- The label content for radio control. -->\n <span class=\"mat-radio-label-content\" [class.mat-radio-label-before]=\"labelPosition == 'before'\">\n <!-- Add an invisible span so JAWS can read the label -->\n <span style=\"display:none\">&nbsp;</span>\n <ng-content></ng-content>\n </span>\n</label>\n", styles: [".mat-radio-button{display:inline-block;-webkit-tap-highlight-color:transparent;outline:0}.mat-radio-label{-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle;width:100%}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}._mat-animation-noopable .mat-radio-outer-circle{transition:none}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;display:block;height:20px;left:0;position:absolute;top:0;opacity:0;transition:transform ease 280ms,background-color ease 280ms,opacity linear 1ms 280ms;width:20px;transform:scale(0.001);-webkit-print-color-adjust:exact;color-adjust:exact}.mat-radio-checked .mat-radio-inner-circle{transform:scale(0.5);opacity:1;transition:transform ease 280ms,background-color ease 280ms}.cdk-high-contrast-active .mat-radio-checked .mat-radio-inner-circle{border:solid 10px}._mat-animation-noopable .mat-radio-inner-circle{transition:none}.mat-radio-label-content{-webkit-user-select:auto;-moz-user-select:auto;user-select:auto;display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-button .mat-radio-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-radio-button .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple){opacity:.16}.mat-radio-persistent-ripple{width:100%;height:100%;transform:none;top:0;left:0}.mat-radio-container:hover .mat-radio-persistent-ripple{opacity:.04}.mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-persistent-ripple,.mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-persistent-ripple{opacity:.12}.mat-radio-persistent-ripple,.mat-radio-disabled .mat-radio-container:hover .mat-radio-persistent-ripple{opacity:0}@media(hover: none){.mat-radio-container:hover .mat-radio-persistent-ripple{display:none}}.mat-radio-input{opacity:0;position:absolute;top:0;left:0;margin:0;width:100%;height:100%;cursor:inherit;z-index:-1}.cdk-high-contrast-active .mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-ripple,.cdk-high-contrast-active .mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-ripple{outline:solid 3px}.cdk-high-contrast-active .mat-radio-disabled{opacity:.5}\n"] }]
559
559
  }], ctorParameters: function () {
560
560
  return [{ type: MatRadioGroup, decorators: [{
561
561
  type: Optional
@@ -1 +1 @@
1
- {"version":3,"file":"radio.mjs","sources":["../../../../../../src/material/radio/radio.ts","../../../../../../src/material/radio/radio.html","../../../../../../src/material/radio/radio-module.ts","../../../../../../src/material/radio/public-api.ts","../../../../../../src/material/radio/index.ts","../../../../../../src/material/radio/radio_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FocusMonitor, FocusOrigin} from '@angular/cdk/a11y';\nimport {BooleanInput, coerceBooleanProperty, coerceNumberProperty} from '@angular/cdk/coercion';\nimport {UniqueSelectionDispatcher} from '@angular/cdk/collections';\nimport {\n AfterContentInit,\n AfterViewInit,\n Attribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n Directive,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n InjectionToken,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n CanDisableRipple,\n HasTabIndex,\n mixinDisableRipple,\n mixinTabIndex,\n ThemePalette,\n} from '@angular/material/core';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\n\nexport interface MatRadioDefaultOptions {\n color: ThemePalette;\n}\n\nexport const MAT_RADIO_DEFAULT_OPTIONS = new InjectionToken<MatRadioDefaultOptions>(\n 'mat-radio-default-options',\n {\n providedIn: 'root',\n factory: MAT_RADIO_DEFAULT_OPTIONS_FACTORY,\n },\n);\n\nexport function MAT_RADIO_DEFAULT_OPTIONS_FACTORY(): MatRadioDefaultOptions {\n return {\n color: 'accent',\n };\n}\n\n// Increasing integer for generating unique ids for radio components.\nlet nextUniqueId = 0;\n\n/**\n * Provider Expression that allows mat-radio-group to register as a ControlValueAccessor. This\n * allows it to support [(ngModel)] and ngControl.\n * @docs-private\n */\nexport const MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatRadioGroup),\n multi: true,\n};\n\n/** Change event object emitted by MatRadio and MatRadioGroup. */\nexport class MatRadioChange {\n constructor(\n /** The MatRadioButton that emits the change event. */\n public source: _MatRadioButtonBase,\n /** The value of the MatRadioButton. */\n public value: any,\n ) {}\n}\n\n/**\n * Injection token that can be used to inject instances of `MatRadioGroup`. It serves as\n * alternative token to the actual `MatRadioGroup` class which could cause unnecessary\n * retention of the class and its component metadata.\n */\nexport const MAT_RADIO_GROUP = new InjectionToken<_MatRadioGroupBase<_MatRadioButtonBase>>(\n 'MatRadioGroup',\n);\n\n/**\n * Base class with all of the `MatRadioGroup` functionality.\n * @docs-private\n */\n@Directive()\nexport abstract class _MatRadioGroupBase<T extends _MatRadioButtonBase>\n implements AfterContentInit, ControlValueAccessor\n{\n /** Selected value for the radio group. */\n private _value: any = null;\n\n /** The HTML name attribute applied to radio buttons in this group. */\n private _name: string = `mat-radio-group-${nextUniqueId++}`;\n\n /** The currently selected radio button. Should match value. */\n private _selected: T | null = null;\n\n /** Whether the `value` has been set to its initial value. */\n private _isInitialized: boolean = false;\n\n /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */\n private _labelPosition: 'before' | 'after' = 'after';\n\n /** Whether the radio group is disabled. */\n private _disabled: boolean = false;\n\n /** Whether the radio group is required. */\n private _required: boolean = false;\n\n /** The method to be called in order to update ngModel */\n _controlValueAccessorChangeFn: (value: any) => void = () => {};\n\n /**\n * onTouch function registered via registerOnTouch (ControlValueAccessor).\n * @docs-private\n */\n onTouched: () => any = () => {};\n\n /**\n * Event emitted when the group value changes.\n * Change events are only emitted when the value changes due to user interaction with\n * a radio button (the same behavior as `<input type-\"radio\">`).\n */\n @Output() readonly change: EventEmitter<MatRadioChange> = new EventEmitter<MatRadioChange>();\n\n /** Child radio buttons. */\n abstract _radios: QueryList<T>;\n\n /** Theme color for all of the radio buttons in the group. */\n @Input() color: ThemePalette;\n\n /** Name of the radio button group. All radio buttons inside this group will use this name. */\n @Input()\n get name(): string {\n return this._name;\n }\n set name(value: string) {\n this._name = value;\n this._updateRadioButtonNames();\n }\n\n /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */\n @Input()\n get labelPosition(): 'before' | 'after' {\n return this._labelPosition;\n }\n set labelPosition(v) {\n this._labelPosition = v === 'before' ? 'before' : 'after';\n this._markRadiosForCheck();\n }\n\n /**\n * Value for the radio-group. Should equal the value of the selected radio button if there is\n * a corresponding radio button with a matching value. If there is not such a corresponding\n * radio button, this value persists to be applied in case a new radio button is added with a\n * matching value.\n */\n @Input()\n get value(): any {\n return this._value;\n }\n set value(newValue: any) {\n if (this._value !== newValue) {\n // Set this before proceeding to ensure no circular loop occurs with selection.\n this._value = newValue;\n\n this._updateSelectedRadioFromValue();\n this._checkSelectedRadioButton();\n }\n }\n\n _checkSelectedRadioButton() {\n if (this._selected && !this._selected.checked) {\n this._selected.checked = true;\n }\n }\n\n /**\n * The currently selected radio button. If set to a new radio button, the radio group value\n * will be updated to match the new selected button.\n */\n @Input()\n get selected() {\n return this._selected;\n }\n set selected(selected: T | null) {\n this._selected = selected;\n this.value = selected ? selected.value : null;\n this._checkSelectedRadioButton();\n }\n\n /** Whether the radio group is disabled */\n @Input()\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value: BooleanInput) {\n this._disabled = coerceBooleanProperty(value);\n this._markRadiosForCheck();\n }\n\n /** Whether the radio group is required */\n @Input()\n get required(): boolean {\n return this._required;\n }\n set required(value: BooleanInput) {\n this._required = coerceBooleanProperty(value);\n this._markRadiosForCheck();\n }\n\n constructor(private _changeDetector: ChangeDetectorRef) {}\n\n /**\n * Initialize properties once content children are available.\n * This allows us to propagate relevant attributes to associated buttons.\n */\n ngAfterContentInit() {\n // Mark this component as initialized in AfterContentInit because the initial value can\n // possibly be set by NgModel on MatRadioGroup, and it is possible that the OnInit of the\n // NgModel occurs *after* the OnInit of the MatRadioGroup.\n this._isInitialized = true;\n }\n\n /**\n * Mark this group as being \"touched\" (for ngModel). Meant to be called by the contained\n * radio buttons upon their blur.\n */\n _touch() {\n if (this.onTouched) {\n this.onTouched();\n }\n }\n\n private _updateRadioButtonNames(): void {\n if (this._radios) {\n this._radios.forEach(radio => {\n radio.name = this.name;\n radio._markForCheck();\n });\n }\n }\n\n /** Updates the `selected` radio button from the internal _value state. */\n private _updateSelectedRadioFromValue(): void {\n // If the value already matches the selected radio, do nothing.\n const isAlreadySelected = this._selected !== null && this._selected.value === this._value;\n\n if (this._radios && !isAlreadySelected) {\n this._selected = null;\n this._radios.forEach(radio => {\n radio.checked = this.value === radio.value;\n if (radio.checked) {\n this._selected = radio;\n }\n });\n }\n }\n\n /** Dispatch change event with current selection and group value. */\n _emitChangeEvent(): void {\n if (this._isInitialized) {\n this.change.emit(new MatRadioChange(this._selected!, this._value));\n }\n }\n\n _markRadiosForCheck() {\n if (this._radios) {\n this._radios.forEach(radio => radio._markForCheck());\n }\n }\n\n /**\n * Sets the model value. Implemented as part of ControlValueAccessor.\n * @param value\n */\n writeValue(value: any) {\n this.value = value;\n this._changeDetector.markForCheck();\n }\n\n /**\n * Registers a callback to be triggered when the model value changes.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnChange(fn: (value: any) => void) {\n this._controlValueAccessorChangeFn = fn;\n }\n\n /**\n * Registers a callback to be triggered when the control is touched.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnTouched(fn: any) {\n this.onTouched = fn;\n }\n\n /**\n * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.\n * @param isDisabled Whether the control should be disabled.\n */\n setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled;\n this._changeDetector.markForCheck();\n }\n}\n\n/**\n * A group of radio buttons. May contain one or more `<mat-radio-button>` elements.\n */\n@Directive({\n selector: 'mat-radio-group',\n exportAs: 'matRadioGroup',\n providers: [\n MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR,\n {provide: MAT_RADIO_GROUP, useExisting: MatRadioGroup},\n ],\n host: {\n 'role': 'radiogroup',\n 'class': 'mat-radio-group',\n },\n})\nexport class MatRadioGroup extends _MatRadioGroupBase<MatRadioButton> {\n @ContentChildren(forwardRef(() => MatRadioButton), {descendants: true})\n _radios: QueryList<MatRadioButton>;\n}\n\n// Boilerplate for applying mixins to MatRadioButton.\n/** @docs-private */\nabstract class MatRadioButtonBase {\n // Since the disabled property is manually defined for the MatRadioButton and isn't set up in\n // the mixin base class. To be able to use the tabindex mixin, a disabled property must be\n // defined to properly work.\n abstract disabled: boolean;\n constructor(public _elementRef: ElementRef) {}\n}\n\nconst _MatRadioButtonMixinBase = mixinDisableRipple(mixinTabIndex(MatRadioButtonBase));\n\n/**\n * Base class with all of the `MatRadioButton` functionality.\n * @docs-private\n */\n@Directive()\nexport abstract class _MatRadioButtonBase\n extends _MatRadioButtonMixinBase\n implements OnInit, AfterViewInit, OnDestroy, CanDisableRipple, HasTabIndex\n{\n private _uniqueId: string = `mat-radio-${++nextUniqueId}`;\n\n /** The unique ID for the radio button. */\n @Input() id: string = this._uniqueId;\n\n /** Analog to HTML 'name' attribute used to group radios for unique selection. */\n @Input() name: string;\n\n /** Used to set the 'aria-label' attribute on the underlying input element. */\n @Input('aria-label') ariaLabel: string;\n\n /** The 'aria-labelledby' attribute takes precedence as the element's text alternative. */\n @Input('aria-labelledby') ariaLabelledby: string;\n\n /** The 'aria-describedby' attribute is read after the element's label and field type. */\n @Input('aria-describedby') ariaDescribedby: string;\n\n /** Whether this radio button is checked. */\n @Input()\n get checked(): boolean {\n return this._checked;\n }\n set checked(value: BooleanInput) {\n const newCheckedState = coerceBooleanProperty(value);\n if (this._checked !== newCheckedState) {\n this._checked = newCheckedState;\n if (newCheckedState && this.radioGroup && this.radioGroup.value !== this.value) {\n this.radioGroup.selected = this;\n } else if (!newCheckedState && this.radioGroup && this.radioGroup.value === this.value) {\n // When unchecking the selected radio button, update the selected radio\n // property on the group.\n this.radioGroup.selected = null;\n }\n\n if (newCheckedState) {\n // Notify all radio buttons with the same name to un-check.\n this._radioDispatcher.notify(this.id, this.name);\n }\n this._changeDetector.markForCheck();\n }\n }\n\n /** The value of this radio button. */\n @Input()\n get value(): any {\n return this._value;\n }\n set value(value: any) {\n if (this._value !== value) {\n this._value = value;\n if (this.radioGroup !== null) {\n if (!this.checked) {\n // Update checked when the value changed to match the radio group's value\n this.checked = this.radioGroup.value === value;\n }\n if (this.checked) {\n this.radioGroup.selected = this;\n }\n }\n }\n }\n\n /** Whether the label should appear after or before the radio button. Defaults to 'after' */\n @Input()\n get labelPosition(): 'before' | 'after' {\n return this._labelPosition || (this.radioGroup && this.radioGroup.labelPosition) || 'after';\n }\n set labelPosition(value) {\n this._labelPosition = value;\n }\n private _labelPosition: 'before' | 'after';\n\n /** Whether the radio button is disabled. */\n @Input()\n get disabled(): boolean {\n return this._disabled || (this.radioGroup !== null && this.radioGroup.disabled);\n }\n set disabled(value: BooleanInput) {\n this._setDisabled(coerceBooleanProperty(value));\n }\n\n /** Whether the radio button is required. */\n @Input()\n get required(): boolean {\n return this._required || (this.radioGroup && this.radioGroup.required);\n }\n set required(value: BooleanInput) {\n this._required = coerceBooleanProperty(value);\n }\n\n /** Theme color of the radio button. */\n @Input()\n get color(): ThemePalette {\n // As per Material design specifications the selection control radio should use the accent color\n // palette by default. https://material.io/guidelines/components/selection-controls.html\n return (\n this._color ||\n (this.radioGroup && this.radioGroup.color) ||\n (this._providerOverride && this._providerOverride.color) ||\n 'accent'\n );\n }\n set color(newValue: ThemePalette) {\n this._color = newValue;\n }\n private _color: ThemePalette;\n\n /**\n * Event emitted when the checked state of this radio button changes.\n * Change events are only emitted when the value changes due to user interaction with\n * the radio button (the same behavior as `<input type-\"radio\">`).\n */\n @Output() readonly change: EventEmitter<MatRadioChange> = new EventEmitter<MatRadioChange>();\n\n /** The parent radio group. May or may not be present. */\n radioGroup: _MatRadioGroupBase<_MatRadioButtonBase>;\n\n /** ID of the native input element inside `<mat-radio-button>` */\n get inputId(): string {\n return `${this.id || this._uniqueId}-input`;\n }\n\n /** Whether this radio is checked. */\n private _checked: boolean = false;\n\n /** Whether this radio is disabled. */\n private _disabled: boolean;\n\n /** Whether this radio is required. */\n private _required: boolean;\n\n /** Value assigned to this radio. */\n private _value: any = null;\n\n /** Unregister function for _radioDispatcher */\n private _removeUniqueSelectionListener: () => void = () => {};\n\n /** The native `<input type=radio>` element */\n @ViewChild('input') _inputElement: ElementRef<HTMLInputElement>;\n\n /** Whether animations are disabled. */\n _noopAnimations: boolean;\n\n constructor(\n radioGroup: _MatRadioGroupBase<_MatRadioButtonBase>,\n elementRef: ElementRef,\n protected _changeDetector: ChangeDetectorRef,\n private _focusMonitor: FocusMonitor,\n private _radioDispatcher: UniqueSelectionDispatcher,\n animationMode?: string,\n private _providerOverride?: MatRadioDefaultOptions,\n tabIndex?: string,\n ) {\n super(elementRef);\n\n // Assertions. Ideally these should be stripped out by the compiler.\n // TODO(jelbourn): Assert that there's no name binding AND a parent radio group.\n this.radioGroup = radioGroup;\n this._noopAnimations = animationMode === 'NoopAnimations';\n\n if (tabIndex) {\n this.tabIndex = coerceNumberProperty(tabIndex, 0);\n }\n\n this._removeUniqueSelectionListener = _radioDispatcher.listen((id: string, name: string) => {\n if (id !== this.id && name === this.name) {\n this.checked = false;\n }\n });\n }\n\n /** Focuses the radio button. */\n focus(options?: FocusOptions, origin?: FocusOrigin): void {\n if (origin) {\n this._focusMonitor.focusVia(this._inputElement, origin, options);\n } else {\n this._inputElement.nativeElement.focus(options);\n }\n }\n\n /**\n * Marks the radio button as needing checking for change detection.\n * This method is exposed because the parent radio group will directly\n * update bound properties of the radio button.\n */\n _markForCheck() {\n // When group value changes, the button will not be notified. Use `markForCheck` to explicit\n // update radio button's status\n this._changeDetector.markForCheck();\n }\n\n ngOnInit() {\n if (this.radioGroup) {\n // If the radio is inside a radio group, determine if it should be checked\n this.checked = this.radioGroup.value === this._value;\n\n if (this.checked) {\n this.radioGroup.selected = this;\n }\n\n // Copy name from parent radio group\n this.name = this.radioGroup.name;\n }\n }\n\n ngAfterViewInit() {\n this._focusMonitor.monitor(this._elementRef, true).subscribe(focusOrigin => {\n if (!focusOrigin && this.radioGroup) {\n this.radioGroup._touch();\n }\n });\n }\n\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n this._removeUniqueSelectionListener();\n }\n\n /** Dispatch change event with current value. */\n private _emitChangeEvent(): void {\n this.change.emit(new MatRadioChange(this, this._value));\n }\n\n _isRippleDisabled() {\n return this.disableRipple || this.disabled;\n }\n\n _onInputClick(event: Event) {\n // We have to stop propagation for click events on the visual hidden input element.\n // By default, when a user clicks on a label element, a generated click event will be\n // dispatched on the associated input element. Since we are using a label element as our\n // root container, the click event on the `radio-button` will be executed twice.\n // The real click event will bubble up, and the generated click event also tries to bubble up.\n // This will lead to multiple click events.\n // Preventing bubbling for the second event will solve that issue.\n event.stopPropagation();\n }\n\n /** Triggered when the radio button receives an interaction from the user. */\n _onInputInteraction(event: Event) {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the `change` output.\n event.stopPropagation();\n\n if (!this.checked && !this.disabled) {\n const groupValueChanged = this.radioGroup && this.value !== this.radioGroup.value;\n this.checked = true;\n this._emitChangeEvent();\n\n if (this.radioGroup) {\n this.radioGroup._controlValueAccessorChangeFn(this.value);\n if (groupValueChanged) {\n this.radioGroup._emitChangeEvent();\n }\n }\n }\n }\n\n /** Sets the disabled state and marks for check if a change occurred. */\n protected _setDisabled(value: boolean) {\n if (this._disabled !== value) {\n this._disabled = value;\n this._changeDetector.markForCheck();\n }\n }\n}\n\n/**\n * A Material design radio-button. Typically placed inside of `<mat-radio-group>` elements.\n */\n@Component({\n selector: 'mat-radio-button',\n templateUrl: 'radio.html',\n styleUrls: ['radio.css'],\n inputs: ['disableRipple', 'tabIndex'],\n encapsulation: ViewEncapsulation.None,\n exportAs: 'matRadioButton',\n host: {\n 'class': 'mat-radio-button',\n '[class.mat-radio-checked]': 'checked',\n '[class.mat-radio-disabled]': 'disabled',\n '[class._mat-animation-noopable]': '_noopAnimations',\n '[class.mat-primary]': 'color === \"primary\"',\n '[class.mat-accent]': 'color === \"accent\"',\n '[class.mat-warn]': 'color === \"warn\"',\n // Needs to be removed since it causes some a11y issues (see #21266).\n '[attr.tabindex]': 'null',\n '[attr.id]': 'id',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.aria-describedby]': 'null',\n // Note: under normal conditions focus shouldn't land on this element, however it may be\n // programmatically set, for example inside of a focus trap, in this case we want to forward\n // the focus to the native element.\n '(focus)': '_inputElement.nativeElement.focus()',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatRadioButton extends _MatRadioButtonBase {\n constructor(\n @Optional() @Inject(MAT_RADIO_GROUP) radioGroup: MatRadioGroup,\n elementRef: ElementRef,\n changeDetector: ChangeDetectorRef,\n focusMonitor: FocusMonitor,\n radioDispatcher: UniqueSelectionDispatcher,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode?: string,\n @Optional()\n @Inject(MAT_RADIO_DEFAULT_OPTIONS)\n providerOverride?: MatRadioDefaultOptions,\n @Attribute('tabindex') tabIndex?: string,\n ) {\n super(\n radioGroup,\n elementRef,\n changeDetector,\n focusMonitor,\n radioDispatcher,\n animationMode,\n providerOverride,\n tabIndex,\n );\n }\n}\n","<!-- TODO(jelbourn): render the radio on either side of the content -->\n<!-- TODO(mtlin): Evaluate trade-offs of using native radio vs. cost of additional bindings. -->\n<label [attr.for]=\"inputId\" class=\"mat-radio-label\" #label>\n <!-- The actual 'radio' part of the control. -->\n <span class=\"mat-radio-container\">\n <span class=\"mat-radio-outer-circle\"></span>\n <span class=\"mat-radio-inner-circle\"></span>\n <input #input class=\"mat-radio-input cdk-visually-hidden\" type=\"radio\"\n [id]=\"inputId\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [tabIndex]=\"tabIndex\"\n [attr.name]=\"name\"\n [attr.value]=\"value\"\n [required]=\"required\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n (change)=\"_onInputInteraction($event)\"\n (click)=\"_onInputClick($event)\">\n\n <!-- The ripple comes after the input so that we can target it with a CSS\n sibling selector when the input is focused. -->\n <span mat-ripple class=\"mat-radio-ripple mat-focus-indicator\"\n [matRippleTrigger]=\"label\"\n [matRippleDisabled]=\"_isRippleDisabled()\"\n [matRippleCentered]=\"true\"\n [matRippleRadius]=\"20\"\n [matRippleAnimation]=\"{enterDuration: _noopAnimations ? 0 : 150}\">\n\n <span class=\"mat-ripple-element mat-radio-persistent-ripple\"></span>\n </span>\n </span>\n\n <!-- The label content for radio control. -->\n <span class=\"mat-radio-label-content\" [class.mat-radio-label-before]=\"labelPosition == 'before'\">\n <!-- Add an invisible span so JAWS can read the label -->\n <span style=\"display:none\">&nbsp;</span>\n <ng-content></ng-content>\n </span>\n</label>\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule, MatRippleModule} from '@angular/material/core';\nimport {MatRadioButton, MatRadioGroup} from './radio';\n\n@NgModule({\n imports: [MatRippleModule, MatCommonModule],\n exports: [MatRadioGroup, MatRadioButton, MatCommonModule],\n declarations: [MatRadioGroup, MatRadioButton],\n})\nexport class MatRadioModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './radio-module';\nexport * from './radio';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAgDa,yBAAyB,GAAG,IAAI,cAAc,CACzD,2BAA2B,EAC3B;IACE,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,iCAAiC;CAC3C,EACD;SAEc,iCAAiC;IAC/C,OAAO;QACL,KAAK,EAAE,QAAQ;KAChB,CAAC;AACJ,CAAC;AAED;AACA,IAAI,YAAY,GAAG,CAAC,CAAC;AAErB;;;;;MAKa,sCAAsC,GAAQ;IACzD,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EAAE,UAAU,CAAC,MAAM,aAAa,CAAC;IAC5C,KAAK,EAAE,IAAI;EACX;AAEF;MACa,cAAc;IACzB;;IAES,MAA2B;;IAE3B,KAAU;QAFV,WAAM,GAAN,MAAM,CAAqB;QAE3B,UAAK,GAAL,KAAK,CAAK;KACf;CACL;AAED;;;;;MAKa,eAAe,GAAG,IAAI,cAAc,CAC/C,eAAe,EACf;AAEF;;;;MAKsB,kBAAkB;IA8HtC,YAAoB,eAAkC;QAAlC,oBAAe,GAAf,eAAe,CAAmB;;QA1H9C,WAAM,GAAQ,IAAI,CAAC;;QAGnB,UAAK,GAAW,mBAAmB,YAAY,EAAE,EAAE,CAAC;;QAGpD,cAAS,GAAa,IAAI,CAAC;;QAG3B,mBAAc,GAAY,KAAK,CAAC;;QAGhC,mBAAc,GAAuB,OAAO,CAAC;;QAG7C,cAAS,GAAY,KAAK,CAAC;;QAG3B,cAAS,GAAY,KAAK,CAAC;;QAGnC,kCAA6B,GAAyB,SAAQ,CAAC;;;;;QAM/D,cAAS,GAAc,SAAQ,CAAC;;;;;;QAOb,WAAM,GAAiC,IAAI,YAAY,EAAkB,CAAC;KAwFnC;;IA/E1D,IACI,IAAI;QACN,OAAO,IAAI,CAAC,KA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zB;;;;;;;MAiBa,cAAc;;2GAAd,cAAc;4GAAd,cAAc,iBAFV,aAAa,EAAE,cAAc,aAFlC,eAAe,EAAE,eAAe,aAChC,aAAa,EAAE,cAAc,EAAE,eAAe;4GAG7C,cAAc,YAJhB,CAAC,eAAe,EAAE,eAAe,CAAC,EACF,eAAe;2FAG7C,cAAc;kBAL1B,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,eAAe,EAAE,eAAe,CAAC;oBAC3C,OAAO,EAAE,CAAC,aAAa,EAAE,cAAc,EAAE,eAAe,CAAC;oBACzD,YAAY,EAAE,CAAC,aAAa,EAAE,cAAc,CAAC;iBAC9C;;;AChBD;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"radio.mjs","sources":["../../../../../../src/material/radio/radio.ts","../../../../../../src/material/radio/radio.html","../../../../../../src/material/radio/radio-module.ts","../../../../../../src/material/radio/public-api.ts","../../../../../../src/material/radio/index.ts","../../../../../../src/material/radio/radio_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FocusMonitor, FocusOrigin} from '@angular/cdk/a11y';\nimport {BooleanInput, coerceBooleanProperty, coerceNumberProperty} from '@angular/cdk/coercion';\nimport {UniqueSelectionDispatcher} from '@angular/cdk/collections';\nimport {\n AfterContentInit,\n AfterViewInit,\n Attribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n Directive,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n InjectionToken,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n CanDisableRipple,\n HasTabIndex,\n mixinDisableRipple,\n mixinTabIndex,\n ThemePalette,\n} from '@angular/material/core';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\n\nexport interface MatRadioDefaultOptions {\n color: ThemePalette;\n}\n\nexport const MAT_RADIO_DEFAULT_OPTIONS = new InjectionToken<MatRadioDefaultOptions>(\n 'mat-radio-default-options',\n {\n providedIn: 'root',\n factory: MAT_RADIO_DEFAULT_OPTIONS_FACTORY,\n },\n);\n\nexport function MAT_RADIO_DEFAULT_OPTIONS_FACTORY(): MatRadioDefaultOptions {\n return {\n color: 'accent',\n };\n}\n\n// Increasing integer for generating unique ids for radio components.\nlet nextUniqueId = 0;\n\n/**\n * Provider Expression that allows mat-radio-group to register as a ControlValueAccessor. This\n * allows it to support [(ngModel)] and ngControl.\n * @docs-private\n */\nexport const MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatRadioGroup),\n multi: true,\n};\n\n/** Change event object emitted by MatRadio and MatRadioGroup. */\nexport class MatRadioChange {\n constructor(\n /** The MatRadioButton that emits the change event. */\n public source: _MatRadioButtonBase,\n /** The value of the MatRadioButton. */\n public value: any,\n ) {}\n}\n\n/**\n * Injection token that can be used to inject instances of `MatRadioGroup`. It serves as\n * alternative token to the actual `MatRadioGroup` class which could cause unnecessary\n * retention of the class and its component metadata.\n */\nexport const MAT_RADIO_GROUP = new InjectionToken<_MatRadioGroupBase<_MatRadioButtonBase>>(\n 'MatRadioGroup',\n);\n\n/**\n * Base class with all of the `MatRadioGroup` functionality.\n * @docs-private\n */\n@Directive()\nexport abstract class _MatRadioGroupBase<T extends _MatRadioButtonBase>\n implements AfterContentInit, ControlValueAccessor\n{\n /** Selected value for the radio group. */\n private _value: any = null;\n\n /** The HTML name attribute applied to radio buttons in this group. */\n private _name: string = `mat-radio-group-${nextUniqueId++}`;\n\n /** The currently selected radio button. Should match value. */\n private _selected: T | null = null;\n\n /** Whether the `value` has been set to its initial value. */\n private _isInitialized: boolean = false;\n\n /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */\n private _labelPosition: 'before' | 'after' = 'after';\n\n /** Whether the radio group is disabled. */\n private _disabled: boolean = false;\n\n /** Whether the radio group is required. */\n private _required: boolean = false;\n\n /** The method to be called in order to update ngModel */\n _controlValueAccessorChangeFn: (value: any) => void = () => {};\n\n /**\n * onTouch function registered via registerOnTouch (ControlValueAccessor).\n * @docs-private\n */\n onTouched: () => any = () => {};\n\n /**\n * Event emitted when the group value changes.\n * Change events are only emitted when the value changes due to user interaction with\n * a radio button (the same behavior as `<input type-\"radio\">`).\n */\n @Output() readonly change: EventEmitter<MatRadioChange> = new EventEmitter<MatRadioChange>();\n\n /** Child radio buttons. */\n abstract _radios: QueryList<T>;\n\n /** Theme color for all of the radio buttons in the group. */\n @Input() color: ThemePalette;\n\n /** Name of the radio button group. All radio buttons inside this group will use this name. */\n @Input()\n get name(): string {\n return this._name;\n }\n set name(value: string) {\n this._name = value;\n this._updateRadioButtonNames();\n }\n\n /** Whether the labels should appear after or before the radio-buttons. Defaults to 'after' */\n @Input()\n get labelPosition(): 'before' | 'after' {\n return this._labelPosition;\n }\n set labelPosition(v) {\n this._labelPosition = v === 'before' ? 'before' : 'after';\n this._markRadiosForCheck();\n }\n\n /**\n * Value for the radio-group. Should equal the value of the selected radio button if there is\n * a corresponding radio button with a matching value. If there is not such a corresponding\n * radio button, this value persists to be applied in case a new radio button is added with a\n * matching value.\n */\n @Input()\n get value(): any {\n return this._value;\n }\n set value(newValue: any) {\n if (this._value !== newValue) {\n // Set this before proceeding to ensure no circular loop occurs with selection.\n this._value = newValue;\n\n this._updateSelectedRadioFromValue();\n this._checkSelectedRadioButton();\n }\n }\n\n _checkSelectedRadioButton() {\n if (this._selected && !this._selected.checked) {\n this._selected.checked = true;\n }\n }\n\n /**\n * The currently selected radio button. If set to a new radio button, the radio group value\n * will be updated to match the new selected button.\n */\n @Input()\n get selected() {\n return this._selected;\n }\n set selected(selected: T | null) {\n this._selected = selected;\n this.value = selected ? selected.value : null;\n this._checkSelectedRadioButton();\n }\n\n /** Whether the radio group is disabled */\n @Input()\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value: BooleanInput) {\n this._disabled = coerceBooleanProperty(value);\n this._markRadiosForCheck();\n }\n\n /** Whether the radio group is required */\n @Input()\n get required(): boolean {\n return this._required;\n }\n set required(value: BooleanInput) {\n this._required = coerceBooleanProperty(value);\n this._markRadiosForCheck();\n }\n\n constructor(private _changeDetector: ChangeDetectorRef) {}\n\n /**\n * Initialize properties once content children are available.\n * This allows us to propagate relevant attributes to associated buttons.\n */\n ngAfterContentInit() {\n // Mark this component as initialized in AfterContentInit because the initial value can\n // possibly be set by NgModel on MatRadioGroup, and it is possible that the OnInit of the\n // NgModel occurs *after* the OnInit of the MatRadioGroup.\n this._isInitialized = true;\n }\n\n /**\n * Mark this group as being \"touched\" (for ngModel). Meant to be called by the contained\n * radio buttons upon their blur.\n */\n _touch() {\n if (this.onTouched) {\n this.onTouched();\n }\n }\n\n private _updateRadioButtonNames(): void {\n if (this._radios) {\n this._radios.forEach(radio => {\n radio.name = this.name;\n radio._markForCheck();\n });\n }\n }\n\n /** Updates the `selected` radio button from the internal _value state. */\n private _updateSelectedRadioFromValue(): void {\n // If the value already matches the selected radio, do nothing.\n const isAlreadySelected = this._selected !== null && this._selected.value === this._value;\n\n if (this._radios && !isAlreadySelected) {\n this._selected = null;\n this._radios.forEach(radio => {\n radio.checked = this.value === radio.value;\n if (radio.checked) {\n this._selected = radio;\n }\n });\n }\n }\n\n /** Dispatch change event with current selection and group value. */\n _emitChangeEvent(): void {\n if (this._isInitialized) {\n this.change.emit(new MatRadioChange(this._selected!, this._value));\n }\n }\n\n _markRadiosForCheck() {\n if (this._radios) {\n this._radios.forEach(radio => radio._markForCheck());\n }\n }\n\n /**\n * Sets the model value. Implemented as part of ControlValueAccessor.\n * @param value\n */\n writeValue(value: any) {\n this.value = value;\n this._changeDetector.markForCheck();\n }\n\n /**\n * Registers a callback to be triggered when the model value changes.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnChange(fn: (value: any) => void) {\n this._controlValueAccessorChangeFn = fn;\n }\n\n /**\n * Registers a callback to be triggered when the control is touched.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnTouched(fn: any) {\n this.onTouched = fn;\n }\n\n /**\n * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.\n * @param isDisabled Whether the control should be disabled.\n */\n setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled;\n this._changeDetector.markForCheck();\n }\n}\n\n/**\n * A group of radio buttons. May contain one or more `<mat-radio-button>` elements.\n */\n@Directive({\n selector: 'mat-radio-group',\n exportAs: 'matRadioGroup',\n providers: [\n MAT_RADIO_GROUP_CONTROL_VALUE_ACCESSOR,\n {provide: MAT_RADIO_GROUP, useExisting: MatRadioGroup},\n ],\n host: {\n 'role': 'radiogroup',\n 'class': 'mat-radio-group',\n },\n})\nexport class MatRadioGroup extends _MatRadioGroupBase<MatRadioButton> {\n @ContentChildren(forwardRef(() => MatRadioButton), {descendants: true})\n _radios: QueryList<MatRadioButton>;\n}\n\n// Boilerplate for applying mixins to MatRadioButton.\n/** @docs-private */\nabstract class MatRadioButtonBase {\n // Since the disabled property is manually defined for the MatRadioButton and isn't set up in\n // the mixin base class. To be able to use the tabindex mixin, a disabled property must be\n // defined to properly work.\n abstract disabled: boolean;\n constructor(public _elementRef: ElementRef) {}\n}\n\nconst _MatRadioButtonMixinBase = mixinDisableRipple(mixinTabIndex(MatRadioButtonBase));\n\n/**\n * Base class with all of the `MatRadioButton` functionality.\n * @docs-private\n */\n@Directive()\nexport abstract class _MatRadioButtonBase\n extends _MatRadioButtonMixinBase\n implements OnInit, AfterViewInit, OnDestroy, CanDisableRipple, HasTabIndex\n{\n private _uniqueId: string = `mat-radio-${++nextUniqueId}`;\n\n /** The unique ID for the radio button. */\n @Input() id: string = this._uniqueId;\n\n /** Analog to HTML 'name' attribute used to group radios for unique selection. */\n @Input() name: string;\n\n /** Used to set the 'aria-label' attribute on the underlying input element. */\n @Input('aria-label') ariaLabel: string;\n\n /** The 'aria-labelledby' attribute takes precedence as the element's text alternative. */\n @Input('aria-labelledby') ariaLabelledby: string;\n\n /** The 'aria-describedby' attribute is read after the element's label and field type. */\n @Input('aria-describedby') ariaDescribedby: string;\n\n /** Whether this radio button is checked. */\n @Input()\n get checked(): boolean {\n return this._checked;\n }\n set checked(value: BooleanInput) {\n const newCheckedState = coerceBooleanProperty(value);\n if (this._checked !== newCheckedState) {\n this._checked = newCheckedState;\n if (newCheckedState && this.radioGroup && this.radioGroup.value !== this.value) {\n this.radioGroup.selected = this;\n } else if (!newCheckedState && this.radioGroup && this.radioGroup.value === this.value) {\n // When unchecking the selected radio button, update the selected radio\n // property on the group.\n this.radioGroup.selected = null;\n }\n\n if (newCheckedState) {\n // Notify all radio buttons with the same name to un-check.\n this._radioDispatcher.notify(this.id, this.name);\n }\n this._changeDetector.markForCheck();\n }\n }\n\n /** The value of this radio button. */\n @Input()\n get value(): any {\n return this._value;\n }\n set value(value: any) {\n if (this._value !== value) {\n this._value = value;\n if (this.radioGroup !== null) {\n if (!this.checked) {\n // Update checked when the value changed to match the radio group's value\n this.checked = this.radioGroup.value === value;\n }\n if (this.checked) {\n this.radioGroup.selected = this;\n }\n }\n }\n }\n\n /** Whether the label should appear after or before the radio button. Defaults to 'after' */\n @Input()\n get labelPosition(): 'before' | 'after' {\n return this._labelPosition || (this.radioGroup && this.radioGroup.labelPosition) || 'after';\n }\n set labelPosition(value) {\n this._labelPosition = value;\n }\n private _labelPosition: 'before' | 'after';\n\n /** Whether the radio button is disabled. */\n @Input()\n get disabled(): boolean {\n return this._disabled || (this.radioGroup !== null && this.radioGroup.disabled);\n }\n set disabled(value: BooleanInput) {\n this._setDisabled(coerceBooleanProperty(value));\n }\n\n /** Whether the radio button is required. */\n @Input()\n get required(): boolean {\n return this._required || (this.radioGroup && this.radioGroup.required);\n }\n set required(value: BooleanInput) {\n this._required = coerceBooleanProperty(value);\n }\n\n /** Theme color of the radio button. */\n @Input()\n get color(): ThemePalette {\n // As per Material design specifications the selection control radio should use the accent color\n // palette by default. https://material.io/guidelines/components/selection-controls.html\n return (\n this._color ||\n (this.radioGroup && this.radioGroup.color) ||\n (this._providerOverride && this._providerOverride.color) ||\n 'accent'\n );\n }\n set color(newValue: ThemePalette) {\n this._color = newValue;\n }\n private _color: ThemePalette;\n\n /**\n * Event emitted when the checked state of this radio button changes.\n * Change events are only emitted when the value changes due to user interaction with\n * the radio button (the same behavior as `<input type-\"radio\">`).\n */\n @Output() readonly change: EventEmitter<MatRadioChange> = new EventEmitter<MatRadioChange>();\n\n /** The parent radio group. May or may not be present. */\n radioGroup: _MatRadioGroupBase<_MatRadioButtonBase>;\n\n /** ID of the native input element inside `<mat-radio-button>` */\n get inputId(): string {\n return `${this.id || this._uniqueId}-input`;\n }\n\n /** Whether this radio is checked. */\n private _checked: boolean = false;\n\n /** Whether this radio is disabled. */\n private _disabled: boolean;\n\n /** Whether this radio is required. */\n private _required: boolean;\n\n /** Value assigned to this radio. */\n private _value: any = null;\n\n /** Unregister function for _radioDispatcher */\n private _removeUniqueSelectionListener: () => void = () => {};\n\n /** The native `<input type=radio>` element */\n @ViewChild('input') _inputElement: ElementRef<HTMLInputElement>;\n\n /** Whether animations are disabled. */\n _noopAnimations: boolean;\n\n constructor(\n radioGroup: _MatRadioGroupBase<_MatRadioButtonBase>,\n elementRef: ElementRef,\n protected _changeDetector: ChangeDetectorRef,\n private _focusMonitor: FocusMonitor,\n private _radioDispatcher: UniqueSelectionDispatcher,\n animationMode?: string,\n private _providerOverride?: MatRadioDefaultOptions,\n tabIndex?: string,\n ) {\n super(elementRef);\n\n // Assertions. Ideally these should be stripped out by the compiler.\n // TODO(jelbourn): Assert that there's no name binding AND a parent radio group.\n this.radioGroup = radioGroup;\n this._noopAnimations = animationMode === 'NoopAnimations';\n\n if (tabIndex) {\n this.tabIndex = coerceNumberProperty(tabIndex, 0);\n }\n\n this._removeUniqueSelectionListener = _radioDispatcher.listen((id: string, name: string) => {\n if (id !== this.id && name === this.name) {\n this.checked = false;\n }\n });\n }\n\n /** Focuses the radio button. */\n focus(options?: FocusOptions, origin?: FocusOrigin): void {\n if (origin) {\n this._focusMonitor.focusVia(this._inputElement, origin, options);\n } else {\n this._inputElement.nativeElement.focus(options);\n }\n }\n\n /**\n * Marks the radio button as needing checking for change detection.\n * This method is exposed because the parent radio group will directly\n * update bound properties of the radio button.\n */\n _markForCheck() {\n // When group value changes, the button will not be notified. Use `markForCheck` to explicit\n // update radio button's status\n this._changeDetector.markForCheck();\n }\n\n ngOnInit() {\n if (this.radioGroup) {\n // If the radio is inside a radio group, determine if it should be checked\n this.checked = this.radioGroup.value === this._value;\n\n if (this.checked) {\n this.radioGroup.selected = this;\n }\n\n // Copy name from parent radio group\n this.name = this.radioGroup.name;\n }\n }\n\n ngAfterViewInit() {\n this._focusMonitor.monitor(this._elementRef, true).subscribe(focusOrigin => {\n if (!focusOrigin && this.radioGroup) {\n this.radioGroup._touch();\n }\n });\n }\n\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n this._removeUniqueSelectionListener();\n }\n\n /** Dispatch change event with current value. */\n private _emitChangeEvent(): void {\n this.change.emit(new MatRadioChange(this, this._value));\n }\n\n _isRippleDisabled() {\n return this.disableRipple || this.disabled;\n }\n\n _onInputClick(event: Event) {\n // We have to stop propagation for click events on the visual hidden input element.\n // By default, when a user clicks on a label element, a generated click event will be\n // dispatched on the associated input element. Since we are using a label element as our\n // root container, the click event on the `radio-button` will be executed twice.\n // The real click event will bubble up, and the generated click event also tries to bubble up.\n // This will lead to multiple click events.\n // Preventing bubbling for the second event will solve that issue.\n event.stopPropagation();\n }\n\n /** Triggered when the radio button receives an interaction from the user. */\n _onInputInteraction(event: Event) {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the `change` output.\n event.stopPropagation();\n\n if (!this.checked && !this.disabled) {\n const groupValueChanged = this.radioGroup && this.value !== this.radioGroup.value;\n this.checked = true;\n this._emitChangeEvent();\n\n if (this.radioGroup) {\n this.radioGroup._controlValueAccessorChangeFn(this.value);\n if (groupValueChanged) {\n this.radioGroup._emitChangeEvent();\n }\n }\n }\n }\n\n /** Sets the disabled state and marks for check if a change occurred. */\n protected _setDisabled(value: boolean) {\n if (this._disabled !== value) {\n this._disabled = value;\n this._changeDetector.markForCheck();\n }\n }\n}\n\n/**\n * A Material design radio-button. Typically placed inside of `<mat-radio-group>` elements.\n */\n@Component({\n selector: 'mat-radio-button',\n templateUrl: 'radio.html',\n styleUrls: ['radio.css'],\n inputs: ['disableRipple', 'tabIndex'],\n encapsulation: ViewEncapsulation.None,\n exportAs: 'matRadioButton',\n host: {\n 'class': 'mat-radio-button',\n '[class.mat-radio-checked]': 'checked',\n '[class.mat-radio-disabled]': 'disabled',\n '[class._mat-animation-noopable]': '_noopAnimations',\n '[class.mat-primary]': 'color === \"primary\"',\n '[class.mat-accent]': 'color === \"accent\"',\n '[class.mat-warn]': 'color === \"warn\"',\n // Needs to be removed since it causes some a11y issues (see #21266).\n '[attr.tabindex]': 'null',\n '[attr.id]': 'id',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.aria-describedby]': 'null',\n // Note: under normal conditions focus shouldn't land on this element, however it may be\n // programmatically set, for example inside of a focus trap, in this case we want to forward\n // the focus to the native element.\n '(focus)': '_inputElement.nativeElement.focus()',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MatRadioButton extends _MatRadioButtonBase {\n constructor(\n @Optional() @Inject(MAT_RADIO_GROUP) radioGroup: MatRadioGroup,\n elementRef: ElementRef,\n changeDetector: ChangeDetectorRef,\n focusMonitor: FocusMonitor,\n radioDispatcher: UniqueSelectionDispatcher,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode?: string,\n @Optional()\n @Inject(MAT_RADIO_DEFAULT_OPTIONS)\n providerOverride?: MatRadioDefaultOptions,\n @Attribute('tabindex') tabIndex?: string,\n ) {\n super(\n radioGroup,\n elementRef,\n changeDetector,\n focusMonitor,\n radioDispatcher,\n animationMode,\n providerOverride,\n tabIndex,\n );\n }\n}\n","<!-- TODO(jelbourn): render the radio on either side of the content -->\n<!-- TODO(mtlin): Evaluate trade-offs of using native radio vs. cost of additional bindings. -->\n<label [attr.for]=\"inputId\" class=\"mat-radio-label\" #label>\n <!-- The actual 'radio' part of the control. -->\n <span class=\"mat-radio-container\">\n <span class=\"mat-radio-outer-circle\"></span>\n <span class=\"mat-radio-inner-circle\"></span>\n <input #input class=\"mat-radio-input\" type=\"radio\"\n [id]=\"inputId\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [tabIndex]=\"tabIndex\"\n [attr.name]=\"name\"\n [attr.value]=\"value\"\n [required]=\"required\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n (change)=\"_onInputInteraction($event)\"\n (click)=\"_onInputClick($event)\">\n\n <!-- The ripple comes after the input so that we can target it with a CSS\n sibling selector when the input is focused. -->\n <span mat-ripple class=\"mat-radio-ripple mat-focus-indicator\"\n [matRippleTrigger]=\"label\"\n [matRippleDisabled]=\"_isRippleDisabled()\"\n [matRippleCentered]=\"true\"\n [matRippleRadius]=\"20\"\n [matRippleAnimation]=\"{enterDuration: _noopAnimations ? 0 : 150}\">\n\n <span class=\"mat-ripple-element mat-radio-persistent-ripple\"></span>\n </span>\n </span>\n\n <!-- The label content for radio control. -->\n <span class=\"mat-radio-label-content\" [class.mat-radio-label-before]=\"labelPosition == 'before'\">\n <!-- Add an invisible span so JAWS can read the label -->\n <span style=\"display:none\">&nbsp;</span>\n <ng-content></ng-content>\n </span>\n</label>\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule, MatRippleModule} from '@angular/material/core';\nimport {MatRadioButton, MatRadioGroup} from './radio';\n\n@NgModule({\n imports: [MatRippleModule, MatCommonModule],\n exports: [MatRadioGroup, MatRadioButton, MatCommonModule],\n declarations: [MatRadioGroup, MatRadioButton],\n})\nexport class MatRadioModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './radio-module';\nexport * from './radio';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAgDa,yBAAyB,GAAG,IAAI,cAAc,CACzD,2BAA2B,EAC3B;IACE,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,iCAAiC;CAC3C,EACD;SAEc,iCAAiC;IAC/C,OAAO;QACL,KAAK,EAAE,QAAQ;KAChB,CAAC;AACJ,CAAC;AAED;AACA,IAAI,YAAY,GAAG,CAAC,CAAC;AAErB;;;;;MAKa,sCAAsC,GAAQ;IACzD,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EAAE,UAAU,CAAC,MAAM,aAAa,CAAC;IAC5C,KAAK,EAAE,IAAI;EACX;AAEF;MACa,cAAc;IACzB;;IAES,MAA2B;;IAE3B,KAAU;QAFV,WAAM,GAAN,MAAM,CAAqB;QAE3B,UAAK,GAAL,KAAK,CAAK;KACf;CACL;AAED;;;;;MAKa,eAAe,GAAG,IAAI,cAAc,CAC/C,eAAe,EACf;AAEF;;;;MAKsB,kBAAkB;IA8HtC,YAAoB,eAAkC;QAAlC,oBAAe,GAAf,eAAe,CAAmB;;QA1H9C,WAAM,GAAQ,IAAI,CAAC;;QAGnB,UAAK,GAAW,mBAAmB,YAAY,EAAE,EAAE,CAAC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