@ionic/core 8.8.18-dev.11786385944.17aca7e5 → 8.8.18-dev.11786399582.1d58c37d
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-datetime.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-DRxvM2Ic.js +4 -0
- package/components/{p-BMaKgJFV.js → p-gYiraiT_.js} +1 -1
- package/components/p-yEQxMl70.js +4 -0
- package/dist/cjs/{animation-BJq0kcy2.js → animation-Ch16T-Nb.js} +1 -1
- package/dist/cjs/{app-globals-BlqrqKTN.js → app-globals-Dd89e0MR.js} +1 -1
- package/dist/cjs/{button-active-0mPOKmV2.js → button-active-COnxOe4X.js} +1 -1
- package/dist/cjs/{config-xninhj0J.js → config-D6C-KlA9.js} +1 -1
- package/dist/cjs/{format-PxvGiOik.js → format-BUFWn4Bn.js} +1 -1
- package/dist/cjs/{framework-delegate-BtICZDHr.js → framework-delegate-BgU6U9Ez.js} +1 -1
- package/dist/cjs/{hardware-back-button-iUuF_76h.js → hardware-back-button-CXmUnTJC.js} +1 -1
- package/dist/cjs/{helpers-Cv23MFHM.js → helpers-gntk8bfm.js} +1 -1
- package/dist/cjs/{index-BERfRao3.js → index-BS2uhvhT.js} +4 -4
- package/dist/cjs/{index-Ct7gcRif.js → index-BfaXsATC.js} +237 -2
- package/dist/cjs/{index-D81eLYUM.js → index-BhhuJ1Yx.js} +2 -2
- package/dist/cjs/{index-Dqpns5vP.js → index-BiRrzGDi.js} +2 -2
- package/dist/cjs/{index-aC4x3Fk3.js → index-ooS8B4p9.js} +5 -5
- package/dist/cjs/index.cjs.js +12 -12
- package/dist/cjs/{input-shims-DpA1zUN9.js → input-shims-Bn1cXfCM.js} +3 -3
- package/dist/cjs/{input.utils-DetjmtH2.js → input.utils-BwhxZooW.js} +2 -2
- package/dist/cjs/ion-accordion_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-action-sheet.cjs.entry.js +8 -8
- package/dist/cjs/ion-alert.cjs.entry.js +9 -9
- package/dist/cjs/ion-app_8.cjs.entry.js +65 -15
- package/dist/cjs/ion-avatar_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-back-button.cjs.entry.js +3 -3
- package/dist/cjs/ion-backdrop.cjs.entry.js +2 -2
- package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-button_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-card_5.cjs.entry.js +3 -3
- package/dist/cjs/ion-checkbox.cjs.entry.js +4 -4
- package/dist/cjs/ion-chip.cjs.entry.js +2 -2
- package/dist/cjs/ion-col_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-datetime-button.cjs.entry.js +4 -4
- package/dist/cjs/ion-datetime_3.cjs.entry.js +15 -12
- package/dist/cjs/ion-fab_3.cjs.entry.js +3 -3
- package/dist/cjs/ion-img.cjs.entry.js +3 -3
- package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +5 -5
- package/dist/cjs/ion-input-otp.cjs.entry.js +3 -3
- package/dist/cjs/ion-input-password-toggle.cjs.entry.js +2 -2
- package/dist/cjs/ion-input.cjs.entry.js +5 -5
- package/dist/cjs/ion-item-option_3.cjs.entry.js +4 -4
- package/dist/cjs/ion-item_8.cjs.entry.js +3 -3
- package/dist/cjs/ion-loading.cjs.entry.js +8 -8
- package/dist/cjs/ion-menu_3.cjs.entry.js +8 -8
- package/dist/cjs/ion-modal.cjs.entry.js +59 -19
- package/dist/cjs/ion-nav_2.cjs.entry.js +6 -6
- package/dist/cjs/ion-picker-column-option.cjs.entry.js +3 -3
- package/dist/cjs/ion-picker-column.cjs.entry.js +3 -3
- package/dist/cjs/ion-picker.cjs.entry.js +2 -2
- package/dist/cjs/ion-popover.cjs.entry.js +8 -8
- package/dist/cjs/ion-progress-bar.cjs.entry.js +3 -3
- package/dist/cjs/ion-radio_2.cjs.entry.js +4 -4
- package/dist/cjs/ion-range.cjs.entry.js +4 -4
- package/dist/cjs/ion-refresher_2.cjs.entry.js +6 -6
- package/dist/cjs/ion-reorder_2.cjs.entry.js +4 -4
- package/dist/cjs/ion-ripple-effect.cjs.entry.js +2 -2
- package/dist/cjs/ion-route_4.cjs.entry.js +4 -4
- package/dist/cjs/ion-searchbar.cjs.entry.js +3 -3
- package/dist/cjs/ion-segment-content.cjs.entry.js +1 -1
- package/dist/cjs/ion-segment-view.cjs.entry.js +1 -1
- package/dist/cjs/ion-segment_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-select-modal.cjs.entry.js +6 -6
- package/dist/cjs/ion-select_3.cjs.entry.js +7 -7
- package/dist/cjs/ion-spinner.cjs.entry.js +2 -2
- package/dist/cjs/ion-split-pane.cjs.entry.js +2 -2
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-tab_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-text.cjs.entry.js +2 -2
- package/dist/cjs/ion-textarea.cjs.entry.js +5 -5
- package/dist/cjs/ion-toast.cjs.entry.js +8 -8
- package/dist/cjs/ion-toggle.cjs.entry.js +4 -4
- package/dist/cjs/{ionic-global-B-cA6LkY.js → ionic-global-BerQGEpE.js} +1 -1
- package/dist/cjs/ionic.cjs.js +4 -4
- package/dist/cjs/{ios.transition-BOSWOaiK.js → ios.transition-IMJRwn29.js} +4 -4
- package/dist/cjs/{item-multiple-inputs-D-gyg57c.js → item-multiple-inputs-jOJZE_I0.js} +1 -1
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{md.transition-B8-wBZqt.js → md.transition-CgQZxcoT.js} +4 -4
- package/dist/cjs/{notch-controller-18PzRGXd.js → notch-controller-_SwR025y.js} +1 -1
- package/dist/cjs/{overlays-DdtIYQUH.js → overlays-DuSEMhIW.js} +5 -5
- package/dist/cjs/{status-tap-N1kaBbuk.js → status-tap-CSvBT7FV.js} +3 -3
- package/dist/cjs/{swipe-back-C0GCB18x.js → swipe-back-CuIiziaa.js} +2 -2
- package/dist/collection/components/content/content.js +55 -4
- package/dist/collection/components/datetime/datetime.js +8 -5
- package/dist/collection/components/modal/modal.js +16 -11
- package/dist/collection/components/modal/safe-area-utils.js +35 -0
- package/dist/docs.json +2 -2
- package/dist/esm/index-tcQvqkiX.js +218 -1
- package/dist/esm/ion-app_8.entry.js +54 -4
- package/dist/esm/ion-datetime_3.entry.js +7 -4
- package/dist/esm/ion-modal.entry.js +50 -10
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/html.html-data.json +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-5e2f73ee.entry.js +4 -0
- package/dist/ionic/p-9fa3c405.entry.js +4 -0
- package/dist/ionic/p-ea56626d.entry.js +4 -0
- package/dist/types/components/content/content.d.ts +12 -0
- package/dist/types/components/datetime/datetime.d.ts +5 -1
- package/dist/types/components/modal/modal.d.ts +5 -3
- package/dist/types/components/modal/safe-area-utils.d.ts +6 -0
- package/dist/types/components.d.ts +2 -2
- package/hydrate/index.js +93 -17
- package/hydrate/index.mjs +93 -17
- package/package.json +3 -2
- package/components/p-BvmB20aD.js +0 -4
- package/components/p-scxfI1Dd.js +0 -4
- package/dist/ionic/p-15c9319c.entry.js +0 -4
- package/dist/ionic/p-5018dfc8.entry.js +0 -4
- package/dist/ionic/p-d1aac015.entry.js +0 -4
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import{r as t,c as i,f as o,w as a,e,h as r,d as n,g as s}from"./p-tcQvqkiX.js";import{i as d,f as h,a as l,d as p,r as c,b as m,p as f}from"./p-biz8zWmJ.js";import{C as u,a as b,d as v}from"./p-CFlfIb2g.js";import{g as x,e as w,r as g,b as k,h as y}from"./p-DIuEbVLu.js";import{c as A}from"./p-B-hirT0v.js";import{g as Y}from"./p-CIGNaXM1.js";import{G as O,O as S,F as E,e as D,B as M,j as T,k as C,f as B,g as j,h as P}from"./p-D-3ycHmd.js";import{g as I}from"./p-DiVJyqlX.js";import{e as N,w as R}from"./p-VAemlbDS.js";import{b as $}from"./p-Nqf6uvGh.js";import{KEYBOARD_DID_OPEN as L}from"./p-9eeaBrnk.js";import{c as z}from"./p-mjKAFv89.js";import{g as F}from"./p-hHmYLOfE.js";import{createGesture as W}from"./p-Cl0B-RWe.js";import{w as H}from"./p-ZjP4CjeZ.js";import"./p-BUFIpxKM.js";import"./p-BTEOs1at.js";import"./p-D13Eaw-8.js";var V;!function(t){t.Dark="DARK",t.Light="LIGHT",t.Default="DEFAULT"}(V||(V={}));const K={getEngine(){const t=Y();if(null==t?void 0:t.isPluginAvailable("StatusBar"))return t.Plugins.StatusBar},setStyle(t){const i=this.getEngine();i&&i.setStyle(t)},getStyle:async function(){const t=this.getEngine();if(!t)return V.Default;const{style:i}=await t.getInfo();return i}},Z=(t,i)=>{if(1===i)return 0;const o=1/(1-i);return t*o+-i*o},G=()=>{!H||H.innerWidth>=768||K.setStyle({style:V.Dark})},U=(t=V.Default)=>{!H||H.innerWidth>=768||K.setStyle({style:t})},_=t=>{const i=d(t)?x(t).querySelector(".inner-scroll"):t;return!h(t)&&0===i.scrollTop},q=async(t,i)=>{"function"==typeof t.canDismiss&&await t.canDismiss(void 0,O)&&(i.isRunning()?i.onFinish((()=>{t.dismiss(void 0,"handler")}),{oneTimeCallback:!0}):t.dismiss(void 0,"handler"))},X=t=>.00255275*2.71828**(-14.9619*t)-1.00255*2.71828**(-.0380968*t)+1,J=.915,Q=(t,i)=>w(400,t/Math.abs(1.1*i),500),tt=(t,i)=>{const o=window.innerHeight,a=t.getBoundingClientRect().top,e=Math.round(1e3*(1-i/(o-a)))/1e3;return Math.max(0,Math.min(1,e))},it=t=>{const{currentBreakpoint:i,backdropBreakpoint:o,expandToScroll:a}=t,e=void 0===o||o<i,r=e?`calc(var(--backdrop-opacity) * ${i})`:"0",n=z("backdropAnimation").fromTo("opacity",0,r);return e&&n.beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),{wrapperAnimation:z("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:"translateY(100%)"},{offset:1,opacity:1,transform:`translateY(${100-100*i}%)`}]),backdropAnimation:n,contentAnimation:a?void 0:z("contentAnimation").keyframes([{offset:0,opacity:1,maxHeight:100*(1-i)+"%"},{offset:1,opacity:1,maxHeight:100*i+"%"}])}},ot=t=>{const{currentBreakpoint:i,backdropBreakpoint:o}=t,a=`calc(var(--backdrop-opacity) * ${Z(i,o)})`,e=[{offset:0,opacity:a},{offset:1,opacity:0}],r=[{offset:0,opacity:a},{offset:o,opacity:0},{offset:1,opacity:0}],n=z("backdropAnimation").keyframes(0!==o?r:e);return{wrapperAnimation:z("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:`translateY(${100-100*i}%)`},{offset:1,opacity:1,transform:"translateY(100%)"}]),backdropAnimation:n}},at=(t,i)=>{const{presentingEl:o,currentBreakpoint:a,expandToScroll:e}=i,r=x(t),{wrapperAnimation:n,backdropAnimation:s,contentAnimation:d}=void 0!==a?it(i):{backdropAnimation:z().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),wrapperAnimation:z().fromTo("transform","translateY(100vh)","translateY(0vh)"),contentAnimation:void 0};s.addElement(r.querySelector("ion-backdrop")),n.addElement(r.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1}),!e&&(null==d||d.addElement(t.querySelector(".ion-page")));const h=z("entering-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(500).addAnimation([n]);if(d&&h.addAnimation(d),o){const t=window.innerWidth<768,i="ION-MODAL"===o.tagName&&void 0!==o.presentingElement,a=x(o),e=z().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"}),r=document.body;if(t){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",a=`translateY(${i?"-10px":t}) scale(0.915)`;e.afterStyles({transform:a}).beforeAddWrite((()=>r.style.setProperty("background-color","black"))).addElement(o).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"},{offset:1,filter:"contrast(0.85)",transform:a,borderRadius:"10px 10px 0 0"}]),h.addAnimation(e)}else if(h.addAnimation(s),i){const t=`translateY(-10px) scale(${i?J:1})`;e.afterStyles({transform:t}).addElement(a.querySelector(".modal-wrapper")).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0) scale(1)"},{offset:1,filter:"contrast(0.85)",transform:t}]);const o=z().afterStyles({transform:t}).addElement(a.querySelector(".modal-shadow")).keyframes([{offset:0,opacity:"1",transform:"translateY(0) scale(1)"},{offset:1,opacity:"0",transform:t}]);h.addAnimation([e,o])}else n.fromTo("opacity","0","1")}else h.addAnimation(s);return h},et=(t,i,o=500)=>{const{presentingEl:a,currentBreakpoint:e}=i,r=x(t),{wrapperAnimation:n,backdropAnimation:s}=void 0!==e?ot(i):{backdropAnimation:z().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:z().fromTo("transform","translateY(0vh)","translateY(100vh)")};s.addElement(r.querySelector("ion-backdrop")),n.addElement(r.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1});const d=z("leaving-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(o).addAnimation(n);if(a){const t=window.innerWidth<768,i="ION-MODAL"===a.tagName&&void 0!==a.presentingElement,o=x(a),e=z().beforeClearStyles(["transform"]).afterClearStyles(["transform"]).onFinish((t=>{1===t&&(a.style.setProperty("overflow",""),Array.from(r.querySelectorAll("ion-modal:not(.overlay-hidden)")).filter((t=>void 0!==t.presentingElement)).length<=1&&r.style.setProperty("background-color",""))})),r=document.body;if(t){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",o=`translateY(${i?"-10px":t}) scale(0.915)`;e.addElement(a).keyframes([{offset:0,filter:"contrast(0.85)",transform:o,borderRadius:"10px 10px 0 0"},{offset:1,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"}]),d.addAnimation(e)}else if(d.addAnimation(s),i){const t=`translateY(-10px) scale(${i?J:1})`;e.addElement(o.querySelector(".modal-wrapper")).afterStyles({transform:"translate3d(0, 0, 0)"}).keyframes([{offset:0,filter:"contrast(0.85)",transform:t},{offset:1,filter:"contrast(1)",transform:"translateY(0) scale(1)"}]);const a=z().addElement(o.querySelector(".modal-shadow")).afterStyles({transform:"translateY(0) scale(1)"}).keyframes([{offset:0,opacity:"0",transform:t},{offset:1,opacity:"1",transform:"translateY(0) scale(1)"}]);d.addAnimation([e,a])}else n.fromTo("opacity","1","0")}else d.addAnimation(s);return d},rt=(t,i)=>{const{currentBreakpoint:o,expandToScroll:a}=i,e=x(t),{wrapperAnimation:r,backdropAnimation:n,contentAnimation:s}=void 0!==o?it(i):{backdropAnimation:z().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),wrapperAnimation:z().keyframes([{offset:0,opacity:.01,transform:"translateY(40px)"},{offset:1,opacity:1,transform:"translateY(0px)"}]),contentAnimation:void 0};n.addElement(e.querySelector("ion-backdrop")),r.addElement(e.querySelector(".modal-wrapper")),!a&&(null==s||s.addElement(t.querySelector(".ion-page")));const d=z().addElement(t).easing("cubic-bezier(0.36,0.66,0.04,1)").duration(280).addAnimation([n,r]);return s&&d.addAnimation(s),d},nt=(t,i)=>{const{currentBreakpoint:o}=i,a=x(t),{wrapperAnimation:e,backdropAnimation:r}=void 0!==o?ot(i):{backdropAnimation:z().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:z().keyframes([{offset:0,opacity:.99,transform:"translateY(0px)"},{offset:1,opacity:0,transform:"translateY(40px)"}])};return r.addElement(a.querySelector("ion-backdrop")),e.addElement(a.querySelector(".modal-wrapper")),z().easing("cubic-bezier(0.47,0,0.745,0.715)").duration(200).addAnimation([r,e])},st=new Set(["","100%","100vw","100vh","100dvw","100dvh","100svw","100svh"]);let dt=null,ht=!1;const lt=()=>{if(null!==dt)return dt;const t=null==H?void 0:H.document;if(!(null==t?void 0:t.body))return 0;const i=t.createElement("div");i.style.cssText="position:fixed;visibility:hidden;pointer-events:none;top:0;left:0;padding-top:var(--ion-safe-area-top,0px);",t.body.appendChild(i);const o=parseFloat(getComputedStyle(i).paddingTop)||0;return i.remove(),dt=o,ht||(ht=!0,g((()=>{dt=null,ht=!1}))),o},pt=t=>{const i=getComputedStyle(t),o=i.getPropertyValue("--width").trim(),a=i.getPropertyValue("--height").trim();return!st.has(o)&&!st.has(a)},ct=(t,i)=>{t.style.setProperty("--ion-safe-area-top",i.top),t.style.setProperty("--ion-safe-area-bottom",i.bottom),t.style.setProperty("--ion-safe-area-left",i.left),t.style.setProperty("--ion-safe-area-right",i.right)},mt=class{constructor(o){t(this,o),this.didPresent=i(this,"ionModalDidPresent",7),this.willPresent=i(this,"ionModalWillPresent",7),this.willDismiss=i(this,"ionModalWillDismiss",7),this.didDismiss=i(this,"ionModalDidDismiss",7),this.ionBreakpointDidChange=i(this,"ionBreakpointDidChange",7),this.didPresentShorthand=i(this,"didPresent",7),this.willPresentShorthand=i(this,"willPresent",7),this.willDismissShorthand=i(this,"willDismiss",7),this.didDismissShorthand=i(this,"didDismiss",7),this.ionMount=i(this,"ionMount",7),this.ionDragStart=i(this,"ionDragStart",7),this.ionDragMove=i(this,"ionDragMove",7),this.ionDragEnd=i(this,"ionDragEnd",7),this.lockController=A(),this.triggerController=D(),this.coreDelegate=u(),this.isSheetModal=!1,this.inheritedAttributes={},this.inline=!1,this.gestureAnimationDismissing=!1,this.presented=!1,this.hasController=!1,this.keyboardClose=!0,this.expandToScroll=!0,this.backdropBreakpoint=0,this.handleBehavior="none",this.backdropDismiss=!0,this.showBackdrop=!0,this.animated=!0,this.isOpen=!1,this.keepContentsMounted=!1,this.focusTrap=!0,this.canDismiss=!0,this.onHandleClick=()=>{const{sheetTransition:t,handleBehavior:i}=this;"cycle"===i&&void 0===t&&this.moveToNextBreakpoint()},this.onBackdropTap=()=>{const{sheetTransition:t}=this;void 0===t&&this.dismiss(void 0,M)},this.onLifecycle=t=>{const i=this.usersElement,o=ft[t.type];if(i&&o){const a=new CustomEvent(o,{bubbles:!1,cancelable:!1,detail:t.detail});i.dispatchEvent(a)}},this.onModalFocus=t=>{var i;const{dragHandleEl:o,el:a}=this;t.target===a&&null==(null===(i=a.shadowRoot)||void 0===i?void 0:i.activeElement)&&o&&-1!==o.tabIndex&&o.focus()},this.onSlotChange=({target:t})=>{t.assignedElements().forEach((t=>{t.querySelectorAll("ion-modal").forEach((t=>{null===t.getAttribute("data-parent-ion-modal")&&t.setAttribute("data-parent-ion-modal",this.el.id)}))}))}}onIsOpenChange(t,i){!0===t&&!1===i?this.present():!1===t&&!0===i&&this.dismiss()}triggerChanged(){const{trigger:t,el:i,triggerController:o}=this;t&&o.addClickListener(i,t)}onWindowResize(){this.presented&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((()=>{const t=this.getSafeAreaContext();if(!t.isCardModal||this.enterAnimation||this.leaveAnimation||this.handleViewTransition(),t.isSheetModal&&this.updateSheetOffsetTop(),!t.isSheetModal&&!t.isCardModal){this.updateSafeAreaOverrides();const{contentEl:t,hasFooter:i}=this.findContentAndFooter();this.clearContentSafeAreaPadding(t),this.applyFullscreenSafeAreaTo(t,i)}}),50))}breakpointsChanged(t){void 0!==t&&(this.sortedBreakpoints=t.sort(((t,i)=>t-i)))}connectedCallback(){const{el:t}=this;T(t),this.triggerChanged()}disconnectedCallback(){this.triggerController.removeClickListener(),this.cleanupViewTransitionListener(),this.cleanupParentRemovalObserver(),this.cleanupSafeAreaOverrides()}componentWillLoad(){var t;const{breakpoints:i,initialBreakpoint:a,el:e,htmlAttributes:r}=this,n=this.isSheetModal=void 0!==i&&void 0!==a,s=["aria-label","role"];this.inheritedAttributes=k(e,s),e.parentNode&&(this.cachedOriginalParent=e.parentNode),void 0!==r&&s.forEach((t=>{r[t]&&(this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:r[t]}),delete r[t])})),n&&(this.currentBreakpoint=this.initialBreakpoint),void 0===i||void 0===a||i.includes(a)||o("[ion-modal] - Your breakpoints array must include the initialBreakpoint value."),(null===(t=this.htmlAttributes)||void 0===t?void 0:t.id)||C(this.el)}componentDidLoad(){!0===this.isOpen&&g((()=>this.present())),this.breakpointsChanged(this.breakpoints),this.triggerChanged()}getDelegate(t=!1){if(this.workingDelegate&&!t)return{delegate:this.workingDelegate,inline:this.inline};const i=this.inline=null!==this.el.parentNode&&!this.hasController;return{inline:i,delegate:this.workingDelegate=i?this.delegate||this.coreDelegate:this.delegate}}async checkCanDismiss(t,i){const{canDismiss:o}=this;return"function"==typeof o?o(t,i):o}async present(){const t=await this.lockController.lock();if(this.presented)return void t();const{presentingElement:i,el:o}=this;this.currentBreakpoint=this.initialBreakpoint;const{inline:e,delegate:r}=this.getDelegate(!0);this.ionMount.emit(),this.usersElement=await b(r,o,this.component,["ion-page"],this.componentProps,e),y(o)?await N(this.usersElement):this.keepContentsMounted||await R(),a((()=>this.el.classList.add("show-modal"))),this.isSheetModal=void 0!==this.breakpoints&&void 0!==this.initialBreakpoint,this.setInitialSafeAreaOverrides();const n=void 0!==i;n&&"ios"===$(this)&&(this.statusBarStyle=await K.getStyle(),G()),await B(this,"modalEnter",at,rt,{presentingEl:i,currentBreakpoint:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint,expandToScroll:this.expandToScroll}),this.updateSafeAreaOverrides(),this.applyFullscreenSafeArea(),"undefined"!=typeof window&&(this.keyboardOpenCallback=()=>{this.gesture&&(this.gesture.enable(!1),g((()=>{this.gesture&&this.gesture.enable(!0)})))},window.addEventListener(L,this.keyboardOpenCallback)),this.isSheetModal?this.initSheetGesture():n&&this.initSwipeToClose(),this.initViewTransitionListener(),this.initParentRemovalObserver(),t()}initSwipeToClose(){var t;if("ios"!==$(this))return;const{el:i}=this,o=this.leaveAnimation||e.get("modalLeave",et),a=this.animation=o(i,{presentingEl:this.presentingElement,expandToScroll:this.expandToScroll});if(!m(i))return void f(i);const r=null!==(t=this.statusBarStyle)&&void 0!==t?t:V.Default;this.gesture=((t,i,o,a,e,r,n)=>{const s=.5,h=t.offsetHeight;let m=!1,f=!1,u=null,b=!0,v=0;const x=W({el:t,gestureName:"modalSwipeToClose",gesturePriority:S,direction:"y",threshold:10,canStart:t=>{const i=t.event.target;return null===i||!i.closest||(u=l(i),u?_(u):null===i.closest("ion-footer"))},onStart:o=>{var a;const{deltaY:r}=o;null===(a=window.getSelection())||void 0===a||a.removeAllRanges(),b=!u||!d(u)||u.scrollY,f=void 0!==t.canDismiss&&!0!==t.canDismiss,r>0&&u&&p(u),i.progressStart(!0,m?1:0),e()},onMove:a=>{const{deltaY:e}=a;e>0&&u&&p(u);const n=a.deltaY/h,d=n>=0&&f,l=d?.2:.9999,c=d?X(n/l):n,m=w(1e-4,c,l);i.progressStep(m),m>=s&&v<s?U(o):m<s&&v>=s&&G(),v=m;const b={currentY:a.currentY,deltaY:a.deltaY,velocityY:a.velocityY,progress:tt(t,a.deltaY)};r(b)},onEnd:o=>{const e=o.velocityY,r=o.deltaY/h,d=r>=0&&f,l=d?.2:.9999,p=d?X(r/l):r,v=w(1e-4,p,l),g=!d&&(o.deltaY+1e3*e)/h>=s;let k=g?-.001:.001;g?(i.easing("cubic-bezier(0.32, 0.72, 0, 1)"),k+=F([0,0],[.32,.72],[0,1],[1,1],v)[0]):(i.easing("cubic-bezier(1, 0, 0.68, 0.28)"),k+=F([0,0],[1,0],[.68,.28],[1,1],v)[0]);const y=Q(g?r*h:(1-v)*h,e);m=g,x.enable(!1),u&&c(u,b),i.onFinish((()=>{g||x.enable(!0)})).progressEnd(g?1:0,k,y),d&&v>l/4?q(t,i):g&&a();const A={currentY:o.currentY,deltaY:o.deltaY,velocityY:o.velocityY,progress:tt(t,o.deltaY)};n(A)}});return x})(i,a,r,(()=>this.cardOnDismiss()),(()=>this.onDragStart()),(t=>this.onDragMove(t)),(t=>this.onDragEnd(t))),this.gesture.enable(!0)}initSheetGesture(){const{wrapperEl:t,initialBreakpoint:i,backdropBreakpoint:o}=this;if(!t||void 0===i)return;const a=this.enterAnimation||e.get("modalEnter",at),r=this.animation=a(this.el,{presentingEl:this.presentingElement,currentBreakpoint:i,backdropBreakpoint:o,expandToScroll:this.expandToScroll});r.progressStart(!0,1);const{gesture:n,moveSheetToBreakpoint:s,resetContentScroll:h}=((t,i,o,a,e,r,n=[],s,h,p,c,m,f,u)=>{var b;const v={WRAPPER_KEYFRAMES:[{offset:0,transform:"translateY(0%)"},{offset:1,transform:"translateY(100%)"}],BACKDROP_KEYFRAMES:0!==e?[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1-e,opacity:0},{offset:1,opacity:0}]:[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1,opacity:.01}],CONTENT_KEYFRAMES:[{offset:0,maxHeight:"100%"},{offset:1,maxHeight:"0%"}]},k=t.querySelector("ion-content"),y=null===(b=null==k?void 0:k.scrollY)||void 0===b||b,A=o.clientHeight;let Y=a,O=0,S=!1,D=null,M=null,T=null,C=null;const B=n[n.length-1],j=n[0],P=r.childAnimations.find((t=>"wrapperAnimation"===t.id)),I=r.childAnimations.find((t=>"backdropAnimation"===t.id)),N=r.childAnimations.find((t=>"contentAnimation"===t.id)),R=()=>{!1!==t.focusTrap&&!1!==t.showBackdrop&&(t.style.setProperty("pointer-events","auto"),i.style.setProperty("pointer-events","auto"),t.classList.remove(E))},$=()=>{t.style.setProperty("pointer-events","none"),i.style.setProperty("pointer-events","none"),t.classList.add(E)},L=i=>{if(!M&&(M=Array.from(t.querySelectorAll("ion-footer")),!M.length))return;const o=t.querySelector(".ion-page");if(C=i,"stationary"===i)M.forEach((t=>{t.classList.remove("modal-footer-moving"),t.style.removeProperty("position"),t.style.removeProperty("width"),t.style.removeProperty("height"),t.style.removeProperty("top"),t.style.removeProperty("left"),null==o||o.style.removeProperty("padding-bottom"),null==o||o.appendChild(t)}));else{let i=0;M.forEach(((o,a)=>{const e=o.getBoundingClientRect(),r=document.body.getBoundingClientRect();i+=o.clientHeight;const n=e.top-r.top,s=e.left-r.left;if(o.style.setProperty("--pinned-width",`${o.clientWidth}px`),o.style.setProperty("--pinned-height",`${o.clientHeight}px`),o.style.setProperty("--pinned-top",`${n}px`),o.style.setProperty("--pinned-left",`${s}px`),0===a){T=n;const i=t.querySelector("ion-header");i&&(T-=i.clientHeight)}})),M.forEach((t=>{null==o||o.style.setProperty("padding-bottom",`${i}px`),t.classList.add("modal-footer-moving"),t.style.setProperty("position","absolute"),t.style.setProperty("width","var(--pinned-width)"),t.style.setProperty("height","var(--pinned-height)"),t.style.setProperty("top","var(--pinned-top)"),t.style.setProperty("left","var(--pinned-left)"),document.body.appendChild(t)}))}};P&&I&&(P.keyframes([...v.WRAPPER_KEYFRAMES]),I.keyframes([...v.BACKDROP_KEYFRAMES]),null==N||N.keyframes([...v.CONTENT_KEYFRAMES]),r.progressStart(!0,1-Y),Y>e&&!1!==t.focusTrap&&!1!==t.showBackdrop?R():$()),k&&Y!==B&&s&&(k.scrollY=!1);const z=i=>{const{breakpoint:o,canDismiss:a,breakpointOffset:d,animated:h}=i,l=a&&0===o,m=l?Y:o,f=0!==m;return Y=0,P&&I&&(P.keyframes([{offset:0,transform:`translateY(${100*d}%)`},{offset:1,transform:`translateY(${100*(1-m)}%)`}]),I.keyframes([{offset:0,opacity:`calc(var(--backdrop-opacity) * ${Z(1-d,e)})`},{offset:1,opacity:`calc(var(--backdrop-opacity) * ${Z(m,e)})`}]),N&&N.keyframes([{offset:0,maxHeight:100*(1-d)+"%"},{offset:1,maxHeight:100*m+"%"}]),r.progressStep(0)),K.enable(!1),l?q(t,r):f||p(),!k||m!==n[n.length-1]&&s||(k.scrollY=y),s||0!==m||L("stationary"),new Promise((i=>{r.onFinish((()=>{f?(s||L("stationary"),P&&I?g((()=>{P.keyframes([...v.WRAPPER_KEYFRAMES]),I.keyframes([...v.BACKDROP_KEYFRAMES]),null==N||N.keyframes([...v.CONTENT_KEYFRAMES]),r.progressStart(!0,1-m),Y=m,c(Y),Y>e&&!1!==t.focusTrap&&!1!==t.showBackdrop?R():$(),K.enable(!0),i()})):(K.enable(!0),i())):i()}),{oneTimeCallback:!0}).progressEnd(1,0,h?500:0)}))},F=t=>{const i=o.getBoundingClientRect().top+t,a=H(i);return n.reduce(((t,i)=>Math.abs(i-a)<Math.abs(t-a)?i:t))},H=t=>{const i=n[n.length-1],o=V(n[0]),a=V(i),e=Math.round((o-t)/(o-a)*1e3)/1e3;return Math.max(0,Math.min(1,e))},V=i=>{const o=t.getBoundingClientRect();return window.innerHeight-o.height*i},K=W({el:o,gestureName:"modalSheet",gesturePriority:40,direction:"y",threshold:10,canStart:t=>{const i=l(t.event.target);return Y=h(),!(i&&(!s||1===Y))||_(i)},onStart:i=>{var o;if(null===(o=window.getSelection())||void 0===o||o.removeAllRanges(),S=void 0!==t.canDismiss&&!0!==t.canDismiss&&0===j,!s){const t=l(i.event.target);D=t&&d(t)?x(t).querySelector(".inner-scroll"):t}s||L("moving"),i.deltaY>0&&k&&(k.scrollY=!1),g((()=>{t.focus()})),r.progressStart(!0,1-Y),m()},onMove:t=>{if(s||null===T||null===C||(t.currentY>=T&&"moving"===C?L("stationary"):t.currentY<T&&"stationary"===C&&L("moving")),!s&&t.deltaY<=0&&D)return;t.deltaY>0&&k&&(k.scrollY=!1);const i=n.length>1?1-n[1]:void 0,o=1-Y+t.deltaY/A,a=void 0!==i&&o>=i&&S,e=a?.95:.9999,d=a&&void 0!==i?i+X((o-i)/(e-i)):o;O=w(1e-4,d,e),r.progressStep(O);const h=F(t.deltaY),l={currentY:t.currentY,deltaY:t.deltaY,velocityY:t.velocityY,progress:H(t.currentY),snapBreakpoint:h};f(l)},onEnd:t=>{const i=F(t.deltaY),o={currentY:t.currentY,deltaY:t.deltaY,velocityY:t.velocityY,progress:H(t.currentY),snapBreakpoint:i};if(!s&&t.deltaY<=0&&D&&D.scrollTop>0)return L("stationary"),void u(o);z({breakpoint:i,breakpointOffset:O,canDismiss:S,animated:!0}),u(o)}});return{gesture:K,moveSheetToBreakpoint:z,resetContentScroll:()=>{k&&(k.scrollY=y)}}})(this.el,this.backdropEl,t,i,o,r,this.sortedBreakpoints,this.expandToScroll,(()=>{var t;return null!==(t=this.currentBreakpoint)&&void 0!==t?t:0}),(()=>this.sheetOnDismiss()),(t=>{this.currentBreakpoint!==t&&(this.currentBreakpoint=t,this.ionBreakpointDidChange.emit({breakpoint:t}))}),(()=>this.onDragStart()),(t=>this.onDragMove(t)),(t=>this.onDragEnd(t)));this.gesture=n,this.moveSheetToBreakpoint=s,this.resetSheetContentScroll=h,this.gesture.enable(!0),(!1===this.showBackdrop||!1===this.focusTrap||o>0)&&this.setupChildRoutePassthrough()}setupChildRoutePassthrough(){var t;this.cachedPageParent=this.getOriginalPageParent();const i=this.cachedPageParent;if(!i||"ION-APP"===i.tagName)return;const o=Array.from(i.children).some((t=>{var i;return!(t===this.el||t instanceof HTMLElement&&"none"===window.getComputedStyle(t).display||"TEMPLATE"===t.tagName||"SLOT"===t.tagName||t.nodeType===Node.TEXT_NODE&&!(null===(i=t.textContent)||void 0===i?void 0:i.trim()))}));if(o)return;i.classList.add("ion-page-overlay-passthrough");const a=i.parentElement;"ION-ROUTER-OUTLET"===(null==a?void 0:a.tagName)&&"ION-APP"!==(null===(t=a.parentElement)||void 0===t?void 0:t.tagName)&&(a.style.setProperty("pointer-events","none"),a.setAttribute("data-overlay-passthrough","true"))}getOriginalPageParent(){if(!this.cachedOriginalParent)return null;let t=this.cachedOriginalParent;for(;t&&!t.classList.contains("ion-page");)t=t.parentElement;return t}cleanupChildRoutePassthrough(){const t=this.cachedPageParent;if(!t)return;t.classList.remove("ion-page-overlay-passthrough");const i=t.parentElement;(null==i?void 0:i.hasAttribute("data-overlay-passthrough"))&&(i.style.removeProperty("pointer-events"),i.removeAttribute("data-overlay-passthrough")),this.cachedPageParent=void 0}sheetOnDismiss(){this.gestureAnimationDismissing=!0,this.animation.onFinish((async()=>{this.currentBreakpoint=0,this.ionBreakpointDidChange.emit({breakpoint:this.currentBreakpoint}),await this.dismiss(void 0,O),this.gestureAnimationDismissing=!1}))}cardOnDismiss(){this.gestureAnimationDismissing=!0,U(this.statusBarStyle),this.animation.onFinish((async()=>{await this.dismiss(void 0,O),this.gestureAnimationDismissing=!1}))}async dismiss(t,i){var o,e;if(this.gestureAnimationDismissing&&i!==O)return!1;clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0;const r=await this.lockController.lock();if(await this.dismissNestedModals(),"handler"!==i&&!await this.checkCanDismiss(t,i))return r(),!1;const{presentingElement:n}=this;void 0!==n&&"ios"===$(this)&&U(this.statusBarStyle),"undefined"!=typeof window&&this.keyboardOpenCallback&&(window.removeEventListener(L,this.keyboardOpenCallback),this.keyboardOpenCallback=void 0);const s=await j(this,t,i,"modalLeave",et,nt,{presentingEl:n,currentBreakpoint:null!==(o=this.currentBreakpoint)&&void 0!==o?o:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint,expandToScroll:this.expandToScroll});if(s){const{delegate:t}=this.getDelegate();await v(t,this.usersElement),a((()=>this.el.classList.remove("show-modal"))),this.animation&&this.animation.destroy(),this.gesture&&this.gesture.destroy(),null===(e=this.resetSheetContentScroll)||void 0===e||e.call(this),this.resetSheetContentScroll=void 0,this.cleanupViewTransitionListener(),this.cleanupParentRemovalObserver(),this.cleanupSafeAreaOverrides(),this.cleanupChildRoutePassthrough()}return this.currentBreakpoint=void 0,this.animation=void 0,r(),s}onDidDismiss(){return P(this.el,"ionModalDidDismiss")}onWillDismiss(){return P(this.el,"ionModalWillDismiss")}async setCurrentBreakpoint(t){if(!this.isSheetModal)return void o("[ion-modal] - setCurrentBreakpoint is only supported on sheet modals.");if(!this.breakpoints.includes(t))return void o(`[ion-modal] - Attempted to set invalid breakpoint value ${t}. Please double check that the breakpoint value is part of your defined breakpoints.`);const{currentBreakpoint:i,moveSheetToBreakpoint:a,canDismiss:e,breakpoints:r,animated:n}=this;i!==t&&a&&(this.sheetTransition=a({breakpoint:t,breakpointOffset:1-i,canDismiss:void 0!==e&&!0!==e&&0===r[0],animated:n}),await this.sheetTransition,this.sheetTransition=void 0)}async getCurrentBreakpoint(){return this.currentBreakpoint}async moveToNextBreakpoint(){const{breakpoints:t,currentBreakpoint:i}=this;if(!t||null==i)return!1;const o=t.filter((t=>0!==t)),a=o.indexOf(i),e=o[(a+1)%o.length];return await this.setCurrentBreakpoint(e),!0}initViewTransitionListener(){"ios"!==$(this)||!this.presentingElement||this.enterAnimation||this.leaveAnimation||(this.currentViewIsPortrait=window.innerWidth<768)}handleViewTransition(){if(!this.presented)return;const t=window.innerWidth<768;if(this.currentViewIsPortrait===t)return;this.viewTransitionAnimation&&(this.viewTransitionAnimation.destroy(),this.viewTransitionAnimation=void 0);const{presentingElement:i}=this;if(!i)return;let o;o=this.currentViewIsPortrait&&!t?((t,i,o=300)=>{const{presentingEl:a}=i;if(!a)return z("portrait-to-landscape-transition");const e="ION-MODAL"===a.tagName&&void 0!==a.presentingElement,r=x(a),n=document.body,s=z("portrait-to-landscape-transition").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(o),d=z().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"});if(e){const t="translateY(-10px) scale(0.915)",i="translateY(0px) scale(1)";d.addElement(a).afterStyles({transform:i}).fromTo("transform",t,i).fromTo("filter","contrast(0.85)","contrast(1)");const o=z().addElement(r.querySelector(".modal-shadow")).afterStyles({transform:i,opacity:"0"}).fromTo("transform",t,i);s.addAnimation([d,o])}else{const i=x(t),o=z().addElement(i.querySelectorAll(".modal-wrapper, .modal-shadow")).fromTo("opacity","1","1"),e=z().addElement(i.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)","var(--backdrop-opacity)"),r=`translateY(${CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px"}) scale(0.915)`;d.addElement(a).afterStyles({transform:"translateY(0px) scale(1)","border-radius":"0px"}).beforeAddWrite((()=>n.style.setProperty("background-color",""))).fromTo("transform",r,"translateY(0px) scale(1)").fromTo("filter","contrast(0.85)","contrast(1)").fromTo("border-radius","10px 10px 0 0","0px"),s.addAnimation([d,o,e])}return s})(this.el,{presentingEl:i}):((t,i,o=300)=>{const{presentingEl:a}=i;if(!a)return z("landscape-to-portrait-transition");const e="ION-MODAL"===a.tagName&&void 0!==a.presentingElement,r=x(a),n=document.body,s=z("landscape-to-portrait-transition").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(o),d=z().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"});if(e){const t="translateY(-10px) scale(0.915)",i="translateY(0) scale(1)";d.addElement(a).afterStyles({transform:i}).fromTo("transform",t,i);const o=z().addElement(r.querySelector(".modal-shadow")).afterStyles({transform:i,opacity:"0"}).fromTo("transform",t,i);s.addAnimation([d,o])}else{const i=x(t),o=z().addElement(i.querySelectorAll(".modal-wrapper, .modal-shadow")).fromTo("opacity","1","1"),e=z().addElement(i.querySelector("ion-backdrop")).fromTo("opacity","var(--backdrop-opacity)","var(--backdrop-opacity)"),r=`translateY(${CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px"}) scale(0.915)`;d.addElement(a).afterStyles({transform:r}).beforeAddWrite((()=>n.style.setProperty("background-color","black"))).keyframes([{offset:0,transform:"translateY(0px) scale(1)",filter:"contrast(1)",borderRadius:"0px"},{offset:.2,transform:"translateY(0px) scale(1)",filter:"contrast(1)",borderRadius:"10px 10px 0 0"},{offset:1,transform:r,filter:"contrast(0.85)",borderRadius:"10px 10px 0 0"}]),s.addAnimation([d,o,e])}return s})(this.el,{presentingEl:i}),this.currentViewIsPortrait=t,this.viewTransitionAnimation=o,o.play().then((()=>{this.viewTransitionAnimation=void 0,g((()=>this.updateSafeAreaOverrides())),this.reinitSwipeToClose()}))}cleanupViewTransitionListener(){this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0),this.viewTransitionAnimation&&(this.viewTransitionAnimation.destroy(),this.viewTransitionAnimation=void 0)}reinitSwipeToClose(){"ios"===$(this)&&this.presentingElement&&(this.gesture&&(this.gesture.destroy(),this.gesture=void 0),this.animation&&(this.animation.progressEnd(0,0,0),this.animation.destroy(),this.animation=void 0),g((()=>{this.ensureCorrectModalPosition(),this.initSwipeToClose()})))}ensureCorrectModalPosition(){const{el:t,presentingElement:i}=this,o=x(t).querySelector(".modal-wrapper");if(o&&(o.style.transform="translateY(0vh)",o.style.opacity="1"),"ION-MODAL"===(null==i?void 0:i.tagName))if(window.innerWidth<768){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px";i.style.transform=`translateY(${t}) scale(0.915)`}else i.style.transform="translateY(0px) scale(1)"}async dismissNestedModals(){const t=document.querySelectorAll(`ion-modal[data-parent-ion-modal="${this.el.id}"]`);null==t||t.forEach((async t=>{await t.dismiss(void 0,"parent-dismissed")}))}initParentRemovalObserver(){"undefined"!=typeof MutationObserver&&"undefined"!=typeof window&&this.cachedOriginalParent&&this.cachedOriginalParent.nodeType!==Node.DOCUMENT_NODE&&this.cachedOriginalParent.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&(this.hasController||this.cachedOriginalParent===document.body||"ION-APP"===this.cachedOriginalParent.tagName||(this.parentRemovalObserver=new MutationObserver((t=>{t.forEach((t=>{"childList"===t.type&&t.removedNodes.length>0&&(Array.from(t.removedNodes).some((t=>{var i,o;const a=t===this.cachedOriginalParent,e=!!this.cachedOriginalParent&&(null===(o=(i=t).contains)||void 0===o?void 0:o.call(i,this.cachedOriginalParent));return a||e}))||this.cachedOriginalParent&&!this.cachedOriginalParent.isConnected)&&(this.dismiss(void 0,"parent-removed"),this.cachedOriginalParent=void 0)}))})),this.parentRemovalObserver.observe(document.body,{childList:!0,subtree:!0})))}cleanupParentRemovalObserver(){var t;null===(t=this.parentRemovalObserver)||void 0===t||t.disconnect(),this.parentRemovalObserver=void 0}onDragStart(){this.ionDragStart.emit()}onDragMove(t){this.ionDragMove.emit(t)}onDragEnd(t){this.ionDragEnd.emit(t)}getSafeAreaContext(){return{isSheetModal:this.isSheetModal,isCardModal:void 0!==this.presentingElement&&"ios"===$(this),presentingElement:this.presentingElement,breakpoints:this.breakpoints,currentBreakpoint:this.currentBreakpoint}}setInitialSafeAreaOverrides(){const t=Object.assign(Object.assign({},this.getSafeAreaContext()),{hasCustomDimensions:pt(this.el)}),i=(t=>{const{isSheetModal:i,isCardModal:o}=t;return i?{top:"0px",bottom:"inherit",left:"0px",right:"0px"}:o?{top:"inherit",bottom:"inherit",left:"0px",right:"0px"}:H&&H.matchMedia("(min-width: 768px) and (min-height: 600px)").matches||t.hasCustomDimensions?{top:"0px",bottom:"0px",left:"0px",right:"0px"}:{top:"inherit",bottom:"inherit",left:"inherit",right:"inherit"}})(t);ct(this.el,i),t.isSheetModal&&(this.updateSheetOffsetTop(),this.unsubscribeRootSafeAreaTop=(t=>{const i=null==H?void 0:H.document;if(!(null==i?void 0:i.body)||"undefined"==typeof ResizeObserver)return()=>{};const o=i.createElement("div");o.style.cssText="position:fixed;visibility:hidden;pointer-events:none;top:0;left:0;width:0;height:var(--ion-safe-area-top,0px);",i.body.appendChild(o);let a=lt();const e=new ResizeObserver((i=>{const{height:o}=i[0].contentRect;o!==a&&(a=o,t(o))}));return e.observe(o),()=>{e.disconnect(),o.remove()}})((t=>this.updateSheetOffsetTop(t))))}updateSheetOffsetTop(t){const i=null!=t?t:lt();this.el.style.setProperty("--ion-modal-offset-top",`${i}px`)}updateSafeAreaOverrides(){const{wrapperEl:t,el:i}=this,o=this.getSafeAreaContext();if(o.isSheetModal)return;if(o.isCardModal)return;if(!t)return;const a=(t=>{var i,o;const a=t.getBoundingClientRect(),e=null!==(i=null==H?void 0:H.innerHeight)&&void 0!==i?i:0,r=null!==(o=null==H?void 0:H.innerWidth)&&void 0!==o?o:0;return{top:a.top<=5?"inherit":"0px",bottom:a.bottom>=e-5?"inherit":"0px",left:a.left<=5?"inherit":"0px",right:a.right>=r-5?"inherit":"0px"}})(t);ct(i,a)}applyFullscreenSafeArea(){const t=this.getSafeAreaContext();if(t.isSheetModal||t.isCardModal)return;const{contentEl:i,hasFooter:o}=this.findContentAndFooter();this.applyFullscreenSafeAreaTo(i,o)}applyFullscreenSafeAreaTo(t,i){t&&!i&&t.style.setProperty("--internal-content-safe-area-padding-bottom","var(--ion-safe-area-bottom, 0px)")}clearContentSafeAreaPadding(t){t&&t.style.removeProperty("--internal-content-safe-area-padding-bottom")}findContentAndFooter(){let t=null,i=!1;for(const o of Array.from(this.el.children)){"ION-CONTENT"===o.tagName&&(t=o),"ION-FOOTER"===o.tagName&&(i=!0);for(const a of Array.from(o.children))"ION-CONTENT"!==a.tagName||t||(t=a),"ION-FOOTER"===a.tagName&&(i=!0)}return{contentEl:t,hasFooter:i}}cleanupSafeAreaOverrides(){var t,i;(i=this.el).style.removeProperty("--ion-safe-area-top"),i.style.removeProperty("--ion-safe-area-bottom"),i.style.removeProperty("--ion-safe-area-left"),i.style.removeProperty("--ion-safe-area-right"),null===(t=this.unsubscribeRootSafeAreaTop)||void 0===t||t.call(this),this.unsubscribeRootSafeAreaTop=void 0,this.el.style.removeProperty("--ion-modal-offset-top");const{contentEl:o}=this.findContentAndFooter();this.clearContentSafeAreaPadding(o)}render(){const{handle:t,isSheetModal:i,presentingElement:o,htmlAttributes:a,handleBehavior:e,inheritedAttributes:s,focusTrap:d,expandToScroll:h}=this,l=!1!==t&&i,p=$(this),c=void 0!==o&&"ios"===p,m="cycle"===e;return r(n,Object.assign({key:"c4b2713ebc788ac8672e18fdd5069e4253c4da34","no-router":!0,tabIndex:m&&i&&l?0:-1},a,{style:{zIndex:`${2e4+this.overlayIndex}`},class:Object.assign({[p]:!0,"modal-default":!c&&!i,"modal-card":c,"modal-sheet":i,"modal-no-expand-scroll":i&&!h,"overlay-hidden":!0,[E]:!1===d},I(this.cssClass)),onIonBackdropTap:this.onBackdropTap,onIonModalDidPresent:this.onLifecycle,onIonModalWillPresent:this.onLifecycle,onIonModalWillDismiss:this.onLifecycle,onIonModalDidDismiss:this.onLifecycle,onFocus:this.onModalFocus}),r("ion-backdrop",{key:"2cc0afff8a815954492138afb0fca042243afddd",ref:t=>this.backdropEl=t,visible:this.showBackdrop,tappable:this.backdropDismiss,part:"backdrop"}),"ios"===p&&r("div",{key:"9844700b9436f9bfa1a69ba436e9ca46d70cf316",class:"modal-shadow"}),r("div",Object.assign({key:"ab1cd56ca956c773c9242fb42ff320bac7627b4b",role:"dialog"},s,{"aria-modal":"true",tabIndex:-1,class:"modal-wrapper ion-overlay-wrapper",part:"content",ref:t=>this.wrapperEl=t}),l&&r("button",{key:"c7706794e04a962178640e9a9a11c56288c45e08",class:"modal-handle",tabIndex:m?0:-1,"aria-label":"Activate to adjust the size of the dialog overlaying the screen",onClick:m?this.onHandleClick:void 0,part:"handle",ref:t=>this.dragHandleEl=t}),r("slot",{key:"c44fd9810cdd3286f096af98e5a4072f8f44c193",onSlotchange:this.onSlotChange})))}get el(){return s(this)}static get watchers(){return{isOpen:[{onIsOpenChange:0}],trigger:[{triggerChanged:0}],breakpoints:[{breakpointsChanged:0}]}}},ft={ionModalDidPresent:"ionViewDidEnter",ionModalWillPresent:"ionViewWillEnter",ionModalWillDismiss:"ionViewWillLeave",ionModalDidDismiss:"ionViewDidLeave"};mt.style={ios:':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-wrapper{outline:none}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-modal-offset-top, 0px) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}:host(.modal-card),:host(.modal-sheet){--border-radius:10px}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:10px}}.modal-wrapper{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - 40px)}}:host(.modal-card) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}:host(.modal-card){--backdrop-opacity:0;--width:100%;-ms-flex-align:end;align-items:flex-end}:host(.modal-card) .modal-shadow{display:none}:host(.modal-card) ion-backdrop{pointer-events:none}}@media screen and (min-width: 768px){:host(.modal-card){--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px;--backdrop-opacity:0;--box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}:host(.modal-card) .modal-wrapper{-webkit-box-shadow:none;box-shadow:none}:host(.modal-card) .modal-shadow{-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}}:host(.modal-sheet) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}',md:':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-wrapper{outline:none}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-modal-offset-top, 0px) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:2px;--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper{-webkit-transform:translate3d(0, 40px, 0);transform:translate3d(0, 40px, 0);opacity:0.01}'};export{mt as ion_modal}
|
|
@@ -19,6 +19,7 @@ export declare class Content implements ComponentInterface {
|
|
|
19
19
|
private backgroundContentEl?;
|
|
20
20
|
private isMainContent;
|
|
21
21
|
private resizeTimeout;
|
|
22
|
+
private fullscreenResizeObserver?;
|
|
22
23
|
private inheritedAttributes;
|
|
23
24
|
private tabsElement;
|
|
24
25
|
private tabsLoadCallback?;
|
|
@@ -36,6 +37,7 @@ export declare class Content implements ComponentInterface {
|
|
|
36
37
|
* to transparent.
|
|
37
38
|
*/
|
|
38
39
|
fullscreen: boolean;
|
|
40
|
+
fullscreenChanged(): void;
|
|
39
41
|
/**
|
|
40
42
|
* Controls where the fixed content is placed relative to the main content
|
|
41
43
|
* in the DOM. This can be used to control the order in which fixed elements
|
|
@@ -80,7 +82,17 @@ export declare class Content implements ComponentInterface {
|
|
|
80
82
|
ionScrollEnd: EventEmitter<ScrollBaseDetail>;
|
|
81
83
|
componentWillLoad(): void;
|
|
82
84
|
connectedCallback(): void;
|
|
85
|
+
componentDidLoad(): void;
|
|
83
86
|
disconnectedCallback(): void;
|
|
87
|
+
/**
|
|
88
|
+
* Header and footer sizes can change after load without a window resize
|
|
89
|
+
* firing, so the `resize` listener alone misses those changes.
|
|
90
|
+
*
|
|
91
|
+
* Popover content is excluded because `contain: none` lets its offsets drive
|
|
92
|
+
* the host's own height, which would feed back into the observer.
|
|
93
|
+
*/
|
|
94
|
+
private setupFullscreenResizeObserver;
|
|
95
|
+
private destroyFullscreenResizeObserver;
|
|
84
96
|
/**
|
|
85
97
|
* Rotating certain devices can update
|
|
86
98
|
* the safe area insets. As a result,
|
|
@@ -57,6 +57,10 @@ export declare class Datetime implements ComponentInterface {
|
|
|
57
57
|
* Set true only by `visibleCallback`. Lets `hiddenCallback` ignore the
|
|
58
58
|
* synthetic "not intersecting" entry IntersectionObserver fires on
|
|
59
59
|
* `observe()` when the host mounts offscreen.
|
|
60
|
+
*
|
|
61
|
+
* Don't reset this in `disconnectedCallback`. Overlays disconnect and
|
|
62
|
+
* reconnect the host without re-creating the observers, so a reset there
|
|
63
|
+
* makes `hiddenCallback` miss the dismissal.
|
|
60
64
|
*/
|
|
61
65
|
private hasBeenIntersecting;
|
|
62
66
|
private prevPresentation;
|
|
@@ -79,7 +83,7 @@ export declare class Datetime implements ComponentInterface {
|
|
|
79
83
|
/**
|
|
80
84
|
* The color to use from your application's color palette.
|
|
81
85
|
* Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`.
|
|
82
|
-
* For more information on colors,
|
|
86
|
+
* For more information on colors, refer to [theming](/docs/theming/basics).
|
|
83
87
|
*/
|
|
84
88
|
color?: Color;
|
|
85
89
|
/**
|
|
@@ -40,6 +40,7 @@ export declare class Modal implements ComponentInterface, OverlayInterface {
|
|
|
40
40
|
private currentViewIsPortrait?;
|
|
41
41
|
private viewTransitionAnimation?;
|
|
42
42
|
private resizeTimeout?;
|
|
43
|
+
private unsubscribeRootSafeAreaTop?;
|
|
43
44
|
private parentRemovalObserver?;
|
|
44
45
|
private cachedOriginalParent?;
|
|
45
46
|
private cachedPageParent?;
|
|
@@ -402,9 +403,10 @@ export declare class Modal implements ComponentInterface, OverlayInterface {
|
|
|
402
403
|
*/
|
|
403
404
|
private setInitialSafeAreaOverrides;
|
|
404
405
|
/**
|
|
405
|
-
*
|
|
406
|
-
*
|
|
407
|
-
* Called on present
|
|
406
|
+
* Sets the internal --ion-modal-offset-top property on the host element,
|
|
407
|
+
* resolving the current root --ion-safe-area-top when no value is given.
|
|
408
|
+
* Called on present, on resize (e.g., device rotation changes safe-area),
|
|
409
|
+
* and whenever the root safe-area value itself changes.
|
|
408
410
|
*/
|
|
409
411
|
private updateSheetOffsetTop;
|
|
410
412
|
/**
|
|
@@ -33,6 +33,12 @@ export interface ModalSafeAreaContext {
|
|
|
33
33
|
* Results are cached for the current frame to avoid repeated reflows.
|
|
34
34
|
*/
|
|
35
35
|
export declare const getRootSafeAreaTop: () => number;
|
|
36
|
+
/**
|
|
37
|
+
* Calls back when the resolved root `--ion-safe-area-top` changes, which no
|
|
38
|
+
* event and no window resize covers. The probe's height tracks the variable, so
|
|
39
|
+
* a change to it becomes a size change the observer can see.
|
|
40
|
+
*/
|
|
41
|
+
export declare const onRootSafeAreaTopChange: (callback: (safeAreaTop: number) => void) => (() => void);
|
|
36
42
|
/**
|
|
37
43
|
* True when the modal host declares BOTH a non-fullscreen `--width` AND a
|
|
38
44
|
* non-fullscreen `--height` (i.e. a centered-dialog-like modal that doesn't
|
|
@@ -929,7 +929,7 @@ export namespace Components {
|
|
|
929
929
|
*/
|
|
930
930
|
"clearText": string;
|
|
931
931
|
/**
|
|
932
|
-
* The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors,
|
|
932
|
+
* The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, refer to [theming](/docs/theming/basics).
|
|
933
933
|
* @default 'primary'
|
|
934
934
|
*/
|
|
935
935
|
"color"?: Color;
|
|
@@ -6172,7 +6172,7 @@ declare namespace LocalJSX {
|
|
|
6172
6172
|
*/
|
|
6173
6173
|
"clearText"?: string;
|
|
6174
6174
|
/**
|
|
6175
|
-
* The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors,
|
|
6175
|
+
* The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, refer to [theming](/docs/theming/basics).
|
|
6176
6176
|
* @default 'primary'
|
|
6177
6177
|
*/
|
|
6178
6178
|
"color"?: Color;
|
package/hydrate/index.js
CHANGED
|
@@ -12808,6 +12808,9 @@ class Content {
|
|
|
12808
12808
|
*/
|
|
12809
12809
|
this.scrollEvents = false;
|
|
12810
12810
|
}
|
|
12811
|
+
fullscreenChanged() {
|
|
12812
|
+
this.setupFullscreenResizeObserver();
|
|
12813
|
+
}
|
|
12811
12814
|
componentWillLoad() {
|
|
12812
12815
|
this.inheritedAttributes = inheritAriaAttributes(this.el);
|
|
12813
12816
|
}
|
|
@@ -12847,6 +12850,12 @@ class Content {
|
|
|
12847
12850
|
closestTabs.addEventListener('ionTabBarLoaded', this.tabsLoadCallback);
|
|
12848
12851
|
}
|
|
12849
12852
|
}
|
|
12853
|
+
// Re-observe on reattach, since componentDidLoad only fires once.
|
|
12854
|
+
this.setupFullscreenResizeObserver();
|
|
12855
|
+
}
|
|
12856
|
+
componentDidLoad() {
|
|
12857
|
+
// The custom elements build assigns fullscreen after connectedCallback.
|
|
12858
|
+
this.setupFullscreenResizeObserver();
|
|
12850
12859
|
}
|
|
12851
12860
|
disconnectedCallback() {
|
|
12852
12861
|
this.onScrollEnd();
|
|
@@ -12868,6 +12877,25 @@ class Content {
|
|
|
12868
12877
|
clearTimeout(this.resizeTimeout);
|
|
12869
12878
|
this.resizeTimeout = null;
|
|
12870
12879
|
}
|
|
12880
|
+
this.destroyFullscreenResizeObserver();
|
|
12881
|
+
}
|
|
12882
|
+
/**
|
|
12883
|
+
* Header and footer sizes can change after load without a window resize
|
|
12884
|
+
* firing, so the `resize` listener alone misses those changes.
|
|
12885
|
+
*
|
|
12886
|
+
* Popover content is excluded because `contain: none` lets its offsets drive
|
|
12887
|
+
* the host's own height, which would feed back into the observer.
|
|
12888
|
+
*/
|
|
12889
|
+
setupFullscreenResizeObserver() {
|
|
12890
|
+
{
|
|
12891
|
+
return;
|
|
12892
|
+
}
|
|
12893
|
+
}
|
|
12894
|
+
destroyFullscreenResizeObserver() {
|
|
12895
|
+
if (this.fullscreenResizeObserver !== undefined) {
|
|
12896
|
+
this.fullscreenResizeObserver.disconnect();
|
|
12897
|
+
this.fullscreenResizeObserver = undefined;
|
|
12898
|
+
}
|
|
12871
12899
|
}
|
|
12872
12900
|
/**
|
|
12873
12901
|
* Rotating certain devices can update
|
|
@@ -13088,7 +13116,7 @@ class Content {
|
|
|
13088
13116
|
const forceOverscroll = this.shouldForceOverscroll();
|
|
13089
13117
|
const transitionShadow = mode === 'ios';
|
|
13090
13118
|
this.resize();
|
|
13091
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
13119
|
+
return (hAsync(Host, Object.assign({ key: '9551c759df407b10d809171641fc6e8f14d92219', role: isMainContent ? 'main' : undefined, class: createColorClasses$1(this.color, {
|
|
13092
13120
|
[mode]: true,
|
|
13093
13121
|
'content-fullscreen': this.fullscreen,
|
|
13094
13122
|
'content-sizing': hostContext('ion-popover', this.el),
|
|
@@ -13097,14 +13125,19 @@ class Content {
|
|
|
13097
13125
|
}), style: {
|
|
13098
13126
|
'--offset-top': `${this.cTop}px`,
|
|
13099
13127
|
'--offset-bottom': `${this.cBottom}px`,
|
|
13100
|
-
} }, inheritedAttributes), hAsync("div", { key: '
|
|
13128
|
+
} }, inheritedAttributes), hAsync("div", { key: 'c6de8fd226f0d10a534eb107fe032ac155fbe68e', ref: (el) => (this.backgroundContentEl = el), id: "background-content", part: "background" }), fixedSlotPlacement === 'before' ? hAsync("slot", { name: "fixed" }) : null, hAsync("div", { key: '082fc2936061360060b48221ecb1c864a3711fa0', class: {
|
|
13101
13129
|
'inner-scroll': true,
|
|
13102
13130
|
'scroll-x': scrollX,
|
|
13103
13131
|
'scroll-y': scrollY,
|
|
13104
13132
|
overscroll: (scrollX || scrollY) && forceOverscroll,
|
|
13105
|
-
}, ref: (scrollEl) => (this.scrollEl = scrollEl), onScroll: this.scrollEvents ? (ev) => this.onScroll(ev) : undefined, part: "scroll" }, hAsync("slot", { key: '
|
|
13133
|
+
}, ref: (scrollEl) => (this.scrollEl = scrollEl), onScroll: this.scrollEvents ? (ev) => this.onScroll(ev) : undefined, part: "scroll" }, hAsync("slot", { key: '0d2286206facb22696a9ca7e74a3f6b7d2397aab' })), transitionShadow ? (hAsync("div", { class: "transition-effect" }, hAsync("div", { class: "transition-cover" }), hAsync("div", { class: "transition-shadow" }))) : null, fixedSlotPlacement === 'after' ? hAsync("slot", { name: "fixed" }) : null));
|
|
13106
13134
|
}
|
|
13107
13135
|
get el() { return getElement(this); }
|
|
13136
|
+
static get watchers() { return {
|
|
13137
|
+
"fullscreen": [{
|
|
13138
|
+
"fullscreenChanged": 0
|
|
13139
|
+
}]
|
|
13140
|
+
}; }
|
|
13108
13141
|
static get style() { return contentCss(); }
|
|
13109
13142
|
static get cmpMeta() { return {
|
|
13110
13143
|
"$flags$": 265,
|
|
@@ -15152,6 +15185,10 @@ class Datetime {
|
|
|
15152
15185
|
* Set true only by `visibleCallback`. Lets `hiddenCallback` ignore the
|
|
15153
15186
|
* synthetic "not intersecting" entry IntersectionObserver fires on
|
|
15154
15187
|
* `observe()` when the host mounts offscreen.
|
|
15188
|
+
*
|
|
15189
|
+
* Don't reset this in `disconnectedCallback`. Overlays disconnect and
|
|
15190
|
+
* reconnect the host without re-creating the observers, so a reset there
|
|
15191
|
+
* makes `hiddenCallback` miss the dismissal.
|
|
15155
15192
|
*/
|
|
15156
15193
|
this.hasBeenIntersecting = false;
|
|
15157
15194
|
this.prevPresentation = null;
|
|
@@ -15170,7 +15207,7 @@ class Datetime {
|
|
|
15170
15207
|
/**
|
|
15171
15208
|
* The color to use from your application's color palette.
|
|
15172
15209
|
* Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`.
|
|
15173
|
-
* For more information on colors,
|
|
15210
|
+
* For more information on colors, refer to [theming](/docs/theming/basics).
|
|
15174
15211
|
*/
|
|
15175
15212
|
this.color = 'primary';
|
|
15176
15213
|
/**
|
|
@@ -16035,7 +16072,6 @@ class Datetime {
|
|
|
16035
16072
|
this.clearFocusVisible = undefined;
|
|
16036
16073
|
}
|
|
16037
16074
|
this.loadTimeoutCleanup();
|
|
16038
|
-
this.hasBeenIntersecting = false;
|
|
16039
16075
|
}
|
|
16040
16076
|
initializeListeners() {
|
|
16041
16077
|
this.initializeCalendarListener();
|
|
@@ -16846,7 +16882,7 @@ class Datetime {
|
|
|
16846
16882
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
16847
16883
|
const hasWheelVariant = hasDatePresentation && preferWheel;
|
|
16848
16884
|
renderHiddenInput(true, el, name, formatValue(value), disabled);
|
|
16849
|
-
return (hAsync(Host, { key: '
|
|
16885
|
+
return (hAsync(Host, { key: '48555ab73ae3f22b56d15e83ff5e29b854ccc2ef', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses$1(color, {
|
|
16850
16886
|
[mode]: true,
|
|
16851
16887
|
['datetime-readonly']: readonly,
|
|
16852
16888
|
['datetime-disabled']: disabled,
|
|
@@ -16856,7 +16892,7 @@ class Datetime {
|
|
|
16856
16892
|
[`datetime-size-${size}`]: true,
|
|
16857
16893
|
[`datetime-prefer-wheel`]: hasWheelVariant,
|
|
16858
16894
|
[`datetime-grid`]: isGridStyle,
|
|
16859
|
-
})) }, hAsync("div", { key: '
|
|
16895
|
+
})) }, hAsync("div", { key: 'd09134c540f93a8cc92cdf41ad5d3623632d144f', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));
|
|
16860
16896
|
}
|
|
16861
16897
|
get el() { return getElement(this); }
|
|
16862
16898
|
static get watchers() { return {
|
|
@@ -25629,6 +25665,41 @@ const getRootSafeAreaTop = () => {
|
|
|
25629
25665
|
}
|
|
25630
25666
|
return value;
|
|
25631
25667
|
};
|
|
25668
|
+
/**
|
|
25669
|
+
* Calls back when the resolved root `--ion-safe-area-top` changes, which no
|
|
25670
|
+
* event and no window resize covers. The probe's height tracks the variable, so
|
|
25671
|
+
* a change to it becomes a size change the observer can see.
|
|
25672
|
+
*/
|
|
25673
|
+
const onRootSafeAreaTopChange = (callback) => {
|
|
25674
|
+
const doc = win$1 === null || win$1 === void 0 ? void 0 : win$1.document;
|
|
25675
|
+
if (!(doc === null || doc === void 0 ? void 0 : doc.body) || typeof ResizeObserver === 'undefined') {
|
|
25676
|
+
return () => undefined;
|
|
25677
|
+
}
|
|
25678
|
+
const probe = doc.createElement('div');
|
|
25679
|
+
probe.style.cssText =
|
|
25680
|
+
'position:fixed;visibility:hidden;pointer-events:none;top:0;left:0;width:0;' +
|
|
25681
|
+
'height:var(--ion-safe-area-top,0px);';
|
|
25682
|
+
doc.body.appendChild(probe);
|
|
25683
|
+
/**
|
|
25684
|
+
* Seeded with the value the caller has already applied, so a change that
|
|
25685
|
+
* lands before the observer's first delivery still gets reported. Comparing
|
|
25686
|
+
* against an unset value instead would consume that first delivery and treat
|
|
25687
|
+
* the new inset as the baseline.
|
|
25688
|
+
*/
|
|
25689
|
+
let lastHeight = getRootSafeAreaTop();
|
|
25690
|
+
const observer = new ResizeObserver((entries) => {
|
|
25691
|
+
const { height } = entries[0].contentRect;
|
|
25692
|
+
if (height !== lastHeight) {
|
|
25693
|
+
lastHeight = height;
|
|
25694
|
+
callback(height);
|
|
25695
|
+
}
|
|
25696
|
+
});
|
|
25697
|
+
observer.observe(probe);
|
|
25698
|
+
return () => {
|
|
25699
|
+
observer.disconnect();
|
|
25700
|
+
probe.remove();
|
|
25701
|
+
};
|
|
25702
|
+
};
|
|
25632
25703
|
/**
|
|
25633
25704
|
* True when the modal host declares BOTH a non-fullscreen `--width` AND a
|
|
25634
25705
|
* non-fullscreen `--height` (i.e. a centered-dialog-like modal that doesn't
|
|
@@ -26791,16 +26862,18 @@ class Modal {
|
|
|
26791
26862
|
// Set the internal offset property with the resolved root safe-area-top value
|
|
26792
26863
|
if (context.isSheetModal) {
|
|
26793
26864
|
this.updateSheetOffsetTop();
|
|
26865
|
+
this.unsubscribeRootSafeAreaTop = onRootSafeAreaTopChange((safeAreaTop) => this.updateSheetOffsetTop(safeAreaTop));
|
|
26794
26866
|
}
|
|
26795
26867
|
}
|
|
26796
26868
|
/**
|
|
26797
|
-
*
|
|
26798
|
-
*
|
|
26799
|
-
* Called on present
|
|
26869
|
+
* Sets the internal --ion-modal-offset-top property on the host element,
|
|
26870
|
+
* resolving the current root --ion-safe-area-top when no value is given.
|
|
26871
|
+
* Called on present, on resize (e.g., device rotation changes safe-area),
|
|
26872
|
+
* and whenever the root safe-area value itself changes.
|
|
26800
26873
|
*/
|
|
26801
|
-
updateSheetOffsetTop() {
|
|
26802
|
-
const
|
|
26803
|
-
this.el.style.setProperty('--ion-modal-offset-top', `${
|
|
26874
|
+
updateSheetOffsetTop(safeAreaTop) {
|
|
26875
|
+
const value = safeAreaTop !== null && safeAreaTop !== void 0 ? safeAreaTop : getRootSafeAreaTop();
|
|
26876
|
+
this.el.style.setProperty('--ion-modal-offset-top', `${value}px`);
|
|
26804
26877
|
}
|
|
26805
26878
|
/**
|
|
26806
26879
|
* Updates safe-area overrides during dynamic state changes.
|
|
@@ -26899,7 +26972,10 @@ class Modal {
|
|
|
26899
26972
|
* Clears all safe-area overrides and padding.
|
|
26900
26973
|
*/
|
|
26901
26974
|
cleanupSafeAreaOverrides() {
|
|
26975
|
+
var _a;
|
|
26902
26976
|
clearSafeAreaOverrides(this.el);
|
|
26977
|
+
(_a = this.unsubscribeRootSafeAreaTop) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
26978
|
+
this.unsubscribeRootSafeAreaTop = undefined;
|
|
26903
26979
|
// Remove internal sheet offset property
|
|
26904
26980
|
this.el.style.removeProperty('--ion-modal-offset-top');
|
|
26905
26981
|
const { contentEl } = this.findContentAndFooter();
|
|
@@ -26912,11 +26988,11 @@ class Modal {
|
|
|
26912
26988
|
const isCardModal = presentingElement !== undefined && mode === 'ios';
|
|
26913
26989
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
26914
26990
|
const isSheetModalWithHandle = isSheetModal && showHandle;
|
|
26915
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
26991
|
+
return (hAsync(Host, Object.assign({ key: 'c4b2713ebc788ac8672e18fdd5069e4253c4da34', "no-router": true,
|
|
26916
26992
|
// Allow the modal to be navigable when the handle is focusable
|
|
26917
26993
|
tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
|
|
26918
26994
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
26919
|
-
}, 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: '
|
|
26995
|
+
}, 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: '2cc0afff8a815954492138afb0fca042243afddd', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && hAsync("div", { key: '9844700b9436f9bfa1a69ba436e9ca46d70cf316', class: "modal-shadow" }), hAsync("div", Object.assign({ key: 'ab1cd56ca956c773c9242fb42ff320bac7627b4b',
|
|
26920
26996
|
/*
|
|
26921
26997
|
role and aria-modal must be used on the
|
|
26922
26998
|
same element. They must also be set inside the
|
|
@@ -26929,9 +27005,9 @@ class Modal {
|
|
|
26929
27005
|
without the tabindex focus() would be a no-op and screen readers
|
|
26930
27006
|
may not properly announce the dialog and its content when it opens.
|
|
26931
27007
|
*/
|
|
26932
|
-
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", tabIndex: -1, class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: '
|
|
27008
|
+
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", tabIndex: -1, class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: 'c7706794e04a962178640e9a9a11c56288c45e08', class: "modal-handle",
|
|
26933
27009
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
26934
|
-
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: '
|
|
27010
|
+
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: 'c44fd9810cdd3286f096af98e5a4072f8f44c193', onSlotchange: this.onSlotChange }))));
|
|
26935
27011
|
}
|
|
26936
27012
|
get el() { return getElement(this); }
|
|
26937
27013
|
static get watchers() { return {
|