@telia-ace/widget-components-back-link 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.
- package/{back-link-a81d3661.js → back-link-210e4ce8.js} +16 -16
- package/back-link-837b2382.mjs +114 -0
- package/index.js +1 -1
- package/index.mjs +13 -8
- package/package.json +5 -5
- package/back-link-406bc5a8.mjs +0 -100
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),c=require("@emotion/styled"),n=require("@telia-ace/widget-ui"),l=require("@telia-ace/widget-utilities"),o=c.div`
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
&:focus-visible {
|
|
11
|
-
${n.linkTabStyle}
|
|
12
|
-
padding: ${t=>{var e,i;return`calc(${(e=t.theme.sizes)==null?void 0:e.small} / 2) ${(i=t.theme.sizes)==null?void 0:i.small}`}};
|
|
13
|
-
}
|
|
2
|
+
font-weight: 300;
|
|
3
|
+
button {
|
|
4
|
+
color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
|
|
5
|
+
text-decoration: underline;
|
|
6
|
+
font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
|
|
7
|
+
span {
|
|
8
|
+
font-weight: 300;
|
|
14
9
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
stroke: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
|
|
10
|
+
&:focus-visible {
|
|
11
|
+
${n.linkTabStyle}
|
|
12
|
+
padding: ${t=>{var e,i;return`calc(${(e=t.theme.sizes)==null?void 0:e.small} / 2) ${(i=t.theme.sizes)==null?void 0:i.small}`}};
|
|
19
13
|
}
|
|
14
|
+
}
|
|
15
|
+
`,p=c.svg`
|
|
16
|
+
margin-right: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}};
|
|
17
|
+
line {
|
|
18
|
+
stroke: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
|
|
19
|
+
}
|
|
20
20
|
`,g=({className:t,...e})=>{const i=n.useDispatch(),{params:m}=n.useRouteData(),h=n.useContainer(),{conditions:a=[],label:r=""}=n.useProperties();if(!(a&&a.length?a.reduce((u,x)=>m[x]?!0:u,!1):!0))return n.createEmptyComponent(h,{...e,className:l.appendClassNames(t,"humany-back-link")});const d=()=>{i("click")};return r?s.jsx(o,{...e,className:l.appendClassNames(t,"humany-back-link"),children:s.jsxs(n.Button,{"aria-label":r,onClick:d,children:[s.jsxs(p,{width:"7",height:"13",viewBox:"0 0 7 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("line",{x1:"6.64645",y1:"12.5513",x2:"0.648357",y2:"6.55319"}),s.jsx("line",{x1:"0.646447",y1:"6.64455",x2:"6.64454",y2:"0.646465"})]}),r&&s.jsx("span",{children:r})]})}):s.jsx(o,{...e,className:l.appendClassNames(t,"humany-back-link"),children:s.jsxs("svg",{width:"8",height:"16",viewBox:"0 0 8 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("line",{y1:"-0.5",x2:"10.2585",y2:"-0.5",transform:"matrix(-0.682358 -0.731018 0.682358 -0.731018 8 14.9999)",stroke:"white"}),s.jsx("line",{y1:"-0.5",x2:"10.2585",y2:"-0.5",transform:"matrix(0.682359 -0.731018 0.682358 0.731018 1 8.49915)",stroke:"white"})]})})};exports.default=g;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { jsx as n, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import c from "@emotion/styled";
|
|
3
|
+
import { linkTabStyle as f, useDispatch as w, useRouteData as x, useContainer as y, useProperties as k, createEmptyComponent as g, Button as b } from "@telia-ace/widget-ui";
|
|
4
|
+
import { appendClassNames as l } from "@telia-ace/widget-utilities";
|
|
5
|
+
const a = c.div`
|
|
6
|
+
font-weight: 300;
|
|
7
|
+
button {
|
|
8
|
+
color: ${(t) => {
|
|
9
|
+
var e;
|
|
10
|
+
return (e = t.theme.colors) == null ? void 0 : e.primary;
|
|
11
|
+
}};
|
|
12
|
+
text-decoration: underline;
|
|
13
|
+
font-size: ${(t) => {
|
|
14
|
+
var e;
|
|
15
|
+
return (e = t.theme.fonts) == null ? void 0 : e.normal;
|
|
16
|
+
}};
|
|
17
|
+
span {
|
|
18
|
+
font-weight: 300;
|
|
19
|
+
}
|
|
20
|
+
&:focus-visible {
|
|
21
|
+
${f}
|
|
22
|
+
padding: ${(t) => {
|
|
23
|
+
var e, i;
|
|
24
|
+
return `calc(${(e = t.theme.sizes) == null ? void 0 : e.small} / 2) ${(i = t.theme.sizes) == null ? void 0 : i.small}`;
|
|
25
|
+
}};
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
`, v = c.svg`
|
|
29
|
+
margin-right: ${(t) => {
|
|
30
|
+
var e;
|
|
31
|
+
return (e = t.theme.sizes) == null ? void 0 : e.small;
|
|
32
|
+
}};
|
|
33
|
+
line {
|
|
34
|
+
stroke: ${(t) => {
|
|
35
|
+
var e;
|
|
36
|
+
return (e = t.theme.colors) == null ? void 0 : e.primary;
|
|
37
|
+
}};
|
|
38
|
+
}
|
|
39
|
+
`, D = ({ className: t, ...e }) => {
|
|
40
|
+
const i = w(), { params: m } = x(), h = y(), { conditions: r = [], label: s = "" } = k();
|
|
41
|
+
if (!(r && r.length ? r.reduce((p, u) => m[u] ? !0 : p, !1) : !0))
|
|
42
|
+
return g(h, {
|
|
43
|
+
...e,
|
|
44
|
+
className: l(t, "humany-back-link")
|
|
45
|
+
});
|
|
46
|
+
const d = () => {
|
|
47
|
+
i("click");
|
|
48
|
+
};
|
|
49
|
+
return s ? /* @__PURE__ */ n(
|
|
50
|
+
a,
|
|
51
|
+
{
|
|
52
|
+
...e,
|
|
53
|
+
className: l(t, "humany-back-link"),
|
|
54
|
+
children: /* @__PURE__ */ o(b, { "aria-label": s, onClick: d, children: [
|
|
55
|
+
/* @__PURE__ */ o(
|
|
56
|
+
v,
|
|
57
|
+
{
|
|
58
|
+
width: "7",
|
|
59
|
+
height: "13",
|
|
60
|
+
viewBox: "0 0 7 13",
|
|
61
|
+
fill: "none",
|
|
62
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
63
|
+
children: [
|
|
64
|
+
/* @__PURE__ */ n("line", { x1: "6.64645", y1: "12.5513", x2: "0.648357", y2: "6.55319" }),
|
|
65
|
+
/* @__PURE__ */ n("line", { x1: "0.646447", y1: "6.64455", x2: "6.64454", y2: "0.646465" })
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
),
|
|
69
|
+
s && /* @__PURE__ */ n("span", { children: s })
|
|
70
|
+
] })
|
|
71
|
+
}
|
|
72
|
+
) : /* @__PURE__ */ n(
|
|
73
|
+
a,
|
|
74
|
+
{
|
|
75
|
+
...e,
|
|
76
|
+
className: l(t, "humany-back-link"),
|
|
77
|
+
children: /* @__PURE__ */ o(
|
|
78
|
+
"svg",
|
|
79
|
+
{
|
|
80
|
+
width: "8",
|
|
81
|
+
height: "16",
|
|
82
|
+
viewBox: "0 0 8 16",
|
|
83
|
+
fill: "none",
|
|
84
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
85
|
+
children: [
|
|
86
|
+
/* @__PURE__ */ n(
|
|
87
|
+
"line",
|
|
88
|
+
{
|
|
89
|
+
y1: "-0.5",
|
|
90
|
+
x2: "10.2585",
|
|
91
|
+
y2: "-0.5",
|
|
92
|
+
transform: "matrix(-0.682358 -0.731018 0.682358 -0.731018 8 14.9999)",
|
|
93
|
+
stroke: "white"
|
|
94
|
+
}
|
|
95
|
+
),
|
|
96
|
+
/* @__PURE__ */ n(
|
|
97
|
+
"line",
|
|
98
|
+
{
|
|
99
|
+
y1: "-0.5",
|
|
100
|
+
x2: "10.2585",
|
|
101
|
+
y2: "-0.5",
|
|
102
|
+
transform: "matrix(0.682359 -0.731018 0.682358 0.731018 1 8.49915)",
|
|
103
|
+
stroke: "white"
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
)
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
};
|
|
112
|
+
export {
|
|
113
|
+
D as default
|
|
114
|
+
};
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const c=require("@telia-ace/widget-ui"),o=e=>c.createReactComponent(e,"back-link",Promise.resolve().then(()=>require("./back-link-
|
|
1
|
+
"use strict";const c=require("@telia-ace/widget-ui"),o=e=>c.createReactComponent(e,"back-link",Promise.resolve().then(()=>require("./back-link-210e4ce8.js")),t=>{t.actions.create("click",(i,r)=>{if(!r.preventDefault)return e.getAsync("router").then(n=>{n.goBack()})})});module.exports=o;
|
package/index.mjs
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { createReactComponent as a } from "@telia-ace/widget-ui";
|
|
2
|
-
const i = (t) => a(
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
const i = (t) => a(
|
|
3
|
+
t,
|
|
4
|
+
"back-link",
|
|
5
|
+
import("./back-link-837b2382.mjs"),
|
|
6
|
+
(e) => {
|
|
7
|
+
e.actions.create("click", (o, r) => {
|
|
8
|
+
if (!r.preventDefault)
|
|
9
|
+
return t.getAsync("router").then((n) => {
|
|
10
|
+
n.goBack();
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
);
|
|
10
15
|
export {
|
|
11
16
|
i as default
|
|
12
17
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/widget-components-back-link",
|
|
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,10 +10,10 @@
|
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@telia-ace/widget-routing": "^1.1.2-rc.
|
|
14
|
-
"@telia-ace/widget-ui": "^1.1.2-rc.
|
|
15
|
-
"@telia-ace/widget-utilities": "^1.1.2-rc.
|
|
16
|
-
"@telia-ace/widget-core": "^1.1.2-rc.
|
|
13
|
+
"@telia-ace/widget-routing": "^1.1.2-rc.2",
|
|
14
|
+
"@telia-ace/widget-ui": "^1.1.2-rc.2",
|
|
15
|
+
"@telia-ace/widget-utilities": "^1.1.2-rc.2",
|
|
16
|
+
"@telia-ace/widget-core": "^1.1.2-rc.2",
|
|
17
17
|
"@webprovisions/platform": "^1.1.4"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
package/back-link-406bc5a8.mjs
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { jsx as n, jsxs as o } from "react/jsx-runtime";
|
|
2
|
-
import c from "@emotion/styled";
|
|
3
|
-
import { linkTabStyle as f, useDispatch as w, useRouteData as x, useContainer as y, useProperties as k, createEmptyComponent as g, Button as b } from "@telia-ace/widget-ui";
|
|
4
|
-
import { appendClassNames as l } from "@telia-ace/widget-utilities";
|
|
5
|
-
const a = c.div`
|
|
6
|
-
font-weight: 300;
|
|
7
|
-
button {
|
|
8
|
-
color: ${(t) => {
|
|
9
|
-
var e;
|
|
10
|
-
return (e = t.theme.colors) == null ? void 0 : e.primary;
|
|
11
|
-
}};
|
|
12
|
-
text-decoration: underline;
|
|
13
|
-
font-size: ${(t) => {
|
|
14
|
-
var e;
|
|
15
|
-
return (e = t.theme.fonts) == null ? void 0 : e.normal;
|
|
16
|
-
}};
|
|
17
|
-
span {
|
|
18
|
-
font-weight: 300;
|
|
19
|
-
}
|
|
20
|
-
&:focus-visible {
|
|
21
|
-
${f}
|
|
22
|
-
padding: ${(t) => {
|
|
23
|
-
var e, i;
|
|
24
|
-
return `calc(${(e = t.theme.sizes) == null ? void 0 : e.small} / 2) ${(i = t.theme.sizes) == null ? void 0 : i.small}`;
|
|
25
|
-
}};
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
`, v = c.svg`
|
|
29
|
-
margin-right: ${(t) => {
|
|
30
|
-
var e;
|
|
31
|
-
return (e = t.theme.sizes) == null ? void 0 : e.small;
|
|
32
|
-
}};
|
|
33
|
-
line {
|
|
34
|
-
stroke: ${(t) => {
|
|
35
|
-
var e;
|
|
36
|
-
return (e = t.theme.colors) == null ? void 0 : e.primary;
|
|
37
|
-
}};
|
|
38
|
-
}
|
|
39
|
-
`, D = ({ className: t, ...e }) => {
|
|
40
|
-
const i = w(), { params: m } = x(), h = y(), { conditions: r = [], label: s = "" } = k();
|
|
41
|
-
if (!(r && r.length ? r.reduce((p, u) => m[u] ? !0 : p, !1) : !0))
|
|
42
|
-
return g(h, {
|
|
43
|
-
...e,
|
|
44
|
-
className: l(t, "humany-back-link")
|
|
45
|
-
});
|
|
46
|
-
const d = () => {
|
|
47
|
-
i("click");
|
|
48
|
-
};
|
|
49
|
-
return s ? /* @__PURE__ */ n(a, { ...e, className: l(t, "humany-back-link"), children: /* @__PURE__ */ o(b, { "aria-label": s, onClick: d, children: [
|
|
50
|
-
/* @__PURE__ */ o(
|
|
51
|
-
v,
|
|
52
|
-
{
|
|
53
|
-
width: "7",
|
|
54
|
-
height: "13",
|
|
55
|
-
viewBox: "0 0 7 13",
|
|
56
|
-
fill: "none",
|
|
57
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
58
|
-
children: [
|
|
59
|
-
/* @__PURE__ */ n("line", { x1: "6.64645", y1: "12.5513", x2: "0.648357", y2: "6.55319" }),
|
|
60
|
-
/* @__PURE__ */ n("line", { x1: "0.646447", y1: "6.64455", x2: "6.64454", y2: "0.646465" })
|
|
61
|
-
]
|
|
62
|
-
}
|
|
63
|
-
),
|
|
64
|
-
s && /* @__PURE__ */ n("span", { children: s })
|
|
65
|
-
] }) }) : /* @__PURE__ */ n(a, { ...e, className: l(t, "humany-back-link"), children: /* @__PURE__ */ o(
|
|
66
|
-
"svg",
|
|
67
|
-
{
|
|
68
|
-
width: "8",
|
|
69
|
-
height: "16",
|
|
70
|
-
viewBox: "0 0 8 16",
|
|
71
|
-
fill: "none",
|
|
72
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
73
|
-
children: [
|
|
74
|
-
/* @__PURE__ */ n(
|
|
75
|
-
"line",
|
|
76
|
-
{
|
|
77
|
-
y1: "-0.5",
|
|
78
|
-
x2: "10.2585",
|
|
79
|
-
y2: "-0.5",
|
|
80
|
-
transform: "matrix(-0.682358 -0.731018 0.682358 -0.731018 8 14.9999)",
|
|
81
|
-
stroke: "white"
|
|
82
|
-
}
|
|
83
|
-
),
|
|
84
|
-
/* @__PURE__ */ n(
|
|
85
|
-
"line",
|
|
86
|
-
{
|
|
87
|
-
y1: "-0.5",
|
|
88
|
-
x2: "10.2585",
|
|
89
|
-
y2: "-0.5",
|
|
90
|
-
transform: "matrix(0.682359 -0.731018 0.682358 0.731018 1 8.49915)",
|
|
91
|
-
stroke: "white"
|
|
92
|
-
}
|
|
93
|
-
)
|
|
94
|
-
]
|
|
95
|
-
}
|
|
96
|
-
) });
|
|
97
|
-
};
|
|
98
|
-
export {
|
|
99
|
-
D as default
|
|
100
|
-
};
|