@ptcwebops/ptcw-design 0.0.15 → 0.1.1
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/dist/custom-elements/index.d.ts +12 -0
- package/dist/ptcw-design/app-globals-0f993ce5.js +3 -0
- package/dist/ptcw-design/assets/ptc-sprite.svg +67 -0
- package/dist/ptcw-design/css-shim-003e9264.js +4 -0
- package/dist/ptcw-design/dom-1b195079.js +73 -0
- package/dist/{esm → ptcw-design}/icon-asset.entry.js +2 -2
- package/dist/{cjs/index-ac192914.js → ptcw-design/index-f7043a90.js} +1311 -195
- package/dist/ptcw-design/index.esm.js +1 -0
- package/dist/{esm → ptcw-design}/list-item.entry.js +1 -1
- package/dist/{esm → ptcw-design}/lottie-player.entry.js +782 -31
- package/dist/{esm → ptcw-design}/my-component.entry.js +1 -1
- package/dist/ptcw-design/ptc-announcement.entry.js +31 -0
- package/dist/ptcw-design/ptc-button.entry.js +57 -0
- package/dist/{esm → ptcw-design}/ptc-card.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-date.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-footer.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-image.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-img.entry.js +12 -1
- package/dist/{esm → ptcw-design}/ptc-link.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-list.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-lottie.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-nav-item.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-nav.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-overlay.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-para.entry.js +2 -2
- package/dist/{esm → ptcw-design}/ptc-picture.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-spacer.entry.js +1 -1
- package/dist/{esm → ptcw-design}/ptc-span.entry.js +1 -1
- package/dist/ptcw-design/ptc-svg-btn.entry.js +27 -0
- package/dist/{esm → ptcw-design}/ptc-title.entry.js +1 -1
- package/dist/ptcw-design/ptcw-design.css +1030 -2
- package/dist/ptcw-design/ptcw-design.esm.js +122 -1
- package/dist/ptcw-design/shadow-css-c1ad5fdc.js +383 -0
- package/dist/types/components/icon-asset/icon-asset.d.ts +1 -1
- package/dist/types/components/ptc-announcement/ptc-announcement.d.ts +27 -0
- package/dist/types/components/ptc-button/ptc-button.d.ts +13 -1
- package/dist/types/components/ptc-para/ptc-para.d.ts +1 -1
- package/dist/types/components/ptc-svg-btn/ptc-svg-btn.d.ts +4 -0
- package/dist/types/components.d.ts +94 -6
- package/package.json +1 -1
- package/dist/cjs/icon-asset.cjs.entry.js +0 -64
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/list-item.cjs.entry.js +0 -27
- package/dist/cjs/loader.cjs.js +0 -21
- package/dist/cjs/lottie-player.cjs.entry.js +0 -13476
- package/dist/cjs/my-component.cjs.entry.js +0 -26
- package/dist/cjs/ptc-button.cjs.entry.js +0 -48
- package/dist/cjs/ptc-card.cjs.entry.js +0 -75
- package/dist/cjs/ptc-date.cjs.entry.js +0 -48
- package/dist/cjs/ptc-footer.cjs.entry.js +0 -19
- package/dist/cjs/ptc-image.cjs.entry.js +0 -58
- package/dist/cjs/ptc-img.cjs.entry.js +0 -163
- package/dist/cjs/ptc-link.cjs.entry.js +0 -53
- package/dist/cjs/ptc-list.cjs.entry.js +0 -32
- package/dist/cjs/ptc-lottie.cjs.entry.js +0 -23
- package/dist/cjs/ptc-nav-item.cjs.entry.js +0 -94
- package/dist/cjs/ptc-nav.cjs.entry.js +0 -19
- package/dist/cjs/ptc-overlay.cjs.entry.js +0 -19
- package/dist/cjs/ptc-para.cjs.entry.js +0 -40
- package/dist/cjs/ptc-picture.cjs.entry.js +0 -26
- package/dist/cjs/ptc-spacer.cjs.entry.js +0 -46
- package/dist/cjs/ptc-span.cjs.entry.js +0 -31
- package/dist/cjs/ptc-title.cjs.entry.js +0 -49
- package/dist/cjs/ptcw-design.cjs.js +0 -19
- package/dist/collection/assets/responsive-background-image.min.js +0 -1
- package/dist/collection/collection-manifest.json +0 -38
- package/dist/collection/components/icon-asset/assets/brands.svg +0 -1381
- package/dist/collection/components/icon-asset/assets/footer-social.svg +0 -0
- package/dist/collection/components/icon-asset/assets/ptc-sprite.svg +0 -77
- package/dist/collection/components/icon-asset/assets/regular.svg +0 -463
- package/dist/collection/components/icon-asset/assets/solid.svg +0 -3013
- package/dist/collection/components/icon-asset/assets/svg-with-js.min.css +0 -5
- package/dist/collection/components/icon-asset/icon-asset.css +0 -26
- package/dist/collection/components/icon-asset/icon-asset.js +0 -177
- package/dist/collection/components/list-item/list-item.css +0 -3
- package/dist/collection/components/list-item/list-item.js +0 -63
- package/dist/collection/components/my-component/my-component.css +0 -3
- package/dist/collection/components/my-component/my-component.js +0 -74
- package/dist/collection/components/ptc-button/ptc-button.css +0 -76
- package/dist/collection/components/ptc-button/ptc-button.js +0 -153
- package/dist/collection/components/ptc-card/ptc-card.css +0 -239
- package/dist/collection/components/ptc-card/ptc-card.js +0 -260
- package/dist/collection/components/ptc-date/ptc-date.css +0 -3
- package/dist/collection/components/ptc-date/ptc-date.js +0 -155
- package/dist/collection/components/ptc-footer/ptc-footer.css +0 -40
- package/dist/collection/components/ptc-footer/ptc-footer.js +0 -25
- package/dist/collection/components/ptc-image/ptc-image.css +0 -4
- package/dist/collection/components/ptc-image/ptc-image.js +0 -92
- package/dist/collection/components/ptc-img/ptc-img.css +0 -65
- package/dist/collection/components/ptc-img/ptc-img.js +0 -318
- package/dist/collection/components/ptc-link/ptc-link.css +0 -168
- package/dist/collection/components/ptc-link/ptc-link.js +0 -197
- package/dist/collection/components/ptc-list/ptc-list.css +0 -24
- package/dist/collection/components/ptc-list/ptc-list.js +0 -66
- package/dist/collection/components/ptc-lottie/ptc-lottie.css +0 -5
- package/dist/collection/components/ptc-lottie/ptc-lottie.js +0 -58
- package/dist/collection/components/ptc-nav/ptc-nav.css +0 -29
- package/dist/collection/components/ptc-nav/ptc-nav.js +0 -21
- package/dist/collection/components/ptc-nav-item/ptc-nav-item.css +0 -81
- package/dist/collection/components/ptc-nav-item/ptc-nav-item.js +0 -252
- package/dist/collection/components/ptc-overlay/ptc-overlay.css +0 -3
- package/dist/collection/components/ptc-overlay/ptc-overlay.js +0 -14
- package/dist/collection/components/ptc-para/ptc-para.css +0 -57
- package/dist/collection/components/ptc-para/ptc-para.js +0 -111
- package/dist/collection/components/ptc-picture/ptc-picture.css +0 -3
- package/dist/collection/components/ptc-picture/ptc-picture.js +0 -44
- package/dist/collection/components/ptc-spacer/ptc-spacer.css +0 -307
- package/dist/collection/components/ptc-spacer/ptc-spacer.js +0 -99
- package/dist/collection/components/ptc-span/ptc-span.css +0 -36
- package/dist/collection/components/ptc-span/ptc-span.js +0 -86
- package/dist/collection/components/ptc-title/ptc-title.css +0 -64
- package/dist/collection/components/ptc-title/ptc-title.js +0 -105
- package/dist/collection/index.js +0 -1
- package/dist/collection/utils/interfaces.js +0 -6
- package/dist/collection/utils/utils.js +0 -3
- package/dist/custom-elements/index.js +0 -14381
- package/dist/esm/index-5b1c792c.js +0 -1687
- package/dist/esm/index.js +0 -1
- package/dist/esm/loader.js +0 -17
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/ptc-button.entry.js +0 -44
- package/dist/esm/ptcw-design.js +0 -17
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/node_modules/@teamhive/lottie-player/dist/collection/components/lottie-player/lottie-player.css +0 -187
- package/dist/ptcw-design/p-00b6c442.entry.js +0 -1
- package/dist/ptcw-design/p-01dc360c.entry.js +0 -1
- package/dist/ptcw-design/p-07624831.entry.js +0 -1
- package/dist/ptcw-design/p-0a44a2f7.entry.js +0 -1
- package/dist/ptcw-design/p-1a26bade.entry.js +0 -1
- package/dist/ptcw-design/p-2d357f92.entry.js +0 -1
- package/dist/ptcw-design/p-31f4bd0c.entry.js +0 -1
- package/dist/ptcw-design/p-3af43980.entry.js +0 -1
- package/dist/ptcw-design/p-4f366fc3.js +0 -1
- package/dist/ptcw-design/p-662ae9b6.entry.js +0 -1
- package/dist/ptcw-design/p-70adca2e.entry.js +0 -1
- package/dist/ptcw-design/p-76dfa56f.entry.js +0 -1
- package/dist/ptcw-design/p-77f87fa3.entry.js +0 -1
- package/dist/ptcw-design/p-7a63ca63.entry.js +0 -1
- package/dist/ptcw-design/p-83696cae.entry.js +0 -1
- package/dist/ptcw-design/p-83d98048.entry.js +0 -1
- package/dist/ptcw-design/p-85131a2a.entry.js +0 -1
- package/dist/ptcw-design/p-ac0ad25e.entry.js +0 -1
- package/dist/ptcw-design/p-c169281f.entry.js +0 -1
- package/dist/ptcw-design/p-ce8b8a72.entry.js +0 -1
- package/dist/ptcw-design/p-d4f117d2.entry.js +0 -1
- package/dist/ptcw-design/p-fe6a3ba5.entry.js +0 -1
|
@@ -1,25 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,318 +0,0 @@
|
|
|
1
|
-
import { Component, Host, h, Prop, Listen, Element } from '@stencil/core';
|
|
2
|
-
import { ResponsiveBgVariables } from '../../utils/interfaces';
|
|
3
|
-
export class PtcImg {
|
|
4
|
-
constructor() {
|
|
5
|
-
/**
|
|
6
|
-
* Image size for smallest screen
|
|
7
|
-
* <=767px
|
|
8
|
-
*/
|
|
9
|
-
this.sizeXs = '510x340';
|
|
10
|
-
/**
|
|
11
|
-
* Image size for small screen
|
|
12
|
-
* >=768px and <=991px
|
|
13
|
-
*/
|
|
14
|
-
this.sizeSm = '1240x496';
|
|
15
|
-
/**
|
|
16
|
-
* Image size for medium screen
|
|
17
|
-
* >=992px and <=1199px
|
|
18
|
-
*/
|
|
19
|
-
this.sizeMd = '1366x500';
|
|
20
|
-
/**
|
|
21
|
-
* Image solution for large screen
|
|
22
|
-
* >=1200px
|
|
23
|
-
*/
|
|
24
|
-
this.sizeLg = '1920x1080';
|
|
25
|
-
/**
|
|
26
|
-
* Image type
|
|
27
|
-
*/
|
|
28
|
-
this.imageType = 'smart-bg';
|
|
29
|
-
/**
|
|
30
|
-
* Image border shape
|
|
31
|
-
*/
|
|
32
|
-
this.borderRadius = '';
|
|
33
|
-
/**
|
|
34
|
-
* Lazy loading option
|
|
35
|
-
*/
|
|
36
|
-
this.loadMode = 'lazy-bg';
|
|
37
|
-
}
|
|
38
|
-
WindowResize() {
|
|
39
|
-
this.setResponsiveBg();
|
|
40
|
-
}
|
|
41
|
-
render() {
|
|
42
|
-
const classMap = this.getCssClassMap();
|
|
43
|
-
return (h(Host, null,
|
|
44
|
-
h("div", { class: classMap, "data-xs": `${this.imgUrl}:${this.sizeXs}`, "data-sm": `${this.imgUrl}:${this.sizeSm}`, "data-md": `${this.imgUrl}:${this.sizeMd}`, "data-lg": `${this.imgUrl}:${this.sizeLg}` })));
|
|
45
|
-
}
|
|
46
|
-
componentDidLoad() {
|
|
47
|
-
this.addIntersectionObserver();
|
|
48
|
-
this.setResponsiveBg();
|
|
49
|
-
}
|
|
50
|
-
componentWillUpdate() {
|
|
51
|
-
console.log('componentWillUpdate!');
|
|
52
|
-
this.addIntersectionObserver();
|
|
53
|
-
this.setResponsiveBg();
|
|
54
|
-
}
|
|
55
|
-
//responsive image
|
|
56
|
-
setResponsiveBg() {
|
|
57
|
-
// Define local variables
|
|
58
|
-
let backgrounds = (this.el || document).querySelectorAll(ResponsiveBgVariables.selector), el, elData, currentBreakpoint = this.getCurrentBreakPoints();
|
|
59
|
-
console.log('current breakpoint: ' + currentBreakpoint);
|
|
60
|
-
// Loop through all target elements
|
|
61
|
-
for (var i = 0, len = backgrounds.length; i < len; i++) {
|
|
62
|
-
// Set current variables
|
|
63
|
-
el = backgrounds[i];
|
|
64
|
-
elData = el.getAttribute('data-' + currentBreakpoint);
|
|
65
|
-
// If the data attribute exists, set the background
|
|
66
|
-
if (elData !== null) {
|
|
67
|
-
el.style.backgroundImage = "url('" + elData + "')";
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
if (typeof console == 'object') {
|
|
71
|
-
console.warn('Data attribute: data-' + currentBreakpoint + ' not found on element:\n\n' + el.outerHTML + '\n\n\n');
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
//lazy loading
|
|
77
|
-
addIntersectionObserver() {
|
|
78
|
-
if (!this.imgUrl) {
|
|
79
|
-
console.log('no image!');
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
if ('IntersectionObserver' in window) {
|
|
83
|
-
let lazyLoadBgs = (this.el || document).querySelectorAll('.lazy-bg');
|
|
84
|
-
let bgObserver = new IntersectionObserver(entries => {
|
|
85
|
-
entries.forEach(entry => {
|
|
86
|
-
if (entry.isIntersecting) {
|
|
87
|
-
const image = entry.target;
|
|
88
|
-
image.classList.remove('lazy-bg');
|
|
89
|
-
console.log('loaded');
|
|
90
|
-
bgObserver.unobserve(image);
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
lazyLoadBgs.forEach(image => {
|
|
95
|
-
bgObserver.observe(image);
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
// fall back to setTimeout for Safari and IE
|
|
100
|
-
// setTimeout(() => {
|
|
101
|
-
// const image: HTMLImageElement = this.el.shadowRoot.querySelector('img');
|
|
102
|
-
// image.src = image.dataset.src;
|
|
103
|
-
// image.onload = () => {
|
|
104
|
-
// image.removeAttribute('data-src');
|
|
105
|
-
// console.log('loaded fallback');
|
|
106
|
-
// };
|
|
107
|
-
// }, 5000);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
getCssClassMap() {
|
|
111
|
-
return {
|
|
112
|
-
[this.imageType]: true,
|
|
113
|
-
'ptc-img': true,
|
|
114
|
-
[this.borderRadius]: true,
|
|
115
|
-
[this.loadMode]: true,
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
getCurrentBreakPoints() {
|
|
119
|
-
// Define local variables
|
|
120
|
-
let doc = window.document, temp = doc.createElement('div'), env;
|
|
121
|
-
// Append test node
|
|
122
|
-
doc.body.appendChild(temp);
|
|
123
|
-
// Loop through breakpoints
|
|
124
|
-
for (let i = ResponsiveBgVariables.envs.length - 1; i >= 0; i--) {
|
|
125
|
-
env = ResponsiveBgVariables.envs[i];
|
|
126
|
-
// Add classes
|
|
127
|
-
temp.className = 'hidden-' + env;
|
|
128
|
-
// Found breakpoint
|
|
129
|
-
if (temp.offsetParent === null) {
|
|
130
|
-
// Remove our test node
|
|
131
|
-
doc.body.removeChild(temp);
|
|
132
|
-
console.log('remove test node');
|
|
133
|
-
// Return current breakpoint
|
|
134
|
-
return env;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
// Breakpoint not found, try fallback
|
|
138
|
-
doc.body.removeChild(temp);
|
|
139
|
-
return this.getFallbackBreakpoint();
|
|
140
|
-
}
|
|
141
|
-
getFallbackBreakpoint() {
|
|
142
|
-
if (window.matchMedia('(min-width: 992px)').matches) {
|
|
143
|
-
return 'lg';
|
|
144
|
-
}
|
|
145
|
-
else if (window.matchMedia('(min-width: 768px)').matches) {
|
|
146
|
-
return 'md';
|
|
147
|
-
}
|
|
148
|
-
else if (window.matchMedia('(min-width: 576px)').matches) {
|
|
149
|
-
return 'sm';
|
|
150
|
-
}
|
|
151
|
-
else if (window.matchMedia('(min-width: 575.5px)').matches) {
|
|
152
|
-
return 'xs';
|
|
153
|
-
}
|
|
154
|
-
else {
|
|
155
|
-
return 'Unknown breakpoint';
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
static get is() { return "ptc-img"; }
|
|
159
|
-
static get originalStyleUrls() { return {
|
|
160
|
-
"$": ["ptc-img.scss"]
|
|
161
|
-
}; }
|
|
162
|
-
static get styleUrls() { return {
|
|
163
|
-
"$": ["ptc-img.css"]
|
|
164
|
-
}; }
|
|
165
|
-
static get properties() { return {
|
|
166
|
-
"sizeXs": {
|
|
167
|
-
"type": "string",
|
|
168
|
-
"mutable": true,
|
|
169
|
-
"complexType": {
|
|
170
|
-
"original": "string",
|
|
171
|
-
"resolved": "string",
|
|
172
|
-
"references": {}
|
|
173
|
-
},
|
|
174
|
-
"required": false,
|
|
175
|
-
"optional": false,
|
|
176
|
-
"docs": {
|
|
177
|
-
"tags": [],
|
|
178
|
-
"text": "Image size for smallest screen\n<=767px"
|
|
179
|
-
},
|
|
180
|
-
"attribute": "size-xs",
|
|
181
|
-
"reflect": false,
|
|
182
|
-
"defaultValue": "'510x340'"
|
|
183
|
-
},
|
|
184
|
-
"sizeSm": {
|
|
185
|
-
"type": "string",
|
|
186
|
-
"mutable": true,
|
|
187
|
-
"complexType": {
|
|
188
|
-
"original": "string",
|
|
189
|
-
"resolved": "string",
|
|
190
|
-
"references": {}
|
|
191
|
-
},
|
|
192
|
-
"required": false,
|
|
193
|
-
"optional": false,
|
|
194
|
-
"docs": {
|
|
195
|
-
"tags": [],
|
|
196
|
-
"text": "Image size for small screen\n>=768px and <=991px"
|
|
197
|
-
},
|
|
198
|
-
"attribute": "size-sm",
|
|
199
|
-
"reflect": false,
|
|
200
|
-
"defaultValue": "'1240x496'"
|
|
201
|
-
},
|
|
202
|
-
"sizeMd": {
|
|
203
|
-
"type": "string",
|
|
204
|
-
"mutable": true,
|
|
205
|
-
"complexType": {
|
|
206
|
-
"original": "string",
|
|
207
|
-
"resolved": "string",
|
|
208
|
-
"references": {}
|
|
209
|
-
},
|
|
210
|
-
"required": false,
|
|
211
|
-
"optional": false,
|
|
212
|
-
"docs": {
|
|
213
|
-
"tags": [],
|
|
214
|
-
"text": "Image size for medium screen\n>=992px and <=1199px"
|
|
215
|
-
},
|
|
216
|
-
"attribute": "size-md",
|
|
217
|
-
"reflect": false,
|
|
218
|
-
"defaultValue": "'1366x500'"
|
|
219
|
-
},
|
|
220
|
-
"sizeLg": {
|
|
221
|
-
"type": "string",
|
|
222
|
-
"mutable": true,
|
|
223
|
-
"complexType": {
|
|
224
|
-
"original": "string",
|
|
225
|
-
"resolved": "string",
|
|
226
|
-
"references": {}
|
|
227
|
-
},
|
|
228
|
-
"required": false,
|
|
229
|
-
"optional": false,
|
|
230
|
-
"docs": {
|
|
231
|
-
"tags": [],
|
|
232
|
-
"text": "Image solution for large screen\n>=1200px"
|
|
233
|
-
},
|
|
234
|
-
"attribute": "size-lg",
|
|
235
|
-
"reflect": false,
|
|
236
|
-
"defaultValue": "'1920x1080'"
|
|
237
|
-
},
|
|
238
|
-
"imgUrl": {
|
|
239
|
-
"type": "string",
|
|
240
|
-
"mutable": false,
|
|
241
|
-
"complexType": {
|
|
242
|
-
"original": "string",
|
|
243
|
-
"resolved": "string",
|
|
244
|
-
"references": {}
|
|
245
|
-
},
|
|
246
|
-
"required": false,
|
|
247
|
-
"optional": false,
|
|
248
|
-
"docs": {
|
|
249
|
-
"tags": [],
|
|
250
|
-
"text": "Image Src"
|
|
251
|
-
},
|
|
252
|
-
"attribute": "img-url",
|
|
253
|
-
"reflect": false
|
|
254
|
-
},
|
|
255
|
-
"imageType": {
|
|
256
|
-
"type": "string",
|
|
257
|
-
"mutable": false,
|
|
258
|
-
"complexType": {
|
|
259
|
-
"original": "'smart-bg' | 'smart-img'",
|
|
260
|
-
"resolved": "\"smart-bg\" | \"smart-img\"",
|
|
261
|
-
"references": {}
|
|
262
|
-
},
|
|
263
|
-
"required": false,
|
|
264
|
-
"optional": false,
|
|
265
|
-
"docs": {
|
|
266
|
-
"tags": [],
|
|
267
|
-
"text": "Image type"
|
|
268
|
-
},
|
|
269
|
-
"attribute": "image-type",
|
|
270
|
-
"reflect": false,
|
|
271
|
-
"defaultValue": "'smart-bg'"
|
|
272
|
-
},
|
|
273
|
-
"borderRadius": {
|
|
274
|
-
"type": "string",
|
|
275
|
-
"mutable": false,
|
|
276
|
-
"complexType": {
|
|
277
|
-
"original": "'radius-sm' | 'radius-md' | 'radius-lg' | ''",
|
|
278
|
-
"resolved": "\"\" | \"radius-lg\" | \"radius-md\" | \"radius-sm\"",
|
|
279
|
-
"references": {}
|
|
280
|
-
},
|
|
281
|
-
"required": false,
|
|
282
|
-
"optional": false,
|
|
283
|
-
"docs": {
|
|
284
|
-
"tags": [],
|
|
285
|
-
"text": "Image border shape"
|
|
286
|
-
},
|
|
287
|
-
"attribute": "border-radius",
|
|
288
|
-
"reflect": false,
|
|
289
|
-
"defaultValue": "''"
|
|
290
|
-
},
|
|
291
|
-
"loadMode": {
|
|
292
|
-
"type": "string",
|
|
293
|
-
"mutable": false,
|
|
294
|
-
"complexType": {
|
|
295
|
-
"original": "'lazy-bg' | 'eager-bg'",
|
|
296
|
-
"resolved": "\"eager-bg\" | \"lazy-bg\"",
|
|
297
|
-
"references": {}
|
|
298
|
-
},
|
|
299
|
-
"required": false,
|
|
300
|
-
"optional": false,
|
|
301
|
-
"docs": {
|
|
302
|
-
"tags": [],
|
|
303
|
-
"text": "Lazy loading option"
|
|
304
|
-
},
|
|
305
|
-
"attribute": "load-mode",
|
|
306
|
-
"reflect": false,
|
|
307
|
-
"defaultValue": "'lazy-bg'"
|
|
308
|
-
}
|
|
309
|
-
}; }
|
|
310
|
-
static get elementRef() { return "el"; }
|
|
311
|
-
static get listeners() { return [{
|
|
312
|
-
"name": "resize",
|
|
313
|
-
"method": "WindowResize",
|
|
314
|
-
"target": "window",
|
|
315
|
-
"capture": false,
|
|
316
|
-
"passive": true
|
|
317
|
-
}]; }
|
|
318
|
-
}
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
.disabled {
|
|
2
|
-
pointer-events: none;
|
|
3
|
-
cursor: default;
|
|
4
|
-
text-decoration: none;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.ptc-link {
|
|
8
|
-
display: inline-block;
|
|
9
|
-
color: var(--color-primary-uigrey);
|
|
10
|
-
font-weight: var(--ptc-font-weight-black);
|
|
11
|
-
position: relative;
|
|
12
|
-
line-height: var(--ptc-line-height-normal);
|
|
13
|
-
margin-bottom: var(--ptc-element-spacing-01);
|
|
14
|
-
outline: none;
|
|
15
|
-
text-decoration: none;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.simple::after {
|
|
19
|
-
content: "";
|
|
20
|
-
position: absolute;
|
|
21
|
-
width: 100%;
|
|
22
|
-
left: 0px;
|
|
23
|
-
bottom: 2px;
|
|
24
|
-
transition: opacity var(--ptc-transition-fast) var(--ptc-standard-ease);
|
|
25
|
-
border-bottom: 2px solid var(--color-primary-green);
|
|
26
|
-
opacity: 0;
|
|
27
|
-
}
|
|
28
|
-
.simple:hover.simple::after {
|
|
29
|
-
opacity: 1;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.arrow {
|
|
33
|
-
margin-right: var(--ptc-element-spacing-01);
|
|
34
|
-
}
|
|
35
|
-
.arrow::after {
|
|
36
|
-
position: absolute;
|
|
37
|
-
display: block;
|
|
38
|
-
content: "";
|
|
39
|
-
width: var(--ptc-element-spacing-06);
|
|
40
|
-
border-bottom: 2px solid var(--color-primary-green);
|
|
41
|
-
bottom: 1px;
|
|
42
|
-
transition: width var(--ptc-transition-fast) var(--ptc-standard-ease);
|
|
43
|
-
}
|
|
44
|
-
.arrow:hover.arrow::after {
|
|
45
|
-
width: 100%;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.uppercase {
|
|
49
|
-
text-transform: uppercase;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.small {
|
|
53
|
-
font-size: var(--ptc-font-size-small);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.medium {
|
|
57
|
-
font-size: var(--ptc-font-size-medium);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.large {
|
|
61
|
-
font-size: var(--ptc-font-size-large);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
icon-asset {
|
|
65
|
-
position: absolute;
|
|
66
|
-
right: -25px;
|
|
67
|
-
transition: transform var(--ptc-transition-fast) var(--ptc-standard-ease);
|
|
68
|
-
}
|
|
69
|
-
icon-asset svg {
|
|
70
|
-
fill: var(--color-primary-green) !important;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.ptc-link:hover.arrow icon-asset {
|
|
74
|
-
transform: translateX(var(--ptc-element-spacing-04));
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.nav-title {
|
|
78
|
-
font-size: 17px;
|
|
79
|
-
line-height: var(--ptc-line-height-dense);
|
|
80
|
-
letter-spacing: var(--ptc-element-spacing-01);
|
|
81
|
-
color: #cac8c8;
|
|
82
|
-
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
|
|
83
|
-
font-weight: var(--ptc-font-weight-semibold);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.primary-nav-link {
|
|
87
|
-
display: inline-block;
|
|
88
|
-
position: relative;
|
|
89
|
-
font-size: var(--ptc-font-size-small);
|
|
90
|
-
line-height: var(--ptc-line-height-normal);
|
|
91
|
-
font-weight: var(--ptc-font-weight-bold);
|
|
92
|
-
color: var(--color-white);
|
|
93
|
-
transition: color var(--ptc-transition-slow) ease;
|
|
94
|
-
padding: var(--ptc-element-spacing-04) 50px;
|
|
95
|
-
background-color: transparent;
|
|
96
|
-
text-decoration: none;
|
|
97
|
-
outline: none;
|
|
98
|
-
}
|
|
99
|
-
.primary-nav-link:hover {
|
|
100
|
-
color: var(--color-secondary-turtlegreen);
|
|
101
|
-
text-decoration: none;
|
|
102
|
-
outline: none;
|
|
103
|
-
background-color: transparent;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.nav-title-link {
|
|
107
|
-
font-family: var(--ptc-font-secondary-latin);
|
|
108
|
-
font-size: var(--ptc-font-size-medium);
|
|
109
|
-
font-weight: var(--ptc-font-weight-bold);
|
|
110
|
-
line-height: 1.56;
|
|
111
|
-
color: var(--color-white);
|
|
112
|
-
text-decoration: none;
|
|
113
|
-
outline: none;
|
|
114
|
-
background-color: transparent;
|
|
115
|
-
transition: color var(--ptc-transition-medium) var(--ptc-decelerated-ease);
|
|
116
|
-
border-bottom: 1.5px solid transparent;
|
|
117
|
-
}
|
|
118
|
-
.nav-title-link:hover {
|
|
119
|
-
color: var(--color-white);
|
|
120
|
-
border-bottom: 1.5px solid var(--color-secondary-turtlegreen);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.secondary-nav-link {
|
|
124
|
-
display: inline-block;
|
|
125
|
-
position: relative;
|
|
126
|
-
font-size: var(--ptc-font-size-x-small);
|
|
127
|
-
line-height: 20px;
|
|
128
|
-
font-weight: var(--ptc-font-weight-light);
|
|
129
|
-
color: var(--color-white);
|
|
130
|
-
transition: color var(--ptc-transition-slow) ease;
|
|
131
|
-
padding: 10px 15px;
|
|
132
|
-
background-color: transparent;
|
|
133
|
-
text-decoration: none;
|
|
134
|
-
outline: none;
|
|
135
|
-
}
|
|
136
|
-
.secondary-nav-link:hover {
|
|
137
|
-
color: var(--color-secondary-turtlegreen);
|
|
138
|
-
text-decoration: none;
|
|
139
|
-
outline: none;
|
|
140
|
-
background-color: transparent;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.footer-nav-link {
|
|
144
|
-
color: var(--color-white);
|
|
145
|
-
transition: border var(--ptc-transition-medium) var(--ptc-standard-ease), color var(--ptc-transition-medium) var(--ptc-standard-ease);
|
|
146
|
-
border-bottom: 1px solid transparent;
|
|
147
|
-
outline: none;
|
|
148
|
-
text-decoration: none;
|
|
149
|
-
font-weight: var(--ptc-font-weight-semibold);
|
|
150
|
-
line-height: 1.73;
|
|
151
|
-
letter-spacing: 1.13px;
|
|
152
|
-
text-align: left;
|
|
153
|
-
font-size: 15px;
|
|
154
|
-
}
|
|
155
|
-
.footer-nav-link:hover {
|
|
156
|
-
outline: none;
|
|
157
|
-
text-decoration: none;
|
|
158
|
-
border-bottom: 0.1rem solid var(--color-secondary-turtlegreen);
|
|
159
|
-
color: var(--color-secondary-turtlegreen);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.copyright-link {
|
|
163
|
-
color: var(--color-white);
|
|
164
|
-
font-size: 13px;
|
|
165
|
-
font-weight: var(--ptc-font-weight-normal);
|
|
166
|
-
line-height: 2;
|
|
167
|
-
display: inline-block;
|
|
168
|
-
}
|