@ptcwebops/ptcw-design 6.1.13 → 6.1.15

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 (52) hide show
  1. package/dist/cjs/homepage-toggled-content.cjs.entry.js +0 -1
  2. package/dist/cjs/icon-asset_13.cjs.entry.js +10 -1
  3. package/dist/cjs/ptc-announcement.cjs.entry.js +1 -1
  4. package/dist/cjs/ptc-filter-dropdown_3.cjs.entry.js +2 -2
  5. package/dist/cjs/ptc-footer.cjs.entry.js +1 -1
  6. package/dist/cjs/ptc-form-checkbox_2.cjs.entry.js +34 -8
  7. package/dist/cjs/ptc-media-card.cjs.entry.js +2 -2
  8. package/dist/cjs/ptc-multi-select_2.cjs.entry.js +35 -18
  9. package/dist/collection/components/icon-asset/icon-asset.js +27 -1
  10. package/dist/collection/components/icon-asset/media/{designer-v6.0.4.svg → designer-v6.0.5.svg} +69 -4
  11. package/dist/collection/components/organism-bundles/homepage-toggled-content/homepage-toggled-content.js +0 -1
  12. package/dist/collection/components/ptc-announcement/ptc-announcement.js +1 -1
  13. package/dist/collection/components/ptc-footer/ptc-footer-v2.css +9 -5
  14. package/dist/collection/components/ptc-media-card/ptc-media-card.js +2 -2
  15. package/dist/collection/components/ptc-multi-select/ptc-multi-select.css +9 -1
  16. package/dist/collection/components/ptc-multi-select/ptc-multi-select.js +1 -1
  17. package/dist/collection/components/ptc-select/ptc-select.css +14 -0
  18. package/dist/collection/components/ptc-select/ptc-select.js +32 -15
  19. package/dist/collection/components/ptc-textfield/ptc-textfield.css +22 -3
  20. package/dist/collection/components/ptc-textfield/ptc-textfield.js +33 -7
  21. package/dist/collection/components/ptc-theater-video-playlist/ptc-theater-video-playlist.js +2 -2
  22. package/dist/custom-elements/index.js +85 -34
  23. package/dist/esm/homepage-toggled-content.entry.js +0 -1
  24. package/dist/esm/icon-asset_13.entry.js +11 -2
  25. package/dist/esm/ptc-announcement.entry.js +1 -1
  26. package/dist/esm/ptc-filter-dropdown_3.entry.js +2 -2
  27. package/dist/esm/ptc-footer.entry.js +1 -1
  28. package/dist/esm/ptc-form-checkbox_2.entry.js +34 -8
  29. package/dist/esm/ptc-media-card.entry.js +2 -2
  30. package/dist/esm/ptc-multi-select_2.entry.js +35 -18
  31. package/dist/ptcw-design/media/{designer-v6.0.4.svg → designer-v6.0.5.svg} +69 -4
  32. package/dist/ptcw-design/{p-21092dd2.entry.js → p-44579c05.entry.js} +4 -4
  33. package/dist/ptcw-design/p-492cf433.entry.js +1 -0
  34. package/dist/ptcw-design/{p-6b64f167.entry.js → p-4be22be8.entry.js} +1 -1
  35. package/dist/ptcw-design/p-522b27d7.entry.js +1 -0
  36. package/dist/ptcw-design/p-6b4c37a1.entry.js +1 -0
  37. package/dist/ptcw-design/p-99d21cb4.entry.js +1 -0
  38. package/dist/ptcw-design/p-ade21638.entry.js +1 -0
  39. package/dist/ptcw-design/p-f6c3ae79.entry.js +1 -0
  40. package/dist/ptcw-design/ptcw-design.esm.js +1 -1
  41. package/dist/types/components/icon-asset/icon-asset.d.ts +3 -0
  42. package/dist/types/components/ptc-select/ptc-select.d.ts +2 -0
  43. package/dist/types/components/ptc-textfield/ptc-textfield.d.ts +2 -0
  44. package/dist/types/components.d.ts +5 -0
  45. package/package.json +1 -1
  46. package/readme.md +1 -1
  47. package/dist/ptcw-design/p-545bc604.entry.js +0 -1
  48. package/dist/ptcw-design/p-55268619.entry.js +0 -1
  49. package/dist/ptcw-design/p-699f234b.entry.js +0 -1
  50. package/dist/ptcw-design/p-776259f5.entry.js +0 -1
  51. package/dist/ptcw-design/p-887c44ae.entry.js +0 -1
  52. package/dist/ptcw-design/p-e70af06d.entry.js +0 -1
@@ -4,7 +4,7 @@ export class IconAsset {
4
4
  this.regularSprite = getAssetPath('./media/regular.svg');
5
5
  this.solidSprite = getAssetPath('./media/solid.svg');
6
6
  this.brandSprite = getAssetPath('./media/brands.svg');
7
- this.ptcSprite = getAssetPath('./media/designer-v6.0.4.svg');
7
+ this.ptcSprite = getAssetPath('./media/designer-v6.0.5.svg');
8
8
  this.name = undefined;
9
9
  this.size = 'xx-small';
10
10
  this.type = 'regular';
@@ -14,6 +14,14 @@ export class IconAsset {
14
14
  this.isMobileSelect = undefined;
15
15
  this.injectedStyle = undefined;
16
16
  }
17
+ componentDidLoad() {
18
+ this.ready.emit({
19
+ 'regular-icons': this.regularSprite,
20
+ 'sold-icons': this.solidSprite,
21
+ 'brand-icons': this.brandSprite,
22
+ 'ptc-icons': this.ptcSprite
23
+ });
24
+ }
17
25
  render() {
18
26
  const classMap = this.getCssClassMap();
19
27
  if (this.type == 'brands') {
@@ -196,4 +204,22 @@ export class IconAsset {
196
204
  }
197
205
  };
198
206
  }
207
+ static get events() {
208
+ return [{
209
+ "method": "ready",
210
+ "name": "ready",
211
+ "bubbles": true,
212
+ "cancelable": true,
213
+ "composed": true,
214
+ "docs": {
215
+ "tags": [],
216
+ "text": ""
217
+ },
218
+ "complexType": {
219
+ "original": "any",
220
+ "resolved": "any",
221
+ "references": {}
222
+ }
223
+ }];
224
+ }
199
225
  }
@@ -593,8 +593,73 @@
593
593
  </clipPath>
594
594
  </defs>
595
595
  </symbol>
596
-
597
- <symbol id="lang-drop-arrow" viewBox="0 0 13 10" fill="none" xmlns="http://www.w3.org/2000/svg">
598
- <path d="M11.6213 1.88062L6.49986 7.12103L1.37839 1.88061" stroke="white" stroke-width="3" stroke-linecap="round" />
599
- </symbol>
596
+ <symbol id="lang-drop-arrow" viewBox="0 0 13 10" fill="none" xmlns="http://www.w3.org/2000/svg">
597
+ <path d="M11.6213 1.88062L6.49986 7.12103L1.37839 1.88061" stroke="white" stroke-width="3" stroke-linecap="round" />
598
+ </symbol>
599
+ <symbol id="cloud" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
600
+ <g clip-path="url(#clip0_2229_2058)">
601
+ <path
602
+ d="M27.4 15.5C32 15.5 36.2 18 38.3 22L39.6 24.3L42.1 23.3C43 22.9 44 22.8 44.9 22.8C49.1 22.8 52.6 26.2 52.6 30.5C52.6 30.9 52.6 31.3 52.5 31.7L52 34.7L55.1 35.1C58.5 35.5 61 38.3 61 41.7C61 45.4 58 48.4 54.3 48.4C54.3 48.4 13.8 48.5 13.7 48.5C7.8 48.5 3 43.7 3 37.7C3 32.2 7.3 27.5 12.8 27L14.9 26.8L15.4 24.8C16.8 19.3 21.7 15.5 27.4 15.5ZM27.4 12.5C20.2 12.5 14.2 17.4 12.5 24C5.5 24.6 0 30.5 0 37.7C0 45.3 6.2 51.5 13.7 51.5C13.8 51.5 54.3 51.4 54.3 51.4C59.7 51.4 64 47.1 64 41.7C64 36.7 60.3 32.6 55.4 32.1C55.5 31.6 55.5 31 55.5 30.5C55.5 24.6 50.7 19.8 44.8 19.8C43.4 19.8 42.1 20.1 40.9 20.6C38.4 15.8 33.3 12.5 27.4 12.5Z"
603
+ ></path>
604
+ <path
605
+ d="M19.3 27.1L17.3 27C17.5 24 18.9 21.4 21.1 19.6C23.4001 17.8 26.4 17.2 29.4 17.7L29 19.7C26.5 19.2 24.1 19.8 22.3 21.2C20.6 22.5 19.5 24.6 19.3 27.1Z"
606
+ ></path>
607
+ </g>
608
+ <defs>
609
+ <clipPath id="clip0_2229_2058">
610
+ <rect width="64" height="64" ></rect>
611
+ </clipPath>
612
+ </defs>
613
+ </symbol>
614
+ <symbol id="new-window" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
615
+ <path d="M58 58H6V6H27.9V0H0V2.2V6V64H0.2H58H64V36.8H58V58Z"></path>
616
+ <path d="M40.2999 0L47.5999 7.4L24.8999 30.7L33.3999 39.2L55.9999 15.8L63.9999 24V0H40.2999Z"></path>
617
+ </symbol>
618
+ <symbol id="chip" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
619
+ <g>
620
+ <path class="st0" d="M23.4,42.6h17.1c0.9,0,1.7-0.8,1.7-1.7V23.8c0-0.9-0.8-1.7-1.7-1.7H23.4c-0.9,0-1.7,0.8-1.7,1.7v17.1
621
+ C21.7,41.8,22.5,42.6,23.4,42.6z"></path>
622
+ <path class="st0" d="M64.1,27.8v-3H52.7v-2.6h6v-3h-6v-2c0-3.2-2.6-5.8-5.8-5.8h-1.7V5.4h-3v5.9h-2.9V0h-3v11.3h-2.7V5.4h-3v5.9
623
+ h-2.8V0h-3v11.3h-2.6V5.4h-3v5.9h-2c-3.2,0-5.8,2.6-5.8,5.8v2H5.4v3h5.9v2.9H0v3h11.3v2.7H5.4v3h5.9v2.8H0v3h11.3v2.6H5.4v3h5.9
624
+ v1.6c0,3.2,2.6,5.8,5.8,5.8H19v5.9h3v-5.9h2.9V64h3V52.7h2.7v5.9h3v-5.9h2.8V64h3V52.7H42v5.9h3v-5.9h1.8c3.2,0,5.8-2.6,5.8-5.8
625
+ v-1.6h6v-3h-6v-2.9h11.4v-3H52.7v-2.7h6v-3h-6v-2.8H64.1z M46.7,46.7H17.3V17.3h29.3V46.7z"></path>
626
+ </g>
627
+ </symbol>
628
+ <symbol id="digital-thread" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
629
+ <g>
630
+ <polygon class="st0" points="16.9,51.1 9.2,55.4 9.2,63.9 55.8,63.9 55.8,55.4 48.1,51.1 "></polygon>
631
+ <polygon class="st0" points="48.1,12.7 55.9,8.5 55.9,0.2 9.1,0.2 9.1,8.5 16.9,12.7 "></polygon>
632
+ <path class="st0" d="M13.5,18.8h32.6v2.9H23.3v3h22.9v2.9H23.3v3h22.9v2.9H23.3v3h22.9v3H23.3v3h25.9V15.8H13.6
633
+ c-0.6-1.9-2.4-3.4-4.5-3.4c-2.6,0-4.7,2.1-4.7,4.7c0,2.6,2.1,4.7,4.7,4.7C11.2,21.8,12.9,20.6,13.5,18.8z M9.1,18.8
634
+ c-0.9,0-1.7-0.8-1.7-1.7c0-0.9,0.8-1.7,1.7-1.7s1.7,0.8,1.7,1.7C10.8,18.1,10.1,18.8,9.1,18.8z"></path>
635
+ <path class="st0" d="M55.8,42c-2.2,0-4,1.5-4.5,3.5H20.1V21.7h-3v26.8h34.3c0.7,1.7,2.4,2.9,4.4,2.9c2.6,0,4.7-2.1,4.7-4.7
636
+ S58.4,42,55.8,42z M55.8,48.4c-0.9,0-1.7-0.8-1.7-1.7s0.8-1.7,1.7-1.7s1.7,0.8,1.7,1.7S56.7,48.4,55.8,48.4z"></path>
637
+ </g>
638
+ </symbol>
639
+ <symbol id="digital-twin" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
640
+ <g>
641
+ <path class="st0" d="M43.6,8.4L23.2,20.2v23.6l20.4,11.8L64,43.8V20.2L43.6,8.4z M58,40.3l-14.4,8.3l-14.4-8.3V23.7l14.4-8.3
642
+ L58,23.7V40.3z"></path>
643
+ <polygon class="st0" points="20.2,45.7 20.2,43.9 20.2,20.3 20.2,18.6 21.7,17.7 29.1,13.4 20.4,8.4 0,20.2 0,43.8 20.4,55.6
644
+ 28.9,50.7 21.7,46.5 "></polygon>
645
+ </g>
646
+ </symbol>
647
+ <symbol id="error-hexagon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
648
+ <g>
649
+ <path class="st0" d="M45.2,0H18.8L0,18.8v26.5L18.8,64h26.5L64,45.2V18.8L45.2,0z M35.7,51.7C34.8,52.5,33.6,53,32,53
650
+ c-1.6,0-2.8-0.4-3.7-1.3c-0.9-0.8-1.3-2-1.3-3.6c0-1.6,0.4-2.8,1.3-3.6c0.9-0.8,2.1-1.2,3.7-1.2c1.6,0,2.8,0.4,3.7,1.3
651
+ c0.9,0.8,1.3,2,1.3,3.6C37,49.6,36.6,50.8,35.7,51.7z M35.5,38.4h-7l-1.5-27.9H37L35.5,38.4z"></path>
652
+ </g>
653
+ </symbol>
654
+ <symbol id="fire" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
655
+ <g>
656
+ <polygon class="st0" points="38.2,56.4 32.5,56.4 31.1,61.5 38.2,63.2 41,59 "></polygon>
657
+ <polygon class="st0" points="36.6,51.3 36.7,47.1 33.9,46.1 30.3,48.1 31.5,52.4 "></polygon>
658
+ <path class="st0" d="M22.8,52.6l-5.2,3.6l1.4,4.3l5.7,2.8l2.6-3.2c0.1,0.2,0.1,0.3,0.2,0.5c0,0,0,0,0,0c-0.1-0.2-0.1-0.3-0.2-0.5
659
+ l1.6-2L22.8,52.6z"></path>
660
+ <path class="st0" d="M56.2,23.1c1.6,7.9-3.9,12-8.3,9.7C36,26.7,60.4,17.8,24.8,0C36.5,14.8,0,26,0,41.6C0,52,9.6,59.7,18.2,63
661
+ c-7.2-6.1-6.9-14.4-1.6-19.2c0.8,3.5,5.3,7.3,9.7,4.5c7.3-4.7-10.3-9,7-18.9c-3,12.4,13.3,12.5,13.3,22.3c0,4.3-1.9,9.3-6.5,12.4
662
+ C61.6,58.4,72.4,37.3,56.2,23.1z"></path>
663
+ </g>
664
+ </symbol>
600
665
  </svg>
@@ -107,7 +107,6 @@ export class HomepageToggledContent {
107
107
  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" })));
108
108
  const tabs = this.getTabs();
109
109
  return (h("div", { class: "wrapper" }, 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, activeColor: this.colors[tab.index], onClick: () => this.handleTabSelected(tab.index) })))), h("div", { class: "tabs-mobile" }, h("button", { class: `dropdown-button ${this.colors[this.activeTab]} ${this.dropdownOpen ? 'opened' : ''}`, onClick: () => this.toggleDropdown() }, tabs[this.activeTab].label, h("span", { class: "arrow" }, this.dropdownOpen ? upArrow : downArrow)), this.dropdownOpen && (h("div", { class: "dropdown-menu" }, tabs.map(tab => (h("div", { class: `dropdown-item ${tab.index === this.activeTab ? 'active-tab' : ''}`, onClick: () => this.handleTabSelected(tab.index) }, h("slot", { name: `tab-label-${tab.index}` })))))))), h("div", { class: "content" }, tabs.map((tab, index) => (h("div", { class: `tab-content ${this.activeTab === index ? 'active-tab' : ''}` }, h("slot", { name: `tab-image-${index}` }), 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("slot", { name: `tab-button-${index}` }), this.activeTab === index && this.tileElements.length > 0 ? (h("div", Object.assign({ class: "info-card-wrapper card-section" }, this.getSliderBindings()), this.tileElements.map((tile, index) => (h("div", { class: `swiper-slide card-link card-link-${index + 1}`, "tab-index": index + 1, key: index, innerHTML: tile.outerHTML, onMouseDown: e => this.onCardMouseDown(e), onMouseUp: e => this.onCardMouseUp(e), onMouseLeave: e => this.onCardMouseUp(e), onTouchEnd: e => {
110
- console.log('yes');
111
110
  this.onCardMouseUp(e);
112
111
  } }))))) : null)))))));
113
112
  }
@@ -40,7 +40,7 @@ export class PtcAnnouncement {
40
40
  return (h(Host, null, h("div", { class: classMap, part: "part-announcement" }, h("div", { class: "content-wrapper ptc-container" }, h("div", { class: "left-content", part: "part-left-content" }, h("slot", { name: "seo-content" }), !!this.barTitle ? (h("div", { class: `title${this.isMaxWidthTitle()}` }, this.windowSize === 'mobile' ? (this.barTitle) : (
41
41
  // <ptc-tooltip text-display="inline" max-length="60" z-index="z-2" description={this.barTitle} position="bottom"></ptc-tooltip>
42
42
  h("ptc-tooltip-v2", { "max-length": "60", "z-index": "2" }, this.barTitle)))) : null, this.windowSize === 'mobile' ? ( //mobile view
43
- Object.assign({}, (!!this.description || !!this.linkUrl ? (h("ptc-readmore", { "visible-lines-custom": this.customMaxLines, "z-index": "z-3", "more-text": this.moreText }, h("div", { style: { display: 'inline' } }, !!this.description ? `${this.description + ' '}` : null, !!this.linkText ? (h("a", { class: "cta-link", href: this.linkUrl, title: (_a = this.linkTitle) !== null && _a !== void 0 ? _a : this.linkText, target: this.target }, this.linkText, console.log('rending link'))) : null))) : null))) : (
43
+ Object.assign({}, (!!this.description || !!this.linkUrl ? (h("ptc-readmore", { "visible-lines-custom": this.customMaxLines, "z-index": "z-3", "more-text": this.moreText }, h("div", { style: { display: 'inline' } }, !!this.description ? `${this.description + ' '}` : null, !!this.linkText ? (h("a", { class: "cta-link", href: this.linkUrl, title: (_a = this.linkTitle) !== null && _a !== void 0 ? _a : this.linkText, target: this.target }, this.linkText)) : null))) : null))) : (
44
44
  //desktop view
45
45
  h("div", { class: "description" }, !!this.description ? (
46
46
  // <ptc-tooltip text-display="inline" max-length="165" z-index="z-2" description={this.description + ' '} position="bottom"></ptc-tooltip>
@@ -155,21 +155,22 @@ ptc-footer .footer-top .f-menu {
155
155
  }
156
156
  }
157
157
  @media only screen and (min-width: 992px) {
158
- ptc-footer .footer-top .f-menu ul {
158
+ ptc-footer .footer-top .f-menu ul, ptc-footer .footer-top .f-menu ol {
159
159
  width: 50%;
160
160
  max-width: initial;
161
161
  }
162
162
  }
163
- ptc-footer .footer-top .f-menu ul li {
163
+ ptc-footer .footer-top .f-menu ul li, ptc-footer .footer-top .f-menu ol li {
164
164
  padding: 6px 0;
165
+ font-size: var(--ptc-font-size-x-small);
165
166
  }
166
- ptc-footer .footer-top .f-menu ul li:first-child {
167
+ ptc-footer .footer-top .f-menu ul li:first-child, ptc-footer .footer-top .f-menu ol li:first-child {
167
168
  padding-top: 0;
168
169
  }
169
- ptc-footer .footer-top .f-menu ul li:last-child {
170
+ ptc-footer .footer-top .f-menu ul li:last-child, ptc-footer .footer-top .f-menu ol li:last-child {
170
171
  padding-bottom: 0;
171
172
  }
172
- ptc-footer .footer-top .f-menu ul li a {
173
+ ptc-footer .footer-top .f-menu ul li a, ptc-footer .footer-top .f-menu ol li a {
173
174
  display: inline-block;
174
175
  font-weight: var(--ptc-font-weight-medium);
175
176
  line-height: var(--ptc-line-height-p);
@@ -228,6 +229,9 @@ ptc-footer .footer-bottom {
228
229
  max-width: 1200px;
229
230
  }
230
231
  }
232
+ ptc-footer .footer-bottom ul li, ptc-footer .footer-bottom ol li {
233
+ font-size: var(--ptc-font-size-xx-small);
234
+ }
231
235
  ptc-footer .footer-bottom .logo {
232
236
  margin-bottom: var(--ptc-element-spacing-06);
233
237
  }
@@ -37,8 +37,8 @@ export class PtcMediaCard {
37
37
  }
38
38
  setTabNavigatedState() {
39
39
  this.el.parentElement.tagName === 'DYNAMIC-PRODUCT-DRIVERS' ? this.isTabNavigated = false : this.isTabNavigated = true;
40
- console.log('parent ele tag name: ' + this.el.parentElement.tagName);
41
- console.log('isTabNavigated value: ' + this.isTabNavigated);
40
+ //console.log('parent ele tag name: ' + this.el.parentElement.tagName)
41
+ //console.log('isTabNavigated value: ' + this.isTabNavigated)
42
42
  }
43
43
  componentWillLoad() {
44
44
  this.setTabNavigatedState();
@@ -121,7 +121,15 @@ ptc-link, ptc-square-card,
121
121
  align-items: center;
122
122
  }
123
123
  .ptc-multi-select .selected-items:focus-visible {
124
- outline: 2px solid #007bff;
124
+ border-radius: var(--ptc-border-radius-standard);
125
+ outline: 5px solid var(--keyboard-nav-outline);
126
+ outline-offset: -4px;
127
+ }
128
+ .ptc-multi-select .selected-items:focus {
129
+ border: 2px solid var(--color-blue-07);
130
+ }
131
+ .ptc-multi-select .selected-items[aria-expanded] {
132
+ border: 2px solid var(--color-blue-07);
125
133
  }
126
134
  .ptc-multi-select .selected-items .input-text {
127
135
  width: calc(100% - 18px);
@@ -238,7 +238,7 @@ export class PtcMultiSelect {
238
238
  if (selectedItemsCount === 1) {
239
239
  displayText = selectedItems[0].text;
240
240
  }
241
- return (h(Host, { class: { 'ptc-multi-select': true, 'invalid': !this.isValid, 'mf-listen': true } }, h("label", { class: "multi-select-label", id: `multi-select-label-${this.label}` }, this.label), h("div", { class: "selected-items", role: "button", "aria-haspopup": "listbox", "aria-expanded": this.showDropdown, "aria-labelledby": `multi-select-label-${this.label}`, tabIndex: 0, onClick: () => this.toggleDropdown(), onKeyDown: (event) => this.handleKeyDownToggle(event) }, h("div", { class: "input-text" }, displayText), h("span", { class: "multi-select-icon" }, h("svg", { class: "multi-arrow-svg", width: "10", height: "10", viewBox: "0 0 10 10", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M1.375 1.875L5 5.5L8.625 1.875L9.9375 3.1875L5 8.125L0.0625 3.1875L1.375 1.875Z" })))), h("ul", { class: 'dropdown' + (this.showDropdown ? ' show' : ''), role: "listbox", "aria-labelledby": `multi-select-label-${this.label}`, tabIndex: -1 }, h("li", { id: `multi-select-item-0`, role: "option", "aria-selected": isAllSelected, class: { selected: isAllSelected }, tabIndex: -1, onKeyDown: (event) => this.handleKeyDownItem(event, 0) }, h("button", { onClick: (event) => {
241
+ return (h(Host, { class: { 'ptc-multi-select': true, 'invalid': !this.isValid, 'mf-listen': true } }, h("label", { class: "multi-select-label", id: `multi-select-label-${this.label}` }, this.label), h("div", { class: "selected-items multi-selected-items", role: "button", "aria-haspopup": "listbox", "aria-expanded": this.showDropdown, "aria-labelledby": `multi-select-label-${this.label}`, tabIndex: 0, onClick: () => this.toggleDropdown(), onKeyDown: (event) => this.handleKeyDownToggle(event) }, h("div", { class: "input-text" }, displayText), h("span", { class: "multi-select-icon" }, h("svg", { class: "multi-arrow-svg", width: "10", height: "10", viewBox: "0 0 10 10", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M1.375 1.875L5 5.5L8.625 1.875L9.9375 3.1875L5 8.125L0.0625 3.1875L1.375 1.875Z" })))), h("ul", { class: 'dropdown' + (this.showDropdown ? ' show' : ''), role: "listbox", "aria-labelledby": `multi-select-label-${this.label}`, tabIndex: -1 }, h("li", { id: `multi-select-item-0`, role: "option", "aria-selected": isAllSelected, class: { selected: isAllSelected }, tabIndex: -1, onKeyDown: (event) => this.handleKeyDownItem(event, 0) }, h("button", { onClick: (event) => {
242
242
  event.preventDefault();
243
243
  event.stopPropagation();
244
244
  buttonAction(event);
@@ -6177,6 +6177,20 @@ ptc-link, ptc-square-card,
6177
6177
  .ptc-select .mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing {
6178
6178
  border-color: var(--color-hyperlink);
6179
6179
  }
6180
+ .ptc-select .mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused.keyboard-focus .mdc-notched-outline .mdc-notched-outline__leading,
6181
+ .ptc-select .mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused.keyboard-focus .mdc-notched-outline .mdc-notched-outline__notch,
6182
+ .ptc-select .mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused.keyboard-focus .mdc-notched-outline .mdc-notched-outline__trailing {
6183
+ border-color: var(--keyboard-nav-outline);
6184
+ border-width: 5px;
6185
+ }
6186
+ .ptc-select .mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused.keyboard-focus .mdc-notched-outline .mdc-notched-outline__leading {
6187
+ border-top-left-radius: var(--ptc-border-radius-standard) !important;
6188
+ border-bottom-left-radius: var(--ptc-border-radius-standard) !important;
6189
+ }
6190
+ .ptc-select .mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused.keyboard-focus .mdc-notched-outline .mdc-notched-outline__trailing {
6191
+ border-top-right-radius: var(--ptc-border-radius-standard) !important;
6192
+ border-bottom-right-radius: var(--ptc-border-radius-standard) !important;
6193
+ }
6180
6194
  .ptc-select .mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-select__dropdown-icon {
6181
6195
  fill: var(--color-hyperlink);
6182
6196
  }
@@ -5,6 +5,7 @@ import { ValidationMessages } from '../../utils/validation-messages';
5
5
  import { getLanguageFromURL } from '../../utils/utils';
6
6
  export class PtcSelect {
7
7
  constructor() {
8
+ this.lastInteraction = 'mouse';
8
9
  this.map = {
9
10
  'Afghanistan': 'AF',
10
11
  'Albania': 'AL',
@@ -265,11 +266,6 @@ export class PtcSelect {
265
266
  this.language = 'en';
266
267
  }
267
268
  async setValue() {
268
- //const userCountry = await this.getUserCountry(); // Function to get user's country
269
- // if (userCountry) {
270
- // console.log("country by IP: " + userCountry)
271
- // this.defaultSelect.value = userCountry;
272
- // }
273
269
  this.defaultSelect.value = this.defaultValue;
274
270
  }
275
271
  componentWillLoad() {
@@ -296,17 +292,8 @@ export class PtcSelect {
296
292
  }
297
293
  });
298
294
  this.addKeyboardAccessibility();
295
+ this.setupFocusHandlers();
299
296
  }
300
- // async getUserCountry() {
301
- // try {
302
- // const response = await fetch('https://ipapi.co/json/'); // Example API
303
- // const data = await response.json();
304
- // return data.country_name; // or data.country_code, depending on your dropdown values
305
- // } catch (error) {
306
- // console.error('Error fetching user country:', error);
307
- // return null;
308
- // }
309
- // }
310
297
  addKeyboardAccessibility() {
311
298
  const selectAnchor = this.el.querySelector('.mdc-select__anchor');
312
299
  const menu = this.el.querySelector('.mdc-select__menu');
@@ -374,6 +361,36 @@ export class PtcSelect {
374
361
  }
375
362
  return className;
376
363
  }
364
+ setupFocusHandlers() {
365
+ // Track the last interaction type
366
+ document.addEventListener('mousedown', () => {
367
+ this.lastInteraction = 'mouse';
368
+ });
369
+ document.addEventListener('keydown', (e) => {
370
+ if (e.key === 'Tab') {
371
+ this.lastInteraction = 'keyboard';
372
+ }
373
+ });
374
+ const selectFields = document.querySelectorAll('.mdc-select');
375
+ selectFields.forEach((selectField) => {
376
+ const select = selectField.querySelector('.mdc-select__anchor');
377
+ if (select) {
378
+ select.addEventListener('focus', () => {
379
+ if (this.lastInteraction === 'keyboard') {
380
+ selectField.classList.add('keyboard-focus');
381
+ selectField.classList.remove('mouse-focus');
382
+ }
383
+ else {
384
+ selectField.classList.add('mouse-focus');
385
+ selectField.classList.remove('keyboard-focus');
386
+ }
387
+ });
388
+ select.addEventListener('blur', () => {
389
+ selectField.classList.remove('keyboard-focus', 'mouse-focus');
390
+ });
391
+ }
392
+ });
393
+ }
377
394
  render() {
378
395
  return (h(Host, { class: "ptc-select mf-listen" }, h("div", { class: this.getSelectClassName() }, h("label", { class: "ptc-label-select", htmlFor: this.fieldId }, this.label), h("div", Object.assign({ class: "mdc-select__anchor", "aria-labelledby": "outlined-select-label" }, (this.isRequired ? { 'ariaRequired': true } : null)), h("span", { class: "mdc-notched-outline" }, h("span", { class: "mdc-notched-outline__leading" }), h("span", { class: "mdc-notched-outline__trailing" })), h("span", { class: "mdc-select__selected-text-container" }, h("span", { id: this.fieldId, class: "mdc-select__selected-text", "aria-controls": this.fieldName, "aria-describedby": this.fieldName, "data-eloqua-name": this.ptcDataEloquaName, "data-target-eloqua-name": this.ptcDataTargetEloquaName })), h("span", { class: "mdc-select__dropdown-icon" }, h("svg", { class: "", width: "10", height: "10", viewBox: "0 0 10 10", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M1.375 1.875L5 5.5L8.625 1.875L9.9375 3.1875L5 8.125L0.0625 3.1875L1.375 1.875Z" })))), h("div", { class: "mdc-select__menu mdc-menu mdc-menu-surface mdc-menu-surface--fullwidth", role: "listbox", "aria-label": this.label }, h("slot", null)), h("p", { id: this.fieldName, class: "mdc-select-helper-text mdc-select-helper-text--validation-msg" }, h("svg", { class: "select-error-svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("g", { "clip-path": "url(#clip0_12_1424)" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.3156 0L16 4.68444V11.3156L11.3156 16H4.68444L0 11.3156V4.68444L4.68444 0H11.3156ZM8 10.4C7.36 10.4 6.84444 10.9156 6.84444 11.5556C6.84444 12.1956 7.36 12.7111 8 12.7111C8.64 12.7111 9.15556 12.1956 9.15556 11.5556C9.15556 10.9156 8.64 10.4 8 10.4ZM8.88889 3.55556H7.11111V8.88889H8.88889V3.55556Z", fill: "#AF3231" })), h("defs", null, h("clipPath", { id: "clip0_12_1424" }, h("rect", { width: "16", height: "16", fill: "white" })))), this.helpertext), this.infoText ? h("p", { class: "mdc-select-helper-text mdc-select-helper-text--info-msg" }, this.infoText) : null)));
379
396
  }
@@ -3632,11 +3632,25 @@ ptc-link, ptc-square-card,
3632
3632
  .ptc-text-field .field-with-counter {
3633
3633
  position: relative;
3634
3634
  }
3635
- .ptc-text-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,
3636
- .ptc-text-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,
3637
- .ptc-text-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing {
3635
+ .ptc-text-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused.mouse-focus .mdc-notched-outline__leading,
3636
+ .ptc-text-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused.mouse-focus .mdc-notched-outline__notch,
3637
+ .ptc-text-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused.mouse-focus .mdc-notched-outline__trailing {
3638
3638
  border-color: var(--color-blue-07);
3639
3639
  }
3640
+ .ptc-text-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused.keyboard-focus .mdc-notched-outline__leading,
3641
+ .ptc-text-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused.keyboard-focus .mdc-notched-outline__notch,
3642
+ .ptc-text-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused.keyboard-focus .mdc-notched-outline__trailing {
3643
+ border-color: var(--keyboard-nav-outline);
3644
+ border-width: 5px;
3645
+ }
3646
+ .ptc-text-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused.keyboard-focus .mdc-notched-outline__leading {
3647
+ border-top-left-radius: var(--ptc-border-radius-standard) !important;
3648
+ border-bottom-left-radius: var(--ptc-border-radius-standard) !important;
3649
+ }
3650
+ .ptc-text-field .mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused.keyboard-focus .mdc-notched-outline__trailing {
3651
+ border-top-right-radius: var(--ptc-border-radius-standard) !important;
3652
+ border-bottom-right-radius: var(--ptc-border-radius-standard) !important;
3653
+ }
3640
3654
  .ptc-text-field .mdc-text-field--outlined {
3641
3655
  height: 34px;
3642
3656
  width: 273px;
@@ -3726,6 +3740,11 @@ ptc-link, ptc-square-card,
3726
3740
  padding-left: 0px;
3727
3741
  z-index: 3;
3728
3742
  }
3743
+ .ptc-text-field .intl-phone-adjustments .iti__selected-flag:focus-visible {
3744
+ border-radius: var(--ptc-border-radius-standard);
3745
+ outline: 5px solid var(--keyboard-nav-outline);
3746
+ outline-offset: -4px;
3747
+ }
3729
3748
  .ptc-text-field .intl-phone-adjustments ul {
3730
3749
  width: 273px;
3731
3750
  }
@@ -5,6 +5,7 @@ import { ValidationMessages } from '../../utils/validation-messages';
5
5
  import { getLanguageFromURL } from '../../utils/utils';
6
6
  export class PtcTextfield {
7
7
  constructor() {
8
+ this.lastInteraction = 'mouse';
8
9
  this.phoneValidity = 'validating';
9
10
  this.matchStatus = true;
10
11
  this.fieldId = undefined;
@@ -85,13 +86,6 @@ export class PtcTextfield {
85
86
  if (this.type !== 'hidden') {
86
87
  this.mdcTextfieldComponent = MDCTextField.attachTo(this.mdcTextfield);
87
88
  }
88
- // try{
89
- // // debugger;
90
- // this.mdcTextfieldComponent = MDCTextField.attachTo(this.mdcTextfield);
91
- // }catch(error){
92
- // debugger;
93
- // console.error('An error found here!', error.message);
94
- // }
95
89
  if (this.fieldId === 'contact-phone' && this.fieldName === 'phone') {
96
90
  this.iti = intlTelInput(this.customInput, {
97
91
  separateDialCode: true,
@@ -106,6 +100,7 @@ export class PtcTextfield {
106
100
  utilsScript: 'https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/18.2.1/js/utils.min.js', // Required for formatting/validation
107
101
  });
108
102
  }
103
+ this.setupFocusHandlers();
109
104
  }
110
105
  getValidationMessage(type) {
111
106
  return ValidationMessages[this.language][type];
@@ -220,6 +215,37 @@ export class PtcTextfield {
220
215
  }
221
216
  }
222
217
  }
218
+ setupFocusHandlers() {
219
+ // Track the last interaction type
220
+ document.addEventListener('mousedown', () => {
221
+ this.lastInteraction = 'mouse';
222
+ });
223
+ document.addEventListener('keydown', (e) => {
224
+ if (e.key === 'Tab') {
225
+ this.lastInteraction = 'keyboard';
226
+ }
227
+ });
228
+ // Select all elements with the class `mdc-text-field`
229
+ const textFields = document.querySelectorAll('.mdc-text-field');
230
+ textFields.forEach((textField) => {
231
+ const input = textField.querySelector('input');
232
+ if (input) {
233
+ input.addEventListener('focus', () => {
234
+ if (this.lastInteraction === 'keyboard') {
235
+ textField.classList.add('keyboard-focus');
236
+ textField.classList.remove('mouse-focus');
237
+ }
238
+ else {
239
+ textField.classList.add('mouse-focus');
240
+ textField.classList.remove('keyboard-focus');
241
+ }
242
+ });
243
+ input.addEventListener('blur', () => {
244
+ textField.classList.remove('keyboard-focus', 'mouse-focus');
245
+ });
246
+ }
247
+ });
248
+ }
223
249
  render() {
224
250
  return (h(Host, { class: `ptc-text-field
225
251
  ${this.fieldId === 'contact-phone' ? 'phone-field-style' : ''}
@@ -50,7 +50,7 @@ export class PtcTheaterVideoPlaylist {
50
50
  });
51
51
  }
52
52
  setupCards() {
53
- console.log('Setup called');
53
+ //console.log('Setup called');
54
54
  // const cardElements = this.host.querySelectorAll('ptc-theater-video');
55
55
  // console.log(this.cardElements);
56
56
  this.cardElements.forEach((cardElement, index) => {
@@ -61,7 +61,7 @@ export class PtcTheaterVideoPlaylist {
61
61
  });
62
62
  }
63
63
  updateCardData(cardNumber) {
64
- console.log('updateCard called');
64
+ //console.log('updateCard called');
65
65
  // debugger
66
66
  this.cards = [];
67
67
  // const cardElements = this.host.querySelectorAll('ptc-theater-video');