@ptcwebops/ptcw-design 5.4.3 → 5.4.6

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 (105) hide show
  1. package/dist/cjs/homepage-clickable-tab.cjs.entry.js +1 -1
  2. package/dist/cjs/jumbotron-sub-menu.cjs.entry.js +1 -1
  3. package/dist/cjs/list-item.cjs.entry.js +2 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/ptc-accordion-item.cjs.entry.js +2 -1
  6. package/dist/cjs/ptc-accordion.cjs.entry.js +2 -1
  7. package/dist/cjs/ptc-background-video.cjs.entry.js +17 -3
  8. package/dist/cjs/ptc-button.cjs.entry.js +4 -2
  9. package/dist/cjs/ptc-card_2.cjs.entry.js +1 -1
  10. package/dist/cjs/ptc-homepage-video-background.cjs.entry.js +1 -1
  11. package/dist/cjs/ptc-info-tile.cjs.entry.js +3 -2
  12. package/dist/cjs/ptc-inline-cta.cjs.entry.js +1 -1
  13. package/dist/cjs/ptc-jumbotron.cjs.entry.js +3 -3
  14. package/dist/cjs/ptc-media-card.cjs.entry.js +2 -2
  15. package/dist/cjs/ptc-para.cjs.entry.js +15 -6
  16. package/dist/cjs/ptc-social-icons.cjs.entry.js +1 -1
  17. package/dist/cjs/ptc-title.cjs.entry.js +11 -2
  18. package/dist/cjs/ptc-tooltip-v3.cjs.entry.js +22 -9
  19. package/dist/cjs/ptcw-design.cjs.js +1 -1
  20. package/dist/collection/components/homepage-clickable-tab/homepage-clickable-tab.css +1 -2
  21. package/dist/collection/components/jumbotron-sub-menu/jumbotron-sub-menu.css +4 -4
  22. package/dist/collection/components/list-item/list-item.js +19 -1
  23. package/dist/collection/components/ptc-accordion/ptc-accordion-item/ptc-accordion-item.js +19 -1
  24. package/dist/collection/components/ptc-accordion/ptc-accordion.js +19 -1
  25. package/dist/collection/components/ptc-background-video/ptc-background-video.css +1 -1
  26. package/dist/collection/components/ptc-background-video/ptc-background-video.js +62 -6
  27. package/dist/collection/components/ptc-button/ptc-button.css +10 -2
  28. package/dist/collection/components/ptc-button/ptc-button.js +21 -1
  29. package/dist/collection/components/ptc-card/ptc-card.css +3 -3
  30. package/dist/collection/components/ptc-homepage-video-background/ptc-homepage-video-background.css +9 -0
  31. package/dist/collection/components/ptc-info-tile/ptc-info-tile.css +1 -2
  32. package/dist/collection/components/ptc-info-tile/ptc-info-tile.js +20 -1
  33. package/dist/collection/components/ptc-inline-cta/ptc-inline-cta.css +3 -3
  34. package/dist/collection/components/ptc-jumbotron/ptc-jumbotron.css +1 -1
  35. package/dist/collection/components/ptc-jumbotron/ptc-jumbotron.js +7 -7
  36. package/dist/collection/components/ptc-media-card/ptc-media-card.css +4 -0
  37. package/dist/collection/components/ptc-media-card/ptc-media-card.js +1 -1
  38. package/dist/collection/components/ptc-para/ptc-para.js +16 -6
  39. package/dist/collection/components/ptc-social-icons/ptc-social-icons.css +1 -1
  40. package/dist/collection/components/ptc-title/ptc-title.js +11 -2
  41. package/dist/collection/components/ptc-tooltip-v3/ptc-tooltip-v3.css +5 -0
  42. package/dist/collection/components/ptc-tooltip-v3/ptc-tooltip-v3.js +31 -11
  43. package/dist/custom-elements/index.js +97 -46
  44. package/dist/esm/homepage-clickable-tab.entry.js +1 -1
  45. package/dist/esm/jumbotron-sub-menu.entry.js +1 -1
  46. package/dist/esm/list-item.entry.js +2 -1
  47. package/dist/esm/loader.js +1 -1
  48. package/dist/esm/ptc-accordion-item.entry.js +2 -1
  49. package/dist/esm/ptc-accordion.entry.js +2 -1
  50. package/dist/esm/ptc-background-video.entry.js +17 -3
  51. package/dist/esm/ptc-button.entry.js +4 -2
  52. package/dist/esm/ptc-card_2.entry.js +1 -1
  53. package/dist/esm/ptc-homepage-video-background.entry.js +1 -1
  54. package/dist/esm/ptc-info-tile.entry.js +3 -2
  55. package/dist/esm/ptc-inline-cta.entry.js +1 -1
  56. package/dist/esm/ptc-jumbotron.entry.js +3 -3
  57. package/dist/esm/ptc-media-card.entry.js +2 -2
  58. package/dist/esm/ptc-para.entry.js +15 -6
  59. package/dist/esm/ptc-social-icons.entry.js +1 -1
  60. package/dist/esm/ptc-title.entry.js +11 -2
  61. package/dist/esm/ptc-tooltip-v3.entry.js +22 -9
  62. package/dist/esm/ptcw-design.js +1 -1
  63. package/dist/ptcw-design/p-141af044.entry.js +1 -0
  64. package/dist/ptcw-design/p-34f54d9f.entry.js +1 -0
  65. package/dist/ptcw-design/{p-594e8457.entry.js → p-5db7f70b.entry.js} +1 -1
  66. package/dist/ptcw-design/p-7a09fbe0.entry.js +1 -0
  67. package/dist/ptcw-design/p-7a40b006.entry.js +1 -0
  68. package/dist/ptcw-design/p-870b76ea.entry.js +1 -0
  69. package/dist/ptcw-design/p-96125845.entry.js +1 -0
  70. package/dist/ptcw-design/p-9cc2181e.entry.js +1 -0
  71. package/dist/ptcw-design/p-a7f30c53.entry.js +1 -0
  72. package/dist/ptcw-design/p-aa3cdd51.entry.js +1 -0
  73. package/dist/ptcw-design/p-ad774d00.entry.js +1 -0
  74. package/dist/ptcw-design/p-ae09fec7.entry.js +1 -0
  75. package/dist/ptcw-design/p-c0540d4a.entry.js +1 -0
  76. package/dist/ptcw-design/{p-520b4e6f.entry.js → p-c1c1a662.entry.js} +1 -1
  77. package/dist/ptcw-design/{p-960c182c.entry.js → p-d2a6cee0.entry.js} +1 -1
  78. package/dist/ptcw-design/p-db89b484.entry.js +1 -0
  79. package/dist/ptcw-design/{p-6da0fde1.entry.js → p-e2334026.entry.js} +1 -1
  80. package/dist/ptcw-design/ptcw-design.css +1 -1
  81. package/dist/ptcw-design/ptcw-design.esm.js +1 -1
  82. package/dist/types/components/list-item/list-item.d.ts +1 -0
  83. package/dist/types/components/ptc-accordion/ptc-accordion-item/ptc-accordion-item.d.ts +1 -0
  84. package/dist/types/components/ptc-accordion/ptc-accordion.d.ts +1 -0
  85. package/dist/types/components/ptc-background-video/ptc-background-video.d.ts +3 -1
  86. package/dist/types/components/ptc-button/ptc-button.d.ts +4 -0
  87. package/dist/types/components/ptc-info-tile/ptc-info-tile.d.ts +1 -0
  88. package/dist/types/components/ptc-jumbotron/ptc-jumbotron.d.ts +1 -1
  89. package/dist/types/components/ptc-tooltip-v3/ptc-tooltip-v3.d.ts +4 -1
  90. package/dist/types/components.d.ts +24 -6
  91. package/package.json +1 -1
  92. package/readme.md +1 -1
  93. package/dist/ptcw-design/p-0b7dee33.entry.js +0 -1
  94. package/dist/ptcw-design/p-1fa761c3.entry.js +0 -1
  95. package/dist/ptcw-design/p-2260122d.entry.js +0 -1
  96. package/dist/ptcw-design/p-33d26bc7.entry.js +0 -1
  97. package/dist/ptcw-design/p-353184f7.entry.js +0 -1
  98. package/dist/ptcw-design/p-469ac82e.entry.js +0 -1
  99. package/dist/ptcw-design/p-60abf148.entry.js +0 -1
  100. package/dist/ptcw-design/p-61643bb4.entry.js +0 -1
  101. package/dist/ptcw-design/p-6b6d712a.entry.js +0 -1
  102. package/dist/ptcw-design/p-76e4a0c8.entry.js +0 -1
  103. package/dist/ptcw-design/p-79a53af2.entry.js +0 -1
  104. package/dist/ptcw-design/p-7afbb738.entry.js +0 -1
  105. package/dist/ptcw-design/p-e436fd24.entry.js +0 -1
@@ -8,7 +8,7 @@ export class PtcBackgroundVideo {
8
8
  this.playButtonTitle = undefined;
9
9
  this.pauseButtonTitle = undefined;
10
10
  this.buttonLocation = 'bottom-right';
11
- this.buttonTabIndex = false;
11
+ this.buttonTabIndex = 0;
12
12
  this.paused = undefined;
13
13
  this.trackerId = undefined;
14
14
  this.type = 'default';
@@ -42,7 +42,7 @@ export class PtcBackgroundVideo {
42
42
  }
43
43
  render() {
44
44
  const videoContent = this.isIframe ? (h("div", { class: "iframe-wrapper" }, h("iframe", { id: "jumbotron-iframe", src: this.videoSrc, frameborder: 0, allow: "autoplay", allowFullScreen: true, class: "background-video-embed" }))) : (h("video", { src: this.videoSrc, poster: this.posterSrc, autoplay: true, loop: true, muted: true, playsinline: true }));
45
- return (h(Host, { class: this.type }, videoContent, !!this.videoSrc && this.playButtonTitle && (h("div", { class: `play-button ${this.buttonLocation}` }, this.paused && (h("ptc-tooltip", { class: "play-btn", mode: "wrapper", description: this.playButtonTitle, position: this.buttonLocation === "allbp-bottom-right" ? "side-left" : 'bottom-right', styles: ".wrapper-content.sc-ptc-tooltip .tooltip.sc-ptc-tooltip{min-width:unset!important; white-space: nowrap}" }, h("div", { id: this.trackerId, class: "tracker-div" }, h("button", { class: 'bg-svg-play', type: "button", tabindex: "0", onClick: e => this.toggleVideoPlay(e), "aria-label": "Video Play button" })))), !this.paused && !!this.pauseButtonTitle && (h("ptc-tooltip", { class: "pause-btn", mode: "wrapper", description: this.pauseButtonTitle, position: this.buttonLocation === "allbp-bottom-right" ? "side-left" : 'bottom-right', styles: ".wrapper-content.sc-ptc-tooltip .tooltip.sc-ptc-tooltip{min-width:unset!important; white-space: nowrap}" }, h("div", { id: this.trackerId, class: "tracker-div" }, h("button", { class: "bg-svg-pause", tabindex: "0", type: "button", onClick: e => this.toggleVideoPlay(e), "aria-label": "Video Pause button" })))))), this.overlay ? h("div", { class: `video-overlay ${this.overlayType}` }) : '', this.type == 'default' ? h("slot", null) : ''));
45
+ return (h(Host, { class: this.type }, videoContent, !!this.videoSrc && this.playButtonTitle && (h("div", { class: `play-button ${this.buttonLocation}` }, this.paused && (h("ptc-tooltip", { class: "play-btn", mode: "wrapper", description: this.playButtonTitle, position: this.buttonLocation === "allbp-bottom-right" ? "side-left" : 'bottom-right', styles: ".wrapper-content.sc-ptc-tooltip .tooltip.sc-ptc-tooltip{min-width:unset!important; white-space: nowrap}" }, h("div", { id: this.trackerId, class: "tracker-div" }, h("button", { class: 'bg-svg-play', type: "button", tabindex: this.buttonTabIndex, onClick: e => this.toggleVideoPlay(e), "aria-label": "Video Play button" })))), !this.paused && !!this.pauseButtonTitle && (h("ptc-tooltip", { class: "pause-btn", mode: "wrapper", description: this.pauseButtonTitle, position: this.buttonLocation === "allbp-bottom-right" ? "side-left" : 'bottom-right', styles: ".wrapper-content.sc-ptc-tooltip .tooltip.sc-ptc-tooltip{min-width:unset!important; white-space: nowrap}" }, h("div", { id: this.trackerId, class: "tracker-div" }, h("button", { class: "bg-svg-pause", tabindex: this.buttonTabIndex, type: "button", onClick: e => this.toggleVideoPlay(e), "aria-label": "Video Pause button" })))))), this.overlay ? h("div", { class: `video-overlay ${this.overlayType}` }) : '', this.type == 'default' ? h("slot", null) : ''));
46
46
  }
47
47
  toggleVideoPlay(e) {
48
48
  e.preventDefault();
@@ -57,6 +57,20 @@ export class PtcBackgroundVideo {
57
57
  }
58
58
  }
59
59
  }
60
+ async pauseVideo() {
61
+ this.paused = true;
62
+ let video = this.el.shadowRoot.querySelector('video');
63
+ if (video) {
64
+ video.pause();
65
+ }
66
+ }
67
+ async playVideo() {
68
+ this.paused = false;
69
+ let video = this.el.shadowRoot.querySelector('video');
70
+ if (video) {
71
+ video.play().catch(z => console.error(z));
72
+ }
73
+ }
60
74
  static get is() { return "ptc-background-video"; }
61
75
  static get encapsulation() { return "shadow"; }
62
76
  static get originalStyleUrls() {
@@ -194,11 +208,11 @@ export class PtcBackgroundVideo {
194
208
  "defaultValue": "'bottom-right'"
195
209
  },
196
210
  "buttonTabIndex": {
197
- "type": "boolean",
211
+ "type": "number",
198
212
  "mutable": false,
199
213
  "complexType": {
200
- "original": "boolean",
201
- "resolved": "boolean",
214
+ "original": "number",
215
+ "resolved": "number",
202
216
  "references": {}
203
217
  },
204
218
  "required": false,
@@ -209,7 +223,7 @@ export class PtcBackgroundVideo {
209
223
  },
210
224
  "attribute": "button-tab-index",
211
225
  "reflect": false,
212
- "defaultValue": "false"
226
+ "defaultValue": "0"
213
227
  },
214
228
  "trackerId": {
215
229
  "type": "string",
@@ -271,5 +285,47 @@ export class PtcBackgroundVideo {
271
285
  "paused": {}
272
286
  };
273
287
  }
288
+ static get methods() {
289
+ return {
290
+ "pauseVideo": {
291
+ "complexType": {
292
+ "signature": "() => Promise<void>",
293
+ "parameters": [],
294
+ "references": {
295
+ "Promise": {
296
+ "location": "global"
297
+ },
298
+ "HTMLVideoElement": {
299
+ "location": "global"
300
+ }
301
+ },
302
+ "return": "Promise<void>"
303
+ },
304
+ "docs": {
305
+ "text": "",
306
+ "tags": []
307
+ }
308
+ },
309
+ "playVideo": {
310
+ "complexType": {
311
+ "signature": "() => Promise<void>",
312
+ "parameters": [],
313
+ "references": {
314
+ "Promise": {
315
+ "location": "global"
316
+ },
317
+ "HTMLVideoElement": {
318
+ "location": "global"
319
+ }
320
+ },
321
+ "return": "Promise<void>"
322
+ },
323
+ "docs": {
324
+ "text": "",
325
+ "tags": []
326
+ }
327
+ }
328
+ };
329
+ }
274
330
  static get elementRef() { return "el"; }
275
331
  }
@@ -346,8 +346,7 @@ a.center {
346
346
  .ptc-tertiary:focus-visible,
347
347
  .icon-toggle:focus-visible {
348
348
  border-radius: var(--ptc-border-radius-standard);
349
- border: 2px solid white;
350
- outline: 5px solid #003dd6;
349
+ outline: 5px solid var(--keyboard-nav-outline);
351
350
  }
352
351
  .ptc-primary span,
353
352
  .ptc-quaternary span,
@@ -402,6 +401,15 @@ a.center {
402
401
  .icon-toggle.large span {
403
402
  font-size: var(--ptc-font-size-large);
404
403
  }
404
+ .ptc-primary.acc-alt-style:focus-visible,
405
+ .ptc-quaternary.acc-alt-style:focus-visible,
406
+ .ptc-secondary.acc-alt-style:focus-visible,
407
+ .ptc-tertiary.acc-alt-style:focus-visible,
408
+ .icon-toggle.acc-alt-style:focus-visible {
409
+ border-radius: var(--ptc-border-radius-standard);
410
+ border: 2px solid white;
411
+ outline: 5px solid var(--keyboard-nav-outline);
412
+ }
405
413
 
406
414
  .ptc-primary {
407
415
  background: var(--color-gray-12);
@@ -15,6 +15,7 @@ export class PtcButton {
15
15
  this.tabNav = 0;
16
16
  this.styles = undefined;
17
17
  this.textAlign = undefined;
18
+ this.enableAccessibilityAltStyle = false;
18
19
  this.size = undefined;
19
20
  this.buttonTitle = undefined;
20
21
  this.ariaLabel = '';
@@ -61,7 +62,8 @@ export class PtcButton {
61
62
  ['disabled']: this.disabled ? true : false,
62
63
  ['active']: this.active ? true : false,
63
64
  [this.textAlign]: true,
64
- [this.size]: true
65
+ [this.size]: true,
66
+ ['acc-alt-style']: this.enableAccessibilityAltStyle
65
67
  };
66
68
  }
67
69
  static get is() { return "ptc-button"; }
@@ -310,6 +312,24 @@ export class PtcButton {
310
312
  "attribute": "text-align",
311
313
  "reflect": false
312
314
  },
315
+ "enableAccessibilityAltStyle": {
316
+ "type": "boolean",
317
+ "mutable": false,
318
+ "complexType": {
319
+ "original": "boolean",
320
+ "resolved": "boolean",
321
+ "references": {}
322
+ },
323
+ "required": false,
324
+ "optional": false,
325
+ "docs": {
326
+ "tags": [],
327
+ "text": "Enable Accessibility Alternate Styling"
328
+ },
329
+ "attribute": "enable-accessibility-alt-style",
330
+ "reflect": false,
331
+ "defaultValue": "false"
332
+ },
313
333
  "size": {
314
334
  "type": "string",
315
335
  "mutable": false,
@@ -392,7 +392,7 @@ ptc-link, ptc-square-card,
392
392
  :host(.horizontal-card) .link-wrapper:focus-visible {
393
393
  border-radius: var(--ptc-border-radius-standard);
394
394
  border: 2px solid white;
395
- outline: 5px solid #003dd6;
395
+ outline: 5px solid var(--keyboard-nav-outline);
396
396
  }
397
397
  :host(.horizontal-card) .card-media {
398
398
  display: flex;
@@ -1022,7 +1022,7 @@ ptc-link, ptc-square-card,
1022
1022
  :host(.case-studies-card) .link-wrapper:focus-visible {
1023
1023
  border-radius: var(--ptc-border-radius-standard);
1024
1024
  border: 2px solid white;
1025
- outline: 5px solid #003dd6;
1025
+ outline: 5px solid var(--keyboard-nav-outline);
1026
1026
  }
1027
1027
  :host(.case-studies-card) .card-media {
1028
1028
  width: 100%;
@@ -1349,7 +1349,7 @@ ptc-link, ptc-square-card,
1349
1349
  :host(.featured-horizontal-card) .link-wrapper:focus-visible {
1350
1350
  border-radius: var(--ptc-border-radius-standard);
1351
1351
  border: 2px solid white;
1352
- outline: 5px solid #003dd6;
1352
+ outline: 5px solid var(--keyboard-nav-outline);
1353
1353
  }
1354
1354
  :host(.featured-horizontal-card) .card-media {
1355
1355
  width: 100%;
@@ -330,6 +330,10 @@ ptc-link, ptc-square-card,
330
330
  .card-links .card-section .card-link:active .bgp, .card-links .card-section .card-link.active .bgp {
331
331
  opacity: 1;
332
332
  }
333
+ .card-links .card-section .card-link:focus-visible, .card-links .card-section .card-link:focus, .card-links .card-section .card-link:focus-within {
334
+ border-radius: var(--ptc-border-radius-standard);
335
+ outline: 5px solid var(--keyboard-nav-outline);
336
+ }
333
337
  .card-links .card-section:before {
334
338
  position: absolute;
335
339
  width: 32px;
@@ -408,6 +412,11 @@ ptc-link, ptc-square-card,
408
412
  .card-section.in-view {
409
413
  animation-name: fadeUpInContainer;
410
414
  }
415
+ @media only screen and (min-width: 1200px) {
416
+ .card-section.in-view {
417
+ overflow: visible !important;
418
+ }
419
+ }
411
420
  .card-section.in-view .card-link {
412
421
  animation-name: fadeUpIn;
413
422
  }
@@ -180,8 +180,7 @@ ptc-link, ptc-square-card,
180
180
  }
181
181
  .tile:focus-visible {
182
182
  border-radius: var(--ptc-border-radius-standard);
183
- border: 2px solid white;
184
- outline: 5px solid #003dd6;
183
+ outline: 5px solid var(--keyboard-nav-outline);
185
184
  }
186
185
 
187
186
  ::slotted(img[slot=tile-image]) {
@@ -5,6 +5,7 @@ export class PtcInfoTile {
5
5
  this.variant = undefined;
6
6
  this.styles = undefined;
7
7
  this.trackerId = undefined;
8
+ this.accessibilityIndex = 0;
8
9
  }
9
10
  handleClick() {
10
11
  this.tileClick.emit();
@@ -30,7 +31,7 @@ export class PtcInfoTile {
30
31
  }
31
32
  render() {
32
33
  const content = (h("div", { class: "tile-content" }, h("span", { class: "tile-title-span" }, h("slot", { name: "tile-title" })), h("div", { class: "tile-title-desc" }, h("slot", { name: "tile-description" }))));
33
- return (h(Host, null, this.styles && h("style", null, this.styles), h("div", { id: this.trackerId, class: `tile ${this.variant}`, onClick: () => this.handleClick(), tabindex: "0" }, this.variant === 'image' && (h("div", { class: "tile-image" }, h("slot", { name: "tile-image" }))), content, this.link && h("a", { href: this.link, class: "link-overlay link-press", tabindex: "-1" }))));
34
+ return (h(Host, null, this.styles && h("style", null, this.styles), h("div", { id: this.trackerId, class: `tile ${this.variant}`, onClick: () => this.handleClick(), tabindex: this.accessibilityIndex }, this.variant === 'image' && (h("div", { class: "tile-image" }, h("slot", { name: "tile-image" }))), content, this.link && h("a", { href: this.link, class: "link-overlay link-press", tabindex: "-1" }))));
34
35
  }
35
36
  static get is() { return "ptc-info-tile"; }
36
37
  static get encapsulation() { return "shadow"; }
@@ -113,6 +114,24 @@ export class PtcInfoTile {
113
114
  },
114
115
  "attribute": "tracker-id",
115
116
  "reflect": false
117
+ },
118
+ "accessibilityIndex": {
119
+ "type": "number",
120
+ "mutable": false,
121
+ "complexType": {
122
+ "original": "number",
123
+ "resolved": "number",
124
+ "references": {}
125
+ },
126
+ "required": false,
127
+ "optional": false,
128
+ "docs": {
129
+ "tags": [],
130
+ "text": ""
131
+ },
132
+ "attribute": "accessibility-index",
133
+ "reflect": false,
134
+ "defaultValue": "0"
116
135
  }
117
136
  };
118
137
  }
@@ -99,7 +99,7 @@ ptc-link, ptc-square-card,
99
99
  padding: 2px;
100
100
  border-radius: var(--ptc-border-radius-standard);
101
101
  border: 2px solid white;
102
- outline: 5px solid #003dd6;
102
+ outline: 5px solid var(--keyboard-nav-outline);
103
103
  }
104
104
  @media only screen and (min-width: 768px) {
105
105
  :host .small-inline-cta-container {
@@ -179,7 +179,7 @@ ptc-link, ptc-square-card,
179
179
  padding: 2px;
180
180
  border-radius: var(--ptc-border-radius-standard);
181
181
  border: 2px solid white;
182
- outline: 5px solid #003dd6;
182
+ outline: 5px solid var(--keyboard-nav-outline);
183
183
  }
184
184
  @media only screen and (min-width: 480px) {
185
185
  :host .big-inline-cta-container .cta-content .cta-body {
@@ -284,7 +284,7 @@ ptc-link, ptc-square-card,
284
284
  padding: 2px;
285
285
  border-radius: var(--ptc-border-radius-standard);
286
286
  border: 2px solid white;
287
- outline: 5px solid #003dd6;
287
+ outline: 5px solid var(--keyboard-nav-outline);
288
288
  }
289
289
  @media only screen and (min-width: 768px) {
290
290
  :host .bottom-inline-cta-container {
@@ -1543,7 +1543,7 @@ a.disabled {
1543
1543
  :host(.blog-jumbotron) .blog-author-name:focus-visible {
1544
1544
  border-radius: var(--ptc-border-radius-standard);
1545
1545
  border: 2px solid white;
1546
- outline: 5px solid #003dd6;
1546
+ outline: 5px solid var(--keyboard-nav-outline);
1547
1547
  }
1548
1548
  :host(.blog-jumbotron) .image-container {
1549
1549
  background: white;
@@ -15,7 +15,7 @@ export class PtcJumbotron {
15
15
  this.playButtonTitle = undefined;
16
16
  this.pauseButtonTitle = undefined;
17
17
  this.buttonLocation = undefined;
18
- this.buttonTabIndex = false;
18
+ this.buttonTabIndex = 0;
19
19
  this.contentBackground = undefined;
20
20
  this.contentColor = undefined;
21
21
  this.textAlign = 'left';
@@ -57,7 +57,7 @@ export class PtcJumbotron {
57
57
  break;
58
58
  case 'dark-video':
59
59
  case 'light-video':
60
- mediaElement = (h("ptc-background-video", { class: "video-ratio", overlay: false, "video-src": this.bgVideoSrc, isIframe: this.isIframe, "play-button-title": this.playButtonTitle, "pause-button-title": this.pauseButtonTitle, "button-location": this.buttonLocation, "button-tab-index": "true" }, ' ', this.hasPopupVideo && this.isMobile ? (h("div", { class: "mobile-modal-play-btn" }, ' ', h("slot", { name: "video" }))) : null));
60
+ mediaElement = (h("ptc-background-video", { class: "video-ratio", overlay: false, "video-src": this.bgVideoSrc, isIframe: this.isIframe, "play-button-title": this.playButtonTitle, "pause-button-title": this.pauseButtonTitle, "button-location": this.buttonLocation, "button-tab-index": this.buttonTabIndex }, ' ', this.hasPopupVideo && this.isMobile ? (h("div", { class: "mobile-modal-play-btn" }, ' ', h("slot", { name: "video" }))) : null));
61
61
  break;
62
62
  case 'dark':
63
63
  case 'light':
@@ -393,22 +393,22 @@ export class PtcJumbotron {
393
393
  "reflect": false
394
394
  },
395
395
  "buttonTabIndex": {
396
- "type": "boolean",
396
+ "type": "number",
397
397
  "mutable": false,
398
398
  "complexType": {
399
- "original": "boolean",
400
- "resolved": "boolean",
399
+ "original": "number",
400
+ "resolved": "number",
401
401
  "references": {}
402
402
  },
403
403
  "required": false,
404
- "optional": true,
404
+ "optional": false,
405
405
  "docs": {
406
406
  "tags": [],
407
407
  "text": ""
408
408
  },
409
409
  "attribute": "button-tab-index",
410
410
  "reflect": false,
411
- "defaultValue": "false"
411
+ "defaultValue": "0"
412
412
  },
413
413
  "isTransitioning": {
414
414
  "type": "boolean",
@@ -220,6 +220,10 @@ ptc-link, ptc-square-card,
220
220
  -webkit-transition: none !important;
221
221
  -o-transition: none !important;
222
222
  }
223
+ :host(.case-study-icon) .case-study-img-anchor:focus-visible {
224
+ border-radius: var(--ptc-border-radius-standard);
225
+ outline: 5px solid var(--keyboard-nav-outline);
226
+ }
223
227
 
224
228
  @media (min-width: 768px) {
225
229
  :host(.case-study-icon) {
@@ -52,7 +52,7 @@ export class PtcMediaCard {
52
52
  // : null)}
53
53
  style: this.cardType != "case-study-icon" ?
54
54
  ((this.isHovered && this.hoverBackgroundImage) ? { backgroundImage: `url(${this.hoverBackgroundImage})` } : { backgroundImage: `url(${this.activeBackgroundImage})` }) : {} }, h("slot", { name: "seo-content" }), this.cardType != "case-study-icon" ?
55
- (h(Tag, { class: 'anchor-wrap', target: this.target, href: this.cardHref, rel: this.rel, "aria-label": this.cardHref ? 'Read more about ' + this.ariaLabel : undefined }, 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())) : null, this.cardType === "case-study-icon" ? (h("div", { id: this.trackerId, class: "tracker-div" }, h("a", { class: "case-study-img-anchor", target: this.target, href: this.cardHref, rel: this.rel, "aria-label": this.cardHref ? 'Read more about ' + this.ariaLabel : undefined }, h("img", { class: "case-study-bg-img", src: this.activeBackgroundImage, alt: this.activeBackgroundImageAlt }), h("div", { class: "after" }), h("img", { class: "case-study-icon-img", src: this.iconImage, alt: this.iconImageAlt }))))
55
+ (h(Tag, { class: 'anchor-wrap', target: this.target, href: this.cardHref, rel: this.rel, "aria-label": this.cardHref ? 'Read more about ' + this.ariaLabel : undefined }, 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())) : null, this.cardType === "case-study-icon" ? (h("div", { id: this.trackerId, class: "tracker-div" }, h("a", { class: "case-study-img-anchor mf-listen", target: this.target, href: this.cardHref, rel: this.rel, "aria-label": this.cardHref ? 'Read more about ' + this.ariaLabel : undefined }, h("img", { class: "case-study-bg-img", src: this.activeBackgroundImage, alt: this.activeBackgroundImageAlt }), h("div", { class: "after" }), h("img", { class: "case-study-icon-img", src: this.iconImage, alt: this.iconImageAlt }))))
56
56
  : null));
57
57
  }
58
58
  getCssClassMap() {
@@ -40,10 +40,11 @@ export class PtcPara {
40
40
  if (this.hideTooltipOnMobile) {
41
41
  this.el.classList.add('hide-tooltip-on-mobile');
42
42
  }
43
- this.el.addEventListener('mouseenter', () => this.toggleTitleTooltip(true));
44
- this.el.addEventListener('mouseleave', () => this.toggleTitleTooltip(false));
43
+ this.el.addEventListener('mouseenter', () => { this.toggleTitleTooltip(true); });
44
+ this.el.addEventListener('mouseleave', () => { this.toggleTitleTooltip(false); });
45
45
  if (this.enableTooltip) {
46
- let paraContent = this.el.innerText;
46
+ let paraContent = this.el.innerText || this.el.textContent;
47
+ ;
47
48
  this.tooltipText = paraContent;
48
49
  this.el.innerText = this.getSortedText(paraContent);
49
50
  }
@@ -51,8 +52,17 @@ export class PtcPara {
51
52
  toggleTitleTooltip(show) {
52
53
  const tooltipClass = 'tooltip-box';
53
54
  const existingTooltip = this.el.querySelector(`.${tooltipClass}`);
55
+ const text = this.el.shadowRoot.querySelectorAll('.line-clamp-title');
56
+ let maxLinesShowCheck = false;
57
+ if (text) {
58
+ text.forEach(t => {
59
+ maxLinesShowCheck = t.scrollHeight > t.clientHeight;
60
+ });
61
+ }
62
+ const ifCharExceeds = this.maxChars ? (this.tooltipText.length > this.maxChars) && !this.maxLines : false;
63
+ const ifLinesExceeds = this.maxLines && maxLinesShowCheck;
54
64
  if (show && this.enableTooltip) {
55
- if (!existingTooltip) {
65
+ if ((!existingTooltip && ifCharExceeds) || (!existingTooltip && ifLinesExceeds)) {
56
66
  const tooltipMarkup = document.createElement('div');
57
67
  tooltipMarkup.className = tooltipClass;
58
68
  tooltipMarkup.innerText = this.tooltipText;
@@ -73,7 +83,7 @@ export class PtcPara {
73
83
  const classMap = this.getCssClassMap();
74
84
  const colorClass = this.addWhiteClass();
75
85
  const cutOff = this.getLineCuttoff();
76
- return (h(Host, { class: `${colorClass} ${this.paraZIndex}` }, this.styles && h("style", null, this.styles), h("p", { class: classMap, part: "part-para", style: cutOff }, h("slot", null))));
86
+ return (h(Host, { class: `${colorClass} ${this.paraZIndex} trunc-text` }, this.styles && h("style", null, this.styles), h("p", { class: classMap, part: "part-para", style: cutOff }, h("slot", null))));
77
87
  }
78
88
  getCssClassMap() {
79
89
  return {
@@ -85,7 +95,7 @@ export class PtcPara {
85
95
  [this.paraLineH]: true,
86
96
  [this.paraAlign]: !!this.paraAlign ? true : false,
87
97
  ['ellipsis-boxing']: this.ellipsisLineCutoff && this.ellipsisLineCutoff > 0,
88
- ['line-clamp-title']: this.maxLines && this.maxLines > 0 //tooltip code
98
+ ['line-clamp-title']: this.maxLines && this.maxLines > 0 //tooltip code,
89
99
  };
90
100
  }
91
101
  //WEB-2392
@@ -74,5 +74,5 @@ ptc-link, ptc-square-card,
74
74
  :host div a:focus-visible {
75
75
  border-radius: var(--ptc-border-radius-standard);
76
76
  border: 2px solid white;
77
- outline: 5px solid #003dd6;
77
+ outline: 5px solid var(--keyboard-nav-outline);
78
78
  }
@@ -51,8 +51,17 @@ export class PtcTitle {
51
51
  var _a;
52
52
  const tooltipClass = 'tooltip-box';
53
53
  const existingTooltip = this.el.querySelector(`.${tooltipClass}`);
54
+ const text = this.el.querySelectorAll('.line-clamp-title');
55
+ let maxLinesShowCheck = false;
56
+ if (text) {
57
+ text.forEach(t => {
58
+ maxLinesShowCheck = t.scrollHeight > t.clientHeight;
59
+ });
60
+ }
61
+ const ifCharExceeds = (this.tooltipText.length > this.maxChars) && !this.maxLines;
62
+ const ifLinesExceeds = this.maxLines && maxLinesShowCheck;
54
63
  if (show && this.enableTooltip) {
55
- if (!existingTooltip) {
64
+ if ((!existingTooltip && ifCharExceeds) || (!existingTooltip && ifLinesExceeds)) {
56
65
  const tooltipMarkup = document.createElement('div');
57
66
  tooltipMarkup.className = tooltipClass;
58
67
  tooltipMarkup.innerText = this.tooltipText;
@@ -76,7 +85,7 @@ export class PtcTitle {
76
85
  // added for tooltip
77
86
  this.tooltipText = html;
78
87
  let eleText = firstChild && firstChild.innerText;
79
- html = this.enableTooltip ? this.getSortedText(eleText) : html;
88
+ html = (this.enableTooltip) ? this.getSortedText(eleText) : html;
80
89
  if (this.el == firstChild) {
81
90
  this.el.innerHTML = '';
82
91
  }
@@ -64,6 +64,11 @@ ptc-link, ptc-square-card,
64
64
  -webkit-box-orient: vertical;
65
65
  overflow: hidden;
66
66
  }
67
+ @media (max-width: 768px) {
68
+ .line-clamp.hide-on-mobile {
69
+ -webkit-line-clamp: initial !important;
70
+ }
71
+ }
67
72
 
68
73
  .slot-wrap {
69
74
  display: none;
@@ -6,7 +6,7 @@ export class PtcTooltipV3 {
6
6
  this.maxLines = undefined;
7
7
  this.showTooltip = false;
8
8
  this.truncatedContent = '';
9
- this.tagType = undefined;
9
+ this.htmlTagType = undefined;
10
10
  this.maxCharEnable = false;
11
11
  this.maxLinesEnable = false;
12
12
  this.zIndex = 'auto';
@@ -17,6 +17,7 @@ export class PtcTooltipV3 {
17
17
  this.hideOnMobile = false;
18
18
  this.isSmallScreen = undefined;
19
19
  this.hideIfMobile = undefined;
20
+ this.maxLinesShowCheck = false;
20
21
  }
21
22
  windowResize() {
22
23
  this.isSmallScreen = window.innerWidth < 768;
@@ -41,6 +42,13 @@ export class PtcTooltipV3 {
41
42
  getSortedText(content) {
42
43
  this.truncatedContent = (this.maxCharEnable && !this.maxLinesEnable && !this.hideIfMobile) ? content.slice(0, this.maxChars) + '...' : content;
43
44
  }
45
+ checkMaxLines() {
46
+ const appRoot = this.el;
47
+ const text = appRoot.querySelectorAll('.trunc-text');
48
+ text.forEach(t => {
49
+ this.maxLinesShowCheck = t.scrollHeight > t.clientHeight;
50
+ });
51
+ }
44
52
  componentDidLoad() {
45
53
  this.updateContentMarkup();
46
54
  // Hide the slot and element from the DOM
@@ -48,21 +56,25 @@ export class PtcTooltipV3 {
48
56
  if (slotElement) {
49
57
  slotElement.remove();
50
58
  }
59
+ this.checkMaxLines();
51
60
  }
52
61
  updateContentMarkup() {
53
62
  const truncDiv = this.el.querySelector('.trunc-text');
54
- if (this.tagType) {
55
- truncDiv.innerHTML = `<${this.tagType}>${this.truncatedContent}</${this.tagType}>`;
56
- }
57
- else {
58
- truncDiv.innerHTML = this.truncatedContent;
63
+ if (truncDiv) {
64
+ if (this.htmlTagType) {
65
+ let tagHtml = `<${this.htmlTagType}>${this.truncatedContent}</${this.htmlTagType}>`;
66
+ truncDiv.innerHTML = tagHtml;
67
+ }
68
+ else {
69
+ truncDiv.innerHTML = this.truncatedContent;
70
+ }
59
71
  }
60
72
  }
61
73
  toggleTooltip(show) {
62
74
  this.showTooltip = show;
63
75
  }
64
76
  renderTooltip() {
65
- return (((this.maxCharEnable && this.showTooltip) || (this.maxLinesEnable && this.showTooltip)) ? (h("div", { class: `tooltip-box ${this.position}`, style: { 'z-index': this.zIndex } }, this.fullContentstring)) : '');
77
+ return (((this.maxCharEnable && this.showTooltip) || (this.maxLinesEnable && this.showTooltip && this.maxLinesShowCheck)) ? (h("div", { class: `tooltip-box ${this.position}`, style: { 'z-index': this.zIndex }, ref: el => (this.tooltipBox = el) }, this.fullContentstring)) : '');
66
78
  }
67
79
  render() {
68
80
  const classMap = this.getCssClassMap();
@@ -73,7 +85,8 @@ export class PtcTooltipV3 {
73
85
  getCssClassMap() {
74
86
  return {
75
87
  'trunc-text': true,
76
- 'line-clamp': this.maxLinesEnable
88
+ 'line-clamp': this.maxLinesEnable,
89
+ 'hide-on-mobile': this.hideOnMobile
77
90
  };
78
91
  }
79
92
  getLineCuttoff() {
@@ -132,7 +145,7 @@ export class PtcTooltipV3 {
132
145
  "attribute": "max-lines",
133
146
  "reflect": false
134
147
  },
135
- "tagType": {
148
+ "htmlTagType": {
136
149
  "type": "string",
137
150
  "mutable": false,
138
151
  "complexType": {
@@ -146,7 +159,7 @@ export class PtcTooltipV3 {
146
159
  "tags": [],
147
160
  "text": ""
148
161
  },
149
- "attribute": "tag-type",
162
+ "attribute": "html-tag-type",
150
163
  "reflect": false
151
164
  },
152
165
  "zIndex": {
@@ -265,7 +278,8 @@ export class PtcTooltipV3 {
265
278
  "maxCharEnable": {},
266
279
  "maxLinesEnable": {},
267
280
  "isSmallScreen": {},
268
- "hideIfMobile": {}
281
+ "hideIfMobile": {},
282
+ "maxLinesShowCheck": {}
269
283
  };
270
284
  }
271
285
  static get elementRef() { return "el"; }
@@ -276,6 +290,12 @@ export class PtcTooltipV3 {
276
290
  "target": "window",
277
291
  "capture": false,
278
292
  "passive": true
293
+ }, {
294
+ "name": "resize",
295
+ "method": "checkMaxLines",
296
+ "target": "window",
297
+ "capture": false,
298
+ "passive": true
279
299
  }];
280
300
  }
281
301
  }