@ptcwebops/ptcw-design 4.3.0 → 4.3.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 (53) hide show
  1. package/dist/cjs/homepage-clickable-tab.cjs.entry.js +25 -0
  2. package/dist/cjs/homepage-jumbotron.cjs.entry.js +56 -0
  3. package/dist/cjs/homepage-toggled-content.cjs.entry.js +40 -0
  4. package/dist/cjs/jumbotron-sub-mune.cjs.entry.js +34 -0
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/ptc-breadcrumb.cjs.entry.js +46 -0
  7. package/dist/cjs/ptc-info-tile.cjs.entry.js +29 -0
  8. package/dist/cjs/{ptc-breadcrumb_2.cjs.entry.js → ptc-jumbotron.cjs.entry.js} +1 -41
  9. package/dist/cjs/ptc-media-card.cjs.entry.js +1 -1
  10. package/dist/cjs/ptcw-design.cjs.js +1 -1
  11. package/dist/collection/collection-manifest.json +5 -0
  12. package/dist/collection/components/homepage-clickable-tab/homepage-clickable-tab.css +102 -0
  13. package/dist/collection/components/homepage-clickable-tab/homepage-clickable-tab.js +81 -0
  14. package/dist/collection/components/jumbotron-sub-mune/jumbotron-sub-mune.css +133 -0
  15. package/dist/collection/components/jumbotron-sub-mune/jumbotron-sub-mune.js +61 -0
  16. package/dist/collection/components/organism-bundles/homepage-jumbotron/homepage-jumbotron.css +856 -0
  17. package/dist/collection/components/organism-bundles/homepage-jumbotron/homepage-jumbotron.js +134 -0
  18. package/dist/collection/components/organism-bundles/homepage-toggled-content/homepage-toggled-content.css +228 -0
  19. package/dist/collection/components/organism-bundles/homepage-toggled-content/homepage-toggled-content.js +47 -0
  20. package/dist/collection/components/ptc-info-tile/ptc-info-tile.css +136 -0
  21. package/dist/collection/components/ptc-info-tile/ptc-info-tile.js +136 -0
  22. package/dist/collection/components/ptc-jumbotron/ptc-jumbotron.js +2 -2
  23. package/dist/collection/components/ptc-media-card/ptc-media-card.css +6 -0
  24. package/dist/custom-elements/index.d.ts +30 -0
  25. package/dist/custom-elements/index.js +4733 -4566
  26. package/dist/esm/homepage-clickable-tab.entry.js +21 -0
  27. package/dist/esm/homepage-jumbotron.entry.js +52 -0
  28. package/dist/esm/homepage-toggled-content.entry.js +36 -0
  29. package/dist/esm/jumbotron-sub-mune.entry.js +30 -0
  30. package/dist/esm/loader.js +1 -1
  31. package/dist/esm/ptc-breadcrumb.entry.js +42 -0
  32. package/dist/esm/ptc-info-tile.entry.js +25 -0
  33. package/dist/esm/{ptc-breadcrumb_2.entry.js → ptc-jumbotron.entry.js} +2 -41
  34. package/dist/esm/ptc-media-card.entry.js +1 -1
  35. package/dist/esm/ptcw-design.js +1 -1
  36. package/dist/ptcw-design/p-22f5b976.entry.js +1 -0
  37. package/dist/ptcw-design/p-230f8bce.entry.js +1 -0
  38. package/dist/ptcw-design/p-2a999b1f.entry.js +1 -0
  39. package/dist/ptcw-design/p-84da0491.entry.js +1 -0
  40. package/dist/ptcw-design/{p-08937894.entry.js → p-9c9bab6c.entry.js} +1 -1
  41. package/dist/ptcw-design/p-c3bfaef4.entry.js +1 -0
  42. package/dist/ptcw-design/p-e347dc85.entry.js +1 -0
  43. package/dist/ptcw-design/p-e9bbf7b1.entry.js +1 -0
  44. package/dist/ptcw-design/ptcw-design.esm.js +1 -1
  45. package/dist/types/components/homepage-clickable-tab/homepage-clickable-tab.d.ts +8 -0
  46. package/dist/types/components/jumbotron-sub-mune/jumbotron-sub-mune.d.ts +7 -0
  47. package/dist/types/components/organism-bundles/homepage-jumbotron/homepage-jumbotron.d.ts +14 -0
  48. package/dist/types/components/organism-bundles/homepage-toggled-content/homepage-toggled-content.d.ts +12 -0
  49. package/dist/types/components/ptc-info-tile/ptc-info-tile.d.ts +11 -0
  50. package/dist/types/components.d.ts +99 -0
  51. package/package.json +1 -1
  52. package/readme.md +1 -1
  53. package/dist/ptcw-design/p-c0010157.entry.js +0 -1
@@ -0,0 +1,134 @@
1
+ import { h, Host } from '@stencil/core';
2
+ import Swiper from 'swiper';
3
+ import 'swiper/swiper-bundle.css';
4
+ export class HomepageJumbotron {
5
+ constructor() {
6
+ this.bgVideoSrc = '';
7
+ this.bgSrc = 'https://images.unsplash.com/photo-1675285972028-45dc2add07be?crop=entropy&cs=tinysrgb&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2Nzc3ODk2NTE&ixlib=rb-4.0.3&q=80';
8
+ this.jumbotron = 'light';
9
+ this.isIframe = false;
10
+ }
11
+ componentDidLoad() {
12
+ this.initSlider();
13
+ }
14
+ initSlider() {
15
+ if (this.swiperContainerRef) {
16
+ this.mySwiper = new Swiper(this.swiperContainerRef, {
17
+ slidesPerView: 1,
18
+ spaceBetween: 2,
19
+ loop: true,
20
+ pagination: {
21
+ el: '.swiper-pagination',
22
+ clickable: true,
23
+ },
24
+ navigation: {
25
+ nextEl: '.swiper-button-next',
26
+ prevEl: '.swiper-button-prev',
27
+ },
28
+ breakpoints: {
29
+ 768: {
30
+ slidesPerView: 2,
31
+ },
32
+ 992: {
33
+ slidesPerView: 3,
34
+ },
35
+ },
36
+ });
37
+ console.log('running swiper');
38
+ }
39
+ }
40
+ render() {
41
+ return (h(Host, null, h("ptc-jumbotron", Object.assign({ "jumbotron-type": this.jumbotron }, (!!this.bgVideoSrc && { bgVideoSrc: this.bgVideoSrc }), (!this.bgVideoSrc && !!this.bgSrc && { bgSrc: this.bgSrc }), { "is-iframe": this.isIframe, "sub-title": "" //sub title is coming from slot here
42
+ ,
43
+ "play-button-title": "play1", "pause-button-title": "pause text" }), h("slot", { name: "breadcrumb" }), h("slot", { name: "main-title" }), h("slot", { name: "hp-sub-title" }), h("ptc-button", { slot: "j-cta", type: "link", color: "ptc-quaternary", "link-href": "https://www.ptc.com", target: "_blank" }, "Lorem ipsum dolor sit amet")), h("div", { class: "swiper-container", ref: el => (this.swiperContainerRef = el) }, h("div", { class: "swiper-wrapper" }, h("div", { class: "swiper-slide" }, h("ptc-info-tile", { title: "Gravida Enim", description: "Neque rhoncus adipiscing ullamcorper lectus", variant: "image", "img-src": "https://placehold.co/500", link: "#test" })), h("div", { class: "swiper-slide" }, h("ptc-info-tile", { title: "Gravida Enim", description: "Neque rhoncus adipiscing ullamcorper lectus", variant: "image", "img-src": "https://placehold.co/500", link: "#test" })), h("div", { class: "swiper-slide" }, h("ptc-info-tile", { title: "Gravida Enim", description: "Neque rhoncus adipiscing ullamcorper lectus", variant: "image", "img-src": "https://placehold.co/500", link: "#test" }))), h("div", { class: "swiper-pagination" }), h("div", { class: "swiper-button-next" }), h("div", { class: "swiper-button-prev" }))));
44
+ }
45
+ static get is() { return "homepage-jumbotron"; }
46
+ static get encapsulation() { return "scoped"; }
47
+ static get originalStyleUrls() {
48
+ return {
49
+ "$": ["homepage-jumbotron.scss"]
50
+ };
51
+ }
52
+ static get styleUrls() {
53
+ return {
54
+ "$": ["homepage-jumbotron.css"]
55
+ };
56
+ }
57
+ static get properties() {
58
+ return {
59
+ "bgVideoSrc": {
60
+ "type": "string",
61
+ "mutable": false,
62
+ "complexType": {
63
+ "original": "string",
64
+ "resolved": "string",
65
+ "references": {}
66
+ },
67
+ "required": false,
68
+ "optional": false,
69
+ "docs": {
70
+ "tags": [],
71
+ "text": ""
72
+ },
73
+ "attribute": "bg-video-src",
74
+ "reflect": false,
75
+ "defaultValue": "''"
76
+ },
77
+ "bgSrc": {
78
+ "type": "string",
79
+ "mutable": false,
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": "bg-src",
92
+ "reflect": false,
93
+ "defaultValue": "'https://images.unsplash.com/photo-1675285972028-45dc2add07be?crop=entropy&cs=tinysrgb&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2Nzc3ODk2NTE&ixlib=rb-4.0.3&q=80'"
94
+ },
95
+ "jumbotron": {
96
+ "type": "string",
97
+ "mutable": false,
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": "jumbotron",
110
+ "reflect": false,
111
+ "defaultValue": "'light'"
112
+ },
113
+ "isIframe": {
114
+ "type": "boolean",
115
+ "mutable": false,
116
+ "complexType": {
117
+ "original": "boolean",
118
+ "resolved": "boolean",
119
+ "references": {}
120
+ },
121
+ "required": false,
122
+ "optional": false,
123
+ "docs": {
124
+ "tags": [],
125
+ "text": ""
126
+ },
127
+ "attribute": "is-iframe",
128
+ "reflect": false,
129
+ "defaultValue": "false"
130
+ }
131
+ };
132
+ }
133
+ static get elementRef() { return "el"; }
134
+ }
@@ -0,0 +1,228 @@
1
+ h1,
2
+ h2,
3
+ h3,
4
+ h4,
5
+ h5,
6
+ h6,
7
+ p,
8
+ ul,
9
+ li,
10
+ ptc-subnav,
11
+ ptc-tab-list,
12
+ ptc-link, ptc-square-card {
13
+ word-break: break-word;
14
+ hyphens: manual;
15
+ -webkit-hyphens: manual;
16
+ -moz-hyphens: manual;
17
+ -ms-hyphens: manual;
18
+ }
19
+ @supports (hyphenate-limit-chars: 12 3 3) {
20
+ h1,
21
+ h2,
22
+ h3,
23
+ h4,
24
+ h5,
25
+ h6,
26
+ p,
27
+ ul,
28
+ li,
29
+ ptc-subnav,
30
+ ptc-tab-list,
31
+ ptc-link, ptc-square-card {
32
+ hyphens: auto;
33
+ -webkit-hyphenate-limit-before: 3;
34
+ /* For Safari */
35
+ -webkit-hyphenate-limit-after: 3;
36
+ /* For Safari */
37
+ hyphenate-limit-chars: 12 3 3;
38
+ hyphenate-limit-lines: 2;
39
+ hyphenate-limit-last: always;
40
+ hyphenate-limit-zone: 6%;
41
+ -webkit-hyphens: auto;
42
+ -webkit-hyphenate-limit-before: 3;
43
+ -webkit-hyphenate-limit-after: 3;
44
+ -webkit-hyphenate-limit-chars: 12 3 3;
45
+ -webkit-hyphenate-limit-lines: 2;
46
+ -moz-hyphens: auto;
47
+ -moz-hyphenate-limit-chars: 12 3 3;
48
+ -moz-hyphenate-limit-lines: 2;
49
+ -ms-hyphens: auto;
50
+ -ms-hyphenate-limit-chars: 12 3 3;
51
+ -ms-hyphenate-limit-lines: 2;
52
+ }
53
+ }
54
+
55
+ ::slotted(.title) {
56
+ color: var(--color-gray-10);
57
+ font-family: Raleway;
58
+ font-size: 32px;
59
+ font-style: normal;
60
+ font-weight: 800;
61
+ line-height: 40px;
62
+ /* 125% */
63
+ }
64
+
65
+ ::slotted(.description) {
66
+ color: var(--color-gray-10);
67
+ font-family: Raleway;
68
+ font-size: 18px;
69
+ font-style: normal;
70
+ font-weight: 400;
71
+ line-height: 27px;
72
+ /* 150% */
73
+ }
74
+
75
+ .header {
76
+ text-align: center;
77
+ margin-bottom: 20px;
78
+ }
79
+ @media only screen and (min-width: 992px) {
80
+ .header {
81
+ width: 70%;
82
+ }
83
+ }
84
+
85
+ .tabs {
86
+ display: flex;
87
+ justify-content: center;
88
+ margin-bottom: 64px;
89
+ }
90
+
91
+ .tabs-desktop {
92
+ display: flex;
93
+ gap: 24px;
94
+ }
95
+
96
+ .tabs-mobile {
97
+ display: none;
98
+ position: relative;
99
+ }
100
+
101
+ .dropdown-button {
102
+ background: linear-gradient(180deg, #197BC0 0%, #4795CD 100%);
103
+ color: white;
104
+ padding: 24px;
105
+ border: none;
106
+ border-radius: var(--ptc-border-radius-standard) var(--ptc-border-radius-standard) 0px 0px;
107
+ cursor: pointer;
108
+ display: flex;
109
+ align-items: center;
110
+ justify-content: space-between;
111
+ width: 100%;
112
+ font-family: var(--ptc-font-latin);
113
+ font-size: var(--ptc-font-size-small);
114
+ font-weight: var(--ptc-font-weight-extrabold);
115
+ }
116
+
117
+ .dropdown-button .arrow {
118
+ margin-left: 24px;
119
+ }
120
+
121
+ .dropdown-menu {
122
+ position: absolute;
123
+ width: calc(100% - 2px);
124
+ background-color: var(--color-white);
125
+ color: var(--color-gray-10);
126
+ display: flex;
127
+ flex-direction: column;
128
+ border-radius: 0px 0px var(--ptc-border-radius-standard) var(--ptc-border-radius-standard);
129
+ border: 1px solid var(--color-gray-10);
130
+ border-top: 0px;
131
+ }
132
+ .dropdown-menu .dropdown-item {
133
+ color: var(--gray-10-text-gray, #323B42);
134
+ font-family: var(--ptc-font-latin);
135
+ font-size: var(--ptc-font-size-small);
136
+ font-weight: var(--ptc-font-weight-regular);
137
+ }
138
+
139
+ .dropdown-item {
140
+ padding: 10px;
141
+ cursor: pointer;
142
+ border-bottom: 1px solid rgba(255, 255, 255, 0.1);
143
+ }
144
+
145
+ .dropdown-item:last-child {
146
+ border-bottom: none;
147
+ }
148
+
149
+ .dropdown-item:hover {
150
+ font-weight: var(--ptc-font-weight-bold);
151
+ }
152
+
153
+ @media (max-width: 992px) {
154
+ .tabs-desktop {
155
+ display: none;
156
+ }
157
+
158
+ .tabs-mobile {
159
+ display: block;
160
+ width: 100%;
161
+ }
162
+ }
163
+ .content {
164
+ display: flex;
165
+ flex-direction: row;
166
+ align-items: center;
167
+ flex-wrap: wrap;
168
+ overflow: hidden;
169
+ }
170
+
171
+ .tab-content {
172
+ display: flex;
173
+ flex-direction: column;
174
+ }
175
+ @media only screen and (min-width: 992px) {
176
+ .tab-content {
177
+ display: flex;
178
+ flex-wrap: nowrap;
179
+ flex-direction: row;
180
+ width: 100%;
181
+ /* align-content: center; */
182
+ justify-content: center;
183
+ align-items: center;
184
+ gap: 56px;
185
+ }
186
+ }
187
+ .tab-content img {
188
+ max-width: 100%;
189
+ width: 100%;
190
+ height: auto;
191
+ margin-bottom: 20px;
192
+ }
193
+ @media only screen and (min-width: 992px) {
194
+ .tab-content img {
195
+ width: 580px;
196
+ height: 733px;
197
+ flex-shrink: 0;
198
+ }
199
+ }
200
+
201
+ .content-detail {
202
+ text-align: left;
203
+ }
204
+ @media only screen and (min-width: 992px) {
205
+ .content-detail {
206
+ flex-grow: 1;
207
+ overflow: hidden;
208
+ word-break: break-word;
209
+ }
210
+ }
211
+ .content-detail p,
212
+ .content-detail h2 {
213
+ margin-block-start: unset;
214
+ margin-block-end: unset;
215
+ }
216
+ .content-detail h2 {
217
+ margin-bottom: 16px;
218
+ }
219
+ .content-detail p {
220
+ margin-bottom: 32px;
221
+ }
222
+
223
+ .info-card-wrapper {
224
+ margin-top: 72px;
225
+ display: flex;
226
+ flex-wrap: wrap;
227
+ gap: 24px;
228
+ }
@@ -0,0 +1,47 @@
1
+ import { h } from '@stencil/core';
2
+ export class HomepageToggledContent {
3
+ constructor() {
4
+ this.activeTab = 0;
5
+ this.dropdownOpen = false;
6
+ }
7
+ handleTabSelected(tabIndex) {
8
+ this.activeTab = tabIndex;
9
+ this.dropdownOpen = false; // Close dropdown on selection
10
+ }
11
+ toggleDropdown() {
12
+ this.dropdownOpen = !this.dropdownOpen;
13
+ }
14
+ getTabs() {
15
+ const tabs = Array.from(this.el.querySelectorAll('[slot^="tab-label"]'));
16
+ return tabs.map((tab, index) => ({
17
+ label: tab.textContent,
18
+ index,
19
+ }));
20
+ }
21
+ render() {
22
+ const upArrow = (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "15", height: "11", viewBox: "0 0 15 11", fill: "none" }, h("path", { d: "M13 8.5L7.34315 2.71178L1.68629 8.5", stroke: "white", "stroke-width": "3", "stroke-linecap": "round" })));
23
+ const downArrow = (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "15", height: "11", viewBox: "0 0 15 11", fill: "none" }, h("path", { d: "M13 2.5L7.34315 8.28822L1.68629 2.5", stroke: "white", "stroke-width": "3", "stroke-linecap": "round" })));
24
+ const tabs = this.getTabs();
25
+ //console.log(tabs);
26
+ return (h("div", null, h("div", { class: "header" }, h("h2", null, h("slot", { name: "title" })), h("p", null, h("slot", { name: "description" }))), h("div", { class: "tabs" }, h("div", { class: "tabs-desktop" }, tabs.map(tab => (h("homepage-clickable-tab", { label: tab.label, active: this.activeTab === tab.index, onClick: () => this.handleTabSelected(tab.index) })))), h("div", { class: "tabs-mobile" }, h("button", { class: "dropdown-button", onClick: () => this.toggleDropdown() }, h("slot", { name: `tab-label-${this.activeTab}` }), h("span", { class: "arrow" }, this.dropdownOpen ? upArrow : downArrow)), this.dropdownOpen && (h("div", { class: "dropdown-menu" }, tabs.map(tab => (h("div", { class: "dropdown-item", onClick: () => this.handleTabSelected(tab.index) }, h("slot", { name: `tab-label-${tab.index}` })))))))), h("div", { class: "content" }, tabs.map((tab, index) => (h("div", { style: { display: this.activeTab === index ? 'flex' : 'none' }, class: "tab-content" }, h("img", { src: `https://placehold.co/580x733`, alt: `Image ${index + 1}` }), h("div", { class: "content-detail" }, h("div", { hidden: true }, tab.label), h("h2", null, h("slot", { name: `tab-title-${index}` })), h("p", null, h("slot", { name: `tab-content-${index}` })), h("ptc-button", { type: "link", color: "ptc-quaternary", "link-href": "https://www.ptc.com", target: "_blank" }, h("slot", { name: `tab-button-${index}` })), h("div", { class: "info-card-wrapper" }, h("ptc-info-tile", { "tile-title": "Gravida Enim", description: "Neque rhoncus adipiscing ullamcorper lectus", variant: "text" }), h("ptc-info-tile", { "tile-title": "Commodo Adipiscing", description: "Justo fames sodales neque faucibus nulla purus gravida", variant: "text" })))))))));
27
+ }
28
+ static get is() { return "homepage-toggled-content"; }
29
+ static get encapsulation() { return "shadow"; }
30
+ static get originalStyleUrls() {
31
+ return {
32
+ "$": ["homepage-toggled-content.scss"]
33
+ };
34
+ }
35
+ static get styleUrls() {
36
+ return {
37
+ "$": ["homepage-toggled-content.css"]
38
+ };
39
+ }
40
+ static get states() {
41
+ return {
42
+ "activeTab": {},
43
+ "dropdownOpen": {}
44
+ };
45
+ }
46
+ static get elementRef() { return "el"; }
47
+ }
@@ -0,0 +1,136 @@
1
+ h1,
2
+ h2,
3
+ h3,
4
+ h4,
5
+ h5,
6
+ h6,
7
+ p,
8
+ ul,
9
+ li,
10
+ ptc-subnav,
11
+ ptc-tab-list,
12
+ ptc-link, ptc-square-card {
13
+ word-break: break-word;
14
+ hyphens: manual;
15
+ -webkit-hyphens: manual;
16
+ -moz-hyphens: manual;
17
+ -ms-hyphens: manual;
18
+ }
19
+ @supports (hyphenate-limit-chars: 12 3 3) {
20
+ h1,
21
+ h2,
22
+ h3,
23
+ h4,
24
+ h5,
25
+ h6,
26
+ p,
27
+ ul,
28
+ li,
29
+ ptc-subnav,
30
+ ptc-tab-list,
31
+ ptc-link, ptc-square-card {
32
+ hyphens: auto;
33
+ -webkit-hyphenate-limit-before: 3;
34
+ /* For Safari */
35
+ -webkit-hyphenate-limit-after: 3;
36
+ /* For Safari */
37
+ hyphenate-limit-chars: 12 3 3;
38
+ hyphenate-limit-lines: 2;
39
+ hyphenate-limit-last: always;
40
+ hyphenate-limit-zone: 6%;
41
+ -webkit-hyphens: auto;
42
+ -webkit-hyphenate-limit-before: 3;
43
+ -webkit-hyphenate-limit-after: 3;
44
+ -webkit-hyphenate-limit-chars: 12 3 3;
45
+ -webkit-hyphenate-limit-lines: 2;
46
+ -moz-hyphens: auto;
47
+ -moz-hyphenate-limit-chars: 12 3 3;
48
+ -moz-hyphenate-limit-lines: 2;
49
+ -ms-hyphens: auto;
50
+ -ms-hyphenate-limit-chars: 12 3 3;
51
+ -ms-hyphenate-limit-lines: 2;
52
+ }
53
+ }
54
+
55
+ :host {
56
+ display: block;
57
+ }
58
+
59
+ .tile {
60
+ position: relative;
61
+ background-color: white;
62
+ border-radius: 8px;
63
+ overflow: hidden;
64
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
65
+ cursor: pointer;
66
+ transition: border 0.3s;
67
+ max-width: 360px;
68
+ height: 116px;
69
+ }
70
+ .tile.image {
71
+ display: flex;
72
+ flex-wrap: nowrap;
73
+ flex-direction: row;
74
+ align-items: center;
75
+ }
76
+ .tile.image .tile-content {
77
+ border-bottom: 2px solid var(--color-white);
78
+ background: #FFF;
79
+ height: 82px;
80
+ }
81
+ .tile.image:hover .tile-content {
82
+ border-bottom: 2px solid var(--Blue-6, #4795CD);
83
+ background: #FFF;
84
+ }
85
+ .tile.image:active .tile-content, .tile.image:focus .tile-content {
86
+ border-bottom: 2px solid var(--Blue-6, #4795CD);
87
+ background: var(--Gray-1, #F6F6F6);
88
+ }
89
+ .tile.text {
90
+ background-color: var(--color-white);
91
+ border: 1px solid var(--color-gray-03);
92
+ width: 268px;
93
+ }
94
+ .tile.text:hover {
95
+ background-color: var(--color-gray-01);
96
+ border: 1px solid var(--color-gray-07);
97
+ }
98
+ .tile img {
99
+ width: 120px;
100
+ height: 116px;
101
+ }
102
+ .tile h3 {
103
+ margin: 0;
104
+ font-size: 1.2em;
105
+ }
106
+ .tile p {
107
+ margin: 0.5em 0 0;
108
+ color: #666;
109
+ }
110
+ .tile .link-overlay {
111
+ position: absolute;
112
+ top: 0;
113
+ left: 0;
114
+ right: 0;
115
+ bottom: 0;
116
+ width: 100%;
117
+ height: 100%;
118
+ z-index: 1;
119
+ }
120
+ .tile .tile-content {
121
+ padding: 16px;
122
+ }
123
+ .tile .tile-content h3 {
124
+ color: var(--color-blue-07);
125
+ font-family: Raleway;
126
+ font-size: 14px;
127
+ font-weight: 500;
128
+ }
129
+ .tile .tile-content p {
130
+ color: var(--color-gray-10);
131
+ font-family: Raleway;
132
+ font-size: 16px;
133
+ font-weight: 700;
134
+ line-height: 24px;
135
+ /* 150% */
136
+ }
@@ -0,0 +1,136 @@
1
+ import { Host, h } from '@stencil/core';
2
+ export class PtcInfoTile {
3
+ constructor() {
4
+ this.tileTitle = undefined;
5
+ this.description = undefined;
6
+ this.imgSrc = undefined;
7
+ this.link = undefined;
8
+ this.variant = undefined;
9
+ }
10
+ handleClick() {
11
+ this.tileClick.emit();
12
+ }
13
+ render() {
14
+ const content = (h("div", { class: "tile-content" }, h("h3", null, this.tileTitle), h("p", null, this.description)));
15
+ return (h(Host, null, h("div", { class: `tile ${this.variant}`, onClick: () => this.handleClick() }, this.variant === 'image' && this.imgSrc && h("img", { src: this.imgSrc, alt: this.tileTitle }), content, this.link && (h("a", { href: this.link, class: "link-overlay" })))));
16
+ }
17
+ static get is() { return "ptc-info-tile"; }
18
+ static get encapsulation() { return "shadow"; }
19
+ static get originalStyleUrls() {
20
+ return {
21
+ "$": ["ptc-info-tile.scss"]
22
+ };
23
+ }
24
+ static get styleUrls() {
25
+ return {
26
+ "$": ["ptc-info-tile.css"]
27
+ };
28
+ }
29
+ static get properties() {
30
+ return {
31
+ "tileTitle": {
32
+ "type": "string",
33
+ "mutable": false,
34
+ "complexType": {
35
+ "original": "string",
36
+ "resolved": "string",
37
+ "references": {}
38
+ },
39
+ "required": false,
40
+ "optional": false,
41
+ "docs": {
42
+ "tags": [],
43
+ "text": ""
44
+ },
45
+ "attribute": "tile-title",
46
+ "reflect": false
47
+ },
48
+ "description": {
49
+ "type": "string",
50
+ "mutable": false,
51
+ "complexType": {
52
+ "original": "string",
53
+ "resolved": "string",
54
+ "references": {}
55
+ },
56
+ "required": false,
57
+ "optional": false,
58
+ "docs": {
59
+ "tags": [],
60
+ "text": ""
61
+ },
62
+ "attribute": "description",
63
+ "reflect": false
64
+ },
65
+ "imgSrc": {
66
+ "type": "string",
67
+ "mutable": false,
68
+ "complexType": {
69
+ "original": "string",
70
+ "resolved": "string",
71
+ "references": {}
72
+ },
73
+ "required": false,
74
+ "optional": false,
75
+ "docs": {
76
+ "tags": [],
77
+ "text": ""
78
+ },
79
+ "attribute": "img-src",
80
+ "reflect": false
81
+ },
82
+ "link": {
83
+ "type": "string",
84
+ "mutable": false,
85
+ "complexType": {
86
+ "original": "string",
87
+ "resolved": "string",
88
+ "references": {}
89
+ },
90
+ "required": false,
91
+ "optional": false,
92
+ "docs": {
93
+ "tags": [],
94
+ "text": ""
95
+ },
96
+ "attribute": "link",
97
+ "reflect": false
98
+ },
99
+ "variant": {
100
+ "type": "string",
101
+ "mutable": false,
102
+ "complexType": {
103
+ "original": "'image' | 'text'",
104
+ "resolved": "\"image\" | \"text\"",
105
+ "references": {}
106
+ },
107
+ "required": false,
108
+ "optional": false,
109
+ "docs": {
110
+ "tags": [],
111
+ "text": ""
112
+ },
113
+ "attribute": "variant",
114
+ "reflect": false
115
+ }
116
+ };
117
+ }
118
+ static get events() {
119
+ return [{
120
+ "method": "tileClick",
121
+ "name": "tileClick",
122
+ "bubbles": true,
123
+ "cancelable": true,
124
+ "composed": true,
125
+ "docs": {
126
+ "tags": [],
127
+ "text": ""
128
+ },
129
+ "complexType": {
130
+ "original": "void",
131
+ "resolved": "void",
132
+ "references": {}
133
+ }
134
+ }];
135
+ }
136
+ }