@postnord/pn-marketweb-components 2.0.96 → 2.0.98
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/cjs/loader.cjs.js +1 -1
- package/cjs/pn-market-web-components.cjs.js +1 -1
- package/cjs/pn-marketweb-sitefooter.cjs.entry.js +0 -2
- package/cjs/pn-marketweb-siteheader.cjs.entry.js +1 -1
- package/cjs/pn-site-footer_2.cjs.entry.js +2 -2
- package/cjs/pn-stats-info-data.cjs.entry.js +66 -0
- package/cjs/pn-stats-info.cjs.entry.js +34 -0
- package/cjs/pn-teaser-card.cjs.entry.js +4 -4
- package/collection/collection-manifest.json +2 -0
- package/collection/components/cards/pn-teaser-card/pn-teaser-card.css +18 -10
- package/collection/components/cards/pn-teaser-card/pn-teaser-card.js +6 -6
- package/collection/components/cards/pn-teaser-card/pn-teaser-card.stories.js +7 -8
- package/collection/components/data-visualization/pn-stats-info/pn-stats-info-data/animationHelper.js +14 -0
- package/collection/components/data-visualization/pn-stats-info/pn-stats-info-data/pn-stats-info-data.css +47 -0
- package/collection/components/data-visualization/pn-stats-info/pn-stats-info-data/pn-stats-info-data.js +143 -0
- package/collection/components/data-visualization/pn-stats-info/pn-stats-info-data/viewIntersectionHelper.js +6 -0
- package/collection/components/data-visualization/pn-stats-info/pn-stats-info.css +106 -0
- package/collection/components/data-visualization/pn-stats-info/pn-stats-info.js +95 -0
- package/collection/components/data-visualization/pn-stats-info/pn-stats-info.stories.js +29 -0
- package/collection/components/data-visualization/pn-stats-info/types.js +1 -0
- package/collection/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter.js +0 -2
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.css +64 -27
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.stories.js +2 -2
- package/collection/components/navigation/pn-site-footer/pn-site-footer-col.css +1 -1
- package/collection/components/navigation/pn-site-footer/pn-site-footer.css +33 -3
- package/custom-elements/index.d.ts +12 -0
- package/custom-elements/index.js +100 -10
- package/esm/loader.js +1 -1
- package/esm/pn-market-web-components.js +1 -1
- package/esm/pn-marketweb-sitefooter.entry.js +0 -2
- package/esm/pn-marketweb-siteheader.entry.js +1 -1
- package/esm/pn-site-footer_2.entry.js +2 -2
- package/esm/pn-stats-info-data.entry.js +62 -0
- package/esm/pn-stats-info.entry.js +30 -0
- package/esm/pn-teaser-card.entry.js +4 -4
- package/esm-es5/loader.js +1 -1
- package/esm-es5/pn-market-web-components.js +1 -1
- package/esm-es5/pn-marketweb-sitefooter.entry.js +1 -1
- package/esm-es5/pn-marketweb-siteheader.entry.js +1 -1
- package/esm-es5/pn-site-footer_2.entry.js +1 -1
- package/esm-es5/pn-stats-info-data.entry.js +1 -0
- package/esm-es5/pn-stats-info.entry.js +1 -0
- package/esm-es5/pn-teaser-card.entry.js +1 -1
- package/package.json +1 -1
- package/pn-market-web-components/p-072fbfcb.system.entry.js +1 -0
- package/pn-market-web-components/p-0954708a.entry.js +1 -0
- package/pn-market-web-components/{p-13299124.entry.js → p-193f8ffc.entry.js} +1 -1
- package/pn-market-web-components/p-1ef2ef71.system.entry.js +1 -0
- package/pn-market-web-components/p-20281c39.entry.js +1 -0
- package/pn-market-web-components/{p-30b11b9f.system.entry.js → p-2138ff10.system.entry.js} +1 -1
- package/pn-market-web-components/p-67887512.system.js +1 -1
- package/pn-market-web-components/p-6c5fab6f.entry.js +1 -0
- package/pn-market-web-components/{p-b94d5bb3.entry.js → p-a5f06730.entry.js} +1 -1
- package/pn-market-web-components/p-bb01a1b0.system.entry.js +1 -0
- package/pn-market-web-components/p-dbe6a2ee.system.entry.js +1 -0
- package/pn-market-web-components/p-e0b10d83.system.entry.js +1 -0
- package/pn-market-web-components/{p-e397d524.entry.js → p-f94b22d7.entry.js} +1 -1
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/types/components/data-visualization/pn-stats-info/pn-stats-info-data/animationHelper.d.ts +1 -0
- package/types/components/data-visualization/pn-stats-info/pn-stats-info-data/pn-stats-info-data.d.ts +12 -0
- package/types/components/data-visualization/pn-stats-info/pn-stats-info-data/viewIntersectionHelper.d.ts +1 -0
- package/types/components/data-visualization/pn-stats-info/pn-stats-info.d.ts +9 -0
- package/types/components/data-visualization/pn-stats-info/types.d.ts +6 -0
- package/types/components.d.ts +42 -0
- package/umd/pn-marketweb-salesforce.js +2 -2
- package/pn-market-web-components/p-16acc6ef.system.entry.js +0 -1
- package/pn-market-web-components/p-3aa097be.system.entry.js +0 -1
- package/pn-market-web-components/p-4dfe46d9.system.entry.js +0 -1
- package/pn-market-web-components/p-77b4b04c.entry.js +0 -1
package/collection/components/data-visualization/pn-stats-info/pn-stats-info-data/animationHelper.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const animateValue = (obj, start = 0, end = 100, duration = 1000) => {
|
|
2
|
+
let startTimestamp = null;
|
|
3
|
+
const step = (timestamp) => {
|
|
4
|
+
if (!startTimestamp)
|
|
5
|
+
startTimestamp = timestamp;
|
|
6
|
+
const progress = Math.min((timestamp - startTimestamp) / duration, 1);
|
|
7
|
+
//obj.innerHTML = Math.floor(progress * (end - start) + start); //integer
|
|
8
|
+
obj.innerHTML = (Math.round((progress * (end - start) + start) * 10) / 10).toString(); // decimal
|
|
9
|
+
if (progress < 1) {
|
|
10
|
+
window.requestAnimationFrame(step);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
window.requestAnimationFrame(step);
|
|
14
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
pn-stats-info-data {
|
|
2
|
+
width: 50%;
|
|
3
|
+
/* &:last-of-type:nth-child(odd) {
|
|
4
|
+
width: 100%;
|
|
5
|
+
} */
|
|
6
|
+
}
|
|
7
|
+
pn-stats-info-data .pn-stats-info-data__container {
|
|
8
|
+
width: 100%;
|
|
9
|
+
background-color: transparent;
|
|
10
|
+
color: #F06365;
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
align-items: center;
|
|
14
|
+
padding: 2rem;
|
|
15
|
+
}
|
|
16
|
+
pn-stats-info-data .pn-stats-info-data__container__content {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: row;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
}
|
|
21
|
+
pn-stats-info-data .pn-stats-info-data__container__content__data {
|
|
22
|
+
font-weight: 700;
|
|
23
|
+
font-size: 3rem;
|
|
24
|
+
line-height: 110%;
|
|
25
|
+
}
|
|
26
|
+
@media screen and (min-width: 1200px) {
|
|
27
|
+
pn-stats-info-data .pn-stats-info-data__container__content__data {
|
|
28
|
+
font-size: 6.8rem;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
pn-stats-info-data .pn-stats-info-data__container__content__unit {
|
|
32
|
+
font-weight: 700;
|
|
33
|
+
font-size: 3rem;
|
|
34
|
+
line-height: 110%;
|
|
35
|
+
}
|
|
36
|
+
@media screen and (min-width: 1200px) {
|
|
37
|
+
pn-stats-info-data .pn-stats-info-data__container__content__unit {
|
|
38
|
+
font-size: 6.8rem;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
pn-stats-info-data .pn-stats-info-data__container__content__preamble {
|
|
42
|
+
text-align: center;
|
|
43
|
+
font-weight: 400;
|
|
44
|
+
font-size: 1.4rem;
|
|
45
|
+
line-height: 110%;
|
|
46
|
+
color: #FFFFFF;
|
|
47
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { Component, h, Host, Prop, State, Watch, } from '@stencil/core';
|
|
2
|
+
import { animateValue } from './animationHelper';
|
|
3
|
+
import { inViewport } from './viewIntersectionHelper';
|
|
4
|
+
export class PnStatsInfoData {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.data = 0;
|
|
7
|
+
this.unit = null;
|
|
8
|
+
this.preamble = null;
|
|
9
|
+
this.compId = null;
|
|
10
|
+
this.duration = 1000; //ms;
|
|
11
|
+
this.hasBeenShown = false;
|
|
12
|
+
this.inViewPortCallback = (entry) => {
|
|
13
|
+
if (entry.isIntersecting) {
|
|
14
|
+
this.hasBeenShown = true;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
watchStateHandlder(newValue, oldValue) {
|
|
19
|
+
const obj = document.getElementById(`pn-stats-info-data-${this.compId}`);
|
|
20
|
+
if (obj.classList.contains('is-inViewport') && newValue !== oldValue) {
|
|
21
|
+
animateValue(obj, 0, this.data, this.duration);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
render() {
|
|
25
|
+
return (h(Host, null,
|
|
26
|
+
h("div", { class: "pn-stats-info-data__container" },
|
|
27
|
+
h("div", { class: "pn-stats-info-data__container__content" },
|
|
28
|
+
h("div", { class: "pn-stats-info-data__container__content__data", id: `pn-stats-info-data-${this.compId}` }),
|
|
29
|
+
h("div", { class: "pn-stats-info-data__container__content__unit" }, this.unit)),
|
|
30
|
+
h("div", { class: "pn-stats-info-data__container__content__preamble" }, this.preamble))));
|
|
31
|
+
}
|
|
32
|
+
componentDidRender() {
|
|
33
|
+
const observer = new IntersectionObserver(entries => inViewport(entries, 'is-inViewport', this.inViewPortCallback));
|
|
34
|
+
const obj = document.getElementById(`pn-stats-info-data-${this.compId}`);
|
|
35
|
+
observer.observe(obj);
|
|
36
|
+
}
|
|
37
|
+
static get is() { return "pn-stats-info-data"; }
|
|
38
|
+
static get originalStyleUrls() { return {
|
|
39
|
+
"$": ["pn-stats-info-data.scss"]
|
|
40
|
+
}; }
|
|
41
|
+
static get styleUrls() { return {
|
|
42
|
+
"$": ["pn-stats-info-data.css"]
|
|
43
|
+
}; }
|
|
44
|
+
static get properties() { return {
|
|
45
|
+
"data": {
|
|
46
|
+
"type": "number",
|
|
47
|
+
"mutable": false,
|
|
48
|
+
"complexType": {
|
|
49
|
+
"original": "number",
|
|
50
|
+
"resolved": "number",
|
|
51
|
+
"references": {}
|
|
52
|
+
},
|
|
53
|
+
"required": false,
|
|
54
|
+
"optional": false,
|
|
55
|
+
"docs": {
|
|
56
|
+
"tags": [],
|
|
57
|
+
"text": ""
|
|
58
|
+
},
|
|
59
|
+
"attribute": "data",
|
|
60
|
+
"reflect": false,
|
|
61
|
+
"defaultValue": "0"
|
|
62
|
+
},
|
|
63
|
+
"unit": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"mutable": false,
|
|
66
|
+
"complexType": {
|
|
67
|
+
"original": "string",
|
|
68
|
+
"resolved": "string",
|
|
69
|
+
"references": {}
|
|
70
|
+
},
|
|
71
|
+
"required": false,
|
|
72
|
+
"optional": false,
|
|
73
|
+
"docs": {
|
|
74
|
+
"tags": [],
|
|
75
|
+
"text": ""
|
|
76
|
+
},
|
|
77
|
+
"attribute": "unit",
|
|
78
|
+
"reflect": false,
|
|
79
|
+
"defaultValue": "null"
|
|
80
|
+
},
|
|
81
|
+
"preamble": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"mutable": false,
|
|
84
|
+
"complexType": {
|
|
85
|
+
"original": "string",
|
|
86
|
+
"resolved": "string",
|
|
87
|
+
"references": {}
|
|
88
|
+
},
|
|
89
|
+
"required": false,
|
|
90
|
+
"optional": false,
|
|
91
|
+
"docs": {
|
|
92
|
+
"tags": [],
|
|
93
|
+
"text": ""
|
|
94
|
+
},
|
|
95
|
+
"attribute": "preamble",
|
|
96
|
+
"reflect": false,
|
|
97
|
+
"defaultValue": "null"
|
|
98
|
+
},
|
|
99
|
+
"compId": {
|
|
100
|
+
"type": "number",
|
|
101
|
+
"mutable": false,
|
|
102
|
+
"complexType": {
|
|
103
|
+
"original": "number",
|
|
104
|
+
"resolved": "number",
|
|
105
|
+
"references": {}
|
|
106
|
+
},
|
|
107
|
+
"required": false,
|
|
108
|
+
"optional": false,
|
|
109
|
+
"docs": {
|
|
110
|
+
"tags": [],
|
|
111
|
+
"text": ""
|
|
112
|
+
},
|
|
113
|
+
"attribute": "comp-id",
|
|
114
|
+
"reflect": false,
|
|
115
|
+
"defaultValue": "null"
|
|
116
|
+
},
|
|
117
|
+
"duration": {
|
|
118
|
+
"type": "number",
|
|
119
|
+
"mutable": false,
|
|
120
|
+
"complexType": {
|
|
121
|
+
"original": "number",
|
|
122
|
+
"resolved": "number",
|
|
123
|
+
"references": {}
|
|
124
|
+
},
|
|
125
|
+
"required": false,
|
|
126
|
+
"optional": true,
|
|
127
|
+
"docs": {
|
|
128
|
+
"tags": [],
|
|
129
|
+
"text": ""
|
|
130
|
+
},
|
|
131
|
+
"attribute": "duration",
|
|
132
|
+
"reflect": false,
|
|
133
|
+
"defaultValue": "1000"
|
|
134
|
+
}
|
|
135
|
+
}; }
|
|
136
|
+
static get states() { return {
|
|
137
|
+
"hasBeenShown": {}
|
|
138
|
+
}; }
|
|
139
|
+
static get watchers() { return [{
|
|
140
|
+
"propName": "hasBeenShown",
|
|
141
|
+
"methodName": "watchStateHandlder"
|
|
142
|
+
}]; }
|
|
143
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
.bleed-container:has(pn-stats-info) {
|
|
2
|
+
border-bottom-left-radius: 2.4rem;
|
|
3
|
+
border-bottom-right-radius: 2.4rem;
|
|
4
|
+
padding: 0;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
}
|
|
7
|
+
.bleed-container:has(pn-stats-info) .container > .mb-5 {
|
|
8
|
+
margin-bottom: 0 !important;
|
|
9
|
+
}
|
|
10
|
+
.bleed-container:has(pn-stats-info) .statsblock {
|
|
11
|
+
margin-bottom: 0 !important;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
pn-stats-info {
|
|
15
|
+
width: 100%;
|
|
16
|
+
}
|
|
17
|
+
pn-stats-info .pn-stats-info__container {
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: row;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
padding-top: 2rem;
|
|
22
|
+
}
|
|
23
|
+
@media screen and (min-width: 768px) {
|
|
24
|
+
pn-stats-info .pn-stats-info__container {
|
|
25
|
+
padding-top: 6rem;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
@media screen and (min-width: 1200px) {
|
|
29
|
+
pn-stats-info .pn-stats-info__container {
|
|
30
|
+
padding-top: 8rem;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
pn-stats-info .pn-stats-info__container__map {
|
|
34
|
+
display: none;
|
|
35
|
+
}
|
|
36
|
+
@media screen and (min-width: 768px) {
|
|
37
|
+
pn-stats-info .pn-stats-info__container__map {
|
|
38
|
+
display: block;
|
|
39
|
+
max-width: 46rem;
|
|
40
|
+
width: 100%;
|
|
41
|
+
background-color: #0D234B;
|
|
42
|
+
background-repeat: no-repeat;
|
|
43
|
+
background-position: bottom center;
|
|
44
|
+
background-size: 55%;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
@media screen and (min-width: 1200px) {
|
|
48
|
+
pn-stats-info .pn-stats-info__container__map {
|
|
49
|
+
background-size: contain;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
pn-stats-info .pn-stats-info__container__content {
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
align-items: center;
|
|
56
|
+
padding: 1rem;
|
|
57
|
+
width: 100%;
|
|
58
|
+
background-color: #0D234B;
|
|
59
|
+
background-repeat: no-repeat;
|
|
60
|
+
background-position: bottom left;
|
|
61
|
+
background-size: 50%;
|
|
62
|
+
background-blend-mode: overlay;
|
|
63
|
+
padding-bottom: 2rem;
|
|
64
|
+
}
|
|
65
|
+
@media screen and (min-width: 768px) {
|
|
66
|
+
pn-stats-info .pn-stats-info__container__content {
|
|
67
|
+
max-width: 540px;
|
|
68
|
+
background-position: -999px -999px;
|
|
69
|
+
background-size: 0;
|
|
70
|
+
padding-bottom: 4rem;
|
|
71
|
+
padding-right: 4rem;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
@media screen and (min-width: 1200px) {
|
|
75
|
+
pn-stats-info .pn-stats-info__container__content {
|
|
76
|
+
max-width: 100%;
|
|
77
|
+
padding-bottom: 6rem;
|
|
78
|
+
padding-right: 6rem;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
pn-stats-info .pn-stats-info__container__content__heading {
|
|
82
|
+
color: #F06365;
|
|
83
|
+
margin-bottom: 2.4rem;
|
|
84
|
+
align-self: center;
|
|
85
|
+
text-align: center;
|
|
86
|
+
font-size: 3rem;
|
|
87
|
+
line-height: 110%;
|
|
88
|
+
}
|
|
89
|
+
@media screen and (min-width: 1200px) {
|
|
90
|
+
pn-stats-info .pn-stats-info__container__content__heading {
|
|
91
|
+
font-weight: 700;
|
|
92
|
+
font-size: 4.8rem;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
pn-stats-info .pn-stats-info__container__content__data {
|
|
96
|
+
height: 100%;
|
|
97
|
+
display: flex;
|
|
98
|
+
flex-direction: row;
|
|
99
|
+
flex-wrap: wrap;
|
|
100
|
+
min-height: 20rem;
|
|
101
|
+
}
|
|
102
|
+
@media screen and (min-width: 1640px) {
|
|
103
|
+
pn-stats-info .pn-stats-info__container__content__data {
|
|
104
|
+
width: 65rem;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { Component, h, Host, Prop, State, Watch, } from '@stencil/core';
|
|
2
|
+
const mockStringArray = '[{ "preamble": "Million parcels", "data": 226, "unit": null, "duration": 1000 }, { "preamble": "weighted parcel delivery quality", "data": 94.5, "unit": "%", "duration": 2500 },{ "preamble": "billion letters and other mail items", "data": 1.5, "unit": "", "duration": 3000 },{ "preamble": "carbon dioxide emissions since 2009", "data": -44, "unit": "%", "duration": 2000 }]';
|
|
3
|
+
export class PnStatsInfo {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.heading = 'Heading';
|
|
6
|
+
this.dataArray = mockStringArray;
|
|
7
|
+
this.backgroundUrl = null;
|
|
8
|
+
this.myParsedArray = JSON.parse(this.dataArray);
|
|
9
|
+
}
|
|
10
|
+
parseMyArrayProp(newValue) {
|
|
11
|
+
if (newValue)
|
|
12
|
+
this.myParsedArray = JSON.parse(newValue);
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
return (h(Host, null,
|
|
16
|
+
h("div", { class: "pn-stats-info__container" },
|
|
17
|
+
h("div", { class: "pn-stats-info__container__map", style: { backgroundImage: `url(${this.backgroundUrl})` } }),
|
|
18
|
+
h("div", { class: "pn-stats-info__container__content", style: { backgroundImage: `url(${this.backgroundUrl})` } },
|
|
19
|
+
h("h3", { class: "pn-stats-info__container__content__heading" }, this.heading),
|
|
20
|
+
h("div", { class: "pn-stats-info__container__content__data" }, this.myParsedArray &&
|
|
21
|
+
this.myParsedArray.map((stats, index) => {
|
|
22
|
+
return h("pn-stats-info-data", { "comp-id": index, data: stats.data, unit: stats.unit, preamble: stats.preamble, duration: stats.duration });
|
|
23
|
+
}))))));
|
|
24
|
+
}
|
|
25
|
+
static get is() { return "pn-stats-info"; }
|
|
26
|
+
static get originalStyleUrls() { return {
|
|
27
|
+
"$": ["pn-stats-info.scss"]
|
|
28
|
+
}; }
|
|
29
|
+
static get styleUrls() { return {
|
|
30
|
+
"$": ["pn-stats-info.css"]
|
|
31
|
+
}; }
|
|
32
|
+
static get properties() { return {
|
|
33
|
+
"heading": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"mutable": false,
|
|
36
|
+
"complexType": {
|
|
37
|
+
"original": "string",
|
|
38
|
+
"resolved": "string",
|
|
39
|
+
"references": {}
|
|
40
|
+
},
|
|
41
|
+
"required": false,
|
|
42
|
+
"optional": false,
|
|
43
|
+
"docs": {
|
|
44
|
+
"tags": [],
|
|
45
|
+
"text": ""
|
|
46
|
+
},
|
|
47
|
+
"attribute": "heading",
|
|
48
|
+
"reflect": false,
|
|
49
|
+
"defaultValue": "'Heading'"
|
|
50
|
+
},
|
|
51
|
+
"dataArray": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"mutable": false,
|
|
54
|
+
"complexType": {
|
|
55
|
+
"original": "string",
|
|
56
|
+
"resolved": "string",
|
|
57
|
+
"references": {}
|
|
58
|
+
},
|
|
59
|
+
"required": false,
|
|
60
|
+
"optional": false,
|
|
61
|
+
"docs": {
|
|
62
|
+
"tags": [],
|
|
63
|
+
"text": ""
|
|
64
|
+
},
|
|
65
|
+
"attribute": "data-array",
|
|
66
|
+
"reflect": false,
|
|
67
|
+
"defaultValue": "mockStringArray"
|
|
68
|
+
},
|
|
69
|
+
"backgroundUrl": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"mutable": false,
|
|
72
|
+
"complexType": {
|
|
73
|
+
"original": "string",
|
|
74
|
+
"resolved": "string",
|
|
75
|
+
"references": {}
|
|
76
|
+
},
|
|
77
|
+
"required": false,
|
|
78
|
+
"optional": false,
|
|
79
|
+
"docs": {
|
|
80
|
+
"tags": [],
|
|
81
|
+
"text": ""
|
|
82
|
+
},
|
|
83
|
+
"attribute": "background-url",
|
|
84
|
+
"reflect": false,
|
|
85
|
+
"defaultValue": "null"
|
|
86
|
+
}
|
|
87
|
+
}; }
|
|
88
|
+
static get states() { return {
|
|
89
|
+
"myParsedArray": {}
|
|
90
|
+
}; }
|
|
91
|
+
static get watchers() { return [{
|
|
92
|
+
"propName": "dataArray",
|
|
93
|
+
"methodName": "parseMyArrayProp"
|
|
94
|
+
}]; }
|
|
95
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import readme from './readme.md';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Data Visualization/Stats Info',
|
|
5
|
+
parameters: {
|
|
6
|
+
notes: readme,
|
|
7
|
+
layout: 'fullscreen',
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const PrimaryTemplate = ({ ...args }) => {
|
|
12
|
+
return `
|
|
13
|
+
<div style="height:1200px">
|
|
14
|
+
<h1 style="text-align:center;">Scroll Down...</h1>
|
|
15
|
+
</div>
|
|
16
|
+
<div style="background-color:#0D234B;">
|
|
17
|
+
<div style="width:100%; max-width:1140px; margin:0 auto">
|
|
18
|
+
<pn-stats-info heading="${args.heading}" background-url="${args.backgroundUrl}">
|
|
19
|
+
</pn-stats-info>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
`;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const Primary = PrimaryTemplate.bind({});
|
|
26
|
+
Primary.args = {
|
|
27
|
+
heading: 'Postnord in figures 2022',
|
|
28
|
+
backgroundUrl: 'https://com-integration.postnord.com/siteassets/map.png?width=1410&height=793&mode=crop&quality=80',
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/collection/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter.js
CHANGED
|
@@ -98,10 +98,8 @@ export class PnMarketwebSiteheader {
|
|
|
98
98
|
}
|
|
99
99
|
// Set site definition
|
|
100
100
|
this.siteDefinition = data.sitedefinition;
|
|
101
|
-
console.log('data.sitedefinition', data.sitedefinition);
|
|
102
101
|
// Set footer content
|
|
103
102
|
this.footerContent = data.footer;
|
|
104
|
-
console.log('data.footer', data.footer);
|
|
105
103
|
if (this.siteDomainInUrls) {
|
|
106
104
|
this.adjustLinks();
|
|
107
105
|
}
|
package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.css
CHANGED
|
@@ -212,8 +212,15 @@ pn-marketweb-siteheader pn-nav-dropdown:not(.hydrated) .nav-dropdown-content-con
|
|
|
212
212
|
margin: 1.6rem;
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
+
header[data-header-theme=dotcom] > pn-marketweb-siteheader pn-button a {
|
|
216
|
+
text-decoration: none;
|
|
217
|
+
}
|
|
218
|
+
header[data-header-theme=dotcom] > pn-marketweb-siteheader pn-button a:hover {
|
|
219
|
+
text-decoration: none;
|
|
220
|
+
}
|
|
215
221
|
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header {
|
|
216
222
|
background-color: #0D234B;
|
|
223
|
+
box-shadow: none;
|
|
217
224
|
}
|
|
218
225
|
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header .siteheader-row:not(:last-child) {
|
|
219
226
|
border-bottom: 0.1rem solid #0D234B;
|
|
@@ -239,15 +246,15 @@ header[data-header-theme=dotcom] > pn-marketweb-siteheader > header .siteheader-
|
|
|
239
246
|
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header .siteheader-logocontainer svg.siteheader-logo > path {
|
|
240
247
|
fill: #FFFFFF;
|
|
241
248
|
}
|
|
242
|
-
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header .siteheader-topright * {
|
|
243
|
-
color: #FFFFFF;
|
|
244
|
-
}
|
|
245
249
|
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header .siteheader-topright .siteheader-logindialog svg > path {
|
|
246
250
|
fill: #FFFFFF;
|
|
247
251
|
}
|
|
248
252
|
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header .siteheader-topright pn-language-selector pn-icon svg > path {
|
|
249
253
|
fill: #FFFFFF;
|
|
250
254
|
}
|
|
255
|
+
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header .siteheader-topright button {
|
|
256
|
+
color: #FFFFFF;
|
|
257
|
+
}
|
|
251
258
|
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header .siteheader-topright button:hover {
|
|
252
259
|
background-color: #005D92;
|
|
253
260
|
}
|
|
@@ -267,58 +274,88 @@ header[data-header-theme=dotcom] > pn-marketweb-siteheader > header .siteheader-
|
|
|
267
274
|
}
|
|
268
275
|
}
|
|
269
276
|
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header .siteheader-menu .mainnav-toggle button {
|
|
270
|
-
background-color:
|
|
277
|
+
background-color: #005D92;
|
|
271
278
|
}
|
|
272
279
|
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header .siteheader-menu .first-level_icon svg > path {
|
|
273
280
|
fill: #FFFFFF;
|
|
274
281
|
}
|
|
275
282
|
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header .siteheader-search form pn-search-field input {
|
|
276
|
-
background-color: #
|
|
277
|
-
color: #
|
|
283
|
+
background-color: #FFFFFF;
|
|
284
|
+
color: #0D234B;
|
|
278
285
|
border: 0.1rem solid #FFFFFF;
|
|
279
286
|
}
|
|
280
287
|
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header .siteheader-search form pn-search-field input:hover {
|
|
281
288
|
border-color: #FFFFFF;
|
|
282
289
|
}
|
|
283
290
|
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header .siteheader-search form pn-search-field input::placeholder {
|
|
284
|
-
color: #
|
|
291
|
+
color: #0D234B;
|
|
285
292
|
}
|
|
286
|
-
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header .mainnav {
|
|
293
|
+
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header nav.mainnav {
|
|
287
294
|
background-color: #0D234B;
|
|
288
295
|
}
|
|
289
|
-
|
|
290
|
-
|
|
296
|
+
@media screen and (min-width: 48em) {
|
|
297
|
+
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header nav.mainnav {
|
|
298
|
+
top: 6.4em;
|
|
299
|
+
}
|
|
291
300
|
}
|
|
292
|
-
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header .mainnav
|
|
293
|
-
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header .mainnav pn-mainnav-level[data-level="1"] pn-mainnav-list > pn-mainnav-link button {
|
|
294
|
-
background-color: #0D234B;
|
|
301
|
+
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header nav.mainnav a {
|
|
295
302
|
color: #FFFFFF;
|
|
296
|
-
border-bottom: 0.1rem solid rgba(0, 93, 146, 0.5);
|
|
297
303
|
}
|
|
298
|
-
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header .mainnav pn-mainnav-level
|
|
304
|
+
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header nav.mainnav pn-mainnav-level [slot=top].siteheader-menu-top pn-marketweb-siteheader-search {
|
|
305
|
+
padding-bottom: 0.5rem;
|
|
299
306
|
background-color: #0D234B;
|
|
300
307
|
}
|
|
301
|
-
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header .mainnav pn-mainnav-level
|
|
302
|
-
color: #FFFFFF;
|
|
303
|
-
}
|
|
304
|
-
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header .mainnav pn-mainnav-level:not([data-level="1"]) pn-mainnav-list a:hover {
|
|
305
|
-
background-color: #00A0D6;
|
|
306
|
-
}
|
|
307
|
-
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header .mainnav pn-mainnav-level [slot=top].siteheader-menu-top pn-marketweb-siteheader-search {
|
|
308
|
-
background-color: #0D234B;
|
|
309
|
-
}
|
|
310
|
-
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header .mainnav pn-mainnav-level [slot=top].siteheader-menu-top pn-marketweb-siteheader-search .button-container {
|
|
308
|
+
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header nav.mainnav pn-mainnav-level [slot=top].siteheader-menu-top pn-marketweb-siteheader-search .button-container {
|
|
311
309
|
border-top: 1px solid #FFFFFF;
|
|
312
310
|
border-bottom: 1px solid #FFFFFF;
|
|
313
|
-
border-right: 1px solid
|
|
311
|
+
border-right: 1px solid #FFFFFF;
|
|
314
312
|
border-top-right-radius: 50%;
|
|
315
313
|
border-bottom-right-radius: 50%;
|
|
316
314
|
}
|
|
317
|
-
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header .mainnav pn-mainnav-level [slot=top].siteheader-menu-top pn-marketweb-siteheader-search .button-container button.clear {
|
|
315
|
+
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header nav.mainnav pn-mainnav-level [slot=top].siteheader-menu-top pn-marketweb-siteheader-search .button-container button.clear {
|
|
318
316
|
border: 2px solid #FFFFFF;
|
|
319
317
|
border-radius: 50%;
|
|
320
318
|
padding: 0.5rem;
|
|
321
319
|
}
|
|
320
|
+
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header nav.mainnav pn-mainnav-level .mainnav-level-header .secondlevel-backbtn pn-icon svg > path {
|
|
321
|
+
fill: #FFFFFF;
|
|
322
|
+
}
|
|
323
|
+
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header nav.mainnav pn-mainnav-level pn-mainnav-list > pn-mainnav-link button,
|
|
324
|
+
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header nav.mainnav pn-mainnav-level pn-mainnav-list > pn-mainnav-link a {
|
|
325
|
+
background-color: #0D234B;
|
|
326
|
+
border-bottom: 0.1rem solid rgba(0, 93, 146, 0.5);
|
|
327
|
+
}
|
|
328
|
+
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header nav.mainnav pn-mainnav-level pn-mainnav-list > pn-mainnav-link button:hover,
|
|
329
|
+
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header nav.mainnav pn-mainnav-level pn-mainnav-list > pn-mainnav-link a:hover {
|
|
330
|
+
text-decoration: none;
|
|
331
|
+
}
|
|
332
|
+
@media screen and (min-width: 1024px) {
|
|
333
|
+
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header nav.mainnav pn-mainnav-level pn-mainnav-list > pn-mainnav-link button,
|
|
334
|
+
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header nav.mainnav pn-mainnav-level pn-mainnav-list > pn-mainnav-link a {
|
|
335
|
+
border-bottom: none;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
@media screen and (max-width: 1023px) {
|
|
339
|
+
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header nav.mainnav pn-mainnav-level[data-level="1"] pn-mainnav-list > pn-mainnav-link:first-child {
|
|
340
|
+
border-top: 0.1rem solid rgba(0, 93, 146, 0.5);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header nav.mainnav pn-mainnav-level[data-level="1"] pn-mainnav-list > pn-mainnav-link a, header[data-header-theme=dotcom] > pn-marketweb-siteheader > header nav.mainnav pn-mainnav-level[data-level="1"] pn-mainnav-list > pn-mainnav-link button {
|
|
344
|
+
color: #FFFFFF;
|
|
345
|
+
}
|
|
346
|
+
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header nav.mainnav pn-mainnav-level[data-level="1"] pn-mainnav-list > pn-mainnav-link a:focus, header[data-header-theme=dotcom] > pn-marketweb-siteheader > header nav.mainnav pn-mainnav-level[data-level="1"] pn-mainnav-list > pn-mainnav-link button:focus {
|
|
347
|
+
outline: none;
|
|
348
|
+
}
|
|
349
|
+
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header nav.mainnav pn-mainnav-level:not([data-level="1"]) {
|
|
350
|
+
background-color: #0D234B;
|
|
351
|
+
}
|
|
352
|
+
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header nav.mainnav pn-mainnav-level:not([data-level="1"]) pn-mainnav-list {
|
|
353
|
+
color: #FFFFFF;
|
|
354
|
+
}
|
|
355
|
+
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header nav.mainnav pn-mainnav-level:not([data-level="1"]) pn-mainnav-list pn-mainnav-link > a:hover {
|
|
356
|
+
background-color: #00A0D6;
|
|
357
|
+
text-decoration: none;
|
|
358
|
+
}
|
|
322
359
|
header[data-header-theme=dotcom] > pn-marketweb-siteheader > header [data-level="1"] pn-mainnav-link pn-icon.first-level_arrow svg > path {
|
|
323
360
|
fill: #FFFFFF;
|
|
324
361
|
}
|
|
@@ -453,8 +453,8 @@ const DotComSiteHeaderTemplate = ({ ...args }) => {
|
|
|
453
453
|
user-fullname="${args.name}"
|
|
454
454
|
user-loggedin="${args.loggedin}"
|
|
455
455
|
>
|
|
456
|
-
<pn-button slot="toprightend" small="true">Get started</pn-button>
|
|
457
|
-
<pn-button slot="menu-footer-cta" small="true">Get started</pn-button>
|
|
456
|
+
<pn-button slot="toprightend" href="http:www.google.se" small="true">Get started</pn-button>
|
|
457
|
+
<pn-button slot="menu-footer-cta" href="http:www.google.se" small="true">Get started</pn-button>
|
|
458
458
|
</pn-marketweb-siteheader>
|
|
459
459
|
</header>`;
|
|
460
460
|
};
|
|
@@ -91,7 +91,7 @@ pn-site-footer-col[theme=dotcom] div {
|
|
|
91
91
|
margin-bottom: 1.4rem;
|
|
92
92
|
}
|
|
93
93
|
pn-site-footer-col[theme=dotcom] div p:nth-child(odd) {
|
|
94
|
-
font-weight:
|
|
94
|
+
font-weight: 500;
|
|
95
95
|
}
|
|
96
96
|
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
|
97
97
|
pn-site-footer-col[theme=dotcom] div {
|