@telia-ace/widget-components-tab-stop 1.3.26-rc.0 → 1.3.26-rc.1

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/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";const t=require("@telia-ace/widget-ui"),o=e=>t.createReactComponent(e,"tab-stop",Promise.resolve().then(()=>require("./tab-stop-0c61b1b8.js")));module.exports=o;
1
+ "use strict";const t=require("@telia-ace/widget-ui"),o=e=>t.createReactComponent(e,"tab-stop",Promise.resolve().then(()=>require("./tab-stop-7db5c970.js")));module.exports=o;
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createReactComponent as o } from "@telia-ace/widget-ui";
2
- const p = (t) => o(t, "tab-stop", import("./tab-stop-bfd62a90.mjs"));
2
+ const p = (t) => o(t, "tab-stop", import("./tab-stop-d7ffaa68.mjs"));
3
3
  export {
4
4
  p as default
5
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-components-tab-stop",
3
- "version": "1.3.26-rc.0",
3
+ "version": "1.3.26-rc.1",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -10,9 +10,9 @@
10
10
  }
11
11
  },
12
12
  "dependencies": {
13
- "@telia-ace/widget-core": "^1.3.26-rc.0",
14
- "@telia-ace/widget-ui": "^1.3.26-rc.0",
15
- "@telia-ace/widget-utilities": "^1.3.26-rc.0",
13
+ "@telia-ace/widget-core": "^1.3.26-rc.1",
14
+ "@telia-ace/widget-ui": "^1.3.26-rc.1",
15
+ "@telia-ace/widget-utilities": "^1.3.26-rc.1",
16
16
  "@webprovisions/platform": "^1.1.4"
17
17
  },
18
18
  "peerDependencies": {
@@ -0,0 +1,4 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),y=require("@emotion/styled"),f=require("@telia-ace/widget-ui"),w=require("@telia-ace/widget-utilities"),n=require("react"),x=({className:l,...p})=>{const e=n.useRef(),u=f.useContainer(),{position:r="end"}=f.useProperties(),c=n.useRef(r);n.useEffect(()=>{c.current=r},[r]);const a=t=>{const[g]=u.get("widgetDOMElements"),s=Array.from(g.querySelectorAll('.humany-tab-stop, button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"]):not(.humany-tab-stop):not([tabindex=""])')),m=s.indexOf(t.relatedTarget)<s.indexOf(t.target),o=s.filter(i=>typeof window>"u"?!0:!(window.getComputedStyle(i).display==="none"||i.offsetWidth<=0&&i.offsetHeight<=0)),d=c.current==="end"||m?o[0]:o[o.length-1];d&&d.focus()};return n.useEffect(()=>{const[t]=u.get("widgetDOMElements");return e.current&&t&&e.current.addEventListener("focus",a),()=>{e.current&&e.current.removeEventListener("focus",a)}},[]),b.jsx(E,{...p,tabIndex:0,ref:e,className:w.appendClassNames(l,"humany-tab-stop")})},E=y.div`
2
+ opacity: 0;
3
+ position: absolute;
4
+ `;exports.default=x;
@@ -1,21 +1,21 @@
1
- import { jsx as b } from "react/jsx-runtime";
1
+ import { jsx as g } from "react/jsx-runtime";
2
2
  import y from "@emotion/styled";
3
3
  import { useContainer as x, useProperties as w } from "@telia-ace/widget-ui";
4
- import { appendClassNames as E } from "@telia-ace/widget-utilities";
4
+ import { appendClassNames as h } from "@telia-ace/widget-utilities";
5
5
  import { useRef as c, useEffect as d } from "react";
6
- const A = ({ className: l, ...m }) => {
6
+ const A = ({ className: m, ...p }) => {
7
7
  const t = c(), i = x(), { position: n = "end" } = w(), a = c(n);
8
8
  d(() => {
9
9
  a.current = n;
10
10
  }, [n]);
11
11
  const f = (e) => {
12
- const [p] = i.get(
12
+ const [l] = i.get(
13
13
  "widgetDOMElements"
14
14
  ), o = Array.from(
15
- p.querySelectorAll(
16
- 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"]):not(.humany-tab-stop):not([tabindex=""])'
15
+ l.querySelectorAll(
16
+ '.humany-tab-stop, button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"]):not(.humany-tab-stop):not([tabindex=""])'
17
17
  )
18
- ), g = o.indexOf(e.relatedTarget) < o.indexOf(e.target), r = o.filter((s) => typeof window > "u" ? !0 : !(window.getComputedStyle(s).display === "none" || s.offsetWidth <= 0 && s.offsetHeight <= 0)), u = a.current === "end" || g ? r[0] : r[r.length - 1];
18
+ ), b = o.indexOf(e.relatedTarget) < o.indexOf(e.target), r = o.filter((s) => typeof window > "u" ? !0 : !(window.getComputedStyle(s).display === "none" || s.offsetWidth <= 0 && s.offsetHeight <= 0)), u = a.current === "end" || b ? r[0] : r[r.length - 1];
19
19
  u && u.focus();
20
20
  };
21
21
  return d(() => {
@@ -23,16 +23,16 @@ const A = ({ className: l, ...m }) => {
23
23
  return t.current && e && t.current.addEventListener("focus", f), () => {
24
24
  t.current && t.current.removeEventListener("focus", f);
25
25
  };
26
- }, []), /* @__PURE__ */ b(
27
- O,
26
+ }, []), /* @__PURE__ */ g(
27
+ E,
28
28
  {
29
- ...m,
29
+ ...p,
30
30
  tabIndex: 0,
31
31
  ref: t,
32
- className: E(l, "humany-tab-stop")
32
+ className: h(m, "humany-tab-stop")
33
33
  }
34
34
  );
35
- }, O = y.div`
35
+ }, E = y.div`
36
36
  opacity: 0;
37
37
  position: absolute;
38
38
  `;
@@ -1,4 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),y=require("@emotion/styled"),f=require("@telia-ace/widget-ui"),w=require("@telia-ace/widget-utilities"),n=require("react"),x=({className:l,...p})=>{const e=n.useRef(),u=f.useContainer(),{position:r="end"}=f.useProperties(),c=n.useRef(r);n.useEffect(()=>{c.current=r},[r]);const a=t=>{const[g]=u.get("widgetDOMElements"),s=Array.from(g.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"]):not(.humany-tab-stop):not([tabindex=""])')),m=s.indexOf(t.relatedTarget)<s.indexOf(t.target),o=s.filter(i=>typeof window>"u"?!0:!(window.getComputedStyle(i).display==="none"||i.offsetWidth<=0&&i.offsetHeight<=0)),d=c.current==="end"||m?o[0]:o[o.length-1];d&&d.focus()};return n.useEffect(()=>{const[t]=u.get("widgetDOMElements");return e.current&&t&&e.current.addEventListener("focus",a),()=>{e.current&&e.current.removeEventListener("focus",a)}},[]),b.jsx(E,{...p,tabIndex:0,ref:e,className:w.appendClassNames(l,"humany-tab-stop")})},E=y.div`
2
- opacity: 0;
3
- position: absolute;
4
- `;exports.default=x;