@ptcwebops/ptcw-design 1.6.7 → 1.6.9

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 (73) hide show
  1. package/dist/{esm/core-1c9d4889.js → cjs/core-5a811549.js} +26 -1
  2. package/dist/cjs/{icon-asset_17.cjs.entry.js → icon-asset_16.cjs.entry.js} +43 -37
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/ptc-case-studies-slider.cjs.entry.js +1685 -0
  5. package/dist/cjs/ptc-image-download-strip.cjs.entry.js +29 -0
  6. package/dist/cjs/ptc-jumbotron.cjs.entry.js +1 -1
  7. package/dist/cjs/ptc-news.cjs.entry.js +28 -0
  8. package/dist/cjs/ptc-pricing-tabs.cjs.entry.js +1 -1
  9. package/dist/cjs/ptc-progress-bar_2.cjs.entry.js +11 -1
  10. package/dist/cjs/ptc-slit-card.cjs.entry.js +36 -0
  11. package/dist/cjs/ptcw-design.cjs.js +1 -1
  12. package/dist/cjs/sequential-bundle-example.cjs.entry.js +1 -1
  13. package/dist/cjs/sequential-bundle.cjs.entry.js +1 -1
  14. package/dist/collection/collection-manifest.json +3 -0
  15. package/dist/collection/components/icon-asset/media/designer.svg +33 -3
  16. package/dist/collection/components/ptc-button/ptc-button.css +18 -0
  17. package/dist/collection/components/ptc-button/ptc-button.js +20 -1
  18. package/dist/collection/components/ptc-case-studies-slider/ptc-case-studies-slider.css +831 -0
  19. package/dist/collection/components/ptc-case-studies-slider/ptc-case-studies-slider.js +91 -0
  20. package/dist/collection/components/ptc-image-download-strip/ptc-image-download-strip.css +49 -0
  21. package/dist/collection/components/ptc-image-download-strip/ptc-image-download-strip.js +51 -0
  22. package/dist/collection/components/ptc-jumbotron/ptc-jumbotron.css +0 -17
  23. package/dist/collection/components/ptc-news/ptc-news.css +47 -0
  24. package/dist/collection/components/ptc-news/ptc-news.js +169 -0
  25. package/dist/collection/components/ptc-pricing-tabs/ptc-pricing-tabs.css +0 -17
  26. package/dist/collection/components/ptc-product-card/ptc-product-card.css +22 -1
  27. package/dist/collection/components/ptc-product-card/ptc-product-card.js +3 -2
  28. package/dist/collection/components/ptc-product-list/ptc-product-list.js +23 -0
  29. package/dist/collection/components/ptc-product-sidebar/ptc-product-sidebar.css +6 -1
  30. package/dist/collection/components/ptc-product-sidebar/ptc-product-sidebar.js +18 -2
  31. package/dist/collection/components/ptc-social-share/ptc-social-share.js +32 -4
  32. package/dist/custom-elements/index.d.ts +18 -0
  33. package/dist/custom-elements/index.js +9734 -7943
  34. package/dist/{cjs/core-fd18b67a.js → esm/core-2af05469.js} +14 -3
  35. package/dist/esm/{icon-asset_17.entry.js → icon-asset_16.entry.js} +44 -37
  36. package/dist/esm/loader.js +1 -1
  37. package/dist/esm/ptc-case-studies-slider.entry.js +1681 -0
  38. package/dist/esm/ptc-image-download-strip.entry.js +25 -0
  39. package/dist/esm/ptc-jumbotron.entry.js +1 -1
  40. package/dist/esm/ptc-news.entry.js +24 -0
  41. package/dist/esm/ptc-pricing-tabs.entry.js +1 -1
  42. package/dist/esm/ptc-progress-bar_2.entry.js +11 -1
  43. package/dist/esm/ptc-slit-card.entry.js +32 -0
  44. package/dist/esm/ptcw-design.js +1 -1
  45. package/dist/esm/sequential-bundle-example.entry.js +1 -1
  46. package/dist/esm/sequential-bundle.entry.js +1 -1
  47. package/dist/ptcw-design/media/designer.svg +33 -3
  48. package/dist/ptcw-design/{p-9e23fa0e.entry.js → p-1cea4b9e.entry.js} +1 -1
  49. package/dist/ptcw-design/p-4e551e25.entry.js +1 -0
  50. package/dist/ptcw-design/p-5507ef4b.entry.js +1 -0
  51. package/dist/ptcw-design/p-575de112.js +1 -0
  52. package/dist/ptcw-design/{p-b1a63c48.entry.js → p-7753a23d.entry.js} +1 -1
  53. package/dist/ptcw-design/p-7bc132c4.entry.js +1 -0
  54. package/dist/ptcw-design/p-aa942e3b.entry.js +1 -0
  55. package/dist/ptcw-design/p-b5d7c48e.entry.js +1 -0
  56. package/dist/ptcw-design/p-c5fadad0.entry.js +1 -0
  57. package/dist/ptcw-design/{p-9cb33f7d.entry.js → p-d9f4813a.entry.js} +1 -1
  58. package/dist/ptcw-design/{p-48c53295.entry.js → p-f1f1b19d.entry.js} +1 -1
  59. package/dist/ptcw-design/ptcw-design.css +1 -1
  60. package/dist/ptcw-design/ptcw-design.esm.js +1 -1
  61. package/dist/types/components/ptc-button/ptc-button.d.ts +4 -0
  62. package/dist/types/components/ptc-case-studies-slider/ptc-case-studies-slider.d.ts +14 -0
  63. package/dist/types/components/ptc-image-download-strip/ptc-image-download-strip.d.ts +9 -0
  64. package/dist/types/components/ptc-news/ptc-news.d.ts +35 -0
  65. package/dist/types/components/ptc-product-list/ptc-product-list.d.ts +1 -0
  66. package/dist/types/components/ptc-product-sidebar/ptc-product-sidebar.d.ts +1 -0
  67. package/dist/types/components/ptc-social-share/ptc-social-share.d.ts +5 -1
  68. package/dist/types/components.d.ts +133 -6
  69. package/package.json +1 -1
  70. package/readme.md +1 -1
  71. package/dist/ptcw-design/p-2c23c489.entry.js +0 -1
  72. package/dist/ptcw-design/p-69dddd51.js +0 -1
  73. package/dist/ptcw-design/p-c26920ef.entry.js +0 -1
@@ -0,0 +1,91 @@
1
+ import { Host, h } from '@stencil/core';
2
+ import { Swiper, Navigation, Pagination, Thumbs, Autoplay, FreeMode, EffectFade, Grid } from 'swiper';
3
+ export class PtcCaseStudiesSlider {
4
+ constructor() {
5
+ // SLider List
6
+ this.caseStudiesThumbs = null;
7
+ this.caseStudiesSlides = null;
8
+ }
9
+ componentDidLoad() {
10
+ this.initSlider();
11
+ this.slideChangeHandler();
12
+ this.renderSlides('swiper-slide-thumb', 'swiper-wrapper-thumbs');
13
+ this.renderSlides('swiper-slide-content', 'swiper-wrapper-content');
14
+ }
15
+ initSlider() {
16
+ this.caseStudiesThumbs = new Swiper(this.caeStudiesThumbRef, {
17
+ modules: [Navigation, Pagination, FreeMode, Grid],
18
+ loop: false,
19
+ slidesPerView: 'auto',
20
+ freeMode: true,
21
+ watchSlidesProgress: true,
22
+ centerInsufficientSlides: true,
23
+ breakpoints: {
24
+ 992: {
25
+ slidesPerView: 7,
26
+ },
27
+ }
28
+ });
29
+ this.caseStudiesSlides = new Swiper(this.caseStudiesSlidesRef, {
30
+ modules: [Navigation, Pagination, Thumbs, Autoplay, EffectFade],
31
+ loop: false,
32
+ grabCursor: true,
33
+ effect: 'fade',
34
+ autoplay: {
35
+ delay: 10000,
36
+ disableOnInteraction: false,
37
+ waitForTransition: true,
38
+ },
39
+ thumbs: {
40
+ swiper: this.caseStudiesThumbs,
41
+ },
42
+ pagination: {
43
+ el: this.paginationRef,
44
+ clickable: true,
45
+ },
46
+ });
47
+ }
48
+ slideChangeHandler() {
49
+ this.caseStudiesSlides.on('slideChange', () => {
50
+ const visibleSlide = this.caseStudiesSlides.slides[this.caseStudiesSlides.activeIndex];
51
+ const tagName = visibleSlide.querySelector('ptc-text-copy-with-background').shadowRoot;
52
+ const content = tagName.querySelector('.card-wrap');
53
+ const parent = tagName.querySelector('.card-wrap').parentNode;
54
+ parent.removeChild(content);
55
+ parent.appendChild(content);
56
+ });
57
+ }
58
+ renderSlides(slideName, wrapperName) {
59
+ const slidesList = Array.from(this.hostElement.querySelectorAll('.' + slideName));
60
+ if (slidesList.length > 0) {
61
+ const swiperWrapper = this.hostElement.shadowRoot.querySelector('.' + wrapperName);
62
+ slidesList.forEach((node, index) => {
63
+ const cloneNode = node.cloneNode(true);
64
+ swiperWrapper.appendChild(cloneNode);
65
+ node.remove;
66
+ const imageElement = node.querySelector('img');
67
+ if (imageElement) {
68
+ imageElement.addEventListener('click', () => {
69
+ this.caseStudiesSlides.slideTo(index); // Change the slide to the corresponding index
70
+ });
71
+ }
72
+ });
73
+ }
74
+ }
75
+ render() {
76
+ return (h(Host, null, h("div", { class: "case-studies-thumbs", ref: el => this.caeStudiesThumbRef = el }, h("span", { class: "hide" }, h("slot", { name: 'thumb-slides' })), h("div", { class: 'swiper-wrapper swiper-wrapper-thumbs' })), h("div", { class: "case-studies-slides", ref: el => this.caseStudiesSlidesRef = el }, h("span", { class: "hide" }, h("slot", { name: 'content-slides' })), h("div", { class: 'swiper-wrapper swiper-wrapper-content' }), h("div", { class: "swiper-pagination", ref: el => this.paginationRef = el }))));
77
+ }
78
+ static get is() { return "ptc-case-studies-slider"; }
79
+ static get encapsulation() { return "shadow"; }
80
+ static get originalStyleUrls() {
81
+ return {
82
+ "$": ["ptc-case-studies-slider.scss"]
83
+ };
84
+ }
85
+ static get styleUrls() {
86
+ return {
87
+ "$": ["ptc-case-studies-slider.css"]
88
+ };
89
+ }
90
+ static get elementRef() { return "hostElement"; }
91
+ }
@@ -0,0 +1,49 @@
1
+ :host {
2
+ display: block;
3
+ position: relative;
4
+ font-family: var(--ptc-font-secondary-latin);
5
+ }
6
+ :host .strip {
7
+ position: absolute;
8
+ bottom: 0;
9
+ backdrop-filter: blur(15.2px);
10
+ background: white;
11
+ background: rgba(255, 255, 255, 0.3);
12
+ width: 100%;
13
+ padding: 15px;
14
+ box-sizing: border-box;
15
+ text-align: right;
16
+ }
17
+ :host .strip .dl-btn {
18
+ width: 54px;
19
+ height: 40px;
20
+ background-image: -o-linear-gradient(162deg, #74c34d, #00783e);
21
+ background-image: linear-gradient(288deg, #74c34d, #00783e);
22
+ border: 1px solid #fff;
23
+ color: #fff;
24
+ cursor: pointer;
25
+ display: flex;
26
+ flex-direction: column;
27
+ justify-content: center;
28
+ margin-left: auto;
29
+ align-items: center;
30
+ text-decoration: none;
31
+ }
32
+ :host .strip .dl-btn .dl-text {
33
+ font-size: 10px;
34
+ text-transform: uppercase;
35
+ font-weight: 600;
36
+ line-height: 1.25;
37
+ margin-bottom: 1px;
38
+ display: none;
39
+ }
40
+ :host .strip .dl-btn:hover {
41
+ box-shadow: 0 3px 20px 0 #74c34d;
42
+ }
43
+ :host .strip .dl-btn:hover .dl-text {
44
+ display: block;
45
+ }
46
+ :host .strip .dl-btn img {
47
+ max-height: 18px;
48
+ width: 12px;
49
+ }
@@ -0,0 +1,51 @@
1
+ import { Host, h } from '@stencil/core';
2
+ export class PtcImageDownloadStrip {
3
+ constructor() {
4
+ this.downloadUrl = undefined;
5
+ }
6
+ render() {
7
+ return (h(Host, null, h("slot", null), h("div", { class: "strip" }, h("a", { class: "dl-btn", href: "javascript:void()", onClick: () => { this.openModal(); } }, h("span", { class: "dl-text" }, "Download"), h("img", { src: "https://www.ptc.com/dist/ptc/images/download-arrow.svg", alt: "Down Arrow" }))), h("ptc-modal", { id: "strip-download-modal", show: false, size: "lg", fixed: true, "is-bio-modal": true }, h("ptc-title", { type: 'h2', "text-align": 'center', "title-weight": "w-5", upperline: "no-upperline" }, "Thanks For Downloading"))));
8
+ }
9
+ openModal() {
10
+ let modal = this.el.shadowRoot.querySelector('#strip-download-modal');
11
+ modal.setAttribute('show', 'true');
12
+ setTimeout(() => {
13
+ modal.setAttribute('show', 'false');
14
+ window.open(`${this.downloadUrl}`, "_self");
15
+ }, 1000);
16
+ }
17
+ static get is() { return "ptc-image-download-strip"; }
18
+ static get encapsulation() { return "shadow"; }
19
+ static get originalStyleUrls() {
20
+ return {
21
+ "$": ["ptc-image-download-strip.scss"]
22
+ };
23
+ }
24
+ static get styleUrls() {
25
+ return {
26
+ "$": ["ptc-image-download-strip.css"]
27
+ };
28
+ }
29
+ static get properties() {
30
+ return {
31
+ "downloadUrl": {
32
+ "type": "string",
33
+ "mutable": false,
34
+ "complexType": {
35
+ "original": "string",
36
+ "resolved": "string",
37
+ "references": {}
38
+ },
39
+ "required": false,
40
+ "optional": true,
41
+ "docs": {
42
+ "tags": [],
43
+ "text": "News download url"
44
+ },
45
+ "attribute": "download-url",
46
+ "reflect": false
47
+ }
48
+ };
49
+ }
50
+ static get elementRef() { return "el"; }
51
+ }
@@ -994,23 +994,6 @@ ptc-nav-submenu.short-dropdown .dropdown-content.open {
994
994
  }
995
995
  }
996
996
 
997
- .all-product-banner {
998
- padding: 50px 0 44px 0px;
999
- }
1000
- @media only screen and (min-width: 992px) {
1001
- .all-product-banner {
1002
- padding: 50px 0 72px 0px;
1003
- display: flex;
1004
- min-height: 300px;
1005
- justify-content: center;
1006
- align-items: center;
1007
- }
1008
- }
1009
-
1010
- .all-product-gradient {
1011
- background: linear-gradient(180deg, #f3f3f3 2.6%, rgba(225, 241, 226, 0.2) 40.63%, #f3f3f3 82.29%), linear-gradient(0deg, #f3f3f3, #f3f3f3);
1012
- }
1013
-
1014
997
  :host {
1015
998
  display: block;
1016
999
  }
@@ -0,0 +1,47 @@
1
+ :host {
2
+ display: block;
3
+ }
4
+ :host .news-container {
5
+ max-width: 990px;
6
+ padding: 30px;
7
+ margin: auto;
8
+ }
9
+ :host .news-tag {
10
+ color: var(--color-gray-10);
11
+ font-size: var(--ptc-font-size-small);
12
+ line-height: var(--ptc-line-height-densest);
13
+ display: inline-block;
14
+ }
15
+ :host .news-title > div {
16
+ margin-bottom: 12px !important;
17
+ }
18
+ :host .news-title h1 {
19
+ margin: 0;
20
+ }
21
+ :host .news-secondary-title {
22
+ margin: 0 0 20px 0;
23
+ font-size: var(--ptc-font-size-large);
24
+ color: var(--color-gray-10);
25
+ }
26
+ :host .news-date {
27
+ margin-bottom: 20px;
28
+ display: inline-block;
29
+ }
30
+ :host .news-summary {
31
+ font-size: var(--ptc-font-size-medium);
32
+ color: var(--color-gray-10);
33
+ font-weight: var(--ptc-font-weight-medium);
34
+ line-height: var(--ptc-line-height-normal);
35
+ margin: 0 0 20px 0;
36
+ }
37
+ :host .news-content {
38
+ padding-top: var(--ptc-element-spacing-08);
39
+ }
40
+ :host ptc-sticky-icons {
41
+ display: none;
42
+ }
43
+ @media only screen and (min-width: 992px) {
44
+ :host ptc-sticky-icons {
45
+ display: block;
46
+ }
47
+ }
@@ -0,0 +1,169 @@
1
+ import { Host, h } from '@stencil/core';
2
+ export class PtcNews {
3
+ constructor() {
4
+ this.newsTag = undefined;
5
+ this.newsTitle = undefined;
6
+ this.newsSecondaryTitle = undefined;
7
+ this.newsDate = undefined;
8
+ this.newsSummary = undefined;
9
+ this.newsImage = undefined;
10
+ this.newsImageAlt = undefined;
11
+ this.newsDownloadUrl = undefined;
12
+ }
13
+ render() {
14
+ return (h(Host, null, h("div", { class: "news-container" }, this.newsTag && h("span", { class: "news-tag" }, this.newsTag), this.newsTitle && h("ptc-title", { type: 'h1', upperline: "no-upperline", "title-margin": "margin-5", class: "news-title" }, this.newsTitle), this.newsSecondaryTitle && h("h2", { class: "news-secondary-title" }, this.newsSecondaryTitle), this.newsDate && h("span", { class: "news-date" }, this.newsDate), this.newsSummary && h("h2", { class: "news-summary" }, this.newsSummary), this.newsImage &&
15
+ h("ptc-image-download-strip", { "download-url": this.newsDownloadUrl }, h("ptc-picture", { alt: this.newsImageAlt, src: this.newsImage, "is-full-width": "true" })), h("div", { class: "news-content" }, h("slot", { name: "share-icons" }), h("slot", null)))));
16
+ }
17
+ static get is() { return "ptc-news"; }
18
+ static get encapsulation() { return "shadow"; }
19
+ static get originalStyleUrls() {
20
+ return {
21
+ "$": ["ptc-news.scss"]
22
+ };
23
+ }
24
+ static get styleUrls() {
25
+ return {
26
+ "$": ["ptc-news.css"]
27
+ };
28
+ }
29
+ static get properties() {
30
+ return {
31
+ "newsTag": {
32
+ "type": "string",
33
+ "mutable": false,
34
+ "complexType": {
35
+ "original": "string",
36
+ "resolved": "string",
37
+ "references": {}
38
+ },
39
+ "required": false,
40
+ "optional": true,
41
+ "docs": {
42
+ "tags": [],
43
+ "text": "News tag"
44
+ },
45
+ "attribute": "news-tag",
46
+ "reflect": false
47
+ },
48
+ "newsTitle": {
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": "News Title"
61
+ },
62
+ "attribute": "news-title",
63
+ "reflect": false
64
+ },
65
+ "newsSecondaryTitle": {
66
+ "type": "string",
67
+ "mutable": false,
68
+ "complexType": {
69
+ "original": "string",
70
+ "resolved": "string",
71
+ "references": {}
72
+ },
73
+ "required": false,
74
+ "optional": true,
75
+ "docs": {
76
+ "tags": [],
77
+ "text": "News Secondary Title"
78
+ },
79
+ "attribute": "news-secondary-title",
80
+ "reflect": false
81
+ },
82
+ "newsDate": {
83
+ "type": "string",
84
+ "mutable": false,
85
+ "complexType": {
86
+ "original": "string",
87
+ "resolved": "string",
88
+ "references": {}
89
+ },
90
+ "required": false,
91
+ "optional": true,
92
+ "docs": {
93
+ "tags": [],
94
+ "text": "News Date"
95
+ },
96
+ "attribute": "news-date",
97
+ "reflect": false
98
+ },
99
+ "newsSummary": {
100
+ "type": "string",
101
+ "mutable": false,
102
+ "complexType": {
103
+ "original": "string",
104
+ "resolved": "string",
105
+ "references": {}
106
+ },
107
+ "required": false,
108
+ "optional": true,
109
+ "docs": {
110
+ "tags": [],
111
+ "text": "News summary"
112
+ },
113
+ "attribute": "news-summary",
114
+ "reflect": false
115
+ },
116
+ "newsImage": {
117
+ "type": "string",
118
+ "mutable": false,
119
+ "complexType": {
120
+ "original": "string",
121
+ "resolved": "string",
122
+ "references": {}
123
+ },
124
+ "required": false,
125
+ "optional": true,
126
+ "docs": {
127
+ "tags": [],
128
+ "text": "News Image"
129
+ },
130
+ "attribute": "news-image",
131
+ "reflect": false
132
+ },
133
+ "newsImageAlt": {
134
+ "type": "string",
135
+ "mutable": false,
136
+ "complexType": {
137
+ "original": "string",
138
+ "resolved": "string",
139
+ "references": {}
140
+ },
141
+ "required": false,
142
+ "optional": true,
143
+ "docs": {
144
+ "tags": [],
145
+ "text": "News Image"
146
+ },
147
+ "attribute": "news-image-alt",
148
+ "reflect": false
149
+ },
150
+ "newsDownloadUrl": {
151
+ "type": "string",
152
+ "mutable": false,
153
+ "complexType": {
154
+ "original": "string",
155
+ "resolved": "string",
156
+ "references": {}
157
+ },
158
+ "required": false,
159
+ "optional": true,
160
+ "docs": {
161
+ "tags": [],
162
+ "text": "News download url"
163
+ },
164
+ "attribute": "news-download-url",
165
+ "reflect": false
166
+ }
167
+ };
168
+ }
169
+ }
@@ -939,23 +939,6 @@ ptc-nav-submenu.short-dropdown .dropdown-content.open {
939
939
  }
940
940
  }
941
941
 
942
- .all-product-banner {
943
- padding: 50px 0 44px 0px;
944
- }
945
- @media only screen and (min-width: 992px) {
946
- .all-product-banner {
947
- padding: 50px 0 72px 0px;
948
- display: flex;
949
- min-height: 300px;
950
- justify-content: center;
951
- align-items: center;
952
- }
953
- }
954
-
955
- .all-product-gradient {
956
- background: linear-gradient(180deg, #f3f3f3 2.6%, rgba(225, 241, 226, 0.2) 40.63%, #f3f3f3 82.29%), linear-gradient(0deg, #f3f3f3, #f3f3f3);
957
- }
958
-
959
942
  :host {
960
943
  display: block;
961
944
  color: var(--color-gray-10);
@@ -25,7 +25,7 @@
25
25
  }
26
26
  @media only screen and (min-width: 768px) {
27
27
  :host .card-wrap .content {
28
- padding: 0 44px 24px 44px;
28
+ padding: 0 24px 24px 44px;
29
29
  }
30
30
  }
31
31
  @media only screen and (min-width: 1200px) {
@@ -37,11 +37,14 @@
37
37
  :host .card-wrap .content .cta-wrap {
38
38
  margin-left: 0;
39
39
  margin-top: 24px;
40
+ min-width: 146px;
41
+ text-align: left;
40
42
  }
41
43
  @media only screen and (min-width: 1200px) {
42
44
  :host .card-wrap .content .cta-wrap {
43
45
  margin-top: 0px;
44
46
  margin-left: 44px;
47
+ text-align: right;
45
48
  }
46
49
  }
47
50
  :host .toggle-btn {
@@ -56,6 +59,24 @@
56
59
  vertical-align: middle;
57
60
  margin-top: -2px;
58
61
  }
62
+ :host .toggle-btn .toggleText::before {
63
+ content: "";
64
+ display: inline-block;
65
+ width: 18px;
66
+ height: 18px;
67
+ background-image: url('data:image/svg+xml,<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="18" height="18" rx="4" fill="%2300890B"/><path fill-rule="evenodd" clip-rule="evenodd" d="M9.953 4.23535H8.04712V8.04712H4.23535V9.953H8.04712V13.7648H9.953V9.953H13.7648V8.04712H9.953V4.23535Z" fill="white"/></svg>');
68
+ margin-right: 12px;
69
+ vertical-align: middle;
70
+ margin-top: -2px;
71
+ }
59
72
  :host .product-highlights-container {
60
73
  padding: 0px 20px 16px 20px;
74
+ display: none;
75
+ }
76
+
77
+ :host(.has-opened) .toggleText::before {
78
+ background-image: url('data:image/svg+xml,<svg width="19" height="18" viewBox="0 0 19 18" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="0.632812" width="17.9798" height="18" rx="4" fill="%2300890B"/><g clip-path="url(%23clip0_220_1413)"><path d="M4.86328 7.98749V10.0125H14.382V7.98749H4.86328Z" fill="white"/></g><defs><clipPath id="clip0_220_1413"><rect width="9.51872" height="9.52941" fill="white" transform="translate(4.86328 4.23529)"/></clipPath></defs></svg>');
79
+ }
80
+ :host(.has-opened) .product-highlights-container {
81
+ display: block;
61
82
  }
@@ -14,8 +14,9 @@ export class PtcProductCard {
14
14
  this.isOpen = !this.isOpen;
15
15
  }
16
16
  render() {
17
- return (h(Host, null, h("div", { class: "card-wrap" }, h("ptc-picture", { alt: "image-test", src: this.cardImage, "display-image": "inline-block", width: '38' }), h("div", { class: "content" }, h("div", null, h("ptc-title", { type: 'h3', upperline: "no-upperline", "title-size": "medium", "title-weight": "w-8", "title-height": "densest", "title-margin": 'margin-flush' }, h("ptc-tooltip", { "text-display": "block", "text-lines": "3", "z-index": "z-999", description: this.cardTitle, position: "bottom", width: 'full-width' })), h("ptc-para", { "font-size": "x-small", "para-margin": "margin-flush", "para-line-h": "line-height-densest", "para-z-index": "z-auto" }, h("ptc-tooltip", { "text-display": "block", "text-lines": "16", "z-index": "z-999", description: this.cardDescription, position: "bottom", width: 'full-width' }))), h("div", { class: 'cta-wrap' }, h("slot", { name: "cta" })))), this.toggleCtaTitle &&
18
- h("ptc-para", { class: "toggle-btn", "font-size": "small", "para-margin": "margin-flush", "para-line-h": "line-height-p", "para-z-index": "z-auto", onClick: () => this.togglePanel() }, h("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("rect", { width: "18", height: "18", rx: "4", fill: "#00890B" }), this.isOpen ? (h("g", { "clip-path": "url(#clip0_187_1609)" }, h("path", { d: "M4.86328 7.98779V10.0128H14.382V7.98779H4.86328Z", fill: "white" }))) : (h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M9.953 4.23535H8.04712V8.04712H4.23535V9.953H8.04712V13.7648H9.953V9.953H13.7648V8.04712H9.953V4.23535Z", fill: "white" })), h("defs", null, h("clipPath", { id: "clip0_187_1609" }, h("rect", { width: "9.53", height: "9", fill: "white", transform: "translate(4.16328 4.23535)" })))), h("span", null, this.toggleCtaTitle)), this.isOpen && (h("div", { class: 'product-highlights-container' }, h("slot", null)))));
17
+ return (h(Host, null, h("div", { class: "card-wrap" }, this.cardImage &&
18
+ h("ptc-picture", { alt: "image-test", src: this.cardImage, "display-image": "inline-block", width: '38' }), h("div", { class: "content" }, h("div", null, h("ptc-title", { type: 'h3', upperline: "no-upperline", "title-size": "medium", "title-weight": "w-8", "title-margin": 'margin-flush', "title-display": "block" }, h("ptc-tooltip", { "text-display": "block", "text-lines": "3", "z-index": "z-999", description: this.cardTitle, position: "bottom", width: 'full-width' })), h("ptc-spacer", { size: "x-small" }), h("ptc-spacer", { size: "xx-small", breakpoint: "x-small" }), h("ptc-para", { "font-size": "x-small", "para-margin": "margin-flush", "para-line-h": "line-height-densest", "para-z-index": "z-auto" }, h("ptc-tooltip", { "text-display": "block", "text-lines": "16", "z-index": "z-999", description: this.cardDescription, position: "bottom", width: 'full-width' }))), h("div", { class: 'cta-wrap' }, h("slot", { name: "cta" })))), this.toggleCtaTitle &&
19
+ h("ptc-para", { class: "toggle-btn", "font-size": "small", "para-margin": "margin-flush", "para-line-h": "line-height-p", "para-z-index": "z-auto", onClick: () => this.togglePanel() }, h("span", { class: 'toggleText' }, this.toggleCtaTitle)), h("div", { class: 'product-highlights-container' }, h("slot", null))));
19
20
  }
20
21
  static get is() { return "ptc-product-card"; }
21
22
  static get encapsulation() { return "shadow"; }
@@ -87,6 +87,29 @@ export class PtcProductList {
87
87
  this.addIds();
88
88
  this.noresultSection = this.hostElement.shadowRoot.querySelector('.no-result-wrap');
89
89
  this.productList = this.hostElement.shadowRoot.querySelector('.product-list');
90
+ const productCards = this.hostElement.querySelectorAll('ptc-product-category ptc-product-card');
91
+ productCards.forEach(card => {
92
+ const toggleBtn = (card.shadowRoot).querySelector('.toggle-btn');
93
+ if (toggleBtn) {
94
+ toggleBtn.addEventListener('click', () => {
95
+ if (card.classList.contains('has-opened')) {
96
+ card.classList.remove('has-opened');
97
+ }
98
+ else {
99
+ card.classList.add('has-opened');
100
+ }
101
+ this.hideAllCards(card);
102
+ });
103
+ }
104
+ });
105
+ }
106
+ hideAllCards(selectedCard) {
107
+ const productCards = this.hostElement.querySelectorAll('ptc-product-category ptc-product-card');
108
+ productCards.forEach(card => {
109
+ if (selectedCard != card) {
110
+ card.classList.remove('has-opened');
111
+ }
112
+ });
90
113
  }
91
114
  handleClick(event) {
92
115
  this.clearCtaClicked.emit({
@@ -25,9 +25,14 @@
25
25
  }
26
26
  }
27
27
  :host .filter-result-wrap label {
28
- font-size: var(--ptc-font-size-x-small);
28
+ font-size: var(--ptc-font-size-xx-small);
29
29
  font-weight: 600;
30
30
  }
31
+ @media only screen and (min-width: 992px) {
32
+ :host .filter-result-wrap label {
33
+ font-size: var(--ptc-font-size-x-small);
34
+ }
35
+ }
31
36
  :host .filter-result-wrap .result-header {
32
37
  display: flex;
33
38
  justify-content: space-between;
@@ -89,7 +89,6 @@ export class PtcProductSidebar {
89
89
  const { sender, isOpen } = event.detail;
90
90
  if (sender) {
91
91
  this.productListWrap.classList.add('hide');
92
- this.clearBtn.classList.add('show');
93
92
  if (isOpen) {
94
93
  let input = this.hostElement.shadowRoot.querySelector('input');
95
94
  if (input) {
@@ -107,9 +106,20 @@ export class PtcProductSidebar {
107
106
  this.clearSearch(mouseEvent);
108
107
  }
109
108
  }
109
+ handleSelectedValues(event) {
110
+ const { sender, selectedOptions } = event.detail;
111
+ if (sender) {
112
+ if (selectedOptions.length > 0) {
113
+ this.clearBtn.classList.add('show');
114
+ }
115
+ else {
116
+ this.clearBtn.classList.remove('show');
117
+ }
118
+ }
119
+ }
110
120
  render() {
111
121
  return (h(Host, { class: 'search-box' }, h("div", { class: "filter-result-wrap white-box" }, h("div", { class: "result-header" }, h("ptc-title", { type: "h3", "title-margin": "margin-flush", upperline: "no-upperline", "title-size": "medium" }, "Filter Result"), h("span", { class: "clear-cta", onClick: (e) => this.clearSearch(e) }, "Clear")), h("div", { class: "sort-wrap" }, h("div", { class: "typeahead-input" }, h("label", { htmlFor: "searchBox" }, "Filter"), h("div", { class: "input-wrap" }, h("svg", { width: "19", height: "18", viewBox: "0 0 19 18", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M0.208984 0V1.2375L6.95898 7.65V14.2875L11.5715 17.8875V7.65L18.209 1.35V0H0.208984Z", fill: "#323B42" })), h("input", { type: "text", value: this.searchTerm, onInput: (event) => this.handleInputChange(event), onKeyUp: (e) => this.handleKeyUp(e), id: 'searchBox' })), this.suggestions.length > 0 &&
112
- h("div", { class: "suggestion-wrap" }, h("ul", { class: "suggestions" }, this.suggestions.map((suggestion) => (h("li", { onClick: (e) => this.handleSelectSuggestion(suggestion, e) }, suggestion)))))), h("div", { class: "dropdwon-filter" }, h("label", { htmlFor: "tech-dropdown" }, "Technology"), h("ptc-product-dropdown", { placeholder: "Select a technology", id: "tech-dropdown" }, this.suggestionList.map((item) => (h("span", null, item.categoryName))))))), h("ptc-spacer", { size: "large" }), h("div", { class: "product-list-wrap white-box" }, h("ptc-title", { type: "h3", "title-margin": "margin-flush", upperline: "no-upperline", "title-size": "medium" }, "Jump to Product"), this.suggestionList.map((item) => (h("div", { class: "category-list" }, h("ptc-para", { "font-size": 'x-small', "font-weight": 'w-7', "para-line-h": "line-height-densest", "para-margin": 'margin-flush' }, h("list-item", { "list-type": "list-underline", "link-href": '#' + item.categoryName }, item.categoryName)), h("div", { class: "product-list" }, h("ul", null, item.products.map((product) => (h("list-item", { "list-type": "list-underline", "link-href": '#' + product }, product)))))))))));
122
+ h("div", { class: "suggestion-wrap" }, h("ul", { class: "suggestions" }, this.suggestions.map((suggestion) => (h("li", { onClick: (e) => this.handleSelectSuggestion(suggestion, e) }, suggestion)))))), h("div", { class: "dropdwon-filter" }, h("label", { htmlFor: "tech-dropdown" }, "Technology"), h("ptc-product-dropdown", { placeholder: "Select a technology", id: "tech-dropdown" }, this.suggestionList.map((item) => (h("span", null, item.categoryName))))))), h("ptc-spacer", { size: "large" }), h("div", { class: "product-list-wrap white-box" }, h("ptc-title", { type: "h3", "title-margin": "margin-flush", upperline: "no-upperline", "title-size": "medium" }, "Jump to Product"), this.suggestionList.map((item) => (h("div", { class: "category-list" }, h("ptc-para", { "font-size": 'x-small', "font-weight": 'w-7', "para-line-h": "line-height-densest", "para-margin": 'margin-flush' }, h("list-item", { "list-type": "list-underline", "link-href": '#' + item.categoryName }, h("ptc-tooltip", { "text-display": "inline", "text-lines": "4", "z-index": "z-2", description: item.categoryName, position: "bottom" }))), h("div", { class: "product-list" }, h("ul", null, item.products.map((product) => (h("list-item", { "list-type": "list-underline", "link-href": '#' + product }, product)))))))))));
113
123
  }
114
124
  static get is() { return "ptc-product-sidebar"; }
115
125
  static get encapsulation() { return "shadow"; }
@@ -232,6 +242,12 @@ export class PtcProductSidebar {
232
242
  "target": "document",
233
243
  "capture": false,
234
244
  "passive": false
245
+ }, {
246
+ "name": "selectedValues",
247
+ "method": "handleSelectedValues",
248
+ "target": "document",
249
+ "capture": false,
250
+ "passive": false
235
251
  }];
236
252
  }
237
253
  }