@telia-ace/widget-components-not-found 0.0.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.d.ts +3 -0
- package/index.js +1 -0
- package/index.mjs +5 -0
- package/not-found-2f5e3fec.mjs +114 -0
- package/not-found-base.d.ts +10 -0
- package/not-found-c8d08104.js +34 -0
- package/not-found-component.d.ts +11 -0
- package/not-found.d.ts +5 -0
- package/package.json +23 -0
package/index.d.ts
ADDED
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("@telia-ace/widget-ui"),o=e=>t.createReactComponent(e,"not-found",Promise.resolve().then(()=>require("./not-found-c8d08104.js")));module.exports=o;
|
package/index.mjs
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { jsxs as n, jsx as r, Fragment as y } from "react/jsx-runtime";
|
|
2
|
+
import { css as p, useTheme as z } from "@emotion/react";
|
|
3
|
+
import { DetachedComponent as b } from "@telia-ace/widget-types-grid";
|
|
4
|
+
import { contentBox as v, headingElement as u, Typography as h, TextLink as N, useProperties as j, useContainer as C } from "@telia-ace/widget-ui";
|
|
5
|
+
import o from "@emotion/styled";
|
|
6
|
+
const L = ({
|
|
7
|
+
header: t = "",
|
|
8
|
+
link: e = "",
|
|
9
|
+
suggestionHeader: s = "",
|
|
10
|
+
suggestion: i = ""
|
|
11
|
+
}) => /* @__PURE__ */ n(k, { children: [
|
|
12
|
+
/* @__PURE__ */ r(F, { children: /* @__PURE__ */ r(h, { variant: "h2", children: "404" }) }),
|
|
13
|
+
/* @__PURE__ */ n(P, { children: [
|
|
14
|
+
/* @__PURE__ */ r(h, { variant: "h3", children: t }),
|
|
15
|
+
/* @__PURE__ */ r(N, { routeName: "index", "aria-label": e, text: e })
|
|
16
|
+
] }),
|
|
17
|
+
/* @__PURE__ */ n(T, { children: [
|
|
18
|
+
/* @__PURE__ */ r("span", { children: s }),
|
|
19
|
+
/* @__PURE__ */ r("ul", { children: /* @__PURE__ */ r("li", { children: i }) })
|
|
20
|
+
] })
|
|
21
|
+
] }), k = o.div`
|
|
22
|
+
${(t) => v(t)}
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-wrap: wrap;
|
|
25
|
+
flex-direction: row;
|
|
26
|
+
justify-content: flex-start;
|
|
27
|
+
padding: ${(t) => {
|
|
28
|
+
var e;
|
|
29
|
+
return (e = t.theme.sizes) == null ? void 0 : e.medium;
|
|
30
|
+
}};
|
|
31
|
+
`, F = o.div`
|
|
32
|
+
${(t) => {
|
|
33
|
+
var e;
|
|
34
|
+
return u(t)(
|
|
35
|
+
"h2",
|
|
36
|
+
p`
|
|
37
|
+
padding: 0;
|
|
38
|
+
margin: 0;
|
|
39
|
+
color: gray;
|
|
40
|
+
font-size: ${(e = t.theme.fonts) == null ? void 0 : e.huge};
|
|
41
|
+
`
|
|
42
|
+
);
|
|
43
|
+
}}
|
|
44
|
+
`, P = o.div`
|
|
45
|
+
margin-left: ${(t) => {
|
|
46
|
+
var e;
|
|
47
|
+
return (e = t.theme.sizes) == null ? void 0 : e.medium;
|
|
48
|
+
}};
|
|
49
|
+
|
|
50
|
+
${(t) => {
|
|
51
|
+
var e;
|
|
52
|
+
return u(t)(
|
|
53
|
+
"h3",
|
|
54
|
+
p`
|
|
55
|
+
text-transform: uppercase;
|
|
56
|
+
font-size: ${(e = t.theme.fonts) == null ? void 0 : e.normal};
|
|
57
|
+
`
|
|
58
|
+
);
|
|
59
|
+
}}
|
|
60
|
+
|
|
61
|
+
a {
|
|
62
|
+
color: ${(t) => {
|
|
63
|
+
var e;
|
|
64
|
+
return (e = t.theme.colors) == null ? void 0 : e.link;
|
|
65
|
+
}};
|
|
66
|
+
font-size: ${(t) => {
|
|
67
|
+
var e;
|
|
68
|
+
return (e = t.theme.fonts) == null ? void 0 : e.small;
|
|
69
|
+
}};
|
|
70
|
+
}
|
|
71
|
+
`, T = o.div`
|
|
72
|
+
margin-top: ${(t) => {
|
|
73
|
+
var e;
|
|
74
|
+
return (e = t.theme.sizes) == null ? void 0 : e.medium;
|
|
75
|
+
}};
|
|
76
|
+
min-width: 100%;
|
|
77
|
+
|
|
78
|
+
span {
|
|
79
|
+
font-weight: bold;
|
|
80
|
+
}
|
|
81
|
+
`, O = () => {
|
|
82
|
+
const { header: t, linkLabel: e, suggestionHeader: s, suggestionLabel: i, showSearch: f } = j(), g = C(), a = z();
|
|
83
|
+
return /* @__PURE__ */ n(y, { children: [
|
|
84
|
+
f && /* @__PURE__ */ r(
|
|
85
|
+
b,
|
|
86
|
+
{
|
|
87
|
+
builder: (x) => g.get("settings").then((c) => {
|
|
88
|
+
var m;
|
|
89
|
+
const $ = Object.keys(
|
|
90
|
+
c.components
|
|
91
|
+
).reduce((w, l) => c.components[l].type === "search" ? c.components[l].properties : w, {}), d = x.createNode("search", {
|
|
92
|
+
detached: !0
|
|
93
|
+
});
|
|
94
|
+
return d.writeLayout({ size: "full" }), d.writeProperties({
|
|
95
|
+
"css-margin-bottom": ((m = a == null ? void 0 : a.sizes) == null ? void 0 : m.normal) || "15px",
|
|
96
|
+
...$
|
|
97
|
+
}), d;
|
|
98
|
+
})
|
|
99
|
+
}
|
|
100
|
+
),
|
|
101
|
+
/* @__PURE__ */ r(
|
|
102
|
+
L,
|
|
103
|
+
{
|
|
104
|
+
header: t,
|
|
105
|
+
link: e,
|
|
106
|
+
suggestionHeader: s,
|
|
107
|
+
suggestion: i
|
|
108
|
+
}
|
|
109
|
+
)
|
|
110
|
+
] });
|
|
111
|
+
};
|
|
112
|
+
export {
|
|
113
|
+
O as default
|
|
114
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),l=require("@emotion/react"),j=require("@telia-ace/widget-types-grid"),s=require("@telia-ace/widget-ui"),r=require("@emotion/styled"),y=({header:t="",link:e="",suggestionHeader:o="",suggestion:i=""})=>n.jsxs(w,{children:[n.jsx($,{children:n.jsx(s.Typography,{variant:"h2",children:"404"})}),n.jsxs(b,{children:[n.jsx(s.Typography,{variant:"h3",children:t}),n.jsx(s.TextLink,{routeName:"index","aria-label":e,text:e})]}),n.jsxs(z,{children:[n.jsx("span",{children:o}),n.jsx("ul",{children:n.jsx("li",{children:i})})]})]}),w=r.div`
|
|
2
|
+
${t=>s.contentBox(t)}
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-wrap: wrap;
|
|
5
|
+
flex-direction: row;
|
|
6
|
+
justify-content: flex-start;
|
|
7
|
+
padding: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.medium}};
|
|
8
|
+
`,$=r.div`
|
|
9
|
+
${t=>{var e;return s.headingElement(t)("h2",l.css`
|
|
10
|
+
padding: 0;
|
|
11
|
+
margin: 0;
|
|
12
|
+
color: gray;
|
|
13
|
+
font-size: ${(e=t.theme.fonts)==null?void 0:e.huge};
|
|
14
|
+
`)}}
|
|
15
|
+
`,b=r.div`
|
|
16
|
+
margin-left: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.medium}};
|
|
17
|
+
|
|
18
|
+
${t=>{var e;return s.headingElement(t)("h3",l.css`
|
|
19
|
+
text-transform: uppercase;
|
|
20
|
+
font-size: ${(e=t.theme.fonts)==null?void 0:e.normal};
|
|
21
|
+
`)}}
|
|
22
|
+
|
|
23
|
+
a {
|
|
24
|
+
color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.link}};
|
|
25
|
+
font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.small}};
|
|
26
|
+
}
|
|
27
|
+
`,z=r.div`
|
|
28
|
+
margin-top: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.medium}};
|
|
29
|
+
min-width: 100%;
|
|
30
|
+
|
|
31
|
+
span {
|
|
32
|
+
font-weight: bold;
|
|
33
|
+
}
|
|
34
|
+
`,v=()=>{const{header:t,linkLabel:e,suggestionHeader:o,suggestionLabel:i,showSearch:m}=s.useProperties(),p=s.useContainer(),a=l.useTheme();return n.jsxs(n.Fragment,{children:[m&&n.jsx(j.DetachedComponent,{builder:g=>p.get("settings").then(c=>{var h;const x=Object.keys(c.components).reduce((f,u)=>c.components[u].type==="search"?c.components[u].properties:f,{}),d=g.createNode("search",{detached:!0});return d.writeLayout({size:"full"}),d.writeProperties({"css-margin-bottom":((h=a==null?void 0:a.sizes)==null?void 0:h.normal)||"15px",...x}),d})}),n.jsx(y,{header:t,link:e,suggestionHeader:o,suggestion:i})]})};exports.default=v;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Container } from '@webprovisions/platform';
|
|
2
|
+
|
|
3
|
+
export type NotFoundComponentProps = {
|
|
4
|
+
header?: string;
|
|
5
|
+
linkLabel?: string;
|
|
6
|
+
suggestionHeader?: string;
|
|
7
|
+
suggestionLabel?: string;
|
|
8
|
+
showSearch?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const NotFoundComponent: (container: Container) => Promise<void>;
|
|
11
|
+
export default NotFoundComponent;
|
package/not-found.d.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@telia-ace/widget-components-not-found",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"main": "./index.js",
|
|
5
|
+
"types": "./index.d.ts",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"import": "./index.mjs",
|
|
9
|
+
"require": "./index.js"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@telia-ace/widget-core": "*",
|
|
14
|
+
"@telia-ace/widget-ui": "*",
|
|
15
|
+
"@telia-ace/widget-types-grid": "*",
|
|
16
|
+
"@webprovisions/platform": "^1.1.4"
|
|
17
|
+
},
|
|
18
|
+
"peerDependencies": {
|
|
19
|
+
"@emotion/react": "11.11.1",
|
|
20
|
+
"@emotion/styled": "11.11.0",
|
|
21
|
+
"react": "18.2.0"
|
|
22
|
+
}
|
|
23
|
+
}
|