@ptcwebops/ptcw-design 6.4.3 → 6.4.4-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/blog-detail-content_2.cjs.entry.js +1 -1
- package/dist/cjs/blog-detail-layout.cjs.entry.js +1 -1
- package/dist/cjs/blogs-search-section.cjs.entry.js +5 -2
- 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-jumbotron.cjs.entry.js +1 -1
- package/dist/cjs/homepage-toggled-content.cjs.entry.js +4 -2
- package/dist/cjs/icon-asset.cjs.entry.js +1 -1
- package/dist/cjs/innovator-toggle-container.cjs.entry.js +40 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/modal-form-example.cjs.entry.js +109 -0
- package/dist/cjs/most-popular-news.cjs.entry.js +1 -1
- package/dist/cjs/my-component.cjs.entry.js +1 -1
- package/dist/cjs/ptc-accordion-item.cjs.entry.js +1 -1
- package/dist/cjs/ptc-announcement.cjs.entry.js +2 -1
- package/dist/cjs/ptc-back-to-top.cjs.entry.js +1 -1
- package/dist/cjs/ptc-background-video.cjs.entry.js +92 -28
- package/dist/cjs/ptc-bio-card.cjs.entry.js +1 -1
- package/dist/cjs/ptc-button_5.cjs.entry.js +597 -0
- package/dist/cjs/ptc-card-bottom_2.cjs.entry.js +3 -1
- 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-collapse-list.cjs.entry.js +1 -1
- package/dist/cjs/ptc-data-lookup.cjs.entry.js +1 -2
- package/dist/cjs/ptc-date.cjs.entry.js +1 -1
- 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} +724 -6
- package/dist/cjs/ptc-form-radio-button.cjs.entry.js +0 -13
- package/dist/cjs/ptc-homepage-image-feature.cjs.entry.js +1 -1
- package/dist/cjs/ptc-homepage-video-background.cjs.entry.js +1 -1
- package/dist/cjs/ptc-icon-card.cjs.entry.js +1 -1
- package/dist/cjs/ptc-img.cjs.entry.js +87 -7
- package/dist/cjs/ptc-jumbotron.cjs.entry.js +11 -5
- package/dist/cjs/ptc-link.cjs.entry.js +1 -1
- package/dist/cjs/ptc-media-card.cjs.entry.js +74 -6
- package/dist/cjs/ptc-modal-quiz.cjs.entry.js +4 -1
- 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 +27 -11
- package/dist/cjs/ptc-pricing-tabs.cjs.entry.js +2 -2
- 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-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/ptc-social-icons-footer.cjs.entry.js +1 -1
- package/dist/cjs/ptc-text-copy-with-background.cjs.entry.js +1 -1
- 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/cjs/{utils-b63aef52.js → utils-0ff09a53.js} +13 -0
- package/dist/collection/collection-manifest.json +1 -2
- package/dist/collection/components/dynamic-box-bundle/dynamic-box-bundle.js +3 -1
- package/dist/collection/components/icon-asset/icon-asset.css +0 -8
- package/dist/collection/components/icon-asset/icon-asset.js +2 -2
- 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/innovator-toggle-container/innovator-toggle-container.js +39 -3
- 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 +5 -4
- 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-back-to-top/ptc-back-to-top.css +0 -1
- package/dist/collection/components/ptc-background-video/ptc-background-video.css +21 -0
- package/dist/collection/components/ptc-background-video/ptc-background-video.js +103 -43
- package/dist/collection/components/ptc-bio-card/ptc-bio-card.css +24 -0
- package/dist/collection/components/ptc-card-wrapper/ptc-card-wrapper.js +3 -1
- package/dist/collection/components/ptc-case-studies-slider/ptc-case-studies-slider.css +24 -0
- package/dist/collection/components/ptc-date/ptc-date.js +2 -2
- 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-form-radio-button/ptc-form-radio-button.js +2 -18
- 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 +24 -0
- package/dist/collection/components/ptc-jumbotron/ptc-jumbotron.js +28 -4
- package/dist/collection/components/ptc-media-card/ptc-media-card.js +78 -7
- package/dist/collection/components/ptc-modal/ptc-modal.css +4 -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-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 +14 -0
- 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 +26 -10
- 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-seo-title/ptc-seo-title.js +3 -3
- package/dist/collection/components/ptc-skeleton/ptc-skeleton.css +6 -0
- package/dist/collection/components/ptc-text-copy-with-background/ptc-text-copy-with-background.css +19 -0
- 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/Announcement.stories.js +7 -0
- package/dist/collection/stories/BackgroundImage.stories.js +7 -0
- package/dist/collection/stories/Breadcrumb.stories.js +37 -44
- package/dist/collection/stories/Breadcrumb2.stories.js +62 -0
- package/dist/collection/stories/BrightcovVideo.stories.js +21 -0
- package/dist/collection/stories/Button.stories.js +204 -0
- package/dist/collection/stories/CardWrapper.stories.js +32 -0
- package/dist/collection/stories/Checkbox.stories.js +21 -0
- package/dist/collection/stories/CheckboxGroup.stories.js +27 -0
- package/dist/collection/stories/CloseIcon.stories.js +10 -0
- package/dist/collection/stories/CollapseList.stories.js +14 -0
- package/dist/collection/stories/Countdown.stories.js +6 -67
- package/dist/collection/stories/DataLookup.stories.js +21 -0
- package/dist/collection/stories/Date.stories.js +42 -26
- package/dist/collection/stories/EllipsisDropdown.stories.js +14 -0
- package/dist/collection/stories/FormCheckbox.stories.js +3 -3
- package/dist/collection/stories/FormRadioButton.stories.js +3 -3
- package/dist/collection/stories/Hero.stories.js +35 -0
- package/dist/collection/stories/HeroFooterCTA.stories.js +21 -0
- package/dist/collection/stories/Icon.stories.js +30 -6
- package/dist/collection/stories/Jumbotron.stories.js +36 -0
- package/dist/collection/stories/Link.stories.js +3 -3
- package/dist/collection/stories/ListItem.stories.js +7 -1
- package/dist/collection/stories/MinimizedFooter.stories.js +18 -0
- package/dist/collection/stories/MinimizedHeader.stories.js +37 -0
- package/dist/collection/stories/MobileSelect.stories.js +1 -1
- package/dist/collection/stories/MultiSelect.stories.js +10 -0
- package/dist/collection/stories/Paragraph.stories.js +104 -0
- package/dist/collection/stories/ReadMore.stories.js +100 -0
- package/dist/collection/stories/ReadmoreV2.stories.js +37 -0
- package/dist/collection/stories/ScrollButton.stories.js +14 -0
- package/dist/collection/stories/SearchField.stories.js +21 -0
- package/dist/collection/stories/Select.stories.js +21 -33
- package/dist/collection/stories/SocialShare.stories.js +83 -0
- package/dist/collection/stories/Span.stories.js +10 -4
- package/dist/collection/stories/SvgBtn.stories.js +36 -0
- package/dist/collection/stories/SvgButton.stories.js +1 -1
- package/dist/collection/stories/TextCopyWithBackground.stories.js +100 -0
- package/dist/collection/stories/Textfield.stories.js +14 -0
- package/dist/collection/stories/TheaterVideo.stories.js +21 -0
- package/dist/collection/stories/Title.stories.js +127 -0
- package/dist/collection/stories/Tooltip.stories.js +112 -0
- package/dist/collection/stories/VideoEmbed.stories.js +10 -0
- package/dist/collection/stories/backToTop.stories.js +10 -0
- package/dist/collection/stories/backgroundVideo.stories.js +115 -0
- package/dist/collection/stories/jumbotronSubMenu.stories.js +14 -0
- 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/ptcLink2.stories.js +142 -0
- package/dist/collection/utils/utils.js +11 -0
- package/dist/custom-elements/index.d.ts +6 -12
- package/dist/custom-elements/index.js +8043 -7952
- package/dist/esm/blog-detail-content_2.entry.js +1 -1
- package/dist/esm/blog-detail-layout.entry.js +1 -1
- package/dist/esm/blogs-search-section.entry.js +5 -2
- 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-jumbotron.entry.js +1 -1
- package/dist/esm/homepage-toggled-content.entry.js +4 -2
- package/dist/esm/icon-asset.entry.js +1 -1
- package/dist/esm/innovator-toggle-container.entry.js +40 -4
- package/dist/esm/{interfaces-4caedd26.js → interfaces-7c0243be.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/modal-form-example.entry.js +105 -0
- package/dist/esm/most-popular-news.entry.js +1 -1
- package/dist/esm/my-component.entry.js +1 -1
- package/dist/esm/ptc-accordion-item.entry.js +1 -1
- package/dist/esm/ptc-announcement.entry.js +2 -1
- package/dist/esm/ptc-back-to-top.entry.js +1 -1
- package/dist/esm/ptc-background-video.entry.js +92 -28
- package/dist/esm/ptc-bio-card.entry.js +1 -1
- package/dist/esm/ptc-button_5.entry.js +589 -0
- package/dist/esm/ptc-card-bottom_2.entry.js +3 -1
- 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-collapse-list.entry.js +1 -1
- package/dist/esm/ptc-data-lookup.entry.js +1 -2
- package/dist/esm/ptc-date.entry.js +1 -1
- 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} +723 -7
- package/dist/esm/ptc-form-radio-button.entry.js +0 -13
- package/dist/esm/ptc-homepage-image-feature.entry.js +1 -1
- package/dist/esm/ptc-homepage-video-background.entry.js +1 -1
- package/dist/esm/ptc-icon-card.entry.js +1 -1
- package/dist/esm/ptc-img.entry.js +88 -8
- package/dist/esm/ptc-jumbotron.entry.js +11 -5
- package/dist/esm/ptc-link.entry.js +1 -1
- package/dist/esm/ptc-media-card.entry.js +74 -6
- package/dist/esm/ptc-modal-quiz.entry.js +4 -1
- 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 +27 -11
- package/dist/esm/ptc-pricing-tabs.entry.js +2 -2
- 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-skeleton.entry.js +1 -1
- package/dist/esm/ptc-social-icons-footer.entry.js +1 -1
- package/dist/esm/ptc-text-copy-with-background.entry.js +1 -1
- 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/esm/{utils-2f12c081.js → utils-a64ba942.js} +12 -1
- package/dist/ptcw-design/media/designer-v6.0.7.svg +30 -2
- package/dist/ptcw-design/{p-9dbcfcee.entry.js → p-01497d7a.entry.js} +1 -1
- package/dist/ptcw-design/p-043be054.entry.js +1 -0
- package/dist/ptcw-design/{p-257267e3.entry.js → p-0df868d2.entry.js} +1 -1
- package/dist/ptcw-design/p-1519b36f.entry.js +1 -0
- package/dist/ptcw-design/{p-fe8392c4.entry.js → p-1c52250d.entry.js} +1 -1
- package/dist/ptcw-design/p-1e3bf09c.entry.js +1 -0
- package/dist/ptcw-design/p-22cf00e7.js +1 -0
- package/dist/ptcw-design/p-2670ac97.entry.js +1 -0
- package/dist/ptcw-design/p-2b89cc16.entry.js +1 -0
- package/dist/ptcw-design/{p-d0fb9bfb.entry.js → p-2f21b69b.entry.js} +1 -1
- package/dist/ptcw-design/{p-4b41fe4e.entry.js → p-312c41b8.entry.js} +1 -1
- 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-a3868e6a.entry.js → p-3a40c41f.entry.js} +1 -1
- package/dist/ptcw-design/{p-45b1f3fc.entry.js → p-456c5cbb.entry.js} +1 -1
- package/dist/ptcw-design/p-4c852c9c.entry.js +1 -0
- package/dist/ptcw-design/p-50308f02.entry.js +1 -0
- package/dist/ptcw-design/{p-c3022c48.entry.js → p-54b589a6.entry.js} +1 -1
- package/dist/ptcw-design/{p-9b0df204.entry.js → p-5877f093.entry.js} +1 -1
- package/dist/ptcw-design/{p-78370e3d.entry.js → p-5a8e7557.entry.js} +1 -1
- package/dist/ptcw-design/p-5c81c755.entry.js +1 -0
- package/dist/ptcw-design/{p-901c31b3.entry.js → p-5cf5b9f8.entry.js} +1 -1
- package/dist/ptcw-design/p-672a349f.js +336 -0
- package/dist/ptcw-design/p-684ef1e5.entry.js +1 -0
- 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-799afee5.entry.js +1 -0
- package/dist/ptcw-design/{p-f7c47857.entry.js → p-81bcde85.entry.js} +1 -1
- package/dist/ptcw-design/{p-a5fc048f.entry.js → p-82f766d2.entry.js} +1 -1
- package/dist/ptcw-design/{p-37f92bb4.entry.js → p-884c335c.entry.js} +1 -1
- package/dist/ptcw-design/{p-76dab076.entry.js → p-8aca7181.entry.js} +1 -1
- package/dist/ptcw-design/p-8fb48953.entry.js +1 -0
- package/dist/ptcw-design/{p-52e17d34.entry.js → p-92ad78c5.entry.js} +1 -1
- package/dist/ptcw-design/p-938db2fd.entry.js +68 -0
- package/dist/ptcw-design/p-af831c13.entry.js +1 -0
- package/dist/ptcw-design/p-b684ca9d.entry.js +1 -0
- package/dist/ptcw-design/{p-abadbe5b.entry.js → p-bd9d995b.entry.js} +1 -1
- package/dist/ptcw-design/p-c09a8288.entry.js +1 -0
- package/dist/ptcw-design/{p-8c121480.entry.js → p-c160bda4.entry.js} +1 -1
- package/dist/ptcw-design/p-c555a45c.entry.js +1 -0
- package/dist/ptcw-design/p-cb0e3ec2.entry.js +1 -0
- package/dist/ptcw-design/{p-db0fc94d.entry.js → p-d3ac3758.entry.js} +1 -1
- package/dist/ptcw-design/{p-23cb5b5b.entry.js → p-db1dcce0.entry.js} +1 -1
- package/dist/ptcw-design/p-dc85c302.entry.js +1 -0
- package/dist/ptcw-design/p-de960790.entry.js +1 -0
- package/dist/ptcw-design/p-dec9c2a0.entry.js +1 -0
- package/dist/ptcw-design/p-e196f008.entry.js +1 -0
- package/dist/ptcw-design/{p-54f5a5be.entry.js → p-e23bc4a1.entry.js} +1 -1
- package/dist/ptcw-design/{p-81e5fa38.entry.js → p-e784a338.entry.js} +1 -1
- package/dist/ptcw-design/{p-711bcdad.js → p-ee1183b2.js} +1 -1
- package/dist/ptcw-design/{p-9f01419b.entry.js → p-f2675bb0.entry.js} +1 -1
- package/dist/ptcw-design/{p-5dec76bd.entry.js → p-f57f32ee.entry.js} +1 -1
- package/dist/ptcw-design/ptcw-design.css +4 -3
- package/dist/ptcw-design/ptcw-design.esm.js +1 -1
- package/dist/types/components/icon-asset/icon-asset.d.ts +1 -1
- package/dist/types/components/innovator-toggle-container/innovator-toggle-container.d.ts +3 -0
- package/dist/types/components/organism-bundles/blogs-search-section/blogs-search-section.d.ts +1 -1
- package/dist/types/components/organism-bundles/form/modal-from-example/modal-form-example.d.ts +25 -0
- package/dist/types/components/ptc-background-video/ptc-background-video.d.ts +31 -47
- package/dist/types/components/ptc-form-radio-button/ptc-form-radio-button.d.ts +0 -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-media-card/ptc-media-card.d.ts +8 -2
- package/dist/types/components/ptc-modal/ptc-modal.d.ts +1 -1
- package/dist/types/components/ptc-pagenation/ptc-pagenation.d.ts +1 -1
- package/dist/types/components/ptc-para/ptc-para.d.ts +1 -1
- package/dist/types/components/ptc-previous-url/ptc-previous-url.d.ts +2 -0
- package/dist/types/components.d.ts +139 -130
- package/dist/types/utils/utils.d.ts +2 -0
- package/package.json +1 -1
- package/readme.md +5 -1
- package/dist/cjs/buying-option-card.cjs.entry.js +0 -184
- package/dist/cjs/buying-option-cards-slider.cjs.entry.js +0 -140
- package/dist/cjs/component-1b8ad4d2.js +0 -1819
- package/dist/cjs/ptc-button.cjs.entry.js +0 -117
- package/dist/cjs/ptc-multi-select_2.cjs.entry.js +0 -730
- package/dist/cjs/ptc-para.cjs.entry.js +0 -139
- package/dist/cjs/ptc-picture.cjs.entry.js +0 -168
- package/dist/cjs/ptc-spacer.cjs.entry.js +0 -38
- package/dist/cjs/ptc-title.cjs.entry.js +0 -161
- package/dist/collection/components/buying-option-card/buying-option-card.css +0 -124
- package/dist/collection/components/buying-option-card/buying-option-card.js +0 -227
- package/dist/collection/components/buying-option-cards-slider/buying-option-cards-slider.css +0 -1148
- package/dist/collection/components/buying-option-cards-slider/buying-option-cards-slider.js +0 -135
- package/dist/collection/stories/organisms/ptc/Buying Options Cards Slider/preview.stories.js +0 -264
- package/dist/esm/buying-option-card.entry.js +0 -180
- package/dist/esm/buying-option-cards-slider.entry.js +0 -136
- package/dist/esm/component-9beac35b.js +0 -1802
- package/dist/esm/ptc-button.entry.js +0 -113
- package/dist/esm/ptc-multi-select_2.entry.js +0 -725
- package/dist/esm/ptc-para.entry.js +0 -135
- package/dist/esm/ptc-picture.entry.js +0 -164
- package/dist/esm/ptc-spacer.entry.js +0 -34
- package/dist/esm/ptc-title.entry.js +0 -157
- 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-0a7cc9e4.entry.js +0 -1
- package/dist/ptcw-design/p-0c69ea52.entry.js +0 -1
- package/dist/ptcw-design/p-19a407ff.entry.js +0 -68
- package/dist/ptcw-design/p-1f15239e.entry.js +0 -1
- package/dist/ptcw-design/p-214d9da6.entry.js +0 -1
- package/dist/ptcw-design/p-24776ca2.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-352e87c0.entry.js +0 -1
- package/dist/ptcw-design/p-38e5e590.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-605b13a2.entry.js +0 -1
- package/dist/ptcw-design/p-64026649.entry.js +0 -1
- package/dist/ptcw-design/p-80122e26.js +0 -1
- package/dist/ptcw-design/p-8cea8943.entry.js +0 -1
- package/dist/ptcw-design/p-9493dfa0.entry.js +0 -1
- package/dist/ptcw-design/p-96163196.entry.js +0 -1
- package/dist/ptcw-design/p-9681188f.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-a7ac0ecb.entry.js +0 -1
- package/dist/ptcw-design/p-a8872ce3.entry.js +0 -1
- package/dist/ptcw-design/p-abca6130.entry.js +0 -1
- package/dist/ptcw-design/p-b44f4fb1.entry.js +0 -1
- package/dist/ptcw-design/p-bbbfd2e5.entry.js +0 -1
- package/dist/ptcw-design/p-c6431ebc.entry.js +0 -1
- package/dist/ptcw-design/p-cad4b517.entry.js +0 -1
- package/dist/ptcw-design/p-d51438de.entry.js +0 -1
- package/dist/ptcw-design/p-d875f96d.entry.js +0 -1
- package/dist/ptcw-design/p-e4eb925f.entry.js +0 -1
- package/dist/types/components/buying-option-card/buying-option-card.d.ts +0 -44
- package/dist/types/components/buying-option-cards-slider/buying-option-cards-slider.d.ts +0 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Host, h } from "@stencil/core";
|
|
1
|
+
import { Host, h, } from "@stencil/core";
|
|
2
2
|
import { ResponsiveBgVariables } from "../../utils/interfaces";
|
|
3
3
|
export class PtcImg {
|
|
4
4
|
constructor() {
|
|
@@ -11,26 +11,95 @@ export class PtcImg {
|
|
|
11
11
|
this.borderRadius = "";
|
|
12
12
|
this.loadMode = "lazy-bg";
|
|
13
13
|
this.styles = undefined;
|
|
14
|
+
this.enableLazyLoad = false;
|
|
15
|
+
this.delay = 2000;
|
|
16
|
+
this.bgSrcLazy = undefined;
|
|
17
|
+
this.bgSrcMedium = undefined;
|
|
18
|
+
this.bgSrcHigh = undefined;
|
|
19
|
+
this.isInViewport = false;
|
|
20
|
+
this.isImageUpgraded = false;
|
|
14
21
|
}
|
|
15
|
-
/**
|
|
16
|
-
* Image Z Index
|
|
17
|
-
*/
|
|
18
|
-
// @Prop() imageZIndex: 'z-index-auto' | 'z-index-n-2' | 'z-index-n-1' | 'z-index-p-1' | 'z-index-p-2' = 'z-index-auto';
|
|
19
22
|
WindowResize() {
|
|
20
23
|
this.setResponsiveBg();
|
|
21
24
|
}
|
|
22
25
|
render() {
|
|
23
26
|
const classMap = this.getCssClassMap();
|
|
24
|
-
|
|
27
|
+
if (this.enableLazyLoad && this.imgUrl) {
|
|
28
|
+
// Lazy loading functionality
|
|
29
|
+
return (h(Host, null, this.styles && h("style", null, this.styles), h("div", { class: classMap }, h("div", { class: "low-quality", style: {
|
|
30
|
+
backgroundImage: `url(${this.bgSrcLazy})`,
|
|
31
|
+
opacity: "1",
|
|
32
|
+
transition: "opacity 0.5s ease-in-out",
|
|
33
|
+
} }), h("div", { class: "medium-quality", style: {
|
|
34
|
+
opacity: "0",
|
|
35
|
+
transition: "opacity 0.5s ease-in-out",
|
|
36
|
+
} }), h("div", { class: "high-quality", style: {
|
|
37
|
+
opacity: "0",
|
|
38
|
+
transition: "opacity 0.5s ease-in-out",
|
|
39
|
+
} }), this.imageType == "smart-bg" ? h("slot", null) : null)));
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
return (h(Host, null, this.styles && h("style", null, this.styles), h("div", { class: classMap, "data-xs": this.bgSrcLazy || this.imgUrl, "data-sm": this.bgSrcLazy || this.imgUrl, "data-md": this.bgSrcLazy || this.imgUrl, "data-lg": this.bgSrcLazy || this.imgUrl, style: {
|
|
43
|
+
backgroundImage: `url(${this.bgSrcLazy || this.imgUrl})`,
|
|
44
|
+
} }, this.imageType == "smart-bg" ? h("slot", null) : null)));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
componentWillLoad() {
|
|
48
|
+
if (this.enableLazyLoad) {
|
|
49
|
+
this.isInViewport = false;
|
|
50
|
+
}
|
|
51
|
+
if (this.enableLazyLoad && this.imgUrl) {
|
|
52
|
+
this.bgSrcLazy = this.getImageUrl("lq");
|
|
53
|
+
this.bgSrcMedium = this.getImageUrl("mq");
|
|
54
|
+
this.bgSrcHigh = this.getImageUrl("hq");
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
console.warn("Image URL is undefined or invalid.");
|
|
58
|
+
this.bgSrcLazy = "";
|
|
59
|
+
this.bgSrcMedium = "";
|
|
60
|
+
this.bgSrcHigh = "";
|
|
61
|
+
}
|
|
25
62
|
}
|
|
26
63
|
componentDidLoad() {
|
|
27
64
|
this.addIntersectionObserver();
|
|
28
65
|
this.setResponsiveBg();
|
|
66
|
+
if (this.enableLazyLoad && this.imgUrl) {
|
|
67
|
+
const that = this;
|
|
68
|
+
setTimeout(() => {
|
|
69
|
+
that.upgradeImageQuality();
|
|
70
|
+
}, that.delay);
|
|
71
|
+
}
|
|
29
72
|
}
|
|
30
73
|
componentWillUpdate() {
|
|
31
74
|
this.addIntersectionObserver();
|
|
32
75
|
this.setResponsiveBg();
|
|
33
76
|
}
|
|
77
|
+
upgradeImageQuality() {
|
|
78
|
+
if (this.isInViewport && !this.isImageUpgraded) {
|
|
79
|
+
console.log("Low-quality image is visible.");
|
|
80
|
+
this.isImageUpgraded = true;
|
|
81
|
+
setTimeout(() => {
|
|
82
|
+
const mediumLayer = this.el.querySelector(".medium-quality");
|
|
83
|
+
if (mediumLayer) {
|
|
84
|
+
mediumLayer.style.backgroundImage = `url(${this.bgSrcMedium})`;
|
|
85
|
+
mediumLayer.style.opacity = "1";
|
|
86
|
+
console.log("Medium-quality image is now visible.");
|
|
87
|
+
}
|
|
88
|
+
setTimeout(() => {
|
|
89
|
+
const highLayer = this.el.querySelector(".high-quality");
|
|
90
|
+
if (highLayer) {
|
|
91
|
+
highLayer.style.backgroundImage = `url(${this.bgSrcHigh})`;
|
|
92
|
+
highLayer.style.opacity = "1";
|
|
93
|
+
console.log("High-quality image is now visible.");
|
|
94
|
+
}
|
|
95
|
+
if (mediumLayer) {
|
|
96
|
+
mediumLayer.style.opacity = "0";
|
|
97
|
+
console.log("Medium-quality image is hidden.");
|
|
98
|
+
}
|
|
99
|
+
}, this.delay);
|
|
100
|
+
}, this.delay / 2);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
34
103
|
//responsive image
|
|
35
104
|
setResponsiveBg() {
|
|
36
105
|
// Define local variables
|
|
@@ -68,6 +137,8 @@ export class PtcImg {
|
|
|
68
137
|
const image = entry.target;
|
|
69
138
|
image.classList.remove("lazy-bg");
|
|
70
139
|
bgObserver.unobserve(image);
|
|
140
|
+
this.isInViewport = true;
|
|
141
|
+
this.upgradeImageQuality();
|
|
71
142
|
}
|
|
72
143
|
});
|
|
73
144
|
});
|
|
@@ -81,12 +152,21 @@ export class PtcImg {
|
|
|
81
152
|
// }, 5000);
|
|
82
153
|
}
|
|
83
154
|
}
|
|
155
|
+
getImageUrl(quality) {
|
|
156
|
+
if (this.imgUrl && this.imgUrl.includes("?")) {
|
|
157
|
+
return `${this.imgUrl}&t=ptcjumbdesk${quality}`;
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
return `${this.imgUrl}?t=ptcjumbdesk${quality}`;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
84
163
|
getCssClassMap() {
|
|
85
164
|
return {
|
|
86
165
|
[this.imageType]: true,
|
|
87
|
-
|
|
166
|
+
'ptc-img': true,
|
|
88
167
|
[this.borderRadius]: true,
|
|
89
168
|
[this.loadMode]: true,
|
|
169
|
+
[this.enableLazyLoad ? 'ptc-img--lazy' : '']: true,
|
|
90
170
|
// [this.imageZIndex] : true
|
|
91
171
|
};
|
|
92
172
|
}
|
|
@@ -298,9 +378,54 @@ export class PtcImg {
|
|
|
298
378
|
},
|
|
299
379
|
"attribute": "styles",
|
|
300
380
|
"reflect": false
|
|
381
|
+
},
|
|
382
|
+
"enableLazyLoad": {
|
|
383
|
+
"type": "boolean",
|
|
384
|
+
"mutable": false,
|
|
385
|
+
"complexType": {
|
|
386
|
+
"original": "boolean",
|
|
387
|
+
"resolved": "boolean",
|
|
388
|
+
"references": {}
|
|
389
|
+
},
|
|
390
|
+
"required": false,
|
|
391
|
+
"optional": false,
|
|
392
|
+
"docs": {
|
|
393
|
+
"tags": [],
|
|
394
|
+
"text": "(optional) enable lazy loading"
|
|
395
|
+
},
|
|
396
|
+
"attribute": "enable-lazy-load",
|
|
397
|
+
"reflect": false,
|
|
398
|
+
"defaultValue": "false"
|
|
399
|
+
},
|
|
400
|
+
"delay": {
|
|
401
|
+
"type": "number",
|
|
402
|
+
"mutable": false,
|
|
403
|
+
"complexType": {
|
|
404
|
+
"original": "number",
|
|
405
|
+
"resolved": "number",
|
|
406
|
+
"references": {}
|
|
407
|
+
},
|
|
408
|
+
"required": false,
|
|
409
|
+
"optional": false,
|
|
410
|
+
"docs": {
|
|
411
|
+
"tags": [],
|
|
412
|
+
"text": "(optional) setTimeout delay fro Lazy loading"
|
|
413
|
+
},
|
|
414
|
+
"attribute": "delay",
|
|
415
|
+
"reflect": false,
|
|
416
|
+
"defaultValue": "2000"
|
|
301
417
|
}
|
|
302
418
|
};
|
|
303
419
|
}
|
|
420
|
+
static get states() {
|
|
421
|
+
return {
|
|
422
|
+
"bgSrcLazy": {},
|
|
423
|
+
"bgSrcMedium": {},
|
|
424
|
+
"bgSrcHigh": {},
|
|
425
|
+
"isInViewport": {},
|
|
426
|
+
"isImageUpgraded": {}
|
|
427
|
+
};
|
|
428
|
+
}
|
|
304
429
|
static get elementRef() { return "el"; }
|
|
305
430
|
static get listeners() {
|
|
306
431
|
return [{
|
|
@@ -1204,14 +1204,17 @@ a:focus-visible {
|
|
|
1204
1204
|
|
|
1205
1205
|
.light-links a:not(.hero-footer-form-wrapper a,
|
|
1206
1206
|
ptc-modal inline-form a,
|
|
1207
|
+
.podcast-cta-section a,
|
|
1207
1208
|
.vjs-social-share-links a),
|
|
1208
1209
|
.light-links a.light-link,
|
|
1209
1210
|
.background-grey-10 a:not(.hero-footer-form-wrapper a,
|
|
1210
1211
|
ptc-modal inline-form a,
|
|
1212
|
+
.podcast-cta-section a,
|
|
1211
1213
|
.vjs-social-share-links a),
|
|
1212
1214
|
.background-grey-10 a.light-link,
|
|
1213
1215
|
.background-plm-grey a:not(.hero-footer-form-wrapper a,
|
|
1214
1216
|
ptc-modal inline-form a,
|
|
1217
|
+
.podcast-cta-section a,
|
|
1215
1218
|
.vjs-social-share-links a),
|
|
1216
1219
|
.background-plm-grey a.light-link {
|
|
1217
1220
|
color: var(--color-blue-04);
|
|
@@ -1220,38 +1223,47 @@ ptc-modal inline-form a,
|
|
|
1220
1223
|
}
|
|
1221
1224
|
.light-links a:not(.hero-footer-form-wrapper a,
|
|
1222
1225
|
ptc-modal inline-form a,
|
|
1226
|
+
.podcast-cta-section a,
|
|
1223
1227
|
.vjs-social-share-links a):visited,
|
|
1224
1228
|
.light-links a.light-link:visited,
|
|
1225
1229
|
.background-grey-10 a:not(.hero-footer-form-wrapper a,
|
|
1226
1230
|
ptc-modal inline-form a,
|
|
1231
|
+
.podcast-cta-section a,
|
|
1227
1232
|
.vjs-social-share-links a):visited,
|
|
1228
1233
|
.background-grey-10 a.light-link:visited,
|
|
1229
1234
|
.background-plm-grey a:not(.hero-footer-form-wrapper a,
|
|
1230
1235
|
ptc-modal inline-form a,
|
|
1236
|
+
.podcast-cta-section a,
|
|
1231
1237
|
.vjs-social-share-links a):visited,
|
|
1232
1238
|
.background-plm-grey a.light-link:visited {
|
|
1233
1239
|
color: var(--color-blue-06);
|
|
1234
1240
|
}
|
|
1235
1241
|
.light-links a:not(.hero-footer-form-wrapper a,
|
|
1236
1242
|
ptc-modal inline-form a,
|
|
1243
|
+
.podcast-cta-section a,
|
|
1237
1244
|
.vjs-social-share-links a):active, .light-links a:not(.hero-footer-form-wrapper a,
|
|
1238
1245
|
ptc-modal inline-form a,
|
|
1246
|
+
.podcast-cta-section a,
|
|
1239
1247
|
.vjs-social-share-links a):visited:active,
|
|
1240
1248
|
.light-links a.light-link:active,
|
|
1241
1249
|
.light-links a.light-link:visited:active,
|
|
1242
1250
|
.background-grey-10 a:not(.hero-footer-form-wrapper a,
|
|
1243
1251
|
ptc-modal inline-form a,
|
|
1252
|
+
.podcast-cta-section a,
|
|
1244
1253
|
.vjs-social-share-links a):active,
|
|
1245
1254
|
.background-grey-10 a:not(.hero-footer-form-wrapper a,
|
|
1246
1255
|
ptc-modal inline-form a,
|
|
1256
|
+
.podcast-cta-section a,
|
|
1247
1257
|
.vjs-social-share-links a):visited:active,
|
|
1248
1258
|
.background-grey-10 a.light-link:active,
|
|
1249
1259
|
.background-grey-10 a.light-link:visited:active,
|
|
1250
1260
|
.background-plm-grey a:not(.hero-footer-form-wrapper a,
|
|
1251
1261
|
ptc-modal inline-form a,
|
|
1262
|
+
.podcast-cta-section a,
|
|
1252
1263
|
.vjs-social-share-links a):active,
|
|
1253
1264
|
.background-plm-grey a:not(.hero-footer-form-wrapper a,
|
|
1254
1265
|
ptc-modal inline-form a,
|
|
1266
|
+
.podcast-cta-section a,
|
|
1255
1267
|
.vjs-social-share-links a):visited:active,
|
|
1256
1268
|
.background-plm-grey a.light-link:active,
|
|
1257
1269
|
.background-plm-grey a.light-link:visited:active {
|
|
@@ -1260,24 +1272,30 @@ ptc-modal inline-form a,
|
|
|
1260
1272
|
}
|
|
1261
1273
|
.light-links a:not(.hero-footer-form-wrapper a,
|
|
1262
1274
|
ptc-modal inline-form a,
|
|
1275
|
+
.podcast-cta-section a,
|
|
1263
1276
|
.vjs-social-share-links a):hover, .light-links a:not(.hero-footer-form-wrapper a,
|
|
1264
1277
|
ptc-modal inline-form a,
|
|
1278
|
+
.podcast-cta-section a,
|
|
1265
1279
|
.vjs-social-share-links a):visited:hover,
|
|
1266
1280
|
.light-links a.light-link:hover,
|
|
1267
1281
|
.light-links a.light-link:visited:hover,
|
|
1268
1282
|
.background-grey-10 a:not(.hero-footer-form-wrapper a,
|
|
1269
1283
|
ptc-modal inline-form a,
|
|
1284
|
+
.podcast-cta-section a,
|
|
1270
1285
|
.vjs-social-share-links a):hover,
|
|
1271
1286
|
.background-grey-10 a:not(.hero-footer-form-wrapper a,
|
|
1272
1287
|
ptc-modal inline-form a,
|
|
1288
|
+
.podcast-cta-section a,
|
|
1273
1289
|
.vjs-social-share-links a):visited:hover,
|
|
1274
1290
|
.background-grey-10 a.light-link:hover,
|
|
1275
1291
|
.background-grey-10 a.light-link:visited:hover,
|
|
1276
1292
|
.background-plm-grey a:not(.hero-footer-form-wrapper a,
|
|
1277
1293
|
ptc-modal inline-form a,
|
|
1294
|
+
.podcast-cta-section a,
|
|
1278
1295
|
.vjs-social-share-links a):hover,
|
|
1279
1296
|
.background-plm-grey a:not(.hero-footer-form-wrapper a,
|
|
1280
1297
|
ptc-modal inline-form a,
|
|
1298
|
+
.podcast-cta-section a,
|
|
1281
1299
|
.vjs-social-share-links a):visited:hover,
|
|
1282
1300
|
.background-plm-grey a.light-link:hover,
|
|
1283
1301
|
.background-plm-grey a.light-link:visited:hover {
|
|
@@ -1285,14 +1303,17 @@ ptc-modal inline-form a,
|
|
|
1285
1303
|
}
|
|
1286
1304
|
.light-links a:not(.hero-footer-form-wrapper a,
|
|
1287
1305
|
ptc-modal inline-form a,
|
|
1306
|
+
.podcast-cta-section a,
|
|
1288
1307
|
.vjs-social-share-links a).disabled,
|
|
1289
1308
|
.light-links a.light-link.disabled,
|
|
1290
1309
|
.background-grey-10 a:not(.hero-footer-form-wrapper a,
|
|
1291
1310
|
ptc-modal inline-form a,
|
|
1311
|
+
.podcast-cta-section a,
|
|
1292
1312
|
.vjs-social-share-links a).disabled,
|
|
1293
1313
|
.background-grey-10 a.light-link.disabled,
|
|
1294
1314
|
.background-plm-grey a:not(.hero-footer-form-wrapper a,
|
|
1295
1315
|
ptc-modal inline-form a,
|
|
1316
|
+
.podcast-cta-section a,
|
|
1296
1317
|
.vjs-social-share-links a).disabled,
|
|
1297
1318
|
.background-plm-grey a.light-link.disabled {
|
|
1298
1319
|
color: var(--color-gray-04) !important;
|
|
@@ -1300,14 +1321,17 @@ ptc-modal inline-form a,
|
|
|
1300
1321
|
}
|
|
1301
1322
|
.light-links a:not(.hero-footer-form-wrapper a,
|
|
1302
1323
|
ptc-modal inline-form a,
|
|
1324
|
+
.podcast-cta-section a,
|
|
1303
1325
|
.vjs-social-share-links a):focus-visible,
|
|
1304
1326
|
.light-links a.light-link:focus-visible,
|
|
1305
1327
|
.background-grey-10 a:not(.hero-footer-form-wrapper a,
|
|
1306
1328
|
ptc-modal inline-form a,
|
|
1329
|
+
.podcast-cta-section a,
|
|
1307
1330
|
.vjs-social-share-links a):focus-visible,
|
|
1308
1331
|
.background-grey-10 a.light-link:focus-visible,
|
|
1309
1332
|
.background-plm-grey a:not(.hero-footer-form-wrapper a,
|
|
1310
1333
|
ptc-modal inline-form a,
|
|
1334
|
+
.podcast-cta-section a,
|
|
1311
1335
|
.vjs-social-share-links a):focus-visible,
|
|
1312
1336
|
.background-plm-grey a.light-link:focus-visible {
|
|
1313
1337
|
border-radius: var(--ptc-border-radius-standard);
|
|
@@ -30,6 +30,7 @@ export class PtcJumbotron {
|
|
|
30
30
|
this.hasCountdown = false;
|
|
31
31
|
this.logo = "";
|
|
32
32
|
this.styles = undefined;
|
|
33
|
+
this.enableLazy = false;
|
|
33
34
|
this.defer = undefined;
|
|
34
35
|
this.hasCtaSlot = undefined;
|
|
35
36
|
}
|
|
@@ -68,10 +69,10 @@ export class PtcJumbotron {
|
|
|
68
69
|
break;
|
|
69
70
|
case "dark":
|
|
70
71
|
case "light":
|
|
71
|
-
mediaElement = (h("div", { class: "dl-img-wrap" }, h("ptc-img", { "img-url": this.bgSrc, styles: ".smart-bg{background-position:right !important;}" }), this.hasPopupVideo && this.isMobile ? (h("div", { class: "mobile-modal-play-btn" }, " ", h("slot", { name: "video" }))) : null));
|
|
72
|
+
mediaElement = (h("div", { class: "dl-img-wrap" }, h("ptc-img", { "img-url": this.bgSrc, "enable-lazy-load": this.enableLazy, styles: ".smart-bg{background-position:right !important;}" }), this.hasPopupVideo && this.isMobile ? (h("div", { class: "mobile-modal-play-btn" }, " ", h("slot", { name: "video" }))) : null));
|
|
72
73
|
break;
|
|
73
74
|
default:
|
|
74
|
-
mediaElement = (h("ptc-img", { "img-url": this.bgSrc, styles: ".smart-bg{background-position:right !important;}" }));
|
|
75
|
+
mediaElement = (h("ptc-img", { "img-url": this.bgSrc, "enable-lazy-load": this.enableLazy, styles: ".smart-bg{background-position:right !important;}" }));
|
|
75
76
|
}
|
|
76
77
|
return (h(Host, { class: classMap }, this.styles && h("style", null, this.styles), h("div", { class: {
|
|
77
78
|
parent: true,
|
|
@@ -92,14 +93,19 @@ export class PtcJumbotron {
|
|
|
92
93
|
!this.isHomepage && (h("div", null, h("ptc-spacer", { breakpoint: "small", size: "small" }), h("ptc-spacer", { breakpoint: "x-small", size: "medium" }))), !this.isHomepage && (h("ptc-para", { styles: `p{color: ${this.contentColor}!important;}`, "font-size": this.jumbotronType === "text" &&
|
|
93
94
|
this.isMobile
|
|
94
95
|
? "x-small"
|
|
95
|
-
: "small", "font-weight": "w-4", "para-margin": `${this.jumbotronType === "text" ||
|
|
96
|
+
: "small", "font-weight": "w-4", "para-margin": `${this.jumbotronType === "text" ||
|
|
97
|
+
this.jumbotronType === "blog"
|
|
98
|
+
? "margin-flush"
|
|
99
|
+
: "margin-bottom-6"}`, "para-color": "white", "para-line-h": "line-height-p", "para-align": this.jumbotronType === "text"
|
|
96
100
|
? "center"
|
|
97
101
|
: "left", "seo-compatibility-mode": true }, h("p", { innerHTML: this.subTitle, style: { margin: "0" } }), h("p", { style: { margin: "0" } }, h("slot", { name: "blog-date" })), this.jumbotronType === "blog" && (h("div", null, h("ptc-spacer", { breakpoint: "x-small", size: "medium" }), h("ptc-spacer", { breakpoint: "small", size: "small" }), h("div", { id: "header-blog-author", slot: "blog-author" }, h("div", { class: "image" }, h("img", { alt: this
|
|
98
102
|
.blogAuthorImageAlt, src: this
|
|
99
103
|
.blogAuthorImage })), h("ptc-para", { "font-size": "small", "font-weight": "w-4", "para-color": "primary-grey", "para-line-h": "line-height-p", "para-margin": "margin-flush" }, h("a", { class: "blog-author-name mf-listen", tabindex: "0", href: this
|
|
100
104
|
.blogAuthorQueryHref, target: this
|
|
101
105
|
.blogAuthorQueryTarget, "aria-label": "Other blogs by author" }, this
|
|
102
|
-
.blogAuthorName))))))), this.hasCtaSlot && (h("div", { class: `u-flex u-flex-wrap gap-adjustment${this.jumbotronType === "text"
|
|
106
|
+
.blogAuthorName))))))), this.hasCtaSlot && (h("div", { class: `u-flex u-flex-wrap gap-adjustment${this.jumbotronType === "text"
|
|
107
|
+
? " text-adjustment"
|
|
108
|
+
: ""}` }, h("slot", { name: "j-cta" }))))), this.hasPopupVideo &&
|
|
103
109
|
this.jumbotronType !== "png" ? (h("slot", { name: "video" })) : null, this.hasCountdown ? (h("slot", { name: "countdown" })) : null, this.jumbotronType === "png" ? (h("div", { class: "desktop-media-image" }, h("div", { class: "media-image-wrapper" }, h("ptc-picture", { "is-full-width": true, src: this.pngSrc, styles: `img {${this.pngImgStyles}}` }), this.hasPopupVideo ? (h("slot", { name: "video" })) : null))) : null, this.jumbotronType === "gif" ? (h("div", { class: "desktop-media-image desk-gif-adjustment" }, h("img", { src: this.gifSrc }))) : null, this.jumbotronType === "blog" ? (h("div", { class: "desktop-media-image" }, h("div", { class: "media-image-wrapper" }, h("ptc-picture", { "is-full-width": true, src: this.pngSrc, styles: "img {height: 100%;}" })))) : null)))));
|
|
104
110
|
}
|
|
105
111
|
getCssClassMap() {
|
|
@@ -623,6 +629,24 @@ export class PtcJumbotron {
|
|
|
623
629
|
"attribute": "styles",
|
|
624
630
|
"reflect": false
|
|
625
631
|
},
|
|
632
|
+
"enableLazy": {
|
|
633
|
+
"type": "boolean",
|
|
634
|
+
"mutable": false,
|
|
635
|
+
"complexType": {
|
|
636
|
+
"original": "boolean",
|
|
637
|
+
"resolved": "boolean",
|
|
638
|
+
"references": {}
|
|
639
|
+
},
|
|
640
|
+
"required": false,
|
|
641
|
+
"optional": false,
|
|
642
|
+
"docs": {
|
|
643
|
+
"tags": [],
|
|
644
|
+
"text": "(optional) to enable lazy loading"
|
|
645
|
+
},
|
|
646
|
+
"attribute": "enable-lazy",
|
|
647
|
+
"reflect": false,
|
|
648
|
+
"defaultValue": "false"
|
|
649
|
+
},
|
|
626
650
|
"defer": {
|
|
627
651
|
"type": "boolean",
|
|
628
652
|
"mutable": false,
|
|
@@ -1,11 +1,36 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
import { getFileExtension } from "../../utils/utils";
|
|
3
|
+
import { isReducedMotion, onReducedMotionChange } from "../../utils/utils";
|
|
3
4
|
export class PtcMediaCard {
|
|
4
5
|
constructor() {
|
|
5
6
|
/**
|
|
6
7
|
* ref video element
|
|
7
8
|
*/
|
|
8
9
|
this.videoEle = undefined;
|
|
10
|
+
// ---------- Reduced motion helpers ----------
|
|
11
|
+
this.showFirstFrame = (v) => {
|
|
12
|
+
v.preload = "auto";
|
|
13
|
+
v.removeAttribute("autoplay");
|
|
14
|
+
v.loop = false;
|
|
15
|
+
const paint = () => {
|
|
16
|
+
try {
|
|
17
|
+
v.currentTime = 1;
|
|
18
|
+
}
|
|
19
|
+
catch (_a) { }
|
|
20
|
+
v.pause();
|
|
21
|
+
};
|
|
22
|
+
if (v.readyState >= 2 /* HAVE_CURRENT_DATA */) {
|
|
23
|
+
paint();
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
const onLoaded = () => {
|
|
27
|
+
v.removeEventListener("loadeddata", onLoaded);
|
|
28
|
+
paint();
|
|
29
|
+
};
|
|
30
|
+
v.addEventListener("loadeddata", onLoaded, { once: true });
|
|
31
|
+
v.load();
|
|
32
|
+
}
|
|
33
|
+
};
|
|
9
34
|
this.cardType = "media-card";
|
|
10
35
|
this.cardHref = undefined;
|
|
11
36
|
this.target = "_self";
|
|
@@ -22,10 +47,28 @@ export class PtcMediaCard {
|
|
|
22
47
|
this.trackerId = undefined;
|
|
23
48
|
this.isHovered = false;
|
|
24
49
|
this.isTabNavigated = true;
|
|
50
|
+
this.reducedMotion = false;
|
|
51
|
+
this.paused = false;
|
|
25
52
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
53
|
+
async onHoverChange(hover) {
|
|
54
|
+
const v = this.videoEle;
|
|
55
|
+
if (!v)
|
|
56
|
+
return;
|
|
57
|
+
if (this.reducedMotion) {
|
|
58
|
+
if (hover)
|
|
59
|
+
this.showFirstFrame(v);
|
|
60
|
+
else
|
|
61
|
+
v.pause();
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
// Animations ON
|
|
65
|
+
if (hover) {
|
|
66
|
+
v.loop = true;
|
|
67
|
+
v.setAttribute("autoplay", "");
|
|
68
|
+
v.play().catch(() => { });
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
v.pause();
|
|
29
72
|
}
|
|
30
73
|
}
|
|
31
74
|
getCardText() {
|
|
@@ -40,11 +83,37 @@ export class PtcMediaCard {
|
|
|
40
83
|
? (this.isTabNavigated = false)
|
|
41
84
|
: (this.isTabNavigated = true);
|
|
42
85
|
}
|
|
86
|
+
syncPlaybackWithPreference() {
|
|
87
|
+
const v = this.videoEl;
|
|
88
|
+
if (!v)
|
|
89
|
+
return;
|
|
90
|
+
if (this.reducedMotion) {
|
|
91
|
+
this.showFirstFrame(v);
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
// Resume autoplay if hovered; otherwise stay paused
|
|
95
|
+
v.preload = "auto";
|
|
96
|
+
v.loop = true;
|
|
97
|
+
if (this.isHovered && !this.paused) {
|
|
98
|
+
v.setAttribute("autoplay", "");
|
|
99
|
+
v.play().catch(() => { });
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
43
103
|
componentWillLoad() {
|
|
44
104
|
this.setTabNavigatedState();
|
|
105
|
+
this.reducedMotion = isReducedMotion();
|
|
106
|
+
this.ariaLabel = this.getLastStringAfterSlash(this.cardHref);
|
|
45
107
|
}
|
|
46
108
|
componentDidLoad() {
|
|
47
|
-
this.
|
|
109
|
+
this.offPRM = onReducedMotionChange((reduced) => {
|
|
110
|
+
this.reducedMotion = reduced;
|
|
111
|
+
setTimeout(() => this.syncPlaybackWithPreference(), 10);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
disconnectedCallback() {
|
|
115
|
+
var _a;
|
|
116
|
+
(_a = this.offPRM) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
48
117
|
}
|
|
49
118
|
getLastStringAfterSlash(url) {
|
|
50
119
|
const parts = url.split("/");
|
|
@@ -276,7 +345,7 @@ export class PtcMediaCard {
|
|
|
276
345
|
},
|
|
277
346
|
"ariaLabel": {
|
|
278
347
|
"type": "string",
|
|
279
|
-
"mutable":
|
|
348
|
+
"mutable": true,
|
|
280
349
|
"complexType": {
|
|
281
350
|
"original": "string",
|
|
282
351
|
"resolved": "string",
|
|
@@ -347,14 +416,16 @@ export class PtcMediaCard {
|
|
|
347
416
|
static get states() {
|
|
348
417
|
return {
|
|
349
418
|
"isHovered": {},
|
|
350
|
-
"isTabNavigated": {}
|
|
419
|
+
"isTabNavigated": {},
|
|
420
|
+
"reducedMotion": {},
|
|
421
|
+
"paused": {}
|
|
351
422
|
};
|
|
352
423
|
}
|
|
353
424
|
static get elementRef() { return "el"; }
|
|
354
425
|
static get watchers() {
|
|
355
426
|
return [{
|
|
356
427
|
"propName": "isHovered",
|
|
357
|
-
"methodName": "
|
|
428
|
+
"methodName": "onHoverChange"
|
|
358
429
|
}];
|
|
359
430
|
}
|
|
360
431
|
}
|
|
@@ -86,6 +86,7 @@ ptc-footer {
|
|
|
86
86
|
align-content: flex-end;
|
|
87
87
|
z-index: 50020;
|
|
88
88
|
transform: translateY(-100%);
|
|
89
|
+
position: relative;
|
|
89
90
|
}
|
|
90
91
|
@media only screen and (min-width: 992px) {
|
|
91
92
|
.wrapper .modal-popup {
|
|
@@ -101,6 +102,9 @@ ptc-footer {
|
|
|
101
102
|
.wrapper .modal-popup.xl {
|
|
102
103
|
max-width: 64.0625rem;
|
|
103
104
|
}
|
|
105
|
+
.wrapper .modal-popup.fit-content {
|
|
106
|
+
max-width: fit-content;
|
|
107
|
+
}
|
|
104
108
|
.wrapper .modal-popup.max {
|
|
105
109
|
width: calc(100% - 4rem);
|
|
106
110
|
max-width: 75rem;
|
|
@@ -3,33 +3,19 @@ import { createFocusTrap } from "focus-trap";
|
|
|
3
3
|
export class PtcModal {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.setReturnFocus = () => {
|
|
6
|
-
|
|
7
|
-
if (!this.lastFocusElement)
|
|
8
|
-
return;
|
|
9
|
-
// Try focusing the last focused element directly
|
|
10
|
-
if (this.lastFocusElement.tabIndex === 0) {
|
|
6
|
+
if (this.lastFocusElement instanceof HTMLElement) {
|
|
11
7
|
this.lastFocusElement.focus();
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
// If it's inside a shadow DOM, try finding a focusable child
|
|
15
|
-
const shadowRoot = this.lastFocusElement.shadowRoot;
|
|
16
|
-
if (shadowRoot) {
|
|
17
|
-
const focusableElementList = shadowRoot.querySelectorAll('button, [tabindex]:not([tabindex="-1"])');
|
|
18
|
-
if (focusableElementList) {
|
|
19
|
-
let focusableElement = focusableElementList[focusableElementList.length - 1];
|
|
20
|
-
focusableElement.focus();
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
// As a fallback, try to find a focusable child within the element
|
|
25
|
-
const fallbackElement = (_b = (_a = this.lastFocusElement).querySelector) === null || _b === void 0 ? void 0 : _b.call(_a, 'button, [tabindex]:not([tabindex="-1"])');
|
|
26
|
-
if (fallbackElement instanceof HTMLElement) {
|
|
27
|
-
fallbackElement.focus();
|
|
28
8
|
}
|
|
29
9
|
};
|
|
30
10
|
this.handleKeyPress = (event) => {
|
|
31
11
|
if (event.key === "Enter" || event.key === " " || event.key === "Tab") {
|
|
32
12
|
this.openedByKeyboard = true;
|
|
13
|
+
// if (event.key === 'Enter') {
|
|
14
|
+
// if (!this.show) {
|
|
15
|
+
// const id= (event.target as HTMLElement).getAttribute('id');
|
|
16
|
+
// localStorage.setItem('modalId', id);
|
|
17
|
+
// }
|
|
18
|
+
// }
|
|
33
19
|
}
|
|
34
20
|
};
|
|
35
21
|
this.handleMouseDown = () => {
|
|
@@ -62,7 +48,7 @@ export class PtcModal {
|
|
|
62
48
|
}
|
|
63
49
|
onShowChange(newValue) {
|
|
64
50
|
if (newValue) {
|
|
65
|
-
this.lastFocusElement = document.activeElement;
|
|
51
|
+
// this.lastFocusElement = document.activeElement as HTMLElement;
|
|
66
52
|
this.fireOnOpened(this);
|
|
67
53
|
}
|
|
68
54
|
else {
|
|
@@ -159,7 +145,7 @@ export class PtcModal {
|
|
|
159
145
|
}
|
|
160
146
|
componentDidLoad() {
|
|
161
147
|
if (this.show) {
|
|
162
|
-
this.lastFocusElement = document.activeElement;
|
|
148
|
+
// this.lastFocusElement = document.activeElement as HTMLElement;
|
|
163
149
|
this.fireOnOpened(this);
|
|
164
150
|
}
|
|
165
151
|
if (this.showHeaderFooter) {
|
|
@@ -240,6 +226,20 @@ export class PtcModal {
|
|
|
240
226
|
if (this.trap) {
|
|
241
227
|
this.trap.deactivate();
|
|
242
228
|
}
|
|
229
|
+
// // Code for returning the focus to the element which opened the modal
|
|
230
|
+
// const modalId = localStorage.getItem('modalId');
|
|
231
|
+
// if (!modalId) return;
|
|
232
|
+
// const focusItem = document.querySelector<HTMLElement>(`#${modalId}`);
|
|
233
|
+
// if (!focusItem || focusItem.id !== modalId) return;
|
|
234
|
+
// // Focus the host element
|
|
235
|
+
// focusItem.focus();
|
|
236
|
+
// // If it's a PTC-BUTTON, try focusing the internal native <button>
|
|
237
|
+
// if (focusItem.tagName === 'PTC-BUTTON' && focusItem.shadowRoot) {
|
|
238
|
+
// const innerButton = focusItem.shadowRoot.querySelector<HTMLElement>('button');
|
|
239
|
+
// innerButton?.focus();
|
|
240
|
+
// }
|
|
241
|
+
// // Clean up localStorage
|
|
242
|
+
// localStorage.removeItem('modalId');
|
|
243
243
|
} })));
|
|
244
244
|
let bottomCloseBtnEle = (h("div", { tabindex: "0", class: "bottom-close", id: "modal-bottom-close", onClick: (e) => {
|
|
245
245
|
e.preventDefault();
|
|
@@ -355,8 +355,8 @@ export class PtcModal {
|
|
|
355
355
|
"type": "string",
|
|
356
356
|
"mutable": true,
|
|
357
357
|
"complexType": {
|
|
358
|
-
"original": "| \"sm\"\r\n\t\t| \"md\"\r\n\t\t| \"lg\"\r\n\t\t| \"xl\"\r\n\t\t| \"max\"\r\n\t\t| \"sm-modal\"",
|
|
359
|
-
"resolved": "\"lg\" | \"max\" | \"md\" | \"sm\" | \"sm-modal\" | \"xl\"",
|
|
358
|
+
"original": "| \"sm\"\r\n\t\t| \"md\"\r\n\t\t| \"lg\"\r\n\t\t| \"xl\"\r\n\t\t| \"fit-content\"\r\n\t\t| \"max\"\r\n\t\t| \"sm-modal\"",
|
|
359
|
+
"resolved": "\"fit-content\" | \"lg\" | \"max\" | \"md\" | \"sm\" | \"sm-modal\" | \"xl\"",
|
|
360
360
|
"references": {}
|
|
361
361
|
},
|
|
362
362
|
"required": false,
|
|
@@ -144,7 +144,10 @@ export class PtcModalQuiz {
|
|
|
144
144
|
render() {
|
|
145
145
|
const ProgressDots = () => {
|
|
146
146
|
return (h("div", { class: "dot-progress-bar" }, [...Array(this.totalQuestions).keys()].map((questionNumber) => {
|
|
147
|
-
return (h("div", null, h("div", { class: `dot-progress-circle ${questionNumber ===
|
|
147
|
+
return (h("div", null, h("div", { class: `dot-progress-circle ${questionNumber ===
|
|
148
|
+
this.currentQuestion - 1
|
|
149
|
+
? "active"
|
|
150
|
+
: ""}` }), questionNumber <
|
|
148
151
|
this.totalQuestions - 1 ? (h("div", { class: "dot-progress-dash" }, h("div", { class: "dashed-line" }))) : null));
|
|
149
152
|
})));
|
|
150
153
|
};
|
|
@@ -196,8 +196,8 @@ export class PtcPara {
|
|
|
196
196
|
"type": "string",
|
|
197
197
|
"mutable": false,
|
|
198
198
|
"complexType": {
|
|
199
|
-
"original": "\"primary-grey\" | \"white\"
|
|
200
|
-
"resolved": "\"gray-darker\" | \"primary-grey\" | \"white\"",
|
|
199
|
+
"original": "| \"primary-grey\"\r\n\t\t| \"primary-green\"\r\n\t\t| \"white\"\r\n\t\t| \"gray-darker\"",
|
|
200
|
+
"resolved": "\"gray-darker\" | \"primary-green\" | \"primary-grey\" | \"white\"",
|
|
201
201
|
"references": {}
|
|
202
202
|
},
|
|
203
203
|
"required": false,
|