@ptcwebops/ptcw-design 0.3.3 → 0.3.5

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 (110) hide show
  1. package/dist/cjs/icon-asset_16.cjs.entry.js +16 -15
  2. package/dist/cjs/{index-0b899fc6.js → index-e39de343.js} +3 -0
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/lottie-player.cjs.entry.js +1 -1
  5. package/dist/cjs/my-component.cjs.entry.js +1 -1
  6. package/dist/cjs/ptc-announcement.cjs.entry.js +1 -1
  7. package/dist/cjs/ptc-card.cjs.entry.js +1 -1
  8. package/dist/cjs/ptc-countdown.cjs.entry.js +1 -1
  9. package/dist/cjs/ptc-date.cjs.entry.js +8 -3
  10. package/dist/cjs/ptc-footer.cjs.entry.js +1 -1
  11. package/dist/cjs/ptc-form.cjs.entry.js +1 -1
  12. package/dist/cjs/ptc-input.cjs.entry.js +1 -1
  13. package/dist/cjs/ptc-list.cjs.entry.js +1 -1
  14. package/dist/cjs/ptc-lottie.cjs.entry.js +1 -1
  15. package/dist/cjs/ptc-modal.cjs.entry.js +114 -0
  16. package/dist/cjs/ptc-nav-item.cjs.entry.js +1 -1
  17. package/dist/cjs/ptc-nav.cjs.entry.js +1 -1
  18. package/dist/cjs/ptc-select.cjs.entry.js +1 -1
  19. package/dist/cjs/ptc-social-share.cjs.entry.js +68 -0
  20. package/dist/cjs/ptc-svg-btn.cjs.entry.js +1 -1
  21. package/dist/cjs/ptcw-design.cjs.js +2 -2
  22. package/dist/collection/collection-manifest.json +2 -1
  23. package/dist/collection/components/icon-asset/icon-asset.js +1 -0
  24. package/dist/collection/components/list-item/list-item.css +6 -2
  25. package/dist/collection/components/ptc-breadcrumb/ptc-breadcrumb.css +1 -12
  26. package/dist/collection/components/ptc-card-bottom/ptc-card-bottom.css +1 -1
  27. package/dist/collection/components/ptc-card-bottom/ptc-card-bottom.js +20 -2
  28. package/dist/collection/components/ptc-card-content/ptc-card-content.css +26 -4
  29. package/dist/collection/components/ptc-card-content/ptc-card-content.js +18 -0
  30. package/dist/collection/components/ptc-date/ptc-date.css +8 -0
  31. package/dist/collection/components/ptc-date/ptc-date.js +24 -1
  32. package/dist/collection/components/ptc-hero/ptc-hero.js +1 -1
  33. package/dist/collection/components/ptc-modal/ptc-modal.css +82 -0
  34. package/dist/collection/components/ptc-modal/ptc-modal.js +252 -0
  35. package/dist/collection/components/ptc-overlay/ptc-overlay.css +10 -9
  36. package/dist/collection/components/ptc-overlay/ptc-overlay.js +2 -2
  37. package/dist/collection/components/ptc-para/ptc-para.css +35 -0
  38. package/dist/collection/components/ptc-para/ptc-para.js +4 -4
  39. package/dist/collection/components/ptc-social-share/ptc-social-share.css +19 -0
  40. package/dist/collection/components/ptc-social-share/ptc-social-share.js +196 -0
  41. package/dist/collection/components/ptc-spacer/ptc-spacer.css +5 -0
  42. package/dist/collection/components/ptc-spacer/ptc-spacer.js +2 -2
  43. package/dist/collection/components/ptc-title/ptc-title.css +24 -3
  44. package/dist/collection/components/ptc-title/ptc-title.js +8 -7
  45. package/dist/custom-elements/index.d.ts +12 -6
  46. package/dist/custom-elements/index.js +204 -38
  47. package/dist/esm/icon-asset_16.entry.js +16 -15
  48. package/dist/esm/{index-6ce5b664.js → index-9e77d90e.js} +3 -0
  49. package/dist/esm/loader.js +2 -2
  50. package/dist/esm/lottie-player.entry.js +1 -1
  51. package/dist/esm/my-component.entry.js +1 -1
  52. package/dist/esm/ptc-announcement.entry.js +1 -1
  53. package/dist/esm/ptc-card.entry.js +1 -1
  54. package/dist/esm/ptc-countdown.entry.js +1 -1
  55. package/dist/esm/ptc-date.entry.js +8 -3
  56. package/dist/esm/ptc-footer.entry.js +1 -1
  57. package/dist/esm/ptc-form.entry.js +1 -1
  58. package/dist/esm/ptc-input.entry.js +1 -1
  59. package/dist/esm/ptc-list.entry.js +1 -1
  60. package/dist/esm/ptc-lottie.entry.js +1 -1
  61. package/dist/esm/ptc-modal.entry.js +110 -0
  62. package/dist/esm/ptc-nav-item.entry.js +1 -1
  63. package/dist/esm/ptc-nav.entry.js +1 -1
  64. package/dist/esm/ptc-select.entry.js +1 -1
  65. package/dist/esm/ptc-social-share.entry.js +64 -0
  66. package/dist/esm/ptc-svg-btn.entry.js +1 -1
  67. package/dist/esm/ptcw-design.js +2 -2
  68. package/dist/ptcw-design/p-19f001a4.js +1 -0
  69. package/dist/ptcw-design/{p-e266fc0b.entry.js → p-3050845e.entry.js} +1 -1
  70. package/dist/ptcw-design/{p-b85eda19.entry.js → p-5afee3b6.entry.js} +1 -1
  71. package/dist/ptcw-design/{p-3437fbce.entry.js → p-65b30c15.entry.js} +1 -1
  72. package/dist/ptcw-design/{p-e2492128.entry.js → p-762a6628.entry.js} +1 -1
  73. package/dist/ptcw-design/p-834e88dd.entry.js +1 -0
  74. package/dist/ptcw-design/{p-da7ee0ba.entry.js → p-8f9df770.entry.js} +1 -1
  75. package/dist/ptcw-design/p-96e30287.entry.js +1 -0
  76. package/dist/ptcw-design/p-9e94936c.entry.js +1 -0
  77. package/dist/ptcw-design/{p-31b2af1d.entry.js → p-a0fdfe9a.entry.js} +1 -1
  78. package/dist/ptcw-design/{p-5c78913c.entry.js → p-abb97d21.entry.js} +1 -1
  79. package/dist/ptcw-design/{p-bac826ad.entry.js → p-b3e145f3.entry.js} +1 -1
  80. package/dist/ptcw-design/{p-542939d4.entry.js → p-b542c708.entry.js} +1 -1
  81. package/dist/ptcw-design/{p-5eb74dc3.entry.js → p-b798ca9c.entry.js} +1 -1
  82. package/dist/ptcw-design/p-cccc0e5d.entry.js +1 -0
  83. package/dist/ptcw-design/p-f396010d.entry.js +1 -0
  84. package/dist/ptcw-design/{p-ac57feca.entry.js → p-f98b4bdd.entry.js} +1 -1
  85. package/dist/ptcw-design/{p-6ff80c95.entry.js → p-fe25f590.entry.js} +1 -1
  86. package/dist/ptcw-design/{p-aafe51df.entry.js → p-feed36fa.entry.js} +1 -1
  87. package/dist/ptcw-design/ptcw-design.css +2 -2
  88. package/dist/ptcw-design/ptcw-design.esm.js +1 -1
  89. package/dist/types/components/ptc-card-bottom/ptc-card-bottom.d.ts +5 -1
  90. package/dist/types/components/ptc-card-content/ptc-card-content.d.ts +4 -0
  91. package/dist/types/components/ptc-date/ptc-date.d.ts +4 -0
  92. package/dist/types/components/ptc-modal/ptc-modal.d.ts +46 -0
  93. package/dist/types/components/ptc-overlay/ptc-overlay.d.ts +1 -1
  94. package/dist/types/components/ptc-para/ptc-para.d.ts +2 -2
  95. package/dist/types/components/ptc-social-share/ptc-social-share.d.ts +20 -0
  96. package/dist/types/components/ptc-spacer/ptc-spacer.d.ts +1 -1
  97. package/dist/types/components/ptc-title/ptc-title.d.ts +1 -4
  98. package/dist/types/components.d.ts +136 -31
  99. package/package.json +1 -1
  100. package/readme.md +1 -1
  101. package/dist/cjs/ptc-avatar.cjs.entry.js +0 -19
  102. package/dist/collection/components/ptc-avatar/ptc-avatar.css +0 -3
  103. package/dist/collection/components/ptc-avatar/ptc-avatar.js +0 -15
  104. package/dist/esm/ptc-avatar.entry.js +0 -15
  105. package/dist/ptcw-design/p-5e44555b.entry.js +0 -1
  106. package/dist/ptcw-design/p-609dec21.entry.js +0 -1
  107. package/dist/ptcw-design/p-77dfe920.entry.js +0 -1
  108. package/dist/ptcw-design/p-9a35c9e2.entry.js +0 -1
  109. package/dist/ptcw-design/p-b1afaef3.js +0 -1
  110. package/dist/types/components/ptc-avatar/ptc-avatar.d.ts +0 -3
@@ -0,0 +1,252 @@
1
+ import { Component, Element, Host, Prop, State, h, Event } from '@stencil/core';
2
+ export class PtcModal {
3
+ constructor() {
4
+ /**
5
+ * Sets if popup should close if click on outside
6
+ */
7
+ this.size = 'sm';
8
+ /**
9
+ * Set whether or not to display modal
10
+ */
11
+ this.show = false;
12
+ /**
13
+ * Sets if popup should overlay
14
+ */
15
+ this.overlay = true;
16
+ /**
17
+ * Sets if popup should close if click on outside
18
+ */
19
+ this.closeOnBlur = false;
20
+ }
21
+ fireOnClosed(modal) {
22
+ this.closed.emit(modal);
23
+ }
24
+ fireOnOpened(modal) {
25
+ this.opened.emit(modal);
26
+ }
27
+ componentWillLoad() {
28
+ let body = document.querySelector('body');
29
+ this.bodyOverflowSetting = {
30
+ //overflow: body.style['overflow'],
31
+ overflowY: body.style['overflowY'],
32
+ overflowX: body.style['overflowX'],
33
+ };
34
+ }
35
+ componentWillRender() {
36
+ let body = document.querySelector('body');
37
+ if (body) {
38
+ if (this.show) {
39
+ //body.style['overflow'] = 'hidden';
40
+ body.style['overflowY'] = 'scroll';
41
+ body.style['overflowX'] = 'hidden';
42
+ }
43
+ else {
44
+ //body.style['overflow'] = this.bodyOverflowSetting.overflow;
45
+ body.style['overflowY'] = this.bodyOverflowSetting.overflowY;
46
+ body.style['overflowX'] = this.bodyOverflowSetting.overflowX;
47
+ }
48
+ }
49
+ }
50
+ componentDidLoad() {
51
+ if (this.show) {
52
+ this.fireOnOpened(this);
53
+ }
54
+ }
55
+ componentDidUpdate() {
56
+ if (this.show) {
57
+ this.fireOnOpened(this);
58
+ }
59
+ else {
60
+ this.fireOnClosed(this);
61
+ }
62
+ }
63
+ resizeIframe(e) {
64
+ let iFrame = e.target;
65
+ setTimeout(() => {
66
+ try {
67
+ iFrame.height = `${iFrame.contentDocument.body.scrollHeight}px`;
68
+ }
69
+ catch (error) {
70
+ console.log(error);
71
+ iFrame.height = '616px'; //default
72
+ iFrame.removeAttribute('scrolling');
73
+ }
74
+ iFrame.classList.add('ready');
75
+ }, 50);
76
+ }
77
+ close() {
78
+ this.show = false;
79
+ }
80
+ render() {
81
+ let content;
82
+ let overlay;
83
+ let type = this.iframeUrl ? 'frame' : 'html';
84
+ if (this.iframeUrl) {
85
+ content = (h("iframe", { src: this.iframeUrl, frameBorder: 0, allowFullScreen: false, height: "100%", width: "100%", scrolling: "no", onLoad: this.resizeIframe }));
86
+ }
87
+ else {
88
+ content = (h("slot", null));
89
+ }
90
+ if (this.overlay) {
91
+ if (this.closeOnBlur) {
92
+ overlay = h("div", { class: "overlay", onClick: (_) => this.close() });
93
+ }
94
+ else {
95
+ overlay = h("div", { class: "overlay" });
96
+ }
97
+ }
98
+ return (h(Host, null,
99
+ h("div", { class: `wrapper ${this.show ? "show" : "hide"}` },
100
+ overlay,
101
+ h("div", { class: `modal-popup ${this.size} ${type}` },
102
+ h("div", { class: "close" },
103
+ h("a", { href: "#", onClick: (_) => this.close() },
104
+ h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none" },
105
+ h("path", { d: "M1 1L13 13", stroke: "black" }),
106
+ h("path", { d: "M13 1L1 13", stroke: "black" })))),
107
+ h("div", { class: "modal-body" }, content)))));
108
+ }
109
+ static get is() { return "ptc-modal"; }
110
+ static get encapsulation() { return "shadow"; }
111
+ static get originalStyleUrls() { return {
112
+ "$": ["ptc-modal.scss"]
113
+ }; }
114
+ static get styleUrls() { return {
115
+ "$": ["ptc-modal.css"]
116
+ }; }
117
+ static get properties() { return {
118
+ "iframeUrl": {
119
+ "type": "string",
120
+ "mutable": true,
121
+ "complexType": {
122
+ "original": "string",
123
+ "resolved": "string",
124
+ "references": {}
125
+ },
126
+ "required": false,
127
+ "optional": false,
128
+ "docs": {
129
+ "tags": [],
130
+ "text": "Set url for content iframe to load if false will load slot element"
131
+ },
132
+ "attribute": "iframe-url",
133
+ "reflect": false
134
+ },
135
+ "size": {
136
+ "type": "string",
137
+ "mutable": true,
138
+ "complexType": {
139
+ "original": "'sm' | 'md' | 'lg' | 'xl'",
140
+ "resolved": "\"lg\" | \"md\" | \"sm\" | \"xl\"",
141
+ "references": {}
142
+ },
143
+ "required": false,
144
+ "optional": true,
145
+ "docs": {
146
+ "tags": [],
147
+ "text": "Sets if popup should close if click on outside"
148
+ },
149
+ "attribute": "size",
150
+ "reflect": false,
151
+ "defaultValue": "'sm'"
152
+ },
153
+ "show": {
154
+ "type": "boolean",
155
+ "mutable": true,
156
+ "complexType": {
157
+ "original": "boolean",
158
+ "resolved": "boolean",
159
+ "references": {}
160
+ },
161
+ "required": false,
162
+ "optional": true,
163
+ "docs": {
164
+ "tags": [],
165
+ "text": "Set whether or not to display modal"
166
+ },
167
+ "attribute": "show",
168
+ "reflect": false,
169
+ "defaultValue": "false"
170
+ },
171
+ "overlay": {
172
+ "type": "boolean",
173
+ "mutable": true,
174
+ "complexType": {
175
+ "original": "boolean",
176
+ "resolved": "boolean",
177
+ "references": {}
178
+ },
179
+ "required": false,
180
+ "optional": true,
181
+ "docs": {
182
+ "tags": [],
183
+ "text": "Sets if popup should overlay"
184
+ },
185
+ "attribute": "overlay",
186
+ "reflect": false,
187
+ "defaultValue": "true"
188
+ },
189
+ "closeOnBlur": {
190
+ "type": "boolean",
191
+ "mutable": true,
192
+ "complexType": {
193
+ "original": "boolean",
194
+ "resolved": "boolean",
195
+ "references": {}
196
+ },
197
+ "required": false,
198
+ "optional": true,
199
+ "docs": {
200
+ "tags": [],
201
+ "text": "Sets if popup should close if click on outside"
202
+ },
203
+ "attribute": "close-on-blur",
204
+ "reflect": false,
205
+ "defaultValue": "false"
206
+ }
207
+ }; }
208
+ static get states() { return {
209
+ "overlayHeight": {},
210
+ "bodyOverflowSetting": {}
211
+ }; }
212
+ static get events() { return [{
213
+ "method": "closed",
214
+ "name": "closed",
215
+ "bubbles": true,
216
+ "cancelable": true,
217
+ "composed": true,
218
+ "docs": {
219
+ "tags": [],
220
+ "text": "Event for modal popup closed"
221
+ },
222
+ "complexType": {
223
+ "original": "PtcModal",
224
+ "resolved": "PtcModal",
225
+ "references": {
226
+ "PtcModal": {
227
+ "location": "global"
228
+ }
229
+ }
230
+ }
231
+ }, {
232
+ "method": "opened",
233
+ "name": "opened",
234
+ "bubbles": true,
235
+ "cancelable": true,
236
+ "composed": true,
237
+ "docs": {
238
+ "tags": [],
239
+ "text": "Event for modal popup opened"
240
+ },
241
+ "complexType": {
242
+ "original": "PtcModal",
243
+ "resolved": "PtcModal",
244
+ "references": {
245
+ "PtcModal": {
246
+ "location": "global"
247
+ }
248
+ }
249
+ }
250
+ }]; }
251
+ static get elementRef() { return "el"; }
252
+ }
@@ -23,22 +23,23 @@
23
23
  background: linear-gradient(180deg, rgba(0, 137, 11, 0.2) 0%, #00890B 100%);
24
24
  }
25
25
 
26
- :host(.black-1-sm) {
27
- background: linear-gradient(270deg, rgba(32, 38, 42, 0) 33.33%, #20262A 100%);
26
+ :host(.black-1) {
27
+ background: linear-gradient(270deg, rgba(32, 38, 42, 0.32) 33.33%, #20262A 100%);
28
28
  }
29
29
 
30
- :host(.black-2-sm) {
30
+ :host(.black-2) {
31
31
  background: linear-gradient(180deg, rgba(32, 38, 42, 0) 0%, #20262A 100%);
32
32
  }
33
33
 
34
- :host(.black-1-xs) {
35
- background: linear-gradient(270deg, rgba(32, 38, 42, 0.32) 33.33%, #20262A 100%);
36
- }
34
+ @media screen and (min-width: 768px) {
35
+ :host(.black-1) {
36
+ background: linear-gradient(270deg, rgba(32, 38, 42, 0) 33.33%, #20262A 100%);
37
+ }
37
38
 
38
- :host(.black-2-xs) {
39
- background: linear-gradient(180deg, rgba(32, 38, 42, 0) 0%, #20262A 100%);
39
+ :host(.black-2) {
40
+ background: linear-gradient(180deg, rgba(32, 38, 42, 0) 0%, #20262A 100%);
41
+ }
40
42
  }
41
-
42
43
  :host(.black-3) {
43
44
  background: linear-gradient(180deg, #20262A 0%, rgba(32, 38, 42, 0.55) 100%);
44
45
  }
@@ -30,8 +30,8 @@ export class PtcOverlay {
30
30
  "type": "string",
31
31
  "mutable": false,
32
32
  "complexType": {
33
- "original": "'blue' | 'red' | 'orange' | 'green' | 'black-1-xs' | 'black-2-xs' | 'black-1-sm' | 'black-2-sm' | 'black-3' | 'slate-grey'",
34
- "resolved": "\"black-1-sm\" | \"black-1-xs\" | \"black-2-sm\" | \"black-2-xs\" | \"black-3\" | \"blue\" | \"green\" | \"orange\" | \"red\" | \"slate-grey\"",
33
+ "original": "'blue' | 'red' | 'orange' | 'green' | 'black-1' | 'black-2' | 'black-3' | 'slate-grey'",
34
+ "resolved": "\"black-1\" | \"black-2\" | \"black-3\" | \"blue\" | \"green\" | \"orange\" | \"red\" | \"slate-grey\"",
35
35
  "references": {}
36
36
  },
37
37
  "required": false,
@@ -74,29 +74,61 @@ p.margin-flush {
74
74
  margin-top: 0;
75
75
  margin-bottom: 0;
76
76
  }
77
+ p.margin-top-1 {
78
+ margin-top: var(--ptc-element-spacing-01);
79
+ margin-bottom: 0;
80
+ }
81
+ p.margin-top-2 {
82
+ margin-top: var(--ptc-element-spacing-02);
83
+ margin-bottom: 0;
84
+ }
77
85
  p.margin-top-3 {
78
86
  margin-top: var(--ptc-element-spacing-03);
87
+ margin-bottom: 0;
79
88
  }
80
89
  p.margin-top-4 {
81
90
  margin-top: var(--ptc-element-spacing-04);
91
+ margin-bottom: 0;
82
92
  }
83
93
  p.margin-top-5 {
84
94
  margin-top: var(--ptc-element-spacing-05);
95
+ margin-bottom: 0;
85
96
  }
86
97
  p.margin-top-6 {
87
98
  margin-top: var(--ptc-element-spacing-06);
99
+ margin-bottom: 0;
100
+ }
101
+ p.margin-bottom-1 {
102
+ margin-bottom: var(--ptc-element-spacing-01);
103
+ margin-top: 0;
104
+ }
105
+ p.margin-bottom-2 {
106
+ margin-bottom: var(--ptc-element-spacing-02);
107
+ margin-top: 0;
88
108
  }
89
109
  p.margin-bottom-3 {
90
110
  margin-bottom: var(--ptc-element-spacing-03);
111
+ margin-top: 0;
91
112
  }
92
113
  p.margin-bottom-4 {
93
114
  margin-bottom: var(--ptc-element-spacing-04);
115
+ margin-top: 0;
94
116
  }
95
117
  p.margin-bottom-5 {
96
118
  margin-bottom: var(--ptc-element-spacing-05);
119
+ margin-top: 0;
97
120
  }
98
121
  p.margin-bottom-6 {
99
122
  margin-bottom: var(--ptc-element-spacing-06);
123
+ margin-top: 0;
124
+ }
125
+ p.margin-1 {
126
+ margin-top: var(--ptc-element-spacing-01);
127
+ margin-bottom: var(--ptc-element-spacing-01);
128
+ }
129
+ p.margin-2 {
130
+ margin-top: var(--ptc-element-spacing-02);
131
+ margin-bottom: var(--ptc-element-spacing-02);
100
132
  }
101
133
  p.margin-3 {
102
134
  margin-top: var(--ptc-element-spacing-03);
@@ -123,6 +155,9 @@ p.line-height-18 {
123
155
  p.line-height-19 {
124
156
  line-height: var(--ptc-line-height-19);
125
157
  }
158
+ p.line-height-23 {
159
+ line-height: 23px;
160
+ }
126
161
  p.line-height-denser {
127
162
  line-height: var(--ptc-line-height-denser);
128
163
  }
@@ -122,8 +122,8 @@ export class PtcPara {
122
122
  "type": "string",
123
123
  "mutable": false,
124
124
  "complexType": {
125
- "original": "'line-height-17' | 'line-height-18' | 'line-height-19' | 'line-height-denser' | 'line-height-dense' | 'line-height-normal' | 'line-height-loose' | 'line-height-looser'",
126
- "resolved": "\"line-height-17\" | \"line-height-18\" | \"line-height-19\" | \"line-height-dense\" | \"line-height-denser\" | \"line-height-loose\" | \"line-height-looser\" | \"line-height-normal\"",
125
+ "original": "'line-height-17' | 'line-height-18' | 'line-height-19' | 'line-heigth-23' | 'line-height-denser' | 'line-height-dense' | 'line-height-normal' | 'line-height-loose' | 'line-height-looser'",
126
+ "resolved": "\"line-height-17\" | \"line-height-18\" | \"line-height-19\" | \"line-height-dense\" | \"line-height-denser\" | \"line-height-loose\" | \"line-height-looser\" | \"line-height-normal\" | \"line-heigth-23\"",
127
127
  "references": {}
128
128
  },
129
129
  "required": false,
@@ -140,8 +140,8 @@ export class PtcPara {
140
140
  "type": "string",
141
141
  "mutable": false,
142
142
  "complexType": {
143
- "original": "'margin-flush' | 'margin-top-3' | 'margin-top-4' | 'margin-top-5' | 'margin-top-6' | 'margin-bottom-3' | 'margin-bottom-4' | 'margin-bottom-5' | 'margin-bottom-6'| 'margin-3' | 'margin-4' | 'margin-5' | 'margin-6'",
144
- "resolved": "\"margin-3\" | \"margin-4\" | \"margin-5\" | \"margin-6\" | \"margin-bottom-3\" | \"margin-bottom-4\" | \"margin-bottom-5\" | \"margin-bottom-6\" | \"margin-flush\" | \"margin-top-3\" | \"margin-top-4\" | \"margin-top-5\" | \"margin-top-6\"",
143
+ "original": "'margin-flush' | 'maring-top-1' | 'margin-top-2' | 'margin-top-3' | 'margin-top-4' | 'margin-top-5' | 'margin-top-6' | 'margin-bottom-1' | 'margin-bottom-2' | 'margin-bottom-3' | 'margin-bottom-4' | 'margin-bottom-5' | 'margin-bottom-6'| 'margin-1' | 'margin-2' | 'margin-3' | 'margin-4' | 'margin-5' | 'margin-6'",
144
+ "resolved": "\"margin-1\" | \"margin-2\" | \"margin-3\" | \"margin-4\" | \"margin-5\" | \"margin-6\" | \"margin-bottom-1\" | \"margin-bottom-2\" | \"margin-bottom-3\" | \"margin-bottom-4\" | \"margin-bottom-5\" | \"margin-bottom-6\" | \"margin-flush\" | \"margin-top-2\" | \"margin-top-3\" | \"margin-top-4\" | \"margin-top-5\" | \"margin-top-6\" | \"maring-top-1\"",
145
145
  "references": {}
146
146
  },
147
147
  "required": false,
@@ -0,0 +1,19 @@
1
+ :host(.inline-block) {
2
+ display: inline-block;
3
+ }
4
+
5
+ :host(.block) {
6
+ display: block;
7
+ }
8
+
9
+ :host(.inline) {
10
+ display: inline;
11
+ }
12
+
13
+ :host(.flex) {
14
+ display: flex;
15
+ }
16
+
17
+ :host(.ptc-social-share) {
18
+ cursor: pointer;
19
+ }
@@ -0,0 +1,196 @@
1
+ import { Component, Host, h, Prop, Element } from '@stencil/core';
2
+ export class PtcSocialShare {
3
+ constructor() {
4
+ this.display = "inline-block";
5
+ this.shareType = 'twitter';
6
+ /**
7
+ * Optional - source for linkedin
8
+ */
9
+ this.source = '';
10
+ /**
11
+ * Email recipient.
12
+ * If you want to use mail share, you need to use this property
13
+ */
14
+ this.recipient = '';
15
+ }
16
+ render() {
17
+ const classMap = this.getCssClassMap();
18
+ return (h(Host, { class: classMap },
19
+ h("div", { onClick: () => this.share() },
20
+ this.shareType == 'mail' ? h("icon-asset", { type: "ptc", size: "x-large", name: "plm-mail", color: "white" }) : null,
21
+ this.shareType == 'linkedin' ? h("icon-asset", { type: "ptc", size: "x-large", name: "plm-linkedin", color: "white" }) : null,
22
+ this.shareType == 'twitter' ? h("icon-asset", { type: "ptc", size: "x-large", name: "plm-twitter", color: "white" }) : null,
23
+ this.shareType == 'facebook' ? h("icon-asset", { type: "ptc", size: "x-large", name: "plm-fb", color: "white" }) : null,
24
+ this.shareType == 'share-api' ? h("icon-asset", { type: "solid", size: "x-large", name: "share-square", color: "white" }) : null)));
25
+ }
26
+ getCssClassMap() {
27
+ return {
28
+ ['ptc-social-share']: true,
29
+ [this.display]: true
30
+ };
31
+ }
32
+ share() {
33
+ if (this.shareType == 'twitter') {
34
+ window.open(`https://twitter.com/share?text=${this.text}&url=${this.url}`);
35
+ }
36
+ if (this.shareType == 'facebook') {
37
+ window.open(`https://www.facebook.com/sharer/sharer.php?u=${this.url}`);
38
+ }
39
+ if (this.shareType == 'linkedin') {
40
+ window.open(`https://www.linkedin.com/shareArticle?mini=true&url=${this.url}&title=${this.shareTitle}&summary=${this.text}&source=${this.source}`);
41
+ }
42
+ if (this.shareType == 'mail') {
43
+ window.open(`mailto:${this.recipient}?subject=${this.text}&body=${this.url}`);
44
+ }
45
+ if (this.shareType == 'share-api') {
46
+ if (navigator.share) {
47
+ navigator
48
+ .share({
49
+ title: this.shareTitle,
50
+ text: this.text,
51
+ url: this.url,
52
+ })
53
+ .then(() => console.log('Successful share'))
54
+ .catch(error => console.log('Error sharing', error));
55
+ }
56
+ else {
57
+ // fallback to sharing to twitter
58
+ window.open(`http://twitter.com/share?text=${this.text}&url=${this.url}`);
59
+ }
60
+ }
61
+ }
62
+ static get is() { return "ptc-social-share"; }
63
+ static get encapsulation() { return "shadow"; }
64
+ static get originalStyleUrls() { return {
65
+ "$": ["ptc-social-share.scss"]
66
+ }; }
67
+ static get styleUrls() { return {
68
+ "$": ["ptc-social-share.css"]
69
+ }; }
70
+ static get properties() { return {
71
+ "display": {
72
+ "type": "string",
73
+ "mutable": false,
74
+ "complexType": {
75
+ "original": "'inline-block' | 'block' | 'inline' | 'flex'",
76
+ "resolved": "\"block\" | \"flex\" | \"inline\" | \"inline-block\"",
77
+ "references": {}
78
+ },
79
+ "required": false,
80
+ "optional": true,
81
+ "docs": {
82
+ "tags": [],
83
+ "text": ""
84
+ },
85
+ "attribute": "display",
86
+ "reflect": false,
87
+ "defaultValue": "\"inline-block\""
88
+ },
89
+ "shareType": {
90
+ "type": "string",
91
+ "mutable": false,
92
+ "complexType": {
93
+ "original": "'mail' | 'twitter' | 'linkedin' | 'facebook' | 'share-api'",
94
+ "resolved": "\"facebook\" | \"linkedin\" | \"mail\" | \"share-api\" | \"twitter\"",
95
+ "references": {}
96
+ },
97
+ "required": false,
98
+ "optional": true,
99
+ "docs": {
100
+ "tags": [],
101
+ "text": ""
102
+ },
103
+ "attribute": "share-type",
104
+ "reflect": false,
105
+ "defaultValue": "'twitter'"
106
+ },
107
+ "shareTitle": {
108
+ "type": "string",
109
+ "mutable": false,
110
+ "complexType": {
111
+ "original": "string",
112
+ "resolved": "string",
113
+ "references": {}
114
+ },
115
+ "required": false,
116
+ "optional": false,
117
+ "docs": {
118
+ "tags": [],
119
+ "text": ""
120
+ },
121
+ "attribute": "share-title",
122
+ "reflect": false
123
+ },
124
+ "text": {
125
+ "type": "string",
126
+ "mutable": false,
127
+ "complexType": {
128
+ "original": "string",
129
+ "resolved": "string",
130
+ "references": {}
131
+ },
132
+ "required": false,
133
+ "optional": false,
134
+ "docs": {
135
+ "tags": [],
136
+ "text": ""
137
+ },
138
+ "attribute": "text",
139
+ "reflect": false
140
+ },
141
+ "url": {
142
+ "type": "string",
143
+ "mutable": false,
144
+ "complexType": {
145
+ "original": "string",
146
+ "resolved": "string",
147
+ "references": {}
148
+ },
149
+ "required": false,
150
+ "optional": false,
151
+ "docs": {
152
+ "tags": [],
153
+ "text": ""
154
+ },
155
+ "attribute": "url",
156
+ "reflect": false
157
+ },
158
+ "source": {
159
+ "type": "string",
160
+ "mutable": false,
161
+ "complexType": {
162
+ "original": "string",
163
+ "resolved": "string",
164
+ "references": {}
165
+ },
166
+ "required": false,
167
+ "optional": true,
168
+ "docs": {
169
+ "tags": [],
170
+ "text": "Optional - source for linkedin"
171
+ },
172
+ "attribute": "source",
173
+ "reflect": false,
174
+ "defaultValue": "''"
175
+ },
176
+ "recipient": {
177
+ "type": "string",
178
+ "mutable": false,
179
+ "complexType": {
180
+ "original": "string",
181
+ "resolved": "string",
182
+ "references": {}
183
+ },
184
+ "required": false,
185
+ "optional": true,
186
+ "docs": {
187
+ "tags": [],
188
+ "text": "Email recipient.\nIf you want to use mail share, you need to use this property"
189
+ },
190
+ "attribute": "recipient",
191
+ "reflect": false,
192
+ "defaultValue": "''"
193
+ }
194
+ }; }
195
+ static get elementRef() { return "el"; }
196
+ }
@@ -246,6 +246,11 @@
246
246
  height: 120px;
247
247
  min-height: 120px;
248
248
  }
249
+ :host(.ptc-spacer-vertical.space-128){
250
+ width: 100%;
251
+ height: 128px;
252
+ min-height: 128px;
253
+ }
249
254
 
250
255
  :host(.ptc-spacer-xx-small) {
251
256
  display: none
@@ -63,8 +63,8 @@ export class PtcSpacer {
63
63
  "type": "string",
64
64
  "mutable": false,
65
65
  "complexType": {
66
- "original": "'large' | 'medium' | 'small' | 'x-large' | 'x-small' | 'xx-large' | 'xx-small' | 'xxx-large' | 'xxxx-large' | 'space-144' | 'space-120'",
67
- "resolved": "\"large\" | \"medium\" | \"small\" | \"space-120\" | \"space-144\" | \"x-large\" | \"x-small\" | \"xx-large\" | \"xx-small\" | \"xxx-large\" | \"xxxx-large\"",
66
+ "original": "'large' | 'medium' | 'small' | 'x-large' | 'x-small' | 'xx-large' | 'xx-small' | 'xxx-large' | 'xxxx-large' | 'space-144' | 'space-120' | 'space-128'",
67
+ "resolved": "\"large\" | \"medium\" | \"small\" | \"space-120\" | \"space-128\" | \"space-144\" | \"x-large\" | \"x-small\" | \"xx-large\" | \"xx-small\" | \"xxx-large\" | \"xxxx-large\"",
68
68
  "references": {}
69
69
  },
70
70
  "required": false,
@@ -88,19 +88,19 @@ div.is-plm-hub h3 {
88
88
  margin-inline-end: 0px;
89
89
  }
90
90
  div.is-plm-hub h1 {
91
- font-weight: var(--ptc-font-weight-bold);
91
+ font-weight: var(--ptc-font-weight-extrabold);
92
92
  font-size: 50px;
93
93
  line-height: 59px;
94
94
  color: var(--color-white);
95
95
  }
96
96
  div.is-plm-hub h2 {
97
- font-weight: var(--ptc-font-weight-bold);
97
+ font-weight: var(--ptc-font-weight-extrabold);
98
98
  font-size: var(--ptc-font-size-x-large);
99
99
  line-height: 28px;
100
100
  color: var(--color-white);
101
101
  }
102
102
  div.is-plm-hub h3 {
103
- font-weight: var(--ptc-font-weight-bold);
103
+ font-weight: var(--ptc-font-weight-extrabold);
104
104
  font-size: var(--ptc-font-size-large);
105
105
  line-height: 23px;
106
106
  color: var(--color-white);
@@ -173,4 +173,25 @@ div.orange h1, div.orange h2, div.orange h3 {
173
173
  }
174
174
  div.slate-grey h1, div.slate-grey h2, div.slate-grey h3 {
175
175
  text-shadow: 0px 0px 12px var(--color-grey-07);
176
+ }
177
+ div.w-3 h1, div.w-3 h2, div.w-3 h3 {
178
+ font-weight: var(--ptc-font-weight-thin);
179
+ }
180
+ div.w-4 h1, div.w-4 h2, div.w-4 h3 {
181
+ font-weight: var(--ptc-font-weight-regular);
182
+ }
183
+ div.w-5 h1, div.w-5 h2, div.w-5 h3 {
184
+ font-weight: var(--ptc-font-weight-medium);
185
+ }
186
+ div.w-6 h1, div.w-6 h2, div.w-6 h3 {
187
+ font-weight: var(--ptc-font-weight-semibold);
188
+ }
189
+ div.w-7 h1, div.w-7 h2, div.w-7 h3 {
190
+ font-weight: var(--ptc-font-weight-bold);
191
+ }
192
+ div.w-8 h1, div.w-8 h2, div.w-8 h3 {
193
+ font-weight: var(--ptc-font-weight-extrabold);
194
+ }
195
+ div.w-9 h1, div.w-9 h2, div.w-9 h3 {
196
+ font-weight: var(--ptc-font-weight-black);
176
197
  }