@ionic/core 8.4.1-dev.11731700779.1cd68811 → 8.4.1-dev.11731701452.1ff0b38f
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/overlays.js +10 -9
- 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 +1 -1
- 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-b37ff3f3.js → overlays-01d841e0.js} +10 -9
- package/dist/collection/utils/overlays.js +10 -9
- 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 +1 -1
- 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-d76b9e62.js → overlays-f3ea7c9e.js} +10 -9
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
- package/dist/esm-es5/ion-alert.entry.js +1 -1
- package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
- package/dist/esm-es5/ion-loading.entry.js +1 -1
- package/dist/esm-es5/ion-menu_3.entry.js +1 -1
- package/dist/esm-es5/ion-modal.entry.js +1 -1
- package/dist/esm-es5/ion-popover.entry.js +1 -1
- package/dist/esm-es5/ion-select-modal.entry.js +1 -1
- package/dist/esm-es5/ion-select_3.entry.js +1 -1
- package/dist/esm-es5/ion-toast.entry.js +1 -1
- package/dist/esm-es5/{overlays-d76b9e62.js → overlays-f3ea7c9e.js} +1 -1
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-460a7f96.system.entry.js → p-03dedb8f.system.entry.js} +1 -1
- package/dist/ionic/{p-15f6ad13.system.entry.js → p-0b5e5505.system.entry.js} +1 -1
- package/dist/ionic/{p-7f816f9f.js → p-1e411ca9.js} +1 -1
- package/dist/ionic/{p-8f56aaba.system.entry.js → p-1e6a24d2.system.entry.js} +1 -1
- package/dist/ionic/p-322c5fb4.system.js +1 -1
- package/dist/ionic/{p-0fa0bff6.system.js → p-48192417.system.js} +1 -1
- package/dist/ionic/{p-cd7abadd.system.entry.js → p-62c5fc46.system.entry.js} +1 -1
- package/dist/ionic/{p-19d16848.entry.js → p-62d06526.entry.js} +1 -1
- package/dist/ionic/{p-ad5001d7.entry.js → p-6bda8db9.entry.js} +1 -1
- package/dist/ionic/{p-84ebf302.system.entry.js → p-6d0c9821.system.entry.js} +1 -1
- package/dist/ionic/p-7074fc94.system.js +4 -0
- package/dist/ionic/{p-4c28600f.entry.js → p-7aec5604.entry.js} +1 -1
- package/dist/ionic/{p-c93f5847.entry.js → p-879b7c5b.entry.js} +1 -1
- package/dist/ionic/{p-c0dfb2a7.system.entry.js → p-8ac723d6.system.entry.js} +1 -1
- package/dist/ionic/{p-32b7329a.entry.js → p-8c63fe4f.entry.js} +1 -1
- package/dist/ionic/{p-be3caade.system.entry.js → p-a3a86b5b.system.entry.js} +1 -1
- package/dist/ionic/{p-4b0b52da.entry.js → p-aadffb70.entry.js} +1 -1
- package/dist/ionic/{p-e3dfdac3.system.entry.js → p-bea171af.system.entry.js} +1 -1
- package/dist/ionic/{p-203f0419.entry.js → p-c754f571.entry.js} +1 -1
- package/dist/ionic/{p-d042ac5b.entry.js → p-d0192ce0.entry.js} +1 -1
- package/dist/ionic/{p-21214a48.system.entry.js → p-dd8de669.system.entry.js} +1 -1
- package/dist/ionic/{p-f81ebb3d.entry.js → p-e0e33305.entry.js} +1 -1
- package/dist/ionic/{p-b3a52465.entry.js → p-e4f9fd89.entry.js} +1 -1
- package/dist/ionic/{p-01b28cdd.system.entry.js → p-ef661679.system.entry.js} +1 -1
- package/hydrate/index.js +10 -9
- package/hydrate/index.mjs +10 -9
- package/package.json +1 -1
- package/dist/ionic/p-05a51e00.system.js +0 -4
package/hydrate/index.js
CHANGED
|
@@ -5157,7 +5157,7 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
|
|
|
5157
5157
|
* the dismiss animation. This is because the overlay will be removed
|
|
5158
5158
|
* from the DOM after the animation is complete.
|
|
5159
5159
|
*/
|
|
5160
|
-
|
|
5160
|
+
hideAnimatingOverlayFromScreenReaders(overlay.el);
|
|
5161
5161
|
// Overlay contents should not be clickable during dismiss
|
|
5162
5162
|
overlay.el.style.setProperty('pointer-events', 'none');
|
|
5163
5163
|
overlay.willDismiss.emit({ data, role });
|
|
@@ -5405,14 +5405,15 @@ const createTriggerController = () => {
|
|
|
5405
5405
|
*
|
|
5406
5406
|
* @param overlay - The overlay that is being animated.
|
|
5407
5407
|
*/
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5408
|
+
const hideAnimatingOverlayFromScreenReaders = (overlay) => {
|
|
5409
|
+
if (doc === undefined)
|
|
5410
|
+
return;
|
|
5411
|
+
/**
|
|
5412
|
+
* Once the animation is complete, this attribute will be removed.
|
|
5413
|
+
* This is done at the end of the `present` method.
|
|
5414
|
+
*/
|
|
5415
|
+
overlay.setAttribute('aria-hidden', 'true');
|
|
5416
|
+
};
|
|
5416
5417
|
/**
|
|
5417
5418
|
* Ensure that underlying overlays have aria-hidden if necessary so that screen readers
|
|
5418
5419
|
* cannot move focus to these elements. Note that we cannot rely on focus/focusin/focusout
|
package/hydrate/index.mjs
CHANGED
|
@@ -5153,7 +5153,7 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
|
|
|
5153
5153
|
* the dismiss animation. This is because the overlay will be removed
|
|
5154
5154
|
* from the DOM after the animation is complete.
|
|
5155
5155
|
*/
|
|
5156
|
-
|
|
5156
|
+
hideAnimatingOverlayFromScreenReaders(overlay.el);
|
|
5157
5157
|
// Overlay contents should not be clickable during dismiss
|
|
5158
5158
|
overlay.el.style.setProperty('pointer-events', 'none');
|
|
5159
5159
|
overlay.willDismiss.emit({ data, role });
|
|
@@ -5401,14 +5401,15 @@ const createTriggerController = () => {
|
|
|
5401
5401
|
*
|
|
5402
5402
|
* @param overlay - The overlay that is being animated.
|
|
5403
5403
|
*/
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5404
|
+
const hideAnimatingOverlayFromScreenReaders = (overlay) => {
|
|
5405
|
+
if (doc === undefined)
|
|
5406
|
+
return;
|
|
5407
|
+
/**
|
|
5408
|
+
* Once the animation is complete, this attribute will be removed.
|
|
5409
|
+
* This is done at the end of the `present` method.
|
|
5410
|
+
*/
|
|
5411
|
+
overlay.setAttribute('aria-hidden', 'true');
|
|
5412
|
+
};
|
|
5412
5413
|
/**
|
|
5413
5414
|
* Ensure that underlying overlays have aria-hidden if necessary so that screen readers
|
|
5414
5415
|
* cannot move focus to these elements. Note that we cannot rely on focus/focusin/focusout
|
package/package.json
CHANGED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(n,e,r,t){function i(n){return n instanceof r?n:new r((function(e){e(n)}))}return new(r||(r=Promise))((function(r,o){function a(n){try{f(t.next(n))}catch(n){o(n)}}function u(n){try{f(t["throw"](n))}catch(n){o(n)}}function f(n){n.done?r(n.value):i(n.value).then(a,u)}f((t=t.apply(n,e||[])).next())}))};var __generator=this&&this.__generator||function(n,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},t,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(n){return function(e){return f([n,e])}}function f(u){if(t)throw new TypeError("Generator is already executing.");while(a&&(a=0,u[0]&&(r=0)),r)try{if(t=1,i&&(o=u[0]&2?i["return"]:u[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;if(i=0,o)u=[u[0]&2,o.value];switch(u[0]){case 0:case 1:o=u;break;case 4:r.label++;return{value:u[1],done:false};case 5:r.label++;i=u[1];u=[0];continue;case 7:u=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){r.label=u[1];break}if(u[0]===6&&r.label<o[1]){r.label=o[1];o=u;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(u);break}if(o[2])r.ops.pop();r.trys.pop();continue}u=e.call(n,r)}catch(n){u=[6,n];i=0}finally{t=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(n,e,r){if(r||arguments.length===2)for(var t=0,i=e.length,o;t<i;t++){if(o||!(t in e)){if(!o)o=Array.prototype.slice.call(e,0,t);o[t]=e[t]}}return n.concat(o||Array.prototype.slice.call(e))};
|
|
2
|
-
/*!
|
|
3
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/System.register(["./p-792919fd.system.js","./p-3ad285e3.system.js","./p-9f3008d4.system.js","./p-a69b9fc5.system.js","./p-8635f5e6.system.js","./p-20d469d0.system.js","./p-ff4b7e40.system.js"],(function(n){"use strict";var e,r,t,i,o,a,u,f,c,d,v,s,l;return{setters:[function(n){e=n.d},function(n){r=n.f;t=n.c;i=n.a;o=n.b;a=n.g},function(n){u=n.OVERLAY_BACK_BUTTON_PRIORITY;f=n.shouldUseCloseWatcher},function(n){c=n.b;d=n.c},function(n){v=n.C},function(n){s=n.B},function(n){l=n.p}],execute:function(){var h=this;var m='[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-focusable:not([tabindex^="-"]):not([hidden]):not([disabled]), .ion-focusable[disabled="false"]:not([tabindex^="-"]):not([hidden])';var p=n("n",(function(n,e){var r=n.querySelector(m);w(r,e!==null&&e!==void 0?e:n)}));var y=n("q",(function(n,e){var r=Array.from(n.querySelectorAll(m));var t=r.length>0?r[r.length-1]:null;w(t,e!==null&&e!==void 0?e:n)}));var w=function(n,e){var t=n;var i=n===null||n===void 0?void 0:n.shadowRoot;if(i){t=i.querySelector(m)||n}if(t){r(t)}else{e.focus()}};var b=0;var _=0;var g=new WeakMap;var O=function(n){return{create:function(e){return P(n,e)},dismiss:function(e,r,t){return M(document,e,r,n,t)},getTop:function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,V(document,n)]}))}))}}};var k=n("a",O("ion-alert"));var T=n("b",O("ion-action-sheet"));var A=n("l",O("ion-loading"));var x=n("m",O("ion-modal"));var j=n("p",O("ion-picker-legacy"));var S=n("c",O("ion-popover"));var I=n("t",O("ion-toast"));var N=n("j",(function(n){if(typeof document!=="undefined"){G(document)}var e=b++;n.overlayIndex=e}));var D=n("k",(function(n){if(!n.hasAttribute("id")){n.id="ion-overlay-".concat(++_)}return n.id}));var P=function(n,e){if(typeof window!=="undefined"&&typeof window.customElements!=="undefined"){return window.customElements.whenDefined(n).then((function(){var r=document.createElement(n);r.classList.add("overlay-hidden");Object.assign(r,Object.assign(Object.assign({},e),{hasController:true}));J(document).appendChild(r);return new Promise((function(n){return t(r,n)}))}))}return Promise.resolve()};var B=function(n){return n.classList.contains("overlay-hidden")};var C=function(n,e){var t=n;var i=n===null||n===void 0?void 0:n.shadowRoot;if(i){t=i.querySelector(m)||n}if(t){r(t)}else{e.focus()}};var E=function(n,e){var r=V(e,"ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover");var t=n.target;if(!r||!t){return}if(r.classList.contains(an)){return}var i=function(){if(r===t){r.lastFocus=undefined}else if(t.tagName==="ION-TOAST"){C(r.lastFocus,r)}else{var n=a(r);if(!n.contains(t)){return}var i=n.querySelector(".ion-overlay-wrapper");if(!i){return}if(i.contains(t)||t===n.querySelector("ion-backdrop")){r.lastFocus=t}else{var o=r.lastFocus;p(i,r);if(o===e.activeElement){y(i,r)}r.lastFocus=e.activeElement}}};var o=function(){if(r.contains(t)){r.lastFocus=t}else if(t.tagName==="ION-TOAST"){C(r.lastFocus,r)}else{var n=r.lastFocus;p(r);if(n===e.activeElement){y(r)}r.lastFocus=e.activeElement}};if(r.shadowRoot){o()}else{i()}};var G=function(n){if(b===0){b=1;n.addEventListener("focus",(function(e){E(e,n)}),true);n.addEventListener("ionBackButton",(function(e){var r=V(n);if(r===null||r===void 0?void 0:r.backdropDismiss){e.detail.register(u,(function(){r.dismiss(undefined,Z)}))}}));if(!f()){n.addEventListener("keydown",(function(e){if(e.key==="Escape"){var r=V(n);if(r===null||r===void 0?void 0:r.backdropDismiss){r.dismiss(undefined,Z)}}}))}}};var M=function(n,e,r,t,i){var o=V(n,t,i);if(!o){return Promise.reject("overlay does not exist")}return o.dismiss(e,r)};var F=function(n,e){if(e===undefined){e="ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover,ion-toast"}return Array.from(n.querySelectorAll(e)).filter((function(n){return n.overlayIndex>0}))};var L=function(n,e){return F(n,e).filter((function(n){return!B(n)}))};var V=n("o",(function(n,e,r){var t=L(n,e);return r===undefined?t[t.length-1]:t.find((function(n){return n.id===r}))}));var q=function(n){if(n===void 0){n=false}var e=J(document);var r=e.querySelector("ion-router-outlet, ion-nav, #ion-view-container-root");if(!r){return}if(n){r.setAttribute("aria-hidden","true")}else{r.removeAttribute("aria-hidden")}};var z=n("f",(function(n,e,r,t,i){return __awaiter(h,void 0,void 0,(function(){var o,a,u,f,v;return __generator(this,(function(l){switch(l.label){case 0:if(n.presented){return[2]}if(n.el.tagName!=="ION-TOAST"){q(true)}document.body.classList.add(s);tn(n.el);n.presented=true;n.willPresent.emit();(o=n.willPresentShorthand)===null||o===void 0?void 0:o.emit();u=c(n);f=n.enterAnimation?n.enterAnimation:d.get(e,u==="ios"?r:t);return[4,K(n,f,n.el,i)];case 1:v=l.sent();if(v){n.didPresent.emit();(a=n.didPresentShorthand)===null||a===void 0?void 0:a.emit()}if(n.el.tagName!=="ION-TOAST"){W(n.el)}if(n.keyboardClose&&(document.activeElement===null||!n.el.contains(document.activeElement))){n.el.focus()}n.el.removeAttribute("aria-hidden");return[2]}}))}))}));var W=function(n){return __awaiter(h,void 0,void 0,(function(){var e,r;return __generator(this,(function(t){switch(t.label){case 0:e=document.activeElement;if(!e){return[2]}r=e===null||e===void 0?void 0:e.shadowRoot;if(r){e=r.querySelector(m)||e}return[4,n.onDidDismiss()];case 1:t.sent();if(document.activeElement===null||document.activeElement===document.body){e.focus()}return[2]}}))}))};var H=n("g",(function(n,r,t,i,o,a,u){return __awaiter(h,void 0,void 0,(function(){var f,v,l,h,m,p,y,w;return __generator(this,(function(b){switch(b.label){case 0:if(!n.presented){return[2,false]}l=e!==undefined?L(e).filter((function(n){return n.tagName!=="ION-TOAST"})):[];h=l.length===1&&l[0].id===n.el.id;if(h){q(false);document.body.classList.remove(s)}n.presented=false;b.label=1;case 1:b.trys.push([1,4,,5]);n.el.style.setProperty("pointer-events","none");n.willDismiss.emit({data:r,role:t});(f=n.willDismissShorthand)===null||f===void 0?void 0:f.emit({data:r,role:t});m=c(n);p=n.leaveAnimation?n.leaveAnimation:d.get(i,m==="ios"?o:a);if(!(t!==$))return[3,3];return[4,K(n,p,n.el,u)];case 2:b.sent();b.label=3;case 3:n.didDismiss.emit({data:r,role:t});(v=n.didDismissShorthand)===null||v===void 0?void 0:v.emit({data:r,role:t});y=g.get(n)||[];y.forEach((function(n){return n.destroy()}));g.delete(n);n.el.classList.add("overlay-hidden");n.el.style.removeProperty("pointer-events");if(n.el.lastFocus!==undefined){n.el.lastFocus=undefined}return[3,5];case 4:w=b.sent();console.error(w);return[3,5];case 5:n.el.remove();on();return[2,true]}}))}))}));var J=function(n){return n.querySelector("ion-app")||n.body};var K=function(n,e,r,t){return __awaiter(h,void 0,void 0,(function(){var i,o,a;return __generator(this,(function(u){switch(u.label){case 0:r.classList.remove("overlay-hidden");i=n.el;o=e(i,t);if(!n.animated||!d.getBoolean("animated",true)){o.duration(0)}if(n.keyboardClose){o.beforeAddWrite((function(){var n=r.ownerDocument.activeElement;if(n===null||n===void 0?void 0:n.matches("input,ion-input, ion-textarea")){n.blur()}}))}a=g.get(n)||[];g.set(n,__spreadArray(__spreadArray([],a,true),[o],false));return[4,o.play()];case 1:u.sent();return[2,true]}}))}))};var Q=n("h",(function(n,e){var r;var t=new Promise((function(n){return r=n}));R(n,e,(function(n){r(n.detail)}));return t}));var R=function(n,e,r){var t=function(i){o(n,e,t);r(i)};i(n,e,t)};var U=n("i",(function(n){return n==="cancel"||n===Z}));var X=function(n){return n()};var Y=n("s",(function(n,e){if(typeof n==="function"){var r=d.get("_zoneGate",X);return r((function(){try{return n(e)}catch(n){throw n}}))}return undefined}));var Z=n("B","backdrop");var $=n("G","gesture");var nn=n("O",39);var en=n("d",(function(n){var e=false;var r;var t=v();var i=function(i){if(i===void 0){i=false}if(r&&!i){return{delegate:r,inline:e}}var o=n.el,a=n.hasController,u=n.delegate;var f=o.parentNode;e=f!==null&&!a;r=e?u||t:u;return{inline:e,delegate:r}};var o=function(e){return __awaiter(h,void 0,void 0,(function(){var r,t;return __generator(this,(function(o){switch(o.label){case 0:r=i(true).delegate;if(!r)return[3,2];return[4,r.attachViewToDom(n.el,e)];case 1:return[2,o.sent()];case 2:t=n.hasController;if(t&&e!==undefined){throw new Error("framework delegate is missing")}return[2,null]}}))}))};var a=function(){var e=i().delegate;if(e&&n.el!==undefined){e.removeViewFromDom(n.el.parentElement,n.el)}};return{attachViewToDom:o,removeViewFromDom:a}}));var rn=n("e",(function(){var n;var e=function(){if(n){n();n=undefined}};var r=function(r,t){e();var i=t!==undefined?document.getElementById(t):null;if(!i){l('A trigger element with the ID "'.concat(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.'),r);return}var o=function(n,e){var r=function(){e.present()};n.addEventListener("click",r);return function(){n.removeEventListener("click",r)}};n=o(i,r)};return{addClickListener:r,removeClickListener:e}}));var tn=function(n){var r;if(e===undefined)return;var t=L(e);for(var i=t.length-1;i>=0;i--){var o=t[i];var a=(r=t[i+1])!==null&&r!==void 0?r:n;if(a.hasAttribute("aria-hidden")||a.tagName!=="ION-TOAST"){o.setAttribute("aria-hidden","true")}}};var on=function(){if(e===undefined)return;var n=L(e);for(var r=n.length-1;r>=0;r--){var t=n[r];t.removeAttribute("aria-hidden");if(t.tagName!=="ION-TOAST"){break}}};var an=n("F","ion-disable-focus-trap")}}}));
|