@ptcwebops/ptcw-design 6.2.21 → 6.2.22-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 (516) 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 +1 -1
  4. package/dist/cjs/{component-06dda623.js → component-4dd13907.js} +2643 -832
  5. package/dist/cjs/event-jumbotron-example.cjs.entry.js +146 -0
  6. package/dist/cjs/event-podcast-slider-example.cjs.entry.js +7 -13
  7. package/dist/cjs/featured-list.cjs.entry.js +1 -1
  8. package/dist/cjs/homepage-jumbotron.cjs.entry.js +1 -1
  9. package/dist/cjs/homepage-toggled-content.cjs.entry.js +1 -1
  10. package/dist/cjs/icon-asset_18.cjs.entry.js +1501 -0
  11. package/dist/cjs/innovator-toggle-container.cjs.entry.js +1 -1
  12. package/dist/cjs/loader.cjs.js +1 -1
  13. package/dist/cjs/modal-form-example.cjs.entry.js +94 -0
  14. package/dist/cjs/most-popular-news.cjs.entry.js +1 -1
  15. package/dist/cjs/my-component.cjs.entry.js +1 -1
  16. package/dist/cjs/ptc-accordion-item.cjs.entry.js +1 -1
  17. package/dist/cjs/ptc-bio-card.cjs.entry.js +1 -1
  18. package/dist/cjs/ptc-card-bottom_2.cjs.entry.js +155 -0
  19. package/dist/cjs/ptc-card-content.cjs.entry.js +76 -0
  20. package/dist/cjs/ptc-card_2.cjs.entry.js +3 -8
  21. package/dist/cjs/ptc-case-studies-slider.cjs.entry.js +1 -1
  22. package/dist/cjs/ptc-close-icon_2.cjs.entry.js +239 -0
  23. package/dist/cjs/ptc-collapse-list.cjs.entry.js +1 -1
  24. package/dist/cjs/ptc-data-lookup.cjs.entry.js +1 -2
  25. package/dist/cjs/ptc-featured-list.cjs.entry.js +1 -1
  26. package/dist/cjs/ptc-filter-level-theater.cjs.entry.js +1 -1
  27. package/dist/cjs/ptc-footer.cjs.entry.js +1 -1
  28. package/dist/cjs/{ptc-form-checkbox_2.cjs.entry.js → ptc-form-checkbox_4.cjs.entry.js} +787 -5
  29. package/dist/cjs/ptc-homepage-image-feature.cjs.entry.js +1 -1
  30. package/dist/cjs/ptc-homepage-video-background.cjs.entry.js +1 -1
  31. package/dist/cjs/ptc-icon-card.cjs.entry.js +8 -2
  32. package/dist/cjs/ptc-icon-component.cjs.entry.js +2 -39
  33. package/dist/cjs/ptc-icon-minimize.cjs.entry.js +3 -50
  34. package/dist/cjs/ptc-link.cjs.entry.js +87 -0
  35. package/dist/cjs/ptc-media-card.cjs.entry.js +1 -1
  36. package/dist/cjs/ptc-podcast-card.cjs.entry.js +1 -1
  37. package/dist/cjs/ptc-previous-url.cjs.entry.js +10 -2
  38. package/dist/cjs/ptc-pricing-packaging-table.cjs.entry.js +1 -1
  39. package/dist/cjs/ptc-pricing-tabs.cjs.entry.js +2 -2
  40. package/dist/cjs/ptc-product-card.cjs.entry.js +1 -1
  41. package/dist/cjs/ptc-product-category.cjs.entry.js +1 -1
  42. package/dist/cjs/ptc-product-highlight-card.cjs.entry.js +1 -1
  43. package/dist/cjs/ptc-readmore-char.cjs.entry.js +1 -1
  44. package/dist/cjs/ptc-readmore-v3.cjs.entry.js +1 -1
  45. package/dist/cjs/ptc-scroll-button.cjs.entry.js +136 -0
  46. package/dist/cjs/ptc-social-icons-footer.cjs.entry.js +7 -2
  47. package/dist/cjs/ptc-sticky-title.cjs.entry.js +2 -2
  48. package/dist/cjs/ptc-tooltip-v2.cjs.entry.js +1 -1
  49. package/dist/cjs/ptc-value-led-speed-bump.cjs.entry.js +1 -1
  50. package/dist/cjs/ptc-white-paper.cjs.entry.js +2 -2
  51. package/dist/cjs/ptcw-design.cjs.js +1 -1
  52. package/dist/cjs/{utils-87d7b99f.js → utils-ad441b07.js} +9 -0
  53. package/dist/collection/collection-manifest.json +1 -0
  54. package/dist/collection/components/icon-asset/icon-asset.css +0 -6
  55. package/dist/collection/components/icon-asset/media/designer-v6.0.6.svg +30 -2
  56. package/dist/collection/components/innovator-toggle-container/innovator-toggle-container.css +20 -12
  57. package/dist/collection/components/organism-bundles/bundle-featured-list/featured-list.css +20 -9
  58. package/dist/collection/components/organism-bundles/event-jumbotron-example/event-jumbotron-example.css +3 -25
  59. package/dist/collection/components/organism-bundles/event-jumbotron-example/event-jumbotron-example.js +1 -3
  60. package/dist/collection/components/organism-bundles/event-podcast-slider-example/event-podcast-slider-example.css +71 -23
  61. package/dist/collection/components/organism-bundles/event-podcast-slider-example/event-podcast-slider-example.js +30 -12
  62. package/dist/collection/components/organism-bundles/form/modal-from-example/modal-form-example.css +26 -0
  63. package/dist/collection/components/organism-bundles/form/modal-from-example/modal-form-example.js +99 -0
  64. package/dist/collection/components/ptc-bio-card/ptc-bio-card.css +20 -12
  65. package/dist/collection/components/ptc-button/ptc-button.js +4 -1
  66. package/dist/collection/components/ptc-card/ptc-card.css +0 -1
  67. package/dist/collection/components/ptc-card-wrapper/ptc-card-wrapper.css +0 -2
  68. package/dist/collection/components/ptc-card-wrapper/ptc-card-wrapper.js +1 -20
  69. package/dist/collection/components/ptc-case-studies-slider/ptc-case-studies-slider.css +20 -12
  70. package/dist/collection/components/ptc-featured-list/ptc-featured-list.css +20 -12
  71. package/dist/collection/components/ptc-filter-level-theater/ptc-filter-level-theater.css +20 -12
  72. package/dist/collection/components/ptc-footer/ptc-footer-v2.css +14 -1
  73. package/dist/collection/components/ptc-icon-card/ptc-icon-card.css +10 -0
  74. package/dist/collection/components/ptc-icon-card/ptc-icon-card.js +25 -1
  75. package/dist/collection/components/ptc-icon-component/ptc-icon-component.css +0 -12
  76. package/dist/collection/components/ptc-icon-component/ptc-icon-component.js +1 -38
  77. package/dist/collection/components/ptc-icon-minimize/ptc-icon-minimize.css +0 -8
  78. package/dist/collection/components/ptc-icon-minimize/ptc-icon-minimize.js +2 -67
  79. package/dist/collection/components/ptc-jumbotron/ptc-jumbotron.css +32 -12
  80. package/dist/collection/components/ptc-link/ptc-link.css +8 -0
  81. package/dist/collection/components/ptc-link/ptc-link.js +4 -1
  82. package/dist/collection/components/ptc-modal/ptc-modal.css +6 -13
  83. package/dist/collection/components/ptc-modal/ptc-modal.js +19 -2
  84. package/dist/collection/components/ptc-para/ptc-para.css +3 -0
  85. package/dist/collection/components/ptc-para/ptc-para.js +2 -2
  86. package/dist/collection/components/ptc-podcast-card/ptc-podcast-card.css +20 -12
  87. package/dist/collection/components/ptc-preloader-section/ptc-preloader-section.css +26 -116
  88. package/dist/collection/components/ptc-preloader-section/ptc-preloader-section.js +1 -6
  89. package/dist/collection/components/ptc-previous-url/ptc-previous-url.css +16 -0
  90. package/dist/collection/components/ptc-previous-url/ptc-previous-url.js +27 -1
  91. package/dist/collection/components/ptc-pricing-tabs/ptc-pricing-tabs.css +12 -0
  92. package/dist/collection/components/ptc-product-card/ptc-product-card.css +20 -12
  93. package/dist/collection/components/ptc-product-category/ptc-product-category.css +20 -12
  94. package/dist/collection/components/ptc-product-highlight-card/ptc-product-highlight-card.css +20 -12
  95. package/dist/collection/components/ptc-readmore-char/ptc-readmore-char.css +20 -12
  96. package/dist/collection/components/ptc-readmore-v3/ptc-readmore-v3.css +20 -12
  97. package/dist/collection/components/ptc-social-icons-footer/ptc-social-icons-footer.css +10 -0
  98. package/dist/collection/components/ptc-social-icons-footer/ptc-social-icons-footer.js +24 -1
  99. package/dist/collection/components/ptc-sticky-title/ptc-sticky-title.js +2 -2
  100. package/dist/collection/components/ptc-tooltip-v2/ptc-tooltip-v2.css +20 -12
  101. package/dist/collection/components/ptc-value-led-speed-bump/ptc-value-led-speed-bump.css +20 -12
  102. package/dist/collection/components/ptc-white-paper/ptc-white-paper.css +20 -12
  103. package/dist/collection/components/ptc-white-paper/ptc-white-paper.js +1 -1
  104. package/dist/collection/components/subnav/ptc-nav-link/ptc-nav-link.css +6 -0
  105. package/dist/collection/components/subnav/ptc-nav-slider/ptc-nav-slider.css +8 -0
  106. package/dist/collection/components/subnav/ptc-nav-slider/ptc-nav-slider.js +3 -0
  107. package/dist/collection/components/subnav/ptc-nav-submenu/ptc-nav-submenu.css +7 -0
  108. package/dist/collection/components/subnav/ptc-nav-submenu/ptc-nav-submenu.js +9 -1
  109. package/dist/collection/stories/organisms/eSupport/CaseTracker/preview.stories.js +45 -0
  110. package/dist/collection/stories/organisms/eSupport/SupportArticle/preview.stories.js +47 -0
  111. package/dist/collection/stories/organisms/eSupport/SupportPage/preview.stories.js +157 -0
  112. package/dist/collection/utils/utils.js +8 -0
  113. package/dist/custom-elements/index.d.ts +6 -0
  114. package/dist/custom-elements/index.js +210 -159
  115. package/dist/esm/academic-form-test.entry.js +1 -1
  116. package/dist/esm/author-listing-example.entry.js +1 -1
  117. package/dist/esm/blog-detail-content_2.entry.js +2 -2
  118. package/dist/esm/blog-detail-layout.entry.js +2 -2
  119. package/dist/esm/blogs-search-section.entry.js +2 -2
  120. package/dist/esm/bundle-example.entry.js +1 -1
  121. package/dist/esm/bundle-jumbotron-example.entry.js +1 -1
  122. package/dist/esm/{component-274da230.js → component-9c921cc6.js} +2592 -793
  123. package/dist/esm/dropdown-item.entry.js +1 -1
  124. package/dist/esm/dynamic-box-bundle.entry.js +1 -1
  125. package/dist/esm/embedded-form.entry.js +1 -1
  126. package/dist/esm/event-jumbotron-example.entry.js +142 -0
  127. package/dist/esm/event-podcast-slider-example.entry.js +8 -14
  128. package/dist/esm/featured-events-slider-example.entry.js +1 -1
  129. package/dist/esm/featured-list.entry.js +2 -2
  130. package/dist/esm/fl-tab-content_3.entry.js +1 -1
  131. package/dist/esm/footer-form.entry.js +1 -1
  132. package/dist/esm/homepage-clickable-tab.entry.js +1 -1
  133. package/dist/esm/homepage-jumbotron.entry.js +2 -2
  134. package/dist/esm/homepage-toggled-content.entry.js +2 -2
  135. package/dist/esm/icon-asset_18.entry.js +1480 -0
  136. package/dist/esm/{index-c83db688.js → index-0bf594c4.js} +1 -1
  137. package/dist/esm/innovator-toggle-container.entry.js +2 -2
  138. package/dist/esm/jumbotron-sub-menu.entry.js +1 -1
  139. package/dist/esm/jumbotron-sub-mune.entry.js +1 -1
  140. package/dist/esm/loader.js +3 -3
  141. package/dist/esm/modal-form-example.entry.js +90 -0
  142. package/dist/esm/most-popular-news.entry.js +2 -2
  143. package/dist/esm/my-component.entry.js +2 -2
  144. package/dist/esm/news-search-result.entry.js +1 -1
  145. package/dist/esm/ptc-accordion-item.entry.js +2 -2
  146. package/dist/esm/ptc-accordion.entry.js +1 -1
  147. package/dist/esm/ptc-announcement.entry.js +1 -1
  148. package/dist/esm/ptc-back-to-top.entry.js +1 -1
  149. package/dist/esm/ptc-badge.entry.js +1 -1
  150. package/dist/esm/ptc-bio-card.entry.js +2 -2
  151. package/dist/esm/ptc-brightcov-video.entry.js +1 -1
  152. package/dist/esm/ptc-card-bottom_2.entry.js +150 -0
  153. package/dist/esm/ptc-card-content.entry.js +72 -0
  154. package/dist/esm/ptc-card_2.entry.js +4 -9
  155. package/dist/esm/ptc-case-studies-slider.entry.js +2 -2
  156. package/dist/esm/ptc-checkbox-group.entry.js +1 -1
  157. package/dist/esm/ptc-checkbox.entry.js +1 -1
  158. package/dist/esm/ptc-close-icon_2.entry.js +234 -0
  159. package/dist/esm/ptc-collapse-list.entry.js +2 -2
  160. package/dist/esm/ptc-container.entry.js +1 -1
  161. package/dist/esm/ptc-countdown.entry.js +1 -1
  162. package/dist/esm/ptc-data-lookup.entry.js +2 -3
  163. package/dist/esm/ptc-date.entry.js +1 -1
  164. package/dist/esm/ptc-dropdown.entry.js +1 -1
  165. package/dist/esm/ptc-dynamic-card.entry.js +1 -1
  166. package/dist/esm/ptc-ellipsis-dropdown.entry.js +1 -1
  167. package/dist/esm/ptc-embedded-quiz.entry.js +1 -1
  168. package/dist/esm/ptc-featured-list.entry.js +2 -2
  169. package/dist/esm/ptc-filter-dropdown_4.entry.js +1 -1
  170. package/dist/esm/ptc-filter-level-theater.entry.js +2 -2
  171. package/dist/esm/ptc-filter-tag_2.entry.js +1 -1
  172. package/dist/esm/ptc-footer.entry.js +2 -2
  173. package/dist/esm/{ptc-form-checkbox_2.entry.js → ptc-form-checkbox_4.entry.js} +785 -5
  174. package/dist/esm/ptc-form-radio-button.entry.js +1 -1
  175. package/dist/esm/ptc-form-radio-group.entry.js +1 -1
  176. package/dist/esm/ptc-form.entry.js +1 -1
  177. package/dist/esm/ptc-hero-footer-cta.entry.js +1 -1
  178. package/dist/esm/ptc-hero.entry.js +1 -1
  179. package/dist/esm/ptc-homepage-image-feature.entry.js +2 -2
  180. package/dist/esm/ptc-homepage-video-background.entry.js +2 -2
  181. package/dist/esm/ptc-icon-card.entry.js +9 -3
  182. package/dist/esm/ptc-icon-component.entry.js +3 -40
  183. package/dist/esm/ptc-icon-list.entry.js +1 -1
  184. package/dist/esm/ptc-icon-minimize.entry.js +4 -51
  185. package/dist/esm/ptc-image-download-strip.entry.js +1 -1
  186. package/dist/esm/ptc-info-tile.entry.js +1 -1
  187. package/dist/esm/ptc-inline-cta.entry.js +1 -1
  188. package/dist/esm/ptc-link.entry.js +83 -0
  189. package/dist/esm/ptc-list.entry.js +1 -1
  190. package/dist/esm/ptc-media-card.entry.js +2 -2
  191. package/dist/esm/ptc-minimized-nav.entry.js +1 -1
  192. package/dist/esm/ptc-mobile-select.entry.js +1 -1
  193. package/dist/esm/ptc-modal-quiz.entry.js +1 -1
  194. package/dist/esm/ptc-nav-card.entry.js +1 -1
  195. package/dist/esm/ptc-nav-pills.entry.js +1 -1
  196. package/dist/esm/ptc-nav-skip-to-content.entry.js +1 -1
  197. package/dist/esm/ptc-nav-tile.entry.js +1 -1
  198. package/dist/esm/ptc-news.entry.js +1 -1
  199. package/dist/esm/ptc-office-location-card.entry.js +1 -1
  200. package/dist/esm/ptc-office-locations.entry.js +1 -1
  201. package/dist/esm/ptc-overlay.entry.js +1 -1
  202. package/dist/esm/ptc-podcast-card.entry.js +2 -2
  203. package/dist/esm/ptc-preferance-center-form.entry.js +1 -1
  204. package/dist/esm/ptc-previous-url.entry.js +11 -3
  205. package/dist/esm/ptc-pricing-add-on-card.entry.js +1 -1
  206. package/dist/esm/ptc-pricing-add-on-section.entry.js +1 -1
  207. package/dist/esm/ptc-pricing-block.entry.js +1 -1
  208. package/dist/esm/ptc-pricing-packaging-table.entry.js +2 -2
  209. package/dist/esm/ptc-pricing-tabs.entry.js +3 -3
  210. package/dist/esm/ptc-product-card.entry.js +2 -2
  211. package/dist/esm/ptc-product-category.entry.js +2 -2
  212. package/dist/esm/ptc-product-dropdown.entry.js +1 -1
  213. package/dist/esm/ptc-product-highlight-card.entry.js +2 -2
  214. package/dist/esm/ptc-product-list.entry.js +1 -1
  215. package/dist/esm/ptc-product-sidebar.entry.js +1 -1
  216. package/dist/esm/ptc-progress-bar.entry.js +1 -1
  217. package/dist/esm/ptc-quantity-counter.entry.js +1 -1
  218. package/dist/esm/ptc-quote.entry.js +1 -1
  219. package/dist/esm/ptc-readmore-char.entry.js +2 -2
  220. package/dist/esm/ptc-readmore-new.entry.js +1 -1
  221. package/dist/esm/ptc-readmore-v3.entry.js +2 -2
  222. package/dist/esm/ptc-readmore.entry.js +1 -1
  223. package/dist/esm/ptc-related-card-rail.entry.js +1 -1
  224. package/dist/esm/ptc-responsive-wrapper.entry.js +1 -1
  225. package/dist/esm/ptc-scroll-button.entry.js +132 -0
  226. package/dist/esm/ptc-search-field.entry.js +1 -1
  227. package/dist/esm/ptc-seo-title.entry.js +1 -1
  228. package/dist/esm/ptc-shopping-cart.entry.js +1 -1
  229. package/dist/esm/ptc-showcase-card.entry.js +1 -1
  230. package/dist/esm/ptc-skeleton.entry.js +1 -1
  231. package/dist/esm/ptc-slit-card.entry.js +1 -1
  232. package/dist/esm/ptc-social-icons-footer.entry.js +8 -3
  233. package/dist/esm/ptc-social-icons.entry.js +1 -1
  234. package/dist/esm/ptc-span.entry.js +1 -1
  235. package/dist/esm/ptc-square-card.entry.js +1 -1
  236. package/dist/esm/ptc-sticky-icons.entry.js +1 -1
  237. package/dist/esm/ptc-sticky-title.entry.js +3 -3
  238. package/dist/esm/ptc-subnav-card.entry.js +1 -1
  239. package/dist/esm/ptc-svg-btn.entry.js +1 -1
  240. package/dist/esm/ptc-tab-list.entry.js +1 -1
  241. package/dist/esm/ptc-tab.entry.js +1 -1
  242. package/dist/esm/ptc-tabs.entry.js +1 -1
  243. package/dist/esm/ptc-text-copy-with-background.entry.js +1 -1
  244. package/dist/esm/ptc-theater-video-modal.entry.js +1 -1
  245. package/dist/esm/ptc-tooltip-v2.entry.js +2 -2
  246. package/dist/esm/ptc-tooltip-v3.entry.js +1 -1
  247. package/dist/esm/ptc-two-column-media.entry.js +1 -1
  248. package/dist/esm/ptc-value-led-card.entry.js +1 -1
  249. package/dist/esm/ptc-value-led-content-highlight.entry.js +1 -1
  250. package/dist/esm/ptc-value-led-content.entry.js +1 -1
  251. package/dist/esm/ptc-value-led-intro.entry.js +1 -1
  252. package/dist/esm/ptc-value-led-layout.entry.js +1 -1
  253. package/dist/esm/ptc-value-led-speed-bump.entry.js +2 -2
  254. package/dist/esm/ptc-value-prop-card.entry.js +1 -1
  255. package/dist/esm/ptc-video-embed.entry.js +1 -1
  256. package/dist/esm/ptc-white-paper.entry.js +3 -3
  257. package/dist/esm/ptcw-design.js +3 -3
  258. package/dist/esm/sequential-bundle-example.entry.js +1 -1
  259. package/dist/esm/sequential-bundle.entry.js +1 -1
  260. package/dist/esm/tab-content.entry.js +1 -1
  261. package/dist/esm/tab-header.entry.js +1 -1
  262. package/dist/esm/{utils-b7c6422e.js → utils-ff65c75b.js} +9 -1
  263. package/dist/ptcw-design/media/designer-v6.0.6.svg +30 -2
  264. package/dist/ptcw-design/p-01ad1cc2.entry.js +68 -0
  265. package/dist/ptcw-design/{p-03a917f8.entry.js → p-02f0460b.entry.js} +1 -1
  266. package/dist/ptcw-design/p-051ba8f9.entry.js +1 -0
  267. package/dist/ptcw-design/{p-9e2fd13c.entry.js → p-0a558a22.entry.js} +1 -1
  268. package/dist/ptcw-design/{p-9ac99185.entry.js → p-0abb6e77.entry.js} +1 -1
  269. package/dist/ptcw-design/{p-71360e29.entry.js → p-0b182300.entry.js} +1 -1
  270. package/dist/ptcw-design/{p-34b270c1.entry.js → p-0c862dbd.entry.js} +1 -1
  271. package/dist/ptcw-design/p-0eb9ea11.entry.js +1 -0
  272. package/dist/ptcw-design/{p-fb8584e4.entry.js → p-0ed4609e.entry.js} +1 -1
  273. package/dist/ptcw-design/p-11eb4dd1.entry.js +1 -0
  274. package/dist/ptcw-design/{p-c0bb1ad0.entry.js → p-13131b4d.entry.js} +1 -1
  275. package/dist/ptcw-design/{p-2657df50.entry.js → p-132f71c3.entry.js} +1 -1
  276. package/dist/ptcw-design/{p-99b45d23.entry.js → p-139ca5d2.entry.js} +1 -1
  277. package/dist/ptcw-design/{p-27e47c25.entry.js → p-14c77b5e.entry.js} +1 -1
  278. package/dist/ptcw-design/{p-7d29a418.entry.js → p-183ba1ca.entry.js} +1 -1
  279. package/dist/ptcw-design/{p-85f32bf5.entry.js → p-1ab6201b.entry.js} +1 -1
  280. package/dist/ptcw-design/{p-464d8e22.entry.js → p-1d48bad3.entry.js} +1 -1
  281. package/dist/ptcw-design/{p-46f67bec.entry.js → p-1e9f25fc.entry.js} +1 -1
  282. package/dist/ptcw-design/{p-6b32020a.entry.js → p-1ec32cbc.entry.js} +1 -1
  283. package/dist/ptcw-design/{p-c1ebaf0f.entry.js → p-20388467.entry.js} +1 -1
  284. package/dist/ptcw-design/p-20670bc5.entry.js +1 -0
  285. package/dist/ptcw-design/p-208ca9de.entry.js +1 -0
  286. package/dist/ptcw-design/{p-bf8fbba7.entry.js → p-208ec7f3.entry.js} +1 -1
  287. package/dist/ptcw-design/p-20d837a9.entry.js +1 -0
  288. package/dist/ptcw-design/p-20d84f63.entry.js +1 -0
  289. package/dist/ptcw-design/p-212cdacd.entry.js +1 -0
  290. package/dist/ptcw-design/{p-8c49d736.entry.js → p-212d0145.entry.js} +1 -1
  291. package/dist/ptcw-design/p-286e048c.entry.js +1 -0
  292. package/dist/ptcw-design/{p-9b26ea67.entry.js → p-290012e3.entry.js} +1 -1
  293. package/dist/ptcw-design/{p-9b0df204.entry.js → p-298d02ab.entry.js} +1 -1
  294. package/dist/ptcw-design/p-29ae44dd.entry.js +1 -0
  295. package/dist/ptcw-design/{p-52b82ac5.entry.js → p-2a255901.entry.js} +1 -1
  296. package/dist/ptcw-design/{p-e90fbbad.entry.js → p-2a3735a5.entry.js} +1 -1
  297. package/dist/ptcw-design/p-2d0a9613.entry.js +1 -0
  298. package/dist/ptcw-design/p-2ee3a32b.entry.js +1 -0
  299. package/dist/ptcw-design/{p-21fa5abe.entry.js → p-2fd01953.entry.js} +1 -1
  300. package/dist/ptcw-design/p-330e1a36.entry.js +1 -0
  301. package/dist/ptcw-design/p-36c42aae.entry.js +1 -0
  302. package/dist/ptcw-design/p-3717a6e1.entry.js +1 -0
  303. package/dist/ptcw-design/{p-dc8c0a06.entry.js → p-37899461.entry.js} +1 -1
  304. package/dist/ptcw-design/{p-6e8ed2ee.entry.js → p-379fcc72.entry.js} +1 -1
  305. package/dist/ptcw-design/p-39ec04d4.entry.js +1 -0
  306. package/dist/ptcw-design/p-3a7c5330.entry.js +1 -0
  307. package/dist/ptcw-design/p-3ada2482.entry.js +1 -0
  308. package/dist/ptcw-design/{p-867a808f.entry.js → p-3b6c2a79.entry.js} +1 -1
  309. package/dist/ptcw-design/{p-f61a3476.entry.js → p-3b967df1.entry.js} +1 -1
  310. package/dist/ptcw-design/{p-8533988f.entry.js → p-3c52fabe.entry.js} +1 -1
  311. package/dist/ptcw-design/{p-58e91cb8.entry.js → p-3c72e82d.entry.js} +1 -1
  312. package/dist/ptcw-design/{p-76d98c5a.entry.js → p-3e13b735.entry.js} +1 -1
  313. package/dist/ptcw-design/{p-fe907670.entry.js → p-4335d7f3.entry.js} +1 -1
  314. package/dist/ptcw-design/{p-c6a0dd99.entry.js → p-43756439.entry.js} +1 -1
  315. package/dist/ptcw-design/{p-ee534211.entry.js → p-4b23b4c3.entry.js} +1 -1
  316. package/dist/ptcw-design/p-4e41c031.entry.js +1 -0
  317. package/dist/ptcw-design/p-4e8c87e1.entry.js +1 -0
  318. package/dist/ptcw-design/p-53d88f2b.entry.js +1 -0
  319. package/dist/ptcw-design/{p-2c2f895a.entry.js → p-54891548.entry.js} +1 -1
  320. package/dist/ptcw-design/p-5ae21271.entry.js +1 -0
  321. package/dist/ptcw-design/{p-f731fc96.entry.js → p-5da98805.entry.js} +1 -1
  322. package/dist/ptcw-design/{p-61d28206.entry.js → p-5fb671ee.entry.js} +1 -1
  323. package/dist/ptcw-design/{p-c631608f.entry.js → p-61a5012d.entry.js} +1 -1
  324. package/dist/ptcw-design/p-640d07b5.entry.js +1 -0
  325. package/dist/ptcw-design/p-66d50b46.entry.js +1 -0
  326. package/dist/ptcw-design/p-6a79e68e.entry.js +1 -0
  327. package/dist/ptcw-design/p-6af8c192.entry.js +1 -0
  328. package/dist/ptcw-design/{p-9de963f8.entry.js → p-6d628113.entry.js} +1 -1
  329. package/dist/ptcw-design/{p-f4699d4e.entry.js → p-70a5f144.entry.js} +1 -1
  330. package/dist/ptcw-design/p-72681e91.entry.js +1 -0
  331. package/dist/ptcw-design/p-73a41148.entry.js +1 -0
  332. package/dist/ptcw-design/{p-04aae3f5.entry.js → p-74a845fd.entry.js} +1 -1
  333. package/dist/ptcw-design/{p-99ee8a0e.entry.js → p-761f71c4.entry.js} +1 -1
  334. package/dist/ptcw-design/{p-8038bf31.entry.js → p-779c3f21.entry.js} +1 -1
  335. package/dist/ptcw-design/{p-282b7d4e.entry.js → p-78252282.entry.js} +1 -1
  336. package/dist/ptcw-design/p-7853f1b5.entry.js +1 -0
  337. package/dist/ptcw-design/{p-081e969d.entry.js → p-7b75091d.entry.js} +1 -1
  338. package/dist/ptcw-design/{p-4b192f5e.entry.js → p-7e19be10.entry.js} +1 -1
  339. package/dist/ptcw-design/{p-3c3a7b54.entry.js → p-7edef9ed.entry.js} +1 -1
  340. package/dist/ptcw-design/{p-7cc9255e.entry.js → p-7fada7ae.entry.js} +1 -1
  341. package/dist/ptcw-design/{p-5980d65d.entry.js → p-807ad5c4.entry.js} +1 -1
  342. package/dist/ptcw-design/{p-931650bb.entry.js → p-80c56c81.entry.js} +1 -1
  343. package/dist/ptcw-design/{p-48815ee0.entry.js → p-88379d69.entry.js} +1 -1
  344. package/dist/ptcw-design/p-8872161f.js +1 -0
  345. package/dist/ptcw-design/{p-9a335b5b.entry.js → p-8eb36507.entry.js} +1 -1
  346. package/dist/ptcw-design/p-907727fd.entry.js +1 -0
  347. package/dist/ptcw-design/{p-ac75c7ad.js → p-944c5be8.js} +1 -1
  348. package/dist/ptcw-design/p-973b06d1.entry.js +1 -0
  349. package/dist/ptcw-design/p-98083315.entry.js +1 -0
  350. package/dist/ptcw-design/{p-40b8c884.entry.js → p-986be938.entry.js} +1 -1
  351. package/dist/ptcw-design/p-99e41dc4.entry.js +1 -0
  352. package/dist/ptcw-design/{p-bfacfe67.entry.js → p-9a28ded2.entry.js} +1 -1
  353. package/dist/ptcw-design/p-9ae901e2.entry.js +1 -0
  354. package/dist/ptcw-design/{p-e38ed0e3.entry.js → p-9b60270e.entry.js} +1 -1
  355. package/dist/ptcw-design/{p-5db7f70b.entry.js → p-9d32f1bc.entry.js} +1 -1
  356. package/dist/ptcw-design/{p-3ee2a531.entry.js → p-9dde477c.entry.js} +1 -1
  357. package/dist/ptcw-design/p-9e6fb4ba.entry.js +1 -0
  358. package/dist/ptcw-design/p-a220ab2c.entry.js +1 -0
  359. package/dist/ptcw-design/{p-257a68df.entry.js → p-a22d7ae8.entry.js} +1 -1
  360. package/dist/ptcw-design/{p-3872fce7.entry.js → p-a2710bbf.entry.js} +1 -1
  361. package/dist/ptcw-design/{p-29639cd4.entry.js → p-a560e839.entry.js} +1 -1
  362. package/dist/ptcw-design/{p-8191928d.entry.js → p-a974f98f.entry.js} +1 -1
  363. package/dist/ptcw-design/{p-d20cf3c5.entry.js → p-aaf8fb04.entry.js} +1 -1
  364. package/dist/ptcw-design/p-aba549b7.entry.js +1 -0
  365. package/dist/ptcw-design/p-abdd3b8e.entry.js +1 -0
  366. package/dist/ptcw-design/p-ac32267c.entry.js +1 -0
  367. package/dist/ptcw-design/{p-a25578e9.entry.js → p-ac78409e.entry.js} +1 -1
  368. package/dist/ptcw-design/{p-dc85c302.entry.js → p-afbe8e2c.entry.js} +1 -1
  369. package/dist/ptcw-design/{p-34610052.entry.js → p-b1c1de30.entry.js} +1 -1
  370. package/dist/ptcw-design/{p-aea09a70.entry.js → p-b293a0b1.entry.js} +1 -1
  371. package/dist/ptcw-design/{p-0e5932f0.entry.js → p-b3b63f67.entry.js} +1 -1
  372. package/dist/ptcw-design/{p-7e7ebf0a.entry.js → p-b4ba719a.entry.js} +1 -1
  373. package/dist/ptcw-design/p-b5d0e4a2.entry.js +1 -0
  374. package/dist/ptcw-design/p-bcab66bf.js +336 -0
  375. package/dist/ptcw-design/{p-a7cb3851.entry.js → p-be00fb74.entry.js} +1 -1
  376. package/dist/ptcw-design/{p-815848f6.entry.js → p-bf076b87.entry.js} +1 -1
  377. package/dist/ptcw-design/{p-89ba3dfd.entry.js → p-bf2f9183.entry.js} +1 -1
  378. package/dist/ptcw-design/{p-dbbe35bf.entry.js → p-bf439f9b.entry.js} +1 -1
  379. package/dist/ptcw-design/{p-38a56ed6.entry.js → p-c05e326f.entry.js} +1 -1
  380. package/dist/ptcw-design/{p-ffb0ff97.entry.js → p-c415ab42.entry.js} +1 -1
  381. package/dist/ptcw-design/{p-aac082cf.entry.js → p-c5417010.entry.js} +1 -1
  382. package/dist/ptcw-design/{p-97b9f41b.entry.js → p-c5886b7b.entry.js} +1 -1
  383. package/dist/ptcw-design/{p-b59f30d5.entry.js → p-c9518684.entry.js} +1 -1
  384. package/dist/ptcw-design/{p-04f0b1ba.entry.js → p-c9a73ad1.entry.js} +1 -1
  385. package/dist/ptcw-design/p-ca268a17.entry.js +1 -0
  386. package/dist/ptcw-design/{p-5946d7c9.entry.js → p-cab0274c.entry.js} +1 -1
  387. package/dist/ptcw-design/p-ce6d1c5f.entry.js +1 -0
  388. package/dist/ptcw-design/{p-1a6759a4.entry.js → p-d113403b.entry.js} +1 -1
  389. package/dist/ptcw-design/{p-e3bf092e.entry.js → p-d1f57070.entry.js} +1 -1
  390. package/dist/ptcw-design/{p-72825cf6.entry.js → p-d21cf742.entry.js} +1 -1
  391. package/dist/ptcw-design/{p-df8526a2.entry.js → p-d871e7f7.entry.js} +1 -1
  392. package/dist/ptcw-design/{p-a0bf3dd2.entry.js → p-dadbab48.entry.js} +1 -1
  393. package/dist/ptcw-design/{p-760507e1.entry.js → p-dbb4e7f9.entry.js} +1 -1
  394. package/dist/ptcw-design/{p-c5f42895.entry.js → p-dd38bf84.entry.js} +1 -1
  395. package/dist/ptcw-design/{p-d7275289.entry.js → p-e1242dd4.entry.js} +1 -1
  396. package/dist/ptcw-design/{p-a37c5209.entry.js → p-e2e33ddb.entry.js} +1 -1
  397. package/dist/ptcw-design/{p-fdee2cdc.entry.js → p-e6ebc832.entry.js} +1 -1
  398. package/dist/ptcw-design/{p-89177041.entry.js → p-e75dff95.entry.js} +1 -1
  399. package/dist/ptcw-design/p-e77d2204.entry.js +1 -0
  400. package/dist/ptcw-design/{p-c68d31c6.entry.js → p-e87a4ff8.entry.js} +1 -1
  401. package/dist/ptcw-design/{p-0a9ee6c2.entry.js → p-e8b51e7d.entry.js} +1 -1
  402. package/dist/ptcw-design/{p-7a1db471.entry.js → p-ecfc8211.entry.js} +1 -1
  403. package/dist/ptcw-design/{p-27a4ee73.entry.js → p-eef5d58b.entry.js} +1 -1
  404. package/dist/ptcw-design/{p-071a6109.entry.js → p-ef0079b0.entry.js} +1 -1
  405. package/dist/ptcw-design/p-ef55ab3c.entry.js +1 -0
  406. package/dist/ptcw-design/{p-da02913d.entry.js → p-f05be87f.entry.js} +1 -1
  407. package/dist/ptcw-design/{p-4f93c631.entry.js → p-f77c7c78.entry.js} +1 -1
  408. package/dist/ptcw-design/p-fb2e4612.entry.js +1 -0
  409. package/dist/ptcw-design/{p-4c096997.entry.js → p-fc0d9251.entry.js} +1 -1
  410. package/dist/ptcw-design/ptcw-design.css +2 -2
  411. package/dist/ptcw-design/ptcw-design.esm.js +1 -1
  412. package/dist/types/components/organism-bundles/event-podcast-slider-example/event-podcast-slider-example.d.ts +1 -0
  413. package/dist/types/components/organism-bundles/form/modal-from-example/modal-form-example.d.ts +25 -0
  414. package/dist/types/components/ptc-button/ptc-button.d.ts +1 -0
  415. package/dist/types/components/ptc-card-wrapper/ptc-card-wrapper.d.ts +0 -2
  416. package/dist/types/components/ptc-icon-card/ptc-icon-card.d.ts +6 -0
  417. package/dist/types/components/ptc-icon-component/ptc-icon-component.d.ts +0 -5
  418. package/dist/types/components/ptc-icon-minimize/ptc-icon-minimize.d.ts +0 -2
  419. package/dist/types/components/ptc-link/ptc-link.d.ts +1 -0
  420. package/dist/types/components/ptc-modal/ptc-modal.d.ts +2 -1
  421. package/dist/types/components/ptc-para/ptc-para.d.ts +1 -1
  422. package/dist/types/components/ptc-previous-url/ptc-previous-url.d.ts +2 -0
  423. package/dist/types/components/ptc-social-icons-footer/ptc-social-icons-footer.d.ts +5 -0
  424. package/dist/types/components/subnav/ptc-nav-submenu/ptc-nav-submenu.d.ts +1 -0
  425. package/dist/types/components.d.ts +37 -14
  426. package/dist/types/utils/utils.d.ts +1 -0
  427. package/package.json +1 -1
  428. package/readme.md +5 -1
  429. package/dist/cjs/component-5b5b6a98.js +0 -1819
  430. package/dist/cjs/event-jumbotron-example_15.cjs.entry.js +0 -1374
  431. package/dist/cjs/interfaces-574e6df7.js +0 -15
  432. package/dist/cjs/max-width-container.cjs.entry.js +0 -54
  433. package/dist/cjs/ptc-background-video.cjs.entry.js +0 -102
  434. package/dist/cjs/ptc-card-bottom.cjs.entry.js +0 -67
  435. package/dist/cjs/ptc-jumbotron.cjs.entry.js +0 -151
  436. package/dist/cjs/ptc-multi-select_2.cjs.entry.js +0 -670
  437. package/dist/cjs/ptc-nav-link.cjs.entry.js +0 -48
  438. package/dist/cjs/ptc-nav-slider.cjs.entry.js +0 -106
  439. package/dist/cjs/ptc-nav-submenu.cjs.entry.js +0 -51
  440. package/dist/cjs/ptc-picture.cjs.entry.js +0 -163
  441. package/dist/cjs/ptc-sticky-section.cjs.entry.js +0 -70
  442. package/dist/cjs/ptc-subnav.cjs.entry.js +0 -37
  443. package/dist/cjs/ptc-tooltip.cjs.entry.js +0 -107
  444. package/dist/cjs/validation-messages-33a4f26b.js +0 -126
  445. package/dist/esm/component-341e4eaa.js +0 -1802
  446. package/dist/esm/event-jumbotron-example_15.entry.js +0 -1356
  447. package/dist/esm/interfaces-4caedd26.js +0 -12
  448. package/dist/esm/max-width-container.entry.js +0 -50
  449. package/dist/esm/ptc-background-video.entry.js +0 -98
  450. package/dist/esm/ptc-card-bottom.entry.js +0 -63
  451. package/dist/esm/ptc-jumbotron.entry.js +0 -147
  452. package/dist/esm/ptc-multi-select_2.entry.js +0 -665
  453. package/dist/esm/ptc-nav-link.entry.js +0 -44
  454. package/dist/esm/ptc-nav-slider.entry.js +0 -102
  455. package/dist/esm/ptc-nav-submenu.entry.js +0 -47
  456. package/dist/esm/ptc-picture.entry.js +0 -159
  457. package/dist/esm/ptc-sticky-section.entry.js +0 -66
  458. package/dist/esm/ptc-subnav.entry.js +0 -33
  459. package/dist/esm/ptc-tooltip.entry.js +0 -103
  460. package/dist/esm/validation-messages-adbb6518.js +0 -124
  461. package/dist/ptcw-design/p-00e21489.entry.js +0 -1
  462. package/dist/ptcw-design/p-0a214a22.entry.js +0 -1
  463. package/dist/ptcw-design/p-0cf5bc9e.entry.js +0 -1
  464. package/dist/ptcw-design/p-0ee01112.entry.js +0 -1
  465. package/dist/ptcw-design/p-103ec637.entry.js +0 -1
  466. package/dist/ptcw-design/p-12e61bb5.entry.js +0 -1
  467. package/dist/ptcw-design/p-17c3f01a.entry.js +0 -1
  468. package/dist/ptcw-design/p-18a5a338.js +0 -1
  469. package/dist/ptcw-design/p-18f59395.entry.js +0 -1
  470. package/dist/ptcw-design/p-1a0bf166.entry.js +0 -1
  471. package/dist/ptcw-design/p-1ca8a5bf.entry.js +0 -1
  472. package/dist/ptcw-design/p-2335d57c.entry.js +0 -1
  473. package/dist/ptcw-design/p-25178331.entry.js +0 -1
  474. package/dist/ptcw-design/p-260ecfef.entry.js +0 -1
  475. package/dist/ptcw-design/p-2f7ea1a6.entry.js +0 -1
  476. package/dist/ptcw-design/p-3738a01f.entry.js +0 -1
  477. package/dist/ptcw-design/p-398d2ca5.entry.js +0 -1
  478. package/dist/ptcw-design/p-426715a4.entry.js +0 -1
  479. package/dist/ptcw-design/p-4cee12b8.entry.js +0 -1
  480. package/dist/ptcw-design/p-4e2bb0e0.entry.js +0 -1
  481. package/dist/ptcw-design/p-58bb25e6.entry.js +0 -1
  482. package/dist/ptcw-design/p-5feaea80.entry.js +0 -1
  483. package/dist/ptcw-design/p-711bcdad.js +0 -1
  484. package/dist/ptcw-design/p-759f6457.entry.js +0 -1
  485. package/dist/ptcw-design/p-841b807d.js +0 -1
  486. package/dist/ptcw-design/p-863b5b20.entry.js +0 -68
  487. package/dist/ptcw-design/p-885b3428.entry.js +0 -1
  488. package/dist/ptcw-design/p-8c692bd6.entry.js +0 -1
  489. package/dist/ptcw-design/p-97eb1025.entry.js +0 -1
  490. package/dist/ptcw-design/p-999d1c9f.entry.js +0 -1
  491. package/dist/ptcw-design/p-99daf693.entry.js +0 -1
  492. package/dist/ptcw-design/p-9d3a7f36.entry.js +0 -1
  493. package/dist/ptcw-design/p-9fe0c27d.entry.js +0 -1
  494. package/dist/ptcw-design/p-a114198f.entry.js +0 -1
  495. package/dist/ptcw-design/p-a4f65d28.entry.js +0 -1
  496. package/dist/ptcw-design/p-a54c6da5.entry.js +0 -1
  497. package/dist/ptcw-design/p-a8f30586.entry.js +0 -1
  498. package/dist/ptcw-design/p-b436f56d.entry.js +0 -1
  499. package/dist/ptcw-design/p-b50f71dd.entry.js +0 -1
  500. package/dist/ptcw-design/p-be533f0d.js +0 -134
  501. package/dist/ptcw-design/p-c1513c3f.js +0 -203
  502. package/dist/ptcw-design/p-c89030e4.entry.js +0 -1
  503. package/dist/ptcw-design/p-cffebefe.entry.js +0 -1
  504. package/dist/ptcw-design/p-d1857ada.entry.js +0 -1
  505. package/dist/ptcw-design/p-d2cc0297.entry.js +0 -1
  506. package/dist/ptcw-design/p-dc54b2b0.entry.js +0 -1
  507. package/dist/ptcw-design/p-e4b034b9.entry.js +0 -1
  508. package/dist/ptcw-design/p-e7937ac1.entry.js +0 -1
  509. package/dist/ptcw-design/p-e89ce54f.entry.js +0 -1
  510. package/dist/ptcw-design/p-e9cb2483.entry.js +0 -1
  511. package/dist/ptcw-design/p-e9f12e0d.entry.js +0 -1
  512. package/dist/ptcw-design/p-eab1042e.entry.js +0 -1
  513. package/dist/ptcw-design/p-f05fec22.entry.js +0 -1
  514. package/dist/ptcw-design/p-f5c97ab2.entry.js +0 -1
  515. package/dist/ptcw-design/p-fd7e5935.entry.js +0 -1
  516. package/dist/ptcw-design/p-fd8f2c86.entry.js +0 -1
@@ -1,1802 +0,0 @@
1
- /******************************************************************************
2
- Copyright (c) Microsoft Corporation.
3
-
4
- Permission to use, copy, modify, and/or distribute this software for any
5
- purpose with or without fee is hereby granted.
6
-
7
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
- PERFORMANCE OF THIS SOFTWARE.
14
- ***************************************************************************** */
15
- /* global Reflect, Promise, SuppressedError, Symbol */
16
-
17
- var extendStatics = function(d, b) {
18
- extendStatics = Object.setPrototypeOf ||
19
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
20
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
21
- return extendStatics(d, b);
22
- };
23
-
24
- function __extends(d, b) {
25
- if (typeof b !== "function" && b !== null)
26
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
27
- extendStatics(d, b);
28
- function __() { this.constructor = d; }
29
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
30
- }
31
-
32
- var __assign = function() {
33
- __assign = Object.assign || function __assign(t) {
34
- for (var s, i = 1, n = arguments.length; i < n; i++) {
35
- s = arguments[i];
36
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
37
- }
38
- return t;
39
- };
40
- return __assign.apply(this, arguments);
41
- };
42
-
43
- function __values(o) {
44
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
45
- if (m) return m.call(o);
46
- if (o && typeof o.length === "number") return {
47
- next: function () {
48
- if (o && i >= o.length) o = void 0;
49
- return { value: o && o[i++], done: !o };
50
- }
51
- };
52
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
53
- }
54
-
55
- function __read(o, n) {
56
- var m = typeof Symbol === "function" && o[Symbol.iterator];
57
- if (!m) return o;
58
- var i = m.call(o), r, ar = [], e;
59
- try {
60
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
61
- }
62
- catch (error) { e = { error: error }; }
63
- finally {
64
- try {
65
- if (r && !r.done && (m = i["return"])) m.call(i);
66
- }
67
- finally { if (e) throw e.error; }
68
- }
69
- return ar;
70
- }
71
-
72
- function __spreadArray(to, from, pack) {
73
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
74
- if (ar || !(i in from)) {
75
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
76
- ar[i] = from[i];
77
- }
78
- }
79
- return to.concat(ar || Array.prototype.slice.call(from));
80
- }
81
-
82
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
83
- var e = new Error(message);
84
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
85
- };
86
-
87
- /**
88
- * @license
89
- * Copyright 2016 Google Inc.
90
- *
91
- * Permission is hereby granted, free of charge, to any person obtaining a copy
92
- * of this software and associated documentation files (the "Software"), to deal
93
- * in the Software without restriction, including without limitation the rights
94
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
95
- * copies of the Software, and to permit persons to whom the Software is
96
- * furnished to do so, subject to the following conditions:
97
- *
98
- * The above copyright notice and this permission notice shall be included in
99
- * all copies or substantial portions of the Software.
100
- *
101
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
102
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
103
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
104
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
105
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
106
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
107
- * THE SOFTWARE.
108
- */
109
- var MDCFoundation = /** @class */ (function () {
110
- function MDCFoundation(adapter) {
111
- if (adapter === void 0) { adapter = {}; }
112
- this.adapter = adapter;
113
- }
114
- Object.defineProperty(MDCFoundation, "cssClasses", {
115
- get: function () {
116
- // Classes extending MDCFoundation should implement this method to return an object which exports every
117
- // CSS class the foundation class needs as a property. e.g. {ACTIVE: 'mdc-component--active'}
118
- return {};
119
- },
120
- enumerable: false,
121
- configurable: true
122
- });
123
- Object.defineProperty(MDCFoundation, "strings", {
124
- get: function () {
125
- // Classes extending MDCFoundation should implement this method to return an object which exports all
126
- // semantic strings as constants. e.g. {ARIA_ROLE: 'tablist'}
127
- return {};
128
- },
129
- enumerable: false,
130
- configurable: true
131
- });
132
- Object.defineProperty(MDCFoundation, "numbers", {
133
- get: function () {
134
- // Classes extending MDCFoundation should implement this method to return an object which exports all
135
- // of its semantic numbers as constants. e.g. {ANIMATION_DELAY_MS: 350}
136
- return {};
137
- },
138
- enumerable: false,
139
- configurable: true
140
- });
141
- Object.defineProperty(MDCFoundation, "defaultAdapter", {
142
- get: function () {
143
- // Classes extending MDCFoundation may choose to implement this getter in order to provide a convenient
144
- // way of viewing the necessary methods of an adapter. In the future, this could also be used for adapter
145
- // validation.
146
- return {};
147
- },
148
- enumerable: false,
149
- configurable: true
150
- });
151
- MDCFoundation.prototype.init = function () {
152
- // Subclasses should override this method to perform initialization routines (registering events, etc.)
153
- };
154
- MDCFoundation.prototype.destroy = function () {
155
- // Subclasses should override this method to perform de-initialization routines (de-registering events, etc.)
156
- };
157
- return MDCFoundation;
158
- }());
159
-
160
- /**
161
- * @license
162
- * Copyright 2016 Google Inc.
163
- *
164
- * Permission is hereby granted, free of charge, to any person obtaining a copy
165
- * of this software and associated documentation files (the "Software"), to deal
166
- * in the Software without restriction, including without limitation the rights
167
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
168
- * copies of the Software, and to permit persons to whom the Software is
169
- * furnished to do so, subject to the following conditions:
170
- *
171
- * The above copyright notice and this permission notice shall be included in
172
- * all copies or substantial portions of the Software.
173
- *
174
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
175
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
176
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
177
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
178
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
179
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
180
- * THE SOFTWARE.
181
- */
182
- var MDCComponent = /** @class */ (function () {
183
- function MDCComponent(root, foundation) {
184
- var args = [];
185
- for (var _i = 2; _i < arguments.length; _i++) {
186
- args[_i - 2] = arguments[_i];
187
- }
188
- this.root = root;
189
- this.initialize.apply(this, __spreadArray([], __read(args)));
190
- // Note that we initialize foundation here and not within the constructor's
191
- // default param so that this.root is defined and can be used within the
192
- // foundation class.
193
- this.foundation =
194
- foundation === undefined ? this.getDefaultFoundation() : foundation;
195
- this.foundation.init();
196
- this.initialSyncWithDOM();
197
- }
198
- MDCComponent.attachTo = function (root) {
199
- // Subclasses which extend MDCBase should provide an attachTo() method that takes a root element and
200
- // returns an instantiated component with its root set to that element. Also note that in the cases of
201
- // subclasses, an explicit foundation class will not have to be passed in; it will simply be initialized
202
- // from getDefaultFoundation().
203
- return new MDCComponent(root, new MDCFoundation({}));
204
- };
205
- /* istanbul ignore next: method param only exists for typing purposes; it does not need to be unit tested */
206
- MDCComponent.prototype.initialize = function () {
207
- var _args = [];
208
- for (var _i = 0; _i < arguments.length; _i++) {
209
- _args[_i] = arguments[_i];
210
- }
211
- // Subclasses can override this to do any additional setup work that would be considered part of a
212
- // "constructor". Essentially, it is a hook into the parent constructor before the foundation is
213
- // initialized. Any additional arguments besides root and foundation will be passed in here.
214
- };
215
- MDCComponent.prototype.getDefaultFoundation = function () {
216
- // Subclasses must override this method to return a properly configured foundation class for the
217
- // component.
218
- throw new Error('Subclasses must override getDefaultFoundation to return a properly configured ' +
219
- 'foundation class');
220
- };
221
- MDCComponent.prototype.initialSyncWithDOM = function () {
222
- // Subclasses should override this method if they need to perform work to synchronize with a host DOM
223
- // object. An example of this would be a form control wrapper that needs to synchronize its internal state
224
- // to some property or attribute of the host DOM. Please note: this is *not* the place to perform DOM
225
- // reads/writes that would cause layout / paint, as this is called synchronously from within the constructor.
226
- };
227
- MDCComponent.prototype.destroy = function () {
228
- // Subclasses may implement this method to release any resources / deregister any listeners they have
229
- // attached. An example of this might be deregistering a resize event from the window object.
230
- this.foundation.destroy();
231
- };
232
- MDCComponent.prototype.listen = function (evtType, handler, options) {
233
- this.root.addEventListener(evtType, handler, options);
234
- };
235
- MDCComponent.prototype.unlisten = function (evtType, handler, options) {
236
- this.root.removeEventListener(evtType, handler, options);
237
- };
238
- /**
239
- * Fires a cross-browser-compatible custom event from the component root of the given type, with the given data.
240
- */
241
- MDCComponent.prototype.emit = function (evtType, evtData, shouldBubble) {
242
- if (shouldBubble === void 0) { shouldBubble = false; }
243
- var evt;
244
- if (typeof CustomEvent === 'function') {
245
- evt = new CustomEvent(evtType, {
246
- bubbles: shouldBubble,
247
- detail: evtData,
248
- });
249
- }
250
- else {
251
- evt = document.createEvent('CustomEvent');
252
- evt.initCustomEvent(evtType, shouldBubble, false, evtData);
253
- }
254
- this.root.dispatchEvent(evt);
255
- };
256
- return MDCComponent;
257
- }());
258
-
259
- /**
260
- * @license
261
- * Copyright 2018 Google Inc.
262
- *
263
- * Permission is hereby granted, free of charge, to any person obtaining a copy
264
- * of this software and associated documentation files (the "Software"), to deal
265
- * in the Software without restriction, including without limitation the rights
266
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
267
- * copies of the Software, and to permit persons to whom the Software is
268
- * furnished to do so, subject to the following conditions:
269
- *
270
- * The above copyright notice and this permission notice shall be included in
271
- * all copies or substantial portions of the Software.
272
- *
273
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
274
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
275
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
276
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
277
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
278
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
279
- * THE SOFTWARE.
280
- */
281
- /**
282
- * @fileoverview A "ponyfill" is a polyfill that doesn't modify the global prototype chain.
283
- * This makes ponyfills safer than traditional polyfills, especially for libraries like MDC.
284
- */
285
- function closest(element, selector) {
286
- if (element.closest) {
287
- return element.closest(selector);
288
- }
289
- var el = element;
290
- while (el) {
291
- if (matches(el, selector)) {
292
- return el;
293
- }
294
- el = el.parentElement;
295
- }
296
- return null;
297
- }
298
- function matches(element, selector) {
299
- var nativeMatches = element.matches
300
- || element.webkitMatchesSelector
301
- || element.msMatchesSelector;
302
- return nativeMatches.call(element, selector);
303
- }
304
- /**
305
- * Used to compute the estimated scroll width of elements. When an element is
306
- * hidden due to display: none; being applied to a parent element, the width is
307
- * returned as 0. However, the element will have a true width once no longer
308
- * inside a display: none context. This method computes an estimated width when
309
- * the element is hidden or returns the true width when the element is visble.
310
- * @param {Element} element the element whose width to estimate
311
- */
312
- function estimateScrollWidth(element) {
313
- // Check the offsetParent. If the element inherits display: none from any
314
- // parent, the offsetParent property will be null (see
315
- // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent).
316
- // This check ensures we only clone the node when necessary.
317
- var htmlEl = element;
318
- if (htmlEl.offsetParent !== null) {
319
- return htmlEl.scrollWidth;
320
- }
321
- var clone = htmlEl.cloneNode(true);
322
- clone.style.setProperty('position', 'absolute');
323
- clone.style.setProperty('transform', 'translate(-9999px, -9999px)');
324
- document.documentElement.appendChild(clone);
325
- var scrollWidth = clone.scrollWidth;
326
- document.documentElement.removeChild(clone);
327
- return scrollWidth;
328
- }
329
-
330
- /**
331
- * @license
332
- * Copyright 2016 Google Inc.
333
- *
334
- * Permission is hereby granted, free of charge, to any person obtaining a copy
335
- * of this software and associated documentation files (the "Software"), to deal
336
- * in the Software without restriction, including without limitation the rights
337
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
338
- * copies of the Software, and to permit persons to whom the Software is
339
- * furnished to do so, subject to the following conditions:
340
- *
341
- * The above copyright notice and this permission notice shall be included in
342
- * all copies or substantial portions of the Software.
343
- *
344
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
345
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
346
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
347
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
348
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
349
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
350
- * THE SOFTWARE.
351
- */
352
- var cssClasses$3 = {
353
- LABEL_FLOAT_ABOVE: 'mdc-floating-label--float-above',
354
- LABEL_REQUIRED: 'mdc-floating-label--required',
355
- LABEL_SHAKE: 'mdc-floating-label--shake',
356
- ROOT: 'mdc-floating-label',
357
- };
358
-
359
- /**
360
- * @license
361
- * Copyright 2016 Google Inc.
362
- *
363
- * Permission is hereby granted, free of charge, to any person obtaining a copy
364
- * of this software and associated documentation files (the "Software"), to deal
365
- * in the Software without restriction, including without limitation the rights
366
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
367
- * copies of the Software, and to permit persons to whom the Software is
368
- * furnished to do so, subject to the following conditions:
369
- *
370
- * The above copyright notice and this permission notice shall be included in
371
- * all copies or substantial portions of the Software.
372
- *
373
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
374
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
375
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
376
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
377
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
378
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
379
- * THE SOFTWARE.
380
- */
381
- var MDCFloatingLabelFoundation = /** @class */ (function (_super) {
382
- __extends(MDCFloatingLabelFoundation, _super);
383
- function MDCFloatingLabelFoundation(adapter) {
384
- var _this = _super.call(this, __assign(__assign({}, MDCFloatingLabelFoundation.defaultAdapter), adapter)) || this;
385
- _this.shakeAnimationEndHandler = function () {
386
- _this.handleShakeAnimationEnd();
387
- };
388
- return _this;
389
- }
390
- Object.defineProperty(MDCFloatingLabelFoundation, "cssClasses", {
391
- get: function () {
392
- return cssClasses$3;
393
- },
394
- enumerable: false,
395
- configurable: true
396
- });
397
- Object.defineProperty(MDCFloatingLabelFoundation, "defaultAdapter", {
398
- /**
399
- * See {@link MDCFloatingLabelAdapter} for typing information on parameters and return types.
400
- */
401
- get: function () {
402
- // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
403
- return {
404
- addClass: function () { return undefined; },
405
- removeClass: function () { return undefined; },
406
- getWidth: function () { return 0; },
407
- registerInteractionHandler: function () { return undefined; },
408
- deregisterInteractionHandler: function () { return undefined; },
409
- };
410
- // tslint:enable:object-literal-sort-keys
411
- },
412
- enumerable: false,
413
- configurable: true
414
- });
415
- MDCFloatingLabelFoundation.prototype.init = function () {
416
- this.adapter.registerInteractionHandler('animationend', this.shakeAnimationEndHandler);
417
- };
418
- MDCFloatingLabelFoundation.prototype.destroy = function () {
419
- this.adapter.deregisterInteractionHandler('animationend', this.shakeAnimationEndHandler);
420
- };
421
- /**
422
- * Returns the width of the label element.
423
- */
424
- MDCFloatingLabelFoundation.prototype.getWidth = function () {
425
- return this.adapter.getWidth();
426
- };
427
- /**
428
- * Styles the label to produce a shake animation to indicate an error.
429
- * @param shouldShake If true, adds the shake CSS class; otherwise, removes shake class.
430
- */
431
- MDCFloatingLabelFoundation.prototype.shake = function (shouldShake) {
432
- var LABEL_SHAKE = MDCFloatingLabelFoundation.cssClasses.LABEL_SHAKE;
433
- if (shouldShake) {
434
- this.adapter.addClass(LABEL_SHAKE);
435
- }
436
- else {
437
- this.adapter.removeClass(LABEL_SHAKE);
438
- }
439
- };
440
- /**
441
- * Styles the label to float or dock.
442
- * @param shouldFloat If true, adds the float CSS class; otherwise, removes float and shake classes to dock the label.
443
- */
444
- MDCFloatingLabelFoundation.prototype.float = function (shouldFloat) {
445
- var _a = MDCFloatingLabelFoundation.cssClasses, LABEL_FLOAT_ABOVE = _a.LABEL_FLOAT_ABOVE, LABEL_SHAKE = _a.LABEL_SHAKE;
446
- if (shouldFloat) {
447
- this.adapter.addClass(LABEL_FLOAT_ABOVE);
448
- }
449
- else {
450
- this.adapter.removeClass(LABEL_FLOAT_ABOVE);
451
- this.adapter.removeClass(LABEL_SHAKE);
452
- }
453
- };
454
- /**
455
- * Styles the label as required.
456
- * @param isRequired If true, adds an asterisk to the label, indicating that it is required.
457
- */
458
- MDCFloatingLabelFoundation.prototype.setRequired = function (isRequired) {
459
- var LABEL_REQUIRED = MDCFloatingLabelFoundation.cssClasses.LABEL_REQUIRED;
460
- if (isRequired) {
461
- this.adapter.addClass(LABEL_REQUIRED);
462
- }
463
- else {
464
- this.adapter.removeClass(LABEL_REQUIRED);
465
- }
466
- };
467
- MDCFloatingLabelFoundation.prototype.handleShakeAnimationEnd = function () {
468
- var LABEL_SHAKE = MDCFloatingLabelFoundation.cssClasses.LABEL_SHAKE;
469
- this.adapter.removeClass(LABEL_SHAKE);
470
- };
471
- return MDCFloatingLabelFoundation;
472
- }(MDCFoundation));
473
-
474
- /**
475
- * @license
476
- * Copyright 2016 Google Inc.
477
- *
478
- * Permission is hereby granted, free of charge, to any person obtaining a copy
479
- * of this software and associated documentation files (the "Software"), to deal
480
- * in the Software without restriction, including without limitation the rights
481
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
482
- * copies of the Software, and to permit persons to whom the Software is
483
- * furnished to do so, subject to the following conditions:
484
- *
485
- * The above copyright notice and this permission notice shall be included in
486
- * all copies or substantial portions of the Software.
487
- *
488
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
489
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
490
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
491
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
492
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
493
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
494
- * THE SOFTWARE.
495
- */
496
- var MDCFloatingLabel = /** @class */ (function (_super) {
497
- __extends(MDCFloatingLabel, _super);
498
- function MDCFloatingLabel() {
499
- return _super !== null && _super.apply(this, arguments) || this;
500
- }
501
- MDCFloatingLabel.attachTo = function (root) {
502
- return new MDCFloatingLabel(root);
503
- };
504
- /**
505
- * Styles the label to produce the label shake for errors.
506
- * @param shouldShake If true, shakes the label by adding a CSS class; otherwise, stops shaking by removing the class.
507
- */
508
- MDCFloatingLabel.prototype.shake = function (shouldShake) {
509
- this.foundation.shake(shouldShake);
510
- };
511
- /**
512
- * Styles the label to float/dock.
513
- * @param shouldFloat If true, floats the label by adding a CSS class; otherwise, docks it by removing the class.
514
- */
515
- MDCFloatingLabel.prototype.float = function (shouldFloat) {
516
- this.foundation.float(shouldFloat);
517
- };
518
- /**
519
- * Styles the label as required.
520
- * @param isRequired If true, adds an asterisk to the label, indicating that it is required.
521
- */
522
- MDCFloatingLabel.prototype.setRequired = function (isRequired) {
523
- this.foundation.setRequired(isRequired);
524
- };
525
- MDCFloatingLabel.prototype.getWidth = function () {
526
- return this.foundation.getWidth();
527
- };
528
- MDCFloatingLabel.prototype.getDefaultFoundation = function () {
529
- var _this = this;
530
- // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>.
531
- // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.
532
- // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
533
- var adapter = {
534
- addClass: function (className) { return _this.root.classList.add(className); },
535
- removeClass: function (className) { return _this.root.classList.remove(className); },
536
- getWidth: function () { return estimateScrollWidth(_this.root); },
537
- registerInteractionHandler: function (evtType, handler) {
538
- return _this.listen(evtType, handler);
539
- },
540
- deregisterInteractionHandler: function (evtType, handler) {
541
- return _this.unlisten(evtType, handler);
542
- },
543
- };
544
- // tslint:enable:object-literal-sort-keys
545
- return new MDCFloatingLabelFoundation(adapter);
546
- };
547
- return MDCFloatingLabel;
548
- }(MDCComponent));
549
-
550
- /**
551
- * @license
552
- * Copyright 2018 Google Inc.
553
- *
554
- * Permission is hereby granted, free of charge, to any person obtaining a copy
555
- * of this software and associated documentation files (the "Software"), to deal
556
- * in the Software without restriction, including without limitation the rights
557
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
558
- * copies of the Software, and to permit persons to whom the Software is
559
- * furnished to do so, subject to the following conditions:
560
- *
561
- * The above copyright notice and this permission notice shall be included in
562
- * all copies or substantial portions of the Software.
563
- *
564
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
565
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
566
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
567
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
568
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
569
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
570
- * THE SOFTWARE.
571
- */
572
- var cssClasses$2 = {
573
- LINE_RIPPLE_ACTIVE: 'mdc-line-ripple--active',
574
- LINE_RIPPLE_DEACTIVATING: 'mdc-line-ripple--deactivating',
575
- };
576
-
577
- /**
578
- * @license
579
- * Copyright 2018 Google Inc.
580
- *
581
- * Permission is hereby granted, free of charge, to any person obtaining a copy
582
- * of this software and associated documentation files (the "Software"), to deal
583
- * in the Software without restriction, including without limitation the rights
584
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
585
- * copies of the Software, and to permit persons to whom the Software is
586
- * furnished to do so, subject to the following conditions:
587
- *
588
- * The above copyright notice and this permission notice shall be included in
589
- * all copies or substantial portions of the Software.
590
- *
591
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
592
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
593
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
594
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
595
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
596
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
597
- * THE SOFTWARE.
598
- */
599
- var MDCLineRippleFoundation = /** @class */ (function (_super) {
600
- __extends(MDCLineRippleFoundation, _super);
601
- function MDCLineRippleFoundation(adapter) {
602
- var _this = _super.call(this, __assign(__assign({}, MDCLineRippleFoundation.defaultAdapter), adapter)) || this;
603
- _this.transitionEndHandler = function (evt) {
604
- _this.handleTransitionEnd(evt);
605
- };
606
- return _this;
607
- }
608
- Object.defineProperty(MDCLineRippleFoundation, "cssClasses", {
609
- get: function () {
610
- return cssClasses$2;
611
- },
612
- enumerable: false,
613
- configurable: true
614
- });
615
- Object.defineProperty(MDCLineRippleFoundation, "defaultAdapter", {
616
- /**
617
- * See {@link MDCLineRippleAdapter} for typing information on parameters and return types.
618
- */
619
- get: function () {
620
- // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
621
- return {
622
- addClass: function () { return undefined; },
623
- removeClass: function () { return undefined; },
624
- hasClass: function () { return false; },
625
- setStyle: function () { return undefined; },
626
- registerEventHandler: function () { return undefined; },
627
- deregisterEventHandler: function () { return undefined; },
628
- };
629
- // tslint:enable:object-literal-sort-keys
630
- },
631
- enumerable: false,
632
- configurable: true
633
- });
634
- MDCLineRippleFoundation.prototype.init = function () {
635
- this.adapter.registerEventHandler('transitionend', this.transitionEndHandler);
636
- };
637
- MDCLineRippleFoundation.prototype.destroy = function () {
638
- this.adapter.deregisterEventHandler('transitionend', this.transitionEndHandler);
639
- };
640
- MDCLineRippleFoundation.prototype.activate = function () {
641
- this.adapter.removeClass(cssClasses$2.LINE_RIPPLE_DEACTIVATING);
642
- this.adapter.addClass(cssClasses$2.LINE_RIPPLE_ACTIVE);
643
- };
644
- MDCLineRippleFoundation.prototype.setRippleCenter = function (xCoordinate) {
645
- this.adapter.setStyle('transform-origin', xCoordinate + "px center");
646
- };
647
- MDCLineRippleFoundation.prototype.deactivate = function () {
648
- this.adapter.addClass(cssClasses$2.LINE_RIPPLE_DEACTIVATING);
649
- };
650
- MDCLineRippleFoundation.prototype.handleTransitionEnd = function (evt) {
651
- // Wait for the line ripple to be either transparent or opaque
652
- // before emitting the animation end event
653
- var isDeactivating = this.adapter.hasClass(cssClasses$2.LINE_RIPPLE_DEACTIVATING);
654
- if (evt.propertyName === 'opacity') {
655
- if (isDeactivating) {
656
- this.adapter.removeClass(cssClasses$2.LINE_RIPPLE_ACTIVE);
657
- this.adapter.removeClass(cssClasses$2.LINE_RIPPLE_DEACTIVATING);
658
- }
659
- }
660
- };
661
- return MDCLineRippleFoundation;
662
- }(MDCFoundation));
663
-
664
- /**
665
- * @license
666
- * Copyright 2018 Google Inc.
667
- *
668
- * Permission is hereby granted, free of charge, to any person obtaining a copy
669
- * of this software and associated documentation files (the "Software"), to deal
670
- * in the Software without restriction, including without limitation the rights
671
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
672
- * copies of the Software, and to permit persons to whom the Software is
673
- * furnished to do so, subject to the following conditions:
674
- *
675
- * The above copyright notice and this permission notice shall be included in
676
- * all copies or substantial portions of the Software.
677
- *
678
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
679
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
680
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
681
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
682
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
683
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
684
- * THE SOFTWARE.
685
- */
686
- var MDCLineRipple = /** @class */ (function (_super) {
687
- __extends(MDCLineRipple, _super);
688
- function MDCLineRipple() {
689
- return _super !== null && _super.apply(this, arguments) || this;
690
- }
691
- MDCLineRipple.attachTo = function (root) {
692
- return new MDCLineRipple(root);
693
- };
694
- /**
695
- * Activates the line ripple
696
- */
697
- MDCLineRipple.prototype.activate = function () {
698
- this.foundation.activate();
699
- };
700
- /**
701
- * Deactivates the line ripple
702
- */
703
- MDCLineRipple.prototype.deactivate = function () {
704
- this.foundation.deactivate();
705
- };
706
- /**
707
- * Sets the transform origin given a user's click location.
708
- * The `rippleCenter` is the x-coordinate of the middle of the ripple.
709
- */
710
- MDCLineRipple.prototype.setRippleCenter = function (xCoordinate) {
711
- this.foundation.setRippleCenter(xCoordinate);
712
- };
713
- MDCLineRipple.prototype.getDefaultFoundation = function () {
714
- var _this = this;
715
- // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>.
716
- // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.
717
- // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
718
- var adapter = {
719
- addClass: function (className) { return _this.root.classList.add(className); },
720
- removeClass: function (className) { return _this.root.classList.remove(className); },
721
- hasClass: function (className) { return _this.root.classList.contains(className); },
722
- setStyle: function (propertyName, value) { return _this.root.style.setProperty(propertyName, value); },
723
- registerEventHandler: function (evtType, handler) { return _this.listen(evtType, handler); },
724
- deregisterEventHandler: function (evtType, handler) { return _this.unlisten(evtType, handler); },
725
- };
726
- // tslint:enable:object-literal-sort-keys
727
- return new MDCLineRippleFoundation(adapter);
728
- };
729
- return MDCLineRipple;
730
- }(MDCComponent));
731
-
732
- /**
733
- * @license
734
- * Copyright 2016 Google Inc.
735
- *
736
- * Permission is hereby granted, free of charge, to any person obtaining a copy
737
- * of this software and associated documentation files (the "Software"), to deal
738
- * in the Software without restriction, including without limitation the rights
739
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
740
- * copies of the Software, and to permit persons to whom the Software is
741
- * furnished to do so, subject to the following conditions:
742
- *
743
- * The above copyright notice and this permission notice shall be included in
744
- * all copies or substantial portions of the Software.
745
- *
746
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
747
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
748
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
749
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
750
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
751
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
752
- * THE SOFTWARE.
753
- */
754
- var cssPropertyNameMap = {
755
- animation: {
756
- prefixed: '-webkit-animation',
757
- standard: 'animation',
758
- },
759
- transform: {
760
- prefixed: '-webkit-transform',
761
- standard: 'transform',
762
- },
763
- transition: {
764
- prefixed: '-webkit-transition',
765
- standard: 'transition',
766
- },
767
- };
768
- var jsEventTypeMap = {
769
- animationend: {
770
- cssProperty: 'animation',
771
- prefixed: 'webkitAnimationEnd',
772
- standard: 'animationend',
773
- },
774
- animationiteration: {
775
- cssProperty: 'animation',
776
- prefixed: 'webkitAnimationIteration',
777
- standard: 'animationiteration',
778
- },
779
- animationstart: {
780
- cssProperty: 'animation',
781
- prefixed: 'webkitAnimationStart',
782
- standard: 'animationstart',
783
- },
784
- transitionend: {
785
- cssProperty: 'transition',
786
- prefixed: 'webkitTransitionEnd',
787
- standard: 'transitionend',
788
- },
789
- };
790
- function isWindow(windowObj) {
791
- return Boolean(windowObj.document) && typeof windowObj.document.createElement === 'function';
792
- }
793
- function getCorrectPropertyName(windowObj, cssProperty) {
794
- if (isWindow(windowObj) && cssProperty in cssPropertyNameMap) {
795
- var el = windowObj.document.createElement('div');
796
- var _a = cssPropertyNameMap[cssProperty], standard = _a.standard, prefixed = _a.prefixed;
797
- var isStandard = standard in el.style;
798
- return isStandard ? standard : prefixed;
799
- }
800
- return cssProperty;
801
- }
802
- function getCorrectEventName(windowObj, eventType) {
803
- if (isWindow(windowObj) && eventType in jsEventTypeMap) {
804
- var el = windowObj.document.createElement('div');
805
- var _a = jsEventTypeMap[eventType], standard = _a.standard, prefixed = _a.prefixed, cssProperty = _a.cssProperty;
806
- var isStandard = cssProperty in el.style;
807
- return isStandard ? standard : prefixed;
808
- }
809
- return eventType;
810
- }
811
-
812
- /**
813
- * @license
814
- * Copyright 2018 Google Inc.
815
- *
816
- * Permission is hereby granted, free of charge, to any person obtaining a copy
817
- * of this software and associated documentation files (the "Software"), to deal
818
- * in the Software without restriction, including without limitation the rights
819
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
820
- * copies of the Software, and to permit persons to whom the Software is
821
- * furnished to do so, subject to the following conditions:
822
- *
823
- * The above copyright notice and this permission notice shall be included in
824
- * all copies or substantial portions of the Software.
825
- *
826
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
827
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
828
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
829
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
830
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
831
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
832
- * THE SOFTWARE.
833
- */
834
- var strings$1 = {
835
- NOTCH_ELEMENT_SELECTOR: '.mdc-notched-outline__notch',
836
- };
837
- var numbers$1 = {
838
- // This should stay in sync with $mdc-notched-outline-padding * 2.
839
- NOTCH_ELEMENT_PADDING: 8,
840
- };
841
- var cssClasses$1 = {
842
- NO_LABEL: 'mdc-notched-outline--no-label',
843
- OUTLINE_NOTCHED: 'mdc-notched-outline--notched',
844
- OUTLINE_UPGRADED: 'mdc-notched-outline--upgraded',
845
- };
846
-
847
- /**
848
- * @license
849
- * Copyright 2017 Google Inc.
850
- *
851
- * Permission is hereby granted, free of charge, to any person obtaining a copy
852
- * of this software and associated documentation files (the "Software"), to deal
853
- * in the Software without restriction, including without limitation the rights
854
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
855
- * copies of the Software, and to permit persons to whom the Software is
856
- * furnished to do so, subject to the following conditions:
857
- *
858
- * The above copyright notice and this permission notice shall be included in
859
- * all copies or substantial portions of the Software.
860
- *
861
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
862
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
863
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
864
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
865
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
866
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
867
- * THE SOFTWARE.
868
- */
869
- var MDCNotchedOutlineFoundation = /** @class */ (function (_super) {
870
- __extends(MDCNotchedOutlineFoundation, _super);
871
- function MDCNotchedOutlineFoundation(adapter) {
872
- return _super.call(this, __assign(__assign({}, MDCNotchedOutlineFoundation.defaultAdapter), adapter)) || this;
873
- }
874
- Object.defineProperty(MDCNotchedOutlineFoundation, "strings", {
875
- get: function () {
876
- return strings$1;
877
- },
878
- enumerable: false,
879
- configurable: true
880
- });
881
- Object.defineProperty(MDCNotchedOutlineFoundation, "cssClasses", {
882
- get: function () {
883
- return cssClasses$1;
884
- },
885
- enumerable: false,
886
- configurable: true
887
- });
888
- Object.defineProperty(MDCNotchedOutlineFoundation, "numbers", {
889
- get: function () {
890
- return numbers$1;
891
- },
892
- enumerable: false,
893
- configurable: true
894
- });
895
- Object.defineProperty(MDCNotchedOutlineFoundation, "defaultAdapter", {
896
- /**
897
- * See {@link MDCNotchedOutlineAdapter} for typing information on parameters and return types.
898
- */
899
- get: function () {
900
- // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
901
- return {
902
- addClass: function () { return undefined; },
903
- removeClass: function () { return undefined; },
904
- setNotchWidthProperty: function () { return undefined; },
905
- removeNotchWidthProperty: function () { return undefined; },
906
- };
907
- // tslint:enable:object-literal-sort-keys
908
- },
909
- enumerable: false,
910
- configurable: true
911
- });
912
- /**
913
- * Adds the outline notched selector and updates the notch width calculated based off of notchWidth.
914
- */
915
- MDCNotchedOutlineFoundation.prototype.notch = function (notchWidth) {
916
- var OUTLINE_NOTCHED = MDCNotchedOutlineFoundation.cssClasses.OUTLINE_NOTCHED;
917
- if (notchWidth > 0) {
918
- notchWidth += numbers$1.NOTCH_ELEMENT_PADDING; // Add padding from left/right.
919
- }
920
- this.adapter.setNotchWidthProperty(notchWidth);
921
- this.adapter.addClass(OUTLINE_NOTCHED);
922
- };
923
- /**
924
- * Removes notched outline selector to close the notch in the outline.
925
- */
926
- MDCNotchedOutlineFoundation.prototype.closeNotch = function () {
927
- var OUTLINE_NOTCHED = MDCNotchedOutlineFoundation.cssClasses.OUTLINE_NOTCHED;
928
- this.adapter.removeClass(OUTLINE_NOTCHED);
929
- this.adapter.removeNotchWidthProperty();
930
- };
931
- return MDCNotchedOutlineFoundation;
932
- }(MDCFoundation));
933
-
934
- /**
935
- * @license
936
- * Copyright 2017 Google Inc.
937
- *
938
- * Permission is hereby granted, free of charge, to any person obtaining a copy
939
- * of this software and associated documentation files (the "Software"), to deal
940
- * in the Software without restriction, including without limitation the rights
941
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
942
- * copies of the Software, and to permit persons to whom the Software is
943
- * furnished to do so, subject to the following conditions:
944
- *
945
- * The above copyright notice and this permission notice shall be included in
946
- * all copies or substantial portions of the Software.
947
- *
948
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
949
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
950
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
951
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
952
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
953
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
954
- * THE SOFTWARE.
955
- */
956
- var MDCNotchedOutline = /** @class */ (function (_super) {
957
- __extends(MDCNotchedOutline, _super);
958
- function MDCNotchedOutline() {
959
- return _super !== null && _super.apply(this, arguments) || this;
960
- }
961
- MDCNotchedOutline.attachTo = function (root) {
962
- return new MDCNotchedOutline(root);
963
- };
964
- MDCNotchedOutline.prototype.initialSyncWithDOM = function () {
965
- this.notchElement =
966
- this.root.querySelector(strings$1.NOTCH_ELEMENT_SELECTOR);
967
- var label = this.root.querySelector('.' + MDCFloatingLabelFoundation.cssClasses.ROOT);
968
- if (label) {
969
- label.style.transitionDuration = '0s';
970
- this.root.classList.add(cssClasses$1.OUTLINE_UPGRADED);
971
- requestAnimationFrame(function () {
972
- label.style.transitionDuration = '';
973
- });
974
- }
975
- else {
976
- this.root.classList.add(cssClasses$1.NO_LABEL);
977
- }
978
- };
979
- /**
980
- * Updates classes and styles to open the notch to the specified width.
981
- * @param notchWidth The notch width in the outline.
982
- */
983
- MDCNotchedOutline.prototype.notch = function (notchWidth) {
984
- this.foundation.notch(notchWidth);
985
- };
986
- /**
987
- * Updates classes and styles to close the notch.
988
- */
989
- MDCNotchedOutline.prototype.closeNotch = function () {
990
- this.foundation.closeNotch();
991
- };
992
- MDCNotchedOutline.prototype.getDefaultFoundation = function () {
993
- var _this = this;
994
- // DO NOT INLINE this variable. For backward compatibility, foundations take a Partial<MDCFooAdapter>.
995
- // To ensure we don't accidentally omit any methods, we need a separate, strongly typed adapter variable.
996
- // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.
997
- var adapter = {
998
- addClass: function (className) { return _this.root.classList.add(className); },
999
- removeClass: function (className) { return _this.root.classList.remove(className); },
1000
- setNotchWidthProperty: function (width) {
1001
- _this.notchElement.style.setProperty('width', width + 'px');
1002
- },
1003
- removeNotchWidthProperty: function () {
1004
- _this.notchElement.style.removeProperty('width');
1005
- },
1006
- };
1007
- // tslint:enable:object-literal-sort-keys
1008
- return new MDCNotchedOutlineFoundation(adapter);
1009
- };
1010
- return MDCNotchedOutline;
1011
- }(MDCComponent));
1012
-
1013
- /**
1014
- * @license
1015
- * Copyright 2019 Google Inc.
1016
- *
1017
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1018
- * of this software and associated documentation files (the "Software"), to deal
1019
- * in the Software without restriction, including without limitation the rights
1020
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1021
- * copies of the Software, and to permit persons to whom the Software is
1022
- * furnished to do so, subject to the following conditions:
1023
- *
1024
- * The above copyright notice and this permission notice shall be included in
1025
- * all copies or substantial portions of the Software.
1026
- *
1027
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1028
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1029
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1030
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1031
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1032
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1033
- * THE SOFTWARE.
1034
- */
1035
- /**
1036
- * Determine whether the current browser supports passive event listeners, and
1037
- * if so, use them.
1038
- */
1039
- function applyPassive(globalObj) {
1040
- if (globalObj === void 0) { globalObj = window; }
1041
- return supportsPassiveOption(globalObj) ?
1042
- { passive: true } :
1043
- false;
1044
- }
1045
- function supportsPassiveOption(globalObj) {
1046
- if (globalObj === void 0) { globalObj = window; }
1047
- // See
1048
- // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
1049
- var passiveSupported = false;
1050
- try {
1051
- var options = {
1052
- // This function will be called when the browser
1053
- // attempts to access the passive property.
1054
- get passive() {
1055
- passiveSupported = true;
1056
- return false;
1057
- }
1058
- };
1059
- var handler = function () { };
1060
- globalObj.document.addEventListener('test', handler, options);
1061
- globalObj.document.removeEventListener('test', handler, options);
1062
- }
1063
- catch (err) {
1064
- passiveSupported = false;
1065
- }
1066
- return passiveSupported;
1067
- }
1068
-
1069
- /**
1070
- * @license
1071
- * Copyright 2016 Google Inc.
1072
- *
1073
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1074
- * of this software and associated documentation files (the "Software"), to deal
1075
- * in the Software without restriction, including without limitation the rights
1076
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1077
- * copies of the Software, and to permit persons to whom the Software is
1078
- * furnished to do so, subject to the following conditions:
1079
- *
1080
- * The above copyright notice and this permission notice shall be included in
1081
- * all copies or substantial portions of the Software.
1082
- *
1083
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1084
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1085
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1086
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1087
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1088
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1089
- * THE SOFTWARE.
1090
- */
1091
- var cssClasses = {
1092
- // Ripple is a special case where the "root" component is really a "mixin" of sorts,
1093
- // given that it's an 'upgrade' to an existing component. That being said it is the root
1094
- // CSS class that all other CSS classes derive from.
1095
- BG_FOCUSED: 'mdc-ripple-upgraded--background-focused',
1096
- FG_ACTIVATION: 'mdc-ripple-upgraded--foreground-activation',
1097
- FG_DEACTIVATION: 'mdc-ripple-upgraded--foreground-deactivation',
1098
- ROOT: 'mdc-ripple-upgraded',
1099
- UNBOUNDED: 'mdc-ripple-upgraded--unbounded',
1100
- };
1101
- var strings = {
1102
- VAR_FG_SCALE: '--mdc-ripple-fg-scale',
1103
- VAR_FG_SIZE: '--mdc-ripple-fg-size',
1104
- VAR_FG_TRANSLATE_END: '--mdc-ripple-fg-translate-end',
1105
- VAR_FG_TRANSLATE_START: '--mdc-ripple-fg-translate-start',
1106
- VAR_LEFT: '--mdc-ripple-left',
1107
- VAR_TOP: '--mdc-ripple-top',
1108
- };
1109
- var numbers = {
1110
- DEACTIVATION_TIMEOUT_MS: 225,
1111
- FG_DEACTIVATION_MS: 150,
1112
- INITIAL_ORIGIN_SCALE: 0.6,
1113
- PADDING: 10,
1114
- TAP_DELAY_MS: 300, // Delay between touch and simulated mouse events on touch devices
1115
- };
1116
-
1117
- /**
1118
- * Stores result from supportsCssVariables to avoid redundant processing to
1119
- * detect CSS custom variable support.
1120
- */
1121
- var supportsCssVariables_;
1122
- function supportsCssVariables(windowObj, forceRefresh) {
1123
- if (forceRefresh === void 0) { forceRefresh = false; }
1124
- var CSS = windowObj.CSS;
1125
- var supportsCssVars = supportsCssVariables_;
1126
- if (typeof supportsCssVariables_ === 'boolean' && !forceRefresh) {
1127
- return supportsCssVariables_;
1128
- }
1129
- var supportsFunctionPresent = CSS && typeof CSS.supports === 'function';
1130
- if (!supportsFunctionPresent) {
1131
- return false;
1132
- }
1133
- var explicitlySupportsCssVars = CSS.supports('--css-vars', 'yes');
1134
- // See: https://bugs.webkit.org/show_bug.cgi?id=154669
1135
- // See: README section on Safari
1136
- var weAreFeatureDetectingSafari10plus = (CSS.supports('(--css-vars: yes)') &&
1137
- CSS.supports('color', '#00000000'));
1138
- supportsCssVars =
1139
- explicitlySupportsCssVars || weAreFeatureDetectingSafari10plus;
1140
- if (!forceRefresh) {
1141
- supportsCssVariables_ = supportsCssVars;
1142
- }
1143
- return supportsCssVars;
1144
- }
1145
- function getNormalizedEventCoords(evt, pageOffset, clientRect) {
1146
- if (!evt) {
1147
- return { x: 0, y: 0 };
1148
- }
1149
- var x = pageOffset.x, y = pageOffset.y;
1150
- var documentX = x + clientRect.left;
1151
- var documentY = y + clientRect.top;
1152
- var normalizedX;
1153
- var normalizedY;
1154
- // Determine touch point relative to the ripple container.
1155
- if (evt.type === 'touchstart') {
1156
- var touchEvent = evt;
1157
- normalizedX = touchEvent.changedTouches[0].pageX - documentX;
1158
- normalizedY = touchEvent.changedTouches[0].pageY - documentY;
1159
- }
1160
- else {
1161
- var mouseEvent = evt;
1162
- normalizedX = mouseEvent.pageX - documentX;
1163
- normalizedY = mouseEvent.pageY - documentY;
1164
- }
1165
- return { x: normalizedX, y: normalizedY };
1166
- }
1167
-
1168
- /**
1169
- * @license
1170
- * Copyright 2016 Google Inc.
1171
- *
1172
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1173
- * of this software and associated documentation files (the "Software"), to deal
1174
- * in the Software without restriction, including without limitation the rights
1175
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1176
- * copies of the Software, and to permit persons to whom the Software is
1177
- * furnished to do so, subject to the following conditions:
1178
- *
1179
- * The above copyright notice and this permission notice shall be included in
1180
- * all copies or substantial portions of the Software.
1181
- *
1182
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1183
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1184
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1185
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1186
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1187
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1188
- * THE SOFTWARE.
1189
- */
1190
- // Activation events registered on the root element of each instance for activation
1191
- var ACTIVATION_EVENT_TYPES = [
1192
- 'touchstart', 'pointerdown', 'mousedown', 'keydown',
1193
- ];
1194
- // Deactivation events registered on documentElement when a pointer-related down event occurs
1195
- var POINTER_DEACTIVATION_EVENT_TYPES = [
1196
- 'touchend', 'pointerup', 'mouseup', 'contextmenu',
1197
- ];
1198
- // simultaneous nested activations
1199
- var activatedTargets = [];
1200
- var MDCRippleFoundation = /** @class */ (function (_super) {
1201
- __extends(MDCRippleFoundation, _super);
1202
- function MDCRippleFoundation(adapter) {
1203
- var _this = _super.call(this, __assign(__assign({}, MDCRippleFoundation.defaultAdapter), adapter)) || this;
1204
- _this.activationAnimationHasEnded = false;
1205
- _this.activationTimer = 0;
1206
- _this.fgDeactivationRemovalTimer = 0;
1207
- _this.fgScale = '0';
1208
- _this.frame = { width: 0, height: 0 };
1209
- _this.initialSize = 0;
1210
- _this.layoutFrame = 0;
1211
- _this.maxRadius = 0;
1212
- _this.unboundedCoords = { left: 0, top: 0 };
1213
- _this.activationState = _this.defaultActivationState();
1214
- _this.activationTimerCallback = function () {
1215
- _this.activationAnimationHasEnded = true;
1216
- _this.runDeactivationUXLogicIfReady();
1217
- };
1218
- _this.activateHandler = function (e) {
1219
- _this.activateImpl(e);
1220
- };
1221
- _this.deactivateHandler = function () {
1222
- _this.deactivateImpl();
1223
- };
1224
- _this.focusHandler = function () {
1225
- _this.handleFocus();
1226
- };
1227
- _this.blurHandler = function () {
1228
- _this.handleBlur();
1229
- };
1230
- _this.resizeHandler = function () {
1231
- _this.layout();
1232
- };
1233
- return _this;
1234
- }
1235
- Object.defineProperty(MDCRippleFoundation, "cssClasses", {
1236
- get: function () {
1237
- return cssClasses;
1238
- },
1239
- enumerable: false,
1240
- configurable: true
1241
- });
1242
- Object.defineProperty(MDCRippleFoundation, "strings", {
1243
- get: function () {
1244
- return strings;
1245
- },
1246
- enumerable: false,
1247
- configurable: true
1248
- });
1249
- Object.defineProperty(MDCRippleFoundation, "numbers", {
1250
- get: function () {
1251
- return numbers;
1252
- },
1253
- enumerable: false,
1254
- configurable: true
1255
- });
1256
- Object.defineProperty(MDCRippleFoundation, "defaultAdapter", {
1257
- get: function () {
1258
- return {
1259
- addClass: function () { return undefined; },
1260
- browserSupportsCssVars: function () { return true; },
1261
- computeBoundingRect: function () {
1262
- return ({ top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 });
1263
- },
1264
- containsEventTarget: function () { return true; },
1265
- deregisterDocumentInteractionHandler: function () { return undefined; },
1266
- deregisterInteractionHandler: function () { return undefined; },
1267
- deregisterResizeHandler: function () { return undefined; },
1268
- getWindowPageOffset: function () { return ({ x: 0, y: 0 }); },
1269
- isSurfaceActive: function () { return true; },
1270
- isSurfaceDisabled: function () { return true; },
1271
- isUnbounded: function () { return true; },
1272
- registerDocumentInteractionHandler: function () { return undefined; },
1273
- registerInteractionHandler: function () { return undefined; },
1274
- registerResizeHandler: function () { return undefined; },
1275
- removeClass: function () { return undefined; },
1276
- updateCssVariable: function () { return undefined; },
1277
- };
1278
- },
1279
- enumerable: false,
1280
- configurable: true
1281
- });
1282
- MDCRippleFoundation.prototype.init = function () {
1283
- var _this = this;
1284
- var supportsPressRipple = this.supportsPressRipple();
1285
- this.registerRootHandlers(supportsPressRipple);
1286
- if (supportsPressRipple) {
1287
- var _a = MDCRippleFoundation.cssClasses, ROOT_1 = _a.ROOT, UNBOUNDED_1 = _a.UNBOUNDED;
1288
- requestAnimationFrame(function () {
1289
- _this.adapter.addClass(ROOT_1);
1290
- if (_this.adapter.isUnbounded()) {
1291
- _this.adapter.addClass(UNBOUNDED_1);
1292
- // Unbounded ripples need layout logic applied immediately to set coordinates for both shade and ripple
1293
- _this.layoutInternal();
1294
- }
1295
- });
1296
- }
1297
- };
1298
- MDCRippleFoundation.prototype.destroy = function () {
1299
- var _this = this;
1300
- if (this.supportsPressRipple()) {
1301
- if (this.activationTimer) {
1302
- clearTimeout(this.activationTimer);
1303
- this.activationTimer = 0;
1304
- this.adapter.removeClass(MDCRippleFoundation.cssClasses.FG_ACTIVATION);
1305
- }
1306
- if (this.fgDeactivationRemovalTimer) {
1307
- clearTimeout(this.fgDeactivationRemovalTimer);
1308
- this.fgDeactivationRemovalTimer = 0;
1309
- this.adapter.removeClass(MDCRippleFoundation.cssClasses.FG_DEACTIVATION);
1310
- }
1311
- var _a = MDCRippleFoundation.cssClasses, ROOT_2 = _a.ROOT, UNBOUNDED_2 = _a.UNBOUNDED;
1312
- requestAnimationFrame(function () {
1313
- _this.adapter.removeClass(ROOT_2);
1314
- _this.adapter.removeClass(UNBOUNDED_2);
1315
- _this.removeCssVars();
1316
- });
1317
- }
1318
- this.deregisterRootHandlers();
1319
- this.deregisterDeactivationHandlers();
1320
- };
1321
- /**
1322
- * @param evt Optional event containing position information.
1323
- */
1324
- MDCRippleFoundation.prototype.activate = function (evt) {
1325
- this.activateImpl(evt);
1326
- };
1327
- MDCRippleFoundation.prototype.deactivate = function () {
1328
- this.deactivateImpl();
1329
- };
1330
- MDCRippleFoundation.prototype.layout = function () {
1331
- var _this = this;
1332
- if (this.layoutFrame) {
1333
- cancelAnimationFrame(this.layoutFrame);
1334
- }
1335
- this.layoutFrame = requestAnimationFrame(function () {
1336
- _this.layoutInternal();
1337
- _this.layoutFrame = 0;
1338
- });
1339
- };
1340
- MDCRippleFoundation.prototype.setUnbounded = function (unbounded) {
1341
- var UNBOUNDED = MDCRippleFoundation.cssClasses.UNBOUNDED;
1342
- if (unbounded) {
1343
- this.adapter.addClass(UNBOUNDED);
1344
- }
1345
- else {
1346
- this.adapter.removeClass(UNBOUNDED);
1347
- }
1348
- };
1349
- MDCRippleFoundation.prototype.handleFocus = function () {
1350
- var _this = this;
1351
- requestAnimationFrame(function () { return _this.adapter.addClass(MDCRippleFoundation.cssClasses.BG_FOCUSED); });
1352
- };
1353
- MDCRippleFoundation.prototype.handleBlur = function () {
1354
- var _this = this;
1355
- requestAnimationFrame(function () { return _this.adapter.removeClass(MDCRippleFoundation.cssClasses.BG_FOCUSED); });
1356
- };
1357
- /**
1358
- * We compute this property so that we are not querying information about the client
1359
- * until the point in time where the foundation requests it. This prevents scenarios where
1360
- * client-side feature-detection may happen too early, such as when components are rendered on the server
1361
- * and then initialized at mount time on the client.
1362
- */
1363
- MDCRippleFoundation.prototype.supportsPressRipple = function () {
1364
- return this.adapter.browserSupportsCssVars();
1365
- };
1366
- MDCRippleFoundation.prototype.defaultActivationState = function () {
1367
- return {
1368
- activationEvent: undefined,
1369
- hasDeactivationUXRun: false,
1370
- isActivated: false,
1371
- isProgrammatic: false,
1372
- wasActivatedByPointer: false,
1373
- wasElementMadeActive: false,
1374
- };
1375
- };
1376
- /**
1377
- * supportsPressRipple Passed from init to save a redundant function call
1378
- */
1379
- MDCRippleFoundation.prototype.registerRootHandlers = function (supportsPressRipple) {
1380
- var e_1, _a;
1381
- if (supportsPressRipple) {
1382
- try {
1383
- for (var ACTIVATION_EVENT_TYPES_1 = __values(ACTIVATION_EVENT_TYPES), ACTIVATION_EVENT_TYPES_1_1 = ACTIVATION_EVENT_TYPES_1.next(); !ACTIVATION_EVENT_TYPES_1_1.done; ACTIVATION_EVENT_TYPES_1_1 = ACTIVATION_EVENT_TYPES_1.next()) {
1384
- var evtType = ACTIVATION_EVENT_TYPES_1_1.value;
1385
- this.adapter.registerInteractionHandler(evtType, this.activateHandler);
1386
- }
1387
- }
1388
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1389
- finally {
1390
- try {
1391
- if (ACTIVATION_EVENT_TYPES_1_1 && !ACTIVATION_EVENT_TYPES_1_1.done && (_a = ACTIVATION_EVENT_TYPES_1.return)) _a.call(ACTIVATION_EVENT_TYPES_1);
1392
- }
1393
- finally { if (e_1) throw e_1.error; }
1394
- }
1395
- if (this.adapter.isUnbounded()) {
1396
- this.adapter.registerResizeHandler(this.resizeHandler);
1397
- }
1398
- }
1399
- this.adapter.registerInteractionHandler('focus', this.focusHandler);
1400
- this.adapter.registerInteractionHandler('blur', this.blurHandler);
1401
- };
1402
- MDCRippleFoundation.prototype.registerDeactivationHandlers = function (evt) {
1403
- var e_2, _a;
1404
- if (evt.type === 'keydown') {
1405
- this.adapter.registerInteractionHandler('keyup', this.deactivateHandler);
1406
- }
1407
- else {
1408
- try {
1409
- for (var POINTER_DEACTIVATION_EVENT_TYPES_1 = __values(POINTER_DEACTIVATION_EVENT_TYPES), POINTER_DEACTIVATION_EVENT_TYPES_1_1 = POINTER_DEACTIVATION_EVENT_TYPES_1.next(); !POINTER_DEACTIVATION_EVENT_TYPES_1_1.done; POINTER_DEACTIVATION_EVENT_TYPES_1_1 = POINTER_DEACTIVATION_EVENT_TYPES_1.next()) {
1410
- var evtType = POINTER_DEACTIVATION_EVENT_TYPES_1_1.value;
1411
- this.adapter.registerDocumentInteractionHandler(evtType, this.deactivateHandler);
1412
- }
1413
- }
1414
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
1415
- finally {
1416
- try {
1417
- if (POINTER_DEACTIVATION_EVENT_TYPES_1_1 && !POINTER_DEACTIVATION_EVENT_TYPES_1_1.done && (_a = POINTER_DEACTIVATION_EVENT_TYPES_1.return)) _a.call(POINTER_DEACTIVATION_EVENT_TYPES_1);
1418
- }
1419
- finally { if (e_2) throw e_2.error; }
1420
- }
1421
- }
1422
- };
1423
- MDCRippleFoundation.prototype.deregisterRootHandlers = function () {
1424
- var e_3, _a;
1425
- try {
1426
- for (var ACTIVATION_EVENT_TYPES_2 = __values(ACTIVATION_EVENT_TYPES), ACTIVATION_EVENT_TYPES_2_1 = ACTIVATION_EVENT_TYPES_2.next(); !ACTIVATION_EVENT_TYPES_2_1.done; ACTIVATION_EVENT_TYPES_2_1 = ACTIVATION_EVENT_TYPES_2.next()) {
1427
- var evtType = ACTIVATION_EVENT_TYPES_2_1.value;
1428
- this.adapter.deregisterInteractionHandler(evtType, this.activateHandler);
1429
- }
1430
- }
1431
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
1432
- finally {
1433
- try {
1434
- if (ACTIVATION_EVENT_TYPES_2_1 && !ACTIVATION_EVENT_TYPES_2_1.done && (_a = ACTIVATION_EVENT_TYPES_2.return)) _a.call(ACTIVATION_EVENT_TYPES_2);
1435
- }
1436
- finally { if (e_3) throw e_3.error; }
1437
- }
1438
- this.adapter.deregisterInteractionHandler('focus', this.focusHandler);
1439
- this.adapter.deregisterInteractionHandler('blur', this.blurHandler);
1440
- if (this.adapter.isUnbounded()) {
1441
- this.adapter.deregisterResizeHandler(this.resizeHandler);
1442
- }
1443
- };
1444
- MDCRippleFoundation.prototype.deregisterDeactivationHandlers = function () {
1445
- var e_4, _a;
1446
- this.adapter.deregisterInteractionHandler('keyup', this.deactivateHandler);
1447
- try {
1448
- for (var POINTER_DEACTIVATION_EVENT_TYPES_2 = __values(POINTER_DEACTIVATION_EVENT_TYPES), POINTER_DEACTIVATION_EVENT_TYPES_2_1 = POINTER_DEACTIVATION_EVENT_TYPES_2.next(); !POINTER_DEACTIVATION_EVENT_TYPES_2_1.done; POINTER_DEACTIVATION_EVENT_TYPES_2_1 = POINTER_DEACTIVATION_EVENT_TYPES_2.next()) {
1449
- var evtType = POINTER_DEACTIVATION_EVENT_TYPES_2_1.value;
1450
- this.adapter.deregisterDocumentInteractionHandler(evtType, this.deactivateHandler);
1451
- }
1452
- }
1453
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
1454
- finally {
1455
- try {
1456
- if (POINTER_DEACTIVATION_EVENT_TYPES_2_1 && !POINTER_DEACTIVATION_EVENT_TYPES_2_1.done && (_a = POINTER_DEACTIVATION_EVENT_TYPES_2.return)) _a.call(POINTER_DEACTIVATION_EVENT_TYPES_2);
1457
- }
1458
- finally { if (e_4) throw e_4.error; }
1459
- }
1460
- };
1461
- MDCRippleFoundation.prototype.removeCssVars = function () {
1462
- var _this = this;
1463
- var rippleStrings = MDCRippleFoundation.strings;
1464
- var keys = Object.keys(rippleStrings);
1465
- keys.forEach(function (key) {
1466
- if (key.indexOf('VAR_') === 0) {
1467
- _this.adapter.updateCssVariable(rippleStrings[key], null);
1468
- }
1469
- });
1470
- };
1471
- MDCRippleFoundation.prototype.activateImpl = function (evt) {
1472
- var _this = this;
1473
- if (this.adapter.isSurfaceDisabled()) {
1474
- return;
1475
- }
1476
- var activationState = this.activationState;
1477
- if (activationState.isActivated) {
1478
- return;
1479
- }
1480
- // Avoid reacting to follow-on events fired by touch device after an already-processed user interaction
1481
- var previousActivationEvent = this.previousActivationEvent;
1482
- var isSameInteraction = previousActivationEvent && evt !== undefined && previousActivationEvent.type !== evt.type;
1483
- if (isSameInteraction) {
1484
- return;
1485
- }
1486
- activationState.isActivated = true;
1487
- activationState.isProgrammatic = evt === undefined;
1488
- activationState.activationEvent = evt;
1489
- activationState.wasActivatedByPointer = activationState.isProgrammatic ? false : evt !== undefined && (evt.type === 'mousedown' || evt.type === 'touchstart' || evt.type === 'pointerdown');
1490
- var hasActivatedChild = evt !== undefined &&
1491
- activatedTargets.length > 0 &&
1492
- activatedTargets.some(function (target) { return _this.adapter.containsEventTarget(target); });
1493
- if (hasActivatedChild) {
1494
- // Immediately reset activation state, while preserving logic that prevents touch follow-on events
1495
- this.resetActivationState();
1496
- return;
1497
- }
1498
- if (evt !== undefined) {
1499
- activatedTargets.push(evt.target);
1500
- this.registerDeactivationHandlers(evt);
1501
- }
1502
- activationState.wasElementMadeActive = this.checkElementMadeActive(evt);
1503
- if (activationState.wasElementMadeActive) {
1504
- this.animateActivation();
1505
- }
1506
- requestAnimationFrame(function () {
1507
- // Reset array on next frame after the current event has had a chance to bubble to prevent ancestor ripples
1508
- activatedTargets = [];
1509
- if (!activationState.wasElementMadeActive
1510
- && evt !== undefined
1511
- && (evt.key === ' ' || evt.keyCode === 32)) {
1512
- // If space was pressed, try again within an rAF call to detect :active, because different UAs report
1513
- // active states inconsistently when they're called within event handling code:
1514
- // - https://bugs.chromium.org/p/chromium/issues/detail?id=635971
1515
- // - https://bugzilla.mozilla.org/show_bug.cgi?id=1293741
1516
- // We try first outside rAF to support Edge, which does not exhibit this problem, but will crash if a CSS
1517
- // variable is set within a rAF callback for a submit button interaction (#2241).
1518
- activationState.wasElementMadeActive = _this.checkElementMadeActive(evt);
1519
- if (activationState.wasElementMadeActive) {
1520
- _this.animateActivation();
1521
- }
1522
- }
1523
- if (!activationState.wasElementMadeActive) {
1524
- // Reset activation state immediately if element was not made active.
1525
- _this.activationState = _this.defaultActivationState();
1526
- }
1527
- });
1528
- };
1529
- MDCRippleFoundation.prototype.checkElementMadeActive = function (evt) {
1530
- return (evt !== undefined && evt.type === 'keydown') ?
1531
- this.adapter.isSurfaceActive() :
1532
- true;
1533
- };
1534
- MDCRippleFoundation.prototype.animateActivation = function () {
1535
- var _this = this;
1536
- var _a = MDCRippleFoundation.strings, VAR_FG_TRANSLATE_START = _a.VAR_FG_TRANSLATE_START, VAR_FG_TRANSLATE_END = _a.VAR_FG_TRANSLATE_END;
1537
- var _b = MDCRippleFoundation.cssClasses, FG_DEACTIVATION = _b.FG_DEACTIVATION, FG_ACTIVATION = _b.FG_ACTIVATION;
1538
- var DEACTIVATION_TIMEOUT_MS = MDCRippleFoundation.numbers.DEACTIVATION_TIMEOUT_MS;
1539
- this.layoutInternal();
1540
- var translateStart = '';
1541
- var translateEnd = '';
1542
- if (!this.adapter.isUnbounded()) {
1543
- var _c = this.getFgTranslationCoordinates(), startPoint = _c.startPoint, endPoint = _c.endPoint;
1544
- translateStart = startPoint.x + "px, " + startPoint.y + "px";
1545
- translateEnd = endPoint.x + "px, " + endPoint.y + "px";
1546
- }
1547
- this.adapter.updateCssVariable(VAR_FG_TRANSLATE_START, translateStart);
1548
- this.adapter.updateCssVariable(VAR_FG_TRANSLATE_END, translateEnd);
1549
- // Cancel any ongoing activation/deactivation animations
1550
- clearTimeout(this.activationTimer);
1551
- clearTimeout(this.fgDeactivationRemovalTimer);
1552
- this.rmBoundedActivationClasses();
1553
- this.adapter.removeClass(FG_DEACTIVATION);
1554
- // Force layout in order to re-trigger the animation.
1555
- this.adapter.computeBoundingRect();
1556
- this.adapter.addClass(FG_ACTIVATION);
1557
- this.activationTimer = setTimeout(function () {
1558
- _this.activationTimerCallback();
1559
- }, DEACTIVATION_TIMEOUT_MS);
1560
- };
1561
- MDCRippleFoundation.prototype.getFgTranslationCoordinates = function () {
1562
- var _a = this.activationState, activationEvent = _a.activationEvent, wasActivatedByPointer = _a.wasActivatedByPointer;
1563
- var startPoint;
1564
- if (wasActivatedByPointer) {
1565
- startPoint = getNormalizedEventCoords(activationEvent, this.adapter.getWindowPageOffset(), this.adapter.computeBoundingRect());
1566
- }
1567
- else {
1568
- startPoint = {
1569
- x: this.frame.width / 2,
1570
- y: this.frame.height / 2,
1571
- };
1572
- }
1573
- // Center the element around the start point.
1574
- startPoint = {
1575
- x: startPoint.x - (this.initialSize / 2),
1576
- y: startPoint.y - (this.initialSize / 2),
1577
- };
1578
- var endPoint = {
1579
- x: (this.frame.width / 2) - (this.initialSize / 2),
1580
- y: (this.frame.height / 2) - (this.initialSize / 2),
1581
- };
1582
- return { startPoint: startPoint, endPoint: endPoint };
1583
- };
1584
- MDCRippleFoundation.prototype.runDeactivationUXLogicIfReady = function () {
1585
- var _this = this;
1586
- // This method is called both when a pointing device is released, and when the activation animation ends.
1587
- // The deactivation animation should only run after both of those occur.
1588
- var FG_DEACTIVATION = MDCRippleFoundation.cssClasses.FG_DEACTIVATION;
1589
- var _a = this.activationState, hasDeactivationUXRun = _a.hasDeactivationUXRun, isActivated = _a.isActivated;
1590
- var activationHasEnded = hasDeactivationUXRun || !isActivated;
1591
- if (activationHasEnded && this.activationAnimationHasEnded) {
1592
- this.rmBoundedActivationClasses();
1593
- this.adapter.addClass(FG_DEACTIVATION);
1594
- this.fgDeactivationRemovalTimer = setTimeout(function () {
1595
- _this.adapter.removeClass(FG_DEACTIVATION);
1596
- }, numbers.FG_DEACTIVATION_MS);
1597
- }
1598
- };
1599
- MDCRippleFoundation.prototype.rmBoundedActivationClasses = function () {
1600
- var FG_ACTIVATION = MDCRippleFoundation.cssClasses.FG_ACTIVATION;
1601
- this.adapter.removeClass(FG_ACTIVATION);
1602
- this.activationAnimationHasEnded = false;
1603
- this.adapter.computeBoundingRect();
1604
- };
1605
- MDCRippleFoundation.prototype.resetActivationState = function () {
1606
- var _this = this;
1607
- this.previousActivationEvent = this.activationState.activationEvent;
1608
- this.activationState = this.defaultActivationState();
1609
- // Touch devices may fire additional events for the same interaction within a short time.
1610
- // Store the previous event until it's safe to assume that subsequent events are for new interactions.
1611
- setTimeout(function () { return _this.previousActivationEvent = undefined; }, MDCRippleFoundation.numbers.TAP_DELAY_MS);
1612
- };
1613
- MDCRippleFoundation.prototype.deactivateImpl = function () {
1614
- var _this = this;
1615
- var activationState = this.activationState;
1616
- // This can happen in scenarios such as when you have a keyup event that blurs the element.
1617
- if (!activationState.isActivated) {
1618
- return;
1619
- }
1620
- var state = __assign({}, activationState);
1621
- if (activationState.isProgrammatic) {
1622
- requestAnimationFrame(function () {
1623
- _this.animateDeactivation(state);
1624
- });
1625
- this.resetActivationState();
1626
- }
1627
- else {
1628
- this.deregisterDeactivationHandlers();
1629
- requestAnimationFrame(function () {
1630
- _this.activationState.hasDeactivationUXRun = true;
1631
- _this.animateDeactivation(state);
1632
- _this.resetActivationState();
1633
- });
1634
- }
1635
- };
1636
- MDCRippleFoundation.prototype.animateDeactivation = function (_a) {
1637
- var wasActivatedByPointer = _a.wasActivatedByPointer, wasElementMadeActive = _a.wasElementMadeActive;
1638
- if (wasActivatedByPointer || wasElementMadeActive) {
1639
- this.runDeactivationUXLogicIfReady();
1640
- }
1641
- };
1642
- MDCRippleFoundation.prototype.layoutInternal = function () {
1643
- var _this = this;
1644
- this.frame = this.adapter.computeBoundingRect();
1645
- var maxDim = Math.max(this.frame.height, this.frame.width);
1646
- // Surface diameter is treated differently for unbounded vs. bounded ripples.
1647
- // Unbounded ripple diameter is calculated smaller since the surface is expected to already be padded appropriately
1648
- // to extend the hitbox, and the ripple is expected to meet the edges of the padded hitbox (which is typically
1649
- // square). Bounded ripples, on the other hand, are fully expected to expand beyond the surface's longest diameter
1650
- // (calculated based on the diagonal plus a constant padding), and are clipped at the surface's border via
1651
- // `overflow: hidden`.
1652
- var getBoundedRadius = function () {
1653
- var hypotenuse = Math.sqrt(Math.pow(_this.frame.width, 2) + Math.pow(_this.frame.height, 2));
1654
- return hypotenuse + MDCRippleFoundation.numbers.PADDING;
1655
- };
1656
- this.maxRadius = this.adapter.isUnbounded() ? maxDim : getBoundedRadius();
1657
- // Ripple is sized as a fraction of the largest dimension of the surface, then scales up using a CSS scale transform
1658
- var initialSize = Math.floor(maxDim * MDCRippleFoundation.numbers.INITIAL_ORIGIN_SCALE);
1659
- // Unbounded ripple size should always be even number to equally center align.
1660
- if (this.adapter.isUnbounded() && initialSize % 2 !== 0) {
1661
- this.initialSize = initialSize - 1;
1662
- }
1663
- else {
1664
- this.initialSize = initialSize;
1665
- }
1666
- this.fgScale = "" + this.maxRadius / this.initialSize;
1667
- this.updateLayoutCssVars();
1668
- };
1669
- MDCRippleFoundation.prototype.updateLayoutCssVars = function () {
1670
- var _a = MDCRippleFoundation.strings, VAR_FG_SIZE = _a.VAR_FG_SIZE, VAR_LEFT = _a.VAR_LEFT, VAR_TOP = _a.VAR_TOP, VAR_FG_SCALE = _a.VAR_FG_SCALE;
1671
- this.adapter.updateCssVariable(VAR_FG_SIZE, this.initialSize + "px");
1672
- this.adapter.updateCssVariable(VAR_FG_SCALE, this.fgScale);
1673
- if (this.adapter.isUnbounded()) {
1674
- this.unboundedCoords = {
1675
- left: Math.round((this.frame.width / 2) - (this.initialSize / 2)),
1676
- top: Math.round((this.frame.height / 2) - (this.initialSize / 2)),
1677
- };
1678
- this.adapter.updateCssVariable(VAR_LEFT, this.unboundedCoords.left + "px");
1679
- this.adapter.updateCssVariable(VAR_TOP, this.unboundedCoords.top + "px");
1680
- }
1681
- };
1682
- return MDCRippleFoundation;
1683
- }(MDCFoundation));
1684
-
1685
- /**
1686
- * @license
1687
- * Copyright 2016 Google Inc.
1688
- *
1689
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1690
- * of this software and associated documentation files (the "Software"), to deal
1691
- * in the Software without restriction, including without limitation the rights
1692
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1693
- * copies of the Software, and to permit persons to whom the Software is
1694
- * furnished to do so, subject to the following conditions:
1695
- *
1696
- * The above copyright notice and this permission notice shall be included in
1697
- * all copies or substantial portions of the Software.
1698
- *
1699
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1700
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1701
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1702
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1703
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1704
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1705
- * THE SOFTWARE.
1706
- */
1707
- var MDCRipple = /** @class */ (function (_super) {
1708
- __extends(MDCRipple, _super);
1709
- function MDCRipple() {
1710
- var _this = _super !== null && _super.apply(this, arguments) || this;
1711
- _this.disabled = false;
1712
- return _this;
1713
- }
1714
- MDCRipple.attachTo = function (root, opts) {
1715
- if (opts === void 0) { opts = {
1716
- isUnbounded: undefined
1717
- }; }
1718
- var ripple = new MDCRipple(root);
1719
- // Only override unbounded behavior if option is explicitly specified
1720
- if (opts.isUnbounded !== undefined) {
1721
- ripple.unbounded = opts.isUnbounded;
1722
- }
1723
- return ripple;
1724
- };
1725
- MDCRipple.createAdapter = function (instance) {
1726
- return {
1727
- addClass: function (className) { return instance.root.classList.add(className); },
1728
- browserSupportsCssVars: function () { return supportsCssVariables(window); },
1729
- computeBoundingRect: function () { return instance.root.getBoundingClientRect(); },
1730
- containsEventTarget: function (target) { return instance.root.contains(target); },
1731
- deregisterDocumentInteractionHandler: function (evtType, handler) {
1732
- return document.documentElement.removeEventListener(evtType, handler, applyPassive());
1733
- },
1734
- deregisterInteractionHandler: function (evtType, handler) {
1735
- return instance.root
1736
- .removeEventListener(evtType, handler, applyPassive());
1737
- },
1738
- deregisterResizeHandler: function (handler) {
1739
- return window.removeEventListener('resize', handler);
1740
- },
1741
- getWindowPageOffset: function () {
1742
- return ({ x: window.pageXOffset, y: window.pageYOffset });
1743
- },
1744
- isSurfaceActive: function () { return matches(instance.root, ':active'); },
1745
- isSurfaceDisabled: function () { return Boolean(instance.disabled); },
1746
- isUnbounded: function () { return Boolean(instance.unbounded); },
1747
- registerDocumentInteractionHandler: function (evtType, handler) {
1748
- return document.documentElement.addEventListener(evtType, handler, applyPassive());
1749
- },
1750
- registerInteractionHandler: function (evtType, handler) {
1751
- return instance.root
1752
- .addEventListener(evtType, handler, applyPassive());
1753
- },
1754
- registerResizeHandler: function (handler) {
1755
- return window.addEventListener('resize', handler);
1756
- },
1757
- removeClass: function (className) { return instance.root.classList.remove(className); },
1758
- updateCssVariable: function (varName, value) {
1759
- return instance.root.style.setProperty(varName, value);
1760
- },
1761
- };
1762
- };
1763
- Object.defineProperty(MDCRipple.prototype, "unbounded", {
1764
- get: function () {
1765
- return Boolean(this.isUnbounded);
1766
- },
1767
- set: function (unbounded) {
1768
- this.isUnbounded = Boolean(unbounded);
1769
- this.setUnbounded();
1770
- },
1771
- enumerable: false,
1772
- configurable: true
1773
- });
1774
- MDCRipple.prototype.activate = function () {
1775
- this.foundation.activate();
1776
- };
1777
- MDCRipple.prototype.deactivate = function () {
1778
- this.foundation.deactivate();
1779
- };
1780
- MDCRipple.prototype.layout = function () {
1781
- this.foundation.layout();
1782
- };
1783
- MDCRipple.prototype.getDefaultFoundation = function () {
1784
- return new MDCRippleFoundation(MDCRipple.createAdapter(this));
1785
- };
1786
- MDCRipple.prototype.initialSyncWithDOM = function () {
1787
- var root = this.root;
1788
- this.isUnbounded = 'mdcRippleIsUnbounded' in root.dataset;
1789
- };
1790
- /**
1791
- * Closure Compiler throws an access control error when directly accessing a
1792
- * protected or private property inside a getter/setter, like unbounded above.
1793
- * By accessing the protected property inside a method, we solve that problem.
1794
- * That's why this function exists.
1795
- */
1796
- MDCRipple.prototype.setUnbounded = function () {
1797
- this.foundation.setUnbounded(Boolean(this.isUnbounded));
1798
- };
1799
- return MDCRipple;
1800
- }(MDCComponent));
1801
-
1802
- export { MDCFoundation as M, __extends as _, __assign as a, __read as b, __spreadArray as c, closest as d, MDCComponent as e, __values as f, getCorrectPropertyName as g, MDCRipple as h, MDCRippleFoundation as i, MDCFloatingLabel as j, MDCLineRipple as k, MDCNotchedOutline as l, matches as m, getCorrectEventName as n, applyPassive as o };