@ionic/core 8.7.17-dev.11767636336.113b441d → 8.7.17-dev.11767641184.14a165bc

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 (34) hide show
  1. package/components/ion-tab-bar.js +3 -17
  2. package/components/modal.js +144 -11
  3. package/components/popover.js +60 -10
  4. package/dist/cjs/ion-modal.cjs.entry.js +144 -11
  5. package/dist/cjs/ion-popover.cjs.entry.js +60 -10
  6. package/dist/cjs/ion-tab-bar_2.cjs.entry.js +3 -17
  7. package/dist/collection/components/modal/gestures/sheet.js +3 -1
  8. package/dist/collection/components/modal/gestures/swipe-to-close.js +3 -1
  9. package/dist/collection/components/modal/modal.ios.css +0 -4
  10. package/dist/collection/components/modal/modal.js +136 -7
  11. package/dist/collection/components/modal/modal.md.css +0 -4
  12. package/dist/collection/components/popover/animations/ios.enter.js +21 -5
  13. package/dist/collection/components/popover/animations/md.enter.js +20 -4
  14. package/dist/collection/components/popover/utils.js +19 -1
  15. package/dist/collection/components/tab-bar/tab-bar.js +3 -17
  16. package/dist/docs.json +1 -1
  17. package/dist/esm/ion-modal.entry.js +144 -11
  18. package/dist/esm/ion-popover.entry.js +60 -10
  19. package/dist/esm/ion-tab-bar_2.entry.js +3 -17
  20. package/dist/ionic/ionic.esm.js +1 -1
  21. package/dist/ionic/p-301ad219.entry.js +4 -0
  22. package/dist/ionic/p-7268efa5.entry.js +4 -0
  23. package/dist/ionic/p-fedca459.entry.js +4 -0
  24. package/dist/types/components/modal/gestures/sheet.d.ts +1 -1
  25. package/dist/types/components/modal/gestures/swipe-to-close.d.ts +1 -1
  26. package/dist/types/components/modal/modal.d.ts +29 -0
  27. package/dist/types/components/popover/utils.d.ts +2 -0
  28. package/dist/types/components/tab-bar/tab-bar.d.ts +0 -1
  29. package/hydrate/index.js +207 -38
  30. package/hydrate/index.mjs +207 -38
  31. package/package.json +1 -1
  32. package/dist/ionic/p-0d0eb444.entry.js +0 -4
  33. package/dist/ionic/p-91840a80.entry.js +0 -4
  34. package/dist/ionic/p-f9061316.entry.js +0 -4
package/hydrate/index.mjs CHANGED
@@ -21531,7 +21531,7 @@ const calculateSpringStep = (t) => {
21531
21531
  const SwipeToCloseDefaults = {
21532
21532
  MIN_PRESENTING_SCALE: 0.915,
21533
21533
  };
21534
- const createSwipeToCloseGesture = (el, animation, statusBarStyle, onDismiss) => {
21534
+ const createSwipeToCloseGesture = (el, animation, statusBarStyle, onDismiss, onGestureMove) => {
21535
21535
  /**
21536
21536
  * The step value at which a card modal
21537
21537
  * is eligible for dismissing via gesture.
@@ -21688,6 +21688,8 @@ const createSwipeToCloseGesture = (el, animation, statusBarStyle, onDismiss) =>
21688
21688
  const processedStep = isAttemptingDismissWithCanDismiss ? calculateSpringStep(step / maxStep) : step;
21689
21689
  const clampedStep = clamp(0.0001, processedStep, maxStep);
21690
21690
  animation.progressStep(clampedStep);
21691
+ // Notify modal of position change for safe-area updates
21692
+ onGestureMove === null || onGestureMove === void 0 ? void 0 : onGestureMove();
21691
21693
  /**
21692
21694
  * When swiping down half way, the status bar style
21693
21695
  * should be reset to its default value.
@@ -22231,7 +22233,7 @@ const mdLeaveAnimation$2 = (baseEl, opts) => {
22231
22233
  return baseAnimation;
22232
22234
  };
22233
22235
 
22234
- const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, animation, breakpoints = [], expandToScroll, getCurrentBreakpoint, onDismiss, onBreakpointChange) => {
22236
+ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, animation, breakpoints = [], expandToScroll, getCurrentBreakpoint, onDismiss, onBreakpointChange, onGestureMove) => {
22235
22237
  // Defaults for the sheet swipe animation
22236
22238
  const defaultBackdrop = [
22237
22239
  { offset: 0, opacity: 'var(--backdrop-opacity)' },
@@ -22562,6 +22564,8 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
22562
22564
  : step;
22563
22565
  offset = clamp(0.0001, processedStep, maxStep);
22564
22566
  animation.progressStep(offset);
22567
+ // Notify modal of position change for safe-area updates
22568
+ onGestureMove === null || onGestureMove === void 0 ? void 0 : onGestureMove();
22565
22569
  };
22566
22570
  const onEnd = (detail) => {
22567
22571
  /**
@@ -22756,9 +22760,9 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
22756
22760
  };
22757
22761
  };
22758
22762
 
22759
- const modalIosCss = ":host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:\"\"}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}:host(.modal-card),:host(.modal-sheet){--border-radius:10px}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:10px}}.modal-wrapper{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - 40px)}}:host(.modal-card) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}:host(.modal-card){--backdrop-opacity:0;--width:100%;-ms-flex-align:end;align-items:flex-end}:host(.modal-card) .modal-shadow{display:none}:host(.modal-card) ion-backdrop{pointer-events:none}}@media screen and (min-width: 768px){:host(.modal-card){--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px;--backdrop-opacity:0;--box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}:host(.modal-card) .modal-wrapper{-webkit-box-shadow:none;box-shadow:none}:host(.modal-card) .modal-shadow{-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}}:host(.modal-sheet) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}";
22763
+ const modalIosCss = ":host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:\"\"}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}:host(.modal-card),:host(.modal-sheet){--border-radius:10px}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:10px}}.modal-wrapper{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - 40px)}}:host(.modal-card) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}:host(.modal-card){--backdrop-opacity:0;--width:100%;-ms-flex-align:end;align-items:flex-end}:host(.modal-card) .modal-shadow{display:none}:host(.modal-card) ion-backdrop{pointer-events:none}}@media screen and (min-width: 768px){:host(.modal-card){--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px;--backdrop-opacity:0;--box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}:host(.modal-card) .modal-wrapper{-webkit-box-shadow:none;box-shadow:none}:host(.modal-card) .modal-shadow{-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}}:host(.modal-sheet) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}";
22760
22764
 
22761
- const modalMdCss = ":host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:\"\"}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:2px;--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper{-webkit-transform:translate3d(0, 40px, 0);transform:translate3d(0, 40px, 0);opacity:0.01}";
22765
+ const modalMdCss = ":host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:\"\"}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:2px;--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper{-webkit-transform:translate3d(0, 40px, 0);transform:translate3d(0, 40px, 0);opacity:0.01}";
22762
22766
 
22763
22767
  // TODO(FW-2832): types
22764
22768
  /**
@@ -22791,6 +22795,8 @@ class Modal {
22791
22795
  this.inline = false;
22792
22796
  // Whether or not modal is being dismissed via gesture
22793
22797
  this.gestureAnimationDismissing = false;
22798
+ // Whether to skip coordinate-based safe-area detection (for fullscreen phone modals)
22799
+ this.skipSafeAreaCoordinateDetection = false;
22794
22800
  this.presented = false;
22795
22801
  /** @internal */
22796
22802
  this.hasController = false;
@@ -22981,7 +22987,9 @@ class Modal {
22981
22987
  }
22982
22988
  }
22983
22989
  onWindowResize() {
22984
- // Only handle resize for iOS card modals when no custom animations are provided
22990
+ // Update safe-area overrides for all modal types on resize
22991
+ this.updateSafeAreaOverrides();
22992
+ // Only handle view transition for iOS card modals when no custom animations are provided
22985
22993
  if (getIonMode$1(this) !== 'ios' || !this.presentingElement || this.enterAnimation || this.leaveAnimation) {
22986
22994
  return;
22987
22995
  }
@@ -23163,6 +23171,8 @@ class Modal {
23163
23171
  else if (!this.keepContentsMounted) {
23164
23172
  await waitForMount();
23165
23173
  }
23174
+ // Predict safe-area needs based on modal configuration to avoid visual snap
23175
+ this.setInitialSafeAreaOverrides(presentingElement);
23166
23176
  writeTask(() => this.el.classList.add('show-modal'));
23167
23177
  const hasCardModal = presentingElement !== undefined;
23168
23178
  /**
@@ -23224,6 +23234,8 @@ class Modal {
23224
23234
  else if (hasCardModal) {
23225
23235
  this.initSwipeToClose();
23226
23236
  }
23237
+ // Now that animation is complete, update safe-area based on actual position
23238
+ this.updateSafeAreaOverrides();
23227
23239
  // Initialize view transition listener for iOS card modals
23228
23240
  this.initViewTransitionListener();
23229
23241
  // Initialize parent removal observer
@@ -23275,7 +23287,7 @@ class Modal {
23275
23287
  await this.dismiss(undefined, GESTURE);
23276
23288
  this.gestureAnimationDismissing = false;
23277
23289
  });
23278
- });
23290
+ }, () => this.updateSafeAreaOverrides());
23279
23291
  this.gesture.enable(true);
23280
23292
  }
23281
23293
  initSheetGesture() {
@@ -23296,7 +23308,8 @@ class Modal {
23296
23308
  this.currentBreakpoint = breakpoint;
23297
23309
  this.ionBreakpointDidChange.emit({ breakpoint });
23298
23310
  }
23299
- });
23311
+ this.updateSafeAreaOverrides();
23312
+ }, () => this.updateSafeAreaOverrides());
23300
23313
  this.gesture = gesture;
23301
23314
  this.moveSheetToBreakpoint = moveSheetToBreakpoint;
23302
23315
  this.gesture.enable(true);
@@ -23374,6 +23387,124 @@ class Modal {
23374
23387
  // Clear the cached reference
23375
23388
  this.cachedPageParent = undefined;
23376
23389
  }
23390
+ /**
23391
+ * Sets initial safe-area overrides based on modal configuration before
23392
+ * the modal becomes visible. This predicts whether the modal will touch
23393
+ * screen edges to avoid a visual snap after animation completes.
23394
+ */
23395
+ setInitialSafeAreaOverrides(presentingElement) {
23396
+ const style = this.el.style;
23397
+ const mode = getIonMode$1(this);
23398
+ const isSheetModal = this.breakpoints !== undefined && this.initialBreakpoint !== undefined;
23399
+ // Card modals only exist in iOS mode - in MD mode, presentingElement is ignored
23400
+ const isCardModal = presentingElement !== undefined && mode === 'ios';
23401
+ const isTablet = window.innerWidth >= 768;
23402
+ // Sheet modals always touch bottom edge, never top/left/right
23403
+ if (isSheetModal) {
23404
+ style.setProperty('--ion-safe-area-top', '0px');
23405
+ style.setProperty('--ion-safe-area-left', '0px');
23406
+ style.setProperty('--ion-safe-area-right', '0px');
23407
+ return;
23408
+ }
23409
+ // Card modals have rounded top corners
23410
+ if (isCardModal) {
23411
+ style.setProperty('--ion-safe-area-top', '0px');
23412
+ if (isTablet) {
23413
+ // On tablets, card modals are inset from all edges
23414
+ this.zeroAllSafeAreas();
23415
+ }
23416
+ else {
23417
+ // On phones, card modals still extend to the bottom edge
23418
+ style.setProperty('--ion-safe-area-left', '0px');
23419
+ style.setProperty('--ion-safe-area-right', '0px');
23420
+ this.applyFullscreenSafeArea();
23421
+ }
23422
+ return;
23423
+ }
23424
+ // Phone-sized fullscreen modals inherit safe areas and use wrapper padding
23425
+ if (!isTablet) {
23426
+ this.applyFullscreenSafeArea();
23427
+ return;
23428
+ }
23429
+ // Check if tablet modal is fullscreen via CSS custom properties
23430
+ const computedStyle = getComputedStyle(this.el);
23431
+ const width = computedStyle.getPropertyValue('--width').trim();
23432
+ const height = computedStyle.getPropertyValue('--height').trim();
23433
+ const isFullscreen = width === '100%' && height === '100%';
23434
+ if (isFullscreen) {
23435
+ this.applyFullscreenSafeArea();
23436
+ }
23437
+ else {
23438
+ // Centered dialog doesn't touch edges
23439
+ this.zeroAllSafeAreas();
23440
+ }
23441
+ }
23442
+ /**
23443
+ * Applies safe-area handling for fullscreen modals.
23444
+ * Adds wrapper padding when no footer is present to prevent
23445
+ * content from overlapping system navigation areas.
23446
+ */
23447
+ applyFullscreenSafeArea() {
23448
+ this.skipSafeAreaCoordinateDetection = true;
23449
+ const hasFooter = this.el.querySelector('ion-footer') !== null;
23450
+ if (!hasFooter && this.wrapperEl) {
23451
+ this.wrapperEl.style.setProperty('padding-bottom', 'var(--ion-safe-area-bottom, 0px)');
23452
+ this.wrapperEl.style.setProperty('box-sizing', 'border-box');
23453
+ }
23454
+ }
23455
+ /**
23456
+ * Sets all safe-area CSS variables to 0px for modals that
23457
+ * don't touch screen edges.
23458
+ */
23459
+ zeroAllSafeAreas() {
23460
+ const style = this.el.style;
23461
+ style.setProperty('--ion-safe-area-top', '0px');
23462
+ style.setProperty('--ion-safe-area-bottom', '0px');
23463
+ style.setProperty('--ion-safe-area-left', '0px');
23464
+ style.setProperty('--ion-safe-area-right', '0px');
23465
+ }
23466
+ /**
23467
+ * Gets the root safe-area values from the document element.
23468
+ * These represent the actual device safe areas before any overlay overrides.
23469
+ */
23470
+ getRootSafeAreaValues() {
23471
+ const rootStyle = getComputedStyle(document.documentElement);
23472
+ return {
23473
+ top: parseFloat(rootStyle.getPropertyValue('--ion-safe-area-top')) || 0,
23474
+ bottom: parseFloat(rootStyle.getPropertyValue('--ion-safe-area-bottom')) || 0,
23475
+ left: parseFloat(rootStyle.getPropertyValue('--ion-safe-area-left')) || 0,
23476
+ right: parseFloat(rootStyle.getPropertyValue('--ion-safe-area-right')) || 0,
23477
+ };
23478
+ }
23479
+ /**
23480
+ * Updates safe-area CSS variable overrides based on whether the modal
23481
+ * extends into each safe-area region. Called after animation
23482
+ * and during gestures to handle dynamic position changes.
23483
+ */
23484
+ updateSafeAreaOverrides() {
23485
+ if (this.skipSafeAreaCoordinateDetection) {
23486
+ return;
23487
+ }
23488
+ const wrapper = this.wrapperEl;
23489
+ if (!wrapper) {
23490
+ return;
23491
+ }
23492
+ const rect = wrapper.getBoundingClientRect();
23493
+ const safeAreas = this.getRootSafeAreaValues();
23494
+ const extendsIntoTop = rect.top < safeAreas.top;
23495
+ const extendsIntoBottom = rect.bottom > window.innerHeight - safeAreas.bottom;
23496
+ const extendsIntoLeft = rect.left < safeAreas.left;
23497
+ const extendsIntoRight = rect.right > window.innerWidth - safeAreas.right;
23498
+ const style = this.el.style;
23499
+ extendsIntoTop ? style.removeProperty('--ion-safe-area-top') : style.setProperty('--ion-safe-area-top', '0px');
23500
+ extendsIntoBottom
23501
+ ? style.removeProperty('--ion-safe-area-bottom')
23502
+ : style.setProperty('--ion-safe-area-bottom', '0px');
23503
+ extendsIntoLeft ? style.removeProperty('--ion-safe-area-left') : style.setProperty('--ion-safe-area-left', '0px');
23504
+ extendsIntoRight
23505
+ ? style.removeProperty('--ion-safe-area-right')
23506
+ : style.setProperty('--ion-safe-area-right', '0px');
23507
+ }
23377
23508
  sheetOnDismiss() {
23378
23509
  /**
23379
23510
  * While the gesture animation is finishing
@@ -23466,6 +23597,8 @@ class Modal {
23466
23597
  }
23467
23598
  this.currentBreakpoint = undefined;
23468
23599
  this.animation = undefined;
23600
+ // Reset safe-area detection flag for potential re-presentation
23601
+ this.skipSafeAreaCoordinateDetection = false;
23469
23602
  unlock();
23470
23603
  return dismissed;
23471
23604
  }
@@ -23715,20 +23848,20 @@ class Modal {
23715
23848
  const isCardModal = presentingElement !== undefined && mode === 'ios';
23716
23849
  const isHandleCycle = handleBehavior === 'cycle';
23717
23850
  const isSheetModalWithHandle = isSheetModal && showHandle;
23718
- return (hAsync(Host, Object.assign({ key: '87328006ea6c75ebc518ace300438492a567223e', "no-router": true,
23851
+ return (hAsync(Host, Object.assign({ key: '07ebca6a70eb99f8a2236e1d66a03097a7bb67d8', "no-router": true,
23719
23852
  // Allow the modal to be navigable when the handle is focusable
23720
23853
  tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
23721
23854
  zIndex: `${20000 + this.overlayIndex}`,
23722
- }, 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 }), hAsync("ion-backdrop", { key: 'ee94ff8e09b691dd4ad4e4db1720f06bc3c5a469', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && hAsync("div", { key: 'bffd69b4635c22d9f249725bd952c1e93d5615c7', class: "modal-shadow" }), hAsync("div", Object.assign({ key: '1d394d3c68916e464ff1fbf5242419f4a3d3cca1',
23855
+ }, 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 }), hAsync("ion-backdrop", { key: '1b6850d9b9f6e8f3865b49e0a14399e2ef43a5d6', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && hAsync("div", { key: 'eab52c0ebccb820781e92392dc6fa90db93525d5', class: "modal-shadow" }), hAsync("div", Object.assign({ key: 'ab9448cabdf03a633319999771ce1ca1edce5699',
23723
23856
  /*
23724
23857
  role and aria-modal must be used on the
23725
23858
  same element. They must also be set inside the
23726
23859
  shadow DOM otherwise ion-button will not be highlighted
23727
23860
  when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
23728
23861
  */
23729
- role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: '2dcf58792018e557e0c323baad2d672bc99c0bb1', class: "modal-handle",
23862
+ role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: 'b2b8c0a8d8add0d43e928dd3d3519f184551e62b', class: "modal-handle",
23730
23863
  // Prevents the handle from receiving keyboard focus when it does not cycle
23731
- 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) })), hAsync("slot", { key: '44164b1e8710c3895400ad9f44ecd99873874ad5', onSlotchange: this.onSlotChange }))));
23864
+ 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) })), hAsync("slot", { key: 'b994f206765f7b340971d378f00999c0da334102', onSlotchange: this.onSlotChange }))));
23732
23865
  }
23733
23866
  get el() { return getElement(this); }
23734
23867
  static get watchers() { return {
@@ -27306,6 +27439,8 @@ const calculateWindowAdjustment = (side, coordTop, coordLeft, bodyPadding, bodyW
27306
27439
  let bottom;
27307
27440
  let originX = contentOriginX;
27308
27441
  let originY = contentOriginY;
27442
+ let checkSafeAreaTop = false;
27443
+ let checkSafeAreaBottom = false;
27309
27444
  let checkSafeAreaLeft = false;
27310
27445
  let checkSafeAreaRight = false;
27311
27446
  const triggerTop = triggerCoordinates
@@ -27350,10 +27485,18 @@ const calculateWindowAdjustment = (side, coordTop, coordLeft, bodyPadding, bodyW
27350
27485
  * We chose 12 here so that the popover position looks a bit nicer as
27351
27486
  * it is not right up against the edge of the screen.
27352
27487
  */
27353
- top = Math.max(12, triggerTop - contentHeight - triggerHeight - (arrowHeight - 1));
27488
+ top = Math.max(bodyPadding, triggerTop - contentHeight - triggerHeight - (arrowHeight - 1));
27354
27489
  arrowTop = top + contentHeight;
27355
27490
  originY = 'bottom';
27356
27491
  addPopoverBottomClass = true;
27492
+ /**
27493
+ * If the popover is positioned near the top edge, account for safe area.
27494
+ * This ensures the popover doesn't overlap with status bars or notches.
27495
+ */
27496
+ if (top <= bodyPadding + safeAreaMargin) {
27497
+ checkSafeAreaTop = true;
27498
+ top = bodyPadding;
27499
+ }
27357
27500
  /**
27358
27501
  * If not enough room for popover to appear
27359
27502
  * above trigger, then cut it off.
@@ -27361,6 +27504,12 @@ const calculateWindowAdjustment = (side, coordTop, coordLeft, bodyPadding, bodyW
27361
27504
  }
27362
27505
  else {
27363
27506
  bottom = bodyPadding;
27507
+ /**
27508
+ * When the popover is pinned to the bottom, account for safe area.
27509
+ * This ensures the popover doesn't overlap with home indicators
27510
+ * or navigation bars (e.g., Android API 36+ edge-to-edge).
27511
+ */
27512
+ checkSafeAreaBottom = true;
27364
27513
  }
27365
27514
  }
27366
27515
  return {
@@ -27369,6 +27518,8 @@ const calculateWindowAdjustment = (side, coordTop, coordLeft, bodyPadding, bodyW
27369
27518
  bottom,
27370
27519
  originX,
27371
27520
  originY,
27521
+ checkSafeAreaTop,
27522
+ checkSafeAreaBottom,
27372
27523
  checkSafeAreaLeft,
27373
27524
  checkSafeAreaRight,
27374
27525
  arrowTop,
@@ -27429,7 +27580,7 @@ const iosEnterAnimation$1 = (baseEl, opts) => {
27429
27580
  const results = getPopoverPosition(isRTL, contentWidth, contentHeight, arrowWidth, arrowHeight, reference, side, align, defaultPosition, trigger, ev);
27430
27581
  const padding = size === 'cover' ? 0 : POPOVER_IOS_BODY_PADDING;
27431
27582
  const margin = size === 'cover' ? 0 : 25;
27432
- 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);
27583
+ 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);
27433
27584
  const baseAnimation = createAnimation();
27434
27585
  const backdropAnimation = createAnimation();
27435
27586
  const contentAnimation = createAnimation();
@@ -27459,19 +27610,35 @@ const iosEnterAnimation$1 = (baseEl, opts) => {
27459
27610
  if (addPopoverBottomClass) {
27460
27611
  baseEl.classList.add('popover-bottom');
27461
27612
  }
27462
- if (bottom !== undefined) {
27463
- contentEl.style.setProperty('bottom', `${bottom}px`);
27464
- }
27613
+ /**
27614
+ * Safe area CSS variable adjustments.
27615
+ * When the popover is positioned near an edge, we add the corresponding
27616
+ * safe-area inset to ensure the popover doesn't overlap with system UI
27617
+ * (status bars, home indicators, navigation bars on Android API 36+, etc.)
27618
+ */
27619
+ const safeAreaTop = ' + var(--ion-safe-area-top, 0)';
27620
+ const safeAreaBottom = ' + var(--ion-safe-area-bottom, 0)';
27465
27621
  const safeAreaLeft = ' + var(--ion-safe-area-left, 0)';
27466
27622
  const safeAreaRight = ' - var(--ion-safe-area-right, 0)';
27623
+ let topValue = `${top}px`;
27624
+ let bottomValue = bottom !== undefined ? `${bottom}px` : undefined;
27467
27625
  let leftValue = `${left}px`;
27626
+ if (checkSafeAreaTop) {
27627
+ topValue = `${top}px${safeAreaTop}`;
27628
+ }
27629
+ if (checkSafeAreaBottom && bottomValue !== undefined) {
27630
+ bottomValue = `${bottom}px${safeAreaBottom}`;
27631
+ }
27468
27632
  if (checkSafeAreaLeft) {
27469
27633
  leftValue = `${left}px${safeAreaLeft}`;
27470
27634
  }
27471
27635
  if (checkSafeAreaRight) {
27472
27636
  leftValue = `${left}px${safeAreaRight}`;
27473
27637
  }
27474
- contentEl.style.setProperty('top', `calc(${top}px + var(--offset-y, 0))`);
27638
+ if (bottomValue !== undefined) {
27639
+ contentEl.style.setProperty('bottom', `calc(${bottomValue})`);
27640
+ }
27641
+ contentEl.style.setProperty('top', `calc(${topValue} + var(--offset-y, 0))`);
27475
27642
  contentEl.style.setProperty('left', `calc(${leftValue} + var(--offset-x, 0))`);
27476
27643
  contentEl.style.setProperty('transform-origin', `${originY} ${originX}`);
27477
27644
  if (arrowEl !== null) {
@@ -27547,7 +27714,23 @@ const mdEnterAnimation$1 = (baseEl, opts) => {
27547
27714
  };
27548
27715
  const results = getPopoverPosition(isRTL, contentWidth, contentHeight, 0, 0, reference, side, align, defaultPosition, trigger, ev);
27549
27716
  const padding = size === 'cover' ? 0 : POPOVER_MD_BODY_PADDING;
27550
- const { originX, originY, top, left, bottom } = calculateWindowAdjustment(side, results.top, results.left, padding, bodyWidth, bodyHeight, contentWidth, contentHeight, 0, results.originX, results.originY, results.referenceCoordinates);
27717
+ const { originX, originY, top, left, bottom, checkSafeAreaTop, checkSafeAreaBottom } = calculateWindowAdjustment(side, results.top, results.left, padding, bodyWidth, bodyHeight, contentWidth, contentHeight, 0, results.originX, results.originY, results.referenceCoordinates);
27718
+ /**
27719
+ * Safe area CSS variable adjustments.
27720
+ * When the popover is positioned near an edge, we add the corresponding
27721
+ * safe-area inset to ensure the popover doesn't overlap with system UI
27722
+ * (status bars, home indicators, navigation bars on Android API 36+, etc.)
27723
+ */
27724
+ const safeAreaTop = ' + var(--ion-safe-area-top, 0)';
27725
+ const safeAreaBottom = ' + var(--ion-safe-area-bottom, 0)';
27726
+ let topValue = `${top}px`;
27727
+ let bottomValue = bottom !== undefined ? `${bottom}px` : undefined;
27728
+ if (checkSafeAreaTop) {
27729
+ topValue = `${top}px${safeAreaTop}`;
27730
+ }
27731
+ if (checkSafeAreaBottom && bottomValue !== undefined) {
27732
+ bottomValue = `${bottom}px${safeAreaBottom}`;
27733
+ }
27551
27734
  const baseAnimation = createAnimation();
27552
27735
  const backdropAnimation = createAnimation();
27553
27736
  const wrapperAnimation = createAnimation();
@@ -27564,13 +27747,13 @@ const mdEnterAnimation$1 = (baseEl, opts) => {
27564
27747
  contentAnimation
27565
27748
  .addElement(contentEl)
27566
27749
  .beforeStyles({
27567
- top: `calc(${top}px + var(--offset-y, 0px))`,
27750
+ top: `calc(${topValue} + var(--offset-y, 0px))`,
27568
27751
  left: `calc(${left}px + var(--offset-x, 0px))`,
27569
27752
  'transform-origin': `${originY} ${originX}`,
27570
27753
  })
27571
27754
  .beforeAddWrite(() => {
27572
- if (bottom !== undefined) {
27573
- contentEl.style.setProperty('bottom', `${bottom}px`);
27755
+ if (bottomValue !== undefined) {
27756
+ contentEl.style.setProperty('bottom', `calc(${bottomValue})`);
27574
27757
  }
27575
27758
  })
27576
27759
  .fromTo('transform', 'scale(0.8)', 'scale(1)');
@@ -34989,7 +35172,6 @@ class TabBar {
34989
35172
  this.ionTabBarLoaded = createEvent(this, "ionTabBarLoaded", 7);
34990
35173
  this.keyboardCtrl = null;
34991
35174
  this.didLoad = false;
34992
- this.isComponentConnected = false;
34993
35175
  this.keyboardVisible = false;
34994
35176
  /**
34995
35177
  * If `true`, the tab bar will be translucent.
@@ -35024,8 +35206,7 @@ class TabBar {
35024
35206
  }
35025
35207
  }
35026
35208
  async connectedCallback() {
35027
- this.isComponentConnected = true;
35028
- const keyboardCtrl = await createKeyboardController(async (keyboardOpen, waitForResize) => {
35209
+ this.keyboardCtrl = await createKeyboardController(async (keyboardOpen, waitForResize) => {
35029
35210
  /**
35030
35211
  * If the keyboard is hiding, then we need to wait
35031
35212
  * for the webview to resize. Otherwise, the tab bar
@@ -35036,33 +35217,21 @@ class TabBar {
35036
35217
  }
35037
35218
  this.keyboardVisible = keyboardOpen; // trigger re-render by updating state
35038
35219
  });
35039
- /**
35040
- * Destroy the keyboard controller if the component was
35041
- * disconnected during async initialization to prevent memory leaks.
35042
- */
35043
- if (this.isComponentConnected) {
35044
- this.keyboardCtrl = keyboardCtrl;
35045
- }
35046
- else {
35047
- keyboardCtrl.destroy();
35048
- }
35049
35220
  }
35050
35221
  disconnectedCallback() {
35051
- this.isComponentConnected = false;
35052
35222
  if (this.keyboardCtrl) {
35053
35223
  this.keyboardCtrl.destroy();
35054
- this.keyboardCtrl = null;
35055
35224
  }
35056
35225
  }
35057
35226
  render() {
35058
35227
  const { color, translucent, keyboardVisible } = this;
35059
35228
  const mode = getIonMode$1(this);
35060
35229
  const shouldHide = keyboardVisible && this.el.getAttribute('slot') !== 'top';
35061
- return (hAsync(Host, { key: '1f721132a86fd0db988bf9af0fbc1e8e6fa6b7da', role: "tablist", "aria-hidden": shouldHide ? 'true' : null, class: createColorClasses$1(color, {
35230
+ return (hAsync(Host, { key: '388ec37ce308035bab78d6c9a016bb616e9517a9', role: "tablist", "aria-hidden": shouldHide ? 'true' : null, class: createColorClasses$1(color, {
35062
35231
  [mode]: true,
35063
35232
  'tab-bar-translucent': translucent,
35064
35233
  'tab-bar-hidden': shouldHide,
35065
- }) }, hAsync("slot", { key: '828838764307f150c64e9bbbbbafbdee6fa8e9f2' })));
35234
+ }) }, hAsync("slot", { key: 'ce10ade2b86725e24f3254516483eeedd8ecb16a' })));
35066
35235
  }
35067
35236
  get el() { return getElement(this); }
35068
35237
  static get watchers() { return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ionic/core",
3
- "version": "8.7.17-dev.11767636336.113b441d",
3
+ "version": "8.7.17-dev.11767641184.14a165bc",
4
4
  "description": "Base components for Ionic",
5
5
  "engines": {
6
6
  "node": ">= 16"
@@ -1,4 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- import{r as t,c as o,h as e,d as i,g as n,e as a}from"./p-C8IsBmNU.js";import{c as r}from"./p-CtWGkNnJ.js";import{c as s}from"./p-DiVJyqlX.js";import{b as l}from"./p-BFvmZNyx.js";import{b as d}from"./p-CTfR9YZG.js";import"./p-ZjP4CjeZ.js";import"./p-D13Eaw-8.js";import"./p-CIGNaXM1.js";const b=class{constructor(e){t(this,e),this.ionTabBarChanged=o(this,"ionTabBarChanged",7),this.ionTabBarLoaded=o(this,"ionTabBarLoaded",7),this.keyboardCtrl=null,this.didLoad=!1,this.isComponentConnected=!1,this.keyboardVisible=!1,this.translucent=!1}selectedTabChanged(){this.didLoad&&void 0!==this.selectedTab&&this.ionTabBarChanged.emit({tab:this.selectedTab})}componentDidLoad(){this.ionTabBarLoaded.emit(),this.didLoad=!0,void 0!==this.selectedTab&&this.ionTabBarChanged.emit({tab:this.selectedTab})}async connectedCallback(){this.isComponentConnected=!0;const t=await r((async(t,o)=>{!1===t&&void 0!==o&&await o,this.keyboardVisible=t}));this.isComponentConnected?this.keyboardCtrl=t:t.destroy()}disconnectedCallback(){this.isComponentConnected=!1,this.keyboardCtrl&&(this.keyboardCtrl.destroy(),this.keyboardCtrl=null)}render(){const{color:t,translucent:o,keyboardVisible:n}=this,a=l(this),r=n&&"top"!==this.el.getAttribute("slot");return e(i,{key:"1f721132a86fd0db988bf9af0fbc1e8e6fa6b7da",role:"tablist","aria-hidden":r?"true":null,class:s(t,{[a]:!0,"tab-bar-translucent":o,"tab-bar-hidden":r})},e("slot",{key:"828838764307f150c64e9bbbbbafbdee6fa8e9f2"}))}get el(){return n(this)}static get watchers(){return{selectedTab:["selectedTabChanged"]}}};b.style={ios:":host{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:auto;padding-right:var(--ion-safe-area-right);padding-bottom:var(--ion-safe-area-bottom, 0);padding-left:var(--ion-safe-area-left);border-top:var(--border);background:var(--background);color:var(--color);text-align:center;contain:strict;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:10;-webkit-box-sizing:content-box !important;box-sizing:content-box !important}:host(.ion-color) ::slotted(ion-tab-button){--background-focused:var(--ion-color-shade);--color-selected:var(--ion-color-contrast)}:host(.ion-color) ::slotted(.tab-selected){color:var(--ion-color-contrast)}:host(.ion-color),:host(.ion-color) ::slotted(ion-tab-button){color:rgba(var(--ion-color-contrast-rgb), 0.7)}:host(.ion-color),:host(.ion-color) ::slotted(ion-tab-button){background:var(--ion-color-base)}:host(.ion-color) ::slotted(ion-tab-button.ion-focused),:host(.tab-bar-translucent) ::slotted(ion-tab-button.ion-focused){background:var(--background-focused)}:host(.tab-bar-translucent) ::slotted(ion-tab-button){background:transparent}:host([slot=top]){padding-top:var(--ion-safe-area-top, 0);padding-bottom:0;border-top:0;border-bottom:var(--border)}:host(.tab-bar-hidden){display:none !important}:host{--background:var(--ion-tab-bar-background, var(--ion-color-step-50, var(--ion-background-color-step-50, #f7f7f7)));--background-focused:var(--ion-tab-bar-background-focused, #e0e0e0);--border:0.55px solid var(--ion-tab-bar-border-color, var(--ion-border-color, var(--ion-color-step-150, var(--ion-background-color-step-150, rgba(0, 0, 0, 0.2)))));--color:var(--ion-tab-bar-color, var(--ion-color-step-600, var(--ion-text-color-step-400, #666666)));--color-selected:var(--ion-tab-bar-color-selected, var(--ion-color-primary, #0054e9));height:50px}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){:host(.tab-bar-translucent){--background:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8);-webkit-backdrop-filter:saturate(210%) blur(20px);backdrop-filter:saturate(210%) blur(20px)}:host(.ion-color.tab-bar-translucent){background:rgba(var(--ion-color-base-rgb), 0.8)}:host(.tab-bar-translucent) ::slotted(ion-tab-button.ion-focused){background:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.6)}}",md:":host{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:auto;padding-right:var(--ion-safe-area-right);padding-bottom:var(--ion-safe-area-bottom, 0);padding-left:var(--ion-safe-area-left);border-top:var(--border);background:var(--background);color:var(--color);text-align:center;contain:strict;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:10;-webkit-box-sizing:content-box !important;box-sizing:content-box !important}:host(.ion-color) ::slotted(ion-tab-button){--background-focused:var(--ion-color-shade);--color-selected:var(--ion-color-contrast)}:host(.ion-color) ::slotted(.tab-selected){color:var(--ion-color-contrast)}:host(.ion-color),:host(.ion-color) ::slotted(ion-tab-button){color:rgba(var(--ion-color-contrast-rgb), 0.7)}:host(.ion-color),:host(.ion-color) ::slotted(ion-tab-button){background:var(--ion-color-base)}:host(.ion-color) ::slotted(ion-tab-button.ion-focused),:host(.tab-bar-translucent) ::slotted(ion-tab-button.ion-focused){background:var(--background-focused)}:host(.tab-bar-translucent) ::slotted(ion-tab-button){background:transparent}:host([slot=top]){padding-top:var(--ion-safe-area-top, 0);padding-bottom:0;border-top:0;border-bottom:var(--border)}:host(.tab-bar-hidden){display:none !important}:host{--background:var(--ion-tab-bar-background, var(--ion-background-color, #fff));--background-focused:var(--ion-tab-bar-background-focused, #e0e0e0);--border:1px solid var(--ion-tab-bar-border-color, var(--ion-border-color, var(--ion-color-step-150, var(--ion-background-color-step-150, rgba(0, 0, 0, 0.07)))));--color:var(--ion-tab-bar-color, var(--ion-color-step-650, var(--ion-text-color-step-350, #595959)));--color-selected:var(--ion-tab-bar-color-selected, var(--ion-color-primary, #0054e9));height:56px}"};const c=class{constructor(e){t(this,e),this.ionTabButtonClick=o(this,"ionTabButtonClick",7),this.inheritedAttributes={},this.disabled=!1,this.selected=!1,this.onKeyUp=t=>{"Enter"!==t.key&&" "!==t.key||this.selectTab(t)},this.onClick=t=>{this.selectTab(t)}}onTabBarChanged(t){const o=t.target,e=this.el.parentElement;(t.composedPath().includes(e)||(null==o?void 0:o.contains(this.el)))&&(this.selected=this.tab===t.detail.tab)}componentWillLoad(){this.inheritedAttributes=Object.assign({},d(this.el,["aria-label"])),void 0===this.layout&&(this.layout=a.get("tabButtonLayout","icon-top"))}selectTab(t){void 0!==this.tab&&(this.disabled||this.ionTabButtonClick.emit({tab:this.tab,href:this.href,selected:this.selected}),t.preventDefault())}get hasLabel(){return!!this.el.querySelector("ion-label")}get hasIcon(){return!!this.el.querySelector("ion-icon")}render(){const{disabled:t,hasIcon:o,hasLabel:n,href:a,rel:r,target:s,layout:d,selected:b,tab:c,inheritedAttributes:h}=this,p=l(this),g={download:this.download,href:a,rel:r,target:s};return e(i,{key:"ce9d29ced0c781d6b2fa62cd5feb801c11fc42e8",onClick:this.onClick,onKeyup:this.onKeyUp,id:void 0!==c?`tab-button-${c}`:null,class:{[p]:!0,"tab-selected":b,"tab-disabled":t,"tab-has-label":n,"tab-has-icon":o,"tab-has-label-only":n&&!o,"tab-has-icon-only":o&&!n,[`tab-layout-${d}`]:!0,"ion-activatable":!0,"ion-selectable":!0,"ion-focusable":!0}},e("a",Object.assign({key:"01cb0ed2e77c5c1a8abd48da1bb07ac1b305d0b6"},g,{class:"button-native",part:"native",role:"tab","aria-selected":b?"true":null,"aria-disabled":t?"true":null,tabindex:t?"-1":void 0},h),e("span",{key:"d0240c05f42217cfb186b86ff8a0c9cd70b9c8df",class:"button-inner"},e("slot",{key:"0a20b84925037dbaa8bb4a495b813d3f7c2e58ac"})),"md"===p&&e("ion-ripple-effect",{key:"4c92c27178cdac89d69cffef8d2c39c3644914e8",type:"unbounded"})))}get el(){return n(this)}};c.style={ios:':host{--ripple-color:var(--color-selected);--background-focused-opacity:1;-ms-flex:1;flex:1;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:100%;outline:none;background:var(--background);color:var(--color)}.button-native{border-radius:inherit;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:-ms-flexbox;display:flex;position:relative;-ms-flex-direction:inherit;flex-direction:inherit;-ms-flex-align:inherit;align-items:inherit;-ms-flex-pack:inherit;justify-content:inherit;width:100%;height:100%;border:0;outline:none;background:transparent;text-decoration:none;cursor:pointer;overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-user-drag:none}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}.button-inner{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:inherit;flex-flow:inherit;-ms-flex-align:inherit;align-items:inherit;-ms-flex-pack:inherit;justify-content:inherit;width:100%;height:100%;z-index:1}:host(.ion-focused) .button-native{color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}@media (any-hover: hover){a:hover{color:var(--color-selected)}}:host(.tab-selected){color:var(--color-selected)}:host(.tab-hidden){display:none !important}:host(.tab-disabled){pointer-events:none;opacity:0.4}::slotted(ion-label),::slotted(ion-icon){display:block;-ms-flex-item-align:center;align-self:center;max-width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box}::slotted(ion-label){-ms-flex-order:0;order:0}::slotted(ion-icon){-ms-flex-order:-1;order:-1;height:1em}:host(.tab-has-label-only) ::slotted(ion-label){white-space:normal}::slotted(ion-badge){-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;z-index:1}:host(.tab-layout-icon-start){-ms-flex-direction:row;flex-direction:row}:host(.tab-layout-icon-end){-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.tab-layout-icon-bottom){-ms-flex-direction:column-reverse;flex-direction:column-reverse}:host(.tab-layout-icon-hide) ::slotted(ion-icon){display:none}:host(.tab-layout-label-hide) ::slotted(ion-label){display:none}ion-ripple-effect{color:var(--ripple-color)}:host{--padding-top:0;--padding-end:2px;--padding-bottom:0;--padding-start:2px;max-width:240px;font-size:10px}::slotted(ion-badge){-webkit-padding-start:6px;padding-inline-start:6px;-webkit-padding-end:6px;padding-inline-end:6px;padding-top:1px;padding-bottom:1px;top:4px;height:auto;font-size:12px;line-height:16px}::slotted(ion-badge){inset-inline-start:calc(50% + 6px)}::slotted(ion-icon){margin-top:2px;margin-bottom:2px;font-size:24px}::slotted(ion-icon::before){vertical-align:top}::slotted(ion-label){margin-top:0;margin-bottom:1px;min-height:11px;font-weight:500}:host(.tab-has-label-only) ::slotted(ion-label){margin-left:0;margin-right:0;margin-top:2px;margin-bottom:2px;font-size:12px;font-size:14px;line-height:1.1}:host(.tab-layout-icon-end) ::slotted(ion-label),:host(.tab-layout-icon-start) ::slotted(ion-label),:host(.tab-layout-icon-hide) ::slotted(ion-label){margin-top:2px;margin-bottom:2px;font-size:14px;line-height:1.1}:host(.tab-layout-icon-end) ::slotted(ion-icon),:host(.tab-layout-icon-start) ::slotted(ion-icon){min-width:24px;height:26px;margin-top:2px;margin-bottom:1px;font-size:24px}:host(.tab-layout-icon-bottom) ::slotted(ion-badge){inset-inline-start:calc(50% + 12px)}:host(.tab-layout-icon-bottom) ::slotted(ion-icon){margin-top:0;margin-bottom:1px}:host(.tab-layout-icon-bottom) ::slotted(ion-label){margin-top:4px}:host(.tab-layout-icon-start) ::slotted(ion-badge),:host(.tab-layout-icon-end) ::slotted(ion-badge){top:10px}:host(.tab-layout-icon-start) ::slotted(ion-badge),:host(.tab-layout-icon-end) ::slotted(ion-badge){inset-inline-start:calc(50% + 35px)}:host(.tab-layout-icon-hide) ::slotted(ion-badge),:host(.tab-has-label-only) ::slotted(ion-badge){top:10px}:host(.tab-layout-icon-hide) ::slotted(ion-badge),:host(.tab-has-label-only) ::slotted(ion-badge){inset-inline-start:calc(50% + 30px)}:host(.tab-layout-label-hide) ::slotted(ion-badge),:host(.tab-has-icon-only) ::slotted(ion-badge){top:10px}:host(.tab-layout-label-hide) ::slotted(ion-icon){margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}:host(.tab-layout-label-hide) ::slotted(ion-icon),:host(.tab-has-icon-only) ::slotted(ion-icon){font-size:30px}',md:':host{--ripple-color:var(--color-selected);--background-focused-opacity:1;-ms-flex:1;flex:1;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:100%;outline:none;background:var(--background);color:var(--color)}.button-native{border-radius:inherit;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:-ms-flexbox;display:flex;position:relative;-ms-flex-direction:inherit;flex-direction:inherit;-ms-flex-align:inherit;align-items:inherit;-ms-flex-pack:inherit;justify-content:inherit;width:100%;height:100%;border:0;outline:none;background:transparent;text-decoration:none;cursor:pointer;overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-user-drag:none}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0}.button-inner{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:inherit;flex-flow:inherit;-ms-flex-align:inherit;align-items:inherit;-ms-flex-pack:inherit;justify-content:inherit;width:100%;height:100%;z-index:1}:host(.ion-focused) .button-native{color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}@media (any-hover: hover){a:hover{color:var(--color-selected)}}:host(.tab-selected){color:var(--color-selected)}:host(.tab-hidden){display:none !important}:host(.tab-disabled){pointer-events:none;opacity:0.4}::slotted(ion-label),::slotted(ion-icon){display:block;-ms-flex-item-align:center;align-self:center;max-width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box}::slotted(ion-label){-ms-flex-order:0;order:0}::slotted(ion-icon){-ms-flex-order:-1;order:-1;height:1em}:host(.tab-has-label-only) ::slotted(ion-label){white-space:normal}::slotted(ion-badge){-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;z-index:1}:host(.tab-layout-icon-start){-ms-flex-direction:row;flex-direction:row}:host(.tab-layout-icon-end){-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.tab-layout-icon-bottom){-ms-flex-direction:column-reverse;flex-direction:column-reverse}:host(.tab-layout-icon-hide) ::slotted(ion-icon){display:none}:host(.tab-layout-label-hide) ::slotted(ion-label){display:none}ion-ripple-effect{color:var(--ripple-color)}:host{--padding-top:0;--padding-end:12px;--padding-bottom:0;--padding-start:12px;max-width:168px;font-size:12px;font-weight:normal;letter-spacing:0.03em}::slotted(ion-label){margin-left:0;margin-right:0;margin-top:2px;margin-bottom:2px;text-transform:none}::slotted(ion-icon){margin-left:0;margin-right:0;margin-top:16px;margin-bottom:16px;-webkit-transform-origin:center center;transform-origin:center center;font-size:22px}:host-context([dir=rtl]) ::slotted(ion-icon){-webkit-transform-origin:calc(100% - center) center;transform-origin:calc(100% - center) center}[dir=rtl] ::slotted(ion-icon){-webkit-transform-origin:calc(100% - center) center;transform-origin:calc(100% - center) center}@supports selector(:dir(rtl)){::slotted(ion-icon):dir(rtl){-webkit-transform-origin:calc(100% - center) center;transform-origin:calc(100% - center) center}}::slotted(ion-badge){border-radius:8px;-webkit-padding-start:2px;padding-inline-start:2px;-webkit-padding-end:2px;padding-inline-end:2px;padding-top:3px;padding-bottom:2px;top:8px;min-width:12px;font-size:8px;font-weight:normal}::slotted(ion-badge){inset-inline-start:calc(50% + 6px)}::slotted(ion-badge:empty){display:block;min-width:8px;height:8px}:host(.tab-layout-icon-top) ::slotted(ion-icon){margin-top:6px;margin-bottom:2px}:host(.tab-layout-icon-top) ::slotted(ion-label){margin-top:0;margin-bottom:6px}:host(.tab-layout-icon-bottom) ::slotted(ion-badge){top:8px}:host(.tab-layout-icon-bottom) ::slotted(ion-badge){inset-inline-start:70%}:host(.tab-layout-icon-bottom) ::slotted(ion-icon){margin-top:0;margin-bottom:6px}:host(.tab-layout-icon-bottom) ::slotted(ion-label){margin-top:6px;margin-bottom:0}:host(.tab-layout-icon-start) ::slotted(ion-badge),:host(.tab-layout-icon-end) ::slotted(ion-badge){top:16px}:host(.tab-layout-icon-start) ::slotted(ion-badge),:host(.tab-layout-icon-end) ::slotted(ion-badge){inset-inline-start:80%}:host(.tab-layout-icon-start) ::slotted(ion-icon){-webkit-margin-end:6px;margin-inline-end:6px}:host(.tab-layout-icon-end) ::slotted(ion-icon){-webkit-margin-start:6px;margin-inline-start:6px}:host(.tab-layout-icon-hide) ::slotted(ion-badge),:host(.tab-has-label-only) ::slotted(ion-badge){top:16px}:host(.tab-layout-icon-hide) ::slotted(ion-badge),:host(.tab-has-label-only) ::slotted(ion-badge){inset-inline-start:70%}:host(.tab-layout-icon-hide) ::slotted(ion-label),:host(.tab-has-label-only) ::slotted(ion-label){margin-top:0;margin-bottom:0}:host(.tab-layout-label-hide) ::slotted(ion-badge),:host(.tab-has-icon-only) ::slotted(ion-badge){top:16px}:host(.tab-layout-label-hide) ::slotted(ion-icon),:host(.tab-has-icon-only) ::slotted(ion-icon){margin-top:0;margin-bottom:0;font-size:24px}'};export{b as ion_tab_bar,c as ion_tab_button}