@ionic/core 8.8.4-dev.11776710869.1a81ced2 → 8.8.4-dev.11776868665.169e5ee1
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.
- package/components/index.js +1 -1
- package/components/ion-action-sheet.js +1 -1
- package/components/ion-alert.js +1 -1
- package/components/ion-datetime.js +1 -1
- package/components/ion-loading.js +1 -1
- package/components/ion-menu.js +1 -1
- package/components/ion-modal.js +1 -1
- package/components/ion-picker-legacy.js +1 -1
- package/components/ion-popover.js +1 -1
- package/components/ion-select-modal.js +1 -1
- package/components/ion-select-popover.js +1 -1
- package/components/ion-select.js +1 -1
- package/components/ion-tab-bar.js +1 -1
- package/components/ion-toast.js +1 -1
- package/components/{p-9o5mMwql.js → p-BAJR2rtd.js} +1 -1
- package/components/p-CtiqM786.js +4 -0
- package/components/p-D1bKIW7n.js +4 -0
- package/components/{p-Ch9P0ikq.js → p-DWhesBL8.js} +1 -1
- package/components/{p-C7nyAr3p.js → p-DbmwH3zj.js} +1 -1
- package/components/{p-B6czg-mf.js → p-DlHXJAF8.js} +1 -1
- package/components/{p-BGHaEUgp.js → p-qx-oKGQ-.js} +1 -1
- package/css/core.css +1 -1
- package/css/core.css.map +1 -1
- package/css/ionic/bundle.ionic.css +1 -1
- package/css/ionic/bundle.ionic.css.map +1 -1
- package/css/ionic/core.ionic.css +1 -1
- package/css/ionic/core.ionic.css.map +1 -1
- package/css/ionic/global.bundle.ionic.css.map +1 -1
- package/css/ionic/link.ionic.css.map +1 -1
- package/css/ionic/typography.ionic.css.map +1 -1
- package/css/ionic.bundle.css +1 -1
- package/css/ionic.bundle.css.map +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/ion-action-sheet.cjs.entry.js +1 -1
- package/dist/cjs/ion-alert.cjs.entry.js +1 -1
- package/dist/cjs/ion-datetime_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-loading.cjs.entry.js +1 -1
- package/dist/cjs/ion-menu_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-modal.cjs.entry.js +177 -80
- package/dist/cjs/ion-popover.cjs.entry.js +4 -4
- package/dist/cjs/ion-select-modal.cjs.entry.js +1 -1
- package/dist/cjs/ion-select_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +74 -4
- package/dist/cjs/ion-toast.cjs.entry.js +4 -4
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{overlays-Dhoy6v_5.js → overlays-Hci_7vw_.js} +8 -4
- package/dist/collection/components/modal/animations/ionic.enter.js +40 -0
- package/dist/collection/components/modal/animations/ionic.leave.js +28 -0
- package/dist/collection/components/modal/gestures/sheet.js +72 -10
- package/dist/collection/components/modal/modal.ionic.css +1 -1
- package/dist/collection/components/modal/modal.js +6 -5
- package/dist/collection/components/popover/popover.js +3 -3
- package/dist/collection/components/tab-bar/tab-bar.ionic.css +17 -0
- package/dist/collection/components/tab-bar/tab-bar.js +96 -5
- package/dist/collection/components/toast/toast.js +3 -3
- package/dist/collection/utils/overlays.js +9 -5
- package/dist/docs.json +30 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/ion-action-sheet.entry.js +1 -1
- package/dist/esm/ion-alert.entry.js +1 -1
- package/dist/esm/ion-datetime_3.entry.js +1 -1
- package/dist/esm/ion-loading.entry.js +1 -1
- package/dist/esm/ion-menu_3.entry.js +1 -1
- package/dist/esm/ion-modal.entry.js +178 -81
- package/dist/esm/ion-popover.entry.js +4 -4
- package/dist/esm/ion-select-modal.entry.js +1 -1
- package/dist/esm/ion-select_3.entry.js +1 -1
- package/dist/esm/ion-tab-bar_2.entry.js +75 -5
- package/dist/esm/ion-toast.entry.js +4 -4
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{overlays-CvFHfO3y.js → overlays-rwDDzEs4.js} +9 -5
- package/dist/html.html-data.json +4 -0
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-9ca814ab.entry.js → p-092e92b0.entry.js} +1 -1
- package/dist/ionic/p-09338ca0.entry.js +4 -0
- package/dist/ionic/p-228b6a9c.entry.js +4 -0
- package/dist/ionic/p-49c92227.entry.js +4 -0
- package/dist/ionic/{p-6be2b2d3.entry.js → p-4ce731be.entry.js} +1 -1
- package/dist/ionic/p-575d972f.entry.js +4 -0
- package/dist/ionic/{p-b27ae20f.entry.js → p-5b7eaf60.entry.js} +1 -1
- package/dist/ionic/{p-06de164d.entry.js → p-79ae0425.entry.js} +1 -1
- package/dist/ionic/{p-6bffc700.entry.js → p-7fd3311f.entry.js} +1 -1
- package/dist/ionic/p-C4uUM9DM.js +4 -0
- package/dist/ionic/{p-15ea9223.entry.js → p-b8b20b7e.entry.js} +1 -1
- package/dist/ionic/p-e45be51f.entry.js +4 -0
- package/dist/types/components/modal/animations/ionic.enter.d.ts +6 -0
- package/dist/types/components/modal/animations/ionic.leave.d.ts +6 -0
- package/dist/types/components/modal/gestures/sheet.d.ts +1 -1
- package/dist/types/components/tab-bar/tab-bar.d.ts +15 -0
- package/dist/types/components.d.ts +11 -0
- package/dist/types/utils/overlays.d.ts +1 -1
- package/hydrate/index.js +266 -94
- package/hydrate/index.mjs +266 -94
- package/package.json +2 -2
- package/components/p-GytrfCp8.js +0 -4
- package/components/p-ZeIAjDcZ.js +0 -4
- package/dist/ionic/p-3884bfa4.entry.js +0 -4
- package/dist/ionic/p-4b0f5ffd.entry.js +0 -4
- package/dist/ionic/p-57aeb097.entry.js +0 -4
- package/dist/ionic/p-BYtS2rae.js +0 -4
- package/dist/ionic/p-e9d6ce67.entry.js +0 -4
- package/dist/ionic/p-ef0c281a.entry.js +0 -4
package/hydrate/index.js
CHANGED
|
@@ -8577,7 +8577,7 @@ const setRootAriaHidden = (hidden = false) => {
|
|
|
8577
8577
|
viewContainer.removeAttribute('aria-hidden');
|
|
8578
8578
|
}
|
|
8579
8579
|
};
|
|
8580
|
-
const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts) => {
|
|
8580
|
+
const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, ionicEnterAnimation, opts) => {
|
|
8581
8581
|
var _a, _b;
|
|
8582
8582
|
if (overlay.presented) {
|
|
8583
8583
|
return;
|
|
@@ -8625,11 +8625,15 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
|
|
|
8625
8625
|
document.body.classList.add(BACKDROP_NO_SCROLL);
|
|
8626
8626
|
}
|
|
8627
8627
|
(_a = overlay.willPresentShorthand) === null || _a === void 0 ? void 0 : _a.emit();
|
|
8628
|
+
const theme = getIonTheme(overlay);
|
|
8628
8629
|
const mode = getIonMode$1(overlay);
|
|
8630
|
+
const selectedAnimation = mode === 'ios'
|
|
8631
|
+
? iosEnterAnimation
|
|
8632
|
+
: theme === 'ionic' && ionicEnterAnimation
|
|
8633
|
+
? ionicEnterAnimation
|
|
8634
|
+
: mdEnterAnimation;
|
|
8629
8635
|
// get the user's animation fn if one was provided
|
|
8630
|
-
const animationBuilder = overlay.enterAnimation
|
|
8631
|
-
? overlay.enterAnimation
|
|
8632
|
-
: config.get(name, mode === 'ios' ? iosEnterAnimation : mdEnterAnimation);
|
|
8636
|
+
const animationBuilder = overlay.enterAnimation ? overlay.enterAnimation : config.get(name, selectedAnimation);
|
|
8633
8637
|
const completed = await overlayAnimation(overlay, animationBuilder, overlay.el, opts);
|
|
8634
8638
|
if (completed) {
|
|
8635
8639
|
overlay.didPresent.emit();
|
|
@@ -24971,6 +24975,104 @@ const setCardStatusBarDefault = (defaultStyle = Style.Default) => {
|
|
|
24971
24975
|
StatusBar.setStyle({ style: defaultStyle });
|
|
24972
24976
|
};
|
|
24973
24977
|
|
|
24978
|
+
const createSheetEnterAnimation = (opts) => {
|
|
24979
|
+
const { currentBreakpoint, backdropBreakpoint, expandToScroll, staticBackdropOpacity } = opts;
|
|
24980
|
+
/**
|
|
24981
|
+
* If the backdropBreakpoint is undefined, then the backdrop
|
|
24982
|
+
* should always fade in. If the backdropBreakpoint came before the
|
|
24983
|
+
* current breakpoint, then the backdrop should be fading in.
|
|
24984
|
+
*/
|
|
24985
|
+
const shouldShowBackdrop = backdropBreakpoint === undefined || backdropBreakpoint < currentBreakpoint;
|
|
24986
|
+
let initialBackdrop = '0';
|
|
24987
|
+
if (staticBackdropOpacity) {
|
|
24988
|
+
initialBackdrop = 'calc(var(--backdrop-opacity)';
|
|
24989
|
+
}
|
|
24990
|
+
else if (shouldShowBackdrop) {
|
|
24991
|
+
initialBackdrop = `calc(var(--backdrop-opacity) * ${currentBreakpoint})`;
|
|
24992
|
+
}
|
|
24993
|
+
const backdropAnimation = createAnimation('backdropAnimation').fromTo('opacity', 0, initialBackdrop);
|
|
24994
|
+
if (shouldShowBackdrop) {
|
|
24995
|
+
backdropAnimation
|
|
24996
|
+
.beforeStyles({
|
|
24997
|
+
'pointer-events': 'none',
|
|
24998
|
+
})
|
|
24999
|
+
.afterClearStyles(['pointer-events']);
|
|
25000
|
+
}
|
|
25001
|
+
const wrapperAnimation = createAnimation('wrapperAnimation').keyframes([
|
|
25002
|
+
{ offset: 0, opacity: 1, transform: 'translateY(100%)' },
|
|
25003
|
+
{ offset: 1, opacity: 1, transform: `translateY(${100 - currentBreakpoint * 100}%)` },
|
|
25004
|
+
]);
|
|
25005
|
+
/**
|
|
25006
|
+
* This allows the content to be scrollable at any breakpoint.
|
|
25007
|
+
*/
|
|
25008
|
+
const contentAnimation = !expandToScroll
|
|
25009
|
+
? createAnimation('contentAnimation').keyframes([
|
|
25010
|
+
{ offset: 0, opacity: 1, maxHeight: `${(1 - currentBreakpoint) * 100}%` },
|
|
25011
|
+
{ offset: 1, opacity: 1, maxHeight: `${currentBreakpoint * 100}%` },
|
|
25012
|
+
])
|
|
25013
|
+
: undefined;
|
|
25014
|
+
return { wrapperAnimation, backdropAnimation, contentAnimation };
|
|
25015
|
+
};
|
|
25016
|
+
const createSheetLeaveAnimation = (opts) => {
|
|
25017
|
+
const { currentBreakpoint, backdropBreakpoint } = opts;
|
|
25018
|
+
/**
|
|
25019
|
+
* Backdrop does not always fade in from 0 to 1 if backdropBreakpoint
|
|
25020
|
+
* is defined, so we need to account for that offset by figuring out
|
|
25021
|
+
* what the current backdrop value should be.
|
|
25022
|
+
*/
|
|
25023
|
+
const backdropValue = `calc(var(--backdrop-opacity) * ${getBackdropValueForSheet(currentBreakpoint, backdropBreakpoint)})`;
|
|
25024
|
+
const defaultBackdrop = [
|
|
25025
|
+
{ offset: 0, opacity: backdropValue },
|
|
25026
|
+
{ offset: 1, opacity: 0 },
|
|
25027
|
+
];
|
|
25028
|
+
const customBackdrop = [
|
|
25029
|
+
{ offset: 0, opacity: backdropValue },
|
|
25030
|
+
{ offset: backdropBreakpoint, opacity: 0 },
|
|
25031
|
+
{ offset: 1, opacity: 0 },
|
|
25032
|
+
];
|
|
25033
|
+
const backdropAnimation = createAnimation('backdropAnimation').keyframes(backdropBreakpoint !== 0 ? customBackdrop : defaultBackdrop);
|
|
25034
|
+
const wrapperAnimation = createAnimation('wrapperAnimation').keyframes([
|
|
25035
|
+
{ offset: 0, opacity: 1, transform: `translateY(${100 - currentBreakpoint * 100}%)` },
|
|
25036
|
+
{ offset: 1, opacity: 1, transform: `translateY(100%)` },
|
|
25037
|
+
]);
|
|
25038
|
+
return { wrapperAnimation, backdropAnimation };
|
|
25039
|
+
};
|
|
25040
|
+
|
|
25041
|
+
const createEnterAnimation$2 = () => {
|
|
25042
|
+
const backdropAnimation = createAnimation()
|
|
25043
|
+
.fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
|
|
25044
|
+
.beforeStyles({
|
|
25045
|
+
'pointer-events': 'none',
|
|
25046
|
+
})
|
|
25047
|
+
.afterClearStyles(['pointer-events']);
|
|
25048
|
+
const wrapperAnimation = createAnimation().keyframes([
|
|
25049
|
+
{ offset: 0, opacity: 0.01, transform: 'translateY(40px)' },
|
|
25050
|
+
{ offset: 1, opacity: 1, transform: `translateY(0px)` },
|
|
25051
|
+
]);
|
|
25052
|
+
return { backdropAnimation, wrapperAnimation, contentAnimation: undefined };
|
|
25053
|
+
};
|
|
25054
|
+
/**
|
|
25055
|
+
* Ionic Modal Enter Animation
|
|
25056
|
+
*/
|
|
25057
|
+
const ionicEnterAnimation = (baseEl, opts) => {
|
|
25058
|
+
const { currentBreakpoint, expandToScroll } = opts;
|
|
25059
|
+
const root = getElementRoot(baseEl);
|
|
25060
|
+
const { wrapperAnimation, backdropAnimation, contentAnimation } = currentBreakpoint !== undefined ? createSheetEnterAnimation(opts) : createEnterAnimation$2();
|
|
25061
|
+
backdropAnimation.addElement(root.querySelector('ion-backdrop'));
|
|
25062
|
+
wrapperAnimation.addElement(root.querySelector('.modal-wrapper'));
|
|
25063
|
+
// The content animation is only added if scrolling is enabled for
|
|
25064
|
+
// all the breakpoints.
|
|
25065
|
+
!expandToScroll && (contentAnimation === null || contentAnimation === void 0 ? void 0 : contentAnimation.addElement(baseEl.querySelector('.ion-page')));
|
|
25066
|
+
backdropAnimation.duration(300).easing('ease-out');
|
|
25067
|
+
wrapperAnimation.duration(400).easing('cubic-bezier(0.32, 0.68, 0, 1)');
|
|
25068
|
+
contentAnimation === null || contentAnimation === void 0 ? void 0 : contentAnimation.duration(400).easing('cubic-bezier(0.32, 0.68, 0, 1)');
|
|
25069
|
+
const baseAnimation = createAnimation().addElement(baseEl).addAnimation([backdropAnimation, wrapperAnimation]);
|
|
25070
|
+
if (contentAnimation) {
|
|
25071
|
+
baseAnimation.addAnimation(contentAnimation);
|
|
25072
|
+
}
|
|
25073
|
+
return baseAnimation;
|
|
25074
|
+
};
|
|
25075
|
+
|
|
24974
25076
|
const handleCanDismiss = async (el, animation) => {
|
|
24975
25077
|
/**
|
|
24976
25078
|
* If canDismiss is not a function
|
|
@@ -25397,69 +25499,6 @@ const calculateProgress = (el, deltaY) => {
|
|
|
25397
25499
|
return Math.max(0, Math.min(1, roundedProgress));
|
|
25398
25500
|
};
|
|
25399
25501
|
|
|
25400
|
-
const createSheetEnterAnimation = (opts) => {
|
|
25401
|
-
const { currentBreakpoint, backdropBreakpoint, expandToScroll, staticBackdropOpacity } = opts;
|
|
25402
|
-
/**
|
|
25403
|
-
* If the backdropBreakpoint is undefined, then the backdrop
|
|
25404
|
-
* should always fade in. If the backdropBreakpoint came before the
|
|
25405
|
-
* current breakpoint, then the backdrop should be fading in.
|
|
25406
|
-
*/
|
|
25407
|
-
const shouldShowBackdrop = backdropBreakpoint === undefined || backdropBreakpoint < currentBreakpoint;
|
|
25408
|
-
let initialBackdrop = '0';
|
|
25409
|
-
if (staticBackdropOpacity) {
|
|
25410
|
-
initialBackdrop = 'calc(var(--backdrop-opacity)';
|
|
25411
|
-
}
|
|
25412
|
-
else if (shouldShowBackdrop) {
|
|
25413
|
-
initialBackdrop = `calc(var(--backdrop-opacity) * ${currentBreakpoint})`;
|
|
25414
|
-
}
|
|
25415
|
-
const backdropAnimation = createAnimation('backdropAnimation').fromTo('opacity', 0, initialBackdrop);
|
|
25416
|
-
if (shouldShowBackdrop) {
|
|
25417
|
-
backdropAnimation
|
|
25418
|
-
.beforeStyles({
|
|
25419
|
-
'pointer-events': 'none',
|
|
25420
|
-
})
|
|
25421
|
-
.afterClearStyles(['pointer-events']);
|
|
25422
|
-
}
|
|
25423
|
-
const wrapperAnimation = createAnimation('wrapperAnimation').keyframes([
|
|
25424
|
-
{ offset: 0, opacity: 1, transform: 'translateY(100%)' },
|
|
25425
|
-
{ offset: 1, opacity: 1, transform: `translateY(${100 - currentBreakpoint * 100}%)` },
|
|
25426
|
-
]);
|
|
25427
|
-
/**
|
|
25428
|
-
* This allows the content to be scrollable at any breakpoint.
|
|
25429
|
-
*/
|
|
25430
|
-
const contentAnimation = !expandToScroll
|
|
25431
|
-
? createAnimation('contentAnimation').keyframes([
|
|
25432
|
-
{ offset: 0, opacity: 1, maxHeight: `${(1 - currentBreakpoint) * 100}%` },
|
|
25433
|
-
{ offset: 1, opacity: 1, maxHeight: `${currentBreakpoint * 100}%` },
|
|
25434
|
-
])
|
|
25435
|
-
: undefined;
|
|
25436
|
-
return { wrapperAnimation, backdropAnimation, contentAnimation };
|
|
25437
|
-
};
|
|
25438
|
-
const createSheetLeaveAnimation = (opts) => {
|
|
25439
|
-
const { currentBreakpoint, backdropBreakpoint } = opts;
|
|
25440
|
-
/**
|
|
25441
|
-
* Backdrop does not always fade in from 0 to 1 if backdropBreakpoint
|
|
25442
|
-
* is defined, so we need to account for that offset by figuring out
|
|
25443
|
-
* what the current backdrop value should be.
|
|
25444
|
-
*/
|
|
25445
|
-
const backdropValue = `calc(var(--backdrop-opacity) * ${getBackdropValueForSheet(currentBreakpoint, backdropBreakpoint)})`;
|
|
25446
|
-
const defaultBackdrop = [
|
|
25447
|
-
{ offset: 0, opacity: backdropValue },
|
|
25448
|
-
{ offset: 1, opacity: 0 },
|
|
25449
|
-
];
|
|
25450
|
-
const customBackdrop = [
|
|
25451
|
-
{ offset: 0, opacity: backdropValue },
|
|
25452
|
-
{ offset: backdropBreakpoint, opacity: 0 },
|
|
25453
|
-
{ offset: 1, opacity: 0 },
|
|
25454
|
-
];
|
|
25455
|
-
const backdropAnimation = createAnimation('backdropAnimation').keyframes(backdropBreakpoint !== 0 ? customBackdrop : defaultBackdrop);
|
|
25456
|
-
const wrapperAnimation = createAnimation('wrapperAnimation').keyframes([
|
|
25457
|
-
{ offset: 0, opacity: 1, transform: `translateY(${100 - currentBreakpoint * 100}%)` },
|
|
25458
|
-
{ offset: 1, opacity: 1, transform: `translateY(100%)` },
|
|
25459
|
-
]);
|
|
25460
|
-
return { wrapperAnimation, backdropAnimation };
|
|
25461
|
-
};
|
|
25462
|
-
|
|
25463
25502
|
const createEnterAnimation$1 = () => {
|
|
25464
25503
|
const backdropAnimation = createAnimation()
|
|
25465
25504
|
.fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
|
|
@@ -25850,16 +25889,16 @@ const mdLeaveAnimation$2 = (baseEl, opts) => {
|
|
|
25850
25889
|
return baseAnimation;
|
|
25851
25890
|
};
|
|
25852
25891
|
|
|
25853
|
-
const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, animation, breakpoints = [], expandToScroll, getCurrentBreakpoint, onDismiss, onBreakpointChange,
|
|
25892
|
+
const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, animation, breakpoints = [], expandToScroll, getCurrentBreakpoint, onDismiss, onBreakpointChange, usePhysicsBasedGesture, onDragStart, onDragMove, onDragEnd) => {
|
|
25854
25893
|
// Defaults for the sheet swipe animation
|
|
25855
25894
|
const defaultBackdrop = [
|
|
25856
25895
|
{ offset: 0, opacity: 'var(--backdrop-opacity)' },
|
|
25857
|
-
{ offset: 1, opacity:
|
|
25896
|
+
{ offset: 1, opacity: usePhysicsBasedGesture ? 'var(--backdrop-opacity)' : 0.01 },
|
|
25858
25897
|
];
|
|
25859
25898
|
const customBackdrop = [
|
|
25860
25899
|
{ offset: 0, opacity: 'var(--backdrop-opacity)' },
|
|
25861
|
-
{ offset: 1 - backdropBreakpoint, opacity:
|
|
25862
|
-
{ offset: 1, opacity:
|
|
25900
|
+
{ offset: 1 - backdropBreakpoint, opacity: usePhysicsBasedGesture ? 'var(--backdrop-opacity)' : 0 },
|
|
25901
|
+
{ offset: 1, opacity: usePhysicsBasedGesture ? 'var(--backdrop-opacity)' : 0 },
|
|
25863
25902
|
];
|
|
25864
25903
|
const SheetDefaults = {
|
|
25865
25904
|
WRAPPER_KEYFRAMES: [
|
|
@@ -26182,7 +26221,9 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
26182
26221
|
: step;
|
|
26183
26222
|
offset = clamp(0.0001, processedStep, maxStep);
|
|
26184
26223
|
animation.progressStep(offset);
|
|
26185
|
-
const snapBreakpoint =
|
|
26224
|
+
const snapBreakpoint = usePhysicsBasedGesture
|
|
26225
|
+
? calculateVelocitySnapBreakpoint(detail.deltaY, detail.velocityY, detail.currentY)
|
|
26226
|
+
: calculatePositionSnapBreakpoint(detail.deltaY);
|
|
26186
26227
|
const eventDetail = {
|
|
26187
26228
|
currentY: detail.currentY,
|
|
26188
26229
|
deltaY: detail.deltaY,
|
|
@@ -26193,7 +26234,9 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
26193
26234
|
onDragMove(eventDetail);
|
|
26194
26235
|
};
|
|
26195
26236
|
const onEnd = (detail) => {
|
|
26196
|
-
const snapBreakpoint =
|
|
26237
|
+
const snapBreakpoint = usePhysicsBasedGesture
|
|
26238
|
+
? calculateVelocitySnapBreakpoint(detail.deltaY, detail.velocityY, detail.currentY)
|
|
26239
|
+
: calculatePositionSnapBreakpoint(detail.deltaY);
|
|
26197
26240
|
const eventDetail = {
|
|
26198
26241
|
currentY: detail.currentY,
|
|
26199
26242
|
deltaY: detail.deltaY,
|
|
@@ -26240,6 +26283,14 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
26240
26283
|
*/
|
|
26241
26284
|
const shouldPreventDismiss = canDismiss && breakpoint === 0;
|
|
26242
26285
|
const snapToBreakpoint = shouldPreventDismiss ? currentBreakpoint : breakpoint;
|
|
26286
|
+
/**
|
|
26287
|
+
* Detect snap-back behavior: when the snap target is the same as the current breakpoint,
|
|
26288
|
+
* the user released before crossing the threshold to a new breakpoint.
|
|
26289
|
+
* Apply different timing and easing for snap-back vs. snap-to-new.
|
|
26290
|
+
*/
|
|
26291
|
+
const isSnapBack = snapToBreakpoint === currentBreakpoint;
|
|
26292
|
+
const duration = usePhysicsBasedGesture ? (isSnapBack ? 300 : 400) : 500;
|
|
26293
|
+
const easing = isSnapBack ? 'cubic-bezier(0.34, 1.4, 0.64, 1)' : 'cubic-bezier(0.32, 0.68, 0, 1)';
|
|
26243
26294
|
const shouldRemainOpen = snapToBreakpoint !== 0;
|
|
26244
26295
|
currentBreakpoint = 0;
|
|
26245
26296
|
/**
|
|
@@ -26254,13 +26305,13 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
26254
26305
|
backdropAnimation.keyframes([
|
|
26255
26306
|
{
|
|
26256
26307
|
offset: 0,
|
|
26257
|
-
opacity:
|
|
26308
|
+
opacity: usePhysicsBasedGesture
|
|
26258
26309
|
? 'var(--backdrop-opacity)'
|
|
26259
26310
|
: `calc(var(--backdrop-opacity) * ${getBackdropValueForSheet(1 - breakpointOffset, backdropBreakpoint)})`,
|
|
26260
26311
|
},
|
|
26261
26312
|
{
|
|
26262
26313
|
offset: 1,
|
|
26263
|
-
opacity:
|
|
26314
|
+
opacity: usePhysicsBasedGesture
|
|
26264
26315
|
? 'var(--backdrop-opacity)'
|
|
26265
26316
|
: `calc(var(--backdrop-opacity) * ${getBackdropValueForSheet(snapToBreakpoint, backdropBreakpoint)})`,
|
|
26266
26317
|
},
|
|
@@ -26280,6 +26331,12 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
26280
26331
|
}
|
|
26281
26332
|
animation.progressStep(0);
|
|
26282
26333
|
}
|
|
26334
|
+
/**
|
|
26335
|
+
* Apply the appropriate easing curve for this snap behavior.
|
|
26336
|
+
*/
|
|
26337
|
+
if (usePhysicsBasedGesture) {
|
|
26338
|
+
animation.easing(easing);
|
|
26339
|
+
}
|
|
26283
26340
|
/**
|
|
26284
26341
|
* Gesture should remain disabled until the
|
|
26285
26342
|
* snapping animation completes.
|
|
@@ -26369,7 +26426,7 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
26369
26426
|
* be added every time onEnd runs.
|
|
26370
26427
|
*/
|
|
26371
26428
|
}, { oneTimeCallback: true })
|
|
26372
|
-
.progressEnd(1, 0, animated ?
|
|
26429
|
+
.progressEnd(1, 0, animated ? duration : 0);
|
|
26373
26430
|
});
|
|
26374
26431
|
};
|
|
26375
26432
|
/**
|
|
@@ -26380,7 +26437,7 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
26380
26437
|
* @param deltaY The change in Y position since the gesture started.
|
|
26381
26438
|
* @returns The snap breakpoint value.
|
|
26382
26439
|
*/
|
|
26383
|
-
const
|
|
26440
|
+
const calculatePositionSnapBreakpoint = (deltaY) => {
|
|
26384
26441
|
/**
|
|
26385
26442
|
* Calculates the real-time vertical position of the modal.
|
|
26386
26443
|
* We combine the wrapper's current bounding box position with the
|
|
@@ -26400,6 +26457,50 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
26400
26457
|
});
|
|
26401
26458
|
return snapBreakpoint;
|
|
26402
26459
|
};
|
|
26460
|
+
/**
|
|
26461
|
+
* Calculates the snap breakpoint using velocity-based logic.
|
|
26462
|
+
* This provides a more intuitive and responsive sheet behavior for the Ionic theme.
|
|
26463
|
+
*
|
|
26464
|
+
* Rules:
|
|
26465
|
+
* 1. Fast downward flick (> 500 px/s) always dismisses, regardless of position
|
|
26466
|
+
* 2. Fast upward flick (> 400 px/s) snaps to the next breakpoint above
|
|
26467
|
+
* 3. If dragged 40% below current snap point without fast upward flick, dismisses
|
|
26468
|
+
* 4. Otherwise, falls back to position-based snap (closest breakpoint)
|
|
26469
|
+
*
|
|
26470
|
+
* @param deltaY The change in Y position since gesture started
|
|
26471
|
+
* @param velocityY The velocity in pixels per millisecond
|
|
26472
|
+
* @param currentY The current Y position of the gesture
|
|
26473
|
+
* @returns The snap breakpoint value
|
|
26474
|
+
*/
|
|
26475
|
+
const calculateVelocitySnapBreakpoint = (deltaY, velocityY, currentY) => {
|
|
26476
|
+
// Convert velocity from px/ms to px/s for easier threshold comparison
|
|
26477
|
+
const velocityYPerSecond = velocityY * 1000;
|
|
26478
|
+
// Calculate current progress (0 = fully closed, 1 = fully expanded)
|
|
26479
|
+
const currentProgress = calculateProgress(currentY);
|
|
26480
|
+
// Rule 1: Fast downward flick always dismisses
|
|
26481
|
+
if (velocityYPerSecond > 500) {
|
|
26482
|
+
return minBreakpoint;
|
|
26483
|
+
}
|
|
26484
|
+
// Rule 2: Fast upward flick moves to next breakpoint above
|
|
26485
|
+
if (velocityYPerSecond < -400) {
|
|
26486
|
+
// Find next breakpoint above current position
|
|
26487
|
+
const nextBreakpoint = breakpoints.find((bp) => bp > currentProgress);
|
|
26488
|
+
// If no breakpoint above, stay at max breakpoint
|
|
26489
|
+
return nextBreakpoint !== null && nextBreakpoint !== void 0 ? nextBreakpoint : maxBreakpoint;
|
|
26490
|
+
}
|
|
26491
|
+
// Rule 3: 40% dismissal rule (only if not flicking up and 0 breakpoint exists)
|
|
26492
|
+
if (minBreakpoint === 0 && currentBreakpoint > 0) {
|
|
26493
|
+
// Calculate how far we've moved below the current snap point
|
|
26494
|
+
const distanceBelowSnap = currentBreakpoint - currentProgress;
|
|
26495
|
+
const percentageBelowSnap = distanceBelowSnap / currentBreakpoint;
|
|
26496
|
+
// If dragged more than 40% below and not flicking up, dismiss
|
|
26497
|
+
if (percentageBelowSnap > 0.4 && velocityYPerSecond <= 400) {
|
|
26498
|
+
return 0;
|
|
26499
|
+
}
|
|
26500
|
+
}
|
|
26501
|
+
// Rule 4: Fallback to position-based snap (existing logic)
|
|
26502
|
+
return calculatePositionSnapBreakpoint(deltaY);
|
|
26503
|
+
};
|
|
26403
26504
|
/**
|
|
26404
26505
|
* Calculates the progress of the swipe gesture.
|
|
26405
26506
|
*
|
|
@@ -26648,7 +26749,7 @@ const clearSafeAreaOverrides = (hostEl) => {
|
|
|
26648
26749
|
hostEl.style.removeProperty('--ion-safe-area-right');
|
|
26649
26750
|
};
|
|
26650
26751
|
|
|
26651
|
-
const modalIonicCss = () => `:host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-width:0;--border-style:none;--border-color:transparent;--box-shadow:none;right:0;left: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;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}.modal-handle{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;cursor:pointer;z-index:11}.modal-handle::before{position:absolute;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}: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{--background:var(--token-bg-surface-default, var(--token-primitives-base-white, #ffffff));--box-shadow:var(--token-elevation-3, 0px 2px 7px 0px rgba(0, 0, 0, 0.05), 0px 6px 32px 0px rgba(0, 0, 0, 0.16));--backdrop-opacity:
|
|
26752
|
+
const modalIonicCss = () => `:host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-width:0;--border-style:none;--border-color:transparent;--box-shadow:none;right:0;left: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;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}.modal-handle{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;cursor:pointer;z-index:11}.modal-handle::before{position:absolute;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}: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{--background:var(--token-bg-surface-default, var(--token-primitives-base-white, #ffffff));--box-shadow:var(--token-elevation-3, 0px 2px 7px 0px rgba(0, 0, 0, 0.05), 0px 6px 32px 0px rgba(0, 0, 0, 0.16));--backdrop-opacity:0.7;color:var(--token-text-default, var(--token-primitives-neutral-1200, #242424))}:host(.modal-round){--border-radius:var(--token-border-radius-1000, var(--token-scale-1000, 40px))}:host(.modal-soft){--border-radius:var(--token-border-radius-400, var(--token-scale-400, 16px))}:host(.modal-rectangular){--border-radius:var(--token-border-radius-0, var(--token-scale-0, 0px))}:host(.select-modal.modal-default){--max-height:45%;--max-width:calc(100% - (var(--token-space-400, var(--token-scale-400, 16px)) * 2));--min-height:340px}.modal-handle{right:0px;left:0px;top:var(--token-space-300, var(--token-scale-300, 12px));border-radius:var(--token-border-radius-100, var(--token-scale-100, 4px));width:var(--token-scale-1100, 44px);height:var(--token-scale-100, 4px);background-color:var(--token-primitives-neutral-300, #e0e0e0)}.modal-handle::before{-webkit-padding-start:var(--token-space-100, var(--token-scale-100, 4px));padding-inline-start:var(--token-space-100, var(--token-scale-100, 4px));-webkit-padding-end:var(--token-space-100, var(--token-scale-100, 4px));padding-inline-end:var(--token-space-100, var(--token-scale-100, 4px));padding-top:var(--token-space-100, var(--token-scale-100, 4px));padding-bottom:var(--token-space-100, var(--token-scale-100, 4px))}: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}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + var(--token-scale-250, 10px)))}`;
|
|
26652
26753
|
|
|
26653
26754
|
const modalIosCss = () => `:host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-width:0;--border-style:none;--border-color:transparent;--box-shadow:none;right:0;left: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;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}.modal-handle{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;cursor:pointer;z-index:11}.modal-handle::before{position:absolute;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}: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{--background:var(--ion-background-color, #fff);--border-radius:0;--backdrop-opacity:0;color:var(--ion-text-color, #000)}@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{right:0px;left:0px;top:5px;border-radius:8px;width:36px;height:5px;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be))}.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;width:36px;height:5px}:host(.modal-sheet){--height:calc(100% - (var(--ion-modal-offset-top, 0px) + 10px))}: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}`;
|
|
26654
26755
|
|
|
@@ -27099,7 +27200,7 @@ class Modal {
|
|
|
27099
27200
|
this.statusBarStyle = await StatusBar.getStyle();
|
|
27100
27201
|
setCardStatusBarDark();
|
|
27101
27202
|
}
|
|
27102
|
-
await present(this, 'modalEnter', iosEnterAnimation$3, mdEnterAnimation$2, {
|
|
27203
|
+
await present(this, 'modalEnter', iosEnterAnimation$3, mdEnterAnimation$2, ionicEnterAnimation, {
|
|
27103
27204
|
presentingEl: presentingElement,
|
|
27104
27205
|
currentBreakpoint: this.initialBreakpoint,
|
|
27105
27206
|
backdropBreakpoint: this.backdropBreakpoint,
|
|
@@ -27786,20 +27887,20 @@ class Modal {
|
|
|
27786
27887
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
27787
27888
|
const shape = this.getShape();
|
|
27788
27889
|
const isSheetModalWithHandle = isSheetModal && showHandle;
|
|
27789
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
27890
|
+
return (hAsync(Host, Object.assign({ key: '3011c8f49c1ccb6c20c01db35b59fe4f6e22ec01', "no-router": true,
|
|
27790
27891
|
// Allow the modal to be navigable when the handle is focusable
|
|
27791
27892
|
tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
|
|
27792
27893
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
27793
|
-
}, class: Object.assign({ [theme]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-${shape}`]: shape !== undefined, [`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: '
|
|
27894
|
+
}, class: Object.assign({ [theme]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-${shape}`]: shape !== undefined, [`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: 'ab99fb4ff1b335b06d5676890012dfe3cd1a1a01', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), theme === 'ios' && hAsync("div", { key: '95d4c79c4455c6a5ae6d581fa9dfaabdbee8c567', class: "modal-shadow" }), hAsync("div", Object.assign({ key: '2d7d2406cdb986c69ef52708d33eca67d8a877f8',
|
|
27794
27895
|
/*
|
|
27795
27896
|
role and aria-modal must be used on the
|
|
27796
27897
|
same element. They must also be set inside the
|
|
27797
27898
|
shadow DOM otherwise ion-button will not be highlighted
|
|
27798
27899
|
when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
|
|
27799
27900
|
*/
|
|
27800
|
-
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: '
|
|
27901
|
+
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: 'ccec8bfc314763bd6dd868b69fbfdc085f5957c9', class: "modal-handle",
|
|
27801
27902
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
27802
|
-
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: '
|
|
27903
|
+
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: '38469e3447b46983783627d697e12cadcef614fa', onSlotchange: this.onSlotChange }))));
|
|
27803
27904
|
}
|
|
27804
27905
|
get el() { return getElement(this); }
|
|
27805
27906
|
static get watchers() { return {
|
|
@@ -32214,7 +32315,7 @@ class Popover {
|
|
|
32214
32315
|
else if (!this.keepContentsMounted) {
|
|
32215
32316
|
await waitForMount();
|
|
32216
32317
|
}
|
|
32217
|
-
await present(this, 'popoverEnter', iosEnterAnimation$1, mdEnterAnimation$1, {
|
|
32318
|
+
await present(this, 'popoverEnter', iosEnterAnimation$1, mdEnterAnimation$1, undefined, {
|
|
32218
32319
|
event: event || this.event,
|
|
32219
32320
|
size: this.size,
|
|
32220
32321
|
trigger: this.triggerEl,
|
|
@@ -32323,9 +32424,9 @@ class Popover {
|
|
|
32323
32424
|
const { onLifecycle, parentPopover, dismissOnSelect, side, arrow, htmlAttributes, focusTrap } = this;
|
|
32324
32425
|
const desktop = isPlatform('desktop');
|
|
32325
32426
|
const enableArrow = arrow && !parentPopover;
|
|
32326
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
32427
|
+
return (hAsync(Host, Object.assign({ key: 'ba8801218aa8543eae0e8e2c57fbd0d4fbb2c8ff', "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
|
|
32327
32428
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
32328
|
-
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [theme]: 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 && hAsync("ion-backdrop", { key: '
|
|
32429
|
+
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [theme]: 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 && hAsync("ion-backdrop", { key: '0301c9a9ed70cf34445e89484cd4145dc98f3d4c', tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), hAsync("div", { key: 'd017b8cda9eb474cf990222c90539697308a1c8f', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && hAsync("div", { key: 'fdf8ec2e98a29bfa3e26788e4a432ff402800202', class: "popover-arrow", part: "arrow" }), hAsync("div", { key: '9498eace0a68daf39e7c0580ca46e33a9791f62c', class: "popover-content", part: "content" }, hAsync("slot", { key: '0f10c7e335d2f4f75e10d7fde5244c3dd5ae0bb4' })))));
|
|
32329
32430
|
}
|
|
32330
32431
|
get el() { return getElement(this); }
|
|
32331
32432
|
static get watchers() { return {
|
|
@@ -39938,7 +40039,7 @@ class Tab {
|
|
|
39938
40039
|
}; }
|
|
39939
40040
|
}
|
|
39940
40041
|
|
|
39941
|
-
const tabBarIonicCss = () => `:host{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-top:var(--border);background:var(--background);color:var(--color);text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-sizing:content-box !important;box-sizing:content-box !important}: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]){border-top:0;border-bottom:var(--border)}:host(.tab-bar-hidden){display:none !important}:host(.tab-bar-full){width:auto;contain:strict;padding-bottom:var(--ion-safe-area-bottom, 0);padding-right:var(--ion-safe-area-right);padding-left:var(--ion-safe-area-left);}:host([slot=top].tab-bar-full){padding-top:var(--ion-safe-area-top, 0);padding-bottom:0}:host{--background:var(--ion-tab-bar-background, var(--token-bg-surface-default, var(--token-primitives-base-white, #ffffff)));--background-activated:var(--ion-tab-bar-background-activated, var(--token-bg-select-default, var(--token-semantics-primary-100, var(--token-primitives-blue-100, #e9ecfc))));--background-focused:var(--ion-tab-bar-background-focused, transparent);--border:var(--token-border-size-0, var(--token-scale-0, 0px)) var(--token-border-style-solid, solid) var(--ion-tab-bar-border-color, transparent);--color:var(--ion-tab-bar-color, var(--token-primitives-neutral-800, #626262));--color-selected:var(--ion-tab-bar-color-selected, var(--token-text-primary, var(--token-semantics-primary-900, var(--token-primitives-blue-900, #0d4bc3))));-ms-flex-pack:unset;justify-content:unset;max-width:100%;min-height:calc(var(--token-scale-1400, 56px) - var(--token-space-100, var(--token-scale-100, 4px)) * 2);gap:var(--token-space-300, var(--token-scale-300, 12px));-webkit-box-shadow:var(--token-elevation-2, 0px 1px 5px 0px rgba(0, 0, 0, 0.05), 0px 8px 25px 0px rgba(0, 0, 0, 0.08));box-shadow:var(--token-elevation-2, 0px 1px 5px 0px rgba(0, 0, 0, 0.05), 0px 8px 25px 0px rgba(0, 0, 0, 0.08));overflow:auto hidden;z-index:10}:host(.tab-bar-full){padding-top:var(--token-space-100, var(--token-scale-100, 4px));padding-bottom:calc(var(--token-space-100, var(--token-scale-100, 4px)) + var(--ion-safe-area-bottom, 0));padding-right:calc(var(--token-space-400, var(--token-scale-400, 16px)) + var(--ion-safe-area-right, 0));padding-left:calc(var(--token-space-400, var(--token-scale-400, 16px)) + var(--ion-safe-area-left, 0));}:host([slot=top].tab-bar-full){padding-top:calc(var(--token-space-100, var(--token-scale-100, 4px)) + var(--ion-safe-area-top, 0));padding-bottom:var(--token-space-100, var(--token-scale-100, 4px))}:host(.tab-bar-compact){-webkit-padding-start:var(--token-space-400, var(--token-scale-400, 16px));padding-inline-start:var(--token-space-400, var(--token-scale-400, 16px));-webkit-padding-end:var(--token-space-400, var(--token-scale-400, 16px));padding-inline-end:var(--token-space-400, var(--token-scale-400, 16px));padding-top:var(--token-space-100, var(--token-scale-100, 4px));padding-bottom:var(--token-space-100, var(--token-scale-100, 4px));position:absolute;-ms-flex-item-align:center;align-self:center;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;contain:content}:host([slot=top].tab-bar-compact){top:calc(var(--token-space-100, var(--token-scale-100, 4px)) + var(--ion-safe-area-top, 0))}:host([slot=bottom].tab-bar-compact){bottom:calc(var(--token-space-400, var(--token-scale-400, 16px)) + var(--ion-safe-area-bottom, 0))}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){:host(.tab-bar-translucent){--background:rgba(255, 255, 255, 0.6);-webkit-backdrop-filter:var(--tab-bar-backdrop-filter, blur(12px));backdrop-filter:var(--tab-bar-backdrop-filter, blur(12px))}:host(.tab-bar-translucent) ::slotted(ion-tab-button.ion-focused){--background:transparent}}:host(.tab-bar-soft){border-radius:var(--token-border-radius-400, var(--token-scale-400, 16px))}:host(.tab-bar-round){border-radius:var(--token-border-radius-full, 999px)}:host(.tab-bar-rectangular){border-radius:var(--token-border-radius-0, var(--token-scale-0, 0px))}`;
|
|
40042
|
+
const tabBarIonicCss = () => `:host{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-top:var(--border);background:var(--background);color:var(--color);text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-sizing:content-box !important;box-sizing:content-box !important}: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]){border-top:0;border-bottom:var(--border)}:host(.tab-bar-hidden){display:none !important}:host(.tab-bar-full){width:auto;contain:strict;padding-bottom:var(--ion-safe-area-bottom, 0);padding-right:var(--ion-safe-area-right);padding-left:var(--ion-safe-area-left);}:host([slot=top].tab-bar-full){padding-top:var(--ion-safe-area-top, 0);padding-bottom:0}:host{--background:var(--ion-tab-bar-background, var(--token-bg-surface-default, var(--token-primitives-base-white, #ffffff)));--background-activated:var(--ion-tab-bar-background-activated, var(--token-bg-select-default, var(--token-semantics-primary-100, var(--token-primitives-blue-100, #e9ecfc))));--background-focused:var(--ion-tab-bar-background-focused, transparent);--border:var(--token-border-size-0, var(--token-scale-0, 0px)) var(--token-border-style-solid, solid) var(--ion-tab-bar-border-color, transparent);--color:var(--ion-tab-bar-color, var(--token-primitives-neutral-800, #626262));--color-selected:var(--ion-tab-bar-color-selected, var(--token-text-primary, var(--token-semantics-primary-900, var(--token-primitives-blue-900, #0d4bc3))));-ms-flex-pack:unset;justify-content:unset;max-width:100%;min-height:calc(var(--token-scale-1400, 56px) - var(--token-space-100, var(--token-scale-100, 4px)) * 2);gap:var(--token-space-300, var(--token-scale-300, 12px));-webkit-box-shadow:var(--token-elevation-2, 0px 1px 5px 0px rgba(0, 0, 0, 0.05), 0px 8px 25px 0px rgba(0, 0, 0, 0.08));box-shadow:var(--token-elevation-2, 0px 1px 5px 0px rgba(0, 0, 0, 0.05), 0px 8px 25px 0px rgba(0, 0, 0, 0.08));overflow:auto hidden;z-index:10}:host(.tab-bar-full){padding-top:var(--token-space-100, var(--token-scale-100, 4px));padding-bottom:calc(var(--token-space-100, var(--token-scale-100, 4px)) + var(--ion-safe-area-bottom, 0));padding-right:calc(var(--token-space-400, var(--token-scale-400, 16px)) + var(--ion-safe-area-right, 0));padding-left:calc(var(--token-space-400, var(--token-scale-400, 16px)) + var(--ion-safe-area-left, 0));}:host([slot=top].tab-bar-full){padding-top:calc(var(--token-space-100, var(--token-scale-100, 4px)) + var(--ion-safe-area-top, 0));padding-bottom:var(--token-space-100, var(--token-scale-100, 4px))}:host(.tab-bar-compact){-webkit-padding-start:var(--token-space-400, var(--token-scale-400, 16px));padding-inline-start:var(--token-space-400, var(--token-scale-400, 16px));-webkit-padding-end:var(--token-space-400, var(--token-scale-400, 16px));padding-inline-end:var(--token-space-400, var(--token-scale-400, 16px));padding-top:var(--token-space-100, var(--token-scale-100, 4px));padding-bottom:var(--token-space-100, var(--token-scale-100, 4px));position:absolute;-ms-flex-item-align:center;align-self:center;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;-webkit-transform:translateX(-50%);transform:translateX(-50%);contain:content}:host(.tab-bar-compact){inset-inline-start:50%}:host([slot=top].tab-bar-compact){top:calc(var(--token-space-100, var(--token-scale-100, 4px)) + var(--ion-safe-area-top, 0))}:host([slot=bottom].tab-bar-compact){bottom:calc(var(--token-space-400, var(--token-scale-400, 16px)) + var(--ion-safe-area-bottom, 0))}:host(.tab-bar-hide-on-scroll){-webkit-transition:-webkit-transform var(--token-transition-time-200, 200ms) var(--token-transition-curve-spring, cubic-bezier(0.16, 1, 0.3, 1));transition:-webkit-transform var(--token-transition-time-200, 200ms) var(--token-transition-curve-spring, cubic-bezier(0.16, 1, 0.3, 1));transition:transform var(--token-transition-time-200, 200ms) var(--token-transition-curve-spring, cubic-bezier(0.16, 1, 0.3, 1));transition:transform var(--token-transition-time-200, 200ms) var(--token-transition-curve-spring, cubic-bezier(0.16, 1, 0.3, 1)), -webkit-transform var(--token-transition-time-200, 200ms) var(--token-transition-curve-spring, cubic-bezier(0.16, 1, 0.3, 1))}:host(.tab-bar-scroll-hidden){-webkit-transform:translateY(calc(100% + var(--ion-safe-area-bottom, 0) + var(--token-space-1000, var(--token-scale-1000, 40px)))) translateX(-50%);transform:translateY(calc(100% + var(--ion-safe-area-bottom, 0) + var(--token-space-1000, var(--token-scale-1000, 40px)))) translateX(-50%);-webkit-transition:-webkit-transform var(--token-transition-time-350, 350ms) var(--token-transition-curve-base, cubic-bezier(0.4, 0, 1, 1));transition:-webkit-transform var(--token-transition-time-350, 350ms) var(--token-transition-curve-base, cubic-bezier(0.4, 0, 1, 1));transition:transform var(--token-transition-time-350, 350ms) var(--token-transition-curve-base, cubic-bezier(0.4, 0, 1, 1));transition:transform var(--token-transition-time-350, 350ms) var(--token-transition-curve-base, cubic-bezier(0.4, 0, 1, 1)), -webkit-transform var(--token-transition-time-350, 350ms) var(--token-transition-curve-base, cubic-bezier(0.4, 0, 1, 1))}:host([slot=top].tab-bar-scroll-hidden){-webkit-transform:translateY(-100%) translateX(-50%);transform:translateY(-100%) translateX(-50%)}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){:host(.tab-bar-translucent){--background:rgba(255, 255, 255, 0.6);-webkit-backdrop-filter:var(--tab-bar-backdrop-filter, blur(12px));backdrop-filter:var(--tab-bar-backdrop-filter, blur(12px))}:host(.tab-bar-translucent) ::slotted(ion-tab-button.ion-focused){--background:transparent}}:host(.tab-bar-soft){border-radius:var(--token-border-radius-400, var(--token-scale-400, 16px))}:host(.tab-bar-round){border-radius:var(--token-border-radius-full, 999px)}:host(.tab-bar-rectangular){border-radius:var(--token-border-radius-0, var(--token-scale-0, 0px))}`;
|
|
39942
40043
|
|
|
39943
40044
|
const tabBarIosCss = () => `:host{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-top:var(--border);background:var(--background);color:var(--color);text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-sizing:content-box !important;box-sizing:content-box !important}: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]){border-top:0;border-bottom:var(--border)}:host(.tab-bar-hidden){display:none !important}:host(.tab-bar-full){width:auto;contain:strict;padding-bottom:var(--ion-safe-area-bottom, 0);padding-right:var(--ion-safe-area-right);padding-left:var(--ion-safe-area-left);}:host([slot=top].tab-bar-full){padding-top:var(--ion-safe-area-top, 0);padding-bottom:0}:host{z-index:10}: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{--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)}}`;
|
|
39944
40045
|
|
|
@@ -39956,7 +40057,16 @@ class TabBar {
|
|
|
39956
40057
|
this.keyboardCtrl = null;
|
|
39957
40058
|
this.keyboardCtrlPromise = null;
|
|
39958
40059
|
this.didLoad = false;
|
|
40060
|
+
this.lastScrollTop = 0;
|
|
40061
|
+
this.scrollDirectionChangeTop = 0;
|
|
39959
40062
|
this.keyboardVisible = false;
|
|
40063
|
+
this.scrollHidden = false;
|
|
40064
|
+
/**
|
|
40065
|
+
* If `true`, the tab bar will be hidden when the user scrolls down
|
|
40066
|
+
* and shown when the user scrolls up.
|
|
40067
|
+
* Only applies when the theme is `"ionic"` and `expand` is `"compact"`.
|
|
40068
|
+
*/
|
|
40069
|
+
this.hideOnScroll = false;
|
|
39960
40070
|
/**
|
|
39961
40071
|
* If `true`, the tab bar will be translucent.
|
|
39962
40072
|
* Only applies when the theme is `"ios"` and the device supports
|
|
@@ -39998,6 +40108,7 @@ class TabBar {
|
|
|
39998
40108
|
tab: this.selectedTab,
|
|
39999
40109
|
});
|
|
40000
40110
|
}
|
|
40111
|
+
this.setupHideOnScroll();
|
|
40001
40112
|
}
|
|
40002
40113
|
async connectedCallback() {
|
|
40003
40114
|
const promise = createKeyboardController(async (keyboardOpen, waitForResize) => {
|
|
@@ -40035,6 +40146,63 @@ class TabBar {
|
|
|
40035
40146
|
this.keyboardCtrl.destroy();
|
|
40036
40147
|
this.keyboardCtrl = null;
|
|
40037
40148
|
}
|
|
40149
|
+
this.destroyHideOnScroll();
|
|
40150
|
+
}
|
|
40151
|
+
setupHideOnScroll() {
|
|
40152
|
+
var _a;
|
|
40153
|
+
const theme = getIonTheme(this);
|
|
40154
|
+
if (theme !== 'ionic' || !this.hideOnScroll || this.expand !== 'compact') {
|
|
40155
|
+
return;
|
|
40156
|
+
}
|
|
40157
|
+
const footerEl = this.el.closest('ion-footer');
|
|
40158
|
+
const pageEl = (_a = footerEl === null || footerEl === void 0 ? void 0 : footerEl.closest('ion-page, .ion-page')) !== null && _a !== void 0 ? _a : this.el.closest('ion-page, .ion-page');
|
|
40159
|
+
const contentEl = pageEl ? findIonContent(pageEl) : null;
|
|
40160
|
+
if (!contentEl) {
|
|
40161
|
+
return;
|
|
40162
|
+
}
|
|
40163
|
+
this.initScrollListener(contentEl);
|
|
40164
|
+
}
|
|
40165
|
+
async initScrollListener(contentEl) {
|
|
40166
|
+
const scrollEl = (this.scrollEl = await getScrollElement(contentEl));
|
|
40167
|
+
this.contentScrollCallback = () => {
|
|
40168
|
+
readTask(() => {
|
|
40169
|
+
const scrollTop = scrollEl.scrollTop;
|
|
40170
|
+
const shouldHide = this.checkScrollStatus(scrollTop);
|
|
40171
|
+
if (shouldHide !== this.scrollHidden) {
|
|
40172
|
+
writeTask(() => {
|
|
40173
|
+
this.scrollHidden = shouldHide;
|
|
40174
|
+
});
|
|
40175
|
+
}
|
|
40176
|
+
this.lastScrollTop = scrollTop;
|
|
40177
|
+
});
|
|
40178
|
+
};
|
|
40179
|
+
scrollEl.addEventListener('scroll', this.contentScrollCallback, { passive: true });
|
|
40180
|
+
}
|
|
40181
|
+
destroyHideOnScroll() {
|
|
40182
|
+
if (this.scrollEl && this.contentScrollCallback) {
|
|
40183
|
+
this.scrollEl.removeEventListener('scroll', this.contentScrollCallback);
|
|
40184
|
+
this.contentScrollCallback = undefined;
|
|
40185
|
+
}
|
|
40186
|
+
}
|
|
40187
|
+
checkScrollStatus(scrollTop) {
|
|
40188
|
+
// Always visible within the first 80px of scroll
|
|
40189
|
+
const visibleZone = 80;
|
|
40190
|
+
// Hides after 60px of continuous downward scrolling only, when scrolling up threashold should be 0px
|
|
40191
|
+
const scrollThresholdHide = 60;
|
|
40192
|
+
if (scrollTop <= visibleZone) {
|
|
40193
|
+
return false;
|
|
40194
|
+
}
|
|
40195
|
+
const isScrollingDown = scrollTop > this.lastScrollTop;
|
|
40196
|
+
const wasScrollingDown = this.lastScrollTop > this.scrollDirectionChangeTop;
|
|
40197
|
+
if (isScrollingDown !== wasScrollingDown) {
|
|
40198
|
+
this.scrollDirectionChangeTop = this.lastScrollTop;
|
|
40199
|
+
}
|
|
40200
|
+
const delta = Math.abs(scrollTop - this.scrollDirectionChangeTop);
|
|
40201
|
+
const threshold = isScrollingDown ? scrollThresholdHide : 0;
|
|
40202
|
+
if (delta < threshold) {
|
|
40203
|
+
return this.scrollHidden;
|
|
40204
|
+
}
|
|
40205
|
+
return isScrollingDown;
|
|
40038
40206
|
}
|
|
40039
40207
|
getShape() {
|
|
40040
40208
|
const theme = getIonTheme(this);
|
|
@@ -40049,17 +40217,19 @@ class TabBar {
|
|
|
40049
40217
|
return shape;
|
|
40050
40218
|
}
|
|
40051
40219
|
render() {
|
|
40052
|
-
const { color, translucent, keyboardVisible, expand } = this;
|
|
40220
|
+
const { color, translucent, keyboardVisible, scrollHidden, expand, hideOnScroll } = this;
|
|
40053
40221
|
const theme = getIonTheme(this);
|
|
40054
40222
|
const shape = this.getShape();
|
|
40055
40223
|
const shouldHide = keyboardVisible && this.el.getAttribute('slot') !== 'top';
|
|
40056
|
-
return (hAsync(Host, { key: '
|
|
40224
|
+
return (hAsync(Host, { key: '7a91bb00ad289d94d34271bdecefb7221c093fd6', role: "tablist", "aria-hidden": shouldHide ? 'true' : null, class: createColorClasses$1(color, {
|
|
40057
40225
|
[theme]: true,
|
|
40058
40226
|
'tab-bar-translucent': translucent,
|
|
40059
40227
|
'tab-bar-hidden': shouldHide,
|
|
40228
|
+
'tab-bar-hide-on-scroll': hideOnScroll,
|
|
40229
|
+
'tab-bar-scroll-hidden': scrollHidden,
|
|
40060
40230
|
[`tab-bar-${expand}`]: true,
|
|
40061
40231
|
[`tab-bar-${shape}`]: shape !== undefined,
|
|
40062
|
-
}) }, hAsync("slot", { key: '
|
|
40232
|
+
}) }, hAsync("slot", { key: '96ad10c451a6ae1e2b7c48d94d0f158fb8cde1dc' })));
|
|
40063
40233
|
}
|
|
40064
40234
|
get el() { return getElement(this); }
|
|
40065
40235
|
static get watchers() { return {
|
|
@@ -40078,10 +40248,12 @@ class TabBar {
|
|
|
40078
40248
|
"$members$": {
|
|
40079
40249
|
"color": [513],
|
|
40080
40250
|
"selectedTab": [1, "selected-tab"],
|
|
40251
|
+
"hideOnScroll": [4, "hide-on-scroll"],
|
|
40081
40252
|
"translucent": [4],
|
|
40082
40253
|
"expand": [1],
|
|
40083
40254
|
"shape": [1],
|
|
40084
|
-
"keyboardVisible": [32]
|
|
40255
|
+
"keyboardVisible": [32],
|
|
40256
|
+
"scrollHidden": [32]
|
|
40085
40257
|
},
|
|
40086
40258
|
"$listeners$": undefined,
|
|
40087
40259
|
"$lazyBundleId$": "-",
|
|
@@ -41778,7 +41950,7 @@ class Toast {
|
|
|
41778
41950
|
* in the dismiss animation.
|
|
41779
41951
|
*/
|
|
41780
41952
|
this.lastPresentedPosition = animationPosition;
|
|
41781
|
-
await present(this, 'toastEnter', iosEnterAnimation, mdEnterAnimation, {
|
|
41953
|
+
await present(this, 'toastEnter', iosEnterAnimation, mdEnterAnimation, undefined, {
|
|
41782
41954
|
position,
|
|
41783
41955
|
top: animationPosition.top,
|
|
41784
41956
|
bottom: animationPosition.bottom,
|
|
@@ -41993,9 +42165,9 @@ class Toast {
|
|
|
41993
42165
|
if (layout === 'stacked' && startButtons.length > 0 && endButtons.length > 0) {
|
|
41994
42166
|
printIonWarning('[ion-toast] - This toast is using start and end buttons with the stacked toast layout. We recommend following the best practice of using either start or end buttons with the stacked toast layout.', el);
|
|
41995
42167
|
}
|
|
41996
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
42168
|
+
return (hAsync(Host, Object.assign({ key: '6fd286b024a05e6960f7b4b7947a3c26cc129e14', tabindex: "-1" }, this.htmlAttributes, { style: {
|
|
41997
42169
|
zIndex: `${60000 + this.overlayIndex}`,
|
|
41998
|
-
}, class: createColorClasses$1(this.color, Object.assign(Object.assign({ [mode]: true, [theme]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent, [`toast-shape-${shape}`]: shape !== undefined, [`toast-hue-${hue}`]: hue !== undefined })), onIonToastWillDismiss: this.dispatchCancelHandler }), hAsync("div", { key: '
|
|
42170
|
+
}, class: createColorClasses$1(this.color, Object.assign(Object.assign({ [mode]: true, [theme]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'toast-translucent': this.translucent, [`toast-shape-${shape}`]: shape !== undefined, [`toast-hue-${hue}`]: hue !== undefined })), onIonToastWillDismiss: this.dispatchCancelHandler }), hAsync("div", { key: '42aa178a6c7f25841bb6e257810c37b6a5703b1f', class: wrapperClass, part: "wrapper" }, hAsync("div", { key: '5cb2f2566ce8ab76de6a79ecac02a354eb242c58', class: "toast-container", part: "container" }, this.renderButtons(startButtons, 'start'), this.icon !== undefined && (hAsync("ion-icon", { key: 'f5a60e1b8c95bbbb829e3b9b01db64ab5229265a', class: "toast-icon", part: "icon", icon: this.icon, lazy: false, "aria-hidden": "true" })), hAsync("div", { key: 'a903491644c03391f66432253cc8365c782b056d', class: "toast-content", part: "content", role: "status", "aria-atomic": "true", "aria-live": "polite" }, !revealContentToScreenReader && header !== undefined && this.renderHeader('oldHeader', 'true'), !revealContentToScreenReader && message !== undefined && this.renderToastMessage('oldMessage', 'true'), revealContentToScreenReader && header !== undefined && this.renderHeader('header'), revealContentToScreenReader && message !== undefined && this.renderToastMessage('header')), this.renderButtons(endButtons, 'end')))));
|
|
41999
42171
|
}
|
|
42000
42172
|
get el() { return getElement(this); }
|
|
42001
42173
|
static get watchers() { return {
|