@ptcwebops/ptcw-design 6.4.11 → 6.4.12-beta
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/blogs-search-section.cjs.entry.js +4 -1
- package/dist/cjs/buying-option-card.cjs.entry.js +1 -1
- package/dist/cjs/buying-option-cards-slider.cjs.entry.js +15 -8
- package/dist/cjs/{component-35540bfb.js → component-6a178a16.js} +2643 -832
- package/dist/cjs/dynamic-box-bundle.cjs.entry.js +3 -1
- package/dist/cjs/featured-list.cjs.entry.js +1 -1
- package/dist/cjs/homepage-toggled-content.cjs.entry.js +3 -1
- package/dist/cjs/innovator-toggle-container.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/modal-form-example.cjs.entry.js +109 -0
- package/dist/cjs/ptc-announcement.cjs.entry.js +2 -1
- package/dist/cjs/ptc-bio-card.cjs.entry.js +1 -1
- package/dist/cjs/ptc-button.cjs.entry.js +1 -1
- package/dist/cjs/ptc-card-bottom_2.cjs.entry.js +3 -17
- package/dist/cjs/ptc-card-content.cjs.entry.js +1 -7
- package/dist/cjs/ptc-card_2.cjs.entry.js +5 -4
- package/dist/cjs/ptc-case-studies-slider.cjs.entry.js +1 -1
- package/dist/cjs/ptc-close-icon_2.cjs.entry.js +24 -24
- package/dist/cjs/ptc-data-lookup.cjs.entry.js +1 -2
- package/dist/cjs/ptc-featured-list.cjs.entry.js +1 -1
- package/dist/cjs/ptc-filter-level-theater.cjs.entry.js +1 -1
- package/dist/cjs/{ptc-form-checkbox_2.cjs.entry.js → ptc-form-checkbox_4.cjs.entry.js} +723 -5
- package/dist/cjs/ptc-img.cjs.entry.js +87 -7
- package/dist/cjs/ptc-jumbotron.cjs.entry.js +11 -5
- package/dist/cjs/ptc-modal-quiz.cjs.entry.js +4 -1
- package/dist/cjs/ptc-para.cjs.entry.js +1 -1
- package/dist/cjs/ptc-picture.cjs.entry.js +0 -17
- package/dist/cjs/ptc-podcast-card.cjs.entry.js +1 -1
- package/dist/cjs/ptc-preloader.cjs.entry.js +1 -1
- package/dist/cjs/ptc-previous-url.cjs.entry.js +11 -2
- package/dist/cjs/ptc-pricing-packaging-table.cjs.entry.js +25 -9
- package/dist/cjs/ptc-pricing-tabs.cjs.entry.js +1 -1
- package/dist/cjs/ptc-product-card.cjs.entry.js +1 -1
- package/dist/cjs/ptc-product-category.cjs.entry.js +1 -1
- package/dist/cjs/ptc-product-highlight-card.cjs.entry.js +1 -1
- package/dist/cjs/ptc-readmore-char.cjs.entry.js +1 -1
- package/dist/cjs/ptc-readmore-v3.cjs.entry.js +1 -1
- package/dist/cjs/ptc-subnav-v2.cjs.entry.js +147 -247
- package/dist/cjs/ptc-tooltip-v2.cjs.entry.js +1 -1
- package/dist/cjs/ptc-value-led-speed-bump.cjs.entry.js +1 -1
- package/dist/cjs/ptc-white-paper.cjs.entry.js +19 -9
- package/dist/cjs/ptcw-design.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/buying-option-card/buying-option-card.css +2 -0
- package/dist/collection/components/buying-option-cards-slider/buying-option-cards-slider.css +9 -35
- package/dist/collection/components/buying-option-cards-slider/buying-option-cards-slider.js +14 -7
- package/dist/collection/components/dynamic-box-bundle/dynamic-box-bundle.js +3 -1
- package/dist/collection/components/icon-asset/media/designer-v6.0.7.svg +30 -2
- package/dist/collection/components/innovator-toggle-container/innovator-toggle-container.css +24 -0
- package/dist/collection/components/organism-bundles/blogs-search-section/blogs-search-section.js +4 -1
- package/dist/collection/components/organism-bundles/bundle-featured-list/featured-list.css +24 -0
- package/dist/collection/components/organism-bundles/form/modal-from-example/modal-form-example.css +26 -0
- package/dist/collection/components/organism-bundles/form/modal-from-example/modal-form-example.js +114 -0
- package/dist/collection/components/organism-bundles/homepage-toggled-content/homepage-toggled-content.js +3 -1
- package/dist/collection/components/ptc-announcement/ptc-announcement.js +2 -1
- package/dist/collection/components/ptc-bio-card/ptc-bio-card.css +24 -0
- package/dist/collection/components/ptc-button/ptc-button.css +0 -2
- package/dist/collection/components/ptc-card-content/ptc-card-content.css +3 -45
- package/dist/collection/components/ptc-card-content/ptc-card-content.js +2 -26
- package/dist/collection/components/ptc-card-wrapper/ptc-card-wrapper.js +3 -17
- package/dist/collection/components/ptc-case-studies-slider/ptc-case-studies-slider.css +24 -0
- package/dist/collection/components/ptc-featured-list/ptc-featured-list.css +24 -0
- package/dist/collection/components/ptc-filter-level-theater/ptc-filter-level-theater.css +24 -0
- package/dist/collection/components/ptc-img/ptc-img.css +76 -0
- package/dist/collection/components/ptc-img/ptc-img.js +132 -7
- package/dist/collection/components/ptc-jumbotron/ptc-jumbotron.css +26 -3
- package/dist/collection/components/ptc-jumbotron/ptc-jumbotron.js +28 -4
- package/dist/collection/components/ptc-modal/ptc-modal.css +5 -0
- package/dist/collection/components/ptc-modal/ptc-modal.js +25 -25
- package/dist/collection/components/ptc-modal-quiz/ptc-modal-quiz.js +4 -1
- package/dist/collection/components/ptc-para/ptc-para.css +3 -0
- package/dist/collection/components/ptc-para/ptc-para.js +2 -2
- package/dist/collection/components/ptc-picture/ptc-picture.js +0 -40
- package/dist/collection/components/ptc-podcast-card/ptc-podcast-card.css +24 -0
- package/dist/collection/components/ptc-preloader/ptc-preloader.css +147 -111
- package/dist/collection/components/ptc-preloader/ptc-preloader.js +1 -1
- package/dist/collection/components/ptc-preloader-section/ptc-preloader-section.css +1 -2
- package/dist/collection/components/ptc-preloader-section/ptc-preloader-section.js +4 -3
- package/dist/collection/components/ptc-previous-url/ptc-previous-url.css +16 -0
- package/dist/collection/components/ptc-previous-url/ptc-previous-url.js +28 -1
- package/dist/collection/components/ptc-pricing-packaging-table/ptc-pricing-packaging-table.js +25 -9
- package/dist/collection/components/ptc-pricing-tabs/ptc-pricing-tabs.js +1 -1
- package/dist/collection/components/ptc-product-card/ptc-product-card.css +24 -0
- package/dist/collection/components/ptc-product-category/ptc-product-category.css +24 -0
- package/dist/collection/components/ptc-product-highlight-card/ptc-product-highlight-card.css +24 -0
- package/dist/collection/components/ptc-readmore-char/ptc-readmore-char.css +24 -0
- package/dist/collection/components/ptc-readmore-v3/ptc-readmore-v3.css +24 -0
- package/dist/collection/components/ptc-subnav-v2/ptc-subnav-v2.css +110 -115
- package/dist/collection/components/ptc-subnav-v2/ptc-subnav-v2.js +150 -248
- package/dist/collection/components/ptc-textfield/ptc-textfield.js +3 -5
- package/dist/collection/components/ptc-tooltip-v2/ptc-tooltip-v2.css +24 -0
- package/dist/collection/components/ptc-value-led-speed-bump/ptc-value-led-speed-bump.css +24 -0
- package/dist/collection/components/ptc-white-paper/ptc-white-paper.css +27 -3
- package/dist/collection/components/ptc-white-paper/ptc-white-paper.js +18 -8
- package/dist/collection/stories/organisms/eSupport/CaseTracker/preview.stories.js +45 -0
- package/dist/collection/stories/organisms/eSupport/SupportArticle/preview.stories.js +47 -0
- package/dist/collection/stories/organisms/eSupport/SupportPage/preview.stories.js +157 -0
- package/dist/collection/stories/organisms/ptc/Subanv New/preview.stories.js +338 -0
- package/dist/collection/stories/ptc-subnav-v2/ptc-subnav-v2.stories.js +0 -0
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +496 -390
- package/dist/esm/blogs-search-section.entry.js +4 -1
- package/dist/esm/buying-option-card.entry.js +1 -1
- package/dist/esm/buying-option-cards-slider.entry.js +15 -8
- package/dist/esm/{component-8c53e377.js → component-80f298b4.js} +2592 -793
- package/dist/esm/dynamic-box-bundle.entry.js +3 -1
- package/dist/esm/featured-list.entry.js +1 -1
- package/dist/esm/homepage-toggled-content.entry.js +3 -1
- package/dist/esm/innovator-toggle-container.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/modal-form-example.entry.js +105 -0
- package/dist/esm/ptc-announcement.entry.js +2 -1
- package/dist/esm/ptc-bio-card.entry.js +1 -1
- package/dist/esm/ptc-button.entry.js +1 -1
- package/dist/esm/ptc-card-bottom_2.entry.js +3 -17
- package/dist/esm/ptc-card-content.entry.js +1 -7
- package/dist/esm/ptc-card_2.entry.js +5 -4
- package/dist/esm/ptc-case-studies-slider.entry.js +1 -1
- package/dist/esm/ptc-close-icon_2.entry.js +24 -24
- package/dist/esm/ptc-data-lookup.entry.js +1 -2
- package/dist/esm/ptc-featured-list.entry.js +1 -1
- package/dist/esm/ptc-filter-level-theater.entry.js +1 -1
- package/dist/esm/{ptc-form-checkbox_2.entry.js → ptc-form-checkbox_4.entry.js} +722 -6
- package/dist/esm/ptc-img.entry.js +87 -7
- package/dist/esm/ptc-jumbotron.entry.js +11 -5
- package/dist/esm/ptc-modal-quiz.entry.js +4 -1
- package/dist/esm/ptc-para.entry.js +1 -1
- package/dist/esm/ptc-picture.entry.js +0 -17
- package/dist/esm/ptc-podcast-card.entry.js +1 -1
- package/dist/esm/ptc-preloader.entry.js +1 -1
- package/dist/esm/ptc-previous-url.entry.js +11 -2
- package/dist/esm/ptc-pricing-packaging-table.entry.js +25 -9
- package/dist/esm/ptc-pricing-tabs.entry.js +1 -1
- package/dist/esm/ptc-product-card.entry.js +1 -1
- package/dist/esm/ptc-product-category.entry.js +1 -1
- package/dist/esm/ptc-product-highlight-card.entry.js +1 -1
- package/dist/esm/ptc-readmore-char.entry.js +1 -1
- package/dist/esm/ptc-readmore-v3.entry.js +1 -1
- package/dist/esm/ptc-subnav-v2.entry.js +147 -247
- package/dist/esm/ptc-tooltip-v2.entry.js +1 -1
- package/dist/esm/ptc-value-led-speed-bump.entry.js +1 -1
- package/dist/esm/ptc-white-paper.entry.js +19 -9
- package/dist/esm/ptcw-design.js +1 -1
- package/dist/ptcw-design/media/designer-v6.0.7.svg +30 -2
- package/dist/ptcw-design/{p-614b66d8.entry.js → p-0451b768.entry.js} +1 -1
- package/dist/ptcw-design/p-04891836.entry.js +1 -0
- package/dist/ptcw-design/p-17b8281a.entry.js +1 -0
- package/dist/ptcw-design/p-187ef77b.entry.js +1 -0
- package/dist/ptcw-design/p-2670ac97.entry.js +1 -0
- package/dist/ptcw-design/p-2c8faf9a.entry.js +1 -0
- package/dist/ptcw-design/{p-4b41fe4e.entry.js → p-312c41b8.entry.js} +1 -1
- package/dist/ptcw-design/p-32bec5ef.entry.js +1 -0
- package/dist/ptcw-design/p-349f43d5.entry.js +1 -0
- package/dist/ptcw-design/p-390c0dee.entry.js +1 -0
- package/dist/ptcw-design/p-3b40bfbf.entry.js +68 -0
- package/dist/ptcw-design/p-502f534b.entry.js +1 -0
- package/dist/ptcw-design/p-53a96796.entry.js +1 -0
- package/dist/ptcw-design/p-672a349f.js +336 -0
- package/dist/ptcw-design/p-6f9f55b3.entry.js +1 -0
- package/dist/ptcw-design/{p-365646b8.entry.js → p-7218fe2c.entry.js} +1 -1
- package/dist/ptcw-design/{p-2a3c8a30.entry.js → p-7235425a.entry.js} +1 -1
- package/dist/ptcw-design/p-74097f89.entry.js +1 -0
- package/dist/ptcw-design/{p-af9912b6.entry.js → p-7834cfee.entry.js} +1 -1
- package/dist/ptcw-design/p-799afee5.entry.js +1 -0
- package/dist/ptcw-design/p-7fe4d383.entry.js +1 -0
- package/dist/ptcw-design/p-8fb48953.entry.js +1 -0
- package/dist/ptcw-design/p-96f346c4.entry.js +1 -0
- package/dist/ptcw-design/{p-db882e62.entry.js → p-9da57f76.entry.js} +1 -1
- package/dist/ptcw-design/p-b06bc0a1.entry.js +1 -0
- package/dist/ptcw-design/{p-121a9ef6.entry.js → p-b0a16f1a.entry.js} +1 -1
- package/dist/ptcw-design/p-b684ca9d.entry.js +1 -0
- package/dist/ptcw-design/p-c09a8288.entry.js +1 -0
- package/dist/ptcw-design/p-cb0e3ec2.entry.js +1 -0
- package/dist/ptcw-design/p-de960790.entry.js +1 -0
- package/dist/ptcw-design/p-e3a6ed56.entry.js +1 -0
- package/dist/ptcw-design/p-ef870202.entry.js +1 -0
- package/dist/ptcw-design/{p-f0958536.entry.js → p-f010c07f.entry.js} +1 -1
- package/dist/ptcw-design/p-f6b70f68.entry.js +1 -0
- package/dist/ptcw-design/ptcw-design.css +4 -3
- package/dist/ptcw-design/ptcw-design.esm.js +1 -1
- package/dist/types/components/organism-bundles/form/modal-from-example/modal-form-example.d.ts +25 -0
- package/dist/types/components/ptc-card-content/ptc-card-content.d.ts +1 -2
- package/dist/types/components/ptc-img/ptc-img.d.ts +29 -1
- package/dist/types/components/ptc-jumbotron/ptc-jumbotron.d.ts +4 -0
- package/dist/types/components/ptc-modal/ptc-modal.d.ts +1 -1
- package/dist/types/components/ptc-para/ptc-para.d.ts +1 -1
- package/dist/types/components/ptc-picture/ptc-picture.d.ts +0 -2
- package/dist/types/components/ptc-previous-url/ptc-previous-url.d.ts +2 -0
- package/dist/types/components/ptc-subnav-v2/ptc-subnav-v2.d.ts +6 -32
- package/dist/types/components.d.ts +53 -11
- package/package.json +1 -1
- package/readme.md +5 -1
- package/dist/cjs/component-1b8ad4d2.js +0 -1819
- package/dist/cjs/ptc-multi-select_2.cjs.entry.js +0 -730
- package/dist/collection/stories/organisms/ptc/Subnav New/preview.stories.js +0 -360
- package/dist/esm/component-9beac35b.js +0 -1802
- package/dist/esm/ptc-multi-select_2.entry.js +0 -725
- package/dist/ptcw-design/p-009fbf1f.entry.js +0 -1
- package/dist/ptcw-design/p-00e21489.entry.js +0 -1
- package/dist/ptcw-design/p-14ba0f06.entry.js +0 -1
- package/dist/ptcw-design/p-1a853854.entry.js +0 -1
- package/dist/ptcw-design/p-1f15239e.entry.js +0 -1
- package/dist/ptcw-design/p-1f356fcf.entry.js +0 -1
- package/dist/ptcw-design/p-2bfd8371.entry.js +0 -1
- package/dist/ptcw-design/p-2e6e2a9d.entry.js +0 -1
- package/dist/ptcw-design/p-3ed4a7ed.entry.js +0 -1
- package/dist/ptcw-design/p-56a73429.entry.js +0 -1
- package/dist/ptcw-design/p-80ee97a2.entry.js +0 -1
- package/dist/ptcw-design/p-850a6205.entry.js +0 -1
- package/dist/ptcw-design/p-8aeb229a.entry.js +0 -1
- package/dist/ptcw-design/p-8ef0e26e.entry.js +0 -68
- package/dist/ptcw-design/p-9493dfa0.entry.js +0 -1
- package/dist/ptcw-design/p-95efe7ee.entry.js +0 -1
- package/dist/ptcw-design/p-98426799.js +0 -203
- package/dist/ptcw-design/p-98844b50.js +0 -134
- package/dist/ptcw-design/p-a9533f9c.entry.js +0 -1
- package/dist/ptcw-design/p-b44f4fb1.entry.js +0 -1
- package/dist/ptcw-design/p-b5e849da.entry.js +0 -1
- package/dist/ptcw-design/p-b89136c6.entry.js +0 -1
- package/dist/ptcw-design/p-c42e9110.entry.js +0 -1
- package/dist/ptcw-design/p-cad4b517.entry.js +0 -1
- package/dist/ptcw-design/p-e976a798.entry.js +0 -1
- package/dist/ptcw-design/p-f13c7959.entry.js +0 -1
- package/dist/ptcw-design/p-f3d3c161.entry.js +0 -1
|
@@ -4,26 +4,25 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-63ddc79c.js');
|
|
6
6
|
|
|
7
|
-
const ptcSubnavV2Css = "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 .mobile-dropdown-container .mobile-dropdown-button,:host .subnav-menu-left .overflow-menu-container .overflow-button,:host .subnav-menu-left ul.desktop-menu li a{color:var(--color-gray-07);text-decoration:none;padding:8px 12px;text-align:center;font-family:var(--ptc-font-latin);font-style:var(--ptc-font-style-normal);font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-bold);line-height:18px;display:flex;align-items:center;position:relative;border-bottom:3px solid transparent;height:100%;box-sizing:border-box;transition:all 0.2s ease}:host .subnav-menu-left .overflow-menu-container .overflow-dropdown{position:absolute;top:100%;background:var(--color-standard-gray);border-radius:var(--ptc-border-radius-standard);box-shadow:var(--ptc-shadow-x-large);z-index:1001;padding:14px 0;margin-top:-4px;max-width:312px;width:-moz-max-content;width:max-content}:host .mobile-dropdown-container .mobile-dropdown li .mobile-dropdown-item,:host .subnav-menu-left .overflow-menu-container .overflow-dropdown a{display:block;padding:10px 32px 10px 24px;color:var(--color-gray-07);text-decoration:none;font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-densest);transition:all 0.2s ease;position:relative;border:none}:host{position:relative;display:block;font-family:var(--ptc-font-latin);background-color:var(--color-standard-gray);box-shadow:var(--ptc-shadow-small);transition:all 0.3s ease-in-out}:host.sticky-transition{transition:transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease-in-out, background-color 0.3s ease-in-out;box-shadow:0 2px 8px rgba(0, 0, 0, 0.15)}:host .subnav-container{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:0 24px;margin:0 auto;max-width:1200px;gap:24px}@media only screen and (min-width: 768px){:host .subnav-container{flex-wrap:wrap;gap:48px}}@media only screen and (min-width: 1200px){:host .subnav-container{padding:0;max-width:1136px}}@media only screen and (min-width: 1440px){:host .subnav-container{padding:0;max-width:1200px}}:host .subnav-container.full-width{justify-content:flex-start}:host .subnav-menu-left{display:flex;align-items:center;flex:1;align-self:stretch}@media only screen and (min-width: 768px){:host .subnav-menu-left{justify-content:flex-start}}:host .subnav-menu-left ul.desktop-menu{list-style:none;padding:0;margin:0;display:flex;align-items:center;justify-content:center;gap:4px;flex-wrap:wrap;align-self:stretch}@media only screen and (min-width: 768px){:host .subnav-menu-left ul.desktop-menu{justify-content:flex-start;gap:32px}}:host .subnav-menu-left ul.desktop-menu li{display:inline-block;height:100%}@media only screen and (min-width: 768px){:host .subnav-menu-left ul.desktop-menu li a{padding:20px 0 17px 0}}:host .subnav-menu-left ul.desktop-menu li a:hover{color:var(--color-gray-10)}:host .subnav-menu-left ul.desktop-menu li a.active{color:var(--color-gray-10);border-bottom:3px solid var(--color-green-07)}:host .subnav-menu-left ul.desktop-menu li a:focus-visible{border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline)}:host .subnav-menu-left .overflow-menu-container{position:relative;display:none}@media only screen and (min-width: 768px){:host .subnav-menu-left .overflow-menu-container{display:inline-block}}:host .subnav-menu-left .overflow-menu-container .overflow-button{background:none;border:none;padding:20px 0 17px 0;cursor:pointer;justify-content:center;border-bottom:3px solid transparent;box-sizing:border-box}:host .subnav-menu-left .overflow-menu-container .overflow-button:hover{color:var(--color-gray-10)}:host .subnav-menu-left .overflow-menu-container .overflow-button:focus-visible{border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline)}:host .subnav-menu-left .overflow-menu-container .overflow-button .overflow-dots{border-radius:2px;border:1px solid var(--color-gray-07);line-height:1;width:18px;height:18px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all 0.2s ease;box-sizing:border-box}:host .subnav-menu-left .overflow-menu-container .overflow-button .overflow-dots:hover{background-color:var(--color-gray-04);border-color:var(--color-gray-04)}:host .subnav-menu-left .overflow-menu-container .overflow-button .overflow-dots:hover svg circle{fill:var(--color-gray-10)}:host .subnav-menu-left .overflow-menu-container .overflow-button .overflow-dots:focus-visible{border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline)}:host .subnav-menu-left .overflow-menu-container .overflow-button[aria-expanded],:host .subnav-menu-left .overflow-menu-container .overflow-button.selected-active{border-bottom-color:var(--color-green-07)}:host .subnav-menu-left .overflow-menu-container .overflow-button[aria-expanded] .overflow-dots,:host .subnav-menu-left .overflow-menu-container .overflow-button.selected-active .overflow-dots{background-color:var(--color-green-07);border-color:var(--color-green-07)}:host .subnav-menu-left .overflow-menu-container .overflow-button[aria-expanded] .overflow-dots svg circle,:host .subnav-menu-left .overflow-menu-container .overflow-button.selected-active .overflow-dots svg circle{fill:var(--color-white)}:host .subnav-menu-left .overflow-menu-container .overflow-dropdown.align-right{left:auto;right:-2px}:host .subnav-menu-left .overflow-menu-container .overflow-dropdown.align-left{left:0;right:auto}:host .subnav-menu-left .overflow-menu-container .overflow-dropdown a{text-align:left;line-height:18px}:host .subnav-menu-left .overflow-menu-container .overflow-dropdown a:hover{background-color:var(--color-gray-02);color:var(--color-gray-10)}:host .subnav-menu-left .overflow-menu-container .overflow-dropdown a.active{color:var(--color-gray-10);border-bottom:none}:host .subnav-menu-left .overflow-menu-container .overflow-dropdown a.active::before{content:\"\";display:block;width:2px;height:100%;background-color:var(--color-green-07);position:absolute;left:14px;top:0}:host .subnav-menu-left .overflow-menu-container .overflow-dropdown a:focus-visible{border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline)}:host .subnav-menu-left.full-width{flex:1;width:100%;justify-content:flex-start}:host .subnav-menu-left.full-width .desktop-menu{width:100%}:host .mobile-dropdown-container{position:relative;display:block;height:100%;box-sizing:border-box}@media only screen and (min-width: 768px){:host .mobile-dropdown-container{display:none !important}}:host .mobile-dropdown-container .mobile-dropdown-button{background:transparent;border:none;border-bottom:3px solid var(--color-green-07);padding:20px 0 17px 0;justify-content:center;gap:10px;cursor:pointer}:host .mobile-dropdown-container .mobile-dropdown-button:focus-visible{border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline)}:host .mobile-dropdown-container .mobile-dropdown-button[aria-expanded]{border-color:var(--color-green-07);color:var(--color-gray-10)}:host .mobile-dropdown-container .mobile-dropdown-button .mobile-selected-item{flex:1;text-align:left;color:var(--color-gray-07);font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-densest);display:-webkit-box;line-clamp:1;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;max-width:100%}:host .mobile-dropdown-container .mobile-dropdown-button .mobile-arrow{display:flex;align-items:center;justify-content:center;transition:transform 0.2s ease}:host .mobile-dropdown-container .mobile-dropdown-button .mobile-arrow svg{transition:transform 0.2s ease}:host .mobile-dropdown-container .mobile-dropdown-button .mobile-arrow.rotated svg{transform:rotate(180deg)}:host .mobile-dropdown-container .mobile-dropdown{position:absolute;top:calc(100% - 8px);left:-2px;background:var(--color-standard-gray);border-radius:var(--ptc-border-radius-standard);box-shadow:var(--ptc-shadow-medium);z-index:1001;margin:4px 0 0 0;overflow-y:auto;min-width:280px;width:-moz-fit-content;width:fit-content;list-style:none;padding:14px 0}:host .mobile-dropdown-container .mobile-dropdown li{display:block}:host .mobile-dropdown-container .mobile-dropdown li:last-child{border-bottom:none}:host .mobile-dropdown-container .mobile-dropdown li .mobile-dropdown-item{width:100%;background:none;text-align:left;cursor:pointer;word-break:break-word;display:block;box-sizing:border-box}:host .mobile-dropdown-container .mobile-dropdown li .mobile-dropdown-item.active{color:var(--color-gray-10)}:host .mobile-dropdown-container .mobile-dropdown li .mobile-dropdown-item.active::before{content:\"\";display:block;width:2px;height:100%;background-color:var(--color-green-07);position:absolute;left:14px;top:0}:host .mobile-dropdown-container .mobile-dropdown li .mobile-dropdown-item:focus-visible{border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline)}:host .subnav-menu-right{max-width:50%;padding:12px 0}@media only screen and (min-width: 768px){:host .subnav-menu-right{width:auto;max-width:300px}}";
|
|
7
|
+
const ptcSubnavV2Css = "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;font-family:var(--ptc-font-latin);position:sticky;top:0;z-index:105;background-color:var(--color-standard-gray);box-shadow:var(--ptc-shadow-small)}:host .subnav-container{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:0 24px;margin:0 auto;max-width:1200px;gap:24px}@media only screen and (min-width: 768px){:host .subnav-container{flex-wrap:wrap;gap:48px}}@media only screen and (min-width: 1200px){:host .subnav-container{padding-left:0;padding-right:0;max-width:1136px}}@media only screen and (min-width: 1440px){:host .subnav-container{padding-left:0;padding-right:0;max-width:1200px}}:host .subnav-menu-left{display:flex;align-items:center;flex:1}@media only screen and (min-width: 768px){:host .subnav-menu-left{justify-content:flex-start}}:host .subnav-menu-left ul.desktop-menu{list-style:none;padding:0;margin:0;display:flex;align-items:center;justify-content:center;gap:4px;flex-wrap:wrap;margin-bottom:-2px}@media only screen and (min-width: 768px){:host .subnav-menu-left ul.desktop-menu{justify-content:flex-start;gap:32px}}:host .subnav-menu-left ul.desktop-menu li{display:inline-block}:host .subnav-menu-left ul.desktop-menu li a{color:var(--color-gray-07);text-decoration:none;padding:8px 12px;font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-densest);display:block;position:relative;border-bottom:3px solid transparent}@media only screen and (min-width: 768px){:host .subnav-menu-left ul.desktop-menu li a{padding:20px 0 17px 0}}:host .subnav-menu-left ul.desktop-menu li a:hover{color:var(--color-gray-10)}:host .subnav-menu-left ul.desktop-menu li a.active{color:var(--color-gray-10);border-bottom:3px solid var(--color-green-07)}:host .subnav-menu-left ul.desktop-menu li a:focus-visible{border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline)}:host .subnav-menu-left .overflow-menu-container{position:relative;display:none}@media only screen and (min-width: 768px){:host .subnav-menu-left .overflow-menu-container{display:inline-block}}:host .subnav-menu-left .overflow-menu-container .overflow-button{background:none;border:none;padding:20px 0 17px 0;font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-bold);color:var(--color-gray-07);cursor:pointer;display:flex;align-items:center;justify-content:center;min-width:32px;border-bottom:3px solid transparent;transition:all 0.2s ease}:host .subnav-menu-left .overflow-menu-container .overflow-button:hover{color:var(--color-gray-10)}:host .subnav-menu-left .overflow-menu-container .overflow-button:focus-visible{border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline)}:host .subnav-menu-left .overflow-menu-container .overflow-button .overflow-dots{border-radius:2px;border:1px solid var(--color-gray-07);line-height:1;width:18px;height:18px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all 0.2s ease}:host .subnav-menu-left .overflow-menu-container .overflow-button .overflow-dots:hover{background-color:var(--color-gray-04);border-color:var(--color-gray-04)}:host .subnav-menu-left .overflow-menu-container .overflow-button .overflow-dots:hover svg circle{fill:var(--color-gray-10)}:host .subnav-menu-left .overflow-menu-container .overflow-button .overflow-dots:focus-visible{border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline)}:host .subnav-menu-left .overflow-menu-container .overflow-button[aria-expanded],:host .subnav-menu-left .overflow-menu-container .overflow-button.selected-active{border-bottom:3px solid var(--color-green-07)}:host .subnav-menu-left .overflow-menu-container .overflow-button[aria-expanded] .overflow-dots,:host .subnav-menu-left .overflow-menu-container .overflow-button.selected-active .overflow-dots{background-color:var(--color-green-07);border-color:var(--color-green-07)}:host .subnav-menu-left .overflow-menu-container .overflow-button[aria-expanded] .overflow-dots svg circle,:host .subnav-menu-left .overflow-menu-container .overflow-button.selected-active .overflow-dots svg circle{fill:var(--color-white)}:host .subnav-menu-left .overflow-menu-container .overflow-dropdown{position:absolute;top:100%;right:0;background:var(--color-white);border-radius:var(--ptc-border-radius-standard);box-shadow:var(--ptc-shadow-x-large);min-width:200px;z-index:1001;padding:14px 0;margin-top:-4px;max-width:312px;width:-moz-max-content;width:max-content}:host .subnav-menu-left .overflow-menu-container .overflow-dropdown a{display:block;padding:12px 32px 12px 24px;color:var(--color-gray-07);text-decoration:none;font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-densest);transition:all 0.2s ease;position:relative;border:none}:host .subnav-menu-left .overflow-menu-container .overflow-dropdown a:hover{background-color:var(--color-gray-02);color:var(--color-gray-10)}:host .subnav-menu-left .overflow-menu-container .overflow-dropdown a.active{color:var(--color-gray-10);border-bottom:none}:host .subnav-menu-left .overflow-menu-container .overflow-dropdown a.active::before{content:\"\";display:block;width:2px;height:calc(100% - 0px);background-color:var(--color-green-07);position:absolute;left:16px;top:0}:host .subnav-menu-left .overflow-menu-container .overflow-dropdown a:focus-visible{border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline)}:host .mobile-dropdown-container{position:relative;display:block}@media only screen and (min-width: 768px){:host .mobile-dropdown-container{display:none !important}}@media (min-width: 768px){:host .mobile-dropdown-container{display:none !important}}:host .mobile-dropdown-container .mobile-dropdown-button{display:flex;padding:20px 0 17px 0;justify-content:center;align-items:center;gap:10px;align-self:stretch;border:none;cursor:pointer;transition:all 0.2s ease;background-color:transparent;border-bottom:3px solid var(--color-green-07)}:host .mobile-dropdown-container .mobile-dropdown-button .mobile-selected-item{color:var(--color-gray-07);font-size:var(--ptc-font-size-xx-small);font-style:normal;font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-densest);display:-webkit-box;line-clamp:1;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;max-width:100%}:host .mobile-dropdown-container .mobile-dropdown-button:hover{border-color:var(--color-gray-04);color:var(--color-gray-10)}:host .mobile-dropdown-container .mobile-dropdown-button:focus-visible{border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline)}:host .mobile-dropdown-container .mobile-dropdown-button[aria-expanded]{border-color:var(--color-green-07);color:var(--color-gray-10)}:host .mobile-dropdown-container .mobile-dropdown-button .mobile-selected-item{flex:1;text-align:left}:host .mobile-dropdown-container .mobile-dropdown-button .mobile-arrow{display:flex;align-items:center;justify-content:center;transition:transform 0.2s ease}:host .mobile-dropdown-container .mobile-dropdown-button .mobile-arrow svg{transition:transform 0.2s ease}:host .mobile-dropdown-container .mobile-dropdown-button .mobile-arrow.rotated svg{transform:rotate(180deg)}:host .mobile-dropdown-container .mobile-dropdown{position:absolute;top:calc(100% - 4px);left:auto;right:auto;background:var(--color-white);border:1px solid var(--color-gray-02);border-radius:var(--ptc-border-radius-standard);box-shadow:var(--ptc-shadow-medium);z-index:1001;margin-top:4px;overflow-y:auto;min-width:280px;width:-moz-fit-content;width:fit-content;list-style:none;padding:0;margin:4px 0 0 0}:host .mobile-dropdown-container .mobile-dropdown li{display:block;border-bottom:1px solid var(--color-gray-01)}:host .mobile-dropdown-container .mobile-dropdown li:last-child{border-bottom:none}:host .mobile-dropdown-container .mobile-dropdown li .mobile-dropdown-item{width:100%;background:none;border:none;padding:12px 16px;color:var(--color-gray-07);text-decoration:none;font-size:var(--ptc-font-size-xx-small);font-weight:var(--ptc-font-weight-bold);line-height:var(--ptc-line-height-densest);text-align:left;cursor:pointer;transition:all 0.2s ease;word-break:break-word;display:block}:host .mobile-dropdown-container .mobile-dropdown li .mobile-dropdown-item:hover{background-color:var(--color-gray-01);color:var(--color-gray-10)}:host .mobile-dropdown-container .mobile-dropdown li .mobile-dropdown-item.active{background-color:var(--color-gray-01);color:var(--color-gray-10);border-left:3px solid var(--color-green-07)}:host .mobile-dropdown-container .mobile-dropdown li .mobile-dropdown-item:focus-visible{border-radius:var(--ptc-border-radius-standard);outline:5px solid var(--keyboard-nav-outline)}:host .subnav-menu-right{max-width:300px;padding:12px 0}@media only screen and (min-width: 768px){:host .subnav-menu-right{margin-left:48px;width:auto}}:host .subnav-menu-right ptc-button{max-width:300px}";
|
|
8
8
|
|
|
9
9
|
const PtcSubnavV2 = class {
|
|
10
10
|
constructor(hostRef) {
|
|
11
11
|
index.registerInstance(this, hostRef);
|
|
12
|
-
this.cachedNavItems = null;
|
|
13
|
-
this.isSticky = false;
|
|
14
|
-
this.originalTop = 0;
|
|
15
|
-
this.placeholderElement = null;
|
|
16
|
-
this.measurementElement = null;
|
|
17
12
|
this.handleClickOutside = (event) => {
|
|
18
|
-
|
|
13
|
+
const target = event.target;
|
|
14
|
+
if (!this.el.contains(target)) {
|
|
19
15
|
this.showOverflowMenu = false;
|
|
20
16
|
}
|
|
21
17
|
};
|
|
22
18
|
this.handleKeyDown = (event) => {
|
|
23
|
-
|
|
19
|
+
// Handle Escape key to close dropdowns
|
|
24
20
|
if (event.key === "Escape" && this.showOverflowMenu) {
|
|
25
21
|
this.showOverflowMenu = false;
|
|
26
|
-
|
|
22
|
+
// Return focus to the button that opened the menu
|
|
23
|
+
if (this.overflowButton) {
|
|
24
|
+
this.overflowButton.focus();
|
|
25
|
+
}
|
|
27
26
|
}
|
|
28
27
|
};
|
|
29
28
|
this.handleScroll = () => {
|
|
@@ -53,81 +52,23 @@ const PtcSubnavV2 = class {
|
|
|
53
52
|
// Only update if different from current active
|
|
54
53
|
if (activeSection !== this.currentActive) {
|
|
55
54
|
this.currentActive = activeSection;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const rect = this.el.getBoundingClientRect();
|
|
63
|
-
this.originalTop = rect.top + window.scrollY;
|
|
64
|
-
};
|
|
65
|
-
this.handleStickyScroll = () => {
|
|
66
|
-
// Throttle sticky scroll events for better performance
|
|
67
|
-
if (this.stickyScrollTimeout) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
this.stickyScrollTimeout = window.setTimeout(() => {
|
|
71
|
-
var _a;
|
|
72
|
-
const scrollY = window.scrollY;
|
|
73
|
-
// Check if we should make the subnav sticky
|
|
74
|
-
const shouldBeSticky = scrollY >= this.originalTop;
|
|
75
|
-
if (shouldBeSticky && !this.isSticky) {
|
|
76
|
-
// Store the original height before making it fixed
|
|
77
|
-
const originalHeight = this.el.offsetHeight;
|
|
78
|
-
// Create placeholder element to maintain space
|
|
79
|
-
this.placeholderElement = document.createElement("div");
|
|
80
|
-
this.placeholderElement.style.height = `${originalHeight}px`;
|
|
81
|
-
this.placeholderElement.style.width = "100%";
|
|
82
|
-
this.placeholderElement.style.pointerEvents = "none";
|
|
83
|
-
// Insert placeholder before the subnav
|
|
84
|
-
(_a = this.el.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(this.placeholderElement, this.el);
|
|
85
|
-
// Add transition class for smooth animation
|
|
86
|
-
this.el.classList.add("sticky-transition");
|
|
87
|
-
// Apply fixed positioning with smooth transition
|
|
88
|
-
this.el.style.position = "fixed";
|
|
89
|
-
this.el.style.top = "0";
|
|
90
|
-
this.el.style.left = "0";
|
|
91
|
-
this.el.style.right = "0";
|
|
92
|
-
this.el.style.width = "100%";
|
|
93
|
-
this.el.style.zIndex = "105";
|
|
94
|
-
this.el.style.transform = "translateY(0)";
|
|
95
|
-
this.isSticky = true;
|
|
96
|
-
}
|
|
97
|
-
else if (!shouldBeSticky && this.isSticky) {
|
|
98
|
-
// Remove transition class and reset transform
|
|
99
|
-
this.el.classList.remove("sticky-transition");
|
|
100
|
-
this.el.style.transform = "";
|
|
101
|
-
// Remove fixed positioning and restore original position
|
|
102
|
-
this.el.style.position = "";
|
|
103
|
-
this.el.style.top = "";
|
|
104
|
-
this.el.style.left = "";
|
|
105
|
-
this.el.style.right = "";
|
|
106
|
-
this.el.style.width = "";
|
|
107
|
-
this.el.style.zIndex = "";
|
|
108
|
-
this.isSticky = false;
|
|
109
|
-
// Remove placeholder element
|
|
110
|
-
if (this.placeholderElement) {
|
|
111
|
-
this.placeholderElement.remove();
|
|
112
|
-
this.placeholderElement = null;
|
|
55
|
+
// Update mobile selected item if in mobile mode
|
|
56
|
+
if (this.isMobile) {
|
|
57
|
+
const activeItem = navItems.find((item) => item.id === activeSection);
|
|
58
|
+
if (activeItem) {
|
|
59
|
+
this.selectedMobileItem = activeItem;
|
|
60
|
+
}
|
|
113
61
|
}
|
|
114
62
|
}
|
|
115
|
-
this.
|
|
63
|
+
this.scrollThrottleTimeout = null;
|
|
116
64
|
}, 16); // ~60fps throttling
|
|
117
65
|
};
|
|
118
66
|
this.handleResize = () => {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
else if (this.placeholderElement) {
|
|
125
|
-
// Update placeholder height if sticky and resized
|
|
126
|
-
const currentHeight = this.el.offsetHeight;
|
|
127
|
-
this.placeholderElement.style.height = `${currentHeight}px`;
|
|
128
|
-
// Update originalTop based on placeholder position (layout may have changed)
|
|
129
|
-
const placeholderRect = this.placeholderElement.getBoundingClientRect();
|
|
130
|
-
this.originalTop = placeholderRect.top + window.scrollY;
|
|
67
|
+
if (this.navContainer) {
|
|
68
|
+
// Add a small delay to ensure DOM has been updated
|
|
69
|
+
setTimeout(() => {
|
|
70
|
+
this.calculateVisibleItems();
|
|
71
|
+
}, 10);
|
|
131
72
|
}
|
|
132
73
|
};
|
|
133
74
|
this.setupIntersectionObserver = () => {
|
|
@@ -164,6 +105,13 @@ const PtcSubnavV2 = class {
|
|
|
164
105
|
const sectionId = mostVisibleSection.target.id;
|
|
165
106
|
if (sectionId && sectionId !== this.currentActive) {
|
|
166
107
|
this.currentActive = sectionId;
|
|
108
|
+
// Update mobile selected item if in mobile mode
|
|
109
|
+
if (this.isMobile) {
|
|
110
|
+
const activeItem = navItems.find((item) => item.id === sectionId);
|
|
111
|
+
if (activeItem) {
|
|
112
|
+
this.selectedMobileItem = activeItem;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
167
115
|
}
|
|
168
116
|
}
|
|
169
117
|
}, 100); // Increased debounce time for better performance
|
|
@@ -180,76 +128,80 @@ const PtcSubnavV2 = class {
|
|
|
180
128
|
}
|
|
181
129
|
});
|
|
182
130
|
};
|
|
183
|
-
this.setupResizeObserver = () => {
|
|
184
|
-
// Observe the parent element for layout changes
|
|
185
|
-
this.resizeObserver = new ResizeObserver(() => {
|
|
186
|
-
// Recalculate sticky position when parent layout changes
|
|
187
|
-
if (!this.isSticky) {
|
|
188
|
-
this.initializeStickyPosition();
|
|
189
|
-
}
|
|
190
|
-
else if (this.placeholderElement) {
|
|
191
|
-
// If sticky, update originalTop based on placeholder position
|
|
192
|
-
const placeholderRect = this.placeholderElement.getBoundingClientRect();
|
|
193
|
-
this.originalTop = placeholderRect.top + window.scrollY;
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
// Observe the element's parent or the element itself
|
|
197
|
-
if (this.el.parentElement) {
|
|
198
|
-
this.resizeObserver.observe(this.el.parentElement);
|
|
199
|
-
}
|
|
200
|
-
};
|
|
201
131
|
this.extractNavItemsFromSlots = () => {
|
|
132
|
+
// Look for slot content with nav-items in the light DOM
|
|
202
133
|
const slotElement = this.el.querySelector('[slot="nav-items"]');
|
|
203
|
-
if (
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
})
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
134
|
+
if (slotElement) {
|
|
135
|
+
const links = slotElement.querySelectorAll("a");
|
|
136
|
+
const items = Array.from(links)
|
|
137
|
+
.map((link) => {
|
|
138
|
+
var _a, _b;
|
|
139
|
+
return ({
|
|
140
|
+
id: ((_a = link.getAttribute("href")) === null || _a === void 0 ? void 0 : _a.substring(1)) || "",
|
|
141
|
+
label: ((_b = link.textContent) === null || _b === void 0 ? void 0 : _b.trim()) || "",
|
|
142
|
+
title: link.getAttribute("title") || "",
|
|
143
|
+
trackerId: link.getAttribute("tracker-id") || "",
|
|
144
|
+
});
|
|
145
|
+
})
|
|
146
|
+
.filter((item) => item.id && item.label);
|
|
147
|
+
if (items.length > 0) {
|
|
148
|
+
return items;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
return null;
|
|
218
152
|
};
|
|
219
153
|
this.getNavItems = () => {
|
|
220
|
-
// Return cached items if available
|
|
221
|
-
if (this.cachedNavItems) {
|
|
222
|
-
return this.cachedNavItems;
|
|
223
|
-
}
|
|
224
154
|
// Extract navigation items from slots (SEO-friendly approach)
|
|
225
155
|
const slotItems = this.extractNavItemsFromSlots();
|
|
226
156
|
if (slotItems) {
|
|
227
|
-
this.cachedNavItems = slotItems;
|
|
228
157
|
return slotItems;
|
|
229
158
|
}
|
|
230
159
|
// If navItems prop is provided, parse and use it (fallback)
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
160
|
+
if (this.navItems && this.navItems.trim()) {
|
|
161
|
+
try {
|
|
162
|
+
const parsedItems = JSON.parse(this.navItems);
|
|
163
|
+
// Validate that it's an array with proper structure
|
|
164
|
+
if (Array.isArray(parsedItems) && parsedItems.length > 0) {
|
|
165
|
+
// Ensure each item has required properties
|
|
166
|
+
const validItems = parsedItems.filter((item) => item &&
|
|
167
|
+
typeof item.id === "string" &&
|
|
168
|
+
typeof item.label === "string");
|
|
169
|
+
if (validItems.length > 0) {
|
|
170
|
+
return validItems;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
catch (error) {
|
|
175
|
+
console.warn("Invalid navItems JSON provided to ptc-subnav-v2:", error);
|
|
176
|
+
}
|
|
235
177
|
}
|
|
236
178
|
// Return empty array if no navigation items found
|
|
237
179
|
console.warn("No navigation items found in slots or props for ptc-subnav-v2");
|
|
238
180
|
return [];
|
|
239
181
|
};
|
|
182
|
+
this.calculateMobileDropdownItems = () => {
|
|
183
|
+
const navItems = this.getNavItems();
|
|
184
|
+
// Handle case where no navigation items are found
|
|
185
|
+
if (navItems.length === 0) {
|
|
186
|
+
this.mobileDropdownItems = [];
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
const currentItem = this.selectedMobileItem || {
|
|
190
|
+
id: this.currentActive,
|
|
191
|
+
};
|
|
192
|
+
// Filter out the currently selected item from all nav items
|
|
193
|
+
this.mobileDropdownItems = navItems.filter((item) => item.id !== currentItem.id);
|
|
194
|
+
};
|
|
240
195
|
this.hasActiveOverflowItem = () => {
|
|
241
196
|
return this.overflowItems.some((item) => item.id === this.currentActive);
|
|
242
197
|
};
|
|
243
|
-
this.hasSubnavMenuRightContent = () => {
|
|
244
|
-
const slotElement = this.el.querySelector('[slot="subnav-menu-right"]');
|
|
245
|
-
return Boolean(slotElement === null || slotElement === void 0 ? void 0 : slotElement.children.length);
|
|
246
|
-
};
|
|
247
198
|
this.calculateVisibleItems = () => {
|
|
248
199
|
const navItems = this.getNavItems();
|
|
249
200
|
// Handle case where no navigation items are found
|
|
250
201
|
if (navItems.length === 0) {
|
|
251
202
|
this.visibleItems = [];
|
|
252
203
|
this.overflowItems = [];
|
|
204
|
+
this.selectedMobileItem = null;
|
|
253
205
|
return;
|
|
254
206
|
}
|
|
255
207
|
// Check if we're in mobile mode (below 767px)
|
|
@@ -263,6 +215,7 @@ const PtcSubnavV2 = class {
|
|
|
263
215
|
// On mobile, show only the current active item
|
|
264
216
|
const activeItem = navItems.find((item) => item.id === this.currentActive) ||
|
|
265
217
|
navItems[0];
|
|
218
|
+
this.selectedMobileItem = activeItem;
|
|
266
219
|
this.visibleItems = [activeItem];
|
|
267
220
|
this.overflowItems = navItems.filter((item) => item.id !== activeItem.id);
|
|
268
221
|
}
|
|
@@ -283,21 +236,19 @@ const PtcSubnavV2 = class {
|
|
|
283
236
|
}
|
|
284
237
|
let visibleCount = 0;
|
|
285
238
|
let totalWidth = 0;
|
|
286
|
-
// Create
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
document.body.appendChild(this.measurementElement);
|
|
296
|
-
}
|
|
239
|
+
// Create temporary elements to measure width
|
|
240
|
+
const tempContainer = document.createElement("div");
|
|
241
|
+
tempContainer.style.position = "absolute";
|
|
242
|
+
tempContainer.style.visibility = "hidden";
|
|
243
|
+
tempContainer.style.whiteSpace = "nowrap";
|
|
244
|
+
tempContainer.style.fontSize = "14px";
|
|
245
|
+
tempContainer.style.fontWeight = "700";
|
|
246
|
+
tempContainer.style.padding = "20px 0 17px 0";
|
|
247
|
+
document.body.appendChild(tempContainer);
|
|
297
248
|
for (let i = 0; i < navItems.length; i++) {
|
|
298
249
|
const item = navItems[i];
|
|
299
|
-
|
|
300
|
-
const itemWidth =
|
|
250
|
+
tempContainer.textContent = item.label;
|
|
251
|
+
const itemWidth = tempContainer.offsetWidth + 32; // 32px for gap
|
|
301
252
|
if (totalWidth + itemWidth <= availableWidth) {
|
|
302
253
|
totalWidth += itemWidth;
|
|
303
254
|
visibleCount++;
|
|
@@ -306,6 +257,7 @@ const PtcSubnavV2 = class {
|
|
|
306
257
|
break;
|
|
307
258
|
}
|
|
308
259
|
}
|
|
260
|
+
document.body.removeChild(tempContainer);
|
|
309
261
|
this.visibleItems = navItems.slice(0, visibleCount);
|
|
310
262
|
this.overflowItems = navItems.slice(visibleCount);
|
|
311
263
|
}
|
|
@@ -314,27 +266,19 @@ const PtcSubnavV2 = class {
|
|
|
314
266
|
};
|
|
315
267
|
this.toggleOverflowMenu = () => {
|
|
316
268
|
this.showOverflowMenu = !this.showOverflowMenu;
|
|
317
|
-
// After opening, measure and decide alignment to avoid viewport overflow
|
|
318
|
-
if (!this.showOverflowMenu) {
|
|
319
|
-
return;
|
|
320
|
-
}
|
|
321
|
-
requestAnimationFrame(() => {
|
|
322
|
-
const container = this.overflowMenuContainer;
|
|
323
|
-
const dropdown = this.overflowDropdownEl;
|
|
324
|
-
if (!container || !dropdown)
|
|
325
|
-
return;
|
|
326
|
-
const containerRect = container.getBoundingClientRect();
|
|
327
|
-
// Default positioning is right: -2px inside container
|
|
328
|
-
const dropdownWidth = dropdown.offsetWidth || 0;
|
|
329
|
-
const rightEdge = containerRect.right + 2;
|
|
330
|
-
const leftEdge = rightEdge - dropdownWidth;
|
|
331
|
-
// If left edge would be off the viewport, flip to left aligned
|
|
332
|
-
this.overflowDropdownAlignLeft = leftEdge < 8; // keep a small gutter
|
|
333
|
-
});
|
|
334
269
|
};
|
|
335
270
|
this.handleNavClick = (event, section) => {
|
|
336
271
|
event.preventDefault();
|
|
337
272
|
this.currentActive = section;
|
|
273
|
+
// Update mobile selected item if in mobile mode
|
|
274
|
+
if (this.isMobile) {
|
|
275
|
+
const navItems = this.getNavItems();
|
|
276
|
+
const activeItem = navItems.find((item) => item.id === section);
|
|
277
|
+
if (activeItem) {
|
|
278
|
+
this.selectedMobileItem = activeItem;
|
|
279
|
+
this.calculateMobileDropdownItems();
|
|
280
|
+
}
|
|
281
|
+
}
|
|
338
282
|
// Set manual navigation flag to prevent intersection observer from overriding
|
|
339
283
|
this.isManualNavigation = true;
|
|
340
284
|
// Clear any existing manual navigation timeout
|
|
@@ -352,19 +296,12 @@ const PtcSubnavV2 = class {
|
|
|
352
296
|
composed: true,
|
|
353
297
|
});
|
|
354
298
|
this.el.dispatchEvent(customEvent);
|
|
355
|
-
// Smooth scroll to section if it exists
|
|
299
|
+
// Smooth scroll to section if it exists
|
|
356
300
|
const targetElement = document.querySelector(`#${section}`);
|
|
357
301
|
if (targetElement) {
|
|
358
|
-
|
|
359
|
-
const navHeight = this.el.offsetHeight;
|
|
360
|
-
// Calculate the target position with offset
|
|
361
|
-
const targetPosition = targetElement.getBoundingClientRect().top +
|
|
362
|
-
window.scrollY -
|
|
363
|
-
navHeight;
|
|
364
|
-
// Smooth scroll to the adjusted position
|
|
365
|
-
window.scrollTo({
|
|
366
|
-
top: targetPosition,
|
|
302
|
+
targetElement.scrollIntoView({
|
|
367
303
|
behavior: "smooth",
|
|
304
|
+
block: "start",
|
|
368
305
|
});
|
|
369
306
|
}
|
|
370
307
|
};
|
|
@@ -374,113 +311,75 @@ const PtcSubnavV2 = class {
|
|
|
374
311
|
this.visibleItems = [];
|
|
375
312
|
this.overflowItems = [];
|
|
376
313
|
this.showOverflowMenu = false;
|
|
377
|
-
this.
|
|
314
|
+
this.containerWidth = 0;
|
|
378
315
|
this.isMobile = false;
|
|
316
|
+
this.selectedMobileItem = null;
|
|
379
317
|
this.isManualNavigation = false;
|
|
318
|
+
this.mobileDropdownItems = [];
|
|
380
319
|
}
|
|
381
320
|
componentWillLoad() {
|
|
382
321
|
this.currentActive = this.activeSection;
|
|
322
|
+
// Initialize selected mobile item with the current active section
|
|
323
|
+
const navItems = this.getNavItems();
|
|
324
|
+
if (navItems.length > 0) {
|
|
325
|
+
this.selectedMobileItem =
|
|
326
|
+
navItems.find((item) => item.id === this.activeSection) ||
|
|
327
|
+
navItems[0];
|
|
328
|
+
}
|
|
329
|
+
else {
|
|
330
|
+
this.selectedMobileItem = null;
|
|
331
|
+
}
|
|
332
|
+
this.calculateMobileDropdownItems();
|
|
383
333
|
}
|
|
384
334
|
componentDidLoad() {
|
|
385
|
-
|
|
386
|
-
this.handleResize();
|
|
387
|
-
this.addEventListeners();
|
|
388
|
-
this.setupIntersectionObserver();
|
|
389
|
-
this.setupResizeObserver();
|
|
390
|
-
this.initializeStickyPosition();
|
|
391
|
-
}
|
|
392
|
-
bindEventHandlers() {
|
|
335
|
+
// Bind the functions once
|
|
393
336
|
this.boundHandleResize = this.handleResize.bind(this);
|
|
394
337
|
this.boundHandleClickOutside = this.handleClickOutside.bind(this);
|
|
395
338
|
this.boundHandleScroll = this.handleScroll.bind(this);
|
|
396
339
|
this.boundHandleKeyDown = this.handleKeyDown.bind(this);
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
340
|
+
// Recalculate navigation items in case slots are used
|
|
341
|
+
this.calculateMobileDropdownItems();
|
|
342
|
+
this.handleResize();
|
|
400
343
|
window.addEventListener("resize", this.boundHandleResize);
|
|
401
344
|
document.addEventListener("click", this.boundHandleClickOutside);
|
|
402
345
|
document.addEventListener("keydown", this.boundHandleKeyDown);
|
|
346
|
+
// Setup intersection observer for scroll-based active state
|
|
347
|
+
this.setupIntersectionObserver();
|
|
348
|
+
// Add scroll listener as fallback
|
|
403
349
|
window.addEventListener("scroll", this.boundHandleScroll, {
|
|
404
350
|
passive: true,
|
|
405
351
|
});
|
|
406
|
-
window.addEventListener("scroll", this.boundHandleStickyScroll, {
|
|
407
|
-
passive: true,
|
|
408
|
-
});
|
|
409
352
|
}
|
|
410
353
|
disconnectedCallback() {
|
|
411
|
-
this.removeEventListeners();
|
|
412
|
-
this.cleanupTimeouts();
|
|
413
|
-
this.cleanupIntersectionObserver();
|
|
414
|
-
this.cleanupResizeObserver();
|
|
415
|
-
this.cleanupElements();
|
|
416
|
-
}
|
|
417
|
-
removeEventListeners() {
|
|
418
354
|
window.removeEventListener("resize", this.boundHandleResize);
|
|
419
355
|
document.removeEventListener("click", this.boundHandleClickOutside);
|
|
420
356
|
document.removeEventListener("keydown", this.boundHandleKeyDown);
|
|
421
357
|
window.removeEventListener("scroll", this.boundHandleScroll);
|
|
422
|
-
|
|
423
|
-
}
|
|
424
|
-
cleanupTimeouts() {
|
|
425
|
-
if (this.scrollTimeout)
|
|
426
|
-
clearTimeout(this.scrollTimeout);
|
|
427
|
-
if (this.scrollThrottleTimeout)
|
|
428
|
-
clearTimeout(this.scrollThrottleTimeout);
|
|
429
|
-
if (this.manualNavigationTimeout)
|
|
430
|
-
clearTimeout(this.manualNavigationTimeout);
|
|
431
|
-
if (this.stickyScrollTimeout)
|
|
432
|
-
clearTimeout(this.stickyScrollTimeout);
|
|
433
|
-
}
|
|
434
|
-
cleanupIntersectionObserver() {
|
|
358
|
+
// Clean up intersection observer
|
|
435
359
|
if (this.intersectionObserver) {
|
|
436
360
|
this.intersectionObserver.disconnect();
|
|
437
361
|
}
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
this.resizeObserver.disconnect();
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
cleanupElements() {
|
|
445
|
-
if (this.placeholderElement) {
|
|
446
|
-
this.placeholderElement.remove();
|
|
447
|
-
this.placeholderElement = null;
|
|
448
|
-
}
|
|
449
|
-
if (this.measurementElement) {
|
|
450
|
-
this.measurementElement.remove();
|
|
451
|
-
this.measurementElement = null;
|
|
362
|
+
// Clean up scroll timeout
|
|
363
|
+
if (this.scrollTimeout) {
|
|
364
|
+
clearTimeout(this.scrollTimeout);
|
|
452
365
|
}
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
if (!((_a = this.navItems) === null || _a === void 0 ? void 0 : _a.trim()))
|
|
457
|
-
return null;
|
|
458
|
-
try {
|
|
459
|
-
const parsedItems = JSON.parse(this.navItems);
|
|
460
|
-
if (Array.isArray(parsedItems) && parsedItems.length > 0) {
|
|
461
|
-
const validItems = parsedItems.filter((item) => Boolean(item &&
|
|
462
|
-
typeof item.id === "string" &&
|
|
463
|
-
typeof item.label === "string"));
|
|
464
|
-
return validItems.length > 0 ? validItems : null;
|
|
465
|
-
}
|
|
366
|
+
// Clean up scroll throttle timeout
|
|
367
|
+
if (this.scrollThrottleTimeout) {
|
|
368
|
+
clearTimeout(this.scrollThrottleTimeout);
|
|
466
369
|
}
|
|
467
|
-
|
|
468
|
-
|
|
370
|
+
// Clean up manual navigation timeout
|
|
371
|
+
if (this.manualNavigationTimeout) {
|
|
372
|
+
clearTimeout(this.manualNavigationTimeout);
|
|
469
373
|
}
|
|
470
|
-
return null;
|
|
471
374
|
}
|
|
472
375
|
render() {
|
|
376
|
+
var _a, _b;
|
|
473
377
|
const navItems = this.getNavItems();
|
|
474
|
-
const hasRightContent = this.hasSubnavMenuRightContent();
|
|
475
|
-
const selectedMobileItem = this.isMobile
|
|
476
|
-
? navItems.find((item) => item.id === this.currentActive) ||
|
|
477
|
-
navItems[0]
|
|
478
|
-
: null;
|
|
479
378
|
// If no navigation items, don't render the navigation
|
|
480
379
|
if (navItems.length === 0) {
|
|
481
|
-
return (index.h(index.Host, null, index.h("div", { class:
|
|
380
|
+
return (index.h(index.Host, null, index.h("div", { class: "subnav-container" }, index.h("div", { class: "subnav-menu-right" }, index.h("slot", { name: "subnav-menu-right" })))));
|
|
482
381
|
}
|
|
483
|
-
return (index.h(index.Host, null, index.h("div", { class:
|
|
382
|
+
return (index.h(index.Host, null, index.h("div", { class: "subnav-container" }, index.h("nav", { class: "subnav-menu-left", role: "navigation", "aria-label": "Sub navigation", ref: (el) => (this.navContainer = el) }, this.isMobile ? (
|
|
484
383
|
// Mobile layout - dropdown with arrows
|
|
485
384
|
index.h("div", { class: "mobile-dropdown-container" }, index.h("button", { class: "mobile-dropdown-button", onClick: this.toggleOverflowMenu, onKeyDown: (e) => {
|
|
486
385
|
if (e.key === "Enter" ||
|
|
@@ -488,31 +387,32 @@ const PtcSubnavV2 = class {
|
|
|
488
387
|
e.preventDefault();
|
|
489
388
|
this.toggleOverflowMenu();
|
|
490
389
|
}
|
|
491
|
-
}, "aria-expanded": this.showOverflowMenu, "aria-haspopup": "true", "aria-label": `${(selectedMobileItem === null ||
|
|
492
|
-
"Select Section"), index.h("span", { class: `mobile-arrow ${this.showOverflowMenu ? "rotated" : ""}`, "aria-hidden": "true" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "8", viewBox: "0 0 12 8", fill: "none", "aria-hidden": "true" }, index.h("path", { d: "M1 1.5L5.94975 6.44975L10.8995 1.5", stroke: "#00890B", "stroke-width": "2", "stroke-linecap": "round" })))), this.showOverflowMenu && (index.h("ul", { class: "mobile-dropdown", role: "menu", "aria-label": "Navigation sections" },
|
|
493
|
-
|
|
390
|
+
}, "aria-expanded": this.showOverflowMenu, "aria-haspopup": "true", "aria-label": `${((_a = this.selectedMobileItem) === null || _a === void 0 ? void 0 : _a.label) || "Select Section"} - Choose navigation section`, "tracker-id": "mobile-dropdown-button", ref: (el) => (this.overflowButton = el) }, index.h("span", { class: "mobile-selected-item" }, ((_b = this.selectedMobileItem) === null || _b === void 0 ? void 0 : _b.label) ||
|
|
391
|
+
"Select Section"), index.h("span", { class: `mobile-arrow ${this.showOverflowMenu ? "rotated" : ""}`, "aria-hidden": "true" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "8", viewBox: "0 0 12 8", fill: "none", "aria-hidden": "true" }, index.h("path", { d: "M1 1.5L5.94975 6.44975L10.8995 1.5", stroke: "#00890B", "stroke-width": "2", "stroke-linecap": "round" })))), this.showOverflowMenu && (index.h("ul", { class: "mobile-dropdown", role: "menu", "aria-label": "Navigation sections" }, this.mobileDropdownItems.map((item) => (index.h("li", { key: item.id }, index.h("a", { href: `#${item.id}`, class: `mobile-dropdown-item mf-listen ${this
|
|
392
|
+
.currentActive ===
|
|
494
393
|
item.id
|
|
495
394
|
? "active"
|
|
496
|
-
: ""}`, role: "menuitem", "aria-current": this
|
|
395
|
+
: ""}`, role: "menuitem", "aria-current": this
|
|
396
|
+
.currentActive ===
|
|
497
397
|
item.id
|
|
498
398
|
? "page"
|
|
499
|
-
: undefined,
|
|
399
|
+
: undefined, "tracker-id": item.trackerId ||
|
|
400
|
+
`mobile-nav-${item.id}`, title: item.title || "", onClick: (e) => {
|
|
500
401
|
this.handleNavClick(e, item.id);
|
|
501
402
|
this.showOverflowMenu = false;
|
|
502
403
|
} }, item.label)))))))) : (
|
|
503
404
|
// Desktop layout - original behavior
|
|
504
|
-
index.h("ul", { class: "desktop-menu" }, this.visibleItems.map((item) => (index.h("li", { key: item.id, class: "mf-listen", id: item.trackerId || `nav-${item.id}` }, index.h("a", { href: `#${item.id}`, class: this.currentActive === item.id
|
|
405
|
+
index.h("ul", { class: "desktop-menu" }, this.visibleItems.map((item) => (index.h("li", { key: item.id, class: "mf-listen", "tracker-id": item.trackerId || `nav-${item.id}` }, index.h("a", { href: `#${item.id}`, class: this.currentActive === item.id
|
|
505
406
|
? "active"
|
|
506
407
|
: "", title: item.title || "", onClick: (e) => this.handleNavClick(e, item.id), "aria-current": this.currentActive === item.id
|
|
507
408
|
? "page"
|
|
508
|
-
: undefined }, item.label)))), this.overflowItems.length > 0 && (index.h("li", { class: "overflow-menu-container mf-listen", id: "overflow-menu"
|
|
409
|
+
: undefined }, item.label)))), this.overflowItems.length > 0 && (index.h("li", { class: "overflow-menu-container mf-listen", "tracker-id": "overflow-menu" }, index.h("button", { class: `overflow-button ${this.hasActiveOverflowItem() ? "selected-active" : ""}`, onClick: this.toggleOverflowMenu, onKeyDown: (e) => {
|
|
509
410
|
if (e.key === "Enter" ||
|
|
510
411
|
e.key === " ") {
|
|
511
412
|
e.preventDefault();
|
|
512
413
|
this.toggleOverflowMenu();
|
|
513
414
|
}
|
|
514
|
-
}, "aria-expanded": this.showOverflowMenu, "aria-haspopup": "true", "aria-label": "Show more navigation items", "tracker-id": "overflow-button", ref: (el) => (this.overflowButton = el) }, index.h("span", { class: "overflow-dots", "aria-hidden": "true" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", "aria-hidden": "true" }, index.h("circle", { cx: "1.25", cy: "5", r: "1.25", fill: "#617480" }), index.h("circle", { cx: "5", cy: "5", r: "1.25", fill: "#617480" }), index.h("circle", { cx: "8.75", cy: "5", r: "1.25", fill: "#617480" })))), this.showOverflowMenu && (index.h("div", { class:
|
|
515
|
-
el) }, this.overflowItems.map((item) => (index.h("a", { key: item.id, href: `#${item.id}`, class: `mf-listen ${this
|
|
415
|
+
}, "aria-expanded": this.showOverflowMenu, "aria-haspopup": "true", "aria-label": "Show more navigation items", "tracker-id": "overflow-button", ref: (el) => (this.overflowButton = el) }, index.h("span", { class: "overflow-dots", "aria-hidden": "true" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", "aria-hidden": "true" }, index.h("circle", { cx: "1.25", cy: "5", r: "1.25", fill: "#617480" }), index.h("circle", { cx: "5", cy: "5", r: "1.25", fill: "#617480" }), index.h("circle", { cx: "8.75", cy: "5", r: "1.25", fill: "#617480" })))), this.showOverflowMenu && (index.h("div", { class: "overflow-dropdown", role: "menu", "aria-label": "Additional navigation sections" }, this.overflowItems.map((item) => (index.h("a", { key: item.id, href: `#${item.id}`, class: `mf-listen ${this
|
|
516
416
|
.currentActive ===
|
|
517
417
|
item.id
|
|
518
418
|
? "active"
|
|
@@ -524,7 +424,7 @@ const PtcSubnavV2 = class {
|
|
|
524
424
|
.currentActive ===
|
|
525
425
|
item.id
|
|
526
426
|
? "page"
|
|
527
|
-
: undefined }, item.label)))))))))),
|
|
427
|
+
: undefined }, item.label)))))))))), index.h("div", { class: "subnav-menu-right" }, index.h("slot", { name: "subnav-menu-right" })))));
|
|
528
428
|
}
|
|
529
429
|
get el() { return index.getElement(this); }
|
|
530
430
|
};
|