@ionic/core 9.0.1-dev.11788212611.154b1596 → 9.0.1-dev.11788375537.1f38f077

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 (100) hide show
  1. package/components/index.js +1 -1
  2. package/components/ion-action-sheet.js +1 -1
  3. package/components/ion-alert.js +1 -1
  4. package/components/ion-content.js +1 -1
  5. package/components/ion-datetime.js +1 -1
  6. package/components/ion-loading.js +1 -1
  7. package/components/ion-menu.js +1 -1
  8. package/components/ion-modal.js +1 -1
  9. package/components/ion-popover.js +1 -1
  10. package/components/ion-select-modal.js +1 -1
  11. package/components/ion-select-popover.js +1 -1
  12. package/components/ion-select.js +1 -1
  13. package/components/ion-toast.js +1 -1
  14. package/components/p-CXQzYyda.js +4 -0
  15. package/components/p-D6PwfJ9F.js +4 -0
  16. package/components/{p-CxiXpCtB.js → p-D6dNJoqU.js} +1 -1
  17. package/components/p-D8BOfNYz.js +4 -0
  18. package/components/{p-Dq1-WhnV.js → p-Dcxr2vKX.js} +1 -1
  19. package/components/p-FQTgh7aH.js +4 -0
  20. package/components/p-KusMkAnB.js +4 -0
  21. package/components/p-U1X_lw_6.js +4 -0
  22. package/css/core.css +1 -1
  23. package/css/core.css.map +1 -1
  24. package/css/ionic.bundle.css +1 -1
  25. package/css/ionic.bundle.css.map +1 -1
  26. package/dist/cjs/index.cjs.js +1 -1
  27. package/dist/cjs/ion-action-sheet.cjs.entry.js +20 -36
  28. package/dist/cjs/ion-alert.cjs.entry.js +12 -20
  29. package/dist/cjs/ion-app_8.cjs.entry.js +4 -81
  30. package/dist/cjs/ion-datetime.cjs.entry.js +1 -1
  31. package/dist/cjs/ion-loading.cjs.entry.js +3 -7
  32. package/dist/cjs/ion-menu_3.cjs.entry.js +1 -1
  33. package/dist/cjs/ion-modal.cjs.entry.js +24 -77
  34. package/dist/cjs/ion-popover.cjs.entry.js +3 -16
  35. package/dist/cjs/ion-select-modal.cjs.entry.js +1 -1
  36. package/dist/cjs/ion-select_3.cjs.entry.js +1 -1
  37. package/dist/cjs/ion-toast.cjs.entry.js +1 -1
  38. package/dist/cjs/{overlays-HN9joo1Z.js → overlays-hCtsdAvn.js} +29 -54
  39. package/dist/collection/components/action-sheet/action-sheet.js +20 -36
  40. package/dist/collection/components/alert/alert.js +12 -20
  41. package/dist/collection/components/content/content.js +4 -81
  42. package/dist/collection/components/loading/loading.js +3 -7
  43. package/dist/collection/components/modal/modal.ios.css +1 -12
  44. package/dist/collection/components/modal/modal.js +22 -75
  45. package/dist/collection/components/modal/modal.md.css +1 -12
  46. package/dist/collection/components/popover/popover.js +3 -16
  47. package/dist/collection/utils/overlays.js +29 -53
  48. package/dist/collection/utils/test/playwright/index.js +0 -1
  49. package/dist/docs.json +1 -1
  50. package/dist/esm/index.js +1 -1
  51. package/dist/esm/ion-action-sheet.entry.js +20 -36
  52. package/dist/esm/ion-alert.entry.js +12 -20
  53. package/dist/esm/ion-app_8.entry.js +4 -81
  54. package/dist/esm/ion-datetime.entry.js +1 -1
  55. package/dist/esm/ion-loading.entry.js +3 -7
  56. package/dist/esm/ion-menu_3.entry.js +1 -1
  57. package/dist/esm/ion-modal.entry.js +24 -77
  58. package/dist/esm/ion-popover.entry.js +3 -16
  59. package/dist/esm/ion-select-modal.entry.js +1 -1
  60. package/dist/esm/ion-select_3.entry.js +1 -1
  61. package/dist/esm/ion-toast.entry.js +1 -1
  62. package/dist/esm/{overlays-Dz2cGX5q.js → overlays-CiFoZEq1.js} +30 -54
  63. package/dist/ionic/index.esm.js +1 -1
  64. package/dist/ionic/ionic.esm.js +1 -1
  65. package/dist/ionic/p-39415b06.entry.js +4 -0
  66. package/dist/ionic/p-3bad6750.entry.js +4 -0
  67. package/dist/ionic/{p-0c2b3555.entry.js → p-4dcd329a.entry.js} +1 -1
  68. package/dist/ionic/{p-025763b2.entry.js → p-5fce4bf4.entry.js} +1 -1
  69. package/dist/ionic/p-70334101.entry.js +4 -0
  70. package/dist/ionic/p-8db6e422.entry.js +4 -0
  71. package/dist/ionic/{p-90e06e60.entry.js → p-986a1db8.entry.js} +1 -1
  72. package/dist/ionic/p-DA52akcQ.js +4 -0
  73. package/dist/ionic/p-b62c04b2.entry.js +4 -0
  74. package/dist/ionic/{p-9fef333a.entry.js → p-da5a7bcd.entry.js} +1 -1
  75. package/dist/ionic/p-e090eca3.entry.js +4 -0
  76. package/dist/ionic/{p-bdc01880.entry.js → p-e5a54d99.entry.js} +1 -1
  77. package/dist/types/components/action-sheet/action-sheet.d.ts +0 -10
  78. package/dist/types/components/alert/alert.d.ts +0 -7
  79. package/dist/types/components/content/content.d.ts +0 -24
  80. package/dist/types/components/modal/modal.d.ts +0 -8
  81. package/dist/types/utils/overlays.d.ts +0 -9
  82. package/dist/types/utils/test/playwright/index.d.ts +0 -1
  83. package/hydrate/index.js +90 -268
  84. package/hydrate/index.mjs +90 -268
  85. package/package.json +1 -1
  86. package/components/p-C8Tp0cQy.js +0 -4
  87. package/components/p-CVNvmbDp.js +0 -4
  88. package/components/p-D2XJVty5.js +0 -4
  89. package/components/p-D49fFp1g.js +0 -4
  90. package/components/p-DALTMT_o.js +0 -4
  91. package/components/p-z-BF3clL.js +0 -4
  92. package/dist/collection/utils/test/playwright/detach-reattach.js +0 -23
  93. package/dist/ionic/p-010601fe.entry.js +0 -4
  94. package/dist/ionic/p-26911da5.entry.js +0 -4
  95. package/dist/ionic/p-4778b90f.entry.js +0 -4
  96. package/dist/ionic/p-7dec112e.entry.js +0 -4
  97. package/dist/ionic/p-d85e59b1.entry.js +0 -4
  98. package/dist/ionic/p-dad2f3e4.entry.js +0 -4
  99. package/dist/ionic/p-nxFQkv7U.js +0 -4
  100. package/dist/types/utils/test/playwright/detach-reattach.d.ts +0 -13
@@ -8,7 +8,7 @@ import { raf, inheritAttributes, hasLazyBuild, getElementRoot } from "../../util
8
8
  import { createLockController } from "../../utils/lock-controller";
9
9
  import { printIonWarning } from "../../utils/logging/index";
10
10
  import { Style as StatusBarStyle, StatusBar } from "../../utils/native/status-bar";
11
- import { BACKDROP, cleanupRootFocusTrapAccessibility, createTriggerController, dismiss, eventMethod, FOCUS_TRAP_DISABLE_CLASS, GESTURE, prepareOverlay, present, restoreRootFocusTrapAccessibility, setOverlayId, } from "../../utils/overlays";
11
+ import { BACKDROP, cleanupRootFocusTrapAccessibility, createTriggerController, dismiss, eventMethod, FOCUS_TRAP_DISABLE_CLASS, GESTURE, prepareOverlay, present, setOverlayId, } from "../../utils/overlays";
12
12
  import { getClassMap } from "../../utils/theme";
13
13
  import { deepReady, waitForMount } from "../../utils/transition/index";
14
14
  import { config } from "../../global/config";
@@ -43,9 +43,6 @@ export class Modal {
43
43
  this.inline = false;
44
44
  // Whether or not modal is being dismissed via gesture
45
45
  this.gestureAnimationDismissing = false;
46
- // True from the first safe-area write in `present()` until the enter
47
- // animation settles. A position-based read in that window is not the rest position.
48
- this.isPresenting = false;
49
46
  this.presented = false;
50
47
  /** @internal */
51
48
  this.hasController = false;
@@ -282,17 +279,6 @@ export class Modal {
282
279
  const { el } = this;
283
280
  prepareOverlay(el);
284
281
  this.triggerChanged();
285
- // A disconnect tears down state this presentation still needs and cannot
286
- // tell a re-insert from a removal, so put it back.
287
- if (this.presented || this.isPresenting) {
288
- this.restoreSafeAreaOverrides();
289
- }
290
- // A relocation from `willPresent` reaches these before `present()` has
291
- // applied the lock, so they apply it instead. Both are idempotent.
292
- if (this.presented) {
293
- restoreRootFocusTrapAccessibility(el);
294
- this.initParentRemovalObserver();
295
- }
296
282
  }
297
283
  disconnectedCallback() {
298
284
  this.triggerController.removeClickListener();
@@ -470,33 +456,25 @@ export class Modal {
470
456
  // Recalculate isSheetModal before safe-area setup because framework
471
457
  // bindings (e.g., Angular) may not have been applied when componentWillLoad ran.
472
458
  this.isSheetModal = this.breakpoints !== undefined && this.initialBreakpoint !== undefined;
473
- this.isPresenting = true;
459
+ // Set initial safe-area overrides before animation
460
+ this.setInitialSafeAreaOverrides();
474
461
  const hasCardModal = presentingElement !== undefined;
475
- // Wrapped so a throw cannot strand `isPresenting`, which would suppress
476
- // the position-based correction for the life of this instance.
477
- try {
478
- // Set initial safe-area overrides before animation
479
- this.setInitialSafeAreaOverrides();
480
- /**
481
- * We need to change the status bar at the
482
- * start of the animation so that it completes
483
- * by the time the card animation is done.
484
- */
485
- if (hasCardModal && getIonMode(this) === 'ios') {
486
- // Cache the original status bar color before the modal is presented
487
- this.statusBarStyle = await StatusBar.getStyle();
488
- setCardStatusBarDark();
489
- }
490
- await present(this, 'modalEnter', iosEnterAnimation, mdEnterAnimation, {
491
- presentingEl: presentingElement,
492
- currentBreakpoint: this.initialBreakpoint,
493
- backdropBreakpoint: this.backdropBreakpoint,
494
- expandToScroll: this.expandToScroll,
495
- });
496
- }
497
- finally {
498
- this.isPresenting = false;
462
+ /**
463
+ * We need to change the status bar at the
464
+ * start of the animation so that it completes
465
+ * by the time the card animation is done.
466
+ */
467
+ if (hasCardModal && getIonMode(this) === 'ios') {
468
+ // Cache the original status bar color before the modal is presented
469
+ this.statusBarStyle = await StatusBar.getStyle();
470
+ setCardStatusBarDark();
499
471
  }
472
+ await present(this, 'modalEnter', iosEnterAnimation, mdEnterAnimation, {
473
+ presentingEl: presentingElement,
474
+ currentBreakpoint: this.initialBreakpoint,
475
+ backdropBreakpoint: this.backdropBreakpoint,
476
+ expandToScroll: this.expandToScroll,
477
+ });
500
478
  // Update safe-area based on actual position after animation
501
479
  this.updateSafeAreaOverrides();
502
480
  // Apply fullscreen safe-area padding if needed
@@ -1006,9 +984,6 @@ export class Modal {
1006
984
  this.cachedOriginalParent.tagName === 'ION-APP') {
1007
985
  return;
1008
986
  }
1009
- // Both `present()` and a reconnect call this, so drop any existing
1010
- // observer. Below the guards, so a call that bails cannot leave none.
1011
- this.cleanupParentRemovalObserver();
1012
987
  this.parentRemovalObserver = new MutationObserver((mutations) => {
1013
988
  mutations.forEach((mutation) => {
1014
989
  if (mutation.type === 'childList' && mutation.removedNodes.length > 0) {
@@ -1087,9 +1062,6 @@ export class Modal {
1087
1062
  // Set the internal offset property with the resolved root safe-area-top value
1088
1063
  if (context.isSheetModal) {
1089
1064
  this.updateSheetOffsetTop();
1090
- // A restore after a DOM move runs this a second time for the same
1091
- // modal, so drop the previous subscription rather than stacking one.
1092
- this.unsubscribeRootSafeAreaTop?.();
1093
1065
  this.unsubscribeRootSafeAreaTop = onRootSafeAreaTopChange((safeAreaTop) => this.updateSheetOffsetTop(safeAreaTop));
1094
1066
  }
1095
1067
  }
@@ -1208,31 +1180,6 @@ export class Modal {
1208
1180
  const { contentEl } = this.findContentAndFooter();
1209
1181
  this.clearContentSafeAreaPadding(contentEl);
1210
1182
  }
1211
- /**
1212
- * Re-applies what `cleanupSafeAreaOverrides()` removed for a modal moved
1213
- * while presented. Anything needing no measurement goes on synchronously so
1214
- * the modal is never painted without safe-area. The position-based
1215
- * correction waits a frame for the layout pass it reads.
1216
- */
1217
- restoreSafeAreaOverrides() {
1218
- this.setInitialSafeAreaOverrides();
1219
- this.applyFullscreenSafeArea();
1220
- raf(() => {
1221
- // A dismiss or another move can land first, and a read before the enter
1222
- // animation settles is not the rest position. `present()` redoes it.
1223
- if (!this.presented || !this.el.isConnected || this.isPresenting) {
1224
- return;
1225
- }
1226
- // A hidden subtree carries `display: none`, so there is no box and the
1227
- // read would write the safe-area for a modal touching no edge. The
1228
- // prediction applied above holds until the modal is shown again.
1229
- const { width, height } = this.el.getBoundingClientRect();
1230
- if (width === 0 && height === 0) {
1231
- return;
1232
- }
1233
- this.updateSafeAreaOverrides();
1234
- });
1235
- }
1236
1183
  render() {
1237
1184
  const { handle, isSheetModal, presentingElement, htmlAttributes, handleBehavior, inheritedAttributes, focusTrap, expandToScroll, } = this;
1238
1185
  const showHandle = handle !== false && isSheetModal;
@@ -1240,7 +1187,7 @@ export class Modal {
1240
1187
  const isCardModal = presentingElement !== undefined && mode === 'ios';
1241
1188
  const isHandleCycle = handleBehavior === 'cycle';
1242
1189
  const isSheetModalWithHandle = isSheetModal && showHandle;
1243
- return (h(Host, { key: '7c9c736052c5a788cf31040b6b2386dd9ea7454b', "no-router": true,
1190
+ return (h(Host, { key: 'a471c293319cb6ee5ffb7ffafec0b8413e4289de', "no-router": true,
1244
1191
  // Allow the modal to be navigable when the handle is focusable
1245
1192
  tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1, ...htmlAttributes, style: {
1246
1193
  zIndex: `${20000 + this.overlayIndex}`,
@@ -1253,7 +1200,7 @@ export class Modal {
1253
1200
  'overlay-hidden': true,
1254
1201
  [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false,
1255
1202
  ...getClassMap(this.cssClass),
1256
- }, onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }, h("ion-backdrop", { key: '01b5b5765fb3a32393c736065c824bf760728823', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && h("div", { key: '40fa7727a0923f7d7461dd027f1511a6a148d84a', class: "modal-shadow" }), h("div", { key: '9af934b607f60795bd5bff7bee6eacfc9b14fa35',
1203
+ }, onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }, h("ion-backdrop", { key: 'f67934afd4ddad64623856fb641cb6db846df428', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && h("div", { key: 'a23f5cb6cf60c8f717c1dd556bce375829c80a43', class: "modal-shadow" }), h("div", { key: '51eb6cd1070e4b7e49840a78dc7437238c867a01',
1257
1204
  /*
1258
1205
  role and aria-modal must be used on the
1259
1206
  same element. They must also be set inside the
@@ -1266,9 +1213,9 @@ export class Modal {
1266
1213
  without the tabindex focus() would be a no-op and screen readers
1267
1214
  may not properly announce the dialog and its content when it opens.
1268
1215
  */
1269
- role: "dialog", ...inheritedAttributes, "aria-modal": "true", tabIndex: -1, class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }, showHandle && (h("button", { key: 'df84a6806413b13efc5b03c862edde83151579a7', class: "modal-handle",
1216
+ role: "dialog", ...inheritedAttributes, "aria-modal": "true", tabIndex: -1, class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }, showHandle && (h("button", { key: 'f49a144642b5c227c0c2b00b33f4c7e37a2bf088', class: "modal-handle",
1270
1217
  // Prevents the handle from receiving keyboard focus when it does not cycle
1271
- tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle", ref: (el) => (this.dragHandleEl = el) })), h("slot", { key: '072d3929ec6f25481946b184d8ac24219011e783', onSlotchange: this.onSlotChange }))));
1218
+ tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle", ref: (el) => (this.dragHandleEl = el) })), h("slot", { key: 'e781c0d5881762c6b61aa432721a38b49580ff64', onSlotchange: this.onSlotChange }))));
1272
1219
  }
1273
1220
  static get is() { return "ion-modal"; }
1274
1221
  static get encapsulation() { return "shadow"; }
@@ -77,12 +77,7 @@
77
77
  --max-width: auto;
78
78
  --height: 100%;
79
79
  --min-height: auto;
80
- /**
81
- * Clamps a content-sized `--height` (auto, fit-content, ...) to the
82
- * overlay, giving the wrapper's flex children something to shrink
83
- * toward so `ion-content` scrolls instead of overflowing.
84
- */
85
- --max-height: 100%;
80
+ --max-height: auto;
86
81
  --overflow: hidden;
87
82
  --border-radius: 0;
88
83
  --border-width: 0;
@@ -134,14 +129,8 @@ ion-backdrop {
134
129
  /**
135
130
  * The wrapper receives programmatic focus for screen readers but should not
136
131
  * show a visible focus ring, which is meant only for keyboard navigation.
137
- *
138
- * A flex layout is required for the wrapper to size itself to its content
139
- * when the modal is content-sized (`--height` is auto, fit-content, ...).
140
- * This makes it so that the content can scroll when it overflows the wrapper.
141
132
  */
142
133
  .modal-wrapper {
143
- display: flex;
144
- flex-direction: column;
145
134
  outline: none;
146
135
  }
147
136
 
@@ -7,7 +7,7 @@ import { CoreDelegate, attachComponent, detachComponent } from "../../utils/fram
7
7
  import { addEventListener, raf, hasLazyBuild } from "../../utils/helpers";
8
8
  import { createLockController } from "../../utils/lock-controller";
9
9
  import { printIonWarning } from "../../utils/logging/index";
10
- import { BACKDROP, cleanupRootFocusTrapAccessibility, dismiss, eventMethod, FOCUS_TRAP_DISABLE_CLASS, prepareOverlay, present, restoreRootFocusTrapAccessibility, setOverlayId, } from "../../utils/overlays";
10
+ import { BACKDROP, cleanupRootFocusTrapAccessibility, dismiss, eventMethod, FOCUS_TRAP_DISABLE_CLASS, prepareOverlay, present, setOverlayId, } from "../../utils/overlays";
11
11
  import { isPlatform } from "../../utils/platform";
12
12
  import { getClassMap } from "../../utils/theme";
13
13
  import { deepReady, waitForMount } from "../../utils/transition/index";
@@ -219,13 +219,6 @@ export class Popover {
219
219
  const { configureTriggerInteraction, el } = this;
220
220
  prepareOverlay(el);
221
221
  configureTriggerInteraction();
222
- // Re-apply the root lock if moved without dismiss() being called
223
- if (this.presented) {
224
- restoreRootFocusTrapAccessibility(el);
225
- // The disconnect tore down the header observer, and `present()` is its
226
- // only other caller, so a move mid-layout would lose the recalculation.
227
- this.recalculateContentOnHeaderReady();
228
- }
229
222
  }
230
223
  disconnectedCallback() {
231
224
  const { destroyTriggerInteraction } = this;
@@ -403,12 +396,6 @@ export class Popover {
403
396
  if (!header || contentElements.length === 0) {
404
397
  return;
405
398
  }
406
- // Both `present()` and a reconnect call this, so drop any existing
407
- // observer. Below the guards, so a call that bails cannot leave none.
408
- if (this.headerResizeObserver) {
409
- this.headerResizeObserver.disconnect();
410
- this.headerResizeObserver = undefined;
411
- }
412
399
  this.headerResizeObserver = new ResizeObserver(async () => {
413
400
  if (header.offsetHeight > 0) {
414
401
  this.headerResizeObserver?.disconnect();
@@ -481,7 +468,7 @@ export class Popover {
481
468
  const { onLifecycle, parentPopover, dismissOnSelect, side, arrow, htmlAttributes, focusTrap } = this;
482
469
  const desktop = isPlatform('desktop');
483
470
  const enableArrow = arrow && !parentPopover;
484
- return (h(Host, { key: 'b5e9c788f58397203976d5f8302dfb89e916efe1', "aria-modal": "true", "no-router": true, tabindex: "-1", ...htmlAttributes, style: {
471
+ return (h(Host, { key: '52ffc7116969ae1b8b927e67f2acbfe5f5434f70', "aria-modal": "true", "no-router": true, tabindex: "-1", ...htmlAttributes, style: {
485
472
  zIndex: `${20000 + this.overlayIndex}`,
486
473
  }, class: {
487
474
  ...getClassMap(this.cssClass),
@@ -492,7 +479,7 @@ export class Popover {
492
479
  [`popover-side-${side}`]: true,
493
480
  [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false,
494
481
  'popover-nested': !!parentPopover,
495
- }, onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }, !parentPopover && h("ion-backdrop", { key: 'f3977833c5b2c0087c286ee54363b478d69eb115', tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), h("div", { key: '1059893d6fd2932ca8adcdf8d45a5d66f4794727', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && h("div", { key: '24d7988bdd95882ad77fcaa7112aeda55878bee4', class: "popover-arrow", part: "arrow" }), h("div", { key: '4d6992e0a9d629f11763045f9199f9a77fa521ab', class: "popover-content", part: "content" }, h("slot", { key: 'b29747419620a01a6c34e9e846cd529b0b210145' })))));
482
+ }, onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }, !parentPopover && h("ion-backdrop", { key: '79a8e851dbd22119e21ffb2f4709c555251045c8', tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), h("div", { key: 'c46c9f62c3ef3f902e23f27404eaa446a5d8cf88', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && h("div", { key: '9fdcbbc4ea6c7bde74f646d48eb77296b2c9dd83', class: "popover-arrow", part: "arrow" }), h("div", { key: '138e56bb83462ebb0908edb522b45ecf94b82aeb', class: "popover-content", part: "content" }, h("slot", { key: 'daeefcf002e8d89e91d6e0faf7f63f75b68a2dbe' })))));
496
483
  }
497
484
  static get is() { return "ion-popover"; }
498
485
  static get encapsulation() { return "shadow"; }
@@ -21,15 +21,6 @@ export const activeAnimations = new WeakMap();
21
21
  const isBackdropAlwaysBlocking = (el) => {
22
22
  return el.showBackdrop !== false && !((el.backdropBreakpoint ?? 0) > 0);
23
23
  };
24
- /**
25
- * Whether the overlay takes the app root out of the accessibility tree and
26
- * blocks body scroll while presented. Toasts never do, modal and popover can
27
- * opt out with `focusTrap={false}`, and a backdrop that does not block
28
- * (`showBackdrop={false}`, or a `backdropBreakpoint` above 0) is excluded.
29
- */
30
- const locksAppRoot = (el) => {
31
- return el.tagName !== 'ION-TOAST' && el.focusTrap !== false && isBackdropAlwaysBlocking(el);
32
- };
33
24
  const createController = (tagName) => {
34
25
  return {
35
26
  create(options) {
@@ -400,13 +391,6 @@ export const getPresentedOverlay = (doc, overlayTag, id) => {
400
391
  // Otherwise, return the last overlay with the given id
401
392
  return (id === undefined ? overlays : overlays.filter((o) => o.id === id)).slice(-1)[0];
402
393
  };
403
- /**
404
- * The element an app nests its views under. Overlays hide this rather than the
405
- * whole root, so the overlay itself (a sibling) stays reachable.
406
- */
407
- const getViewContainer = () => {
408
- return getAppRoot(document).querySelector('ion-router-outlet, #ion-view-container-root');
409
- };
410
394
  /**
411
395
  * When an overlay is presented, the main
412
396
  * focus is the overlay not the page content.
@@ -430,7 +414,8 @@ const getViewContainer = () => {
430
414
  * for main content.
431
415
  */
432
416
  export const setRootAriaHidden = (hidden = false) => {
433
- const viewContainer = getViewContainer();
417
+ const root = getAppRoot(document);
418
+ const viewContainer = root.querySelector('ion-router-outlet, #ion-view-container-root');
434
419
  if (!viewContainer) {
435
420
  return;
436
421
  }
@@ -455,42 +440,15 @@ export const cleanupRootFocusTrapAccessibility = () => {
455
440
  return;
456
441
  }
457
442
  const remainingOverlays = getPresentedOverlays(document);
458
- const hasRemainingLocking = remainingOverlays.some((o) => locksAppRoot(o));
443
+ const hasRemainingLocking = remainingOverlays.some((o) => {
444
+ const el = o;
445
+ return el.tagName !== 'ION-TOAST' && el.focusTrap !== false && isBackdropAlwaysBlocking(el);
446
+ });
459
447
  if (!hasRemainingLocking) {
460
448
  setRootAriaHidden(false);
461
449
  document.body.classList.remove(BACKDROP_NO_SCROLL);
462
450
  }
463
451
  };
464
- /**
465
- * Applies the root lock itself: `aria-hidden` on the view container, and
466
- * `backdrop-no-scroll` on the body. Shared by `present()` and the restore
467
- * below, which have to stay in lockstep.
468
- */
469
- const applyRootLock = (el) => {
470
- // Hiding the container the overlay now sits in would hide the overlay too.
471
- if (!getViewContainer()?.contains(el)) {
472
- setRootAriaHidden(true);
473
- }
474
- document.body.classList.add(BACKDROP_NO_SCROLL);
475
- };
476
- /**
477
- * Re-applies the root lock that `cleanupRootFocusTrapAccessibility()` released.
478
- * Call from `connectedCallback` when the overlay is still presented.
479
- *
480
- * A synchronous move keeps the overlay connected, so the lock survives. A
481
- * detach with a re-insert in a later task releases it, which is the shape a
482
- * framework produces when it takes a subtree out and puts it back.
483
- */
484
- export const restoreRootFocusTrapAccessibility = (overlayEl) => {
485
- if (typeof document === 'undefined') {
486
- return;
487
- }
488
- const el = overlayEl;
489
- if (!locksAppRoot(el)) {
490
- return;
491
- }
492
- applyRootLock(el);
493
- };
494
452
  export const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts) => {
495
453
  if (overlay.presented) {
496
454
  return;
@@ -507,7 +465,15 @@ export const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation
507
465
  restoreElementFocus(overlay.el);
508
466
  }
509
467
  /**
510
- * Some apps move inline overlays to a specific container
468
+ * Due to accessibility guidelines, toasts do not have
469
+ * focus traps.
470
+ *
471
+ * All other overlays should have focus traps to prevent
472
+ * the keyboard focus from leaving the overlay unless
473
+ * developers explicitly opt out (for example, sheet
474
+ * modals that should permit background interaction).
475
+ *
476
+ * Note: Some apps move inline overlays to a specific container
511
477
  * during the willPresent lifecycle (e.g., React portals via
512
478
  * onWillPresent). Defer applying aria-hidden/inert to the app
513
479
  * root until after willPresent so we can detect where the
@@ -516,11 +482,18 @@ export const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation
516
482
  * to avoid disabling the overlay.
517
483
  */
518
484
  const overlayEl = overlay.el;
519
- const shouldLockRoot = locksAppRoot(overlayEl);
485
+ const shouldTrapFocus = overlayEl.tagName !== 'ION-TOAST' && overlayEl.focusTrap !== false;
486
+ const shouldLockRoot = shouldTrapFocus && isBackdropAlwaysBlocking(overlayEl);
520
487
  overlay.presented = true;
521
488
  overlay.willPresent.emit();
522
489
  if (shouldLockRoot) {
523
- applyRootLock(overlayEl);
490
+ const root = getAppRoot(document);
491
+ const viewContainer = root.querySelector('ion-router-outlet, #ion-view-container-root');
492
+ const overlayInsideViewContainer = viewContainer ? viewContainer.contains(overlayEl) : false;
493
+ if (!overlayInsideViewContainer) {
494
+ setRootAriaHidden(true);
495
+ }
496
+ document.body.classList.add(BACKDROP_NO_SCROLL);
524
497
  }
525
498
  overlay.willPresentShorthand?.emit();
526
499
  const mode = getIonMode(overlay);
@@ -646,9 +619,12 @@ export const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLe
646
619
  * from the root element when the last focus-trapping overlay
647
620
  * is dismissed.
648
621
  */
649
- const overlaysLockingRoot = presentedOverlays.filter((o) => locksAppRoot(o));
622
+ const overlaysLockingRoot = presentedOverlays.filter((o) => {
623
+ const el = o;
624
+ return el.tagName !== 'ION-TOAST' && el.focusTrap !== false && isBackdropAlwaysBlocking(el);
625
+ });
650
626
  const overlayEl = overlay.el;
651
- const locksRoot = locksAppRoot(overlayEl);
627
+ const locksRoot = overlayEl.tagName !== 'ION-TOAST' && overlayEl.focusTrap !== false && isBackdropAlwaysBlocking(overlayEl);
652
628
  /**
653
629
  * If this is the last visible overlay that is trapping focus
654
630
  * then we want to re-add the root to the accessibility tree.
@@ -10,4 +10,3 @@ export * from './apply-keyboard-focus';
10
10
  export * from './matchers';
11
11
  export * from './viewports';
12
12
  export * from './generator';
13
- export * from './detach-reattach';
package/dist/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2026-08-31T21:45:29",
2
+ "timestamp": "2026-09-02T19:01:39",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.44.1",
package/dist/esm/index.js CHANGED
@@ -14,7 +14,7 @@ export { I as IonicSafeString } from './index-JgU5uTSY.js';
14
14
  export { g as getMode, s as setupConfig } from './config-DWCzVL3Y.js';
15
15
  export { o as openURL } from './theme-byZM6qHV.js';
16
16
  export { m as menuController } from './index-D_7MeuVD.js';
17
- export { b as actionSheetController, a as alertController, l as loadingController, m as modalController, p as popoverController, t as toastController } from './overlays-Dz2cGX5q.js';
17
+ export { b as actionSheetController, a as alertController, l as loadingController, m as modalController, p as popoverController, t as toastController } from './overlays-CiFoZEq1.js';
18
18
  import './index-ZjP4CjeZ.js';
19
19
  import './gesture-controller-B_gJaBk0.js';
20
20
  import './dir-Dojwmvde.js';
@@ -5,7 +5,7 @@ import { r as registerInstance, c as createEvent, a as readTask, h, d as Host, g
5
5
  import { c as createButtonActiveGesture } from './button-active-DRNebs9r.js';
6
6
  import { r as raf } from './helpers-DLLANtRS.js';
7
7
  import { c as createLockController } from './lock-controller-B-hirT0v.js';
8
- import { c as createDelegateController, d as createTriggerController, B as BACKDROP, i as isCancel, e as present, f as dismiss, g as eventMethod, s as safeCall, h as prepareOverlay, r as restoreRootFocusTrapAccessibility, j as cleanupRootFocusTrapAccessibility, k as setOverlayId } from './overlays-Dz2cGX5q.js';
8
+ import { c as createDelegateController, d as createTriggerController, B as BACKDROP, i as isCancel, e as present, f as dismiss, g as eventMethod, s as safeCall, h as prepareOverlay, j as cleanupRootFocusTrapAccessibility, k as setOverlayId } from './overlays-CiFoZEq1.js';
9
9
  import { r as renderOptionLabel } from './select-option-render-CUJpruSC.js';
10
10
  import { g as getClassMap } from './theme-byZM6qHV.js';
11
11
  import { b as getIonMode } from './ionic-global-B7I1sdvg.js';
@@ -378,13 +378,6 @@ const ActionSheet = class {
378
378
  connectedCallback() {
379
379
  prepareOverlay(this.el);
380
380
  this.triggerChanged();
381
- // `componentDidLoad` only fires once per instance, so a reconnect has to
382
- // rebuild the gesture its disconnect destroyed.
383
- this.setupButtonActiveGesture();
384
- // Re-apply the root lock if moved without dismiss() being called
385
- if (this.presented) {
386
- restoreRootFocusTrapAccessibility(this.el);
387
- }
388
381
  }
389
382
  disconnectedCallback() {
390
383
  if (this.gesture) {
@@ -404,33 +397,24 @@ const ActionSheet = class {
404
397
  // Initialize activeRadioId for radio buttons
405
398
  this.buttonsChanged();
406
399
  }
407
- /**
408
- * Only create gesture if:
409
- * 1. A gesture does not already exist
410
- * 2. App is running in iOS mode
411
- * 3. A wrapper ref exists
412
- * 4. A group ref exists
413
- * 5. The host is still connected, since a reconnect can schedule this and
414
- * disconnect again before the task runs
415
- */
416
- setupButtonActiveGesture() {
400
+ componentDidLoad() {
401
+ /**
402
+ * Only create gesture if:
403
+ * 1. A gesture does not already exist
404
+ * 2. App is running in iOS mode
405
+ * 3. A wrapper ref exists
406
+ * 4. A group ref exists
407
+ */
417
408
  const { groupEl, wrapperEl } = this;
418
- if (getIonMode(this) !== 'ios' || !wrapperEl || !groupEl) {
419
- return;
409
+ if (!this.gesture && getIonMode(this) === 'ios' && wrapperEl && groupEl) {
410
+ readTask(() => {
411
+ const isScrollable = groupEl.scrollHeight > groupEl.clientHeight;
412
+ if (!isScrollable) {
413
+ this.gesture = createButtonActiveGesture(wrapperEl, (refEl) => refEl.classList.contains('action-sheet-button'));
414
+ this.gesture.enable(true);
415
+ }
416
+ });
420
417
  }
421
- readTask(() => {
422
- // Bail if a call queued ahead of this one already built the gesture
423
- // (a second would orphan the first with its listeners still bound), if
424
- // the host disconnected while this task waited, or if the group scrolls.
425
- if (this.gesture || !this.el.isConnected || groupEl.scrollHeight > groupEl.clientHeight) {
426
- return;
427
- }
428
- this.gesture = createButtonActiveGesture(wrapperEl, (refEl) => refEl.classList.contains('action-sheet-button'));
429
- this.gesture.enable(true);
430
- });
431
- }
432
- componentDidLoad() {
433
- this.setupButtonActiveGesture();
434
418
  /**
435
419
  * If action sheet was rendered with isOpen="true"
436
420
  * then we should open action sheet immediately.
@@ -523,17 +507,17 @@ const ActionSheet = class {
523
507
  const cancelButton = allButtons.find((b) => b.role === 'cancel');
524
508
  const buttons = allButtons.filter((b) => b.role !== 'cancel');
525
509
  const headerID = `action-sheet-${overlayIndex}-header`;
526
- return (h(Host, { key: '83b47ea6b81d4eec6582c1dcaae6f267c78ba634', role: "dialog", "aria-modal": "true", "aria-labelledby": header !== undefined ? headerID : null, tabindex: "-1", ...htmlAttributes, style: {
510
+ return (h(Host, { key: '7685831da9a78b73473246a2cea95cefa79a53c3', role: "dialog", "aria-modal": "true", "aria-labelledby": header !== undefined ? headerID : null, tabindex: "-1", ...htmlAttributes, style: {
527
511
  zIndex: `${20000 + this.overlayIndex}`,
528
512
  }, class: {
529
513
  [mode]: true,
530
514
  ...getClassMap(this.cssClass),
531
515
  'overlay-hidden': true,
532
516
  'action-sheet-translucent': this.translucent,
533
- }, onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, h("ion-backdrop", { key: '3652793ec76adcfb87b814eb65d1260ae26f6910', tappable: this.backdropDismiss }), h("div", { key: '7de3a51daf95b50e02734a2cc8eec6f55b1473f3', tabindex: "0", "aria-hidden": "true" }), h("div", { key: '9b76bbf12901b956f7ee6d984f7f71e169bb5939', class: "action-sheet-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, h("div", { key: 'cb52c905275a46ff27810fb1b4748ab533a78c45', class: "action-sheet-container" }, h("div", { key: '578c7194cfbcb65c1e41e15c390af41f179a2686', class: "action-sheet-group", ref: (el) => (this.groupEl = el), role: hasRadioButtons ? 'radiogroup' : undefined }, header !== undefined && (h("div", { key: 'ee961307c25cb1fcb0c6bbf667a8ed76ab717860', id: headerID, class: {
517
+ }, onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, h("ion-backdrop", { key: 'c70f00e401cac99b89412d1adb867f35bc855d57', tappable: this.backdropDismiss }), h("div", { key: '3332893ce3098f1435875480b1269b2821d41660', tabindex: "0", "aria-hidden": "true" }), h("div", { key: 'eb406b0a9e303d6f94c5c7aa99c6f4c089bfbd41', class: "action-sheet-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, h("div", { key: '92ec855379f10e1e0bfce6ff68b45d3cda0c137c', class: "action-sheet-container" }, h("div", { key: 'bc88a396d75396f574961471bf7e6c4edb513353', class: "action-sheet-group", ref: (el) => (this.groupEl = el), role: hasRadioButtons ? 'radiogroup' : undefined }, header !== undefined && (h("div", { key: '33329e0193818888bdcaa443ff5ea301802e0787', id: headerID, class: {
534
518
  'action-sheet-title': true,
535
519
  'action-sheet-has-sub-title': this.subHeader !== undefined,
536
- } }, header, this.subHeader && h("div", { key: '82d4016010db14d3f3b9911c276cb9a63b960ef4', class: "action-sheet-sub-title" }, this.subHeader))), this.renderActionSheetButtons(buttons)), cancelButton && (h("div", { key: 'a88fbfab194e13c6642a65f2e19a12299dd4ac23', class: "action-sheet-group action-sheet-group-cancel" }, h("button", { key: 'a232b8d23f1fc2efb7b37a605102b6994761a2f6', ...cancelButton.htmlAttributes, type: "button", class: buttonClass(cancelButton), onClick: () => this.buttonClick(cancelButton) }, h("span", { key: '19a7d95d3428d78a56b7dacabdec8fc0b722d8c2', class: "action-sheet-button-inner" }, cancelButton.icon && (h("ion-icon", { key: '5f3f3cb996a48e6365a3a09ea72ddc68ac9ccb78', icon: cancelButton.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" })), cancelButton.text), mode === 'md' && h("ion-ripple-effect", { key: '6e8fcb5f103ac19aa4b0682f19791cef0a147001' })))))), h("div", { key: '36f63ab77949c88f662e2cf6bb18510cb9de6a9f', tabindex: "0", "aria-hidden": "true" })));
520
+ } }, header, this.subHeader && h("div", { key: '92ac5a9217a12b7417f7aca9c4fdb7bf6b051364', class: "action-sheet-sub-title" }, this.subHeader))), this.renderActionSheetButtons(buttons)), cancelButton && (h("div", { key: '020463b830fa48fc3ae647ea64f2aaa4d0969305', class: "action-sheet-group action-sheet-group-cancel" }, h("button", { key: 'cefa9c70a2233f6652a81b1a2eae6e717712144d', ...cancelButton.htmlAttributes, type: "button", class: buttonClass(cancelButton), onClick: () => this.buttonClick(cancelButton) }, h("span", { key: '56d7e2f8bfb3644e4476895164d334445fda9b2f', class: "action-sheet-button-inner" }, cancelButton.icon && (h("ion-icon", { key: '6a4a49254ec5cd96f4e0dce9447f90d8cac81913', icon: cancelButton.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" })), cancelButton.text), mode === 'md' && h("ion-ripple-effect", { key: '7d3c6e8d70b0922ea0f75520856285ce1005c891' })))))), h("div", { key: '958fc43e603c6a7f5d1e649d3326fce0f163b5d0', tabindex: "0", "aria-hidden": "true" })));
537
521
  }
538
522
  get el() { return getElement(this); }
539
523
  static get watchers() { return {
@@ -7,7 +7,7 @@ import { c as createButtonActiveGesture } from './button-active-DRNebs9r.js';
7
7
  import { r as raf } from './helpers-DLLANtRS.js';
8
8
  import { c as createLockController } from './lock-controller-B-hirT0v.js';
9
9
  import { g as getOverlayLabelJustify, a as getOverlayLabelPlacement } from './overlay-control-label-BSQPZ79H.js';
10
- import { c as createDelegateController, d as createTriggerController, B as BACKDROP, i as isCancel, h as prepareOverlay, r as restoreRootFocusTrapAccessibility, k as setOverlayId, j as cleanupRootFocusTrapAccessibility, e as present, f as dismiss, g as eventMethod, s as safeCall } from './overlays-Dz2cGX5q.js';
10
+ import { c as createDelegateController, d as createTriggerController, B as BACKDROP, i as isCancel, h as prepareOverlay, k as setOverlayId, j as cleanupRootFocusTrapAccessibility, e as present, f as dismiss, g as eventMethod, s as safeCall } from './overlays-CiFoZEq1.js';
11
11
  import { s as sanitizeDOMString } from './index-JgU5uTSY.js';
12
12
  import { r as renderOptionLabel } from './select-option-render-CUJpruSC.js';
13
13
  import { g as getClassMap } from './theme-byZM6qHV.js';
@@ -296,15 +296,10 @@ const Alert = class {
296
296
  this.triggerChanged();
297
297
  /**
298
298
  * If the alert was previously connected and is being reattached, the
299
- * `ResizeObserver` and the button gesture were torn down. `componentDidLoad`
300
- * only fires once per instance, so re-establish both here on reconnect.
299
+ * ResizeObserver was disconnected. componentDidLoad only fires once per
300
+ * instance, so re-establish the observer here on reconnect.
301
301
  */
302
302
  this.setupButtonGroupResizeObserver();
303
- this.setupButtonActiveGesture();
304
- // Re-apply the root lock if moved without dismiss() being called
305
- if (this.presented) {
306
- restoreRootFocusTrapAccessibility(this.el);
307
- }
308
303
  }
309
304
  componentWillLoad() {
310
305
  if (!this.htmlAttributes?.id) {
@@ -326,20 +321,17 @@ const Alert = class {
326
321
  this.buttonGroupResizeObserver?.disconnect();
327
322
  this.buttonGroupResizeObserver = undefined;
328
323
  }
329
- /**
330
- * Only create gesture if:
331
- * 1. A gesture does not already exist
332
- * 2. App is running in iOS mode
333
- * 3. A wrapper ref exists
334
- */
335
- setupButtonActiveGesture() {
324
+ componentDidLoad() {
325
+ /**
326
+ * Only create gesture if:
327
+ * 1. A gesture does not already exist
328
+ * 2. App is running in iOS mode
329
+ * 3. A wrapper ref exists
330
+ */
336
331
  if (!this.gesture && getIonMode(this) === 'ios' && this.wrapperEl) {
337
332
  this.gesture = createButtonActiveGesture(this.wrapperEl, (refEl) => refEl.classList.contains('alert-button'));
338
333
  this.gesture.enable(true);
339
334
  }
340
- }
341
- componentDidLoad() {
342
- this.setupButtonActiveGesture();
343
335
  this.setupButtonGroupResizeObserver();
344
336
  /**
345
337
  * If alert was rendered with isOpen="true"
@@ -662,14 +654,14 @@ const Alert = class {
662
654
  * If neither are defined, do not set aria-labelledby.
663
655
  */
664
656
  const ariaLabelledBy = header && subHeader ? `${hdrId} ${subHdrId}` : header ? hdrId : subHeader ? subHdrId : null;
665
- return (h(Host, { key: '083b5250dc4c76e85240e0225abcb7ca2b66de2f', tabindex: "-1", style: {
657
+ return (h(Host, { key: '022f3463b8e6c52064b90ec304c524847c3d5ad3', tabindex: "-1", style: {
666
658
  zIndex: `${20000 + overlayIndex}`,
667
659
  }, class: {
668
660
  ...getClassMap(this.cssClass),
669
661
  [mode]: true,
670
662
  'overlay-hidden': true,
671
663
  'alert-translucent': this.translucent,
672
- }, onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, h("ion-backdrop", { key: '65c92a956d998ae9016396dd2a29c42ab7376d0e', tappable: this.backdropDismiss }), h("div", { key: 'f2288fa0b7ef9d0bf031c168fe78c48422cf91c8', tabindex: "0", "aria-hidden": "true" }), h("div", { key: 'dbb109435c378f77c6b0231e58756f8a0467732d', class: "alert-wrapper ion-overlay-wrapper", role: role, "aria-modal": "true", "aria-labelledby": ariaLabelledBy, "aria-describedby": message !== undefined ? msgId : null, tabindex: "0", ref: (el) => (this.wrapperEl = el), ...htmlAttributes }, h("div", { key: '075597f94719673cf1f894a8566e1036849afa75', class: "alert-head" }, header && (h("h2", { key: 'f96f4b1db8473c62040beed6e96108c733978d73', id: hdrId, class: "alert-title" }, header)), subHeader && !header && (h("h2", { key: 'dbd824ef19a07bddde4eb928f11de7c7cadf98b8', id: subHdrId, class: "alert-sub-title" }, subHeader)), subHeader && header && (h("h3", { key: '4774fa13700dd23aec7930492acae80de3bdf5d1', id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), h("div", { key: '5c728b7457e231f64294bbec821bdb547c6437dd', tabindex: "0", "aria-hidden": "true" })));
664
+ }, onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, h("ion-backdrop", { key: 'c3cd05738bc2834f54707edeb2fae06ec10d6fd2', tappable: this.backdropDismiss }), h("div", { key: 'b44fadd9ba7ddf073854c5035538d11ae8e66bc2', tabindex: "0", "aria-hidden": "true" }), h("div", { key: 'fafea048141a6c7957e62aef31faa8041dd610c1', class: "alert-wrapper ion-overlay-wrapper", role: role, "aria-modal": "true", "aria-labelledby": ariaLabelledBy, "aria-describedby": message !== undefined ? msgId : null, tabindex: "0", ref: (el) => (this.wrapperEl = el), ...htmlAttributes }, h("div", { key: '3ad9d2d4b7cf425eab8293ddc12eff0fe8df1517', class: "alert-head" }, header && (h("h2", { key: '7d9154f5ee595b7e4da6ecf3a20871f104c1256e', id: hdrId, class: "alert-title" }, header)), subHeader && !header && (h("h2", { key: '1f891f38004be6964e9406b84dd580145c42516a', id: subHdrId, class: "alert-sub-title" }, subHeader)), subHeader && header && (h("h3", { key: '2ab4d344ecb7e384e8f6d3d3e59ee5a1bbcc832c', id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), h("div", { key: '78a4ff09aa3aaafcd0dc2a42d036767d83b3cfa2', tabindex: "0", "aria-hidden": "true" })));
673
665
  }
674
666
  get el() { return getElement(this); }
675
667
  static get watchers() { return {