@ionic/core 8.7.18-dev.11769790854.11895f8f → 8.7.18-dev.11770238549.14c2a85f

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 (228) hide show
  1. package/components/ion-item-divider.js +2 -2
  2. package/components/ion-item-group.js +1 -1
  3. package/components/ion-item-option.js +2 -2
  4. package/components/ion-item-options.js +1 -1
  5. package/components/ion-item-sliding.js +1 -1
  6. package/components/ion-loading.js +2 -2
  7. package/components/ion-menu-button.js +2 -2
  8. package/components/ion-menu-toggle.js +2 -2
  9. package/components/ion-menu.js +2 -2
  10. package/components/ion-nav-link.js +1 -1
  11. package/components/ion-nav.js +1 -1
  12. package/components/ion-note.js +2 -2
  13. package/components/ion-picker-legacy.js +2 -2
  14. package/components/ion-progress-bar.js +1 -1
  15. package/components/ion-range.js +3 -3
  16. package/components/ion-refresher-content.js +1 -1
  17. package/components/ion-refresher.js +1 -1
  18. package/components/ion-reorder-group.js +1 -1
  19. package/components/ion-reorder.js +1 -1
  20. package/components/ion-router-link.js +2 -2
  21. package/components/ion-router-outlet.js +1 -1
  22. package/components/ion-row.js +1 -1
  23. package/components/ion-searchbar.js +4 -4
  24. package/components/ion-segment-button.js +2 -2
  25. package/components/ion-segment-content.js +1 -1
  26. package/components/ion-segment-view.js +2 -2
  27. package/components/ion-segment.js +2 -2
  28. package/components/ion-select-option.js +1 -1
  29. package/components/ion-select.js +2 -2
  30. package/components/ion-skeleton-text.js +2 -2
  31. package/components/ion-split-pane.js +2 -2
  32. package/components/ion-tab-bar.js +2 -2
  33. package/components/ion-tab-button.js +2 -2
  34. package/components/ion-tab.js +2 -2
  35. package/components/ion-tabs.js +1 -1
  36. package/components/ion-text.js +2 -2
  37. package/components/ion-textarea.js +2 -2
  38. package/components/ion-thumbnail.js +1 -1
  39. package/components/ion-toast.js +2 -2
  40. package/components/ion-toggle.js +3 -3
  41. package/components/label.js +2 -2
  42. package/components/list-header.js +2 -2
  43. package/components/modal.js +12 -220
  44. package/components/picker-column-option.js +2 -2
  45. package/components/picker-column2.js +2 -2
  46. package/components/popover.js +13 -85
  47. package/components/radio-group.js +1 -1
  48. package/components/radio.js +3 -3
  49. package/components/ripple-effect.js +1 -1
  50. package/components/select-modal.js +1 -1
  51. package/components/select-popover.js +1 -1
  52. package/components/spinner.js +1 -1
  53. package/components/title.js +2 -2
  54. package/components/toolbar.js +2 -2
  55. package/dist/cjs/ion-app_8.cjs.entry.js +5 -5
  56. package/dist/cjs/ion-avatar_3.cjs.entry.js +1 -1
  57. package/dist/cjs/ion-col_3.cjs.entry.js +1 -1
  58. package/dist/cjs/ion-datetime_3.cjs.entry.js +4 -4
  59. package/dist/cjs/ion-item-option_3.cjs.entry.js +4 -4
  60. package/dist/cjs/ion-item_8.cjs.entry.js +11 -11
  61. package/dist/cjs/ion-loading.cjs.entry.js +2 -2
  62. package/dist/cjs/ion-menu_3.cjs.entry.js +6 -6
  63. package/dist/cjs/ion-modal.cjs.entry.js +12 -220
  64. package/dist/cjs/ion-nav_2.cjs.entry.js +2 -2
  65. package/dist/cjs/ion-picker-column-option.cjs.entry.js +2 -2
  66. package/dist/cjs/ion-popover.cjs.entry.js +13 -85
  67. package/dist/cjs/ion-progress-bar.cjs.entry.js +1 -1
  68. package/dist/cjs/ion-radio_2.cjs.entry.js +4 -4
  69. package/dist/cjs/ion-range.cjs.entry.js +3 -3
  70. package/dist/cjs/ion-refresher_2.cjs.entry.js +2 -2
  71. package/dist/cjs/ion-reorder_2.cjs.entry.js +2 -2
  72. package/dist/cjs/ion-ripple-effect.cjs.entry.js +1 -1
  73. package/dist/cjs/ion-route_4.cjs.entry.js +2 -2
  74. package/dist/cjs/ion-searchbar.cjs.entry.js +4 -4
  75. package/dist/cjs/ion-segment-content.cjs.entry.js +1 -1
  76. package/dist/cjs/ion-segment-view.cjs.entry.js +2 -2
  77. package/dist/cjs/ion-segment_2.cjs.entry.js +4 -4
  78. package/dist/cjs/ion-select-modal.cjs.entry.js +1 -1
  79. package/dist/cjs/ion-select_3.cjs.entry.js +4 -4
  80. package/dist/cjs/ion-spinner.cjs.entry.js +1 -1
  81. package/dist/cjs/ion-split-pane.cjs.entry.js +2 -2
  82. package/dist/cjs/ion-tab-bar_2.cjs.entry.js +4 -4
  83. package/dist/cjs/ion-tab_2.cjs.entry.js +3 -3
  84. package/dist/cjs/ion-text.cjs.entry.js +2 -2
  85. package/dist/cjs/ion-textarea.cjs.entry.js +2 -2
  86. package/dist/cjs/ion-toast.cjs.entry.js +2 -2
  87. package/dist/cjs/ion-toggle.cjs.entry.js +3 -3
  88. package/dist/collection/components/item-divider/item-divider.js +2 -2
  89. package/dist/collection/components/item-group/item-group.js +1 -1
  90. package/dist/collection/components/item-option/item-option.js +2 -2
  91. package/dist/collection/components/item-options/item-options.js +1 -1
  92. package/dist/collection/components/item-sliding/item-sliding.js +1 -1
  93. package/dist/collection/components/label/label.js +2 -2
  94. package/dist/collection/components/list-header/list-header.js +2 -2
  95. package/dist/collection/components/loading/loading.js +2 -2
  96. package/dist/collection/components/menu/menu.js +2 -2
  97. package/dist/collection/components/menu-button/menu-button.js +2 -2
  98. package/dist/collection/components/menu-toggle/menu-toggle.js +2 -2
  99. package/dist/collection/components/modal/gestures/sheet.js +1 -3
  100. package/dist/collection/components/modal/gestures/swipe-to-close.js +1 -3
  101. package/dist/collection/components/modal/modal.ios.css +4 -0
  102. package/dist/collection/components/modal/modal.js +7 -215
  103. package/dist/collection/components/modal/modal.md.css +4 -0
  104. package/dist/collection/components/nav/nav.js +1 -1
  105. package/dist/collection/components/nav-link/nav-link.js +1 -1
  106. package/dist/collection/components/note/note.js +2 -2
  107. package/dist/collection/components/picker-column-option/picker-column-option.js +2 -2
  108. package/dist/collection/components/picker-legacy/picker.js +2 -2
  109. package/dist/collection/components/picker-legacy-column/picker-column.js +2 -2
  110. package/dist/collection/components/popover/animations/ios.enter.js +5 -21
  111. package/dist/collection/components/popover/animations/md.enter.js +5 -30
  112. package/dist/collection/components/popover/popover.js +2 -2
  113. package/dist/collection/components/popover/utils.js +1 -32
  114. package/dist/collection/components/progress-bar/progress-bar.js +1 -1
  115. package/dist/collection/components/radio/radio.js +3 -3
  116. package/dist/collection/components/radio-group/radio-group.js +1 -1
  117. package/dist/collection/components/range/range.js +3 -3
  118. package/dist/collection/components/refresher/refresher.js +1 -1
  119. package/dist/collection/components/refresher-content/refresher-content.js +1 -1
  120. package/dist/collection/components/reorder/reorder.js +1 -1
  121. package/dist/collection/components/reorder-group/reorder-group.js +1 -1
  122. package/dist/collection/components/ripple-effect/ripple-effect.js +1 -1
  123. package/dist/collection/components/router-link/router-link.js +2 -2
  124. package/dist/collection/components/router-outlet/router-outlet.js +1 -1
  125. package/dist/collection/components/row/row.js +1 -1
  126. package/dist/collection/components/searchbar/searchbar.js +4 -4
  127. package/dist/collection/components/segment/segment.js +2 -2
  128. package/dist/collection/components/segment-button/segment-button.js +2 -2
  129. package/dist/collection/components/segment-content/segment-content.js +1 -1
  130. package/dist/collection/components/segment-view/segment-view.js +2 -2
  131. package/dist/collection/components/select/select.js +2 -2
  132. package/dist/collection/components/select-modal/select-modal.js +1 -1
  133. package/dist/collection/components/select-option/select-option.js +1 -1
  134. package/dist/collection/components/select-popover/select-popover.js +1 -1
  135. package/dist/collection/components/skeleton-text/skeleton-text.js +2 -2
  136. package/dist/collection/components/spinner/spinner.js +1 -1
  137. package/dist/collection/components/split-pane/split-pane.js +2 -2
  138. package/dist/collection/components/tab/tab.js +2 -2
  139. package/dist/collection/components/tab-bar/tab-bar.js +2 -2
  140. package/dist/collection/components/tab-button/tab-button.js +2 -2
  141. package/dist/collection/components/tabs/tabs.js +1 -1
  142. package/dist/collection/components/text/text.js +2 -2
  143. package/dist/collection/components/textarea/textarea.js +2 -2
  144. package/dist/collection/components/thumbnail/thumbnail.js +1 -1
  145. package/dist/collection/components/title/title.js +2 -2
  146. package/dist/collection/components/toast/toast.js +2 -2
  147. package/dist/collection/components/toggle/toggle.js +3 -3
  148. package/dist/collection/components/toolbar/toolbar.js +2 -2
  149. package/dist/docs.json +1 -1
  150. package/dist/esm/ion-app_8.entry.js +5 -5
  151. package/dist/esm/ion-avatar_3.entry.js +1 -1
  152. package/dist/esm/ion-col_3.entry.js +1 -1
  153. package/dist/esm/ion-datetime_3.entry.js +4 -4
  154. package/dist/esm/ion-item-option_3.entry.js +4 -4
  155. package/dist/esm/ion-item_8.entry.js +11 -11
  156. package/dist/esm/ion-loading.entry.js +2 -2
  157. package/dist/esm/ion-menu_3.entry.js +6 -6
  158. package/dist/esm/ion-modal.entry.js +12 -220
  159. package/dist/esm/ion-nav_2.entry.js +2 -2
  160. package/dist/esm/ion-picker-column-option.entry.js +2 -2
  161. package/dist/esm/ion-popover.entry.js +13 -85
  162. package/dist/esm/ion-progress-bar.entry.js +1 -1
  163. package/dist/esm/ion-radio_2.entry.js +4 -4
  164. package/dist/esm/ion-range.entry.js +3 -3
  165. package/dist/esm/ion-refresher_2.entry.js +2 -2
  166. package/dist/esm/ion-reorder_2.entry.js +2 -2
  167. package/dist/esm/ion-ripple-effect.entry.js +1 -1
  168. package/dist/esm/ion-route_4.entry.js +2 -2
  169. package/dist/esm/ion-searchbar.entry.js +4 -4
  170. package/dist/esm/ion-segment-content.entry.js +1 -1
  171. package/dist/esm/ion-segment-view.entry.js +2 -2
  172. package/dist/esm/ion-segment_2.entry.js +4 -4
  173. package/dist/esm/ion-select-modal.entry.js +1 -1
  174. package/dist/esm/ion-select_3.entry.js +4 -4
  175. package/dist/esm/ion-spinner.entry.js +1 -1
  176. package/dist/esm/ion-split-pane.entry.js +2 -2
  177. package/dist/esm/ion-tab-bar_2.entry.js +4 -4
  178. package/dist/esm/ion-tab_2.entry.js +3 -3
  179. package/dist/esm/ion-text.entry.js +2 -2
  180. package/dist/esm/ion-textarea.entry.js +2 -2
  181. package/dist/esm/ion-toast.entry.js +2 -2
  182. package/dist/esm/ion-toggle.entry.js +3 -3
  183. package/dist/ionic/ionic.esm.js +1 -1
  184. package/dist/ionic/{p-074839fc.entry.js → p-01e27965.entry.js} +1 -1
  185. package/dist/ionic/p-0ca0fe9c.entry.js +4 -0
  186. package/dist/ionic/{p-316c0420.entry.js → p-221a3d8c.entry.js} +1 -1
  187. package/dist/ionic/{p-3a6caca9.entry.js → p-2668188b.entry.js} +1 -1
  188. package/dist/ionic/{p-d3014190.entry.js → p-2bd1ea35.entry.js} +1 -1
  189. package/dist/ionic/{p-a127bee2.entry.js → p-30333874.entry.js} +1 -1
  190. package/dist/ionic/{p-0e8c8a10.entry.js → p-31db96da.entry.js} +1 -1
  191. package/dist/ionic/{p-1647c46c.entry.js → p-363d1209.entry.js} +1 -1
  192. package/dist/ionic/p-3ec563c1.entry.js +4 -0
  193. package/dist/ionic/{p-c19af093.entry.js → p-42db6404.entry.js} +1 -1
  194. package/dist/ionic/{p-db82892c.entry.js → p-46a38cfd.entry.js} +1 -1
  195. package/dist/ionic/{p-eb024a5b.entry.js → p-4eec1a5e.entry.js} +1 -1
  196. package/dist/ionic/{p-0dfa5a37.entry.js → p-530fcd71.entry.js} +1 -1
  197. package/dist/ionic/{p-72c38b88.entry.js → p-5c8f7253.entry.js} +1 -1
  198. package/dist/ionic/{p-172a579f.entry.js → p-5d6fb6e3.entry.js} +1 -1
  199. package/dist/ionic/{p-dbbe606a.entry.js → p-652318c3.entry.js} +1 -1
  200. package/dist/ionic/{p-2a939845.entry.js → p-6f37536a.entry.js} +1 -1
  201. package/dist/ionic/{p-4e41ea20.entry.js → p-72af946b.entry.js} +1 -1
  202. package/dist/ionic/p-7f98e710.entry.js +4 -0
  203. package/dist/ionic/{p-6d070558.entry.js → p-82d5bb3d.entry.js} +1 -1
  204. package/dist/ionic/p-906bb44d.entry.js +4 -0
  205. package/dist/ionic/{p-2dbb90cb.entry.js → p-97eb0812.entry.js} +1 -1
  206. package/dist/ionic/{p-31f7095f.entry.js → p-a4a9f5ae.entry.js} +1 -1
  207. package/dist/ionic/{p-86f53961.entry.js → p-b8551510.entry.js} +1 -1
  208. package/dist/ionic/p-bc293244.entry.js +4 -0
  209. package/dist/ionic/{p-d126e8d3.entry.js → p-bce86e56.entry.js} +1 -1
  210. package/dist/ionic/{p-02d76786.entry.js → p-be263062.entry.js} +1 -1
  211. package/dist/ionic/{p-639dd543.entry.js → p-c175d792.entry.js} +1 -1
  212. package/dist/ionic/{p-020af078.entry.js → p-cc2a9936.entry.js} +1 -1
  213. package/dist/ionic/{p-1ccd6829.entry.js → p-e338f669.entry.js} +1 -1
  214. package/dist/ionic/{p-6241ce47.entry.js → p-eaf3f5ff.entry.js} +1 -1
  215. package/dist/ionic/{p-f8f22cc0.entry.js → p-fb0271ae.entry.js} +1 -1
  216. package/dist/ionic/{p-370e4237.entry.js → p-fbb00634.entry.js} +1 -1
  217. package/dist/types/components/modal/gestures/sheet.d.ts +1 -1
  218. package/dist/types/components/modal/gestures/swipe-to-close.d.ts +1 -1
  219. package/dist/types/components/modal/modal.d.ts +0 -47
  220. package/dist/types/components/popover/utils.d.ts +0 -2
  221. package/hydrate/index.js +112 -392
  222. package/hydrate/index.mjs +112 -392
  223. package/package.json +2 -4
  224. package/dist/ionic/p-51a60e0f.entry.js +0 -4
  225. package/dist/ionic/p-94de5cfa.entry.js +0 -4
  226. package/dist/ionic/p-dd1aef77.entry.js +0 -4
  227. package/dist/ionic/p-ec9ca3fe.entry.js +0 -4
  228. package/dist/ionic/p-ef4256eb.entry.js +0 -4
@@ -31,10 +31,10 @@ export class MenuToggle {
31
31
  render() {
32
32
  const mode = getIonMode(this);
33
33
  const hidden = this.autoHide && !this.visible;
34
- return (h(Host, { key: 'cd567114769a30bd3871ed5d15bf42aed39956e1', onClick: this.onClick, "aria-hidden": hidden ? 'true' : null, class: {
34
+ return (h(Host, { key: '55135952f3a42cb5d21916dfb7b169d894b381e3', onClick: this.onClick, "aria-hidden": hidden ? 'true' : null, class: {
35
35
  [mode]: true,
36
36
  'menu-toggle-hidden': hidden,
37
- } }, h("slot", { key: '773d4cff95ca75f23578b1e1dca53c9933f28a33' })));
37
+ } }, h("slot", { key: 'e8ecb59a6ec075b07e2a1b8fcdf7df3dd9975a03' })));
38
38
  }
39
39
  static get is() { return "ion-menu-toggle"; }
40
40
  static get encapsulation() { return "shadow"; }
@@ -7,7 +7,7 @@ import { clamp, getElementRoot, raf } from "../../../utils/helpers";
7
7
  import { FOCUS_TRAP_DISABLE_CLASS } from "../../../utils/overlays";
8
8
  import { getBackdropValueForSheet } from "../utils";
9
9
  import { calculateSpringStep, handleCanDismiss } from "./utils";
10
- export const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, animation, breakpoints = [], expandToScroll, getCurrentBreakpoint, onDismiss, onBreakpointChange, onGestureMove) => {
10
+ export const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, animation, breakpoints = [], expandToScroll, getCurrentBreakpoint, onDismiss, onBreakpointChange) => {
11
11
  // Defaults for the sheet swipe animation
12
12
  const defaultBackdrop = [
13
13
  { offset: 0, opacity: 'var(--backdrop-opacity)' },
@@ -338,8 +338,6 @@ export const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpo
338
338
  : step;
339
339
  offset = clamp(0.0001, processedStep, maxStep);
340
340
  animation.progressStep(offset);
341
- // Notify modal of position change for safe-area updates
342
- onGestureMove === null || onGestureMove === void 0 ? void 0 : onGestureMove();
343
341
  };
344
342
  const onEnd = (detail) => {
345
343
  /**
@@ -12,7 +12,7 @@ import { calculateSpringStep, handleCanDismiss } from "./utils";
12
12
  export const SwipeToCloseDefaults = {
13
13
  MIN_PRESENTING_SCALE: 0.915,
14
14
  };
15
- export const createSwipeToCloseGesture = (el, animation, statusBarStyle, onDismiss, onGestureMove) => {
15
+ export const createSwipeToCloseGesture = (el, animation, statusBarStyle, onDismiss) => {
16
16
  /**
17
17
  * The step value at which a card modal
18
18
  * is eligible for dismissing via gesture.
@@ -169,8 +169,6 @@ export const createSwipeToCloseGesture = (el, animation, statusBarStyle, onDismi
169
169
  const processedStep = isAttemptingDismissWithCanDismiss ? calculateSpringStep(step / maxStep) : step;
170
170
  const clampedStep = clamp(0.0001, processedStep, maxStep);
171
171
  animation.progressStep(clampedStep);
172
- // Notify modal of position change for safe-area updates
173
- onGestureMove === null || onGestureMove === void 0 ? void 0 : onGestureMove();
174
172
  /**
175
173
  * When swiping down half way, the status bar style
176
174
  * should be reset to its default value.
@@ -135,6 +135,10 @@ ion-backdrop {
135
135
  :host {
136
136
  --width: 600px;
137
137
  --height: 500px;
138
+ --ion-safe-area-top: 0px;
139
+ --ion-safe-area-bottom: 0px;
140
+ --ion-safe-area-right: 0px;
141
+ --ion-safe-area-left: 0px;
138
142
  }
139
143
  }
140
144
  @media only screen and (min-width: 768px) and (min-height: 768px) {
@@ -2,7 +2,6 @@
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
4
  import { Host, h, writeTask } from "@stencil/core";
5
- import { win } from "../../utils/browser/index";
6
5
  import { findIonContent, printIonContentErrorMsg } from "../../utils/content/index";
7
6
  import { CoreDelegate, attachComponent, detachComponent } from "../../utils/framework-delegate";
8
7
  import { raf, inheritAttributes, hasLazyBuild, getElementRoot } from "../../utils/helpers";
@@ -43,10 +42,6 @@ export class Modal {
43
42
  this.inline = false;
44
43
  // Whether or not modal is being dismissed via gesture
45
44
  this.gestureAnimationDismissing = false;
46
- // Whether to skip coordinate-based safe-area detection (for fullscreen phone modals)
47
- this.skipSafeAreaCoordinateDetection = false;
48
- // Track previous safe-area state to avoid redundant DOM writes
49
- this.prevSafeAreaState = { top: false, bottom: false, left: false, right: false };
50
45
  this.presented = false;
51
46
  /** @internal */
52
47
  this.hasController = false;
@@ -237,10 +232,7 @@ export class Modal {
237
232
  }
238
233
  }
239
234
  onWindowResize() {
240
- // Invalidate safe-area cache on resize (device rotation may change values)
241
- this.cachedSafeAreas = undefined;
242
- this.updateSafeAreaOverrides();
243
- // Only handle view transition for iOS card modals when no custom animations are provided
235
+ // Only handle resize for iOS card modals when no custom animations are provided
244
236
  if (getIonMode(this) !== 'ios' || !this.presentingElement || this.enterAnimation || this.leaveAnimation) {
245
237
  return;
246
238
  }
@@ -263,8 +255,6 @@ export class Modal {
263
255
  this.triggerController.removeClickListener();
264
256
  this.cleanupViewTransitionListener();
265
257
  this.cleanupParentRemovalObserver();
266
- // Reset safe-area state to handle removal without dismiss (e.g., framework unmount)
267
- this.resetSafeAreaState();
268
258
  }
269
259
  componentWillLoad() {
270
260
  var _a;
@@ -424,8 +414,6 @@ export class Modal {
424
414
  else if (!this.keepContentsMounted) {
425
415
  await waitForMount();
426
416
  }
427
- // Predict safe-area needs based on modal configuration to avoid visual snap
428
- this.setInitialSafeAreaOverrides(presentingElement);
429
417
  writeTask(() => this.el.classList.add('show-modal'));
430
418
  const hasCardModal = presentingElement !== undefined;
431
419
  /**
@@ -487,8 +475,6 @@ export class Modal {
487
475
  else if (hasCardModal) {
488
476
  this.initSwipeToClose();
489
477
  }
490
- // Now that animation is complete, update safe-area based on actual position
491
- this.updateSafeAreaOverrides();
492
478
  // Initialize view transition listener for iOS card modals
493
479
  this.initViewTransitionListener();
494
480
  // Initialize parent removal observer
@@ -540,7 +526,7 @@ export class Modal {
540
526
  await this.dismiss(undefined, GESTURE);
541
527
  this.gestureAnimationDismissing = false;
542
528
  });
543
- }, () => this.updateSafeAreaOverrides());
529
+ });
544
530
  this.gesture.enable(true);
545
531
  }
546
532
  initSheetGesture() {
@@ -561,8 +547,7 @@ export class Modal {
561
547
  this.currentBreakpoint = breakpoint;
562
548
  this.ionBreakpointDidChange.emit({ breakpoint });
563
549
  }
564
- this.updateSafeAreaOverrides();
565
- }, () => this.updateSafeAreaOverrides());
550
+ });
566
551
  this.gesture = gesture;
567
552
  this.moveSheetToBreakpoint = moveSheetToBreakpoint;
568
553
  this.gesture.enable(true);
@@ -640,197 +625,6 @@ export class Modal {
640
625
  // Clear the cached reference
641
626
  this.cachedPageParent = undefined;
642
627
  }
643
- /**
644
- * Sets initial safe-area overrides based on modal configuration before
645
- * the modal becomes visible. This predicts whether the modal will touch
646
- * screen edges to avoid a visual snap after animation completes.
647
- */
648
- setInitialSafeAreaOverrides(presentingElement) {
649
- const style = this.el.style;
650
- const mode = getIonMode(this);
651
- const isSheetModal = this.breakpoints !== undefined && this.initialBreakpoint !== undefined;
652
- // Card modals only exist in iOS mode - in MD mode, presentingElement is ignored
653
- const isCardModal = presentingElement !== undefined && mode === 'ios';
654
- const isTablet = window.innerWidth >= 768;
655
- // Sheet modals always touch bottom edge, never top/left/right
656
- if (isSheetModal) {
657
- style.setProperty('--ion-safe-area-top', '0px');
658
- style.setProperty('--ion-safe-area-left', '0px');
659
- style.setProperty('--ion-safe-area-right', '0px');
660
- return;
661
- }
662
- // Card modals have rounded top corners
663
- if (isCardModal) {
664
- style.setProperty('--ion-safe-area-top', '0px');
665
- if (isTablet) {
666
- // On tablets, card modals are inset from all edges
667
- this.zeroAllSafeAreas();
668
- }
669
- else {
670
- // On phones, card modals still extend to the bottom edge
671
- style.setProperty('--ion-safe-area-left', '0px');
672
- style.setProperty('--ion-safe-area-right', '0px');
673
- this.applyFullscreenSafeArea();
674
- }
675
- return;
676
- }
677
- // Check if modal is fullscreen via CSS custom properties
678
- // This applies to both phone and tablet sizes - custom modals may have
679
- // non-fullscreen dimensions even on phones (e.g., --height: 70%)
680
- const computedStyle = getComputedStyle(this.el);
681
- const width = computedStyle.getPropertyValue('--width').trim();
682
- const height = computedStyle.getPropertyValue('--height').trim();
683
- const isFullscreen = width === '100%' && height === '100%';
684
- if (isFullscreen) {
685
- this.applyFullscreenSafeArea();
686
- }
687
- else if (isTablet) {
688
- // Centered dialog on tablet doesn't touch edges
689
- this.zeroAllSafeAreas();
690
- }
691
- else {
692
- // Non-fullscreen modal on phone - use coordinate-based detection
693
- // to determine which edges it touches (e.g., bottom-aligned custom modals)
694
- }
695
- }
696
- /**
697
- * Applies safe-area handling for fullscreen modals.
698
- * Adds wrapper padding when no footer is present to prevent
699
- * content from overlapping system navigation areas.
700
- */
701
- applyFullscreenSafeArea() {
702
- this.skipSafeAreaCoordinateDetection = true;
703
- this.updateFooterPadding();
704
- // Watch for dynamic footer additions/removals (e.g., async data loading)
705
- // Use subtree:true to support wrapped footers in framework components
706
- // (e.g., <my-footer><ion-footer>...</ion-footer></my-footer>)
707
- if (!this.footerObserver && win !== undefined && 'MutationObserver' in win) {
708
- this.footerObserver = new MutationObserver(() => this.updateFooterPadding());
709
- this.footerObserver.observe(this.el, { childList: true, subtree: true });
710
- }
711
- }
712
- /**
713
- * Updates wrapper and shadow padding based on footer presence.
714
- * Called initially and when footer is dynamically added/removed.
715
- * Both elements must be styled identically to prevent visual mismatches.
716
- */
717
- updateFooterPadding() {
718
- if (!this.wrapperEl)
719
- return;
720
- const hasFooter = this.el.querySelector('ion-footer') !== null;
721
- // Apply to both wrapper and shadow to keep them in sync
722
- const elements = [this.wrapperEl, this.shadowEl].filter(Boolean);
723
- if (hasFooter) {
724
- elements.forEach((el) => {
725
- el.style.removeProperty('padding-bottom');
726
- el.style.removeProperty('box-sizing');
727
- });
728
- }
729
- else {
730
- elements.forEach((el) => {
731
- el.style.setProperty('padding-bottom', 'var(--ion-safe-area-bottom, 0px)');
732
- el.style.setProperty('box-sizing', 'border-box');
733
- });
734
- }
735
- }
736
- /**
737
- * Sets all safe-area CSS variables to 0px for modals that
738
- * don't touch screen edges.
739
- */
740
- zeroAllSafeAreas() {
741
- const style = this.el.style;
742
- style.setProperty('--ion-safe-area-top', '0px');
743
- style.setProperty('--ion-safe-area-bottom', '0px');
744
- style.setProperty('--ion-safe-area-left', '0px');
745
- style.setProperty('--ion-safe-area-right', '0px');
746
- }
747
- /**
748
- * Resets all safe-area related state and styles.
749
- * Called during dismiss and disconnectedCallback to ensure clean state
750
- * for re-presentation of inline modals.
751
- */
752
- resetSafeAreaState() {
753
- var _a;
754
- this.skipSafeAreaCoordinateDetection = false;
755
- this.cachedSafeAreas = undefined;
756
- this.prevSafeAreaState = { top: false, bottom: false, left: false, right: false };
757
- (_a = this.footerObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
758
- this.footerObserver = undefined;
759
- // Clear wrapper and shadow styles that may have been set for safe-area handling
760
- [this.wrapperEl, this.shadowEl].forEach((el) => {
761
- if (el) {
762
- el.style.removeProperty('padding-bottom');
763
- el.style.removeProperty('box-sizing');
764
- }
765
- });
766
- // Clear safe-area CSS variable overrides
767
- const style = this.el.style;
768
- style.removeProperty('--ion-safe-area-top');
769
- style.removeProperty('--ion-safe-area-bottom');
770
- style.removeProperty('--ion-safe-area-left');
771
- style.removeProperty('--ion-safe-area-right');
772
- }
773
- /**
774
- * Gets the root safe-area values from the document element.
775
- * Uses cached values during gestures to avoid getComputedStyle calls.
776
- */
777
- getSafeAreaValues() {
778
- if (!this.cachedSafeAreas) {
779
- const rootStyle = getComputedStyle(document.documentElement);
780
- this.cachedSafeAreas = {
781
- top: parseFloat(rootStyle.getPropertyValue('--ion-safe-area-top')) || 0,
782
- bottom: parseFloat(rootStyle.getPropertyValue('--ion-safe-area-bottom')) || 0,
783
- left: parseFloat(rootStyle.getPropertyValue('--ion-safe-area-left')) || 0,
784
- right: parseFloat(rootStyle.getPropertyValue('--ion-safe-area-right')) || 0,
785
- };
786
- }
787
- return this.cachedSafeAreas;
788
- }
789
- /**
790
- * Updates safe-area CSS variable overrides based on whether the modal
791
- * extends into each safe-area region. Called after animation
792
- * and during gestures to handle dynamic position changes.
793
- *
794
- * Optimized to avoid redundant DOM writes by tracking previous state.
795
- */
796
- updateSafeAreaOverrides() {
797
- if (this.skipSafeAreaCoordinateDetection) {
798
- return;
799
- }
800
- const wrapper = this.wrapperEl;
801
- if (!wrapper) {
802
- return;
803
- }
804
- const rect = wrapper.getBoundingClientRect();
805
- const safeAreas = this.getSafeAreaValues();
806
- const extendsIntoTop = rect.top < safeAreas.top;
807
- const extendsIntoBottom = rect.bottom > window.innerHeight - safeAreas.bottom;
808
- const extendsIntoLeft = rect.left < safeAreas.left;
809
- const extendsIntoRight = rect.right > window.innerWidth - safeAreas.right;
810
- // Only update DOM when state actually changes
811
- const prev = this.prevSafeAreaState;
812
- const style = this.el.style;
813
- if (extendsIntoTop !== prev.top) {
814
- extendsIntoTop ? style.removeProperty('--ion-safe-area-top') : style.setProperty('--ion-safe-area-top', '0px');
815
- prev.top = extendsIntoTop;
816
- }
817
- if (extendsIntoBottom !== prev.bottom) {
818
- extendsIntoBottom
819
- ? style.removeProperty('--ion-safe-area-bottom')
820
- : style.setProperty('--ion-safe-area-bottom', '0px');
821
- prev.bottom = extendsIntoBottom;
822
- }
823
- if (extendsIntoLeft !== prev.left) {
824
- extendsIntoLeft ? style.removeProperty('--ion-safe-area-left') : style.setProperty('--ion-safe-area-left', '0px');
825
- prev.left = extendsIntoLeft;
826
- }
827
- if (extendsIntoRight !== prev.right) {
828
- extendsIntoRight
829
- ? style.removeProperty('--ion-safe-area-right')
830
- : style.setProperty('--ion-safe-area-right', '0px');
831
- prev.right = extendsIntoRight;
832
- }
833
- }
834
628
  sheetOnDismiss() {
835
629
  /**
836
630
  * While the gesture animation is finishing
@@ -923,8 +717,6 @@ export class Modal {
923
717
  }
924
718
  this.currentBreakpoint = undefined;
925
719
  this.animation = undefined;
926
- // Reset safe-area state for potential re-presentation
927
- this.resetSafeAreaState();
928
720
  unlock();
929
721
  return dismissed;
930
722
  }
@@ -1182,20 +974,20 @@ export class Modal {
1182
974
  const isCardModal = presentingElement !== undefined && mode === 'ios';
1183
975
  const isHandleCycle = handleBehavior === 'cycle';
1184
976
  const isSheetModalWithHandle = isSheetModal && showHandle;
1185
- return (h(Host, Object.assign({ key: '8f42c71ec9c9270b4218ca7eec57ca998871ac07', "no-router": true,
977
+ return (h(Host, Object.assign({ key: '978ba9cc81464b2d9b4caaf36285d5f7bf7e568d', "no-router": true,
1186
978
  // Allow the modal to be navigable when the handle is focusable
1187
979
  tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
1188
980
  zIndex: `${20000 + this.overlayIndex}`,
1189
- }, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), h("ion-backdrop", { key: '2f7b08b019c66cbfceacafa9a68b91f8da1f4084', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && h("div", { key: '6b0d1ae90e8483332f74371be5dcbd0a7b2661ba', class: "modal-shadow", ref: (el) => (this.shadowEl = el) }), h("div", Object.assign({ key: 'c96f671fb25e5de45231ea65ac52500547b2e262',
981
+ }, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), h("ion-backdrop", { key: '9f95566d8e0c06bb9607f514484848c250f35f1f', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && h("div", { key: '91ff26d4f3ab4367f3a2940f51c6a5a3d4c972c3', class: "modal-shadow" }), h("div", Object.assign({ key: '064b2dba13854505a4eb1f5e54296ac79cb7a2bd',
1190
982
  /*
1191
983
  role and aria-modal must be used on the
1192
984
  same element. They must also be set inside the
1193
985
  shadow DOM otherwise ion-button will not be highlighted
1194
986
  when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
1195
987
  */
1196
- role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { key: 'e07419b01a588c0ba62ed9607c843cac7bd26337', class: "modal-handle",
988
+ role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (h("button", { key: 'b579b08b114022032d078a527111456ceefc7b35', class: "modal-handle",
1197
989
  // Prevents the handle from receiving keyboard focus when it does not cycle
1198
- tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle", ref: (el) => (this.dragHandleEl = el) })), h("slot", { key: '65f35079df8eb8b6cd262e3a08297866715ce7ea', onSlotchange: this.onSlotChange }))));
990
+ tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle", ref: (el) => (this.dragHandleEl = el) })), h("slot", { key: 'dacea58475b72d9c0209934ff31f3be6b9ac8c85', onSlotchange: this.onSlotChange }))));
1199
991
  }
1200
992
  static get is() { return "ion-modal"; }
1201
993
  static get encapsulation() { return "shadow"; }
@@ -135,6 +135,10 @@ ion-backdrop {
135
135
  :host {
136
136
  --width: 600px;
137
137
  --height: 500px;
138
+ --ion-safe-area-top: 0px;
139
+ --ion-safe-area-bottom: 0px;
140
+ --ion-safe-area-right: 0px;
141
+ --ion-safe-area-left: 0px;
138
142
  }
139
143
  }
140
144
  @media only screen and (min-width: 768px) and (min-height: 768px) {
@@ -828,7 +828,7 @@ export class Nav {
828
828
  }
829
829
  }
830
830
  render() {
831
- return h("slot", { key: '8067c9835d255daec61f33dba200fd3a6ff839a0' });
831
+ return h("slot", { key: 'a549286b51b1bb23c9ef51f71148452228d0ab14' });
832
832
  }
833
833
  static get is() { return "ion-nav"; }
834
834
  static get encapsulation() { return "shadow"; }
@@ -14,7 +14,7 @@ export class NavLink {
14
14
  };
15
15
  }
16
16
  render() {
17
- return h(Host, { key: '6dbb1ad4f351e9215375aac11ab9b53762e07a08', onClick: this.onClick });
17
+ return h(Host, { key: 'd4d80feb51c0d92b0bedf6952c892f9df3002046', onClick: this.onClick });
18
18
  }
19
19
  static get is() { return "ion-nav-link"; }
20
20
  static get properties() {
@@ -10,9 +10,9 @@ import { getIonMode } from "../../global/ionic-global";
10
10
  export class Note {
11
11
  render() {
12
12
  const mode = getIonMode(this);
13
- return (h(Host, { key: '0ec2ef7367d867fd7588611953f696eecdf3221e', class: createColorClasses(this.color, {
13
+ return (h(Host, { key: 'b86a6acc9274df6528d224d4c11ab826a0f84dbc', class: createColorClasses(this.color, {
14
14
  [mode]: true,
15
- }) }, h("slot", { key: 'a200b94ddffb29cf6dabe6e984220930ea7efdef' })));
15
+ }) }, h("slot", { key: '5de76567ed7713827cd277a42db102faf34190c8' })));
16
16
  }
17
17
  static get is() { return "ion-note"; }
18
18
  static get encapsulation() { return "shadow"; }
@@ -91,10 +91,10 @@ export class PickerColumnOption {
91
91
  render() {
92
92
  const { color, disabled, ariaLabel } = this;
93
93
  const mode = getIonMode(this);
94
- return (h(Host, { key: 'f816729941aabcb31ddfdce3ffe2e2139030d715', class: createColorClasses(color, {
94
+ return (h(Host, { key: 'c45a1c14a351bf57d7113671164852349be5aa8a', class: createColorClasses(color, {
95
95
  [mode]: true,
96
96
  ['option-disabled']: disabled,
97
- }) }, h("div", { key: 'd942de84fd14d7dc06b1e5cf4f7920d1dc3c6371', class: 'picker-column-option-button', role: "button", "aria-label": ariaLabel, onClick: () => this.onClick() }, h("slot", { key: 'b0df5717b42209e649097209a01476e1a66f5c5c' }))));
97
+ }) }, h("div", { key: '824930b658c6e3fb493ac4c6c2451d38c6bc4829', class: 'picker-column-option-button', role: "button", "aria-label": ariaLabel, onClick: () => this.onClick() }, h("slot", { key: '019df4dcf46e629bdbebcd46ed3ab29669feab27' }))));
98
98
  }
99
99
  static get is() { return "ion-picker-column-option"; }
100
100
  static get encapsulation() { return "shadow"; }
@@ -207,11 +207,11 @@ export class Picker {
207
207
  render() {
208
208
  const { htmlAttributes } = this;
209
209
  const mode = getIonMode(this);
210
- return (h(Host, Object.assign({ key: 'b95440747eb80cba23ae676d399d5e5816722c58', "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
210
+ return (h(Host, Object.assign({ key: '80f66d33780d8a1352d24be9cb63a0cc03d01ab5', "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
211
211
  zIndex: `${20000 + this.overlayIndex}`,
212
212
  }, class: Object.assign({ [mode]: true,
213
213
  // Used internally for styling
214
- [`picker-${mode}`]: true, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }), h("ion-backdrop", { key: '169d1c83ef40e7fcb134219a585298b403a70b0f', visible: this.showBackdrop, tappable: this.backdropDismiss }), h("div", { key: '98518e5f5cea2dfb8dfa63d9545e9ae3a5765023', tabindex: "0", "aria-hidden": "true" }), h("div", { key: '151755ab8eb23f9adafbfe201349398f5a69dee7', class: "picker-wrapper ion-overlay-wrapper", role: "dialog" }, h("div", { key: '5dcf93b2f4fe8f4fce7c7aec8f85ef45a03ef470', class: "picker-toolbar" }, this.buttons.map((b) => (h("div", { class: buttonWrapperClass(b) }, h("button", { type: "button", onClick: () => this.buttonClick(b), class: buttonClass(b) }, b.text))))), h("div", { key: 'fd5d66708edd38adc5a4d2fad7298969398a05e3', class: "picker-columns" }, h("div", { key: '1b5830fd6cef1016af7736792c514965d6cb38a8', class: "picker-above-highlight" }), this.presented && this.columns.map((c) => h("ion-picker-legacy-column", { col: c })), h("div", { key: 'c6edeca7afd69e13c9c66ba36f261974fd0f8f78', class: "picker-below-highlight" }))), h("div", { key: 'e2a4b24710e30579b14b82dbfd3761b2187797b5', tabindex: "0", "aria-hidden": "true" })));
214
+ [`picker-${mode}`]: true, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }), h("ion-backdrop", { key: '97fb8e10ba08b197610cb8c0cdea61103883d55f', visible: this.showBackdrop, tappable: this.backdropDismiss }), h("div", { key: 'b3969cb6fbf7153623d14e3ca1493d3370efb211', tabindex: "0", "aria-hidden": "true" }), h("div", { key: '299268483c3727e698d9135bfdf40349a7050ac1', class: "picker-wrapper ion-overlay-wrapper", role: "dialog" }, h("div", { key: '95394de3ef691899b7dbf416f56fd3e86bbdce3f', class: "picker-toolbar" }, this.buttons.map((b) => (h("div", { class: buttonWrapperClass(b) }, h("button", { type: "button", onClick: () => this.buttonClick(b), class: buttonClass(b) }, b.text))))), h("div", { key: '05f18bb8d00dc0e22f691b7e41f90f729a6c66d7', class: "picker-columns" }, h("div", { key: '4a8fdf224effc0af67fd413e2e6aca8a78d1cf43', class: "picker-above-highlight" }), this.presented && this.columns.map((c) => h("ion-picker-legacy-column", { col: c })), h("div", { key: 'e50a31db45e3f39e9d0fed36a21be9257eec09bf', class: "picker-below-highlight" }))), h("div", { key: '5a78cb2176ac807ea0c195c6b76cd0e8eef9d4c0', tabindex: "0", "aria-hidden": "true" })));
215
215
  }
216
216
  static get is() { return "ion-picker-legacy"; }
217
217
  static get encapsulation() { return "scoped"; }
@@ -335,9 +335,9 @@ export class PickerColumnCmp {
335
335
  render() {
336
336
  const col = this.col;
337
337
  const mode = getIonMode(this);
338
- return (h(Host, { key: 'ed32d108dd94f0302fb453c31a3497ebae65ec37', class: Object.assign({ [mode]: true, 'picker-col': true, 'picker-opts-left': this.col.align === 'left', 'picker-opts-right': this.col.align === 'right' }, getClassMap(col.cssClass)), style: {
338
+ return (h(Host, { key: '86125e95f18837dfd021db01777d72a1562d8ee3', class: Object.assign({ [mode]: true, 'picker-col': true, 'picker-opts-left': this.col.align === 'left', 'picker-opts-right': this.col.align === 'right' }, getClassMap(col.cssClass)), style: {
339
339
  'max-width': this.col.columnWidth,
340
- } }, col.prefix && (h("div", { key: '9f0634890e66fd4ae74f826d1eea3431de121393', class: "picker-prefix", style: { width: col.prefixWidth } }, col.prefix)), h("div", { key: '337e996e5be91af16446085fe22436f213b771eb', class: "picker-opts", style: { maxWidth: col.optionsWidth }, ref: (el) => (this.optsEl = el) }, col.options.map((o, index) => (h("button", { "aria-label": o.ariaLabel, class: { 'picker-opt': true, 'picker-opt-disabled': !!o.disabled }, "opt-index": index }, o.text)))), col.suffix && (h("div", { key: 'd69a132599d78d9e5107f12228978cfce4e43098', class: "picker-suffix", style: { width: col.suffixWidth } }, col.suffix))));
340
+ } }, col.prefix && (h("div", { key: 'b0f3d39e0bd128781066ffefb7a1e40d12a9e76d', class: "picker-prefix", style: { width: col.prefixWidth } }, col.prefix)), h("div", { key: '0b106ac4d56916eaaa7f09d1b68348b3754b7bba', class: "picker-opts", style: { maxWidth: col.optionsWidth }, ref: (el) => (this.optsEl = el) }, col.options.map((o, index) => (h("button", { "aria-label": o.ariaLabel, class: { 'picker-opt': true, 'picker-opt-disabled': !!o.disabled }, "opt-index": index }, o.text)))), col.suffix && (h("div", { key: '00ff2f9dbb4561787e5a5223327c6a2a33f8362e', class: "picker-suffix", style: { width: col.suffixWidth } }, col.suffix))));
341
341
  }
342
342
  static get is() { return "ion-picker-legacy-column"; }
343
343
  static get originalStyleUrls() {
@@ -31,7 +31,7 @@ export const iosEnterAnimation = (baseEl, opts) => {
31
31
  const results = getPopoverPosition(isRTL, contentWidth, contentHeight, arrowWidth, arrowHeight, reference, side, align, defaultPosition, trigger, ev);
32
32
  const padding = size === 'cover' ? 0 : POPOVER_IOS_BODY_PADDING;
33
33
  const margin = size === 'cover' ? 0 : 25;
34
- const { originX, originY, top, left, bottom, checkSafeAreaTop, checkSafeAreaBottom, checkSafeAreaLeft, checkSafeAreaRight, arrowTop, arrowLeft, addPopoverBottomClass, } = calculateWindowAdjustment(side, results.top, results.left, padding, bodyWidth, bodyHeight, contentWidth, contentHeight, margin, results.originX, results.originY, results.referenceCoordinates, results.arrowTop, results.arrowLeft, arrowHeight);
34
+ const { originX, originY, top, left, bottom, checkSafeAreaLeft, checkSafeAreaRight, arrowTop, arrowLeft, addPopoverBottomClass, } = calculateWindowAdjustment(side, results.top, results.left, padding, bodyWidth, bodyHeight, contentWidth, contentHeight, margin, results.originX, results.originY, results.referenceCoordinates, results.arrowTop, results.arrowLeft, arrowHeight);
35
35
  const baseAnimation = createAnimation();
36
36
  const backdropAnimation = createAnimation();
37
37
  const contentAnimation = createAnimation();
@@ -61,35 +61,19 @@ export const iosEnterAnimation = (baseEl, opts) => {
61
61
  if (addPopoverBottomClass) {
62
62
  baseEl.classList.add('popover-bottom');
63
63
  }
64
- /**
65
- * Safe area CSS variable adjustments.
66
- * When the popover is positioned near an edge, we add the corresponding
67
- * safe-area inset to ensure the popover doesn't overlap with system UI
68
- * (status bars, home indicators, navigation bars on Android API 36+, etc.)
69
- */
70
- const safeAreaTop = ' + var(--ion-safe-area-top, 0)';
71
- const safeAreaBottom = ' + var(--ion-safe-area-bottom, 0)';
64
+ if (bottom !== undefined) {
65
+ contentEl.style.setProperty('bottom', `${bottom}px`);
66
+ }
72
67
  const safeAreaLeft = ' + var(--ion-safe-area-left, 0)';
73
68
  const safeAreaRight = ' - var(--ion-safe-area-right, 0)';
74
- let topValue = `${top}px`;
75
- let bottomValue = bottom !== undefined ? `${bottom}px` : undefined;
76
69
  let leftValue = `${left}px`;
77
- if (checkSafeAreaTop) {
78
- topValue = `${top}px${safeAreaTop}`;
79
- }
80
- if (checkSafeAreaBottom && bottomValue !== undefined) {
81
- bottomValue = `${bottom}px${safeAreaBottom}`;
82
- }
83
70
  if (checkSafeAreaLeft) {
84
71
  leftValue = `${left}px${safeAreaLeft}`;
85
72
  }
86
73
  if (checkSafeAreaRight) {
87
74
  leftValue = `${left}px${safeAreaRight}`;
88
75
  }
89
- if (bottomValue !== undefined) {
90
- contentEl.style.setProperty('bottom', `calc(${bottomValue})`);
91
- }
92
- contentEl.style.setProperty('top', `calc(${topValue} + var(--offset-y, 0))`);
76
+ contentEl.style.setProperty('top', `calc(${top}px + var(--offset-y, 0))`);
93
77
  contentEl.style.setProperty('left', `calc(${leftValue} + var(--offset-x, 0))`);
94
78
  contentEl.style.setProperty('transform-origin', `${originY} ${originX}`);
95
79
  if (arrowEl !== null) {
@@ -28,32 +28,7 @@ export const mdEnterAnimation = (baseEl, opts) => {
28
28
  };
29
29
  const results = getPopoverPosition(isRTL, contentWidth, contentHeight, 0, 0, reference, side, align, defaultPosition, trigger, ev);
30
30
  const padding = size === 'cover' ? 0 : POPOVER_MD_BODY_PADDING;
31
- const { originX, originY, top, left, bottom, checkSafeAreaTop, checkSafeAreaBottom, checkSafeAreaLeft, checkSafeAreaRight, } = calculateWindowAdjustment(side, results.top, results.left, padding, bodyWidth, bodyHeight, contentWidth, contentHeight, 0, results.originX, results.originY, results.referenceCoordinates);
32
- /**
33
- * Safe area CSS variable adjustments.
34
- * When the popover is positioned near an edge, we add the corresponding
35
- * safe-area inset to ensure the popover doesn't overlap with system UI
36
- * (status bars, home indicators, navigation bars on Android API 36+, etc.)
37
- */
38
- const safeAreaTop = ' + var(--ion-safe-area-top, 0)';
39
- const safeAreaBottom = ' + var(--ion-safe-area-bottom, 0)';
40
- const safeAreaLeft = ' + var(--ion-safe-area-left, 0)';
41
- const safeAreaRight = ' - var(--ion-safe-area-right, 0)';
42
- let topValue = `${top}px`;
43
- let bottomValue = bottom !== undefined ? `${bottom}px` : undefined;
44
- let leftValue = `${left}px`;
45
- if (checkSafeAreaTop) {
46
- topValue = `${top}px${safeAreaTop}`;
47
- }
48
- if (checkSafeAreaBottom && bottomValue !== undefined) {
49
- bottomValue = `${bottom}px${safeAreaBottom}`;
50
- }
51
- if (checkSafeAreaLeft) {
52
- leftValue = `${left}px${safeAreaLeft}`;
53
- }
54
- if (checkSafeAreaRight) {
55
- leftValue = `${left}px${safeAreaRight}`;
56
- }
31
+ const { originX, originY, top, left, bottom } = calculateWindowAdjustment(side, results.top, results.left, padding, bodyWidth, bodyHeight, contentWidth, contentHeight, 0, results.originX, results.originY, results.referenceCoordinates);
57
32
  const baseAnimation = createAnimation();
58
33
  const backdropAnimation = createAnimation();
59
34
  const wrapperAnimation = createAnimation();
@@ -70,13 +45,13 @@ export const mdEnterAnimation = (baseEl, opts) => {
70
45
  contentAnimation
71
46
  .addElement(contentEl)
72
47
  .beforeStyles({
73
- top: `calc(${topValue} + var(--offset-y, 0px))`,
74
- left: `calc(${leftValue} + var(--offset-x, 0px))`,
48
+ top: `calc(${top}px + var(--offset-y, 0px))`,
49
+ left: `calc(${left}px + var(--offset-x, 0px))`,
75
50
  'transform-origin': `${originY} ${originX}`,
76
51
  })
77
52
  .beforeAddWrite(() => {
78
- if (bottomValue !== undefined) {
79
- contentEl.style.setProperty('bottom', `calc(${bottomValue})`);
53
+ if (bottom !== undefined) {
54
+ contentEl.style.setProperty('bottom', `${bottom}px`);
80
55
  }
81
56
  })
82
57
  .fromTo('transform', 'scale(0.8)', 'scale(1)');
@@ -467,9 +467,9 @@ export class Popover {
467
467
  const { onLifecycle, parentPopover, dismissOnSelect, side, arrow, htmlAttributes, focusTrap } = this;
468
468
  const desktop = isPlatform('desktop');
469
469
  const enableArrow = arrow && !parentPopover;
470
- return (h(Host, Object.assign({ key: '42863f748c93f709d433931d969230137b37d42d', "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
470
+ return (h(Host, Object.assign({ key: '2edd8333c630efbce59071f8a383e4326e928dbc', "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
471
471
  zIndex: `${20000 + this.overlayIndex}`,
472
- }, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && h("ion-backdrop", { key: '22b6d82178b52158b76ab3fd9a7dd738fd6e4bbf', tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), h("div", { key: 'b76335c64e992a964ed3fb91d17a992c3474b4cd', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && h("div", { key: '018c846c32e7ff7fa010528e6b37a17e5f03c84c', class: "popover-arrow", part: "arrow" }), h("div", { key: '350c468c80052da3a07768bceab98fe159c35a43', class: "popover-content", part: "content" }, h("slot", { key: '686443c17ac9873d33905c1cdb67e6d6da675282' })))));
472
+ }, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && h("ion-backdrop", { key: 'aac4e68b08197534375e8ea3f8c9ea0c10ab2af4', tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), h("div", { key: 'b7f4ebf57d4148b32856b0075d286f454be8de5d', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && h("div", { key: '607d94c28d73e8e957175a7c0f6e8a99ec4dcd53', class: "popover-arrow", part: "arrow" }), h("div", { key: '4366a5a5de550c09895e923f345583508e1ec30c', class: "popover-content", part: "content" }, h("slot", { key: 'eb7886fbc99c15b667b7d825d24f1c12d9380f03' })))));
473
473
  }
474
474
  static get is() { return "ion-popover"; }
475
475
  static get encapsulation() { return "shadow"; }