@postnord/pn-marketweb-components 2.3.4 → 2.3.6

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.
Files changed (74) hide show
  1. package/cjs/index-9066c0d0.js +61 -0
  2. package/cjs/loader.cjs.js +1 -1
  3. package/cjs/pn-animated-tile.cjs.entry.js +35 -0
  4. package/cjs/pn-market-web-components.cjs.js +1 -1
  5. package/cjs/pn-multi-input.cjs.entry.js +32 -0
  6. package/cjs/pn-quick-cta.cjs.entry.js +1 -1
  7. package/cjs/pn-spotlight.cjs.entry.js +9 -2
  8. package/cjs/pn-stats-info-data.cjs.entry.js +2 -2
  9. package/cjs/pn-stats-info.cjs.entry.js +1 -1
  10. package/collection/collection-manifest.json +3 -1
  11. package/collection/components/animation/pn-animated-tile/pn-animated-tile.css +128 -0
  12. package/collection/components/animation/pn-animated-tile/pn-animated-tile.js +42 -0
  13. package/collection/components/animation/pn-animated-tile/pn-animated-tile.stories.js +93 -0
  14. package/collection/components/animation/{pn-scroll.stories.js → pn-scroll/pn-scroll.stories.js} +1 -1
  15. package/collection/components/cta/pn-quick-cta/pn-quick-cta.css +19 -0
  16. package/collection/components/cta/pn-quick-cta/pn-quick-cta.stories.js +55 -1
  17. package/collection/components/cta/pn-spotlight/pn-spotlight.css +26 -0
  18. package/collection/components/cta/pn-spotlight/pn-spotlight.js +29 -2
  19. package/collection/components/data-visualization/pn-stats-info/pn-stats-info-data/pn-stats-info-data.css +1 -0
  20. package/collection/components/data-visualization/pn-stats-info/pn-stats-info-data/pn-stats-info-data.js +1 -1
  21. package/collection/components/data-visualization/pn-stats-info/pn-stats-info.css +46 -0
  22. package/collection/components/data-visualization/pn-stats-info/pn-stats-info.stories.js +2 -2
  23. package/collection/components/layout-components/pn-multi-input/multi-input.stories.js +22 -0
  24. package/collection/components/layout-components/pn-multi-input/pn-multi-input.css +0 -0
  25. package/collection/components/layout-components/pn-multi-input/pn-multi-input.js +31 -0
  26. package/custom-elements/index.d.ts +12 -0
  27. package/custom-elements/index.js +160 -42
  28. package/esm/index-45541632.js +59 -0
  29. package/esm/loader.js +1 -1
  30. package/esm/pn-animated-tile.entry.js +31 -0
  31. package/esm/pn-market-web-components.js +1 -1
  32. package/esm/pn-multi-input.entry.js +28 -0
  33. package/esm/pn-quick-cta.entry.js +1 -1
  34. package/esm/pn-spotlight.entry.js +9 -2
  35. package/esm/pn-stats-info-data.entry.js +2 -2
  36. package/esm/pn-stats-info.entry.js +1 -1
  37. package/esm-es5/index-45541632.js +7 -0
  38. package/esm-es5/loader.js +1 -1
  39. package/esm-es5/pn-animated-tile.entry.js +1 -0
  40. package/esm-es5/pn-market-web-components.js +1 -1
  41. package/esm-es5/pn-multi-input.entry.js +1 -0
  42. package/esm-es5/pn-quick-cta.entry.js +1 -1
  43. package/esm-es5/pn-spotlight.entry.js +1 -1
  44. package/esm-es5/pn-stats-info-data.entry.js +1 -1
  45. package/esm-es5/pn-stats-info.entry.js +1 -1
  46. package/package.json +2 -1
  47. package/pn-market-web-components/{p-0c34d974.system.entry.js → p-054f8b3a.system.entry.js} +1 -1
  48. package/pn-market-web-components/p-3e668a3f.system.js +7 -0
  49. package/pn-market-web-components/p-5e43ccf2.js +7 -0
  50. package/pn-market-web-components/{p-233a7e8a.entry.js → p-5f0acbbd.entry.js} +1 -1
  51. package/pn-market-web-components/p-67887512.system.js +1 -1
  52. package/pn-market-web-components/{p-7fd8b012.entry.js → p-6f28cfba.entry.js} +1 -1
  53. package/pn-market-web-components/p-7cab2106.system.entry.js +1 -0
  54. package/pn-market-web-components/p-8e890ab1.system.entry.js +1 -0
  55. package/pn-market-web-components/p-91c5cd79.entry.js +1 -0
  56. package/pn-market-web-components/p-97aafcf4.entry.js +1 -0
  57. package/pn-market-web-components/p-a1cf4618.system.entry.js +1 -0
  58. package/pn-market-web-components/p-a864fbed.system.entry.js +1 -0
  59. package/pn-market-web-components/p-b66743b3.system.entry.js +1 -0
  60. package/pn-market-web-components/p-d74172bc.entry.js +1 -0
  61. package/pn-market-web-components/p-f82c5d08.entry.js +1 -0
  62. package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
  63. package/types/components/animation/pn-animated-tile/pn-animated-tile.d.ts +9 -0
  64. package/types/components/cta/pn-spotlight/pn-spotlight.d.ts +3 -0
  65. package/types/components/layout-components/pn-multi-input/pn-multi-input.d.ts +8 -0
  66. package/types/components.d.ts +28 -0
  67. package/pn-market-web-components/p-1c38553b.system.entry.js +0 -1
  68. package/pn-market-web-components/p-8e38c337.entry.js +0 -1
  69. package/pn-market-web-components/p-acf5fe7a.entry.js +0 -1
  70. package/pn-market-web-components/p-af415c1a.system.entry.js +0 -1
  71. package/pn-market-web-components/p-f64a7188.system.entry.js +0 -1
  72. /package/collection/components/animation/{pn-scroll.css → pn-scroll/pn-scroll.css} +0 -0
  73. /package/collection/components/animation/{pn-scroll.js → pn-scroll/pn-scroll.js} +0 -0
  74. /package/types/components/animation/{pn-scroll.d.ts → pn-scroll/pn-scroll.d.ts} +0 -0
@@ -0,0 +1,128 @@
1
+ pn-animated-tile .pn-animated-tile__container {
2
+ position: relative;
3
+ border-radius: 2.4rem;
4
+ height: 56rem;
5
+ cursor: default;
6
+ }
7
+ pn-animated-tile .pn-animated-tile__content {
8
+ position: relative;
9
+ display: flex;
10
+ height: 100%;
11
+ width: 100%;
12
+ background-color: transparent;
13
+ }
14
+ pn-animated-tile [slot=side-a],
15
+ pn-animated-tile [slot=side-b] {
16
+ position: absolute;
17
+ align-self: stretch;
18
+ top: 0;
19
+ left: 0;
20
+ width: 100%;
21
+ height: 100%;
22
+ padding: 2.4rem;
23
+ }
24
+ pn-animated-tile [slot=side-a] {
25
+ opacity: 1;
26
+ }
27
+ pn-animated-tile [slot=side-b] {
28
+ opacity: 0;
29
+ transform: translateY(50px);
30
+ }
31
+ pn-animated-tile .pn-animated-tile__toggle {
32
+ position: absolute;
33
+ bottom: 0;
34
+ right: 0;
35
+ padding: 2.4rem;
36
+ }
37
+ pn-animated-tile .pn-animated-tile__toggle pn-icon {
38
+ cursor: pointer;
39
+ border-radius: 50%;
40
+ padding: 0.8rem;
41
+ margin: 0.8rem 0 0 0;
42
+ }
43
+ pn-animated-tile pn-icon .button-tooltip {
44
+ display: none;
45
+ }
46
+
47
+ .cat-animate [slot=side-a],
48
+ .cat-animate [slot=side-b] {
49
+ transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out 0.2s;
50
+ }
51
+ .cat-animate.fade [slot=side-a] {
52
+ opacity: 0;
53
+ }
54
+ .cat-animate.fade [slot=side-b] {
55
+ opacity: 1;
56
+ transform: translateY(0);
57
+ transition-delay: 0.5s;
58
+ }
59
+ .cat-animate.fade--reversed [slot=side-a] {
60
+ opacity: 1;
61
+ transition-delay: 0.5s;
62
+ }
63
+ .cat-animate.fade--reversed [slot=side-b] {
64
+ opacity: 0;
65
+ transform: translateY(50px);
66
+ }
67
+ .cat-animate.toggle pn-icon {
68
+ transition: transform 0.45s ease-in-out;
69
+ transition-delay: 0.5s;
70
+ }
71
+ .cat-animate.toggle.animate pn-icon {
72
+ transform: rotate(45deg);
73
+ }
74
+
75
+ [data-cat-theme=white] .pn-animated-tile__container {
76
+ background-color: #FFFFFF;
77
+ }
78
+ [data-cat-theme=white] .pn-animated-tile__toggle > pn-icon {
79
+ background-color: #FFFFFF;
80
+ }
81
+ [data-cat-theme=white] .pn-animated-tile__toggle > pn-icon svg > path {
82
+ fill: #00A0D6;
83
+ }
84
+
85
+ [data-cat-theme=coral400] .pn-animated-tile__container {
86
+ background-color: #F06365;
87
+ }
88
+ [data-cat-theme=coral400] .pn-animated-tile__toggle > pn-icon {
89
+ background-color: #FFFFFF;
90
+ }
91
+ [data-cat-theme=coral400] .pn-animated-tile__toggle > pn-icon svg > path {
92
+ fill: #F06365;
93
+ }
94
+
95
+ [data-cat-theme=private] .pn-animated-tile__container {
96
+ background-color: #00A0D6;
97
+ }
98
+ [data-cat-theme=private] .pn-animated-tile__toggle > pn-icon {
99
+ background-color: #FFFFFF;
100
+ }
101
+ [data-cat-theme=private] .pn-animated-tile__toggle > pn-icon svg > path {
102
+ fill: #00A0D6;
103
+ }
104
+
105
+ [data-cat-theme=business] .pn-animated-tile__container {
106
+ background-color: #0D234B;
107
+ }
108
+ [data-cat-theme=business] .pn-animated-tile__toggle > pn-icon {
109
+ background-color: #FFFFFF;
110
+ }
111
+ [data-cat-theme=business] .pn-animated-tile__toggle > pn-icon svg > path {
112
+ fill: #0D234B;
113
+ }
114
+
115
+ [data-cat-theme=hybrid] .pn-animated-tile__container {
116
+ background-color: #e9e6e5;
117
+ }
118
+ [data-cat-theme=hybrid] .pn-animated-tile__toggle > pn-icon {
119
+ background-color: #FFFFFF;
120
+ }
121
+ [data-cat-theme=hybrid] .pn-animated-tile__toggle > pn-icon svg > path {
122
+ fill: #005D92;
123
+ }
124
+
125
+ [data-cat-firstpage-only=true] [slot=side-b],
126
+ [data-cat-firstpage-only=true] .pn-animated-tile__toggle {
127
+ display: none;
128
+ }
@@ -0,0 +1,42 @@
1
+ import classNames from 'classnames';
2
+ import { Component, Element, h, Host, State, Watch } from '@stencil/core';
3
+ export class PnAnimatedTile {
4
+ constructor() {
5
+ this.toggled = false;
6
+ this.transitionClassName = '';
7
+ this.animateIcon = '';
8
+ this.onClickHandler = () => {
9
+ this.toggled = !this.toggled;
10
+ };
11
+ }
12
+ onToggledHandler() {
13
+ this.transitionClassName = classNames({ 'fade': this.toggled, 'fade--reversed': !this.toggled });
14
+ this.animateIcon = classNames({ 'animate': this.toggled, '': !this.toggled });
15
+ }
16
+ render() {
17
+ return (h(Host, null,
18
+ h("div", { class: "pn-animated-tile__container" },
19
+ h("div", { class: `pn-animated-tile__content cat-animate ${this.transitionClassName}` },
20
+ h("slot", { name: "side-a" }),
21
+ h("slot", { name: "side-b" })),
22
+ h("div", { class: `pn-animated-tile__toggle cat-animate toggle ${this.animateIcon}` },
23
+ h("pn-icon", { symbol: "plus", onClick: this.onClickHandler })))));
24
+ }
25
+ static get is() { return "pn-animated-tile"; }
26
+ static get originalStyleUrls() { return {
27
+ "$": ["pn-animated-tile.scss"]
28
+ }; }
29
+ static get styleUrls() { return {
30
+ "$": ["pn-animated-tile.css"]
31
+ }; }
32
+ static get states() { return {
33
+ "toggled": {},
34
+ "transitionClassName": {},
35
+ "animateIcon": {}
36
+ }; }
37
+ static get elementRef() { return "hostElement"; }
38
+ static get watchers() { return [{
39
+ "propName": "toggled",
40
+ "methodName": "onToggledHandler"
41
+ }]; }
42
+ }
@@ -0,0 +1,93 @@
1
+ import readme from './readme.md';
2
+
3
+ export default {
4
+ title: 'Animation/Flip',
5
+ parameters: {
6
+ notes: readme,
7
+ layout: 'fullscreen',
8
+ },
9
+ };
10
+
11
+ const FlipDefault = args => {
12
+ return `
13
+ <div style="width:100%; display:flex; flex-direction:row; gap:16px;">
14
+ <div style="width:33%">
15
+ <pn-animated-tile data-cat-theme="private" data-cat-firstpage-only="true">
16
+ <div slot="side-a">
17
+ <div style="width:100%;height:100%; display: flex;justify-content: flex-end;align-items: center;">
18
+ <h2 style="color:#fff; font-size:7.2rem; text-align:right;">No <span style="display:block;color:#00A0D6; border-radius:0.4rem; background-color:#fff; padding: 0 0.8rem">side-b</span></h2>
19
+ </div>
20
+ </div>
21
+ <div slot="side-b"></div>
22
+ </pn-animated-tile>
23
+ </div>
24
+
25
+ <div style="width:33%">
26
+ <pn-animated-tile data-cat-theme="business" data-cat-firstpage-only="false">
27
+ <div slot="side-a">
28
+ <div style="width:100%;height:100%; display: flex;justify-content: center;align-items: center;">
29
+ <h2 style="color:#FFF; font-size:7.2rem; text-align:right;">Track <span style="color:#F06365; border-radius:0.4rem; background-color:#005D92; padding: 0 0.8rem">shipments</span></h2>
30
+ </div>
31
+ </div>
32
+ <div slot="side-b">
33
+ <div style="display:flex; flex-direction:column; justify-content:center;">
34
+ <h2 style="color:#FFF; padding:0 0.8rem">Heading</h2>
35
+ <p style="color:#FFF; padding:0 0.8rem">
36
+ Nam interdum urna ipsum, a volutpat tortor iaculis non.
37
+ Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae;
38
+ Integer sed tortor a justo fermentum sodales. Cras sed posuere lorem, sit amet porttitor neque.
39
+ Nunc tincidunt, tellus eget dapibus dapibus, ligula lorem imperdiet nunc, non aliquet dolor metus id justo.
40
+ Vivamus tempus lacus eu mi convallis, et auctor sapien bibendum.
41
+ Donec non lacus mi. Nulla feugiat, sem quis accumsan aliquet, purus purus tincidunt nisi, a iaculis dolor neque non turpis. In quis nisi turpis.
42
+ Sed sit amet volutpat risus. Praesent arcu dolor, auctor a dictum in, egestas vel augue. Nunc molestie pulvinar mi a convallis.
43
+ Vivamus porta non ex vitae mollis.
44
+
45
+ Nam interdum urna ipsum, a volutpat tortor iaculis non.
46
+ Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae;
47
+ Integer sed tortor a justo fermentum sodales. Cras sed posuere lorem, sit amet porttitor neque.
48
+ Nunc tincidunt, tellus eget dapibus dapibus, ligula lorem imperdiet nunc, non aliquet dolor metus id justo.
49
+ Vivamus tempus lacus eu mi convallis, et auctor sapien bibendum.
50
+ Donec non lacus mi. Nulla feugiat, sem quis accumsan aliquet, purus purus tincidunt nisi, a iaculis dolor neque non turpis. In quis nisi turpis.
51
+ Sed sit amet volutpat risus. Praesent arcu dolor, auctor a dictum in, egestas vel augue. Nunc molestie pulvinar mi a convallis.
52
+ Vivamus porta non ex vitae mollis.
53
+
54
+ Nam interdum urna ipsum, a volutpat tortor iaculis non.
55
+ Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae;
56
+ Integer sed tortor a justo fermentum sodales. Cras sed posuere lorem, sit amet porttitor neque.
57
+ Nunc tincidunt, tellus eget dapibus dapibus, ligula lorem imperdiet nunc, non aliquet dolor metus id justo.
58
+ Vivamus tempus lacus eu mi convallis, et auctor sapien bibendum.
59
+ Donec non lacus mi. Nulla feugiat, sem quis accumsan aliquet, purus purus tincidunt nisi, a iaculis dolor neque non turpis. In quis nisi turpis.
60
+ Sed sit amet volutpat risus. Praesent arcu dolor, auctor a dictum in, egestas vel augue. Nunc molestie pulvinar mi a convallis.
61
+ Vivamus porta non ex vitae mollis.
62
+ </p>
63
+ </div>
64
+ </div>
65
+ </pn-animated-tile>
66
+ </div>
67
+
68
+ <div style="width:33%">
69
+ <pn-animated-tile data-cat-theme="hybrid">
70
+ <div slot="side-a"></div>
71
+ <div slot="side-b">
72
+ <div style="display:flex; flex-direction:column; justify-content:center; height:100%;">
73
+ <h2 style="color:#2D2013; padding:0 0.8rem">Heading</h2>
74
+ <p style="color:#2D2013; padding:0 0.8rem">
75
+ Nam interdum urna ipsum, a volutpat tortor iaculis non.
76
+ Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae;
77
+ Integer sed tortor a justo fermentum sodales. Cras sed posuere lorem, sit amet porttitor neque.
78
+ Nunc tincidunt, tellus eget dapibus dapibus, ligula lorem imperdiet nunc, non aliquet dolor metus id justo.
79
+ Vivamus tempus lacus eu mi convallis, et auctor sapien bibendum.
80
+ Donec non lacus mi. Nulla feugiat, sem quis accumsan aliquet, purus purus tincidunt nisi, a iaculis dolor neque non turpis. In quis nisi turpis.
81
+ Sed sit amet volutpat risus. Praesent arcu dolor, auctor a dictum in, egestas vel augue. Nunc molestie pulvinar mi a convallis.
82
+ Vivamus porta non ex vitae mollis.
83
+ </p>
84
+ </div>
85
+ </div>
86
+ </pn-animated-tile>
87
+ </div>
88
+ </div>
89
+ `;
90
+ };
91
+
92
+ export const Flip = FlipDefault.bind({});
93
+ Flip.args = {};
@@ -1,7 +1,7 @@
1
1
  import readme from './readme.md';
2
2
 
3
3
  export default {
4
- title: 'Scroller/Fade',
4
+ title: 'Animation/Scroll',
5
5
  parameters: {
6
6
  notes: readme,
7
7
  layout: 'fullscreen',
@@ -40,4 +40,23 @@ pn-quick-cta .quick-cta__content [slot=quick-cta-cta] a {
40
40
  }
41
41
  pn-quick-cta .quick-cta__content [slot=quick-cta-cta] a:hover {
42
42
  text-decoration: none;
43
+ }
44
+
45
+ pn-spotlight[data-cta-color=business] .quick-cta__content__heading {
46
+ color: #F06365;
47
+ }
48
+ pn-spotlight[data-cta-color=business] .quick-cta__content__preamble {
49
+ color: #EFFBFF;
50
+ }
51
+
52
+ pn-spotlight[data-cta-color=private] .quick-cta__content__heading,
53
+ pn-spotlight[data-cta-color=private] .quick-cta__content__preamble {
54
+ color: #FFFFFF;
55
+ }
56
+
57
+ pn-spotlight[data-cta-color=hybrid] .quick-cta__content__heading {
58
+ color: #005D92;
59
+ }
60
+ pn-spotlight[data-cta-color=hybrid] .quick-cta__content__preamble {
61
+ color: #2D2013;
43
62
  }
@@ -46,7 +46,61 @@ const TemplatePrimary = ({ ...args }) => {
46
46
  </pn-quick-cta>
47
47
  </div>
48
48
  </pn-spotlight>
49
- </div> `;
49
+ </div>
50
+
51
+ <br />
52
+
53
+ <div id="container" style="margin: 0 auto;">
54
+ <pn-spotlight data-cta-color="business">
55
+ <h2 slot="mobile-heading">${args.heading}</h2>
56
+ <div slot="content">
57
+ <pn-quick-cta heading="${args.heading}" preamble="${args.preamble}">
58
+ <pn-button slot="quick-cta-cta" href="${args.ctaUrl}">${args.ctaLabel}</pn-button>
59
+ </pn-quick-cta>
60
+ </div>
61
+ </pn-spotlight>
62
+ </div>
63
+
64
+ <br />
65
+
66
+ <div id="container" style="margin: 0 auto;">
67
+ <pn-spotlight data-cta-color="private">
68
+ <h2 slot="mobile-heading">${args.heading}</h2>
69
+ <div slot="content">
70
+ <pn-quick-cta heading="${args.heading}" preamble="${args.preamble}">
71
+ <pn-button slot="quick-cta-cta" href="${args.ctaUrl}">${args.ctaLabel}</pn-button>
72
+ </pn-quick-cta>
73
+ </div>
74
+ </pn-spotlight>
75
+ </div>
76
+
77
+ <br />
78
+
79
+ <div id="container" style="margin: 0 auto;">
80
+ <pn-spotlight data-cta-color="hybrid">
81
+ <h2 slot="mobile-heading">${args.heading}</h2>
82
+ <div slot="content">
83
+ <pn-quick-cta heading="${args.heading}" preamble="${args.preamble}">
84
+ <pn-button slot="quick-cta-cta" href="${args.ctaUrl}">${args.ctaLabel}</pn-button>
85
+ </pn-quick-cta>
86
+ </div>
87
+ </pn-spotlight>
88
+ </div>
89
+
90
+ <br />
91
+
92
+ <div id="container" style="margin: 0 auto;">
93
+ <pn-spotlight data-cta-color="hybrid" is-dynamic=true>
94
+ <h2 slot="mobile-heading">Less text</h2>
95
+ <div slot="content">
96
+ <pn-quick-cta heading="Less text" preamble="preamble">
97
+ <pn-button slot="quick-cta-cta" href="${args.ctaUrl}">${args.ctaLabel}</pn-button>
98
+ </pn-quick-cta>
99
+ </div>
100
+ </pn-spotlight>
101
+ </div>
102
+
103
+ `;
50
104
  };
51
105
 
52
106
  export const Primary = TemplatePrimary.bind({});
@@ -82,6 +82,17 @@ pn-spotlight [slot=content] {
82
82
  }
83
83
  }
84
84
 
85
+ @media screen and (min-width: 992px) {
86
+ .pn-spotlight__container__wrapper.cta--dynamic {
87
+ width: fit-content;
88
+ }
89
+ }
90
+ @media screen and (min-width: 992px) {
91
+ .pn-spotlight__container__wrapper.cta--dynamic [slot=content] {
92
+ padding-left: 4rem;
93
+ }
94
+ }
95
+
85
96
  pn-spotlight[data-cta-color=green] [slot=content] {
86
97
  background-color: #DCF6E7;
87
98
  }
@@ -101,4 +112,19 @@ pn-spotlight[data-cta-color=blue] [slot=content] {
101
112
  }
102
113
  pn-spotlight[data-cta-color=blue] .pn-spotlight__container__wrapper__content__ball {
103
114
  background-color: #EFFBFF;
115
+ }
116
+
117
+ pn-spotlight[data-cta-color=business] [slot=content],
118
+ pn-spotlight[data-cta-color=business] .pn-spotlight__container__wrapper__content__ball {
119
+ background-color: #0D234B;
120
+ }
121
+
122
+ pn-spotlight[data-cta-color=private] [slot=content],
123
+ pn-spotlight[data-cta-color=private] .pn-spotlight__container__wrapper__content__ball {
124
+ background-color: #00A0D6;
125
+ }
126
+
127
+ pn-spotlight[data-cta-color=hybrid] [slot=content],
128
+ pn-spotlight[data-cta-color=hybrid] .pn-spotlight__container__wrapper__content__ball {
129
+ background-color: #e9e6e5;
104
130
  }
@@ -1,14 +1,20 @@
1
- import { Component, Element, h, Host, Prop, } from '@stencil/core';
1
+ import classNames from 'classnames';
2
+ import { Component, Element, h, Host, Prop, State } from '@stencil/core';
2
3
  export class PnSpotlight {
3
4
  constructor() {
4
5
  this.heading = null;
5
6
  this.preamble = null;
7
+ this.isDynamic = false;
8
+ this.addDynamic = '';
9
+ }
10
+ componentDidLoad() {
11
+ this.addDynamic = classNames({ 'cta--dynamic': this.isDynamic });
6
12
  }
7
13
  render() {
8
14
  return (h(Host, null,
9
15
  h("div", { class: "pn-spotlight__container" },
10
16
  h("slot", { name: "mobile-heading" }),
11
- h("div", { class: "pn-spotlight__container__wrapper" },
17
+ h("div", { class: `pn-spotlight__container__wrapper ${this.addDynamic}` },
12
18
  h("div", { class: "pn-spotlight__container__wrapper__content" },
13
19
  h("div", { class: "pn-spotlight__container__wrapper__content__ball" }),
14
20
  h("slot", { name: "content" }))))));
@@ -56,7 +62,28 @@ export class PnSpotlight {
56
62
  "attribute": "preamble",
57
63
  "reflect": false,
58
64
  "defaultValue": "null"
65
+ },
66
+ "isDynamic": {
67
+ "type": "boolean",
68
+ "mutable": false,
69
+ "complexType": {
70
+ "original": "boolean",
71
+ "resolved": "boolean",
72
+ "references": {}
73
+ },
74
+ "required": false,
75
+ "optional": false,
76
+ "docs": {
77
+ "tags": [],
78
+ "text": ""
79
+ },
80
+ "attribute": "is-dynamic",
81
+ "reflect": false,
82
+ "defaultValue": "false"
59
83
  }
60
84
  }; }
85
+ static get states() { return {
86
+ "addDynamic": {}
87
+ }; }
61
88
  static get elementRef() { return "hostElement"; }
62
89
  }
@@ -41,6 +41,7 @@ pn-stats-info-data .pn-stats-info-data__container__content__unit {
41
41
  font-weight: 700;
42
42
  font-size: 3rem;
43
43
  line-height: 110%;
44
+ margin-left: 0.8rem;
44
45
  }
45
46
  @media screen and (min-width: 1200px) {
46
47
  pn-stats-info-data .pn-stats-info-data__container__content__unit {
@@ -34,7 +34,7 @@ export class PnStatsInfoData {
34
34
  h("div", { class: "pn-stats-info-data__container" },
35
35
  h("div", { class: "pn-stats-info-data__container__content" },
36
36
  h("div", { class: "pn-stats-info-data__container__content__data", id: `pn-stats-info-data-${this.compId}-${this.index}` }),
37
- h("div", { class: "pn-stats-info-data__container__content__unit" }, this.unit)),
37
+ this.unit && h("div", { class: "pn-stats-info-data__container__content__unit" }, this.unit)),
38
38
  h("div", { class: "pn-stats-info-data__container__content__preamble" }, this.preamble))));
39
39
  }
40
40
  componentDidRender() {
@@ -423,4 +423,50 @@ pn-stats-info[data-stats-background-color=green25] .pn-stats-info-data__containe
423
423
  }
424
424
  pn-stats-info[data-stats-background-color=green25] .pn-stats-info-data__container__content__preamble {
425
425
  color: #0D234B;
426
+ }
427
+
428
+ pn-stats-info[data-stats-background-color=gray100] .pn-stats-info__container__content,
429
+ pn-stats-info[data-stats-background-color=gray100] .pn-stats-info__container__map {
430
+ background-color: #e9e6e5;
431
+ }
432
+ pn-stats-info[data-stats-background-color=gray100] .pn-stats-info-image-container {
433
+ background-color: transparent;
434
+ }
435
+ pn-stats-info[data-stats-background-color=gray100] .pn-stats-info-image-container [slot=illustration] {
436
+ background-color: #e9e6e5;
437
+ }
438
+ @media screen and (min-width: 992px) {
439
+ pn-stats-info[data-stats-background-color=gray100] .pn-stats-info-image-container {
440
+ background-color: #e9e6e5;
441
+ }
442
+ }
443
+ pn-stats-info[data-stats-background-color=gray100] .pn-stats-info__container__content__heading,
444
+ pn-stats-info[data-stats-background-color=gray100] .pn-stats-info-data__container__content {
445
+ color: #005D92;
446
+ }
447
+ pn-stats-info[data-stats-background-color=gray100] .pn-stats-info-data__container__content__preamble {
448
+ color: #0D234B;
449
+ }
450
+
451
+ pn-stats-info[data-stats-background-color=bluedefault] .pn-stats-info__container__content,
452
+ pn-stats-info[data-stats-background-color=bluedefault] .pn-stats-info__container__map {
453
+ background-color: #00A0D6;
454
+ }
455
+ pn-stats-info[data-stats-background-color=bluedefault] .pn-stats-info-image-container {
456
+ background-color: transparent;
457
+ }
458
+ pn-stats-info[data-stats-background-color=bluedefault] .pn-stats-info-image-container [slot=illustration] {
459
+ background-color: #00A0D6;
460
+ }
461
+ @media screen and (min-width: 992px) {
462
+ pn-stats-info[data-stats-background-color=bluedefault] .pn-stats-info-image-container {
463
+ background-color: #00A0D6;
464
+ }
465
+ }
466
+ pn-stats-info[data-stats-background-color=bluedefault] .pn-stats-info__container__content__heading,
467
+ pn-stats-info[data-stats-background-color=bluedefault] .pn-stats-info-data__container__content {
468
+ color: #FFFFFF;
469
+ }
470
+ pn-stats-info[data-stats-background-color=bluedefault] .pn-stats-info-data__container__content__preamble {
471
+ color: #0D234B;
426
472
  }
@@ -56,7 +56,7 @@ const StandAloneCenterImageTemplate = ({ ...args }) => {
56
56
  <pn-breakpoints></pn-breakpoints>
57
57
 
58
58
  <div class="fullwidth statsblock" style="width:100%; max-width:1140px; margin:0 auto">
59
- <pn-stats-info heading="${args.heading}" background-url="" data-stats-image="image" data-stats-background-color="bluedarkest">
59
+ <pn-stats-info heading="${args.heading}" background-url="" data-stats-image="image" data-stats-background-color="gray100">
60
60
  <div slot="illustration">
61
61
  <picture>
62
62
  <img src="https://com-integration.postnord.com/contentassets/8008a14914564b5c999d2cea4e151bdd/man-driving.jpg?width=690&height=388&mode=crop&quality=80&anchor=topcenter" />
@@ -68,7 +68,7 @@ const StandAloneCenterImageTemplate = ({ ...args }) => {
68
68
  <br/>
69
69
 
70
70
  <div class="fullwidth statsblock" style="width:100%; max-width:1140px; margin:0 auto">
71
- <pn-stats-info heading="${args.heading}" background-url="" data-stats-image="image" data-stats-background-color="greendarkest">
71
+ <pn-stats-info heading="${args.heading}" background-url="" data-stats-image="image" data-stats-background-color="blue400">
72
72
  <div slot="illustration">
73
73
  <picture>
74
74
  <img src="https://com-integration.postnord.com/contentassets/f302a64bf3b5496aaf6f49d8d47e834e/bcdda39b3033ad8b_org.jpg?width=540&height=304&mode=crop&quality=80&anchor=topcenter" />
@@ -0,0 +1,22 @@
1
+ import readme from "./readme.md";
2
+
3
+ export default {
4
+ title: "Input/Multi-input",
5
+ parameters: {
6
+ notes: readme
7
+ },
8
+ argTypes: {
9
+ testprop: ""
10
+ }
11
+ };
12
+
13
+ const Template = ({ ...args }) => {
14
+ return `
15
+ <pn-multi-input testprop="${args.testprop}"></pn-multi-input>
16
+ `;
17
+ };
18
+
19
+ export const Primary = Template.bind({});
20
+ Primary.args = {
21
+ testprop : "Test prop content"
22
+ };
@@ -0,0 +1,31 @@
1
+ import { Component, Element, Host, h } from "@stencil/core";
2
+ export class PnmultiInput {
3
+ constructor() {
4
+ this.inputElm = null;
5
+ }
6
+ async componentDidLoad() {
7
+ this.init();
8
+ }
9
+ init() {
10
+ this.inputElm = this.hostElement.querySelector(".pn-multi-input");
11
+ }
12
+ addRow(e) {
13
+ if (e.type === 'click') {
14
+ console.log(this.inputElm);
15
+ }
16
+ }
17
+ render() {
18
+ return (h(Host, null,
19
+ h("div", { class: "pn-multi-input" },
20
+ h("slot", null)),
21
+ h("button", { onClick: (e) => this.addRow(e) }, "+")));
22
+ }
23
+ static get is() { return "pn-multi-input"; }
24
+ static get originalStyleUrls() { return {
25
+ "$": ["pn-multi-input.scss"]
26
+ }; }
27
+ static get styleUrls() { return {
28
+ "$": ["pn-multi-input.css"]
29
+ }; }
30
+ static get elementRef() { return "hostElement"; }
31
+ }
@@ -2,6 +2,12 @@
2
2
 
3
3
  import type { Components, JSX } from "../types/components";
4
4
 
5
+ interface PnAnimatedTile extends Components.PnAnimatedTile, HTMLElement {}
6
+ export const PnAnimatedTile: {
7
+ prototype: PnAnimatedTile;
8
+ new (): PnAnimatedTile;
9
+ };
10
+
5
11
  interface PnBonusProgressbar extends Components.PnBonusProgressbar, HTMLElement {}
6
12
  export const PnBonusProgressbar: {
7
13
  prototype: PnBonusProgressbar;
@@ -194,6 +200,12 @@ export const PnMarketwebSiteheaderUnifiedLogin: {
194
200
  new (): PnMarketwebSiteheaderUnifiedLogin;
195
201
  };
196
202
 
203
+ interface PnMultiInput extends Components.PnMultiInput, HTMLElement {}
204
+ export const PnMultiInput: {
205
+ prototype: PnMultiInput;
206
+ new (): PnMultiInput;
207
+ };
208
+
197
209
  interface PnParcelTracker extends Components.PnParcelTracker, HTMLElement {}
198
210
  export const PnParcelTracker: {
199
211
  prototype: PnParcelTracker;