@telia-ace/widget-components-close-button 1.1.2-rc.0 → 1.1.2-rc.2
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.
|
@@ -3,34 +3,40 @@ import l from "@emotion/styled";
|
|
|
3
3
|
import { useDispatch as n, useProperties as a, Button as c, borderTabStyle as r, SymbolBadge as d } from "@telia-ace/widget-ui";
|
|
4
4
|
const f = ({ className: t, ...e }) => {
|
|
5
5
|
const s = n(), { ariaLabel: i = "" } = a();
|
|
6
|
-
return /* @__PURE__ */ o(m, { ...e, className: t, children: /* @__PURE__ */ o(y, { onClick: () => s("close"), "aria-label": i, children: /* @__PURE__ */ o(
|
|
6
|
+
return /* @__PURE__ */ o(m, { ...e, className: t, children: /* @__PURE__ */ o(y, { onClick: () => s("close"), "aria-label": i, children: /* @__PURE__ */ o(
|
|
7
|
+
p,
|
|
8
|
+
{
|
|
9
|
+
size: 12,
|
|
10
|
+
symbol: { type: "Svg", content: "close" }
|
|
11
|
+
}
|
|
12
|
+
) }) });
|
|
7
13
|
}, m = l.div`
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
14
|
+
display: flex;
|
|
15
|
+
justify-content: flex-end;
|
|
16
|
+
align-items: flex-start;
|
|
11
17
|
`, y = l(c)`
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
18
|
+
&:focus-visible {
|
|
19
|
+
${r}
|
|
20
|
+
padding: ${(t) => {
|
|
15
21
|
var e, s;
|
|
16
22
|
return `calc(${(e = t.theme.sizes) == null ? void 0 : e.small} / 2) ${(s = t.theme.sizes) == null ? void 0 : s.small}`;
|
|
17
23
|
}};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
24
|
+
line,
|
|
25
|
+
path {
|
|
26
|
+
stroke: ${(t) => {
|
|
21
27
|
var e, s;
|
|
22
28
|
return (s = (e = t.theme.accessibility) == null ? void 0 : e.colors) == null ? void 0 : s.inactiveText;
|
|
23
29
|
}};
|
|
24
|
-
}
|
|
25
30
|
}
|
|
31
|
+
}
|
|
26
32
|
`, p = l(d)`
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
33
|
+
line,
|
|
34
|
+
path {
|
|
35
|
+
stroke: ${(t) => {
|
|
30
36
|
var e;
|
|
31
37
|
return (e = t.theme.colors) == null ? void 0 : e.text;
|
|
32
38
|
}};
|
|
33
|
-
|
|
39
|
+
}
|
|
34
40
|
`;
|
|
35
41
|
export {
|
|
36
42
|
f as default
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),o=require("@emotion/styled"),l=require("@telia-ace/widget-ui"),c=({className:t,...e})=>{const s=l.useDispatch(),{ariaLabel:n=""}=l.useProperties();return i.jsx(a,{...e,className:t,children:i.jsx(r,{onClick:()=>s("close"),"aria-label":n,children:i.jsx(d,{size:12,symbol:{type:"Svg",content:"close"}})})})},a=o.div`
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: flex-end;
|
|
4
|
+
align-items: flex-start;
|
|
5
5
|
`,r=o(l.Button)`
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
line,
|
|
10
|
-
path {
|
|
11
|
-
stroke: ${t=>{var e,s;return(s=(e=t.theme.accessibility)==null?void 0:e.colors)==null?void 0:s.inactiveText}};
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
`,d=o(l.SymbolBadge)`
|
|
6
|
+
&:focus-visible {
|
|
7
|
+
${l.borderTabStyle}
|
|
8
|
+
padding: ${t=>{var e,s;return`calc(${(e=t.theme.sizes)==null?void 0:e.small} / 2) ${(s=t.theme.sizes)==null?void 0:s.small}`}};
|
|
15
9
|
line,
|
|
16
10
|
path {
|
|
17
|
-
|
|
11
|
+
stroke: ${t=>{var e,s;return(s=(e=t.theme.accessibility)==null?void 0:e.colors)==null?void 0:s.inactiveText}};
|
|
18
12
|
}
|
|
13
|
+
}
|
|
14
|
+
`,d=o(l.SymbolBadge)`
|
|
15
|
+
line,
|
|
16
|
+
path {
|
|
17
|
+
stroke: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
|
|
18
|
+
}
|
|
19
19
|
`;exports.default=c;
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=require("@telia-ace/widget-ui"),n=e=>r.createReactComponent(e,"close-button",Promise.resolve().then(()=>require("./close-button-
|
|
1
|
+
"use strict";const r=require("@telia-ace/widget-ui"),n=e=>r.createReactComponent(e,"close-button",Promise.resolve().then(()=>require("./close-button-8bb06b17.js")),t=>{t.actions.create("close",(o={})=>{if(o.preventDefault)return;e.get("$widget").invoke("close")})});module.exports=n;
|
package/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { createReactComponent as n } from "@telia-ace/widget-ui";
|
|
|
2
2
|
const s = (t) => n(
|
|
3
3
|
t,
|
|
4
4
|
"close-button",
|
|
5
|
-
import("./close-button-
|
|
5
|
+
import("./close-button-0aa2e586.mjs"),
|
|
6
6
|
(e) => {
|
|
7
7
|
e.actions.create("close", (o = {}) => {
|
|
8
8
|
if (o.preventDefault)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/widget-components-close-button",
|
|
3
|
-
"version": "1.1.2-rc.
|
|
3
|
+
"version": "1.1.2-rc.2",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@telia-ace/widget-ui": "^1.1.2-rc.
|
|
14
|
-
"@telia-ace/widget-core": "^1.1.2-rc.
|
|
13
|
+
"@telia-ace/widget-ui": "^1.1.2-rc.2",
|
|
14
|
+
"@telia-ace/widget-core": "^1.1.2-rc.2",
|
|
15
15
|
"@webprovisions/platform": "^1.1.4"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|