@ionic/core 7.7.0 → 7.7.1-nightly.20240201

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 (68) hide show
  1. package/components/ion-modal.js +4 -6
  2. package/components/overlays.js +5 -1
  3. package/dist/cjs/index.cjs.js +1 -1
  4. package/dist/cjs/ion-action-sheet.cjs.entry.js +1 -1
  5. package/dist/cjs/ion-alert.cjs.entry.js +1 -1
  6. package/dist/cjs/ion-datetime_3.cjs.entry.js +1 -1
  7. package/dist/cjs/ion-loading.cjs.entry.js +1 -1
  8. package/dist/cjs/ion-menu_3.cjs.entry.js +1 -1
  9. package/dist/cjs/ion-modal.cjs.entry.js +4 -6
  10. package/dist/cjs/ion-popover.cjs.entry.js +1 -1
  11. package/dist/cjs/ion-select_3.cjs.entry.js +1 -1
  12. package/dist/cjs/ion-toast.cjs.entry.js +1 -1
  13. package/dist/cjs/{overlays-c50bf3c1.js → overlays-330df245.js} +4 -1
  14. package/dist/collection/components/modal/modal.js +4 -6
  15. package/dist/collection/components/modal/test/animations/modal.e2e.js +36 -0
  16. package/dist/collection/utils/overlays.js +4 -0
  17. package/dist/docs.json +1 -1
  18. package/dist/esm/index.js +1 -1
  19. package/dist/esm/ion-action-sheet.entry.js +1 -1
  20. package/dist/esm/ion-alert.entry.js +1 -1
  21. package/dist/esm/ion-datetime_3.entry.js +1 -1
  22. package/dist/esm/ion-loading.entry.js +1 -1
  23. package/dist/esm/ion-menu_3.entry.js +1 -1
  24. package/dist/esm/ion-modal.entry.js +4 -6
  25. package/dist/esm/ion-popover.entry.js +1 -1
  26. package/dist/esm/ion-select_3.entry.js +1 -1
  27. package/dist/esm/ion-toast.entry.js +1 -1
  28. package/dist/esm/{overlays-3311e70e.js → overlays-33ae3ea0.js} +5 -1
  29. package/dist/esm-es5/index.js +1 -1
  30. package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
  31. package/dist/esm-es5/ion-alert.entry.js +1 -1
  32. package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
  33. package/dist/esm-es5/ion-loading.entry.js +1 -1
  34. package/dist/esm-es5/ion-menu_3.entry.js +1 -1
  35. package/dist/esm-es5/ion-modal.entry.js +1 -1
  36. package/dist/esm-es5/ion-popover.entry.js +1 -1
  37. package/dist/esm-es5/ion-select_3.entry.js +1 -1
  38. package/dist/esm-es5/ion-toast.entry.js +1 -1
  39. package/dist/esm-es5/{overlays-3311e70e.js → overlays-33ae3ea0.js} +1 -1
  40. package/dist/ionic/index.esm.js +1 -1
  41. package/dist/ionic/ionic.esm.js +1 -1
  42. package/dist/ionic/{p-50a24d93.system.entry.js → p-016976a7.system.entry.js} +1 -1
  43. package/dist/ionic/p-0b955124.system.js +1 -1
  44. package/dist/ionic/{p-92c7f47f.system.entry.js → p-1fe311e8.system.entry.js} +1 -1
  45. package/dist/ionic/{p-90860bc4.entry.js → p-3cb2ab30.entry.js} +1 -1
  46. package/dist/ionic/{p-cfdaf024.system.entry.js → p-4c256bc2.system.entry.js} +1 -1
  47. package/dist/ionic/p-4dfc27eb.system.entry.js +4 -0
  48. package/dist/ionic/{p-0f1f0519.system.entry.js → p-61c0f8bf.system.entry.js} +1 -1
  49. package/dist/ionic/{p-44638413.system.entry.js → p-70a08fc9.system.entry.js} +1 -1
  50. package/dist/ionic/{p-324dafd3.entry.js → p-7dc7514a.entry.js} +1 -1
  51. package/dist/ionic/{p-f85932b8.entry.js → p-84513dfb.entry.js} +1 -1
  52. package/dist/ionic/{p-d6ca603b.entry.js → p-8ebd9951.entry.js} +1 -1
  53. package/dist/ionic/p-9beb5039.system.js +4 -0
  54. package/dist/ionic/{p-ce657bb3.entry.js → p-abb9197c.entry.js} +1 -1
  55. package/dist/ionic/{p-5946d7b8.system.entry.js → p-ac979ebf.system.entry.js} +1 -1
  56. package/dist/ionic/p-b498de69.entry.js +4 -0
  57. package/dist/ionic/{p-2e344096.system.entry.js → p-bd259c65.system.entry.js} +1 -1
  58. package/dist/ionic/{p-5a7d5f0d.entry.js → p-be4a2fe8.entry.js} +1 -1
  59. package/dist/ionic/{p-4ae1b532.entry.js → p-e0569db4.entry.js} +1 -1
  60. package/dist/ionic/{p-de5c8a55.entry.js → p-f1ad3b3d.entry.js} +1 -1
  61. package/dist/ionic/{p-ae40d13d.js → p-f89ae259.js} +1 -1
  62. package/dist/ionic/{p-1d72ecba.system.entry.js → p-f9d0e6f4.system.entry.js} +1 -1
  63. package/dist/ionic/{p-9c8fb374.system.js → p-fd9a9db3.system.js} +1 -1
  64. package/hydrate/index.js +7 -5
  65. package/package.json +3 -3
  66. package/dist/ionic/p-1172fd73.system.entry.js +0 -4
  67. package/dist/ionic/p-4efac4fd.system.js +0 -4
  68. package/dist/ionic/p-8dc4a983.entry.js +0 -4
@@ -8,7 +8,7 @@ import { g as getElementRoot, m as clamp, r as raf, d as inheritAttributes, l as
8
8
  import { c as createLockController } from './lock-controller.js';
9
9
  import { p as printIonWarning } from './index6.js';
10
10
  import { g as getCapacitor } from './capacitor.js';
11
- import { G as GESTURE, O as OVERLAY_GESTURE_PRIORITY, e as createTriggerController, B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, q as activeAnimations, g as dismiss, h as eventMethod } from './overlays.js';
11
+ import { G as GESTURE, O as OVERLAY_GESTURE_PRIORITY, e as createTriggerController, B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod } from './overlays.js';
12
12
  import { g as getClassMap } from './theme.js';
13
13
  import { e as deepReady, w as waitForMount } from './index2.js';
14
14
  import { b as getIonMode, c as config } from './ionic-global.js';
@@ -1515,7 +1515,6 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
1515
1515
  window.removeEventListener(KEYBOARD_DID_OPEN, this.keyboardOpenCallback);
1516
1516
  this.keyboardOpenCallback = undefined;
1517
1517
  }
1518
- const enteringAnimation = activeAnimations.get(this) || [];
1519
1518
  const dismissed = await dismiss(this, data, role, 'modalLeave', iosLeaveAnimation, mdLeaveAnimation, {
1520
1519
  presentingEl: presentingElement,
1521
1520
  currentBreakpoint: (_a = this.currentBreakpoint) !== null && _a !== void 0 ? _a : this.initialBreakpoint,
@@ -1531,7 +1530,6 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
1531
1530
  if (this.gesture) {
1532
1531
  this.gesture.destroy();
1533
1532
  }
1534
- enteringAnimation.forEach((ani) => ani.destroy());
1535
1533
  }
1536
1534
  this.currentBreakpoint = undefined;
1537
1535
  this.animation = undefined;
@@ -1611,9 +1609,9 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
1611
1609
  const mode = getIonMode(this);
1612
1610
  const isCardModal = presentingElement !== undefined && mode === 'ios';
1613
1611
  const isHandleCycle = handleBehavior === 'cycle';
1614
- return (h(Host, Object.assign({ key: '8c163f4f59429227cab3a1cafb5612994939a629', "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
1612
+ return (h(Host, Object.assign({ key: '9a305d82f123283b6200c42d67393b378bb309a8', "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
1615
1613
  zIndex: `${20000 + this.overlayIndex}`,
1616
- }, 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: '6908bdf9462d940eff6607b626a499eedc66dc9c', 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: 'ac224394e19b9e8c7dd902f2836fa25787663455',
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',
1617
1615
  /*
1618
1616
  role and aria-modal must be used on the
1619
1617
  same element. They must also be set inside the
@@ -1622,7 +1620,7 @@ const Modal = /*@__PURE__*/ proxyCustomElement(class Modal extends HTMLElement {
1622
1620
  */
1623
1621
  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",
1624
1622
  // Prevents the handle from receiving keyboard focus when it does not cycle
1625
- 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: '9c3c5ec797b6415110a3275c6ff33277291a6e21' }))));
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' }))));
1626
1624
  }
1627
1625
  get el() { return this; }
1628
1626
  static get watchers() { return {
@@ -493,6 +493,10 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
493
493
  }
494
494
  overlay.didDismiss.emit({ data, role });
495
495
  (_b = overlay.didDismissShorthand) === null || _b === void 0 ? void 0 : _b.emit({ data, role });
496
+ // Get a reference to all animations currently assigned to this overlay
497
+ // Then tear them down to return the overlay to its initial visual state
498
+ const animations = activeAnimations.get(overlay) || [];
499
+ animations.forEach((ani) => ani.destroy());
496
500
  activeAnimations.delete(overlay);
497
501
  /**
498
502
  * Make overlay hidden again in case it is being reused.
@@ -709,4 +713,4 @@ const createTriggerController = () => {
709
713
  };
710
714
  };
711
715
 
712
- export { BACKDROP as B, GESTURE as G, OVERLAY_GESTURE_PRIORITY as O, alertController as a, actionSheetController as b, popoverController as c, createDelegateController as d, createTriggerController as e, present as f, dismiss as g, eventMethod as h, isCancel as i, prepareOverlay as j, setOverlayId as k, loadingController as l, modalController as m, focusFirstDescendant as n, getPresentedOverlay as o, pickerController as p, activeAnimations as q, safeCall as s, toastController as t };
716
+ export { BACKDROP as B, GESTURE as G, OVERLAY_GESTURE_PRIORITY as O, alertController as a, actionSheetController as b, popoverController as c, createDelegateController as d, createTriggerController as e, present as f, dismiss as g, eventMethod as h, isCancel as i, prepareOverlay as j, setOverlayId as k, loadingController as l, modalController as m, focusFirstDescendant as n, getPresentedOverlay as o, pickerController as p, safeCall as s, toastController as t };
@@ -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-8c679cbf.js');
19
- const overlays = require('./overlays-c50bf3c1.js');
19
+ const overlays = require('./overlays-330df245.js');
20
20
  require('./index-c8d52405.js');
21
21
  require('./index-5a471146.js');
22
22
  require('./gesture-controller-c40c045a.js');
@@ -9,7 +9,7 @@ const index = require('./index-5a471146.js');
9
9
  const buttonActive = require('./button-active-b8c3f603.js');
10
10
  const helpers = require('./helpers-2e1028fa.js');
11
11
  const lockController = require('./lock-controller-6585a42a.js');
12
- const overlays = require('./overlays-c50bf3c1.js');
12
+ const overlays = require('./overlays-330df245.js');
13
13
  const theme = require('./theme-d1c573d2.js');
14
14
  const ionicGlobal = require('./ionic-global-7358c23e.js');
15
15
  const animation = require('./animation-fdab9de5.js');
@@ -10,7 +10,7 @@ const config = require('./config-4f60b98a.js');
10
10
  const buttonActive = require('./button-active-b8c3f603.js');
11
11
  const helpers = require('./helpers-2e1028fa.js');
12
12
  const lockController = require('./lock-controller-6585a42a.js');
13
- const overlays = require('./overlays-c50bf3c1.js');
13
+ const overlays = require('./overlays-330df245.js');
14
14
  const theme = require('./theme-d1c573d2.js');
15
15
  const ionicGlobal = require('./ionic-global-7358c23e.js');
16
16
  const animation = require('./animation-fdab9de5.js');
@@ -15,7 +15,7 @@ const index$2 = require('./index-f52c6d38.js');
15
15
  const ionicGlobal = require('./ionic-global-7358c23e.js');
16
16
  const data = require('./data-a5109f09.js');
17
17
  const lockController = require('./lock-controller-6585a42a.js');
18
- const overlays = require('./overlays-c50bf3c1.js');
18
+ const overlays = require('./overlays-330df245.js');
19
19
  const animation = require('./animation-fdab9de5.js');
20
20
  const haptic = require('./haptic-b882e0bb.js');
21
21
  require('./index-c8d52405.js');
@@ -9,7 +9,7 @@ const index = require('./index-5a471146.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-c50bf3c1.js');
12
+ const overlays = require('./overlays-330df245.js');
13
13
  const theme = require('./theme-d1c573d2.js');
14
14
  const ionicGlobal = require('./ionic-global-7358c23e.js');
15
15
  const animation = require('./animation-fdab9de5.js');
@@ -11,7 +11,7 @@ const gestureController = require('./gesture-controller-c40c045a.js');
11
11
  const hardwareBackButton = require('./hardware-back-button-d23873bb.js');
12
12
  const helpers = require('./helpers-2e1028fa.js');
13
13
  const index$1 = require('./index-8c679cbf.js');
14
- const overlays = require('./overlays-c50bf3c1.js');
14
+ const overlays = require('./overlays-330df245.js');
15
15
  const ionicGlobal = require('./ionic-global-7358c23e.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-c50bf3c1.js');
15
+ const overlays = require('./overlays-330df245.js');
16
16
  const theme = require('./theme-d1c573d2.js');
17
17
  const index$5 = require('./index-84351d21.js');
18
18
  const ionicGlobal = require('./ionic-global-7358c23e.js');
@@ -1519,7 +1519,6 @@ const Modal = class {
1519
1519
  window.removeEventListener(keyboard.KEYBOARD_DID_OPEN, this.keyboardOpenCallback);
1520
1520
  this.keyboardOpenCallback = undefined;
1521
1521
  }
1522
- const enteringAnimation = overlays.activeAnimations.get(this) || [];
1523
1522
  const dismissed = await overlays.dismiss(this, data, role, 'modalLeave', iosLeaveAnimation, mdLeaveAnimation, {
1524
1523
  presentingEl: presentingElement,
1525
1524
  currentBreakpoint: (_a = this.currentBreakpoint) !== null && _a !== void 0 ? _a : this.initialBreakpoint,
@@ -1535,7 +1534,6 @@ const Modal = class {
1535
1534
  if (this.gesture) {
1536
1535
  this.gesture.destroy();
1537
1536
  }
1538
- enteringAnimation.forEach((ani) => ani.destroy());
1539
1537
  }
1540
1538
  this.currentBreakpoint = undefined;
1541
1539
  this.animation = undefined;
@@ -1615,9 +1613,9 @@ const Modal = class {
1615
1613
  const mode = ionicGlobal.getIonMode(this);
1616
1614
  const isCardModal = presentingElement !== undefined && mode === 'ios';
1617
1615
  const isHandleCycle = handleBehavior === 'cycle';
1618
- return (index$3.h(index$3.Host, Object.assign({ key: '8c163f4f59429227cab3a1cafb5612994939a629', "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
1616
+ return (index$3.h(index$3.Host, Object.assign({ key: '9a305d82f123283b6200c42d67393b378bb309a8', "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
1619
1617
  zIndex: `${20000 + this.overlayIndex}`,
1620
- }, 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: '6908bdf9462d940eff6607b626a499eedc66dc9c', 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: 'ac224394e19b9e8c7dd902f2836fa25787663455',
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',
1621
1619
  /*
1622
1620
  role and aria-modal must be used on the
1623
1621
  same element. They must also be set inside the
@@ -1626,7 +1624,7 @@ const Modal = class {
1626
1624
  */
1627
1625
  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",
1628
1626
  // Prevents the handle from receiving keyboard focus when it does not cycle
1629
- 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: '9c3c5ec797b6415110a3275c6ff33277291a6e21' }))));
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' }))));
1630
1628
  }
1631
1629
  get el() { return index$3.getElement(this); }
1632
1630
  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-c50bf3c1.js');
13
+ const overlays = require('./overlays-330df245.js');
14
14
  const ionicGlobal = require('./ionic-global-7358c23e.js');
15
15
  const theme = require('./theme-d1c573d2.js');
16
16
  const index$2 = require('./index-84351d21.js');
@@ -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-c50bf3c1.js');
14
+ const overlays = require('./overlays-330df245.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-c50bf3c1.js');
13
+ const overlays = require('./overlays-330df245.js');
14
14
  const theme = require('./theme-d1c573d2.js');
15
15
  const ionicGlobal = require('./ionic-global-7358c23e.js');
16
16
  const animation = require('./animation-fdab9de5.js');
@@ -495,6 +495,10 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
495
495
  }
496
496
  overlay.didDismiss.emit({ data, role });
497
497
  (_b = overlay.didDismissShorthand) === null || _b === void 0 ? void 0 : _b.emit({ data, role });
498
+ // Get a reference to all animations currently assigned to this overlay
499
+ // Then tear them down to return the overlay to its initial visual state
500
+ const animations = activeAnimations.get(overlay) || [];
501
+ animations.forEach((ani) => ani.destroy());
498
502
  activeAnimations.delete(overlay);
499
503
  /**
500
504
  * Make overlay hidden again in case it is being reused.
@@ -715,7 +719,6 @@ exports.BACKDROP = BACKDROP;
715
719
  exports.GESTURE = GESTURE;
716
720
  exports.OVERLAY_GESTURE_PRIORITY = OVERLAY_GESTURE_PRIORITY;
717
721
  exports.actionSheetController = actionSheetController;
718
- exports.activeAnimations = activeAnimations;
719
722
  exports.alertController = alertController;
720
723
  exports.createDelegateController = createDelegateController;
721
724
  exports.createTriggerController = createTriggerController;
@@ -8,7 +8,7 @@ import { raf, inheritAttributes, hasLazyBuild } from "../../utils/helpers";
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 { GESTURE, BACKDROP, activeAnimations, dismiss, eventMethod, prepareOverlay, present, createTriggerController, setOverlayId, } from "../../utils/overlays";
11
+ import { GESTURE, BACKDROP, dismiss, eventMethod, prepareOverlay, present, createTriggerController, 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";
@@ -432,7 +432,6 @@ export class Modal {
432
432
  window.removeEventListener(KEYBOARD_DID_OPEN, this.keyboardOpenCallback);
433
433
  this.keyboardOpenCallback = undefined;
434
434
  }
435
- const enteringAnimation = activeAnimations.get(this) || [];
436
435
  const dismissed = await dismiss(this, data, role, 'modalLeave', iosLeaveAnimation, mdLeaveAnimation, {
437
436
  presentingEl: presentingElement,
438
437
  currentBreakpoint: (_a = this.currentBreakpoint) !== null && _a !== void 0 ? _a : this.initialBreakpoint,
@@ -448,7 +447,6 @@ export class Modal {
448
447
  if (this.gesture) {
449
448
  this.gesture.destroy();
450
449
  }
451
- enteringAnimation.forEach((ani) => ani.destroy());
452
450
  }
453
451
  this.currentBreakpoint = undefined;
454
452
  this.animation = undefined;
@@ -528,9 +526,9 @@ export class Modal {
528
526
  const mode = getIonMode(this);
529
527
  const isCardModal = presentingElement !== undefined && mode === 'ios';
530
528
  const isHandleCycle = handleBehavior === 'cycle';
531
- return (h(Host, Object.assign({ key: '8c163f4f59429227cab3a1cafb5612994939a629', "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
529
+ return (h(Host, Object.assign({ key: '9a305d82f123283b6200c42d67393b378bb309a8', "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
532
530
  zIndex: `${20000 + this.overlayIndex}`,
533
- }, 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: '6908bdf9462d940eff6607b626a499eedc66dc9c', 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: 'ac224394e19b9e8c7dd902f2836fa25787663455',
531
+ }, 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',
534
532
  /*
535
533
  role and aria-modal must be used on the
536
534
  same element. They must also be set inside the
@@ -539,7 +537,7 @@ export class Modal {
539
537
  */
540
538
  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",
541
539
  // Prevents the handle from receiving keyboard focus when it does not cycle
542
- 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: '9c3c5ec797b6415110a3275c6ff33277291a6e21' }))));
540
+ 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' }))));
543
541
  }
544
542
  static get is() { return "ion-modal"; }
545
543
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1,36 @@
1
+ /*!
2
+ * (C) Ionic http://ionicframework.com - MIT License
3
+ */
4
+ import { expect } from "@playwright/test";
5
+ import { configs, test } from "../../../../utils/test/playwright/index";
6
+ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ config, title }) => {
7
+ test.describe(title('modal: animations'), () => {
8
+ test.beforeEach(async ({ page }) => {
9
+ await page.setContent(`
10
+ <ion-modal is-open="true" trigger="open-modal"></ion-modal>
11
+ `, config);
12
+ });
13
+ test('card modal should clean up animations on dismiss', async ({ page }, testInfo) => {
14
+ testInfo.annotations.push({
15
+ type: 'issue',
16
+ description: 'https://github.com/ionic-team/ionic-framework/issues/28352',
17
+ });
18
+ const ionModalDidDismiss = await page.spyOnEvent('ionModalDidDismiss');
19
+ const modal = page.locator('ion-modal');
20
+ const initialAnimations = await modal.evaluate((el) => {
21
+ return el.shadowRoot.getAnimations();
22
+ });
23
+ // While the modal is open, it should have animations
24
+ expect(initialAnimations.length).toBeGreaterThan(0);
25
+ await modal.evaluate((el) => {
26
+ el.dismiss();
27
+ });
28
+ await ionModalDidDismiss.next();
29
+ const currentAnimations = await modal.evaluate((el) => {
30
+ return el.shadowRoot.getAnimations();
31
+ });
32
+ // Once the modal has finished closing, there should be no animations
33
+ expect(currentAnimations.length).toBe(0);
34
+ });
35
+ });
36
+ });
@@ -494,6 +494,10 @@ export const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLe
494
494
  }
495
495
  overlay.didDismiss.emit({ data, role });
496
496
  (_b = overlay.didDismissShorthand) === null || _b === void 0 ? void 0 : _b.emit({ data, role });
497
+ // Get a reference to all animations currently assigned to this overlay
498
+ // Then tear them down to return the overlay to its initial visual state
499
+ const animations = activeAnimations.get(overlay) || [];
500
+ animations.forEach((ani) => ani.destroy());
497
501
  activeAnimations.delete(overlay);
498
502
  /**
499
503
  * Make overlay hidden again in case it is being reused.
package/dist/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2024-01-31T15:13:30",
2
+ "timestamp": "2024-02-01T06:07:13",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.12.0",
package/dist/esm/index.js CHANGED
@@ -12,7 +12,7 @@ export { c as componentOnReady } from './helpers-c0b9ca37.js';
12
12
  export { I as IonicSafeString, g as getMode, s as setupConfig } from './config-49c88215.js';
13
13
  export { o as openURL } from './theme-01f3f29c.js';
14
14
  export { m as menuController } from './index-48209844.js';
15
- export { b as actionSheetController, a as alertController, l as loadingController, m as modalController, p as pickerController, c as popoverController, t as toastController } from './overlays-3311e70e.js';
15
+ export { b as actionSheetController, a as alertController, l as loadingController, m as modalController, p as pickerController, c as popoverController, t as toastController } from './overlays-33ae3ea0.js';
16
16
  import './index-a5d50daf.js';
17
17
  import './index-73881b51.js';
18
18
  import './gesture-controller-1bf57181.js';
@@ -5,7 +5,7 @@ import { r as registerInstance, d as createEvent, e as readTask, h, H as Host, f
5
5
  import { c as createButtonActiveGesture } from './button-active-4bee452c.js';
6
6
  import { r as raf } from './helpers-c0b9ca37.js';
7
7
  import { c as createLockController } from './lock-controller-316928be.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-3311e70e.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-33ae3ea0.js';
9
9
  import { g as getClassMap } from './theme-01f3f29c.js';
10
10
  import { b as getIonMode } from './ionic-global-778b7863.js';
11
11
  import { c as createAnimation } from './animation-60dbdd13.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-4bee452c.js';
7
7
  import { r as raf } from './helpers-c0b9ca37.js';
8
8
  import { c as createLockController } from './lock-controller-316928be.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-3311e70e.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-33ae3ea0.js';
10
10
  import { g as getClassMap } from './theme-01f3f29c.js';
11
11
  import { c as config, b as getIonMode } from './ionic-global-778b7863.js';
12
12
  import { c as createAnimation } from './animation-60dbdd13.js';
@@ -11,7 +11,7 @@ import { c as chevronBack, o as chevronForward, l as chevronDown, p as caretUpSh
11
11
  import { b as getIonMode } from './ionic-global-778b7863.js';
12
12
  import { g as generateDayAriaLabel, a as getDay, i as isBefore, b as isAfter, c as isSameDay, d as getPreviousMonth, e as getNextMonth, v as validateParts, f as getPartsFromCalendarDay, h as getNextYear, j as getPreviousYear, k as getEndOfWeek, l as getStartOfWeek, m as getPreviousDay, n as getNextDay, o as getPreviousWeek, p as getNextWeek, q as parseMinParts, r as parseMaxParts, s as parseDate, w as warnIfValueOutOfBounds, t as convertToArrayOfNumbers, u as convertDataToISO, x as getToday, y as getClosestValidDate, z as generateMonths, A as getNumDaysInMonth, B as getCombinedDateColumnData, C as getMonthColumnData, D as getDayColumnData, E as getYearColumnData, F as isMonthFirstLocale, G as getTimeColumnsData, H as isLocaleDayPeriodRTL, I as getDaysOfWeek, J as getMonthAndYear, K as getDaysOfMonth, L as getHourCycle, M as getLocalizedTime, N as getMonthAndDay, O as formatValue, P as clampDate, Q as parseAmPm, R as calculateHourFromAMPM } from './data-0f3ab200.js';
13
13
  import { c as createLockController } from './lock-controller-316928be.js';
14
- 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-3311e70e.js';
14
+ 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-33ae3ea0.js';
15
15
  import { c as createAnimation } from './animation-60dbdd13.js';
16
16
  import { b as hapticSelectionChanged, h as hapticSelectionEnd, a as hapticSelectionStart } from './haptic-554688a5.js';
17
17
  import './index-a5d50daf.js';
@@ -5,7 +5,7 @@ import { r as registerInstance, d as createEvent, h, H as Host, f as getElement
5
5
  import { E as ENABLE_HTML_CONTENT_DEFAULT, a as sanitizeDOMString } from './config-49c88215.js';
6
6
  import { r as raf } from './helpers-c0b9ca37.js';
7
7
  import { c as createLockController } from './lock-controller-316928be.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-3311e70e.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-33ae3ea0.js';
9
9
  import { g as getClassMap } from './theme-01f3f29c.js';
10
10
  import { c as config, b as getIonMode } from './ionic-global-778b7863.js';
11
11
  import { c as createAnimation } from './animation-60dbdd13.js';
@@ -7,7 +7,7 @@ import { G as GESTURE_CONTROLLER } from './gesture-controller-1bf57181.js';
7
7
  import { shoudUseCloseWatcher } from './hardware-back-button-f42b9c80.js';
8
8
  import { p as isEndSide, i as inheritAriaAttributes, o as assert, l as clamp } from './helpers-c0b9ca37.js';
9
9
  import { m as menuController } from './index-48209844.js';
10
- import { q as getPresentedOverlay } from './overlays-3311e70e.js';
10
+ import { o as getPresentedOverlay } from './overlays-33ae3ea0.js';
11
11
  import { c as config, b as getIonMode } from './ionic-global-778b7863.js';
12
12
  import { c as createColorClasses, h as hostContext } from './theme-01f3f29c.js';
13
13
  import { u as menuOutline, v as menuSharp } from './index-f7dc70ba.js';
@@ -8,7 +8,7 @@ import { g as getElementRoot, l as clamp, r as raf, k as inheritAttributes, m as
8
8
  import { c as createLockController } from './lock-controller-316928be.js';
9
9
  import { p as printIonWarning } from './index-9b0d46f4.js';
10
10
  import { g as getCapacitor } from './capacitor-59395cbd.js';
11
- import { G as GESTURE, O as OVERLAY_GESTURE_PRIORITY, e as createTriggerController, B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, n as activeAnimations, g as dismiss, h as eventMethod } from './overlays-3311e70e.js';
11
+ import { G as GESTURE, O as OVERLAY_GESTURE_PRIORITY, e as createTriggerController, B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod } from './overlays-33ae3ea0.js';
12
12
  import { g as getClassMap } from './theme-01f3f29c.js';
13
13
  import { e as deepReady, w as waitForMount } from './index-4b98143d.js';
14
14
  import { b as getIonMode, c as config } from './ionic-global-778b7863.js';
@@ -1515,7 +1515,6 @@ const Modal = class {
1515
1515
  window.removeEventListener(KEYBOARD_DID_OPEN, this.keyboardOpenCallback);
1516
1516
  this.keyboardOpenCallback = undefined;
1517
1517
  }
1518
- const enteringAnimation = activeAnimations.get(this) || [];
1519
1518
  const dismissed = await dismiss(this, data, role, 'modalLeave', iosLeaveAnimation, mdLeaveAnimation, {
1520
1519
  presentingEl: presentingElement,
1521
1520
  currentBreakpoint: (_a = this.currentBreakpoint) !== null && _a !== void 0 ? _a : this.initialBreakpoint,
@@ -1531,7 +1530,6 @@ const Modal = class {
1531
1530
  if (this.gesture) {
1532
1531
  this.gesture.destroy();
1533
1532
  }
1534
- enteringAnimation.forEach((ani) => ani.destroy());
1535
1533
  }
1536
1534
  this.currentBreakpoint = undefined;
1537
1535
  this.animation = undefined;
@@ -1611,9 +1609,9 @@ const Modal = class {
1611
1609
  const mode = getIonMode(this);
1612
1610
  const isCardModal = presentingElement !== undefined && mode === 'ios';
1613
1611
  const isHandleCycle = handleBehavior === 'cycle';
1614
- return (h(Host, Object.assign({ key: '8c163f4f59429227cab3a1cafb5612994939a629', "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
1612
+ return (h(Host, Object.assign({ key: '9a305d82f123283b6200c42d67393b378bb309a8', "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
1615
1613
  zIndex: `${20000 + this.overlayIndex}`,
1616
- }, 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: '6908bdf9462d940eff6607b626a499eedc66dc9c', 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: 'ac224394e19b9e8c7dd902f2836fa25787663455',
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',
1617
1615
  /*
1618
1616
  role and aria-modal must be used on the
1619
1617
  same element. They must also be set inside the
@@ -1622,7 +1620,7 @@ const Modal = class {
1622
1620
  */
1623
1621
  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",
1624
1622
  // Prevents the handle from receiving keyboard focus when it does not cycle
1625
- 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: '9c3c5ec797b6415110a3275c6ff33277291a6e21' }))));
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' }))));
1626
1624
  }
1627
1625
  get el() { return getElement(this); }
1628
1626
  static get watchers() { return {
@@ -6,7 +6,7 @@ import { C as CoreDelegate, a as attachComponent, d as detachComponent } from '.
6
6
  import { r as raf, g as getElementRoot, a as addEventListener, m as hasLazyBuild } from './helpers-c0b9ca37.js';
7
7
  import { c as createLockController } from './lock-controller-316928be.js';
8
8
  import { p as printIonWarning } from './index-9b0d46f4.js';
9
- import { B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, o as focusFirstDescendant, g as dismiss, h as eventMethod } from './overlays-3311e70e.js';
9
+ import { B as BACKDROP, j as prepareOverlay, k as setOverlayId, f as present, n as focusFirstDescendant, g as dismiss, h as eventMethod } from './overlays-33ae3ea0.js';
10
10
  import { b as getIonMode, a as isPlatform } from './ionic-global-778b7863.js';
11
11
  import { g as getClassMap } from './theme-01f3f29c.js';
12
12
  import { e as deepReady, w as waitForMount } from './index-4b98143d.js';
@@ -7,7 +7,7 @@ import { c as createNotchController } from './notch-controller-15d281a4.js';
7
7
  import { i as isOptionSelected, c as compareOptions } from './compare-with-utils-a96ff2ea.js';
8
8
  import { k as inheritAttributes, f as focusElement, h as findItemLabel, d as renderHiddenInput, e as getAriaLabel } from './helpers-c0b9ca37.js';
9
9
  import { p as printIonWarning } from './index-9b0d46f4.js';
10
- import { c as popoverController, b as actionSheetController, a as alertController, s as safeCall } from './overlays-3311e70e.js';
10
+ import { c as popoverController, b as actionSheetController, a as alertController, s as safeCall } from './overlays-33ae3ea0.js';
11
11
  import { i as isRTL } from './dir-babeabeb.js';
12
12
  import { h as hostContext, c as createColorClasses, g as getClassMap } from './theme-01f3f29c.js';
13
13
  import { w as watchForOptions } from './watch-options-c2911ace.js';
@@ -6,7 +6,7 @@ import { E as ENABLE_HTML_CONTENT_DEFAULT, a as sanitizeDOMString } from './conf
6
6
  import { g as getElementRoot, r as raf } from './helpers-c0b9ca37.js';
7
7
  import { c as createLockController } from './lock-controller-316928be.js';
8
8
  import { p as printIonWarning } from './index-9b0d46f4.js';
9
- 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-3311e70e.js';
9
+ 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-33ae3ea0.js';
10
10
  import { g as getClassMap, c as createColorClasses } from './theme-01f3f29c.js';
11
11
  import { c as config, b as getIonMode } from './ionic-global-778b7863.js';
12
12
  import { c as createAnimation } from './animation-60dbdd13.js';
@@ -493,6 +493,10 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
493
493
  }
494
494
  overlay.didDismiss.emit({ data, role });
495
495
  (_b = overlay.didDismissShorthand) === null || _b === void 0 ? void 0 : _b.emit({ data, role });
496
+ // Get a reference to all animations currently assigned to this overlay
497
+ // Then tear them down to return the overlay to its initial visual state
498
+ const animations = activeAnimations.get(overlay) || [];
499
+ animations.forEach((ani) => ani.destroy());
496
500
  activeAnimations.delete(overlay);
497
501
  /**
498
502
  * Make overlay hidden again in case it is being reused.
@@ -709,4 +713,4 @@ const createTriggerController = () => {
709
713
  };
710
714
  };
711
715
 
712
- export { BACKDROP as B, GESTURE as G, OVERLAY_GESTURE_PRIORITY as O, alertController as a, actionSheetController as b, popoverController as c, createDelegateController as d, createTriggerController as e, present as f, dismiss as g, eventMethod as h, isCancel as i, prepareOverlay as j, setOverlayId as k, loadingController as l, modalController as m, activeAnimations as n, focusFirstDescendant as o, pickerController as p, getPresentedOverlay as q, safeCall as s, toastController as t };
716
+ export { BACKDROP as B, GESTURE as G, OVERLAY_GESTURE_PRIORITY as O, alertController as a, actionSheetController as b, popoverController as c, createDelegateController as d, createTriggerController as e, present as f, dismiss as g, eventMethod as h, isCancel as i, prepareOverlay as j, setOverlayId as k, loadingController as l, modalController as m, focusFirstDescendant as n, getPresentedOverlay as o, pickerController as p, safeCall as s, toastController as t };
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
- export{c as createAnimation}from"./animation-60dbdd13.js";export{a as LIFECYCLE_DID_ENTER,c as LIFECYCLE_DID_LEAVE,L as LIFECYCLE_WILL_ENTER,b as LIFECYCLE_WILL_LEAVE,d as LIFECYCLE_WILL_UNLOAD,g as getIonPageElement}from"./index-4b98143d.js";export{iosTransitionAnimation}from"./ios.transition-7ff7381d.js";export{mdTransitionAnimation}from"./md.transition-28a9a26b.js";export{g as getTimeGivenProgression}from"./cubic-bezier-fe2083dc.js";export{createGesture}from"./index-2cf77112.js";export{g as getPlatforms,i as initialize,a as isPlatform}from"./ionic-global-778b7863.js";export{c as componentOnReady}from"./helpers-c0b9ca37.js";export{I as IonicSafeString,g as getMode,s as setupConfig}from"./config-49c88215.js";export{o as openURL}from"./theme-01f3f29c.js";export{m as menuController}from"./index-48209844.js";export{b as actionSheetController,a as alertController,l as loadingController,m as modalController,p as pickerController,c as popoverController,t as toastController}from"./overlays-3311e70e.js";import"./index-a5d50daf.js";import"./index-73881b51.js";import"./gesture-controller-1bf57181.js";import"./hardware-back-button-f42b9c80.js";import"./index-9b0d46f4.js";import"./framework-delegate-fed7fe7c.js";var IonicSlides=function(e){var o=e.swiper,t=e.extendParams;var s={effect:undefined,direction:"horizontal",initialSlide:0,loop:false,parallax:false,slidesPerView:1,spaceBetween:0,speed:300,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:false,slidesOffsetBefore:0,slidesOffsetAfter:0,touchEventsTarget:"container",freeMode:false,freeModeMomentum:true,freeModeMomentumRatio:1,freeModeMomentumBounce:true,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:false,freeModeMinimumVelocity:.02,autoHeight:false,setWrapperSize:false,zoom:{maxRatio:3,minRatio:1,toggle:false},touchRatio:1,touchAngle:45,simulateTouch:true,touchStartPreventDefault:false,shortSwipes:true,longSwipes:true,longSwipesRatio:.5,longSwipesMs:300,followFinger:true,threshold:0,touchMoveStopPropagation:true,touchReleaseOnEdges:false,iOSEdgeSwipeDetection:false,iOSEdgeSwipeThreshold:20,resistance:true,resistanceRatio:.85,watchSlidesProgress:false,watchSlidesVisibility:false,preventClicks:true,preventClicksPropagation:true,slideToClickedSlide:false,loopAdditionalSlides:0,noSwiping:true,runCallbacksOnInit:true,coverflowEffect:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:true},flipEffect:{slideShadows:true,limitRotation:true},cubeEffect:{slideShadows:true,shadow:true,shadowOffset:20,shadowScale:.94},fadeEffect:{crossFade:false},a11y:{prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide"}};if(o.pagination){s.pagination={type:"bullets",clickable:false,hideOnClick:false}}if(o.scrollbar){s.scrollbar={hide:true}}t(s)};export{IonicSlides};
4
+ export{c as createAnimation}from"./animation-60dbdd13.js";export{a as LIFECYCLE_DID_ENTER,c as LIFECYCLE_DID_LEAVE,L as LIFECYCLE_WILL_ENTER,b as LIFECYCLE_WILL_LEAVE,d as LIFECYCLE_WILL_UNLOAD,g as getIonPageElement}from"./index-4b98143d.js";export{iosTransitionAnimation}from"./ios.transition-7ff7381d.js";export{mdTransitionAnimation}from"./md.transition-28a9a26b.js";export{g as getTimeGivenProgression}from"./cubic-bezier-fe2083dc.js";export{createGesture}from"./index-2cf77112.js";export{g as getPlatforms,i as initialize,a as isPlatform}from"./ionic-global-778b7863.js";export{c as componentOnReady}from"./helpers-c0b9ca37.js";export{I as IonicSafeString,g as getMode,s as setupConfig}from"./config-49c88215.js";export{o as openURL}from"./theme-01f3f29c.js";export{m as menuController}from"./index-48209844.js";export{b as actionSheetController,a as alertController,l as loadingController,m as modalController,p as pickerController,c as popoverController,t as toastController}from"./overlays-33ae3ea0.js";import"./index-a5d50daf.js";import"./index-73881b51.js";import"./gesture-controller-1bf57181.js";import"./hardware-back-button-f42b9c80.js";import"./index-9b0d46f4.js";import"./framework-delegate-fed7fe7c.js";var IonicSlides=function(e){var o=e.swiper,t=e.extendParams;var s={effect:undefined,direction:"horizontal",initialSlide:0,loop:false,parallax:false,slidesPerView:1,spaceBetween:0,speed:300,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:false,slidesOffsetBefore:0,slidesOffsetAfter:0,touchEventsTarget:"container",freeMode:false,freeModeMomentum:true,freeModeMomentumRatio:1,freeModeMomentumBounce:true,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:false,freeModeMinimumVelocity:.02,autoHeight:false,setWrapperSize:false,zoom:{maxRatio:3,minRatio:1,toggle:false},touchRatio:1,touchAngle:45,simulateTouch:true,touchStartPreventDefault:false,shortSwipes:true,longSwipes:true,longSwipesRatio:.5,longSwipesMs:300,followFinger:true,threshold:0,touchMoveStopPropagation:true,touchReleaseOnEdges:false,iOSEdgeSwipeDetection:false,iOSEdgeSwipeThreshold:20,resistance:true,resistanceRatio:.85,watchSlidesProgress:false,watchSlidesVisibility:false,preventClicks:true,preventClicksPropagation:true,slideToClickedSlide:false,loopAdditionalSlides:0,noSwiping:true,runCallbacksOnInit:true,coverflowEffect:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:true},flipEffect:{slideShadows:true,limitRotation:true},cubeEffect:{slideShadows:true,shadow:true,shadowOffset:20,shadowScale:.94},fadeEffect:{crossFade:false},a11y:{prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide"}};if(o.pagination){s.pagination={type:"bullets",clickable:false,hideOnClick:false}}if(o.scrollbar){s.scrollbar={hide:true}}t(s)};export{IonicSlides};