@postnord/pn-marketweb-components 2.4.28 → 2.4.31
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/index-4199ff85.js +4 -0
- package/cjs/loader.cjs.js +1 -1
- package/cjs/pn-cta-block.cjs.entry.js +33 -0
- package/cjs/pn-market-web-components.cjs.js +1 -1
- package/cjs/pn-multi-row-connected-dropdown.cjs.entry.js +1 -1
- package/cjs/pn-proxio-findprice.cjs.entry.js +23 -1
- package/collection/collection-manifest.json +1 -0
- package/collection/components/cta/pn-cta-block/cta-block.stories.js +252 -0
- package/collection/components/cta/pn-cta-block/pn-cta-block.css +187 -0
- package/collection/components/cta/pn-cta-block/pn-cta-block.js +169 -0
- package/collection/components/input/pn-multi-row-connected-dropdown/pn-multi-row-connected-dropdown.js +1 -1
- package/collection/components/widgets/pn-proxio-findprice/data.js +20 -0
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice.js +21 -1
- package/components/index.d.ts +1 -0
- package/components/index.js +1 -0
- package/components/pn-cta-block.d.ts +11 -0
- package/components/pn-cta-block.js +57 -0
- package/components/pn-multi-row-connected-dropdown.js +1 -1
- package/components/pn-proxio-findprice.js +24 -1
- package/esm/index-ee44c065.js +4 -0
- package/esm/loader.js +1 -1
- package/esm/pn-cta-block.entry.js +29 -0
- package/esm/pn-market-web-components.js +1 -1
- package/esm/pn-multi-row-connected-dropdown.entry.js +1 -1
- package/esm/pn-proxio-findprice.entry.js +23 -1
- package/esm-es5/index-ee44c065.js +1 -1
- package/esm-es5/loader.js +1 -1
- package/esm-es5/pn-cta-block.entry.js +1 -0
- package/esm-es5/pn-market-web-components.js +1 -1
- package/esm-es5/pn-multi-row-connected-dropdown.entry.js +1 -1
- package/esm-es5/pn-proxio-findprice.entry.js +1 -1
- package/package.json +1 -1
- package/pn-market-web-components/{p-b4416838.entry.js → p-40810921.entry.js} +1 -1
- package/pn-market-web-components/p-71740e7e.system.entry.js +1 -0
- package/pn-market-web-components/{p-83c85053.system.entry.js → p-74309671.system.entry.js} +1 -1
- package/pn-market-web-components/p-89b622ae.system.entry.js +1 -0
- package/pn-market-web-components/p-8a525a1a.entry.js +1 -0
- package/pn-market-web-components/p-f02617fc.entry.js +1 -0
- package/pn-market-web-components/p-fcdb7381.system.js +1 -1
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/types/components/cta/pn-cta-block/pn-cta-block.d.ts +14 -0
- package/types/components/widgets/pn-proxio-findprice/pn-proxio-findprice.d.ts +1 -0
- package/types/components.d.ts +29 -0
- package/pn-market-web-components/p-18aca162.system.entry.js +0 -1
- package/pn-market-web-components/p-372b4cad.entry.js +0 -1
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import readme from "./readme.md";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "CTA/Cta block",
|
|
5
|
+
parameters: {
|
|
6
|
+
notes: readme,
|
|
7
|
+
},
|
|
8
|
+
argTypes: {
|
|
9
|
+
pnBackgroundColor: {
|
|
10
|
+
options: ['blue25', 'coral50', 'gray25', 'green25'],
|
|
11
|
+
control: { type: 'select' },
|
|
12
|
+
},
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
const Template = ({ ...args }) => {
|
|
18
|
+
return `
|
|
19
|
+
<pn-breakpoints break-point-class="dotcom"></pn-breakpoints>
|
|
20
|
+
<div style="max-width: 1410px">
|
|
21
|
+
<pn-cta-block
|
|
22
|
+
is-centered="${args.isCentered}"
|
|
23
|
+
is-large="${args.isLarge}"
|
|
24
|
+
is-small="${args.isSmall}"
|
|
25
|
+
pn-background-color="${args.pnBackgroundColor}"
|
|
26
|
+
heading="${args.heading}"
|
|
27
|
+
body-text="${args.bodyText}"
|
|
28
|
+
content-top="${args.contentTop}">
|
|
29
|
+
<div slot="illustration">
|
|
30
|
+
<picture>
|
|
31
|
+
<img src="https://www.postnord.se/contentassets/5fe2c739644149e79d73c1082e575af3/success.svg" />
|
|
32
|
+
</picture>
|
|
33
|
+
</div>
|
|
34
|
+
<div slot="cta-button">
|
|
35
|
+
<pn-button class="cta-block__button " href=${args.buttonUrl}>${args.buttonText}</pn-button>
|
|
36
|
+
<a href=${args.linkUrl}>${args.linkText} <pn-icon symbol="arrow-right"> </pn-icon></a>
|
|
37
|
+
</div>
|
|
38
|
+
</pn-cta-block>
|
|
39
|
+
</div>
|
|
40
|
+
`;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const Primary = Template.bind({});
|
|
44
|
+
Primary.args = {
|
|
45
|
+
contentTop: false,
|
|
46
|
+
heading: 'PostNord erbjuder mycket',
|
|
47
|
+
bodyText: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras eu dolor mauris. Integer sed nulla id justo faucibus vestibulum consequat et ligula. Vestibulum varius quam in porttitor pellentesque.',
|
|
48
|
+
buttonText: "Våra tjänster",
|
|
49
|
+
buttonUrl: 'http://www.google.se',
|
|
50
|
+
linkText: 'Information',
|
|
51
|
+
linkUrl: 'http://www.bing.com',
|
|
52
|
+
pnBackgroundColor: ['blue25'],
|
|
53
|
+
isLarge: false,
|
|
54
|
+
isCentered: false,
|
|
55
|
+
isSmall: false,
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const LinkOnlyTemplate = ({ ...args }) => {
|
|
59
|
+
return `
|
|
60
|
+
<div style="max-width: 1410px">
|
|
61
|
+
<pn-cta-block
|
|
62
|
+
is-centered="${args.isCentered}"
|
|
63
|
+
is-large="${args.isLarge}"
|
|
64
|
+
is-small="${args.isSmall}"
|
|
65
|
+
pn-background-color="${args.pnBackgroundColor}"
|
|
66
|
+
heading="${args.heading}"
|
|
67
|
+
body-text="${args.bodyText}"
|
|
68
|
+
content-top="${args.contentTop}">
|
|
69
|
+
<div slot="illustration">
|
|
70
|
+
<picture>
|
|
71
|
+
<img src="https://www.postnord.se/contentassets/5fe2c739644149e79d73c1082e575af3/success.svg" />
|
|
72
|
+
</picture>
|
|
73
|
+
</div>
|
|
74
|
+
<div slot="cta-button">
|
|
75
|
+
<pn-button class="cta-block__button " href=${args.buttonUrl}>${args.buttonText}</pn-button>
|
|
76
|
+
<a href=${args.linkUrl}>${args.linkText} <pn-icon symbol="arrow-right"> </pn-icon></a>
|
|
77
|
+
</div>
|
|
78
|
+
</pn-cta-block>
|
|
79
|
+
</div>
|
|
80
|
+
`;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export const LinkOnly = LinkOnlyTemplate.bind({});
|
|
84
|
+
LinkOnly.args = {
|
|
85
|
+
heading: 'PostNord erbjuder mycket',
|
|
86
|
+
bodyText: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras eu dolor mauris. Integer sed nulla id justo faucibus vestibulum consequat et ligula. Vestibulum varius quam in porttitor pellentesque.',
|
|
87
|
+
buttonText: "Våra tjänster",
|
|
88
|
+
buttonUrl: '',
|
|
89
|
+
linkText: 'Information',
|
|
90
|
+
linkUrl: 'http://www.bing.com',
|
|
91
|
+
pnBackgroundColor: ['gray25'],
|
|
92
|
+
isLarge: true,
|
|
93
|
+
isCentered: false,
|
|
94
|
+
isSmall: false,
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
const TwoButtonLayoutTemplate = ({ ...args }) => {
|
|
99
|
+
return `
|
|
100
|
+
<div style="max-width: 1410px">
|
|
101
|
+
<pn-cta-block
|
|
102
|
+
is-centered="${args.isCentered}"
|
|
103
|
+
is-large="${args.isLarge}"
|
|
104
|
+
is-small="${args.isSmall}"
|
|
105
|
+
pn-background-color="${args.pnBackgroundColor}"
|
|
106
|
+
heading="${args.heading}"
|
|
107
|
+
body-text="${args.bodyText}"
|
|
108
|
+
content-top="${args.contentTop}">
|
|
109
|
+
<div slot="illustration">
|
|
110
|
+
<picture>
|
|
111
|
+
<img src="https://www.postnord.se/contentassets/5fe2c739644149e79d73c1082e575af3/success.svg" />
|
|
112
|
+
</picture>
|
|
113
|
+
</div>
|
|
114
|
+
<div slot="cta-button">
|
|
115
|
+
<pn-button class="cta-block__button " href=${args.buttonUrl}>${args.buttonText}</pn-button>
|
|
116
|
+
<pn-button appearance="light" class="cta-block__button " href=${args.buttonUrl}>${args.buttonText}</pn-button>
|
|
117
|
+
</div>
|
|
118
|
+
</pn-cta-block>
|
|
119
|
+
</div>
|
|
120
|
+
`;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export const TwoButtonLayout = TwoButtonLayoutTemplate.bind({});
|
|
124
|
+
TwoButtonLayout.args = {
|
|
125
|
+
heading: 'PostNord erbjuder mycket',
|
|
126
|
+
bodyText: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras eu dolor mauris. Integer sed nulla id justo faucibus vestibulum consequat et ligula. Vestibulum varius quam in porttitor pellentesque.',
|
|
127
|
+
buttonText: "Våra tjänster",
|
|
128
|
+
buttonUrl: 'http://www.google.se',
|
|
129
|
+
linkText: 'Information',
|
|
130
|
+
linkUrl: 'http://www.bing.com',
|
|
131
|
+
pnBackgroundColor: ['coral50'],
|
|
132
|
+
isLarge: true,
|
|
133
|
+
isCentered: false,
|
|
134
|
+
isSmall: false,
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
const NoImageTemplate = ({ ...args }) => {
|
|
138
|
+
return `
|
|
139
|
+
<div style="max-width: 1410px">
|
|
140
|
+
<pn-cta-block
|
|
141
|
+
is-centered="${args.isCentered}"
|
|
142
|
+
is-large="${args.isLarge}"
|
|
143
|
+
is-small="${args.isSmall}"
|
|
144
|
+
pn-background-color="${args.pnBackgroundColor}"
|
|
145
|
+
heading="${args.heading}"
|
|
146
|
+
body-text="${args.bodyText}"
|
|
147
|
+
content-top="${args.contentTop}">
|
|
148
|
+
<div slot="illustration">
|
|
149
|
+
<picture>
|
|
150
|
+
<img src="https://www.postnord.se/contentassets/5fe2c739644149e79d73c1082e575af3/success.svg" />
|
|
151
|
+
</picture>
|
|
152
|
+
</div>
|
|
153
|
+
<div slot="cta-button">
|
|
154
|
+
<pn-button class="cta-block__button " href=${args.buttonUrl}>${args.buttonText}</pn-button>
|
|
155
|
+
<a href=${args.linkUrl}>${args.linkText} <pn-icon symbol="arrow-right"> </pn-icon></a>
|
|
156
|
+
</div>
|
|
157
|
+
</pn-cta-block>
|
|
158
|
+
</div>
|
|
159
|
+
`;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export const NoImage = NoImageTemplate.bind({});
|
|
163
|
+
NoImage.args = {
|
|
164
|
+
heading: 'PostNord erbjuder mycket',
|
|
165
|
+
bodyText: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras eu dolor mauris. Integer sed nulla id justo faucibus vestibulum consequat et ligula. Vestibulum varius quam in porttitor pellentesque.',
|
|
166
|
+
buttonText: "Våra tjänster",
|
|
167
|
+
buttonUrl: 'http://www.google.se',
|
|
168
|
+
linkText: 'Information',
|
|
169
|
+
linkUrl: '',
|
|
170
|
+
pnBackgroundColor: ['gray25'],
|
|
171
|
+
isLarge: true,
|
|
172
|
+
isCentered: false,
|
|
173
|
+
isSmall: false,
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
const LargeTemplate = ({ ...args }) => {
|
|
177
|
+
return `
|
|
178
|
+
<div style="max-width: 1410px">
|
|
179
|
+
<pn-cta-block
|
|
180
|
+
is-centered="${args.isCentered}"
|
|
181
|
+
is-large="${args.isLarge}"
|
|
182
|
+
is-small="${args.isSmall}"
|
|
183
|
+
pn-background-color="${args.pnBackgroundColor}"
|
|
184
|
+
heading="${args.heading}"
|
|
185
|
+
body-text="${args.bodyText}"
|
|
186
|
+
content-top="${args.contentTop}">
|
|
187
|
+
<div slot="illustration">
|
|
188
|
+
<picture>
|
|
189
|
+
<img src="https://www.postnord.se/contentassets/5fe2c739644149e79d73c1082e575af3/success.svg" />
|
|
190
|
+
</picture>
|
|
191
|
+
</div>
|
|
192
|
+
<div slot="cta-button">
|
|
193
|
+
<pn-button class="cta-block__button " href=${args.buttonUrl}>${args.buttonText}</pn-button>
|
|
194
|
+
<a href=${args.linkUrl}>${args.linkText} <pn-icon symbol="arrow-right"> </pn-icon></a>
|
|
195
|
+
</div>
|
|
196
|
+
</pn-cta-block>
|
|
197
|
+
</div>
|
|
198
|
+
`;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export const Large = LargeTemplate.bind({});
|
|
202
|
+
Large.args = {
|
|
203
|
+
heading: 'PostNord erbjuder mycket',
|
|
204
|
+
bodyText: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras eu dolor mauris. Integer sed nulla id justo faucibus vestibulum consequat et ligula. Vestibulum varius quam in porttitor pellentesque.',
|
|
205
|
+
buttonText: "Våra tjänster",
|
|
206
|
+
buttonUrl: 'http://www.google.se',
|
|
207
|
+
linkText: 'Information',
|
|
208
|
+
linkUrl: 'http://www.bing.com',
|
|
209
|
+
pnBackgroundColor: ['blue25'],
|
|
210
|
+
isLarge: true,
|
|
211
|
+
isCentered: false,
|
|
212
|
+
isSmall: false,
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
const LargeCenteredTemplate = ({ ...args }) => {
|
|
216
|
+
return `
|
|
217
|
+
<div style="max-width: 1410px">
|
|
218
|
+
<pn-cta-block
|
|
219
|
+
is-centered="${args.isCentered}"
|
|
220
|
+
is-large="${args.isLarge}"
|
|
221
|
+
is-small="${args.isSmall}"
|
|
222
|
+
pn-background-color="${args.pnBackgroundColor}"
|
|
223
|
+
heading="${args.heading}"
|
|
224
|
+
body-text="${args.bodyText}"
|
|
225
|
+
content-top="${args.contentTop}">
|
|
226
|
+
<div slot="illustration">
|
|
227
|
+
<picture>
|
|
228
|
+
<img src="https://www.postnord.se/contentassets/5fe2c739644149e79d73c1082e575af3/success.svg" />
|
|
229
|
+
</picture>
|
|
230
|
+
</div>
|
|
231
|
+
<div slot="cta-button">
|
|
232
|
+
<pn-button class="cta-block__button " href=${args.buttonUrl}>${args.buttonText}</pn-button>
|
|
233
|
+
<a href=${args.linkUrl}>${args.linkText} <pn-icon symbol="arrow-right"> </pn-icon></a>
|
|
234
|
+
</div>
|
|
235
|
+
</pn-cta-block>
|
|
236
|
+
</div>
|
|
237
|
+
`;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export const LargeCentered = LargeCenteredTemplate.bind({});
|
|
241
|
+
LargeCentered.args = {
|
|
242
|
+
heading: 'PostNord erbjuder mycket',
|
|
243
|
+
bodyText: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras eu dolor mauris. Integer sed nulla id justo faucibus vestibulum consequat et ligula. Vestibulum varius quam in porttitor pellentesque.',
|
|
244
|
+
buttonText: "Våra tjänster",
|
|
245
|
+
buttonUrl: 'http://www.google.se',
|
|
246
|
+
linkText: 'Information',
|
|
247
|
+
linkUrl: 'http://www.bing.com',
|
|
248
|
+
pnBackgroundColor: ['blue25'],
|
|
249
|
+
isLarge: true,
|
|
250
|
+
isCentered: true,
|
|
251
|
+
isSmall: false,
|
|
252
|
+
};
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
pn-cta-block .cta-block {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: space-between;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
border-radius: 2.4rem;
|
|
6
|
+
padding: 3.2rem 2.4rem;
|
|
7
|
+
width: 100%;
|
|
8
|
+
}
|
|
9
|
+
@media screen and (min-width: 768px) {
|
|
10
|
+
pn-cta-block .cta-block {
|
|
11
|
+
flex-direction: row;
|
|
12
|
+
padding: 2.4rem;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
@media screen and (min-width: 1140px) {
|
|
16
|
+
pn-cta-block .cta-block {
|
|
17
|
+
margin-right: auto;
|
|
18
|
+
margin-left: auto;
|
|
19
|
+
max-width: 95%;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
@media screen and (min-width: 1440px) {
|
|
23
|
+
pn-cta-block .cta-block {
|
|
24
|
+
max-width: 90%;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
pn-cta-block .cta-block[pn-background-color=blue25] {
|
|
28
|
+
background-color: #EFFBFF;
|
|
29
|
+
}
|
|
30
|
+
pn-cta-block .cta-block[pn-background-color=coral50] {
|
|
31
|
+
background-color: #FDEFEE;
|
|
32
|
+
}
|
|
33
|
+
pn-cta-block .cta-block[pn-background-color=gray25] {
|
|
34
|
+
background-color: #F9F8F8;
|
|
35
|
+
}
|
|
36
|
+
pn-cta-block .cta-block[pn-background-color=green25] {
|
|
37
|
+
background-color: #EDFBF3;
|
|
38
|
+
}
|
|
39
|
+
pn-cta-block .cta-block--content-top .cta-block__content {
|
|
40
|
+
justify-content: flex-start;
|
|
41
|
+
}
|
|
42
|
+
@media screen and (min-width: 768px) {
|
|
43
|
+
pn-cta-block .cta-block--large .cta-block__heading {
|
|
44
|
+
font-size: 3.6rem;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
@media screen and (min-width: 768px) {
|
|
48
|
+
pn-cta-block .cta-block--large .cta-block__text {
|
|
49
|
+
font-size: 2rem;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
pn-cta-block .cta-block--small {
|
|
53
|
+
margin-right: auto;
|
|
54
|
+
margin-left: auto;
|
|
55
|
+
width: auto;
|
|
56
|
+
}
|
|
57
|
+
@media screen and (min-width: 992px) {
|
|
58
|
+
pn-cta-block .cta-block--small {
|
|
59
|
+
max-width: 75%;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
pn-cta-block .cta-block--center {
|
|
63
|
+
align-items: center;
|
|
64
|
+
flex-direction: column;
|
|
65
|
+
gap: 1.6rem;
|
|
66
|
+
padding: 3.2rem 2.4rem;
|
|
67
|
+
text-align: center;
|
|
68
|
+
}
|
|
69
|
+
@media screen and (min-width: 768px) {
|
|
70
|
+
pn-cta-block .cta-block--center .cta-block__content {
|
|
71
|
+
max-width: 74rem;
|
|
72
|
+
padding: 0;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
pn-cta-block .cta-block--center .cta-block__action {
|
|
76
|
+
margin-top: 0.8rem;
|
|
77
|
+
}
|
|
78
|
+
pn-cta-block .cta-block--center .cta-block__action > [slot=cta-button] {
|
|
79
|
+
gap: 0.8rem;
|
|
80
|
+
}
|
|
81
|
+
@media screen and (min-width: 768px) {
|
|
82
|
+
pn-cta-block .cta-block--center .cta-block__action {
|
|
83
|
+
flex-direction: row;
|
|
84
|
+
gap: 2.4rem;
|
|
85
|
+
margin-top: 1.6rem;
|
|
86
|
+
}
|
|
87
|
+
pn-cta-block .cta-block--center .cta-block__action.cta-block__button {
|
|
88
|
+
margin-bottom: 0;
|
|
89
|
+
}
|
|
90
|
+
pn-cta-block .cta-block--center .cta-block__action > [slot=cta-button] {
|
|
91
|
+
flex-direction: row;
|
|
92
|
+
gap: 2.4rem;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
@media screen and (min-width: 768px) {
|
|
96
|
+
pn-cta-block .cta-block--center .cta-block__image-wrapper {
|
|
97
|
+
display: block;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
pn-cta-block .cta-block--center .cta-block__image-wrapper > [slot=illustration] {
|
|
101
|
+
padding-right: 0;
|
|
102
|
+
}
|
|
103
|
+
pn-cta-block .cta-block__image-wrapper {
|
|
104
|
+
margin-bottom: 1.6rem;
|
|
105
|
+
}
|
|
106
|
+
pn-cta-block .cta-block__image-wrapper > [slot=illustration] > picture > img {
|
|
107
|
+
border-radius: 0.8rem;
|
|
108
|
+
max-width: 100%;
|
|
109
|
+
}
|
|
110
|
+
@media screen and (min-width: 768px) {
|
|
111
|
+
pn-cta-block .cta-block__image-wrapper {
|
|
112
|
+
display: none;
|
|
113
|
+
max-width: 20%;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
@media screen and (min-width: 992px) {
|
|
117
|
+
pn-cta-block .cta-block__image-wrapper {
|
|
118
|
+
display: block;
|
|
119
|
+
margin-bottom: 0;
|
|
120
|
+
}
|
|
121
|
+
pn-cta-block .cta-block__image-wrapper > [slot=illustration] {
|
|
122
|
+
padding-right: 3.2rem;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
pn-cta-block .cta-block__content {
|
|
126
|
+
display: flex;
|
|
127
|
+
flex: 1;
|
|
128
|
+
flex-direction: column;
|
|
129
|
+
justify-content: center;
|
|
130
|
+
}
|
|
131
|
+
@media screen and (min-width: 768px) {
|
|
132
|
+
pn-cta-block .cta-block__content {
|
|
133
|
+
padding-right: 2.4rem;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
@media screen and (min-width: 768px) {
|
|
137
|
+
pn-cta-block .cta-block__content .cta-block__heading {
|
|
138
|
+
max-width: 74rem;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
pn-cta-block .cta-block__content .cta-block__text {
|
|
142
|
+
margin-bottom: 2.4rem;
|
|
143
|
+
}
|
|
144
|
+
@media screen and (min-width: 768px) {
|
|
145
|
+
pn-cta-block .cta-block__content .cta-block__text {
|
|
146
|
+
max-width: 74rem;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
pn-cta-block .cta-block__heading {
|
|
150
|
+
margin-bottom: 0.8rem;
|
|
151
|
+
}
|
|
152
|
+
pn-cta-block .cta-block__action {
|
|
153
|
+
display: flex;
|
|
154
|
+
}
|
|
155
|
+
pn-cta-block .cta-block__action > [slot=cta-button] {
|
|
156
|
+
display: flex;
|
|
157
|
+
align-items: center;
|
|
158
|
+
flex-direction: column;
|
|
159
|
+
justify-content: center;
|
|
160
|
+
row-gap: 1.6rem;
|
|
161
|
+
}
|
|
162
|
+
@media screen and (min-width: 768px) {
|
|
163
|
+
pn-cta-block .cta-block__action > [slot=cta-button] {
|
|
164
|
+
gap: 1.6rem;
|
|
165
|
+
margin-top: 0;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
pn-cta-block .cta-block__action > [slot=cta-button] > a {
|
|
169
|
+
color: #005D92;
|
|
170
|
+
font-weight: 500;
|
|
171
|
+
font-size: 1.6rem;
|
|
172
|
+
padding: 0.1rem;
|
|
173
|
+
text-decoration: none;
|
|
174
|
+
}
|
|
175
|
+
pn-cta-block .cta-block__action > [slot=cta-button] > a pn-icon svg {
|
|
176
|
+
transition: transform 0.3s ease-in-out;
|
|
177
|
+
}
|
|
178
|
+
pn-cta-block .cta-block__action > [slot=cta-button] > a pn-icon svg path {
|
|
179
|
+
fill: #005D92;
|
|
180
|
+
}
|
|
181
|
+
pn-cta-block .cta-block__action > [slot=cta-button] > a:hover pn-icon svg {
|
|
182
|
+
transition: transform 0.3s ease-in-out;
|
|
183
|
+
transform: translateX(0.3rem);
|
|
184
|
+
}
|
|
185
|
+
pn-cta-block .cta-block__action > [slot=cta-button] > a:hover pn-icon svg path {
|
|
186
|
+
fill: #005D92;
|
|
187
|
+
}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
export class PnCtaBlock {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.heading = null;
|
|
5
|
+
this.bodyText = null;
|
|
6
|
+
this.pnBackgroundColor = null;
|
|
7
|
+
this.isLarge = false;
|
|
8
|
+
this.isCentered = false;
|
|
9
|
+
this.isSmall = false;
|
|
10
|
+
this.contentTop = false;
|
|
11
|
+
this.hasIllustrationSlot = true;
|
|
12
|
+
this.hasButtonSlot = true;
|
|
13
|
+
}
|
|
14
|
+
componentWillLoad() {
|
|
15
|
+
this.hasIllustrationSlot = !!this.hostElement.querySelector('[slot="illustration"]');
|
|
16
|
+
this.hasButtonSlot = !!this.hostElement.querySelector('[slot="cta-button"]');
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
return (h(Host, null, h("div", { "pn-background-color": this.pnBackgroundColor, class: `cta-block ${this.isLarge ? 'cta-block--large' : ''} ${this.isCentered ? 'cta-block--center' : ''} ${(this.isSmall ? 'cta-block--small' : '')} ${this.contentTop ? 'cta-block--content-top' : ''}` }, h("div", { class: "cta-block__image-wrapper" }, h("slot", { name: "illustration" })), h("div", { class: "cta-block__content" }, h("h2", { class: "cta-block__heading" }, this.heading), h("p", { class: "cta-block__text" }, this.bodyText)), h("div", { class: "cta-block__action" }, h("slot", { name: "cta-button" })))));
|
|
20
|
+
}
|
|
21
|
+
static get is() { return "pn-cta-block"; }
|
|
22
|
+
static get originalStyleUrls() {
|
|
23
|
+
return {
|
|
24
|
+
"$": ["pn-cta-block.scss"]
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
static get styleUrls() {
|
|
28
|
+
return {
|
|
29
|
+
"$": ["pn-cta-block.css"]
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
static get properties() {
|
|
33
|
+
return {
|
|
34
|
+
"heading": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"mutable": false,
|
|
37
|
+
"complexType": {
|
|
38
|
+
"original": "string",
|
|
39
|
+
"resolved": "string",
|
|
40
|
+
"references": {}
|
|
41
|
+
},
|
|
42
|
+
"required": false,
|
|
43
|
+
"optional": false,
|
|
44
|
+
"docs": {
|
|
45
|
+
"tags": [],
|
|
46
|
+
"text": ""
|
|
47
|
+
},
|
|
48
|
+
"attribute": "heading",
|
|
49
|
+
"reflect": false,
|
|
50
|
+
"defaultValue": "null"
|
|
51
|
+
},
|
|
52
|
+
"bodyText": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"mutable": false,
|
|
55
|
+
"complexType": {
|
|
56
|
+
"original": "string",
|
|
57
|
+
"resolved": "string",
|
|
58
|
+
"references": {}
|
|
59
|
+
},
|
|
60
|
+
"required": false,
|
|
61
|
+
"optional": false,
|
|
62
|
+
"docs": {
|
|
63
|
+
"tags": [],
|
|
64
|
+
"text": ""
|
|
65
|
+
},
|
|
66
|
+
"attribute": "body-text",
|
|
67
|
+
"reflect": false,
|
|
68
|
+
"defaultValue": "null"
|
|
69
|
+
},
|
|
70
|
+
"pnBackgroundColor": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"mutable": false,
|
|
73
|
+
"complexType": {
|
|
74
|
+
"original": "string",
|
|
75
|
+
"resolved": "string",
|
|
76
|
+
"references": {}
|
|
77
|
+
},
|
|
78
|
+
"required": false,
|
|
79
|
+
"optional": false,
|
|
80
|
+
"docs": {
|
|
81
|
+
"tags": [],
|
|
82
|
+
"text": ""
|
|
83
|
+
},
|
|
84
|
+
"attribute": "pn-background-color",
|
|
85
|
+
"reflect": false,
|
|
86
|
+
"defaultValue": "null"
|
|
87
|
+
},
|
|
88
|
+
"isLarge": {
|
|
89
|
+
"type": "boolean",
|
|
90
|
+
"mutable": false,
|
|
91
|
+
"complexType": {
|
|
92
|
+
"original": "boolean",
|
|
93
|
+
"resolved": "boolean",
|
|
94
|
+
"references": {}
|
|
95
|
+
},
|
|
96
|
+
"required": false,
|
|
97
|
+
"optional": false,
|
|
98
|
+
"docs": {
|
|
99
|
+
"tags": [],
|
|
100
|
+
"text": ""
|
|
101
|
+
},
|
|
102
|
+
"attribute": "is-large",
|
|
103
|
+
"reflect": false,
|
|
104
|
+
"defaultValue": "false"
|
|
105
|
+
},
|
|
106
|
+
"isCentered": {
|
|
107
|
+
"type": "boolean",
|
|
108
|
+
"mutable": false,
|
|
109
|
+
"complexType": {
|
|
110
|
+
"original": "boolean",
|
|
111
|
+
"resolved": "boolean",
|
|
112
|
+
"references": {}
|
|
113
|
+
},
|
|
114
|
+
"required": false,
|
|
115
|
+
"optional": false,
|
|
116
|
+
"docs": {
|
|
117
|
+
"tags": [],
|
|
118
|
+
"text": ""
|
|
119
|
+
},
|
|
120
|
+
"attribute": "is-centered",
|
|
121
|
+
"reflect": false,
|
|
122
|
+
"defaultValue": "false"
|
|
123
|
+
},
|
|
124
|
+
"isSmall": {
|
|
125
|
+
"type": "boolean",
|
|
126
|
+
"mutable": false,
|
|
127
|
+
"complexType": {
|
|
128
|
+
"original": "boolean",
|
|
129
|
+
"resolved": "boolean",
|
|
130
|
+
"references": {}
|
|
131
|
+
},
|
|
132
|
+
"required": false,
|
|
133
|
+
"optional": false,
|
|
134
|
+
"docs": {
|
|
135
|
+
"tags": [],
|
|
136
|
+
"text": ""
|
|
137
|
+
},
|
|
138
|
+
"attribute": "is-small",
|
|
139
|
+
"reflect": false,
|
|
140
|
+
"defaultValue": "false"
|
|
141
|
+
},
|
|
142
|
+
"contentTop": {
|
|
143
|
+
"type": "boolean",
|
|
144
|
+
"mutable": false,
|
|
145
|
+
"complexType": {
|
|
146
|
+
"original": "boolean",
|
|
147
|
+
"resolved": "boolean",
|
|
148
|
+
"references": {}
|
|
149
|
+
},
|
|
150
|
+
"required": false,
|
|
151
|
+
"optional": false,
|
|
152
|
+
"docs": {
|
|
153
|
+
"tags": [],
|
|
154
|
+
"text": ""
|
|
155
|
+
},
|
|
156
|
+
"attribute": "content-top",
|
|
157
|
+
"reflect": false,
|
|
158
|
+
"defaultValue": "false"
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
static get states() {
|
|
163
|
+
return {
|
|
164
|
+
"hasIllustrationSlot": {},
|
|
165
|
+
"hasButtonSlot": {}
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
static get elementRef() { return "hostElement"; }
|
|
169
|
+
}
|
|
@@ -184,7 +184,7 @@ export class PnMultiRowConnectedDropdown {
|
|
|
184
184
|
var _a;
|
|
185
185
|
return (h(Host, null, (_a = this.rowData) === null || _a === void 0 ? void 0 :
|
|
186
186
|
_a.map((data, i) => {
|
|
187
|
-
return (h("div", { class: 'generated-row-' + i, id: 'generated-row-connected-dropdown-' + i }, h("pn-multi-row-connected-dropdown-row", { "dropdown-data": this.dropdownData, "language-code": this.languageCode, label: this.label, "first-dropdown-label": this.firstDropdownLabel, "second-dropdown-label": this.secondDropdownLabel, "dropdown-placeholder": this.dropdownPlaceholder, "add-row-text": this.addRowText, "input-fild-label": this.inputFildLabel, "input-fild-placeholder": this.inputFildPlaceholder, "date-button-text": this.dateButtonText, "date-placeholder": this.datePlaceholder, "date-days-from-today":
|
|
187
|
+
return (h("div", { class: 'generated-row-' + i, id: 'generated-row-connected-dropdown-' + i }, h("pn-multi-row-connected-dropdown-row", { "dropdown-data": this.dropdownData, "language-code": this.languageCode, label: this.label, "first-dropdown-label": this.firstDropdownLabel, "second-dropdown-label": this.secondDropdownLabel, "dropdown-placeholder": this.dropdownPlaceholder, "add-row-text": this.addRowText, "input-fild-label": this.inputFildLabel, "input-fild-placeholder": this.inputFildPlaceholder, "date-button-text": this.dateButtonText, "date-placeholder": this.datePlaceholder, "date-days-from-today": this.dateDaysFromToday, "allow-multiple-dates": this.allowMultipleDates, "start-date-label": this.startDateLabel, "end-date-label": this.endDateLabel, "multi-date-helper-text": this.multiDateHelperText, "generate-dates-button-text": this.generateDatesButtonText, "save-date-button-text": this.saveDateButtonText, "no-dates-text": this.noDatesText, index: i, "predefined-value": JSON.stringify(data), "years-to-add-to-end-date": this.yearsToAddToEndDate })));
|
|
188
188
|
}), this.allowMultipleRows ? (h("div", { class: "connected-dropdown__row" }, h("pn-button", { "icon-only": this.addRowText ? false : true, "left-icon": "true", "aria-label": "Add", icon: "plus", appearance: "light", variant: "borderless", class: "connected-dropdown__button-right", onClick: () => {
|
|
189
189
|
this.addRow();
|
|
190
190
|
} }, this.addRowText))) : null));
|
|
@@ -52,6 +52,26 @@ const weights = {
|
|
|
52
52
|
{ name: "30 kg", abbreviation: 'kg', value: 30000 },
|
|
53
53
|
{ name: "35 kg", abbreviation: 'kg', value: 35000 },
|
|
54
54
|
]
|
|
55
|
+
},
|
|
56
|
+
"dk01012024": {
|
|
57
|
+
"S": [
|
|
58
|
+
{ name: "100 g", abbreviation: 'g', value: 100 },
|
|
59
|
+
{ name: "250 g", abbreviation: 'g', value: 250 },
|
|
60
|
+
{ name: "500 g", abbreviation: 'g', value: 500 },
|
|
61
|
+
{ name: "1 kg", abbreviation: 'kg', value: 1000 },
|
|
62
|
+
{ name: "2 kg", abbreviation: 'kg', value: 2000 },
|
|
63
|
+
],
|
|
64
|
+
"M": [],
|
|
65
|
+
"L": [
|
|
66
|
+
{ name: "2 kg", abbreviation: 'kg', value: 2000 },
|
|
67
|
+
{ name: "5 kg", abbreviation: 'kg', value: 5000 },
|
|
68
|
+
{ name: "10 kg", abbreviation: 'kg', value: 10000 },
|
|
69
|
+
{ name: "15 kg", abbreviation: 'kg', value: 15000 },
|
|
70
|
+
{ name: "20 kg", abbreviation: 'kg', value: 20000 },
|
|
71
|
+
{ name: "25 kg", abbreviation: 'kg', value: 25000 },
|
|
72
|
+
{ name: "30 kg", abbreviation: 'kg', value: 30000 },
|
|
73
|
+
{ name: "35 kg", abbreviation: 'kg', value: 35000 },
|
|
74
|
+
]
|
|
55
75
|
}
|
|
56
76
|
};
|
|
57
77
|
|
|
@@ -18,6 +18,7 @@ export class PnProxioFindPrice {
|
|
|
18
18
|
this.showMedium = false;
|
|
19
19
|
this.showInternational = false;
|
|
20
20
|
this.maxAbroadKg = 0;
|
|
21
|
+
this.weightListName = "";
|
|
21
22
|
this.cache = false;
|
|
22
23
|
this.filteredItems = [];
|
|
23
24
|
this.weight = { value: 0, name: "" };
|
|
@@ -157,7 +158,8 @@ export class PnProxioFindPrice {
|
|
|
157
158
|
}
|
|
158
159
|
getWeights() {
|
|
159
160
|
var _a;
|
|
160
|
-
let
|
|
161
|
+
let weightListName = this.market + this.weightListName;
|
|
162
|
+
let marketWeightsArray = (_a = weights[weightListName]) !== null && _a !== void 0 ? _a : { "S": [], "M": [], "L": [] };
|
|
161
163
|
let marketWeights = marketWeightsArray[this.sizecategory.unit];
|
|
162
164
|
let isInternationalWeights = this.maxAbroadKg != 0 && this.countrycodevalue.toLowerCase() !== this.market.toLowerCase();
|
|
163
165
|
marketWeights = isInternationalWeights ? marketWeights.filter(number => (number.value / 1000) <= this.maxAbroadKg) : marketWeights;
|
|
@@ -300,6 +302,24 @@ export class PnProxioFindPrice {
|
|
|
300
302
|
"reflect": false,
|
|
301
303
|
"defaultValue": "0"
|
|
302
304
|
},
|
|
305
|
+
"weightListName": {
|
|
306
|
+
"type": "string",
|
|
307
|
+
"mutable": false,
|
|
308
|
+
"complexType": {
|
|
309
|
+
"original": "string",
|
|
310
|
+
"resolved": "string",
|
|
311
|
+
"references": {}
|
|
312
|
+
},
|
|
313
|
+
"required": false,
|
|
314
|
+
"optional": false,
|
|
315
|
+
"docs": {
|
|
316
|
+
"tags": [],
|
|
317
|
+
"text": ""
|
|
318
|
+
},
|
|
319
|
+
"attribute": "weight-list-name",
|
|
320
|
+
"reflect": false,
|
|
321
|
+
"defaultValue": "\"\""
|
|
322
|
+
},
|
|
303
323
|
"cache": {
|
|
304
324
|
"type": "boolean",
|
|
305
325
|
"mutable": false,
|