@ptcwebops/ptcw-design 6.1.30 → 6.1.32
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.
- package/dist/cjs/ptc-close-icon_2.cjs.entry.js +3 -1
- package/dist/cjs/ptc-office-location-card.cjs.entry.js +3 -3
- package/dist/cjs/ptc-office-locations.cjs.entry.js +42 -7
- package/dist/collection/components/ptc-close-icon/ptc-close-icon.css +4 -0
- package/dist/collection/components/ptc-modal/ptc-modal.js +2 -0
- package/dist/collection/components/ptc-office-location-card/ptc-office-location-card.css +9 -0
- package/dist/collection/components/ptc-office-location-card/ptc-office-location-card.js +2 -2
- package/dist/collection/components/ptc-office-locations/ptc-office-locations.css +23 -1
- package/dist/collection/components/ptc-office-locations/ptc-office-locations.js +41 -6
- package/dist/custom-elements/index.js +48 -11
- package/dist/esm/ptc-close-icon_2.entry.js +3 -1
- package/dist/esm/ptc-office-location-card.entry.js +3 -3
- package/dist/esm/ptc-office-locations.entry.js +42 -7
- package/dist/ptcw-design/p-1a6759a4.entry.js +1 -0
- package/dist/ptcw-design/p-48815ee0.entry.js +1 -0
- package/dist/ptcw-design/p-aea88da0.entry.js +1 -0
- package/dist/ptcw-design/ptcw-design.esm.js +1 -1
- package/dist/types/components/ptc-office-location-card/ptc-office-location-card.d.ts +1 -1
- package/dist/types/components/ptc-office-locations/ptc-office-locations.d.ts +1 -0
- package/package.json +1 -1
- package/readme.md +1 -1
- package/dist/ptcw-design/p-bd08bbf5.entry.js +0 -1
- package/dist/ptcw-design/p-dca69b87.entry.js +0 -1
- package/dist/ptcw-design/p-ec94b1d2.entry.js +0 -1
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-63ddc79c.js');
|
|
6
6
|
|
|
7
|
-
const ptcCloseIconCss = "h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}:host{display:inline-block}:host .close-icon{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border:5px solid transparent;box-sizing:border-box;border-radius:var(--ptc-border-radius-standard);cursor:pointer}:host .close-icon svg{padding:7px;border:1px solid transparent;border-radius:var(--ptc-border-radius-standard);background-color:transparent;transition:border-color var(--ptc-transition-medium) var(--ptc-ease-inout)}:host .close-icon svg:focus-visible{border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline)}:host .close-icon:hover svg{border-color:var(--color-gray-12)}:host .close-icon:active svg{transition-duration:0ms;background-color:var(--color-gray-02);border:1px solid var(--color-gray-12)}";
|
|
7
|
+
const ptcCloseIconCss = "h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}:host{display:inline-block}:host:focus-visible{border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline)}:host .close-icon{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border:5px solid transparent;box-sizing:border-box;border-radius:var(--ptc-border-radius-standard);cursor:pointer}:host .close-icon svg{padding:7px;border:1px solid transparent;border-radius:var(--ptc-border-radius-standard);background-color:transparent;transition:border-color var(--ptc-transition-medium) var(--ptc-ease-inout)}:host .close-icon svg:focus-visible{border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline)}:host .close-icon:hover svg{border-color:var(--color-gray-12)}:host .close-icon:active svg{transition-duration:0ms;background-color:var(--color-gray-02);border:1px solid var(--color-gray-12)}";
|
|
8
8
|
|
|
9
9
|
const PtcCloseIcon = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -79,6 +79,8 @@ const PtcModal = class {
|
|
|
79
79
|
componentDidLoad() {
|
|
80
80
|
if (this.show) {
|
|
81
81
|
this.fireOnOpened(this);
|
|
82
|
+
const wrapperEle = this.el.querySelector('.wrapper');
|
|
83
|
+
wrapperEle && wrapperEle.focus();
|
|
82
84
|
}
|
|
83
85
|
if (this.showHeaderFooter) {
|
|
84
86
|
this.handleScroll();
|
|
@@ -27,7 +27,7 @@ const showAll = `<svg class="ol-full-icon" width="16" height="16" viewBox="0 0 1
|
|
|
27
27
|
</svg>
|
|
28
28
|
`;
|
|
29
29
|
|
|
30
|
-
const ptcOfficeLocationCardCss = "h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}:host{display:block;position:relative}:host .ofc-card-wrapper{padding:2rem;border:1px solid var(--color-gray-02);cursor:pointer;color:var(--color-gray-10);height:100%;box-sizing:border-box;border-radius:var(--ptc-border-radius-standard);transition:border-color var(--ptc-transition-medium) var(--ptc-ease-inout)}:host .ofc-card-wrapper:hover{border-color:var(--color-gray-10)}:host .map-link,:host .contact-number{margin-top:20px;display:flex;align-items:center;color:var(--color-gray-10)}:host .map-link a,:host .contact-number a{color:#2bad56 !important}:host .ofc-icon{margin-right:1rem}:host .show-full-cta{position:absolute;top:12px;right:12px;font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-medium);line-height:var(--ptc-line-height-densest);display:flex;text-decoration:none;transition:text-decoration var(--ptc-transition-medium) var(--ptc-ease-inout)}:host .show-full-cta:hover{text-decoration:underline}:host .show-full-cta span{margin-left:8px}:host .ofc-title{color:var(--color-gray-10);font-size:var(--ptc-font-size-large);font-weight:var(--ptc-font-weight-extrabold);line-height:var(--ptc-line-height-densest)}";
|
|
30
|
+
const ptcOfficeLocationCardCss = "h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}:host{display:block;position:relative}:host .ofc-card-wrapper{padding:2rem;border:1px solid var(--color-gray-02);cursor:pointer;color:var(--color-gray-10);height:100%;box-sizing:border-box;border-radius:var(--ptc-border-radius-standard);transition:border-color var(--ptc-transition-medium) var(--ptc-ease-inout)}:host .ofc-card-wrapper:hover{border-color:var(--color-gray-10)}:host .ofc-card-wrapper:focus-visible{border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline)}:host .map-link,:host .contact-number{margin-top:20px;display:flex;align-items:center;color:var(--color-gray-10)}:host .map-link a,:host .contact-number a{color:#2bad56 !important}:host .ofc-icon{margin-right:1rem}:host .show-full-cta{position:absolute;top:12px;right:12px;font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-medium);line-height:var(--ptc-line-height-densest);display:flex;text-decoration:none;transition:text-decoration var(--ptc-transition-medium) var(--ptc-ease-inout);align-items:center}:host .show-full-cta:hover{text-decoration:underline}:host .show-full-cta:focus-visible{border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline)}:host .show-full-cta span{margin-left:8px}:host .ofc-title{color:var(--color-gray-10);font-size:var(--ptc-font-size-large);font-weight:var(--ptc-font-weight-extrabold);line-height:var(--ptc-line-height-densest)}";
|
|
31
31
|
|
|
32
32
|
const PtcOfficeLocationCard = class {
|
|
33
33
|
constructor(hostRef) {
|
|
@@ -51,8 +51,8 @@ const PtcOfficeLocationCard = class {
|
|
|
51
51
|
modal.show = true;
|
|
52
52
|
}
|
|
53
53
|
render() {
|
|
54
|
-
return (index.h(index.Host, null, index.h("div", { class: 'ofc-card-wrapper', onClick: () => this.handleClick() }, this.showFullAddressModal &&
|
|
55
|
-
index.h("div", { class: 'show-full-cta', onClick: (e) => { this.showFullAddress(e); } }, this.showFullAddressText, index.h("span", { innerHTML: showAll })), index.h("div", { class: 'ofc-title' }, this.officeName), index.h("div", { class: 'map-link' }, index.h("span", { class: "ofc-icon", innerHTML: showMapIcon.showMapSVG }), index.h("slot", { name: "map-link" })), index.h("div", { class: 'contact-number' }, !this.isContactEmpty &&
|
|
54
|
+
return (index.h(index.Host, null, index.h("div", { class: 'ofc-card-wrapper', onClick: () => this.handleClick(), onKeyPress: () => this.handleClick(), tabindex: 0 }, this.showFullAddressModal &&
|
|
55
|
+
index.h("div", { class: 'show-full-cta', onClick: (e) => { this.showFullAddress(e); }, tabindex: 0, onKeyPress: (e) => { this.showFullAddress(e); } }, this.showFullAddressText, index.h("span", { innerHTML: showAll })), index.h("div", { class: 'ofc-title' }, this.officeName), index.h("div", { class: 'map-link' }, index.h("span", { class: "ofc-icon", innerHTML: showMapIcon.showMapSVG }), index.h("slot", { name: "map-link" })), index.h("div", { class: 'contact-number' }, !this.isContactEmpty &&
|
|
56
56
|
index.h("span", { class: "ofc-icon", innerHTML: phone }), index.h("slot", { name: "contact-number" })), index.h("slot", null)), this.showFullAddressModal &&
|
|
57
57
|
index.h("ptc-modal", { id: "show-full-add", show: false, size: "md", fixed: true, rounded: true, overlay: true, "keep-in-viewport": true, styles: ".modal-body{padding: 0 32px 32px 32px;box-sizing: border-box;}" }, index.h("div", { class: 'ofc-title' }, this.officeName), index.h("div", { class: 'map-link' }, index.h("span", { class: "ofc-icon", innerHTML: showMapIcon.showMapSVG }), index.h("slot", { name: 'map-link-modal' })), index.h("div", { class: 'contact-number' }, !this.isContactEmpty &&
|
|
58
58
|
index.h("span", { class: "ofc-icon", innerHTML: phone }), index.h("slot", { name: 'contact-number-modal' })))));
|
|
@@ -27,7 +27,7 @@ const hideMapSVG = `<svg width="16" height="17" viewBox="0 0 16 17" fill="none"
|
|
|
27
27
|
</svg>
|
|
28
28
|
`;
|
|
29
29
|
|
|
30
|
-
const ptcOfficeLocationsCss = "h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}:host{display:block}:host .country-list{z-index:1056;min-width:278px;position:absolute;top:100%;left:16px;width:max-content;margin-top:8px;-webkit-box-orient:vertical;-webkit-box-direction:normal;border-radius:var(--ptc-border-radius-standard);box-shadow:0 8px 24px rgba(0, 0, 0, 0.25);background-color:var(--color-white);border-top:none;overflow:hidden;max-height:0;transition:max-height 0.25s ease-out}:host .country-list ul{list-style:none;margin:0;padding:24px 24px 8px 24px;border-bottom:1px solid var(--color-gray-02);max-height:480px}@media only screen and (min-width: 992px){:host .country-list ul{overflow:auto}}:host .country-list ul::-webkit-scrollbar{width:8px}:host .country-list ul::-webkit-scrollbar-track{background:transparent}:host .country-list ul::-webkit-scrollbar-thumb{background:var(--color-gray-02);border-radius:var(--ptc-border-radius-pill)}:host .country-list li{margin-bottom:1rem;cursor:pointer;transition:background-color 0.3s ease}:host .country-list li label{display:block;position:relative;padding:0 0 4px 32px;font-weight:var(--ptc-font-weight-medium);color:var(--color-gray-10);cursor:pointer}:host .country-list li label .checkmark{background-color:var(--color-white);border:1px solid var(--color-gray-12);border-radius:var(--ptc-border-radius-standard);-webkit-box-sizing:border-box;box-sizing:border-box;height:20px;left:0;position:absolute;top:0;width:20px}:host .country-list li label .checkmark::after{background-image:url('data:image/svg+xml,<svg width=\"14\" height=\"10\" viewBox=\"0 0 14 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M1.5 4L5.5 8L12.5 1\" stroke=\"white\" stroke-width=\"2\"/></svg>');background-position:50%;background-repeat:no-repeat;background-size:75% 100%;content:\"\";display:none;height:20px;left:-1px;position:absolute;top:-1px;width:20px}:host .country-list li label input[type=checkbox]{cursor:pointer;height:0;opacity:0;position:absolute;width:0;margin:0}:host .country-list li label input:checked~.checkmark{background-color:#1f2024}:host .country-list li label input:checked~.checkmark::after{display:block}:host .country-list li label:hover .checkmark{background-color:var(--color-gray-02)}:host .country-list .country-list-footer{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:1rem}:host .country-list.country-list-mobile{display:block;position:relative;overflow:auto;max-height:100%;width:100%;box-shadow:none;margin:0;padding:24px 32px;border-top:1px solid var(--color-gray-02)}:host .country-list.country-list-mobile .continent-name{color:var(--color-gray-10);font-size:var(--ptc-font-size-large);font-weight:var(--ptc-font-weight-bold);margin-bottom:1rem}:host .country-list.country-list-mobile ul{border:none;padding:16px 0 0 0}:host .region-list{display:flex;justify-content:center;height:100%}:host .region-list .region{position:relative}:host .region-list .region .region-btn{margin:0 0.5rem;height:100%;display:flex;cursor:pointer;position:relative}:host .region-list .region .region-btn .continent-arrow,:host .region-list .region .region-btn .continent-name{background-color:var(--color-gray-02);transition:background-color ease-out 250ms;font-size:var(--ptc-font-size-x-small);font-weight:var(--ptc-font-weight-semibold);color:var(--color-gray-10)}:host .region-list .region .region-btn .continent-arrow:hover,:host .region-list .region .region-btn .continent-name:hover{background-color:var(--color-gray-03)}:host .region-list .region .region-btn .continent-name{display:flex;border-top-left-radius:270px;border-bottom-left-radius:270px;align-items:center;padding:12px 8px 12px 16px;border-right:1px solid var(--color-gray-03);text-align:center}@media only screen and (min-width: 1200px){:host .region-list .region .region-btn .continent-name{padding:12px 12px 12px 20px}}:host .region-list .region .region-btn .continent-arrow{display:flex;align-items:center;border-top-right-radius:270px;border-bottom-right-radius:270px;padding:12px 16px 12px 12px}@media only screen and (min-width: 1200px){:host .region-list .region .region-btn .continent-arrow{padding:12px 18px 12px 12px}}:host .region-list .region .region-btn .continent-arrow svg{transition:transform ease-out 250ms}:host .region-list .region.active .country-list{max-height:800px;}:host .region-list .region.active .region-btn .continent-arrow svg{transform:rotate(-180deg)}:host .region-list .region.selected .continent-arrow,:host .region-list .region.selected .continent-name{background-color:var(--color-gray-12);transition:background-color ease-out 250ms;color:var(--color-white)}:host .region-list .region.selected .continent-arrow:hover,:host .region-list .region.selected .continent-name:hover{background-color:var(--color-gray-12);color:var(--color-white)}:host .region-list .region.selected .continent-arrow svg path{stroke:var(--color-white)}:host .office-location-list-wrapper{opacity:1;transition:opacity 0.25s ease-out;margin-top:2rem}:host .office-location-list-wrapper.updating{opacity:0}:host .office-location-list-wrapper .ol-list-bg{background-color:var(--color-white);display:grid;align-content:flex-start;padding:16px;column-gap:16px;row-gap:16px;grid-template-columns:1fr;overflow-y:auto}@media only screen and (min-width: 768px){:host .office-location-list-wrapper .ol-list-bg{grid-template-columns:1fr 1fr}}@media only screen and (min-width: 1200px){:host .office-location-list-wrapper .ol-list-bg{grid-template-columns:1fr 1fr 1fr}}:host .office-location-list-wrapper .map-embed{display:none}:host .office-location-list-wrapper.showing-map{display:flex;flex-direction:row;height:56rem;max-width:1736rem}:host .office-location-list-wrapper.showing-map .ol-list-bg{width:100%;grid-template-columns:1fr}@media only screen and (min-width: 992px){:host .office-location-list-wrapper.showing-map .ol-list-bg{width:40%}}@media only screen and (min-width: 1200px){:host .office-location-list-wrapper.showing-map .ol-list-bg{width:35%}}@media only screen and (min-width: 1440px){:host .office-location-list-wrapper.showing-map .ol-list-bg{width:65%;grid-template-columns:1fr 1fr}}@media only screen and (min-width: 992px){:host .office-location-list-wrapper.showing-map .map-embed{width:60%}}@media only screen and (min-width: 1200px){:host .office-location-list-wrapper.showing-map .map-embed{width:65%}}@media only screen and (min-width: 1440px){:host .office-location-list-wrapper.showing-map .map-embed{width:35%}}:host .office-location-list-wrapper.showing-map .map-embed{display:block}:host .filter-cta{background:var(--color-white);border:1px solid transparent;border-radius:var(--ptc-border-radius-pill);display:flex;flex-direction:row;margin:0 auto;padding:12px 20px;transition:border 0.25s ease-out;font-weight:var(--ptc-font-weight-semibold);font-size:var(--ptc-font-size-x-small);color:var(--color-gray-10)}:host .filter-cta svg{margin-right:10px}:host .filter-cta:hover{border:1px solid var(--color-gray-02)}:host .modal-footer{display:flex;justify-items:center;justify-content:space-between;padding:0 1rem}:host .map-btn{margin:0 0.5rem;height:100%;display:flex;align-items:center;cursor:pointer;position:relative;background-color:var(--color-white);padding:9px 20px;font-size:var(--ptc-font-size-x-small);font-weight:var(--ptc-font-weight-semibold);border-radius:var(--ptc-border-radius-pill);color:var(--color-gray-10);border:1px solid transparent;transition:border 0.25s ease-out;box-sizing:border-box}@media only screen and (min-width: 1200px){:host .map-btn{margin:0 1rem}}:host .map-btn:hover{border:1px solid var(--color-gray-04)}:host .map-btn .map-icon{margin-right:10px;min-height:20px}";
|
|
30
|
+
const ptcOfficeLocationsCss = "h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link,ptc-square-card,.hyphenate-text,ptc-footer{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}:host{display:block}:host .country-list{z-index:1056;min-width:278px;position:absolute;top:100%;left:16px;width:max-content;margin-top:8px;-webkit-box-orient:vertical;-webkit-box-direction:normal;border-radius:var(--ptc-border-radius-standard);box-shadow:0 8px 24px rgba(0, 0, 0, 0.25);background-color:var(--color-white);border-top:none;overflow:hidden;max-height:0;transition:max-height 0.25s ease-out}:host .country-list ul{list-style:none;margin:0;padding:24px 24px 8px 24px;border-bottom:1px solid var(--color-gray-02);max-height:480px}@media only screen and (min-width: 992px){:host .country-list ul{overflow:auto}}:host .country-list ul::-webkit-scrollbar{width:8px}:host .country-list ul::-webkit-scrollbar-track{background:transparent}:host .country-list ul::-webkit-scrollbar-thumb{background:var(--color-gray-02);border-radius:var(--ptc-border-radius-pill)}:host .country-list li{margin-bottom:1rem;cursor:pointer;transition:background-color 0.3s ease}:host .country-list li label{display:inline-block;position:relative;padding:0 0 4px 32px;font-weight:var(--ptc-font-weight-medium);color:var(--color-gray-10);cursor:pointer}:host .country-list li label .checkmark{background-color:var(--color-white);border:1px solid var(--color-gray-12);border-radius:var(--ptc-border-radius-standard);-webkit-box-sizing:border-box;box-sizing:border-box;height:20px;left:0;position:absolute;top:0;width:20px}:host .country-list li label .checkmark::after{background-image:url('data:image/svg+xml,<svg width=\"14\" height=\"10\" viewBox=\"0 0 14 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M1.5 4L5.5 8L12.5 1\" stroke=\"white\" stroke-width=\"2\"/></svg>');background-position:50%;background-repeat:no-repeat;background-size:75% 100%;content:\"\";display:none;height:20px;left:-1px;position:absolute;top:-1px;width:20px}:host .country-list li label input[type=checkbox]{cursor:pointer;height:0;opacity:0;position:absolute;width:0;margin:0}:host .country-list li label input:checked~.checkmark{background-color:#1f2024}:host .country-list li label input:checked~.checkmark::after{display:block}:host .country-list li label:hover .checkmark{background-color:var(--color-gray-02)}:host .country-list li label:focus-visible{border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline);padding-bottom:0px}:host .country-list .country-list-footer{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:1rem}:host .country-list.country-list-mobile{display:block;position:relative;overflow:auto;max-height:100%;width:100%;box-shadow:none;margin:0;padding:24px 32px;border-top:1px solid var(--color-gray-02)}:host .country-list.country-list-mobile .continent-name{color:var(--color-gray-10);font-size:var(--ptc-font-size-large);font-weight:var(--ptc-font-weight-bold);margin-bottom:1rem}:host .country-list.country-list-mobile ul{border:none;padding:16px 0 0 0}:host .region-list{display:flex;justify-content:center;height:100%}:host .region-list .region{position:relative}:host .region-list .region .region-btn{margin:0 0.5rem;height:100%;display:flex;cursor:pointer;position:relative}:host .region-list .region .region-btn .continent-arrow,:host .region-list .region .region-btn .continent-name{background-color:var(--color-gray-02);transition:background-color ease-out 250ms;font-size:var(--ptc-font-size-x-small);font-weight:var(--ptc-font-weight-semibold);color:var(--color-gray-10)}:host .region-list .region .region-btn .continent-arrow:hover,:host .region-list .region .region-btn .continent-name:hover{background-color:var(--color-gray-03)}:host .region-list .region .region-btn .continent-name{display:flex;border-top-left-radius:270px;border-bottom-left-radius:270px;align-items:center;padding:12px 8px 12px 16px;border-right:1px solid var(--color-gray-03);text-align:center}@media only screen and (min-width: 1200px){:host .region-list .region .region-btn .continent-name{padding:12px 12px 12px 20px}}:host .region-list .region .region-btn .continent-name:focus-visible{border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline);z-index:9}:host .region-list .region .region-btn .continent-arrow{display:flex;align-items:center;border-top-right-radius:270px;border-bottom-right-radius:270px;padding:12px 16px 12px 12px}@media only screen and (min-width: 1200px){:host .region-list .region .region-btn .continent-arrow{padding:12px 18px 12px 12px}}:host .region-list .region .region-btn .continent-arrow svg{transition:transform ease-out 250ms}:host .region-list .region .region-btn .continent-arrow:focus-visible{border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline)}:host .region-list .region.active .country-list{max-height:800px;}:host .region-list .region.active .region-btn .continent-arrow svg{transform:rotate(-180deg)}:host .region-list .region.selected .continent-arrow,:host .region-list .region.selected .continent-name{background-color:var(--color-gray-12);transition:background-color ease-out 250ms;color:var(--color-white)}:host .region-list .region.selected .continent-arrow:hover,:host .region-list .region.selected .continent-name:hover{background-color:var(--color-gray-12);color:var(--color-white)}:host .region-list .region.selected .continent-arrow svg path{stroke:var(--color-white)}:host .office-location-list-wrapper{opacity:1;transition:opacity 0.25s ease-out;margin-top:2rem}:host .office-location-list-wrapper.updating{opacity:0}:host .office-location-list-wrapper .ol-list-bg{background-color:var(--color-white);display:grid;align-content:flex-start;padding:16px;column-gap:16px;row-gap:16px;grid-template-columns:1fr;overflow-y:auto}@media only screen and (min-width: 768px){:host .office-location-list-wrapper .ol-list-bg{grid-template-columns:1fr 1fr}}@media only screen and (min-width: 1200px){:host .office-location-list-wrapper .ol-list-bg{grid-template-columns:1fr 1fr 1fr}}:host .office-location-list-wrapper .map-embed{display:none}:host .office-location-list-wrapper.showing-map{display:flex;flex-direction:row;height:56rem;max-width:1736rem}:host .office-location-list-wrapper.showing-map .ol-list-bg{width:100%;grid-template-columns:1fr}@media only screen and (min-width: 992px){:host .office-location-list-wrapper.showing-map .ol-list-bg{width:40%}}@media only screen and (min-width: 1200px){:host .office-location-list-wrapper.showing-map .ol-list-bg{width:35%}}@media only screen and (min-width: 1440px){:host .office-location-list-wrapper.showing-map .ol-list-bg{width:65%;grid-template-columns:1fr 1fr}}@media only screen and (min-width: 992px){:host .office-location-list-wrapper.showing-map .map-embed{width:60%}}@media only screen and (min-width: 1200px){:host .office-location-list-wrapper.showing-map .map-embed{width:65%}}@media only screen and (min-width: 1440px){:host .office-location-list-wrapper.showing-map .map-embed{width:35%}}:host .office-location-list-wrapper.showing-map .map-embed{display:block}:host .filter-cta{background:var(--color-white);border:1px solid transparent;border-radius:var(--ptc-border-radius-pill);display:flex;flex-direction:row;margin:0 auto;padding:12px 20px;transition:border 0.25s ease-out;font-weight:var(--ptc-font-weight-semibold);font-size:var(--ptc-font-size-x-small);color:var(--color-gray-10)}:host .filter-cta svg{margin-right:10px}:host .filter-cta:hover{border:1px solid var(--color-gray-02)}:host .filter-cta:focus-visible{border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline)}:host .modal-footer{display:flex;justify-items:center;justify-content:space-between;padding:0 1rem}:host .map-btn{margin:0 0.5rem;height:100%;display:flex;align-items:center;cursor:pointer;position:relative;background-color:var(--color-white);padding:9px 20px;font-size:var(--ptc-font-size-x-small);font-weight:var(--ptc-font-weight-semibold);border-radius:var(--ptc-border-radius-pill);color:var(--color-gray-10);border:1px solid transparent;transition:border 0.25s ease-out;box-sizing:border-box}@media only screen and (min-width: 1200px){:host .map-btn{margin:0 1rem}}:host .map-btn:hover{border:1px solid var(--color-gray-04)}:host .map-btn:focus-visible{border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline)}:host .map-btn .map-icon{margin-right:10px;min-height:20px}";
|
|
31
31
|
|
|
32
32
|
const PtcOfficeLocations = class {
|
|
33
33
|
constructor(hostRef) {
|
|
@@ -104,14 +104,35 @@ const PtcOfficeLocations = class {
|
|
|
104
104
|
this.showFirstMap();
|
|
105
105
|
}
|
|
106
106
|
toggleCountryList(region) {
|
|
107
|
+
let regionListID = this.hostEl.shadowRoot.querySelector(`#region-wrap-${region.replace(/\s+/g, '')}`);
|
|
107
108
|
// Toggle open/close state for the clicked region
|
|
108
109
|
if (this.openRegion === region) {
|
|
109
110
|
// If the clicked region is already open, close it
|
|
110
111
|
this.openRegion = '';
|
|
112
|
+
if (regionListID) {
|
|
113
|
+
let labelsList = regionListID.querySelectorAll('label');
|
|
114
|
+
labelsList.forEach((i) => {
|
|
115
|
+
i.tabIndex = -1;
|
|
116
|
+
});
|
|
117
|
+
let btnsList = regionListID.querySelectorAll('ptc-button');
|
|
118
|
+
btnsList.forEach((i) => {
|
|
119
|
+
i.tabIndex = -1;
|
|
120
|
+
});
|
|
121
|
+
}
|
|
111
122
|
}
|
|
112
123
|
else {
|
|
113
124
|
// Close any previously open region and open the clicked region
|
|
114
125
|
this.openRegion = region;
|
|
126
|
+
if (regionListID) {
|
|
127
|
+
let labelsList = regionListID.querySelectorAll('label');
|
|
128
|
+
labelsList.forEach((i) => {
|
|
129
|
+
i.tabIndex = 0;
|
|
130
|
+
});
|
|
131
|
+
let btnsList = regionListID.querySelectorAll('ptc-button');
|
|
132
|
+
btnsList.forEach((i) => {
|
|
133
|
+
i.removeAttribute("tabIndex");
|
|
134
|
+
});
|
|
135
|
+
}
|
|
115
136
|
}
|
|
116
137
|
}
|
|
117
138
|
getCheckboxes(region) {
|
|
@@ -157,14 +178,28 @@ const PtcOfficeLocations = class {
|
|
|
157
178
|
this.updateOfficeList();
|
|
158
179
|
this.toggleCountryList(region);
|
|
159
180
|
}
|
|
181
|
+
updateCheckboxStatusOnenter(region, e) {
|
|
182
|
+
if (e.keyCode == 13) {
|
|
183
|
+
this.updateCheckboxStatus(region, e);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
160
186
|
updateCheckboxStatus(region, e) {
|
|
161
187
|
const regionWrap = this.hostEl.shadowRoot.querySelector(`#region-wrap-${region.replace(/\s+/g, '')}`);
|
|
162
188
|
const checkboxes = this.getCheckboxes(region);
|
|
163
|
-
const isAllRegionsCheckboxClicked = e.target.id === `all-regions-${region.replace(/\s+/g, '')}
|
|
189
|
+
const isAllRegionsCheckboxClicked = e.target.id === `all-regions-${region.replace(/\s+/g, '')}`
|
|
190
|
+
|| e.keyCode === 13 && e.target.getAttribute("data-id") === `all-regions-${region.replace(/\s+/g, '')}`;
|
|
191
|
+
let AllRegionsCheckBoxSelected = e.target.checked;
|
|
192
|
+
if (e.keyCode === 13) {
|
|
193
|
+
const checkBoxSelected = e.target.querySelector('input');
|
|
194
|
+
if (checkBoxSelected) {
|
|
195
|
+
checkBoxSelected.checked = !checkBoxSelected.checked;
|
|
196
|
+
AllRegionsCheckBoxSelected = checkBoxSelected.checked;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
164
199
|
let anyCheckboxSelected = false;
|
|
165
200
|
checkboxes.forEach((checkbox) => {
|
|
166
201
|
if (isAllRegionsCheckboxClicked) {
|
|
167
|
-
checkbox.checked = checkbox.classList.contains('all-region-label') ?
|
|
202
|
+
checkbox.checked = checkbox.classList.contains('all-region-label') ? AllRegionsCheckBoxSelected : false;
|
|
168
203
|
}
|
|
169
204
|
else if (checkbox.classList.contains('all-region-label')) {
|
|
170
205
|
checkbox.checked = false;
|
|
@@ -223,8 +258,8 @@ const PtcOfficeLocations = class {
|
|
|
223
258
|
renderCountrylist(region) {
|
|
224
259
|
const uniqueLocations = [...new Map(this.locations
|
|
225
260
|
.filter(location => location.region === region).map(item => [item['country'], item])).values()];
|
|
226
|
-
return (index.h("ul", { id: 'region-list-' + region.replace(/\s+/g, '') }, index.h("li",
|
|
227
|
-
.map(location => (index.h("li", { key: location.id }, index.h("label", { htmlFor: location.country }, location.country, index.h("input", { type: "checkbox", id: location.country, value: location.country, "data-continent": region, onChange: (e) => this.updateCheckboxStatus(region.replace(/\s+/g, ''), e) }), index.h("span", { class: 'checkmark' })))))));
|
|
261
|
+
return (index.h("ul", { id: 'region-list-' + region.replace(/\s+/g, '') }, index.h("li", { id: 'all-regions-id-' + region.replace(/\s+/g, ''), class: "mf-listen" }, index.h("label", { htmlFor: 'all-regions-' + region.replace(/\s+/g, ''), "data-id": 'all-regions-' + region.replace(/\s+/g, ''), onKeyDown: (e) => this.updateCheckboxStatusOnenter(region.replace(/\s+/g, ''), e), tabindex: this.isMobile ? 0 : -1 }, this.allRegionsText, index.h("input", { type: "checkbox", class: 'all-region-label', tabindex: -1, id: 'all-regions-' + region.replace(/\s+/g, ''), value: region, "data-continent": region, onChange: (e) => this.updateCheckboxStatus(region.replace(/\s+/g, ''), e) }), index.h("span", { class: 'checkmark' }))), uniqueLocations
|
|
262
|
+
.map(location => (index.h("li", { key: location.id, id: location.id + 'id', class: "mf-listen" }, index.h("label", { htmlFor: location.country, tabindex: this.isMobile ? 0 : -1, "data-id": location.country, onKeyDown: (e) => this.updateCheckboxStatusOnenter(region.replace(/\s+/g, ''), e) }, location.country, index.h("input", { type: "checkbox", id: location.country, tabindex: -1, value: location.country, "data-continent": region, onChange: (e) => this.updateCheckboxStatus(region.replace(/\s+/g, ''), e) }), index.h("span", { class: 'checkmark' })))))));
|
|
228
263
|
}
|
|
229
264
|
toggleMap() {
|
|
230
265
|
this.showMap = !this.showMap;
|
|
@@ -241,9 +276,9 @@ const PtcOfficeLocations = class {
|
|
|
241
276
|
render() {
|
|
242
277
|
const classMap = this.getCssClassMap();
|
|
243
278
|
return (index.h(index.Host, null, !this.isMobile &&
|
|
244
|
-
index.h("div", { class: "region-list" }, this.regions.map(region => (index.h("div", { class: `region ${this.openRegion === region ? 'active' : ''}`, key: region.id, id: 'region-wrap-' + region.replace(/\s+/g, '') }, index.h("span", { class: "region-btn" }, index.h("span", { class: "continent-name", onClick: () => { this.updateSelectedClass(region.replace(/\s+/g, '')); } }, region), index.h("span", { class: "continent-arrow", onClick: () => this.toggleCountryList(region) }, index.h("svg", { width: "10", height: "7", viewBox: "0 0 10 7", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M1 1L5 5L9 1", stroke: "#40434A", "stroke-width": "2", "stroke-linecap": "round" })))), index.h("div", { class: `country-list country-list-desktop` }, this.renderCountrylist(region), index.h("div", { class: "country-list-footer" }, index.h("ptc-button", { color: "ptc-tertiary", "link-title": "Clear", type: "button", size: "small", onClick: () => this.clearFilter(region), styles: 'button { border: none !important;} button:hover { background-color: transparent !important;} button:hover span{ text-decoration: underline !important}' }, this.clearText), index.h("ptc-button", { color: "ptc-secondary", "link-title": "Apply", type: "button", size: "small", onClick: () => this.applyFilter(region) }, this.applyText)))))), index.h("span", { class: "map-btn", onClick: () => { this.toggleMap(); } }, index.h("span", { class: 'map-icon', innerHTML: this.showMap ? hideMapSVG : showMapIcon.showMapSVG }), index.h("span", null, this.showMap ? this.hideMapText : this.showMapText, " "))), this.isMobile &&
|
|
279
|
+
index.h("div", { class: "region-list" }, this.regions.map(region => (index.h("div", { class: `region mf-listen ${this.openRegion === region ? 'active' : ''}`, key: region.id, id: 'region-wrap-' + region.replace(/\s+/g, '') }, index.h("span", { class: "region-btn" }, index.h("span", { class: "continent-name", onClick: () => { this.updateSelectedClass(region.replace(/\s+/g, '')); }, onKeyPress: () => { this.updateSelectedClass(region.replace(/\s+/g, '')); }, tabindex: "0" }, region), index.h("span", { class: "continent-arrow", onClick: () => this.toggleCountryList(region), onKeyPress: () => this.toggleCountryList(region), tabindex: "0" }, index.h("svg", { width: "10", height: "7", viewBox: "0 0 10 7", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M1 1L5 5L9 1", stroke: "#40434A", "stroke-width": "2", "stroke-linecap": "round" })))), index.h("div", { class: `country-list country-list-desktop` }, this.renderCountrylist(region), index.h("div", { class: "country-list-footer" }, index.h("ptc-button", { "tracker-id": "clearBtnID", color: "ptc-tertiary", tabIndex: -1, "link-title": "Clear", type: "button", size: "small", onClick: () => this.clearFilter(region), styles: 'button { border: none !important;} button:hover { background-color: transparent !important;} button:hover span{ text-decoration: underline !important}' }, this.clearText), index.h("ptc-button", { "tracker-id": "applyBtnID", color: "ptc-secondary", tabIndex: -1, "link-title": "Apply", type: "button", size: "small", onClick: () => this.applyFilter(region) }, this.applyText)))))), index.h("span", { class: "map-btn mf-listen", id: "mapBtnID", onClick: () => { this.toggleMap(); }, onKeyPress: () => { this.toggleMap(); }, tabindex: 0 }, index.h("span", { class: 'map-icon', innerHTML: this.showMap ? hideMapSVG : showMapIcon.showMapSVG }), index.h("span", null, this.showMap ? this.hideMapText : this.showMapText, " "))), this.isMobile &&
|
|
245
280
|
index.h("button", { class: "filter-cta", onClick: () => { this.openFilterModal(); } }, " ", index.h("span", { class: "svg-close", innerHTML: filterSVG }), this.filtersText), this.isMobile &&
|
|
246
|
-
index.h("ptc-modal", { id: "modal-example", show: false, size: "lg", fixed: true, rounded: true, "show-header-footer": "true" }, index.h("div", { slot: "header" }, index.h("ptc-title", { type: 'h4', upperline: "no-upperline", "text-align": 'center', "title-margin": "margin-5" }, this.filtersText)), index.h("div", { slot: "footer", class: 'modal-footer' }, index.h("ptc-button", { color: "ptc-tertiary", "link-title": "Clear", type: "button", size: "small", onClick: () => { this.clearFiltersMobile(); }, styles: 'button { border: none !important;} button:hover { background-color: transparent !important;} button:hover span{ text-decoration: underline !important}' }, this.clearText), index.h("ptc-button", { color: "ptc-secondary", "link-title": "Apply", type: "button", size: "small", onClick: () => { this.applyFilterMobile(); } }, this.applyText)), index.h("div", { slot: "body" }, index.h("div", { class: "filter-modal-body" }, this.regions.map(region => (index.h("div", { class: "country-list country-list-mobile", key: region.id, id: 'region-wrap-' + region.replace(/\s+/g, '') }, index.h("span", { class: "continent-name" }, region), this.renderCountrylist(region))))))), index.h("div", { class: classMap }, index.h("div", { class: `ol-list-bg ` }, index.h("slot", null)), !this.isMobile &&
|
|
281
|
+
index.h("ptc-modal", { id: "modal-example", show: false, size: "lg", fixed: true, rounded: true, "show-header-footer": "true" }, index.h("div", { slot: "header" }, index.h("ptc-title", { type: 'h4', upperline: "no-upperline", "text-align": 'center', "title-margin": "margin-5" }, this.filtersText)), index.h("div", { slot: "footer", class: 'modal-footer' }, index.h("ptc-button", { "tracker-id": "mobileClearBtnID", color: "ptc-tertiary", "link-title": "Clear", type: "button", size: "small", onClick: () => { this.clearFiltersMobile(); }, styles: 'button { border: none !important;} button:hover { background-color: transparent !important;} button:hover span{ text-decoration: underline !important}' }, this.clearText), index.h("ptc-button", { "tracker-id": "mobileApplyBtnID", color: "ptc-secondary", "link-title": "Apply", type: "button", size: "small", onClick: () => { this.applyFilterMobile(); } }, this.applyText)), index.h("div", { slot: "body" }, index.h("div", { class: "filter-modal-body" }, this.regions.map(region => (index.h("div", { class: "country-list country-list-mobile mf-listen", key: region.id, id: 'region-wrap-' + region.replace(/\s+/g, '') }, index.h("span", { class: "continent-name" }, region), this.renderCountrylist(region))))))), index.h("div", { class: classMap }, index.h("div", { class: `ol-list-bg ` }, index.h("slot", null)), !this.isMobile &&
|
|
247
282
|
index.h("div", { class: "map-embed" }, index.h("iframe", { frameborder: "0", referrerPolicy: "no-referrer-when-downgrade", width: '100%', height: '100%', style: { border: '0' }, allowfullScreen: true, src: `https://www.google.com/maps/embed/v1/place?key=AIzaSyATvSgSVv2hH0yXiKMcBYsF26j67d3oPLg&q=${this.address}` })))));
|
|
248
283
|
}
|
|
249
284
|
getCssClassMap() {
|
|
@@ -57,6 +57,10 @@ ptc-link, ptc-square-card,
|
|
|
57
57
|
:host {
|
|
58
58
|
display: inline-block;
|
|
59
59
|
}
|
|
60
|
+
:host:focus-visible {
|
|
61
|
+
border-radius: var(--ptc-border-radius-standard);
|
|
62
|
+
outline: 5px solid var(--keyboard-nav-outline);
|
|
63
|
+
}
|
|
60
64
|
:host .close-icon {
|
|
61
65
|
display: flex;
|
|
62
66
|
align-items: center;
|
|
@@ -71,6 +71,10 @@ ptc-link, ptc-square-card,
|
|
|
71
71
|
:host .ofc-card-wrapper:hover {
|
|
72
72
|
border-color: var(--color-gray-10);
|
|
73
73
|
}
|
|
74
|
+
:host .ofc-card-wrapper:focus-visible {
|
|
75
|
+
border-radius: var(--ptc-border-radius-standard);
|
|
76
|
+
outline: 5px solid var(--keyboard-nav-outline);
|
|
77
|
+
}
|
|
74
78
|
:host .map-link,
|
|
75
79
|
:host .contact-number {
|
|
76
80
|
margin-top: 20px;
|
|
@@ -95,10 +99,15 @@ ptc-link, ptc-square-card,
|
|
|
95
99
|
display: flex;
|
|
96
100
|
text-decoration: none;
|
|
97
101
|
transition: text-decoration var(--ptc-transition-medium) var(--ptc-ease-inout);
|
|
102
|
+
align-items: center;
|
|
98
103
|
}
|
|
99
104
|
:host .show-full-cta:hover {
|
|
100
105
|
text-decoration: underline;
|
|
101
106
|
}
|
|
107
|
+
:host .show-full-cta:focus-visible {
|
|
108
|
+
border-radius: var(--ptc-border-radius-standard);
|
|
109
|
+
outline: 5px solid var(--keyboard-nav-outline);
|
|
110
|
+
}
|
|
102
111
|
:host .show-full-cta span {
|
|
103
112
|
margin-left: 8px;
|
|
104
113
|
}
|
|
@@ -22,8 +22,8 @@ export class PtcOfficeLocationCard {
|
|
|
22
22
|
modal.show = true;
|
|
23
23
|
}
|
|
24
24
|
render() {
|
|
25
|
-
return (h(Host, null, h("div", { class: 'ofc-card-wrapper', onClick: () => this.handleClick() }, this.showFullAddressModal &&
|
|
26
|
-
h("div", { class: 'show-full-cta', onClick: (e) => { this.showFullAddress(e); } }, this.showFullAddressText, h("span", { innerHTML: showAll })), h("div", { class: 'ofc-title' }, this.officeName), h("div", { class: 'map-link' }, h("span", { class: "ofc-icon", innerHTML: showMapSVG }), h("slot", { name: "map-link" })), h("div", { class: 'contact-number' }, !this.isContactEmpty &&
|
|
25
|
+
return (h(Host, null, h("div", { class: 'ofc-card-wrapper', onClick: () => this.handleClick(), onKeyPress: () => this.handleClick(), tabindex: 0 }, this.showFullAddressModal &&
|
|
26
|
+
h("div", { class: 'show-full-cta', onClick: (e) => { this.showFullAddress(e); }, tabindex: 0, onKeyPress: (e) => { this.showFullAddress(e); } }, this.showFullAddressText, h("span", { innerHTML: showAll })), h("div", { class: 'ofc-title' }, this.officeName), h("div", { class: 'map-link' }, h("span", { class: "ofc-icon", innerHTML: showMapSVG }), h("slot", { name: "map-link" })), h("div", { class: 'contact-number' }, !this.isContactEmpty &&
|
|
27
27
|
h("span", { class: "ofc-icon", innerHTML: phone }), h("slot", { name: "contact-number" })), h("slot", null)), this.showFullAddressModal &&
|
|
28
28
|
h("ptc-modal", { id: "show-full-add", show: false, size: "md", fixed: true, rounded: true, overlay: true, "keep-in-viewport": true, styles: ".modal-body{padding: 0 32px 32px 32px;box-sizing: border-box;}" }, h("div", { class: 'ofc-title' }, this.officeName), h("div", { class: 'map-link' }, h("span", { class: "ofc-icon", innerHTML: showMapSVG }), h("slot", { name: 'map-link-modal' })), h("div", { class: 'contact-number' }, !this.isContactEmpty &&
|
|
29
29
|
h("span", { class: "ofc-icon", innerHTML: phone }), h("slot", { name: 'contact-number-modal' })))));
|
|
@@ -103,7 +103,7 @@ ptc-link, ptc-square-card,
|
|
|
103
103
|
transition: background-color 0.3s ease;
|
|
104
104
|
}
|
|
105
105
|
:host .country-list li label {
|
|
106
|
-
display: block;
|
|
106
|
+
display: inline-block;
|
|
107
107
|
position: relative;
|
|
108
108
|
padding: 0 0 4px 32px;
|
|
109
109
|
font-weight: var(--ptc-font-weight-medium);
|
|
@@ -152,6 +152,11 @@ ptc-link, ptc-square-card,
|
|
|
152
152
|
:host .country-list li label:hover .checkmark {
|
|
153
153
|
background-color: var(--color-gray-02);
|
|
154
154
|
}
|
|
155
|
+
:host .country-list li label:focus-visible {
|
|
156
|
+
border-radius: var(--ptc-border-radius-standard);
|
|
157
|
+
outline: 5px solid var(--keyboard-nav-outline);
|
|
158
|
+
padding-bottom: 0px;
|
|
159
|
+
}
|
|
155
160
|
:host .country-list .country-list-footer {
|
|
156
161
|
align-items: center;
|
|
157
162
|
display: flex;
|
|
@@ -221,6 +226,11 @@ ptc-link, ptc-square-card,
|
|
|
221
226
|
padding: 12px 12px 12px 20px;
|
|
222
227
|
}
|
|
223
228
|
}
|
|
229
|
+
:host .region-list .region .region-btn .continent-name:focus-visible {
|
|
230
|
+
border-radius: var(--ptc-border-radius-standard);
|
|
231
|
+
outline: 5px solid var(--keyboard-nav-outline);
|
|
232
|
+
z-index: 9;
|
|
233
|
+
}
|
|
224
234
|
:host .region-list .region .region-btn .continent-arrow {
|
|
225
235
|
display: flex;
|
|
226
236
|
align-items: center;
|
|
@@ -236,6 +246,10 @@ ptc-link, ptc-square-card,
|
|
|
236
246
|
:host .region-list .region .region-btn .continent-arrow svg {
|
|
237
247
|
transition: transform ease-out 250ms;
|
|
238
248
|
}
|
|
249
|
+
:host .region-list .region .region-btn .continent-arrow:focus-visible {
|
|
250
|
+
border-radius: var(--ptc-border-radius-standard);
|
|
251
|
+
outline: 5px solid var(--keyboard-nav-outline);
|
|
252
|
+
}
|
|
239
253
|
:host .region-list .region.active .country-list {
|
|
240
254
|
max-height: 800px;
|
|
241
255
|
/* Adjust height as needed */
|
|
@@ -351,6 +365,10 @@ ptc-link, ptc-square-card,
|
|
|
351
365
|
:host .filter-cta:hover {
|
|
352
366
|
border: 1px solid var(--color-gray-02);
|
|
353
367
|
}
|
|
368
|
+
:host .filter-cta:focus-visible {
|
|
369
|
+
border-radius: var(--ptc-border-radius-standard);
|
|
370
|
+
outline: 5px solid var(--keyboard-nav-outline);
|
|
371
|
+
}
|
|
354
372
|
:host .modal-footer {
|
|
355
373
|
display: flex;
|
|
356
374
|
justify-items: center;
|
|
@@ -382,6 +400,10 @@ ptc-link, ptc-square-card,
|
|
|
382
400
|
:host .map-btn:hover {
|
|
383
401
|
border: 1px solid var(--color-gray-04);
|
|
384
402
|
}
|
|
403
|
+
:host .map-btn:focus-visible {
|
|
404
|
+
border-radius: var(--ptc-border-radius-standard);
|
|
405
|
+
outline: 5px solid var(--keyboard-nav-outline);
|
|
406
|
+
}
|
|
385
407
|
:host .map-btn .map-icon {
|
|
386
408
|
margin-right: 10px;
|
|
387
409
|
min-height: 20px;
|
|
@@ -76,14 +76,35 @@ export class PtcOfficeLocations {
|
|
|
76
76
|
this.showFirstMap();
|
|
77
77
|
}
|
|
78
78
|
toggleCountryList(region) {
|
|
79
|
+
let regionListID = this.hostEl.shadowRoot.querySelector(`#region-wrap-${region.replace(/\s+/g, '')}`);
|
|
79
80
|
// Toggle open/close state for the clicked region
|
|
80
81
|
if (this.openRegion === region) {
|
|
81
82
|
// If the clicked region is already open, close it
|
|
82
83
|
this.openRegion = '';
|
|
84
|
+
if (regionListID) {
|
|
85
|
+
let labelsList = regionListID.querySelectorAll('label');
|
|
86
|
+
labelsList.forEach((i) => {
|
|
87
|
+
i.tabIndex = -1;
|
|
88
|
+
});
|
|
89
|
+
let btnsList = regionListID.querySelectorAll('ptc-button');
|
|
90
|
+
btnsList.forEach((i) => {
|
|
91
|
+
i.tabIndex = -1;
|
|
92
|
+
});
|
|
93
|
+
}
|
|
83
94
|
}
|
|
84
95
|
else {
|
|
85
96
|
// Close any previously open region and open the clicked region
|
|
86
97
|
this.openRegion = region;
|
|
98
|
+
if (regionListID) {
|
|
99
|
+
let labelsList = regionListID.querySelectorAll('label');
|
|
100
|
+
labelsList.forEach((i) => {
|
|
101
|
+
i.tabIndex = 0;
|
|
102
|
+
});
|
|
103
|
+
let btnsList = regionListID.querySelectorAll('ptc-button');
|
|
104
|
+
btnsList.forEach((i) => {
|
|
105
|
+
i.removeAttribute("tabIndex");
|
|
106
|
+
});
|
|
107
|
+
}
|
|
87
108
|
}
|
|
88
109
|
}
|
|
89
110
|
getCheckboxes(region) {
|
|
@@ -129,14 +150,28 @@ export class PtcOfficeLocations {
|
|
|
129
150
|
this.updateOfficeList();
|
|
130
151
|
this.toggleCountryList(region);
|
|
131
152
|
}
|
|
153
|
+
updateCheckboxStatusOnenter(region, e) {
|
|
154
|
+
if (e.keyCode == 13) {
|
|
155
|
+
this.updateCheckboxStatus(region, e);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
132
158
|
updateCheckboxStatus(region, e) {
|
|
133
159
|
const regionWrap = this.hostEl.shadowRoot.querySelector(`#region-wrap-${region.replace(/\s+/g, '')}`);
|
|
134
160
|
const checkboxes = this.getCheckboxes(region);
|
|
135
|
-
const isAllRegionsCheckboxClicked = e.target.id === `all-regions-${region.replace(/\s+/g, '')}
|
|
161
|
+
const isAllRegionsCheckboxClicked = e.target.id === `all-regions-${region.replace(/\s+/g, '')}`
|
|
162
|
+
|| e.keyCode === 13 && e.target.getAttribute("data-id") === `all-regions-${region.replace(/\s+/g, '')}`;
|
|
163
|
+
let AllRegionsCheckBoxSelected = e.target.checked;
|
|
164
|
+
if (e.keyCode === 13) {
|
|
165
|
+
const checkBoxSelected = e.target.querySelector('input');
|
|
166
|
+
if (checkBoxSelected) {
|
|
167
|
+
checkBoxSelected.checked = !checkBoxSelected.checked;
|
|
168
|
+
AllRegionsCheckBoxSelected = checkBoxSelected.checked;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
136
171
|
let anyCheckboxSelected = false;
|
|
137
172
|
checkboxes.forEach((checkbox) => {
|
|
138
173
|
if (isAllRegionsCheckboxClicked) {
|
|
139
|
-
checkbox.checked = checkbox.classList.contains('all-region-label') ?
|
|
174
|
+
checkbox.checked = checkbox.classList.contains('all-region-label') ? AllRegionsCheckBoxSelected : false;
|
|
140
175
|
}
|
|
141
176
|
else if (checkbox.classList.contains('all-region-label')) {
|
|
142
177
|
checkbox.checked = false;
|
|
@@ -195,8 +230,8 @@ export class PtcOfficeLocations {
|
|
|
195
230
|
renderCountrylist(region) {
|
|
196
231
|
const uniqueLocations = [...new Map(this.locations
|
|
197
232
|
.filter(location => location.region === region).map(item => [item['country'], item])).values()];
|
|
198
|
-
return (h("ul", { id: 'region-list-' + region.replace(/\s+/g, '') }, h("li",
|
|
199
|
-
.map(location => (h("li", { key: location.id }, h("label", { htmlFor: location.country }, location.country, h("input", { type: "checkbox", id: location.country, value: location.country, "data-continent": region, onChange: (e) => this.updateCheckboxStatus(region.replace(/\s+/g, ''), e) }), h("span", { class: 'checkmark' })))))));
|
|
233
|
+
return (h("ul", { id: 'region-list-' + region.replace(/\s+/g, '') }, h("li", { id: 'all-regions-id-' + region.replace(/\s+/g, ''), class: "mf-listen" }, h("label", { htmlFor: 'all-regions-' + region.replace(/\s+/g, ''), "data-id": 'all-regions-' + region.replace(/\s+/g, ''), onKeyDown: (e) => this.updateCheckboxStatusOnenter(region.replace(/\s+/g, ''), e), tabindex: this.isMobile ? 0 : -1 }, this.allRegionsText, h("input", { type: "checkbox", class: 'all-region-label', tabindex: -1, id: 'all-regions-' + region.replace(/\s+/g, ''), value: region, "data-continent": region, onChange: (e) => this.updateCheckboxStatus(region.replace(/\s+/g, ''), e) }), h("span", { class: 'checkmark' }))), uniqueLocations
|
|
234
|
+
.map(location => (h("li", { key: location.id, id: location.id + 'id', class: "mf-listen" }, h("label", { htmlFor: location.country, tabindex: this.isMobile ? 0 : -1, "data-id": location.country, onKeyDown: (e) => this.updateCheckboxStatusOnenter(region.replace(/\s+/g, ''), e) }, location.country, h("input", { type: "checkbox", id: location.country, tabindex: -1, value: location.country, "data-continent": region, onChange: (e) => this.updateCheckboxStatus(region.replace(/\s+/g, ''), e) }), h("span", { class: 'checkmark' })))))));
|
|
200
235
|
}
|
|
201
236
|
toggleMap() {
|
|
202
237
|
this.showMap = !this.showMap;
|
|
@@ -213,9 +248,9 @@ export class PtcOfficeLocations {
|
|
|
213
248
|
render() {
|
|
214
249
|
const classMap = this.getCssClassMap();
|
|
215
250
|
return (h(Host, null, !this.isMobile &&
|
|
216
|
-
h("div", { class: "region-list" }, this.regions.map(region => (h("div", { class: `region ${this.openRegion === region ? 'active' : ''}`, key: region.id, id: 'region-wrap-' + region.replace(/\s+/g, '') }, h("span", { class: "region-btn" }, h("span", { class: "continent-name", onClick: () => { this.updateSelectedClass(region.replace(/\s+/g, '')); } }, region), h("span", { class: "continent-arrow", onClick: () => this.toggleCountryList(region) }, h("svg", { width: "10", height: "7", viewBox: "0 0 10 7", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M1 1L5 5L9 1", stroke: "#40434A", "stroke-width": "2", "stroke-linecap": "round" })))), h("div", { class: `country-list country-list-desktop` }, this.renderCountrylist(region), h("div", { class: "country-list-footer" }, h("ptc-button", { color: "ptc-tertiary", "link-title": "Clear", type: "button", size: "small", onClick: () => this.clearFilter(region), styles: 'button { border: none !important;} button:hover { background-color: transparent !important;} button:hover span{ text-decoration: underline !important}' }, this.clearText), h("ptc-button", { color: "ptc-secondary", "link-title": "Apply", type: "button", size: "small", onClick: () => this.applyFilter(region) }, this.applyText)))))), h("span", { class: "map-btn", onClick: () => { this.toggleMap(); } }, h("span", { class: 'map-icon', innerHTML: this.showMap ? hideMapSVG : showMapSVG }), h("span", null, this.showMap ? this.hideMapText : this.showMapText, " "))), this.isMobile &&
|
|
251
|
+
h("div", { class: "region-list" }, this.regions.map(region => (h("div", { class: `region mf-listen ${this.openRegion === region ? 'active' : ''}`, key: region.id, id: 'region-wrap-' + region.replace(/\s+/g, '') }, h("span", { class: "region-btn" }, h("span", { class: "continent-name", onClick: () => { this.updateSelectedClass(region.replace(/\s+/g, '')); }, onKeyPress: () => { this.updateSelectedClass(region.replace(/\s+/g, '')); }, tabindex: "0" }, region), h("span", { class: "continent-arrow", onClick: () => this.toggleCountryList(region), onKeyPress: () => this.toggleCountryList(region), tabindex: "0" }, h("svg", { width: "10", height: "7", viewBox: "0 0 10 7", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M1 1L5 5L9 1", stroke: "#40434A", "stroke-width": "2", "stroke-linecap": "round" })))), h("div", { class: `country-list country-list-desktop` }, this.renderCountrylist(region), h("div", { class: "country-list-footer" }, h("ptc-button", { "tracker-id": "clearBtnID", color: "ptc-tertiary", tabIndex: -1, "link-title": "Clear", type: "button", size: "small", onClick: () => this.clearFilter(region), styles: 'button { border: none !important;} button:hover { background-color: transparent !important;} button:hover span{ text-decoration: underline !important}' }, this.clearText), h("ptc-button", { "tracker-id": "applyBtnID", color: "ptc-secondary", tabIndex: -1, "link-title": "Apply", type: "button", size: "small", onClick: () => this.applyFilter(region) }, this.applyText)))))), h("span", { class: "map-btn mf-listen", id: "mapBtnID", onClick: () => { this.toggleMap(); }, onKeyPress: () => { this.toggleMap(); }, tabindex: 0 }, h("span", { class: 'map-icon', innerHTML: this.showMap ? hideMapSVG : showMapSVG }), h("span", null, this.showMap ? this.hideMapText : this.showMapText, " "))), this.isMobile &&
|
|
217
252
|
h("button", { class: "filter-cta", onClick: () => { this.openFilterModal(); } }, " ", h("span", { class: "svg-close", innerHTML: filterSVG }), this.filtersText), this.isMobile &&
|
|
218
|
-
h("ptc-modal", { id: "modal-example", show: false, size: "lg", fixed: true, rounded: true, "show-header-footer": "true" }, h("div", { slot: "header" }, h("ptc-title", { type: 'h4', upperline: "no-upperline", "text-align": 'center', "title-margin": "margin-5" }, this.filtersText)), h("div", { slot: "footer", class: 'modal-footer' }, h("ptc-button", { color: "ptc-tertiary", "link-title": "Clear", type: "button", size: "small", onClick: () => { this.clearFiltersMobile(); }, styles: 'button { border: none !important;} button:hover { background-color: transparent !important;} button:hover span{ text-decoration: underline !important}' }, this.clearText), h("ptc-button", { color: "ptc-secondary", "link-title": "Apply", type: "button", size: "small", onClick: () => { this.applyFilterMobile(); } }, this.applyText)), h("div", { slot: "body" }, h("div", { class: "filter-modal-body" }, this.regions.map(region => (h("div", { class: "country-list country-list-mobile", key: region.id, id: 'region-wrap-' + region.replace(/\s+/g, '') }, h("span", { class: "continent-name" }, region), this.renderCountrylist(region))))))), h("div", { class: classMap }, h("div", { class: `ol-list-bg ` }, h("slot", null)), !this.isMobile &&
|
|
253
|
+
h("ptc-modal", { id: "modal-example", show: false, size: "lg", fixed: true, rounded: true, "show-header-footer": "true" }, h("div", { slot: "header" }, h("ptc-title", { type: 'h4', upperline: "no-upperline", "text-align": 'center', "title-margin": "margin-5" }, this.filtersText)), h("div", { slot: "footer", class: 'modal-footer' }, h("ptc-button", { "tracker-id": "mobileClearBtnID", color: "ptc-tertiary", "link-title": "Clear", type: "button", size: "small", onClick: () => { this.clearFiltersMobile(); }, styles: 'button { border: none !important;} button:hover { background-color: transparent !important;} button:hover span{ text-decoration: underline !important}' }, this.clearText), h("ptc-button", { "tracker-id": "mobileApplyBtnID", color: "ptc-secondary", "link-title": "Apply", type: "button", size: "small", onClick: () => { this.applyFilterMobile(); } }, this.applyText)), h("div", { slot: "body" }, h("div", { class: "filter-modal-body" }, this.regions.map(region => (h("div", { class: "country-list country-list-mobile mf-listen", key: region.id, id: 'region-wrap-' + region.replace(/\s+/g, '') }, h("span", { class: "continent-name" }, region), this.renderCountrylist(region))))))), h("div", { class: classMap }, h("div", { class: `ol-list-bg ` }, h("slot", null)), !this.isMobile &&
|
|
219
254
|
h("div", { class: "map-embed" }, h("iframe", { frameborder: "0", referrerPolicy: "no-referrer-when-downgrade", width: '100%', height: '100%', style: { border: '0' }, allowfullScreen: true, src: `https://www.google.com/maps/embed/v1/place?key=AIzaSyATvSgSVv2hH0yXiKMcBYsF26j67d3oPLg&q=${this.address}` })))));
|
|
220
255
|
}
|
|
221
256
|
getCssClassMap() {
|