@ptcwebops/ptcw-design 0.0.4 → 0.0.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.
- package/dist/cjs/icon-asset.cjs.entry.js +64 -0
- package/dist/cjs/{index-825cf1b6.js → index-ac192914.js} +268 -6
- package/dist/cjs/list-item.cjs.entry.js +27 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/lottie-player.cjs.entry.js +13476 -0
- package/dist/cjs/my-component.cjs.entry.js +26 -0
- package/dist/cjs/ptc-button.cjs.entry.js +48 -0
- package/dist/cjs/ptc-card.cjs.entry.js +52 -3
- package/dist/cjs/ptc-date.cjs.entry.js +39 -0
- package/dist/cjs/ptc-footer.cjs.entry.js +19 -0
- package/dist/cjs/ptc-image.cjs.entry.js +2 -6
- package/dist/cjs/ptc-img.cjs.entry.js +84 -0
- package/dist/cjs/ptc-link.cjs.entry.js +10 -5
- package/dist/cjs/ptc-list.cjs.entry.js +11 -3
- package/dist/cjs/ptc-lottie.cjs.entry.js +23 -0
- package/dist/cjs/ptc-nav-item.cjs.entry.js +94 -0
- package/dist/cjs/ptc-nav.cjs.entry.js +19 -0
- package/dist/cjs/ptc-overlay.cjs.entry.js +19 -0
- package/dist/cjs/ptc-para.cjs.entry.js +39 -0
- package/dist/cjs/ptc-picture.cjs.entry.js +26 -0
- package/dist/cjs/ptc-spacer.cjs.entry.js +46 -0
- package/dist/cjs/ptc-span.cjs.entry.js +26 -0
- package/dist/cjs/ptc-title.cjs.entry.js +49 -0
- package/dist/cjs/ptcw-design.cjs.js +2 -2
- package/dist/collection/assets/responsive-background-image.min.js +1 -0
- package/dist/collection/collection-manifest.json +20 -1
- package/dist/collection/components/icon-asset/assets/footer-social.svg +0 -0
- package/dist/collection/components/icon-asset/assets/ptc-sprite.svg +73 -0
- package/dist/collection/components/icon-asset/icon-asset.css +6 -2
- package/dist/collection/components/icon-asset/icon-asset.js +25 -16
- package/dist/collection/components/list-item/list-item.css +3 -0
- package/dist/collection/components/list-item/list-item.js +63 -0
- package/dist/collection/components/ptc-button/ptc-button.css +35 -136
- package/dist/collection/components/ptc-button/ptc-button.js +45 -47
- package/dist/collection/components/ptc-card/ptc-card.css +87 -0
- package/dist/collection/components/ptc-card/ptc-card.js +233 -7
- package/dist/collection/components/ptc-date/ptc-date.css +3 -0
- package/dist/collection/components/ptc-date/ptc-date.js +110 -0
- package/dist/collection/components/ptc-footer/ptc-footer.css +40 -0
- package/dist/collection/components/ptc-footer/ptc-footer.js +25 -0
- package/dist/collection/components/ptc-image/ptc-image.css +3 -2
- package/dist/collection/components/ptc-image/ptc-image.js +0 -4
- package/dist/collection/components/ptc-img/ptc-img.css +48 -0
- package/dist/collection/components/ptc-img/ptc-img.js +192 -0
- package/dist/collection/components/ptc-link/ptc-link.css +23 -13
- package/dist/collection/components/ptc-link/ptc-link.js +22 -15
- package/dist/collection/components/ptc-list/ptc-list.css +23 -2
- package/dist/collection/components/ptc-list/ptc-list.js +53 -5
- package/dist/collection/components/ptc-lottie/ptc-lottie.css +5 -0
- package/dist/collection/components/ptc-lottie/ptc-lottie.js +58 -0
- package/dist/collection/components/ptc-nav/ptc-nav.css +29 -0
- package/dist/collection/components/ptc-nav/ptc-nav.js +21 -0
- package/dist/collection/components/ptc-nav-item/ptc-nav-item.css +81 -0
- package/dist/collection/components/ptc-nav-item/ptc-nav-item.js +252 -0
- package/dist/collection/components/ptc-overlay/ptc-overlay.css +3 -0
- package/dist/collection/components/ptc-overlay/ptc-overlay.js +14 -0
- package/dist/collection/components/ptc-para/ptc-para.css +53 -0
- package/dist/collection/components/ptc-para/ptc-para.js +92 -0
- package/dist/collection/components/ptc-picture/ptc-picture.css +3 -0
- package/dist/collection/components/ptc-picture/ptc-picture.js +44 -0
- package/dist/collection/components/ptc-spacer/ptc-spacer.css +307 -0
- package/dist/collection/components/ptc-spacer/ptc-spacer.js +99 -0
- package/dist/collection/components/ptc-span/ptc-span.css +16 -0
- package/dist/collection/components/ptc-span/ptc-span.js +44 -0
- package/dist/collection/utils/interfaces.js +6 -1
- package/dist/custom-elements/index.d.ts +72 -0
- package/dist/custom-elements/index.js +13992 -41
- package/dist/esm/icon-asset.entry.js +60 -0
- package/dist/esm/{index-4bbf8fa5.js → index-5b1c792c.js} +268 -7
- package/dist/esm/list-item.entry.js +23 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/lottie-player.entry.js +13472 -0
- package/dist/esm/my-component.entry.js +22 -0
- package/dist/esm/ptc-button.entry.js +44 -0
- package/dist/esm/ptc-card.entry.js +52 -3
- package/dist/esm/ptc-date.entry.js +35 -0
- package/dist/esm/ptc-footer.entry.js +15 -0
- package/dist/esm/ptc-image.entry.js +2 -6
- package/dist/esm/ptc-img.entry.js +80 -0
- package/dist/esm/ptc-link.entry.js +10 -5
- package/dist/esm/ptc-list.entry.js +11 -3
- package/dist/esm/ptc-lottie.entry.js +19 -0
- package/dist/esm/ptc-nav-item.entry.js +90 -0
- package/dist/esm/ptc-nav.entry.js +15 -0
- package/dist/esm/ptc-overlay.entry.js +15 -0
- package/dist/esm/ptc-para.entry.js +35 -0
- package/dist/esm/ptc-picture.entry.js +22 -0
- package/dist/esm/ptc-spacer.entry.js +42 -0
- package/dist/esm/ptc-span.entry.js +22 -0
- package/dist/esm/ptc-title.entry.js +45 -0
- package/dist/esm/ptcw-design.js +2 -2
- package/dist/node_modules/@teamhive/lottie-player/dist/collection/components/lottie-player/lottie-player.css +187 -0
- package/dist/ptcw-design/assets/footer-social.svg +0 -0
- package/dist/ptcw-design/assets/ptc-sprite.svg +73 -0
- package/dist/ptcw-design/p-01dc360c.entry.js +1 -0
- package/dist/ptcw-design/p-07624831.entry.js +1 -0
- package/dist/ptcw-design/p-0a44a2f7.entry.js +1 -0
- package/dist/ptcw-design/p-15a428d4.entry.js +1 -0
- package/dist/ptcw-design/p-1a26bade.entry.js +1 -0
- package/dist/ptcw-design/p-1b4fd3da.entry.js +1 -0
- package/dist/ptcw-design/p-2d357f92.entry.js +1 -0
- package/dist/ptcw-design/p-31f4bd0c.entry.js +1 -0
- package/dist/ptcw-design/p-3af43980.entry.js +1 -0
- package/dist/ptcw-design/p-4f366fc3.js +1 -0
- package/dist/ptcw-design/p-662ae9b6.entry.js +1 -0
- package/dist/ptcw-design/p-77f87fa3.entry.js +1 -0
- package/dist/ptcw-design/p-85131a2a.entry.js +1 -0
- package/dist/ptcw-design/p-8b6c805c.entry.js +1 -0
- package/dist/ptcw-design/p-9f96864d.entry.js +1 -0
- package/dist/ptcw-design/p-ac0ad25e.entry.js +1 -0
- package/dist/ptcw-design/p-b0b2e82c.entry.js +1 -0
- package/dist/ptcw-design/{p-9aef6d0e.entry.js → p-c169281f.entry.js} +1 -1
- package/dist/ptcw-design/p-ce8b8a72.entry.js +1 -0
- package/dist/ptcw-design/p-d0909325.entry.js +1 -0
- package/dist/ptcw-design/p-df01ac95.entry.js +1 -0
- package/dist/ptcw-design/p-fe6a3ba5.entry.js +1 -0
- package/dist/ptcw-design/ptcw-design.css +2 -2
- package/dist/ptcw-design/ptcw-design.esm.js +1 -1
- package/dist/types/components/icon-asset/icon-asset.d.ts +6 -5
- package/dist/types/components/list-item/list-item.d.ts +6 -0
- package/dist/types/components/ptc-button/ptc-button.d.ts +9 -7
- package/dist/types/components/ptc-card/ptc-card.d.ts +42 -2
- package/dist/types/components/ptc-date/ptc-date.d.ts +22 -0
- package/dist/types/components/ptc-footer/ptc-footer.d.ts +3 -0
- package/dist/types/components/ptc-img/ptc-img.d.ts +14 -0
- package/dist/types/components/ptc-link/ptc-link.d.ts +2 -2
- package/dist/types/components/ptc-list/ptc-list.d.ts +3 -0
- package/dist/types/components/ptc-lottie/ptc-lottie.d.ts +12 -0
- package/dist/types/components/ptc-nav/ptc-nav.d.ts +3 -0
- package/dist/types/components/ptc-nav-item/ptc-nav-item.d.ts +53 -0
- package/dist/types/components/ptc-overlay/ptc-overlay.d.ts +3 -0
- package/dist/types/components/ptc-para/ptc-para.d.ts +16 -0
- package/dist/types/components/ptc-picture/ptc-picture.d.ts +5 -0
- package/dist/types/components/ptc-spacer/ptc-spacer.d.ts +16 -0
- package/dist/types/components/ptc-span/ptc-span.d.ts +5 -0
- package/dist/types/components.d.ts +442 -38
- package/dist/types/utils/interfaces.d.ts +7 -1
- package/package.json +2 -1
- package/dist/cjs/icon-asset_4.cjs.entry.js +0 -165
- package/dist/esm/icon-asset_4.entry.js +0 -158
- package/dist/ptcw-design/p-0492a377.entry.js +0 -1
- package/dist/ptcw-design/p-bd9fac27.entry.js +0 -1
- package/dist/ptcw-design/p-d855d70c.js +0 -1
- package/dist/ptcw-design/p-e33cba65.entry.js +0 -1
- package/dist/ptcw-design/p-e899eb48.entry.js +0 -1
|
@@ -0,0 +1,110 @@
|
|
|
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 date = new Date(this.year, this.month, this.day);
|
|
26
|
+
return (h(Host, null,
|
|
27
|
+
h("span", null, date.toLocaleDateString(this.country, { year: 'numeric', month: 'short', day: 'numeric' }))));
|
|
28
|
+
}
|
|
29
|
+
static get is() { return "ptc-date"; }
|
|
30
|
+
static get originalStyleUrls() { return {
|
|
31
|
+
"$": ["ptc-date.scss"]
|
|
32
|
+
}; }
|
|
33
|
+
static get styleUrls() { return {
|
|
34
|
+
"$": ["ptc-date.css"]
|
|
35
|
+
}; }
|
|
36
|
+
static get properties() { return {
|
|
37
|
+
"year": {
|
|
38
|
+
"type": "number",
|
|
39
|
+
"mutable": false,
|
|
40
|
+
"complexType": {
|
|
41
|
+
"original": "number",
|
|
42
|
+
"resolved": "number",
|
|
43
|
+
"references": {}
|
|
44
|
+
},
|
|
45
|
+
"required": false,
|
|
46
|
+
"optional": false,
|
|
47
|
+
"docs": {
|
|
48
|
+
"tags": [],
|
|
49
|
+
"text": "Year"
|
|
50
|
+
},
|
|
51
|
+
"attribute": "year",
|
|
52
|
+
"reflect": false,
|
|
53
|
+
"defaultValue": "1900"
|
|
54
|
+
},
|
|
55
|
+
"month": {
|
|
56
|
+
"type": "number",
|
|
57
|
+
"mutable": false,
|
|
58
|
+
"complexType": {
|
|
59
|
+
"original": "number",
|
|
60
|
+
"resolved": "number",
|
|
61
|
+
"references": {}
|
|
62
|
+
},
|
|
63
|
+
"required": false,
|
|
64
|
+
"optional": false,
|
|
65
|
+
"docs": {
|
|
66
|
+
"tags": [],
|
|
67
|
+
"text": "Month\nAn integer between 0 (January) and 11 (December) representing the month.If omitted, defaults to 0."
|
|
68
|
+
},
|
|
69
|
+
"attribute": "month",
|
|
70
|
+
"reflect": false,
|
|
71
|
+
"defaultValue": "0"
|
|
72
|
+
},
|
|
73
|
+
"day": {
|
|
74
|
+
"type": "number",
|
|
75
|
+
"mutable": false,
|
|
76
|
+
"complexType": {
|
|
77
|
+
"original": "number",
|
|
78
|
+
"resolved": "number",
|
|
79
|
+
"references": {}
|
|
80
|
+
},
|
|
81
|
+
"required": false,
|
|
82
|
+
"optional": false,
|
|
83
|
+
"docs": {
|
|
84
|
+
"tags": [],
|
|
85
|
+
"text": "Day\nAn integer between 1 and 31 representing the day of the month. If omitted, defaults to 1."
|
|
86
|
+
},
|
|
87
|
+
"attribute": "day",
|
|
88
|
+
"reflect": false,
|
|
89
|
+
"defaultValue": "1"
|
|
90
|
+
},
|
|
91
|
+
"country": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"mutable": false,
|
|
94
|
+
"complexType": {
|
|
95
|
+
"original": "string | undefined",
|
|
96
|
+
"resolved": "string",
|
|
97
|
+
"references": {}
|
|
98
|
+
},
|
|
99
|
+
"required": false,
|
|
100
|
+
"optional": false,
|
|
101
|
+
"docs": {
|
|
102
|
+
"tags": [],
|
|
103
|
+
"text": "Country\nexamples: en-US, zh-CN, zh-TW, fr-FR, ja-JP, ru-RU, de-DE, ko-KR, it-IT, es-ES"
|
|
104
|
+
},
|
|
105
|
+
"attribute": "country",
|
|
106
|
+
"reflect": false,
|
|
107
|
+
"defaultValue": "\"en-US\""
|
|
108
|
+
}
|
|
109
|
+
}; }
|
|
110
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -19,10 +19,6 @@ export class PtcImage {
|
|
|
19
19
|
if (entry.isIntersecting) {
|
|
20
20
|
const image = this.el.shadowRoot.querySelector('img');
|
|
21
21
|
image.src = image.dataset.src;
|
|
22
|
-
// image.onload = () => {
|
|
23
|
-
// // image.removeAttribute('data-src');
|
|
24
|
-
// console.log('loaded');
|
|
25
|
-
// };
|
|
26
22
|
console.log('loaded');
|
|
27
23
|
lazyLoadImages.unobserve(image);
|
|
28
24
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
/* XS */
|
|
22
|
+
/* max-width: $screen-xs-max */
|
|
23
|
+
@media (max-width: 767px) {
|
|
24
|
+
.hidden-xs {
|
|
25
|
+
display: none !important;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/* SM */
|
|
29
|
+
/* min-width: $screen-sm-min) and (max-width: $screen-sm-max */
|
|
30
|
+
@media (min-width: 480px) and (max-width: 991px) {
|
|
31
|
+
.hidden-sm {
|
|
32
|
+
display: none !important;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/* MD */
|
|
36
|
+
/* min-width: $screen-md-min) and (max-width: $screen-md-max */
|
|
37
|
+
@media (min-width: 992px) and (max-width: 1199px) {
|
|
38
|
+
.hidden-md {
|
|
39
|
+
display: none !important;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/* LG */
|
|
43
|
+
/* min-width: $screen-lg-min */
|
|
44
|
+
@media (min-width: 1200px) {
|
|
45
|
+
.hidden-lg {
|
|
46
|
+
display: none !important;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { Component, Host, h, Prop, Listen } from '@stencil/core';
|
|
2
|
+
import { ResponsiveBgVariables } from '../../utils/interfaces';
|
|
3
|
+
export class PtcImg {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.sizeXs = '510x340';
|
|
6
|
+
this.sizeSm = '1240x496';
|
|
7
|
+
this.sizeMd = '1366x500';
|
|
8
|
+
this.sizeLg = '1920x1080';
|
|
9
|
+
this.imageType = 'smart-bg';
|
|
10
|
+
}
|
|
11
|
+
WindowResize() {
|
|
12
|
+
this.setResponsiveBg();
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
const classMap = this.getCssClassMap();
|
|
16
|
+
return (h(Host, null,
|
|
17
|
+
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}` })));
|
|
18
|
+
}
|
|
19
|
+
componentDidLoad() {
|
|
20
|
+
this.setResponsiveBg();
|
|
21
|
+
}
|
|
22
|
+
setResponsiveBg() {
|
|
23
|
+
// Define local variables
|
|
24
|
+
let backgrounds = document.querySelectorAll(ResponsiveBgVariables.selector), el, elData, currentBreakpoint = this.getCurrentBreakPoints();
|
|
25
|
+
console.log('current breakpoint: ' + currentBreakpoint);
|
|
26
|
+
// Loop through all target elements
|
|
27
|
+
for (var i = 0, len = backgrounds.length; i < len; i++) {
|
|
28
|
+
// Set current variables
|
|
29
|
+
el = backgrounds[i];
|
|
30
|
+
elData = el.getAttribute('data-' + currentBreakpoint);
|
|
31
|
+
// If the data attribute exists, set the background
|
|
32
|
+
if (elData !== null) {
|
|
33
|
+
el.style.backgroundImage = "url('" + elData + "')";
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
if (typeof console == 'object') {
|
|
37
|
+
console.warn('Data attribute: data-' + currentBreakpoint + ' not found on element:\n\n' + el.outerHTML + '\n\n\n');
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
getCssClassMap() {
|
|
43
|
+
return {
|
|
44
|
+
[this.imageType]: true,
|
|
45
|
+
'ptc-img': true,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
getCurrentBreakPoints() {
|
|
49
|
+
// Define local variables
|
|
50
|
+
let doc = window.document, temp = doc.createElement('div'), env;
|
|
51
|
+
// Append test node
|
|
52
|
+
doc.body.appendChild(temp);
|
|
53
|
+
// Loop through breakpoints
|
|
54
|
+
for (let i = ResponsiveBgVariables.envs.length - 1; i >= 0; i--) {
|
|
55
|
+
env = ResponsiveBgVariables.envs[i];
|
|
56
|
+
// Add classes
|
|
57
|
+
temp.className = 'hidden-' + env;
|
|
58
|
+
// Found breakpoint
|
|
59
|
+
if (temp.offsetParent !== document.body) {
|
|
60
|
+
// Remove our test node
|
|
61
|
+
doc.body.removeChild(temp);
|
|
62
|
+
// Return current breakpoint
|
|
63
|
+
return env;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
// Breakpoint not found
|
|
67
|
+
return 'Unknown breakpoint';
|
|
68
|
+
}
|
|
69
|
+
static get is() { return "ptc-img"; }
|
|
70
|
+
static get originalStyleUrls() { return {
|
|
71
|
+
"$": ["ptc-img.scss"]
|
|
72
|
+
}; }
|
|
73
|
+
static get styleUrls() { return {
|
|
74
|
+
"$": ["ptc-img.css"]
|
|
75
|
+
}; }
|
|
76
|
+
static get properties() { return {
|
|
77
|
+
"sizeXs": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"mutable": true,
|
|
80
|
+
"complexType": {
|
|
81
|
+
"original": "string",
|
|
82
|
+
"resolved": "string",
|
|
83
|
+
"references": {}
|
|
84
|
+
},
|
|
85
|
+
"required": false,
|
|
86
|
+
"optional": false,
|
|
87
|
+
"docs": {
|
|
88
|
+
"tags": [],
|
|
89
|
+
"text": ""
|
|
90
|
+
},
|
|
91
|
+
"attribute": "size-xs",
|
|
92
|
+
"reflect": false,
|
|
93
|
+
"defaultValue": "'510x340'"
|
|
94
|
+
},
|
|
95
|
+
"sizeSm": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"mutable": true,
|
|
98
|
+
"complexType": {
|
|
99
|
+
"original": "string",
|
|
100
|
+
"resolved": "string",
|
|
101
|
+
"references": {}
|
|
102
|
+
},
|
|
103
|
+
"required": false,
|
|
104
|
+
"optional": false,
|
|
105
|
+
"docs": {
|
|
106
|
+
"tags": [],
|
|
107
|
+
"text": ""
|
|
108
|
+
},
|
|
109
|
+
"attribute": "size-sm",
|
|
110
|
+
"reflect": false,
|
|
111
|
+
"defaultValue": "'1240x496'"
|
|
112
|
+
},
|
|
113
|
+
"sizeMd": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"mutable": true,
|
|
116
|
+
"complexType": {
|
|
117
|
+
"original": "string",
|
|
118
|
+
"resolved": "string",
|
|
119
|
+
"references": {}
|
|
120
|
+
},
|
|
121
|
+
"required": false,
|
|
122
|
+
"optional": false,
|
|
123
|
+
"docs": {
|
|
124
|
+
"tags": [],
|
|
125
|
+
"text": ""
|
|
126
|
+
},
|
|
127
|
+
"attribute": "size-md",
|
|
128
|
+
"reflect": false,
|
|
129
|
+
"defaultValue": "'1366x500'"
|
|
130
|
+
},
|
|
131
|
+
"sizeLg": {
|
|
132
|
+
"type": "string",
|
|
133
|
+
"mutable": true,
|
|
134
|
+
"complexType": {
|
|
135
|
+
"original": "string",
|
|
136
|
+
"resolved": "string",
|
|
137
|
+
"references": {}
|
|
138
|
+
},
|
|
139
|
+
"required": false,
|
|
140
|
+
"optional": false,
|
|
141
|
+
"docs": {
|
|
142
|
+
"tags": [],
|
|
143
|
+
"text": ""
|
|
144
|
+
},
|
|
145
|
+
"attribute": "size-lg",
|
|
146
|
+
"reflect": false,
|
|
147
|
+
"defaultValue": "'1920x1080'"
|
|
148
|
+
},
|
|
149
|
+
"imgUrl": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"mutable": false,
|
|
152
|
+
"complexType": {
|
|
153
|
+
"original": "string",
|
|
154
|
+
"resolved": "string",
|
|
155
|
+
"references": {}
|
|
156
|
+
},
|
|
157
|
+
"required": false,
|
|
158
|
+
"optional": false,
|
|
159
|
+
"docs": {
|
|
160
|
+
"tags": [],
|
|
161
|
+
"text": ""
|
|
162
|
+
},
|
|
163
|
+
"attribute": "img-url",
|
|
164
|
+
"reflect": false
|
|
165
|
+
},
|
|
166
|
+
"imageType": {
|
|
167
|
+
"type": "string",
|
|
168
|
+
"mutable": false,
|
|
169
|
+
"complexType": {
|
|
170
|
+
"original": "'smart-bg' | 'smart-img'",
|
|
171
|
+
"resolved": "\"smart-bg\" | \"smart-img\"",
|
|
172
|
+
"references": {}
|
|
173
|
+
},
|
|
174
|
+
"required": false,
|
|
175
|
+
"optional": false,
|
|
176
|
+
"docs": {
|
|
177
|
+
"tags": [],
|
|
178
|
+
"text": ""
|
|
179
|
+
},
|
|
180
|
+
"attribute": "image-type",
|
|
181
|
+
"reflect": false,
|
|
182
|
+
"defaultValue": "'smart-bg'"
|
|
183
|
+
}
|
|
184
|
+
}; }
|
|
185
|
+
static get listeners() { return [{
|
|
186
|
+
"name": "resize",
|
|
187
|
+
"method": "WindowResize",
|
|
188
|
+
"target": "window",
|
|
189
|
+
"capture": false,
|
|
190
|
+
"passive": true
|
|
191
|
+
}]; }
|
|
192
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
a {
|
|
1
|
+
ptc-link a.ptc-link {
|
|
2
2
|
display: inline-block;
|
|
3
3
|
color: var(--color-primary-uigrey);
|
|
4
4
|
font-weight: var(--ptc-font-weight-black);
|
|
@@ -8,21 +8,23 @@ a {
|
|
|
8
8
|
outline: none;
|
|
9
9
|
text-decoration: none;
|
|
10
10
|
}
|
|
11
|
-
a.simple::after {
|
|
11
|
+
ptc-link a.simple::after {
|
|
12
12
|
content: "";
|
|
13
13
|
position: absolute;
|
|
14
14
|
width: 100%;
|
|
15
15
|
left: 0px;
|
|
16
|
-
bottom:
|
|
17
|
-
transition:
|
|
18
|
-
}
|
|
19
|
-
a:hover.simple::after {
|
|
16
|
+
bottom: 2px;
|
|
17
|
+
transition: opacity var(--ptc-transition-fast) var(--ptc-standard-ease);
|
|
20
18
|
border-bottom: 2px solid var(--color-primary-green);
|
|
19
|
+
opacity: 0;
|
|
20
|
+
}
|
|
21
|
+
ptc-link a:hover.simple::after {
|
|
22
|
+
opacity: 1;
|
|
21
23
|
}
|
|
22
|
-
a.arrow {
|
|
24
|
+
ptc-link a.arrow {
|
|
23
25
|
margin-right: var(--ptc-element-spacing-01);
|
|
24
26
|
}
|
|
25
|
-
a.arrow::after {
|
|
27
|
+
ptc-link a.arrow::after {
|
|
26
28
|
position: absolute;
|
|
27
29
|
display: block;
|
|
28
30
|
content: "";
|
|
@@ -31,18 +33,26 @@ a.arrow::after {
|
|
|
31
33
|
bottom: 1px;
|
|
32
34
|
transition: width var(--ptc-transition-fast) var(--ptc-standard-ease);
|
|
33
35
|
}
|
|
34
|
-
a:hover.arrow::after {
|
|
36
|
+
ptc-link a:hover.arrow::after {
|
|
35
37
|
width: 100%;
|
|
36
38
|
}
|
|
37
|
-
a.uppercase {
|
|
39
|
+
ptc-link a.uppercase {
|
|
38
40
|
text-transform: uppercase;
|
|
39
41
|
}
|
|
40
|
-
a.small {
|
|
42
|
+
ptc-link a.small {
|
|
41
43
|
font-size: var(--ptc-font-size-small);
|
|
42
44
|
}
|
|
43
|
-
a.medium {
|
|
45
|
+
ptc-link a.medium {
|
|
44
46
|
font-size: var(--ptc-font-size-medium);
|
|
45
47
|
}
|
|
46
|
-
a.large {
|
|
48
|
+
ptc-link a.large {
|
|
47
49
|
font-size: var(--ptc-font-size-large);
|
|
50
|
+
}
|
|
51
|
+
ptc-link a icon-asset {
|
|
52
|
+
position: absolute;
|
|
53
|
+
right: -25px;
|
|
54
|
+
transition: transform var(--ptc-transition-fast) var(--ptc-standard-ease);
|
|
55
|
+
}
|
|
56
|
+
ptc-link a:hover.arrow icon-asset {
|
|
57
|
+
transform: translateX(var(--ptc-element-spacing-04));
|
|
48
58
|
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { Component, h, Prop } from '@stencil/core';
|
|
1
|
+
import { Component, h, Prop, Host } from '@stencil/core';
|
|
2
2
|
export class PtcLink {
|
|
3
3
|
constructor() {
|
|
4
4
|
/**
|
|
5
5
|
* Rxternal link
|
|
6
6
|
* */
|
|
7
7
|
this.external = false;
|
|
8
|
+
/**
|
|
9
|
+
* Target
|
|
10
|
+
*/
|
|
11
|
+
this.target = '_self';
|
|
8
12
|
/**
|
|
9
13
|
* Theme
|
|
10
14
|
*/
|
|
@@ -12,7 +16,7 @@ export class PtcLink {
|
|
|
12
16
|
/**
|
|
13
17
|
* Uppercase
|
|
14
18
|
*/
|
|
15
|
-
this.
|
|
19
|
+
this.uppercase = false;
|
|
16
20
|
/**
|
|
17
21
|
* Font Size
|
|
18
22
|
*/
|
|
@@ -20,18 +24,20 @@ export class PtcLink {
|
|
|
20
24
|
}
|
|
21
25
|
render() {
|
|
22
26
|
const classMap = this.getCssClassMap();
|
|
23
|
-
return (h(
|
|
24
|
-
h("
|
|
27
|
+
return (h(Host, null,
|
|
28
|
+
h("a", { class: classMap, href: this.href, target: this.external ? '_blank' : this.target, title: this.linkTitle },
|
|
29
|
+
this.theme == 'arrow' ? h("icon-asset", { type: "solid", size: "small", name: "arrow-right" }) : '',
|
|
30
|
+
h("slot", null))));
|
|
25
31
|
}
|
|
26
32
|
getCssClassMap() {
|
|
27
33
|
return {
|
|
34
|
+
['ptc-link']: true,
|
|
28
35
|
[this.theme]: true,
|
|
29
|
-
[
|
|
36
|
+
['uppercase']: this.uppercase,
|
|
30
37
|
[this.fontSize]: true,
|
|
31
38
|
};
|
|
32
39
|
}
|
|
33
40
|
static get is() { return "ptc-link"; }
|
|
34
|
-
static get encapsulation() { return "shadow"; }
|
|
35
41
|
static get originalStyleUrls() { return {
|
|
36
42
|
"$": ["ptc-link.scss"]
|
|
37
43
|
}; }
|
|
@@ -43,12 +49,12 @@ export class PtcLink {
|
|
|
43
49
|
"type": "boolean",
|
|
44
50
|
"mutable": false,
|
|
45
51
|
"complexType": {
|
|
46
|
-
"original": "boolean
|
|
52
|
+
"original": "boolean",
|
|
47
53
|
"resolved": "boolean",
|
|
48
54
|
"references": {}
|
|
49
55
|
},
|
|
50
56
|
"required": false,
|
|
51
|
-
"optional":
|
|
57
|
+
"optional": false,
|
|
52
58
|
"docs": {
|
|
53
59
|
"tags": [],
|
|
54
60
|
"text": "Rxternal link"
|
|
@@ -89,7 +95,8 @@ export class PtcLink {
|
|
|
89
95
|
"text": "Target"
|
|
90
96
|
},
|
|
91
97
|
"attribute": "target",
|
|
92
|
-
"reflect": false
|
|
98
|
+
"reflect": false,
|
|
99
|
+
"defaultValue": "'_self'"
|
|
93
100
|
},
|
|
94
101
|
"linkTitle": {
|
|
95
102
|
"type": "string",
|
|
@@ -126,12 +133,12 @@ export class PtcLink {
|
|
|
126
133
|
"reflect": false,
|
|
127
134
|
"defaultValue": "'simple'"
|
|
128
135
|
},
|
|
129
|
-
"
|
|
130
|
-
"type": "
|
|
136
|
+
"uppercase": {
|
|
137
|
+
"type": "boolean",
|
|
131
138
|
"mutable": false,
|
|
132
139
|
"complexType": {
|
|
133
|
-
"original": "
|
|
134
|
-
"resolved": "
|
|
140
|
+
"original": "boolean",
|
|
141
|
+
"resolved": "boolean",
|
|
135
142
|
"references": {}
|
|
136
143
|
},
|
|
137
144
|
"required": false,
|
|
@@ -140,9 +147,9 @@ export class PtcLink {
|
|
|
140
147
|
"tags": [],
|
|
141
148
|
"text": "Uppercase"
|
|
142
149
|
},
|
|
143
|
-
"attribute": "
|
|
150
|
+
"attribute": "uppercase",
|
|
144
151
|
"reflect": false,
|
|
145
|
-
"defaultValue": "
|
|
152
|
+
"defaultValue": "false"
|
|
146
153
|
},
|
|
147
154
|
"fontSize": {
|
|
148
155
|
"type": "string",
|
|
@@ -1,3 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
ptc-list .link-primary li {
|
|
2
|
+
font-size: var(--ptc-font-size-medium);
|
|
3
|
+
line-height: var(--ptc-line-height-normal);
|
|
4
|
+
letter-spacing: var(--ptc-letter-spacing-normal);
|
|
5
|
+
list-style: none;
|
|
3
6
|
}
|
|
7
|
+
ptc-list .link-primary li:not(:last-child) {
|
|
8
|
+
margin-bottom: 0.625rem;
|
|
9
|
+
}
|
|
10
|
+
ptc-list .link-primary li a {
|
|
11
|
+
color: var(--color-white);
|
|
12
|
+
outline: none;
|
|
13
|
+
text-decoration: none;
|
|
14
|
+
font-family: Rajdhani;
|
|
15
|
+
font-size: var(--ptc-font-size-medium);
|
|
16
|
+
font-weight: var(--ptc-font-weight-bold);
|
|
17
|
+
line-height: var(--ptc-line-height-normal);
|
|
18
|
+
text-transform: uppercase;
|
|
19
|
+
letter-spacing: var(--ptc-letter-spacing-normal);
|
|
20
|
+
}
|
|
21
|
+
ptc-list .link-primary li a:hover {
|
|
22
|
+
color: var(--color-white);
|
|
23
|
+
border-bottom: 1.5px solid var(--color-primary-green);
|
|
24
|
+
}
|