@ionic/core 8.8.4 → 8.8.5-dev.11776871786.1e73ab78
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/ion-content.js +1 -1
- package/components/ion-modal.js +1 -1
- package/components/ion-select-modal.js +1 -1
- package/components/ion-select.js +1 -1
- package/components/{p-ApmKVjaE.js → p-BGHGpkPX.js} +1 -1
- package/components/p-BZfgPT2N.js +4 -0
- package/components/{p-BTF2nRLo.js → p-MlJRD6E1.js} +1 -1
- package/dist/cjs/ion-app_8.cjs.entry.js +1 -1
- package/dist/cjs/ion-modal.cjs.entry.js +93 -45
- package/dist/collection/components/content/content.css +7 -1
- package/dist/collection/components/modal/modal.js +67 -44
- package/dist/collection/components/modal/safe-area-utils.js +27 -2
- package/dist/docs.json +6 -1
- package/dist/esm/ion-app_8.entry.js +1 -1
- package/dist/esm/ion-modal.entry.js +93 -45
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-4eedd78a.entry.js +4 -0
- package/dist/ionic/p-b5ea8cdd.entry.js +4 -0
- package/dist/types/components/modal/modal.d.ts +35 -3
- package/dist/types/components/modal/safe-area-utils.d.ts +16 -0
- package/hydrate/index.js +94 -46
- package/hydrate/index.mjs +94 -46
- package/package.json +1 -1
- package/components/p-BVnB3eEn.js +0 -4
- package/dist/ionic/p-16b65553.entry.js +0 -4
- package/dist/ionic/p-4819b469.entry.js +0 -4
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import{r as t,e as o,f as i,h as n,d as e,g as r,c as a,a as s,i as l,w as d,j as c}from"./p-IGIE5vDm.js";import{shouldUseCloseWatcher as b}from"./p-DB_iPQC-.js";import{a as h,b as p}from"./p-NFFyoJ4Q.js";import{i as g,h as m,c as f,e as u,s as x}from"./p-CGmVTdWh.js";import{i as v}from"./p-C53feagD.js";import{c as k,h as w}from"./p-DiVJyqlX.js";import{a as y,p as z,g as C}from"./p-B8xlpH8p.js";import{c as j}from"./p-CtWGkNnJ.js";import{g as T}from"./p-hHmYLOfE.js";import{a as B,d as S}from"./p-CmFz1Mjc.js";import{c as D}from"./p-B-hirT0v.js";import{t as Z}from"./p-BW_TRJm8.js";import"./p-ZjP4CjeZ.js";import"./p-D13Eaw-8.js";import"./p-CIGNaXM1.js";const $=class{constructor(o){t(this,o)}componentDidLoad(){this.rIC((async()=>{const t=h(window,"hybrid");if(o.getBoolean("_testing")||import("./p-CYbRmDdy.js").then((t=>t.startTapClick(o))),o.getBoolean("statusTap",t)&&import("./p-CtA-yJYy.js").then((t=>t.startStatusTap())),o.getBoolean("inputShims",E())){const t=h(window,"ios")?"ios":"android";import("./p-CYvM5g3q.js").then((i=>i.startInputShims(o,t)))}const n=await import("./p-DB_iPQC-.js"),e=t||b();o.getBoolean("hardwareBackButton",e)?n.startHardwareBackButton():(b()&&i("[ion-app] - experimentalCloseWatcher was set to `true`, but hardwareBackButton was set to `false`. Both config options must be `true` for the Close Watcher API to be used."),n.blockHardwareBackButton()),"undefined"!=typeof window&&import("./p-9eeaBrnk.js").then((t=>t.startKeyboardAssist(window))),import("./p-BmVRXR1y.js").then((t=>this.focusVisible=t.startFocusVisible()))}))}disconnectedCallback(){this.loadTimeout&&clearTimeout(this.loadTimeout)}async setFocus(t){this.focusVisible&&this.focusVisible.setFocus(t)}rIC(t){"requestIdleCallback"in window?window.requestIdleCallback(t):this.loadTimeout=setTimeout(t,32)}render(){const t=p(this);return n(e,{key:"77a7459d3e42b3715a5a7e1cf468e2ebc99e54bb",class:{[t]:!0,"ion-page":!0,"force-statusbar-padding":o.getBoolean("_forceStatusbarPadding")}})}get el(){return r(this)}},E=()=>!(!h(window,"ios")||!h(window,"mobile"))||!(!h(window,"android")||!h(window,"mobileweb"));$.style="html.plt-mobile ion-app{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}html.plt-mobile ion-app [contenteditable]{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}ion-app.force-statusbar-padding{--ion-safe-area-top:20px}";const _=class{constructor(o){t(this,o),this.collapse=!1}render(){const t=p(this);return n(e,{key:"58c1fc5eb867d0731c63549b1ccb3ec3bbbe6e1b",class:{[t]:!0,"buttons-collapse":this.collapse}},n("slot",{key:"0c8f95b9840c8fa0c4e50be84c5159620a3eb5c8"}))}};_.style={ios:".sc-ion-buttons-ios-h{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-transform:translateZ(0);transform:translateZ(0);z-index:99}.sc-ion-buttons-ios-s ion-button{--padding-top:0;--padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}.sc-ion-buttons-ios-s ion-button{--padding-top:3px;--padding-bottom:3px;--padding-start:5px;--padding-end:5px;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px;min-height:32px}.sc-ion-buttons-ios-s .button-has-icon-only{--padding-top:0;--padding-bottom:0}.sc-ion-buttons-ios-s ion-button:not(.button-round){--border-radius:4px}.sc-ion-buttons-ios-h.ion-color.sc-ion-buttons-ios-s .button,.ion-color .sc-ion-buttons-ios-h.sc-ion-buttons-ios-s .button{--color:initial;--border-color:initial;--background-focused:var(--ion-color-contrast)}.sc-ion-buttons-ios-h.ion-color.sc-ion-buttons-ios-s .button-solid,.ion-color .sc-ion-buttons-ios-h.sc-ion-buttons-ios-s .button-solid{--background:var(--ion-color-contrast);--background-focused:#000;--background-focused-opacity:.12;--background-activated:#000;--background-activated-opacity:.12;--background-hover:var(--ion-color-base);--background-hover-opacity:0.45;--color:var(--ion-color-base);--color-focused:var(--ion-color-base)}.sc-ion-buttons-ios-h.ion-color.sc-ion-buttons-ios-s .button-clear,.ion-color .sc-ion-buttons-ios-h.sc-ion-buttons-ios-s .button-clear{--color-activated:var(--ion-color-contrast);--color-focused:var(--ion-color-contrast)}.sc-ion-buttons-ios-h.ion-color.sc-ion-buttons-ios-s .button-outline,.ion-color .sc-ion-buttons-ios-h.sc-ion-buttons-ios-s .button-outline{--color-activated:var(--ion-color-base);--color-focused:var(--ion-color-contrast);--background-activated:var(--ion-color-contrast)}.sc-ion-buttons-ios-s .button-clear,.sc-ion-buttons-ios-s .button-outline{--background-activated:transparent;--background-focused:currentColor;--background-hover:transparent}.sc-ion-buttons-ios-s .button-solid:not(.ion-color){--background-focused:#000;--background-focused-opacity:.12;--background-activated:#000;--background-activated-opacity:.12}.sc-ion-buttons-ios-s ion-icon[slot=start]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-margin-end:0.3em;margin-inline-end:0.3em;font-size:1.41em;line-height:0.67}.sc-ion-buttons-ios-s ion-icon[slot=end]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-margin-start:0.4em;margin-inline-start:0.4em;font-size:1.41em;line-height:0.67}.sc-ion-buttons-ios-s ion-icon[slot=icon-only]{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;font-size:1.65em;line-height:0.67}",md:".sc-ion-buttons-md-h{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-transform:translateZ(0);transform:translateZ(0);z-index:99}.sc-ion-buttons-md-s ion-button{--padding-top:0;--padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}.sc-ion-buttons-md-s ion-button{--padding-top:3px;--padding-bottom:3px;--padding-start:8px;--padding-end:8px;--box-shadow:none;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px;min-height:32px}.sc-ion-buttons-md-s .button-has-icon-only{--padding-top:0;--padding-bottom:0}.sc-ion-buttons-md-s ion-button:not(.button-round){--border-radius:2px}.sc-ion-buttons-md-h.ion-color.sc-ion-buttons-md-s .button,.ion-color .sc-ion-buttons-md-h.sc-ion-buttons-md-s .button{--color:initial;--color-focused:var(--ion-color-contrast);--color-hover:var(--ion-color-contrast);--background-activated:transparent;--background-focused:var(--ion-color-contrast);--background-hover:var(--ion-color-contrast)}.sc-ion-buttons-md-h.ion-color.sc-ion-buttons-md-s .button-solid,.ion-color .sc-ion-buttons-md-h.sc-ion-buttons-md-s .button-solid{--background:var(--ion-color-contrast);--background-activated:transparent;--background-focused:var(--ion-color-shade);--background-hover:var(--ion-color-base);--color:var(--ion-color-base);--color-focused:var(--ion-color-base);--color-hover:var(--ion-color-base)}.sc-ion-buttons-md-h.ion-color.sc-ion-buttons-md-s .button-outline,.ion-color .sc-ion-buttons-md-h.sc-ion-buttons-md-s .button-outline{--border-color:var(--ion-color-contrast)}.sc-ion-buttons-md-s .button-has-icon-only.button-clear{--padding-top:12px;--padding-end:12px;--padding-bottom:12px;--padding-start:12px;--border-radius:50%;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;width:3rem;height:3rem}.sc-ion-buttons-md-s .button{--background-hover:currentColor}.sc-ion-buttons-md-s .button-solid{--color:var(--ion-toolbar-background, var(--ion-background-color, #fff));--background:var(--ion-toolbar-color, var(--ion-text-color, #424242));--background-activated:transparent;--background-focused:currentColor}.sc-ion-buttons-md-s .button-outline{--color:initial;--background:transparent;--background-activated:transparent;--background-focused:currentColor;--background-hover:currentColor;--border-color:currentColor}.sc-ion-buttons-md-s .button-clear{--color:initial;--background:transparent;--background-activated:transparent;--background-focused:currentColor;--background-hover:currentColor}.sc-ion-buttons-md-s ion-icon[slot=start]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-margin-end:0.3em;margin-inline-end:0.3em;font-size:1.4em}.sc-ion-buttons-md-s ion-icon[slot=end]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-margin-start:0.4em;margin-inline-start:0.4em;font-size:1.4em}.sc-ion-buttons-md-s ion-icon[slot=icon-only]{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;font-size:1.8em}"};const I=class{constructor(o){t(this,o),this.ionScrollStart=a(this,"ionScrollStart",7),this.ionScroll=a(this,"ionScroll",7),this.ionScrollEnd=a(this,"ionScrollEnd",7),this.watchDog=null,this.isScrolling=!1,this.lastScroll=0,this.queued=!1,this.cTop=-1,this.cBottom=-1,this.isMainContent=!0,this.resizeTimeout=null,this.inheritedAttributes={},this.tabsElement=null,this.detail={scrollTop:0,scrollLeft:0,type:"scroll",event:void 0,startX:0,startY:0,startTime:0,currentX:0,currentY:0,velocityX:0,velocityY:0,deltaX:0,deltaY:0,currentTime:0,data:void 0,isScrolling:!0},this.fullscreen=!1,this.fixedSlotPlacement="after",this.scrollX=!1,this.scrollY=!0,this.scrollEvents=!1}componentWillLoad(){this.inheritedAttributes=g(this.el)}connectedCallback(){if(this.isMainContent=null===this.el.closest("ion-menu, ion-popover, ion-modal"),m(this.el)){const t=this.tabsElement=this.el.closest("ion-tabs");null!==t&&(this.tabsLoadCallback=()=>this.resize(),t.addEventListener("ionTabBarLoaded",this.tabsLoadCallback))}}disconnectedCallback(){if(this.onScrollEnd(),m(this.el)){const{tabsElement:t,tabsLoadCallback:o}=this;null!==t&&void 0!==o&&t.removeEventListener("ionTabBarLoaded",o),this.tabsElement=null,this.tabsLoadCallback=void 0}this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=null)}onResize(){this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=null),this.resizeTimeout=setTimeout((()=>{null!==this.el.offsetParent&&this.resize()}),100)}shouldForceOverscroll(){const{forceOverscroll:t}=this,o=p(this);return void 0===t?"ios"===o&&h("ios"):t}resize(){this.fullscreen?s((()=>this.readDimensions())):0===this.cTop&&0===this.cBottom||(this.cTop=this.cBottom=0,l(this))}async recalculateDimensions(){s((()=>this.readDimensions()))}readDimensions(){const t=L(this.el),o=Math.max(this.el.offsetTop,0),i=Math.max(t.offsetHeight-o-this.el.offsetHeight,0);(o!==this.cTop||i!==this.cBottom)&&(this.cTop=o,this.cBottom=i,l(this))}onScroll(t){const o=Date.now(),i=!this.isScrolling;this.lastScroll=o,i&&this.onScrollStart(),!this.queued&&this.scrollEvents&&(this.queued=!0,s((o=>{this.queued=!1,this.detail.event=t,M(this.detail,this.scrollEl,o,i),this.ionScroll.emit(this.detail)})))}async getScrollElement(){return this.scrollEl||await new Promise((t=>f(this.el,t))),Promise.resolve(this.scrollEl)}async getBackgroundElement(){return this.backgroundContentEl||await new Promise((t=>f(this.el,t))),Promise.resolve(this.backgroundContentEl)}scrollToTop(t=0){return this.scrollToPoint(void 0,0,t)}async scrollToBottom(t=0){const o=await this.getScrollElement();return this.scrollToPoint(void 0,o.scrollHeight-o.clientHeight,t)}async scrollByPoint(t,o,i){const n=await this.getScrollElement();return this.scrollToPoint(t+n.scrollLeft,o+n.scrollTop,i)}async scrollToPoint(t,o,i=0){const n=await this.getScrollElement();if(i<32)return null!=o&&(n.scrollTop=o),void(null!=t&&(n.scrollLeft=t));let e,r=0;const a=new Promise((t=>e=t)),s=n.scrollTop,l=n.scrollLeft,d=null!=o?o-s:0,c=null!=t?t-l:0,b=t=>{const o=Math.min(1,(t-r)/i)-1,a=Math.pow(o,3)+1;0!==d&&(n.scrollTop=Math.floor(a*d+s)),0!==c&&(n.scrollLeft=Math.floor(a*c+l)),a<1?requestAnimationFrame(b):e()};return requestAnimationFrame((t=>{r=t,b(t)})),a}onScrollStart(){this.isScrolling=!0,this.ionScrollStart.emit({isScrolling:!0}),this.watchDog&&clearInterval(this.watchDog),this.watchDog=setInterval((()=>{this.lastScroll<Date.now()-120&&this.onScrollEnd()}),100)}onScrollEnd(){this.watchDog&&clearInterval(this.watchDog),this.watchDog=null,this.isScrolling&&(this.isScrolling=!1,this.ionScrollEnd.emit({isScrolling:!1}))}render(){const{fixedSlotPlacement:t,inheritedAttributes:o,isMainContent:i,scrollX:r,scrollY:a,el:s}=this,l=v(s)?"rtl":"ltr",d=p(this),c=this.shouldForceOverscroll(),b="ios"===d;return this.resize(),n(e,Object.assign({key:"8c1bc4a4df8698d3884741eb38512dc059210c50",role:i?"main":void 0,class:k(this.color,{[d]:!0,"content-fullscreen":this.fullscreen,"content-sizing":w("ion-popover",this.el),overscroll:c,[`content-${l}`]:!0}),style:{"--offset-top":`${this.cTop}px`,"--offset-bottom":`${this.cBottom}px`}},o),n("div",{key:"5e7412549b51ef7543d9378ecab9aac6bc461588",ref:t=>this.backgroundContentEl=t,id:"background-content",part:"background"}),"before"===t?n("slot",{name:"fixed"}):null,n("div",{key:"33f6fbf7e1e027c7cbd2dda95b487f18dc648cef",class:{"inner-scroll":!0,"scroll-x":r,"scroll-y":a,overscroll:(r||a)&&c},ref:t=>this.scrollEl=t,onScroll:this.scrollEvents?t=>this.onScroll(t):void 0,part:"scroll"},n("slot",{key:"00c8fe7b9e73533c702273c9457d274195d54e98"})),b?n("div",{class:"transition-effect"},n("div",{class:"transition-cover"}),n("div",{class:"transition-shadow"})):null,"after"===t?n("slot",{name:"fixed"}):null)}get el(){return r(this)}},L=t=>{const o=t.closest("ion-tabs");if(o)return o;return t.closest("ion-app, ion-page, .ion-page, page-inner, .popover-content")||(t=>{var o;return t.parentElement?t.parentElement:(null===(o=t.parentNode)||void 0===o?void 0:o.host)?t.parentNode.host:null})(t)},M=(t,o,i,n)=>{const e=t.currentX,r=t.currentY,a=o.scrollLeft,s=o.scrollTop,l=i-t.currentTime;if(n&&(t.startTime=i,t.startX=a,t.startY=s,t.velocityX=t.velocityY=0),t.currentTime=i,t.currentX=t.scrollLeft=a,t.currentY=t.scrollTop=s,t.deltaX=a-t.startX,t.deltaY=s-t.startY,l>0&&l<100){const o=(s-r)/l;t.velocityX=(a-e)/l*.7+.3*t.velocityX,t.velocityY=.7*o+.3*t.velocityY}};I.style=':host{--background:var(--ion-background-color, #fff);--color:var(--ion-text-color, #000);--padding-top:0px;--padding-bottom:0px;--padding-start:0px;--padding-end:0px;--keyboard-offset:0px;--offset-top:0px;--offset-bottom:0px;--overflow:auto;display:block;position:relative;-ms-flex:1;flex:1;width:100%;height:100%;margin:0 !important;padding:0 !important;font-family:var(--ion-font-family, inherit);contain:size style}:host(.ion-color) .inner-scroll{background:var(--ion-color-base);color:var(--ion-color-contrast)}#background-content{left:0px;right:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);position:absolute;background:var(--background)}.inner-scroll{left:0px;right:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:calc(var(--padding-top) + var(--offset-top));padding-bottom:calc(var(--padding-bottom) + var(--keyboard-offset) + var(--offset-bottom) + var(--ion-content-safe-area-padding-bottom, 0px));position:absolute;color:var(--color);-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;-ms-touch-action:pan-x pan-y pinch-zoom;touch-action:pan-x pan-y pinch-zoom}.scroll-y,.scroll-x{-webkit-overflow-scrolling:touch;z-index:0;will-change:scroll-position}.scroll-y{overflow-y:var(--overflow);overscroll-behavior-y:contain}.scroll-x{overflow-x:var(--overflow);overscroll-behavior-x:contain}.overscroll::before,.overscroll::after{position:absolute;width:1px;height:1px;content:""}.overscroll::before{bottom:-1px}.overscroll::after{top:-1px}:host(.content-sizing){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-height:0;contain:none}:host(.content-sizing) .inner-scroll{position:relative;top:0;bottom:0;margin-top:calc(var(--offset-top) * -1);margin-bottom:calc(var(--offset-bottom) * -1)}.transition-effect{display:none;position:absolute;width:100%;height:100vh;opacity:0;pointer-events:none}:host(.content-ltr) .transition-effect{left:-100%;}:host(.content-rtl) .transition-effect{right:-100%;}.transition-cover{position:absolute;right:0;width:100%;height:100%;background:black;opacity:0.1}.transition-shadow{display:block;position:absolute;width:100%;height:100%;-webkit-box-shadow:inset -9px 0 9px 0 rgba(0, 0, 100, 0.03);box-shadow:inset -9px 0 9px 0 rgba(0, 0, 100, 0.03)}:host(.content-ltr) .transition-shadow{right:0;}:host(.content-rtl) .transition-shadow{left:0;-webkit-transform:scaleX(-1);transform:scaleX(-1)}::slotted([slot=fixed]){position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0)}';const O=(t,o)=>{s((()=>{const i=u(0,1-(t.scrollTop-(t.scrollHeight-t.clientHeight-10))/10,1);d((()=>{o.style.setProperty("--opacity-scale",i.toString())}))}))},P=class{constructor(o){t(this,o),this.keyboardCtrl=null,this.keyboardCtrlPromise=null,this.keyboardVisible=!1,this.translucent=!1,this.checkCollapsibleFooter=()=>{if("ios"!==p(this))return;const{collapse:t}=this,o="fade"===t;if(this.destroyCollapsibleFooter(),o){const t=this.el.closest("ion-app,ion-page,.ion-page,page-inner"),o=t?y(t):null;if(!o)return void z(this.el);this.setupFadeFooter(o)}},this.setupFadeFooter=async t=>{const o=this.scrollEl=await C(t);this.contentScrollCallback=()=>{O(o,this.el)},o.addEventListener("scroll",this.contentScrollCallback),O(o,this.el)}}componentDidLoad(){this.checkCollapsibleFooter()}componentDidUpdate(){this.checkCollapsibleFooter()}async connectedCallback(){const t=j((async(t,o)=>{!1===t&&void 0!==o&&await o,this.keyboardVisible=t}));this.keyboardCtrlPromise=t;const o=await t;this.keyboardCtrlPromise===t?(this.keyboardCtrl=o,this.keyboardCtrlPromise=null):o.destroy()}disconnectedCallback(){this.keyboardCtrlPromise&&(this.keyboardCtrlPromise.then((t=>t.destroy())),this.keyboardCtrlPromise=null),this.keyboardCtrl&&(this.keyboardCtrl.destroy(),this.keyboardCtrl=null)}destroyCollapsibleFooter(){this.scrollEl&&this.contentScrollCallback&&(this.scrollEl.removeEventListener("scroll",this.contentScrollCallback),this.contentScrollCallback=void 0)}render(){const{translucent:t,collapse:o}=this,i=p(this),r=this.el.closest("ion-tabs"),a=null==r?void 0:r.querySelector(":scope > ion-tab-bar");return n(e,{key:"71939c4bbaef5062532a99ee2e33574102a9abad",role:"contentinfo",class:{[i]:!0,[`footer-${i}`]:!0,"footer-translucent":t,[`footer-translucent-${i}`]:t,"footer-toolbar-padding":!(this.keyboardVisible||a&&"bottom"===a.slot),[`footer-collapse-${o}`]:void 0!==o}},"ios"===i&&t&&n("div",{key:"2fa14f61661c47c661cecd696176728d6eafa74f",class:"footer-background"}),n("slot",{key:"8e63696e7c528d5c38201e546bf08135290d0945"}))}get el(){return r(this)}};P.style={ios:"ion-footer{display:block;position:relative;-ms-flex-order:1;order:1;width:100%;z-index:10}ion-footer.footer-toolbar-padding ion-toolbar:last-of-type{padding-bottom:var(--ion-safe-area-bottom, 0)}.footer-ios ion-toolbar:first-of-type{--border-width:0.55px 0 0}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.footer-background{left:0;right:0;top:0;bottom:0;position:absolute;-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}.footer-translucent-ios ion-toolbar{--opacity:.8}}.footer-ios.ion-no-border ion-toolbar:first-of-type{--border-width:0}.footer-collapse-fade ion-toolbar{--opacity-scale:inherit}",md:"ion-footer{display:block;position:relative;-ms-flex-order:1;order:1;width:100%;z-index:10}ion-footer.footer-toolbar-padding ion-toolbar:last-of-type{padding-bottom:var(--ion-safe-area-bottom, 0)}.footer-md{-webkit-box-shadow:0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12);box-shadow:0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12)}.footer-md.ion-no-border{-webkit-box-shadow:none;box-shadow:none}"};const W="none",A="banner",X=t=>{const o=document.querySelector(`${t}.ion-cloned-element`);if(null!==o)return o;const i=document.createElement(t);return i.classList.add("ion-cloned-element"),i.style.setProperty("display","none"),document.body.appendChild(i),i},H=t=>{if(!t)return;const o=t.querySelectorAll("ion-toolbar");return{el:t,toolbars:Array.from(o).map((t=>{const o=t.querySelector("ion-title");return{el:t,background:t.shadowRoot.querySelector(".toolbar-background"),ionTitleEl:o,innerTitleEl:o?o.shadowRoot.querySelector(".toolbar-title"):null,ionButtonsEl:Array.from(t.querySelectorAll("ion-buttons"))}}))}},Y=(t,o)=>{"fade"!==t.collapse&&(void 0===o?t.style.removeProperty("--opacity-scale"):t.style.setProperty("--opacity-scale",o.toString()))},F=(t,o=!0)=>{const i=t.el,n=t.toolbars.map((t=>t.ionTitleEl));o?(i.setAttribute("role",A),i.classList.remove("header-collapse-condense-inactive"),n.forEach((t=>{t&&t.removeAttribute("aria-hidden")}))):(i.setAttribute("role",W),i.classList.add("header-collapse-condense-inactive"),n.forEach((t=>{t&&t.setAttribute("aria-hidden","true")})))},R=(t,o,i)=>{s((()=>{const n=t.scrollTop,e=o.clientHeight,r=i?i.clientHeight:0;if(null!==i&&n<r)return o.style.setProperty("--opacity-scale","0"),void t.style.setProperty("clip-path",`inset(${e}px 0px 0px 0px)`);const a=u(0,(n-r)/10,1);d((()=>{t.style.removeProperty("clip-path"),o.style.setProperty("--opacity-scale",a.toString())}))}))},q=class{constructor(o){t(this,o),this.inheritedAttributes={},this.translucent=!1,this.setupFadeHeader=async(t,o)=>{const i=this.scrollEl=await C(t);this.contentScrollCallback=()=>{R(this.scrollEl,this.el,o)},i.addEventListener("scroll",this.contentScrollCallback),R(this.scrollEl,this.el,o)}}componentWillLoad(){this.inheritedAttributes=g(this.el)}componentDidLoad(){this.checkCollapsibleHeader()}componentDidUpdate(){this.checkCollapsibleHeader()}disconnectedCallback(){this.destroyCollapsibleHeader()}async checkCollapsibleHeader(){if("ios"!==p(this))return;const{collapse:t}=this,o="condense"===t,i="fade"===t;if(this.destroyCollapsibleHeader(),o){const t=this.el.closest("ion-app,ion-page,.ion-page,page-inner"),o=t?y(t):null;d((()=>{X("ion-title").size="large",X("ion-back-button")})),await this.setupCondenseHeader(o,t)}else if(i){const t=this.el.closest("ion-app,ion-page,.ion-page,page-inner"),o=t?y(t):null;if(!o)return void z(this.el);const i=o.querySelector('ion-header[collapse="condense"]');await this.setupFadeHeader(o,i)}}destroyCollapsibleHeader(){this.intersectionObserver&&(this.intersectionObserver.disconnect(),this.intersectionObserver=void 0),this.scrollEl&&this.contentScrollCallback&&(this.scrollEl.removeEventListener("scroll",this.contentScrollCallback),this.contentScrollCallback=void 0),this.collapsibleMainHeader&&(this.collapsibleMainHeader.classList.remove("header-collapse-main"),this.collapsibleMainHeader=void 0)}async setupCondenseHeader(t,o){if(!t||!o)return void z(this.el);if("undefined"==typeof IntersectionObserver)return;this.scrollEl=await C(t);const i=o.querySelectorAll("ion-header");if(this.collapsibleMainHeader=Array.from(i).find((t=>"condense"!==t.collapse)),!this.collapsibleMainHeader)return;const n=H(this.collapsibleMainHeader),e=H(this.el);n&&e&&(F(n,!1),Y(n.el,0),this.intersectionObserver=new IntersectionObserver((t=>{((t,o,i,n)=>{d((()=>{const e=n.scrollTop;((t,o,i)=>{if(!t[0].isIntersecting)return;const n=t[0].intersectionRatio>.9||i<=0?0:100*(1-t[0].intersectionRatio)/75;Y(o.el,1===n?void 0:n)})(t,o,e);const r=t[0],a=r.intersectionRect,s=a.width*a.height,l=0===s&&0==r.rootBounds.width*r.rootBounds.height,d=Math.abs(a.left-r.boundingClientRect.left),c=Math.abs(a.right-r.boundingClientRect.right);l||s>0&&(d>=5||c>=5)||(r.isIntersecting?(F(o,!1),F(i)):(0===a.x&&0===a.y||0!==a.width&&0!==a.height)&&e>0&&(F(o),F(i,!1),Y(o.el)))}))})(t,n,e,this.scrollEl)}),{root:t,threshold:[.25,.3,.4,.5,.6,.7,.8,.9,1]}),this.intersectionObserver.observe(e.toolbars[e.toolbars.length-1].el),this.contentScrollCallback=()=>{((t,o,i)=>{s((()=>{const n=u(1,1+-t.scrollTop/500,1.1);null===i.querySelector("ion-refresher.refresher-native")&&d((()=>{((t=[],o=1,i=!1)=>{t.forEach((t=>{const n=t.ionTitleEl,e=t.innerTitleEl;n&&"large"===n.size&&(e.style.transition=i?"all 0.2s ease-in-out":"",e.style.transform=`scale3d(${o}, ${o}, 1)`)}))})(o.toolbars,n)}))}))})(this.scrollEl,e,t)},this.scrollEl.addEventListener("scroll",this.contentScrollCallback),d((()=>{void 0!==this.collapsibleMainHeader&&this.collapsibleMainHeader.classList.add("header-collapse-main")})))}render(){const{translucent:t,inheritedAttributes:o}=this,i=p(this),r=this.collapse||"none",a="condense"===r,s=((t,o,i)=>t||o&&"md"===i?W:A)(w("ion-menu",this.el),a,i);return n(e,Object.assign({key:"863c4568cd7b8c0ec55109f193bbbaed68a1346e",role:s,class:{[i]:!0,[`header-${i}`]:!0,"header-translucent":this.translucent,[`header-collapse-${r}`]:!0,[`header-translucent-${i}`]:this.translucent}},o),"ios"===i&&t&&n("div",{key:"25c3bdce328b0b35607d154c8b8374679313d881",class:"header-background"}),n("slot",{key:"b44fab0a9be7920b9650da26117c783e751e1702"}))}get el(){return r(this)}};q.style={ios:"ion-header{display:block;position:relative;-ms-flex-order:-1;order:-1;width:100%;z-index:10}ion-header ion-toolbar:first-of-type{padding-top:var(--ion-safe-area-top, 0)}.header-ios ion-toolbar:last-of-type{--border-width:0 0 0.55px}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.header-background{left:0;right:0;top:0;bottom:0;position:absolute;-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}.header-translucent-ios ion-toolbar{--opacity:.8}.header-collapse-condense-inactive .header-background{-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.header-ios.ion-no-border ion-toolbar:last-of-type{--border-width:0}.header-collapse-fade ion-toolbar{--opacity-scale:inherit}.header-collapse-fade.header-transitioning ion-toolbar{--background:transparent;--border-style:none}.header-collapse-condense{z-index:9}.header-collapse-condense ion-toolbar{position:-webkit-sticky;position:sticky;top:0}.header-collapse-condense ion-toolbar:first-of-type{padding-top:0px;z-index:1}.header-collapse-condense ion-toolbar{z-index:0}.header-collapse-condense ion-toolbar:last-of-type{--border-width:0px}.header-collapse-condense ion-toolbar ion-searchbar{padding-top:0px;padding-bottom:13px}.header-collapse-main{--opacity-scale:1}.header-collapse-main ion-toolbar{--opacity-scale:inherit}.header-collapse-main ion-toolbar.in-toolbar ion-title,.header-collapse-main ion-toolbar.in-toolbar ion-buttons{-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.header-collapse-condense ion-toolbar,.header-collapse-condense-inactive.header-transitioning:not(.header-collapse-condense) ion-toolbar{--background:var(--ion-background-color, #fff)}.header-collapse-condense-inactive.header-transitioning:not(.header-collapse-condense) ion-toolbar{--border-style:none;--opacity-scale:1}.header-collapse-condense-inactive:not(.header-collapse-condense) ion-toolbar.in-toolbar ion-title,.header-collapse-condense-inactive:not(.header-collapse-condense) ion-toolbar.in-toolbar ion-buttons.buttons-collapse{opacity:0;pointer-events:none}.header-collapse-condense-inactive.header-collapse-condense ion-toolbar.in-toolbar ion-title,.header-collapse-condense-inactive.header-collapse-condense ion-toolbar.in-toolbar ion-buttons.buttons-collapse{visibility:hidden}ion-header.header-ios:not(.header-collapse-main):has(~ion-content ion-header.header-ios[collapse=condense],~ion-content ion-header.header-ios.header-collapse-condense){opacity:0}",md:"ion-header{display:block;position:relative;-ms-flex-order:-1;order:-1;width:100%;z-index:10}ion-header ion-toolbar:first-of-type{padding-top:var(--ion-safe-area-top, 0)}.header-md{-webkit-box-shadow:0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12);box-shadow:0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12)}.header-md.header-collapse-condense{display:none}.header-md.ion-no-border{-webkit-box-shadow:none;box-shadow:none}"};const J=class{constructor(o){t(this,o),this.ionNavWillLoad=a(this,"ionNavWillLoad",7),this.ionNavWillChange=a(this,"ionNavWillChange",3),this.ionNavDidChange=a(this,"ionNavDidChange",3),this.lockController=D(),this.gestureOrAnimationInProgress=!1,this.mode=p(this),this.animated=!0}swipeHandlerChanged(){this.gesture&&this.gesture.enable(void 0!==this.swipeHandler)}async connectedCallback(){const t=()=>{this.gestureOrAnimationInProgress=!0,this.swipeHandler&&this.swipeHandler.onStart()};this.gesture=(await import("./p-D8HJQ1qq.js")).createSwipeBackGesture(this.el,(()=>!this.gestureOrAnimationInProgress&&!!this.swipeHandler&&this.swipeHandler.canStart()),(()=>t()),(t=>{var o;return null===(o=this.ani)||void 0===o?void 0:o.progressStep(t)}),((t,o,i)=>{if(this.ani){this.ani.onFinish((()=>{this.gestureOrAnimationInProgress=!1,this.swipeHandler&&this.swipeHandler.onEnd(t)}),{oneTimeCallback:!0});let n=t?-.001:.001;t?n+=T([0,0],[.32,.72],[0,1],[1,1],o)[0]:(this.ani.easing("cubic-bezier(1, 0, 0.68, 0.28)"),n+=T([0,0],[1,0],[.68,.28],[1,1],o)[0]),this.ani.progressEnd(t?1:0,n,i)}else this.gestureOrAnimationInProgress=!1})),this.swipeHandlerChanged()}componentWillLoad(){this.ionNavWillLoad.emit()}disconnectedCallback(){this.gesture&&(this.gesture.destroy(),this.gesture=void 0)}async commit(t,o,i){const n=await this.lockController.lock();let e=!1;try{e=await this.transition(t,o,i)}catch(t){c("[ion-router-outlet] - Exception in commit:",t)}return n(),e}async setRouteId(t,o,i,n){return{changed:await this.setRoot(t,o,{duration:"root"===i?0:void 0,direction:"back"===i?"back":"forward",animationBuilder:n}),element:this.activeEl}}async getRouteId(){const t=this.activeEl;return t?{id:t.tagName,element:t,params:this.activeParams}:void 0}async setRoot(t,o,i){if(this.activeComponent===t&&x(o,this.activeParams))return!1;const n=this.activeEl,e=await B(this.delegate,this.el,t,["ion-page","ion-page-invisible"],o);return this.activeComponent=t,this.activeEl=e,this.activeParams=o,await this.commit(e,n,i),await S(this.delegate,n),!0}async transition(t,i,n={}){if(i===t)return!1;this.ionNavWillChange.emit();const{el:e,mode:r}=this,a=this.animated&&o.getBoolean("animated",!0),s=n.animationBuilder||this.animation||o.get("navAnimation");return await Z(Object.assign(Object.assign({mode:r,animated:a,enteringEl:t,leavingEl:i,baseEl:e,deepWait:m(e),progressCallback:n.progressAnimation?t=>{void 0===t||this.gestureOrAnimationInProgress?this.ani=t:(this.gestureOrAnimationInProgress=!0,t.onFinish((()=>{this.gestureOrAnimationInProgress=!1,this.swipeHandler&&this.swipeHandler.onEnd(!1)}),{oneTimeCallback:!0}),t.progressEnd(0,0,0))}:void 0},n),{animationBuilder:s})),this.ionNavDidChange.emit(),!0}render(){return n("slot",{key:"386c41745b61daba161cf75063da97fe29ba36cb"})}get el(){return r(this)}static get watchers(){return{swipeHandler:[{swipeHandlerChanged:0}]}}};J.style=":host{left:0;right:0;top:0;bottom:0;position:absolute;contain:layout size style;z-index:0}";const N=class{constructor(o){t(this,o),this.ionStyle=a(this,"ionStyle",7)}sizeChanged(){this.emitStyle()}connectedCallback(){this.emitStyle()}emitStyle(){const t=this.getSize();this.ionStyle.emit({[`title-${t}`]:!0})}getSize(){return void 0!==this.size?this.size:"default"}render(){const t=p(this),o=this.getSize();return n(e,{key:"44e63f8439df64c470692904427b417e19406476",class:k(this.color,{[t]:!0,[`title-${o}`]:!0,"title-rtl":"rtl"===document.dir})},n("div",{key:"784cf60a0db16045391891cc8fad0c7dbeba4039",class:"toolbar-title"},n("slot",{key:"0c720a50479ba257e8756337aeb9b0ab7516a227"})))}get el(){return r(this)}static get watchers(){return{size:[{sizeChanged:0}]}}};N.style={ios:":host{--color:initial;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;-webkit-transform:translateZ(0);transform:translateZ(0);color:var(--color)}:host(.ion-color){color:var(--ion-color-base)}.toolbar-title{display:block;width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;pointer-events:auto}:host(.title-small) .toolbar-title{white-space:normal}:host{top:0;-webkit-padding-start:90px;padding-inline-start:90px;-webkit-padding-end:90px;padding-inline-end:90px;padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);position:absolute;width:100%;height:100%;-webkit-transform:translateZ(0);transform:translateZ(0);font-size:min(1.0625rem, 20.4px);font-weight:600;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;pointer-events:none}:host{inset-inline-start:0}:host(.title-small){-webkit-padding-start:9px;padding-inline-start:9px;-webkit-padding-end:9px;padding-inline-end:9px;padding-top:6px;padding-bottom:16px;position:relative;font-size:min(0.8125rem, 23.4px);font-weight:normal}:host(.title-large){-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:2px;padding-bottom:4px;-webkit-transform-origin:left center;transform-origin:left center;position:static;-ms-flex-align:end;align-items:flex-end;min-width:100%;font-size:min(2.125rem, 61.2px);font-weight:700;text-align:start}:host(.title-large.title-rtl){-webkit-transform-origin:right center;transform-origin:right center}:host(.title-large.ion-cloned-element){--color:var(--ion-text-color, #000);font-family:var(--ion-font-family)}:host(.title-large) .toolbar-title{-webkit-transform-origin:inherit;transform-origin:inherit;width:auto}:host-context([dir=rtl]):host(.title-large) .toolbar-title,:host-context([dir=rtl]).title-large .toolbar-title{-webkit-transform-origin:calc(100% - inherit);transform-origin:calc(100% - inherit)}@supports selector(:dir(rtl)){:host(.title-large:dir(rtl)) .toolbar-title{-webkit-transform-origin:calc(100% - inherit);transform-origin:calc(100% - inherit)}}",md:":host{--color:initial;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;-webkit-transform:translateZ(0);transform:translateZ(0);color:var(--color)}:host(.ion-color){color:var(--ion-color-base)}.toolbar-title{display:block;width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;pointer-events:auto}:host(.title-small) .toolbar-title{white-space:normal}:host{-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:20px;padding-inline-end:20px;padding-top:0;padding-bottom:0;font-size:1.25rem;font-weight:500;letter-spacing:0.0125em}:host(.title-small){width:100%;height:100%;font-size:0.9375rem;font-weight:normal}"};const G=class{constructor(o){t(this,o),this.childrenStyles=new Map}componentWillLoad(){const t=Array.from(this.el.querySelectorAll("ion-buttons")),o=t.find((t=>"start"===t.slot));o&&o.classList.add("buttons-first-slot");const i=t.reverse(),n=i.find((t=>"end"===t.slot))||i.find((t=>"primary"===t.slot))||i.find((t=>"secondary"===t.slot));n&&n.classList.add("buttons-last-slot")}childrenStyle(t){t.stopPropagation();const o=t.target.tagName,i=t.detail,n={},e=this.childrenStyles.get(o)||{};let r=!1;Object.keys(i).forEach((t=>{const o=`toolbar-${t}`,a=i[t];a!==e[o]&&(r=!0),a&&(n[o]=!0)})),r&&(this.childrenStyles.set(o,n),l(this))}render(){const t=p(this),o={};return this.childrenStyles.forEach((t=>{Object.assign(o,t)})),n(e,{key:"b849db2863778dee6c5a251bffa1b3a657aeb036",class:Object.assign(Object.assign({},o),k(this.color,{[t]:!0,"in-toolbar":w("ion-toolbar",this.el)}))},n("div",{key:"67f5bba9c4f527c3f35bfe1313a2b85741f9b246",class:"toolbar-background",part:"background"}),n("div",{key:"085e8c68f056e5b0deb9d1606431fbeb45dae8e5",class:"toolbar-container",part:"container"},n("slot",{key:"15227c79c3baf883fd8c43fdb7e1313453933c79",name:"start"}),n("slot",{key:"0b8a7f7e685aa31c80d9bc03446ccc3a9d07e0e8",name:"secondary"}),n("div",{key:"57e4628c1fa89df79dd80456259db961bb691404",class:"toolbar-content",part:"content"},n("slot",{key:"82c2f6e1acf8d96db259bd8baf295881801edbd5"})),n("slot",{key:"b2d4afb15214199f206c0a5e08b581e4c9c2f58a",name:"primary"}),n("slot",{key:"bfb909a0c472f8834046c2ea23bef2f562167ad3",name:"end"})))}get el(){return r(this)}};G.style={ios:":host{--border-width:0;--border-style:solid;--opacity:1;--opacity-scale:1;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:block;position:relative;width:100%;padding-right:var(--ion-safe-area-right);padding-left:var(--ion-safe-area-left);color:var(--color);font-family:var(--ion-font-family, inherit);contain:content;z-index:10;-webkit-box-sizing:border-box;box-sizing:border-box}:host(.ion-color){color:var(--ion-color-contrast)}:host(.ion-color) .toolbar-background{background:var(--ion-color-base)}.toolbar-container{-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:-ms-flexbox;display:flex;position:relative;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;width:100%;min-height:var(--min-height);contain:content;overflow:hidden;z-index:10;-webkit-box-sizing:border-box;box-sizing:border-box}.toolbar-background{left:0;right:0;top:0;bottom:0;position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);contain:strict;opacity:calc(var(--opacity) * var(--opacity-scale));z-index:-1;pointer-events:none}::slotted(ion-progress-bar){left:0;right:0;bottom:0;position:absolute}:host{--background:var(--ion-toolbar-background, var(--ion-color-step-50, var(--ion-background-color-step-50, #f7f7f7)));--color:var(--ion-toolbar-color, var(--ion-text-color, #000));--border-color:var(--ion-toolbar-border-color, var(--ion-border-color, var(--ion-color-step-150, var(--ion-background-color-step-150, rgba(0, 0, 0, 0.2)))));--padding-top:3px;--padding-bottom:3px;--padding-start:4px;--padding-end:4px;--min-height:44px}.toolbar-content{-ms-flex:1;flex:1;-ms-flex-order:4;order:4;min-width:0}:host(.toolbar-segment) .toolbar-content{display:-ms-inline-flexbox;display:inline-flex}:host(.toolbar-searchbar) .toolbar-container{padding-top:0;padding-bottom:0}:host(.toolbar-searchbar) ::slotted(*){-ms-flex-item-align:start;align-self:start}:host(.toolbar-searchbar) ::slotted(ion-chip){margin-top:3px}::slotted(ion-buttons){min-height:38px}::slotted([slot=start]){-ms-flex-order:2;order:2}::slotted([slot=secondary]){-ms-flex-order:3;order:3}::slotted([slot=primary]){-ms-flex-order:5;order:5;text-align:end}::slotted([slot=end]){-ms-flex-order:6;order:6;text-align:end}:host(.toolbar-title-large) .toolbar-container{-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:start;align-items:flex-start}:host(.toolbar-title-large) .toolbar-content ion-title{-ms-flex:1;flex:1;-ms-flex-order:8;order:8;min-width:100%}",md:":host{--border-width:0;--border-style:solid;--opacity:1;--opacity-scale:1;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:block;position:relative;width:100%;padding-right:var(--ion-safe-area-right);padding-left:var(--ion-safe-area-left);color:var(--color);font-family:var(--ion-font-family, inherit);contain:content;z-index:10;-webkit-box-sizing:border-box;box-sizing:border-box}:host(.ion-color){color:var(--ion-color-contrast)}:host(.ion-color) .toolbar-background{background:var(--ion-color-base)}.toolbar-container{-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:-ms-flexbox;display:flex;position:relative;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;width:100%;min-height:var(--min-height);contain:content;overflow:hidden;z-index:10;-webkit-box-sizing:border-box;box-sizing:border-box}.toolbar-background{left:0;right:0;top:0;bottom:0;position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);contain:strict;opacity:calc(var(--opacity) * var(--opacity-scale));z-index:-1;pointer-events:none}::slotted(ion-progress-bar){left:0;right:0;bottom:0;position:absolute}:host{--background:var(--ion-toolbar-background, var(--ion-background-color, #fff));--color:var(--ion-toolbar-color, var(--ion-text-color, #424242));--border-color:var(--ion-toolbar-border-color, var(--ion-border-color, var(--ion-color-step-150, var(--ion-background-color-step-150, #c1c4cd))));--padding-top:0;--padding-bottom:0;--padding-start:0;--padding-end:0;--min-height:56px}.toolbar-content{-ms-flex:1;flex:1;-ms-flex-order:3;order:3;min-width:0;max-width:100%}::slotted(.buttons-first-slot){-webkit-margin-start:4px;margin-inline-start:4px}::slotted(.buttons-last-slot){-webkit-margin-end:4px;margin-inline-end:4px}::slotted([slot=start]){-ms-flex-order:2;order:2}::slotted([slot=secondary]){-ms-flex-order:4;order:4}::slotted([slot=primary]){-ms-flex-order:5;order:5;text-align:end}::slotted([slot=end]){-ms-flex-order:6;order:6;text-align:end}"};export{$ as ion_app,_ as ion_buttons,I as ion_content,P as ion_footer,q as ion_header,J as ion_router_outlet,N as ion_title,G as ion_toolbar}
|
|
@@ -382,6 +382,11 @@ export declare class Modal implements ComponentInterface, OverlayInterface {
|
|
|
382
382
|
private onDragEnd;
|
|
383
383
|
/**
|
|
384
384
|
* Creates the context object for safe-area utilities.
|
|
385
|
+
*
|
|
386
|
+
* `hasCustomDimensions` is only set by `setInitialSafeAreaOverrides()`
|
|
387
|
+
* because it is only read by `getInitialSafeAreaConfig()`. Other callers
|
|
388
|
+
* (resize handler, post-animation update, fullscreen-padding apply) would
|
|
389
|
+
* pay a `getComputedStyle()` cost for a value they never consult.
|
|
385
390
|
*/
|
|
386
391
|
private getSafeAreaContext;
|
|
387
392
|
/**
|
|
@@ -407,12 +412,39 @@ export declare class Modal implements ComponentInterface, OverlayInterface {
|
|
|
407
412
|
*/
|
|
408
413
|
private updateSafeAreaOverrides;
|
|
409
414
|
/**
|
|
410
|
-
* Applies
|
|
411
|
-
*
|
|
415
|
+
* Applies safe-area-bottom scroll padding to ion-content inside
|
|
416
|
+
* fullscreen modals that have no ion-footer. This prevents content
|
|
417
|
+
* from being hidden behind the system navigation bar while keeping
|
|
418
|
+
* the modal background edge-to-edge (no visible gap).
|
|
412
419
|
*/
|
|
413
420
|
private applyFullscreenSafeArea;
|
|
414
421
|
/**
|
|
415
|
-
*
|
|
422
|
+
* Sets --ion-content-safe-area-padding-bottom on the given ion-content
|
|
423
|
+
* when no footer is present, so ion-content's .inner-scroll includes
|
|
424
|
+
* safe-area-bottom in its scroll padding. This keeps the modal background
|
|
425
|
+
* edge-to-edge while ensuring content scrolls clear of the system nav bar.
|
|
426
|
+
*/
|
|
427
|
+
private applyFullscreenSafeAreaTo;
|
|
428
|
+
/**
|
|
429
|
+
* Removes the internal --ion-content-safe-area-padding-bottom property
|
|
430
|
+
* from an already-located ion-content. Callers do their own
|
|
431
|
+
* findContentAndFooter() so they can also read hasFooter if needed.
|
|
432
|
+
*/
|
|
433
|
+
private clearContentSafeAreaPadding;
|
|
434
|
+
/**
|
|
435
|
+
* Finds ion-content and ion-footer among direct children and one level of
|
|
436
|
+
* grandchildren (for wrapped components like <app-footer><ion-footer>).
|
|
437
|
+
*
|
|
438
|
+
* Intentionally does NOT use findIonContent() or querySelector() because
|
|
439
|
+
* those search the full subtree and would match ion-content inside nested
|
|
440
|
+
* routes/pages. We only want direct slot children (+ one wrapper level).
|
|
441
|
+
*
|
|
442
|
+
* Uses a manual loop instead of querySelector(':scope > ...') because
|
|
443
|
+
* Stencil's mock-doc (used in spec tests) does not support :scope.
|
|
444
|
+
*/
|
|
445
|
+
private findContentAndFooter;
|
|
446
|
+
/**
|
|
447
|
+
* Clears all safe-area overrides and padding.
|
|
416
448
|
*/
|
|
417
449
|
private cleanupSafeAreaOverrides;
|
|
418
450
|
render(): any;
|
|
@@ -18,6 +18,11 @@ export interface ModalSafeAreaContext {
|
|
|
18
18
|
presentingElement?: HTMLElement;
|
|
19
19
|
breakpoints?: number[];
|
|
20
20
|
currentBreakpoint?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Only consulted by `getInitialSafeAreaConfig()`. Callers that only use the
|
|
23
|
+
* context for non-initial paths can omit this. See `hasCustomModalDimensions()`.
|
|
24
|
+
*/
|
|
25
|
+
hasCustomDimensions?: boolean;
|
|
21
26
|
}
|
|
22
27
|
/**
|
|
23
28
|
* Resolves the current root --ion-safe-area-top value to pixels.
|
|
@@ -28,6 +33,17 @@ export interface ModalSafeAreaContext {
|
|
|
28
33
|
* Results are cached for the current frame to avoid repeated reflows.
|
|
29
34
|
*/
|
|
30
35
|
export declare const getRootSafeAreaTop: () => number;
|
|
36
|
+
/**
|
|
37
|
+
* True when the modal host declares BOTH a non-fullscreen `--width` AND a
|
|
38
|
+
* non-fullscreen `--height` (i.e. a centered-dialog-like modal that doesn't
|
|
39
|
+
* touch any screen edge).
|
|
40
|
+
*
|
|
41
|
+
* The conservative "both axes" check avoids mis-zeroing safe-area for
|
|
42
|
+
* partial-custom modals where the modal still touches top/bottom edges
|
|
43
|
+
* (e.g. only `--width` overridden). Partial cases fall through to the
|
|
44
|
+
* existing position-based post-animation correction.
|
|
45
|
+
*/
|
|
46
|
+
export declare const hasCustomModalDimensions: (hostEl: HTMLElement) => boolean;
|
|
31
47
|
/**
|
|
32
48
|
* Returns the initial safe-area configuration based on modal type.
|
|
33
49
|
* This is called before animation starts and uses configuration-based prediction.
|
package/hydrate/index.js
CHANGED
|
@@ -12367,7 +12367,7 @@ const isRTL$1 = (hostEl) => {
|
|
|
12367
12367
|
return (document === null || document === void 0 ? void 0 : document.dir.toLowerCase()) === 'rtl';
|
|
12368
12368
|
};
|
|
12369
12369
|
|
|
12370
|
-
const contentCss = () => `:host{--background:var(--ion-background-color, #fff);--color:var(--ion-text-color, #000);--padding-top:0px;--padding-bottom:0px;--padding-start:0px;--padding-end:0px;--keyboard-offset:0px;--offset-top:0px;--offset-bottom:0px;--overflow:auto;display:block;position:relative;-ms-flex:1;flex:1;width:100%;height:100%;margin:0 !important;padding:0 !important;font-family:var(--ion-font-family, inherit);contain:size style}:host(.ion-color) .inner-scroll{background:var(--ion-color-base);color:var(--ion-color-contrast)}#background-content{left:0px;right:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);position:absolute;background:var(--background)}.inner-scroll{left:0px;right:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:calc(var(--padding-top) + var(--offset-top));padding-bottom:calc(var(--padding-bottom) + var(--keyboard-offset) + var(--offset-bottom));position:absolute;color:var(--color);-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;-ms-touch-action:pan-x pan-y pinch-zoom;touch-action:pan-x pan-y pinch-zoom}.scroll-y,.scroll-x{-webkit-overflow-scrolling:touch;z-index:0;will-change:scroll-position}.scroll-y{overflow-y:var(--overflow);overscroll-behavior-y:contain}.scroll-x{overflow-x:var(--overflow);overscroll-behavior-x:contain}.overscroll::before,.overscroll::after{position:absolute;width:1px;height:1px;content:""}.overscroll::before{bottom:-1px}.overscroll::after{top:-1px}:host(.content-sizing){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-height:0;contain:none}:host(.content-sizing) .inner-scroll{position:relative;top:0;bottom:0;margin-top:calc(var(--offset-top) * -1);margin-bottom:calc(var(--offset-bottom) * -1)}.transition-effect{display:none;position:absolute;width:100%;height:100vh;opacity:0;pointer-events:none}:host(.content-ltr) .transition-effect{left:-100%;}:host(.content-rtl) .transition-effect{right:-100%;}.transition-cover{position:absolute;right:0;width:100%;height:100%;background:black;opacity:0.1}.transition-shadow{display:block;position:absolute;width:100%;height:100%;-webkit-box-shadow:inset -9px 0 9px 0 rgba(0, 0, 100, 0.03);box-shadow:inset -9px 0 9px 0 rgba(0, 0, 100, 0.03)}:host(.content-ltr) .transition-shadow{right:0;}:host(.content-rtl) .transition-shadow{left:0;-webkit-transform:scaleX(-1);transform:scaleX(-1)}::slotted([slot=fixed]){position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0)}`;
|
|
12370
|
+
const contentCss = () => `:host{--background:var(--ion-background-color, #fff);--color:var(--ion-text-color, #000);--padding-top:0px;--padding-bottom:0px;--padding-start:0px;--padding-end:0px;--keyboard-offset:0px;--offset-top:0px;--offset-bottom:0px;--overflow:auto;display:block;position:relative;-ms-flex:1;flex:1;width:100%;height:100%;margin:0 !important;padding:0 !important;font-family:var(--ion-font-family, inherit);contain:size style}:host(.ion-color) .inner-scroll{background:var(--ion-color-base);color:var(--ion-color-contrast)}#background-content{left:0px;right:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);position:absolute;background:var(--background)}.inner-scroll{left:0px;right:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:calc(var(--padding-top) + var(--offset-top));padding-bottom:calc(var(--padding-bottom) + var(--keyboard-offset) + var(--offset-bottom) + var(--ion-content-safe-area-padding-bottom, 0px));position:absolute;color:var(--color);-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;-ms-touch-action:pan-x pan-y pinch-zoom;touch-action:pan-x pan-y pinch-zoom}.scroll-y,.scroll-x{-webkit-overflow-scrolling:touch;z-index:0;will-change:scroll-position}.scroll-y{overflow-y:var(--overflow);overscroll-behavior-y:contain}.scroll-x{overflow-x:var(--overflow);overscroll-behavior-x:contain}.overscroll::before,.overscroll::after{position:absolute;width:1px;height:1px;content:""}.overscroll::before{bottom:-1px}.overscroll::after{top:-1px}:host(.content-sizing){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-height:0;contain:none}:host(.content-sizing) .inner-scroll{position:relative;top:0;bottom:0;margin-top:calc(var(--offset-top) * -1);margin-bottom:calc(var(--offset-bottom) * -1)}.transition-effect{display:none;position:absolute;width:100%;height:100vh;opacity:0;pointer-events:none}:host(.content-ltr) .transition-effect{left:-100%;}:host(.content-rtl) .transition-effect{right:-100%;}.transition-cover{position:absolute;right:0;width:100%;height:100%;background:black;opacity:0.1}.transition-shadow{display:block;position:absolute;width:100%;height:100%;-webkit-box-shadow:inset -9px 0 9px 0 rgba(0, 0, 100, 0.03);box-shadow:inset -9px 0 9px 0 rgba(0, 0, 100, 0.03)}:host(.content-ltr) .transition-shadow{right:0;}:host(.content-rtl) .transition-shadow{left:0;-webkit-transform:scaleX(-1);transform:scaleX(-1)}::slotted([slot=fixed]){position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0)}`;
|
|
12371
12371
|
|
|
12372
12372
|
/**
|
|
12373
12373
|
* @slot - Content is placed in the scrollable area if provided without a slot.
|
|
@@ -25005,6 +25005,12 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
25005
25005
|
const MODAL_INSET_MIN_WIDTH = 768;
|
|
25006
25006
|
const MODAL_INSET_MIN_HEIGHT = 600;
|
|
25007
25007
|
const EDGE_THRESHOLD = 5;
|
|
25008
|
+
/**
|
|
25009
|
+
* CSS values for `--width` / `--height` that are treated as fullscreen
|
|
25010
|
+
* (modal touches the corresponding screen edges). Empty string means the
|
|
25011
|
+
* property was not overridden. See `hasCustomModalDimensions()`.
|
|
25012
|
+
*/
|
|
25013
|
+
const FULLSCREEN_SIZE_VALUES = new Set(['', '100%', '100vw', '100vh', '100dvw', '100dvh', '100svw', '100svh']);
|
|
25008
25014
|
/**
|
|
25009
25015
|
* Cache for resolved root safe-area-top value, invalidated once per frame.
|
|
25010
25016
|
*/
|
|
@@ -25053,6 +25059,22 @@ const getRootSafeAreaTop = () => {
|
|
|
25053
25059
|
}
|
|
25054
25060
|
return value;
|
|
25055
25061
|
};
|
|
25062
|
+
/**
|
|
25063
|
+
* True when the modal host declares BOTH a non-fullscreen `--width` AND a
|
|
25064
|
+
* non-fullscreen `--height` (i.e. a centered-dialog-like modal that doesn't
|
|
25065
|
+
* touch any screen edge).
|
|
25066
|
+
*
|
|
25067
|
+
* The conservative "both axes" check avoids mis-zeroing safe-area for
|
|
25068
|
+
* partial-custom modals where the modal still touches top/bottom edges
|
|
25069
|
+
* (e.g. only `--width` overridden). Partial cases fall through to the
|
|
25070
|
+
* existing position-based post-animation correction.
|
|
25071
|
+
*/
|
|
25072
|
+
const hasCustomModalDimensions = (hostEl) => {
|
|
25073
|
+
const styles = getComputedStyle(hostEl);
|
|
25074
|
+
const width = styles.getPropertyValue('--width').trim();
|
|
25075
|
+
const height = styles.getPropertyValue('--height').trim();
|
|
25076
|
+
return !FULLSCREEN_SIZE_VALUES.has(width) && !FULLSCREEN_SIZE_VALUES.has(height);
|
|
25077
|
+
};
|
|
25056
25078
|
/**
|
|
25057
25079
|
* Returns the initial safe-area configuration based on modal type.
|
|
25058
25080
|
* This is called before animation starts and uses configuration-based prediction.
|
|
@@ -25087,8 +25109,11 @@ const getInitialSafeAreaConfig = (context) => {
|
|
|
25087
25109
|
}
|
|
25088
25110
|
// On viewports that meet the centered dialog media query breakpoints,
|
|
25089
25111
|
// regular modals render as centered dialogs (not fullscreen), so they
|
|
25090
|
-
// don't touch any screen edges and don't need safe-area insets.
|
|
25091
|
-
|
|
25112
|
+
// don't touch any screen edges and don't need safe-area insets. Also
|
|
25113
|
+
// applies to phone viewports when the modal declares custom --width and
|
|
25114
|
+
// --height; these don't touch screen edges either, so the initial
|
|
25115
|
+
// prediction must be zero to avoid a post-animation correction flash.
|
|
25116
|
+
if (isCenteredDialogViewport() || context.hasCustomDimensions) {
|
|
25092
25117
|
return {
|
|
25093
25118
|
top: '0px',
|
|
25094
25119
|
bottom: '0px',
|
|
@@ -25400,12 +25425,10 @@ class Modal {
|
|
|
25400
25425
|
// since the viewport may have crossed the centered-dialog breakpoint.
|
|
25401
25426
|
if (!context.isSheetModal && !context.isCardModal) {
|
|
25402
25427
|
this.updateSafeAreaOverrides();
|
|
25403
|
-
// Re-evaluate fullscreen safe-area padding: clear first, then re-apply
|
|
25404
|
-
|
|
25405
|
-
|
|
25406
|
-
|
|
25407
|
-
}
|
|
25408
|
-
this.applyFullscreenSafeArea();
|
|
25428
|
+
// Re-evaluate fullscreen safe-area padding: clear first, then re-apply.
|
|
25429
|
+
const { contentEl, hasFooter } = this.findContentAndFooter();
|
|
25430
|
+
this.clearContentSafeAreaPadding(contentEl);
|
|
25431
|
+
this.applyFullscreenSafeAreaTo(contentEl, hasFooter);
|
|
25409
25432
|
}
|
|
25410
25433
|
}, 50); // Debounce to avoid excessive calls during active resizing
|
|
25411
25434
|
}
|
|
@@ -26152,6 +26175,11 @@ class Modal {
|
|
|
26152
26175
|
}
|
|
26153
26176
|
/**
|
|
26154
26177
|
* Creates the context object for safe-area utilities.
|
|
26178
|
+
*
|
|
26179
|
+
* `hasCustomDimensions` is only set by `setInitialSafeAreaOverrides()`
|
|
26180
|
+
* because it is only read by `getInitialSafeAreaConfig()`. Other callers
|
|
26181
|
+
* (resize handler, post-animation update, fullscreen-padding apply) would
|
|
26182
|
+
* pay a `getComputedStyle()` cost for a value they never consult.
|
|
26155
26183
|
*/
|
|
26156
26184
|
getSafeAreaContext() {
|
|
26157
26185
|
return {
|
|
@@ -26173,7 +26201,7 @@ class Modal {
|
|
|
26173
26201
|
* sheets to prevent header content from getting double-offset padding).
|
|
26174
26202
|
*/
|
|
26175
26203
|
setInitialSafeAreaOverrides() {
|
|
26176
|
-
const context = this.getSafeAreaContext();
|
|
26204
|
+
const context = Object.assign(Object.assign({}, this.getSafeAreaContext()), { hasCustomDimensions: hasCustomModalDimensions(this.el) });
|
|
26177
26205
|
const safeAreaConfig = getInitialSafeAreaConfig(context);
|
|
26178
26206
|
applySafeAreaOverrides(this.el, safeAreaConfig);
|
|
26179
26207
|
// Set the internal offset property with the resolved root safe-area-top value
|
|
@@ -26213,59 +26241,79 @@ class Modal {
|
|
|
26213
26241
|
applySafeAreaOverrides(el, safeAreaConfig);
|
|
26214
26242
|
}
|
|
26215
26243
|
/**
|
|
26216
|
-
* Applies
|
|
26217
|
-
*
|
|
26244
|
+
* Applies safe-area-bottom scroll padding to ion-content inside
|
|
26245
|
+
* fullscreen modals that have no ion-footer. This prevents content
|
|
26246
|
+
* from being hidden behind the system navigation bar while keeping
|
|
26247
|
+
* the modal background edge-to-edge (no visible gap).
|
|
26218
26248
|
*/
|
|
26219
26249
|
applyFullscreenSafeArea() {
|
|
26220
|
-
const { wrapperEl, el } = this;
|
|
26221
|
-
if (!wrapperEl)
|
|
26222
|
-
return;
|
|
26223
26250
|
const context = this.getSafeAreaContext();
|
|
26224
26251
|
if (context.isSheetModal || context.isCardModal)
|
|
26225
26252
|
return;
|
|
26226
|
-
|
|
26227
|
-
|
|
26228
|
-
|
|
26229
|
-
|
|
26230
|
-
|
|
26231
|
-
|
|
26253
|
+
const { contentEl, hasFooter } = this.findContentAndFooter();
|
|
26254
|
+
this.applyFullscreenSafeAreaTo(contentEl, hasFooter);
|
|
26255
|
+
}
|
|
26256
|
+
/**
|
|
26257
|
+
* Sets --ion-content-safe-area-padding-bottom on the given ion-content
|
|
26258
|
+
* when no footer is present, so ion-content's .inner-scroll includes
|
|
26259
|
+
* safe-area-bottom in its scroll padding. This keeps the modal background
|
|
26260
|
+
* edge-to-edge while ensuring content scrolls clear of the system nav bar.
|
|
26261
|
+
*/
|
|
26262
|
+
applyFullscreenSafeAreaTo(contentEl, hasFooter) {
|
|
26263
|
+
// Only apply for standard Ionic layouts (has ion-content but no
|
|
26264
|
+
// ion-footer). When a footer is present it handles its own safe-area
|
|
26265
|
+
// padding. Custom modals with raw HTML are developer-controlled.
|
|
26266
|
+
if (!contentEl || hasFooter)
|
|
26267
|
+
return;
|
|
26268
|
+
contentEl.style.setProperty('--ion-content-safe-area-padding-bottom', 'var(--ion-safe-area-bottom, 0px)');
|
|
26269
|
+
}
|
|
26270
|
+
/**
|
|
26271
|
+
* Removes the internal --ion-content-safe-area-padding-bottom property
|
|
26272
|
+
* from an already-located ion-content. Callers do their own
|
|
26273
|
+
* findContentAndFooter() so they can also read hasFooter if needed.
|
|
26274
|
+
*/
|
|
26275
|
+
clearContentSafeAreaPadding(contentEl) {
|
|
26276
|
+
if (!contentEl)
|
|
26277
|
+
return;
|
|
26278
|
+
contentEl.style.removeProperty('--ion-content-safe-area-padding-bottom');
|
|
26279
|
+
}
|
|
26280
|
+
/**
|
|
26281
|
+
* Finds ion-content and ion-footer among direct children and one level of
|
|
26282
|
+
* grandchildren (for wrapped components like <app-footer><ion-footer>).
|
|
26283
|
+
*
|
|
26284
|
+
* Intentionally does NOT use findIonContent() or querySelector() because
|
|
26285
|
+
* those search the full subtree and would match ion-content inside nested
|
|
26286
|
+
* routes/pages. We only want direct slot children (+ one wrapper level).
|
|
26287
|
+
*
|
|
26288
|
+
* Uses a manual loop instead of querySelector(':scope > ...') because
|
|
26289
|
+
* Stencil's mock-doc (used in spec tests) does not support :scope.
|
|
26290
|
+
*/
|
|
26291
|
+
findContentAndFooter() {
|
|
26292
|
+
let contentEl = null;
|
|
26232
26293
|
let hasFooter = false;
|
|
26233
|
-
for (const child of Array.from(el.children)) {
|
|
26294
|
+
for (const child of Array.from(this.el.children)) {
|
|
26234
26295
|
if (child.tagName === 'ION-CONTENT')
|
|
26235
|
-
|
|
26296
|
+
contentEl = child;
|
|
26236
26297
|
if (child.tagName === 'ION-FOOTER')
|
|
26237
26298
|
hasFooter = true;
|
|
26238
26299
|
for (const grandchild of Array.from(child.children)) {
|
|
26239
|
-
if (grandchild.tagName === 'ION-CONTENT')
|
|
26240
|
-
|
|
26300
|
+
if (grandchild.tagName === 'ION-CONTENT' && !contentEl)
|
|
26301
|
+
contentEl = grandchild;
|
|
26241
26302
|
if (grandchild.tagName === 'ION-FOOTER')
|
|
26242
26303
|
hasFooter = true;
|
|
26243
26304
|
}
|
|
26244
26305
|
}
|
|
26245
|
-
|
|
26246
|
-
// but no ion-footer). Custom modals with raw HTML are fully
|
|
26247
|
-
// developer-controlled and should not be modified.
|
|
26248
|
-
if (!hasContent || hasFooter)
|
|
26249
|
-
return;
|
|
26250
|
-
// Reduce wrapper height by safe-area and add equivalent padding so the
|
|
26251
|
-
// total visual size stays the same but the flex content area shrinks.
|
|
26252
|
-
// Using height + padding instead of box-sizing: border-box avoids
|
|
26253
|
-
// breaking custom modals that set --border-width (border-box would
|
|
26254
|
-
// include the border inside the height, changing the layout).
|
|
26255
|
-
wrapperEl.style.setProperty('height', 'calc(var(--height) - var(--ion-safe-area-bottom, 0px))');
|
|
26256
|
-
wrapperEl.style.setProperty('padding-bottom', 'var(--ion-safe-area-bottom, 0px)');
|
|
26306
|
+
return { contentEl, hasFooter };
|
|
26257
26307
|
}
|
|
26258
26308
|
/**
|
|
26259
|
-
* Clears all safe-area overrides and padding
|
|
26309
|
+
* Clears all safe-area overrides and padding.
|
|
26260
26310
|
*/
|
|
26261
26311
|
cleanupSafeAreaOverrides() {
|
|
26262
26312
|
clearSafeAreaOverrides(this.el);
|
|
26263
26313
|
// Remove internal sheet offset property
|
|
26264
26314
|
this.el.style.removeProperty('--ion-modal-offset-top');
|
|
26265
|
-
|
|
26266
|
-
|
|
26267
|
-
this.wrapperEl.style.removeProperty('padding-bottom');
|
|
26268
|
-
}
|
|
26315
|
+
const { contentEl } = this.findContentAndFooter();
|
|
26316
|
+
this.clearContentSafeAreaPadding(contentEl);
|
|
26269
26317
|
}
|
|
26270
26318
|
render() {
|
|
26271
26319
|
const { handle, isSheetModal, presentingElement, htmlAttributes, handleBehavior, inheritedAttributes, focusTrap, expandToScroll, } = this;
|
|
@@ -26274,20 +26322,20 @@ class Modal {
|
|
|
26274
26322
|
const isCardModal = presentingElement !== undefined && mode === 'ios';
|
|
26275
26323
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
26276
26324
|
const isSheetModalWithHandle = isSheetModal && showHandle;
|
|
26277
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
26325
|
+
return (hAsync(Host, Object.assign({ key: 'b665328614ae3a0d27ec15ecb8334d14e0d517e7', "no-router": true,
|
|
26278
26326
|
// Allow the modal to be navigable when the handle is focusable
|
|
26279
26327
|
tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
|
|
26280
26328
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
26281
|
-
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), hAsync("ion-backdrop", { key: '
|
|
26329
|
+
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), hAsync("ion-backdrop", { key: '263b41858dc0ad44e5a84cd83cf6eaaf32a804d2', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && hAsync("div", { key: '65eb2a58f20576941e49f5499de644b4c45ad50e', class: "modal-shadow" }), hAsync("div", Object.assign({ key: '2817d6cc8015ad013204941fea5ee96c331841f5',
|
|
26282
26330
|
/*
|
|
26283
26331
|
role and aria-modal must be used on the
|
|
26284
26332
|
same element. They must also be set inside the
|
|
26285
26333
|
shadow DOM otherwise ion-button will not be highlighted
|
|
26286
26334
|
when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
|
|
26287
26335
|
*/
|
|
26288
|
-
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: '
|
|
26336
|
+
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: '318f2c1e903cb41c977fbcce529f509c82378079', class: "modal-handle",
|
|
26289
26337
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
26290
|
-
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: '
|
|
26338
|
+
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: 'de8e6b0d4126820cc6a02be0af229a3e62afa1dd', onSlotchange: this.onSlotChange }))));
|
|
26291
26339
|
}
|
|
26292
26340
|
get el() { return getElement(this); }
|
|
26293
26341
|
static get watchers() { return {
|