@ionic/core 8.8.3 → 8.8.4-dev.11775078622.1402ffa2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/index.js +1 -1
- package/components/ion-action-sheet.js +1 -1
- package/components/ion-alert.js +1 -1
- package/components/ion-datetime.js +1 -1
- package/components/ion-loading.js +1 -1
- package/components/ion-menu.js +1 -1
- package/components/ion-modal.js +1 -1
- package/components/ion-picker-legacy.js +1 -1
- package/components/ion-popover.js +1 -1
- package/components/ion-select-modal.js +1 -1
- package/components/ion-select-popover.js +1 -1
- package/components/ion-select.js +1 -1
- package/components/ion-toast.js +1 -1
- package/components/p-0npDmDEs.js +4 -0
- package/components/p-7hlGym-0.js +4 -0
- package/components/p-BO_M4HrR.js +4 -0
- package/components/{p-D6pdfDIA.js → p-BZ6v19WN.js} +1 -1
- package/components/p-C5gHGV8-.js +4 -0
- package/components/p-CWnwVrC4.js +4 -0
- package/components/{p-e-EDj2CO.js → p-MT7pYfQI.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/ion-action-sheet.cjs.entry.js +8 -4
- package/dist/cjs/ion-alert.cjs.entry.js +7 -3
- package/dist/cjs/ion-datetime_3.cjs.entry.js +7 -3
- package/dist/cjs/ion-loading.cjs.entry.js +7 -3
- package/dist/cjs/ion-menu_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-modal.cjs.entry.js +9 -5
- package/dist/cjs/ion-popover.cjs.entry.js +7 -3
- package/dist/cjs/ion-select-modal.cjs.entry.js +1 -1
- package/dist/cjs/ion-select_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-toast.cjs.entry.js +1 -1
- package/dist/cjs/{overlays-C2jiBSNQ.js → overlays-MjvhwPt2.js} +24 -0
- package/dist/collection/components/action-sheet/action-sheet.js +8 -4
- package/dist/collection/components/alert/alert.js +7 -3
- package/dist/collection/components/loading/loading.js +7 -3
- package/dist/collection/components/modal/modal.js +9 -5
- package/dist/collection/components/picker-legacy/picker.js +7 -3
- package/dist/collection/components/popover/popover.js +7 -3
- package/dist/collection/utils/overlays.js +23 -0
- package/dist/docs.json +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/ion-action-sheet.entry.js +8 -4
- package/dist/esm/ion-alert.entry.js +7 -3
- package/dist/esm/ion-datetime_3.entry.js +7 -3
- package/dist/esm/ion-loading.entry.js +7 -3
- package/dist/esm/ion-menu_3.entry.js +1 -1
- package/dist/esm/ion-modal.entry.js +9 -5
- package/dist/esm/ion-popover.entry.js +7 -3
- package/dist/esm/ion-select-modal.entry.js +1 -1
- package/dist/esm/ion-select_3.entry.js +1 -1
- package/dist/esm/ion-toast.entry.js +1 -1
- package/dist/esm/{overlays-F8GHPo-e.js → overlays-CCsdmuZR.js} +24 -1
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-2876a692.entry.js +4 -0
- package/dist/ionic/p-50b13f63.entry.js +4 -0
- package/dist/ionic/p-53399c0b.entry.js +4 -0
- package/dist/ionic/p-80bea9dd.entry.js +4 -0
- package/dist/ionic/p-Bx-dQ-64.js +4 -0
- package/dist/ionic/{p-7620be24.entry.js → p-c1854ee5.entry.js} +1 -1
- package/dist/ionic/p-c7f46ed5.entry.js +4 -0
- package/dist/ionic/{p-f69a5f71.entry.js → p-cfeb806a.entry.js} +1 -1
- package/dist/ionic/{p-4dd5e8e0.entry.js → p-e2e9d04e.entry.js} +1 -1
- package/dist/ionic/{p-e6c5f060.entry.js → p-f5506e4e.entry.js} +1 -1
- package/dist/ionic/p-f83088b5.entry.js +4 -0
- package/dist/types/utils/overlays.d.ts +10 -0
- package/hydrate/index.js +62 -15
- package/hydrate/index.mjs +62 -15
- package/package.json +1 -1
- package/components/p-1KVKSLu5.js +0 -4
- package/components/p-BVnB3eEn.js +0 -4
- package/components/p-CH0NYjKq.js +0 -4
- package/components/p-Cq8cQ0NL.js +0 -4
- package/components/p-DHsZWn1l.js +0 -4
- package/dist/ionic/p-16b65553.entry.js +0 -4
- package/dist/ionic/p-1b02923f.entry.js +0 -4
- package/dist/ionic/p-23fac490.entry.js +0 -4
- package/dist/ionic/p-51c11c47.entry.js +0 -4
- package/dist/ionic/p-5b52aa7d.entry.js +0 -4
- package/dist/ionic/p-7ca71c83.entry.js +0 -4
- package/dist/ionic/p-DTPR1Wpn.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{r as o,h as i,i as e,d as t,g as n}from"./p-IGIE5vDm.js";import{b as c}from"./p-NFFyoJ4Q.js";import{s as r}from"./p-
|
|
4
|
+
import{r as o,h as i,i as e,d as t,g as n}from"./p-IGIE5vDm.js";import{b as c}from"./p-NFFyoJ4Q.js";import{s as r}from"./p-Bx-dQ-64.js";import{g as a}from"./p-DiVJyqlX.js";import"./p-ZjP4CjeZ.js";import"./p-CGmVTdWh.js";import"./p-DB_iPQC-.js";import"./p-CmFz1Mjc.js";import"./p-BTEOs1at.js";const s=class{constructor(i){o(this,i),this.cancelText="Close",this.options=[]}closeModal(){const o=this.el.closest("ion-modal");o&&o.dismiss()}findOptionFromEvent(o){const{options:i}=this;return i.find((i=>i.value===o.target.value))}getValues(o){const{multiple:i,options:e}=this;if(i)return e.filter((o=>o.checked)).map((o=>o.value));const t=o?this.findOptionFromEvent(o):null;return t?t.value:void 0}callOptionHandler(o){const i=this.findOptionFromEvent(o),e=this.getValues(o);(null==i?void 0:i.handler)&&r(i.handler,e)}setChecked(o){const{multiple:i}=this,e=this.findOptionFromEvent(o);i&&e&&(e.checked=o.detail.checked)}renderRadioOptions(){const o=this.options.filter((o=>o.checked)).map((o=>o.value))[0];return i("ion-radio-group",{value:o,onIonChange:o=>this.callOptionHandler(o)},this.options.map((e=>i("ion-item",{lines:"none",class:Object.assign({"item-radio-checked":e.value===o},a(e.cssClass))},i("ion-radio",{value:e.value,disabled:e.disabled,justify:"start",labelPlacement:"end",onClick:()=>this.closeModal(),onKeyUp:o=>{" "===o.key&&this.closeModal()}},e.text)))))}renderCheckboxOptions(){return this.options.map((o=>i("ion-item",{class:Object.assign({"item-checkbox-checked":o.checked},a(o.cssClass))},i("ion-checkbox",{value:o.value,disabled:o.disabled,checked:o.checked,justify:"start",labelPlacement:"end",onIonChange:o=>{this.setChecked(o),this.callOptionHandler(o),e(this)}},o.text))))}render(){return i(t,{key:"f8a4cd6ff23ff01eaa1bdaf3c046814e7b30b23b",class:c(this)},i("ion-header",{key:"9e29a7e57ad5cf332641111882f16852187ec8ba"},i("ion-toolbar",{key:"e6af5d6eabbf4b10799fc8a0b8f91d29b12d41f5"},void 0!==this.header&&i("ion-title",{key:"6056e52d15dbf307571d25e0305d67228a79237d"},this.header),i("ion-buttons",{key:"c9aa4fb2e21a93f3a95c5a8f0ba8b7d5553c5a72",slot:"end"},i("ion-button",{key:"5ffbf512719bcb053b652fc96b1b6154d0593095",onClick:()=>this.closeModal()},this.cancelText)))),i("ion-content",{key:"0ec9098798a4e6de7a83a0a7e9d10bdcd7c98a78"},i("ion-list",{key:"d60b1700d3c2f8655951632de810900707a101f0"},!0===this.multiple?this.renderCheckboxOptions():this.renderRadioOptions())))}get el(){return n(this)}};s.style={ionic:'.sc-ion-select-modal-ionic-h{height:100%}ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic::part(container),ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic [part~="container"]{display:none}ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic::part(label),ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic [part~="label"]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-item.sc-ion-select-modal-ionic{--inner-border-width:0}.item-radio-checked.sc-ion-select-modal-ionic{--background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.08);--background-focused:var(--ion-color-primary, #0054e9);--background-focused-opacity:0.2;--background-hover:var(--ion-color-primary, #0054e9);--background-hover-opacity:0.12}.item-checkbox-checked.sc-ion-select-modal-ionic{--background-activated:var(--ion-item-color, var(--ion-text-color, #000));--background-focused:var(--ion-item-color, var(--ion-text-color, #000));--background-hover:var(--ion-item-color, var(--ion-text-color, #000));--color:var(--ion-color-primary, #0054e9)}',ios:'.sc-ion-select-modal-ios-h{height:100%}ion-item.sc-ion-select-modal-ios{--inner-padding-end:0}ion-radio.sc-ion-select-modal-ios::after{bottom:0;position:absolute;width:calc(100% - 0.9375rem - 16px);border-width:0px 0px 0.55px 0px;border-style:solid;border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, var(--ion-background-color-step-250, #c8c7cc))));content:""}ion-radio.sc-ion-select-modal-ios::after{inset-inline-start:calc(0.9375rem + 16px)}',md:'.sc-ion-select-modal-md-h{height:100%}ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md::part(container),ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md [part~="container"]{display:none}ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md::part(label),ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md [part~="label"]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-item.sc-ion-select-modal-md{--inner-border-width:0}.item-radio-checked.sc-ion-select-modal-md{--background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.08);--background-focused:var(--ion-color-primary, #0054e9);--background-focused-opacity:0.2;--background-hover:var(--ion-color-primary, #0054e9);--background-hover-opacity:0.12}.item-checkbox-checked.sc-ion-select-modal-md{--background-activated:var(--ion-item-color, var(--ion-text-color, #000));--background-focused:var(--ion-item-color, var(--ion-text-color, #000));--background-hover:var(--ion-item-color, var(--ion-text-color, #000));--color:var(--ion-color-primary, #0054e9)}'};export{s as ion_select_modal}
|
|
@@ -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 s,g as n}from"./p-IGIE5vDm.js";import{f as d,i as h,d as l,r as p,a as c,p as m}from"./p-B8xlpH8p.js";import{C as f,a as u,d as b}from"./p-CmFz1Mjc.js";import{e as v,g as x,r as w,b as g,h as k}from"./p-CGmVTdWh.js";import{c as y}from"./p-B-hirT0v.js";import{g as A}from"./p-CIGNaXM1.js";import{G as Y,O,F as E,e as D,B as S,j as T,k as M,n as B,f as C,g as P,h as j}from"./p-Bx-dQ-64.js";import{g as I}from"./p-DiVJyqlX.js";import{e as N,w as R}from"./p-BW_TRJm8.js";import{b as $}from"./p-NFFyoJ4Q.js";import{KEYBOARD_DID_OPEN as L}from"./p-9eeaBrnk.js";import{c as z}from"./p-Bum7H1fw.js";import{g as W}from"./p-hHmYLOfE.js";import{createGesture as F}from"./p-Cl0B-RWe.js";import{w as H}from"./p-ZjP4CjeZ.js";import"./p-DB_iPQC-.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 G={getEngine(){const t=A();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},_=()=>{!H||H.innerWidth>=768||G.setStyle({style:V.Dark})},K=(t=V.Default)=>{!H||H.innerWidth>=768||G.setStyle({style:t})},J=async(t,i)=>{"function"==typeof t.canDismiss&&await t.canDismiss(void 0,Y)&&(i.isRunning()?i.onFinish((()=>{t.dismiss(void 0,"handler")}),{oneTimeCallback:!0}):t.dismiss(void 0,"handler"))},Q=t=>.00255275*2.71828**(-14.9619*t)-1.00255*2.71828**(-.0380968*t)+1,U=.915,X=(t,i)=>v(400,t/Math.abs(1.1*i),500),q=(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))},tt=t=>{const{currentBreakpoint:i,backdropBreakpoint:o,expandToScroll:a}=t,e=void 0===o||o<i,r=e?`calc(var(--backdrop-opacity) * ${i})`:"0",s=z("backdropAnimation").fromTo("opacity",0,r);return e&&s.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:s,contentAnimation:a?void 0:z("contentAnimation").keyframes([{offset:0,opacity:1,maxHeight:100*(1-i)+"%"},{offset:1,opacity:1,maxHeight:100*i+"%"}])}},it=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}],s=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:s}},ot=(t,i)=>{const{presentingEl:o,currentBreakpoint:a,expandToScroll:e}=i,r=x(t),{wrapperAnimation:s,backdropAnimation:n,contentAnimation:d}=void 0!==a?tt(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};n.addElement(r.querySelector("ion-backdrop")),s.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([s]);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(n),i){const t=`translateY(-10px) scale(${i?U: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 s.fromTo("opacity","0","1")}else h.addAnimation(n);return h},at=(t,i,o=500)=>{const{presentingEl:a,currentBreakpoint:e}=i,r=x(t),{wrapperAnimation:s,backdropAnimation:n}=void 0!==e?it(i):{backdropAnimation:z().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:z().fromTo("transform","translateY(0vh)","translateY(100vh)")};n.addElement(r.querySelector("ion-backdrop")),s.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(s);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(n),i){const t=`translateY(-10px) scale(${i?U: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 s.fromTo("opacity","1","0")}else d.addAnimation(n);return d},et=(t,i)=>{const{currentBreakpoint:o,expandToScroll:a}=i,e=x(t),{wrapperAnimation:r,backdropAnimation:s,contentAnimation:n}=void 0!==o?tt(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};s.addElement(e.querySelector("ion-backdrop")),r.addElement(e.querySelector(".modal-wrapper")),!a&&(null==n||n.addElement(t.querySelector(".ion-page")));const d=z().addElement(t).easing("cubic-bezier(0.36,0.66,0.04,1)").duration(280).addAnimation([s,r]);return n&&d.addAnimation(n),d},rt=(t,i)=>{const{currentBreakpoint:o}=i,a=x(t),{wrapperAnimation:e,backdropAnimation:r}=void 0!==o?it(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])};let st=null,nt=!1;const dt=(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)},ht=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=y(),this.triggerController=D(),this.coreDelegate=f(),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,S)},this.onLifecycle=t=>{const i=this.usersElement,o=lt[t.type];if(i&&o){const a=new CustomEvent(o,{bubbles:!1,cancelable:!1,detail:t.detail});i.dispatchEvent(a)}},this.onModalFocus=t=>{const{dragHandleEl:i,el:o}=this;t.target===o&&i&&-1!==i.tabIndex&&i.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();!t.isCardModal||this.enterAnimation||this.leaveAnimation||this.handleViewTransition(),t.isSheetModal&&this.updateSheetOffsetTop(),t.isSheetModal||t.isCardModal||(this.updateSafeAreaOverrides(),this.wrapperEl&&(this.wrapperEl.style.removeProperty("height"),this.wrapperEl.style.removeProperty("padding-bottom")),this.applyFullscreenSafeArea())}),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(),this.presented&&M()}componentWillLoad(){var t;const{breakpoints:i,initialBreakpoint:a,el:e,htmlAttributes:r}=this,s=this.isSheetModal=void 0!==i&&void 0!==a,n=["aria-label","role"];this.inheritedAttributes=g(e,n),e.parentNode&&(this.cachedOriginalParent=e.parentNode),void 0!==r&&n.forEach((t=>{r[t]&&(this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:r[t]}),delete r[t])})),s&&(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)||B(this.el)}componentDidLoad(){!0===this.isOpen&&w((()=>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 u(r,o,this.component,["ion-page"],this.componentProps,e),k(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 s=void 0!==i;s&&"ios"===$(this)&&(this.statusBarStyle=await G.getStyle(),_()),await C(this,"modalEnter",ot,et,{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),w((()=>{this.gesture&&this.gesture.enable(!0)})))},window.addEventListener(L,this.keyboardOpenCallback)),this.isSheetModal?this.initSheetGesture():s&&this.initSwipeToClose(),this.initViewTransitionListener(),this.initParentRemovalObserver(),t()}initSwipeToClose(){var t;if("ios"!==$(this))return;const{el:i}=this,o=this.leaveAnimation||e.get("modalLeave",at),a=this.animation=o(i,{presentingEl:this.presentingElement,expandToScroll:this.expandToScroll});if(!c(i))return void m(i);const r=null!==(t=this.statusBarStyle)&&void 0!==t?t:V.Default;this.gesture=((t,i,o,a,e,r,s)=>{const n=.5,c=t.offsetHeight;let m=!1,f=!1,u=null,b=null,w=!0,g=0;const k=F({el:t,gestureName:"modalSwipeToClose",gesturePriority:O,direction:"y",threshold:10,canStart:t=>{const i=t.event.target;if(null===i||!i.closest)return!0;if(u=d(i),u){if(h(u)){const t=x(u);b=t.querySelector(".inner-scroll")}else b=u;return!u.querySelector("ion-refresher")&&0===b.scrollTop}return null===i.closest("ion-footer")},onStart:o=>{const{deltaY:a}=o;w=!u||!h(u)||u.scrollY,f=void 0!==t.canDismiss&&!0!==t.canDismiss,a>0&&u&&l(u),i.progressStart(!0,m?1:0),e()},onMove:a=>{const{deltaY:e}=a;e>0&&u&&l(u);const s=a.deltaY/c,d=s>=0&&f,h=d?.2:.9999,p=d?Q(s/h):s,m=v(1e-4,p,h);i.progressStep(m),m>=n&&g<n?K(o):m<n&&g>=n&&_(),g=m;const b={currentY:a.currentY,deltaY:a.deltaY,velocityY:a.velocityY,progress:q(t,a.deltaY)};r(b)},onEnd:o=>{const e=o.velocityY,r=o.deltaY/c,d=r>=0&&f,h=d?.2:.9999,l=d?Q(r/h):r,b=v(1e-4,l,h),x=!d&&(o.deltaY+1e3*e)/c>=n;let g=x?-.001:.001;x?(i.easing("cubic-bezier(0.32, 0.72, 0, 1)"),g+=W([0,0],[.32,.72],[0,1],[1,1],b)[0]):(i.easing("cubic-bezier(1, 0, 0.68, 0.28)"),g+=W([0,0],[1,0],[.68,.28],[1,1],b)[0]);const y=X(x?r*c:(1-b)*c,e);m=x,k.enable(!1),u&&p(u,w),i.onFinish((()=>{x||k.enable(!0)})).progressEnd(x?1:0,g,y),d&&b>h/4?J(t,i):x&&a();const A={currentY:o.currentY,deltaY:o.deltaY,velocityY:o.velocityY,progress:q(t,o.deltaY)};s(A)}});return k})(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",ot),r=this.animation=a(this.el,{presentingEl:this.presentingElement,currentBreakpoint:i,backdropBreakpoint:o,expandToScroll:this.expandToScroll});r.progressStart(!0,1);const{gesture:s,moveSheetToBreakpoint:n}=((t,i,o,a,e,r,s=[],n,l,p,c,m,f,u)=>{const b={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%"}]},g=t.querySelector("ion-content"),k=o.clientHeight;let y=a,A=0,Y=!1,O=null,D=null,S=null,T=null;const M=s[s.length-1],B=s[0],C=r.childAnimations.find((t=>"wrapperAnimation"===t.id)),P=r.childAnimations.find((t=>"backdropAnimation"===t.id)),j=r.childAnimations.find((t=>"contentAnimation"===t.id)),I=()=>{!1!==t.focusTrap&&!1!==t.showBackdrop&&(t.style.setProperty("pointer-events","auto"),i.style.setProperty("pointer-events","auto"),t.classList.remove(E))},N=()=>{t.style.setProperty("pointer-events","none"),i.style.setProperty("pointer-events","none"),t.classList.add(E)},R=i=>{if(!D&&(D=Array.from(t.querySelectorAll("ion-footer")),!D.length))return;const o=t.querySelector(".ion-page");if(T=i,"stationary"===i)D.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;D.forEach(((o,a)=>{const e=o.getBoundingClientRect(),r=document.body.getBoundingClientRect();i+=o.clientHeight;const s=e.top-r.top,n=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",`${s}px`),o.style.setProperty("--pinned-left",`${n}px`),0===a){S=s;const i=t.querySelector("ion-header");i&&(S-=i.clientHeight)}})),D.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)}))}};C&&P&&(C.keyframes([...b.WRAPPER_KEYFRAMES]),P.keyframes([...b.BACKDROP_KEYFRAMES]),null==j||j.keyframes([...b.CONTENT_KEYFRAMES]),r.progressStart(!0,1-y),y>e&&!1!==t.focusTrap&&!1!==t.showBackdrop?I():N()),g&&y!==M&&n&&(g.scrollY=!1);const $=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,C&&P&&(C.keyframes([{offset:0,transform:`translateY(${100*d}%)`},{offset:1,transform:`translateY(${100*(1-m)}%)`}]),P.keyframes([{offset:0,opacity:`calc(var(--backdrop-opacity) * ${Z(1-d,e)})`},{offset:1,opacity:`calc(var(--backdrop-opacity) * ${Z(m,e)})`}]),j&&j.keyframes([{offset:0,maxHeight:100*(1-d)+"%"},{offset:1,maxHeight:100*m+"%"}]),r.progressStep(0)),H.enable(!1),l?J(t,r):f||p(),!g||m!==s[s.length-1]&&n||(g.scrollY=!0),n||0!==m||R("stationary"),new Promise((i=>{r.onFinish((()=>{f?(n||R("stationary"),C&&P?w((()=>{C.keyframes([...b.WRAPPER_KEYFRAMES]),P.keyframes([...b.BACKDROP_KEYFRAMES]),null==j||j.keyframes([...b.CONTENT_KEYFRAMES]),r.progressStart(!0,1-m),y=m,c(y),y>e&&!1!==t.focusTrap&&!1!==t.showBackdrop?I():N(),H.enable(!0),i()})):(H.enable(!0),i())):i()}),{oneTimeCallback:!0}).progressEnd(1,0,h?500:0)}))},L=t=>{const i=o.getBoundingClientRect().top+t,a=z(i);return s.reduce(((t,i)=>Math.abs(i-a)<Math.abs(t-a)?i:t))},z=t=>{const i=s[s.length-1],o=W(s[0]),a=W(i),e=Math.round((o-t)/(o-a)*1e3)/1e3;return Math.max(0,Math.min(1,e))},W=i=>{const o=t.getBoundingClientRect();return window.innerHeight-o.height*i},H=F({el:o,gestureName:"modalSheet",gesturePriority:40,direction:"y",threshold:10,canStart:t=>{const i=d(t.event.target);if(y=l(),!n&&i)return 0===(h(i)?x(i).querySelector(".inner-scroll"):i).scrollTop;if(1===y&&i){const t=h(i)?x(i).querySelector(".inner-scroll"):i;return!i.querySelector("ion-refresher")&&0===t.scrollTop}return!0},onStart:i=>{if(Y=void 0!==t.canDismiss&&!0!==t.canDismiss&&0===B,!n){const t=d(i.event.target);O=t&&h(t)?x(t).querySelector(".inner-scroll"):t}n||R("moving"),i.deltaY>0&&g&&(g.scrollY=!1),w((()=>{t.focus()})),r.progressStart(!0,1-y),m()},onMove:t=>{if(n||null===S||null===T||(t.currentY>=S&&"moving"===T?R("stationary"):t.currentY<S&&"stationary"===T&&R("moving")),!n&&t.deltaY<=0&&O)return;t.deltaY>0&&g&&(g.scrollY=!1);const i=s.length>1?1-s[1]:void 0,o=1-y+t.deltaY/k,a=void 0!==i&&o>=i&&Y,e=a?.95:.9999,d=a&&void 0!==i?i+Q((o-i)/(e-i)):o;A=v(1e-4,d,e),r.progressStep(A);const h=L(t.deltaY),l={currentY:t.currentY,deltaY:t.deltaY,velocityY:t.velocityY,progress:z(t.currentY),snapBreakpoint:h};f(l)},onEnd:t=>{const i=L(t.deltaY),o={currentY:t.currentY,deltaY:t.deltaY,velocityY:t.velocityY,progress:z(t.currentY),snapBreakpoint:i};if(!n&&t.deltaY<=0&&O&&O.scrollTop>0)return R("stationary"),void u(o);$({breakpoint:i,breakpointOffset:A,canDismiss:Y,animated:!0}),u(o)}});return{gesture:H,moveSheetToBreakpoint:$}})(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=s,this.moveSheetToBreakpoint=n,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,Y),this.gestureAnimationDismissing=!1}))}cardOnDismiss(){this.gestureAnimationDismissing=!0,K(this.statusBarStyle),this.animation.onFinish((async()=>{await this.dismiss(void 0,Y),this.gestureAnimationDismissing=!1}))}async dismiss(t,i){var o;if(this.gestureAnimationDismissing&&i!==Y)return!1;clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0;const e=await this.lockController.lock();if(await this.dismissNestedModals(),"handler"!==i&&!await this.checkCanDismiss(t,i))return e(),!1;const{presentingElement:r}=this;void 0!==r&&"ios"===$(this)&&K(this.statusBarStyle),"undefined"!=typeof window&&this.keyboardOpenCallback&&(window.removeEventListener(L,this.keyboardOpenCallback),this.keyboardOpenCallback=void 0);const s=await P(this,t,i,"modalLeave",at,rt,{presentingEl:r,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 b(t,this.usersElement),a((()=>this.el.classList.remove("show-modal"))),this.animation&&this.animation.destroy(),this.gesture&&this.gesture.destroy(),this.cleanupViewTransitionListener(),this.cleanupParentRemovalObserver(),this.cleanupSafeAreaOverrides(),this.cleanupChildRoutePassthrough()}return this.currentBreakpoint=void 0,this.animation=void 0,e(),s}onDidDismiss(){return j(this.el,"ionModalDidDismiss")}onWillDismiss(){return j(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:s}=this;i!==t&&a&&(this.sheetTransition=a({breakpoint:t,breakpointOffset:1-i,canDismiss:void 0!==e&&!0!==e&&0===r[0],animated:s}),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),s=document.body,n=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);n.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((()=>s.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"),n.addAnimation([d,o,e])}return n})(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),s=document.body,n=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);n.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((()=>s.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"}]),n.addAnimation([d,o,e])}return n})(this.el,{presentingEl:i}),this.currentViewIsPortrait=t,this.viewTransitionAnimation=o,o.play().then((()=>{this.viewTransitionAnimation=void 0,w((()=>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),w((()=>{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=this.getSafeAreaContext(),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?{top:"0px",bottom:"0px",left:"0px",right:"0px"}:{top:"inherit",bottom:"inherit",left:"inherit",right:"inherit"}})(t);dt(this.el,i),t.isSheetModal&&this.updateSheetOffsetTop()}updateSheetOffsetTop(){const t=(()=>{if(null!==st)return st;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(),st=o,nt||(nt=!0,w((()=>{st=null,nt=!1}))),o})();this.el.style.setProperty("--ion-modal-offset-top",`${t}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);dt(i,a)}applyFullscreenSafeArea(){const{wrapperEl:t,el:i}=this;if(!t)return;const o=this.getSafeAreaContext();if(o.isSheetModal||o.isCardModal)return;let a=!1,e=!1;for(const t of Array.from(i.children)){"ION-CONTENT"===t.tagName&&(a=!0),"ION-FOOTER"===t.tagName&&(e=!0);for(const i of Array.from(t.children))"ION-CONTENT"===i.tagName&&(a=!0),"ION-FOOTER"===i.tagName&&(e=!0)}a&&!e&&(t.style.setProperty("height","calc(var(--height) - var(--ion-safe-area-bottom, 0px))"),t.style.setProperty("padding-bottom","var(--ion-safe-area-bottom, 0px)"))}cleanupSafeAreaOverrides(){var t;(t=this.el).style.removeProperty("--ion-safe-area-top"),t.style.removeProperty("--ion-safe-area-bottom"),t.style.removeProperty("--ion-safe-area-left"),t.style.removeProperty("--ion-safe-area-right"),this.el.style.removeProperty("--ion-modal-offset-top"),this.wrapperEl&&(this.wrapperEl.style.removeProperty("height"),this.wrapperEl.style.removeProperty("padding-bottom"))}render(){const{handle:t,isSheetModal:i,presentingElement:o,htmlAttributes:a,handleBehavior:e,inheritedAttributes:n,focusTrap:d,expandToScroll:h}=this,l=!1!==t&&i,p=$(this),c=void 0!==o&&"ios"===p,m="cycle"===e;return r(s,Object.assign({key:"e6df0917ac03a8d6bf67cc9bebf075d2b804ba22","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:"710ed1cbb6ae9c1a1fa7ae774fd44aa3bbee8381",ref:t=>this.backdropEl=t,visible:this.showBackdrop,tappable:this.backdropDismiss,part:"backdrop"}),"ios"===p&&r("div",{key:"c9051fcd099e9b73e17f015dea6e16fbd73e4df4",class:"modal-shadow"}),r("div",Object.assign({key:"21e42d40099a569d95a4e04aa6d314c7d45c6192",role:"dialog"},n,{"aria-modal":"true",class:"modal-wrapper ion-overlay-wrapper",part:"content",ref:t=>this.wrapperEl=t}),l&&r("button",{key:"b48a6c32c9a7ebe5e070e8d9f3510d55d4bd1f9f",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:"2a20160f66629c14e3414bbe01e5ee89101d02be",onSlotchange:this.onSlotChange})))}get el(){return n(this)}static get watchers(){return{isOpen:[{onIsOpenChange:0}],trigger:[{triggerChanged:0}]}}},lt={ionModalDidPresent:"ionViewDidEnter",ionModalWillPresent:"ionViewWillEnter",ionModalWillDismiss:"ionViewWillLeave",ionModalDidDismiss:"ionViewDidLeave"};ht.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-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-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{ht as ion_modal}
|
|
@@ -86,6 +86,16 @@ export declare const getPresentedOverlay: (doc: Document, overlayTag?: string, i
|
|
|
86
86
|
* for main content.
|
|
87
87
|
*/
|
|
88
88
|
export declare const setRootAriaHidden: (hidden?: boolean) => void;
|
|
89
|
+
/**
|
|
90
|
+
* Cleans up root `aria-hidden` and `backdrop-no-scroll` when
|
|
91
|
+
* an overlay is removed from the DOM without going through
|
|
92
|
+
* the `dismiss()` flow (e.g., when a framework unmounts the
|
|
93
|
+
* overlay during a route change).
|
|
94
|
+
*
|
|
95
|
+
* Should be called from an overlay's `disconnectedCallback`
|
|
96
|
+
* when the overlay was still presented at the time of removal.
|
|
97
|
+
*/
|
|
98
|
+
export declare const cleanupRootFocusTrapAccessibility: () => void;
|
|
89
99
|
export declare const present: <OverlayPresentOptions>(overlay: OverlayInterface, name: keyof IonicConfig, iosEnterAnimation: AnimationBuilder, mdEnterAnimation: AnimationBuilder, opts?: OverlayPresentOptions) => Promise<void>;
|
|
90
100
|
export declare const dismiss: <OverlayDismissOptions>(overlay: OverlayInterface, data: any | undefined, role: string | undefined, name: keyof IonicConfig, iosLeaveAnimation: AnimationBuilder, mdLeaveAnimation: AnimationBuilder, opts?: OverlayDismissOptions) => Promise<boolean>;
|
|
91
101
|
export declare const eventMethod: <T>(element: HTMLElement, eventName: string) => Promise<T>;
|
package/hydrate/index.js
CHANGED
|
@@ -8088,6 +8088,29 @@ const setRootAriaHidden = (hidden = false) => {
|
|
|
8088
8088
|
viewContainer.removeAttribute('aria-hidden');
|
|
8089
8089
|
}
|
|
8090
8090
|
};
|
|
8091
|
+
/**
|
|
8092
|
+
* Cleans up root `aria-hidden` and `backdrop-no-scroll` when
|
|
8093
|
+
* an overlay is removed from the DOM without going through
|
|
8094
|
+
* the `dismiss()` flow (e.g., when a framework unmounts the
|
|
8095
|
+
* overlay during a route change).
|
|
8096
|
+
*
|
|
8097
|
+
* Should be called from an overlay's `disconnectedCallback`
|
|
8098
|
+
* when the overlay was still presented at the time of removal.
|
|
8099
|
+
*/
|
|
8100
|
+
const cleanupRootFocusTrapAccessibility = () => {
|
|
8101
|
+
if (typeof document === 'undefined') {
|
|
8102
|
+
return;
|
|
8103
|
+
}
|
|
8104
|
+
const remainingOverlays = getPresentedOverlays(document);
|
|
8105
|
+
const hasRemainingLocking = remainingOverlays.some((o) => {
|
|
8106
|
+
const el = o;
|
|
8107
|
+
return el.tagName !== 'ION-TOAST' && el.focusTrap !== false && isBackdropAlwaysBlocking(el);
|
|
8108
|
+
});
|
|
8109
|
+
if (!hasRemainingLocking) {
|
|
8110
|
+
setRootAriaHidden(false);
|
|
8111
|
+
document.body.classList.remove(BACKDROP_NO_SCROLL);
|
|
8112
|
+
}
|
|
8113
|
+
};
|
|
8091
8114
|
const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts) => {
|
|
8092
8115
|
var _a, _b;
|
|
8093
8116
|
if (overlay.presented) {
|
|
@@ -9710,6 +9733,10 @@ class ActionSheet {
|
|
|
9710
9733
|
this.gesture = undefined;
|
|
9711
9734
|
}
|
|
9712
9735
|
this.triggerController.removeClickListener();
|
|
9736
|
+
// Clean up aria-hidden if removed without dismiss() being called
|
|
9737
|
+
if (this.presented) {
|
|
9738
|
+
cleanupRootFocusTrapAccessibility();
|
|
9739
|
+
}
|
|
9713
9740
|
}
|
|
9714
9741
|
componentWillLoad() {
|
|
9715
9742
|
var _a;
|
|
@@ -9813,12 +9840,12 @@ class ActionSheet {
|
|
|
9813
9840
|
const cancelButton = allButtons.find((b) => b.role === 'cancel');
|
|
9814
9841
|
const buttons = allButtons.filter((b) => b.role !== 'cancel');
|
|
9815
9842
|
const headerID = `action-sheet-${overlayIndex}-header`;
|
|
9816
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
9843
|
+
return (hAsync(Host, Object.assign({ key: 'fc8e6c837c7e16d78348a3109f5dc992f111784a', role: "dialog", "aria-modal": "true", "aria-labelledby": header !== undefined ? headerID : null, tabindex: "-1" }, htmlAttributes, { style: {
|
|
9817
9844
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
9818
|
-
}, class: Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'action-sheet-translucent': this.translucent }), onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), hAsync("ion-backdrop", { key: '
|
|
9845
|
+
}, class: Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'action-sheet-translucent': this.translucent }), onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), hAsync("ion-backdrop", { key: 'e558804050a8ba80dcca73308bbcb4b31687ba70', tappable: this.backdropDismiss }), hAsync("div", { key: '6697622f6a62a460eac489afc5cd504eda002140', tabindex: "0", "aria-hidden": "true" }), hAsync("div", { key: '4c05e7a9a20953faaa8ea0eab739b9b400895137', class: "action-sheet-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, hAsync("div", { key: '43bbc9b7217570cfc62789b4987e61a6e51a1c5f', class: "action-sheet-container" }, hAsync("div", { key: '5f9b36b5396043997d7b74e29ad3738b2af8821e', class: "action-sheet-group", ref: (el) => (this.groupEl = el), role: hasRadioButtons ? 'radiogroup' : undefined }, header !== undefined && (hAsync("div", { key: '3306e90dace90046d226b1eb95b06af11eebba5e', id: headerID, class: {
|
|
9819
9846
|
'action-sheet-title': true,
|
|
9820
9847
|
'action-sheet-has-sub-title': this.subHeader !== undefined,
|
|
9821
|
-
} }, header, this.subHeader && hAsync("div", { key: '
|
|
9848
|
+
} }, header, this.subHeader && hAsync("div", { key: 'ee8e87e627e8eb6afdb1f4c3f0ef34c29a2b69c6', class: "action-sheet-sub-title" }, this.subHeader))), this.renderActionSheetButtons(buttons)), cancelButton && (hAsync("div", { key: 'cb568ea8502afd8d913c0d0107db4fc98b5e50c6', class: "action-sheet-group action-sheet-group-cancel" }, hAsync("button", Object.assign({ key: 'd11ca6898fa308f494f2183ffc45bbcf971c14cb' }, cancelButton.htmlAttributes, { type: "button", class: buttonClass$3(cancelButton), onClick: () => this.buttonClick(cancelButton) }), hAsync("span", { key: 'b18e80930fdd0515d3647846729d392971c7c511', class: "action-sheet-button-inner" }, cancelButton.icon && (hAsync("ion-icon", { key: '4e0a3fdcedaa480329080a8597df29746c14fd06', icon: cancelButton.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" })), cancelButton.text), mode === 'md' && hAsync("ion-ripple-effect", { key: 'fd2be8895b57b74bc83ee54a5d738472ad5fdb00' })))))), hAsync("div", { key: 'b08dba5d658f9a5a64d76dc7eb8aba720c9333c3', tabindex: "0", "aria-hidden": "true" })));
|
|
9822
9849
|
}
|
|
9823
9850
|
get el() { return getElement(this); }
|
|
9824
9851
|
static get watchers() { return {
|
|
@@ -10324,6 +10351,10 @@ class Alert {
|
|
|
10324
10351
|
this.gesture.destroy();
|
|
10325
10352
|
this.gesture = undefined;
|
|
10326
10353
|
}
|
|
10354
|
+
// Clean up aria-hidden if removed without dismiss() being called
|
|
10355
|
+
if (this.presented) {
|
|
10356
|
+
cleanupRootFocusTrapAccessibility();
|
|
10357
|
+
}
|
|
10327
10358
|
}
|
|
10328
10359
|
componentDidLoad() {
|
|
10329
10360
|
/**
|
|
@@ -10555,9 +10586,9 @@ class Alert {
|
|
|
10555
10586
|
* If neither are defined, do not set aria-labelledby.
|
|
10556
10587
|
*/
|
|
10557
10588
|
const ariaLabelledBy = header && subHeader ? `${hdrId} ${subHdrId}` : header ? hdrId : subHeader ? subHdrId : null;
|
|
10558
|
-
return (hAsync(Host, { key: '
|
|
10589
|
+
return (hAsync(Host, { key: '51ccec282f165dbaa02d7ee0c6413b870abae1d5', tabindex: "-1", style: {
|
|
10559
10590
|
zIndex: `${20000 + overlayIndex}`,
|
|
10560
|
-
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, hAsync("ion-backdrop", { key: '
|
|
10591
|
+
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, hAsync("ion-backdrop", { key: '555fb7a0048d1ada0182925ca460956e65f43322', tappable: this.backdropDismiss }), hAsync("div", { key: 'bce7b1466f5d3c2615a7478ec8903f9567c9b101', tabindex: "0", "aria-hidden": "true" }), hAsync("div", Object.assign({ key: '8b0e8793070fee6cb3a69f0fc9b828b07672d0f9', class: "alert-wrapper ion-overlay-wrapper", role: role, "aria-modal": "true", "aria-labelledby": ariaLabelledBy, "aria-describedby": message !== undefined ? msgId : null, tabindex: "0", ref: (el) => (this.wrapperEl = el) }, htmlAttributes), hAsync("div", { key: 'f9c99afdd4389421e9eaabaa7e2f9c17e2cb88f4', class: "alert-head" }, header && (hAsync("h2", { key: '7aa37fe49189d714e7d4bc786d9895ab8191f25c', id: hdrId, class: "alert-title" }, header)), subHeader && !header && (hAsync("h2", { key: '1c32cbb4d615672b669bfacff35079791a0ab50a', id: subHdrId, class: "alert-sub-title" }, subHeader)), subHeader && header && (hAsync("h3", { key: 'fc7285499cee4cef323085e501d974d423102e94', id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), hAsync("div", { key: 'b69334b5643b2592053bc408a9ab3b623e2d2b9d', tabindex: "0", "aria-hidden": "true" })));
|
|
10561
10592
|
}
|
|
10562
10593
|
get el() { return getElement(this); }
|
|
10563
10594
|
static get watchers() { return {
|
|
@@ -21634,6 +21665,10 @@ class Loading {
|
|
|
21634
21665
|
}
|
|
21635
21666
|
disconnectedCallback() {
|
|
21636
21667
|
this.triggerController.removeClickListener();
|
|
21668
|
+
// Clean up aria-hidden if removed without dismiss() being called
|
|
21669
|
+
if (this.presented) {
|
|
21670
|
+
cleanupRootFocusTrapAccessibility();
|
|
21671
|
+
}
|
|
21637
21672
|
}
|
|
21638
21673
|
/**
|
|
21639
21674
|
* Present the loading overlay after it has been created.
|
|
@@ -21699,9 +21734,9 @@ class Loading {
|
|
|
21699
21734
|
* Otherwise, don't set aria-labelledby.
|
|
21700
21735
|
*/
|
|
21701
21736
|
const ariaLabelledBy = message !== undefined ? msgId : null;
|
|
21702
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
21737
|
+
return (hAsync(Host, Object.assign({ key: 'ab48bfcee8f7e3e33847a2f262fdc08b9ea804ca', role: "dialog", "aria-modal": "true", "aria-labelledby": ariaLabelledBy, tabindex: "-1" }, htmlAttributes, { style: {
|
|
21703
21738
|
zIndex: `${40000 + this.overlayIndex}`,
|
|
21704
|
-
}, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), hAsync("ion-backdrop", { key: '
|
|
21739
|
+
}, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), hAsync("ion-backdrop", { key: '41baccc7fb6474389a3a3431c208e829ef738b75', visible: this.showBackdrop, tappable: this.backdropDismiss }), hAsync("div", { key: '7b7290974abbe8db8739b19835aca9f8b5c271c2', tabindex: "0", "aria-hidden": "true" }), hAsync("div", { key: 'e32466abfcc92aaad47ea03b1dcb49f66abe4b63', class: "loading-wrapper ion-overlay-wrapper" }, spinner && (hAsync("div", { key: 'c5e6e6f9e3f39dba0225d08d7dd2c1b96a1d83c7', class: "loading-spinner" }, hAsync("ion-spinner", { key: 'f428038959d879404ea898011363aac0b807ad11', name: spinner, "aria-hidden": "true" }))), message !== undefined && this.renderLoadingMessage(msgId)), hAsync("div", { key: '490e531367b86c319fa4260722dcff4dd631fa88', tabindex: "0", "aria-hidden": "true" })));
|
|
21705
21740
|
}
|
|
21706
21741
|
get el() { return getElement(this); }
|
|
21707
21742
|
static get watchers() { return {
|
|
@@ -25418,6 +25453,10 @@ class Modal {
|
|
|
25418
25453
|
// Also called in dismiss() — intentional dual cleanup covers both
|
|
25419
25454
|
// dismiss-then-remove and direct DOM removal without dismiss.
|
|
25420
25455
|
this.cleanupSafeAreaOverrides();
|
|
25456
|
+
// Clean up aria-hidden if removed without dismiss() being called
|
|
25457
|
+
if (this.presented) {
|
|
25458
|
+
cleanupRootFocusTrapAccessibility();
|
|
25459
|
+
}
|
|
25421
25460
|
}
|
|
25422
25461
|
componentWillLoad() {
|
|
25423
25462
|
var _a;
|
|
@@ -26266,20 +26305,20 @@ class Modal {
|
|
|
26266
26305
|
const isCardModal = presentingElement !== undefined && mode === 'ios';
|
|
26267
26306
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
26268
26307
|
const isSheetModalWithHandle = isSheetModal && showHandle;
|
|
26269
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
26308
|
+
return (hAsync(Host, Object.assign({ key: 'e6df0917ac03a8d6bf67cc9bebf075d2b804ba22', "no-router": true,
|
|
26270
26309
|
// Allow the modal to be navigable when the handle is focusable
|
|
26271
26310
|
tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
|
|
26272
26311
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
26273
|
-
}, 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: '
|
|
26312
|
+
}, 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: '710ed1cbb6ae9c1a1fa7ae774fd44aa3bbee8381', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && hAsync("div", { key: 'c9051fcd099e9b73e17f015dea6e16fbd73e4df4', class: "modal-shadow" }), hAsync("div", Object.assign({ key: '21e42d40099a569d95a4e04aa6d314c7d45c6192',
|
|
26274
26313
|
/*
|
|
26275
26314
|
role and aria-modal must be used on the
|
|
26276
26315
|
same element. They must also be set inside the
|
|
26277
26316
|
shadow DOM otherwise ion-button will not be highlighted
|
|
26278
26317
|
when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
|
|
26279
26318
|
*/
|
|
26280
|
-
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: '
|
|
26319
|
+
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: 'b48a6c32c9a7ebe5e070e8d9f3510d55d4bd1f9f', class: "modal-handle",
|
|
26281
26320
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
26282
|
-
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: '
|
|
26321
|
+
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: '2a20160f66629c14e3414bbe01e5ee89101d02be', onSlotchange: this.onSlotChange }))));
|
|
26283
26322
|
}
|
|
26284
26323
|
get el() { return getElement(this); }
|
|
26285
26324
|
static get watchers() { return {
|
|
@@ -27983,6 +28022,10 @@ class Picker {
|
|
|
27983
28022
|
}
|
|
27984
28023
|
disconnectedCallback() {
|
|
27985
28024
|
this.triggerController.removeClickListener();
|
|
28025
|
+
// Clean up aria-hidden if removed without dismiss() being called
|
|
28026
|
+
if (this.presented) {
|
|
28027
|
+
cleanupRootFocusTrapAccessibility();
|
|
28028
|
+
}
|
|
27986
28029
|
}
|
|
27987
28030
|
componentWillLoad() {
|
|
27988
28031
|
var _a;
|
|
@@ -28101,11 +28144,11 @@ class Picker {
|
|
|
28101
28144
|
render() {
|
|
28102
28145
|
const { htmlAttributes } = this;
|
|
28103
28146
|
const mode = getIonMode$1(this);
|
|
28104
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
28147
|
+
return (hAsync(Host, Object.assign({ key: '4d6531bfff4eb466f897cf2227d51783604ff439', "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
|
|
28105
28148
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
28106
28149
|
}, class: Object.assign({ [mode]: true,
|
|
28107
28150
|
// Used internally for styling
|
|
28108
|
-
[`picker-${mode}`]: true, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }), hAsync("ion-backdrop", { key: '
|
|
28151
|
+
[`picker-${mode}`]: true, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }), hAsync("ion-backdrop", { key: '754a80de29087f7e793b232c4276fc1f6b1c937f', visible: this.showBackdrop, tappable: this.backdropDismiss }), hAsync("div", { key: '9fcffb91109d6082ed338cd37a997254e5ea5bce', tabindex: "0", "aria-hidden": "true" }), hAsync("div", { key: 'de066bda70a9cb831fc88493873d7ebf879122d0', class: "picker-wrapper ion-overlay-wrapper", role: "dialog" }, hAsync("div", { key: '03a502e2e1aa38abd582ecfca60da8b7d1045701', class: "picker-toolbar" }, this.buttons.map((b) => (hAsync("div", { class: buttonWrapperClass(b) }, hAsync("button", { type: "button", onClick: () => this.buttonClick(b), class: buttonClass$1(b) }, b.text))))), hAsync("div", { key: 'f9e4d9eff3c2df866f15eed63f715a51c912eac6', class: "picker-columns" }, hAsync("div", { key: '78656d3265f9d4c82387f942c896a9d67c1fcedf', class: "picker-above-highlight" }), this.presented && this.columns.map((c) => hAsync("ion-picker-legacy-column", { col: c })), hAsync("div", { key: '1afd96cfa38fa9f52f61a867f2aa116a9ef3bedb', class: "picker-below-highlight" }))), hAsync("div", { key: '4d533e132d70f6ab32c461e3e4f6f9dfbe6bab15', tabindex: "0", "aria-hidden": "true" })));
|
|
28109
28152
|
}
|
|
28110
28153
|
get el() { return getElement(this); }
|
|
28111
28154
|
static get watchers() { return {
|
|
@@ -30533,6 +30576,10 @@ class Popover {
|
|
|
30533
30576
|
this.headerResizeObserver.disconnect();
|
|
30534
30577
|
this.headerResizeObserver = undefined;
|
|
30535
30578
|
}
|
|
30579
|
+
// Clean up aria-hidden if removed without dismiss() being called
|
|
30580
|
+
if (this.presented) {
|
|
30581
|
+
cleanupRootFocusTrapAccessibility();
|
|
30582
|
+
}
|
|
30536
30583
|
}
|
|
30537
30584
|
componentWillLoad() {
|
|
30538
30585
|
var _a, _b;
|
|
@@ -30771,9 +30818,9 @@ class Popover {
|
|
|
30771
30818
|
const { onLifecycle, parentPopover, dismissOnSelect, side, arrow, htmlAttributes, focusTrap } = this;
|
|
30772
30819
|
const desktop = isPlatform('desktop');
|
|
30773
30820
|
const enableArrow = arrow && !parentPopover;
|
|
30774
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
30821
|
+
return (hAsync(Host, Object.assign({ key: 'afc292b6b4eeb571c1cd832bc7ac03e0fea3dc28', "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
|
|
30775
30822
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
30776
|
-
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && hAsync("ion-backdrop", { key: '
|
|
30823
|
+
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && hAsync("ion-backdrop", { key: '301a33645918c7feb807a6fe857e462b83291c40', tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), hAsync("div", { key: 'f66123d36601ce61af3bce3c68c73002fe3a6d73', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && hAsync("div", { key: '39c92c94d01748d499f2db2513ecf022be2577dd', class: "popover-arrow", part: "arrow" }), hAsync("div", { key: '827552221533f7b5676e6e313cd7517275ea76d7', class: "popover-content", part: "content" }, hAsync("slot", { key: 'f874b8dfb78bfbc02e3bcad104819bf8d181d42f' })))));
|
|
30777
30824
|
}
|
|
30778
30825
|
get el() { return getElement(this); }
|
|
30779
30826
|
static get watchers() { return {
|
package/hydrate/index.mjs
CHANGED
|
@@ -8086,6 +8086,29 @@ const setRootAriaHidden = (hidden = false) => {
|
|
|
8086
8086
|
viewContainer.removeAttribute('aria-hidden');
|
|
8087
8087
|
}
|
|
8088
8088
|
};
|
|
8089
|
+
/**
|
|
8090
|
+
* Cleans up root `aria-hidden` and `backdrop-no-scroll` when
|
|
8091
|
+
* an overlay is removed from the DOM without going through
|
|
8092
|
+
* the `dismiss()` flow (e.g., when a framework unmounts the
|
|
8093
|
+
* overlay during a route change).
|
|
8094
|
+
*
|
|
8095
|
+
* Should be called from an overlay's `disconnectedCallback`
|
|
8096
|
+
* when the overlay was still presented at the time of removal.
|
|
8097
|
+
*/
|
|
8098
|
+
const cleanupRootFocusTrapAccessibility = () => {
|
|
8099
|
+
if (typeof document === 'undefined') {
|
|
8100
|
+
return;
|
|
8101
|
+
}
|
|
8102
|
+
const remainingOverlays = getPresentedOverlays(document);
|
|
8103
|
+
const hasRemainingLocking = remainingOverlays.some((o) => {
|
|
8104
|
+
const el = o;
|
|
8105
|
+
return el.tagName !== 'ION-TOAST' && el.focusTrap !== false && isBackdropAlwaysBlocking(el);
|
|
8106
|
+
});
|
|
8107
|
+
if (!hasRemainingLocking) {
|
|
8108
|
+
setRootAriaHidden(false);
|
|
8109
|
+
document.body.classList.remove(BACKDROP_NO_SCROLL);
|
|
8110
|
+
}
|
|
8111
|
+
};
|
|
8089
8112
|
const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts) => {
|
|
8090
8113
|
var _a, _b;
|
|
8091
8114
|
if (overlay.presented) {
|
|
@@ -9708,6 +9731,10 @@ class ActionSheet {
|
|
|
9708
9731
|
this.gesture = undefined;
|
|
9709
9732
|
}
|
|
9710
9733
|
this.triggerController.removeClickListener();
|
|
9734
|
+
// Clean up aria-hidden if removed without dismiss() being called
|
|
9735
|
+
if (this.presented) {
|
|
9736
|
+
cleanupRootFocusTrapAccessibility();
|
|
9737
|
+
}
|
|
9711
9738
|
}
|
|
9712
9739
|
componentWillLoad() {
|
|
9713
9740
|
var _a;
|
|
@@ -9811,12 +9838,12 @@ class ActionSheet {
|
|
|
9811
9838
|
const cancelButton = allButtons.find((b) => b.role === 'cancel');
|
|
9812
9839
|
const buttons = allButtons.filter((b) => b.role !== 'cancel');
|
|
9813
9840
|
const headerID = `action-sheet-${overlayIndex}-header`;
|
|
9814
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
9841
|
+
return (hAsync(Host, Object.assign({ key: 'fc8e6c837c7e16d78348a3109f5dc992f111784a', role: "dialog", "aria-modal": "true", "aria-labelledby": header !== undefined ? headerID : null, tabindex: "-1" }, htmlAttributes, { style: {
|
|
9815
9842
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
9816
|
-
}, class: Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'action-sheet-translucent': this.translucent }), onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), hAsync("ion-backdrop", { key: '
|
|
9843
|
+
}, class: Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'action-sheet-translucent': this.translucent }), onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), hAsync("ion-backdrop", { key: 'e558804050a8ba80dcca73308bbcb4b31687ba70', tappable: this.backdropDismiss }), hAsync("div", { key: '6697622f6a62a460eac489afc5cd504eda002140', tabindex: "0", "aria-hidden": "true" }), hAsync("div", { key: '4c05e7a9a20953faaa8ea0eab739b9b400895137', class: "action-sheet-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, hAsync("div", { key: '43bbc9b7217570cfc62789b4987e61a6e51a1c5f', class: "action-sheet-container" }, hAsync("div", { key: '5f9b36b5396043997d7b74e29ad3738b2af8821e', class: "action-sheet-group", ref: (el) => (this.groupEl = el), role: hasRadioButtons ? 'radiogroup' : undefined }, header !== undefined && (hAsync("div", { key: '3306e90dace90046d226b1eb95b06af11eebba5e', id: headerID, class: {
|
|
9817
9844
|
'action-sheet-title': true,
|
|
9818
9845
|
'action-sheet-has-sub-title': this.subHeader !== undefined,
|
|
9819
|
-
} }, header, this.subHeader && hAsync("div", { key: '
|
|
9846
|
+
} }, header, this.subHeader && hAsync("div", { key: 'ee8e87e627e8eb6afdb1f4c3f0ef34c29a2b69c6', class: "action-sheet-sub-title" }, this.subHeader))), this.renderActionSheetButtons(buttons)), cancelButton && (hAsync("div", { key: 'cb568ea8502afd8d913c0d0107db4fc98b5e50c6', class: "action-sheet-group action-sheet-group-cancel" }, hAsync("button", Object.assign({ key: 'd11ca6898fa308f494f2183ffc45bbcf971c14cb' }, cancelButton.htmlAttributes, { type: "button", class: buttonClass$3(cancelButton), onClick: () => this.buttonClick(cancelButton) }), hAsync("span", { key: 'b18e80930fdd0515d3647846729d392971c7c511', class: "action-sheet-button-inner" }, cancelButton.icon && (hAsync("ion-icon", { key: '4e0a3fdcedaa480329080a8597df29746c14fd06', icon: cancelButton.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" })), cancelButton.text), mode === 'md' && hAsync("ion-ripple-effect", { key: 'fd2be8895b57b74bc83ee54a5d738472ad5fdb00' })))))), hAsync("div", { key: 'b08dba5d658f9a5a64d76dc7eb8aba720c9333c3', tabindex: "0", "aria-hidden": "true" })));
|
|
9820
9847
|
}
|
|
9821
9848
|
get el() { return getElement(this); }
|
|
9822
9849
|
static get watchers() { return {
|
|
@@ -10322,6 +10349,10 @@ class Alert {
|
|
|
10322
10349
|
this.gesture.destroy();
|
|
10323
10350
|
this.gesture = undefined;
|
|
10324
10351
|
}
|
|
10352
|
+
// Clean up aria-hidden if removed without dismiss() being called
|
|
10353
|
+
if (this.presented) {
|
|
10354
|
+
cleanupRootFocusTrapAccessibility();
|
|
10355
|
+
}
|
|
10325
10356
|
}
|
|
10326
10357
|
componentDidLoad() {
|
|
10327
10358
|
/**
|
|
@@ -10553,9 +10584,9 @@ class Alert {
|
|
|
10553
10584
|
* If neither are defined, do not set aria-labelledby.
|
|
10554
10585
|
*/
|
|
10555
10586
|
const ariaLabelledBy = header && subHeader ? `${hdrId} ${subHdrId}` : header ? hdrId : subHeader ? subHdrId : null;
|
|
10556
|
-
return (hAsync(Host, { key: '
|
|
10587
|
+
return (hAsync(Host, { key: '51ccec282f165dbaa02d7ee0c6413b870abae1d5', tabindex: "-1", style: {
|
|
10557
10588
|
zIndex: `${20000 + overlayIndex}`,
|
|
10558
|
-
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, hAsync("ion-backdrop", { key: '
|
|
10589
|
+
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, hAsync("ion-backdrop", { key: '555fb7a0048d1ada0182925ca460956e65f43322', tappable: this.backdropDismiss }), hAsync("div", { key: 'bce7b1466f5d3c2615a7478ec8903f9567c9b101', tabindex: "0", "aria-hidden": "true" }), hAsync("div", Object.assign({ key: '8b0e8793070fee6cb3a69f0fc9b828b07672d0f9', class: "alert-wrapper ion-overlay-wrapper", role: role, "aria-modal": "true", "aria-labelledby": ariaLabelledBy, "aria-describedby": message !== undefined ? msgId : null, tabindex: "0", ref: (el) => (this.wrapperEl = el) }, htmlAttributes), hAsync("div", { key: 'f9c99afdd4389421e9eaabaa7e2f9c17e2cb88f4', class: "alert-head" }, header && (hAsync("h2", { key: '7aa37fe49189d714e7d4bc786d9895ab8191f25c', id: hdrId, class: "alert-title" }, header)), subHeader && !header && (hAsync("h2", { key: '1c32cbb4d615672b669bfacff35079791a0ab50a', id: subHdrId, class: "alert-sub-title" }, subHeader)), subHeader && header && (hAsync("h3", { key: 'fc7285499cee4cef323085e501d974d423102e94', id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), hAsync("div", { key: 'b69334b5643b2592053bc408a9ab3b623e2d2b9d', tabindex: "0", "aria-hidden": "true" })));
|
|
10559
10590
|
}
|
|
10560
10591
|
get el() { return getElement(this); }
|
|
10561
10592
|
static get watchers() { return {
|
|
@@ -21632,6 +21663,10 @@ class Loading {
|
|
|
21632
21663
|
}
|
|
21633
21664
|
disconnectedCallback() {
|
|
21634
21665
|
this.triggerController.removeClickListener();
|
|
21666
|
+
// Clean up aria-hidden if removed without dismiss() being called
|
|
21667
|
+
if (this.presented) {
|
|
21668
|
+
cleanupRootFocusTrapAccessibility();
|
|
21669
|
+
}
|
|
21635
21670
|
}
|
|
21636
21671
|
/**
|
|
21637
21672
|
* Present the loading overlay after it has been created.
|
|
@@ -21697,9 +21732,9 @@ class Loading {
|
|
|
21697
21732
|
* Otherwise, don't set aria-labelledby.
|
|
21698
21733
|
*/
|
|
21699
21734
|
const ariaLabelledBy = message !== undefined ? msgId : null;
|
|
21700
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
21735
|
+
return (hAsync(Host, Object.assign({ key: 'ab48bfcee8f7e3e33847a2f262fdc08b9ea804ca', role: "dialog", "aria-modal": "true", "aria-labelledby": ariaLabelledBy, tabindex: "-1" }, htmlAttributes, { style: {
|
|
21701
21736
|
zIndex: `${40000 + this.overlayIndex}`,
|
|
21702
|
-
}, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), hAsync("ion-backdrop", { key: '
|
|
21737
|
+
}, onIonBackdropTap: this.onBackdropTap, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'loading-translucent': this.translucent }) }), hAsync("ion-backdrop", { key: '41baccc7fb6474389a3a3431c208e829ef738b75', visible: this.showBackdrop, tappable: this.backdropDismiss }), hAsync("div", { key: '7b7290974abbe8db8739b19835aca9f8b5c271c2', tabindex: "0", "aria-hidden": "true" }), hAsync("div", { key: 'e32466abfcc92aaad47ea03b1dcb49f66abe4b63', class: "loading-wrapper ion-overlay-wrapper" }, spinner && (hAsync("div", { key: 'c5e6e6f9e3f39dba0225d08d7dd2c1b96a1d83c7', class: "loading-spinner" }, hAsync("ion-spinner", { key: 'f428038959d879404ea898011363aac0b807ad11', name: spinner, "aria-hidden": "true" }))), message !== undefined && this.renderLoadingMessage(msgId)), hAsync("div", { key: '490e531367b86c319fa4260722dcff4dd631fa88', tabindex: "0", "aria-hidden": "true" })));
|
|
21703
21738
|
}
|
|
21704
21739
|
get el() { return getElement(this); }
|
|
21705
21740
|
static get watchers() { return {
|
|
@@ -25416,6 +25451,10 @@ class Modal {
|
|
|
25416
25451
|
// Also called in dismiss() — intentional dual cleanup covers both
|
|
25417
25452
|
// dismiss-then-remove and direct DOM removal without dismiss.
|
|
25418
25453
|
this.cleanupSafeAreaOverrides();
|
|
25454
|
+
// Clean up aria-hidden if removed without dismiss() being called
|
|
25455
|
+
if (this.presented) {
|
|
25456
|
+
cleanupRootFocusTrapAccessibility();
|
|
25457
|
+
}
|
|
25419
25458
|
}
|
|
25420
25459
|
componentWillLoad() {
|
|
25421
25460
|
var _a;
|
|
@@ -26264,20 +26303,20 @@ class Modal {
|
|
|
26264
26303
|
const isCardModal = presentingElement !== undefined && mode === 'ios';
|
|
26265
26304
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
26266
26305
|
const isSheetModalWithHandle = isSheetModal && showHandle;
|
|
26267
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
26306
|
+
return (hAsync(Host, Object.assign({ key: 'e6df0917ac03a8d6bf67cc9bebf075d2b804ba22', "no-router": true,
|
|
26268
26307
|
// Allow the modal to be navigable when the handle is focusable
|
|
26269
26308
|
tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
|
|
26270
26309
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
26271
|
-
}, 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: '
|
|
26310
|
+
}, 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: '710ed1cbb6ae9c1a1fa7ae774fd44aa3bbee8381', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && hAsync("div", { key: 'c9051fcd099e9b73e17f015dea6e16fbd73e4df4', class: "modal-shadow" }), hAsync("div", Object.assign({ key: '21e42d40099a569d95a4e04aa6d314c7d45c6192',
|
|
26272
26311
|
/*
|
|
26273
26312
|
role and aria-modal must be used on the
|
|
26274
26313
|
same element. They must also be set inside the
|
|
26275
26314
|
shadow DOM otherwise ion-button will not be highlighted
|
|
26276
26315
|
when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
|
|
26277
26316
|
*/
|
|
26278
|
-
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: '
|
|
26317
|
+
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: 'b48a6c32c9a7ebe5e070e8d9f3510d55d4bd1f9f', class: "modal-handle",
|
|
26279
26318
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
26280
|
-
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: '
|
|
26319
|
+
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: '2a20160f66629c14e3414bbe01e5ee89101d02be', onSlotchange: this.onSlotChange }))));
|
|
26281
26320
|
}
|
|
26282
26321
|
get el() { return getElement(this); }
|
|
26283
26322
|
static get watchers() { return {
|
|
@@ -27981,6 +28020,10 @@ class Picker {
|
|
|
27981
28020
|
}
|
|
27982
28021
|
disconnectedCallback() {
|
|
27983
28022
|
this.triggerController.removeClickListener();
|
|
28023
|
+
// Clean up aria-hidden if removed without dismiss() being called
|
|
28024
|
+
if (this.presented) {
|
|
28025
|
+
cleanupRootFocusTrapAccessibility();
|
|
28026
|
+
}
|
|
27984
28027
|
}
|
|
27985
28028
|
componentWillLoad() {
|
|
27986
28029
|
var _a;
|
|
@@ -28099,11 +28142,11 @@ class Picker {
|
|
|
28099
28142
|
render() {
|
|
28100
28143
|
const { htmlAttributes } = this;
|
|
28101
28144
|
const mode = getIonMode$1(this);
|
|
28102
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
28145
|
+
return (hAsync(Host, Object.assign({ key: '4d6531bfff4eb466f897cf2227d51783604ff439', "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
|
|
28103
28146
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
28104
28147
|
}, class: Object.assign({ [mode]: true,
|
|
28105
28148
|
// Used internally for styling
|
|
28106
|
-
[`picker-${mode}`]: true, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }), hAsync("ion-backdrop", { key: '
|
|
28149
|
+
[`picker-${mode}`]: true, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }), hAsync("ion-backdrop", { key: '754a80de29087f7e793b232c4276fc1f6b1c937f', visible: this.showBackdrop, tappable: this.backdropDismiss }), hAsync("div", { key: '9fcffb91109d6082ed338cd37a997254e5ea5bce', tabindex: "0", "aria-hidden": "true" }), hAsync("div", { key: 'de066bda70a9cb831fc88493873d7ebf879122d0', class: "picker-wrapper ion-overlay-wrapper", role: "dialog" }, hAsync("div", { key: '03a502e2e1aa38abd582ecfca60da8b7d1045701', class: "picker-toolbar" }, this.buttons.map((b) => (hAsync("div", { class: buttonWrapperClass(b) }, hAsync("button", { type: "button", onClick: () => this.buttonClick(b), class: buttonClass$1(b) }, b.text))))), hAsync("div", { key: 'f9e4d9eff3c2df866f15eed63f715a51c912eac6', class: "picker-columns" }, hAsync("div", { key: '78656d3265f9d4c82387f942c896a9d67c1fcedf', class: "picker-above-highlight" }), this.presented && this.columns.map((c) => hAsync("ion-picker-legacy-column", { col: c })), hAsync("div", { key: '1afd96cfa38fa9f52f61a867f2aa116a9ef3bedb', class: "picker-below-highlight" }))), hAsync("div", { key: '4d533e132d70f6ab32c461e3e4f6f9dfbe6bab15', tabindex: "0", "aria-hidden": "true" })));
|
|
28107
28150
|
}
|
|
28108
28151
|
get el() { return getElement(this); }
|
|
28109
28152
|
static get watchers() { return {
|
|
@@ -30531,6 +30574,10 @@ class Popover {
|
|
|
30531
30574
|
this.headerResizeObserver.disconnect();
|
|
30532
30575
|
this.headerResizeObserver = undefined;
|
|
30533
30576
|
}
|
|
30577
|
+
// Clean up aria-hidden if removed without dismiss() being called
|
|
30578
|
+
if (this.presented) {
|
|
30579
|
+
cleanupRootFocusTrapAccessibility();
|
|
30580
|
+
}
|
|
30534
30581
|
}
|
|
30535
30582
|
componentWillLoad() {
|
|
30536
30583
|
var _a, _b;
|
|
@@ -30769,9 +30816,9 @@ class Popover {
|
|
|
30769
30816
|
const { onLifecycle, parentPopover, dismissOnSelect, side, arrow, htmlAttributes, focusTrap } = this;
|
|
30770
30817
|
const desktop = isPlatform('desktop');
|
|
30771
30818
|
const enableArrow = arrow && !parentPopover;
|
|
30772
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
30819
|
+
return (hAsync(Host, Object.assign({ key: 'afc292b6b4eeb571c1cd832bc7ac03e0fea3dc28', "aria-modal": "true", "no-router": true, tabindex: "-1" }, htmlAttributes, { style: {
|
|
30773
30820
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
30774
|
-
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && hAsync("ion-backdrop", { key: '
|
|
30821
|
+
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'popover-translucent': this.translucent, 'overlay-hidden': true, 'popover-desktop': desktop, [`popover-side-${side}`]: true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false, 'popover-nested': !!parentPopover }), onIonPopoverDidPresent: onLifecycle, onIonPopoverWillPresent: onLifecycle, onIonPopoverWillDismiss: onLifecycle, onIonPopoverDidDismiss: onLifecycle, onIonBackdropTap: this.onBackdropTap }), !parentPopover && hAsync("ion-backdrop", { key: '301a33645918c7feb807a6fe857e462b83291c40', tappable: this.backdropDismiss, visible: this.showBackdrop, part: "backdrop" }), hAsync("div", { key: 'f66123d36601ce61af3bce3c68c73002fe3a6d73', class: "popover-wrapper ion-overlay-wrapper", onClick: dismissOnSelect ? () => this.dismiss() : undefined }, enableArrow && hAsync("div", { key: '39c92c94d01748d499f2db2513ecf022be2577dd', class: "popover-arrow", part: "arrow" }), hAsync("div", { key: '827552221533f7b5676e6e313cd7517275ea76d7', class: "popover-content", part: "content" }, hAsync("slot", { key: 'f874b8dfb78bfbc02e3bcad104819bf8d181d42f' })))));
|
|
30775
30822
|
}
|
|
30776
30823
|
get el() { return getElement(this); }
|
|
30777
30824
|
static get watchers() { return {
|