@ptcwebops/ptcw-design 1.2.8 → 1.3.0
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/bundle-jumbotron-example.cjs.entry.js +4 -1
- package/dist/cjs/dynamic-box-bundle.cjs.entry.js +36 -0
- package/dist/cjs/list-item.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/max-width-container_6.cjs.entry.js +3 -1
- package/dist/cjs/ptc-announcement.cjs.entry.js +1 -1
- package/dist/cjs/ptc-breadcrumb_2.cjs.entry.js +2 -1
- package/dist/cjs/ptc-card.cjs.entry.js +2 -1
- package/dist/cjs/ptc-container.cjs.entry.js +2 -1
- package/dist/cjs/ptc-media-card.cjs.entry.js +40 -6
- package/dist/cjs/ptc-tooltip.cjs.entry.js +11 -8
- package/dist/cjs/ptcw-design.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/dynamic-box-bundle/dynamic-box-bundle.css +53 -0
- package/dist/collection/components/dynamic-box-bundle/dynamic-box-bundle.js +114 -0
- package/dist/collection/components/list-item/list-item.css +19 -0
- package/dist/collection/components/list-item/list-item.js +2 -2
- package/dist/collection/components/organism-bundles/bundle-jumbotron-example/bundle-jumbotron-example.js +22 -1
- package/dist/collection/components/ptc-announcement/ptc-announcement.css +0 -5
- package/dist/collection/components/ptc-background-video/ptc-background-video.js +21 -1
- package/dist/collection/components/ptc-card/ptc-card.js +19 -1
- package/dist/collection/components/ptc-container/ptc-container.js +19 -1
- package/dist/collection/components/ptc-jumbotron/ptc-jumbotron.js +20 -1
- package/dist/collection/components/ptc-media-card/ptc-media-card.css +13 -7
- package/dist/collection/components/ptc-media-card/ptc-media-card.js +49 -25
- package/dist/collection/components/ptc-tooltip/ptc-tooltip.css +1 -1
- package/dist/collection/components/ptc-tooltip/ptc-tooltip.js +11 -8
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +107 -30
- package/dist/esm/bundle-jumbotron-example.entry.js +4 -1
- package/dist/esm/dynamic-box-bundle.entry.js +32 -0
- package/dist/esm/list-item.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/max-width-container_6.entry.js +3 -1
- package/dist/esm/ptc-announcement.entry.js +1 -1
- package/dist/esm/ptc-breadcrumb_2.entry.js +2 -1
- package/dist/esm/ptc-card.entry.js +2 -1
- package/dist/esm/ptc-container.entry.js +2 -1
- package/dist/esm/ptc-media-card.entry.js +40 -6
- package/dist/esm/ptc-tooltip.entry.js +11 -8
- package/dist/esm/ptcw-design.js +1 -1
- package/dist/ptcw-design/p-1d8c24dd.entry.js +1 -0
- package/dist/ptcw-design/p-380b3ef3.entry.js +1 -0
- package/dist/ptcw-design/{p-0c1e7f62.entry.js → p-3f2b9cad.entry.js} +1 -1
- package/dist/ptcw-design/p-54f905b1.entry.js +1 -0
- package/dist/ptcw-design/p-64691ccb.entry.js +1 -0
- package/dist/ptcw-design/p-8c37ee88.entry.js +1 -0
- package/dist/ptcw-design/p-c1d75020.entry.js +1 -0
- package/dist/ptcw-design/p-c255aad7.entry.js +1 -0
- package/dist/ptcw-design/p-e19dbf90.entry.js +1 -0
- package/dist/ptcw-design/p-f4ce7f16.entry.js +1 -0
- package/dist/ptcw-design/ptcw-design.css +1 -1
- package/dist/ptcw-design/ptcw-design.esm.js +1 -1
- package/dist/types/components/dynamic-box-bundle/dynamic-box-bundle.d.ts +10 -0
- package/dist/types/components/list-item/list-item.d.ts +1 -1
- package/dist/types/components/organism-bundles/bundle-jumbotron-example/bundle-jumbotron-example.d.ts +1 -0
- package/dist/types/components/ptc-background-video/ptc-background-video.d.ts +4 -0
- package/dist/types/components/ptc-card/ptc-card.d.ts +4 -0
- package/dist/types/components/ptc-container/ptc-container.d.ts +1 -0
- package/dist/types/components/ptc-jumbotron/ptc-jumbotron.d.ts +1 -0
- package/dist/types/components/ptc-media-card/ptc-media-card.d.ts +12 -5
- package/dist/types/components.d.ts +45 -12
- package/package.json +1 -1
- package/readme.md +1 -1
- package/dist/ptcw-design/p-0a3918b9.entry.js +0 -1
- package/dist/ptcw-design/p-11d73140.entry.js +0 -1
- package/dist/ptcw-design/p-2feb5db1.entry.js +0 -1
- package/dist/ptcw-design/p-603576bb.entry.js +0 -1
- package/dist/ptcw-design/p-6756c89e.entry.js +0 -1
- package/dist/ptcw-design/p-7c80b666.entry.js +0 -1
- package/dist/ptcw-design/p-9b57b462.entry.js +0 -1
- package/dist/ptcw-design/p-bcbf087c.entry.js +0 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
:host .d-box {
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: 550px;
|
|
8
|
+
position: relative;
|
|
9
|
+
}
|
|
10
|
+
:host .d-box.hovering .top-image {
|
|
11
|
+
background-image: linear-gradient(0deg, rgba(242, 242, 242, 0), #f3f3f3);
|
|
12
|
+
}
|
|
13
|
+
:host .d-box.hovering .content {
|
|
14
|
+
height: 100%;
|
|
15
|
+
}
|
|
16
|
+
:host .top-image {
|
|
17
|
+
position: relative;
|
|
18
|
+
display: flex;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
align-items: center;
|
|
21
|
+
height: 20%;
|
|
22
|
+
z-index: 99;
|
|
23
|
+
}
|
|
24
|
+
:host .top-image img {
|
|
25
|
+
width: 405px;
|
|
26
|
+
height: 40px;
|
|
27
|
+
}
|
|
28
|
+
@media only screen and (min-width: 992px) {
|
|
29
|
+
:host .top-image img {
|
|
30
|
+
height: 35px;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
:host .content {
|
|
34
|
+
height: 80%;
|
|
35
|
+
box-shadow: 0 0 0 1px #f3f3f3;
|
|
36
|
+
width: 100%;
|
|
37
|
+
position: absolute;
|
|
38
|
+
bottom: 0px;
|
|
39
|
+
left: 0px;
|
|
40
|
+
}
|
|
41
|
+
:host p {
|
|
42
|
+
font-weight: var(--ptc-font-weight-regular);
|
|
43
|
+
font-size: var(--ptc-font-size-small);
|
|
44
|
+
line-height: var(--ptc-line-height-p);
|
|
45
|
+
margin: 0px;
|
|
46
|
+
padding: 40px;
|
|
47
|
+
box-sizing: border-box;
|
|
48
|
+
}
|
|
49
|
+
@media only screen and (min-width: 1200px) {
|
|
50
|
+
:host p {
|
|
51
|
+
padding: 40px;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { Host, h } from '@stencil/core';
|
|
2
|
+
export class DynamicBoxBundle {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.topImgSrc = 'https://www.ptc.com/-/media/Images/new-org/logos/PTC-logo.svg';
|
|
5
|
+
this.topImgAlt = 'image';
|
|
6
|
+
this.boxHeight = undefined;
|
|
7
|
+
this.isHovering = false;
|
|
8
|
+
}
|
|
9
|
+
handleMouseOver() {
|
|
10
|
+
if (window.innerWidth >= 1200) {
|
|
11
|
+
this.isHovering = true;
|
|
12
|
+
//this.el.style.height = `${this.el.offsetHeight + 50}px`;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
handleMouseOut() {
|
|
16
|
+
if (window.innerWidth >= 1200) {
|
|
17
|
+
this.isHovering = false;
|
|
18
|
+
//this.el.style.height = '';
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
return (h(Host, null, h("div", { class: `d-box ${this.isHovering && window.innerWidth >= 1200 ? 'hovering' : ''}` }, h("div", { class: "top-image" }, h("img", { src: this.topImgSrc, alt: this.topImgAlt })), h("div", { class: "content" }, h("slot", { name: "media" }))), h("p", null, h("slot", null))));
|
|
23
|
+
}
|
|
24
|
+
static get is() { return "dynamic-box-bundle"; }
|
|
25
|
+
static get encapsulation() { return "shadow"; }
|
|
26
|
+
static get originalStyleUrls() {
|
|
27
|
+
return {
|
|
28
|
+
"$": ["dynamic-box-bundle.scss"]
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
static get styleUrls() {
|
|
32
|
+
return {
|
|
33
|
+
"$": ["dynamic-box-bundle.css"]
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
static get properties() {
|
|
37
|
+
return {
|
|
38
|
+
"topImgSrc": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"mutable": false,
|
|
41
|
+
"complexType": {
|
|
42
|
+
"original": "string",
|
|
43
|
+
"resolved": "string",
|
|
44
|
+
"references": {}
|
|
45
|
+
},
|
|
46
|
+
"required": false,
|
|
47
|
+
"optional": false,
|
|
48
|
+
"docs": {
|
|
49
|
+
"tags": [],
|
|
50
|
+
"text": ""
|
|
51
|
+
},
|
|
52
|
+
"attribute": "top-img-src",
|
|
53
|
+
"reflect": false,
|
|
54
|
+
"defaultValue": "'https://www.ptc.com/-/media/Images/new-org/logos/PTC-logo.svg'"
|
|
55
|
+
},
|
|
56
|
+
"topImgAlt": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"mutable": false,
|
|
59
|
+
"complexType": {
|
|
60
|
+
"original": "string",
|
|
61
|
+
"resolved": "string",
|
|
62
|
+
"references": {}
|
|
63
|
+
},
|
|
64
|
+
"required": false,
|
|
65
|
+
"optional": false,
|
|
66
|
+
"docs": {
|
|
67
|
+
"tags": [],
|
|
68
|
+
"text": ""
|
|
69
|
+
},
|
|
70
|
+
"attribute": "top-img-alt",
|
|
71
|
+
"reflect": false,
|
|
72
|
+
"defaultValue": "'image'"
|
|
73
|
+
},
|
|
74
|
+
"boxHeight": {
|
|
75
|
+
"type": "number",
|
|
76
|
+
"mutable": false,
|
|
77
|
+
"complexType": {
|
|
78
|
+
"original": "number",
|
|
79
|
+
"resolved": "number",
|
|
80
|
+
"references": {}
|
|
81
|
+
},
|
|
82
|
+
"required": false,
|
|
83
|
+
"optional": false,
|
|
84
|
+
"docs": {
|
|
85
|
+
"tags": [],
|
|
86
|
+
"text": ""
|
|
87
|
+
},
|
|
88
|
+
"attribute": "box-height",
|
|
89
|
+
"reflect": false
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
static get states() {
|
|
94
|
+
return {
|
|
95
|
+
"isHovering": {}
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
static get elementRef() { return "el"; }
|
|
99
|
+
static get listeners() {
|
|
100
|
+
return [{
|
|
101
|
+
"name": "mouseover",
|
|
102
|
+
"method": "handleMouseOver",
|
|
103
|
+
"target": undefined,
|
|
104
|
+
"capture": false,
|
|
105
|
+
"passive": true
|
|
106
|
+
}, {
|
|
107
|
+
"name": "mouseout",
|
|
108
|
+
"method": "handleMouseOut",
|
|
109
|
+
"target": undefined,
|
|
110
|
+
"capture": false,
|
|
111
|
+
"passive": true
|
|
112
|
+
}];
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -40,6 +40,25 @@
|
|
|
40
40
|
outline: none;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
:host(.list-green) {
|
|
44
|
+
display: block;
|
|
45
|
+
margin-bottom: 16px;
|
|
46
|
+
}
|
|
47
|
+
:host(.list-green) li a {
|
|
48
|
+
font-size: var(--ptc-font-size-xx-small);
|
|
49
|
+
color: var(--color-gray-10);
|
|
50
|
+
text-decoration: underline;
|
|
51
|
+
text-decoration-thickness: 1.5px;
|
|
52
|
+
text-decoration-color: var(--color-green-04);
|
|
53
|
+
font-weight: var(--ptc-font-weight-bold);
|
|
54
|
+
transition: color var(--ptc-transition-medium) var(--ptc-ease-inout);
|
|
55
|
+
line-height: var(--ptc-line-height-p);
|
|
56
|
+
text-underline-offset: 4px;
|
|
57
|
+
}
|
|
58
|
+
:host(.list-green) li a:hover {
|
|
59
|
+
color: var(--color-green-04);
|
|
60
|
+
}
|
|
61
|
+
|
|
43
62
|
:host(:not(.flush-before)) li::before {
|
|
44
63
|
margin-right: 2px;
|
|
45
64
|
}
|
|
@@ -37,8 +37,8 @@ export class ListItem {
|
|
|
37
37
|
"type": "string",
|
|
38
38
|
"mutable": false,
|
|
39
39
|
"complexType": {
|
|
40
|
-
"original": "'list-primary' | 'list-footer' | 'breadcrumb'",
|
|
41
|
-
"resolved": "\"breadcrumb\" | \"list-footer\" | \"list-primary\"",
|
|
40
|
+
"original": "'list-primary' | 'list-footer' | 'breadcrumb' | 'list-green'",
|
|
41
|
+
"resolved": "\"breadcrumb\" | \"list-footer\" | \"list-green\" | \"list-primary\"",
|
|
42
42
|
"references": {}
|
|
43
43
|
},
|
|
44
44
|
"required": false,
|
|
@@ -2,6 +2,7 @@ import { Host, h } from '@stencil/core';
|
|
|
2
2
|
export class BundleJumbotronExample {
|
|
3
3
|
constructor() {
|
|
4
4
|
this.jumbotron = 'light';
|
|
5
|
+
this.isIframe = false;
|
|
5
6
|
}
|
|
6
7
|
render() {
|
|
7
8
|
let $pngSrc;
|
|
@@ -15,6 +16,7 @@ export class BundleJumbotronExample {
|
|
|
15
16
|
}
|
|
16
17
|
else if (this.jumbotron === 'dark-video' || this.jumbotron === 'light-video') {
|
|
17
18
|
$bgVideoSrc = "https://www.ptc.com/-/media/Videos/wind-turbine.mp4";
|
|
19
|
+
// if is iframe use src from iframe https://player.vimeo.com/video/749261406?h=5e6a60ffc5&muted=1&autoplay=1&loop=1&transparent=0&background=1&app_id=122963%22
|
|
18
20
|
}
|
|
19
21
|
else if (this.jumbotron === 'png') {
|
|
20
22
|
$pngSrc = "https://images.unsplash.com/photo-1676883343977-5f8ecc36856c?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NzgyMjcxNDU&ixlib=rb-4.0.3&q=80&w=400";
|
|
@@ -27,7 +29,8 @@ export class BundleJumbotronExample {
|
|
|
27
29
|
return (h(Host, null, h("ptc-jumbotron", Object.assign({ "jumbotron-type": this.jumbotron }, (!!$pngSrc && { pngSrc: $pngSrc }), (!!$gifSrc && { gifSrc: $gifSrc }), (!!$bgVideoSrc && { bgVideoSrc: $bgVideoSrc }), (!!$bgSrc && { bgSrc: $bgSrc }), (!!$popupVideo && { popupVideo: $popupVideo }), { "main-title": "Sed ut perspiciatis unde omnis iste natus" //bind main title data (multi-line)
|
|
28
30
|
,
|
|
29
31
|
"sub-title": "totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo." // bind sub title data (multi-line)
|
|
30
|
-
|
|
32
|
+
,
|
|
33
|
+
"is-iframe": this.isIframe }), h("ptc-breadcrumb", Object.assign({ slot: "breadcrumb" }, (this.jumbotron === 'dark' || this.jumbotron == 'dark-video' ? { color: 'white' } : { color: 'primary-gray' }), (this.jumbotron === 'text' ? { position: 'center' } : {})), h("list-item", Object.assign({ "list-type": "breadcrumb", "link-href": "https://www.ptc.com/contact-us" }, (this.jumbotron === 'dark' || this.jumbotron == 'dark-video' ? { color: 'light-gray' } : { color: 'primary-gray' })), "PLM Video Hub"), h("list-item", Object.assign({ "list-type": "breadcrumb" }, (this.jumbotron === 'dark' || this.jumbotron == 'dark-video' ? { color: 'light-gray' } : { color: 'primary-gray' })), "Current Page")), h("ptc-button", { slot: "j-cta", type: "link", color: "ptc-primary", "link-href": "https://www.ptc.com", target: "_blank" }, "Lorem ipsum dolor sit amet"), h("ptc-button", { slot: "j-cta", type: "link", color: "ptc-secondary", "link-href": "https://www.ptc.com", target: "_blank" }, "Lorem ipsum"))));
|
|
31
34
|
}
|
|
32
35
|
static get is() { return "bundle-jumbotron-example"; }
|
|
33
36
|
static get encapsulation() { return "shadow"; }
|
|
@@ -60,6 +63,24 @@ export class BundleJumbotronExample {
|
|
|
60
63
|
"attribute": "jumbotron",
|
|
61
64
|
"reflect": false,
|
|
62
65
|
"defaultValue": "'light'"
|
|
66
|
+
},
|
|
67
|
+
"isIframe": {
|
|
68
|
+
"type": "boolean",
|
|
69
|
+
"mutable": false,
|
|
70
|
+
"complexType": {
|
|
71
|
+
"original": "boolean",
|
|
72
|
+
"resolved": "boolean",
|
|
73
|
+
"references": {}
|
|
74
|
+
},
|
|
75
|
+
"required": false,
|
|
76
|
+
"optional": false,
|
|
77
|
+
"docs": {
|
|
78
|
+
"tags": [],
|
|
79
|
+
"text": ""
|
|
80
|
+
},
|
|
81
|
+
"attribute": "is-iframe",
|
|
82
|
+
"reflect": false,
|
|
83
|
+
"defaultValue": "false"
|
|
63
84
|
}
|
|
64
85
|
};
|
|
65
86
|
}
|
|
@@ -5,9 +5,11 @@ export class PtcBackgroundVideo {
|
|
|
5
5
|
this.posterSrc = undefined;
|
|
6
6
|
this.overlay = true;
|
|
7
7
|
this.type = 'default';
|
|
8
|
+
this.isIframe = false;
|
|
8
9
|
}
|
|
9
10
|
render() {
|
|
10
|
-
|
|
11
|
+
const videoConten = this.isIframe ? (h("iframe", { src: this.videoSrc, frameborder: 0, width: "100%", allow: "autoplay; fullscreen; picture-in-picture", class: "elementor-background-video-embed" })) : (h("video", { src: this.videoSrc, poster: this.posterSrc, autoplay: true, loop: true, muted: true, playsinline: true }));
|
|
12
|
+
return (h(Host, { class: this.type }, videoConten, this.overlay
|
|
11
13
|
? h("div", { class: "video-overlay" })
|
|
12
14
|
: "", this.type == 'default'
|
|
13
15
|
? h("slot", null)
|
|
@@ -96,6 +98,24 @@ export class PtcBackgroundVideo {
|
|
|
96
98
|
"attribute": "type",
|
|
97
99
|
"reflect": false,
|
|
98
100
|
"defaultValue": "'default'"
|
|
101
|
+
},
|
|
102
|
+
"isIframe": {
|
|
103
|
+
"type": "boolean",
|
|
104
|
+
"mutable": false,
|
|
105
|
+
"complexType": {
|
|
106
|
+
"original": "boolean",
|
|
107
|
+
"resolved": "boolean",
|
|
108
|
+
"references": {}
|
|
109
|
+
},
|
|
110
|
+
"required": false,
|
|
111
|
+
"optional": false,
|
|
112
|
+
"docs": {
|
|
113
|
+
"tags": [],
|
|
114
|
+
"text": "Is it a iframe?"
|
|
115
|
+
},
|
|
116
|
+
"attribute": "is-iframe",
|
|
117
|
+
"reflect": false,
|
|
118
|
+
"defaultValue": "false"
|
|
99
119
|
}
|
|
100
120
|
};
|
|
101
121
|
}
|
|
@@ -11,6 +11,7 @@ export class PtcCard {
|
|
|
11
11
|
this.heading = undefined;
|
|
12
12
|
this.headingTransform = 'none';
|
|
13
13
|
this.cardDate = undefined;
|
|
14
|
+
this.country = undefined;
|
|
14
15
|
this.styles = undefined;
|
|
15
16
|
this.ribbonText = undefined;
|
|
16
17
|
this.eventType = undefined;
|
|
@@ -31,7 +32,7 @@ export class PtcCard {
|
|
|
31
32
|
h("h3", { class: `ptc-h3 ${this.headingTransform}${cutOffTitleClass}`, style: cutOff, part: "card-heading" }, this.heading),
|
|
32
33
|
h("slot", { name: "slot-after-heading" }),
|
|
33
34
|
]
|
|
34
|
-
: null, h("slot", { name: "slot-description" }), !!this.cardDate && this.cardType !== 'listing-card' && this.cardType !== 'listing-card-horizontal' && this.cardType !== 'hightlight-card' ? (h("ptc-date", { "date-string": `${this.cardDate}`, "date-styles": "span{color:#40434a;font-size:var(--ptc-font-size-x-small);margin-top:var(--ptc-element-spacing-06);display:inline-block;}" })) : null, !!this.cardDate && this.cardType === 'hightlight-card' ? (h("ptc-date", { style: { marginBottom: "20px" }, "format-options": '{"year":"numeric","month":"long","day":"numeric"}', "date-string": `${this.cardDate}`, "date-styles": "span{color: #a3a3a3;font-family: Raleway;font-size: 1rem !important;font-stretch: normal;font-style: normal;font-weight: 400;letter-spacing: normal;line-height: 1.03;padding-top: 15px;text-align: left;}" })) : null)))));
|
|
35
|
+
: null, h("slot", { name: "slot-description" }), !!this.cardDate && this.cardType !== 'listing-card' && this.cardType !== 'listing-card-horizontal' && this.cardType !== 'hightlight-card' ? (h("ptc-date", { "date-string": `${this.cardDate}`, "date-styles": "span{color:#40434a;font-size:var(--ptc-font-size-x-small);margin-top:var(--ptc-element-spacing-06);display:inline-block;}" })) : null, !!this.cardDate && this.cardType === 'hightlight-card' ? (h("ptc-date", { style: { marginBottom: "20px" }, "format-options": '{"year":"numeric","month":"long","day":"numeric"}', "date-string": `${this.cardDate}`, "date-styles": "span{color: #a3a3a3;font-family: Raleway;font-size: 1rem !important;font-stretch: normal;font-style: normal;font-weight: 400;letter-spacing: normal;line-height: 1.03;padding-top: 15px;text-align: left;}", country: this.country })) : null)))));
|
|
35
36
|
}
|
|
36
37
|
getCssClassMap() {
|
|
37
38
|
return {
|
|
@@ -254,6 +255,23 @@ export class PtcCard {
|
|
|
254
255
|
"attribute": "card-date",
|
|
255
256
|
"reflect": false
|
|
256
257
|
},
|
|
258
|
+
"country": {
|
|
259
|
+
"type": "string",
|
|
260
|
+
"mutable": false,
|
|
261
|
+
"complexType": {
|
|
262
|
+
"original": "string",
|
|
263
|
+
"resolved": "string",
|
|
264
|
+
"references": {}
|
|
265
|
+
},
|
|
266
|
+
"required": false,
|
|
267
|
+
"optional": true,
|
|
268
|
+
"docs": {
|
|
269
|
+
"tags": [],
|
|
270
|
+
"text": "Card Date"
|
|
271
|
+
},
|
|
272
|
+
"attribute": "country",
|
|
273
|
+
"reflect": false
|
|
274
|
+
},
|
|
257
275
|
"styles": {
|
|
258
276
|
"type": "string",
|
|
259
277
|
"mutable": false,
|
|
@@ -5,10 +5,11 @@ export class PtcContainer {
|
|
|
5
5
|
this.elevation = 'small';
|
|
6
6
|
this.containerType = '';
|
|
7
7
|
this.spacing = 'xxx-large';
|
|
8
|
+
this.styles = undefined;
|
|
8
9
|
}
|
|
9
10
|
render() {
|
|
10
11
|
const classMap = this.getCssClassMap();
|
|
11
|
-
return (h(Host, { class: this.getContainerClass() }, h("div", { class: classMap }, h("slot", null))));
|
|
12
|
+
return (h(Host, { class: this.getContainerClass() }, this.styles && h("style", null, this.styles), h("div", { class: classMap }, h("slot", null))));
|
|
12
13
|
}
|
|
13
14
|
getContainerClass() {
|
|
14
15
|
switch (this.containerType) {
|
|
@@ -114,6 +115,23 @@ export class PtcContainer {
|
|
|
114
115
|
"attribute": "spacing",
|
|
115
116
|
"reflect": false,
|
|
116
117
|
"defaultValue": "'xxx-large'"
|
|
118
|
+
},
|
|
119
|
+
"styles": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"mutable": false,
|
|
122
|
+
"complexType": {
|
|
123
|
+
"original": "string",
|
|
124
|
+
"resolved": "string",
|
|
125
|
+
"references": {}
|
|
126
|
+
},
|
|
127
|
+
"required": false,
|
|
128
|
+
"optional": true,
|
|
129
|
+
"docs": {
|
|
130
|
+
"tags": [],
|
|
131
|
+
"text": ""
|
|
132
|
+
},
|
|
133
|
+
"attribute": "styles",
|
|
134
|
+
"reflect": false
|
|
117
135
|
}
|
|
118
136
|
};
|
|
119
137
|
}
|
|
@@ -9,6 +9,7 @@ export class PtcJumbotron {
|
|
|
9
9
|
this.gifSrc = undefined;
|
|
10
10
|
this.bgVideoSrc = undefined;
|
|
11
11
|
this.bgSrc = undefined;
|
|
12
|
+
this.isIframe = false;
|
|
12
13
|
this.contentBackground = undefined;
|
|
13
14
|
this.contentColor = undefined;
|
|
14
15
|
this.textAlign = 'left';
|
|
@@ -43,7 +44,7 @@ export class PtcJumbotron {
|
|
|
43
44
|
break;
|
|
44
45
|
case 'dark-video':
|
|
45
46
|
case 'light-video':
|
|
46
|
-
mediaElement = h("ptc-background-video", { class: "video-ratio", overlay: false, "video-src": this.bgVideoSrc });
|
|
47
|
+
mediaElement = h("ptc-background-video", { class: "video-ratio", overlay: false, "video-src": this.bgVideoSrc, isIframe: this.isIframe });
|
|
47
48
|
break;
|
|
48
49
|
default:
|
|
49
50
|
mediaElement = h("ptc-img", { "img-url": this.bgSrc });
|
|
@@ -254,6 +255,24 @@ export class PtcJumbotron {
|
|
|
254
255
|
},
|
|
255
256
|
"attribute": "bg-src",
|
|
256
257
|
"reflect": false
|
|
258
|
+
},
|
|
259
|
+
"isIframe": {
|
|
260
|
+
"type": "boolean",
|
|
261
|
+
"mutable": false,
|
|
262
|
+
"complexType": {
|
|
263
|
+
"original": "boolean",
|
|
264
|
+
"resolved": "boolean",
|
|
265
|
+
"references": {}
|
|
266
|
+
},
|
|
267
|
+
"required": false,
|
|
268
|
+
"optional": true,
|
|
269
|
+
"docs": {
|
|
270
|
+
"tags": [],
|
|
271
|
+
"text": ""
|
|
272
|
+
},
|
|
273
|
+
"attribute": "is-iframe",
|
|
274
|
+
"reflect": false,
|
|
275
|
+
"defaultValue": "false"
|
|
257
276
|
}
|
|
258
277
|
};
|
|
259
278
|
}
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
bottom: 0;
|
|
26
26
|
display: none;
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
|
|
29
|
+
:host(.media-card) .card-wrap {
|
|
29
30
|
display: flex;
|
|
30
31
|
height: 100%;
|
|
31
32
|
width: 100%;
|
|
@@ -34,14 +35,14 @@
|
|
|
34
35
|
min-height: 329px;
|
|
35
36
|
align-items: end;
|
|
36
37
|
}
|
|
37
|
-
:host .card-wrap .car-content {
|
|
38
|
+
:host(.media-card) .card-wrap .car-content {
|
|
38
39
|
padding: 20px 30px 30px 30px;
|
|
39
40
|
}
|
|
40
|
-
:host .card-wrap .car-content h4,
|
|
41
|
-
:host .card-wrap .car-content h3 {
|
|
41
|
+
:host(.media-card) .card-wrap .car-content h4,
|
|
42
|
+
:host(.media-card) .card-wrap .car-content h3 {
|
|
42
43
|
color: #fff;
|
|
43
44
|
}
|
|
44
|
-
:host .card-wrap .car-content h3 {
|
|
45
|
+
:host(.media-card) .card-wrap .car-content h3 {
|
|
45
46
|
position: relative;
|
|
46
47
|
margin-bottom: 0;
|
|
47
48
|
font-size: var(--ptc-font-size-large);
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
display: inline;
|
|
51
52
|
letter-spacing: 1.1px;
|
|
52
53
|
}
|
|
53
|
-
:host .card-wrap .car-content h3::before {
|
|
54
|
+
:host(.media-card) .card-wrap .car-content h3::before {
|
|
54
55
|
content: "";
|
|
55
56
|
width: 100%;
|
|
56
57
|
height: 3px;
|
|
@@ -60,7 +61,7 @@
|
|
|
60
61
|
background-size: initial;
|
|
61
62
|
top: -10px;
|
|
62
63
|
}
|
|
63
|
-
:host .card-wrap .car-content h4 {
|
|
64
|
+
:host(.media-card) .card-wrap .car-content h4 {
|
|
64
65
|
text-shadow: 1px 3px 30px var(--color-black);
|
|
65
66
|
font-weight: var(--ptc-font-weight-semibold);
|
|
66
67
|
display: block;
|
|
@@ -68,4 +69,9 @@
|
|
|
68
69
|
font-style: normal;
|
|
69
70
|
font-stretch: normal;
|
|
70
71
|
letter-spacing: 0.6px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
:host(.bureau-card) {
|
|
75
|
+
height: 100%;
|
|
76
|
+
position: relative;
|
|
71
77
|
}
|
|
@@ -2,6 +2,10 @@ import { Host, h } from '@stencil/core';
|
|
|
2
2
|
import { getFileExtension } from '../../utils/utils';
|
|
3
3
|
export class PtcMediaCard {
|
|
4
4
|
constructor() {
|
|
5
|
+
/**
|
|
6
|
+
* ref video element
|
|
7
|
+
*/
|
|
8
|
+
this.videoEle = undefined;
|
|
5
9
|
this.cardType = 'media-card';
|
|
6
10
|
this.cardHref = undefined;
|
|
7
11
|
this.target = '_self';
|
|
@@ -13,13 +17,40 @@ export class PtcMediaCard {
|
|
|
13
17
|
this.category = undefined;
|
|
14
18
|
this.isHovered = false;
|
|
15
19
|
}
|
|
20
|
+
WatchStateHandler(newValue) {
|
|
21
|
+
if (this.videoEle) {
|
|
22
|
+
newValue ? this.videoEle.play() : this.videoEle.pause();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
getCardText() {
|
|
26
|
+
if (this.cardType === 'media-card') {
|
|
27
|
+
return [
|
|
28
|
+
h("div", { class: "card-wrap" }, h("div", { class: "car-content" }, h("h4", null, this.category, " "), h("h3", null, this.heading))),
|
|
29
|
+
];
|
|
30
|
+
}
|
|
31
|
+
// else if (this.cardType === 'bureau-card') {
|
|
32
|
+
// return (
|
|
33
|
+
// <div class="card-content">
|
|
34
|
+
// <slot name="bureau-description"></slot>
|
|
35
|
+
// </div>
|
|
36
|
+
// );
|
|
37
|
+
// }
|
|
38
|
+
}
|
|
16
39
|
render() {
|
|
17
40
|
const Tag = !!this.cardHref ? 'a' : 'div';
|
|
18
|
-
const isVideoUrl = getFileExtension(this.hoverBackgroundImage);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
41
|
+
const isVideoUrl = getFileExtension(this.hoverBackgroundImage) === '.mp4' ? true : false;
|
|
42
|
+
//console.log("isVideoUrl: " + isVideoUrl + " hoverBackgroundImage: " + this.hoverBackgroundImage);
|
|
43
|
+
const classMap = this.getCssClassMap();
|
|
44
|
+
return (h(Host, { class: classMap, onmouseenter: () => (this.isHovered = true), onmouseleave: () => (this.isHovered = false),
|
|
45
|
+
// {...(!isVideoUrl
|
|
46
|
+
// ? { ...{ style: this.isHovered ? { backgroundImage: `url(${this.hoverBackgroundImage})` } : { backgroundImage: `url(${this.activeBackgroundImage})` } } }
|
|
47
|
+
// : null)}
|
|
48
|
+
style: this.isHovered ? { backgroundImage: `url(${this.hoverBackgroundImage})` } : { backgroundImage: `url(${this.activeBackgroundImage})` } }, h(Tag, { class: 'anchor-wrap', target: this.target, href: this.cardHref, rel: this.rel }, isVideoUrl && (h("video", { muted: true, loop: true, playsinline: true, poster: this.activeBackgroundImage, ref: el => (this.videoEle = el), style: this.isHovered ? { display: 'block' } : { display: 'none' } }, h("source", { src: this.hoverBackgroundImage, type: "video/mp4" }, "Your browser does not support the video tag."))), this.cardType === "media-card" && h("ptc-overlay", { "filter-color": "black-2" }), this.cardType === "media-card" && this.getCardText())));
|
|
49
|
+
}
|
|
50
|
+
getCssClassMap() {
|
|
51
|
+
return {
|
|
52
|
+
[this.cardType]: true,
|
|
53
|
+
};
|
|
23
54
|
}
|
|
24
55
|
static get is() { return "ptc-media-card"; }
|
|
25
56
|
static get encapsulation() { return "shadow"; }
|
|
@@ -39,8 +70,8 @@ export class PtcMediaCard {
|
|
|
39
70
|
"type": "string",
|
|
40
71
|
"mutable": false,
|
|
41
72
|
"complexType": {
|
|
42
|
-
"original": "'media-card'",
|
|
43
|
-
"resolved": "\"media-card\"",
|
|
73
|
+
"original": "'media-card' | 'bureau-card'",
|
|
74
|
+
"resolved": "\"bureau-card\" | \"media-card\"",
|
|
44
75
|
"references": {}
|
|
45
76
|
},
|
|
46
77
|
"required": false,
|
|
@@ -192,25 +223,18 @@ export class PtcMediaCard {
|
|
|
192
223
|
},
|
|
193
224
|
"attribute": "category",
|
|
194
225
|
"reflect": false
|
|
195
|
-
},
|
|
196
|
-
"isHovered": {
|
|
197
|
-
"type": "boolean",
|
|
198
|
-
"mutable": true,
|
|
199
|
-
"complexType": {
|
|
200
|
-
"original": "boolean",
|
|
201
|
-
"resolved": "boolean",
|
|
202
|
-
"references": {}
|
|
203
|
-
},
|
|
204
|
-
"required": false,
|
|
205
|
-
"optional": false,
|
|
206
|
-
"docs": {
|
|
207
|
-
"tags": [],
|
|
208
|
-
"text": "boolean variable for hover state"
|
|
209
|
-
},
|
|
210
|
-
"attribute": "is-hovered",
|
|
211
|
-
"reflect": false,
|
|
212
|
-
"defaultValue": "false"
|
|
213
226
|
}
|
|
214
227
|
};
|
|
215
228
|
}
|
|
229
|
+
static get states() {
|
|
230
|
+
return {
|
|
231
|
+
"isHovered": {}
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
static get watchers() {
|
|
235
|
+
return [{
|
|
236
|
+
"propName": "isHovered",
|
|
237
|
+
"methodName": "WatchStateHandler"
|
|
238
|
+
}];
|
|
239
|
+
}
|
|
216
240
|
}
|
|
@@ -12,13 +12,13 @@ export class PtcTooltip {
|
|
|
12
12
|
this.theme = 'standard';
|
|
13
13
|
}
|
|
14
14
|
addTruncatedClass() {
|
|
15
|
-
const appRoot = this.el
|
|
15
|
+
const appRoot = this.el;
|
|
16
16
|
const text = appRoot.querySelectorAll('.ellipsis-by-line-boxing');
|
|
17
17
|
text.forEach(t => {
|
|
18
18
|
t.classList[t.scrollHeight > t.clientHeight ? 'add' : 'remove']('truncated');
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
-
// Created this function to initialize the truncate function on specific elements like tabs
|
|
21
|
+
// Created this function to initialize the truncate function on specific elements like tabs
|
|
22
22
|
enableAddTruncatedClass(element) {
|
|
23
23
|
const allTabHeaders = document.querySelectorAll(element);
|
|
24
24
|
for (const element of Array.from(allTabHeaders)) {
|
|
@@ -33,18 +33,21 @@ export class PtcTooltip {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
componentDidLoad() {
|
|
36
|
-
this.addTruncatedClass();
|
|
36
|
+
//this.addTruncatedClass();
|
|
37
|
+
setTimeout(() => {
|
|
38
|
+
this.addTruncatedClass();
|
|
39
|
+
}, 1000);
|
|
37
40
|
this.enableAddTruncatedClass('tab-header');
|
|
38
41
|
this.enableAddTruncatedClass('ptc-ellipsis-dropdown');
|
|
39
|
-
document.addEventListener(
|
|
40
|
-
if (document.readyState ===
|
|
42
|
+
document.addEventListener('readystatechange', () => {
|
|
43
|
+
if (document.readyState === 'complete') {
|
|
41
44
|
this.addTruncatedClass();
|
|
42
45
|
}
|
|
43
46
|
});
|
|
44
47
|
}
|
|
45
48
|
render() {
|
|
46
49
|
if (this.mode == 'wrapper') {
|
|
47
|
-
return (h(Host, { class: this.textDisplay }, this.styles && h("style", null, this.styles), h("div", { class: "wrapper-content" }, h("slot", null), h("div", { class: `tooltip ${this.position} ${this.theme}` }, h("slot", { name: "description" }), this.description))));
|
|
50
|
+
return (h(Host, { class: this.textDisplay }, this.styles && h("style", null, this.styles), h("div", { class: "wrapper-content" }, h("div", { class: "slot-content" }, h("slot", null)), h("div", { class: `tooltip ${this.position} ${this.theme}` }, h("slot", { name: "description" }), this.description))));
|
|
48
51
|
}
|
|
49
52
|
else {
|
|
50
53
|
const classMap = this.getCssClassMap();
|
|
@@ -55,7 +58,7 @@ export class PtcTooltip {
|
|
|
55
58
|
truncatedText = truncatedText.substring(0, lastSpace);
|
|
56
59
|
truncatedText += '... ';
|
|
57
60
|
}
|
|
58
|
-
return (h(Host, { class: this.textDisplay }, this.styles && h("style", null, this.styles), this.textLines > 0 && !!this.textLines ? h("div", { class: "ellipsis-by-line-boxing", style: cutOff }, this.description) : h("div", { class: classMap }, truncatedText), h("div", { class: `tooltip ${this.position} ${this.theme}` }, this.description)));
|
|
61
|
+
return (h(Host, { class: this.textDisplay }, this.styles && h("style", null, this.styles), this.textLines > 0 && !!this.textLines ? (h("div", { class: "ellipsis-by-line-boxing", style: cutOff }, this.description)) : (h("div", { class: classMap }, truncatedText)), h("div", { class: `tooltip ${this.position} ${this.theme}` }, this.description)));
|
|
59
62
|
}
|
|
60
63
|
}
|
|
61
64
|
getCssClassMap() {
|
|
@@ -76,7 +79,7 @@ export class PtcTooltip {
|
|
|
76
79
|
return result;
|
|
77
80
|
}
|
|
78
81
|
static get is() { return "ptc-tooltip"; }
|
|
79
|
-
static get encapsulation() { return "
|
|
82
|
+
static get encapsulation() { return "scoped"; }
|
|
80
83
|
static get originalStyleUrls() {
|
|
81
84
|
return {
|
|
82
85
|
"$": ["ptc-tooltip.scss"]
|