@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.mjs
CHANGED
|
@@ -8575,7 +8575,7 @@ const setRootAriaHidden = (hidden = false) => {
|
|
|
8575
8575
|
viewContainer.removeAttribute('aria-hidden');
|
|
8576
8576
|
}
|
|
8577
8577
|
};
|
|
8578
|
-
const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts) => {
|
|
8578
|
+
const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, ionicEnterAnimation, opts) => {
|
|
8579
8579
|
var _a, _b;
|
|
8580
8580
|
if (overlay.presented) {
|
|
8581
8581
|
return;
|
|
@@ -8623,11 +8623,15 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
|
|
|
8623
8623
|
document.body.classList.add(BACKDROP_NO_SCROLL);
|
|
8624
8624
|
}
|
|
8625
8625
|
(_a = overlay.willPresentShorthand) === null || _a === void 0 ? void 0 : _a.emit();
|
|
8626
|
+
const theme = getIonTheme(overlay);
|
|
8626
8627
|
const mode = getIonMode$1(overlay);
|
|
8628
|
+
const selectedAnimation = mode === 'ios'
|
|
8629
|
+
? iosEnterAnimation
|
|
8630
|
+
: theme === 'ionic' && ionicEnterAnimation
|
|
8631
|
+
? ionicEnterAnimation
|
|
8632
|
+
: mdEnterAnimation;
|
|
8627
8633
|
// get the user's animation fn if one was provided
|
|
8628
|
-
const animationBuilder = overlay.enterAnimation
|
|
8629
|
-
? overlay.enterAnimation
|
|
8630
|
-
: config.get(name, mode === 'ios' ? iosEnterAnimation : mdEnterAnimation);
|
|
8634
|
+
const animationBuilder = overlay.enterAnimation ? overlay.enterAnimation : config.get(name, selectedAnimation);
|
|
8631
8635
|
const completed = await overlayAnimation(overlay, animationBuilder, overlay.el, opts);
|
|
8632
8636
|
if (completed) {
|
|
8633
8637
|
overlay.didPresent.emit();
|
|
@@ -24969,6 +24973,104 @@ const setCardStatusBarDefault = (defaultStyle = Style.Default) => {
|
|
|
24969
24973
|
StatusBar.setStyle({ style: defaultStyle });
|
|
24970
24974
|
};
|
|
24971
24975
|
|
|
24976
|
+
const createSheetEnterAnimation = (opts) => {
|
|
24977
|
+
const { currentBreakpoint, backdropBreakpoint, expandToScroll, staticBackdropOpacity } = opts;
|
|
24978
|
+
/**
|
|
24979
|
+
* If the backdropBreakpoint is undefined, then the backdrop
|
|
24980
|
+
* should always fade in. If the backdropBreakpoint came before the
|
|
24981
|
+
* current breakpoint, then the backdrop should be fading in.
|
|
24982
|
+
*/
|
|
24983
|
+
const shouldShowBackdrop = backdropBreakpoint === undefined || backdropBreakpoint < currentBreakpoint;
|
|
24984
|
+
let initialBackdrop = '0';
|
|
24985
|
+
if (staticBackdropOpacity) {
|
|
24986
|
+
initialBackdrop = 'calc(var(--backdrop-opacity)';
|
|
24987
|
+
}
|
|
24988
|
+
else if (shouldShowBackdrop) {
|
|
24989
|
+
initialBackdrop = `calc(var(--backdrop-opacity) * ${currentBreakpoint})`;
|
|
24990
|
+
}
|
|
24991
|
+
const backdropAnimation = createAnimation('backdropAnimation').fromTo('opacity', 0, initialBackdrop);
|
|
24992
|
+
if (shouldShowBackdrop) {
|
|
24993
|
+
backdropAnimation
|
|
24994
|
+
.beforeStyles({
|
|
24995
|
+
'pointer-events': 'none',
|
|
24996
|
+
})
|
|
24997
|
+
.afterClearStyles(['pointer-events']);
|
|
24998
|
+
}
|
|
24999
|
+
const wrapperAnimation = createAnimation('wrapperAnimation').keyframes([
|
|
25000
|
+
{ offset: 0, opacity: 1, transform: 'translateY(100%)' },
|
|
25001
|
+
{ offset: 1, opacity: 1, transform: `translateY(${100 - currentBreakpoint * 100}%)` },
|
|
25002
|
+
]);
|
|
25003
|
+
/**
|
|
25004
|
+
* This allows the content to be scrollable at any breakpoint.
|
|
25005
|
+
*/
|
|
25006
|
+
const contentAnimation = !expandToScroll
|
|
25007
|
+
? createAnimation('contentAnimation').keyframes([
|
|
25008
|
+
{ offset: 0, opacity: 1, maxHeight: `${(1 - currentBreakpoint) * 100}%` },
|
|
25009
|
+
{ offset: 1, opacity: 1, maxHeight: `${currentBreakpoint * 100}%` },
|
|
25010
|
+
])
|
|
25011
|
+
: undefined;
|
|
25012
|
+
return { wrapperAnimation, backdropAnimation, contentAnimation };
|
|
25013
|
+
};
|
|
25014
|
+
const createSheetLeaveAnimation = (opts) => {
|
|
25015
|
+
const { currentBreakpoint, backdropBreakpoint } = opts;
|
|
25016
|
+
/**
|
|
25017
|
+
* Backdrop does not always fade in from 0 to 1 if backdropBreakpoint
|
|
25018
|
+
* is defined, so we need to account for that offset by figuring out
|
|
25019
|
+
* what the current backdrop value should be.
|
|
25020
|
+
*/
|
|
25021
|
+
const backdropValue = `calc(var(--backdrop-opacity) * ${getBackdropValueForSheet(currentBreakpoint, backdropBreakpoint)})`;
|
|
25022
|
+
const defaultBackdrop = [
|
|
25023
|
+
{ offset: 0, opacity: backdropValue },
|
|
25024
|
+
{ offset: 1, opacity: 0 },
|
|
25025
|
+
];
|
|
25026
|
+
const customBackdrop = [
|
|
25027
|
+
{ offset: 0, opacity: backdropValue },
|
|
25028
|
+
{ offset: backdropBreakpoint, opacity: 0 },
|
|
25029
|
+
{ offset: 1, opacity: 0 },
|
|
25030
|
+
];
|
|
25031
|
+
const backdropAnimation = createAnimation('backdropAnimation').keyframes(backdropBreakpoint !== 0 ? customBackdrop : defaultBackdrop);
|
|
25032
|
+
const wrapperAnimation = createAnimation('wrapperAnimation').keyframes([
|
|
25033
|
+
{ offset: 0, opacity: 1, transform: `translateY(${100 - currentBreakpoint * 100}%)` },
|
|
25034
|
+
{ offset: 1, opacity: 1, transform: `translateY(100%)` },
|
|
25035
|
+
]);
|
|
25036
|
+
return { wrapperAnimation, backdropAnimation };
|
|
25037
|
+
};
|
|
25038
|
+
|
|
25039
|
+
const createEnterAnimation$2 = () => {
|
|
25040
|
+
const backdropAnimation = createAnimation()
|
|
25041
|
+
.fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
|
|
25042
|
+
.beforeStyles({
|
|
25043
|
+
'pointer-events': 'none',
|
|
25044
|
+
})
|
|
25045
|
+
.afterClearStyles(['pointer-events']);
|
|
25046
|
+
const wrapperAnimation = createAnimation().keyframes([
|
|
25047
|
+
{ offset: 0, opacity: 0.01, transform: 'translateY(40px)' },
|
|
25048
|
+
{ offset: 1, opacity: 1, transform: `translateY(0px)` },
|
|
25049
|
+
]);
|
|
25050
|
+
return { backdropAnimation, wrapperAnimation, contentAnimation: undefined };
|
|
25051
|
+
};
|
|
25052
|
+
/**
|
|
25053
|
+
* Ionic Modal Enter Animation
|
|
25054
|
+
*/
|
|
25055
|
+
const ionicEnterAnimation = (baseEl, opts) => {
|
|
25056
|
+
const { currentBreakpoint, expandToScroll } = opts;
|
|
25057
|
+
const root = getElementRoot(baseEl);
|
|
25058
|
+
const { wrapperAnimation, backdropAnimation, contentAnimation } = currentBreakpoint !== undefined ? createSheetEnterAnimation(opts) : createEnterAnimation$2();
|
|
25059
|
+
backdropAnimation.addElement(root.querySelector('ion-backdrop'));
|
|
25060
|
+
wrapperAnimation.addElement(root.querySelector('.modal-wrapper'));
|
|
25061
|
+
// The content animation is only added if scrolling is enabled for
|
|
25062
|
+
// all the breakpoints.
|
|
25063
|
+
!expandToScroll && (contentAnimation === null || contentAnimation === void 0 ? void 0 : contentAnimation.addElement(baseEl.querySelector('.ion-page')));
|
|
25064
|
+
backdropAnimation.duration(300).easing('ease-out');
|
|
25065
|
+
wrapperAnimation.duration(400).easing('cubic-bezier(0.32, 0.68, 0, 1)');
|
|
25066
|
+
contentAnimation === null || contentAnimation === void 0 ? void 0 : contentAnimation.duration(400).easing('cubic-bezier(0.32, 0.68, 0, 1)');
|
|
25067
|
+
const baseAnimation = createAnimation().addElement(baseEl).addAnimation([backdropAnimation, wrapperAnimation]);
|
|
25068
|
+
if (contentAnimation) {
|
|
25069
|
+
baseAnimation.addAnimation(contentAnimation);
|
|
25070
|
+
}
|
|
25071
|
+
return baseAnimation;
|
|
25072
|
+
};
|
|
25073
|
+
|
|
24972
25074
|
const handleCanDismiss = async (el, animation) => {
|
|
24973
25075
|
/**
|
|
24974
25076
|
* If canDismiss is not a function
|
|
@@ -25395,69 +25497,6 @@ const calculateProgress = (el, deltaY) => {
|
|
|
25395
25497
|
return Math.max(0, Math.min(1, roundedProgress));
|
|
25396
25498
|
};
|
|
25397
25499
|
|
|
25398
|
-
const createSheetEnterAnimation = (opts) => {
|
|
25399
|
-
const { currentBreakpoint, backdropBreakpoint, expandToScroll, staticBackdropOpacity } = opts;
|
|
25400
|
-
/**
|
|
25401
|
-
* If the backdropBreakpoint is undefined, then the backdrop
|
|
25402
|
-
* should always fade in. If the backdropBreakpoint came before the
|
|
25403
|
-
* current breakpoint, then the backdrop should be fading in.
|
|
25404
|
-
*/
|
|
25405
|
-
const shouldShowBackdrop = backdropBreakpoint === undefined || backdropBreakpoint < currentBreakpoint;
|
|
25406
|
-
let initialBackdrop = '0';
|
|
25407
|
-
if (staticBackdropOpacity) {
|
|
25408
|
-
initialBackdrop = 'calc(var(--backdrop-opacity)';
|
|
25409
|
-
}
|
|
25410
|
-
else if (shouldShowBackdrop) {
|
|
25411
|
-
initialBackdrop = `calc(var(--backdrop-opacity) * ${currentBreakpoint})`;
|
|
25412
|
-
}
|
|
25413
|
-
const backdropAnimation = createAnimation('backdropAnimation').fromTo('opacity', 0, initialBackdrop);
|
|
25414
|
-
if (shouldShowBackdrop) {
|
|
25415
|
-
backdropAnimation
|
|
25416
|
-
.beforeStyles({
|
|
25417
|
-
'pointer-events': 'none',
|
|
25418
|
-
})
|
|
25419
|
-
.afterClearStyles(['pointer-events']);
|
|
25420
|
-
}
|
|
25421
|
-
const wrapperAnimation = createAnimation('wrapperAnimation').keyframes([
|
|
25422
|
-
{ offset: 0, opacity: 1, transform: 'translateY(100%)' },
|
|
25423
|
-
{ offset: 1, opacity: 1, transform: `translateY(${100 - currentBreakpoint * 100}%)` },
|
|
25424
|
-
]);
|
|
25425
|
-
/**
|
|
25426
|
-
* This allows the content to be scrollable at any breakpoint.
|
|
25427
|
-
*/
|
|
25428
|
-
const contentAnimation = !expandToScroll
|
|
25429
|
-
? createAnimation('contentAnimation').keyframes([
|
|
25430
|
-
{ offset: 0, opacity: 1, maxHeight: `${(1 - currentBreakpoint) * 100}%` },
|
|
25431
|
-
{ offset: 1, opacity: 1, maxHeight: `${currentBreakpoint * 100}%` },
|
|
25432
|
-
])
|
|
25433
|
-
: undefined;
|
|
25434
|
-
return { wrapperAnimation, backdropAnimation, contentAnimation };
|
|
25435
|
-
};
|
|
25436
|
-
const createSheetLeaveAnimation = (opts) => {
|
|
25437
|
-
const { currentBreakpoint, backdropBreakpoint } = opts;
|
|
25438
|
-
/**
|
|
25439
|
-
* Backdrop does not always fade in from 0 to 1 if backdropBreakpoint
|
|
25440
|
-
* is defined, so we need to account for that offset by figuring out
|
|
25441
|
-
* what the current backdrop value should be.
|
|
25442
|
-
*/
|
|
25443
|
-
const backdropValue = `calc(var(--backdrop-opacity) * ${getBackdropValueForSheet(currentBreakpoint, backdropBreakpoint)})`;
|
|
25444
|
-
const defaultBackdrop = [
|
|
25445
|
-
{ offset: 0, opacity: backdropValue },
|
|
25446
|
-
{ offset: 1, opacity: 0 },
|
|
25447
|
-
];
|
|
25448
|
-
const customBackdrop = [
|
|
25449
|
-
{ offset: 0, opacity: backdropValue },
|
|
25450
|
-
{ offset: backdropBreakpoint, opacity: 0 },
|
|
25451
|
-
{ offset: 1, opacity: 0 },
|
|
25452
|
-
];
|
|
25453
|
-
const backdropAnimation = createAnimation('backdropAnimation').keyframes(backdropBreakpoint !== 0 ? customBackdrop : defaultBackdrop);
|
|
25454
|
-
const wrapperAnimation = createAnimation('wrapperAnimation').keyframes([
|
|
25455
|
-
{ offset: 0, opacity: 1, transform: `translateY(${100 - currentBreakpoint * 100}%)` },
|
|
25456
|
-
{ offset: 1, opacity: 1, transform: `translateY(100%)` },
|
|
25457
|
-
]);
|
|
25458
|
-
return { wrapperAnimation, backdropAnimation };
|
|
25459
|
-
};
|
|
25460
|
-
|
|
25461
25500
|
const createEnterAnimation$1 = () => {
|
|
25462
25501
|
const backdropAnimation = createAnimation()
|
|
25463
25502
|
.fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
|
|
@@ -25848,16 +25887,16 @@ const mdLeaveAnimation$2 = (baseEl, opts) => {
|
|
|
25848
25887
|
return baseAnimation;
|
|
25849
25888
|
};
|
|
25850
25889
|
|
|
25851
|
-
const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, animation, breakpoints = [], expandToScroll, getCurrentBreakpoint, onDismiss, onBreakpointChange,
|
|
25890
|
+
const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, backdropBreakpoint, animation, breakpoints = [], expandToScroll, getCurrentBreakpoint, onDismiss, onBreakpointChange, usePhysicsBasedGesture, onDragStart, onDragMove, onDragEnd) => {
|
|
25852
25891
|
// Defaults for the sheet swipe animation
|
|
25853
25892
|
const defaultBackdrop = [
|
|
25854
25893
|
{ offset: 0, opacity: 'var(--backdrop-opacity)' },
|
|
25855
|
-
{ offset: 1, opacity:
|
|
25894
|
+
{ offset: 1, opacity: usePhysicsBasedGesture ? 'var(--backdrop-opacity)' : 0.01 },
|
|
25856
25895
|
];
|
|
25857
25896
|
const customBackdrop = [
|
|
25858
25897
|
{ offset: 0, opacity: 'var(--backdrop-opacity)' },
|
|
25859
|
-
{ offset: 1 - backdropBreakpoint, opacity:
|
|
25860
|
-
{ offset: 1, opacity:
|
|
25898
|
+
{ offset: 1 - backdropBreakpoint, opacity: usePhysicsBasedGesture ? 'var(--backdrop-opacity)' : 0 },
|
|
25899
|
+
{ offset: 1, opacity: usePhysicsBasedGesture ? 'var(--backdrop-opacity)' : 0 },
|
|
25861
25900
|
];
|
|
25862
25901
|
const SheetDefaults = {
|
|
25863
25902
|
WRAPPER_KEYFRAMES: [
|
|
@@ -26180,7 +26219,9 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
26180
26219
|
: step;
|
|
26181
26220
|
offset = clamp(0.0001, processedStep, maxStep);
|
|
26182
26221
|
animation.progressStep(offset);
|
|
26183
|
-
const snapBreakpoint =
|
|
26222
|
+
const snapBreakpoint = usePhysicsBasedGesture
|
|
26223
|
+
? calculateVelocitySnapBreakpoint(detail.deltaY, detail.velocityY, detail.currentY)
|
|
26224
|
+
: calculatePositionSnapBreakpoint(detail.deltaY);
|
|
26184
26225
|
const eventDetail = {
|
|
26185
26226
|
currentY: detail.currentY,
|
|
26186
26227
|
deltaY: detail.deltaY,
|
|
@@ -26191,7 +26232,9 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
26191
26232
|
onDragMove(eventDetail);
|
|
26192
26233
|
};
|
|
26193
26234
|
const onEnd = (detail) => {
|
|
26194
|
-
const snapBreakpoint =
|
|
26235
|
+
const snapBreakpoint = usePhysicsBasedGesture
|
|
26236
|
+
? calculateVelocitySnapBreakpoint(detail.deltaY, detail.velocityY, detail.currentY)
|
|
26237
|
+
: calculatePositionSnapBreakpoint(detail.deltaY);
|
|
26195
26238
|
const eventDetail = {
|
|
26196
26239
|
currentY: detail.currentY,
|
|
26197
26240
|
deltaY: detail.deltaY,
|
|
@@ -26238,6 +26281,14 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
26238
26281
|
*/
|
|
26239
26282
|
const shouldPreventDismiss = canDismiss && breakpoint === 0;
|
|
26240
26283
|
const snapToBreakpoint = shouldPreventDismiss ? currentBreakpoint : breakpoint;
|
|
26284
|
+
/**
|
|
26285
|
+
* Detect snap-back behavior: when the snap target is the same as the current breakpoint,
|
|
26286
|
+
* the user released before crossing the threshold to a new breakpoint.
|
|
26287
|
+
* Apply different timing and easing for snap-back vs. snap-to-new.
|
|
26288
|
+
*/
|
|
26289
|
+
const isSnapBack = snapToBreakpoint === currentBreakpoint;
|
|
26290
|
+
const duration = usePhysicsBasedGesture ? (isSnapBack ? 300 : 400) : 500;
|
|
26291
|
+
const easing = isSnapBack ? 'cubic-bezier(0.34, 1.4, 0.64, 1)' : 'cubic-bezier(0.32, 0.68, 0, 1)';
|
|
26241
26292
|
const shouldRemainOpen = snapToBreakpoint !== 0;
|
|
26242
26293
|
currentBreakpoint = 0;
|
|
26243
26294
|
/**
|
|
@@ -26252,13 +26303,13 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
26252
26303
|
backdropAnimation.keyframes([
|
|
26253
26304
|
{
|
|
26254
26305
|
offset: 0,
|
|
26255
|
-
opacity:
|
|
26306
|
+
opacity: usePhysicsBasedGesture
|
|
26256
26307
|
? 'var(--backdrop-opacity)'
|
|
26257
26308
|
: `calc(var(--backdrop-opacity) * ${getBackdropValueForSheet(1 - breakpointOffset, backdropBreakpoint)})`,
|
|
26258
26309
|
},
|
|
26259
26310
|
{
|
|
26260
26311
|
offset: 1,
|
|
26261
|
-
opacity:
|
|
26312
|
+
opacity: usePhysicsBasedGesture
|
|
26262
26313
|
? 'var(--backdrop-opacity)'
|
|
26263
26314
|
: `calc(var(--backdrop-opacity) * ${getBackdropValueForSheet(snapToBreakpoint, backdropBreakpoint)})`,
|
|
26264
26315
|
},
|
|
@@ -26278,6 +26329,12 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
26278
26329
|
}
|
|
26279
26330
|
animation.progressStep(0);
|
|
26280
26331
|
}
|
|
26332
|
+
/**
|
|
26333
|
+
* Apply the appropriate easing curve for this snap behavior.
|
|
26334
|
+
*/
|
|
26335
|
+
if (usePhysicsBasedGesture) {
|
|
26336
|
+
animation.easing(easing);
|
|
26337
|
+
}
|
|
26281
26338
|
/**
|
|
26282
26339
|
* Gesture should remain disabled until the
|
|
26283
26340
|
* snapping animation completes.
|
|
@@ -26367,7 +26424,7 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
26367
26424
|
* be added every time onEnd runs.
|
|
26368
26425
|
*/
|
|
26369
26426
|
}, { oneTimeCallback: true })
|
|
26370
|
-
.progressEnd(1, 0, animated ?
|
|
26427
|
+
.progressEnd(1, 0, animated ? duration : 0);
|
|
26371
26428
|
});
|
|
26372
26429
|
};
|
|
26373
26430
|
/**
|
|
@@ -26378,7 +26435,7 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
26378
26435
|
* @param deltaY The change in Y position since the gesture started.
|
|
26379
26436
|
* @returns The snap breakpoint value.
|
|
26380
26437
|
*/
|
|
26381
|
-
const
|
|
26438
|
+
const calculatePositionSnapBreakpoint = (deltaY) => {
|
|
26382
26439
|
/**
|
|
26383
26440
|
* Calculates the real-time vertical position of the modal.
|
|
26384
26441
|
* We combine the wrapper's current bounding box position with the
|
|
@@ -26398,6 +26455,50 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
26398
26455
|
});
|
|
26399
26456
|
return snapBreakpoint;
|
|
26400
26457
|
};
|
|
26458
|
+
/**
|
|
26459
|
+
* Calculates the snap breakpoint using velocity-based logic.
|
|
26460
|
+
* This provides a more intuitive and responsive sheet behavior for the Ionic theme.
|
|
26461
|
+
*
|
|
26462
|
+
* Rules:
|
|
26463
|
+
* 1. Fast downward flick (> 500 px/s) always dismisses, regardless of position
|
|
26464
|
+
* 2. Fast upward flick (> 400 px/s) snaps to the next breakpoint above
|
|
26465
|
+
* 3. If dragged 40% below current snap point without fast upward flick, dismisses
|
|
26466
|
+
* 4. Otherwise, falls back to position-based snap (closest breakpoint)
|
|
26467
|
+
*
|
|
26468
|
+
* @param deltaY The change in Y position since gesture started
|
|
26469
|
+
* @param velocityY The velocity in pixels per millisecond
|
|
26470
|
+
* @param currentY The current Y position of the gesture
|
|
26471
|
+
* @returns The snap breakpoint value
|
|
26472
|
+
*/
|
|
26473
|
+
const calculateVelocitySnapBreakpoint = (deltaY, velocityY, currentY) => {
|
|
26474
|
+
// Convert velocity from px/ms to px/s for easier threshold comparison
|
|
26475
|
+
const velocityYPerSecond = velocityY * 1000;
|
|
26476
|
+
// Calculate current progress (0 = fully closed, 1 = fully expanded)
|
|
26477
|
+
const currentProgress = calculateProgress(currentY);
|
|
26478
|
+
// Rule 1: Fast downward flick always dismisses
|
|
26479
|
+
if (velocityYPerSecond > 500) {
|
|
26480
|
+
return minBreakpoint;
|
|
26481
|
+
}
|
|
26482
|
+
// Rule 2: Fast upward flick moves to next breakpoint above
|
|
26483
|
+
if (velocityYPerSecond < -400) {
|
|
26484
|
+
// Find next breakpoint above current position
|
|
26485
|
+
const nextBreakpoint = breakpoints.find((bp) => bp > currentProgress);
|
|
26486
|
+
// If no breakpoint above, stay at max breakpoint
|
|
26487
|
+
return nextBreakpoint !== null && nextBreakpoint !== void 0 ? nextBreakpoint : maxBreakpoint;
|
|
26488
|
+
}
|
|
26489
|
+
// Rule 3: 40% dismissal rule (only if not flicking up and 0 breakpoint exists)
|
|
26490
|
+
if (minBreakpoint === 0 && currentBreakpoint > 0) {
|
|
26491
|
+
// Calculate how far we've moved below the current snap point
|
|
26492
|
+
const distanceBelowSnap = currentBreakpoint - currentProgress;
|
|
26493
|
+
const percentageBelowSnap = distanceBelowSnap / currentBreakpoint;
|
|
26494
|
+
// If dragged more than 40% below and not flicking up, dismiss
|
|
26495
|
+
if (percentageBelowSnap > 0.4 && velocityYPerSecond <= 400) {
|
|
26496
|
+
return 0;
|
|
26497
|
+
}
|
|
26498
|
+
}
|
|
26499
|
+
// Rule 4: Fallback to position-based snap (existing logic)
|
|
26500
|
+
return calculatePositionSnapBreakpoint(deltaY);
|
|
26501
|
+
};
|
|
26401
26502
|
/**
|
|
26402
26503
|
* Calculates the progress of the swipe gesture.
|
|
26403
26504
|
*
|
|
@@ -26646,7 +26747,7 @@ const clearSafeAreaOverrides = (hostEl) => {
|
|
|
26646
26747
|
hostEl.style.removeProperty('--ion-safe-area-right');
|
|
26647
26748
|
};
|
|
26648
26749
|
|
|
26649
|
-
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:
|
|
26750
|
+
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)))}`;
|
|
26650
26751
|
|
|
26651
26752
|
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}`;
|
|
26652
26753
|
|
|
@@ -27097,7 +27198,7 @@ class Modal {
|
|
|
27097
27198
|
this.statusBarStyle = await StatusBar.getStyle();
|
|
27098
27199
|
setCardStatusBarDark();
|
|
27099
27200
|
}
|
|
27100
|
-
await present(this, 'modalEnter', iosEnterAnimation$3, mdEnterAnimation$2, {
|
|
27201
|
+
await present(this, 'modalEnter', iosEnterAnimation$3, mdEnterAnimation$2, ionicEnterAnimation, {
|
|
27101
27202
|
presentingEl: presentingElement,
|
|
27102
27203
|
currentBreakpoint: this.initialBreakpoint,
|
|
27103
27204
|
backdropBreakpoint: this.backdropBreakpoint,
|
|
@@ -27784,20 +27885,20 @@ class Modal {
|
|
|
27784
27885
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
27785
27886
|
const shape = this.getShape();
|
|
27786
27887
|
const isSheetModalWithHandle = isSheetModal && showHandle;
|
|
27787
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
27888
|
+
return (hAsync(Host, Object.assign({ key: '3011c8f49c1ccb6c20c01db35b59fe4f6e22ec01', "no-router": true,
|
|
27788
27889
|
// Allow the modal to be navigable when the handle is focusable
|
|
27789
27890
|
tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
|
|
27790
27891
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
27791
|
-
}, 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: '
|
|
27892
|
+
}, 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',
|
|
27792
27893
|
/*
|
|
27793
27894
|
role and aria-modal must be used on the
|
|
27794
27895
|
same element. They must also be set inside the
|
|
27795
27896
|
shadow DOM otherwise ion-button will not be highlighted
|
|
27796
27897
|
when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
|
|
27797
27898
|
*/
|
|
27798
|
-
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: '
|
|
27899
|
+
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",
|
|
27799
27900
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
27800
|
-
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: '
|
|
27901
|
+
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 }))));
|
|
27801
27902
|
}
|
|
27802
27903
|
get el() { return getElement(this); }
|
|
27803
27904
|
static get watchers() { return {
|
|
@@ -32212,7 +32313,7 @@ class Popover {
|
|
|
32212
32313
|
else if (!this.keepContentsMounted) {
|
|
32213
32314
|
await waitForMount();
|
|
32214
32315
|
}
|
|
32215
|
-
await present(this, 'popoverEnter', iosEnterAnimation$1, mdEnterAnimation$1, {
|
|
32316
|
+
await present(this, 'popoverEnter', iosEnterAnimation$1, mdEnterAnimation$1, undefined, {
|
|
32216
32317
|
event: event || this.event,
|
|
32217
32318
|
size: this.size,
|
|
32218
32319
|
trigger: this.triggerEl,
|
|
@@ -32321,9 +32422,9 @@ class Popover {
|
|
|
32321
32422
|
const { onLifecycle, parentPopover, dismissOnSelect, side, arrow, htmlAttributes, focusTrap } = this;
|
|
32322
32423
|
const desktop = isPlatform('desktop');
|
|
32323
32424
|
const enableArrow = arrow && !parentPopover;
|
|
32324
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
32425
|
+
return (hAsync(Host, Object.assign({ key: 'ba8801218aa8543eae0e8e2c57fbd0d4fbb2c8ff', "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
|
|
32325
32426
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
32326
|
-
}, 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: '
|
|
32427
|
+
}, 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' })))));
|
|
32327
32428
|
}
|
|
32328
32429
|
get el() { return getElement(this); }
|
|
32329
32430
|
static get watchers() { return {
|
|
@@ -39936,7 +40037,7 @@ class Tab {
|
|
|
39936
40037
|
}; }
|
|
39937
40038
|
}
|
|
39938
40039
|
|
|
39939
|
-
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))}`;
|
|
40040
|
+
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))}`;
|
|
39940
40041
|
|
|
39941
40042
|
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)}}`;
|
|
39942
40043
|
|
|
@@ -39954,7 +40055,16 @@ class TabBar {
|
|
|
39954
40055
|
this.keyboardCtrl = null;
|
|
39955
40056
|
this.keyboardCtrlPromise = null;
|
|
39956
40057
|
this.didLoad = false;
|
|
40058
|
+
this.lastScrollTop = 0;
|
|
40059
|
+
this.scrollDirectionChangeTop = 0;
|
|
39957
40060
|
this.keyboardVisible = false;
|
|
40061
|
+
this.scrollHidden = false;
|
|
40062
|
+
/**
|
|
40063
|
+
* If `true`, the tab bar will be hidden when the user scrolls down
|
|
40064
|
+
* and shown when the user scrolls up.
|
|
40065
|
+
* Only applies when the theme is `"ionic"` and `expand` is `"compact"`.
|
|
40066
|
+
*/
|
|
40067
|
+
this.hideOnScroll = false;
|
|
39958
40068
|
/**
|
|
39959
40069
|
* If `true`, the tab bar will be translucent.
|
|
39960
40070
|
* Only applies when the theme is `"ios"` and the device supports
|
|
@@ -39996,6 +40106,7 @@ class TabBar {
|
|
|
39996
40106
|
tab: this.selectedTab,
|
|
39997
40107
|
});
|
|
39998
40108
|
}
|
|
40109
|
+
this.setupHideOnScroll();
|
|
39999
40110
|
}
|
|
40000
40111
|
async connectedCallback() {
|
|
40001
40112
|
const promise = createKeyboardController(async (keyboardOpen, waitForResize) => {
|
|
@@ -40033,6 +40144,63 @@ class TabBar {
|
|
|
40033
40144
|
this.keyboardCtrl.destroy();
|
|
40034
40145
|
this.keyboardCtrl = null;
|
|
40035
40146
|
}
|
|
40147
|
+
this.destroyHideOnScroll();
|
|
40148
|
+
}
|
|
40149
|
+
setupHideOnScroll() {
|
|
40150
|
+
var _a;
|
|
40151
|
+
const theme = getIonTheme(this);
|
|
40152
|
+
if (theme !== 'ionic' || !this.hideOnScroll || this.expand !== 'compact') {
|
|
40153
|
+
return;
|
|
40154
|
+
}
|
|
40155
|
+
const footerEl = this.el.closest('ion-footer');
|
|
40156
|
+
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');
|
|
40157
|
+
const contentEl = pageEl ? findIonContent(pageEl) : null;
|
|
40158
|
+
if (!contentEl) {
|
|
40159
|
+
return;
|
|
40160
|
+
}
|
|
40161
|
+
this.initScrollListener(contentEl);
|
|
40162
|
+
}
|
|
40163
|
+
async initScrollListener(contentEl) {
|
|
40164
|
+
const scrollEl = (this.scrollEl = await getScrollElement(contentEl));
|
|
40165
|
+
this.contentScrollCallback = () => {
|
|
40166
|
+
readTask(() => {
|
|
40167
|
+
const scrollTop = scrollEl.scrollTop;
|
|
40168
|
+
const shouldHide = this.checkScrollStatus(scrollTop);
|
|
40169
|
+
if (shouldHide !== this.scrollHidden) {
|
|
40170
|
+
writeTask(() => {
|
|
40171
|
+
this.scrollHidden = shouldHide;
|
|
40172
|
+
});
|
|
40173
|
+
}
|
|
40174
|
+
this.lastScrollTop = scrollTop;
|
|
40175
|
+
});
|
|
40176
|
+
};
|
|
40177
|
+
scrollEl.addEventListener('scroll', this.contentScrollCallback, { passive: true });
|
|
40178
|
+
}
|
|
40179
|
+
destroyHideOnScroll() {
|
|
40180
|
+
if (this.scrollEl && this.contentScrollCallback) {
|
|
40181
|
+
this.scrollEl.removeEventListener('scroll', this.contentScrollCallback);
|
|
40182
|
+
this.contentScrollCallback = undefined;
|
|
40183
|
+
}
|
|
40184
|
+
}
|
|
40185
|
+
checkScrollStatus(scrollTop) {
|
|
40186
|
+
// Always visible within the first 80px of scroll
|
|
40187
|
+
const visibleZone = 80;
|
|
40188
|
+
// Hides after 60px of continuous downward scrolling only, when scrolling up threashold should be 0px
|
|
40189
|
+
const scrollThresholdHide = 60;
|
|
40190
|
+
if (scrollTop <= visibleZone) {
|
|
40191
|
+
return false;
|
|
40192
|
+
}
|
|
40193
|
+
const isScrollingDown = scrollTop > this.lastScrollTop;
|
|
40194
|
+
const wasScrollingDown = this.lastScrollTop > this.scrollDirectionChangeTop;
|
|
40195
|
+
if (isScrollingDown !== wasScrollingDown) {
|
|
40196
|
+
this.scrollDirectionChangeTop = this.lastScrollTop;
|
|
40197
|
+
}
|
|
40198
|
+
const delta = Math.abs(scrollTop - this.scrollDirectionChangeTop);
|
|
40199
|
+
const threshold = isScrollingDown ? scrollThresholdHide : 0;
|
|
40200
|
+
if (delta < threshold) {
|
|
40201
|
+
return this.scrollHidden;
|
|
40202
|
+
}
|
|
40203
|
+
return isScrollingDown;
|
|
40036
40204
|
}
|
|
40037
40205
|
getShape() {
|
|
40038
40206
|
const theme = getIonTheme(this);
|
|
@@ -40047,17 +40215,19 @@ class TabBar {
|
|
|
40047
40215
|
return shape;
|
|
40048
40216
|
}
|
|
40049
40217
|
render() {
|
|
40050
|
-
const { color, translucent, keyboardVisible, expand } = this;
|
|
40218
|
+
const { color, translucent, keyboardVisible, scrollHidden, expand, hideOnScroll } = this;
|
|
40051
40219
|
const theme = getIonTheme(this);
|
|
40052
40220
|
const shape = this.getShape();
|
|
40053
40221
|
const shouldHide = keyboardVisible && this.el.getAttribute('slot') !== 'top';
|
|
40054
|
-
return (hAsync(Host, { key: '
|
|
40222
|
+
return (hAsync(Host, { key: '7a91bb00ad289d94d34271bdecefb7221c093fd6', role: "tablist", "aria-hidden": shouldHide ? 'true' : null, class: createColorClasses$1(color, {
|
|
40055
40223
|
[theme]: true,
|
|
40056
40224
|
'tab-bar-translucent': translucent,
|
|
40057
40225
|
'tab-bar-hidden': shouldHide,
|
|
40226
|
+
'tab-bar-hide-on-scroll': hideOnScroll,
|
|
40227
|
+
'tab-bar-scroll-hidden': scrollHidden,
|
|
40058
40228
|
[`tab-bar-${expand}`]: true,
|
|
40059
40229
|
[`tab-bar-${shape}`]: shape !== undefined,
|
|
40060
|
-
}) }, hAsync("slot", { key: '
|
|
40230
|
+
}) }, hAsync("slot", { key: '96ad10c451a6ae1e2b7c48d94d0f158fb8cde1dc' })));
|
|
40061
40231
|
}
|
|
40062
40232
|
get el() { return getElement(this); }
|
|
40063
40233
|
static get watchers() { return {
|
|
@@ -40076,10 +40246,12 @@ class TabBar {
|
|
|
40076
40246
|
"$members$": {
|
|
40077
40247
|
"color": [513],
|
|
40078
40248
|
"selectedTab": [1, "selected-tab"],
|
|
40249
|
+
"hideOnScroll": [4, "hide-on-scroll"],
|
|
40079
40250
|
"translucent": [4],
|
|
40080
40251
|
"expand": [1],
|
|
40081
40252
|
"shape": [1],
|
|
40082
|
-
"keyboardVisible": [32]
|
|
40253
|
+
"keyboardVisible": [32],
|
|
40254
|
+
"scrollHidden": [32]
|
|
40083
40255
|
},
|
|
40084
40256
|
"$listeners$": undefined,
|
|
40085
40257
|
"$lazyBundleId$": "-",
|
|
@@ -41776,7 +41948,7 @@ class Toast {
|
|
|
41776
41948
|
* in the dismiss animation.
|
|
41777
41949
|
*/
|
|
41778
41950
|
this.lastPresentedPosition = animationPosition;
|
|
41779
|
-
await present(this, 'toastEnter', iosEnterAnimation, mdEnterAnimation, {
|
|
41951
|
+
await present(this, 'toastEnter', iosEnterAnimation, mdEnterAnimation, undefined, {
|
|
41780
41952
|
position,
|
|
41781
41953
|
top: animationPosition.top,
|
|
41782
41954
|
bottom: animationPosition.bottom,
|
|
@@ -41991,9 +42163,9 @@ class Toast {
|
|
|
41991
42163
|
if (layout === 'stacked' && startButtons.length > 0 && endButtons.length > 0) {
|
|
41992
42164
|
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);
|
|
41993
42165
|
}
|
|
41994
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
42166
|
+
return (hAsync(Host, Object.assign({ key: '6fd286b024a05e6960f7b4b7947a3c26cc129e14', tabindex: "-1" }, this.htmlAttributes, { style: {
|
|
41995
42167
|
zIndex: `${60000 + this.overlayIndex}`,
|
|
41996
|
-
}, 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: '
|
|
42168
|
+
}, 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')))));
|
|
41997
42169
|
}
|
|
41998
42170
|
get el() { return getElement(this); }
|
|
41999
42171
|
static get watchers() { return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ionic/core",
|
|
3
|
-
"version": "8.8.4-dev.
|
|
3
|
+
"version": "8.8.4-dev.11776868665.169e5ee1",
|
|
4
4
|
"description": "Base components for Ionic",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">= 16"
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"fs-extra": "^9.0.1",
|
|
69
69
|
"jest": "^29.7.0",
|
|
70
70
|
"jest-cli": "^29.7.0",
|
|
71
|
-
"outsystems-design-tokens": "^1.3.
|
|
71
|
+
"outsystems-design-tokens": "^1.3.8",
|
|
72
72
|
"playwright-core": "^1.58.2",
|
|
73
73
|
"prettier": "^2.8.8",
|
|
74
74
|
"rollup": "^2.26.4",
|