@ionic/core 8.4.1-dev.11732646949.1aaebad5 → 8.4.1-dev.11732659747.1ad7a02d
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 +6 -1
- package/dist/cjs/{focus-visible-2578eb30.js → focus-visible-bd87158a.js} +6 -1
- 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 +6 -1
- package/dist/docs.json +1 -1
- package/dist/esm/{focus-visible-ab389174.js → focus-visible-e39af5f9.js} +6 -1
- 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-e39af5f9.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-14f084bc.system.entry.js → p-2cefd602.system.entry.js} +1 -1
- package/dist/ionic/p-322c5fb4.system.js +1 -1
- package/dist/ionic/p-34ad1b32.system.js +4 -0
- package/dist/ionic/{p-2b65e30a.system.entry.js → p-38dca6ff.system.entry.js} +1 -1
- package/dist/ionic/{p-0af1adf2.entry.js → p-5bdfc2d3.entry.js} +1 -1
- package/dist/ionic/{p-bbae699e.entry.js → p-b0889020.entry.js} +1 -1
- package/dist/ionic/p-b203d729.js +4 -0
- package/hydrate/index.js +6 -1
- package/hydrate/index.mjs +6 -1
- package/package.json +1 -1
- package/dist/esm-es5/focus-visible-ab389174.js +0 -4
- package/dist/ionic/p-05efd326.system.js +0 -4
- package/dist/ionic/p-f4f05cb7.js +0 -4
package/hydrate/index.js
CHANGED
|
@@ -9227,17 +9227,22 @@ const startFocusVisible = (rootEl) => {
|
|
|
9227
9227
|
elements.forEach((el) => el.classList.add(ION_FOCUSED));
|
|
9228
9228
|
currentFocus = elements;
|
|
9229
9229
|
};
|
|
9230
|
-
|
|
9230
|
+
// SPACE triggers on iOS device with physical keyboard
|
|
9231
|
+
const pointerDown = (ev) => {
|
|
9232
|
+
console.log('pointerDown', ev);
|
|
9231
9233
|
keyboardMode = false;
|
|
9232
9234
|
setFocus([]);
|
|
9233
9235
|
};
|
|
9236
|
+
// Enter triggers on iOS device with physical keyboard
|
|
9234
9237
|
const onKeydown = (ev) => {
|
|
9238
|
+
console.log('onKeydown', ev);
|
|
9235
9239
|
keyboardMode = FOCUS_KEYS.includes(ev.key);
|
|
9236
9240
|
if (!keyboardMode) {
|
|
9237
9241
|
setFocus([]);
|
|
9238
9242
|
}
|
|
9239
9243
|
};
|
|
9240
9244
|
const onFocusin = (ev) => {
|
|
9245
|
+
console.log('onFocusin', ev);
|
|
9241
9246
|
if (keyboardMode && ev.composedPath !== undefined) {
|
|
9242
9247
|
const toFocus = ev.composedPath().filter((el) => {
|
|
9243
9248
|
// TODO(FW-2832): type
|
package/hydrate/index.mjs
CHANGED
|
@@ -9223,17 +9223,22 @@ const startFocusVisible = (rootEl) => {
|
|
|
9223
9223
|
elements.forEach((el) => el.classList.add(ION_FOCUSED));
|
|
9224
9224
|
currentFocus = elements;
|
|
9225
9225
|
};
|
|
9226
|
-
|
|
9226
|
+
// SPACE triggers on iOS device with physical keyboard
|
|
9227
|
+
const pointerDown = (ev) => {
|
|
9228
|
+
console.log('pointerDown', ev);
|
|
9227
9229
|
keyboardMode = false;
|
|
9228
9230
|
setFocus([]);
|
|
9229
9231
|
};
|
|
9232
|
+
// Enter triggers on iOS device with physical keyboard
|
|
9230
9233
|
const onKeydown = (ev) => {
|
|
9234
|
+
console.log('onKeydown', ev);
|
|
9231
9235
|
keyboardMode = FOCUS_KEYS.includes(ev.key);
|
|
9232
9236
|
if (!keyboardMode) {
|
|
9233
9237
|
setFocus([]);
|
|
9234
9238
|
}
|
|
9235
9239
|
};
|
|
9236
9240
|
const onFocusin = (ev) => {
|
|
9241
|
+
console.log('onFocusin', ev);
|
|
9237
9242
|
if (keyboardMode && ev.composedPath !== undefined) {
|
|
9238
9243
|
const toFocus = ev.composedPath().filter((el) => {
|
|
9239
9244
|
// TODO(FW-2832): type
|
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(r){var o=[];var n=true;var t=r?r.shadowRoot:document;var u=r?r:document.body;var e=function(r){o.forEach((function(r){return r.classList.remove(ION_FOCUSED)}));r.forEach((function(r){return r.classList.add(ION_FOCUSED)}));o=r};var a=function(){n=false;e([])};var i=function(r){n=FOCUS_KEYS.includes(r.key);if(!n){e([])}};var c=function(r){if(n&&r.composedPath!==undefined){var o=r.composedPath().filter((function(r){if(r.classList){return r.classList.contains(ION_FOCUSABLE)}return false}));e(o)}n=true};var f=function(){if(t.activeElement===u){e([])}};t.addEventListener("keydown",i);t.addEventListener("focusin",c);t.addEventListener("focusout",f);t.addEventListener("touchstart",a,{passive:true});t.addEventListener("mousedown",a);var s=function(){t.removeEventListener("keydown",i);t.removeEventListener("focusin",c);t.removeEventListener("focusout",f);t.removeEventListener("touchstart",a);t.removeEventListener("mousedown",a)};return{destroy:s,setFocus:e}};export{startFocusVisible};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
System.register([],(function(n){"use strict";return{execute:function(){var r="ion-focused";var t="ion-focusable";var o=["Tab","ArrowDown","Space","Escape"," ","Shift","Enter","ArrowLeft","ArrowRight","ArrowUp","Home","End","Meta"];var u=n("startFocusVisible",(function(n){var u=[];var e=true;var c=n?n.shadowRoot:document;var f=n?n:document.body;var i=function(n){u.forEach((function(n){return n.classList.remove(r)}));n.forEach((function(n){return n.classList.add(r)}));u=n};var a=function(){e=false;i([])};var s=function(n){e=o.includes(n.key);if(!e){i([])}};var v=function(n){if(e&&n.composedPath!==undefined){var r=n.composedPath().filter((function(n){if(n.classList){return n.classList.contains(t)}return false}));i(r)}e=true};var d=function(){if(c.activeElement===f){i([])}};c.addEventListener("keydown",s);c.addEventListener("focusin",v);c.addEventListener("focusout",d);c.addEventListener("touchstart",a,{passive:true});c.addEventListener("mousedown",a);var w=function(){c.removeEventListener("keydown",s);c.removeEventListener("focusin",v);c.removeEventListener("focusout",d);c.removeEventListener("touchstart",a);c.removeEventListener("mousedown",a)};return{destroy:w,setFocus:i}}))}}}));
|
package/dist/ionic/p-f4f05cb7.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
const o="ion-focused",t=["Tab","ArrowDown","Space","Escape"," ","Shift","Enter","ArrowLeft","ArrowRight","ArrowUp","Home","End","Meta"],e=e=>{let s=[],n=!0;const c=e?e.shadowRoot:document,u=e||document.body,r=t=>{s.forEach((t=>t.classList.remove(o))),t.forEach((t=>t.classList.add(o))),s=t},d=()=>{n=!1,r([])},f=o=>{n=t.includes(o.key),n||r([])},i=o=>{if(n&&void 0!==o.composedPath){const t=o.composedPath().filter((o=>!!o.classList&&o.classList.contains("ion-focusable")));r(t)}n=!0},w=()=>{c.activeElement===u&&r([])};return c.addEventListener("keydown",f),c.addEventListener("focusin",i),c.addEventListener("focusout",w),c.addEventListener("touchstart",d,{passive:!0}),c.addEventListener("mousedown",d),{destroy:()=>{c.removeEventListener("keydown",f),c.removeEventListener("focusin",i),c.removeEventListener("focusout",w),c.removeEventListener("touchstart",d),c.removeEventListener("mousedown",d)},setFocus:r}};export{e as startFocusVisible}
|