@ptcwebops/ptcw-design 1.4.6 → 1.4.8

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 (39) hide show
  1. package/dist/cjs/bundle-jumbotron-example_16.cjs.entry.js +34 -19
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/ptc-card.cjs.entry.js +1 -1
  4. package/dist/cjs/ptc-link.cjs.entry.js +5 -3
  5. package/dist/cjs/ptc-pricing-tabs.cjs.entry.js +1 -1
  6. package/dist/cjs/ptcw-design.cjs.js +1 -1
  7. package/dist/collection/components/ptc-breadcrumb/ptc-breadcrumb.css +1 -0
  8. package/dist/collection/components/ptc-card/ptc-card.css +3 -0
  9. package/dist/collection/components/ptc-img/ptc-img.css +10 -0
  10. package/dist/collection/components/ptc-img/ptc-img.js +21 -3
  11. package/dist/collection/components/ptc-jumbotron/ptc-jumbotron.css +61 -7
  12. package/dist/collection/components/ptc-jumbotron/ptc-jumbotron.js +27 -13
  13. package/dist/collection/components/ptc-link/ptc-link.css +22 -0
  14. package/dist/collection/components/ptc-link/ptc-link.js +6 -4
  15. package/dist/collection/components/ptc-modal/ptc-modal.js +4 -4
  16. package/dist/collection/components/ptc-pricing-tabs/ptc-pricing-tabs.css +24 -0
  17. package/dist/collection/components/ptc-tooltip/ptc-tooltip.css +8 -0
  18. package/dist/custom-elements/index.js +42 -25
  19. package/dist/esm/bundle-jumbotron-example_16.entry.js +34 -19
  20. package/dist/esm/loader.js +1 -1
  21. package/dist/esm/ptc-card.entry.js +1 -1
  22. package/dist/esm/ptc-link.entry.js +5 -3
  23. package/dist/esm/ptc-pricing-tabs.entry.js +1 -1
  24. package/dist/esm/ptcw-design.js +1 -1
  25. package/dist/ptcw-design/p-325b2d5c.entry.js +1 -0
  26. package/dist/ptcw-design/{p-c03947f8.entry.js → p-9703a463.entry.js} +1 -1
  27. package/dist/ptcw-design/{p-62680bc6.entry.js → p-d85036e4.entry.js} +1 -1
  28. package/dist/ptcw-design/p-df1fb0aa.entry.js +1 -0
  29. package/dist/ptcw-design/ptcw-design.css +1 -1
  30. package/dist/ptcw-design/ptcw-design.esm.js +1 -1
  31. package/dist/types/components/ptc-img/ptc-img.d.ts +5 -1
  32. package/dist/types/components/ptc-jumbotron/ptc-jumbotron.d.ts +1 -0
  33. package/dist/types/components/ptc-link/ptc-link.d.ts +1 -1
  34. package/dist/types/components/ptc-modal/ptc-modal.d.ts +1 -1
  35. package/dist/types/components.d.ts +14 -6
  36. package/package.json +5 -2
  37. package/readme.md +1 -1
  38. package/dist/ptcw-design/p-730cf30c.entry.js +0 -1
  39. package/dist/ptcw-design/p-b8826a79.entry.js +0 -1
@@ -10,6 +10,7 @@ export class PtcImg {
10
10
  this.imageType = 'smart-bg';
11
11
  this.borderRadius = '';
12
12
  this.loadMode = 'lazy-bg';
13
+ this.styles = undefined;
13
14
  }
14
15
  /**
15
16
  * Image Z Index
@@ -20,7 +21,7 @@ export class PtcImg {
20
21
  }
21
22
  render() {
22
23
  const classMap = this.getCssClassMap();
23
- return (h(Host, null, 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}` }, this.imageType == 'smart-bg' ? h("slot", null) : null)));
24
+ return (h(Host, null, this.styles && h("style", null, this.styles), 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}` }, this.imageType == 'smart-bg' ? h("slot", null) : null)));
24
25
  }
25
26
  componentDidLoad() {
26
27
  this.addIntersectionObserver();
@@ -246,8 +247,8 @@ export class PtcImg {
246
247
  "type": "string",
247
248
  "mutable": false,
248
249
  "complexType": {
249
- "original": "'radius-standard' | 'radius-large' | ''",
250
- "resolved": "\"\" | \"radius-large\" | \"radius-standard\"",
250
+ "original": "'radius-standard' | 'radius-large' | 'radius-large-top' | 'radius-standard-top' | ''",
251
+ "resolved": "\"\" | \"radius-large\" | \"radius-large-top\" | \"radius-standard\" | \"radius-standard-top\"",
251
252
  "references": {}
252
253
  },
253
254
  "required": false,
@@ -277,6 +278,23 @@ export class PtcImg {
277
278
  "attribute": "load-mode",
278
279
  "reflect": false,
279
280
  "defaultValue": "'lazy-bg'"
281
+ },
282
+ "styles": {
283
+ "type": "string",
284
+ "mutable": false,
285
+ "complexType": {
286
+ "original": "string",
287
+ "resolved": "string",
288
+ "references": {}
289
+ },
290
+ "required": false,
291
+ "optional": true,
292
+ "docs": {
293
+ "tags": [],
294
+ "text": "(optional) Injected CSS styles"
295
+ },
296
+ "attribute": "styles",
297
+ "reflect": false
280
298
  }
281
299
  };
282
300
  }
@@ -734,6 +734,30 @@
734
734
  flex-wrap: wrap;
735
735
  }
736
736
 
737
+ .u-align-self-start {
738
+ align-self: start;
739
+ }
740
+
741
+ .u-align-self-center {
742
+ align-self: center;
743
+ }
744
+
745
+ .u-align-self-stretch {
746
+ align-self: stretch;
747
+ }
748
+
749
+ .u-justify-self-start {
750
+ justify-self: start;
751
+ }
752
+
753
+ .u-justify-self-center {
754
+ justify-self: center;
755
+ }
756
+
757
+ .u-justify-self-stretch {
758
+ justify-self: stretch;
759
+ }
760
+
737
761
  .embed-responsive {
738
762
  position: relative;
739
763
  display: block;
@@ -912,6 +936,7 @@ ptc-nav-submenu.short-dropdown .dropdown-content.open {
912
936
  grid-column-gap: 0px;
913
937
  grid-row-gap: 0px;
914
938
  position: unset;
939
+ z-index: 999;
915
940
  }
916
941
 
917
942
  .div1 {
@@ -936,6 +961,15 @@ ptc-nav-submenu.short-dropdown .dropdown-content.open {
936
961
  .gif-bg {
937
962
  background-color: #F3F3F3;
938
963
  }
964
+ .gif-bg img {
965
+ width: 100%;
966
+ height: auto;
967
+ }
968
+ @media only screen and (min-width: 768px) {
969
+ .gif-bg img {
970
+ width: auto;
971
+ }
972
+ }
939
973
 
940
974
  .video-ratio {
941
975
  position: relative;
@@ -943,9 +977,14 @@ ptc-nav-submenu.short-dropdown .dropdown-content.open {
943
977
  height: 0;
944
978
  padding-bottom: 100%;
945
979
  }
980
+ @media screen and (min-width: 550px) {
981
+ .video-ratio {
982
+ padding-bottom: 56.25%;
983
+ }
984
+ }
946
985
  @media only screen and (min-width: 768px) {
947
986
  .video-ratio {
948
- padding-bottom: 75%;
987
+ padding-bottom: 56.25%;
949
988
  }
950
989
  }
951
990
  @media only screen and (min-width: 992px) {
@@ -989,7 +1028,7 @@ ptc-nav-submenu.short-dropdown .dropdown-content.open {
989
1028
  }
990
1029
 
991
1030
  .gap-adjustment {
992
- gap: var(--ptc-element-spacing-05);
1031
+ gap: var(--ptc-element-spacing-07);
993
1032
  margin-bottom: var(--ptc-element-spacing-07);
994
1033
  }
995
1034
 
@@ -1040,13 +1079,28 @@ ptc-nav-submenu.short-dropdown .dropdown-content.open {
1040
1079
  ptc-svg-btn {
1041
1080
  position: absolute;
1042
1081
  left: 50%;
1043
- bottom: 150%;
1044
- transform: translate(-50%, 50%);
1082
+ top: 0%;
1083
+ transform: translate(-50%, -200%);
1084
+ }
1085
+ @media only screen and (min-width: 480px) {
1086
+ ptc-svg-btn {
1087
+ transform: translate(-50%, -260%);
1088
+ }
1089
+ }
1090
+ @media screen and (min-width: 550px) {
1091
+ ptc-svg-btn {
1092
+ transform: translate(-50%, -235%);
1093
+ }
1094
+ }
1095
+ @media only screen and (min-width: 768px) {
1096
+ ptc-svg-btn {
1097
+ transform: translate(-50%, -306%);
1098
+ }
1045
1099
  }
1046
1100
  @media only screen and (min-width: 992px) {
1047
1101
  ptc-svg-btn {
1048
- left: 70%;
1049
- bottom: 50%;
1050
- transform: translate(0%, 50%);
1102
+ top: 50%;
1103
+ left: 75%;
1104
+ transform: translate(-50%, -50%);
1051
1105
  }
1052
1106
  }
@@ -17,6 +17,7 @@ export class PtcJumbotron {
17
17
  }
18
18
  handleResize() {
19
19
  this.getContentBackground();
20
+ this.adjustJumbotronHeight();
20
21
  }
21
22
  connectedCallback() {
22
23
  this.getContentBackground();
@@ -25,17 +26,20 @@ export class PtcJumbotron {
25
26
  if (!!this.popupVideo) {
26
27
  const selectedBtn = this.el.shadowRoot.querySelector('#j-modal-btn');
27
28
  const PtcModal = this.el.shadowRoot.querySelector('#j-modal');
28
- console.log('selected btn: ' + selectedBtn + '; selected Modal: ' + PtcModal);
29
- selectedBtn.addEventListener('click', () => {
30
- PtcModal.show = true;
31
- });
32
- }
33
- const contentContainerH = this.el.shadowRoot.querySelector(".content-container").clientHeight;
34
- const videoEle = !!this.el.shadowRoot.querySelector(".video-ratio") ? this.el.shadowRoot.querySelector(".video-ratio") : null;
35
- if (contentContainerH < 500 && videoEle) {
36
- videoEle.style.paddingBottom = "500px";
29
+ if (selectedBtn && PtcModal) {
30
+ selectedBtn.addEventListener('click', function () {
31
+ PtcModal.show = true;
32
+ });
33
+ const iframe = PtcModal.shadowRoot.querySelector('iframe');
34
+ console.log('iframe');
35
+ console.log(iframe);
36
+ const iframeDoc = iframe.contentDocument;
37
+ //const shadowVideo = shadowIframe.querySelector('document')
38
+ console.log('video: ');
39
+ console.log(iframeDoc);
40
+ }
37
41
  }
38
- //console.log('content-container: ' + this.el.shadowRoot.querySelector(".content-container").clientHeight);
42
+ this.adjustJumbotronHeight();
39
43
  }
40
44
  render() {
41
45
  console.log('render');
@@ -53,11 +57,11 @@ export class PtcJumbotron {
53
57
  mediaElement = h("ptc-background-video", { class: "video-ratio", overlay: false, "video-src": this.bgVideoSrc, isIframe: this.isIframe });
54
58
  break;
55
59
  default:
56
- mediaElement = h("ptc-img", { "img-url": this.bgSrc });
60
+ mediaElement = h("ptc-img", { "img-url": this.bgSrc, styles: ".smart-bg{background-position:right !important;}" });
57
61
  }
58
- return (h(Host, { class: classMap }, h("div", { class: "parent" }, h("div", { class: `div1 image-container ${this.jumbotronType === 'text' ? 'hidden' : ''}` }, mediaElement), h("div", { class: "div2 content-container" }, h("div", { class: "bg-overlay", style: { background: this.contentBackground } }), h("div", { class: "ptc-container content-layout" }, h("max-width-container", { "max-width": "578", breakpoint: 992, "content-align": this.jumbotronType === 'text' ? 'center' : this.textAlign }, h("slot", { name: "breadcrumb" }), h("ptc-spacer", { breakpoint: "small", size: "small" }), h("ptc-spacer", { breakpoint: "x-small", size: "medium" }), h("ptc-title", { type: "h1", upperline: "no-upperline", "title-size": "xxxx-large", "title-height": "densest", "title-weight": "w-8", "title-margin": "margin-flush", "text-align": this.jumbotronType === 'text' ? 'center' : 'left' }, h("ptc-tooltip", { "text-lines": "3", description: this.mainTitle, position: "right", styles: `.ellipsis-by-line-boxing{color: ${this.contentColor};}` })), h("ptc-spacer", { breakpoint: "small", size: "small" }), h("ptc-spacer", { breakpoint: "x-small", size: "medium" }), h("ptc-para", { "font-size": this.jumbotronType === 'text' && this.isMobile ? "x-small" : "small", "font-weight": this.jumbotronType === 'text' && this.isMobile ? 'w-7' : 'w-4', "para-margin": "margin-bottom-6", "para-color": "white", "para-line-h": "line-height-p", "para-align": this.jumbotronType === 'text' ? 'center' : 'left' }, h("ptc-tooltip", { "text-lines": "8", description: this.subTitle, position: "right", styles: `.ellipsis-by-line-boxing{color: ${this.contentColor};}` })), h("div", { class: `u-flex u-flex-wrap gap-adjustment${this.jumbotronType === 'text' ? ' text-adjustment' : ''}` }, h("slot", { name: "j-cta" }))), !!this.popupVideo
62
+ return (h(Host, { class: classMap }, h("div", { class: "parent" }, h("div", { class: `div1 image-container ${this.jumbotronType === 'text' ? 'hidden' : ''}` }, mediaElement), h("div", { class: "div2 content-container" }, h("div", { class: "bg-overlay", style: { background: this.contentBackground } }), h("div", { class: "ptc-container content-layout" }, h("max-width-container", { "max-width": "578", breakpoint: 992, "content-align": this.jumbotronType === 'text' ? 'center' : this.textAlign }, h("slot", { name: "breadcrumb" }), h("ptc-spacer", { breakpoint: "small", size: "small" }), h("ptc-spacer", { breakpoint: "x-small", size: "medium" }), h("ptc-title", { type: "h1", upperline: "no-upperline", "title-size": "xxxx-large", "title-height": "densest", "title-weight": "w-8", "title-margin": "margin-flush", "text-align": this.jumbotronType === 'text' ? 'center' : 'left' }, h("ptc-tooltip", { "text-lines": "3", description: this.mainTitle, position: "right", styles: `.ellipsis-by-line-boxing{color: ${this.contentColor};}` })), h("ptc-spacer", { breakpoint: "small", size: "small" }), h("ptc-spacer", { breakpoint: "x-small", size: "medium" }), h("ptc-para", { "font-size": this.jumbotronType === 'text' && this.isMobile ? 'x-small' : 'small', "font-weight": this.jumbotronType === 'text' && this.isMobile ? 'w-7' : 'w-4', "para-margin": "margin-bottom-6", "para-color": "white", "para-line-h": "line-height-p", "para-align": this.jumbotronType === 'text' ? 'center' : 'left' }, h("ptc-tooltip", { "text-lines": "8", description: this.subTitle, position: "right", styles: `.ellipsis-by-line-boxing{color: ${this.contentColor};}` })), h("div", { class: `u-flex u-flex-wrap gap-adjustment${this.jumbotronType === 'text' ? ' text-adjustment' : ''}` }, h("slot", { name: "j-cta" }))), !!this.popupVideo
59
63
  ? [
60
- h("ptc-modal", { id: "j-modal", show: false, size: "lg", "iframe-url": this.popupVideo }),
64
+ h("ptc-modal", { id: "j-modal", show: false, size: "lg", "iframe-url": this.popupVideo, fixed: true }),
61
65
  h("ptc-svg-btn", { id: "j-modal-btn", "svg-name": "play", display: "block", "z-index": 2 }),
62
66
  ]
63
67
  : null, this.jumbotronType === 'png' ? (h("div", { class: "desktop-media-image" }, h("ptc-picture", { "is-full-width": true, src: this.pngSrc }))) : null, this.jumbotronType === 'gif' ? (h("div", { class: "desktop-media-image desk-gif-adjustment" }, h("img", { src: this.gifSrc }))) : null)))));
@@ -109,6 +113,16 @@ export class PtcJumbotron {
109
113
  this.isMobile = false;
110
114
  }
111
115
  }
116
+ adjustJumbotronHeight() {
117
+ const contentContainerH = this.el.shadowRoot.querySelector('.content-container').clientHeight;
118
+ const videoEle = !!this.el.shadowRoot.querySelector('.video-ratio') ? this.el.shadowRoot.querySelector('.video-ratio') : null;
119
+ if (contentContainerH < 500 && videoEle && !this.isMobile) {
120
+ videoEle.style.paddingBottom = '500px';
121
+ }
122
+ else {
123
+ !!videoEle ? videoEle.style.paddingBottom = '' : null;
124
+ }
125
+ }
112
126
  static get is() { return "ptc-jumbotron"; }
113
127
  static get encapsulation() { return "shadow"; }
114
128
  static get originalStyleUrls() {
@@ -32,6 +32,28 @@
32
32
  color: var(--color-green-06);
33
33
  }
34
34
 
35
+ .global {
36
+ font-style: var(--ptc-letter-spacing-normal);
37
+ font-weight: var(--ptc-font-weight-bold);
38
+ font-size: var(--ptc-font-size-x-small);
39
+ text-decoration-line: underline;
40
+ color: var(--color-blue-07);
41
+ transition: color var(--ptc-transition-medium) var(--ptc-ease-out);
42
+ }
43
+ .global:visited {
44
+ color: var(--color-blue-10);
45
+ }
46
+ .global:active, .global:visited:active {
47
+ color: var(--color-blue-09);
48
+ }
49
+ .global:hover, .global:visited:hover {
50
+ color: var(--color-blue-08);
51
+ }
52
+ .global.disabled {
53
+ color: var(--color-gray-04) !important;
54
+ cursor: not-allowed;
55
+ }
56
+
35
57
  .product-link {
36
58
  font-weight: var(--ptc-font-weight-extrabold);
37
59
  }
@@ -13,21 +13,23 @@ export class PtcLink {
13
13
  }
14
14
  render() {
15
15
  const classMap = this.getCssClassMap();
16
+ debugger;
16
17
  return (h(Host, null, h("a", { class: classMap, href: this.href, target: this.external ? '_blank' : this.target, title: this.linkTitle }, h("slot", null))));
17
18
  }
18
19
  getCssClassMap() {
19
- const classOptions = ['simple', 'underline', 'nav-title', 'primary-nav-link', 'nav-title-link', 'nav-card-link', 'secondary-nav-link', 'footer-nav-link', 'copyright-link', 'product-link', 'd-green-underline', 'd-white-underline'];
20
+ const classOptions = ['simple', 'underline', 'nav-title', 'primary-nav-link', 'nav-title-link', 'nav-card-link', 'secondary-nav-link', 'footer-nav-link', 'copyright-link', 'product-link', 'd-green-underline', 'd-white-underline', 'global'];
20
21
  let mainClass = this.theme;
21
22
  if (classOptions.indexOf(mainClass) < 0) {
22
23
  mainClass = 'simple'; // fallback to simple class if theme is unavailable
23
24
  }
25
+ debugger;
24
26
  return {
25
27
  ['ptc-link']: true,
26
28
  [mainClass]: true,
27
29
  ['disabled']: this.disabled,
28
30
  [this.fontSize]: true,
29
31
  [this.linkArea]: this.linkArea ? true : false,
30
- [this.fontWeight]: true,
32
+ [this.fontWeight]: this.fontWeight ? true : false,
31
33
  };
32
34
  }
33
35
  static get is() { return "ptc-link"; }
@@ -136,8 +138,8 @@ export class PtcLink {
136
138
  "type": "string",
137
139
  "mutable": false,
138
140
  "complexType": {
139
- "original": "'simple' | 'underline' | 'nav-title'| 'primary-nav-link' | 'nav-title-link' | 'nav-card-link' | 'secondary-nav-link' | 'footer-nav-link' | 'copyright-link' | 'product-link' | 'd-green-underline' | 'd-white-underline'",
140
- "resolved": "\"copyright-link\" | \"d-green-underline\" | \"d-white-underline\" | \"footer-nav-link\" | \"nav-card-link\" | \"nav-title\" | \"nav-title-link\" | \"primary-nav-link\" | \"product-link\" | \"secondary-nav-link\" | \"simple\" | \"underline\"",
141
+ "original": "'simple' | 'underline' | 'nav-title'| 'primary-nav-link' | 'nav-title-link' | 'nav-card-link' | 'secondary-nav-link' | 'footer-nav-link' | 'copyright-link' | 'product-link' | 'd-green-underline' | 'd-white-underline' | 'global'",
142
+ "resolved": "\"copyright-link\" | \"d-green-underline\" | \"d-white-underline\" | \"footer-nav-link\" | \"global\" | \"nav-card-link\" | \"nav-title\" | \"nav-title-link\" | \"primary-nav-link\" | \"product-link\" | \"secondary-nav-link\" | \"simple\" | \"underline\"",
141
143
  "references": {}
142
144
  },
143
145
  "required": false,
@@ -10,7 +10,7 @@ export class PtcModal {
10
10
  this.rounded = false;
11
11
  this.showHeaderFooter = false;
12
12
  this.overlayHeight = undefined;
13
- this.borderRadius = 'standard | large | pill | circle';
13
+ this.borderRadius = 'standard';
14
14
  this.isBioModal = false;
15
15
  this.bodyOverflowSetting = undefined;
16
16
  }
@@ -304,8 +304,8 @@ export class PtcModal {
304
304
  "type": "string",
305
305
  "mutable": true,
306
306
  "complexType": {
307
- "original": "string",
308
- "resolved": "string",
307
+ "original": "'standard' | 'large' | 'pill' | 'circle'",
308
+ "resolved": "\"circle\" | \"large\" | \"pill\" | \"standard\"",
309
309
  "references": {}
310
310
  },
311
311
  "required": false,
@@ -316,7 +316,7 @@ export class PtcModal {
316
316
  },
317
317
  "attribute": "border-radius",
318
318
  "reflect": false,
319
- "defaultValue": "'standard | large | pill | circle'"
319
+ "defaultValue": "'standard'"
320
320
  },
321
321
  "isBioModal": {
322
322
  "type": "boolean",
@@ -679,6 +679,30 @@
679
679
  flex-wrap: wrap;
680
680
  }
681
681
 
682
+ .u-align-self-start {
683
+ align-self: start;
684
+ }
685
+
686
+ .u-align-self-center {
687
+ align-self: center;
688
+ }
689
+
690
+ .u-align-self-stretch {
691
+ align-self: stretch;
692
+ }
693
+
694
+ .u-justify-self-start {
695
+ justify-self: start;
696
+ }
697
+
698
+ .u-justify-self-center {
699
+ justify-self: center;
700
+ }
701
+
702
+ .u-justify-self-stretch {
703
+ justify-self: stretch;
704
+ }
705
+
682
706
  .embed-responsive {
683
707
  position: relative;
684
708
  display: block;
@@ -101,6 +101,14 @@
101
101
  transform: translateY(100%);
102
102
  right: 0px;
103
103
  }
104
+ @-moz-document url-prefix() {
105
+ .tooltip.right {
106
+ right: unset !important;
107
+ top: 100px;
108
+ transform: translate(170%, 50%) !important;
109
+ height: fit-content;
110
+ }
111
+ }
104
112
  .tooltip.right::after {
105
113
  top: 1px;
106
114
  left: 8px;