@ionic/core 8.8.13 → 8.8.14-dev.11783455203.1cbca643
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-nQi4oKcG.js → p-BI99_O7M.js} +1 -1
- package/components/{p-DS4Hk6R2.js → p-BeaZQGdD.js} +1 -1
- package/components/p-BhiHTRHr.js +4 -0
- package/components/{p-Bth-EzJ0.js → p-Cg0yUncF.js} +1 -1
- package/components/{p-dhLYXa7A.js → p-CiZjmDRO.js} +1 -1
- package/components/{p-0NRupjzW.js → p-CoDFQCkp.js} +1 -1
- package/components/{p-uVRyUM3z.js → p-DfAYowgb.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/ion-action-sheet.cjs.entry.js +1 -1
- package/dist/cjs/ion-alert.cjs.entry.js +1 -1
- package/dist/cjs/ion-datetime_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-loading.cjs.entry.js +1 -1
- package/dist/cjs/ion-menu_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-modal.cjs.entry.js +16 -4
- package/dist/cjs/ion-popover.cjs.entry.js +1 -1
- 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-TbKsuC-K.js → overlays-B9WEMRRo.js} +26 -1
- package/dist/collection/components/modal/modal.js +15 -3
- package/dist/collection/utils/overlays.js +26 -1
- package/dist/docs.json +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/ion-action-sheet.entry.js +1 -1
- package/dist/esm/ion-alert.entry.js +1 -1
- package/dist/esm/ion-datetime_3.entry.js +1 -1
- package/dist/esm/ion-loading.entry.js +1 -1
- package/dist/esm/ion-menu_3.entry.js +1 -1
- package/dist/esm/ion-modal.entry.js +16 -4
- package/dist/esm/ion-popover.entry.js +1 -1
- 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-TbiM4mdr.js → overlays--4JLDr6C.js} +27 -2
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-3a541154.entry.js → p-28df2088.entry.js} +1 -1
- package/dist/ionic/{p-b1c6fdcf.entry.js → p-57e31cc8.entry.js} +1 -1
- package/dist/ionic/{p-e847a888.entry.js → p-766bbdff.entry.js} +1 -1
- package/dist/ionic/{p-00dbb17e.entry.js → p-8b4e6e7f.entry.js} +1 -1
- package/dist/ionic/p-Dzyqeklk.js +4 -0
- package/dist/ionic/{p-94f2a736.entry.js → p-a6ad9c29.entry.js} +1 -1
- package/dist/ionic/{p-5fc7e542.entry.js → p-aa56131f.entry.js} +1 -1
- package/dist/ionic/{p-aa5d6b8f.entry.js → p-b580c366.entry.js} +1 -1
- package/dist/ionic/{p-30bf9737.entry.js → p-badb48f9.entry.js} +1 -1
- package/dist/ionic/{p-2f55dc1a.entry.js → p-c8739c33.entry.js} +1 -1
- package/dist/ionic/{p-4dc1c33c.entry.js → p-e930122a.entry.js} +1 -1
- package/hydrate/index.js +41 -4
- package/hydrate/index.mjs +41 -4
- package/package.json +1 -1
- package/components/p-W9CZ2mWX.js +0 -4
- package/dist/ionic/p-xOfi7-Zn.js +0 -4
package/dist/ionic/p-xOfi7-Zn.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{d as n}from"./p-ZjP4CjeZ.js";import{n as o,c as e,f as t,m as i,g as a}from"./p-DIuEbVLu.js";import{OVERLAY_BACK_BUTTON_PRIORITY as r,shouldUseCloseWatcher as s}from"./p-BUFIpxKM.js";import{e as d,j as l,f as c}from"./p-tcQvqkiX.js";import{b as u}from"./p-Nqf6uvGh.js";import{C as m}from"./p-CFlfIb2g.js";import{B as p}from"./p-BTEOs1at.js";const v='[tabindex]:not([tabindex^="-"]):not([hidden]):not([disabled]), input:not([type=hidden]):not([tabindex^="-"]):not([hidden]):not([disabled]), textarea:not([tabindex^="-"]):not([hidden]):not([disabled]), button:not([tabindex^="-"]):not([hidden]):not([disabled]), select:not([tabindex^="-"]):not([hidden]):not([disabled]), ion-checkbox:not([tabindex^="-"]):not([hidden]):not([disabled]), ion-radio:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable[disabled="false"]:not([tabindex^="-"]):not([hidden])',f=(n,o)=>{const e=n.querySelector(v);b(e,null!=o?o:n)},h=(n,o)=>{const e=Array.from(n.querySelectorAll(v));b(e.length>0?e[e.length-1]:null,null!=o?o:n)},b=(n,e)=>{let t=n;const i=null==n?void 0:n.shadowRoot;if(i&&(t=i.querySelector(v)||n),t){const n=t.closest("ion-radio-group");n?n.setFocus():o(t)}else e.focus()};let w=0,y=0;const g=new WeakMap,O=n=>{var o;return!1!==n.showBackdrop&&!((null!==(o=n.backdropBreakpoint)&&void 0!==o?o:0)>0)},k=n=>({create:o=>S(n,o),dismiss:(o,e,t)=>F(document,o,e,n,t),getTop:async()=>q(document,n)}),x=k("ion-alert"),T=k("ion-action-sheet"),j=k("ion-loading"),I=k("ion-modal"),A=k("ion-picker-legacy"),C=k("ion-popover"),N=k("ion-toast"),B=n=>{"undefined"!=typeof document&&E(document);const o=w++;n.overlayIndex=o},D=n=>(n.hasAttribute("id")||(n.id="ion-overlay-"+ ++y),n.id),S=(n,o)=>"undefined"!=typeof window&&void 0!==window.customElements?window.customElements.whenDefined(n).then((()=>{const t=document.createElement(n);return t.classList.add("overlay-hidden"),Object.assign(t,Object.assign(Object.assign({},o),{hasController:!0})),Z(document).appendChild(t),new Promise((n=>e(t,n)))})):Promise.resolve(),P=(n,e)=>{let t=n;const i=null==n?void 0:n.shadowRoot;i&&(t=i.querySelector(v)||n),t?o(t):e.focus()},E=n=>{0===w&&(w=1,n.addEventListener("focus",(o=>{((n,o)=>{const e=q(o,"ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover"),t=n.target;e&&t&&(e.classList.contains(nn)||(e.shadowRoot?(()=>{if(e.contains(t))e.lastFocus=t;else if("ION-TOAST"===t.tagName)P(e.lastFocus,e);else{const n=e.lastFocus;f(e),n===o.activeElement&&h(e),e.lastFocus=o.activeElement}})():(()=>{if(e===t)e.lastFocus=void 0;else if("ION-TOAST"===t.tagName)P(e.lastFocus,e);else{const n=a(e);if(!n.contains(t))return;const i=n.querySelector(".ion-overlay-wrapper");if(!i)return;if(i.contains(t)||t===n.querySelector("ion-backdrop"))e.lastFocus=t;else{const n=e.lastFocus;f(i,e),n===o.activeElement&&h(i,e),e.lastFocus=o.activeElement}}})()))})(o,n)}),!0),n.addEventListener("ionBackButton",(o=>{const e=q(n);(null==e?void 0:e.backdropDismiss)&&o.detail.register(r,(()=>{e.dismiss(void 0,_)}))})),s()||n.addEventListener("keydown",(o=>{if("Escape"===o.key){const o=q(n);(null==o?void 0:o.backdropDismiss)&&o.dismiss(void 0,_)}})))},F=(n,o,e,t,i)=>{const a=q(n,t,i);return a?a.dismiss(o,e):Promise.reject("overlay does not exist")},M=(n,o)=>((n,o)=>(void 0===o&&(o="ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover,ion-toast"),Array.from(n.querySelectorAll(o)).filter((n=>n.overlayIndex>0))))(n,o).filter((n=>!n.classList.contains("overlay-hidden"))),q=(n,o,e)=>{const t=M(n,o);return(void 0===e?t:t.filter((n=>n.id===e))).slice(-1)[0]},G=(n=!1)=>{const o=Z(document).querySelector("ion-router-outlet, #ion-view-container-root");o&&(n?o.setAttribute("aria-hidden","true"):o.removeAttribute("aria-hidden"))},L=async(n,o,e,t,i)=>{var a,r;if(n.presented)return;"ION-TOAST"!==n.el.tagName&&V(n.el);const s=n.el,l="ION-TOAST"!==s.tagName&&!1!==s.focusTrap&&O(s);if(n.presented=!0,n.willPresent.emit(),l){const n=Z(document).querySelector("ion-router-outlet, #ion-view-container-root");!!n&&n.contains(s)||G(!0),document.body.classList.add(p)}null===(a=n.willPresentShorthand)||void 0===a||a.emit();const c=u(n),m=n.enterAnimation?n.enterAnimation:d.get(o,"ios"===c?e:t);await z(n,m,n.el,i)&&(n.didPresent.emit(),null===(r=n.didPresentShorthand)||void 0===r||r.emit()),!n.keyboardClose||null!==document.activeElement&&n.el.contains(document.activeElement)||n.el.focus(),n.el.removeAttribute("aria-hidden"),n.el.removeAttribute("inert")},V=async n=>{let o=document.activeElement;if(!o)return;o.blur();const e=null==o?void 0:o.shadowRoot;e&&(o=e.querySelector(v)||o),await n.onDidDismiss(),null!==document.activeElement&&document.activeElement!==document.body||o.focus()},$=async(o,e,t,i,a,r,s)=>{var c,m;if(!o.presented)return!1;const v=(void 0!==n?M(n):[]).filter((n=>"ION-TOAST"!==n.tagName&&!1!==n.focusTrap&&O(n))),f=o.el;"ION-TOAST"!==f.tagName&&!1!==f.focusTrap&&O(f)&&1===v.length&&v[0].id===f.id&&(G(!1),document.body.classList.remove(p)),o.presented=!1;try{o.el.style.setProperty("pointer-events","none"),o.willDismiss.emit({data:e,role:t}),null===(c=o.willDismissShorthand)||void 0===c||c.emit({data:e,role:t});const n=u(o),l=o.leaveAnimation?o.leaveAnimation:d.get(i,"ios"===n?a:r);t!==H&&await z(o,l,o.el,s),o.didDismiss.emit({data:e,role:t}),null===(m=o.didDismissShorthand)||void 0===m||m.emit({data:e,role:t}),(g.get(o)||[]).forEach((n=>n.destroy())),g.delete(o),o.el.classList.add("overlay-hidden"),o.el.style.removeProperty("pointer-events"),void 0!==o.el.lastFocus&&(o.el.lastFocus=void 0)}catch(n){l(`[${o.el.tagName.toLowerCase()}] - `,n)}return o.el.remove(),!0},Z=n=>n.querySelector("ion-app")||n.body,z=async(n,o,e,t)=>{e.classList.remove("overlay-hidden");const i=o(n.el,t);n.animated&&d.getBoolean("animated",!0)||i.duration(0),n.keyboardClose&&i.beforeAddWrite((()=>{const n=e.ownerDocument.activeElement;(null==n?void 0:n.matches("input,ion-input, ion-textarea"))&&n.blur()}));const a=g.get(n)||[];return g.set(n,[...a,i]),await i.play(),!0},K=(n,o)=>{let e;const t=new Promise((n=>e=n));return Q(n,o,(n=>{e(n.detail)})),t},Q=(n,o,e)=>{const a=t=>{i(n,o,a),e(t)};t(n,o,a)},U=n=>"cancel"===n||n===_,W=n=>n(),X=(n,o)=>{if("function"==typeof n)return d.get("_zoneGate",W)((()=>{try{return n(o)}catch(n){throw n}}))},_="backdrop",H="gesture",J=39,R=n=>{let o,e=!1;const t=m(),i=(i=!1)=>{if(o&&!i)return{delegate:o,inline:e};const{el:a,hasController:r,delegate:s}=n;return e=null!==a.parentNode&&!r,o=e?s||t:s,{inline:e,delegate:o}};return{attachViewToDom:async o=>{const{delegate:e}=i(!0);if(e)return await e.attachViewToDom(n.el,o);const{hasController:t}=n;if(t&&void 0!==o)throw new Error("framework delegate is missing");return null},removeViewFromDom:()=>{const{delegate:o}=i();o&&void 0!==n.el&&o.removeViewFromDom(n.el.parentElement,n.el)}}},Y=()=>{let n;const o=()=>{n&&(n(),n=void 0)};return{addClickListener:(e,t)=>{o();const i=void 0!==t?document.getElementById(t):null;i?n=((n,o)=>{const e=()=>{o.present()};return n.addEventListener("click",e),()=>{n.removeEventListener("click",e)}})(i,e):c(`[${e.tagName.toLowerCase()}] - A trigger element with the ID "${t}" was not found in the DOM. The trigger element must be in the DOM when the "trigger" property is set on an overlay component.`,e)},removeClickListener:o}},nn="ion-disable-focus-trap";export{_ as B,nn as F,H as G,J as O,x as a,T as b,C as c,R as d,Y as e,L as f,$ as g,K as h,U as i,B as j,D as k,j as l,I as m,f as n,q as o,A as p,h as q,X as s,N as t}
|