@ionic/core 7.7.2-nightly.20240208 → 7.7.2-nightly.20240212

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 (88) hide show
  1. package/components/action-sheet.js +7 -3
  2. package/components/alert.js +6 -2
  3. package/components/ion-loading.js +6 -2
  4. package/components/ion-modal.js +7 -3
  5. package/components/ion-picker.js +6 -2
  6. package/components/ion-toast.js +6 -2
  7. package/components/overlays.js +25 -1
  8. package/components/popover.js +6 -2
  9. package/dist/cjs/index.cjs.js +1 -1
  10. package/dist/cjs/ion-action-sheet.cjs.entry.js +8 -4
  11. package/dist/cjs/ion-alert.cjs.entry.js +7 -3
  12. package/dist/cjs/ion-datetime_3.cjs.entry.js +7 -3
  13. package/dist/cjs/ion-loading.cjs.entry.js +7 -3
  14. package/dist/cjs/ion-menu_3.cjs.entry.js +1 -1
  15. package/dist/cjs/ion-modal.cjs.entry.js +8 -4
  16. package/dist/cjs/ion-popover.cjs.entry.js +7 -3
  17. package/dist/cjs/ion-select_3.cjs.entry.js +1 -1
  18. package/dist/cjs/ion-toast.cjs.entry.js +7 -3
  19. package/dist/cjs/{overlays-c0b199e9.js → overlays-853fbc2a.js} +25 -1
  20. package/dist/collection/components/action-sheet/action-sheet.js +9 -5
  21. package/dist/collection/components/alert/alert.js +8 -4
  22. package/dist/collection/components/loading/loading.js +8 -4
  23. package/dist/collection/components/modal/modal.js +9 -5
  24. package/dist/collection/components/picker/picker.js +8 -4
  25. package/dist/collection/components/popover/popover.js +8 -4
  26. package/dist/collection/components/toast/test/toast.spec.js +12 -0
  27. package/dist/collection/components/toast/toast.js +8 -4
  28. package/dist/collection/utils/overlays.js +25 -1
  29. package/dist/collection/utils/test/overlays/overlays.spec.js +51 -0
  30. package/dist/docs.json +22 -22
  31. package/dist/esm/index.js +1 -1
  32. package/dist/esm/ion-action-sheet.entry.js +8 -4
  33. package/dist/esm/ion-alert.entry.js +7 -3
  34. package/dist/esm/ion-datetime_3.entry.js +7 -3
  35. package/dist/esm/ion-loading.entry.js +7 -3
  36. package/dist/esm/ion-menu_3.entry.js +1 -1
  37. package/dist/esm/ion-modal.entry.js +8 -4
  38. package/dist/esm/ion-popover.entry.js +7 -3
  39. package/dist/esm/ion-select_3.entry.js +1 -1
  40. package/dist/esm/ion-toast.entry.js +7 -3
  41. package/dist/esm/{overlays-141e4a0f.js → overlays-f628ea0d.js} +25 -1
  42. package/dist/esm-es5/index.js +1 -1
  43. package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
  44. package/dist/esm-es5/ion-alert.entry.js +1 -1
  45. package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
  46. package/dist/esm-es5/ion-loading.entry.js +1 -1
  47. package/dist/esm-es5/ion-menu_3.entry.js +1 -1
  48. package/dist/esm-es5/ion-modal.entry.js +1 -1
  49. package/dist/esm-es5/ion-popover.entry.js +1 -1
  50. package/dist/esm-es5/ion-select_3.entry.js +1 -1
  51. package/dist/esm-es5/ion-toast.entry.js +1 -1
  52. package/dist/esm-es5/overlays-f628ea0d.js +4 -0
  53. package/dist/ionic/index.esm.js +1 -1
  54. package/dist/ionic/ionic.esm.js +1 -1
  55. package/dist/ionic/{p-09104e40.system.entry.js → p-02228941.system.entry.js} +1 -1
  56. package/dist/ionic/{p-77b5178b.system.entry.js → p-03ef11fd.system.entry.js} +1 -1
  57. package/dist/ionic/p-33c1d796.system.js +1 -1
  58. package/dist/ionic/{p-84074821.entry.js → p-36129d85.entry.js} +1 -1
  59. package/dist/ionic/{p-1e516e45.entry.js → p-379dc0d8.entry.js} +1 -1
  60. package/dist/ionic/{p-f3d6ac85.system.entry.js → p-3996f9d5.system.entry.js} +1 -1
  61. package/dist/ionic/p-554cdfa6.js +4 -0
  62. package/dist/ionic/{p-1c425012.system.entry.js → p-6b5ddd6f.system.entry.js} +2 -2
  63. package/dist/ionic/{p-34c60592.system.entry.js → p-6c03fe3f.system.entry.js} +1 -1
  64. package/dist/ionic/{p-bbfd2cd0.system.entry.js → p-779fb2ab.system.entry.js} +1 -1
  65. package/dist/ionic/{p-6869d193.system.entry.js → p-7b71daed.system.entry.js} +1 -1
  66. package/dist/ionic/{p-c5ae804f.entry.js → p-80c7dd10.entry.js} +1 -1
  67. package/dist/ionic/{p-59b06910.entry.js → p-9e986623.entry.js} +1 -1
  68. package/dist/ionic/{p-7d9f8991.entry.js → p-a06dd73e.entry.js} +1 -1
  69. package/dist/ionic/{p-8942c4f0.entry.js → p-a726c887.entry.js} +1 -1
  70. package/dist/ionic/{p-389a681c.entry.js → p-a9de90a5.entry.js} +1 -1
  71. package/dist/ionic/{p-0c2363a9.system.js → p-b964aaa3.system.js} +1 -1
  72. package/dist/ionic/{p-79ff281e.entry.js → p-c05246a7.entry.js} +1 -1
  73. package/dist/ionic/{p-62ea79fb.system.js → p-c2895673.system.js} +1 -1
  74. package/dist/ionic/{p-10f54620.entry.js → p-c98011a7.entry.js} +1 -1
  75. package/dist/ionic/{p-a29e7420.system.entry.js → p-d51bf7d0.system.entry.js} +1 -1
  76. package/dist/ionic/{p-223b1692.system.entry.js → p-e49bc381.system.entry.js} +1 -1
  77. package/dist/types/components/action-sheet/action-sheet.d.ts +4 -0
  78. package/dist/types/components/alert/alert.d.ts +4 -0
  79. package/dist/types/components/loading/loading.d.ts +4 -0
  80. package/dist/types/components/modal/modal.d.ts +4 -0
  81. package/dist/types/components/picker/picker.d.ts +4 -0
  82. package/dist/types/components/popover/popover.d.ts +4 -0
  83. package/dist/types/components/toast/toast.d.ts +4 -0
  84. package/dist/types/components.d.ts +7 -7
  85. package/hydrate/index.js +69 -17
  86. package/package.json +2 -2
  87. package/dist/esm-es5/overlays-141e4a0f.js +0 -4
  88. package/dist/ionic/p-7888a87b.js +0 -4
@@ -177,6 +177,10 @@ const ActionSheet = /*@__PURE__*/ proxyCustomElement(class ActionSheet extends H
177
177
  * This can be useful in a button handler for determining which button was
178
178
  * clicked to dismiss the action sheet.
179
179
  * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
180
+ *
181
+ * This is a no-op if the overlay has not been presented yet. If you want
182
+ * to remove an overlay from the DOM that was never presented, use the
183
+ * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
180
184
  */
181
185
  async dismiss(data, role) {
182
186
  const unlock = await this.lockController.lock();
@@ -285,12 +289,12 @@ const ActionSheet = /*@__PURE__*/ proxyCustomElement(class ActionSheet extends H
285
289
  const cancelButton = allButtons.find((b) => b.role === 'cancel');
286
290
  const buttons = allButtons.filter((b) => b.role !== 'cancel');
287
291
  const headerID = `action-sheet-${overlayIndex}-header`;
288
- return (h(Host, Object.assign({ key: '98851ef73ef85bb1e364111f090480102929a197', role: "dialog", "aria-modal": "true", "aria-labelledby": header !== undefined ? headerID : null, tabindex: "-1" }, htmlAttributes, { style: {
292
+ return (h(Host, Object.assign({ key: 'cd141d12d7d86d3402fd220c4afb61cdbf064c04', role: "dialog", "aria-modal": "true", "aria-labelledby": header !== undefined ? headerID : null, tabindex: "-1" }, htmlAttributes, { style: {
289
293
  zIndex: `${20000 + this.overlayIndex}`,
290
- }, class: Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'action-sheet-translucent': this.translucent }), onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), h("ion-backdrop", { key: 'e2520342ca16aae4dac0bd7bff59b2150aeb2171', tappable: this.backdropDismiss }), h("div", { key: 'c95f2ec4edde1dc3a8860e68b4a86b82f6797aee', tabindex: "0" }), h("div", { key: '7af9edad368e308508801c8ef2225928ced63159', class: "action-sheet-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, h("div", { key: 'd1d92b4d1814d34eb7d8134ff77ee260ca521a6d', class: "action-sheet-container" }, h("div", { key: 'cc774b45a9992e95bfee788cb484d99364b76d22', class: "action-sheet-group", ref: (el) => (this.groupEl = el) }, header !== undefined && (h("div", { id: headerID, class: {
294
+ }, class: Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'action-sheet-translucent': this.translucent }), onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), h("ion-backdrop", { key: 'b6a051e2cf5e101edbf59c8a40a04d8f7107fb3c', tappable: this.backdropDismiss }), h("div", { key: '5bfa2b37a417aaff3776f06d92a8544dfcbf714f', tabindex: "0" }), h("div", { key: '77d5a217803fd7be8f8dbedcd0ef5e59f0fd9800', class: "action-sheet-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, h("div", { key: '3901d56215f05cdab074e2ec321391281a165097', class: "action-sheet-container" }, h("div", { key: '275f5c7981b2ee44fb632b3d137c7209cbfcf45c', class: "action-sheet-group", ref: (el) => (this.groupEl = el) }, header !== undefined && (h("div", { id: headerID, class: {
291
295
  'action-sheet-title': true,
292
296
  'action-sheet-has-sub-title': this.subHeader !== undefined,
293
- } }, header, this.subHeader && h("div", { class: "action-sheet-sub-title" }, this.subHeader))), buttons.map((b) => (h("button", Object.assign({}, b.htmlAttributes, { type: "button", id: b.id, class: buttonClass(b), onClick: () => this.buttonClick(b) }), h("span", { class: "action-sheet-button-inner" }, b.icon && h("ion-icon", { icon: b.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" }), b.text), mode === 'md' && h("ion-ripple-effect", null))))), cancelButton && (h("div", { class: "action-sheet-group action-sheet-group-cancel" }, h("button", Object.assign({}, cancelButton.htmlAttributes, { type: "button", class: buttonClass(cancelButton), onClick: () => this.buttonClick(cancelButton) }), h("span", { class: "action-sheet-button-inner" }, cancelButton.icon && (h("ion-icon", { icon: cancelButton.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" })), cancelButton.text), mode === 'md' && h("ion-ripple-effect", null)))))), h("div", { key: '9a013adda7dec101cf0c90feb02f5b7f5582a0b3', tabindex: "0" })));
297
+ } }, header, this.subHeader && h("div", { class: "action-sheet-sub-title" }, this.subHeader))), buttons.map((b) => (h("button", Object.assign({}, b.htmlAttributes, { type: "button", id: b.id, class: buttonClass(b), onClick: () => this.buttonClick(b) }), h("span", { class: "action-sheet-button-inner" }, b.icon && h("ion-icon", { icon: b.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" }), b.text), mode === 'md' && h("ion-ripple-effect", null))))), cancelButton && (h("div", { class: "action-sheet-group action-sheet-group-cancel" }, h("button", Object.assign({}, cancelButton.htmlAttributes, { type: "button", class: buttonClass(cancelButton), onClick: () => this.buttonClick(cancelButton) }), h("span", { class: "action-sheet-button-inner" }, cancelButton.icon && (h("ion-icon", { icon: cancelButton.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" })), cancelButton.text), mode === 'md' && h("ion-ripple-effect", null)))))), h("div", { key: '4285893438675be9b40838a93c2ff382a1074cd3', tabindex: "0" })));
294
298
  }
295
299
  get el() { return this; }
296
300
  static get watchers() { return {
@@ -315,6 +315,10 @@ const Alert = /*@__PURE__*/ proxyCustomElement(class Alert extends HTMLElement {
315
315
  * This can be useful in a button handler for determining which button was
316
316
  * clicked to dismiss the alert.
317
317
  * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
318
+ *
319
+ * This is a no-op if the overlay has not been presented yet. If you want
320
+ * to remove an overlay from the DOM that was never presented, use the
321
+ * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
318
322
  */
319
323
  async dismiss(data, role) {
320
324
  const unlock = await this.lockController.lock();
@@ -482,9 +486,9 @@ const Alert = /*@__PURE__*/ proxyCustomElement(class Alert extends HTMLElement {
482
486
  * If neither is defined, don't set aria-labelledby.
483
487
  */
484
488
  const ariaLabelledBy = header ? hdrId : subHeader ? subHdrId : null;
485
- return (h(Host, Object.assign({ key: '8327e1aef6c404c2021d43aaa542d86e839817f5', role: role, "aria-modal": "true", "aria-labelledby": ariaLabelledBy, "aria-describedby": message !== undefined ? msgId : null, tabindex: "-1" }, htmlAttributes, { style: {
489
+ return (h(Host, Object.assign({ key: '4b7f7880dc5f39aa9b61981af0a821ac0350af7f', role: role, "aria-modal": "true", "aria-labelledby": ariaLabelledBy, "aria-describedby": message !== undefined ? msgId : null, tabindex: "-1" }, htmlAttributes, { style: {
486
490
  zIndex: `${20000 + overlayIndex}`,
487
- }, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), h("ion-backdrop", { key: '814a4e1b4f7560026b089b762c68401b6277355e', tappable: this.backdropDismiss }), h("div", { key: 'b31ce08019e7223a098d18cb857f72eddc245e98', tabindex: "0" }), h("div", { key: '77efa4b9f7062f55ba0998a09a24550ec0b9b4f5', class: "alert-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, h("div", { key: '648e0768610ee57f9e5c84b8955da497ec9b0b82', class: "alert-head" }, header && (h("h2", { id: hdrId, class: "alert-title" }, header)), subHeader && (h("h2", { id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), h("div", { key: 'f3d752cce77ca021dc959611ad5078b94b7f3cec', tabindex: "0" })));
491
+ }, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), h("ion-backdrop", { key: '961a2684013ac61d59882914fd8d759ddb542fe7', tappable: this.backdropDismiss }), h("div", { key: '2ec08c3719b3cd8a4cae09d2c6ac778ffad5f940', tabindex: "0" }), h("div", { key: 'ee543683d20693c9a9497aca4d41f032aa580c9c', class: "alert-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, h("div", { key: '55015102b67d080249a8859fc8788f3a82d5ead9', class: "alert-head" }, header && (h("h2", { id: hdrId, class: "alert-title" }, header)), subHeader && (h("h2", { id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), h("div", { key: 'df7bcfb0cb41965f169de05edd631a050d5ce648', tabindex: "0" })));
488
492
  }
489
493
  get el() { return this; }
490
494
  static get watchers() { return {
@@ -211,6 +211,10 @@ const Loading = /*@__PURE__*/ proxyCustomElement(class Loading extends HTMLEleme
211
211
  * This can be useful in a button handler for determining which button was
212
212
  * clicked to dismiss the loading.
213
213
  * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
214
+ *
215
+ * This is a no-op if the overlay has not been presented yet. If you want
216
+ * to remove an overlay from the DOM that was never presented, use the
217
+ * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
214
218
  */
215
219
  async dismiss(data, role) {
216
220
  const unlock = await this.lockController.lock();
@@ -252,9 +256,9 @@ const Loading = /*@__PURE__*/ proxyCustomElement(class Loading extends HTMLEleme
252
256
  * Otherwise, don't set aria-labelledby.
253
257
  */
254
258
  const ariaLabelledBy = message !== undefined ? msgId : null;
255
- return (h(Host, Object.assign({ key: '81295894ca6e047124918420f2483c092ebf91b9', role: "dialog", "aria-modal": "true", "aria-labelledby": ariaLabelledBy, tabindex: "-1" }, htmlAttributes, { style: {
259
+ return (h(Host, Object.assign({ key: '95123f54ba1db5e59563d79db075315b43ed20f7', role: "dialog", "aria-modal": "true", "aria-labelledby": ariaLabelledBy, tabindex: "-1" }, htmlAttributes, { style: {
256
260
  zIndex: `${40000 + this.overlayIndex}`,
257
- }, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), h("ion-backdrop", { key: 'db9fbd946cf3eb03c3a70f2e71c49ab233df1879', visible: this.showBackdrop, tappable: this.backdropDismiss }), h("div", { key: 'd27b03de0b450c0668d4b4077d76bc5b283f03cf', tabindex: "0" }), h("div", { key: '7112719ddd487365c1e36fc4dec32aac888dbb52', class: "loading-wrapper ion-overlay-wrapper" }, spinner && (h("div", { class: "loading-spinner" }, h("ion-spinner", { name: spinner, "aria-hidden": "true" }))), message !== undefined && this.renderLoadingMessage(msgId)), h("div", { key: '5715dd7dae209ae58e5557cb60f3ae514752b822', tabindex: "0" })));
261
+ }, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), h("ion-backdrop", { key: 'e113bf123eaad38f2dafce8ea5d2ebef409d0c0f', visible: this.showBackdrop, tappable: this.backdropDismiss }), h("div", { key: '1268c9480854383c7883a79d597350540ade93c2', tabindex: "0" }), h("div", { key: 'e86fc71504ebd578117dea2232d9740a087d1249', class: "loading-wrapper ion-overlay-wrapper" }, spinner && (h("div", { class: "loading-spinner" }, h("ion-spinner", { name: spinner, "aria-hidden": "true" }))), message !== undefined && this.renderLoadingMessage(msgId)), h("div", { key: '3b91e2492e06aa65ebe77ed2b6ffb9d2f84bdd9c', tabindex: "0" })));
258
262
  }
259
263
  get el() { return this; }
260
264
  static get watchers() { return {
@@ -1479,6 +1479,10 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
1479
1479
  *
1480
1480
  * @param data Any data to emit in the dismiss events.
1481
1481
  * @param role The role of the element that is dismissing the modal. For example, 'cancel' or 'backdrop'.
1482
+ *
1483
+ * This is a no-op if the overlay has not been presented yet. If you want
1484
+ * to remove an overlay from the DOM that was never presented, use the
1485
+ * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
1482
1486
  */
1483
1487
  async dismiss(data, role) {
1484
1488
  var _a;
@@ -1609,9 +1613,9 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
1609
1613
  const mode = getIonMode(this);
1610
1614
  const isCardModal = presentingElement !== undefined && mode === 'ios';
1611
1615
  const isHandleCycle = handleBehavior === 'cycle';
1612
- return (h(Host, Object.assign({ key: '9a305d82f123283b6200c42d67393b378bb309a8', "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
1616
+ return (h(Host, Object.assign({ key: '0c2c4369ab2df4ef4660addea5e927c6a0232864', "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
1613
1617
  zIndex: `${20000 + this.overlayIndex}`,
1614
- }, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle }), h("ion-backdrop", { key: '85e8dc6f19b30fd95db518445929fb0c1d5cdef0', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && h("div", { class: "modal-shadow" }), h("div", Object.assign({ key: '893a0202d91828e60099311442c2677bee5464e2',
1618
+ }, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle }), h("ion-backdrop", { key: 'd044383a776c2ee1703f996caedaedca47f2948f', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && h("div", { class: "modal-shadow" }), h("div", Object.assign({ key: '8d23b6a3cc9069e4d46fa0645cde9db3e6f89507',
1615
1619
  /*
1616
1620
  role and aria-modal must be used on the
1617
1621
  same element. They must also be set inside the
@@ -1620,7 +1624,7 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
1620
1624
  */
1621
1625
  role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { class: "modal-handle",
1622
1626
  // Prevents the handle from receiving keyboard focus when it does not cycle
1623
- tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle" })), h("slot", { key: '25187bf4c69d9022930227b8b8748a294176be5f' }))));
1627
+ tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle" })), h("slot", { key: '3fbb689e4bf5575fbb26ad1000f6ac5993f3bf8f' }))));
1624
1628
  }
1625
1629
  get el() { return this; }
1626
1630
  static get watchers() { return {
@@ -167,6 +167,10 @@ const Picker = /*@__PURE__*/ proxyCustomElement(class Picker extends HTMLElement
167
167
  * This can be useful in a button handler for determining which button was
168
168
  * clicked to dismiss the picker.
169
169
  * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
170
+ *
171
+ * This is a no-op if the overlay has not been presented yet. If you want
172
+ * to remove an overlay from the DOM that was never presented, use the
173
+ * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
170
174
  */
171
175
  async dismiss(data, role) {
172
176
  const unlock = await this.lockController.lock();
@@ -238,11 +242,11 @@ const Picker = /*@__PURE__*/ proxyCustomElement(class Picker extends HTMLElement
238
242
  render() {
239
243
  const { htmlAttributes } = this;
240
244
  const mode = getIonMode(this);
241
- return (h(Host, Object.assign({ key: '8b9049c5315e701dff3f7457be646941bb3cc0df', "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
245
+ return (h(Host, Object.assign({ key: 'c266cc072afaba2da22f70d8b62dc4bc6756d188', "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
242
246
  zIndex: `${20000 + this.overlayIndex}`,
243
247
  }, class: Object.assign({ [mode]: true,
244
248
  // Used internally for styling
245
- [`picker-${mode}`]: true, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }), h("ion-backdrop", { key: '4f62ae6c088108189bfab18b680f0ae50b4cc395', visible: this.showBackdrop, tappable: this.backdropDismiss }), h("div", { key: 'c5fd2584ca4470c69bf61582cef2ac72289addba', tabindex: "0" }), h("div", { key: '2e68572dd5ddc4911c1e6bca57a2157b47477348', class: "picker-wrapper ion-overlay-wrapper", role: "dialog" }, h("div", { key: '218526e531998a4d5a6377499acb42f99b347729', class: "picker-toolbar" }, this.buttons.map((b) => (h("div", { class: buttonWrapperClass(b) }, h("button", { type: "button", onClick: () => this.buttonClick(b), class: buttonClass(b) }, b.text))))), h("div", { key: '4dd711f1fa1f2a4bd24696ae1633da16bbf55879', class: "picker-columns" }, h("div", { key: '440ebd807ca3675b0055e67e0354ac4625ae375d', class: "picker-above-highlight" }), this.presented && this.columns.map((c) => h("ion-picker-column", { col: c })), h("div", { key: '5cdceda410904470e3742ab416ed3d3a661b6859', class: "picker-below-highlight" }))), h("div", { key: '0c96e8a43a6d4cd4b8b7c9e81c54414eb1d989bf', tabindex: "0" })));
249
+ [`picker-${mode}`]: true, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }), h("ion-backdrop", { key: '35ee3e5028028835580e28ac2c8db65a924d5d6a', visible: this.showBackdrop, tappable: this.backdropDismiss }), h("div", { key: '8b454e6edbcfc45c57d3d8baf7c14b7905921a6e', tabindex: "0" }), h("div", { key: 'e0fee78ec6d097bf0963190f748e5daad602e0f7', class: "picker-wrapper ion-overlay-wrapper", role: "dialog" }, h("div", { key: 'ce66bca18fc3e982ad7d6660f27cb1a03fb8247b', class: "picker-toolbar" }, this.buttons.map((b) => (h("div", { class: buttonWrapperClass(b) }, h("button", { type: "button", onClick: () => this.buttonClick(b), class: buttonClass(b) }, b.text))))), h("div", { key: 'a58b9523fe16f109dd6de0610717c5077fed964b', class: "picker-columns" }, h("div", { key: 'acd54c0314cff51e8513a08dd9755c4b847c0617', class: "picker-above-highlight" }), this.presented && this.columns.map((c) => h("ion-picker-column", { col: c })), h("div", { key: '604730bd87582d048d850c6e0a0f29ba33258918', class: "picker-below-highlight" }))), h("div", { key: '93baf5e6e57aec5f084d7d5b24af14e7d8126b5a', tabindex: "0" })));
246
250
  }
247
251
  get el() { return this; }
248
252
  static get watchers() { return {
@@ -657,6 +657,10 @@ const Toast = /*@__PURE__*/ proxyCustomElement(class Toast extends HTMLElement {
657
657
  * This can be useful in a button handler for determining which button was
658
658
  * clicked to dismiss the toast.
659
659
  * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
660
+ *
661
+ * This is a no-op if the overlay has not been presented yet. If you want
662
+ * to remove an overlay from the DOM that was never presented, use the
663
+ * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
660
664
  */
661
665
  async dismiss(data, role) {
662
666
  var _a, _b;
@@ -824,9 +828,9 @@ const Toast = /*@__PURE__*/ proxyCustomElement(class Toast extends HTMLElement {
824
828
  if (layout === 'stacked' && startButtons.length > 0 && endButtons.length > 0) {
825
829
  printIonWarning('This toast is using start and end buttons with the stacked toast layout. We recommend following the best practice of using either start or end buttons with the stacked toast layout.', el);
826
830
  }
827
- return (h(Host, Object.assign({ key: '15a5c3e8d475435c838b70c55ef2e7cc12d6abfb', tabindex: "-1" }, this.htmlAttributes, { style: {
831
+ return (h(Host, Object.assign({ key: 'c8d7e7d2baa01d3ed5d65a845bc61acf087c0b18', tabindex: "-1" }, this.htmlAttributes, { style: {
828
832
  zIndex: `${60000 + this.overlayIndex}`,
829
- }, class: createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), h("div", { key: 'a6ed7fb75ab098dc632d1a546b4d5298675c14c1', class: wrapperClass }, h("div", { key: '68ff7219e9abae0b7c2030369ebffd2fe0edf7de', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (h("ion-icon", { class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), h("div", { key: '6b45ca5e283d3507c682cbe733e27a94460a7f69', class: "toast-content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
833
+ }, class: createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), h("div", { key: '27c0feeb89c4efb47c42623a4b036ed84338ed10', class: wrapperClass }, h("div", { key: '41d5a3069f92e4a6acef2793fa4e236cdbdaae88', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (h("ion-icon", { class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), h("div", { key: '176f497bc990ef2ecc14c7fa90dd3a54a912030a', class: "toast-content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
830
834
  }
831
835
  get el() { return this; }
832
836
  static get watchers() { return {
@@ -408,6 +408,15 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
408
408
  return;
409
409
  }
410
410
  setRootAriaHidden(true);
411
+ /**
412
+ * Hide all other overlays from screen readers so only this one
413
+ * can be read. Note that presenting an overlay always makes
414
+ * it the topmost one.
415
+ */
416
+ if (doc !== undefined) {
417
+ const presentedOverlays = getPresentedOverlays(doc);
418
+ presentedOverlays.forEach((o) => o.setAttribute('aria-hidden', 'true'));
419
+ }
411
420
  overlay.presented = true;
412
421
  overlay.willPresent.emit();
413
422
  (_a = overlay.willPresentShorthand) === null || _a === void 0 ? void 0 : _a.emit();
@@ -441,6 +450,14 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
441
450
  if (overlay.keyboardClose && (document.activeElement === null || !overlay.el.contains(document.activeElement))) {
442
451
  overlay.el.focus();
443
452
  }
453
+ /**
454
+ * If this overlay was previously dismissed without being
455
+ * the topmost one (such as by manually calling dismiss()),
456
+ * it would still have aria-hidden on being presented again.
457
+ * Removing it here ensures the overlay is visible to screen
458
+ * readers.
459
+ */
460
+ overlay.el.removeAttribute('aria-hidden');
444
461
  };
445
462
  /**
446
463
  * When an overlay component is dismissed,
@@ -466,7 +483,7 @@ const focusPreviousElementOnDismiss = async (overlayEl) => {
466
483
  previousElement.focus();
467
484
  };
468
485
  const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnimation, opts) => {
469
- var _a, _b;
486
+ var _a, _b, _c;
470
487
  if (!overlay.presented) {
471
488
  return false;
472
489
  }
@@ -517,6 +534,13 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
517
534
  console.error(err);
518
535
  }
519
536
  overlay.el.remove();
537
+ /**
538
+ * If there are other overlays presented, unhide the new
539
+ * topmost one from screen readers.
540
+ */
541
+ if (doc !== undefined) {
542
+ (_c = getPresentedOverlay(doc)) === null || _c === void 0 ? void 0 : _c.removeAttribute('aria-hidden');
543
+ }
520
544
  return true;
521
545
  };
522
546
  const getAppRoot = (doc) => {
@@ -1237,6 +1237,10 @@ const Popover = /*@__PURE__*/ proxyCustomElement(class Popover extends HTMLEleme
1237
1237
  * @param role The role of the element that is dismissing the popover. For example, 'cancel' or 'backdrop'.
1238
1238
  * @param dismissParentPopover If `true`, dismissing this popover will also dismiss
1239
1239
  * a parent popover if this popover is nested. Defaults to `true`.
1240
+ *
1241
+ * This is a no-op if the overlay has not been presented yet. If you want
1242
+ * to remove an overlay from the DOM that was never presented, use the
1243
+ * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
1240
1244
  */
1241
1245
  async dismiss(data, role, dismissParentPopover = true) {
1242
1246
  const unlock = await this.lockController.lock();
@@ -1288,9 +1292,9 @@ const Popover = /*@__PURE__*/ proxyCustomElement(class Popover extends HTMLEleme
1288
1292
  const { onLifecycle, parentPopover, dismissOnSelect, side, arrow, htmlAttributes } = this;
1289
1293
  const desktop = isPlatform('desktop');
1290
1294
  const enableArrow = arrow && !parentPopover;
1291
- return (h(Host, Object.assign({ key: 'f335ae001173483e6a973b2084f8a7b6b895ae5d', "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
1295
+ return (h(Host, Object.assign({ key: '104a5bf92a9bbd2efc71d499a8500e5d55f81711', "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
1292
1296
  zIndex: `${20000 + this.overlayIndex}`,
1293
- }, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && h("ion-backdrop", { tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), h("div", { key: '8468f39b0a0f30b42ae9cac51950e5f0b9be1069', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && h("div", { class: "popover-arrow", part: "arrow" }), h("div", { key: 'cb4eeaef385187f3c8e566931844e30edd5451c4', class: "popover-content", part: "content" }, h("slot", { key: '80a5739a4beb6eba150503e426104701954c90b9' })))));
1297
+ }, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && h("ion-backdrop", { tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), h("div", { key: 'ef0baa04c22444d4bc705220235a892308d67586', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && h("div", { class: "popover-arrow", part: "arrow" }), h("div", { key: '5cc5f5c353de614e484e9cfeacecfca9fbfde0e0', class: "popover-content", part: "content" }, h("slot", { key: '2d85c591cdc85efa98afbf40f676525f1402efcf' })))));
1294
1298
  }
1295
1299
  get el() { return this; }
1296
1300
  static get watchers() { return {
@@ -16,7 +16,7 @@ const helpers = require('./helpers-2e1028fa.js');
16
16
  const config = require('./config-4f60b98a.js');
17
17
  const theme = require('./theme-d1c573d2.js');
18
18
  const index$2 = require('./index-a43f7a0f.js');
19
- const overlays = require('./overlays-c0b199e9.js');
19
+ const overlays = require('./overlays-853fbc2a.js');
20
20
  require('./index-c8d52405.js');
21
21
  require('./index-0ffe376d.js');
22
22
  require('./gesture-controller-c40c045a.js');
@@ -9,7 +9,7 @@ const index = require('./index-0ffe376d.js');
9
9
  const buttonActive = require('./button-active-2d6520ec.js');
10
10
  const helpers = require('./helpers-2e1028fa.js');
11
11
  const lockController = require('./lock-controller-6585a42a.js');
12
- const overlays = require('./overlays-c0b199e9.js');
12
+ const overlays = require('./overlays-853fbc2a.js');
13
13
  const theme = require('./theme-d1c573d2.js');
14
14
  const ionicGlobal = require('./ionic-global-59a10130.js');
15
15
  const animation = require('./animation-fdab9de5.js');
@@ -185,6 +185,10 @@ const ActionSheet = class {
185
185
  * This can be useful in a button handler for determining which button was
186
186
  * clicked to dismiss the action sheet.
187
187
  * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
188
+ *
189
+ * This is a no-op if the overlay has not been presented yet. If you want
190
+ * to remove an overlay from the DOM that was never presented, use the
191
+ * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
188
192
  */
189
193
  async dismiss(data, role) {
190
194
  const unlock = await this.lockController.lock();
@@ -293,12 +297,12 @@ const ActionSheet = class {
293
297
  const cancelButton = allButtons.find((b) => b.role === 'cancel');
294
298
  const buttons = allButtons.filter((b) => b.role !== 'cancel');
295
299
  const headerID = `action-sheet-${overlayIndex}-header`;
296
- return (index.h(index.Host, Object.assign({ key: '98851ef73ef85bb1e364111f090480102929a197', role: "dialog", "aria-modal": "true", "aria-labelledby": header !== undefined ? headerID : null, tabindex: "-1" }, htmlAttributes, { style: {
300
+ return (index.h(index.Host, Object.assign({ key: 'cd141d12d7d86d3402fd220c4afb61cdbf064c04', role: "dialog", "aria-modal": "true", "aria-labelledby": header !== undefined ? headerID : null, tabindex: "-1" }, htmlAttributes, { style: {
297
301
  zIndex: `${20000 + this.overlayIndex}`,
298
- }, class: Object.assign(Object.assign({ [mode]: true }, theme.getClassMap(this.cssClass)), { 'overlay-hidden': true, 'action-sheet-translucent': this.translucent }), onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), index.h("ion-backdrop", { key: 'e2520342ca16aae4dac0bd7bff59b2150aeb2171', tappable: this.backdropDismiss }), index.h("div", { key: 'c95f2ec4edde1dc3a8860e68b4a86b82f6797aee', tabindex: "0" }), index.h("div", { key: '7af9edad368e308508801c8ef2225928ced63159', class: "action-sheet-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, index.h("div", { key: 'd1d92b4d1814d34eb7d8134ff77ee260ca521a6d', class: "action-sheet-container" }, index.h("div", { key: 'cc774b45a9992e95bfee788cb484d99364b76d22', class: "action-sheet-group", ref: (el) => (this.groupEl = el) }, header !== undefined && (index.h("div", { id: headerID, class: {
302
+ }, class: Object.assign(Object.assign({ [mode]: true }, theme.getClassMap(this.cssClass)), { 'overlay-hidden': true, 'action-sheet-translucent': this.translucent }), onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), index.h("ion-backdrop", { key: 'b6a051e2cf5e101edbf59c8a40a04d8f7107fb3c', tappable: this.backdropDismiss }), index.h("div", { key: '5bfa2b37a417aaff3776f06d92a8544dfcbf714f', tabindex: "0" }), index.h("div", { key: '77d5a217803fd7be8f8dbedcd0ef5e59f0fd9800', class: "action-sheet-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, index.h("div", { key: '3901d56215f05cdab074e2ec321391281a165097', class: "action-sheet-container" }, index.h("div", { key: '275f5c7981b2ee44fb632b3d137c7209cbfcf45c', class: "action-sheet-group", ref: (el) => (this.groupEl = el) }, header !== undefined && (index.h("div", { id: headerID, class: {
299
303
  'action-sheet-title': true,
300
304
  'action-sheet-has-sub-title': this.subHeader !== undefined,
301
- } }, header, this.subHeader && index.h("div", { class: "action-sheet-sub-title" }, this.subHeader))), buttons.map((b) => (index.h("button", Object.assign({}, b.htmlAttributes, { type: "button", id: b.id, class: buttonClass(b), onClick: () => this.buttonClick(b) }), index.h("span", { class: "action-sheet-button-inner" }, b.icon && index.h("ion-icon", { icon: b.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" }), b.text), mode === 'md' && index.h("ion-ripple-effect", null))))), cancelButton && (index.h("div", { class: "action-sheet-group action-sheet-group-cancel" }, index.h("button", Object.assign({}, cancelButton.htmlAttributes, { type: "button", class: buttonClass(cancelButton), onClick: () => this.buttonClick(cancelButton) }), index.h("span", { class: "action-sheet-button-inner" }, cancelButton.icon && (index.h("ion-icon", { icon: cancelButton.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" })), cancelButton.text), mode === 'md' && index.h("ion-ripple-effect", null)))))), index.h("div", { key: '9a013adda7dec101cf0c90feb02f5b7f5582a0b3', tabindex: "0" })));
305
+ } }, header, this.subHeader && index.h("div", { class: "action-sheet-sub-title" }, this.subHeader))), buttons.map((b) => (index.h("button", Object.assign({}, b.htmlAttributes, { type: "button", id: b.id, class: buttonClass(b), onClick: () => this.buttonClick(b) }), index.h("span", { class: "action-sheet-button-inner" }, b.icon && index.h("ion-icon", { icon: b.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" }), b.text), mode === 'md' && index.h("ion-ripple-effect", null))))), cancelButton && (index.h("div", { class: "action-sheet-group action-sheet-group-cancel" }, index.h("button", Object.assign({}, cancelButton.htmlAttributes, { type: "button", class: buttonClass(cancelButton), onClick: () => this.buttonClick(cancelButton) }), index.h("span", { class: "action-sheet-button-inner" }, cancelButton.icon && (index.h("ion-icon", { icon: cancelButton.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" })), cancelButton.text), mode === 'md' && index.h("ion-ripple-effect", null)))))), index.h("div", { key: '4285893438675be9b40838a93c2ff382a1074cd3', tabindex: "0" })));
302
306
  }
303
307
  get el() { return index.getElement(this); }
304
308
  static get watchers() { return {
@@ -10,7 +10,7 @@ const config = require('./config-4f60b98a.js');
10
10
  const buttonActive = require('./button-active-2d6520ec.js');
11
11
  const helpers = require('./helpers-2e1028fa.js');
12
12
  const lockController = require('./lock-controller-6585a42a.js');
13
- const overlays = require('./overlays-c0b199e9.js');
13
+ const overlays = require('./overlays-853fbc2a.js');
14
14
  const theme = require('./theme-d1c573d2.js');
15
15
  const ionicGlobal = require('./ionic-global-59a10130.js');
16
16
  const animation = require('./animation-fdab9de5.js');
@@ -324,6 +324,10 @@ const Alert = class {
324
324
  * This can be useful in a button handler for determining which button was
325
325
  * clicked to dismiss the alert.
326
326
  * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
327
+ *
328
+ * This is a no-op if the overlay has not been presented yet. If you want
329
+ * to remove an overlay from the DOM that was never presented, use the
330
+ * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
327
331
  */
328
332
  async dismiss(data, role) {
329
333
  const unlock = await this.lockController.lock();
@@ -491,9 +495,9 @@ const Alert = class {
491
495
  * If neither is defined, don't set aria-labelledby.
492
496
  */
493
497
  const ariaLabelledBy = header ? hdrId : subHeader ? subHdrId : null;
494
- return (index.h(index.Host, Object.assign({ key: '8327e1aef6c404c2021d43aaa542d86e839817f5', role: role, "aria-modal": "true", "aria-labelledby": ariaLabelledBy, "aria-describedby": message !== undefined ? msgId : null, tabindex: "-1" }, htmlAttributes, { style: {
498
+ return (index.h(index.Host, Object.assign({ key: '4b7f7880dc5f39aa9b61981af0a821ac0350af7f', role: role, "aria-modal": "true", "aria-labelledby": ariaLabelledBy, "aria-describedby": message !== undefined ? msgId : null, tabindex: "-1" }, htmlAttributes, { style: {
495
499
  zIndex: `${20000 + overlayIndex}`,
496
- }, class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), index.h("ion-backdrop", { key: '814a4e1b4f7560026b089b762c68401b6277355e', tappable: this.backdropDismiss }), index.h("div", { key: 'b31ce08019e7223a098d18cb857f72eddc245e98', tabindex: "0" }), index.h("div", { key: '77efa4b9f7062f55ba0998a09a24550ec0b9b4f5', class: "alert-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, index.h("div", { key: '648e0768610ee57f9e5c84b8955da497ec9b0b82', class: "alert-head" }, header && (index.h("h2", { id: hdrId, class: "alert-title" }, header)), subHeader && (index.h("h2", { id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), index.h("div", { key: 'f3d752cce77ca021dc959611ad5078b94b7f3cec', tabindex: "0" })));
500
+ }, class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), index.h("ion-backdrop", { key: '961a2684013ac61d59882914fd8d759ddb542fe7', tappable: this.backdropDismiss }), index.h("div", { key: '2ec08c3719b3cd8a4cae09d2c6ac778ffad5f940', tabindex: "0" }), index.h("div", { key: 'ee543683d20693c9a9497aca4d41f032aa580c9c', class: "alert-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, index.h("div", { key: '55015102b67d080249a8859fc8788f3a82d5ead9', class: "alert-head" }, header && (index.h("h2", { id: hdrId, class: "alert-title" }, header)), subHeader && (index.h("h2", { id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), index.h("div", { key: 'df7bcfb0cb41965f169de05edd631a050d5ce648', tabindex: "0" })));
497
501
  }
498
502
  get el() { return index.getElement(this); }
499
503
  static get watchers() { return {
@@ -15,7 +15,7 @@ const index$2 = require('./index-f52c6d38.js');
15
15
  const ionicGlobal = require('./ionic-global-59a10130.js');
16
16
  const data = require('./data-a5109f09.js');
17
17
  const lockController = require('./lock-controller-6585a42a.js');
18
- const overlays = require('./overlays-c0b199e9.js');
18
+ const overlays = require('./overlays-853fbc2a.js');
19
19
  const animation = require('./animation-fdab9de5.js');
20
20
  const haptic = require('./haptic-b882e0bb.js');
21
21
  require('./index-c8d52405.js');
@@ -1943,6 +1943,10 @@ const Picker = class {
1943
1943
  * This can be useful in a button handler for determining which button was
1944
1944
  * clicked to dismiss the picker.
1945
1945
  * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
1946
+ *
1947
+ * This is a no-op if the overlay has not been presented yet. If you want
1948
+ * to remove an overlay from the DOM that was never presented, use the
1949
+ * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
1946
1950
  */
1947
1951
  async dismiss(data, role) {
1948
1952
  const unlock = await this.lockController.lock();
@@ -2014,11 +2018,11 @@ const Picker = class {
2014
2018
  render() {
2015
2019
  const { htmlAttributes } = this;
2016
2020
  const mode = ionicGlobal.getIonMode(this);
2017
- return (index$1.h(index$1.Host, Object.assign({ key: '8b9049c5315e701dff3f7457be646941bb3cc0df', "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
2021
+ return (index$1.h(index$1.Host, Object.assign({ key: 'c266cc072afaba2da22f70d8b62dc4bc6756d188', "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
2018
2022
  zIndex: `${20000 + this.overlayIndex}`,
2019
2023
  }, class: Object.assign({ [mode]: true,
2020
2024
  // Used internally for styling
2021
- [`picker-${mode}`]: true, 'overlay-hidden': true }, theme.getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }), index$1.h("ion-backdrop", { key: '4f62ae6c088108189bfab18b680f0ae50b4cc395', visible: this.showBackdrop, tappable: this.backdropDismiss }), index$1.h("div", { key: 'c5fd2584ca4470c69bf61582cef2ac72289addba', tabindex: "0" }), index$1.h("div", { key: '2e68572dd5ddc4911c1e6bca57a2157b47477348', class: "picker-wrapper ion-overlay-wrapper", role: "dialog" }, index$1.h("div", { key: '218526e531998a4d5a6377499acb42f99b347729', class: "picker-toolbar" }, this.buttons.map((b) => (index$1.h("div", { class: buttonWrapperClass(b) }, index$1.h("button", { type: "button", onClick: () => this.buttonClick(b), class: buttonClass(b) }, b.text))))), index$1.h("div", { key: '4dd711f1fa1f2a4bd24696ae1633da16bbf55879', class: "picker-columns" }, index$1.h("div", { key: '440ebd807ca3675b0055e67e0354ac4625ae375d', class: "picker-above-highlight" }), this.presented && this.columns.map((c) => index$1.h("ion-picker-column", { col: c })), index$1.h("div", { key: '5cdceda410904470e3742ab416ed3d3a661b6859', class: "picker-below-highlight" }))), index$1.h("div", { key: '0c96e8a43a6d4cd4b8b7c9e81c54414eb1d989bf', tabindex: "0" })));
2025
+ [`picker-${mode}`]: true, 'overlay-hidden': true }, theme.getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }), index$1.h("ion-backdrop", { key: '35ee3e5028028835580e28ac2c8db65a924d5d6a', visible: this.showBackdrop, tappable: this.backdropDismiss }), index$1.h("div", { key: '8b454e6edbcfc45c57d3d8baf7c14b7905921a6e', tabindex: "0" }), index$1.h("div", { key: 'e0fee78ec6d097bf0963190f748e5daad602e0f7', class: "picker-wrapper ion-overlay-wrapper", role: "dialog" }, index$1.h("div", { key: 'ce66bca18fc3e982ad7d6660f27cb1a03fb8247b', class: "picker-toolbar" }, this.buttons.map((b) => (index$1.h("div", { class: buttonWrapperClass(b) }, index$1.h("button", { type: "button", onClick: () => this.buttonClick(b), class: buttonClass(b) }, b.text))))), index$1.h("div", { key: 'a58b9523fe16f109dd6de0610717c5077fed964b', class: "picker-columns" }, index$1.h("div", { key: 'acd54c0314cff51e8513a08dd9755c4b847c0617', class: "picker-above-highlight" }), this.presented && this.columns.map((c) => index$1.h("ion-picker-column", { col: c })), index$1.h("div", { key: '604730bd87582d048d850c6e0a0f29ba33258918', class: "picker-below-highlight" }))), index$1.h("div", { key: '93baf5e6e57aec5f084d7d5b24af14e7d8126b5a', tabindex: "0" })));
2022
2026
  }
2023
2027
  get el() { return index$1.getElement(this); }
2024
2028
  static get watchers() { return {
@@ -9,7 +9,7 @@ const index = require('./index-0ffe376d.js');
9
9
  const config = require('./config-4f60b98a.js');
10
10
  const helpers = require('./helpers-2e1028fa.js');
11
11
  const lockController = require('./lock-controller-6585a42a.js');
12
- const overlays = require('./overlays-c0b199e9.js');
12
+ const overlays = require('./overlays-853fbc2a.js');
13
13
  const theme = require('./theme-d1c573d2.js');
14
14
  const ionicGlobal = require('./ionic-global-59a10130.js');
15
15
  const animation = require('./animation-fdab9de5.js');
@@ -216,6 +216,10 @@ const Loading = class {
216
216
  * This can be useful in a button handler for determining which button was
217
217
  * clicked to dismiss the loading.
218
218
  * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
219
+ *
220
+ * This is a no-op if the overlay has not been presented yet. If you want
221
+ * to remove an overlay from the DOM that was never presented, use the
222
+ * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
219
223
  */
220
224
  async dismiss(data, role) {
221
225
  const unlock = await this.lockController.lock();
@@ -257,9 +261,9 @@ const Loading = class {
257
261
  * Otherwise, don't set aria-labelledby.
258
262
  */
259
263
  const ariaLabelledBy = message !== undefined ? msgId : null;
260
- return (index.h(index.Host, Object.assign({ key: '81295894ca6e047124918420f2483c092ebf91b9', role: "dialog", "aria-modal": "true", "aria-labelledby": ariaLabelledBy, tabindex: "-1" }, htmlAttributes, { style: {
264
+ return (index.h(index.Host, Object.assign({ key: '95123f54ba1db5e59563d79db075315b43ed20f7', role: "dialog", "aria-modal": "true", "aria-labelledby": ariaLabelledBy, tabindex: "-1" }, htmlAttributes, { style: {
261
265
  zIndex: `${40000 + this.overlayIndex}`,
262
- }, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), index.h("ion-backdrop", { key: 'db9fbd946cf3eb03c3a70f2e71c49ab233df1879', visible: this.showBackdrop, tappable: this.backdropDismiss }), index.h("div", { key: 'd27b03de0b450c0668d4b4077d76bc5b283f03cf', tabindex: "0" }), index.h("div", { key: '7112719ddd487365c1e36fc4dec32aac888dbb52', class: "loading-wrapper ion-overlay-wrapper" }, spinner && (index.h("div", { class: "loading-spinner" }, index.h("ion-spinner", { name: spinner, "aria-hidden": "true" }))), message !== undefined && this.renderLoadingMessage(msgId)), index.h("div", { key: '5715dd7dae209ae58e5557cb60f3ae514752b822', tabindex: "0" })));
266
+ }, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), index.h("ion-backdrop", { key: 'e113bf123eaad38f2dafce8ea5d2ebef409d0c0f', visible: this.showBackdrop, tappable: this.backdropDismiss }), index.h("div", { key: '1268c9480854383c7883a79d597350540ade93c2', tabindex: "0" }), index.h("div", { key: 'e86fc71504ebd578117dea2232d9740a087d1249', class: "loading-wrapper ion-overlay-wrapper" }, spinner && (index.h("div", { class: "loading-spinner" }, index.h("ion-spinner", { name: spinner, "aria-hidden": "true" }))), message !== undefined && this.renderLoadingMessage(msgId)), index.h("div", { key: '3b91e2492e06aa65ebe77ed2b6ffb9d2f84bdd9c', tabindex: "0" })));
263
267
  }
264
268
  get el() { return index.getElement(this); }
265
269
  static get watchers() { return {
@@ -11,7 +11,7 @@ const gestureController = require('./gesture-controller-c40c045a.js');
11
11
  const hardwareBackButton = require('./hardware-back-button-2696acaf.js');
12
12
  const helpers = require('./helpers-2e1028fa.js');
13
13
  const index$1 = require('./index-a43f7a0f.js');
14
- const overlays = require('./overlays-c0b199e9.js');
14
+ const overlays = require('./overlays-853fbc2a.js');
15
15
  const ionicGlobal = require('./ionic-global-59a10130.js');
16
16
  const theme = require('./theme-d1c573d2.js');
17
17
  const index$2 = require('./index-f52c6d38.js');
@@ -12,7 +12,7 @@ const helpers = require('./helpers-2e1028fa.js');
12
12
  const lockController = require('./lock-controller-6585a42a.js');
13
13
  const index$4 = require('./index-5915f9b3.js');
14
14
  const capacitor = require('./capacitor-c04564bf.js');
15
- const overlays = require('./overlays-c0b199e9.js');
15
+ const overlays = require('./overlays-853fbc2a.js');
16
16
  const theme = require('./theme-d1c573d2.js');
17
17
  const index$5 = require('./index-c3580a90.js');
18
18
  const ionicGlobal = require('./ionic-global-59a10130.js');
@@ -1483,6 +1483,10 @@ const Modal = class {
1483
1483
  *
1484
1484
  * @param data Any data to emit in the dismiss events.
1485
1485
  * @param role The role of the element that is dismissing the modal. For example, 'cancel' or 'backdrop'.
1486
+ *
1487
+ * This is a no-op if the overlay has not been presented yet. If you want
1488
+ * to remove an overlay from the DOM that was never presented, use the
1489
+ * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
1486
1490
  */
1487
1491
  async dismiss(data, role) {
1488
1492
  var _a;
@@ -1613,9 +1617,9 @@ const Modal = class {
1613
1617
  const mode = ionicGlobal.getIonMode(this);
1614
1618
  const isCardModal = presentingElement !== undefined && mode === 'ios';
1615
1619
  const isHandleCycle = handleBehavior === 'cycle';
1616
- return (index$3.h(index$3.Host, Object.assign({ key: '9a305d82f123283b6200c42d67393b378bb309a8', "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
1620
+ return (index$3.h(index$3.Host, Object.assign({ key: '0c2c4369ab2df4ef4660addea5e927c6a0232864', "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
1617
1621
  zIndex: `${20000 + this.overlayIndex}`,
1618
- }, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, 'overlay-hidden': true }, theme.getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle }), index$3.h("ion-backdrop", { key: '85e8dc6f19b30fd95db518445929fb0c1d5cdef0', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && index$3.h("div", { class: "modal-shadow" }), index$3.h("div", Object.assign({ key: '893a0202d91828e60099311442c2677bee5464e2',
1622
+ }, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, 'overlay-hidden': true }, theme.getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle }), index$3.h("ion-backdrop", { key: 'd044383a776c2ee1703f996caedaedca47f2948f', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && index$3.h("div", { class: "modal-shadow" }), index$3.h("div", Object.assign({ key: '8d23b6a3cc9069e4d46fa0645cde9db3e6f89507',
1619
1623
  /*
1620
1624
  role and aria-modal must be used on the
1621
1625
  same element. They must also be set inside the
@@ -1624,7 +1628,7 @@ const Modal = class {
1624
1628
  */
1625
1629
  role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (index$3.h("button", { class: "modal-handle",
1626
1630
  // Prevents the handle from receiving keyboard focus when it does not cycle
1627
- tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle" })), index$3.h("slot", { key: '25187bf4c69d9022930227b8b8748a294176be5f' }))));
1631
+ tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle" })), index$3.h("slot", { key: '3fbb689e4bf5575fbb26ad1000f6ac5993f3bf8f' }))));
1628
1632
  }
1629
1633
  get el() { return index$3.getElement(this); }
1630
1634
  static get watchers() { return {
@@ -10,7 +10,7 @@ const frameworkDelegate = require('./framework-delegate-a3e6d060.js');
10
10
  const helpers = require('./helpers-2e1028fa.js');
11
11
  const lockController = require('./lock-controller-6585a42a.js');
12
12
  const index$1 = require('./index-5915f9b3.js');
13
- const overlays = require('./overlays-c0b199e9.js');
13
+ const overlays = require('./overlays-853fbc2a.js');
14
14
  const ionicGlobal = require('./ionic-global-59a10130.js');
15
15
  const theme = require('./theme-d1c573d2.js');
16
16
  const index$2 = require('./index-c3580a90.js');
@@ -1240,6 +1240,10 @@ const Popover = class {
1240
1240
  * @param role The role of the element that is dismissing the popover. For example, 'cancel' or 'backdrop'.
1241
1241
  * @param dismissParentPopover If `true`, dismissing this popover will also dismiss
1242
1242
  * a parent popover if this popover is nested. Defaults to `true`.
1243
+ *
1244
+ * This is a no-op if the overlay has not been presented yet. If you want
1245
+ * to remove an overlay from the DOM that was never presented, use the
1246
+ * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
1243
1247
  */
1244
1248
  async dismiss(data, role, dismissParentPopover = true) {
1245
1249
  const unlock = await this.lockController.lock();
@@ -1291,9 +1295,9 @@ const Popover = class {
1291
1295
  const { onLifecycle, parentPopover, dismissOnSelect, side, arrow, htmlAttributes } = this;
1292
1296
  const desktop = ionicGlobal.isPlatform('desktop');
1293
1297
  const enableArrow = arrow && !parentPopover;
1294
- return (index.h(index.Host, Object.assign({ key: 'f335ae001173483e6a973b2084f8a7b6b895ae5d', "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
1298
+ return (index.h(index.Host, Object.assign({ key: '104a5bf92a9bbd2efc71d499a8500e5d55f81711', "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
1295
1299
  zIndex: `${20000 + this.overlayIndex}`,
1296
- }, class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && index.h("ion-backdrop", { tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), index.h("div", { key: '8468f39b0a0f30b42ae9cac51950e5f0b9be1069', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && index.h("div", { class: "popover-arrow", part: "arrow" }), index.h("div", { key: 'cb4eeaef385187f3c8e566931844e30edd5451c4', class: "popover-content", part: "content" }, index.h("slot", { key: '80a5739a4beb6eba150503e426104701954c90b9' })))));
1300
+ }, class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && index.h("ion-backdrop", { tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), index.h("div", { key: 'ef0baa04c22444d4bc705220235a892308d67586', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && index.h("div", { class: "popover-arrow", part: "arrow" }), index.h("div", { key: '5cc5f5c353de614e484e9cfeacecfca9fbfde0e0', class: "popover-content", part: "content" }, index.h("slot", { key: '2d85c591cdc85efa98afbf40f676525f1402efcf' })))));
1297
1301
  }
1298
1302
  get el() { return index.getElement(this); }
1299
1303
  static get watchers() { return {
@@ -11,7 +11,7 @@ const notchController = require('./notch-controller-db0127c4.js');
11
11
  const compareWithUtils = require('./compare-with-utils-df1001d7.js');
12
12
  const helpers = require('./helpers-2e1028fa.js');
13
13
  const index$1 = require('./index-5915f9b3.js');
14
- const overlays = require('./overlays-c0b199e9.js');
14
+ const overlays = require('./overlays-853fbc2a.js');
15
15
  const dir = require('./dir-94c21456.js');
16
16
  const theme = require('./theme-d1c573d2.js');
17
17
  const watchOptions = require('./watch-options-f5f3e158.js');
@@ -10,7 +10,7 @@ const config = require('./config-4f60b98a.js');
10
10
  const helpers = require('./helpers-2e1028fa.js');
11
11
  const lockController = require('./lock-controller-6585a42a.js');
12
12
  const index$1 = require('./index-5915f9b3.js');
13
- const overlays = require('./overlays-c0b199e9.js');
13
+ const overlays = require('./overlays-853fbc2a.js');
14
14
  const theme = require('./theme-d1c573d2.js');
15
15
  const ionicGlobal = require('./ionic-global-59a10130.js');
16
16
  const animation = require('./animation-fdab9de5.js');
@@ -658,6 +658,10 @@ const Toast = class {
658
658
  * This can be useful in a button handler for determining which button was
659
659
  * clicked to dismiss the toast.
660
660
  * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
661
+ *
662
+ * This is a no-op if the overlay has not been presented yet. If you want
663
+ * to remove an overlay from the DOM that was never presented, use the
664
+ * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
661
665
  */
662
666
  async dismiss(data, role) {
663
667
  var _a, _b;
@@ -825,9 +829,9 @@ const Toast = class {
825
829
  if (layout === 'stacked' && startButtons.length > 0 && endButtons.length > 0) {
826
830
  index$1.printIonWarning('This toast is using start and end buttons with the stacked toast layout. We recommend following the best practice of using either start or end buttons with the stacked toast layout.', el);
827
831
  }
828
- return (index$3.h(index$3.Host, Object.assign({ key: '15a5c3e8d475435c838b70c55ef2e7cc12d6abfb', tabindex: "-1" }, this.htmlAttributes, { style: {
832
+ return (index$3.h(index$3.Host, Object.assign({ key: 'c8d7e7d2baa01d3ed5d65a845bc61acf087c0b18', tabindex: "-1" }, this.htmlAttributes, { style: {
829
833
  zIndex: `${60000 + this.overlayIndex}`,
830
- }, class: theme.createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, theme.getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), index$3.h("div", { key: 'a6ed7fb75ab098dc632d1a546b4d5298675c14c1', class: wrapperClass }, index$3.h("div", { key: '68ff7219e9abae0b7c2030369ebffd2fe0edf7de', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (index$3.h("ion-icon", { class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), index$3.h("div", { key: '6b45ca5e283d3507c682cbe733e27a94460a7f69', class: "toast-content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
834
+ }, class: theme.createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, theme.getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), index$3.h("div", { key: '27c0feeb89c4efb47c42623a4b036ed84338ed10', class: wrapperClass }, index$3.h("div", { key: '41d5a3069f92e4a6acef2793fa4e236cdbdaae88', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (index$3.h("ion-icon", { class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), index$3.h("div", { key: '176f497bc990ef2ecc14c7fa90dd3a54a912030a', class: "toast-content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
831
835
  }
832
836
  get el() { return index$3.getElement(this); }
833
837
  static get watchers() { return {