@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/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
- const pointerDown = () => {
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
- const pointerDown = () => {
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@ionic/core",
3
- "version": "8.4.1-dev.11732646949.1aaebad5",
3
+ "version": "8.4.1-dev.11732659747.1ad7a02d",
4
4
  "description": "Base components for Ionic",
5
5
  "keywords": [
6
6
  "ionic",
@@ -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}}))}}}));
@@ -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}