@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.
Files changed (353) hide show
  1. package/dist/cjs/blog-detail-content_2.cjs.entry.js +1 -1
  2. package/dist/cjs/blog-detail-layout.cjs.entry.js +1 -1
  3. package/dist/cjs/blogs-search-section.cjs.entry.js +5 -2
  4. package/dist/cjs/{component-35540bfb.js → component-6a178a16.js} +2643 -832
  5. package/dist/cjs/dynamic-box-bundle.cjs.entry.js +3 -1
  6. package/dist/cjs/featured-list.cjs.entry.js +1 -1
  7. package/dist/cjs/homepage-jumbotron.cjs.entry.js +1 -1
  8. package/dist/cjs/homepage-toggled-content.cjs.entry.js +4 -2
  9. package/dist/cjs/icon-asset.cjs.entry.js +1 -1
  10. package/dist/cjs/innovator-toggle-container.cjs.entry.js +40 -4
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/cjs/modal-form-example.cjs.entry.js +109 -0
  13. package/dist/cjs/most-popular-news.cjs.entry.js +1 -1
  14. package/dist/cjs/my-component.cjs.entry.js +1 -1
  15. package/dist/cjs/ptc-accordion-item.cjs.entry.js +1 -1
  16. package/dist/cjs/ptc-announcement.cjs.entry.js +2 -1
  17. package/dist/cjs/ptc-back-to-top.cjs.entry.js +1 -1
  18. package/dist/cjs/ptc-background-video.cjs.entry.js +92 -28
  19. package/dist/cjs/ptc-bio-card.cjs.entry.js +1 -1
  20. package/dist/cjs/ptc-button_5.cjs.entry.js +597 -0
  21. package/dist/cjs/ptc-card-bottom_2.cjs.entry.js +3 -1
  22. package/dist/cjs/ptc-card_2.cjs.entry.js +5 -4
  23. package/dist/cjs/ptc-case-studies-slider.cjs.entry.js +1 -1
  24. package/dist/cjs/ptc-close-icon_2.cjs.entry.js +24 -24
  25. package/dist/cjs/ptc-collapse-list.cjs.entry.js +1 -1
  26. package/dist/cjs/ptc-data-lookup.cjs.entry.js +1 -2
  27. package/dist/cjs/ptc-date.cjs.entry.js +1 -1
  28. package/dist/cjs/ptc-featured-list.cjs.entry.js +1 -1
  29. package/dist/cjs/ptc-filter-level-theater.cjs.entry.js +1 -1
  30. package/dist/cjs/{ptc-form-checkbox_2.cjs.entry.js → ptc-form-checkbox_4.cjs.entry.js} +724 -6
  31. package/dist/cjs/ptc-form-radio-button.cjs.entry.js +0 -13
  32. package/dist/cjs/ptc-homepage-image-feature.cjs.entry.js +1 -1
  33. package/dist/cjs/ptc-homepage-video-background.cjs.entry.js +1 -1
  34. package/dist/cjs/ptc-icon-card.cjs.entry.js +1 -1
  35. package/dist/cjs/ptc-img.cjs.entry.js +87 -7
  36. package/dist/cjs/ptc-jumbotron.cjs.entry.js +11 -5
  37. package/dist/cjs/ptc-link.cjs.entry.js +1 -1
  38. package/dist/cjs/ptc-media-card.cjs.entry.js +74 -6
  39. package/dist/cjs/ptc-modal-quiz.cjs.entry.js +4 -1
  40. package/dist/cjs/ptc-podcast-card.cjs.entry.js +1 -1
  41. package/dist/cjs/ptc-preloader.cjs.entry.js +1 -1
  42. package/dist/cjs/ptc-previous-url.cjs.entry.js +11 -2
  43. package/dist/cjs/ptc-pricing-packaging-table.cjs.entry.js +27 -11
  44. package/dist/cjs/ptc-pricing-tabs.cjs.entry.js +2 -2
  45. package/dist/cjs/ptc-product-card.cjs.entry.js +1 -1
  46. package/dist/cjs/ptc-product-category.cjs.entry.js +1 -1
  47. package/dist/cjs/ptc-product-highlight-card.cjs.entry.js +1 -1
  48. package/dist/cjs/ptc-readmore-char.cjs.entry.js +1 -1
  49. package/dist/cjs/ptc-readmore-v3.cjs.entry.js +1 -1
  50. package/dist/cjs/ptc-skeleton.cjs.entry.js +1 -1
  51. package/dist/cjs/ptc-social-icons-footer.cjs.entry.js +1 -1
  52. package/dist/cjs/ptc-text-copy-with-background.cjs.entry.js +1 -1
  53. package/dist/cjs/ptc-tooltip-v2.cjs.entry.js +1 -1
  54. package/dist/cjs/ptc-value-led-speed-bump.cjs.entry.js +1 -1
  55. package/dist/cjs/ptc-white-paper.cjs.entry.js +19 -9
  56. package/dist/cjs/ptcw-design.cjs.js +1 -1
  57. package/dist/cjs/{utils-b63aef52.js → utils-0ff09a53.js} +13 -0
  58. package/dist/collection/collection-manifest.json +1 -2
  59. package/dist/collection/components/dynamic-box-bundle/dynamic-box-bundle.js +3 -1
  60. package/dist/collection/components/icon-asset/icon-asset.css +0 -8
  61. package/dist/collection/components/icon-asset/icon-asset.js +2 -2
  62. package/dist/collection/components/icon-asset/media/designer-v6.0.7.svg +30 -2
  63. package/dist/collection/components/innovator-toggle-container/innovator-toggle-container.css +24 -0
  64. package/dist/collection/components/innovator-toggle-container/innovator-toggle-container.js +39 -3
  65. package/dist/collection/components/organism-bundles/blogs-search-section/blogs-search-section.js +4 -1
  66. package/dist/collection/components/organism-bundles/bundle-featured-list/featured-list.css +5 -4
  67. package/dist/collection/components/organism-bundles/form/modal-from-example/modal-form-example.css +26 -0
  68. package/dist/collection/components/organism-bundles/form/modal-from-example/modal-form-example.js +114 -0
  69. package/dist/collection/components/organism-bundles/homepage-toggled-content/homepage-toggled-content.js +3 -1
  70. package/dist/collection/components/ptc-announcement/ptc-announcement.js +2 -1
  71. package/dist/collection/components/ptc-back-to-top/ptc-back-to-top.css +0 -1
  72. package/dist/collection/components/ptc-background-video/ptc-background-video.css +21 -0
  73. package/dist/collection/components/ptc-background-video/ptc-background-video.js +103 -43
  74. package/dist/collection/components/ptc-bio-card/ptc-bio-card.css +24 -0
  75. package/dist/collection/components/ptc-card-wrapper/ptc-card-wrapper.js +3 -1
  76. package/dist/collection/components/ptc-case-studies-slider/ptc-case-studies-slider.css +24 -0
  77. package/dist/collection/components/ptc-date/ptc-date.js +2 -2
  78. package/dist/collection/components/ptc-featured-list/ptc-featured-list.css +24 -0
  79. package/dist/collection/components/ptc-filter-level-theater/ptc-filter-level-theater.css +24 -0
  80. package/dist/collection/components/ptc-form-radio-button/ptc-form-radio-button.js +2 -18
  81. package/dist/collection/components/ptc-img/ptc-img.css +76 -0
  82. package/dist/collection/components/ptc-img/ptc-img.js +132 -7
  83. package/dist/collection/components/ptc-jumbotron/ptc-jumbotron.css +24 -0
  84. package/dist/collection/components/ptc-jumbotron/ptc-jumbotron.js +28 -4
  85. package/dist/collection/components/ptc-media-card/ptc-media-card.js +78 -7
  86. package/dist/collection/components/ptc-modal/ptc-modal.css +4 -0
  87. package/dist/collection/components/ptc-modal/ptc-modal.js +25 -25
  88. package/dist/collection/components/ptc-modal-quiz/ptc-modal-quiz.js +4 -1
  89. package/dist/collection/components/ptc-para/ptc-para.css +3 -0
  90. package/dist/collection/components/ptc-para/ptc-para.js +2 -2
  91. package/dist/collection/components/ptc-podcast-card/ptc-podcast-card.css +24 -0
  92. package/dist/collection/components/ptc-preloader/ptc-preloader.css +147 -111
  93. package/dist/collection/components/ptc-preloader/ptc-preloader.js +1 -1
  94. package/dist/collection/components/ptc-preloader-section/ptc-preloader-section.css +14 -0
  95. package/dist/collection/components/ptc-preloader-section/ptc-preloader-section.js +4 -3
  96. package/dist/collection/components/ptc-previous-url/ptc-previous-url.css +16 -0
  97. package/dist/collection/components/ptc-previous-url/ptc-previous-url.js +28 -1
  98. package/dist/collection/components/ptc-pricing-packaging-table/ptc-pricing-packaging-table.js +26 -10
  99. package/dist/collection/components/ptc-pricing-tabs/ptc-pricing-tabs.js +1 -1
  100. package/dist/collection/components/ptc-product-card/ptc-product-card.css +24 -0
  101. package/dist/collection/components/ptc-product-category/ptc-product-category.css +24 -0
  102. package/dist/collection/components/ptc-product-highlight-card/ptc-product-highlight-card.css +24 -0
  103. package/dist/collection/components/ptc-readmore-char/ptc-readmore-char.css +24 -0
  104. package/dist/collection/components/ptc-readmore-v3/ptc-readmore-v3.css +24 -0
  105. package/dist/collection/components/ptc-seo-title/ptc-seo-title.js +3 -3
  106. package/dist/collection/components/ptc-skeleton/ptc-skeleton.css +6 -0
  107. package/dist/collection/components/ptc-text-copy-with-background/ptc-text-copy-with-background.css +19 -0
  108. package/dist/collection/components/ptc-textfield/ptc-textfield.js +3 -5
  109. package/dist/collection/components/ptc-tooltip-v2/ptc-tooltip-v2.css +24 -0
  110. package/dist/collection/components/ptc-value-led-speed-bump/ptc-value-led-speed-bump.css +24 -0
  111. package/dist/collection/components/ptc-white-paper/ptc-white-paper.css +27 -3
  112. package/dist/collection/components/ptc-white-paper/ptc-white-paper.js +18 -8
  113. package/dist/collection/stories/Announcement.stories.js +7 -0
  114. package/dist/collection/stories/BackgroundImage.stories.js +7 -0
  115. package/dist/collection/stories/Breadcrumb.stories.js +37 -44
  116. package/dist/collection/stories/Breadcrumb2.stories.js +62 -0
  117. package/dist/collection/stories/BrightcovVideo.stories.js +21 -0
  118. package/dist/collection/stories/Button.stories.js +204 -0
  119. package/dist/collection/stories/CardWrapper.stories.js +32 -0
  120. package/dist/collection/stories/Checkbox.stories.js +21 -0
  121. package/dist/collection/stories/CheckboxGroup.stories.js +27 -0
  122. package/dist/collection/stories/CloseIcon.stories.js +10 -0
  123. package/dist/collection/stories/CollapseList.stories.js +14 -0
  124. package/dist/collection/stories/Countdown.stories.js +6 -67
  125. package/dist/collection/stories/DataLookup.stories.js +21 -0
  126. package/dist/collection/stories/Date.stories.js +42 -26
  127. package/dist/collection/stories/EllipsisDropdown.stories.js +14 -0
  128. package/dist/collection/stories/FormCheckbox.stories.js +3 -3
  129. package/dist/collection/stories/FormRadioButton.stories.js +3 -3
  130. package/dist/collection/stories/Hero.stories.js +35 -0
  131. package/dist/collection/stories/HeroFooterCTA.stories.js +21 -0
  132. package/dist/collection/stories/Icon.stories.js +30 -6
  133. package/dist/collection/stories/Jumbotron.stories.js +36 -0
  134. package/dist/collection/stories/Link.stories.js +3 -3
  135. package/dist/collection/stories/ListItem.stories.js +7 -1
  136. package/dist/collection/stories/MinimizedFooter.stories.js +18 -0
  137. package/dist/collection/stories/MinimizedHeader.stories.js +37 -0
  138. package/dist/collection/stories/MobileSelect.stories.js +1 -1
  139. package/dist/collection/stories/MultiSelect.stories.js +10 -0
  140. package/dist/collection/stories/Paragraph.stories.js +104 -0
  141. package/dist/collection/stories/ReadMore.stories.js +100 -0
  142. package/dist/collection/stories/ReadmoreV2.stories.js +37 -0
  143. package/dist/collection/stories/ScrollButton.stories.js +14 -0
  144. package/dist/collection/stories/SearchField.stories.js +21 -0
  145. package/dist/collection/stories/Select.stories.js +21 -33
  146. package/dist/collection/stories/SocialShare.stories.js +83 -0
  147. package/dist/collection/stories/Span.stories.js +10 -4
  148. package/dist/collection/stories/SvgBtn.stories.js +36 -0
  149. package/dist/collection/stories/SvgButton.stories.js +1 -1
  150. package/dist/collection/stories/TextCopyWithBackground.stories.js +100 -0
  151. package/dist/collection/stories/Textfield.stories.js +14 -0
  152. package/dist/collection/stories/TheaterVideo.stories.js +21 -0
  153. package/dist/collection/stories/Title.stories.js +127 -0
  154. package/dist/collection/stories/Tooltip.stories.js +112 -0
  155. package/dist/collection/stories/VideoEmbed.stories.js +10 -0
  156. package/dist/collection/stories/backToTop.stories.js +10 -0
  157. package/dist/collection/stories/backgroundVideo.stories.js +115 -0
  158. package/dist/collection/stories/jumbotronSubMenu.stories.js +14 -0
  159. package/dist/collection/stories/organisms/eSupport/CaseTracker/preview.stories.js +45 -0
  160. package/dist/collection/stories/organisms/eSupport/SupportArticle/preview.stories.js +47 -0
  161. package/dist/collection/stories/organisms/eSupport/SupportPage/preview.stories.js +157 -0
  162. package/dist/collection/stories/ptcLink2.stories.js +142 -0
  163. package/dist/collection/utils/utils.js +11 -0
  164. package/dist/custom-elements/index.d.ts +6 -12
  165. package/dist/custom-elements/index.js +8043 -7952
  166. package/dist/esm/blog-detail-content_2.entry.js +1 -1
  167. package/dist/esm/blog-detail-layout.entry.js +1 -1
  168. package/dist/esm/blogs-search-section.entry.js +5 -2
  169. package/dist/esm/{component-8c53e377.js → component-80f298b4.js} +2592 -793
  170. package/dist/esm/dynamic-box-bundle.entry.js +3 -1
  171. package/dist/esm/featured-list.entry.js +1 -1
  172. package/dist/esm/homepage-jumbotron.entry.js +1 -1
  173. package/dist/esm/homepage-toggled-content.entry.js +4 -2
  174. package/dist/esm/icon-asset.entry.js +1 -1
  175. package/dist/esm/innovator-toggle-container.entry.js +40 -4
  176. package/dist/esm/{interfaces-4caedd26.js → interfaces-7c0243be.js} +1 -1
  177. package/dist/esm/loader.js +1 -1
  178. package/dist/esm/modal-form-example.entry.js +105 -0
  179. package/dist/esm/most-popular-news.entry.js +1 -1
  180. package/dist/esm/my-component.entry.js +1 -1
  181. package/dist/esm/ptc-accordion-item.entry.js +1 -1
  182. package/dist/esm/ptc-announcement.entry.js +2 -1
  183. package/dist/esm/ptc-back-to-top.entry.js +1 -1
  184. package/dist/esm/ptc-background-video.entry.js +92 -28
  185. package/dist/esm/ptc-bio-card.entry.js +1 -1
  186. package/dist/esm/ptc-button_5.entry.js +589 -0
  187. package/dist/esm/ptc-card-bottom_2.entry.js +3 -1
  188. package/dist/esm/ptc-card_2.entry.js +5 -4
  189. package/dist/esm/ptc-case-studies-slider.entry.js +1 -1
  190. package/dist/esm/ptc-close-icon_2.entry.js +24 -24
  191. package/dist/esm/ptc-collapse-list.entry.js +1 -1
  192. package/dist/esm/ptc-data-lookup.entry.js +1 -2
  193. package/dist/esm/ptc-date.entry.js +1 -1
  194. package/dist/esm/ptc-featured-list.entry.js +1 -1
  195. package/dist/esm/ptc-filter-level-theater.entry.js +1 -1
  196. package/dist/esm/{ptc-form-checkbox_2.entry.js → ptc-form-checkbox_4.entry.js} +723 -7
  197. package/dist/esm/ptc-form-radio-button.entry.js +0 -13
  198. package/dist/esm/ptc-homepage-image-feature.entry.js +1 -1
  199. package/dist/esm/ptc-homepage-video-background.entry.js +1 -1
  200. package/dist/esm/ptc-icon-card.entry.js +1 -1
  201. package/dist/esm/ptc-img.entry.js +88 -8
  202. package/dist/esm/ptc-jumbotron.entry.js +11 -5
  203. package/dist/esm/ptc-link.entry.js +1 -1
  204. package/dist/esm/ptc-media-card.entry.js +74 -6
  205. package/dist/esm/ptc-modal-quiz.entry.js +4 -1
  206. package/dist/esm/ptc-podcast-card.entry.js +1 -1
  207. package/dist/esm/ptc-preloader.entry.js +1 -1
  208. package/dist/esm/ptc-previous-url.entry.js +11 -2
  209. package/dist/esm/ptc-pricing-packaging-table.entry.js +27 -11
  210. package/dist/esm/ptc-pricing-tabs.entry.js +2 -2
  211. package/dist/esm/ptc-product-card.entry.js +1 -1
  212. package/dist/esm/ptc-product-category.entry.js +1 -1
  213. package/dist/esm/ptc-product-highlight-card.entry.js +1 -1
  214. package/dist/esm/ptc-readmore-char.entry.js +1 -1
  215. package/dist/esm/ptc-readmore-v3.entry.js +1 -1
  216. package/dist/esm/ptc-skeleton.entry.js +1 -1
  217. package/dist/esm/ptc-social-icons-footer.entry.js +1 -1
  218. package/dist/esm/ptc-text-copy-with-background.entry.js +1 -1
  219. package/dist/esm/ptc-tooltip-v2.entry.js +1 -1
  220. package/dist/esm/ptc-value-led-speed-bump.entry.js +1 -1
  221. package/dist/esm/ptc-white-paper.entry.js +19 -9
  222. package/dist/esm/ptcw-design.js +1 -1
  223. package/dist/esm/{utils-2f12c081.js → utils-a64ba942.js} +12 -1
  224. package/dist/ptcw-design/media/designer-v6.0.7.svg +30 -2
  225. package/dist/ptcw-design/{p-9dbcfcee.entry.js → p-01497d7a.entry.js} +1 -1
  226. package/dist/ptcw-design/p-043be054.entry.js +1 -0
  227. package/dist/ptcw-design/{p-257267e3.entry.js → p-0df868d2.entry.js} +1 -1
  228. package/dist/ptcw-design/p-1519b36f.entry.js +1 -0
  229. package/dist/ptcw-design/{p-fe8392c4.entry.js → p-1c52250d.entry.js} +1 -1
  230. package/dist/ptcw-design/p-1e3bf09c.entry.js +1 -0
  231. package/dist/ptcw-design/p-22cf00e7.js +1 -0
  232. package/dist/ptcw-design/p-2670ac97.entry.js +1 -0
  233. package/dist/ptcw-design/p-2b89cc16.entry.js +1 -0
  234. package/dist/ptcw-design/{p-d0fb9bfb.entry.js → p-2f21b69b.entry.js} +1 -1
  235. package/dist/ptcw-design/{p-4b41fe4e.entry.js → p-312c41b8.entry.js} +1 -1
  236. package/dist/ptcw-design/p-349f43d5.entry.js +1 -0
  237. package/dist/ptcw-design/p-390c0dee.entry.js +1 -0
  238. package/dist/ptcw-design/{p-a3868e6a.entry.js → p-3a40c41f.entry.js} +1 -1
  239. package/dist/ptcw-design/{p-45b1f3fc.entry.js → p-456c5cbb.entry.js} +1 -1
  240. package/dist/ptcw-design/p-4c852c9c.entry.js +1 -0
  241. package/dist/ptcw-design/p-50308f02.entry.js +1 -0
  242. package/dist/ptcw-design/{p-c3022c48.entry.js → p-54b589a6.entry.js} +1 -1
  243. package/dist/ptcw-design/{p-9b0df204.entry.js → p-5877f093.entry.js} +1 -1
  244. package/dist/ptcw-design/{p-78370e3d.entry.js → p-5a8e7557.entry.js} +1 -1
  245. package/dist/ptcw-design/p-5c81c755.entry.js +1 -0
  246. package/dist/ptcw-design/{p-901c31b3.entry.js → p-5cf5b9f8.entry.js} +1 -1
  247. package/dist/ptcw-design/p-672a349f.js +336 -0
  248. package/dist/ptcw-design/p-684ef1e5.entry.js +1 -0
  249. package/dist/ptcw-design/{p-2a3c8a30.entry.js → p-7235425a.entry.js} +1 -1
  250. package/dist/ptcw-design/p-74097f89.entry.js +1 -0
  251. package/dist/ptcw-design/p-799afee5.entry.js +1 -0
  252. package/dist/ptcw-design/{p-f7c47857.entry.js → p-81bcde85.entry.js} +1 -1
  253. package/dist/ptcw-design/{p-a5fc048f.entry.js → p-82f766d2.entry.js} +1 -1
  254. package/dist/ptcw-design/{p-37f92bb4.entry.js → p-884c335c.entry.js} +1 -1
  255. package/dist/ptcw-design/{p-76dab076.entry.js → p-8aca7181.entry.js} +1 -1
  256. package/dist/ptcw-design/p-8fb48953.entry.js +1 -0
  257. package/dist/ptcw-design/{p-52e17d34.entry.js → p-92ad78c5.entry.js} +1 -1
  258. package/dist/ptcw-design/p-938db2fd.entry.js +68 -0
  259. package/dist/ptcw-design/p-af831c13.entry.js +1 -0
  260. package/dist/ptcw-design/p-b684ca9d.entry.js +1 -0
  261. package/dist/ptcw-design/{p-abadbe5b.entry.js → p-bd9d995b.entry.js} +1 -1
  262. package/dist/ptcw-design/p-c09a8288.entry.js +1 -0
  263. package/dist/ptcw-design/{p-8c121480.entry.js → p-c160bda4.entry.js} +1 -1
  264. package/dist/ptcw-design/p-c555a45c.entry.js +1 -0
  265. package/dist/ptcw-design/p-cb0e3ec2.entry.js +1 -0
  266. package/dist/ptcw-design/{p-db0fc94d.entry.js → p-d3ac3758.entry.js} +1 -1
  267. package/dist/ptcw-design/{p-23cb5b5b.entry.js → p-db1dcce0.entry.js} +1 -1
  268. package/dist/ptcw-design/p-dc85c302.entry.js +1 -0
  269. package/dist/ptcw-design/p-de960790.entry.js +1 -0
  270. package/dist/ptcw-design/p-dec9c2a0.entry.js +1 -0
  271. package/dist/ptcw-design/p-e196f008.entry.js +1 -0
  272. package/dist/ptcw-design/{p-54f5a5be.entry.js → p-e23bc4a1.entry.js} +1 -1
  273. package/dist/ptcw-design/{p-81e5fa38.entry.js → p-e784a338.entry.js} +1 -1
  274. package/dist/ptcw-design/{p-711bcdad.js → p-ee1183b2.js} +1 -1
  275. package/dist/ptcw-design/{p-9f01419b.entry.js → p-f2675bb0.entry.js} +1 -1
  276. package/dist/ptcw-design/{p-5dec76bd.entry.js → p-f57f32ee.entry.js} +1 -1
  277. package/dist/ptcw-design/ptcw-design.css +4 -3
  278. package/dist/ptcw-design/ptcw-design.esm.js +1 -1
  279. package/dist/types/components/icon-asset/icon-asset.d.ts +1 -1
  280. package/dist/types/components/innovator-toggle-container/innovator-toggle-container.d.ts +3 -0
  281. package/dist/types/components/organism-bundles/blogs-search-section/blogs-search-section.d.ts +1 -1
  282. package/dist/types/components/organism-bundles/form/modal-from-example/modal-form-example.d.ts +25 -0
  283. package/dist/types/components/ptc-background-video/ptc-background-video.d.ts +31 -47
  284. package/dist/types/components/ptc-form-radio-button/ptc-form-radio-button.d.ts +0 -2
  285. package/dist/types/components/ptc-img/ptc-img.d.ts +29 -1
  286. package/dist/types/components/ptc-jumbotron/ptc-jumbotron.d.ts +4 -0
  287. package/dist/types/components/ptc-media-card/ptc-media-card.d.ts +8 -2
  288. package/dist/types/components/ptc-modal/ptc-modal.d.ts +1 -1
  289. package/dist/types/components/ptc-pagenation/ptc-pagenation.d.ts +1 -1
  290. package/dist/types/components/ptc-para/ptc-para.d.ts +1 -1
  291. package/dist/types/components/ptc-previous-url/ptc-previous-url.d.ts +2 -0
  292. package/dist/types/components.d.ts +139 -130
  293. package/dist/types/utils/utils.d.ts +2 -0
  294. package/package.json +1 -1
  295. package/readme.md +5 -1
  296. package/dist/cjs/buying-option-card.cjs.entry.js +0 -184
  297. package/dist/cjs/buying-option-cards-slider.cjs.entry.js +0 -140
  298. package/dist/cjs/component-1b8ad4d2.js +0 -1819
  299. package/dist/cjs/ptc-button.cjs.entry.js +0 -117
  300. package/dist/cjs/ptc-multi-select_2.cjs.entry.js +0 -730
  301. package/dist/cjs/ptc-para.cjs.entry.js +0 -139
  302. package/dist/cjs/ptc-picture.cjs.entry.js +0 -168
  303. package/dist/cjs/ptc-spacer.cjs.entry.js +0 -38
  304. package/dist/cjs/ptc-title.cjs.entry.js +0 -161
  305. package/dist/collection/components/buying-option-card/buying-option-card.css +0 -124
  306. package/dist/collection/components/buying-option-card/buying-option-card.js +0 -227
  307. package/dist/collection/components/buying-option-cards-slider/buying-option-cards-slider.css +0 -1148
  308. package/dist/collection/components/buying-option-cards-slider/buying-option-cards-slider.js +0 -135
  309. package/dist/collection/stories/organisms/ptc/Buying Options Cards Slider/preview.stories.js +0 -264
  310. package/dist/esm/buying-option-card.entry.js +0 -180
  311. package/dist/esm/buying-option-cards-slider.entry.js +0 -136
  312. package/dist/esm/component-9beac35b.js +0 -1802
  313. package/dist/esm/ptc-button.entry.js +0 -113
  314. package/dist/esm/ptc-multi-select_2.entry.js +0 -725
  315. package/dist/esm/ptc-para.entry.js +0 -135
  316. package/dist/esm/ptc-picture.entry.js +0 -164
  317. package/dist/esm/ptc-spacer.entry.js +0 -34
  318. package/dist/esm/ptc-title.entry.js +0 -157
  319. package/dist/ptcw-design/p-009fbf1f.entry.js +0 -1
  320. package/dist/ptcw-design/p-00e21489.entry.js +0 -1
  321. package/dist/ptcw-design/p-0a7cc9e4.entry.js +0 -1
  322. package/dist/ptcw-design/p-0c69ea52.entry.js +0 -1
  323. package/dist/ptcw-design/p-19a407ff.entry.js +0 -68
  324. package/dist/ptcw-design/p-1f15239e.entry.js +0 -1
  325. package/dist/ptcw-design/p-214d9da6.entry.js +0 -1
  326. package/dist/ptcw-design/p-24776ca2.entry.js +0 -1
  327. package/dist/ptcw-design/p-2bfd8371.entry.js +0 -1
  328. package/dist/ptcw-design/p-2e6e2a9d.entry.js +0 -1
  329. package/dist/ptcw-design/p-352e87c0.entry.js +0 -1
  330. package/dist/ptcw-design/p-38e5e590.entry.js +0 -1
  331. package/dist/ptcw-design/p-3ed4a7ed.entry.js +0 -1
  332. package/dist/ptcw-design/p-56a73429.entry.js +0 -1
  333. package/dist/ptcw-design/p-605b13a2.entry.js +0 -1
  334. package/dist/ptcw-design/p-64026649.entry.js +0 -1
  335. package/dist/ptcw-design/p-80122e26.js +0 -1
  336. package/dist/ptcw-design/p-8cea8943.entry.js +0 -1
  337. package/dist/ptcw-design/p-9493dfa0.entry.js +0 -1
  338. package/dist/ptcw-design/p-96163196.entry.js +0 -1
  339. package/dist/ptcw-design/p-9681188f.entry.js +0 -1
  340. package/dist/ptcw-design/p-98426799.js +0 -203
  341. package/dist/ptcw-design/p-98844b50.js +0 -134
  342. package/dist/ptcw-design/p-a7ac0ecb.entry.js +0 -1
  343. package/dist/ptcw-design/p-a8872ce3.entry.js +0 -1
  344. package/dist/ptcw-design/p-abca6130.entry.js +0 -1
  345. package/dist/ptcw-design/p-b44f4fb1.entry.js +0 -1
  346. package/dist/ptcw-design/p-bbbfd2e5.entry.js +0 -1
  347. package/dist/ptcw-design/p-c6431ebc.entry.js +0 -1
  348. package/dist/ptcw-design/p-cad4b517.entry.js +0 -1
  349. package/dist/ptcw-design/p-d51438de.entry.js +0 -1
  350. package/dist/ptcw-design/p-d875f96d.entry.js +0 -1
  351. package/dist/ptcw-design/p-e4eb925f.entry.js +0 -1
  352. package/dist/types/components/buying-option-card/buying-option-card.d.ts +0 -44
  353. 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
- return (h(Host, null, this.styles && h("style", null, this.styles), h("div", { class: classMap, "data-xs": `${this.imgUrl}`, "data-sm": `${this.imgUrl}`, "data-md": `${this.imgUrl}`, "data-lg": `${this.imgUrl}` }, this.imageType == "smart-bg" ? h("slot", null) : null)));
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
- "ptc-img": true,
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" || this.jumbotronType === "blog" ? "margin-flush" : "margin-bottom-6"}`, "para-color": "white", "para-line-h": "line-height-p", "para-align": 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" ? " text-adjustment" : ""}` }, h("slot", { name: "j-cta" }))))), this.hasPopupVideo &&
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
- WatchStateHandler(newValue) {
27
- if (this.videoEle) {
28
- newValue ? this.videoEle.play() : this.videoEle.pause();
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.ariaLabel = this.getLastStringAfterSlash(this.cardHref);
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": false,
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": "WatchStateHandler"
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
- var _a, _b;
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 === this.currentQuestion - 1 ? "active" : ""}` }), 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
  };
@@ -108,6 +108,9 @@ p.main {
108
108
  p.primary-grey {
109
109
  color: var(--color-gray-10);
110
110
  }
111
+ p.primary-green {
112
+ color: var(--color-green-06);
113
+ }
111
114
  p.gray-darker {
112
115
  color: var(--color-gray-11);
113
116
  }
@@ -196,8 +196,8 @@ export class PtcPara {
196
196
  "type": "string",
197
197
  "mutable": false,
198
198
  "complexType": {
199
- "original": "\"primary-grey\" | \"white\" | \"gray-darker\"",
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,