@angular/material 21.0.0-next.9 → 21.0.0-rc.0

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 (202) hide show
  1. package/core/tokens/_classes.scss +1 -1
  2. package/core/tokens/m2/_md-sys-color.scss +17 -17
  3. package/fesm2022/_animation-chunk.mjs +10 -16
  4. package/fesm2022/_animation-chunk.mjs.map +1 -1
  5. package/fesm2022/_date-formats-chunk.mjs +68 -164
  6. package/fesm2022/_date-formats-chunk.mjs.map +1 -1
  7. package/fesm2022/_date-range-input-harness-chunk.mjs +284 -463
  8. package/fesm2022/_date-range-input-harness-chunk.mjs.map +1 -1
  9. package/fesm2022/_error-options-chunk.mjs +56 -19
  10. package/fesm2022/_error-options-chunk.mjs.map +1 -1
  11. package/fesm2022/_error-state-chunk.mjs +24 -31
  12. package/fesm2022/_error-state-chunk.mjs.map +1 -1
  13. package/fesm2022/_form-field-chunk.mjs +1224 -1017
  14. package/fesm2022/_form-field-chunk.mjs.map +1 -1
  15. package/fesm2022/_icon-button-chunk.mjs +243 -187
  16. package/fesm2022/_icon-button-chunk.mjs.map +1 -1
  17. package/fesm2022/_icon-registry-chunk.mjs +350 -575
  18. package/fesm2022/_icon-registry-chunk.mjs.map +1 -1
  19. package/fesm2022/_input-harness-chunk.mjs +56 -107
  20. package/fesm2022/_input-harness-chunk.mjs.map +1 -1
  21. package/fesm2022/_input-value-accessor-chunk.mjs +0 -6
  22. package/fesm2022/_input-value-accessor-chunk.mjs.map +1 -1
  23. package/fesm2022/_internal-form-field-chunk.mjs +59 -19
  24. package/fesm2022/_internal-form-field-chunk.mjs.map +1 -1
  25. package/fesm2022/_line-chunk.mjs +83 -43
  26. package/fesm2022/_line-chunk.mjs.map +1 -1
  27. package/fesm2022/_option-chunk.mjs +348 -311
  28. package/fesm2022/_option-chunk.mjs.map +1 -1
  29. package/fesm2022/_option-harness-chunk.mjs +23 -39
  30. package/fesm2022/_option-harness-chunk.mjs.map +1 -1
  31. package/fesm2022/_option-module-chunk.mjs +36 -10
  32. package/fesm2022/_option-module-chunk.mjs.map +1 -1
  33. package/fesm2022/_pseudo-checkbox-chunk.mjs +79 -44
  34. package/fesm2022/_pseudo-checkbox-chunk.mjs.map +1 -1
  35. package/fesm2022/_pseudo-checkbox-module-chunk.mjs +36 -10
  36. package/fesm2022/_pseudo-checkbox-module-chunk.mjs.map +1 -1
  37. package/fesm2022/_public-api-chunk.mjs +71 -134
  38. package/fesm2022/_public-api-chunk.mjs.map +1 -1
  39. package/fesm2022/_ripple-chunk.mjs +504 -600
  40. package/fesm2022/_ripple-chunk.mjs.map +1 -1
  41. package/fesm2022/_ripple-loader-chunk.mjs +120 -138
  42. package/fesm2022/_ripple-loader-chunk.mjs.map +1 -1
  43. package/fesm2022/_ripple-module-chunk.mjs +36 -10
  44. package/fesm2022/_ripple-module-chunk.mjs.map +1 -1
  45. package/fesm2022/_structural-styles-chunk.mjs +37 -10
  46. package/fesm2022/_structural-styles-chunk.mjs.map +1 -1
  47. package/fesm2022/_tooltip-chunk.mjs +810 -888
  48. package/fesm2022/_tooltip-chunk.mjs.map +1 -1
  49. package/fesm2022/autocomplete-testing.mjs +62 -86
  50. package/fesm2022/autocomplete-testing.mjs.map +1 -1
  51. package/fesm2022/autocomplete.mjs +965 -1126
  52. package/fesm2022/autocomplete.mjs.map +1 -1
  53. package/fesm2022/badge-testing.mjs +38 -54
  54. package/fesm2022/badge-testing.mjs.map +1 -1
  55. package/fesm2022/badge.mjs +321 -272
  56. package/fesm2022/badge.mjs.map +1 -1
  57. package/fesm2022/bottom-sheet-testing.mjs +10 -24
  58. package/fesm2022/bottom-sheet-testing.mjs.map +1 -1
  59. package/fesm2022/bottom-sheet.mjs +349 -344
  60. package/fesm2022/bottom-sheet.mjs.map +1 -1
  61. package/fesm2022/button-testing.mjs +60 -94
  62. package/fesm2022/button-testing.mjs.map +1 -1
  63. package/fesm2022/button-toggle-testing.mjs +76 -125
  64. package/fesm2022/button-toggle-testing.mjs.map +1 -1
  65. package/fesm2022/button-toggle.mjs +752 -662
  66. package/fesm2022/button-toggle.mjs.map +1 -1
  67. package/fesm2022/button.mjs +263 -158
  68. package/fesm2022/button.mjs.map +1 -1
  69. package/fesm2022/card-testing.mjs +19 -33
  70. package/fesm2022/card-testing.mjs.map +1 -1
  71. package/fesm2022/card.mjs +576 -272
  72. package/fesm2022/card.mjs.map +1 -1
  73. package/fesm2022/checkbox-testing.mjs +71 -123
  74. package/fesm2022/checkbox-testing.mjs.map +1 -1
  75. package/fesm2022/checkbox.mjs +515 -477
  76. package/fesm2022/checkbox.mjs.map +1 -1
  77. package/fesm2022/chips-testing.mjs +201 -344
  78. package/fesm2022/chips-testing.mjs.map +1 -1
  79. package/fesm2022/chips.mjs +2552 -2289
  80. package/fesm2022/chips.mjs.map +1 -1
  81. package/fesm2022/core-testing.mjs +14 -28
  82. package/fesm2022/core-testing.mjs.map +1 -1
  83. package/fesm2022/core.mjs +357 -328
  84. package/fesm2022/core.mjs.map +1 -1
  85. package/fesm2022/datepicker-testing.mjs +15 -25
  86. package/fesm2022/datepicker-testing.mjs.map +1 -1
  87. package/fesm2022/datepicker.mjs +4826 -4563
  88. package/fesm2022/datepicker.mjs.map +1 -1
  89. package/fesm2022/dialog-testing.mjs +93 -129
  90. package/fesm2022/dialog-testing.mjs.map +1 -1
  91. package/fesm2022/dialog.mjs +810 -829
  92. package/fesm2022/dialog.mjs.map +1 -1
  93. package/fesm2022/divider-testing.mjs +10 -11
  94. package/fesm2022/divider-testing.mjs.map +1 -1
  95. package/fesm2022/divider.mjs +119 -43
  96. package/fesm2022/divider.mjs.map +1 -1
  97. package/fesm2022/expansion-testing.mjs +74 -130
  98. package/fesm2022/expansion-testing.mjs.map +1 -1
  99. package/fesm2022/expansion.mjs +703 -515
  100. package/fesm2022/expansion.mjs.map +1 -1
  101. package/fesm2022/form-field-testing-control.mjs +16 -33
  102. package/fesm2022/form-field-testing-control.mjs.map +1 -1
  103. package/fesm2022/form-field-testing.mjs +118 -179
  104. package/fesm2022/form-field-testing.mjs.map +1 -1
  105. package/fesm2022/form-field.mjs +36 -10
  106. package/fesm2022/form-field.mjs.map +1 -1
  107. package/fesm2022/grid-list-testing.mjs +65 -113
  108. package/fesm2022/grid-list-testing.mjs.map +1 -1
  109. package/fesm2022/grid-list.mjs +559 -494
  110. package/fesm2022/grid-list.mjs.map +1 -1
  111. package/fesm2022/icon-testing.mjs +148 -127
  112. package/fesm2022/icon-testing.mjs.map +1 -1
  113. package/fesm2022/icon.mjs +325 -351
  114. package/fesm2022/icon.mjs.map +1 -1
  115. package/fesm2022/input-testing.mjs +59 -99
  116. package/fesm2022/input-testing.mjs.map +1 -1
  117. package/fesm2022/input.mjs +457 -520
  118. package/fesm2022/input.mjs.map +1 -1
  119. package/fesm2022/list-testing.mjs +251 -434
  120. package/fesm2022/list-testing.mjs.map +1 -1
  121. package/fesm2022/list.mjs +1522 -1204
  122. package/fesm2022/list.mjs.map +1 -1
  123. package/fesm2022/material.mjs +0 -5
  124. package/fesm2022/material.mjs.map +1 -1
  125. package/fesm2022/menu-testing.mjs +159 -228
  126. package/fesm2022/menu-testing.mjs.map +1 -1
  127. package/fesm2022/menu.mjs +1338 -1343
  128. package/fesm2022/menu.mjs.map +1 -1
  129. package/fesm2022/paginator-testing.mjs +55 -79
  130. package/fesm2022/paginator-testing.mjs.map +1 -1
  131. package/fesm2022/paginator.mjs +381 -309
  132. package/fesm2022/paginator.mjs.map +1 -1
  133. package/fesm2022/progress-bar-testing.mjs +12 -21
  134. package/fesm2022/progress-bar-testing.mjs.map +1 -1
  135. package/fesm2022/progress-bar.mjs +224 -169
  136. package/fesm2022/progress-bar.mjs.map +1 -1
  137. package/fesm2022/progress-spinner-testing.mjs +13 -23
  138. package/fesm2022/progress-spinner-testing.mjs.map +1 -1
  139. package/fesm2022/progress-spinner.mjs +235 -160
  140. package/fesm2022/progress-spinner.mjs.map +1 -1
  141. package/fesm2022/radio-testing.mjs +133 -208
  142. package/fesm2022/radio-testing.mjs.map +1 -1
  143. package/fesm2022/radio.mjs +712 -679
  144. package/fesm2022/radio.mjs.map +1 -1
  145. package/fesm2022/select-testing.mjs +83 -117
  146. package/fesm2022/select-testing.mjs.map +1 -1
  147. package/fesm2022/select.mjs +1116 -1246
  148. package/fesm2022/select.mjs.map +1 -1
  149. package/fesm2022/sidenav-testing.mjs +54 -120
  150. package/fesm2022/sidenav-testing.mjs.map +1 -1
  151. package/fesm2022/sidenav.mjs +1078 -995
  152. package/fesm2022/sidenav.mjs.map +1 -1
  153. package/fesm2022/slide-toggle-testing.mjs +57 -92
  154. package/fesm2022/slide-toggle-testing.mjs.map +1 -1
  155. package/fesm2022/slide-toggle.mjs +369 -279
  156. package/fesm2022/slide-toggle.mjs.map +1 -1
  157. package/fesm2022/slider-testing.mjs +90 -138
  158. package/fesm2022/slider-testing.mjs.map +1 -1
  159. package/fesm2022/slider.mjs +1651 -1716
  160. package/fesm2022/slider.mjs.map +1 -1
  161. package/fesm2022/snack-bar-testing.mjs +40 -87
  162. package/fesm2022/snack-bar-testing.mjs.map +1 -1
  163. package/fesm2022/snack-bar.mjs +763 -714
  164. package/fesm2022/snack-bar.mjs.map +1 -1
  165. package/fesm2022/sort-testing.mjs +45 -66
  166. package/fesm2022/sort-testing.mjs.map +1 -1
  167. package/fesm2022/sort.mjs +419 -344
  168. package/fesm2022/sort.mjs.map +1 -1
  169. package/fesm2022/stepper-testing.mjs +78 -154
  170. package/fesm2022/stepper-testing.mjs.map +1 -1
  171. package/fesm2022/stepper.mjs +790 -498
  172. package/fesm2022/stepper.mjs.map +1 -1
  173. package/fesm2022/table-testing.mjs +120 -213
  174. package/fesm2022/table-testing.mjs.map +1 -1
  175. package/fesm2022/table.mjs +1026 -684
  176. package/fesm2022/table.mjs.map +1 -1
  177. package/fesm2022/tabs-testing.mjs +125 -197
  178. package/fesm2022/tabs-testing.mjs.map +1 -1
  179. package/fesm2022/tabs.mjs +2351 -2028
  180. package/fesm2022/tabs.mjs.map +1 -1
  181. package/fesm2022/timepicker-testing.mjs +113 -172
  182. package/fesm2022/timepicker-testing.mjs.map +1 -1
  183. package/fesm2022/timepicker.mjs +1019 -826
  184. package/fesm2022/timepicker.mjs.map +1 -1
  185. package/fesm2022/toolbar-testing.mjs +16 -27
  186. package/fesm2022/toolbar-testing.mjs.map +1 -1
  187. package/fesm2022/toolbar.mjs +163 -78
  188. package/fesm2022/toolbar.mjs.map +1 -1
  189. package/fesm2022/tooltip-testing.mjs +41 -52
  190. package/fesm2022/tooltip-testing.mjs.map +1 -1
  191. package/fesm2022/tooltip.mjs +36 -10
  192. package/fesm2022/tooltip.mjs.map +1 -1
  193. package/fesm2022/tree-testing.mjs +86 -162
  194. package/fesm2022/tree-testing.mjs.map +1 -1
  195. package/fesm2022/tree.mjs +638 -466
  196. package/fesm2022/tree.mjs.map +1 -1
  197. package/package.json +2 -2
  198. package/schematics/ng-add/index.js +1 -1
  199. package/types/expansion.d.ts +4 -2
  200. package/types/menu-testing.d.ts +2 -0
  201. package/types/select.d.ts +1 -1
  202. package/types/timepicker.d.ts +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"badge.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/badge/badge.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/badge/badge-module.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.dev/license\n */\n\nimport {_IdGenerator, AriaDescriber, InteractivityChecker} from '@angular/cdk/a11y';\n\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n Directive,\n ElementRef,\n inject,\n Input,\n NgZone,\n OnDestroy,\n OnInit,\n Renderer2,\n ViewEncapsulation,\n HOST_TAG_NAME,\n DOCUMENT,\n} from '@angular/core';\nimport {_animationsDisabled, ThemePalette} from '../core';\nimport {_CdkPrivateStyleLoader, _VisuallyHiddenLoader} from '@angular/cdk/private';\n\n/** Allowed position options for matBadgePosition */\nexport type MatBadgePosition =\n | 'above after'\n | 'above before'\n | 'below before'\n | 'below after'\n | 'before'\n | 'after'\n | 'above'\n | 'below';\n\n/** Allowed size options for matBadgeSize */\nexport type MatBadgeSize = 'small' | 'medium' | 'large';\n\nconst BADGE_CONTENT_CLASS = 'mat-badge-content';\n\n/**\n * Component used to load the structural styles of the badge.\n * @docs-private\n */\n@Component({\n styleUrl: 'badge.css',\n encapsulation: ViewEncapsulation.None,\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class _MatBadgeStyleLoader {}\n\n/** Directive to display a text badge. */\n@Directive({\n selector: '[matBadge]',\n host: {\n 'class': 'mat-badge',\n '[class.mat-badge-overlap]': 'overlap',\n '[class.mat-badge-above]': 'isAbove()',\n '[class.mat-badge-below]': '!isAbove()',\n '[class.mat-badge-before]': '!isAfter()',\n '[class.mat-badge-after]': 'isAfter()',\n '[class.mat-badge-small]': 'size === \"small\"',\n '[class.mat-badge-medium]': 'size === \"medium\"',\n '[class.mat-badge-large]': 'size === \"large\"',\n '[class.mat-badge-hidden]': 'hidden || !content',\n '[class.mat-badge-disabled]': 'disabled',\n },\n})\nexport class MatBadge implements OnInit, OnDestroy {\n private _ngZone = inject(NgZone);\n private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private _ariaDescriber = inject(AriaDescriber);\n private _renderer = inject(Renderer2);\n private _animationsDisabled = _animationsDisabled();\n private _idGenerator = inject(_IdGenerator);\n\n /**\n * Theme color of the badge. This API is supported in M2 themes only, it\n * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/badge/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n @Input('matBadgeColor')\n get color(): ThemePalette {\n return this._color;\n }\n set color(value: ThemePalette) {\n this._setColor(value);\n this._color = value;\n }\n private _color: ThemePalette = 'primary';\n\n /** Whether the badge should overlap its contents or not */\n @Input({alias: 'matBadgeOverlap', transform: booleanAttribute}) overlap: boolean = true;\n\n /** Whether the badge is disabled. */\n @Input({alias: 'matBadgeDisabled', transform: booleanAttribute}) disabled: boolean;\n\n /**\n * Position the badge should reside.\n * Accepts any combination of 'above'|'below' and 'before'|'after'\n */\n @Input('matBadgePosition') position: MatBadgePosition = 'above after';\n\n /** The content for the badge */\n @Input('matBadge')\n get content(): string | number | undefined | null {\n return this._content;\n }\n set content(newContent: string | number | undefined | null) {\n this._updateRenderedContent(newContent);\n }\n private _content: string | number | undefined | null;\n\n /** Message used to describe the decorated element via aria-describedby */\n @Input('matBadgeDescription')\n get description(): string {\n return this._description;\n }\n set description(newDescription: string) {\n this._updateDescription(newDescription);\n }\n private _description: string;\n\n /** Size of the badge. Can be 'small', 'medium', or 'large'. */\n @Input('matBadgeSize') size: MatBadgeSize = 'medium';\n\n /** Whether the badge is hidden. */\n @Input({alias: 'matBadgeHidden', transform: booleanAttribute}) hidden: boolean;\n\n /** Visible badge element. */\n private _badgeElement: HTMLElement | undefined;\n\n /** Inline badge description. Used when the badge is applied to non-interactive host elements. */\n private _inlineBadgeDescription: HTMLElement | undefined;\n\n /** Whether the OnInit lifecycle hook has run yet */\n private _isInitialized = false;\n\n /** InteractivityChecker to determine if the badge host is focusable. */\n private _interactivityChecker = inject(InteractivityChecker);\n\n private _document = inject(DOCUMENT);\n\n constructor(...args: unknown[]);\n\n constructor() {\n const styleLoader = inject(_CdkPrivateStyleLoader);\n styleLoader.load(_MatBadgeStyleLoader);\n styleLoader.load(_VisuallyHiddenLoader);\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const nativeElement = this._elementRef.nativeElement;\n\n if (nativeElement.nodeType !== nativeElement.ELEMENT_NODE) {\n throw Error('matBadge must be attached to an element node.');\n }\n\n const tagName = inject(HOST_TAG_NAME);\n\n // Heads-up for developers to avoid putting matBadge on <mat-icon>\n // as it is aria-hidden by default docs mention this at:\n // https://material.angular.dev/components/badge/overview#accessibility\n if (\n tagName.toLowerCase() === 'mat-icon' &&\n nativeElement.getAttribute('aria-hidden') === 'true'\n ) {\n console.warn(\n `Detected a matBadge on an \"aria-hidden\" \"<mat-icon>\". ` +\n `Consider setting aria-hidden=\"false\" in order to surface the information assistive technology.` +\n `\\n${nativeElement.outerHTML}`,\n );\n }\n }\n }\n\n /** Whether the badge is above the host or not */\n isAbove(): boolean {\n return this.position.indexOf('below') === -1;\n }\n\n /** Whether the badge is after the host or not */\n isAfter(): boolean {\n return this.position.indexOf('before') === -1;\n }\n\n /**\n * Gets the element into which the badge's content is being rendered. Undefined if the element\n * hasn't been created (e.g. if the badge doesn't have content).\n */\n getBadgeElement(): HTMLElement | undefined {\n return this._badgeElement;\n }\n\n ngOnInit() {\n // We may have server-side rendered badge that we need to clear.\n // We need to do this in ngOnInit because the full content of the component\n // on which the badge is attached won't necessarily be in the DOM until this point.\n this._clearExistingBadges();\n\n if (this.content && !this._badgeElement) {\n this._badgeElement = this._createBadgeElement();\n this._updateRenderedContent(this.content);\n }\n\n this._isInitialized = true;\n }\n\n ngOnDestroy() {\n // ViewEngine only: when creating a badge through the Renderer, Angular remembers its index.\n // We have to destroy it ourselves, otherwise it'll be retained in memory.\n if (this._renderer.destroyNode) {\n this._renderer.destroyNode(this._badgeElement);\n this._inlineBadgeDescription?.remove();\n }\n\n this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this.description);\n }\n\n /** Gets whether the badge's host element is interactive. */\n private _isHostInteractive(): boolean {\n // Ignore visibility since it requires an expensive style caluclation.\n return this._interactivityChecker.isFocusable(this._elementRef.nativeElement, {\n ignoreVisibility: true,\n });\n }\n\n /** Creates the badge element */\n private _createBadgeElement(): HTMLElement {\n const badgeElement = this._renderer.createElement('span');\n const activeClass = 'mat-badge-active';\n\n badgeElement.setAttribute('id', this._idGenerator.getId('mat-badge-content-'));\n\n // The badge is aria-hidden because we don't want it to appear in the page's navigation\n // flow. Instead, we use the badge to describe the decorated element with aria-describedby.\n badgeElement.setAttribute('aria-hidden', 'true');\n badgeElement.classList.add(BADGE_CONTENT_CLASS);\n\n if (this._animationsDisabled) {\n badgeElement.classList.add('_mat-animation-noopable');\n }\n\n this._elementRef.nativeElement.appendChild(badgeElement);\n\n // animate in after insertion\n if (typeof requestAnimationFrame === 'function' && !this._animationsDisabled) {\n this._ngZone.runOutsideAngular(() => {\n requestAnimationFrame(() => {\n badgeElement.classList.add(activeClass);\n });\n });\n } else {\n badgeElement.classList.add(activeClass);\n }\n\n return badgeElement;\n }\n\n /** Update the text content of the badge element in the DOM, creating the element if necessary. */\n private _updateRenderedContent(newContent: string | number | undefined | null): void {\n const newContentNormalized: string = `${newContent ?? ''}`.trim();\n\n // Don't create the badge element if the directive isn't initialized because we want to\n // append the badge element to the *end* of the host element's content for backwards\n // compatibility.\n if (this._isInitialized && newContentNormalized && !this._badgeElement) {\n this._badgeElement = this._createBadgeElement();\n }\n\n if (this._badgeElement) {\n this._badgeElement.textContent = newContentNormalized;\n }\n\n this._content = newContentNormalized;\n }\n\n /** Updates the host element's aria description via AriaDescriber. */\n private _updateDescription(newDescription: string): void {\n // Always start by removing the aria-describedby; we will add a new one if necessary.\n this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this.description);\n\n // NOTE: We only check whether the host is interactive here, which happens during\n // when then badge content changes. It is possible that the host changes\n // interactivity status separate from one of these. However, watching the interactivity\n // status of the host would require a `MutationObserver`, which is likely more code + overhead\n // than it's worth; from usages inside Google, we see that the vats majority of badges either\n // never change interactivity, or also set `matBadgeHidden` based on the same condition.\n\n if (!newDescription || this._isHostInteractive()) {\n this._removeInlineDescription();\n }\n\n this._description = newDescription;\n\n // We don't add `aria-describedby` for non-interactive hosts elements because we\n // instead insert the description inline.\n if (this._isHostInteractive()) {\n this._ariaDescriber.describe(this._elementRef.nativeElement, newDescription);\n } else {\n this._updateInlineDescription();\n }\n }\n\n private _updateInlineDescription() {\n // Create the inline description element if it doesn't exist\n if (!this._inlineBadgeDescription) {\n this._inlineBadgeDescription = this._document.createElement('span');\n this._inlineBadgeDescription.classList.add('cdk-visually-hidden');\n }\n\n this._inlineBadgeDescription.textContent = this.description;\n this._badgeElement?.appendChild(this._inlineBadgeDescription);\n }\n\n private _removeInlineDescription() {\n this._inlineBadgeDescription?.remove();\n this._inlineBadgeDescription = undefined;\n }\n\n /** Adds css theme class given the color to the component host */\n private _setColor(colorPalette: ThemePalette) {\n const classList = this._elementRef.nativeElement.classList;\n classList.remove(`mat-badge-${this._color}`);\n if (colorPalette) {\n classList.add(`mat-badge-${colorPalette}`);\n }\n }\n\n /** Clears any existing badges that might be left over from server-side rendering. */\n private _clearExistingBadges() {\n // Only check direct children of this host element in order to avoid deleting\n // any badges that might exist in descendant elements.\n const badges = this._elementRef.nativeElement.querySelectorAll(\n `:scope > .${BADGE_CONTENT_CLASS}`,\n );\n for (const badgeElement of Array.from(badges)) {\n if (badgeElement !== this._badgeElement) {\n badgeElement.remove();\n }\n }\n }\n}\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.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {A11yModule} from '@angular/cdk/a11y';\nimport {BidiModule} from '@angular/cdk/bidi';\nimport {MatBadge, _MatBadgeStyleLoader} from './badge';\n\n@NgModule({\n // Note: we _shouldn't_ have to import `_MatBadgeStyleLoader`,\n // but it seems to be necessary for tests.\n imports: [A11yModule, MatBadge, _MatBadgeStyleLoader],\n exports: [MatBadge, BidiModule],\n})\nexport class MatBadgeModule {}\n"],"names":[],"mappings":";;;;;;;;AA2CA,MAAM,mBAAmB,GAAG,mBAAmB;AAE/C;;;AAGG;MAOU,oBAAoB,CAAA;8GAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EA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OAAA,EAAA,CAC1C,QAAQ,EAAE,UAAU,CAAA,EAAA,CAAA;+GAEnB,cAAc,EAAA,OAAA,EAAA,CAHf,UAAU,EACA,UAAU,CAAA,EAAA,CAAA;;kGAEnB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;;;AAGR,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,oBAAoB,CAAC;AACrD,oBAAA,OAAO,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC;AAChC,iBAAA;;;;;"}
1
+ {"version":3,"file":"badge.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/badge/badge.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/badge/badge-module.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.dev/license\n */\n\nimport {_IdGenerator, AriaDescriber, InteractivityChecker} from '@angular/cdk/a11y';\n\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n Directive,\n ElementRef,\n inject,\n Input,\n NgZone,\n OnDestroy,\n OnInit,\n Renderer2,\n ViewEncapsulation,\n HOST_TAG_NAME,\n DOCUMENT,\n} from '@angular/core';\nimport {_animationsDisabled, ThemePalette} from '../core';\nimport {_CdkPrivateStyleLoader, _VisuallyHiddenLoader} from '@angular/cdk/private';\n\n/** Allowed position options for matBadgePosition */\nexport type MatBadgePosition =\n | 'above after'\n | 'above before'\n | 'below before'\n | 'below after'\n | 'before'\n | 'after'\n | 'above'\n | 'below';\n\n/** Allowed size options for matBadgeSize */\nexport type MatBadgeSize = 'small' | 'medium' | 'large';\n\nconst BADGE_CONTENT_CLASS = 'mat-badge-content';\n\n/**\n * Component used to load the structural styles of the badge.\n * @docs-private\n */\n@Component({\n styleUrl: 'badge.css',\n encapsulation: ViewEncapsulation.None,\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class _MatBadgeStyleLoader {}\n\n/** Directive to display a text badge. */\n@Directive({\n selector: '[matBadge]',\n host: {\n 'class': 'mat-badge',\n '[class.mat-badge-overlap]': 'overlap',\n '[class.mat-badge-above]': 'isAbove()',\n '[class.mat-badge-below]': '!isAbove()',\n '[class.mat-badge-before]': '!isAfter()',\n '[class.mat-badge-after]': 'isAfter()',\n '[class.mat-badge-small]': 'size === \"small\"',\n '[class.mat-badge-medium]': 'size === \"medium\"',\n '[class.mat-badge-large]': 'size === \"large\"',\n '[class.mat-badge-hidden]': 'hidden || !content',\n '[class.mat-badge-disabled]': 'disabled',\n },\n})\nexport class MatBadge implements OnInit, OnDestroy {\n private _ngZone = inject(NgZone);\n private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private _ariaDescriber = inject(AriaDescriber);\n private _renderer = inject(Renderer2);\n private _animationsDisabled = _animationsDisabled();\n private _idGenerator = inject(_IdGenerator);\n\n /**\n * Theme color of the badge. This API is supported in M2 themes only, it\n * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/badge/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n @Input('matBadgeColor')\n get color(): ThemePalette {\n return this._color;\n }\n set color(value: ThemePalette) {\n this._setColor(value);\n this._color = value;\n }\n private _color: ThemePalette = 'primary';\n\n /** Whether the badge should overlap its contents or not */\n @Input({alias: 'matBadgeOverlap', transform: booleanAttribute}) overlap: boolean = true;\n\n /** Whether the badge is disabled. */\n @Input({alias: 'matBadgeDisabled', transform: booleanAttribute}) disabled: boolean;\n\n /**\n * Position the badge should reside.\n * Accepts any combination of 'above'|'below' and 'before'|'after'\n */\n @Input('matBadgePosition') position: MatBadgePosition = 'above after';\n\n /** The content for the badge */\n @Input('matBadge')\n get content(): string | number | undefined | null {\n return this._content;\n }\n set content(newContent: string | number | undefined | null) {\n this._updateRenderedContent(newContent);\n }\n private _content: string | number | undefined | null;\n\n /** Message used to describe the decorated element via aria-describedby */\n @Input('matBadgeDescription')\n get description(): string {\n return this._description;\n }\n set description(newDescription: string) {\n this._updateDescription(newDescription);\n }\n private _description: string;\n\n /** Size of the badge. Can be 'small', 'medium', or 'large'. */\n @Input('matBadgeSize') size: MatBadgeSize = 'medium';\n\n /** Whether the badge is hidden. */\n @Input({alias: 'matBadgeHidden', transform: booleanAttribute}) hidden: boolean;\n\n /** Visible badge element. */\n private _badgeElement: HTMLElement | undefined;\n\n /** Inline badge description. Used when the badge is applied to non-interactive host elements. */\n private _inlineBadgeDescription: HTMLElement | undefined;\n\n /** Whether the OnInit lifecycle hook has run yet */\n private _isInitialized = false;\n\n /** InteractivityChecker to determine if the badge host is focusable. */\n private _interactivityChecker = inject(InteractivityChecker);\n\n private _document = inject(DOCUMENT);\n\n constructor(...args: unknown[]);\n\n constructor() {\n const styleLoader = inject(_CdkPrivateStyleLoader);\n styleLoader.load(_MatBadgeStyleLoader);\n styleLoader.load(_VisuallyHiddenLoader);\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const nativeElement = this._elementRef.nativeElement;\n\n if (nativeElement.nodeType !== nativeElement.ELEMENT_NODE) {\n throw Error('matBadge must be attached to an element node.');\n }\n\n const tagName = inject(HOST_TAG_NAME);\n\n // Heads-up for developers to avoid putting matBadge on <mat-icon>\n // as it is aria-hidden by default docs mention this at:\n // https://material.angular.dev/components/badge/overview#accessibility\n if (\n tagName.toLowerCase() === 'mat-icon' &&\n nativeElement.getAttribute('aria-hidden') === 'true'\n ) {\n console.warn(\n `Detected a matBadge on an \"aria-hidden\" \"<mat-icon>\". ` +\n `Consider setting aria-hidden=\"false\" in order to surface the information assistive technology.` +\n `\\n${nativeElement.outerHTML}`,\n );\n }\n }\n }\n\n /** Whether the badge is above the host or not */\n isAbove(): boolean {\n return this.position.indexOf('below') === -1;\n }\n\n /** Whether the badge is after the host or not */\n isAfter(): boolean {\n return this.position.indexOf('before') === -1;\n }\n\n /**\n * Gets the element into which the badge's content is being rendered. Undefined if the element\n * hasn't been created (e.g. if the badge doesn't have content).\n */\n getBadgeElement(): HTMLElement | undefined {\n return this._badgeElement;\n }\n\n ngOnInit() {\n // We may have server-side rendered badge that we need to clear.\n // We need to do this in ngOnInit because the full content of the component\n // on which the badge is attached won't necessarily be in the DOM until this point.\n this._clearExistingBadges();\n\n if (this.content && !this._badgeElement) {\n this._badgeElement = this._createBadgeElement();\n this._updateRenderedContent(this.content);\n }\n\n this._isInitialized = true;\n }\n\n ngOnDestroy() {\n // ViewEngine only: when creating a badge through the Renderer, Angular remembers its index.\n // We have to destroy it ourselves, otherwise it'll be retained in memory.\n if (this._renderer.destroyNode) {\n this._renderer.destroyNode(this._badgeElement);\n this._inlineBadgeDescription?.remove();\n }\n\n this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this.description);\n }\n\n /** Gets whether the badge's host element is interactive. */\n private _isHostInteractive(): boolean {\n // Ignore visibility since it requires an expensive style caluclation.\n return this._interactivityChecker.isFocusable(this._elementRef.nativeElement, {\n ignoreVisibility: true,\n });\n }\n\n /** Creates the badge element */\n private _createBadgeElement(): HTMLElement {\n const badgeElement = this._renderer.createElement('span');\n const activeClass = 'mat-badge-active';\n\n badgeElement.setAttribute('id', this._idGenerator.getId('mat-badge-content-'));\n\n // The badge is aria-hidden because we don't want it to appear in the page's navigation\n // flow. Instead, we use the badge to describe the decorated element with aria-describedby.\n badgeElement.setAttribute('aria-hidden', 'true');\n badgeElement.classList.add(BADGE_CONTENT_CLASS);\n\n if (this._animationsDisabled) {\n badgeElement.classList.add('_mat-animation-noopable');\n }\n\n this._elementRef.nativeElement.appendChild(badgeElement);\n\n // animate in after insertion\n if (typeof requestAnimationFrame === 'function' && !this._animationsDisabled) {\n this._ngZone.runOutsideAngular(() => {\n requestAnimationFrame(() => {\n badgeElement.classList.add(activeClass);\n });\n });\n } else {\n badgeElement.classList.add(activeClass);\n }\n\n return badgeElement;\n }\n\n /** Update the text content of the badge element in the DOM, creating the element if necessary. */\n private _updateRenderedContent(newContent: string | number | undefined | null): void {\n const newContentNormalized: string = `${newContent ?? ''}`.trim();\n\n // Don't create the badge element if the directive isn't initialized because we want to\n // append the badge element to the *end* of the host element's content for backwards\n // compatibility.\n if (this._isInitialized && newContentNormalized && !this._badgeElement) {\n this._badgeElement = this._createBadgeElement();\n }\n\n if (this._badgeElement) {\n this._badgeElement.textContent = newContentNormalized;\n }\n\n this._content = newContentNormalized;\n }\n\n /** Updates the host element's aria description via AriaDescriber. */\n private _updateDescription(newDescription: string): void {\n // Always start by removing the aria-describedby; we will add a new one if necessary.\n this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this.description);\n\n // NOTE: We only check whether the host is interactive here, which happens during\n // when then badge content changes. It is possible that the host changes\n // interactivity status separate from one of these. However, watching the interactivity\n // status of the host would require a `MutationObserver`, which is likely more code + overhead\n // than it's worth; from usages inside Google, we see that the vats majority of badges either\n // never change interactivity, or also set `matBadgeHidden` based on the same condition.\n\n if (!newDescription || this._isHostInteractive()) {\n this._removeInlineDescription();\n }\n\n this._description = newDescription;\n\n // We don't add `aria-describedby` for non-interactive hosts elements because we\n // instead insert the description inline.\n if (this._isHostInteractive()) {\n this._ariaDescriber.describe(this._elementRef.nativeElement, newDescription);\n } else {\n this._updateInlineDescription();\n }\n }\n\n private _updateInlineDescription() {\n // Create the inline description element if it doesn't exist\n if (!this._inlineBadgeDescription) {\n this._inlineBadgeDescription = this._document.createElement('span');\n this._inlineBadgeDescription.classList.add('cdk-visually-hidden');\n }\n\n this._inlineBadgeDescription.textContent = this.description;\n this._badgeElement?.appendChild(this._inlineBadgeDescription);\n }\n\n private _removeInlineDescription() {\n this._inlineBadgeDescription?.remove();\n this._inlineBadgeDescription = undefined;\n }\n\n /** Adds css theme class given the color to the component host */\n private _setColor(colorPalette: ThemePalette) {\n const classList = this._elementRef.nativeElement.classList;\n classList.remove(`mat-badge-${this._color}`);\n if (colorPalette) {\n classList.add(`mat-badge-${colorPalette}`);\n }\n }\n\n /** Clears any existing badges that might be left over from server-side rendering. */\n private _clearExistingBadges() {\n // Only check direct children of this host element in order to avoid deleting\n // any badges that might exist in descendant elements.\n const badges = this._elementRef.nativeElement.querySelectorAll(\n `:scope > .${BADGE_CONTENT_CLASS}`,\n );\n for (const badgeElement of Array.from(badges)) {\n if (badgeElement !== this._badgeElement) {\n badgeElement.remove();\n }\n }\n }\n}\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.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {A11yModule} from '@angular/cdk/a11y';\nimport {BidiModule} from '@angular/cdk/bidi';\nimport {MatBadge, _MatBadgeStyleLoader} from './badge';\n\n@NgModule({\n // Note: we _shouldn't_ have to import `_MatBadgeStyleLoader`,\n // but it seems to be necessary for tests.\n imports: [A11yModule, MatBadge, _MatBadgeStyleLoader],\n exports: [MatBadge, BidiModule],\n})\nexport class MatBadgeModule {}\n"],"names":["ɵcmp","i0","ɵɵngDeclareComponent","minVersion","version","type","_MatBadgeStyleLoader","isStandalone","selector","ngImport","template","isInline","styles","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","args","AriaDescriber","_idGenerator","inject","_IdGenerator","color","overlap","position","content","_updateRenderedContent","newContent","_content","description","newDescription","_description","_inlineBadgeDescription","InteractivityChecker","_document","DOCUMENT","constructor","styleLoader","_CdkPrivateStyleLoader","load","_VisuallyHiddenLoader","ngDevMode","nativeElement","_elementRef","nodeType","HOST_TAG_NAME","tagName","toLowerCase","getAttribute","outerHTML","indexOf","isAfter","getBadgeElement","_badgeElement","_createBadgeElement","ngOnDestroy","remove","_ariaDescriber","removeDescription","_isHostInteractive","_interactivityChecker","setAttribute","getId","badgeElement","classList","add","BADGE_CONTENT_CLASS","_animationsDisabled","requestAnimationFrame","_ngZone","runOutsideAngular","activeClass","ctorParameters","propDecorators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,IAAA,EAAA,KAAA;;;;;;AAGA,IAAA,QAAA,EAAA,CAAA;;;;;;;;AA0CyCnB,MAAAA,IAAA,EAAAuE,KAAA;aAAA,kBAAA;;WAAA,EAAA,CAAA;AAGjDvE,MAAAA,IAAA,EAAAuE,KAAA;aAAA,UAAA;;eAAA,EAAA,CAAA;;;;;iBAYS;aADM,cAAA;;AAAA,IAAA,MAAA,EAAA,CAAA;iBAab;AADE,MAAA,IAAA,EAAA,CAAA;QAAAC,KAAA,EAAA,gBAAA;AAAAC,QAAAA,SAAA,EAAAC;AAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BCpML,CAAA;AAAA5E,EAAAA,UAAQ,EAAA,QAAA;EAAAC,OAAA,EAAA,eAAA;AAAAK,EAAAA,QAAA,EAAAR,EAAA;AAAAI,EAAAA,IAAA,EAAA2E,cAAA;EAAAC,UAAA,EAAA,CAAA;;;;;;;;;;;"}
@@ -1,30 +1,16 @@
1
1
  import { ContentContainerComponentHarness, HarnessPredicate, TestKey } from '@angular/cdk/testing';
2
2
 
3
- /** Harness for interacting with a standard MatBottomSheet in tests. */
4
3
  class MatBottomSheetHarness extends ContentContainerComponentHarness {
5
- // Developers can provide a custom component or template for the
6
- // bottom sheet. The canonical parent is the ".mat-bottom-sheet-container".
7
- static hostSelector = '.mat-bottom-sheet-container:not([mat-exit])';
8
- /**
9
- * Gets a `HarnessPredicate` that can be used to search for a bottom sheet with
10
- * specific attributes.
11
- * @param options Options for narrowing the search.
12
- * @return a `HarnessPredicate` configured with the given options.
13
- */
14
- static with(options = {}) {
15
- return new HarnessPredicate(MatBottomSheetHarness, options);
16
- }
17
- /** Gets the value of the bottom sheet's "aria-label" attribute. */
18
- async getAriaLabel() {
19
- return (await this.host()).getAttribute('aria-label');
20
- }
21
- /**
22
- * Dismisses the bottom sheet by pressing escape. Note that this method cannot
23
- * be used if "disableClose" has been set to true via the config.
24
- */
25
- async dismiss() {
26
- await (await this.host()).sendKeys(TestKey.ESCAPE);
27
- }
4
+ static hostSelector = '.mat-bottom-sheet-container:not([mat-exit])';
5
+ static with(options = {}) {
6
+ return new HarnessPredicate(MatBottomSheetHarness, options);
7
+ }
8
+ async getAriaLabel() {
9
+ return (await this.host()).getAttribute('aria-label');
10
+ }
11
+ async dismiss() {
12
+ await (await this.host()).sendKeys(TestKey.ESCAPE);
13
+ }
28
14
  }
29
15
 
30
16
  export { MatBottomSheetHarness };
@@ -1 +1 @@
1
- {"version":3,"file":"bottom-sheet-testing.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/bottom-sheet/testing/bottom-sheet-harness.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.dev/license\n */\n\nimport {ContentContainerComponentHarness, HarnessPredicate, TestKey} from '@angular/cdk/testing';\nimport {BottomSheetHarnessFilters} from './bottom-sheet-harness-filters';\n\n/** Harness for interacting with a standard MatBottomSheet in tests. */\nexport class MatBottomSheetHarness extends ContentContainerComponentHarness<string> {\n // Developers can provide a custom component or template for the\n // bottom sheet. The canonical parent is the \".mat-bottom-sheet-container\".\n static hostSelector = '.mat-bottom-sheet-container:not([mat-exit])';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a bottom sheet with\n * specific attributes.\n * @param options Options for narrowing the search.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: BottomSheetHarnessFilters = {}): HarnessPredicate<MatBottomSheetHarness> {\n return new HarnessPredicate(MatBottomSheetHarness, options);\n }\n\n /** Gets the value of the bottom sheet's \"aria-label\" attribute. */\n async getAriaLabel(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-label');\n }\n\n /**\n * Dismisses the bottom sheet by pressing escape. Note that this method cannot\n * be used if \"disableClose\" has been set to true via the config.\n */\n async dismiss(): Promise<void> {\n await (await this.host()).sendKeys(TestKey.ESCAPE);\n }\n}\n"],"names":[],"mappings":";;AAWA;AACM,MAAO,qBAAsB,SAAQ,gCAAwC,CAAA;;;AAGjF,IAAA,OAAO,YAAY,GAAG,6CAA6C;AAEnE;;;;;AAKG;AACH,IAAA,OAAO,IAAI,CAAC,OAAA,GAAqC,EAAE,EAAA;AACjD,QAAA,OAAO,IAAI,gBAAgB,CAAC,qBAAqB,EAAE,OAAO,CAAC;;;AAI7D,IAAA,MAAM,YAAY,GAAA;AAChB,QAAA,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,YAAY,CAAC;;AAGvD;;;AAGG;AACH,IAAA,MAAM,OAAO,GAAA;AACX,QAAA,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC;;;;;;"}
1
+ {"version":3,"file":"bottom-sheet-testing.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/material/bottom-sheet/testing/bottom-sheet-harness.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.dev/license\n */\n\nimport {ContentContainerComponentHarness, HarnessPredicate, TestKey} from '@angular/cdk/testing';\nimport {BottomSheetHarnessFilters} from './bottom-sheet-harness-filters';\n\n/** Harness for interacting with a standard MatBottomSheet in tests. */\nexport class MatBottomSheetHarness extends ContentContainerComponentHarness<string> {\n // Developers can provide a custom component or template for the\n // bottom sheet. The canonical parent is the \".mat-bottom-sheet-container\".\n static hostSelector = '.mat-bottom-sheet-container:not([mat-exit])';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a bottom sheet with\n * specific attributes.\n * @param options Options for narrowing the search.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: BottomSheetHarnessFilters = {}): HarnessPredicate<MatBottomSheetHarness> {\n return new HarnessPredicate(MatBottomSheetHarness, options);\n }\n\n /** Gets the value of the bottom sheet's \"aria-label\" attribute. */\n async getAriaLabel(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-label');\n }\n\n /**\n * Dismisses the bottom sheet by pressing escape. Note that this method cannot\n * be used if \"disableClose\" has been set to true via the config.\n */\n async dismiss(): Promise<void> {\n await (await this.host()).sendKeys(TestKey.ESCAPE);\n }\n}\n"],"names":["with","options","HarnessPredicate","MatBottomSheetHarness"],"mappings":";;;;SA2BqEA,IAAAA,CAAAC,OAAA,GAAA,EAAA,EAAA;AAEjE,IAAA,OAAA,IAAAC,gBAAA,CAAAC,qBAAA,EAAAF,OAAA,CAAA;;;;;;;;;;;;"}