@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
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-c83db688.js';
|
|
2
2
|
|
|
3
|
-
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}}";
|
|
3
|
+
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}";
|
|
4
4
|
|
|
5
5
|
const PtcSubnavV2 = class {
|
|
6
6
|
constructor(hostRef) {
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
|
-
this.cachedNavItems = null;
|
|
9
|
-
this.isSticky = false;
|
|
10
|
-
this.originalTop = 0;
|
|
11
|
-
this.placeholderElement = null;
|
|
12
|
-
this.measurementElement = null;
|
|
13
8
|
this.handleClickOutside = (event) => {
|
|
14
|
-
|
|
9
|
+
const target = event.target;
|
|
10
|
+
if (!this.el.contains(target)) {
|
|
15
11
|
this.showOverflowMenu = false;
|
|
16
12
|
}
|
|
17
13
|
};
|
|
18
14
|
this.handleKeyDown = (event) => {
|
|
19
|
-
|
|
15
|
+
// Handle Escape key to close dropdowns
|
|
20
16
|
if (event.key === "Escape" && this.showOverflowMenu) {
|
|
21
17
|
this.showOverflowMenu = false;
|
|
22
|
-
|
|
18
|
+
// Return focus to the button that opened the menu
|
|
19
|
+
if (this.overflowButton) {
|
|
20
|
+
this.overflowButton.focus();
|
|
21
|
+
}
|
|
23
22
|
}
|
|
24
23
|
};
|
|
25
24
|
this.handleScroll = () => {
|
|
@@ -49,81 +48,23 @@ const PtcSubnavV2 = class {
|
|
|
49
48
|
// Only update if different from current active
|
|
50
49
|
if (activeSection !== this.currentActive) {
|
|
51
50
|
this.currentActive = activeSection;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
const rect = this.el.getBoundingClientRect();
|
|
59
|
-
this.originalTop = rect.top + window.scrollY;
|
|
60
|
-
};
|
|
61
|
-
this.handleStickyScroll = () => {
|
|
62
|
-
// Throttle sticky scroll events for better performance
|
|
63
|
-
if (this.stickyScrollTimeout) {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
this.stickyScrollTimeout = window.setTimeout(() => {
|
|
67
|
-
var _a;
|
|
68
|
-
const scrollY = window.scrollY;
|
|
69
|
-
// Check if we should make the subnav sticky
|
|
70
|
-
const shouldBeSticky = scrollY >= this.originalTop;
|
|
71
|
-
if (shouldBeSticky && !this.isSticky) {
|
|
72
|
-
// Store the original height before making it fixed
|
|
73
|
-
const originalHeight = this.el.offsetHeight;
|
|
74
|
-
// Create placeholder element to maintain space
|
|
75
|
-
this.placeholderElement = document.createElement("div");
|
|
76
|
-
this.placeholderElement.style.height = `${originalHeight}px`;
|
|
77
|
-
this.placeholderElement.style.width = "100%";
|
|
78
|
-
this.placeholderElement.style.pointerEvents = "none";
|
|
79
|
-
// Insert placeholder before the subnav
|
|
80
|
-
(_a = this.el.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(this.placeholderElement, this.el);
|
|
81
|
-
// Add transition class for smooth animation
|
|
82
|
-
this.el.classList.add("sticky-transition");
|
|
83
|
-
// Apply fixed positioning with smooth transition
|
|
84
|
-
this.el.style.position = "fixed";
|
|
85
|
-
this.el.style.top = "0";
|
|
86
|
-
this.el.style.left = "0";
|
|
87
|
-
this.el.style.right = "0";
|
|
88
|
-
this.el.style.width = "100%";
|
|
89
|
-
this.el.style.zIndex = "105";
|
|
90
|
-
this.el.style.transform = "translateY(0)";
|
|
91
|
-
this.isSticky = true;
|
|
92
|
-
}
|
|
93
|
-
else if (!shouldBeSticky && this.isSticky) {
|
|
94
|
-
// Remove transition class and reset transform
|
|
95
|
-
this.el.classList.remove("sticky-transition");
|
|
96
|
-
this.el.style.transform = "";
|
|
97
|
-
// Remove fixed positioning and restore original position
|
|
98
|
-
this.el.style.position = "";
|
|
99
|
-
this.el.style.top = "";
|
|
100
|
-
this.el.style.left = "";
|
|
101
|
-
this.el.style.right = "";
|
|
102
|
-
this.el.style.width = "";
|
|
103
|
-
this.el.style.zIndex = "";
|
|
104
|
-
this.isSticky = false;
|
|
105
|
-
// Remove placeholder element
|
|
106
|
-
if (this.placeholderElement) {
|
|
107
|
-
this.placeholderElement.remove();
|
|
108
|
-
this.placeholderElement = null;
|
|
51
|
+
// Update mobile selected item if in mobile mode
|
|
52
|
+
if (this.isMobile) {
|
|
53
|
+
const activeItem = navItems.find((item) => item.id === activeSection);
|
|
54
|
+
if (activeItem) {
|
|
55
|
+
this.selectedMobileItem = activeItem;
|
|
56
|
+
}
|
|
109
57
|
}
|
|
110
58
|
}
|
|
111
|
-
this.
|
|
59
|
+
this.scrollThrottleTimeout = null;
|
|
112
60
|
}, 16); // ~60fps throttling
|
|
113
61
|
};
|
|
114
62
|
this.handleResize = () => {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
else if (this.placeholderElement) {
|
|
121
|
-
// Update placeholder height if sticky and resized
|
|
122
|
-
const currentHeight = this.el.offsetHeight;
|
|
123
|
-
this.placeholderElement.style.height = `${currentHeight}px`;
|
|
124
|
-
// Update originalTop based on placeholder position (layout may have changed)
|
|
125
|
-
const placeholderRect = this.placeholderElement.getBoundingClientRect();
|
|
126
|
-
this.originalTop = placeholderRect.top + window.scrollY;
|
|
63
|
+
if (this.navContainer) {
|
|
64
|
+
// Add a small delay to ensure DOM has been updated
|
|
65
|
+
setTimeout(() => {
|
|
66
|
+
this.calculateVisibleItems();
|
|
67
|
+
}, 10);
|
|
127
68
|
}
|
|
128
69
|
};
|
|
129
70
|
this.setupIntersectionObserver = () => {
|
|
@@ -160,6 +101,13 @@ const PtcSubnavV2 = class {
|
|
|
160
101
|
const sectionId = mostVisibleSection.target.id;
|
|
161
102
|
if (sectionId && sectionId !== this.currentActive) {
|
|
162
103
|
this.currentActive = sectionId;
|
|
104
|
+
// Update mobile selected item if in mobile mode
|
|
105
|
+
if (this.isMobile) {
|
|
106
|
+
const activeItem = navItems.find((item) => item.id === sectionId);
|
|
107
|
+
if (activeItem) {
|
|
108
|
+
this.selectedMobileItem = activeItem;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
163
111
|
}
|
|
164
112
|
}
|
|
165
113
|
}, 100); // Increased debounce time for better performance
|
|
@@ -176,76 +124,80 @@ const PtcSubnavV2 = class {
|
|
|
176
124
|
}
|
|
177
125
|
});
|
|
178
126
|
};
|
|
179
|
-
this.setupResizeObserver = () => {
|
|
180
|
-
// Observe the parent element for layout changes
|
|
181
|
-
this.resizeObserver = new ResizeObserver(() => {
|
|
182
|
-
// Recalculate sticky position when parent layout changes
|
|
183
|
-
if (!this.isSticky) {
|
|
184
|
-
this.initializeStickyPosition();
|
|
185
|
-
}
|
|
186
|
-
else if (this.placeholderElement) {
|
|
187
|
-
// If sticky, update originalTop based on placeholder position
|
|
188
|
-
const placeholderRect = this.placeholderElement.getBoundingClientRect();
|
|
189
|
-
this.originalTop = placeholderRect.top + window.scrollY;
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
// Observe the element's parent or the element itself
|
|
193
|
-
if (this.el.parentElement) {
|
|
194
|
-
this.resizeObserver.observe(this.el.parentElement);
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
127
|
this.extractNavItemsFromSlots = () => {
|
|
128
|
+
// Look for slot content with nav-items in the light DOM
|
|
198
129
|
const slotElement = this.el.querySelector('[slot="nav-items"]');
|
|
199
|
-
if (
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
})
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
130
|
+
if (slotElement) {
|
|
131
|
+
const links = slotElement.querySelectorAll("a");
|
|
132
|
+
const items = Array.from(links)
|
|
133
|
+
.map((link) => {
|
|
134
|
+
var _a, _b;
|
|
135
|
+
return ({
|
|
136
|
+
id: ((_a = link.getAttribute("href")) === null || _a === void 0 ? void 0 : _a.substring(1)) || "",
|
|
137
|
+
label: ((_b = link.textContent) === null || _b === void 0 ? void 0 : _b.trim()) || "",
|
|
138
|
+
title: link.getAttribute("title") || "",
|
|
139
|
+
trackerId: link.getAttribute("tracker-id") || "",
|
|
140
|
+
});
|
|
141
|
+
})
|
|
142
|
+
.filter((item) => item.id && item.label);
|
|
143
|
+
if (items.length > 0) {
|
|
144
|
+
return items;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return null;
|
|
214
148
|
};
|
|
215
149
|
this.getNavItems = () => {
|
|
216
|
-
// Return cached items if available
|
|
217
|
-
if (this.cachedNavItems) {
|
|
218
|
-
return this.cachedNavItems;
|
|
219
|
-
}
|
|
220
150
|
// Extract navigation items from slots (SEO-friendly approach)
|
|
221
151
|
const slotItems = this.extractNavItemsFromSlots();
|
|
222
152
|
if (slotItems) {
|
|
223
|
-
this.cachedNavItems = slotItems;
|
|
224
153
|
return slotItems;
|
|
225
154
|
}
|
|
226
155
|
// If navItems prop is provided, parse and use it (fallback)
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
156
|
+
if (this.navItems && this.navItems.trim()) {
|
|
157
|
+
try {
|
|
158
|
+
const parsedItems = JSON.parse(this.navItems);
|
|
159
|
+
// Validate that it's an array with proper structure
|
|
160
|
+
if (Array.isArray(parsedItems) && parsedItems.length > 0) {
|
|
161
|
+
// Ensure each item has required properties
|
|
162
|
+
const validItems = parsedItems.filter((item) => item &&
|
|
163
|
+
typeof item.id === "string" &&
|
|
164
|
+
typeof item.label === "string");
|
|
165
|
+
if (validItems.length > 0) {
|
|
166
|
+
return validItems;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
catch (error) {
|
|
171
|
+
console.warn("Invalid navItems JSON provided to ptc-subnav-v2:", error);
|
|
172
|
+
}
|
|
231
173
|
}
|
|
232
174
|
// Return empty array if no navigation items found
|
|
233
175
|
console.warn("No navigation items found in slots or props for ptc-subnav-v2");
|
|
234
176
|
return [];
|
|
235
177
|
};
|
|
178
|
+
this.calculateMobileDropdownItems = () => {
|
|
179
|
+
const navItems = this.getNavItems();
|
|
180
|
+
// Handle case where no navigation items are found
|
|
181
|
+
if (navItems.length === 0) {
|
|
182
|
+
this.mobileDropdownItems = [];
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
const currentItem = this.selectedMobileItem || {
|
|
186
|
+
id: this.currentActive,
|
|
187
|
+
};
|
|
188
|
+
// Filter out the currently selected item from all nav items
|
|
189
|
+
this.mobileDropdownItems = navItems.filter((item) => item.id !== currentItem.id);
|
|
190
|
+
};
|
|
236
191
|
this.hasActiveOverflowItem = () => {
|
|
237
192
|
return this.overflowItems.some((item) => item.id === this.currentActive);
|
|
238
193
|
};
|
|
239
|
-
this.hasSubnavMenuRightContent = () => {
|
|
240
|
-
const slotElement = this.el.querySelector('[slot="subnav-menu-right"]');
|
|
241
|
-
return Boolean(slotElement === null || slotElement === void 0 ? void 0 : slotElement.children.length);
|
|
242
|
-
};
|
|
243
194
|
this.calculateVisibleItems = () => {
|
|
244
195
|
const navItems = this.getNavItems();
|
|
245
196
|
// Handle case where no navigation items are found
|
|
246
197
|
if (navItems.length === 0) {
|
|
247
198
|
this.visibleItems = [];
|
|
248
199
|
this.overflowItems = [];
|
|
200
|
+
this.selectedMobileItem = null;
|
|
249
201
|
return;
|
|
250
202
|
}
|
|
251
203
|
// Check if we're in mobile mode (below 767px)
|
|
@@ -259,6 +211,7 @@ const PtcSubnavV2 = class {
|
|
|
259
211
|
// On mobile, show only the current active item
|
|
260
212
|
const activeItem = navItems.find((item) => item.id === this.currentActive) ||
|
|
261
213
|
navItems[0];
|
|
214
|
+
this.selectedMobileItem = activeItem;
|
|
262
215
|
this.visibleItems = [activeItem];
|
|
263
216
|
this.overflowItems = navItems.filter((item) => item.id !== activeItem.id);
|
|
264
217
|
}
|
|
@@ -279,21 +232,19 @@ const PtcSubnavV2 = class {
|
|
|
279
232
|
}
|
|
280
233
|
let visibleCount = 0;
|
|
281
234
|
let totalWidth = 0;
|
|
282
|
-
// Create
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
document.body.appendChild(this.measurementElement);
|
|
292
|
-
}
|
|
235
|
+
// Create temporary elements to measure width
|
|
236
|
+
const tempContainer = document.createElement("div");
|
|
237
|
+
tempContainer.style.position = "absolute";
|
|
238
|
+
tempContainer.style.visibility = "hidden";
|
|
239
|
+
tempContainer.style.whiteSpace = "nowrap";
|
|
240
|
+
tempContainer.style.fontSize = "14px";
|
|
241
|
+
tempContainer.style.fontWeight = "700";
|
|
242
|
+
tempContainer.style.padding = "20px 0 17px 0";
|
|
243
|
+
document.body.appendChild(tempContainer);
|
|
293
244
|
for (let i = 0; i < navItems.length; i++) {
|
|
294
245
|
const item = navItems[i];
|
|
295
|
-
|
|
296
|
-
const itemWidth =
|
|
246
|
+
tempContainer.textContent = item.label;
|
|
247
|
+
const itemWidth = tempContainer.offsetWidth + 32; // 32px for gap
|
|
297
248
|
if (totalWidth + itemWidth <= availableWidth) {
|
|
298
249
|
totalWidth += itemWidth;
|
|
299
250
|
visibleCount++;
|
|
@@ -302,6 +253,7 @@ const PtcSubnavV2 = class {
|
|
|
302
253
|
break;
|
|
303
254
|
}
|
|
304
255
|
}
|
|
256
|
+
document.body.removeChild(tempContainer);
|
|
305
257
|
this.visibleItems = navItems.slice(0, visibleCount);
|
|
306
258
|
this.overflowItems = navItems.slice(visibleCount);
|
|
307
259
|
}
|
|
@@ -310,27 +262,19 @@ const PtcSubnavV2 = class {
|
|
|
310
262
|
};
|
|
311
263
|
this.toggleOverflowMenu = () => {
|
|
312
264
|
this.showOverflowMenu = !this.showOverflowMenu;
|
|
313
|
-
// After opening, measure and decide alignment to avoid viewport overflow
|
|
314
|
-
if (!this.showOverflowMenu) {
|
|
315
|
-
return;
|
|
316
|
-
}
|
|
317
|
-
requestAnimationFrame(() => {
|
|
318
|
-
const container = this.overflowMenuContainer;
|
|
319
|
-
const dropdown = this.overflowDropdownEl;
|
|
320
|
-
if (!container || !dropdown)
|
|
321
|
-
return;
|
|
322
|
-
const containerRect = container.getBoundingClientRect();
|
|
323
|
-
// Default positioning is right: -2px inside container
|
|
324
|
-
const dropdownWidth = dropdown.offsetWidth || 0;
|
|
325
|
-
const rightEdge = containerRect.right + 2;
|
|
326
|
-
const leftEdge = rightEdge - dropdownWidth;
|
|
327
|
-
// If left edge would be off the viewport, flip to left aligned
|
|
328
|
-
this.overflowDropdownAlignLeft = leftEdge < 8; // keep a small gutter
|
|
329
|
-
});
|
|
330
265
|
};
|
|
331
266
|
this.handleNavClick = (event, section) => {
|
|
332
267
|
event.preventDefault();
|
|
333
268
|
this.currentActive = section;
|
|
269
|
+
// Update mobile selected item if in mobile mode
|
|
270
|
+
if (this.isMobile) {
|
|
271
|
+
const navItems = this.getNavItems();
|
|
272
|
+
const activeItem = navItems.find((item) => item.id === section);
|
|
273
|
+
if (activeItem) {
|
|
274
|
+
this.selectedMobileItem = activeItem;
|
|
275
|
+
this.calculateMobileDropdownItems();
|
|
276
|
+
}
|
|
277
|
+
}
|
|
334
278
|
// Set manual navigation flag to prevent intersection observer from overriding
|
|
335
279
|
this.isManualNavigation = true;
|
|
336
280
|
// Clear any existing manual navigation timeout
|
|
@@ -348,19 +292,12 @@ const PtcSubnavV2 = class {
|
|
|
348
292
|
composed: true,
|
|
349
293
|
});
|
|
350
294
|
this.el.dispatchEvent(customEvent);
|
|
351
|
-
// Smooth scroll to section if it exists
|
|
295
|
+
// Smooth scroll to section if it exists
|
|
352
296
|
const targetElement = document.querySelector(`#${section}`);
|
|
353
297
|
if (targetElement) {
|
|
354
|
-
|
|
355
|
-
const navHeight = this.el.offsetHeight;
|
|
356
|
-
// Calculate the target position with offset
|
|
357
|
-
const targetPosition = targetElement.getBoundingClientRect().top +
|
|
358
|
-
window.scrollY -
|
|
359
|
-
navHeight;
|
|
360
|
-
// Smooth scroll to the adjusted position
|
|
361
|
-
window.scrollTo({
|
|
362
|
-
top: targetPosition,
|
|
298
|
+
targetElement.scrollIntoView({
|
|
363
299
|
behavior: "smooth",
|
|
300
|
+
block: "start",
|
|
364
301
|
});
|
|
365
302
|
}
|
|
366
303
|
};
|
|
@@ -370,113 +307,75 @@ const PtcSubnavV2 = class {
|
|
|
370
307
|
this.visibleItems = [];
|
|
371
308
|
this.overflowItems = [];
|
|
372
309
|
this.showOverflowMenu = false;
|
|
373
|
-
this.
|
|
310
|
+
this.containerWidth = 0;
|
|
374
311
|
this.isMobile = false;
|
|
312
|
+
this.selectedMobileItem = null;
|
|
375
313
|
this.isManualNavigation = false;
|
|
314
|
+
this.mobileDropdownItems = [];
|
|
376
315
|
}
|
|
377
316
|
componentWillLoad() {
|
|
378
317
|
this.currentActive = this.activeSection;
|
|
318
|
+
// Initialize selected mobile item with the current active section
|
|
319
|
+
const navItems = this.getNavItems();
|
|
320
|
+
if (navItems.length > 0) {
|
|
321
|
+
this.selectedMobileItem =
|
|
322
|
+
navItems.find((item) => item.id === this.activeSection) ||
|
|
323
|
+
navItems[0];
|
|
324
|
+
}
|
|
325
|
+
else {
|
|
326
|
+
this.selectedMobileItem = null;
|
|
327
|
+
}
|
|
328
|
+
this.calculateMobileDropdownItems();
|
|
379
329
|
}
|
|
380
330
|
componentDidLoad() {
|
|
381
|
-
|
|
382
|
-
this.handleResize();
|
|
383
|
-
this.addEventListeners();
|
|
384
|
-
this.setupIntersectionObserver();
|
|
385
|
-
this.setupResizeObserver();
|
|
386
|
-
this.initializeStickyPosition();
|
|
387
|
-
}
|
|
388
|
-
bindEventHandlers() {
|
|
331
|
+
// Bind the functions once
|
|
389
332
|
this.boundHandleResize = this.handleResize.bind(this);
|
|
390
333
|
this.boundHandleClickOutside = this.handleClickOutside.bind(this);
|
|
391
334
|
this.boundHandleScroll = this.handleScroll.bind(this);
|
|
392
335
|
this.boundHandleKeyDown = this.handleKeyDown.bind(this);
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
336
|
+
// Recalculate navigation items in case slots are used
|
|
337
|
+
this.calculateMobileDropdownItems();
|
|
338
|
+
this.handleResize();
|
|
396
339
|
window.addEventListener("resize", this.boundHandleResize);
|
|
397
340
|
document.addEventListener("click", this.boundHandleClickOutside);
|
|
398
341
|
document.addEventListener("keydown", this.boundHandleKeyDown);
|
|
342
|
+
// Setup intersection observer for scroll-based active state
|
|
343
|
+
this.setupIntersectionObserver();
|
|
344
|
+
// Add scroll listener as fallback
|
|
399
345
|
window.addEventListener("scroll", this.boundHandleScroll, {
|
|
400
346
|
passive: true,
|
|
401
347
|
});
|
|
402
|
-
window.addEventListener("scroll", this.boundHandleStickyScroll, {
|
|
403
|
-
passive: true,
|
|
404
|
-
});
|
|
405
348
|
}
|
|
406
349
|
disconnectedCallback() {
|
|
407
|
-
this.removeEventListeners();
|
|
408
|
-
this.cleanupTimeouts();
|
|
409
|
-
this.cleanupIntersectionObserver();
|
|
410
|
-
this.cleanupResizeObserver();
|
|
411
|
-
this.cleanupElements();
|
|
412
|
-
}
|
|
413
|
-
removeEventListeners() {
|
|
414
350
|
window.removeEventListener("resize", this.boundHandleResize);
|
|
415
351
|
document.removeEventListener("click", this.boundHandleClickOutside);
|
|
416
352
|
document.removeEventListener("keydown", this.boundHandleKeyDown);
|
|
417
353
|
window.removeEventListener("scroll", this.boundHandleScroll);
|
|
418
|
-
|
|
419
|
-
}
|
|
420
|
-
cleanupTimeouts() {
|
|
421
|
-
if (this.scrollTimeout)
|
|
422
|
-
clearTimeout(this.scrollTimeout);
|
|
423
|
-
if (this.scrollThrottleTimeout)
|
|
424
|
-
clearTimeout(this.scrollThrottleTimeout);
|
|
425
|
-
if (this.manualNavigationTimeout)
|
|
426
|
-
clearTimeout(this.manualNavigationTimeout);
|
|
427
|
-
if (this.stickyScrollTimeout)
|
|
428
|
-
clearTimeout(this.stickyScrollTimeout);
|
|
429
|
-
}
|
|
430
|
-
cleanupIntersectionObserver() {
|
|
354
|
+
// Clean up intersection observer
|
|
431
355
|
if (this.intersectionObserver) {
|
|
432
356
|
this.intersectionObserver.disconnect();
|
|
433
357
|
}
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
this.resizeObserver.disconnect();
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
cleanupElements() {
|
|
441
|
-
if (this.placeholderElement) {
|
|
442
|
-
this.placeholderElement.remove();
|
|
443
|
-
this.placeholderElement = null;
|
|
444
|
-
}
|
|
445
|
-
if (this.measurementElement) {
|
|
446
|
-
this.measurementElement.remove();
|
|
447
|
-
this.measurementElement = null;
|
|
358
|
+
// Clean up scroll timeout
|
|
359
|
+
if (this.scrollTimeout) {
|
|
360
|
+
clearTimeout(this.scrollTimeout);
|
|
448
361
|
}
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
if (!((_a = this.navItems) === null || _a === void 0 ? void 0 : _a.trim()))
|
|
453
|
-
return null;
|
|
454
|
-
try {
|
|
455
|
-
const parsedItems = JSON.parse(this.navItems);
|
|
456
|
-
if (Array.isArray(parsedItems) && parsedItems.length > 0) {
|
|
457
|
-
const validItems = parsedItems.filter((item) => Boolean(item &&
|
|
458
|
-
typeof item.id === "string" &&
|
|
459
|
-
typeof item.label === "string"));
|
|
460
|
-
return validItems.length > 0 ? validItems : null;
|
|
461
|
-
}
|
|
362
|
+
// Clean up scroll throttle timeout
|
|
363
|
+
if (this.scrollThrottleTimeout) {
|
|
364
|
+
clearTimeout(this.scrollThrottleTimeout);
|
|
462
365
|
}
|
|
463
|
-
|
|
464
|
-
|
|
366
|
+
// Clean up manual navigation timeout
|
|
367
|
+
if (this.manualNavigationTimeout) {
|
|
368
|
+
clearTimeout(this.manualNavigationTimeout);
|
|
465
369
|
}
|
|
466
|
-
return null;
|
|
467
370
|
}
|
|
468
371
|
render() {
|
|
372
|
+
var _a, _b;
|
|
469
373
|
const navItems = this.getNavItems();
|
|
470
|
-
const hasRightContent = this.hasSubnavMenuRightContent();
|
|
471
|
-
const selectedMobileItem = this.isMobile
|
|
472
|
-
? navItems.find((item) => item.id === this.currentActive) ||
|
|
473
|
-
navItems[0]
|
|
474
|
-
: null;
|
|
475
374
|
// If no navigation items, don't render the navigation
|
|
476
375
|
if (navItems.length === 0) {
|
|
477
|
-
return (h(Host, null, h("div", { class:
|
|
376
|
+
return (h(Host, null, h("div", { class: "subnav-container" }, h("div", { class: "subnav-menu-right" }, h("slot", { name: "subnav-menu-right" })))));
|
|
478
377
|
}
|
|
479
|
-
return (h(Host, null, h("div", { class:
|
|
378
|
+
return (h(Host, null, h("div", { class: "subnav-container" }, h("nav", { class: "subnav-menu-left", role: "navigation", "aria-label": "Sub navigation", ref: (el) => (this.navContainer = el) }, this.isMobile ? (
|
|
480
379
|
// Mobile layout - dropdown with arrows
|
|
481
380
|
h("div", { class: "mobile-dropdown-container" }, h("button", { class: "mobile-dropdown-button", onClick: this.toggleOverflowMenu, onKeyDown: (e) => {
|
|
482
381
|
if (e.key === "Enter" ||
|
|
@@ -484,31 +383,32 @@ const PtcSubnavV2 = class {
|
|
|
484
383
|
e.preventDefault();
|
|
485
384
|
this.toggleOverflowMenu();
|
|
486
385
|
}
|
|
487
|
-
}, "aria-expanded": this.showOverflowMenu, "aria-haspopup": "true", "aria-label": `${(selectedMobileItem === null ||
|
|
488
|
-
"Select Section"), h("span", { class: `mobile-arrow ${this.showOverflowMenu ? "rotated" : ""}`, "aria-hidden": "true" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "8", viewBox: "0 0 12 8", fill: "none", "aria-hidden": "true" }, h("path", { d: "M1 1.5L5.94975 6.44975L10.8995 1.5", stroke: "#00890B", "stroke-width": "2", "stroke-linecap": "round" })))), this.showOverflowMenu && (h("ul", { class: "mobile-dropdown", role: "menu", "aria-label": "Navigation sections" },
|
|
489
|
-
|
|
386
|
+
}, "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) }, h("span", { class: "mobile-selected-item" }, ((_b = this.selectedMobileItem) === null || _b === void 0 ? void 0 : _b.label) ||
|
|
387
|
+
"Select Section"), h("span", { class: `mobile-arrow ${this.showOverflowMenu ? "rotated" : ""}`, "aria-hidden": "true" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "8", viewBox: "0 0 12 8", fill: "none", "aria-hidden": "true" }, h("path", { d: "M1 1.5L5.94975 6.44975L10.8995 1.5", stroke: "#00890B", "stroke-width": "2", "stroke-linecap": "round" })))), this.showOverflowMenu && (h("ul", { class: "mobile-dropdown", role: "menu", "aria-label": "Navigation sections" }, this.mobileDropdownItems.map((item) => (h("li", { key: item.id }, h("a", { href: `#${item.id}`, class: `mobile-dropdown-item mf-listen ${this
|
|
388
|
+
.currentActive ===
|
|
490
389
|
item.id
|
|
491
390
|
? "active"
|
|
492
|
-
: ""}`, role: "menuitem", "aria-current": this
|
|
391
|
+
: ""}`, role: "menuitem", "aria-current": this
|
|
392
|
+
.currentActive ===
|
|
493
393
|
item.id
|
|
494
394
|
? "page"
|
|
495
|
-
: undefined,
|
|
395
|
+
: undefined, "tracker-id": item.trackerId ||
|
|
396
|
+
`mobile-nav-${item.id}`, title: item.title || "", onClick: (e) => {
|
|
496
397
|
this.handleNavClick(e, item.id);
|
|
497
398
|
this.showOverflowMenu = false;
|
|
498
399
|
} }, item.label)))))))) : (
|
|
499
400
|
// Desktop layout - original behavior
|
|
500
|
-
h("ul", { class: "desktop-menu" }, this.visibleItems.map((item) => (h("li", { key: item.id, class: "mf-listen", id: item.trackerId || `nav-${item.id}` }, h("a", { href: `#${item.id}`, class: this.currentActive === item.id
|
|
401
|
+
h("ul", { class: "desktop-menu" }, this.visibleItems.map((item) => (h("li", { key: item.id, class: "mf-listen", "tracker-id": item.trackerId || `nav-${item.id}` }, h("a", { href: `#${item.id}`, class: this.currentActive === item.id
|
|
501
402
|
? "active"
|
|
502
403
|
: "", title: item.title || "", onClick: (e) => this.handleNavClick(e, item.id), "aria-current": this.currentActive === item.id
|
|
503
404
|
? "page"
|
|
504
|
-
: undefined }, item.label)))), this.overflowItems.length > 0 && (h("li", { class: "overflow-menu-container mf-listen", id: "overflow-menu"
|
|
405
|
+
: undefined }, item.label)))), this.overflowItems.length > 0 && (h("li", { class: "overflow-menu-container mf-listen", "tracker-id": "overflow-menu" }, h("button", { class: `overflow-button ${this.hasActiveOverflowItem() ? "selected-active" : ""}`, onClick: this.toggleOverflowMenu, onKeyDown: (e) => {
|
|
505
406
|
if (e.key === "Enter" ||
|
|
506
407
|
e.key === " ") {
|
|
507
408
|
e.preventDefault();
|
|
508
409
|
this.toggleOverflowMenu();
|
|
509
410
|
}
|
|
510
|
-
}, "aria-expanded": this.showOverflowMenu, "aria-haspopup": "true", "aria-label": "Show more navigation items", "tracker-id": "overflow-button", ref: (el) => (this.overflowButton = el) }, h("span", { class: "overflow-dots", "aria-hidden": "true" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", "aria-hidden": "true" }, h("circle", { cx: "1.25", cy: "5", r: "1.25", fill: "#617480" }), h("circle", { cx: "5", cy: "5", r: "1.25", fill: "#617480" }), h("circle", { cx: "8.75", cy: "5", r: "1.25", fill: "#617480" })))), this.showOverflowMenu && (h("div", { class:
|
|
511
|
-
el) }, this.overflowItems.map((item) => (h("a", { key: item.id, href: `#${item.id}`, class: `mf-listen ${this
|
|
411
|
+
}, "aria-expanded": this.showOverflowMenu, "aria-haspopup": "true", "aria-label": "Show more navigation items", "tracker-id": "overflow-button", ref: (el) => (this.overflowButton = el) }, h("span", { class: "overflow-dots", "aria-hidden": "true" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", "aria-hidden": "true" }, h("circle", { cx: "1.25", cy: "5", r: "1.25", fill: "#617480" }), h("circle", { cx: "5", cy: "5", r: "1.25", fill: "#617480" }), h("circle", { cx: "8.75", cy: "5", r: "1.25", fill: "#617480" })))), this.showOverflowMenu && (h("div", { class: "overflow-dropdown", role: "menu", "aria-label": "Additional navigation sections" }, this.overflowItems.map((item) => (h("a", { key: item.id, href: `#${item.id}`, class: `mf-listen ${this
|
|
512
412
|
.currentActive ===
|
|
513
413
|
item.id
|
|
514
414
|
? "active"
|
|
@@ -520,7 +420,7 @@ const PtcSubnavV2 = class {
|
|
|
520
420
|
.currentActive ===
|
|
521
421
|
item.id
|
|
522
422
|
? "page"
|
|
523
|
-
: undefined }, item.label)))))))))),
|
|
423
|
+
: undefined }, item.label)))))))))), h("div", { class: "subnav-menu-right" }, h("slot", { name: "subnav-menu-right" })))));
|
|
524
424
|
}
|
|
525
425
|
get el() { return getElement(this); }
|
|
526
426
|
};
|