@ptcwebops/ptcw-design 0.1.1 → 0.1.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.
Files changed (143) hide show
  1. package/dist/cjs/icon-asset_5.cjs.entry.js +207 -0
  2. package/dist/{ptcw-design/index-f7043a90.js → cjs/index-ac192914.js} +195 -1311
  3. package/dist/cjs/index.cjs.js +2 -0
  4. package/dist/cjs/list-item.cjs.entry.js +27 -0
  5. package/dist/cjs/loader.cjs.js +21 -0
  6. package/dist/cjs/lottie-player.cjs.entry.js +13476 -0
  7. package/dist/cjs/my-component.cjs.entry.js +26 -0
  8. package/dist/cjs/ptc-card.cjs.entry.js +75 -0
  9. package/dist/cjs/ptc-date.cjs.entry.js +48 -0
  10. package/dist/cjs/ptc-footer.cjs.entry.js +19 -0
  11. package/dist/cjs/ptc-image.cjs.entry.js +58 -0
  12. package/dist/cjs/ptc-img.cjs.entry.js +160 -0
  13. package/dist/cjs/ptc-link.cjs.entry.js +53 -0
  14. package/dist/cjs/ptc-list.cjs.entry.js +32 -0
  15. package/dist/cjs/ptc-lottie.cjs.entry.js +23 -0
  16. package/dist/cjs/ptc-nav-item.cjs.entry.js +94 -0
  17. package/dist/cjs/ptc-nav.cjs.entry.js +19 -0
  18. package/dist/cjs/ptc-overlay.cjs.entry.js +19 -0
  19. package/dist/cjs/ptc-picture.cjs.entry.js +26 -0
  20. package/dist/cjs/ptc-spacer.cjs.entry.js +46 -0
  21. package/dist/cjs/ptc-span.cjs.entry.js +31 -0
  22. package/dist/cjs/ptc-title.cjs.entry.js +49 -0
  23. package/dist/cjs/ptcw-design.cjs.js +19 -0
  24. package/dist/collection/assets/svg-imgs/close.svg +11 -0
  25. package/dist/collection/collection-manifest.json +40 -0
  26. package/dist/collection/components/icon-asset/assets/brands.svg +1381 -0
  27. package/dist/collection/components/icon-asset/assets/footer-social.svg +0 -0
  28. package/dist/collection/components/icon-asset/assets/ptc-sprite.svg +144 -0
  29. package/dist/collection/components/icon-asset/assets/regular.svg +463 -0
  30. package/dist/collection/components/icon-asset/assets/solid.svg +3013 -0
  31. package/dist/collection/components/icon-asset/assets/svg-with-js.min.css +5 -0
  32. package/dist/collection/components/icon-asset/icon-asset.css +30 -0
  33. package/dist/collection/components/icon-asset/icon-asset.js +177 -0
  34. package/dist/collection/components/list-item/list-item.css +3 -0
  35. package/dist/collection/components/list-item/list-item.js +63 -0
  36. package/dist/collection/components/my-component/my-component.css +3 -0
  37. package/dist/collection/components/my-component/my-component.js +74 -0
  38. package/dist/collection/components/ptc-announcement/ptc-announcement.css +87 -0
  39. package/dist/collection/components/ptc-announcement/ptc-announcement.js +127 -0
  40. package/dist/collection/components/ptc-button/ptc-button.css +155 -0
  41. package/dist/collection/components/ptc-button/ptc-button.js +223 -0
  42. package/dist/collection/components/ptc-card/ptc-card.css +239 -0
  43. package/dist/collection/components/ptc-card/ptc-card.js +260 -0
  44. package/dist/collection/components/ptc-date/ptc-date.css +3 -0
  45. package/dist/collection/components/ptc-date/ptc-date.js +155 -0
  46. package/dist/collection/components/ptc-footer/ptc-footer.css +40 -0
  47. package/dist/collection/components/ptc-footer/ptc-footer.js +25 -0
  48. package/dist/collection/components/ptc-image/ptc-image.css +4 -0
  49. package/dist/collection/components/ptc-image/ptc-image.js +92 -0
  50. package/dist/collection/components/ptc-img/ptc-img.css +65 -0
  51. package/dist/collection/components/ptc-img/ptc-img.js +315 -0
  52. package/dist/collection/components/ptc-link/ptc-link.css +168 -0
  53. package/dist/collection/components/ptc-link/ptc-link.js +197 -0
  54. package/dist/collection/components/ptc-list/ptc-list.css +24 -0
  55. package/dist/collection/components/ptc-list/ptc-list.js +66 -0
  56. package/dist/collection/components/ptc-lottie/ptc-lottie.css +5 -0
  57. package/dist/collection/components/ptc-lottie/ptc-lottie.js +58 -0
  58. package/dist/collection/components/ptc-nav/ptc-nav.css +29 -0
  59. package/dist/collection/components/ptc-nav/ptc-nav.js +21 -0
  60. package/dist/collection/components/ptc-nav-item/ptc-nav-item.css +81 -0
  61. package/dist/collection/components/ptc-nav-item/ptc-nav-item.js +252 -0
  62. package/dist/collection/components/ptc-overlay/ptc-overlay.css +3 -0
  63. package/dist/collection/components/ptc-overlay/ptc-overlay.js +14 -0
  64. package/dist/collection/components/ptc-para/ptc-para.css +64 -0
  65. package/dist/collection/components/ptc-para/ptc-para.js +111 -0
  66. package/dist/collection/components/ptc-picture/ptc-picture.css +3 -0
  67. package/dist/collection/components/ptc-picture/ptc-picture.js +44 -0
  68. package/dist/collection/components/ptc-spacer/ptc-spacer.css +307 -0
  69. package/dist/collection/components/ptc-spacer/ptc-spacer.js +99 -0
  70. package/dist/collection/components/ptc-span/ptc-span.css +36 -0
  71. package/dist/collection/components/ptc-span/ptc-span.js +86 -0
  72. package/dist/collection/components/ptc-svg-btn/ptc-svg-btn.css +77 -0
  73. package/dist/collection/components/ptc-svg-btn/ptc-svg-btn.js +34 -0
  74. package/dist/collection/components/ptc-title/ptc-title.css +64 -0
  75. package/dist/collection/components/ptc-title/ptc-title.js +105 -0
  76. package/dist/collection/index.js +1 -0
  77. package/dist/collection/utils/interfaces.js +6 -0
  78. package/dist/collection/utils/utils.js +3 -0
  79. package/dist/custom-elements/index.js +14452 -0
  80. package/dist/{ptcw-design/ptc-announcement.entry.js → esm/icon-asset_5.entry.js} +170 -2
  81. package/dist/esm/index-7a3883ee.js +1687 -0
  82. package/dist/esm/index.js +1 -0
  83. package/dist/{ptcw-design → esm}/list-item.entry.js +1 -1
  84. package/dist/esm/loader.js +17 -0
  85. package/dist/{ptcw-design → esm}/lottie-player.entry.js +31 -782
  86. package/dist/{ptcw-design → esm}/my-component.entry.js +1 -1
  87. package/dist/esm/polyfills/core-js.js +11 -0
  88. package/dist/esm/polyfills/css-shim.js +1 -0
  89. package/dist/esm/polyfills/dom.js +79 -0
  90. package/dist/esm/polyfills/es5-html-element.js +1 -0
  91. package/dist/esm/polyfills/index.js +34 -0
  92. package/dist/esm/polyfills/system.js +6 -0
  93. package/dist/{ptcw-design → esm}/ptc-card.entry.js +1 -1
  94. package/dist/{ptcw-design → esm}/ptc-date.entry.js +1 -1
  95. package/dist/{ptcw-design → esm}/ptc-footer.entry.js +1 -1
  96. package/dist/{ptcw-design → esm}/ptc-image.entry.js +1 -1
  97. package/dist/{ptcw-design → esm}/ptc-img.entry.js +2 -16
  98. package/dist/{ptcw-design → esm}/ptc-link.entry.js +1 -1
  99. package/dist/{ptcw-design → esm}/ptc-list.entry.js +1 -1
  100. package/dist/{ptcw-design → esm}/ptc-lottie.entry.js +1 -1
  101. package/dist/{ptcw-design → esm}/ptc-nav-item.entry.js +1 -1
  102. package/dist/{ptcw-design → esm}/ptc-nav.entry.js +1 -1
  103. package/dist/{ptcw-design → esm}/ptc-overlay.entry.js +1 -1
  104. package/dist/{ptcw-design → esm}/ptc-picture.entry.js +1 -1
  105. package/dist/{ptcw-design → esm}/ptc-spacer.entry.js +1 -1
  106. package/dist/{ptcw-design → esm}/ptc-span.entry.js +1 -1
  107. package/dist/{ptcw-design → esm}/ptc-title.entry.js +1 -1
  108. package/dist/esm/ptcw-design.js +17 -0
  109. package/dist/index.cjs.js +1 -0
  110. package/dist/index.js +1 -0
  111. package/dist/node_modules/@teamhive/lottie-player/dist/collection/components/lottie-player/lottie-player.css +187 -0
  112. package/dist/ptcw-design/index.esm.js +0 -1
  113. package/dist/ptcw-design/p-0c8df906.entry.js +1 -0
  114. package/dist/ptcw-design/p-186beb2c.entry.js +1 -0
  115. package/dist/ptcw-design/p-1df1006b.entry.js +1 -0
  116. package/dist/ptcw-design/p-2d5f8cff.entry.js +1 -0
  117. package/dist/ptcw-design/p-4586b0f5.entry.js +1 -0
  118. package/dist/ptcw-design/p-50923c9a.js +1 -0
  119. package/dist/ptcw-design/p-51a3e9e6.entry.js +1 -0
  120. package/dist/ptcw-design/p-56f6f900.entry.js +1 -0
  121. package/dist/ptcw-design/p-5f776886.entry.js +1 -0
  122. package/dist/ptcw-design/p-66ffa30c.entry.js +1 -0
  123. package/dist/ptcw-design/p-6b1a35e1.entry.js +1 -0
  124. package/dist/ptcw-design/p-796b8287.entry.js +1 -0
  125. package/dist/ptcw-design/p-90402319.entry.js +1 -0
  126. package/dist/ptcw-design/p-919311d2.entry.js +1 -0
  127. package/dist/ptcw-design/p-97a61538.entry.js +1 -0
  128. package/dist/ptcw-design/p-ac449734.entry.js +1 -0
  129. package/dist/ptcw-design/p-d6553853.entry.js +1 -0
  130. package/dist/ptcw-design/p-dddd4d6e.entry.js +1 -0
  131. package/dist/ptcw-design/p-ef250898.entry.js +1 -0
  132. package/dist/ptcw-design/p-f80152dc.entry.js +1 -0
  133. package/dist/ptcw-design/ptcw-design.css +2 -1030
  134. package/dist/ptcw-design/ptcw-design.esm.js +1 -122
  135. package/package.json +2 -2
  136. package/dist/ptcw-design/app-globals-0f993ce5.js +0 -3
  137. package/dist/ptcw-design/css-shim-003e9264.js +0 -4
  138. package/dist/ptcw-design/dom-1b195079.js +0 -73
  139. package/dist/ptcw-design/icon-asset.entry.js +0 -60
  140. package/dist/ptcw-design/ptc-button.entry.js +0 -57
  141. package/dist/ptcw-design/ptc-para.entry.js +0 -36
  142. package/dist/ptcw-design/ptc-svg-btn.entry.js +0 -27
  143. package/dist/ptcw-design/shadow-css-c1ad5fdc.js +0 -383
@@ -0,0 +1,260 @@
1
+ import { Component, Prop, Host, h } from '@stencil/core';
2
+ export class PtcCard {
3
+ constructor() {
4
+ /**
5
+ * Card Type
6
+ * Specify Card Type, default to simple card
7
+ */
8
+ this.cardType = 'custom-card';
9
+ /**
10
+ * Card Link URL (Optional)
11
+ */
12
+ this.cardHref = undefined;
13
+ /**
14
+ * (optional) Link card target
15
+ * */
16
+ this.target = '_self';
17
+ /**
18
+ * (optional) Link card rel
19
+ * */
20
+ this.rel = undefined;
21
+ /**
22
+ * If this card has Image
23
+ */
24
+ this.hasImage = false;
25
+ /**
26
+ * If this card has Video
27
+ */
28
+ this.hasVideo = false;
29
+ /**
30
+ * If this card has Lottie Image
31
+ */
32
+ this.hasLottie = false;
33
+ }
34
+ render() {
35
+ const Tag = !!this.cardHref ? 'a' : 'div';
36
+ const classMap = this.getCssClassMap();
37
+ return (h(Host, Object.assign({}, (!!this.cardType ? { class: this.cardType } : {})),
38
+ this.styles && h("style", null, this.styles),
39
+ h("div", { class: "card-border", part: "border-wrapper" },
40
+ h(Tag, Object.assign({ class: classMap, part: "card-layout" }, (!!this.cardHref ? { href: this.cardHref } : {}), (!!this.target && !!this.cardHref ? { target: this.target } : {}), (!!this.rel && !!this.cardHref ? { rel: this.rel } : {})),
41
+ this.hasImage || this.hasLottie || this.hasVideo ? (h("div", { class: "card-media", part: "media-wrapper" }, this.getMediaSlot ? h("slot", { name: this.getMediaSlot() }) : null)) : null,
42
+ h("div", { class: "card-body", part: "body-wrapper" },
43
+ h("slot", { name: "slot-before-heading" }),
44
+ !!this.heading
45
+ ? [
46
+ h("h3", { class: "ptc-h3", part: "card-heading" }, this.heading),
47
+ h("slot", { name: "slot-after-heading" }),
48
+ ]
49
+ : null,
50
+ h("slot", { name: "slot-description" }),
51
+ !!this.cardDate ? h("ptc-date", { "date-string": `${this.cardDate}`, "date-styles": "::part(part-ptc-date){color:#40434a;font-size:var(--ptc-font-size-medium);margin-top:var(--ptc-element-spacing-04);display:inline-block;}" }) : null)))));
52
+ }
53
+ getCssClassMap() {
54
+ return {
55
+ ['card-layout']: true,
56
+ ['link-wrapper']: !!this.cardType ? true : false,
57
+ };
58
+ }
59
+ getMediaSlot() {
60
+ if (this.hasLottie) {
61
+ return 'slot-lottie';
62
+ }
63
+ else if (this.hasVideo) {
64
+ return 'slot-video';
65
+ }
66
+ else if (this.hasImage) {
67
+ return 'slot-image';
68
+ }
69
+ else {
70
+ return null;
71
+ }
72
+ }
73
+ static get is() { return "ptc-card"; }
74
+ static get encapsulation() { return "shadow"; }
75
+ static get originalStyleUrls() { return {
76
+ "$": ["ptc-card.scss"]
77
+ }; }
78
+ static get styleUrls() { return {
79
+ "$": ["ptc-card.css"]
80
+ }; }
81
+ static get properties() { return {
82
+ "cardType": {
83
+ "type": "string",
84
+ "mutable": false,
85
+ "complexType": {
86
+ "original": "'simple-card' | 'lottie-card' | 'custom-card' | 'clip-edge-card' | 'hightlight-card'",
87
+ "resolved": "\"clip-edge-card\" | \"custom-card\" | \"hightlight-card\" | \"lottie-card\" | \"simple-card\"",
88
+ "references": {}
89
+ },
90
+ "required": false,
91
+ "optional": false,
92
+ "docs": {
93
+ "tags": [],
94
+ "text": "Card Type\nSpecify Card Type, default to simple card"
95
+ },
96
+ "attribute": "card-type",
97
+ "reflect": false,
98
+ "defaultValue": "'custom-card'"
99
+ },
100
+ "cardHref": {
101
+ "type": "string",
102
+ "mutable": false,
103
+ "complexType": {
104
+ "original": "string",
105
+ "resolved": "string",
106
+ "references": {}
107
+ },
108
+ "required": false,
109
+ "optional": true,
110
+ "docs": {
111
+ "tags": [],
112
+ "text": "Card Link URL (Optional)"
113
+ },
114
+ "attribute": "card-href",
115
+ "reflect": false,
116
+ "defaultValue": "undefined"
117
+ },
118
+ "target": {
119
+ "type": "string",
120
+ "mutable": false,
121
+ "complexType": {
122
+ "original": "string",
123
+ "resolved": "string",
124
+ "references": {}
125
+ },
126
+ "required": false,
127
+ "optional": true,
128
+ "docs": {
129
+ "tags": [],
130
+ "text": "(optional) Link card target"
131
+ },
132
+ "attribute": "target",
133
+ "reflect": false,
134
+ "defaultValue": "'_self'"
135
+ },
136
+ "rel": {
137
+ "type": "string",
138
+ "mutable": false,
139
+ "complexType": {
140
+ "original": "string",
141
+ "resolved": "string",
142
+ "references": {}
143
+ },
144
+ "required": false,
145
+ "optional": true,
146
+ "docs": {
147
+ "tags": [],
148
+ "text": "(optional) Link card rel"
149
+ },
150
+ "attribute": "rel",
151
+ "reflect": false,
152
+ "defaultValue": "undefined"
153
+ },
154
+ "hasImage": {
155
+ "type": "boolean",
156
+ "mutable": false,
157
+ "complexType": {
158
+ "original": "boolean",
159
+ "resolved": "boolean",
160
+ "references": {}
161
+ },
162
+ "required": false,
163
+ "optional": false,
164
+ "docs": {
165
+ "tags": [],
166
+ "text": "If this card has Image"
167
+ },
168
+ "attribute": "has-image",
169
+ "reflect": false,
170
+ "defaultValue": "false"
171
+ },
172
+ "hasVideo": {
173
+ "type": "boolean",
174
+ "mutable": false,
175
+ "complexType": {
176
+ "original": "boolean",
177
+ "resolved": "boolean",
178
+ "references": {}
179
+ },
180
+ "required": false,
181
+ "optional": false,
182
+ "docs": {
183
+ "tags": [],
184
+ "text": "If this card has Video"
185
+ },
186
+ "attribute": "has-video",
187
+ "reflect": false,
188
+ "defaultValue": "false"
189
+ },
190
+ "hasLottie": {
191
+ "type": "boolean",
192
+ "mutable": false,
193
+ "complexType": {
194
+ "original": "boolean",
195
+ "resolved": "boolean",
196
+ "references": {}
197
+ },
198
+ "required": false,
199
+ "optional": false,
200
+ "docs": {
201
+ "tags": [],
202
+ "text": "If this card has Lottie Image"
203
+ },
204
+ "attribute": "has-lottie",
205
+ "reflect": false,
206
+ "defaultValue": "false"
207
+ },
208
+ "heading": {
209
+ "type": "string",
210
+ "mutable": false,
211
+ "complexType": {
212
+ "original": "string",
213
+ "resolved": "string",
214
+ "references": {}
215
+ },
216
+ "required": false,
217
+ "optional": true,
218
+ "docs": {
219
+ "tags": [],
220
+ "text": "Card heading"
221
+ },
222
+ "attribute": "heading",
223
+ "reflect": false
224
+ },
225
+ "cardDate": {
226
+ "type": "string",
227
+ "mutable": false,
228
+ "complexType": {
229
+ "original": "string",
230
+ "resolved": "string",
231
+ "references": {}
232
+ },
233
+ "required": false,
234
+ "optional": true,
235
+ "docs": {
236
+ "tags": [],
237
+ "text": "Card Date"
238
+ },
239
+ "attribute": "card-date",
240
+ "reflect": false
241
+ },
242
+ "styles": {
243
+ "type": "string",
244
+ "mutable": false,
245
+ "complexType": {
246
+ "original": "string",
247
+ "resolved": "string",
248
+ "references": {}
249
+ },
250
+ "required": false,
251
+ "optional": true,
252
+ "docs": {
253
+ "tags": [],
254
+ "text": "(optional) Injected CSS styles"
255
+ },
256
+ "attribute": "styles",
257
+ "reflect": false
258
+ }
259
+ }; }
260
+ }
@@ -0,0 +1,3 @@
1
+ :host {
2
+ display: block;
3
+ }
@@ -0,0 +1,155 @@
1
+ import { Component, Host, h, Prop } from '@stencil/core';
2
+ export class PtcDate {
3
+ constructor() {
4
+ /**
5
+ * Year
6
+ */
7
+ this.year = 1900;
8
+ /**
9
+ * Month
10
+ * An integer between 0 (January) and 11 (December) representing the month.If omitted, defaults to 0.
11
+ */
12
+ this.month = 0;
13
+ /**
14
+ * Day
15
+ * An integer between 1 and 31 representing the day of the month. If omitted, defaults to 1.
16
+ */
17
+ this.day = 1;
18
+ /**
19
+ * Country
20
+ * examples: en-US, zh-CN, zh-TW, fr-FR, ja-JP, ru-RU, de-DE, ko-KR, it-IT, es-ES
21
+ */
22
+ this.country = "en-US";
23
+ }
24
+ render() {
25
+ // const newDate = new Date(this.year, this.month, this.day);
26
+ return (h(Host, null,
27
+ this.dateStyles && h("style", null, this.dateStyles),
28
+ h("span", { part: "part-ptc-date" }, this.getDate().toLocaleDateString(this.country, { year: 'numeric', month: 'short', day: 'numeric' }))));
29
+ }
30
+ getDate() {
31
+ if (this.dateString) {
32
+ let newDate = new Date(this.dateString.replace(/-/g, '\/'));
33
+ return newDate;
34
+ }
35
+ else {
36
+ return new Date(this.year, this.month, this.day);
37
+ }
38
+ }
39
+ static get is() { return "ptc-date"; }
40
+ static get encapsulation() { return "shadow"; }
41
+ static get originalStyleUrls() { return {
42
+ "$": ["ptc-date.scss"]
43
+ }; }
44
+ static get styleUrls() { return {
45
+ "$": ["ptc-date.css"]
46
+ }; }
47
+ static get properties() { return {
48
+ "year": {
49
+ "type": "number",
50
+ "mutable": false,
51
+ "complexType": {
52
+ "original": "number",
53
+ "resolved": "number",
54
+ "references": {}
55
+ },
56
+ "required": false,
57
+ "optional": false,
58
+ "docs": {
59
+ "tags": [],
60
+ "text": "Year"
61
+ },
62
+ "attribute": "year",
63
+ "reflect": false,
64
+ "defaultValue": "1900"
65
+ },
66
+ "month": {
67
+ "type": "number",
68
+ "mutable": false,
69
+ "complexType": {
70
+ "original": "number",
71
+ "resolved": "number",
72
+ "references": {}
73
+ },
74
+ "required": false,
75
+ "optional": false,
76
+ "docs": {
77
+ "tags": [],
78
+ "text": "Month\nAn integer between 0 (January) and 11 (December) representing the month.If omitted, defaults to 0."
79
+ },
80
+ "attribute": "month",
81
+ "reflect": false,
82
+ "defaultValue": "0"
83
+ },
84
+ "day": {
85
+ "type": "number",
86
+ "mutable": false,
87
+ "complexType": {
88
+ "original": "number",
89
+ "resolved": "number",
90
+ "references": {}
91
+ },
92
+ "required": false,
93
+ "optional": false,
94
+ "docs": {
95
+ "tags": [],
96
+ "text": "Day\nAn integer between 1 and 31 representing the day of the month. If omitted, defaults to 1."
97
+ },
98
+ "attribute": "day",
99
+ "reflect": false,
100
+ "defaultValue": "1"
101
+ },
102
+ "country": {
103
+ "type": "string",
104
+ "mutable": false,
105
+ "complexType": {
106
+ "original": "string | undefined",
107
+ "resolved": "string",
108
+ "references": {}
109
+ },
110
+ "required": false,
111
+ "optional": false,
112
+ "docs": {
113
+ "tags": [],
114
+ "text": "Country\nexamples: en-US, zh-CN, zh-TW, fr-FR, ja-JP, ru-RU, de-DE, ko-KR, it-IT, es-ES"
115
+ },
116
+ "attribute": "country",
117
+ "reflect": false,
118
+ "defaultValue": "\"en-US\""
119
+ },
120
+ "dateString": {
121
+ "type": "string",
122
+ "mutable": false,
123
+ "complexType": {
124
+ "original": "string",
125
+ "resolved": "string",
126
+ "references": {}
127
+ },
128
+ "required": false,
129
+ "optional": true,
130
+ "docs": {
131
+ "tags": [],
132
+ "text": "Date\nexamples: 2000-1-1 or 2000/01/01"
133
+ },
134
+ "attribute": "date-string",
135
+ "reflect": false
136
+ },
137
+ "dateStyles": {
138
+ "type": "string",
139
+ "mutable": false,
140
+ "complexType": {
141
+ "original": "string",
142
+ "resolved": "string",
143
+ "references": {}
144
+ },
145
+ "required": false,
146
+ "optional": true,
147
+ "docs": {
148
+ "tags": [],
149
+ "text": "Injected styles"
150
+ },
151
+ "attribute": "date-styles",
152
+ "reflect": false
153
+ }
154
+ }; }
155
+ }
@@ -0,0 +1,40 @@
1
+ :host {
2
+ display: block;
3
+ background-color: #1c2126;
4
+ }
5
+
6
+ .footer-style {
7
+ position: relative;
8
+ bottom: 0;
9
+ display: grid;
10
+ grid-template-columns: 1fr 1fr;
11
+ grid-template-rows: auto auto auto auto;
12
+ grid-template-areas: "left lImage" "right right" "share share" "copyright copyright";
13
+ }
14
+ @media screen and (min-width: 992px) {
15
+ .footer-style {
16
+ grid-template-columns: 1fr 1fr 1fr 1fr;
17
+ grid-template-rows: 1fr fit-content(26px);
18
+ grid-template-areas: "lImage left right share" "copyright copyright copyright copyright";
19
+ }
20
+ }
21
+
22
+ .footer-image {
23
+ grid-area: lImage;
24
+ }
25
+
26
+ .footer-link-left {
27
+ grid-area: left;
28
+ }
29
+
30
+ .footer-link-right {
31
+ grid-area: right;
32
+ }
33
+
34
+ .footer-share {
35
+ grid-area: share;
36
+ }
37
+
38
+ .footer-copyright {
39
+ grid-area: copyright;
40
+ }
@@ -0,0 +1,25 @@
1
+ import { Component, Host, h } from '@stencil/core';
2
+ export class PtcFooter {
3
+ render() {
4
+ return (h(Host, null,
5
+ h("footer", { class: "footer-style" },
6
+ h("div", { class: "footer-image" },
7
+ h("slot", { name: "footer-image" })),
8
+ h("div", { class: "footer-link-left" },
9
+ h("slot", { name: "footer-link-left" })),
10
+ h("div", { class: "footer-link-right" },
11
+ h("slot", { name: "footer-link-right" })),
12
+ h("div", { class: "footer-share" },
13
+ h("slot", { name: "footer-share" })),
14
+ h("div", { class: "footer-copyright" },
15
+ h("slot", { name: "footer-copyright" })))));
16
+ }
17
+ static get is() { return "ptc-footer"; }
18
+ static get encapsulation() { return "shadow"; }
19
+ static get originalStyleUrls() { return {
20
+ "$": ["ptc-footer.scss"]
21
+ }; }
22
+ static get styleUrls() { return {
23
+ "$": ["ptc-footer.css"]
24
+ }; }
25
+ }
@@ -0,0 +1,4 @@
1
+ img {
2
+ width: 100%;
3
+ height: auto;
4
+ }
@@ -0,0 +1,92 @@
1
+ import { Component, Prop, h, Element, State } from '@stencil/core';
2
+ export class PtcImage {
3
+ componentDidLoad() {
4
+ this.addIntersectionObserver();
5
+ }
6
+ componentWillUpdate() {
7
+ if (this.src !== this.oldSrc) {
8
+ this.addIntersectionObserver();
9
+ }
10
+ this.oldSrc = this.src;
11
+ }
12
+ addIntersectionObserver() {
13
+ if (!this.src) {
14
+ return;
15
+ }
16
+ if ('IntersectionObserver' in window) {
17
+ let lazyLoadImages = new IntersectionObserver((entries) => {
18
+ entries.forEach(entry => {
19
+ if (entry.isIntersecting) {
20
+ const image = this.el.shadowRoot.querySelector('img');
21
+ image.src = image.dataset.src;
22
+ console.log('loaded');
23
+ lazyLoadImages.unobserve(image);
24
+ }
25
+ });
26
+ });
27
+ lazyLoadImages.observe(this.el.shadowRoot.querySelector('img'));
28
+ }
29
+ else {
30
+ // fall back to setTimeout for Safari and IE
31
+ setTimeout(() => {
32
+ const image = this.el.shadowRoot.querySelector('img');
33
+ image.src = image.dataset.src;
34
+ image.onload = () => {
35
+ image.removeAttribute('data-src');
36
+ console.log('loaded fallback');
37
+ };
38
+ }, 5000);
39
+ }
40
+ }
41
+ render() {
42
+ return h("img", { "data-src": this.src, alt: this.alt });
43
+ }
44
+ static get is() { return "ptc-image"; }
45
+ static get encapsulation() { return "shadow"; }
46
+ static get originalStyleUrls() { return {
47
+ "$": ["ptc-image.scss"]
48
+ }; }
49
+ static get styleUrls() { return {
50
+ "$": ["ptc-image.css"]
51
+ }; }
52
+ static get properties() { return {
53
+ "src": {
54
+ "type": "string",
55
+ "mutable": false,
56
+ "complexType": {
57
+ "original": "string",
58
+ "resolved": "string",
59
+ "references": {}
60
+ },
61
+ "required": false,
62
+ "optional": false,
63
+ "docs": {
64
+ "tags": [],
65
+ "text": "Image Render Src"
66
+ },
67
+ "attribute": "src",
68
+ "reflect": false
69
+ },
70
+ "alt": {
71
+ "type": "string",
72
+ "mutable": false,
73
+ "complexType": {
74
+ "original": "string",
75
+ "resolved": "string",
76
+ "references": {}
77
+ },
78
+ "required": false,
79
+ "optional": false,
80
+ "docs": {
81
+ "tags": [],
82
+ "text": "Image alt"
83
+ },
84
+ "attribute": "alt",
85
+ "reflect": false
86
+ }
87
+ }; }
88
+ static get states() { return {
89
+ "oldSrc": {}
90
+ }; }
91
+ static get elementRef() { return "el"; }
92
+ }
@@ -0,0 +1,65 @@
1
+ .smart-bg {
2
+ width: 100%;
3
+ height: 100%;
4
+ background-size: cover;
5
+ background-repeat: no-repeat;
6
+ background-position: 50% 50%;
7
+ }
8
+
9
+ .smart-img {
10
+ position: absolute;
11
+ display: block;
12
+ width: 100%;
13
+ height: 100%;
14
+ top: 0;
15
+ left: 0;
16
+ background-size: cover;
17
+ background-repeat: no-repeat;
18
+ background-position: 50% 50%;
19
+ }
20
+
21
+ .radius-sm {
22
+ border-radius: var(--ptc-border-radius-small);
23
+ }
24
+
25
+ .radius-md {
26
+ border-radius: var(--ptc-border-radius-medium);
27
+ }
28
+
29
+ .radius-lg {
30
+ border-radius: var(--ptc-border-radius-large);
31
+ }
32
+
33
+ .lazy-bg {
34
+ background-image: none !important;
35
+ background-color: var(--color-primary-lightgrey);
36
+ }
37
+
38
+ /* XS */
39
+ /* max-width: $screen-xs-max */
40
+ @media (max-width: 767px) {
41
+ .hidden-xs {
42
+ display: none !important;
43
+ }
44
+ }
45
+ /* SM */
46
+ /* min-width: $screen-sm-min) and (max-width: $screen-sm-max */
47
+ @media (min-width: 768px) and (max-width: 991px) {
48
+ .hidden-sm {
49
+ display: none !important;
50
+ }
51
+ }
52
+ /* MD */
53
+ /* min-width: $screen-md-min) and (max-width: $screen-md-max */
54
+ @media (min-width: 992px) and (max-width: 1199px) {
55
+ .hidden-md {
56
+ display: none !important;
57
+ }
58
+ }
59
+ /* LG */
60
+ /* min-width: $screen-lg-min */
61
+ @media (min-width: 1200px) {
62
+ .hidden-lg {
63
+ display: none !important;
64
+ }
65
+ }