@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 +1 -1
- package/index.mjs +1 -1
- package/package.json +4 -4
- package/tab-stop-7db5c970.js +4 -0
- package/{tab-stop-bfd62a90.mjs → tab-stop-d7ffaa68.mjs} +12 -12
- package/tab-stop-0c61b1b8.js +0 -4
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-
|
|
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
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.
|
|
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.
|
|
14
|
-
"@telia-ace/widget-ui": "^1.3.26-rc.
|
|
15
|
-
"@telia-ace/widget-utilities": "^1.3.26-rc.
|
|
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
|
|
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
|
|
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:
|
|
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 [
|
|
12
|
+
const [l] = i.get(
|
|
13
13
|
"widgetDOMElements"
|
|
14
14
|
), o = Array.from(
|
|
15
|
-
|
|
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
|
-
),
|
|
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__ */
|
|
27
|
-
|
|
26
|
+
}, []), /* @__PURE__ */ g(
|
|
27
|
+
E,
|
|
28
28
|
{
|
|
29
|
-
...
|
|
29
|
+
...p,
|
|
30
30
|
tabIndex: 0,
|
|
31
31
|
ref: t,
|
|
32
|
-
className:
|
|
32
|
+
className: h(m, "humany-tab-stop")
|
|
33
33
|
}
|
|
34
34
|
);
|
|
35
|
-
},
|
|
35
|
+
}, E = y.div`
|
|
36
36
|
opacity: 0;
|
|
37
37
|
position: absolute;
|
|
38
38
|
`;
|
package/tab-stop-0c61b1b8.js
DELETED
|
@@ -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;
|