@postnord/pn-marketweb-components 2.9.0 → 2.9.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/cjs/loader.cjs.js +1 -1
- package/cjs/pn-cta-block.cjs.entry.js +7 -2
- package/cjs/pn-market-web-components.cjs.js +1 -1
- package/cjs/pn-media-block.cjs.entry.js +7 -39
- package/cjs/pn-multi-row-connected-dropdown-row.cjs.entry.js +2 -0
- package/cjs/pn-play-on-scroll.cjs.entry.js +3 -2
- package/cjs/pn-usp-promoter.cjs.entry.js +9 -4
- package/collection/components/animation/pn-play-on-scroll/pn-play-on-scroll.js +3 -2
- package/collection/components/animation/pn-play-on-scroll/pn-play-on-scroll.stories.js +6 -86
- package/collection/components/cta/pn-cta-block/cta-block.stories.js +90 -21
- package/collection/components/cta/pn-cta-block/pn-cta-block.css +35 -20
- package/collection/components/cta/pn-cta-block/pn-cta-block.js +6 -1
- package/collection/components/input/pn-multi-row-connected-dropdown/pn-multi-row-connected-dropdown-row.js +2 -0
- package/collection/components/media/pn-media-block/media-block.stories.js +6 -15
- package/collection/components/media/pn-media-block/pn-media-block.css +20 -2
- package/collection/components/media/pn-media-block/pn-media-block.js +24 -57
- package/collection/components/widgets/pn-usp-promoter/pn-usp-promoter.css +12 -3
- package/collection/components/widgets/pn-usp-promoter/pn-usp-promoter.js +8 -3
- package/collection/components/widgets/pn-usp-promoter/usp-promoter.stories.js +13 -13
- package/collection/globals/storybookGlobals.js +10 -0
- package/components/pn-cta-block.js +7 -2
- package/components/pn-media-block.js +8 -40
- package/components/pn-multi-row-connected-dropdown-row2.js +2 -0
- package/components/pn-play-on-scroll2.js +3 -2
- package/components/pn-usp-promoter.js +9 -4
- package/esm/loader.js +1 -1
- package/esm/pn-cta-block.entry.js +7 -2
- package/esm/pn-market-web-components.js +1 -1
- package/esm/pn-media-block.entry.js +7 -39
- package/esm/pn-multi-row-connected-dropdown-row.entry.js +2 -0
- package/esm/pn-play-on-scroll.entry.js +3 -2
- package/esm/pn-usp-promoter.entry.js +9 -4
- package/esm-es5/loader.js +1 -1
- package/esm-es5/pn-cta-block.entry.js +1 -1
- package/esm-es5/pn-market-web-components.js +1 -1
- package/esm-es5/pn-media-block.entry.js +1 -1
- package/esm-es5/pn-multi-row-connected-dropdown-row.entry.js +1 -1
- package/esm-es5/pn-play-on-scroll.entry.js +1 -1
- package/esm-es5/pn-usp-promoter.entry.js +1 -1
- package/package.json +1 -1
- package/pn-market-web-components/p-0c50ded4.entry.js +1 -0
- package/pn-market-web-components/p-4bcf66cb.entry.js +1 -0
- package/pn-market-web-components/p-4f6ebbda.system.entry.js +1 -0
- package/pn-market-web-components/p-6f853c29.system.js +1 -1
- package/pn-market-web-components/p-928ced33.system.entry.js +1 -0
- package/pn-market-web-components/p-9f6c833e.entry.js +1 -0
- package/pn-market-web-components/p-aadb8ed1.system.entry.js +1 -0
- package/pn-market-web-components/p-b0055a00.entry.js +1 -0
- package/pn-market-web-components/p-bc27295a.system.entry.js +1 -0
- package/pn-market-web-components/p-dc136523.entry.js +1 -0
- package/pn-market-web-components/p-ec116d47.system.entry.js +1 -0
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/types/components/animation/pn-play-on-scroll/pn-play-on-scroll.d.ts +1 -0
- package/types/components/media/pn-media-block/pn-media-block.d.ts +1 -1
- package/types/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.d.ts +1 -1
- package/types/components.d.ts +2 -2
- package/types/globals/storybookGlobals.d.ts +10 -0
- package/pn-market-web-components/p-395105d0.system.entry.js +0 -1
- package/pn-market-web-components/p-42e969c9.system.entry.js +0 -1
- package/pn-market-web-components/p-5033c1d0.system.entry.js +0 -1
- package/pn-market-web-components/p-8c41af0e.entry.js +0 -1
- package/pn-market-web-components/p-a2ed2bf6.entry.js +0 -1
- package/pn-market-web-components/p-c1738e39.entry.js +0 -1
- package/pn-market-web-components/p-dcf7b3fc.system.entry.js +0 -1
- package/pn-market-web-components/p-df1142cc.entry.js +0 -1
- package/pn-market-web-components/p-e3b61a83.entry.js +0 -1
- package/pn-market-web-components/p-e4d68a16.system.entry.js +0 -1
|
@@ -14,7 +14,6 @@ export default {
|
|
|
14
14
|
imageSrcSmallScreenFormat: { type: 'string' },
|
|
15
15
|
imageAltText: { type: 'string' },
|
|
16
16
|
videoSrc: { type: 'string' },
|
|
17
|
-
parallaxScroll: { type: 'boolean' },
|
|
18
17
|
showOverlayLayer: { type: 'boolean' },
|
|
19
18
|
customOverlayBackground: { type: 'string' },
|
|
20
19
|
animateOverlayBackground: { type: 'boolean' },
|
|
@@ -40,12 +39,12 @@ const Template = ({ ...args }) => {
|
|
|
40
39
|
image-src="${args.imageSrc}"
|
|
41
40
|
image-src-small-screen-format="${args.imageSrcSmallScreenFormat}"
|
|
42
41
|
image-alt-text="${args.imageAltText}"
|
|
43
|
-
parallax-scroll="${args.parallaxScroll}"
|
|
44
42
|
show-overlay-layer="${args.showOverlayLayer}"
|
|
45
43
|
custom-overlay-background="${args.customOverlayBackground}"
|
|
46
44
|
animate-overlay-background="${args.animateOverlayBackground}"
|
|
47
45
|
scroll-snap-block="${args.scrollSnapBlock}"
|
|
48
46
|
fixed-background="${args.fixedBackground}"
|
|
47
|
+
margin-bottom="${args.marginBottom}"
|
|
49
48
|
block-heading="${args.blockHeading}"
|
|
50
49
|
block-heading-level="${args.blockHeadingLevel}"
|
|
51
50
|
block-preamble="${args.blockPreamble}">
|
|
@@ -60,10 +59,10 @@ export const Default = Template.bind({});
|
|
|
60
59
|
Default.args = {
|
|
61
60
|
blockHeight : '100svh',
|
|
62
61
|
imageSrc : 'https://i.redd.it/connections-5160x2160-v0-o914e0x2jkfc1.png?s=5c46aceebe337175ad192d5edb0ed9f66fd3e130',
|
|
63
|
-
parallaxScroll : false,
|
|
64
62
|
showOverlayLayer : true,
|
|
65
63
|
scrollSnapBlock : false,
|
|
66
64
|
fixedBackground : false,
|
|
65
|
+
marginBottom : false,
|
|
67
66
|
blockHeadingLevel: 2,
|
|
68
67
|
blockHeading: "Maximize your e-commerce potential",
|
|
69
68
|
blockPreamble: "Enhance your customers shopping journey. We have simplified delivery solutions for a global marketplace.",
|
|
@@ -73,7 +72,6 @@ export const FixedBackground = Template.bind({});
|
|
|
73
72
|
FixedBackground.args = {
|
|
74
73
|
blockHeight : '100svh',
|
|
75
74
|
imageSrc : 'https://i.redd.it/connections-5160x2160-v0-o914e0x2jkfc1.png?s=5c46aceebe337175ad192d5edb0ed9f66fd3e130',
|
|
76
|
-
parallaxScroll : false,
|
|
77
75
|
showOverlayLayer : true,
|
|
78
76
|
scrollSnapBlock : false,
|
|
79
77
|
fixedBackground : true,
|
|
@@ -86,7 +84,6 @@ export const CompactHeightBlock = Template.bind({});
|
|
|
86
84
|
CompactHeightBlock.args = {
|
|
87
85
|
blockHeight : '65svh',
|
|
88
86
|
imageSrc : 'https://i.redd.it/connections-5160x2160-v0-o914e0x2jkfc1.png?s=5c46aceebe337175ad192d5edb0ed9f66fd3e130',
|
|
89
|
-
parallaxScroll : false,
|
|
90
87
|
showOverlayLayer : true,
|
|
91
88
|
scrollSnapBlock : false,
|
|
92
89
|
fixedBackground : true,
|
|
@@ -99,7 +96,6 @@ export const DynamicHeight = Template.bind({});
|
|
|
99
96
|
DynamicHeight.args = {
|
|
100
97
|
blockHeight : 'dynamic',
|
|
101
98
|
imageSrc : 'https://i.redd.it/connections-5160x2160-v0-o914e0x2jkfc1.png?s=5c46aceebe337175ad192d5edb0ed9f66fd3e130',
|
|
102
|
-
parallaxScroll : false,
|
|
103
99
|
showOverlayLayer : true,
|
|
104
100
|
scrollSnapBlock : false,
|
|
105
101
|
fixedBackground : false,
|
|
@@ -114,7 +110,6 @@ MultipleSrc.args = {
|
|
|
114
110
|
imageSrc : 'https://i.redd.it/connections-5160x2160-v0-o914e0x2jkfc1.png?s=5c46aceebe337175ad192d5edb0ed9f66fd3e130',
|
|
115
111
|
imageSrcSmallScreenFormat : 'https://picsum.photos/1200/1200',
|
|
116
112
|
imageAltText : 'This is an image',
|
|
117
|
-
parallaxScroll : true,
|
|
118
113
|
showOverlayLayer : true,
|
|
119
114
|
scrollSnapBlock : false,
|
|
120
115
|
fixedBackground : false,
|
|
@@ -127,7 +122,6 @@ export const ParallaxBackground = Template.bind({});
|
|
|
127
122
|
ParallaxBackground.args = {
|
|
128
123
|
blockHeight : '100svh',
|
|
129
124
|
imageSrc : 'https://i.redd.it/connections-5160x2160-v0-o914e0x2jkfc1.png?s=5c46aceebe337175ad192d5edb0ed9f66fd3e130',
|
|
130
|
-
parallaxScroll : true,
|
|
131
125
|
showOverlayLayer : true,
|
|
132
126
|
scrollSnapBlock : false,
|
|
133
127
|
fixedBackground : false,
|
|
@@ -140,7 +134,6 @@ export const ScrollSnap = Template.bind({});
|
|
|
140
134
|
ScrollSnap.args = {
|
|
141
135
|
blockHeight : '100svh',
|
|
142
136
|
imageSrc : 'https://i.redd.it/connections-5160x2160-v0-o914e0x2jkfc1.png?s=5c46aceebe337175ad192d5edb0ed9f66fd3e130',
|
|
143
|
-
parallaxScroll : true,
|
|
144
137
|
showOverlayLayer : true,
|
|
145
138
|
scrollSnapBlock : true,
|
|
146
139
|
fixedBackground : false,
|
|
@@ -153,7 +146,6 @@ export const CustomOverlayBackground = Template.bind({});
|
|
|
153
146
|
CustomOverlayBackground.args = {
|
|
154
147
|
blockHeight : '100svh',
|
|
155
148
|
imageSrc : 'https://i.redd.it/connections-5160x2160-v0-o914e0x2jkfc1.png?s=5c46aceebe337175ad192d5edb0ed9f66fd3e130',
|
|
156
|
-
parallaxScroll : false,
|
|
157
149
|
showOverlayLayer : true,
|
|
158
150
|
customOverlayBackground : "linear-gradient(180deg, #0d234b, transparent)",
|
|
159
151
|
scrollSnapBlock : true,
|
|
@@ -167,7 +159,6 @@ export const AnimateOverlayBackground = Template.bind({});
|
|
|
167
159
|
AnimateOverlayBackground.args = {
|
|
168
160
|
blockHeight : '100svh',
|
|
169
161
|
imageSrc : 'https://i.redd.it/connections-5160x2160-v0-o914e0x2jkfc1.png?s=5c46aceebe337175ad192d5edb0ed9f66fd3e130',
|
|
170
|
-
parallaxScroll : false,
|
|
171
162
|
showOverlayLayer : true,
|
|
172
163
|
customOverlayBackground : "linear-gradient(90deg, rgba(131,58,180,0.8253676470588236) 0%, rgba(253,29,29,0.1783088235294118) 50%, rgba(252,176,69,0.727328431372549) 100%)",
|
|
173
164
|
animateOverlayBackground : true,
|
|
@@ -186,7 +177,6 @@ const TemplateWithLink = ({ ...args }) => {
|
|
|
186
177
|
<pn-media-block
|
|
187
178
|
block-height="${args.blockHeight}"
|
|
188
179
|
image-src="${args.imageSrc}"
|
|
189
|
-
parallax-scroll="${args.parallaxScroll}"
|
|
190
180
|
show-overlay-layer="${args.showOverlayLayer}"
|
|
191
181
|
scroll-snap-block="${args.scrollSnapBlock}"
|
|
192
182
|
fixed-background="${args.fixedBackground}"
|
|
@@ -211,7 +201,6 @@ export const WithLink = TemplateWithLink.bind({});
|
|
|
211
201
|
WithLink.args = {
|
|
212
202
|
blockHeight : '100svh',
|
|
213
203
|
imageSrc : 'https://i.redd.it/connections-5160x2160-v0-o914e0x2jkfc1.png?s=5c46aceebe337175ad192d5edb0ed9f66fd3e130',
|
|
214
|
-
parallaxScroll : false,
|
|
215
204
|
fixedBackground : true,
|
|
216
205
|
showOverlayLayer : true,
|
|
217
206
|
blockHeading: "Maximize your e-commerce potential",
|
|
@@ -224,12 +213,13 @@ WithLink.args = {
|
|
|
224
213
|
|
|
225
214
|
const TemplateVideo = ({ ...args }) => {
|
|
226
215
|
return `
|
|
216
|
+
<br>
|
|
217
|
+
<div style="background-color: #f5f5f5; border: 5px solid black; height: 400px; display: flex; align-items: center; justify-content: center; margin-top: 240px; margin-bottom: 240px;"><h2>This is another block</h2></div>
|
|
227
218
|
<br>
|
|
228
219
|
<div style="background-color: #f5f5f5; border: 5px solid black; height: 400px; display: flex; align-items: center; justify-content: center; margin-top: 240px; margin-bottom: 240px;"><h2>This is another block</h2></div>
|
|
229
220
|
<br>
|
|
230
221
|
<pn-media-block block-height="${args.blockHeight}"
|
|
231
222
|
video-src="${args.videoSrc}"
|
|
232
|
-
parallax-scroll="${args.parallaxScroll}"
|
|
233
223
|
show-overlay-layer="${args.showOverlayLayer}"
|
|
234
224
|
scroll-snap-block="${args.scrollSnapBlock}"
|
|
235
225
|
fixed-background="${args.fixedBackground}"
|
|
@@ -240,6 +230,8 @@ const TemplateVideo = ({ ...args }) => {
|
|
|
240
230
|
<br>
|
|
241
231
|
<div style="background-color: #f5f5f5; border: 5px solid black; height: 400px; display: flex; align-items: center; justify-content: center; margin-top: 240px; margin-bottom: 240px;"><h2>This is another block</h2></div>
|
|
242
232
|
<br>
|
|
233
|
+
<div style="background-color: #f5f5f5; border: 5px solid black; height: 400px; display: flex; align-items: center; justify-content: center; margin-top: 240px; margin-bottom: 240px;"><h2>This is another block</h2></div>
|
|
234
|
+
<br>
|
|
243
235
|
`;
|
|
244
236
|
};
|
|
245
237
|
|
|
@@ -247,7 +239,6 @@ export const Video = TemplateVideo.bind({});
|
|
|
247
239
|
Video.args = {
|
|
248
240
|
blockHeight : '100svh',
|
|
249
241
|
videoSrc : 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4',
|
|
250
|
-
parallaxScroll : false,
|
|
251
242
|
fixedBackground : false,
|
|
252
243
|
showOverlayLayer : true,
|
|
253
244
|
blockHeading: "Maximize your e-commerce potential",
|
|
@@ -169,7 +169,7 @@ pn-media-block .media-block .media-block__content-container .media-block__cta-li
|
|
|
169
169
|
margin-top: 3rem;
|
|
170
170
|
}
|
|
171
171
|
pn-media-block .media-block--height-100svh {
|
|
172
|
-
height: 100vh;
|
|
172
|
+
min-height: 100vh;
|
|
173
173
|
}
|
|
174
174
|
@supports (height: 100svh) {
|
|
175
175
|
pn-media-block .media-block--height-100svh {
|
|
@@ -201,7 +201,7 @@ pn-media-block .media-block--height-100svh .media-block__block-container .media-
|
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
pn-media-block .media-block--height-65svh {
|
|
204
|
-
height: 65svh;
|
|
204
|
+
min-height: 65svh;
|
|
205
205
|
overflow: auto;
|
|
206
206
|
}
|
|
207
207
|
pn-media-block .media-block--height-65svh .media-block__block-container {
|
|
@@ -280,4 +280,22 @@ pn-media-block .media-block--animate-overlay-background .media-block__overlay-fi
|
|
|
280
280
|
100% {
|
|
281
281
|
background-position: 100% 100%;
|
|
282
282
|
}
|
|
283
|
+
}
|
|
284
|
+
pn-media-block .media-block--margin-bottom {
|
|
285
|
+
margin-bottom: 3.2rem;
|
|
286
|
+
}
|
|
287
|
+
@media screen and (min-width: 768px) {
|
|
288
|
+
pn-media-block .media-block--margin-bottom {
|
|
289
|
+
margin-bottom: 4rem;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
@media screen and (min-width: 992px) {
|
|
293
|
+
pn-media-block .media-block--margin-bottom {
|
|
294
|
+
margin-bottom: 5.6rem;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
@media screen and (min-width: 1200px) {
|
|
298
|
+
pn-media-block .media-block--margin-bottom {
|
|
299
|
+
margin-bottom: 7.2rem;
|
|
300
|
+
}
|
|
283
301
|
}
|
|
@@ -1,22 +1,15 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
function userPrefersReducedMotion() {
|
|
3
|
-
return window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
4
|
-
}
|
|
5
2
|
export class PnmediaBlock {
|
|
6
3
|
constructor() {
|
|
7
4
|
this.handleScroll = () => {
|
|
8
|
-
if (!this.parallaxScroll)
|
|
9
|
-
return;
|
|
10
5
|
const mediaBlockElement = this.block.firstElementChild;
|
|
11
6
|
const scrollTrigger = this.block.querySelector('#scroll-trigger');
|
|
12
7
|
const videoPauseButton = this.block.querySelector('#overlayed-button-pause-video');
|
|
13
8
|
const scrollTriggerTop = scrollTrigger.getBoundingClientRect().top;
|
|
14
9
|
const mediaBlockElementHeight = mediaBlockElement.offsetHeight;
|
|
15
10
|
const scrollPosition = mediaBlockElementHeight - scrollTriggerTop;
|
|
16
|
-
const parallaxSpeedContent = 0.3;
|
|
17
11
|
const parallaxSpeedMedia = 0.2;
|
|
18
12
|
const mediaContainer = this.block.querySelector('.media-block__media-container');
|
|
19
|
-
const content = this.block.querySelector('.media-block__content-container');
|
|
20
13
|
if (mediaContainer != null) {
|
|
21
14
|
// Move the image or video at a slower speed
|
|
22
15
|
mediaContainer.style.transform = `translate(0, ${scrollPosition * (0.1 + parallaxSpeedMedia)}px)`;
|
|
@@ -25,25 +18,18 @@ export class PnmediaBlock {
|
|
|
25
18
|
videoPauseButton.style.transform = `translate(0, ${-scrollPosition * (0.3 + parallaxSpeedMedia)}px)`;
|
|
26
19
|
}
|
|
27
20
|
}
|
|
28
|
-
if (content) {
|
|
29
|
-
// Move the content at a faster speed
|
|
30
|
-
content.style.transform = `translate(0, ${scrollPosition * (0.5 + parallaxSpeedContent)}px)`;
|
|
31
|
-
// Change the opacity based on the scroll position
|
|
32
|
-
const opacity = Math.max(0, 1 - scrollPosition / 600);
|
|
33
|
-
content.style.opacity = `${opacity}`;
|
|
34
|
-
}
|
|
35
21
|
};
|
|
36
22
|
this.blockHeight = null;
|
|
37
23
|
this.imageSrc = null;
|
|
38
24
|
this.imageSrcSmallScreenFormat = undefined;
|
|
39
25
|
this.imageAltText = "";
|
|
40
26
|
this.videoSrc = null;
|
|
41
|
-
this.parallaxScroll = false;
|
|
42
27
|
this.showOverlayLayer = false;
|
|
43
28
|
this.customOverlayBackground = null;
|
|
44
29
|
this.animateOverlayBackground = false;
|
|
45
30
|
this.scrollSnapBlock = false;
|
|
46
31
|
this.fixedBackground = false;
|
|
32
|
+
this.marginBottom = false;
|
|
47
33
|
this.blockHeading = null;
|
|
48
34
|
this.blockHeadingLevel = 2;
|
|
49
35
|
this.blockPreamble = null;
|
|
@@ -78,31 +64,12 @@ export class PnmediaBlock {
|
|
|
78
64
|
this.hasButtonSlot = !!this.block.querySelector('[slot="cta-button"]');
|
|
79
65
|
}
|
|
80
66
|
async componentDidLoad() {
|
|
81
|
-
if (userPrefersReducedMotion()) {
|
|
82
|
-
// Handle the case where the user prefers reduced motion.
|
|
83
|
-
// For example, you might disable parallax scrolling:
|
|
84
|
-
this.parallaxScroll = false;
|
|
85
|
-
}
|
|
86
67
|
const scrollTrigger = document.getElementById('scroll-trigger');
|
|
87
68
|
this.calculatedBlockHeight = this.block.offsetHeight;
|
|
88
69
|
const overlayElement = this.block.querySelector('#mediaBlockOverlay');
|
|
89
70
|
if (this.customOverlayBackground != null || this.customOverlayBackground != "undefined") {
|
|
90
71
|
overlayElement.style.background = `${this.customOverlayBackground}`;
|
|
91
72
|
}
|
|
92
|
-
if (this.parallaxScroll) {
|
|
93
|
-
this.observerScroll = new IntersectionObserver(entries => {
|
|
94
|
-
entries.forEach(entry => {
|
|
95
|
-
if (entry.isIntersecting) {
|
|
96
|
-
window.addEventListener('scroll', this.handleScroll);
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
window.removeEventListener('scroll', this.handleScroll);
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
}, { rootMargin: `0px 0px` });
|
|
103
|
-
this.observerScroll.observe(scrollTrigger);
|
|
104
|
-
}
|
|
105
|
-
;
|
|
106
73
|
if (this.scrollSnapBlock) {
|
|
107
74
|
this.observerSnap = new IntersectionObserver(entries => {
|
|
108
75
|
entries.forEach(entry => {
|
|
@@ -138,7 +105,7 @@ export class PnmediaBlock {
|
|
|
138
105
|
window.removeEventListener('scroll', this.handleScroll);
|
|
139
106
|
}
|
|
140
107
|
render() {
|
|
141
|
-
const { showOverlayLayer, fixedBackground, blockHeight, scrollSnapBlock, blockHeadingLevelChecked, hasButtonSlot, hasVideo, hasImage, animateOverlayBackground } = this;
|
|
108
|
+
const { showOverlayLayer, fixedBackground, blockHeight, scrollSnapBlock, blockHeadingLevelChecked, hasButtonSlot, hasVideo, hasImage, animateOverlayBackground, marginBottom } = this;
|
|
142
109
|
const HeadingTag = `h${blockHeadingLevelChecked !== null && blockHeadingLevelChecked !== void 0 ? blockHeadingLevelChecked : 2}`;
|
|
143
110
|
const isVideo = hasVideo;
|
|
144
111
|
const isImage = hasImage;
|
|
@@ -149,12 +116,12 @@ export class PnmediaBlock {
|
|
|
149
116
|
animateOverlayBackground ? `media-block--animate-overlay-background` : '',
|
|
150
117
|
isVideo ? 'media-block--video' : '',
|
|
151
118
|
scrollSnapBlock ? 'scroll-snap' : 'no-scroll-snap',
|
|
152
|
-
fixedBackground ? 'media-block--fixed-background' : ''
|
|
119
|
+
fixedBackground ? 'media-block--fixed-background' : '',
|
|
120
|
+
marginBottom ? 'media-block--margin-bottom' : ''
|
|
153
121
|
].join(' ');
|
|
154
122
|
const pnPlayOnScrollObserverOptions = {
|
|
155
|
-
root: this.blockHeight === "100svh" ?
|
|
156
|
-
threshold: 1,
|
|
157
|
-
rootMargin: '220px 0px 220px 0px',
|
|
123
|
+
root: this.blockHeight === "100svh" ? this.block : null,
|
|
124
|
+
threshold: [0, 0.5, 1], // Callback will be executed when 0%, 50%, and 100% of the target is visible
|
|
158
125
|
};
|
|
159
126
|
return (h("div", { class: classes }, h("div", { class: "media-block__block-container" }, h("div", { class: "media-block__media-container" }, isVideo ? (h("pn-play-on-scroll", { "show-overlay": this.showOverlayLayer, observerOptions: pnPlayOnScrollObserverOptions, "video-src": this.videoSrc })) : isImage ? (h("picture", null, h("source", { media: "(min-width: 1400px)", srcSet: this.imageSrc }), h("source", { media: "(min-width: 1224px)", srcSet: this.imageSrc }), h("source", { media: "(min-width: 1140px)", srcSet: this.imageSrc }), h("source", { media: "(min-width: 1023px)", srcSet: this.imageSrcSmallScreenFormat && this.imageSrcSmallScreenFormat !== "undefined" ? this.imageSrcSmallScreenFormat : this.imageSrc }), h("source", { media: "(min-width: 768px)", srcSet: this.imageSrcSmallScreenFormat && this.imageSrcSmallScreenFormat !== "undefined" ? this.imageSrcSmallScreenFormat : this.imageSrc }), h("source", { media: "(min-width: 500px)", srcSet: this.imageSrcSmallScreenFormat && this.imageSrcSmallScreenFormat !== "undefined" ? this.imageSrcSmallScreenFormat : this.imageSrc }), h("img", { src: this.imageSrcSmallScreenFormat !== "undefined" ? this.imageSrcSmallScreenFormat : this.imageSrc, alt: this.imageAltText !== "undefined" ? this.imageAltText : "", role: this.imageAltText !== "undefined" ? "img" : "presentation", "aria-hidden": this.imageAltText !== "undefined" ? "false" : "true" }))) : null), !isVideo && (h("div", { class: "media-block__overlay-filter", id: "mediaBlockOverlay" })), (this.blockHeading || this.blockPreamble) && (h("div", { class: "media-block__content-container" }, this.blockHeading && h(HeadingTag, { class: "media-block__block-heading" }, this.blockHeading), this.blockPreamble && h("p", { class: "media-block__preamble" }, this.blockPreamble), hasButtonSlot &&
|
|
160
127
|
h("div", { class: "media-block__cta-link" }, h("slot", { name: "cta-button" }))))), h("div", { id: "scroll-trigger" })));
|
|
@@ -262,24 +229,6 @@ export class PnmediaBlock {
|
|
|
262
229
|
"reflect": false,
|
|
263
230
|
"defaultValue": "null"
|
|
264
231
|
},
|
|
265
|
-
"parallaxScroll": {
|
|
266
|
-
"type": "boolean",
|
|
267
|
-
"mutable": false,
|
|
268
|
-
"complexType": {
|
|
269
|
-
"original": "boolean",
|
|
270
|
-
"resolved": "boolean",
|
|
271
|
-
"references": {}
|
|
272
|
-
},
|
|
273
|
-
"required": false,
|
|
274
|
-
"optional": false,
|
|
275
|
-
"docs": {
|
|
276
|
-
"tags": [],
|
|
277
|
-
"text": ""
|
|
278
|
-
},
|
|
279
|
-
"attribute": "parallax-scroll",
|
|
280
|
-
"reflect": false,
|
|
281
|
-
"defaultValue": "false"
|
|
282
|
-
},
|
|
283
232
|
"showOverlayLayer": {
|
|
284
233
|
"type": "boolean",
|
|
285
234
|
"mutable": false,
|
|
@@ -370,6 +319,24 @@ export class PnmediaBlock {
|
|
|
370
319
|
"reflect": false,
|
|
371
320
|
"defaultValue": "false"
|
|
372
321
|
},
|
|
322
|
+
"marginBottom": {
|
|
323
|
+
"type": "boolean",
|
|
324
|
+
"mutable": false,
|
|
325
|
+
"complexType": {
|
|
326
|
+
"original": "boolean",
|
|
327
|
+
"resolved": "boolean",
|
|
328
|
+
"references": {}
|
|
329
|
+
},
|
|
330
|
+
"required": false,
|
|
331
|
+
"optional": false,
|
|
332
|
+
"docs": {
|
|
333
|
+
"tags": [],
|
|
334
|
+
"text": ""
|
|
335
|
+
},
|
|
336
|
+
"attribute": "margin-bottom",
|
|
337
|
+
"reflect": false,
|
|
338
|
+
"defaultValue": "false"
|
|
339
|
+
},
|
|
373
340
|
"blockHeading": {
|
|
374
341
|
"type": "string",
|
|
375
342
|
"mutable": false,
|
|
@@ -18,6 +18,8 @@ pn-usp-promoter .usp-promoter--full-width {
|
|
|
18
18
|
pn-usp-promoter .usp-promoter__content {
|
|
19
19
|
display: flex;
|
|
20
20
|
flex-direction: row;
|
|
21
|
+
width: 100%;
|
|
22
|
+
max-width: 114rem;
|
|
21
23
|
}
|
|
22
24
|
@media screen and (min-width: 768px) {
|
|
23
25
|
pn-usp-promoter .usp-promoter__content {
|
|
@@ -29,6 +31,8 @@ pn-usp-promoter .usp-promoter__content {
|
|
|
29
31
|
pn-usp-promoter .usp-promoter__content-wrapper {
|
|
30
32
|
display: flex;
|
|
31
33
|
flex-direction: column;
|
|
34
|
+
width: 100%;
|
|
35
|
+
max-width: 75rem;
|
|
32
36
|
}
|
|
33
37
|
@media screen and (min-width: 768px) {
|
|
34
38
|
pn-usp-promoter .usp-promoter__content-wrapper {
|
|
@@ -42,26 +46,31 @@ pn-usp-promoter .usp-promoter__content-heading {
|
|
|
42
46
|
@media screen and (min-width: 768px) {
|
|
43
47
|
pn-usp-promoter .usp-promoter__content-heading {
|
|
44
48
|
font-size: 4.2rem;
|
|
45
|
-
max-width: 45rem;
|
|
46
49
|
}
|
|
47
50
|
}
|
|
48
51
|
@media screen and (min-width: 1140px) {
|
|
49
52
|
pn-usp-promoter .usp-promoter__content-heading {
|
|
50
53
|
font-size: 4.8rem;
|
|
51
|
-
max-width: 50rem;
|
|
52
54
|
}
|
|
53
55
|
}
|
|
54
56
|
@media screen and (min-width: 1440px) {
|
|
55
57
|
pn-usp-promoter .usp-promoter__content-heading {
|
|
56
58
|
font-size: 5.6rem;
|
|
57
|
-
max-width: 58rem;
|
|
58
59
|
}
|
|
59
60
|
}
|
|
61
|
+
pn-usp-promoter .usp-promoter__no-margin-bottom {
|
|
62
|
+
margin-bottom: 0 !important;
|
|
63
|
+
}
|
|
60
64
|
pn-usp-promoter .usp-promoter__content-text {
|
|
61
65
|
font-size: 1.6rem;
|
|
62
66
|
max-width: 47rem;
|
|
63
67
|
margin-bottom: 2.6rem;
|
|
64
68
|
}
|
|
69
|
+
@media screen and (min-width: 768px) {
|
|
70
|
+
pn-usp-promoter .usp-promoter__content-text {
|
|
71
|
+
text-wrap: balance;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
65
74
|
@media screen and (min-width: 1140px) {
|
|
66
75
|
pn-usp-promoter .usp-promoter__content-text {
|
|
67
76
|
font-size: 1.8rem;
|
|
@@ -14,12 +14,17 @@ export class PnUspPromoter {
|
|
|
14
14
|
if (this.hideMobileImage || slot == null) {
|
|
15
15
|
return "usp-promoter--hide-image-small-screen";
|
|
16
16
|
}
|
|
17
|
+
return "";
|
|
17
18
|
}
|
|
18
19
|
render() {
|
|
19
|
-
const
|
|
20
|
-
const
|
|
20
|
+
const { fullWidth, rightAlign } = this;
|
|
21
|
+
const classes = [
|
|
22
|
+
'usp-promoter',
|
|
23
|
+
fullWidth ? "usp-promoter--full-width" : "",
|
|
24
|
+
rightAlign ? "usp-promoter--right-align" : "",
|
|
25
|
+
].join(' ');
|
|
21
26
|
const hasHeadingExtension = this.headingExtension ? "usp-promoter__heading-extension" : "";
|
|
22
|
-
return (h(Host, null, h("div", { class: `
|
|
27
|
+
return (h(Host, null, h("div", { class: ` ${classes} ${this.centerMobileContent()}`, style: { 'background': `${this.backgroundGradient}` } }, h("div", { class: "usp-promoter__content" }, h("slot", { name: "illustration" }), h("div", { class: "usp-promoter__content-wrapper" }, h("h2", { class: `usp-promoter__content-heading ${hasHeadingExtension}` }, h("span", null, this.heading), (this.headingExtension) ? h("span", null, this.headingExtension) : null), h("p", { class: "usp-promoter__content-text" }, this.bodyText), h("slot", { name: "app-store" }), h("slot", { name: "usp-buttons" }))))));
|
|
23
28
|
}
|
|
24
29
|
static get is() { return "pn-usp-promoter"; }
|
|
25
30
|
static get originalStyleUrls() {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import readme from "./readme.md";
|
|
2
|
+
import { imageUrls, appImages} from "../../../globals/storybookGlobals";
|
|
2
3
|
|
|
3
4
|
export default {
|
|
4
5
|
title: "widgets/Usp Promoter",
|
|
5
6
|
parameters: {
|
|
6
7
|
notes: readme
|
|
7
|
-
}
|
|
8
|
+
},
|
|
8
9
|
};
|
|
9
10
|
|
|
10
11
|
const Template = ({ ...args }) => {
|
|
@@ -20,10 +21,10 @@ const Template = ({ ...args }) => {
|
|
|
20
21
|
hide-mobile-image="${args.hideMobileImage}">
|
|
21
22
|
<div slot="app-store">
|
|
22
23
|
<a href="http://www.apple.com">
|
|
23
|
-
<img src="
|
|
24
|
+
<img src="${appImages.postnordAppStore}">
|
|
24
25
|
</a>
|
|
25
26
|
<a href="http://www.google.com">
|
|
26
|
-
<img src="
|
|
27
|
+
<img src="${appImages.postnordGooglePlay}">
|
|
27
28
|
</a>
|
|
28
29
|
</div>
|
|
29
30
|
<div slot="usp-buttons">
|
|
@@ -33,7 +34,7 @@ const Template = ({ ...args }) => {
|
|
|
33
34
|
<pn-scroll>
|
|
34
35
|
<div slot="scroll-affected">
|
|
35
36
|
<picture>
|
|
36
|
-
<img src="
|
|
37
|
+
<img src="${imageUrls.mobileIllustration}" />
|
|
37
38
|
</picture>
|
|
38
39
|
</div>
|
|
39
40
|
</pn-scroll>
|
|
@@ -41,7 +42,7 @@ const Template = ({ ...args }) => {
|
|
|
41
42
|
<pn-scroll>
|
|
42
43
|
<div slot="scroll-affected">
|
|
43
44
|
<picture>
|
|
44
|
-
<img src="
|
|
45
|
+
<img src="${imageUrls.mobileIllustration}" />
|
|
45
46
|
</picture>
|
|
46
47
|
</div>
|
|
47
48
|
</pn-scroll>
|
|
@@ -60,7 +61,6 @@ Primary.args = {
|
|
|
60
61
|
backgroundGradient: "linear-gradient(90deg, #FFF 47.46%, #EFFBFF 70.86%)",
|
|
61
62
|
fullWidth: true,
|
|
62
63
|
rightAlign: true,
|
|
63
|
-
hideMobileImage: false,
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
const WithImageTemplate = ({ ...args }) => {
|
|
@@ -75,10 +75,10 @@ const WithImageTemplate = ({ ...args }) => {
|
|
|
75
75
|
hide-mobile-image="${args.hideMobileImage}">
|
|
76
76
|
<div slot="app-store">
|
|
77
77
|
<a href="http://www.apple.com">
|
|
78
|
-
<img src="
|
|
78
|
+
<img src="${appImages.postnordAppStore}">
|
|
79
79
|
</a>
|
|
80
80
|
<a href="http://www.google.com">
|
|
81
|
-
<img src="
|
|
81
|
+
<img src="${appImages.postnordGooglePlay}">
|
|
82
82
|
</a>
|
|
83
83
|
</div>
|
|
84
84
|
<div slot="usp-buttons">
|
|
@@ -88,7 +88,7 @@ const WithImageTemplate = ({ ...args }) => {
|
|
|
88
88
|
<pn-scroll>
|
|
89
89
|
<div slot="scroll-affected">
|
|
90
90
|
<picture>
|
|
91
|
-
<img src="
|
|
91
|
+
<img src="${imageUrls.mobileIllustration}" />
|
|
92
92
|
</picture>
|
|
93
93
|
</div>
|
|
94
94
|
</pn-scroll>
|
|
@@ -96,7 +96,7 @@ const WithImageTemplate = ({ ...args }) => {
|
|
|
96
96
|
<pn-scroll>
|
|
97
97
|
<div slot="scroll-affected">
|
|
98
98
|
<picture>
|
|
99
|
-
<img src="
|
|
99
|
+
<img src="${imageUrls.mobileIllustration}" />
|
|
100
100
|
</picture>
|
|
101
101
|
</div>
|
|
102
102
|
</pn-scroll>
|
|
@@ -130,10 +130,10 @@ const NoImageTemplate = ({ ...args }) => {
|
|
|
130
130
|
hide-mobile-image="${args.hideMobileImage}">
|
|
131
131
|
<div slot="app-store">
|
|
132
132
|
<a href="http://www.apple.com">
|
|
133
|
-
<img src="
|
|
133
|
+
<img src="${appImages.postnordAppStore}">
|
|
134
134
|
</a>
|
|
135
135
|
<a href="http://www.google.com">
|
|
136
|
-
<img src="
|
|
136
|
+
<img src="${appImages.postnordGooglePlay}">
|
|
137
137
|
</a>
|
|
138
138
|
</div>
|
|
139
139
|
<div slot="usp-buttons">
|
|
@@ -142,7 +142,7 @@ const NoImageTemplate = ({ ...args }) => {
|
|
|
142
142
|
<pn-scroll>
|
|
143
143
|
<div slot="scroll-affected">
|
|
144
144
|
<picture>
|
|
145
|
-
<img src="
|
|
145
|
+
<img src="${imageUrls.mobileIllustration}" />
|
|
146
146
|
</picture>
|
|
147
147
|
</div>
|
|
148
148
|
</pn-scroll>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const imageSvgs = {
|
|
2
|
+
success: 'https://www.postnord.se/contentassets/5fe2c739644149e79d73c1082e575af3/success.svg'
|
|
3
|
+
};
|
|
4
|
+
export const imageUrls = {
|
|
5
|
+
mobileIllustration: 'https://se-prep.postnord.com/siteassets/images-new/app-images/track-swe.webp',
|
|
6
|
+
};
|
|
7
|
+
export const appImages = {
|
|
8
|
+
postnordAppStore: 'https://se-prep.postnord.com/siteassets/startpage-blocks/AppStore-transparent.svg',
|
|
9
|
+
postnordGooglePlay: 'https://se-prep.postnord.com/siteassets/startpage-blocks/googleplay-transparent.svg',
|
|
10
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
const pnCtaBlockCss = "pn-cta-block .cta-block{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-direction:column;flex-direction:column;border-radius:2.4rem;padding:3.2rem 2.4rem;width:100%}@media screen and (min-width: 768px){pn-cta-block .cta-block{-ms-flex-direction:row;flex-direction:row;padding:2.4rem}}@media screen and (min-width: 1140px){pn-cta-block .cta-block{
|
|
3
|
+
const pnCtaBlockCss = "pn-cta-block{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}pn-cta-block .cta-block{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-direction:column;flex-direction:column;border-radius:2.4rem;padding:3.2rem 2.4rem;width:100%}@media screen and (min-width: 768px){pn-cta-block .cta-block{-ms-flex-direction:row;flex-direction:row;padding:2.4rem}}@media screen and (min-width: 1140px){pn-cta-block .cta-block{max-width:95%}}@media screen and (min-width: 1440px){pn-cta-block .cta-block{max-width:90%}}pn-cta-block .cta-block[pn-background-color=blue25]{background-color:#EFFBFF}pn-cta-block .cta-block[pn-background-color=coral50]{background-color:#FDEFEE}pn-cta-block .cta-block[pn-background-color=gray25]{background-color:#F9F8F8}pn-cta-block .cta-block[pn-background-color=green25]{background-color:#EDFBF3}pn-cta-block .cta-block[pn-background-color=transparent]{padding:0 3.2rem}pn-cta-block .cta-block--content-top .cta-block__content{-ms-flex-pack:start;justify-content:flex-start}@media screen and (min-width: 768px){pn-cta-block .cta-block--large .cta-block__heading{font-size:3.6rem}}@media screen and (min-width: 768px){pn-cta-block .cta-block--large .cta-block__text{font-size:2rem}}pn-cta-block .cta-block--small{width:auto}@media screen and (min-width: 992px){pn-cta-block .cta-block--small{display:-ms-inline-flexbox;display:inline-flex;max-width:75%}pn-cta-block .cta-block--small.cta-block--center{max-width:66%}}pn-cta-block .cta-block--center{-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;gap:1.6rem;text-align:center}@media screen and (min-width: 768px){pn-cta-block .cta-block--center{gap:2.4rem;padding:3.2rem}}@media screen and (min-width: 768px){pn-cta-block .cta-block--center .cta-block__content{max-width:74rem;padding:0}}pn-cta-block .cta-block--center .cta-block__action{margin-top:0.8rem}@media screen and (min-width: 768px){pn-cta-block .cta-block--center .cta-block__action{-ms-flex-direction:row;flex-direction:row;gap:2.4rem;margin-top:0}pn-cta-block .cta-block--center .cta-block__action.cta-block__button{margin-bottom:0}pn-cta-block .cta-block--center .cta-block__action>[slot=cta-buttons]{-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;gap:2.4rem}}@media screen and (min-width: 768px){pn-cta-block .cta-block--center .cta-block__image-wrapper{display:block}}pn-cta-block .cta-block--center .cta-block__image-wrapper>[slot=illustration]{padding-right:0}pn-cta-block .cta-block--center .cta-block__text{margin-bottom:0 !important}pn-cta-block .cta-block__image-wrapper{margin-bottom:1.6rem}pn-cta-block .cta-block__image-wrapper>[slot=illustration]>picture>img{border-radius:0.8rem;max-width:100%}@media screen and (min-width: 768px){pn-cta-block .cta-block__image-wrapper{display:none;max-width:20%}}@media screen and (min-width: 992px){pn-cta-block .cta-block__image-wrapper{display:block;margin-bottom:0}pn-cta-block .cta-block__image-wrapper>[slot=illustration]{padding-right:3.2rem}}pn-cta-block .cta-block__content{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}@media screen and (min-width: 768px){pn-cta-block .cta-block__content{padding-right:2.4rem}}@media screen and (min-width: 768px){pn-cta-block .cta-block__content .cta-block__heading,pn-cta-block .cta-block__content .cta-block__text{max-width:74rem}}pn-cta-block .cta-block__content .cta-block__text{margin-bottom:2.4rem}@media screen and (min-width: 768px){pn-cta-block .cta-block__content .cta-block__text{margin-bottom:0}}pn-cta-block .cta-block__heading{margin-bottom:0.8rem}pn-cta-block .cta-block__action{display:-ms-flexbox;display:flex}pn-cta-block .cta-block__action>[slot=cta-buttons]{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;row-gap:1.6rem;-ms-flex:1;flex:1}@media screen and (min-width: 768px){pn-cta-block .cta-block__action>[slot=cta-buttons]{-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center;gap:1.6rem;margin-top:0}}pn-cta-block .cta-block__action>[slot=cta-buttons]>a{color:#005D92;font-weight:500;font-size:1.6rem;padding:0.1rem;text-decoration:none}pn-cta-block .cta-block__action>[slot=cta-buttons]>a pn-icon svg{-webkit-transition:-webkit-transform 0.3s ease-in-out;transition:-webkit-transform 0.3s ease-in-out;transition:transform 0.3s ease-in-out;transition:transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out}pn-cta-block .cta-block__action>[slot=cta-buttons]>a pn-icon svg path{fill:#005D92}pn-cta-block .cta-block__action>[slot=cta-buttons]>a:hover pn-icon svg{-webkit-transition:-webkit-transform 0.3s ease-in-out;transition:-webkit-transform 0.3s ease-in-out;transition:transform 0.3s ease-in-out;transition:transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;-webkit-transform:translateX(0.3rem);transform:translateX(0.3rem)}pn-cta-block .cta-block__action>[slot=cta-buttons]>a:hover pn-icon svg path{fill:#005D92}";
|
|
4
4
|
|
|
5
5
|
const PnCtaBlock$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
6
|
constructor() {
|
|
@@ -15,7 +15,12 @@ const PnCtaBlock$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
15
15
|
this.contentTop = false;
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
|
-
|
|
18
|
+
const hasImage = this.hostElement.querySelector('[slot="illustration"]');
|
|
19
|
+
const hasButtons = this.hostElement.querySelector('[slot="cta-buttons"]');
|
|
20
|
+
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' : ''}` }, (hasImage ?
|
|
21
|
+
h("div", { class: "cta-block__image-wrapper" }, h("slot", { name: "illustration" })) : null), (this.heading && this.bodyText) ?
|
|
22
|
+
h("div", { class: "cta-block__content" }, h("h2", { class: "cta-block__heading" }, this.heading), h("p", { class: "cta-block__text" }, this.bodyText)) : null, (hasButtons ?
|
|
23
|
+
h("div", { class: "cta-block__action" }, h("slot", { name: "cta-buttons" })) : null))));
|
|
19
24
|
}
|
|
20
25
|
get hostElement() { return this; }
|
|
21
26
|
static get style() { return pnCtaBlockCss; }
|