@ptcwebops/ptcw-design 2.0.4 → 2.0.6

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 (220) hide show
  1. package/dist/cjs/{icon-asset_5.cjs.entry.js → fl-tab-content_11.cjs.entry.js} +485 -41
  2. package/dist/cjs/list-item.cjs.entry.js +33 -0
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/max-width-container.cjs.entry.js +48 -0
  5. package/dist/cjs/{ptc-jumbotron.cjs.entry.js → ptc-breadcrumb_2.cjs.entry.js} +24 -0
  6. package/dist/cjs/ptc-minimized-nav.cjs.entry.js +1 -1
  7. package/dist/cjs/ptc-slit-card.cjs.entry.js +1 -1
  8. package/dist/cjs/ptc-spacer.cjs.entry.js +38 -0
  9. package/dist/cjs/ptcw-design.cjs.js +1 -1
  10. package/dist/collection/collection-manifest.json +4 -0
  11. package/dist/collection/components/ptc-featured-list/fl-tab-content/fl-tab-content.css +11 -0
  12. package/dist/collection/components/ptc-featured-list/fl-tab-content/fl-tab-content.js +61 -0
  13. package/dist/collection/components/ptc-featured-list/fl-tab-header/fl-tab-header.css +16 -0
  14. package/dist/collection/components/ptc-featured-list/fl-tab-header/fl-tab-header.js +105 -0
  15. package/dist/collection/components/ptc-featured-list/fl-tab-image/fl-tab-image.css +27 -0
  16. package/dist/collection/components/ptc-featured-list/fl-tab-image/fl-tab-image.js +61 -0
  17. package/dist/collection/components/ptc-featured-list/ptc-featured-list.css +188 -0
  18. package/dist/collection/components/ptc-featured-list/ptc-featured-list.js +123 -0
  19. package/dist/collection/components/ptc-minimized-nav/ptc-minimized-nav.js +1 -1
  20. package/dist/collection/components/ptc-slit-card/ptc-slit-card.js +1 -1
  21. package/dist/custom-elements/index.d.ts +24 -0
  22. package/dist/custom-elements/index.js +166 -4
  23. package/dist/esm/bundle-example.entry.js +1 -1
  24. package/dist/esm/bundle-jumbotron-example.entry.js +1 -1
  25. package/dist/esm/dropdown-item.entry.js +1 -1
  26. package/dist/esm/dynamic-box-bundle.entry.js +1 -1
  27. package/dist/esm/{icon-asset_5.entry.js → fl-tab-content_11.entry.js} +479 -41
  28. package/dist/esm/{index-8e63c32d.js → index-4afc9d28.js} +1 -1
  29. package/dist/esm/innovator-toggle-container.entry.js +1 -1
  30. package/dist/esm/list-item.entry.js +29 -0
  31. package/dist/esm/loader.js +3 -3
  32. package/dist/esm/lottie-player.entry.js +1 -1
  33. package/dist/esm/max-width-container.entry.js +44 -0
  34. package/dist/esm/my-component.entry.js +1 -1
  35. package/dist/esm/ptc-accordion-item.entry.js +1 -1
  36. package/dist/esm/ptc-accordion.entry.js +1 -1
  37. package/dist/esm/ptc-announcement.entry.js +1 -1
  38. package/dist/esm/ptc-back-to-top.entry.js +1 -1
  39. package/dist/esm/ptc-bio-card.entry.js +1 -1
  40. package/dist/esm/{ptc-jumbotron.entry.js → ptc-breadcrumb_2.entry.js} +25 -2
  41. package/dist/esm/ptc-card-bottom_3.entry.js +1 -1
  42. package/dist/esm/ptc-card-content.entry.js +1 -1
  43. package/dist/esm/ptc-card.entry.js +1 -1
  44. package/dist/esm/ptc-case-studies-slider.entry.js +1 -1
  45. package/dist/esm/ptc-checkbox.entry.js +1 -1
  46. package/dist/esm/ptc-collapse-list.entry.js +1 -1
  47. package/dist/esm/ptc-container.entry.js +1 -1
  48. package/dist/esm/ptc-date.entry.js +1 -1
  49. package/dist/esm/ptc-dropdown.entry.js +1 -1
  50. package/dist/esm/ptc-dynamic-card.entry.js +1 -1
  51. package/dist/esm/ptc-ellipsis-dropdown.entry.js +1 -1
  52. package/dist/esm/ptc-filter-tag.entry.js +1 -1
  53. package/dist/esm/ptc-hero-footer-cta.entry.js +1 -1
  54. package/dist/esm/ptc-hero.entry.js +1 -1
  55. package/dist/esm/ptc-icon-component.entry.js +1 -1
  56. package/dist/esm/ptc-icon-list.entry.js +1 -1
  57. package/dist/esm/ptc-icon-minimize.entry.js +1 -1
  58. package/dist/esm/ptc-image-download-strip.entry.js +1 -1
  59. package/dist/esm/ptc-link.entry.js +1 -1
  60. package/dist/esm/ptc-list.entry.js +1 -1
  61. package/dist/esm/ptc-lottie.entry.js +1 -1
  62. package/dist/esm/ptc-media-card.entry.js +1 -1
  63. package/dist/esm/ptc-minimized-nav.entry.js +2 -2
  64. package/dist/esm/ptc-mobile-select.entry.js +1 -1
  65. package/dist/esm/ptc-modal.entry.js +1 -1
  66. package/dist/esm/ptc-nav-card.entry.js +1 -1
  67. package/dist/esm/ptc-nav-link.entry.js +1 -1
  68. package/dist/esm/ptc-nav-pills.entry.js +1 -1
  69. package/dist/esm/ptc-nav-slider.entry.js +1 -1
  70. package/dist/esm/ptc-nav-submenu.entry.js +1 -1
  71. package/dist/esm/ptc-news.entry.js +1 -1
  72. package/dist/esm/ptc-overlay.entry.js +1 -1
  73. package/dist/esm/ptc-pagenation.entry.js +1 -1
  74. package/dist/esm/ptc-picture.entry.js +1 -1
  75. package/dist/esm/ptc-previous-url.entry.js +1 -1
  76. package/dist/esm/ptc-pricing-block.entry.js +1 -1
  77. package/dist/esm/ptc-pricing-tabs.entry.js +1 -1
  78. package/dist/esm/ptc-product-card.entry.js +1 -1
  79. package/dist/esm/ptc-product-category.entry.js +1 -1
  80. package/dist/esm/ptc-product-dropdown.entry.js +1 -1
  81. package/dist/esm/ptc-product-highlight-card.entry.js +1 -1
  82. package/dist/esm/ptc-product-list.entry.js +1 -1
  83. package/dist/esm/ptc-product-sidebar.entry.js +1 -1
  84. package/dist/esm/ptc-progress-bar.entry.js +1 -1
  85. package/dist/esm/ptc-quote.entry.js +1 -1
  86. package/dist/esm/ptc-readmore-char.entry.js +1 -1
  87. package/dist/esm/ptc-readmore.entry.js +1 -1
  88. package/dist/esm/ptc-responsive-wrapper.entry.js +1 -1
  89. package/dist/esm/ptc-search-field.entry.js +1 -1
  90. package/dist/esm/ptc-shopping-cart.entry.js +1 -1
  91. package/dist/esm/ptc-slit-card.entry.js +2 -2
  92. package/dist/esm/ptc-social-share.entry.js +1 -1
  93. package/dist/esm/ptc-spacer.entry.js +34 -0
  94. package/dist/esm/ptc-span.entry.js +1 -1
  95. package/dist/esm/ptc-sticky-icons.entry.js +1 -1
  96. package/dist/esm/ptc-sticky-section.entry.js +1 -1
  97. package/dist/esm/ptc-sticky-title.entry.js +1 -1
  98. package/dist/esm/ptc-subnav-card.entry.js +1 -1
  99. package/dist/esm/ptc-subnav.entry.js +1 -1
  100. package/dist/esm/ptc-svg-btn.entry.js +1 -1
  101. package/dist/esm/ptc-tab-list.entry.js +1 -1
  102. package/dist/esm/ptc-tab.entry.js +1 -1
  103. package/dist/esm/ptc-tabs.entry.js +1 -1
  104. package/dist/esm/ptc-text-copy-with-background.entry.js +1 -1
  105. package/dist/esm/ptc-two-column-media.entry.js +1 -1
  106. package/dist/esm/ptcw-design.js +3 -3
  107. package/dist/esm/sequential-bundle-example.entry.js +1 -1
  108. package/dist/esm/sequential-bundle.entry.js +1 -1
  109. package/dist/esm/tab-content.entry.js +1 -1
  110. package/dist/esm/tab-header.entry.js +1 -1
  111. package/dist/ptcw-design/{p-49b5abe9.entry.js → p-009f76ac.entry.js} +1 -1
  112. package/dist/ptcw-design/{p-4983e571.entry.js → p-00b2c937.entry.js} +1 -1
  113. package/dist/ptcw-design/{p-847d85ba.entry.js → p-033330d3.entry.js} +1 -1
  114. package/dist/ptcw-design/{p-73ea7065.entry.js → p-04549d19.entry.js} +1 -1
  115. package/dist/ptcw-design/{p-54ca3d2a.entry.js → p-046d0d0c.entry.js} +1 -1
  116. package/dist/ptcw-design/{p-8030db10.entry.js → p-07059441.entry.js} +1 -1
  117. package/dist/ptcw-design/p-07b6676a.entry.js +1 -0
  118. package/dist/ptcw-design/{p-d49d8875.entry.js → p-08f17ab6.entry.js} +1 -1
  119. package/dist/ptcw-design/{p-462567d1.entry.js → p-08f40716.entry.js} +1 -1
  120. package/dist/ptcw-design/{p-8c6b069b.entry.js → p-09a6b0a7.entry.js} +1 -1
  121. package/dist/ptcw-design/{p-366528df.entry.js → p-10555016.entry.js} +1 -1
  122. package/dist/ptcw-design/{p-3cf1f951.entry.js → p-1905e99d.entry.js} +1 -1
  123. package/dist/ptcw-design/{p-4702f4e4.entry.js → p-1a346da4.entry.js} +1 -1
  124. package/dist/ptcw-design/{p-cd55eba0.entry.js → p-1aaaefc2.entry.js} +1 -1
  125. package/dist/ptcw-design/{p-1cf0240f.entry.js → p-20500bc0.entry.js} +1 -1
  126. package/dist/ptcw-design/{p-4f465dd3.entry.js → p-2a959ce3.entry.js} +1 -1
  127. package/dist/ptcw-design/{p-b922e3a5.entry.js → p-2ac4eb02.entry.js} +1 -1
  128. package/dist/ptcw-design/p-2d666a05.entry.js +1 -0
  129. package/dist/ptcw-design/{p-ba3372d4.entry.js → p-35b3d9a8.entry.js} +1 -1
  130. package/dist/ptcw-design/{p-cdff68d4.entry.js → p-372a6bb1.entry.js} +1 -1
  131. package/dist/ptcw-design/{p-3bb54c51.entry.js → p-42424ba0.entry.js} +1 -1
  132. package/dist/ptcw-design/{p-2d69f408.entry.js → p-47ee06af.entry.js} +1 -1
  133. package/dist/ptcw-design/{p-250b3ea1.entry.js → p-4947eb0a.entry.js} +1 -1
  134. package/dist/ptcw-design/{p-5e0dd0fe.entry.js → p-4be56588.entry.js} +1 -1
  135. package/dist/ptcw-design/{p-46afd828.entry.js → p-4f93dac7.entry.js} +1 -1
  136. package/dist/ptcw-design/p-5854b9b4.entry.js +1 -0
  137. package/dist/ptcw-design/{p-a7961cf6.entry.js → p-5c9d254c.entry.js} +1 -1
  138. package/dist/ptcw-design/{p-469482ba.entry.js → p-64691ccb.entry.js} +1 -1
  139. package/dist/ptcw-design/{p-2b079e72.entry.js → p-66a25008.entry.js} +1 -1
  140. package/dist/ptcw-design/{p-77d49d3d.entry.js → p-68543211.entry.js} +1 -1
  141. package/dist/ptcw-design/{p-d7d6eff1.entry.js → p-6a0b0d0e.entry.js} +1 -1
  142. package/dist/ptcw-design/{p-8a1c2577.entry.js → p-6acd380a.entry.js} +1 -1
  143. package/dist/ptcw-design/{p-938eb938.entry.js → p-7097ec55.entry.js} +1 -1
  144. package/dist/ptcw-design/{p-3f6b95bb.entry.js → p-743dae02.entry.js} +1 -1
  145. package/dist/ptcw-design/p-7650e042.entry.js +1 -0
  146. package/dist/ptcw-design/{p-e66e3791.entry.js → p-7698cc75.entry.js} +1 -1
  147. package/dist/ptcw-design/{p-fa58bf5f.entry.js → p-77d3b816.entry.js} +1 -1
  148. package/dist/ptcw-design/p-799bbd3a.entry.js +1 -0
  149. package/dist/ptcw-design/{p-399345bb.entry.js → p-7e978dd7.entry.js} +1 -1
  150. package/dist/ptcw-design/{p-bb3ce5f2.entry.js → p-8116452c.entry.js} +1 -1
  151. package/dist/ptcw-design/{p-af3a4142.entry.js → p-87ccd549.entry.js} +1 -1
  152. package/dist/ptcw-design/{p-a6a343a7.entry.js → p-8c212875.entry.js} +1 -1
  153. package/dist/ptcw-design/{p-9a5ee2d5.entry.js → p-90143d7c.entry.js} +1 -1
  154. package/dist/ptcw-design/{p-dedaf951.entry.js → p-908b08d5.entry.js} +1 -1
  155. package/dist/ptcw-design/{p-2181c8c7.entry.js → p-9805a542.entry.js} +1 -1
  156. package/dist/ptcw-design/{p-c3b7c168.entry.js → p-9bbfeec6.entry.js} +1 -1
  157. package/dist/ptcw-design/{p-63c06667.js → p-9dd25c18.js} +1 -1
  158. package/dist/ptcw-design/{p-4e80cc93.entry.js → p-a1f30323.entry.js} +1 -1
  159. package/dist/ptcw-design/{p-fe0928c0.entry.js → p-a49ba579.entry.js} +1 -1
  160. package/dist/ptcw-design/{p-e865c958.entry.js → p-a4c49997.entry.js} +1 -1
  161. package/dist/ptcw-design/{p-57fa9836.entry.js → p-a532ea92.entry.js} +1 -1
  162. package/dist/ptcw-design/{p-b9bbe5d9.entry.js → p-a6014d9a.entry.js} +1 -1
  163. package/dist/ptcw-design/p-a6ebedfd.entry.js +1 -0
  164. package/dist/ptcw-design/{p-34f2f815.entry.js → p-a7eb1503.entry.js} +1 -1
  165. package/dist/ptcw-design/{p-d7232d12.entry.js → p-a924d029.entry.js} +1 -1
  166. package/dist/ptcw-design/p-ab2a2d1a.entry.js +1 -0
  167. package/dist/ptcw-design/{p-40adeccf.entry.js → p-ad924207.entry.js} +1 -1
  168. package/dist/ptcw-design/{p-51bfb258.entry.js → p-b2afe3a3.entry.js} +1 -1
  169. package/dist/ptcw-design/{p-26880c78.entry.js → p-b64cd689.entry.js} +1 -1
  170. package/dist/ptcw-design/{p-55d298f5.entry.js → p-b73ea53a.entry.js} +1 -1
  171. package/dist/ptcw-design/{p-b99f5093.entry.js → p-bdfd42d2.entry.js} +1 -1
  172. package/dist/ptcw-design/{p-4783fc15.entry.js → p-c05218ed.entry.js} +1 -1
  173. package/dist/ptcw-design/{p-cd6b8c27.entry.js → p-c1d75020.entry.js} +1 -1
  174. package/dist/ptcw-design/{p-12780f09.entry.js → p-c326164f.entry.js} +1 -1
  175. package/dist/ptcw-design/{p-4977dc6d.entry.js → p-c43f4e1a.entry.js} +1 -1
  176. package/dist/ptcw-design/{p-574680c3.entry.js → p-c83efab5.entry.js} +1 -1
  177. package/dist/ptcw-design/p-c852499f.entry.js +1 -0
  178. package/dist/ptcw-design/{p-a24ecd75.entry.js → p-c9342bd2.entry.js} +1 -1
  179. package/dist/ptcw-design/{p-69dd7c50.entry.js → p-c9ded71b.entry.js} +1 -1
  180. package/dist/ptcw-design/{p-dd6501a8.entry.js → p-cff0b2b0.entry.js} +1 -1
  181. package/dist/ptcw-design/{p-5e08dc82.entry.js → p-d7e11aad.entry.js} +1 -1
  182. package/dist/ptcw-design/{p-97587e57.entry.js → p-d94d1fa5.entry.js} +1 -1
  183. package/dist/ptcw-design/p-da15fae5.entry.js +1 -0
  184. package/dist/ptcw-design/{p-0f9b2495.entry.js → p-dc64e2d4.entry.js} +1 -1
  185. package/dist/ptcw-design/{p-fb4779ce.entry.js → p-ddf7819e.entry.js} +1 -1
  186. package/dist/ptcw-design/{p-08658fa3.entry.js → p-dea73da3.entry.js} +1 -1
  187. package/dist/ptcw-design/{p-59058faa.entry.js → p-deed8ef6.entry.js} +1 -1
  188. package/dist/ptcw-design/{p-c7bd4d99.entry.js → p-e282af3d.entry.js} +1 -1
  189. package/dist/ptcw-design/{p-c5fadad0.entry.js → p-e2be8313.entry.js} +1 -1
  190. package/dist/ptcw-design/{p-af3d5be7.entry.js → p-e329399d.entry.js} +1 -1
  191. package/dist/ptcw-design/{p-e6fa27fb.entry.js → p-e8127819.entry.js} +1 -1
  192. package/dist/ptcw-design/p-edc34ad7.entry.js +1 -0
  193. package/dist/ptcw-design/{p-eed3687b.entry.js → p-effa1f41.entry.js} +1 -1
  194. package/dist/ptcw-design/{p-a944a3be.entry.js → p-f4479b50.entry.js} +1 -1
  195. package/dist/ptcw-design/{p-49dc9b68.entry.js → p-f927e1f9.entry.js} +1 -1
  196. package/dist/ptcw-design/{p-2318d652.entry.js → p-fbf6f66c.entry.js} +1 -1
  197. package/dist/ptcw-design/ptcw-design.esm.js +1 -1
  198. package/dist/types/components/ptc-featured-list/fl-tab-content/fl-tab-content.d.ts +5 -0
  199. package/dist/types/components/ptc-featured-list/fl-tab-header/fl-tab-header.d.ts +10 -0
  200. package/dist/types/components/ptc-featured-list/fl-tab-image/fl-tab-image.d.ts +5 -0
  201. package/dist/types/components/ptc-featured-list/ptc-featured-list.d.ts +11 -0
  202. package/dist/types/components.d.ts +71 -0
  203. package/package.json +1 -1
  204. package/readme.md +1 -1
  205. package/dist/cjs/max-width-container_3.cjs.entry.js +0 -237
  206. package/dist/cjs/ptc-para_2.cjs.entry.js +0 -94
  207. package/dist/cjs/ptc-tooltip.cjs.entry.js +0 -106
  208. package/dist/esm/max-width-container_3.entry.js +0 -231
  209. package/dist/esm/ptc-para_2.entry.js +0 -89
  210. package/dist/esm/ptc-tooltip.entry.js +0 -102
  211. package/dist/ptcw-design/p-1b7841bd.entry.js +0 -1
  212. package/dist/ptcw-design/p-362c38ff.entry.js +0 -1
  213. package/dist/ptcw-design/p-718d6ae8.entry.js +0 -1
  214. package/dist/ptcw-design/p-ba213813.entry.js +0 -1
  215. package/dist/ptcw-design/p-baabdb8a.entry.js +0 -1
  216. package/dist/ptcw-design/p-e2b29e4b.entry.js +0 -1
  217. package/dist/ptcw-design/p-e93dcf82.entry.js +0 -1
  218. package/dist/ptcw-design/p-f041f6e7.entry.js +0 -1
  219. package/dist/ptcw-design/p-f74283c6.entry.js +0 -1
  220. package/dist/ptcw-design/p-f8fa5a02.entry.js +0 -1
@@ -1,237 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-88135a6b.js');
6
- const interfaces = require('./interfaces-574e6df7.js');
7
-
8
- const maxWidthContainerCss = ":host{display:block}:host(.left){margin:auto auto auto 0}:host(.right){margin:auto 0 auto auto}:host(.center){margin:0 auto}";
9
-
10
- const MaxWidthContainer = class {
11
- constructor(hostRef) {
12
- index.registerInstance(this, hostRef);
13
- this.maxWidth = undefined;
14
- this.breakpoint = 768;
15
- this.contentAlign = 'center';
16
- this.styles = undefined;
17
- }
18
- componentDidLoad() {
19
- this.handleResize();
20
- window.addEventListener('resize', this.handleResize.bind(this));
21
- }
22
- disconnectedCallback() {
23
- window.removeEventListener('resize', this.handleResize);
24
- }
25
- render() {
26
- const classMap = this.getCssClassMap();
27
- return (index.h(index.Host, { class: classMap }, this.styles && index.h("style", null, this.styles), index.h("slot", null)));
28
- }
29
- getCssClassMap() {
30
- return {
31
- [this.contentAlign]: true,
32
- };
33
- }
34
- handleResize() {
35
- // const selectedContainer = this.el.querySelector('.max-width-container');
36
- if (this.el) {
37
- if (window.innerWidth >= this.breakpoint) {
38
- this.el.style.maxWidth = `${this.maxWidth}px`;
39
- }
40
- else {
41
- this.el.style.maxWidth = 'initial';
42
- }
43
- }
44
- }
45
- get el() { return index.getElement(this); }
46
- };
47
- MaxWidthContainer.style = maxWidthContainerCss;
48
-
49
- const ptcBackgroundVideoCss = ":host{display:block;position:relative}:host video{position:absolute;top:0px;left:0px;right:0;width:100%;height:100%;overflow:hidden;pointer-events:none;z-index:-100;object-fit:cover}:host .video-overlay{z-index:1;display:block;position:absolute;width:100%;height:100%;top:0;left:0;opacity:0.8;background-image:linear-gradient(270deg, rgba(30, 38, 38, 0) 26%, #1e2626)}:host(.legacy){display:block;position:absolute;top:0px;left:0px;right:0;width:100%;height:100%;overflow:hidden;pointer-events:none;z-index:-100}:host(.legacy) video{object-fit:cover;position:absolute;top:0px;left:0px;right:0;width:100%;height:100%;overflow:hidden}:host .iframe-wrapper{position:absolute;top:0px;left:0px;right:0;width:100%;height:100%;overflow:hidden;pointer-events:none;z-index:-100}:host .iframe-wrapper .background-video-embed{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:100%;height:100%}:host .iframe-wrapper .player .vp-video-wrapper .vp-telecine-cover video{object-fit:cover}:host .play-button{position:absolute;top:1.5rem;right:1.5rem;width:34px;height:34px;z-index:99}@media (min-width: 768px){:host .play-button{top:unset;bottom:3.75rem;right:2rem}}";
50
-
51
- const PtcBackgroundVideo = class {
52
- constructor(hostRef) {
53
- index.registerInstance(this, hostRef);
54
- this.videoSrc = undefined;
55
- this.posterSrc = undefined;
56
- this.overlay = true;
57
- this.playButtonTitle = undefined;
58
- this.pauseButtonTitle = undefined;
59
- this.paused = undefined;
60
- this.type = 'default';
61
- this.isIframe = false;
62
- }
63
- // componentDidLoad() {
64
- // if(this.isIframe){
65
- // const iframe:HTMLIFrameElement = this.el.shadowRoot.querySelector('iframe');
66
- // const iframeDoc = iframe.contentDocument
67
- // const iframeVideo = iframeDoc.querySelector('video');
68
- // console.log("iframe ele: " + iframeDoc.querySelectorAll('video'));
69
- // iframeVideo.style.objectFit = 'cover';
70
- // }
71
- // }
72
- // @Method()
73
- // async toggleVideo() {
74
- // // show a prompt
75
- // this.paused = !this.paused;
76
- // let video = this.el.shadowRoot.querySelector('video') as HTMLVideoElement;
77
- // if (video) {
78
- // if (this.paused) {
79
- // video.pause();
80
- // } else {
81
- // video.play().catch(z => console.error(z));
82
- // }
83
- // }
84
- // console.log('Hello, I am a publish method from ptc-background-video!');
85
- // }
86
- componentWillLoad() {
87
- this.paused = false;
88
- }
89
- render() {
90
- const videoContent = this.isIframe ? (index.h("div", { class: "iframe-wrapper" }, index.h("iframe", { id: "jumbotron-iframe", src: this.videoSrc, frameborder: 0, allow: "autoplay", allowFullScreen: true, class: "background-video-embed" }))) : (index.h("video", { src: this.videoSrc, poster: this.posterSrc, autoplay: true, loop: true, muted: true, playsinline: true }));
91
- return (index.h(index.Host, { class: this.type }, videoContent, !!this.videoSrc && this.playButtonTitle && (index.h("div", { class: "play-button" }, this.paused && (index.h("ptc-tooltip", { class: "play-btn", mode: "wrapper", description: this.playButtonTitle, position: "bottom-right", styles: ".wrapper-content.sc-ptc-tooltip .tooltip.sc-ptc-tooltip{min-width:unset!important;}" }, index.h("ptc-button", { type: "button", color: "icon-toggle", onClick: e => this.toggleVideoPlay(e), styles: "button.icon-toggle { padding :0px 8px; }" }, index.h("icon-asset", { name: "play", size: "small", type: "ptc", color: "black" })))), !this.paused && !!this.pauseButtonTitle && (index.h("ptc-tooltip", { class: "pause-btn", mode: "wrapper", description: this.pauseButtonTitle, position: "bottom-right", styles: ".wrapper-content.sc-ptc-tooltip .tooltip.sc-ptc-tooltip{min-width:unset!important;}" }, index.h("ptc-button", { type: "button", color: "icon-toggle", onClick: e => this.toggleVideoPlay(e) }, index.h("icon-asset", { name: "pause", size: "small", type: "ptc", color: "black" })))))), this.overlay ? index.h("div", { class: "video-overlay" }) : '', this.type == 'default' ? index.h("slot", null) : ''));
92
- }
93
- toggleVideoPlay(e) {
94
- e.preventDefault();
95
- this.paused = !this.paused;
96
- let video = this.el.shadowRoot.querySelector('video');
97
- if (video) {
98
- if (this.paused) {
99
- video.pause();
100
- }
101
- else {
102
- video.play().catch(z => console.error(z));
103
- }
104
- }
105
- }
106
- get el() { return index.getElement(this); }
107
- };
108
- PtcBackgroundVideo.style = ptcBackgroundVideoCss;
109
-
110
- const ptcImgCss = ".smart-bg{width:100%;height:100%;background-size:cover;background-repeat:no-repeat;background-position:50% 50%}.smart-img{position:absolute;display:block;width:100%;height:100%;top:0;left:0;background-size:cover;background-repeat:no-repeat;background-position:50% 50%}.radius-standard{border-radius:var(--ptc-border-radius-standard)}.radius-standard-top{border-top-left-radius:var(--ptc-border-radius-standard);border-top-right-radius:var(--ptc-border-radius-standard)}.radius-large{border-radius:var(--ptc-border-radius-large)}.radius-large-top{border-top-left-radius:var(--ptc-border-radius-large);border-top-right-radius:var(--ptc-border-radius-large)}.lazy-bg{background-image:none !important;background-color:var(--color-gray-03)}@media only screen and (min-width: 768px){.hidden-xs{display:none !important}}@media (min-width: 768px) and (max-width: 991px){.hidden-sm{display:none !important}}@media (min-width: 992px) and (max-width: 1199px){.hidden-md{display:none !important}}@media only screen and (min-width: 768px){.hidden-lg{display:none !important}}";
111
-
112
- const PtcImg = class {
113
- constructor(hostRef) {
114
- index.registerInstance(this, hostRef);
115
- this.sizeXs = '510x340';
116
- this.sizeSm = '1240x496';
117
- this.sizeMd = '1366x500';
118
- this.sizeLg = '1920x1080';
119
- this.imgUrl = undefined;
120
- this.imageType = 'smart-bg';
121
- this.borderRadius = '';
122
- this.loadMode = 'lazy-bg';
123
- this.styles = undefined;
124
- }
125
- /**
126
- * Image Z Index
127
- */
128
- // @Prop() imageZIndex: 'z-index-auto' | 'z-index-n-2' | 'z-index-n-1' | 'z-index-p-1' | 'z-index-p-2' = 'z-index-auto';
129
- WindowResize() {
130
- this.setResponsiveBg();
131
- }
132
- render() {
133
- const classMap = this.getCssClassMap();
134
- return (index.h(index.Host, null, this.styles && index.h("style", null, this.styles), index.h("div", { class: classMap, "data-xs": `${this.imgUrl}:${this.sizeXs}`, "data-sm": `${this.imgUrl}:${this.sizeSm}`, "data-md": `${this.imgUrl}:${this.sizeMd}`, "data-lg": `${this.imgUrl}:${this.sizeLg}` }, this.imageType == 'smart-bg' ? index.h("slot", null) : null)));
135
- }
136
- componentDidLoad() {
137
- this.addIntersectionObserver();
138
- this.setResponsiveBg();
139
- }
140
- componentWillUpdate() {
141
- this.addIntersectionObserver();
142
- this.setResponsiveBg();
143
- }
144
- //responsive image
145
- setResponsiveBg() {
146
- // Define local variables
147
- let backgrounds = (this.el || document).querySelectorAll(interfaces.ResponsiveBgVariables.selector), el, elData, currentBreakpoint = this.getCurrentBreakPoints();
148
- // Loop through all target elements
149
- for (var i = 0, len = backgrounds.length; i < len; i++) {
150
- // Set current variables
151
- el = backgrounds[i];
152
- elData = el.getAttribute('data-' + currentBreakpoint);
153
- // If the data attribute exists, set the background
154
- if (elData !== null) {
155
- el.style.backgroundImage = "url('" + elData + "')";
156
- }
157
- else {
158
- if (typeof console == 'object') {
159
- console.warn('Data attribute: data-' + currentBreakpoint + ' not found on element:\n\n' + el.outerHTML + '\n\n\n');
160
- }
161
- }
162
- }
163
- }
164
- //lazy loading
165
- addIntersectionObserver() {
166
- if (!this.imgUrl) {
167
- console.log('no image!');
168
- return;
169
- }
170
- if ('IntersectionObserver' in window) {
171
- let lazyLoadBgs = (this.el || document).querySelectorAll('.lazy-bg');
172
- let bgObserver = new IntersectionObserver(entries => {
173
- entries.forEach(entry => {
174
- if (entry.isIntersecting) {
175
- const image = entry.target;
176
- image.classList.remove('lazy-bg');
177
- bgObserver.unobserve(image);
178
- }
179
- });
180
- });
181
- lazyLoadBgs.forEach(image => {
182
- bgObserver.observe(image);
183
- });
184
- }
185
- }
186
- getCssClassMap() {
187
- return {
188
- [this.imageType]: true,
189
- 'ptc-img': true,
190
- [this.borderRadius]: true,
191
- [this.loadMode]: true,
192
- // [this.imageZIndex] : true
193
- };
194
- }
195
- getCurrentBreakPoints() {
196
- // Define local variables
197
- let doc = window.document, temp = doc.createElement('div'), env;
198
- // Append test node
199
- doc.body.appendChild(temp);
200
- // Loop through breakpoints
201
- for (let i = interfaces.ResponsiveBgVariables.envs.length - 1; i >= 0; i--) {
202
- env = interfaces.ResponsiveBgVariables.envs[i];
203
- // Add classes
204
- temp.className = 'hidden-' + env;
205
- // Found breakpoint
206
- if (temp.offsetParent === null) {
207
- // Remove our test node
208
- doc.body.removeChild(temp);
209
- // Return current breakpoint
210
- return env;
211
- }
212
- }
213
- // Breakpoint not found, try fallback
214
- doc.body.removeChild(temp);
215
- return this.getFallbackBreakpoint();
216
- }
217
- getFallbackBreakpoint() {
218
- if (window.matchMedia('(min-width: 992px)').matches) {
219
- return 'lg';
220
- }
221
- else if (window.matchMedia('(min-width: 768px)').matches) {
222
- return 'md';
223
- }
224
- else if (window.matchMedia('(min-width: 576px)').matches) {
225
- return 'sm';
226
- }
227
- else {
228
- return 'xs';
229
- }
230
- }
231
- get el() { return index.getElement(this); }
232
- };
233
- PtcImg.style = ptcImgCss;
234
-
235
- exports.max_width_container = MaxWidthContainer;
236
- exports.ptc_background_video = PtcBackgroundVideo;
237
- exports.ptc_img = PtcImg;
@@ -1,94 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-88135a6b.js');
6
-
7
- const ptcParaCss = ":host{position:relative;z-index:1}:host(.white){color:var(--color-white)}:host(.z-1){z-index:1}:host(.z-2){z-index:2}:host(.z-3){z-index:3}:host(.z-99){z-index:99}:host(.z-999){z-index:999}:host(.z-auto){z-index:auto}p.default{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;}p.main{text-shadow:0 3px 6px var(--color-white);line-height:var(--ptc-line-height-dense);color:var(--color-gray-10)}p.primary-grey{color:var(--color-gray-10)}p.gray-darker{color:var(--color-gray-11)}p.white{color:var(--color-white)}p.xxx-small{font-size:var(--ptc-font-size-xxx-small)}p.xx-small{font-size:var(--ptc-font-size-xx-small)}p.x-small{font-size:var(--ptc-font-size-x-small)}p.small{font-size:var(--ptc-font-size-small)}p.medium{font-size:var(--ptc-font-size-medium)}p.large{font-size:var(--ptc-font-size-large)}p.x-large{font-size:var(--ptc-font-size-x-large)}p.xx-large{font-size:var(--ptc-font-size-xx-large)}p.xxx-large{font-size:var(--ptc-font-size-xxx-large)}p.xxxx-large{font-size:var(--ptc-font-size-xxxx-large)}p.htmlquote-para{font-size:var(--ptc-font-size-small)}@media only screen and (min-width: 992px){p.htmlquote-para{font-size:var(--ptc-font-size-large)}}p.w-3{font-weight:var(--ptc-font-weight-thin)}p.w-4{font-weight:var(--ptc-font-weight-regular)}p.w-5{font-weight:var(--ptc-font-weight-medium)}p.w-6{font-weight:var(--ptc-font-weight-semibold)}p.w-7{font-weight:var(--ptc-font-weight-bold)}p.w-8{font-weight:var(--ptc-font-weight-extrabold)}p.w-9{font-weight:var(--ptc-font-weight-black)}p.margin-flush{margin-top:0;margin-bottom:0}p.margin-top-1{margin-top:var(--ptc-element-spacing-01);margin-bottom:0}p.margin-top-2{margin-top:var(--ptc-element-spacing-02);margin-bottom:0}p.margin-top-3{margin-top:var(--ptc-element-spacing-03);margin-bottom:0}p.margin-top-4{margin-top:var(--ptc-element-spacing-04);margin-bottom:0}p.margin-top-5{margin-top:var(--ptc-element-spacing-05);margin-bottom:0}p.margin-top-6{margin-top:var(--ptc-element-spacing-06);margin-bottom:0}p.margin-bottom-1{margin-bottom:var(--ptc-element-spacing-01);margin-top:0}p.margin-bottom-2{margin-bottom:var(--ptc-element-spacing-02);margin-top:0}p.margin-bottom-3{margin-bottom:var(--ptc-element-spacing-03);margin-top:0}p.margin-bottom-4{margin-bottom:var(--ptc-element-spacing-04);margin-top:0}p.margin-bottom-5{margin-bottom:var(--ptc-element-spacing-05);margin-top:0}p.margin-bottom-6{margin-bottom:var(--ptc-element-spacing-06);margin-top:0}p.margin-1{margin-top:var(--ptc-element-spacing-01);margin-bottom:var(--ptc-element-spacing-01)}p.margin-2{margin-top:var(--ptc-element-spacing-02);margin-bottom:var(--ptc-element-spacing-02)}p.margin-3{margin-top:var(--ptc-element-spacing-03);margin-bottom:var(--ptc-element-spacing-03)}p.margin-4{margin-top:var(--ptc-element-spacing-04);margin-bottom:var(--ptc-element-spacing-04)}p.margin-5{margin-top:var(--ptc-element-spacing-05);margin-bottom:var(--ptc-element-spacing-05)}p.margin-6{margin-top:var(--ptc-element-spacing-06);margin-bottom:var(--ptc-element-spacing-06)}p.line-height-densest{line-height:var(--ptc-line-height-densest)}p.line-height-denser{line-height:var(--ptc-line-height-denser)}p.line-height-p{line-height:var(--ptc-line-height-p)}p.line-height-dense{line-height:var(--ptc-line-height-dense)}p.line-height-normal{line-height:var(--ptc-line-height-normal)}p.line-height-loose{line-height:var(--ptc-line-height-loose)}p.line-height-looser{line-height:var(--ptc-line-height-looser)}p.left{text-align:left}p.right{text-align:right}p.center{text-align:center}p.justify{text-align:justify}p.announcement{text-transform:uppercase;font-size:var(--ptc-font-size-small);color:var(--color-gray-07);line-height:var(--ptc-line-height-looser);letter-spacing:var(--ptc-letter-spacing-loose)}p.ellipsis-boxing{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;overflow-wrap:break-word}";
8
-
9
- const PtcPara = class {
10
- constructor(hostRef) {
11
- index.registerInstance(this, hostRef);
12
- this.fontSize = 'x-small';
13
- this.fontWeight = 'w-4';
14
- this.paraStyle = 'default';
15
- this.paraColor = 'primary-grey';
16
- this.paraLineH = 'line-height-normal';
17
- this.paraMargin = undefined;
18
- this.paraAlign = undefined;
19
- this.ellipsisLineCutoff = undefined;
20
- this.paraZIndex = undefined;
21
- this.styles = undefined;
22
- }
23
- render() {
24
- const classMap = this.getCssClassMap();
25
- const colorClass = this.addWhiteClass();
26
- const cutOff = this.getLineCuttoff();
27
- return (index.h(index.Host, { class: `${colorClass} ${this.paraZIndex}` }, this.styles && index.h("style", null, this.styles), index.h("p", { class: classMap, part: "part-para", style: cutOff }, index.h("slot", null))));
28
- }
29
- getCssClassMap() {
30
- return {
31
- [this.fontSize]: true,
32
- [this.fontWeight]: true,
33
- [this.paraStyle]: true,
34
- [this.paraMargin]: !!this.paraMargin ? true : false,
35
- [this.paraColor]: true,
36
- [this.paraLineH]: true,
37
- [this.paraAlign]: !!this.paraAlign ? true : false,
38
- ['ellipsis-boxing']: this.ellipsisLineCutoff && this.ellipsisLineCutoff > 0,
39
- };
40
- }
41
- //WEB-2392
42
- addWhiteClass() {
43
- if (this.paraColor == 'white') {
44
- return {
45
- [this.paraColor]: true,
46
- };
47
- }
48
- }
49
- getLineCuttoff() {
50
- let result;
51
- if (this.ellipsisLineCutoff && this.ellipsisLineCutoff > 0) {
52
- result = {
53
- ['-webkit-line-clamp']: `${this.ellipsisLineCutoff}`,
54
- };
55
- }
56
- return result;
57
- }
58
- get el() { return index.getElement(this); }
59
- };
60
- PtcPara.style = ptcParaCss;
61
-
62
- const ptcSpacerCss = ":host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:relative;display:block;width:12px;min-width:12px;height:12px}@media (min-width: 36em){:host{width:16px;min-width:16px;height:16px}}:host(.ptc-spacer-horizontal){display:inline-block;height:100% !important}:host(.ptc-spacer-horizontal.xx-small){width:4px;min-width:4px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.xx-small){width:4px;min-width:4px}}:host(.ptc-spacer-horizontal.x-small){width:4px;min-width:4px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.x-small){width:8px;min-width:8px}}:host(.ptc-spacer-horizontal.small){width:8px;min-width:8px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.small){width:12px;min-width:12px}}:host(.ptc-spacer-horizontal.medium){height:100%}:host(.ptc-spacer-horizontal.large){width:16px;min-width:16px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.large){width:20px;min-width:20px}}:host(.ptc-spacer-horizontal.x-large){width:20px;min-width:20px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.x-large){width:28px;min-width:28px}}:host(.ptc-spacer-horizontal.xx-large){width:28px;min-width:28px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.xx-large){width:36px;min-width:36px}}:host(.ptc-spacer-horizontal.xxx-large){width:36px;min-width:36px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.xxx-large){width:48px;min-width:48px}}:host(.ptc-spacer-horizontal.xxxx-large){width:48px;min-width:48px;height:100%}@media (min-width: 36em){:host(.ptc-spacer-horizontal.xxxx-large){width:72px;min-width:72px}}:host(.ptc-spacer-vertical.xx-small){width:100%;height:4px;min-height:4px}:host(.ptc-spacer-vertical.x-small){width:100%;height:4px;min-height:4px}@media (min-width: 36em){:host(.ptc-spacer-vertical.x-small){height:8px;min-height:8px}}:host(.ptc-spacer-vertical.small){width:100%;height:8px;min-height:8px}@media (min-width: 36em){:host(.ptc-spacer-vertical.small){height:12px;min-height:12px}}:host(.ptc-spacer-vertical.medium){width:100%}:host(.ptc-spacer-vertical.large){width:100%;height:16px;min-height:16px}@media (min-width: 36em){:host(.ptc-spacer-vertical.large){height:20px;min-height:20px}}:host(.ptc-spacer-vertical.x-large){width:100%;height:20px;min-height:20px}@media (min-width: 36em){:host(.ptc-spacer-vertical.x-large){height:28px;min-height:28px}}:host(.ptc-spacer-vertical.xx-large){width:100%;height:28px;min-height:28px}@media (min-width: 36em){:host(.ptc-spacer-vertical.xx-large){height:36px;min-height:36px}}:host(.ptc-spacer-vertical.xxx-large){width:100%;height:36px;min-height:36px}@media (min-width: 36em){:host(.ptc-spacer-vertical.xxx-large){height:48px;min-height:48px}}:host(.ptc-spacer-vertical.xxxx-large){width:100%;height:48px;min-height:48px}@media (min-width: 36em){:host(.ptc-spacer-vertical.xxxx-large){height:72px;min-height:72px}}:host(.ptc-spacer-vertical.space-144){width:100%;height:144px;min-height:144px}:host(.ptc-spacer-vertical.space-120){width:100%;height:120px;min-height:120px}:host(.ptc-spacer-vertical.space-128){width:100%;height:128px;min-height:128px}:host(.ptc-spacer-xx-small){display:none}@media (max-width: 22.5em){:host(.ptc-spacer-xx-small){display:block}}:host(.ptc-spacer-x-small){display:none}@media (max-width: 35.99em){:host(.ptc-spacer-x-small){display:block}}:host(.ptc-spacer-small){display:none}@media (min-width: 36em){:host(.ptc-spacer-small){display:block}}:host(.ptc-spacer-medium){display:none}@media (min-width: 48em){:host(.ptc-spacer-medium){display:block}}:host(.ptc-spacer-large){display:none}@media (min-width: 62em){:host(.ptc-spacer-large){display:block}}:host(.ptc-spacer-x-large){display:none}@media (min-width: 64.0625em){:host(.ptc-spacer-x-large){display:block}}:host(.ptc-spacer-xx-large){display:none}@media (min-width: 75em){:host(.ptc-spacer-xx-large){display:block}}:host(.ptc-spacer-xxx-large){display:none}@media (min-width: 90em){:host(.ptc-spacer-xxx-large){display:block}}";
63
-
64
- const PtcSpacer = class {
65
- constructor(hostRef) {
66
- index.registerInstance(this, hostRef);
67
- this.breakpoint = '';
68
- this.size = 'medium';
69
- this.direction = 'vertical';
70
- }
71
- render() {
72
- const classMap = this.getCssClassMap();
73
- return (index.h(index.Host, { class: classMap }));
74
- }
75
- getCssClassMap() {
76
- return {
77
- [this.size]: true,
78
- ['ptc-spacer-horizontal']: this.direction === 'horizontal',
79
- ['ptc-spacer-vertical']: this.direction === 'vertical',
80
- ['ptc-spacer-xx-small']: this.breakpoint === 'xx-small',
81
- ['ptc-spacer-x-small']: this.breakpoint === 'x-small',
82
- ['ptc-spacer-small']: this.breakpoint === 'small',
83
- ['ptc-spacer-medium']: this.breakpoint === 'medium',
84
- ['ptc-spacer-large']: this.breakpoint === 'large',
85
- ['ptc-spacer-x-large']: this.breakpoint === 'x-large',
86
- ['ptc-spacer-xx-large']: this.breakpoint === 'xx-large',
87
- ['ptc-spacer-xxx-large']: this.breakpoint === 'xxx-large',
88
- };
89
- }
90
- };
91
- PtcSpacer.style = ptcSpacerCss;
92
-
93
- exports.ptc_para = PtcPara;
94
- exports.ptc_spacer = PtcSpacer;
@@ -1,106 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-88135a6b.js');
6
-
7
- const ptcTooltipCss = ".sc-ptc-tooltip-h{position:relative}.inline.sc-ptc-tooltip-h{display:inline}.inline.sc-ptc-tooltip-h .text-content.sc-ptc-tooltip{display:inline}.block.sc-ptc-tooltip-h{display:block}.text-ellipsis.sc-ptc-tooltip{position:relative;display:inline}.text-ellipsis.sc-ptc-tooltip:not(.truncated){z-index:auto !important}.z-auto.sc-ptc-tooltip{z-index:auto}.z-1.sc-ptc-tooltip{z-index:1}.z-2.sc-ptc-tooltip{z-index:2}.z-3.sc-ptc-tooltip{z-index:3}.z-999.sc-ptc-tooltip{z-index:999}.tooltip.sc-ptc-tooltip{position:absolute;padding:8px;color:var(--color-white);font-size:var(--ptc-font-size-xxx-small);font-weight:var(--ptc-font-weight-semibold);background:var(--color-gray-09);box-shadow:0px 2px 4px rgba(0, 0, 0, 0.3);border:none;border-radius:2px;width:auto;height:auto;visibility:hidden;text-align:left;text-shadow:none;white-space:normal}@media only screen and (min-width: 480px){.tooltip.sc-ptc-tooltip{width:273px}}.tooltip.danger.sc-ptc-tooltip{color:var(--color-red-07);font-family:var(--ptc-font-latin);font-weight:var(--ptc-font-weight-semibold);font-size:var(--ptc-font-size-xx-small);line-height:var(--ptc-line-height-p);border:2px solid var(--color-red-07);border-radius:var(--ptc-border-radius-standard);background-color:var(--color-white);padding:var(--ptc-element-spacing-06)}.tooltip.danger.sc-ptc-tooltip a.sc-ptc-tooltip{color:var(--color-blue-07)}.tooltip.bottom.sc-ptc-tooltip{bottom:-12px;transform:translateY(100%)}.tooltip.bottom.sc-ptc-tooltip::after{top:1px;left:50%;transform:translate(-50%, -100%);border:8px solid transparent;border-bottom:8px solid var(--color-gray-09)}.tooltip.left.sc-ptc-tooltip{bottom:-12px;transform:translate(-80%, 100%)}.tooltip.left.sc-ptc-tooltip::after{top:1px;right:8px;transform:translateY(-100%);border:8px solid transparent;border-bottom:8px solid var(--color-gray-09)}.tooltip.right.sc-ptc-tooltip{bottom:-12px;transform:translateY(100%);right:0px}@-moz-document url-prefix(){.tooltip.right{right:unset !important;bottom:unset !important;transform:translate(60%, 8px) !important}@media screen and (min-width: 992px){.tooltip.right{transform:translate(100%, 8px) !important}}}.tooltip.right.sc-ptc-tooltip::after{top:1px;left:8px;transform:translateY(-100%);border:8px solid transparent;border-bottom:8px solid var(--color-gray-09)}.tooltip.top.sc-ptc-tooltip{top:-8px;transform:translateY(-100%)}.tooltip.top.sc-ptc-tooltip::after{left:50%;bottom:1px;transform:translate(-50%, 100%);border:8px solid transparent;border-top:8px solid var(--color-gray-09)}.tooltip.bottom-right.sc-ptc-tooltip{bottom:-12px;transform:translate(-60%, 100%)}.tooltip.bottom-right.sc-ptc-tooltip::after{top:1px;left:75%;transform:translate(-50%, -100%);border:8px solid transparent;border-bottom:8px solid var(--color-gray-09)}.tooltip.danger.sc-ptc-tooltip::after{top:0;border-bottom:8px solid var(--color-red-07)}.truncated.sc-ptc-tooltip{cursor:help}.truncated.sc-ptc-tooltip:hover+.tooltip.sc-ptc-tooltip{visibility:visible;z-index:9999}.wrapper-content.sc-ptc-tooltip{display:inline-block;position:relative}.wrapper-content.sc-ptc-tooltip .tooltip.sc-ptc-tooltip{width:auto;min-width:72px;max-width:273px}.wrapper-content.sc-ptc-tooltip .slot-content.sc-ptc-tooltip:hover+.tooltip.sc-ptc-tooltip{visibility:visible;z-index:9999}.tooltip.sc-ptc-tooltip::after{content:\"\";position:absolute}.ellipsis-by-line-boxing.sc-ptc-tooltip{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;overflow-wrap:break-word;padding-bottom:0}.full-width.sc-ptc-tooltip-h .tooltip.sc-ptc-tooltip{width:100%}@media only screen and (min-width: 480px){.full-width.sc-ptc-tooltip-h .tooltip.sc-ptc-tooltip{width:100%}}";
8
-
9
- const PtcTooltip = class {
10
- constructor(hostRef) {
11
- index.registerInstance(this, hostRef);
12
- this.textDisplay = 'inline';
13
- this.maxLength = 45;
14
- this.textLines = undefined;
15
- this.description = 'This is a tooltip text placeholder';
16
- this.zIndex = 'z-auto';
17
- this.position = 'bottom';
18
- this.styles = undefined;
19
- this.mode = 'text-only';
20
- this.theme = 'standard';
21
- this.width = 'default';
22
- this.hideOnMobile = false;
23
- this.isSmallScreen = undefined;
24
- }
25
- addTruncatedClass() {
26
- const appRoot = this.el;
27
- const text = appRoot.querySelectorAll('.ellipsis-by-line-boxing');
28
- text.forEach(t => {
29
- t.classList[t.scrollHeight > t.clientHeight ? 'add' : 'remove']('truncated');
30
- });
31
- }
32
- windowResize() {
33
- this.verifiyScreenSize();
34
- }
35
- verifiyScreenSize() {
36
- this.isSmallScreen = window.innerWidth < 768;
37
- }
38
- // Created this function to initialize the truncate function on specific elements like tabs
39
- enableAddTruncatedClass(element) {
40
- const allTabHeaders = document.querySelectorAll(element);
41
- for (const element of Array.from(allTabHeaders)) {
42
- let tabHeader = element;
43
- if (tabHeader) {
44
- tabHeader.addEventListener('click', () => {
45
- setTimeout(() => {
46
- this.addTruncatedClass();
47
- }, 100);
48
- });
49
- }
50
- }
51
- }
52
- componentWillLoad() {
53
- this.verifiyScreenSize();
54
- }
55
- componentDidLoad() {
56
- //this.addTruncatedClass();
57
- setTimeout(() => {
58
- this.addTruncatedClass();
59
- }, 1000);
60
- this.enableAddTruncatedClass('tab-header');
61
- this.enableAddTruncatedClass('ptc-ellipsis-dropdown');
62
- this.enableAddTruncatedClass('ptc-product-card');
63
- document.addEventListener('readystatechange', () => {
64
- if (document.readyState === 'complete') {
65
- this.addTruncatedClass();
66
- }
67
- });
68
- }
69
- render() {
70
- if (this.mode == 'wrapper') {
71
- return (index.h(index.Host, { class: this.textDisplay }, this.styles && index.h("style", null, this.styles), index.h("div", { class: "wrapper-content" }, index.h("div", { class: "slot-content" }, index.h("slot", null)), index.h("div", { class: `tooltip ${this.position} ${this.theme}` }, index.h("slot", { name: "description" }), this.description))));
72
- }
73
- else {
74
- const classMap = this.getCssClassMap();
75
- const cutOff = this.getLineCuttoff();
76
- let truncatedText = this.description.substring(0, this.maxLength);
77
- if (this.description.length > this.maxLength) {
78
- const lastSpace = truncatedText.lastIndexOf(' ');
79
- truncatedText = truncatedText.substring(0, lastSpace);
80
- truncatedText += '... ';
81
- }
82
- return (index.h(index.Host, { class: this.textDisplay + " " + this.width }, this.styles && index.h("style", null, this.styles), (this.hideOnMobile && this.isSmallScreen) ? (index.h("div", null, this.description)) : (index.h("div", { class: "text-content" }, this.textLines > 0 && !!this.textLines ? (index.h("div", { class: "ellipsis-by-line-boxing", style: cutOff }, this.description)) : (index.h("div", { class: classMap }, truncatedText)), index.h("div", { class: `tooltip ${this.position} ${this.theme}` }, this.description)))));
83
- }
84
- }
85
- getCssClassMap() {
86
- return {
87
- // ['ellipsis-by-line-boxing']: this.textLines && this.textLines > 0,
88
- ['text-ellipsis']: true,
89
- [this.zIndex]: this.description.length > this.maxLength ? true : false,
90
- ['truncated']: this.description.length > this.maxLength && !this.textLines ? true : false,
91
- };
92
- }
93
- getLineCuttoff() {
94
- let result;
95
- if (this.textLines && this.textLines > 0) {
96
- result = {
97
- ['-webkit-line-clamp']: `${this.textLines}`,
98
- };
99
- }
100
- return result;
101
- }
102
- get el() { return index.getElement(this); }
103
- };
104
- PtcTooltip.style = ptcTooltipCss;
105
-
106
- exports.ptc_tooltip = PtcTooltip;