@ionic/core 8.4.1-dev.11732742404.1e7b5304 → 8.4.1-dev.11732743645.19f772f4
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/focus-visible.js +5 -2
- package/dist/cjs/{focus-visible-7d92839c.js → focus-visible-3343ff50.js} +5 -2
- package/dist/cjs/ion-app_8.cjs.entry.js +1 -1
- package/dist/cjs/ion-datetime_3.cjs.entry.js +1 -1
- package/dist/collection/utils/focus-visible.js +5 -2
- package/dist/docs.json +1 -1
- package/dist/esm/{focus-visible-afc162a2.js → focus-visible-f7c5f751.js} +5 -2
- package/dist/esm/ion-app_8.entry.js +1 -1
- package/dist/esm/ion-datetime_3.entry.js +1 -1
- package/dist/esm-es5/focus-visible-f7c5f751.js +4 -0
- package/dist/esm-es5/ion-app_8.entry.js +1 -1
- package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-277d238e.system.js +4 -0
- package/dist/ionic/p-322c5fb4.system.js +1 -1
- package/dist/ionic/p-4f3b31e0.js +4 -0
- package/dist/ionic/{p-209998f6.system.entry.js → p-600d0057.system.entry.js} +1 -1
- package/dist/ionic/{p-d23b6318.system.entry.js → p-8f397636.system.entry.js} +1 -1
- package/dist/ionic/{p-5abdb94a.entry.js → p-d191d18f.entry.js} +1 -1
- package/dist/ionic/{p-35abc488.entry.js → p-f64ce438.entry.js} +1 -1
- package/hydrate/index.js +5 -2
- package/hydrate/index.mjs +5 -2
- package/package.json +1 -1
- package/dist/esm-es5/focus-visible-afc162a2.js +0 -4
- package/dist/ionic/p-5cef5997.js +0 -4
- package/dist/ionic/p-5d2e1b65.system.js +0 -4
package/hydrate/index.mjs
CHANGED
|
@@ -9240,8 +9240,9 @@ const startFocusVisible = (rootEl) => {
|
|
|
9240
9240
|
};
|
|
9241
9241
|
const onFocusin = (ev) => {
|
|
9242
9242
|
console.log('onFocusin', ev);
|
|
9243
|
+
let toFocus = [];
|
|
9243
9244
|
if (keyboardMode && ev.composedPath !== undefined) {
|
|
9244
|
-
|
|
9245
|
+
toFocus = ev.composedPath().filter((el) => {
|
|
9245
9246
|
// TODO(FW-2832): type
|
|
9246
9247
|
if (el.classList) {
|
|
9247
9248
|
return el.classList.contains(ION_FOCUSABLE);
|
|
@@ -9250,7 +9251,9 @@ const startFocusVisible = (rootEl) => {
|
|
|
9250
9251
|
});
|
|
9251
9252
|
setFocus(toFocus);
|
|
9252
9253
|
}
|
|
9253
|
-
|
|
9254
|
+
if (toFocus.length > 0) {
|
|
9255
|
+
keyboardMode = true;
|
|
9256
|
+
}
|
|
9254
9257
|
};
|
|
9255
9258
|
const onFocusout = () => {
|
|
9256
9259
|
console.log('onFocusout');
|
package/package.json
CHANGED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
var ION_FOCUSED="ion-focused";var ION_FOCUSABLE="ion-focusable";var FOCUS_KEYS=["Tab","ArrowDown","Space","Escape"," ","Shift","Enter","ArrowLeft","ArrowRight","ArrowUp","Home","End","Meta"];var startFocusVisible=function(o){var n=[];var r=true;var t=o?o.shadowRoot:document;var e=o?o:document.body;var u=function(o){console.log("setFocus",o,n);n.forEach((function(o){return o.classList.remove(ION_FOCUSED)}));o.forEach((function(o){return o.classList.add(ION_FOCUSED)}));n=o};var c=function(o){console.log("pointerDown",o);r=false;u([])};var s=function(o){console.log("onKeydown",o);r=FOCUS_KEYS.includes(o.key);if(!r){u([])}};var i=function(o){console.log("onFocusin",o);if(r&&o.composedPath!==undefined){var n=o.composedPath().filter((function(o){if(o.classList){return o.classList.contains(ION_FOCUSABLE)}return false}));u(n)}r=true};var a=function(){console.log("onFocusout");if(t.activeElement===e){u([])}};t.addEventListener("keydown",s);t.addEventListener("focusin",i);t.addEventListener("focusout",a);t.addEventListener("touchstart",c,{passive:true});t.addEventListener("mousedown",c);var f=function(){t.removeEventListener("keydown",s);t.removeEventListener("focusin",i);t.removeEventListener("focusout",a);t.removeEventListener("touchstart",c);t.removeEventListener("mousedown",c)};return{destroy:f,setFocus:u}};export{startFocusVisible};
|
package/dist/ionic/p-5cef5997.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
const o="ion-focused",n=["Tab","ArrowDown","Space","Escape"," ","Shift","Enter","ArrowLeft","ArrowRight","ArrowUp","Home","End","Meta"],e=e=>{let s=[],t=!0;const c=e?e.shadowRoot:document,u=e||document.body,r=n=>{console.log("setFocus",n,s),s.forEach((n=>n.classList.remove(o))),n.forEach((n=>n.classList.add(o))),s=n},d=o=>{console.log("pointerDown",o),t=!1,r([])},i=o=>{console.log("onKeydown",o),t=n.includes(o.key),t||r([])},w=o=>{if(console.log("onFocusin",o),t&&void 0!==o.composedPath){const n=o.composedPath().filter((o=>!!o.classList&&o.classList.contains("ion-focusable")));r(n)}t=!0},f=()=>{console.log("onFocusout"),c.activeElement===u&&r([])};return c.addEventListener("keydown",i),c.addEventListener("focusin",w),c.addEventListener("focusout",f),c.addEventListener("touchstart",d,{passive:!0}),c.addEventListener("mousedown",d),{destroy:()=>{c.removeEventListener("keydown",i),c.removeEventListener("focusin",w),c.removeEventListener("focusout",f),c.removeEventListener("touchstart",d),c.removeEventListener("mousedown",d)},setFocus:r}};export{e as startFocusVisible}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
System.register([],(function(o){"use strict";return{execute:function(){var n="ion-focused";var t="ion-focusable";var r=["Tab","ArrowDown","Space","Escape"," ","Shift","Enter","ArrowLeft","ArrowRight","ArrowUp","Home","End","Meta"];var e=o("startFocusVisible",(function(o){var e=[];var u=true;var c=o?o.shadowRoot:document;var s=o?o:document.body;var i=function(o){console.log("setFocus",o,e);e.forEach((function(o){return o.classList.remove(n)}));o.forEach((function(o){return o.classList.add(n)}));e=o};var f=function(o){console.log("pointerDown",o);u=false;i([])};var a=function(o){console.log("onKeydown",o);u=r.includes(o.key);if(!u){i([])}};var v=function(o){console.log("onFocusin",o);if(u&&o.composedPath!==undefined){var n=o.composedPath().filter((function(o){if(o.classList){return o.classList.contains(t)}return false}));i(n)}u=true};var d=function(){console.log("onFocusout");if(c.activeElement===s){i([])}};c.addEventListener("keydown",a);c.addEventListener("focusin",v);c.addEventListener("focusout",d);c.addEventListener("touchstart",f,{passive:true});c.addEventListener("mousedown",f);var w=function(){c.removeEventListener("keydown",a);c.removeEventListener("focusin",v);c.removeEventListener("focusout",d);c.removeEventListener("touchstart",f);c.removeEventListener("mousedown",f)};return{destroy:w,setFocus:i}}))}}}));
|