@ionic/core 8.7.12-dev.11765060985.14ad27fb → 8.7.12-dev.11765219790.17cbe2e9

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 (56) hide show
  1. package/components/modal.js +5 -86
  2. package/components/overlays.js +11 -15
  3. package/css/core.css +1 -1
  4. package/css/core.css.map +1 -1
  5. package/css/ionic.bundle.css +1 -1
  6. package/css/ionic.bundle.css.map +1 -1
  7. package/dist/cjs/index.cjs.js +1 -1
  8. package/dist/cjs/ion-action-sheet.cjs.entry.js +1 -1
  9. package/dist/cjs/ion-alert.cjs.entry.js +1 -1
  10. package/dist/cjs/ion-datetime_3.cjs.entry.js +1 -1
  11. package/dist/cjs/ion-loading.cjs.entry.js +1 -1
  12. package/dist/cjs/ion-menu_3.cjs.entry.js +1 -1
  13. package/dist/cjs/ion-modal.cjs.entry.js +6 -86
  14. package/dist/cjs/ion-popover.cjs.entry.js +1 -1
  15. package/dist/cjs/ion-select-modal.cjs.entry.js +1 -1
  16. package/dist/cjs/ion-select_3.cjs.entry.js +1 -1
  17. package/dist/cjs/ion-toast.cjs.entry.js +1 -1
  18. package/dist/cjs/ionic.cjs.js +1 -1
  19. package/dist/cjs/loader.cjs.js +1 -1
  20. package/dist/cjs/{overlays-D3xMmZCY.js → overlays-DxIZwUXI.js} +11 -15
  21. package/dist/collection/components/modal/modal.js +5 -86
  22. package/dist/collection/utils/overlays.js +11 -15
  23. package/dist/docs.json +1 -1
  24. package/dist/esm/index.js +1 -1
  25. package/dist/esm/ion-action-sheet.entry.js +1 -1
  26. package/dist/esm/ion-alert.entry.js +1 -1
  27. package/dist/esm/ion-datetime_3.entry.js +1 -1
  28. package/dist/esm/ion-loading.entry.js +1 -1
  29. package/dist/esm/ion-menu_3.entry.js +1 -1
  30. package/dist/esm/ion-modal.entry.js +6 -86
  31. package/dist/esm/ion-popover.entry.js +1 -1
  32. package/dist/esm/ion-select-modal.entry.js +1 -1
  33. package/dist/esm/ion-select_3.entry.js +1 -1
  34. package/dist/esm/ion-toast.entry.js +1 -1
  35. package/dist/esm/ionic.js +1 -1
  36. package/dist/esm/loader.js +1 -1
  37. package/dist/esm/{overlays-DYKBVm6h.js → overlays-BymNv-BL.js} +11 -15
  38. package/dist/ionic/index.esm.js +1 -1
  39. package/dist/ionic/ionic.esm.js +1 -1
  40. package/dist/ionic/{p-3fad4ab5.entry.js → p-0b80d700.entry.js} +1 -1
  41. package/dist/ionic/{p-a480563a.entry.js → p-15193d01.entry.js} +1 -1
  42. package/dist/ionic/{p-1cf19c5a.entry.js → p-510d86e1.entry.js} +1 -1
  43. package/dist/ionic/{p-ede27a66.entry.js → p-7380261c.entry.js} +1 -1
  44. package/dist/ionic/{p-b4b6513a.entry.js → p-7da39a4d.entry.js} +1 -1
  45. package/dist/ionic/{p-caa8efa1.entry.js → p-83be404e.entry.js} +1 -1
  46. package/dist/ionic/{p-7928cc4d.entry.js → p-98fc09eb.entry.js} +1 -1
  47. package/dist/ionic/p-D87hU-Ly.js +4 -0
  48. package/dist/ionic/p-a80f1b04.entry.js +4 -0
  49. package/dist/ionic/{p-985f02a8.entry.js → p-cb93126d.entry.js} +1 -1
  50. package/dist/ionic/{p-038f3a87.entry.js → p-e16b69e1.entry.js} +1 -1
  51. package/dist/types/components/modal/modal.d.ts +0 -13
  52. package/hydrate/index.js +16 -101
  53. package/hydrate/index.mjs +16 -101
  54. package/package.json +1 -2
  55. package/dist/ionic/p-9084d52f.entry.js +0 -4
  56. package/dist/ionic/p-CHK505Co.js +0 -4
@@ -504,7 +504,7 @@ const setRootAriaHidden = (hidden = false) => {
504
504
  }
505
505
  };
506
506
  const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts) => {
507
- var _a, _b, _c;
507
+ var _a, _b;
508
508
  if (overlay.presented) {
509
509
  return;
510
510
  }
@@ -538,10 +538,9 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
538
538
  */
539
539
  const overlayEl = overlay.el;
540
540
  const shouldTrapFocus = overlayEl.tagName !== 'ION-TOAST' && overlayEl.focusTrap !== false;
541
- // Only lock out root content when backdrop is always active. Developers relying on
542
- // showBackdrop=false or backdropBreakpoint expect background interaction at some point.
543
- const backdropAlwaysActive = overlayEl.showBackdrop !== false && !(((_a = overlayEl.backdropBreakpoint) !== null && _a !== void 0 ? _a : 0) > 0);
544
- const shouldLockRoot = shouldTrapFocus && backdropAlwaysActive;
541
+ // Only lock out root content when backdrop is active. Developers relying on showBackdrop=false
542
+ // expect background interaction to remain enabled.
543
+ const shouldLockRoot = shouldTrapFocus && overlayEl.showBackdrop !== false;
545
544
  overlay.presented = true;
546
545
  overlay.willPresent.emit();
547
546
  if (shouldLockRoot) {
@@ -553,7 +552,7 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
553
552
  }
554
553
  document.body.classList.add(gestureController.BACKDROP_NO_SCROLL);
555
554
  }
556
- (_b = overlay.willPresentShorthand) === null || _b === void 0 ? void 0 : _b.emit();
555
+ (_a = overlay.willPresentShorthand) === null || _a === void 0 ? void 0 : _a.emit();
557
556
  const mode = ionicGlobal.getIonMode(overlay);
558
557
  // get the user's animation fn if one was provided
559
558
  const animationBuilder = overlay.enterAnimation
@@ -562,7 +561,7 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
562
561
  const completed = await overlayAnimation(overlay, animationBuilder, overlay.el, opts);
563
562
  if (completed) {
564
563
  overlay.didPresent.emit();
565
- (_c = overlay.didPresentShorthand) === null || _c === void 0 ? void 0 : _c.emit();
564
+ (_b = overlay.didPresentShorthand) === null || _b === void 0 ? void 0 : _b.emit();
566
565
  }
567
566
  /**
568
567
  * If the focused element is already
@@ -640,7 +639,7 @@ const restoreElementFocus = async (overlayEl) => {
640
639
  }
641
640
  };
642
641
  const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnimation, opts) => {
643
- var _a, _b, _c;
642
+ var _a, _b;
644
643
  if (!overlay.presented) {
645
644
  return false;
646
645
  }
@@ -656,14 +655,11 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
656
655
  * is dismissed.
657
656
  */
658
657
  const overlaysLockingRoot = presentedOverlays.filter((o) => {
659
- var _a;
660
658
  const el = o;
661
- const backdropAlwaysActive = el.showBackdrop !== false && !(((_a = el.backdropBreakpoint) !== null && _a !== void 0 ? _a : 0) > 0);
662
- return el.tagName !== 'ION-TOAST' && el.focusTrap !== false && backdropAlwaysActive;
659
+ return el.tagName !== 'ION-TOAST' && el.focusTrap !== false && el.showBackdrop !== false;
663
660
  });
664
661
  const overlayEl = overlay.el;
665
- const backdropAlwaysActive = overlayEl.showBackdrop !== false && !(((_a = overlayEl.backdropBreakpoint) !== null && _a !== void 0 ? _a : 0) > 0);
666
- const locksRoot = overlayEl.tagName !== 'ION-TOAST' && overlayEl.focusTrap !== false && backdropAlwaysActive;
662
+ const locksRoot = overlayEl.tagName !== 'ION-TOAST' && overlayEl.focusTrap !== false && overlayEl.showBackdrop !== false;
667
663
  /**
668
664
  * If this is the last visible overlay that is trapping focus
669
665
  * then we want to re-add the root to the accessibility tree.
@@ -678,7 +674,7 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
678
674
  // Overlay contents should not be clickable during dismiss
679
675
  overlay.el.style.setProperty('pointer-events', 'none');
680
676
  overlay.willDismiss.emit({ data, role });
681
- (_b = overlay.willDismissShorthand) === null || _b === void 0 ? void 0 : _b.emit({ data, role });
677
+ (_a = overlay.willDismissShorthand) === null || _a === void 0 ? void 0 : _a.emit({ data, role });
682
678
  const mode = ionicGlobal.getIonMode(overlay);
683
679
  const animationBuilder = overlay.leaveAnimation
684
680
  ? overlay.leaveAnimation
@@ -688,7 +684,7 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
688
684
  await overlayAnimation(overlay, animationBuilder, overlay.el, opts);
689
685
  }
690
686
  overlay.didDismiss.emit({ data, role });
691
- (_c = overlay.didDismissShorthand) === null || _c === void 0 ? void 0 : _c.emit({ data, role });
687
+ (_b = overlay.didDismissShorthand) === null || _b === void 0 ? void 0 : _b.emit({ data, role });
692
688
  // Get a reference to all animations currently assigned to this overlay
693
689
  // Then tear them down to return the overlay to its initial visual state
694
690
  const animations = activeAnimations.get(overlay) || [];
@@ -463,13 +463,7 @@ export class Modal {
463
463
  };
464
464
  window.addEventListener(KEYBOARD_DID_OPEN, this.keyboardOpenCallback);
465
465
  }
466
- /**
467
- * Recalculate isSheetModal because framework bindings (e.g., Angular)
468
- * may not have been applied when componentWillLoad ran.
469
- */
470
- const isSheetModal = this.breakpoints !== undefined && this.initialBreakpoint !== undefined;
471
- this.isSheetModal = isSheetModal;
472
- if (isSheetModal) {
466
+ if (this.isSheetModal) {
473
467
  this.initSheetGesture();
474
468
  }
475
469
  else if (hasCardModal) {
@@ -551,79 +545,6 @@ export class Modal {
551
545
  this.gesture = gesture;
552
546
  this.moveSheetToBreakpoint = moveSheetToBreakpoint;
553
547
  this.gesture.enable(true);
554
- /**
555
- * When backdrop interaction is allowed, nested router outlets from child routes
556
- * may block pointer events to parent content. Apply passthrough styles only when
557
- * the modal was the sole content of a child route page.
558
- * See https://github.com/ionic-team/ionic-framework/issues/30700
559
- */
560
- const backdropNotBlocking = this.showBackdrop === false || this.focusTrap === false || backdropBreakpoint > 0;
561
- if (backdropNotBlocking) {
562
- this.setupChildRoutePassthrough();
563
- }
564
- }
565
- /**
566
- * For sheet modals that allow background interaction, sets up pointer-events
567
- * passthrough on child route page wrappers and nested router outlets.
568
- */
569
- setupChildRoutePassthrough() {
570
- var _a;
571
- const pageParent = this.getOriginalPageParent();
572
- // Skip ion-app (controller modals) and pages with other content (inline modals)
573
- if (!pageParent || pageParent.tagName === 'ION-APP') {
574
- return;
575
- }
576
- const hasVisibleContent = Array.from(pageParent.children).some((child) => {
577
- var _a;
578
- if (child === this.el)
579
- return false;
580
- if (child instanceof HTMLElement && window.getComputedStyle(child).display === 'none')
581
- return false;
582
- if (child.tagName === 'TEMPLATE' || child.tagName === 'SLOT')
583
- return false;
584
- if (child.nodeType === Node.TEXT_NODE && !((_a = child.textContent) === null || _a === void 0 ? void 0 : _a.trim()))
585
- return false;
586
- return true;
587
- });
588
- if (hasVisibleContent) {
589
- return;
590
- }
591
- // Child route case: page only contained the modal
592
- pageParent.classList.add('ion-page-overlay-passthrough');
593
- // Also make nested router outlets passthrough
594
- const routerOutlet = pageParent.parentElement;
595
- if ((routerOutlet === null || routerOutlet === void 0 ? void 0 : routerOutlet.tagName) === 'ION-ROUTER-OUTLET' && ((_a = routerOutlet.parentElement) === null || _a === void 0 ? void 0 : _a.tagName) !== 'ION-APP') {
596
- routerOutlet.style.setProperty('pointer-events', 'none');
597
- routerOutlet.setAttribute('data-overlay-passthrough', 'true');
598
- }
599
- }
600
- /**
601
- * Finds the ion-page ancestor of the modal's original parent location.
602
- */
603
- getOriginalPageParent() {
604
- if (!this.cachedOriginalParent) {
605
- return null;
606
- }
607
- let pageParent = this.cachedOriginalParent;
608
- while (pageParent && !pageParent.classList.contains('ion-page')) {
609
- pageParent = pageParent.parentElement;
610
- }
611
- return pageParent;
612
- }
613
- /**
614
- * Removes passthrough styles added by setupChildRoutePassthrough.
615
- */
616
- cleanupChildRoutePassthrough() {
617
- const pageParent = this.getOriginalPageParent();
618
- if (!pageParent) {
619
- return;
620
- }
621
- pageParent.classList.remove('ion-page-overlay-passthrough');
622
- const routerOutlet = pageParent.parentElement;
623
- if (routerOutlet === null || routerOutlet === void 0 ? void 0 : routerOutlet.hasAttribute('data-overlay-passthrough')) {
624
- routerOutlet.style.removeProperty('pointer-events');
625
- routerOutlet.removeAttribute('data-overlay-passthrough');
626
- }
627
548
  }
628
549
  sheetOnDismiss() {
629
550
  /**
@@ -713,7 +634,6 @@ export class Modal {
713
634
  }
714
635
  this.cleanupViewTransitionListener();
715
636
  this.cleanupParentRemovalObserver();
716
- this.cleanupChildRoutePassthrough();
717
637
  }
718
638
  this.currentBreakpoint = undefined;
719
639
  this.animation = undefined;
@@ -959,20 +879,20 @@ export class Modal {
959
879
  const isCardModal = presentingElement !== undefined && mode === 'ios';
960
880
  const isHandleCycle = handleBehavior === 'cycle';
961
881
  const isSheetModalWithHandle = isSheetModal && showHandle;
962
- return (h(Host, Object.assign({ key: '880d34a27983dde27c81a06bfed390bf38e43244', "no-router": true,
882
+ return (h(Host, Object.assign({ key: '9e9a7bd591eb17a225a00b4fa2e379e94601d17f', "no-router": true,
963
883
  // Allow the modal to be navigable when the handle is focusable
964
884
  tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
965
885
  zIndex: `${20000 + this.overlayIndex}`,
966
- }, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), h("ion-backdrop", { key: 'c674d142ace2b3e5bd38b302cf2984fc3fac11c8', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && h("div", { key: 'ce83713b57960d354935ef8e65251892ed9d4e3b', class: "modal-shadow" }), h("div", Object.assign({ key: '67c001e824f5c31eb58053eea71c884817479896',
886
+ }, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), h("ion-backdrop", { key: 'e5eae2c14f830f75e308fcd7f4c10c86fac5b962', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && h("div", { key: 'e268f9cd310c3cf4e051b5b92524ce4fb70d005e', class: "modal-shadow" }), h("div", Object.assign({ key: '9c380f36c18144c153077b15744d1c3346bce63e',
967
887
  /*
968
888
  role and aria-modal must be used on the
969
889
  same element. They must also be set inside the
970
890
  shadow DOM otherwise ion-button will not be highlighted
971
891
  when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
972
892
  */
973
- role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { key: '9263cbb0c5f550ef463b72446c21379ccaf0ccdd', class: "modal-handle",
893
+ role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { key: '2d5ee6d5959d97309c306e8ce72eb0f2c19be144', class: "modal-handle",
974
894
  // Prevents the handle from receiving keyboard focus when it does not cycle
975
- 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: '3ef07e617f2b1d46fca6a00b40119c35bff4215a', onSlotchange: this.onSlotChange }))));
895
+ 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: '5590434c35ea04c42fc006498bc189038e15a298', onSlotchange: this.onSlotChange }))));
976
896
  }
977
897
  static get is() { return "ion-modal"; }
978
898
  static get encapsulation() { return "shadow"; }
@@ -1531,7 +1451,6 @@ export class Modal {
1531
1451
  }
1532
1452
  static get states() {
1533
1453
  return {
1534
- "isSheetModal": {},
1535
1454
  "presented": {}
1536
1455
  };
1537
1456
  }
@@ -423,7 +423,7 @@ export const setRootAriaHidden = (hidden = false) => {
423
423
  }
424
424
  };
425
425
  export const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts) => {
426
- var _a, _b, _c;
426
+ var _a, _b;
427
427
  if (overlay.presented) {
428
428
  return;
429
429
  }
@@ -457,10 +457,9 @@ export const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation
457
457
  */
458
458
  const overlayEl = overlay.el;
459
459
  const shouldTrapFocus = overlayEl.tagName !== 'ION-TOAST' && overlayEl.focusTrap !== false;
460
- // Only lock out root content when backdrop is always active. Developers relying on
461
- // showBackdrop=false or backdropBreakpoint expect background interaction at some point.
462
- const backdropAlwaysActive = overlayEl.showBackdrop !== false && !(((_a = overlayEl.backdropBreakpoint) !== null && _a !== void 0 ? _a : 0) > 0);
463
- const shouldLockRoot = shouldTrapFocus && backdropAlwaysActive;
460
+ // Only lock out root content when backdrop is active. Developers relying on showBackdrop=false
461
+ // expect background interaction to remain enabled.
462
+ const shouldLockRoot = shouldTrapFocus && overlayEl.showBackdrop !== false;
464
463
  overlay.presented = true;
465
464
  overlay.willPresent.emit();
466
465
  if (shouldLockRoot) {
@@ -472,7 +471,7 @@ export const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation
472
471
  }
473
472
  document.body.classList.add(BACKDROP_NO_SCROLL);
474
473
  }
475
- (_b = overlay.willPresentShorthand) === null || _b === void 0 ? void 0 : _b.emit();
474
+ (_a = overlay.willPresentShorthand) === null || _a === void 0 ? void 0 : _a.emit();
476
475
  const mode = getIonMode(overlay);
477
476
  // get the user's animation fn if one was provided
478
477
  const animationBuilder = overlay.enterAnimation
@@ -481,7 +480,7 @@ export const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation
481
480
  const completed = await overlayAnimation(overlay, animationBuilder, overlay.el, opts);
482
481
  if (completed) {
483
482
  overlay.didPresent.emit();
484
- (_c = overlay.didPresentShorthand) === null || _c === void 0 ? void 0 : _c.emit();
483
+ (_b = overlay.didPresentShorthand) === null || _b === void 0 ? void 0 : _b.emit();
485
484
  }
486
485
  /**
487
486
  * If the focused element is already
@@ -559,7 +558,7 @@ const restoreElementFocus = async (overlayEl) => {
559
558
  }
560
559
  };
561
560
  export const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnimation, opts) => {
562
- var _a, _b, _c;
561
+ var _a, _b;
563
562
  if (!overlay.presented) {
564
563
  return false;
565
564
  }
@@ -575,14 +574,11 @@ export const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLe
575
574
  * is dismissed.
576
575
  */
577
576
  const overlaysLockingRoot = presentedOverlays.filter((o) => {
578
- var _a;
579
577
  const el = o;
580
- const backdropAlwaysActive = el.showBackdrop !== false && !(((_a = el.backdropBreakpoint) !== null && _a !== void 0 ? _a : 0) > 0);
581
- return el.tagName !== 'ION-TOAST' && el.focusTrap !== false && backdropAlwaysActive;
578
+ return el.tagName !== 'ION-TOAST' && el.focusTrap !== false && el.showBackdrop !== false;
582
579
  });
583
580
  const overlayEl = overlay.el;
584
- const backdropAlwaysActive = overlayEl.showBackdrop !== false && !(((_a = overlayEl.backdropBreakpoint) !== null && _a !== void 0 ? _a : 0) > 0);
585
- const locksRoot = overlayEl.tagName !== 'ION-TOAST' && overlayEl.focusTrap !== false && backdropAlwaysActive;
581
+ const locksRoot = overlayEl.tagName !== 'ION-TOAST' && overlayEl.focusTrap !== false && overlayEl.showBackdrop !== false;
586
582
  /**
587
583
  * If this is the last visible overlay that is trapping focus
588
584
  * then we want to re-add the root to the accessibility tree.
@@ -597,7 +593,7 @@ export const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLe
597
593
  // Overlay contents should not be clickable during dismiss
598
594
  overlay.el.style.setProperty('pointer-events', 'none');
599
595
  overlay.willDismiss.emit({ data, role });
600
- (_b = overlay.willDismissShorthand) === null || _b === void 0 ? void 0 : _b.emit({ data, role });
596
+ (_a = overlay.willDismissShorthand) === null || _a === void 0 ? void 0 : _a.emit({ data, role });
601
597
  const mode = getIonMode(overlay);
602
598
  const animationBuilder = overlay.leaveAnimation
603
599
  ? overlay.leaveAnimation
@@ -607,7 +603,7 @@ export const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLe
607
603
  await overlayAnimation(overlay, animationBuilder, overlay.el, opts);
608
604
  }
609
605
  overlay.didDismiss.emit({ data, role });
610
- (_c = overlay.didDismissShorthand) === null || _c === void 0 ? void 0 : _c.emit({ data, role });
606
+ (_b = overlay.didDismissShorthand) === null || _b === void 0 ? void 0 : _b.emit({ data, role });
611
607
  // Get a reference to all animations currently assigned to this overlay
612
608
  // Then tear them down to return the overlay to its initial visual state
613
609
  const animations = activeAnimations.get(overlay) || [];
package/dist/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2025-12-06T22:44:54",
2
+ "timestamp": "2025-12-08T18:51:42",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.38.0",
package/dist/esm/index.js CHANGED
@@ -13,7 +13,7 @@ export { L as LogLevel } from './index-C8IsBmNU.js';
13
13
  export { I as IonicSafeString, g as getMode, s as setupConfig } from './config-mCdtaoPe.js';
14
14
  export { o as openURL } from './theme-DiVJyqlX.js';
15
15
  export { m as menuController } from './index-CvDIirVx.js';
16
- export { b as actionSheetController, a as alertController, l as loadingController, m as modalController, p as pickerController, c as popoverController, t as toastController } from './overlays-DYKBVm6h.js';
16
+ export { b as actionSheetController, a as alertController, l as loadingController, m as modalController, p as pickerController, c as popoverController, t as toastController } from './overlays-BymNv-BL.js';
17
17
  import './index-ZjP4CjeZ.js';
18
18
  import './gesture-controller-BTEOs1at.js';
19
19
  import './hardware-back-button-CPLxO-Ev.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-L570Swow.js';
6
6
  import { r as raf } from './helpers-DEn3pfjm.js';
7
7
  import { c as createLockController } from './lock-controller-B-hirT0v.js';
8
- import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, f as present, g as dismiss, h as eventMethod, s as safeCall, j as prepareOverlay, k as setOverlayId } from './overlays-DYKBVm6h.js';
8
+ import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, f as present, g as dismiss, h as eventMethod, s as safeCall, j as prepareOverlay, k as setOverlayId } from './overlays-BymNv-BL.js';
9
9
  import { g as getClassMap } from './theme-DiVJyqlX.js';
10
10
  import { b as getIonMode } from './ionic-global-CDrldh-5.js';
11
11
  import { c as createAnimation } from './animation-Dt8bGnA-.js';
@@ -6,7 +6,7 @@ import { E as ENABLE_HTML_CONTENT_DEFAULT, a as sanitizeDOMString } from './conf
6
6
  import { c as createButtonActiveGesture } from './button-active-L570Swow.js';
7
7
  import { r as raf } from './helpers-DEn3pfjm.js';
8
8
  import { c as createLockController } from './lock-controller-B-hirT0v.js';
9
- import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod, s as safeCall } from './overlays-DYKBVm6h.js';
9
+ import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod, s as safeCall } from './overlays-BymNv-BL.js';
10
10
  import { g as getClassMap } from './theme-DiVJyqlX.js';
11
11
  import { b as getIonMode } from './ionic-global-CDrldh-5.js';
12
12
  import { c as createAnimation } from './animation-Dt8bGnA-.js';
@@ -4,7 +4,7 @@
4
4
  import { j as printIonError, f as printIonWarning, r as registerInstance, c as createEvent, w as writeTask, h, d as Host, g as getElement } from './index-C8IsBmNU.js';
5
5
  import { startFocusVisible } from './focus-visible-BmVRXR1y.js';
6
6
  import { r as raf, g as getElementRoot, a as renderHiddenInput, e as clamp } from './helpers-DEn3pfjm.js';
7
- import { F as FOCUS_TRAP_DISABLE_CLASS, d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod, s as safeCall } from './overlays-DYKBVm6h.js';
7
+ import { F as FOCUS_TRAP_DISABLE_CLASS, d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod, s as safeCall } from './overlays-BymNv-BL.js';
8
8
  import { i as isRTL } from './dir-C53feagD.js';
9
9
  import { c as createColorClasses, g as getClassMap } from './theme-DiVJyqlX.js';
10
10
  import { l as chevronDown, o as caretUpSharp, p as chevronForward, q as caretDownSharp, c as chevronBack } from './index-DV3sJJW8.js';
@@ -5,7 +5,7 @@ import { r as registerInstance, c as createEvent, e as config, h, d as Host, g a
5
5
  import { E as ENABLE_HTML_CONTENT_DEFAULT, a as sanitizeDOMString } from './config-mCdtaoPe.js';
6
6
  import { r as raf } from './helpers-DEn3pfjm.js';
7
7
  import { c as createLockController } from './lock-controller-B-hirT0v.js';
8
- import { d as createDelegateController, e as createTriggerController, B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod } from './overlays-DYKBVm6h.js';
8
+ import { d as createDelegateController, e as createTriggerController, B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod } from './overlays-BymNv-BL.js';
9
9
  import { g as getClassMap } from './theme-DiVJyqlX.js';
10
10
  import { b as getIonMode } from './ionic-global-CDrldh-5.js';
11
11
  import { c as createAnimation } from './animation-Dt8bGnA-.js';
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { r as registerInstance, c as createEvent, e as config, j as printIonError, h, d as Host, g as getElement } from './index-C8IsBmNU.js';
5
5
  import { g as getTimeGivenProgression } from './cubic-bezier-hHmYLOfE.js';
6
- import { o as getPresentedOverlay, B as BACKDROP, n as focusFirstDescendant, q as focusLastDescendant, G as GESTURE } from './overlays-DYKBVm6h.js';
6
+ import { o as getPresentedOverlay, B as BACKDROP, n as focusFirstDescendant, q as focusLastDescendant, G as GESTURE } from './overlays-BymNv-BL.js';
7
7
  import { G as GESTURE_CONTROLLER } from './gesture-controller-BTEOs1at.js';
8
8
  import { shouldUseCloseWatcher } from './hardware-back-button-CPLxO-Ev.js';
9
9
  import { o as isEndSide, i as inheritAriaAttributes, l as assert, e as clamp } from './helpers-DEn3pfjm.js';
@@ -7,7 +7,7 @@ import { C as CoreDelegate, a as attachComponent, d as detachComponent } from '.
7
7
  import { e as clamp, g as getElementRoot, r as raf, b as inheritAttributes, h as hasLazyBuild } from './helpers-DEn3pfjm.js';
8
8
  import { c as createLockController } from './lock-controller-B-hirT0v.js';
9
9
  import { g as getCapacitor } from './capacitor-CFERIeaU.js';
10
- import { G as GESTURE, O as OVERLAY_GESTURE_PRIORITY, F as FOCUS_TRAP_DISABLE_CLASS, e as createTriggerController, B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod } from './overlays-DYKBVm6h.js';
10
+ import { G as GESTURE, O as OVERLAY_GESTURE_PRIORITY, F as FOCUS_TRAP_DISABLE_CLASS, e as createTriggerController, B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod } from './overlays-BymNv-BL.js';
11
11
  import { g as getClassMap } from './theme-DiVJyqlX.js';
12
12
  import { e as deepReady, w as waitForMount } from './index-r2D9DEro.js';
13
13
  import { b as getIonMode } from './ionic-global-CDrldh-5.js';
@@ -1918,13 +1918,7 @@ const Modal = class {
1918
1918
  };
1919
1919
  window.addEventListener(KEYBOARD_DID_OPEN, this.keyboardOpenCallback);
1920
1920
  }
1921
- /**
1922
- * Recalculate isSheetModal because framework bindings (e.g., Angular)
1923
- * may not have been applied when componentWillLoad ran.
1924
- */
1925
- const isSheetModal = this.breakpoints !== undefined && this.initialBreakpoint !== undefined;
1926
- this.isSheetModal = isSheetModal;
1927
- if (isSheetModal) {
1921
+ if (this.isSheetModal) {
1928
1922
  this.initSheetGesture();
1929
1923
  }
1930
1924
  else if (hasCardModal) {
@@ -2006,79 +2000,6 @@ const Modal = class {
2006
2000
  this.gesture = gesture;
2007
2001
  this.moveSheetToBreakpoint = moveSheetToBreakpoint;
2008
2002
  this.gesture.enable(true);
2009
- /**
2010
- * When backdrop interaction is allowed, nested router outlets from child routes
2011
- * may block pointer events to parent content. Apply passthrough styles only when
2012
- * the modal was the sole content of a child route page.
2013
- * See https://github.com/ionic-team/ionic-framework/issues/30700
2014
- */
2015
- const backdropNotBlocking = this.showBackdrop === false || this.focusTrap === false || backdropBreakpoint > 0;
2016
- if (backdropNotBlocking) {
2017
- this.setupChildRoutePassthrough();
2018
- }
2019
- }
2020
- /**
2021
- * For sheet modals that allow background interaction, sets up pointer-events
2022
- * passthrough on child route page wrappers and nested router outlets.
2023
- */
2024
- setupChildRoutePassthrough() {
2025
- var _a;
2026
- const pageParent = this.getOriginalPageParent();
2027
- // Skip ion-app (controller modals) and pages with other content (inline modals)
2028
- if (!pageParent || pageParent.tagName === 'ION-APP') {
2029
- return;
2030
- }
2031
- const hasVisibleContent = Array.from(pageParent.children).some((child) => {
2032
- var _a;
2033
- if (child === this.el)
2034
- return false;
2035
- if (child instanceof HTMLElement && window.getComputedStyle(child).display === 'none')
2036
- return false;
2037
- if (child.tagName === 'TEMPLATE' || child.tagName === 'SLOT')
2038
- return false;
2039
- if (child.nodeType === Node.TEXT_NODE && !((_a = child.textContent) === null || _a === void 0 ? void 0 : _a.trim()))
2040
- return false;
2041
- return true;
2042
- });
2043
- if (hasVisibleContent) {
2044
- return;
2045
- }
2046
- // Child route case: page only contained the modal
2047
- pageParent.classList.add('ion-page-overlay-passthrough');
2048
- // Also make nested router outlets passthrough
2049
- const routerOutlet = pageParent.parentElement;
2050
- if ((routerOutlet === null || routerOutlet === void 0 ? void 0 : routerOutlet.tagName) === 'ION-ROUTER-OUTLET' && ((_a = routerOutlet.parentElement) === null || _a === void 0 ? void 0 : _a.tagName) !== 'ION-APP') {
2051
- routerOutlet.style.setProperty('pointer-events', 'none');
2052
- routerOutlet.setAttribute('data-overlay-passthrough', 'true');
2053
- }
2054
- }
2055
- /**
2056
- * Finds the ion-page ancestor of the modal's original parent location.
2057
- */
2058
- getOriginalPageParent() {
2059
- if (!this.cachedOriginalParent) {
2060
- return null;
2061
- }
2062
- let pageParent = this.cachedOriginalParent;
2063
- while (pageParent && !pageParent.classList.contains('ion-page')) {
2064
- pageParent = pageParent.parentElement;
2065
- }
2066
- return pageParent;
2067
- }
2068
- /**
2069
- * Removes passthrough styles added by setupChildRoutePassthrough.
2070
- */
2071
- cleanupChildRoutePassthrough() {
2072
- const pageParent = this.getOriginalPageParent();
2073
- if (!pageParent) {
2074
- return;
2075
- }
2076
- pageParent.classList.remove('ion-page-overlay-passthrough');
2077
- const routerOutlet = pageParent.parentElement;
2078
- if (routerOutlet === null || routerOutlet === void 0 ? void 0 : routerOutlet.hasAttribute('data-overlay-passthrough')) {
2079
- routerOutlet.style.removeProperty('pointer-events');
2080
- routerOutlet.removeAttribute('data-overlay-passthrough');
2081
- }
2082
2003
  }
2083
2004
  sheetOnDismiss() {
2084
2005
  /**
@@ -2168,7 +2089,6 @@ const Modal = class {
2168
2089
  }
2169
2090
  this.cleanupViewTransitionListener();
2170
2091
  this.cleanupParentRemovalObserver();
2171
- this.cleanupChildRoutePassthrough();
2172
2092
  }
2173
2093
  this.currentBreakpoint = undefined;
2174
2094
  this.animation = undefined;
@@ -2406,20 +2326,20 @@ const Modal = class {
2406
2326
  const isCardModal = presentingElement !== undefined && mode === 'ios';
2407
2327
  const isHandleCycle = handleBehavior === 'cycle';
2408
2328
  const isSheetModalWithHandle = isSheetModal && showHandle;
2409
- return (h(Host, Object.assign({ key: '880d34a27983dde27c81a06bfed390bf38e43244', "no-router": true,
2329
+ return (h(Host, Object.assign({ key: '9e9a7bd591eb17a225a00b4fa2e379e94601d17f', "no-router": true,
2410
2330
  // Allow the modal to be navigable when the handle is focusable
2411
2331
  tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
2412
2332
  zIndex: `${20000 + this.overlayIndex}`,
2413
- }, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), h("ion-backdrop", { key: 'c674d142ace2b3e5bd38b302cf2984fc3fac11c8', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && h("div", { key: 'ce83713b57960d354935ef8e65251892ed9d4e3b', class: "modal-shadow" }), h("div", Object.assign({ key: '67c001e824f5c31eb58053eea71c884817479896',
2333
+ }, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), h("ion-backdrop", { key: 'e5eae2c14f830f75e308fcd7f4c10c86fac5b962', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && h("div", { key: 'e268f9cd310c3cf4e051b5b92524ce4fb70d005e', class: "modal-shadow" }), h("div", Object.assign({ key: '9c380f36c18144c153077b15744d1c3346bce63e',
2414
2334
  /*
2415
2335
  role and aria-modal must be used on the
2416
2336
  same element. They must also be set inside the
2417
2337
  shadow DOM otherwise ion-button will not be highlighted
2418
2338
  when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
2419
2339
  */
2420
- role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { key: '9263cbb0c5f550ef463b72446c21379ccaf0ccdd', class: "modal-handle",
2340
+ role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { key: '2d5ee6d5959d97309c306e8ce72eb0f2c19be144', class: "modal-handle",
2421
2341
  // Prevents the handle from receiving keyboard focus when it does not cycle
2422
- 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: '3ef07e617f2b1d46fca6a00b40119c35bff4215a', onSlotchange: this.onSlotChange }))));
2342
+ 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: '5590434c35ea04c42fc006498bc189038e15a298', onSlotchange: this.onSlotChange }))));
2423
2343
  }
2424
2344
  get el() { return getElement(this); }
2425
2345
  static get watchers() { return {
@@ -2,7 +2,7 @@
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
4
  import { r as registerInstance, c as createEvent, f as printIonWarning, h, d as Host, g as getElement } from './index-C8IsBmNU.js';
5
- import { B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, n as focusFirstDescendant, g as dismiss, h as eventMethod, F as FOCUS_TRAP_DISABLE_CLASS } from './overlays-DYKBVm6h.js';
5
+ import { B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, n as focusFirstDescendant, g as dismiss, h as eventMethod, F as FOCUS_TRAP_DISABLE_CLASS } from './overlays-BymNv-BL.js';
6
6
  import { C as CoreDelegate, a as attachComponent, d as detachComponent } from './framework-delegate-BYawdMXj.js';
7
7
  import { g as getElementRoot, r as raf, f as addEventListener, h as hasLazyBuild } from './helpers-DEn3pfjm.js';
8
8
  import { c as createLockController } from './lock-controller-B-hirT0v.js';
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { r as registerInstance, h, i as forceUpdate, d as Host, g as getElement } from './index-C8IsBmNU.js';
5
5
  import { b as getIonMode } from './ionic-global-CDrldh-5.js';
6
- import { s as safeCall } from './overlays-DYKBVm6h.js';
6
+ import { s as safeCall } from './overlays-BymNv-BL.js';
7
7
  import { g as getClassMap } from './theme-DiVJyqlX.js';
8
8
  import './index-ZjP4CjeZ.js';
9
9
  import './helpers-DEn3pfjm.js';
@@ -6,7 +6,7 @@ import { c as createNotchController } from './notch-controller-BwelN_JM.js';
6
6
  import { i as isOptionSelected, c as compareOptions } from './compare-with-utils-sObYyvOy.js';
7
7
  import { c as checkInvalidState } from './validity-DJztqcrH.js';
8
8
  import { b as inheritAttributes, a as renderHiddenInput, n as focusVisibleElement } from './helpers-DEn3pfjm.js';
9
- import { c as popoverController, b as actionSheetController, a as alertController, m as modalController, s as safeCall } from './overlays-DYKBVm6h.js';
9
+ import { c as popoverController, b as actionSheetController, a as alertController, m as modalController, s as safeCall } from './overlays-BymNv-BL.js';
10
10
  import { i as isRTL } from './dir-C53feagD.js';
11
11
  import { h as hostContext, c as createColorClasses, g as getClassMap } from './theme-DiVJyqlX.js';
12
12
  import { w as watchForOptions } from './watch-options-Dtdm8lKC.js';
@@ -5,7 +5,7 @@ import { f as printIonWarning, r as registerInstance, c as createEvent, e as con
5
5
  import { E as ENABLE_HTML_CONTENT_DEFAULT, a as sanitizeDOMString } from './config-mCdtaoPe.js';
6
6
  import { g as getElementRoot, r as raf } from './helpers-DEn3pfjm.js';
7
7
  import { c as createLockController } from './lock-controller-B-hirT0v.js';
8
- import { O as OVERLAY_GESTURE_PRIORITY, d as createDelegateController, e as createTriggerController, i as isCancel, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod, s as safeCall, G as GESTURE } from './overlays-DYKBVm6h.js';
8
+ import { O as OVERLAY_GESTURE_PRIORITY, d as createDelegateController, e as createTriggerController, i as isCancel, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod, s as safeCall, G as GESTURE } from './overlays-BymNv-BL.js';
9
9
  import { c as createColorClasses, g as getClassMap } from './theme-DiVJyqlX.js';
10
10
  import { b as getIonMode } from './ionic-global-CDrldh-5.js';
11
11
  import { c as createAnimation } from './animation-Dt8bGnA-.js';