@ionic/core 8.6.3-dev.11750799190.186437ae → 8.6.3-dev.11751305829.1112929c

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 (84) hide show
  1. package/components/action-sheet.js +8 -9
  2. package/components/alert.js +7 -8
  3. package/components/ion-app.js +3 -1
  4. package/components/ion-datetime.js +8 -2
  5. package/components/ion-loading.js +7 -8
  6. package/components/ion-menu.js +27 -5
  7. package/components/ion-reorder-group.js +1 -2
  8. package/components/ion-router.js +1 -0
  9. package/components/ion-searchbar.js +4 -6
  10. package/components/ion-toast.js +6 -7
  11. package/components/modal.js +213 -15
  12. package/components/popover.js +8 -7
  13. package/dist/cjs/ion-action-sheet.cjs.entry.js +8 -9
  14. package/dist/cjs/ion-alert.cjs.entry.js +7 -8
  15. package/dist/cjs/ion-app_8.cjs.entry.js +3 -1
  16. package/dist/cjs/ion-datetime_3.cjs.entry.js +8 -2
  17. package/dist/cjs/ion-loading.cjs.entry.js +7 -8
  18. package/dist/cjs/ion-menu_3.cjs.entry.js +27 -5
  19. package/dist/cjs/ion-modal.cjs.entry.js +213 -15
  20. package/dist/cjs/ion-popover.cjs.entry.js +8 -7
  21. package/dist/cjs/ion-reorder_2.cjs.entry.js +1 -2
  22. package/dist/cjs/ion-route_4.cjs.entry.js +1 -0
  23. package/dist/cjs/ion-searchbar.cjs.entry.js +4 -6
  24. package/dist/cjs/ion-toast.cjs.entry.js +6 -7
  25. package/dist/collection/components/action-sheet/action-sheet.js +11 -12
  26. package/dist/collection/components/alert/alert.js +10 -11
  27. package/dist/collection/components/app/app.js +8 -3
  28. package/dist/collection/components/datetime/datetime.js +23 -8
  29. package/dist/collection/components/loading/loading.js +10 -11
  30. package/dist/collection/components/menu/menu.js +62 -19
  31. package/dist/collection/components/modal/animations/ios.enter.js +2 -2
  32. package/dist/collection/components/modal/animations/ios.leave.js +2 -2
  33. package/dist/collection/components/modal/animations/ios.transition.js +124 -0
  34. package/dist/collection/components/modal/modal.js +108 -17
  35. package/dist/collection/components/popover/popover.js +18 -14
  36. package/dist/collection/components/reorder-group/reorder-group.js +2 -3
  37. package/dist/collection/components/router/router.js +5 -1
  38. package/dist/collection/components/searchbar/searchbar.js +5 -7
  39. package/dist/collection/components/toast/toast.js +9 -10
  40. package/dist/docs.json +138 -72
  41. package/dist/esm/ion-action-sheet.entry.js +8 -9
  42. package/dist/esm/ion-alert.entry.js +7 -8
  43. package/dist/esm/ion-app_8.entry.js +3 -1
  44. package/dist/esm/ion-datetime_3.entry.js +8 -2
  45. package/dist/esm/ion-loading.entry.js +7 -8
  46. package/dist/esm/ion-menu_3.entry.js +27 -5
  47. package/dist/esm/ion-modal.entry.js +213 -15
  48. package/dist/esm/ion-popover.entry.js +8 -7
  49. package/dist/esm/ion-reorder_2.entry.js +1 -2
  50. package/dist/esm/ion-route_4.entry.js +1 -0
  51. package/dist/esm/ion-searchbar.entry.js +4 -6
  52. package/dist/esm/ion-toast.entry.js +6 -7
  53. package/dist/ionic/ionic.esm.js +1 -1
  54. package/dist/ionic/{p-96389029.entry.js → p-01123ecf.entry.js} +1 -1
  55. package/dist/ionic/{p-cb787a4b.entry.js → p-03d21728.entry.js} +1 -1
  56. package/dist/ionic/{p-9e699d4a.entry.js → p-0d131a02.entry.js} +1 -1
  57. package/dist/ionic/p-0df5b2a5.entry.js +4 -0
  58. package/dist/ionic/{p-6b666996.entry.js → p-2d0eccfb.entry.js} +1 -1
  59. package/dist/ionic/{p-ead42a37.entry.js → p-5f671887.entry.js} +1 -1
  60. package/dist/ionic/p-69f91268.entry.js +4 -0
  61. package/dist/ionic/{p-2020aa51.entry.js → p-b758a177.entry.js} +1 -1
  62. package/dist/ionic/p-b9ba04ca.entry.js +4 -0
  63. package/dist/ionic/{p-cd12ed1c.entry.js → p-d8429eb4.entry.js} +1 -1
  64. package/dist/ionic/{p-3a4feac2.entry.js → p-e37d6c67.entry.js} +1 -1
  65. package/dist/types/components/action-sheet/action-sheet.d.ts +5 -6
  66. package/dist/types/components/alert/alert.d.ts +5 -6
  67. package/dist/types/components/app/app.d.ts +2 -0
  68. package/dist/types/components/datetime/datetime.d.ts +6 -0
  69. package/dist/types/components/loading/loading.d.ts +5 -6
  70. package/dist/types/components/menu/menu.d.ts +25 -3
  71. package/dist/types/components/modal/animations/ios.transition.d.ts +14 -0
  72. package/dist/types/components/modal/modal.d.ts +20 -6
  73. package/dist/types/components/popover/popover.d.ts +6 -5
  74. package/dist/types/components/reorder-group/reorder-group.d.ts +0 -1
  75. package/dist/types/components/router/router.d.ts +1 -0
  76. package/dist/types/components/searchbar/searchbar.d.ts +0 -2
  77. package/dist/types/components/toast/toast.d.ts +4 -5
  78. package/dist/types/components.d.ts +32 -18
  79. package/hydrate/index.js +293 -70
  80. package/hydrate/index.mjs +293 -70
  81. package/package.json +2 -2
  82. package/dist/ionic/p-6dd2e493.entry.js +0 -4
  83. package/dist/ionic/p-7149db7e.entry.js +0 -4
  84. package/dist/ionic/p-bec79123.entry.js +0 -4
@@ -242,7 +242,7 @@ const Menu = class {
242
242
  return Promise.resolve(this._isOpen);
243
243
  }
244
244
  /**
245
- * Returns `true` is the menu is active.
245
+ * Returns `true` if the menu is active.
246
246
  *
247
247
  * A menu is active when it can be opened or closed, meaning it's enabled
248
248
  * and it's not part of a `ion-split-pane`.
@@ -253,6 +253,10 @@ const Menu = class {
253
253
  /**
254
254
  * Opens the menu. If the menu is already open or it can't be opened,
255
255
  * it returns `false`.
256
+ *
257
+ * @param animated If `true`, the menu will animate when opening.
258
+ * If `false`, the menu will open instantly without animation.
259
+ * Defaults to `true`.
256
260
  */
257
261
  open(animated = true) {
258
262
  return this.setOpen(true, animated);
@@ -260,20 +264,38 @@ const Menu = class {
260
264
  /**
261
265
  * Closes the menu. If the menu is already closed or it can't be closed,
262
266
  * it returns `false`.
267
+ *
268
+ * @param animated If `true`, the menu will animate when closing. If `false`,
269
+ * the menu will close instantly without animation. Defaults to `true`.
270
+ * @param role The role of the element that is closing the menu.
271
+ * This can be useful in a button handler for determining which button was
272
+ * clicked to close the menu. Some examples include:
273
+ * `"cancel"`, `"destructive"`, `"selected"`, and `"backdrop"`.
263
274
  */
264
275
  close(animated = true, role) {
265
276
  return this.setOpen(false, animated, role);
266
277
  }
267
278
  /**
268
- * Toggles the menu. If the menu is already open, it will try to close, otherwise it will try to open it.
279
+ * Toggles the menu. If the menu is already open, it will try to close,
280
+ * otherwise it will try to open it.
269
281
  * If the operation can't be completed successfully, it returns `false`.
282
+ *
283
+ * @param animated If `true`, the menu will animate when opening/closing.
284
+ * If `false`, the menu will open/close instantly without animation.
285
+ * Defaults to `true`.
270
286
  */
271
287
  toggle(animated = true) {
272
288
  return this.setOpen(!this._isOpen, animated);
273
289
  }
274
290
  /**
275
- * Opens or closes the button.
291
+ * Opens or closes the menu.
276
292
  * If the operation can't be completed successfully, it returns `false`.
293
+ *
294
+ * @param shouldOpen If `true`, the menu will open. If `false`, the menu
295
+ * will close.
296
+ * @param animated If `true`, the menu will animate when opening/closing.
297
+ * If `false`, the menu will open/close instantly without animation.
298
+ * @param role The role of the element that is closing the menu.
277
299
  */
278
300
  setOpen(shouldOpen, animated = true, role) {
279
301
  return index$1.menuController._setOpen(this, shouldOpen, animated, role);
@@ -638,14 +660,14 @@ const Menu = class {
638
660
  * the ionBackButton listener in the menu controller
639
661
  * will handle closing the menu when Escape is pressed.
640
662
  */
641
- return (index.h(index.Host, { key: '9e4ae9476a76781f1d228395c9af9e1c39ec82bb', onKeyDown: hardwareBackButton.shouldUseCloseWatcher() ? null : this.onKeydown, role: "navigation", "aria-label": inheritedAttributes['aria-label'] || 'menu', class: {
663
+ return (index.h(index.Host, { key: 'a5c75aa40a34530b56ee3b98d706a5ac5ae300de', onKeyDown: hardwareBackButton.shouldUseCloseWatcher() ? null : this.onKeydown, role: "navigation", "aria-label": inheritedAttributes['aria-label'] || 'menu', class: {
642
664
  [mode]: true,
643
665
  [`menu-type-${type}`]: true,
644
666
  'menu-enabled': !disabled,
645
667
  [`menu-side-${side}`]: true,
646
668
  'menu-pane-visible': isPaneVisible,
647
669
  'split-pane-side': theme.hostContext('ion-split-pane', el),
648
- } }, index.h("div", { key: 'c6153589d872ac7e3fdf5eedfdb858eb64ccd713', class: "menu-inner", part: "container", ref: (el) => (this.menuInnerEl = el) }, index.h("slot", { key: '9994aac4b22f17db34c9b8b2aa56b8710b9df645' })), index.h("ion-backdrop", { key: 'f09ac30cc4dd2dcb10628965e659dae5a23baf98', ref: (el) => (this.backdropEl = el), class: "menu-backdrop", tappable: false, stopPropagation: false, part: "backdrop" })));
670
+ } }, index.h("div", { key: '3f5f70acd4d3ed6bb445122f4f01d73db738a75f', class: "menu-inner", part: "container", ref: (el) => (this.menuInnerEl = el) }, index.h("slot", { key: '3161326c9330e7f7441299c428b87a91b31a83e9' })), index.h("ion-backdrop", { key: '917b50f38489bdf03d0c642af8b4e4e172c7dc4c', ref: (el) => (this.backdropEl = el), class: "menu-backdrop", tappable: false, stopPropagation: false, part: "backdrop" })));
649
671
  }
650
672
  get el() { return index.getElement(this); }
651
673
  static get watchers() { return {
@@ -589,7 +589,7 @@ const iosEnterAnimation = (baseEl, opts) => {
589
589
  baseAnimation.addAnimation(contentAnimation);
590
590
  }
591
591
  if (presentingEl) {
592
- const isMobile = window.innerWidth < 768;
592
+ const isPortrait = window.innerWidth < 768;
593
593
  const hasCardModal = presentingEl.tagName === 'ION-MODAL' && presentingEl.presentingElement !== undefined;
594
594
  const presentingElRoot = helpers.getElementRoot(presentingEl);
595
595
  const presentingAnimation = animation.createAnimation().beforeStyles({
@@ -598,7 +598,7 @@ const iosEnterAnimation = (baseEl, opts) => {
598
598
  overflow: 'hidden',
599
599
  });
600
600
  const bodyEl = document.body;
601
- if (isMobile) {
601
+ if (isPortrait) {
602
602
  /**
603
603
  * Fallback for browsers that does not support `max()` (ex: Firefox)
604
604
  * No need to worry about statusbar padding since engines like Gecko
@@ -676,7 +676,7 @@ const iosLeaveAnimation = (baseEl, opts, duration = 500) => {
676
676
  .duration(duration)
677
677
  .addAnimation(wrapperAnimation);
678
678
  if (presentingEl) {
679
- const isMobile = window.innerWidth < 768;
679
+ const isPortrait = window.innerWidth < 768;
680
680
  const hasCardModal = presentingEl.tagName === 'ION-MODAL' && presentingEl.presentingElement !== undefined;
681
681
  const presentingElRoot = helpers.getElementRoot(presentingEl);
682
682
  const presentingAnimation = animation.createAnimation()
@@ -694,7 +694,7 @@ const iosLeaveAnimation = (baseEl, opts, duration = 500) => {
694
694
  }
695
695
  });
696
696
  const bodyEl = document.body;
697
- if (isMobile) {
697
+ if (isPortrait) {
698
698
  const transformOffset = !CSS.supports('width', 'max(0px, 1px)') ? '30px' : 'max(30px, var(--ion-safe-area-top))';
699
699
  const modalTransform = hasCardModal ? '-10px' : transformOffset;
700
700
  const toPresentingScale = SwipeToCloseDefaults.MIN_PRESENTING_SCALE;
@@ -741,6 +741,125 @@ const iosLeaveAnimation = (baseEl, opts, duration = 500) => {
741
741
  return baseAnimation;
742
742
  };
743
743
 
744
+ /**
745
+ * Transition animation from portrait view to landscape view
746
+ * This handles the case where a card modal is open in portrait view
747
+ * and the user switches to landscape view
748
+ */
749
+ const portraitToLandscapeTransition = (baseEl, opts, duration = 300) => {
750
+ const { presentingEl } = opts;
751
+ if (!presentingEl) {
752
+ // No transition needed for non-card modals
753
+ return animation.createAnimation('portrait-to-landscape-transition');
754
+ }
755
+ const hasCardModal = presentingEl.tagName === 'ION-MODAL' && presentingEl.presentingElement !== undefined;
756
+ const presentingElRoot = helpers.getElementRoot(presentingEl);
757
+ const bodyEl = document.body;
758
+ const baseAnimation = animation.createAnimation('portrait-to-landscape-transition')
759
+ .addElement(baseEl)
760
+ .easing('cubic-bezier(0.32,0.72,0,1)')
761
+ .duration(duration);
762
+ const presentingAnimation = animation.createAnimation();
763
+ if (!hasCardModal) {
764
+ // Non-card modal: transition from portrait state to landscape state
765
+ // Portrait: presentingEl has transform and body has black background
766
+ // Landscape: no transform, no body background, modal wrapper opacity changes
767
+ const root = helpers.getElementRoot(baseEl);
768
+ const wrapperAnimation = animation.createAnimation()
769
+ .addElement(root.querySelectorAll('.modal-wrapper, .modal-shadow'))
770
+ .fromTo('opacity', '1', '1'); // Keep wrapper visible in landscape
771
+ const backdropAnimation = animation.createAnimation()
772
+ .addElement(root.querySelector('ion-backdrop'))
773
+ .fromTo('opacity', 'var(--backdrop-opacity)', 'var(--backdrop-opacity)'); // Keep backdrop visible
774
+ // Animate presentingEl from portrait state back to normal
775
+ const transformOffset = !CSS.supports('width', 'max(0px, 1px)') ? '30px' : 'max(30px, var(--ion-safe-area-top))';
776
+ const toPresentingScale = SwipeToCloseDefaults.MIN_PRESENTING_SCALE;
777
+ const fromTransform = `translateY(${transformOffset}) scale(${toPresentingScale})`;
778
+ presentingAnimation
779
+ .addElement(presentingEl)
780
+ .beforeAddWrite(() => bodyEl.style.setProperty('background-color', ''))
781
+ .fromTo('transform', fromTransform, 'translateY(0px) scale(1)')
782
+ .fromTo('filter', 'contrast(0.85)', 'contrast(1)')
783
+ .fromTo('border-radius', '10px 10px 0 0', '0px');
784
+ baseAnimation.addAnimation([presentingAnimation, wrapperAnimation, backdropAnimation]);
785
+ }
786
+ else {
787
+ // Card modal: transition from portrait card state to landscape card state
788
+ const toPresentingScale = SwipeToCloseDefaults.MIN_PRESENTING_SCALE;
789
+ const transformOffset = !CSS.supports('width', 'max(0px, 1px)') ? '30px' : 'max(30px, var(--ion-safe-area-top))';
790
+ const fromTransform = `translateY(${transformOffset}) scale(${toPresentingScale})`;
791
+ const toTransform = `translateY(-10px) scale(${toPresentingScale})`;
792
+ presentingAnimation
793
+ .addElement(presentingElRoot.querySelector('.modal-wrapper'))
794
+ .fromTo('transform', fromTransform, toTransform)
795
+ .fromTo('filter', 'contrast(0.85)', 'contrast(0.85)'); // Keep same contrast for card
796
+ const shadowAnimation = animation.createAnimation()
797
+ .addElement(presentingElRoot.querySelector('.modal-shadow'))
798
+ .fromTo('opacity', '0', '0') // Shadow stays hidden in landscape for card modals
799
+ .fromTo('transform', fromTransform, toTransform);
800
+ baseAnimation.addAnimation([presentingAnimation, shadowAnimation]);
801
+ }
802
+ return baseAnimation;
803
+ };
804
+ /**
805
+ * Transition animation from landscape view to portrait view
806
+ * This handles the case where a card modal is open in landscape view
807
+ * and the user switches to portrait view
808
+ */
809
+ const landscapeToPortraitTransition = (baseEl, opts, duration = 300) => {
810
+ const { presentingEl } = opts;
811
+ if (!presentingEl) {
812
+ // No transition needed for non-card modals
813
+ return animation.createAnimation('landscape-to-portrait-transition');
814
+ }
815
+ const hasCardModal = presentingEl.tagName === 'ION-MODAL' && presentingEl.presentingElement !== undefined;
816
+ const presentingElRoot = helpers.getElementRoot(presentingEl);
817
+ const bodyEl = document.body;
818
+ const baseAnimation = animation.createAnimation('landscape-to-portrait-transition')
819
+ .addElement(baseEl)
820
+ .easing('cubic-bezier(0.32,0.72,0,1)')
821
+ .duration(duration);
822
+ const presentingAnimation = animation.createAnimation();
823
+ if (!hasCardModal) {
824
+ // Non-card modal: transition from landscape state to portrait state
825
+ const root = helpers.getElementRoot(baseEl);
826
+ const wrapperAnimation = animation.createAnimation()
827
+ .addElement(root.querySelectorAll('.modal-wrapper, .modal-shadow'))
828
+ .fromTo('opacity', '1', '1'); // Keep wrapper visible
829
+ const backdropAnimation = animation.createAnimation()
830
+ .addElement(root.querySelector('ion-backdrop'))
831
+ .fromTo('opacity', 'var(--backdrop-opacity)', 'var(--backdrop-opacity)'); // Keep backdrop visible
832
+ // Animate presentingEl from normal state to portrait state
833
+ const transformOffset = !CSS.supports('width', 'max(0px, 1px)') ? '30px' : 'max(30px, var(--ion-safe-area-top))';
834
+ const toPresentingScale = SwipeToCloseDefaults.MIN_PRESENTING_SCALE;
835
+ const toTransform = `translateY(${transformOffset}) scale(${toPresentingScale})`;
836
+ presentingAnimation
837
+ .addElement(presentingEl)
838
+ .beforeAddWrite(() => bodyEl.style.setProperty('background-color', 'black'))
839
+ .fromTo('transform', 'translateY(0px) scale(1)', toTransform)
840
+ .fromTo('filter', 'contrast(1)', 'contrast(0.85)')
841
+ .fromTo('border-radius', '0px', '10px 10px 0 0');
842
+ baseAnimation.addAnimation([presentingAnimation, wrapperAnimation, backdropAnimation]);
843
+ }
844
+ else {
845
+ // Card modal: transition from landscape card state to portrait card state
846
+ const toPresentingScale = SwipeToCloseDefaults.MIN_PRESENTING_SCALE;
847
+ const transformOffset = !CSS.supports('width', 'max(0px, 1px)') ? '30px' : 'max(30px, var(--ion-safe-area-top))';
848
+ const fromTransform = `translateY(-10px) scale(${toPresentingScale})`;
849
+ const toTransform = `translateY(${transformOffset}) scale(${toPresentingScale})`;
850
+ presentingAnimation
851
+ .addElement(presentingElRoot.querySelector('.modal-wrapper'))
852
+ .fromTo('transform', fromTransform, toTransform)
853
+ .fromTo('filter', 'contrast(0.85)', 'contrast(0.85)'); // Keep same contrast for card
854
+ const shadowAnimation = animation.createAnimation()
855
+ .addElement(presentingElRoot.querySelector('.modal-shadow'))
856
+ .fromTo('opacity', '0', '0') // Shadow stays hidden
857
+ .fromTo('transform', fromTransform, toTransform);
858
+ baseAnimation.addAnimation([presentingAnimation, shadowAnimation]);
859
+ }
860
+ return baseAnimation;
861
+ };
862
+
744
863
  const createEnterAnimation = () => {
745
864
  const backdropAnimation = animation.createAnimation()
746
865
  .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
@@ -1484,6 +1603,17 @@ const Modal = class {
1484
1603
  el.dispatchEvent(ev);
1485
1604
  }
1486
1605
  };
1606
+ /**
1607
+ * When the modal receives focus directly, pass focus to the handle
1608
+ * if it exists and is focusable, otherwise let the focus trap handle it.
1609
+ */
1610
+ this.onModalFocus = (ev) => {
1611
+ const { dragHandleEl, el } = this;
1612
+ // Only handle focus if the modal itself was focused (not a child element)
1613
+ if (ev.target === el && dragHandleEl && dragHandleEl.tabIndex !== -1) {
1614
+ dragHandleEl.focus();
1615
+ }
1616
+ };
1487
1617
  }
1488
1618
  onIsOpenChange(newValue, oldValue) {
1489
1619
  if (newValue === true && oldValue === false) {
@@ -1511,6 +1641,7 @@ const Modal = class {
1511
1641
  }
1512
1642
  disconnectedCallback() {
1513
1643
  this.triggerController.removeClickListener();
1644
+ this.cleanupViewTransitionListener();
1514
1645
  }
1515
1646
  componentWillLoad() {
1516
1647
  var _a;
@@ -1721,6 +1852,8 @@ const Modal = class {
1721
1852
  else if (hasCardModal) {
1722
1853
  this.initSwipeToClose();
1723
1854
  }
1855
+ // Initialize view transition listener for iOS card modals
1856
+ this.initViewTransitionListener();
1724
1857
  unlock();
1725
1858
  }
1726
1859
  initSwipeToClose() {
@@ -1815,13 +1948,13 @@ const Modal = class {
1815
1948
  }
1816
1949
  /**
1817
1950
  * Dismiss the modal overlay after it has been presented.
1818
- *
1819
- * @param data Any data to emit in the dismiss events.
1820
- * @param role The role of the element that is dismissing the modal. For example, 'cancel' or 'backdrop'.
1821
- *
1822
1951
  * This is a no-op if the overlay has not been presented yet. If you want
1823
1952
  * to remove an overlay from the DOM that was never presented, use the
1824
1953
  * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
1954
+ *
1955
+ * @param data Any data to emit in the dismiss events.
1956
+ * @param role The role of the element that is dismissing the modal.
1957
+ * For example, `cancel` or `backdrop`.
1825
1958
  */
1826
1959
  async dismiss(data, role) {
1827
1960
  var _a;
@@ -1874,6 +2007,7 @@ const Modal = class {
1874
2007
  if (this.gesture) {
1875
2008
  this.gesture.destroy();
1876
2009
  }
2010
+ this.cleanupViewTransitionListener();
1877
2011
  }
1878
2012
  this.currentBreakpoint = undefined;
1879
2013
  this.animation = undefined;
@@ -1893,8 +2027,10 @@ const Modal = class {
1893
2027
  return overlays.eventMethod(this.el, 'ionModalWillDismiss');
1894
2028
  }
1895
2029
  /**
1896
- * Move a sheet style modal to a specific breakpoint. The breakpoint value must
1897
- * be a value defined in your `breakpoints` array.
2030
+ * Move a sheet style modal to a specific breakpoint.
2031
+ *
2032
+ * @param breakpoint The breakpoint value to move the sheet modal to.
2033
+ * Must be a value defined in your `breakpoints` array.
1898
2034
  */
1899
2035
  async setCurrentBreakpoint(breakpoint) {
1900
2036
  if (!this.isSheetModal) {
@@ -1947,26 +2083,88 @@ const Modal = class {
1947
2083
  await this.setCurrentBreakpoint(nextBreakpoint);
1948
2084
  return true;
1949
2085
  }
2086
+ initViewTransitionListener() {
2087
+ // Only enable for iOS card modals when no custom animations are provided
2088
+ if (index$3.getIonMode(this) !== 'ios' || !this.presentingElement || this.enterAnimation || this.leaveAnimation) {
2089
+ return;
2090
+ }
2091
+ // Set initial view state
2092
+ this.currentViewIsPortrait = window.innerWidth < 768;
2093
+ // Create debounced resize handler
2094
+ let resizeTimeout;
2095
+ this.resizeListener = () => {
2096
+ clearTimeout(resizeTimeout);
2097
+ resizeTimeout = setTimeout(() => {
2098
+ this.handleViewTransition();
2099
+ }, 100); // Debounce for 100ms to avoid excessive calls
2100
+ };
2101
+ window.addEventListener('resize', this.resizeListener);
2102
+ }
2103
+ handleViewTransition() {
2104
+ const isPortrait = window.innerWidth < 768;
2105
+ // Only transition if view state actually changed
2106
+ if (this.currentViewIsPortrait === isPortrait) {
2107
+ return;
2108
+ }
2109
+ // Cancel any ongoing transition animation
2110
+ if (this.viewTransitionAnimation) {
2111
+ this.viewTransitionAnimation.destroy();
2112
+ this.viewTransitionAnimation = undefined;
2113
+ }
2114
+ const { presentingElement } = this;
2115
+ if (!presentingElement) {
2116
+ return;
2117
+ }
2118
+ // Create transition animation
2119
+ let transitionAnimation;
2120
+ if (this.currentViewIsPortrait && !isPortrait) {
2121
+ // Portrait to landscape transition
2122
+ transitionAnimation = portraitToLandscapeTransition(this.el, {
2123
+ presentingEl: presentingElement});
2124
+ }
2125
+ else {
2126
+ // Landscape to portrait transition
2127
+ transitionAnimation = landscapeToPortraitTransition(this.el, {
2128
+ presentingEl: presentingElement});
2129
+ }
2130
+ // Update state and play animation
2131
+ this.currentViewIsPortrait = isPortrait;
2132
+ this.viewTransitionAnimation = transitionAnimation;
2133
+ transitionAnimation.play().then(() => {
2134
+ this.viewTransitionAnimation = undefined;
2135
+ });
2136
+ }
2137
+ cleanupViewTransitionListener() {
2138
+ if (this.resizeListener) {
2139
+ window.removeEventListener('resize', this.resizeListener);
2140
+ this.resizeListener = undefined;
2141
+ }
2142
+ if (this.viewTransitionAnimation) {
2143
+ this.viewTransitionAnimation.destroy();
2144
+ this.viewTransitionAnimation = undefined;
2145
+ }
2146
+ }
1950
2147
  render() {
1951
2148
  const { handle, isSheetModal, presentingElement, htmlAttributes, handleBehavior, inheritedAttributes, focusTrap, expandToScroll, } = this;
1952
2149
  const showHandle = handle !== false && isSheetModal;
1953
2150
  const mode = index$3.getIonMode(this);
1954
2151
  const isCardModal = presentingElement !== undefined && mode === 'ios';
1955
2152
  const isHandleCycle = handleBehavior === 'cycle';
1956
- return (index$3.h(index$3.Host, Object.assign({ key: '04c094d52dcd7095fc08d74ab7f3e37b498ec480', "no-router": true,
2153
+ const isSheetModalWithHandle = isSheetModal && showHandle;
2154
+ return (index$3.h(index$3.Host, Object.assign({ key: 'd5bcaa588471573e1bcbd99997b306c8ecdd124f', "no-router": true,
1957
2155
  // Allow the modal to be navigable when the handle is focusable
1958
- tabIndex: !isHandleCycle ? -1 : 0 }, htmlAttributes, { style: {
2156
+ tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
1959
2157
  zIndex: `${20000 + this.overlayIndex}`,
1960
- }, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [overlays.FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, 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: '20e56317fbf12a75fbcfd4abb394146de1764b9b', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && index$3.h("div", { key: 'cb87817485a204ee7bc117aaa9472de8acaebfd6', class: "modal-shadow" }), index$3.h("div", Object.assign({ key: 'b5e88cd83782a5d09fe2caf298aaaf67d226f699',
2158
+ }, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [overlays.FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, theme.getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), index$3.h("ion-backdrop", { key: '78b954a1c50a0325eb51db04314e86701c66d840', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && index$3.h("div", { key: '21887227c272f5eba1b3d164be3572bd710d415c', class: "modal-shadow" }), index$3.h("div", Object.assign({ key: 'a40472a9065c04ad12fb7b2b2a05e5021f077ad5',
1961
2159
  /*
1962
2160
  role and aria-modal must be used on the
1963
2161
  same element. They must also be set inside the
1964
2162
  shadow DOM otherwise ion-button will not be highlighted
1965
2163
  when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
1966
2164
  */
1967
- role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (index$3.h("button", { key: '90340f02007b74da70ace1d5035d7b49573fad2b', class: "modal-handle",
2165
+ role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (index$3.h("button", { key: 'a4973f66587546031d1cc0197e1ba7c2521a3fbc', class: "modal-handle",
1968
2166
  // Prevents the handle from receiving keyboard focus when it does not cycle
1969
- 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: 'c7db14c97e2a80b0b9680635ea9d4361e8f4b77e' }))));
2167
+ 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) })), index$3.h("slot", { key: 'ee5e007e3a4e592d98f1b5a5d31ad55e6faa3bdb' }))));
1970
2168
  }
1971
2169
  get el() { return index$3.getElement(this); }
1972
2170
  static get watchers() { return {
@@ -1263,6 +1263,8 @@ const Popover = class {
1263
1263
  * Developers can pass a mouse, touch, or pointer event
1264
1264
  * to position the popover relative to where that event
1265
1265
  * was dispatched.
1266
+ *
1267
+ * @param event The event to position the popover relative to.
1266
1268
  */
1267
1269
  async present(event) {
1268
1270
  const unlock = await this.lockController.lock();
@@ -1326,15 +1328,14 @@ const Popover = class {
1326
1328
  }
1327
1329
  /**
1328
1330
  * Dismiss the popover overlay after it has been presented.
1331
+ * This is a no-op if the overlay has not been presented yet. If you want
1332
+ * to remove an overlay from the DOM that was never presented, use the
1333
+ * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
1329
1334
  *
1330
1335
  * @param data Any data to emit in the dismiss events.
1331
- * @param role The role of the element that is dismissing the popover. For example, 'cancel' or 'backdrop'.
1336
+ * @param role The role of the element that is dismissing the popover. For example, `cancel` or `backdrop`.
1332
1337
  * @param dismissParentPopover If `true`, dismissing this popover will also dismiss
1333
1338
  * a parent popover if this popover is nested. Defaults to `true`.
1334
- *
1335
- * This is a no-op if the overlay has not been presented yet. If you want
1336
- * to remove an overlay from the DOM that was never presented, use the
1337
- * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
1338
1339
  */
1339
1340
  async dismiss(data, role, dismissParentPopover = true) {
1340
1341
  const unlock = await this.lockController.lock();
@@ -1386,9 +1387,9 @@ const Popover = class {
1386
1387
  const { onLifecycle, parentPopover, dismissOnSelect, side, arrow, htmlAttributes, focusTrap } = this;
1387
1388
  const desktop = index.isPlatform('desktop');
1388
1389
  const enableArrow = arrow && !parentPopover;
1389
- return (index.h(index.Host, Object.assign({ key: '1de4862099cfcb5035e78008e6dc7c1371846f9a', "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
1390
+ return (index.h(index.Host, Object.assign({ key: '16866c02534968c982cf4730d2936d03a5107c8b', "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
1390
1391
  zIndex: `${20000 + this.overlayIndex}`,
1391
- }, class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, [overlays.FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && index.h("ion-backdrop", { key: '981aa4e0102cb93312ffbd8243cdf2a0cdc60469', tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), index.h("div", { key: '1a28ed55e9d34ef78cf0eb0178643301fd2dd75d', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && index.h("div", { key: '1c206ea5eb3c0b5883a3d45c34cd22dd5ffe4b65', class: "popover-arrow", part: "arrow" }), index.h("div", { key: '5ba561486a328c0c7ab825995fdbfb7a196429a4', class: "popover-content", part: "content" }, index.h("slot", { key: '00fc244ce9dcc2dfc677e6c34b7c8e7a330b2b03' })))));
1392
+ }, class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, [overlays.FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && index.h("ion-backdrop", { key: '0df258601a4d30df3c27aa8234a7d5e056c3ecbb', tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), index.h("div", { key: 'f94e80ed996b957b5cd09b826472b4f60e8fcc78', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && index.h("div", { key: '185ce22f6386e8444a9cc7b8818dbfc16c463c99', class: "popover-arrow", part: "arrow" }), index.h("div", { key: '206202b299404e110de5397b229678cca18568d3', class: "popover-content", part: "content" }, index.h("slot", { key: 'ee543a0b92d6e35a837c0a0e4617c7b0fc4ad0b0' })))));
1392
1393
  }
1393
1394
  get el() { return index.getElement(this); }
1394
1395
  static get watchers() { return {
@@ -92,7 +92,6 @@ const ReorderGroup = class {
92
92
  }
93
93
  /**
94
94
  * Completes the reorder operation. Must be called by the `ionItemReorder` event.
95
- *
96
95
  * If a list of items is passed, the list will be reordered and returned in the
97
96
  * proper order.
98
97
  *
@@ -279,7 +278,7 @@ const ReorderGroup = class {
279
278
  }
280
279
  render() {
281
280
  const mode = index.getIonMode(this);
282
- return (index.h(index.Host, { key: 'f30613b361c5c3095b7928a92fb4b1e8d6eff600', class: {
281
+ return (index.h(index.Host, { key: 'dfcdc3a6aa1b2fba15f861ec868d6a11e667c9de', class: {
283
282
  [mode]: true,
284
283
  'reorder-enabled': !this.disabled,
285
284
  'reorder-list-active': this.state !== 0 /* ReorderGroupState.Idle */,
@@ -676,6 +676,7 @@ const Router = class {
676
676
  *
677
677
  * @param path The path to navigate to.
678
678
  * @param direction The direction of the animation. Defaults to `"forward"`.
679
+ * @param animation A custom animation to use for the transition.
679
680
  */
680
681
  async push(path, direction = 'forward', animation) {
681
682
  var _a;
@@ -257,10 +257,8 @@ const Searchbar = class {
257
257
  /**
258
258
  * Sets focus on the native `input` in `ion-searchbar`. Use this method instead of the global
259
259
  * `input.focus()`.
260
- *
261
260
  * Developers who wish to focus an input when a page enters
262
261
  * should call `setFocus()` in the `ionViewDidEnter()` lifecycle method.
263
- *
264
262
  * Developers who wish to focus an input when an overlay is presented
265
263
  * should call `setFocus` after `didPresent` has resolved.
266
264
  *
@@ -439,8 +437,8 @@ const Searchbar = class {
439
437
  const clearIcon = this.clearIcon || (mode === 'ios' ? index$1.closeCircle : index$1.closeSharp);
440
438
  const searchIcon = this.searchIcon || (mode === 'ios' ? index$1.searchOutline : index$1.searchSharp);
441
439
  const shouldShowCancelButton = this.shouldShowCancelButton();
442
- const cancelButton = this.showCancelButton !== 'never' && (index.h("button", { key: '5835c36fcb0b52aec956538202a783f6c194d853', "aria-label": cancelButtonText, "aria-hidden": shouldShowCancelButton ? undefined : 'true', type: "button", tabIndex: mode === 'ios' && !shouldShowCancelButton ? -1 : undefined, onMouseDown: this.onCancelSearchbar, onTouchStart: this.onCancelSearchbar, class: "searchbar-cancel-button" }, index.h("div", { key: '85df41676bed611467bd4df0002b08baee4f539c', "aria-hidden": "true" }, mode === 'md' ? (index.h("ion-icon", { "aria-hidden": "true", mode: mode, icon: this.cancelButtonIcon, lazy: false })) : (cancelButtonText))));
443
- return (index.h(index.Host, { key: 'e1e30cdd79f9f54d5f2d27501012358bc46880e5', role: "search", "aria-disabled": this.disabled ? 'true' : null, class: theme.createColorClasses(this.color, {
440
+ const cancelButton = this.showCancelButton !== 'never' && (index.h("button", { key: '19e18775856db87daeb4b9e3d7bca0461915a0df', "aria-label": cancelButtonText, "aria-hidden": shouldShowCancelButton ? undefined : 'true', type: "button", tabIndex: mode === 'ios' && !shouldShowCancelButton ? -1 : undefined, onMouseDown: this.onCancelSearchbar, onTouchStart: this.onCancelSearchbar, class: "searchbar-cancel-button" }, index.h("div", { key: 'b3bbdcc033f3bd3441d619e4a252cef0dad4d07e', "aria-hidden": "true" }, mode === 'md' ? (index.h("ion-icon", { "aria-hidden": "true", mode: mode, icon: this.cancelButtonIcon, lazy: false })) : (cancelButtonText))));
441
+ return (index.h(index.Host, { key: '074aa60e051bfb3225e87d44bbb6346c59c73574', role: "search", "aria-disabled": this.disabled ? 'true' : null, class: theme.createColorClasses(this.color, {
444
442
  [mode]: true,
445
443
  'searchbar-animated': animated,
446
444
  'searchbar-disabled': this.disabled,
@@ -450,14 +448,14 @@ const Searchbar = class {
450
448
  'searchbar-has-focus': this.focused,
451
449
  'searchbar-should-show-clear': this.shouldShowClearButton(),
452
450
  'searchbar-should-show-cancel': this.shouldShowCancelButton(),
453
- }) }, index.h("div", { key: '7e9db147282a35bb1e3c9c6125b9a044e81ddde5', class: "searchbar-input-container" }, index.h("input", Object.assign({ key: '02f08da21326b78d6cd249d54deab96fd8472ba8', "aria-label": "search text", disabled: this.disabled, ref: (el) => (this.nativeInput = el), class: "searchbar-input", inputMode: this.inputmode, enterKeyHint: this.enterkeyhint, name: this.name, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, minLength: this.minlength, maxLength: this.maxlength, placeholder: this.placeholder, type: this.type, value: this.getValue(), autoCapitalize: autocapitalize === 'default' ? undefined : autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, spellcheck: this.spellcheck }, this.inheritedAttributes)), mode === 'md' && cancelButton, index.h("ion-icon", { key: '048b00348456bd827ae734491c46a67bfb146227', "aria-hidden": "true", mode: mode, icon: searchIcon, lazy: false, class: "searchbar-search-icon" }), index.h("button", { key: '71f64339bbfd54ebd26a0946c8ee9d726cd89c04', "aria-label": "reset", type: "button", "no-blur": true, class: "searchbar-clear-button", onPointerDown: (ev) => {
451
+ }) }, index.h("div", { key: '54f58a79fe36e85d9295157303f1be89c98bbdaf', class: "searchbar-input-container" }, index.h("input", Object.assign({ key: 'f991a37fcf54d26b7ad10d89084764e03d97b9de', "aria-label": "search text", disabled: this.disabled, ref: (el) => (this.nativeInput = el), class: "searchbar-input", inputMode: this.inputmode, enterKeyHint: this.enterkeyhint, name: this.name, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, minLength: this.minlength, maxLength: this.maxlength, placeholder: this.placeholder, type: this.type, value: this.getValue(), autoCapitalize: autocapitalize === 'default' ? undefined : autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, spellcheck: this.spellcheck }, this.inheritedAttributes)), mode === 'md' && cancelButton, index.h("ion-icon", { key: '8b44dd90a3292c5cf872ef16a8520675f5673494', "aria-hidden": "true", mode: mode, icon: searchIcon, lazy: false, class: "searchbar-search-icon" }), index.h("button", { key: '79d9cfed8f01268044f82811a35d323a12dca749', "aria-label": "reset", type: "button", "no-blur": true, class: "searchbar-clear-button", onPointerDown: (ev) => {
454
452
  /**
455
453
  * This prevents mobile browsers from
456
454
  * blurring the input when the clear
457
455
  * button is activated.
458
456
  */
459
457
  ev.preventDefault();
460
- }, onClick: () => this.onClearInput(true) }, index.h("ion-icon", { key: '9b1a177b21951c1c95897a468b34bb7bbd63d137', "aria-hidden": "true", mode: mode, icon: clearIcon, lazy: false, class: "searchbar-clear-icon" }))), mode === 'ios' && cancelButton));
458
+ }, onClick: () => this.onClearInput(true) }, index.h("ion-icon", { key: 'aa3b9fa8a61f853236783ac7bcd0b113ea65ece2', "aria-hidden": "true", mode: mode, icon: clearIcon, lazy: false, class: "searchbar-clear-icon" }))), mode === 'ios' && cancelButton));
461
459
  }
462
460
  get el() { return index.getElement(this); }
463
461
  static get watchers() { return {
@@ -674,16 +674,15 @@ const Toast = class {
674
674
  }
675
675
  /**
676
676
  * Dismiss the toast overlay after it has been presented.
677
+ * This is a no-op if the overlay has not been presented yet. If you want
678
+ * to remove an overlay from the DOM that was never presented, use the
679
+ * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
677
680
  *
678
681
  * @param data Any data to emit in the dismiss events.
679
682
  * @param role The role of the element that is dismissing the toast.
680
683
  * This can be useful in a button handler for determining which button was
681
684
  * clicked to dismiss the toast.
682
- * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
683
- *
684
- * This is a no-op if the overlay has not been presented yet. If you want
685
- * to remove an overlay from the DOM that was never presented, use the
686
- * [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
685
+ * Some examples include: `"cancel"`, `"destructive"`, `"selected"`, and `"backdrop"`.
687
686
  */
688
687
  async dismiss(data, role) {
689
688
  var _a, _b;
@@ -851,9 +850,9 @@ const Toast = class {
851
850
  if (layout === 'stacked' && startButtons.length > 0 && endButtons.length > 0) {
852
851
  index$1.printIonWarning('[ion-toast] - This toast is using start and end buttons with the stacked toast layout. We recommend following the best practice of using either start or end buttons with the stacked toast layout.', el);
853
852
  }
854
- return (index$1.h(index$1.Host, Object.assign({ key: '425be734aee0eeef281ab1609a9f982ce8b5e852', tabindex: "-1" }, this.htmlAttributes, { style: {
853
+ return (index$1.h(index$1.Host, Object.assign({ key: 'd1ecd90c87700aad4685e230cdd430aa286b8791', tabindex: "-1" }, this.htmlAttributes, { style: {
855
854
  zIndex: `${60000 + this.overlayIndex}`,
856
- }, class: theme.createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, theme.getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), index$1.h("div", { key: '7c3ad1a8df9e21fc30fc179c7edebeabcf3c6874', class: wrapperClass }, index$1.h("div", { key: 'f950c21e8d7bf92653e0bd52e820ed6b84fa8cf5', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (index$1.h("ion-icon", { key: '0266241927dbe16799adb57f9fc11bd5372877b2', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), index$1.h("div", { key: '9ef4b87bad672af6a5b693af61375564daf1eeeb', class: "toast-content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
855
+ }, class: theme.createColorClasses(this.color, Object.assign(Object.assign({ [mode]: true }, theme.getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent })), onIonToastWillDismiss: this.dispatchCancelHandler }), index$1.h("div", { key: '4bfc863417324de69e222054d5cf9c452038b41e', class: wrapperClass }, index$1.h("div", { key: '3417940afec0392e81b7d54c7cb00f3ab6c30d47', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (index$1.h("ion-icon", { key: '6bf878fbc85c01e1e5faa9d97d46255a6511a952', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), index$1.h("div", { key: '54b500348a9c37660c3aff37436d9188e4374947', class: "toast-content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
857
856
  }
858
857
  get el() { return index$1.getElement(this); }
859
858
  static get watchers() { return {