@content-blocks/js 0.4.4 → 0.6.0

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 (200) hide show
  1. package/dist/cjs/content-accordion_11.cjs.entry.js +97 -84
  2. package/dist/cjs/content-accordion_11.cjs.entry.js.map +1 -1
  3. package/dist/cjs/content-blocks.cjs.js +3 -3
  4. package/dist/cjs/content-blocks.cjs.js.map +1 -1
  5. package/dist/cjs/content-carousel.cjs.entry.js +3 -2
  6. package/dist/cjs/content-carousel.cjs.entry.js.map +1 -1
  7. package/dist/cjs/content-navigation-block.cjs.entry.js +31 -29
  8. package/dist/cjs/content-navigation-block.cjs.entry.js.map +1 -1
  9. package/dist/cjs/content-split-block.cjs.entry.js +6 -6
  10. package/dist/cjs/content-split-block.cjs.entry.js.map +1 -1
  11. package/dist/cjs/content-tabs.cjs.entry.js +8 -6
  12. package/dist/cjs/content-tabs.cjs.entry.js.map +1 -1
  13. package/dist/cjs/{index-66c390bf.js → index-9f20d89a.js} +34 -14
  14. package/dist/cjs/index-9f20d89a.js.map +1 -0
  15. package/dist/cjs/index.cjs.js +1 -1
  16. package/dist/cjs/loader.cjs.js +2 -2
  17. package/dist/cjs/{utils-dbda9bbc.js → utils-db61cd70.js} +12 -4
  18. package/dist/cjs/utils-db61cd70.js.map +1 -0
  19. package/dist/cjs/{window-resize-service-35e2ab31.js → window-resize-service-ac5c2012.js} +4 -3
  20. package/dist/cjs/window-resize-service-ac5c2012.js.map +1 -0
  21. package/dist/collection/blocks/content-hero-block/content-hero-block.css +6 -4
  22. package/dist/collection/blocks/content-hero-block/content-hero-block.js +2 -4
  23. package/dist/collection/blocks/content-hero-block/content-hero-block.js.map +1 -1
  24. package/dist/collection/blocks/content-split-block/content-split-block.css +0 -4
  25. package/dist/collection/blocks/content-split-block/content-split-block.js +2 -2
  26. package/dist/collection/blocks/content-split-block/content-split-block.js.map +1 -1
  27. package/dist/collection/blocks/content-text-block/content-text-block.css +0 -4
  28. package/dist/collection/blocks/content-text-block/content-text-block.js +7 -7
  29. package/dist/collection/blocks/content-text-block/content-text-block.js.map +1 -1
  30. package/dist/collection/blocks/content-tout-block/content-tout-block.css +0 -6
  31. package/dist/collection/blocks/content-tout-block/content-tout-block.js +0 -2
  32. package/dist/collection/blocks/content-tout-block/content-tout-block.js.map +1 -1
  33. package/dist/collection/collection-manifest.json +2 -2
  34. package/dist/collection/components/content-accordion/content-accordion.js +2 -2
  35. package/dist/collection/components/content-accordion/content-accordion.js.map +1 -1
  36. package/dist/collection/components/content-accordion/libraries/w3_disclosure_button.js.map +1 -1
  37. package/dist/collection/components/content-carousel/content-carousel.css +0 -4
  38. package/dist/collection/components/content-carousel/content-carousel.js +2 -1
  39. package/dist/collection/components/content-carousel/content-carousel.js.map +1 -1
  40. package/dist/collection/components/content-navigation-block/content-navigation-block.css +0 -6
  41. package/dist/collection/components/content-navigation-block/content-navigation-block.js +27 -25
  42. package/dist/collection/components/content-navigation-block/content-navigation-block.js.map +1 -1
  43. package/dist/collection/components/content-overlay/content-overlay.css +6 -9
  44. package/dist/collection/components/content-overlay/content-overlay.js +34 -16
  45. package/dist/collection/components/content-overlay/content-overlay.js.map +1 -1
  46. package/dist/collection/components/content-overlay/libraries/aria-dialog.js.map +1 -1
  47. package/dist/collection/components/content-overlay/libraries/aria-utilities.js.map +1 -1
  48. package/dist/collection/components/content-tabs/content-tabs.css +0 -4
  49. package/dist/collection/components/content-tabs/content-tabs.js +4 -2
  50. package/dist/collection/components/content-tabs/content-tabs.js.map +1 -1
  51. package/dist/collection/components/content-tabs/libraries/w3_tabs.js.map +1 -1
  52. package/dist/collection/elements/content-button/content-button.css +0 -4
  53. package/dist/collection/elements/content-button/content-button.js +12 -11
  54. package/dist/collection/elements/content-button/content-button.js.map +1 -1
  55. package/dist/collection/elements/content-image/content-image.css +4 -11
  56. package/dist/collection/elements/content-image/content-image.js +81 -23
  57. package/dist/collection/elements/content-image/content-image.js.map +1 -1
  58. package/dist/collection/elements/content-line/content-line.js +10 -14
  59. package/dist/collection/elements/content-line/content-line.js.map +1 -1
  60. package/dist/collection/elements/content-video/content-video.css +1 -5
  61. package/dist/collection/elements/content-video/content-video.js +1 -1
  62. package/dist/collection/elements/content-video/content-video.js.map +1 -1
  63. package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.css +1 -4
  64. package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.js +46 -3
  65. package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.js.map +1 -1
  66. package/dist/collection/formatters/content-spacer/content-spacer.css +0 -3
  67. package/dist/collection/formatters/content-spacer/content-spacer.js +4 -3
  68. package/dist/collection/formatters/content-spacer/content-spacer.js.map +1 -1
  69. package/dist/collection/services/content-events-service.js.map +1 -1
  70. package/dist/collection/services/window-resize-service.js +2 -1
  71. package/dist/collection/services/window-resize-service.js.map +1 -1
  72. package/dist/collection/stories/ContentHeroBlock.stories.js +22 -18
  73. package/dist/collection/stories/ContentHeroBlock.stories.js.map +1 -1
  74. package/dist/collection/stories/ContentNavigationBlock.stories.js +26 -0
  75. package/dist/collection/stories/ContentNavigationBlock.stories.js.map +1 -0
  76. package/dist/collection/stories/ContentSpacer.stories.js +20 -0
  77. package/dist/collection/stories/ContentSpacer.stories.js.map +1 -0
  78. package/dist/collection/stories/ContentTextBlock.stories.js +17 -0
  79. package/dist/collection/stories/ContentTextBlock.stories.js.map +1 -0
  80. package/dist/collection/stories/ContentToutBlock.stories.js +17 -0
  81. package/dist/collection/stories/ContentToutBlock.stories.js.map +1 -0
  82. package/dist/collection/stories/FullPageExample.stories.js +482 -0
  83. package/dist/collection/stories/FullPageExample.stories.js.map +1 -0
  84. package/dist/collection/utils/utils.js +9 -0
  85. package/dist/collection/utils/utils.js.map +1 -1
  86. package/dist/components/content-accordion.js +1 -1
  87. package/dist/components/content-accordion.js.map +1 -1
  88. package/dist/components/content-button.js +13 -12
  89. package/dist/components/content-button.js.map +1 -1
  90. package/dist/components/content-carousel.js +2 -1
  91. package/dist/components/content-carousel.js.map +1 -1
  92. package/dist/components/content-grid-formatter2.js +8 -2
  93. package/dist/components/content-grid-formatter2.js.map +1 -1
  94. package/dist/components/content-hero-block.js +2 -4
  95. package/dist/components/content-hero-block.js.map +1 -1
  96. package/dist/components/content-image.js +28 -24
  97. package/dist/components/content-image.js.map +1 -1
  98. package/dist/components/content-line.js +8 -12
  99. package/dist/components/content-line.js.map +1 -1
  100. package/dist/components/content-navigation-block.js +28 -26
  101. package/dist/components/content-navigation-block.js.map +1 -1
  102. package/dist/components/content-overlay.js +32 -14
  103. package/dist/components/content-overlay.js.map +1 -1
  104. package/dist/components/content-spacer.js +3 -3
  105. package/dist/components/content-spacer.js.map +1 -1
  106. package/dist/components/content-split-block.js +3 -3
  107. package/dist/components/content-split-block.js.map +1 -1
  108. package/dist/components/content-tabs.js +5 -3
  109. package/dist/components/content-tabs.js.map +1 -1
  110. package/dist/components/content-text-block.js +8 -8
  111. package/dist/components/content-text-block.js.map +1 -1
  112. package/dist/components/content-tout-block.js +1 -3
  113. package/dist/components/content-tout-block.js.map +1 -1
  114. package/dist/components/content-video.js +1 -1
  115. package/dist/components/content-video.js.map +1 -1
  116. package/dist/components/utils.js +12 -2
  117. package/dist/components/utils.js.map +1 -1
  118. package/dist/components/window-resize-service.js +2 -1
  119. package/dist/components/window-resize-service.js.map +1 -1
  120. package/dist/content-blocks/content-blocks.esm.js +1 -1
  121. package/dist/content-blocks/content-blocks.esm.js.map +1 -1
  122. package/dist/content-blocks/index.esm.js +1 -1
  123. package/dist/content-blocks/p-167a9155.entry.js +2 -0
  124. package/dist/content-blocks/p-167a9155.entry.js.map +1 -0
  125. package/dist/content-blocks/{p-3d21ae2b.entry.js → p-271fb304.entry.js} +2 -2
  126. package/dist/content-blocks/p-271fb304.entry.js.map +1 -0
  127. package/dist/content-blocks/p-288eace9.js +3 -0
  128. package/dist/content-blocks/p-288eace9.js.map +1 -0
  129. package/dist/content-blocks/p-4038cd42.entry.js +10 -0
  130. package/dist/content-blocks/p-4038cd42.entry.js.map +1 -0
  131. package/dist/content-blocks/p-4bfbd7ef.entry.js +2 -0
  132. package/dist/content-blocks/p-4bfbd7ef.entry.js.map +1 -0
  133. package/dist/content-blocks/p-8cc22c1e.entry.js +2 -0
  134. package/dist/content-blocks/p-8cc22c1e.entry.js.map +1 -0
  135. package/dist/content-blocks/{p-070bc93d.js → p-b04fe808.js} +2 -2
  136. package/dist/content-blocks/p-b04fe808.js.map +1 -0
  137. package/dist/content-blocks/{p-451e7694.js → p-cfb4593f.js} +2 -2
  138. package/dist/content-blocks/p-cfb4593f.js.map +1 -0
  139. package/dist/esm/content-accordion_11.entry.js +97 -84
  140. package/dist/esm/content-accordion_11.entry.js.map +1 -1
  141. package/dist/esm/content-blocks.js +4 -4
  142. package/dist/esm/content-blocks.js.map +1 -1
  143. package/dist/esm/content-carousel.entry.js +3 -2
  144. package/dist/esm/content-carousel.entry.js.map +1 -1
  145. package/dist/esm/content-navigation-block.entry.js +31 -29
  146. package/dist/esm/content-navigation-block.entry.js.map +1 -1
  147. package/dist/esm/content-split-block.entry.js +6 -6
  148. package/dist/esm/content-split-block.entry.js.map +1 -1
  149. package/dist/esm/content-tabs.entry.js +8 -6
  150. package/dist/esm/content-tabs.entry.js.map +1 -1
  151. package/dist/esm/{index-2674652b.js → index-e848c048.js} +34 -14
  152. package/dist/esm/index-e848c048.js.map +1 -0
  153. package/dist/esm/index.js +1 -1
  154. package/dist/esm/loader.js +3 -3
  155. package/dist/esm/{utils-72b3a8bd.js → utils-4f78228e.js} +13 -3
  156. package/dist/esm/utils-4f78228e.js.map +1 -0
  157. package/dist/esm/{window-resize-service-8419bd19.js → window-resize-service-f40ec51c.js} +4 -3
  158. package/dist/esm/window-resize-service-f40ec51c.js.map +1 -0
  159. package/dist/types/blocks/content-hero-block/content-hero-block.d.ts +0 -1
  160. package/dist/types/blocks/content-split-block/content-split-block.d.ts +1 -1
  161. package/dist/types/blocks/content-text-block/content-text-block.d.ts +1 -1
  162. package/dist/types/blocks/content-tout-block/content-tout-block.d.ts +0 -1
  163. package/dist/types/components/content-accordion/content-accordion.d.ts +6 -6
  164. package/dist/types/components/content-navigation-block/content-navigation-block.d.ts +2 -2
  165. package/dist/types/components/content-overlay/content-overlay.d.ts +4 -3
  166. package/dist/types/components/content-tabs/content-tabs.d.ts +1 -0
  167. package/dist/types/components.d.ts +37 -3
  168. package/dist/types/elements/content-button/content-button.d.ts +1 -1
  169. package/dist/types/elements/content-image/content-image.d.ts +13 -1
  170. package/dist/types/elements/content-line/content-line.d.ts +1 -1
  171. package/dist/types/formatters/content-grid-formatter/content-grid-formatter.d.ts +8 -2
  172. package/dist/types/formatters/content-spacer/content-spacer.d.ts +1 -1
  173. package/dist/types/stories/ContentHeroBlock.stories.d.ts +4 -5
  174. package/dist/types/stories/ContentNavigationBlock.stories.d.ts +11 -0
  175. package/dist/types/stories/ContentSpacer.stories.d.ts +15 -0
  176. package/dist/types/stories/ContentTextBlock.stories.d.ts +15 -0
  177. package/dist/types/stories/ContentToutBlock.stories.d.ts +9 -0
  178. package/dist/types/stories/FullPageExample.stories.d.ts +10 -0
  179. package/dist/types/typings.d.ts +3 -3
  180. package/dist/types/utils/utils.d.ts +1 -0
  181. package/package.json +6 -3
  182. package/dist/cjs/index-66c390bf.js.map +0 -1
  183. package/dist/cjs/utils-dbda9bbc.js.map +0 -1
  184. package/dist/cjs/window-resize-service-35e2ab31.js.map +0 -1
  185. package/dist/content-blocks/p-070bc93d.js.map +0 -1
  186. package/dist/content-blocks/p-171693ef.js +0 -3
  187. package/dist/content-blocks/p-171693ef.js.map +0 -1
  188. package/dist/content-blocks/p-3d21ae2b.entry.js.map +0 -1
  189. package/dist/content-blocks/p-3e27514e.entry.js +0 -10
  190. package/dist/content-blocks/p-3e27514e.entry.js.map +0 -1
  191. package/dist/content-blocks/p-451e7694.js.map +0 -1
  192. package/dist/content-blocks/p-6ddbb176.entry.js +0 -2
  193. package/dist/content-blocks/p-6ddbb176.entry.js.map +0 -1
  194. package/dist/content-blocks/p-a78f9c91.entry.js +0 -2
  195. package/dist/content-blocks/p-a78f9c91.entry.js.map +0 -1
  196. package/dist/content-blocks/p-dac292e3.entry.js +0 -2
  197. package/dist/content-blocks/p-dac292e3.entry.js.map +0 -1
  198. package/dist/esm/index-2674652b.js.map +0 -1
  199. package/dist/esm/utils-72b3a8bd.js.map +0 -1
  200. package/dist/esm/window-resize-service-8419bd19.js.map +0 -1
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const utils = require('./utils-dbda9bbc.js');
5
+ const utils = require('./utils-db61cd70.js');
6
6
 
7
7
 
8
8
 
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-66c390bf.js');
5
+ const index = require('./index-9f20d89a.js');
6
6
 
7
7
  const defineCustomElements = (win, options) => {
8
8
  if (typeof window === 'undefined') return undefined;
9
- return index.bootstrapLazy([["content-split-block.cjs",[[4,"content-split-block",{"reverse":[1544],"columns":[1],"classes":[1537],"classString":[32]}]]],["content-carousel.cjs",[[4,"content-carousel",{"initMethod":[1,"init-method"],"swiperOptions":[1,"swiper-options"]},[[0,"setSwiperOptions","setSwiperOptionsCallback"]]]]],["content-navigation-block.cjs",[[4,"content-navigation-block",{"hamburger":[1537],"classes":[1537],"classString":[32],"ariaExpanded":[32],"bodyToggle":[32]}]]],["content-tabs.cjs",[[4,"content-tabs",{"classes":[1537],"classString":[32]}]]],["content-accordion_11.cjs",[[4,"content-accordion",{"open":[1],"animationStart":[1,"animation-start"],"animationEnd":[1,"animation-end"],"animationTime":[2,"animation-time"],"revealElement":[32],"isOpen":[32],"randomID":[32],"classString":[32]}],[4,"content-button",{"href":[1537],"target":[1],"classes":[1],"clickableBlock":[4,"clickable-block"],"expanded":[1537],"controls":[1],"linkLabel":[1,"link-label"],"linkClass":[1537,"link-class"],"classString":[32]}],[4,"content-hero-block",{"contentPosition":[1537,"content-position"],"classes":[1],"hasBackground":[32],"classString":[32],"revealHiddenContent":[32]},[[8,"contentBlockActivated","contentBlockActivationHandler"]]],[4,"content-image",{"classes":[1537],"lazyLoad":[4,"lazy-load"],"src":[1025],"alt":[1537],"width":[1025],"height":[1025],"videoType":[1,"video-type"],"showContent":[1537,"show-content"],"activeSrc":[32],"lazyLoadIsComplete":[32],"showVideoAsGif":[32],"activeLazyLoadClass":[32],"classString":[32],"inlineStyle":[32],"hasMediaContent":[32]},null,{"lazyLoadIsComplete":["watchLazyLoadIsComplete"]}],[4,"content-line",{"tag":[1],"textAlign":[1,"text-align"],"classes":[8],"maxWidth":[1,"max-width"],"classString":[32],"inlineStyle":[32]}],[4,"content-overlay",{"target":[1],"open":[1537],"fullScreen":[1,"full-screen"],"classes":[1],"horizontalAlignment":[1537,"horizontal-alignment"],"verticalAlignment":[1537,"vertical-alignment"],"closeTitle":[1,"close-title"],"isActive":[32],"activeClass":[32],"classString":[32],"isFullScreen":[32],"openOverlay":[64],"closeOverlay":[64]},[[0,"contentBlockActivated","onContentBlockActivated"]]],[4,"content-spacer",{"classes":[1],"maxWidth":[1,"max-width"],"fullHeight":[1537,"full-height"],"textAlign":[1537,"text-align"],"horizontalPosition":[1537,"horizontal-position"],"topOffset":[1,"top-offset"],"bottomOffset":[1,"bottom-offset"],"leftOffset":[1,"left-offset"],"rightOffset":[1,"right-offset"],"classString":[32],"inlineStyle":[32]}],[4,"content-text-block",{"classes":[1],"minHeight":[1537,"min-height"],"verticalAlignment":[1537,"vertical-alignment"],"fullHeight":[1537,"full-height"],"textAlign":[1537,"text-align"],"classString":[32],"inlineStyle":[32]}],[4,"content-tout-block",{"hover":[1537],"classes":[1],"classString":[32],"hasHoverContent":[32]}],[4,"content-video",{"method":[1],"autoplay":[4],"src":[1],"width":[2],"height":[2],"type":[1],"playButtonAriaLabel":[1,"play-button-aria-label"],"classes":[1537],"controls":[4],"preload":[1],"fitContainer":[1537,"fit-container"],"classString":[32],"isLoaded":[32],"hasPoster":[32],"isPlayed":[32]}],[4,"content-grid-formatter",{"classes":[1],"type":[1537],"flexGrow":[1537,"flex-grow"],"flexShrink":[1537,"flex-shrink"],"verticalAlignment":[1537,"vertical-alignment"],"horizontalAlignment":[1537,"horizontal-alignment"],"columns":[1537],"classString":[32],"activeClassString":[32],"inlineStyle":[32]}]]]], options);
9
+ return index.bootstrapLazy([["content-split-block.cjs",[[4,"content-split-block",{"reverse":[1544],"columns":[1],"classes":[1537],"classString":[32]}]]],["content-carousel.cjs",[[4,"content-carousel",{"initMethod":[1,"init-method"],"swiperOptions":[1,"swiper-options"]},[[0,"setSwiperOptions","setSwiperOptionsCallback"]]]]],["content-navigation-block.cjs",[[4,"content-navigation-block",{"hamburger":[1537],"classes":[1537],"classString":[32],"ariaExpanded":[32],"bodyToggle":[32]}]]],["content-tabs.cjs",[[4,"content-tabs",{"classes":[1537],"classString":[32]}]]],["content-accordion_11.cjs",[[4,"content-accordion",{"open":[1],"animationStart":[1,"animation-start"],"animationEnd":[1,"animation-end"],"animationTime":[2,"animation-time"],"revealElement":[32],"isOpen":[32],"randomID":[32],"classString":[32]}],[4,"content-button",{"href":[1537],"target":[1],"classes":[1],"clickableBlock":[4,"clickable-block"],"expanded":[1537],"controls":[1],"linkLabel":[1,"link-label"],"linkClass":[1537,"link-class"],"classString":[32],"hasContentToActivate":[32]}],[4,"content-hero-block",{"contentPosition":[1537,"content-position"],"classes":[1],"hasBackground":[32],"classString":[32],"revealHiddenContent":[32]},[[8,"contentBlockActivated","contentBlockActivationHandler"]]],[4,"content-image",{"classes":[1537],"lazyLoad":[4,"lazy-load"],"src":[1025],"alt":[1537],"width":[1025],"height":[1025],"aspectRatio":[1025,"aspect-ratio"],"type":[1],"videoType":[1,"video-type"],"showContent":[1537,"show-content"],"activeSrc":[32],"lazyLoadIsComplete":[32],"showVideoAsGif":[32],"activeLazyLoadClass":[32],"classString":[32],"inlineStyle":[32],"hasMediaContent":[32],"pictureImageSrc":[32]},null,{"lazyLoadIsComplete":["watchLazyLoadIsComplete"]}],[4,"content-line",{"tag":[1],"textAlign":[1,"text-align"],"classes":[8],"maxWidth":[1,"max-width"],"classString":[32],"inlineStyle":[32]}],[4,"content-overlay",{"target":[1],"open":[1537],"fullScreen":[1,"full-screen"],"classes":[1],"horizontalAlignment":[1537,"horizontal-alignment"],"verticalAlignment":[1537,"vertical-alignment"],"closeTitle":[1,"close-title"],"isActive":[32],"activeClass":[32],"classString":[32],"contentSlot":[32],"isFullScreen":[32],"hasCloseButton":[32],"originalMarkup":[32],"openOverlay":[64],"closeOverlay":[64]},[[0,"contentBlockActivated","onContentBlockActivated"]]],[4,"content-spacer",{"classes":[1],"maxWidth":[1,"max-width"],"fullHeight":[1537,"full-height"],"textAlign":[1537,"text-align"],"horizontalPosition":[1537,"horizontal-position"],"topOffset":[1,"top-offset"],"bottomOffset":[1,"bottom-offset"],"leftOffset":[1,"left-offset"],"rightOffset":[1,"right-offset"],"classString":[32],"inlineStyle":[32]}],[4,"content-text-block",{"classes":[1],"minHeight":[1537,"min-height"],"verticalAlignment":[1537,"vertical-alignment"],"fullHeight":[1537,"full-height"],"textAlign":[1537,"text-align"],"classString":[32],"inlineStyle":[32]}],[4,"content-tout-block",{"hover":[1537],"classes":[1],"classString":[32],"hasHoverContent":[32]}],[4,"content-video",{"method":[1],"autoplay":[4],"src":[1],"width":[2],"height":[2],"type":[1],"playButtonAriaLabel":[1,"play-button-aria-label"],"classes":[1537],"controls":[4],"preload":[1],"fitContainer":[1537,"fit-container"],"classString":[32],"isLoaded":[32],"hasPoster":[32],"isPlayed":[32]}],[4,"content-grid-formatter",{"classes":[1],"type":[1537],"flexGrow":[1537,"flex-grow"],"flexShrink":[1537,"flex-shrink"],"verticalAlignment":[1537,"vertical-alignment"],"horizontalAlignment":[1537,"horizontal-alignment"],"columns":[1537],"columnGap":[1537,"column-gap"],"classString":[32],"activeClassString":[32],"inlineStyle":[32]}]]]], options);
10
10
  };
11
11
 
12
12
  exports.setNonce = index.setNonce;
@@ -87,6 +87,15 @@ function getHydratedClassString(classString) {
87
87
  }
88
88
  return 'hydrated';
89
89
  }
90
+ function objectToCssString(object) {
91
+ let string = '';
92
+ for (var key in object) {
93
+ if (object[key].length > 0 && !['px', '%'].includes(object[key])) {
94
+ string += `${key}: ${object[key]};`;
95
+ }
96
+ }
97
+ return string;
98
+ }
90
99
 
91
100
  const utils = /*#__PURE__*/Object.freeze({
92
101
  __proto__: null,
@@ -100,13 +109,12 @@ const utils = /*#__PURE__*/Object.freeze({
100
109
  getCurrentBreakpointIndex: getCurrentBreakpointIndex,
101
110
  getCurrentValue: getCurrentValue,
102
111
  getValueAtIndex: getValueAtIndex,
103
- getHydratedClassString: getHydratedClassString
112
+ getHydratedClassString: getHydratedClassString,
113
+ objectToCssString: objectToCssString
104
114
  });
105
115
 
106
- exports.breakpointValues = breakpointValues;
107
116
  exports.getCurrentBreakpointIndex = getCurrentBreakpointIndex;
108
117
  exports.getCurrentValue = getCurrentValue;
109
- exports.getValueAtIndex = getValueAtIndex;
110
118
  exports.utils = utils;
111
119
 
112
- //# sourceMappingURL=utils-dbda9bbc.js.map
120
+ //# sourceMappingURL=utils-db61cd70.js.map
@@ -0,0 +1 @@
1
+ {"file":"utils-db61cd70.js","mappings":";;AAEO,MAAM,WAAW,GAAG,CAAC,QAAQ,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,YAAY,EAAE,eAAe,EAAE,cAAc,CAAC,CAAC;AACrH,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,UAAU,EAAE,eAAe,EAAE,cAAc,CAAC,CAAC;AAC5H,MAAM,gBAAgB,GAAG,CAAC,CAAC,EAAC,GAAG,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,CAAC,CAAC;SAE5C,mBAAmB;IACjC,OAAO,gBAAgB,CAAC;AAC1B,CAAC;SACe,iBAAiB,CAAC,QAAkB,EAAE,UAAkB;IACtE,I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aAAa,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,CAAC;IACxD,IAAI,aAAa,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE;QACtC,OAAO,aAAa,CAAC,IAAI,EAAE,CAAC;KAC7B;IACD,IAAI,aAAa,EAAE;QACjB,OAAO,aAAa,CAAC,IAAI,EAAE,GAAG,WAAW,CAAC;KAC3C;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;SAEe,iBAAiB,CAAC,MAAc;IAC9C,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,KAAK,IAAI,GAAG,IAAI,MAAM,EAAE;QACtB,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE;YAChE,MAAM,IAAI,GAAG,GAAG,KAAK,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC;SACrC;KACF;IACD,OAAO,MAAM,CAAC;AAChB;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/utils/utils.ts"],"sourcesContent":["import { ResponsiveString } from \"../typings\";\n\nexport const breakpoints = ['mobile', 'tablet-portrait', 'tablet-landscape', 'tablet-pro', 'desktop-large', 'desktop-wide'];\nexport const breakpointLabels = ['Mobile', 'Tablet (Portrait)', 'Tablet (Landscape)', 'iPad Pro', 'Desktop Large', 'Desktop Wide'];\nexport const breakpointValues = [0,768,1024,1366,1440,1920];\n\nexport function getBreakpointValues() {\n return breakpointValues;\n}\nexport function insertCssIntoHead(document: Document, fontCssUrl: string) {\n let element = document.querySelector(`link[href=\"${fontCssUrl}\"]`);\n // Only inject the element if it's not yet present\n if (!element) {\n element = document.createElement('link');\n element.setAttribute('rel', 'stylesheet');\n element.setAttribute('href', fontCssUrl);\n document.head.prepend(element);\n }\n}\n\nexport function generateResponsiveClass(classPrefix: string, responsiveValue: string) {\n let index = -1;\n let classString = '';\n responsiveValue.split('|').forEach(value => {\n index++;\n if (!value || value === 'false') {\n return false;\n }\n classString += ` ${classPrefix}-${breakpoints[index]}-${value}`\n });\n return classString;\n}\n\n// Fills in default value if none exists for a breakpoint\nexport function generateResponsiveValues(responsiveValue: string): string[] {\n if (!responsiveValue) {\n return [];\n }\n let responseArray = [];\n let splitResponsiveValues = responsiveValue.split('|');\n let lastGoodValue = splitResponsiveValues[0];\n breakpointValues.forEach((_value, index) => {\n let thisBreakpointValue = splitResponsiveValues[index];\n if (thisBreakpointValue) {\n lastGoodValue = thisBreakpointValue;\n }\n responseArray.push(thisBreakpointValue ? thisBreakpointValue : lastGoodValue);\n });\n return responseArray;\n}\n\nexport function getCurrentBreakpointIndex(): number {\n let activeBreakpointIndex: number = 0;\n let windowWidth = window.innerWidth;\n breakpointValues.some((width) => {\n // The first time this is true will end the loop\n let condition = width > windowWidth;\n if (!condition) {\n activeBreakpointIndex = breakpointValues.indexOf(width);\n }\n return condition;\n });\n return activeBreakpointIndex;\n}\n\nexport function getCurrentValue(responsiveValue: string|boolean): string {\n if (!responsiveValue) {\n return '';\n }\n let currentBreakpoint = getCurrentBreakpointIndex();\n let responsiveValues = generateResponsiveValues(responsiveValue.toString());\n let returnValue: string;\n for (var i = currentBreakpoint; i >= 0; i--) {\n if (responsiveValues[i]) {\n returnValue = responsiveValues[i];\n i = -1;\n }\n }\n return returnValue;\n}\n\nexport function getValueAtIndex(index: number, responsiveValue: ResponsiveString): string {\n let responsiveValues = generateResponsiveValues(responsiveValue.toString());\n return responsiveValues[index].trim();\n}\n\nexport function getHydratedClassString(classString: string): string {\n let cleanedString = getCurrentValue(classString).trim();\n if (cleanedString.includes('hydrated')) {\n return cleanedString.trim();\n }\n if (cleanedString) {\n return cleanedString.trim() + ' hydrated';\n }\n return 'hydrated';\n}\n\nexport function objectToCssString(object: object): string {\n let string = '';\n for (var key in object) {\n if (object[key].length > 0 && !['px', '%'].includes(object[key])) {\n string += `${key}: ${object[key]};`;\n }\n }\n return string;\n}"],"version":3}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const utils = require('./utils-dbda9bbc.js');
3
+ const utils = require('./utils-db61cd70.js');
4
4
  const BehaviorSubject = require('./BehaviorSubject-771fd78b.js');
5
5
 
6
6
  class WindowResizeController {
@@ -24,7 +24,8 @@ class WindowResizeController {
24
24
  return new BehaviorSubject.Observable(observer => {
25
25
  observer.next(utils.getCurrentValue(activePropValue));
26
26
  this.breakpointIndex$.subscribe(() => {
27
- observer.next(utils.getCurrentValue(activePropValue));
27
+ let nextValue = utils.getCurrentValue(activePropValue);
28
+ observer.next(nextValue);
28
29
  });
29
30
  });
30
31
  }
@@ -33,4 +34,4 @@ const WindowResizeService = new WindowResizeController();
33
34
 
34
35
  exports.WindowResizeService = WindowResizeService;
35
36
 
36
- //# sourceMappingURL=window-resize-service-35e2ab31.js.map
37
+ //# sourceMappingURL=window-resize-service-ac5c2012.js.map
@@ -0,0 +1 @@
1
+ {"file":"window-resize-service-ac5c2012.js","mappings":";;;;;AAIA,MAAM,sBAAsB;;IAK1B;QAJA,sBAAiB,GAAGA,+BAAyB,EAAE,CAAC;QAChD,qBAAgB,GAA4B,IAAIC,+BAAe,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAKtF,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,QAAQ;YAChD,IAAI,IAAI,CAAC,aAAa,EAAE;gBACtB,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;aAClC;YACD,IAAI,WAAW,GAAGD,+BAAyB,EAAE,CAAC;YAC9C,IAAI,IAAI,CAAC,gBAAgB,CAAC,KAAK,KAAK,WAAW,EAAE;gBAC/C,OAAO,KAAK,CAAC;aACd;YACD,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SACzC,CAAC,CAAC;QAEH,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;KAC9C;IAED,YAAY,CAAC,eAAe;QAC1B,OAAO,IAAIE,0BAAU,CAAC,QAAQ;YAC5B,QAAQ,CAAC,IAAI,CAACC,qBAAe,CAAC,eAAe,CAAC,CAAC,CAAC;YAChD,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC;gBAC9B,IAAI,SAAS,GAAGA,qBAAe,CAAC,eAAe,CAAC,CAAC;gBACjD,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;aAC1B,CAAC,CAAC;SACJ,CAAC,CAAC;KACJ;CACF;MAEY,mBAAmB,GAAG,IAAI,sBAAsB;;;;","names":["getCurrentBreakpointIndex","BehaviorSubject","Observable","getCurrentValue"],"sources":["src/services/window-resize-service.ts"],"sourcesContent":["import { BehaviorSubject, Observable } from \"rxjs\";\nimport { getCurrentBreakpointIndex, getCurrentValue } from \"../utils/utils\";\nimport _ from 'underscore';\n\nclass WindowResizeController {\n currentBreakpoint = getCurrentBreakpointIndex();\n breakpointIndex$: BehaviorSubject<number> = new BehaviorSubject(this.currentBreakpoint);\n timeoutHolder: number;\n // timeoutHolder: Timeout;\n constructor() {\n\n const resizeObserver = new ResizeObserver(_entries => {\n if (this.timeoutHolder) {\n clearTimeout(this.timeoutHolder);\n }\n let activeValue = getCurrentBreakpointIndex();\n if (this.breakpointIndex$.value === activeValue) {\n return false;\n }\n this.breakpointIndex$.next(activeValue);\n });\n\n resizeObserver.observe(window.document.body);\n }\n \n registerProp(activePropValue): Observable<string|boolean|number> {\n return new Observable(observer => {\n observer.next(getCurrentValue(activePropValue));\n this.breakpointIndex$.subscribe(() => {\n let nextValue = getCurrentValue(activePropValue);\n observer.next(nextValue);\n });\n });\n }\n}\n\nexport const WindowResizeService = new WindowResizeController();"],"version":3}
@@ -4,10 +4,6 @@
4
4
 
5
5
  content-hero-block {
6
6
  position: relative;
7
- visibility: hidden;
8
- }
9
- content-hero-block.hydrated {
10
- visibility: inherit;
11
7
  }
12
8
  content-hero-block[content-position=above] {
13
9
  display: grid;
@@ -22,6 +18,12 @@ content-hero-block[content-position=above] .content-hero-block__background {
22
18
  height: 100%;
23
19
  overflow: hidden;
24
20
  }
21
+ content-hero-block[content-position=above] .content-hero-block__background content-image,
22
+ content-hero-block[content-position=above] .content-hero-block__background content-image picture,
23
+ content-hero-block[content-position=above] .content-hero-block__background content-image img,
24
+ content-hero-block[content-position=above] .content-hero-block__background content-image video {
25
+ height: 100%;
26
+ }
25
27
  content-hero-block[content-position=above] .content-hero-block__content {
26
28
  display: flex;
27
29
  top: 0;
@@ -16,8 +16,6 @@ export class ContentHeroBlock {
16
16
  componentWillLoad() {
17
17
  this.hasBackground = !!this.hostElement.querySelector('[slot="background"]');
18
18
  this.hasHiddenContent = !!this.hostElement.querySelector('[slot="activatedContent"]');
19
- }
20
- componentDidLoad() {
21
19
  WindowResizeService.registerProp(this.contentPosition).subscribe(newValue => (this.contentPosition = newValue));
22
20
  WindowResizeService.registerProp(this.classes).subscribe(newValue => (this.classString = newValue));
23
21
  }
@@ -27,7 +25,7 @@ export class ContentHeroBlock {
27
25
  }
28
26
  }
29
27
  render() {
30
- return (h(Host, { class: this.classString }, this.hasBackground && (h("div", { class: "content-hero-block__background" }, h("slot", { name: "background" }))), h("div", { class: "content-hero-block__content" }, h("slot", { name: "content" }))));
28
+ return (h(Host, { class: this.classString }, this.hasBackground && (h("div", { class: "content-hero-block__background" }, h("slot", { name: "background" }))), h("div", { class: "content-hero-block__content" }, h("slot", { name: "content" }), h("slot", null))));
31
29
  }
32
30
  static get is() { return "content-hero-block"; }
33
31
  static get originalStyleUrls() {
@@ -56,7 +54,7 @@ export class ContentHeroBlock {
56
54
  },
57
55
  "HeroContentPlacementOptions": {
58
56
  "location": "local",
59
- "path": "/Users/shahrukceo/Developer/content-blocks-monorepo/develop/packages/content-blocks-stenciljs/src/blocks/content-hero-block/content-hero-block.tsx",
57
+ "path": "/Users/shahrukceo/Developer/content-blocks-monorepo/packages/content-blocks-stenciljs/src/blocks/content-hero-block/content-hero-block.tsx",
60
58
  "id": "src/blocks/content-hero-block/content-hero-block.tsx::HeroContentPlacementOptions"
61
59
  }
62
60
  }
@@ -1 +1 @@
1
- {"version":3,"file":"content-hero-block.js","sourceRoot":"","sources":["../../../../src/blocks/content-hero-block/content-hero-block.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,OAAO,EAAsB,MAAM,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAI3E;;;;GAIG;AAMH,MAAM,OAAO,gBAAgB;;6BAEO,KAAK;+BAY2B,aAAa;;;mCAQvC,KAAK;;IAG7C,iBAAiB;QACf,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;QAC7E,IAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,2BAA2B,CAAC,CAAC;IACxF,CAAC;IAED,gBAAgB;QACd,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,GAAG,QAAkB,CAAC,CAAC,CAAC;QAC1H,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,QAAkB,CAAC,CAAC,CAAC;IAChH,CAAC;IAGD,6BAA6B,CAAC,KAA+B;QAC3D,IAAI,IAAI,CAAC,WAAW,KAAK,KAAK,CAAC,MAAM,EAAE;YACrC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;SACpD;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,WAAW;YAC1B,IAAI,CAAC,aAAa,IAAI,CACrB,WAAK,KAAK,EAAC,gCAAgC;gBACzC,YAAM,IAAI,EAAC,YAAY,GAAQ,CAC3B,CACP;YACD,WAAK,KAAK,EAAC,6BAA6B;gBACtC,YAAM,IAAI,EAAC,SAAS,GAAQ,CACxB,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Host, Prop } from '@stencil/core';\nimport { Element, HTMLStencilElement, Listen, State } from '@stencil/core/internal';\nimport { WindowResizeService } from '../../services/window-resize-service';\nimport { ResponsiveString } from '../../typings';\nimport { getHydratedClassString } from '../../utils/utils';\nexport type HeroContentPlacementOptions = 'above' | 'below';\n/**\n * @slot background - This slot is usually either a video or image component.\n * @slot content - This slot will usually serve a text block.\n * @slot - Default slot, same as content slot\n */\n@Component({\n tag: 'content-hero-block',\n styleUrl: 'content-hero-block.scss',\n shadow: false,\n})\nexport class ContentHeroBlock {\n @Element() hostElement: HTMLStencilElement;\n @State() hasBackground: boolean = false;\n /**\n * Pipe separated HeroContentPlacementOptions that will determine whether the content sits below the media slot or overlapped above.\n * @type Select\n * @options below\n * @options above\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n contentPosition: ResponsiveString | HeroContentPlacementOptions = 'below|above';\n\n /**\n * @type String\n * @responsive\n */\n @Prop() classes: ResponsiveString;\n @State() classString;\n @State() revealHiddenContent: boolean = false;\n hasHiddenContent: boolean;\n\n componentWillLoad() {\n this.hasBackground = !!this.hostElement.querySelector('[slot=\"background\"]');\n this.hasHiddenContent = !!this.hostElement.querySelector('[slot=\"activatedContent\"]');\n }\n\n componentDidLoad() {\n WindowResizeService.registerProp(this.contentPosition).subscribe(newValue => (this.contentPosition = newValue as string));\n WindowResizeService.registerProp(this.classes).subscribe(newValue => (this.classString = newValue as string));\n }\n\n @Listen('contentBlockActivated', { target: 'window' })\n contentBlockActivationHandler(event: CustomEvent<HTMLElement>) {\n if (this.hostElement === event.detail) {\n this.hostElement.setAttribute('activated', 'true');\n }\n }\n\n render() {\n return (\n <Host class={this.classString}>\n {this.hasBackground && (\n <div class=\"content-hero-block__background\">\n <slot name=\"background\"></slot>\n </div>\n )}\n <div class=\"content-hero-block__content\">\n <slot name=\"content\"></slot>\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"content-hero-block.js","sourceRoot":"","sources":["../../../../src/blocks/content-hero-block/content-hero-block.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,OAAO,EAAsB,MAAM,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAI3E;;;;GAIG;AAMH,MAAM,OAAO,gBAAgB;;6BAEO,KAAK;+BAY2B,aAAa;;;mCAQvC,KAAK;;IAG7C,iBAAiB;QACf,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC;QAC7E,IAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,2BAA2B,CAAC,CAAC;QACtF,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,GAAG,QAAkB,CAAC,CAAC,CAAC;QAC1H,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,QAAkB,CAAC,CAAC,CAAC;IAChH,CAAC;IAGD,6BAA6B,CAAC,KAA+B;QAC3D,IAAI,IAAI,CAAC,WAAW,KAAK,KAAK,CAAC,MAAM,EAAE,CAAC;YACtC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QACrD,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,WAAW;YAC1B,IAAI,CAAC,aAAa,IAAI,CACrB,WAAK,KAAK,EAAC,gCAAgC;gBACzC,YAAM,IAAI,EAAC,YAAY,GAAQ,CAC3B,CACP;YACD,WAAK,KAAK,EAAC,6BAA6B;gBACtC,YAAM,IAAI,EAAC,SAAS,GAAQ;gBAC5B,eAAa,CACT,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Host, Prop } from '@stencil/core';\nimport { Element, HTMLStencilElement, Listen, State } from '@stencil/core/internal';\nimport { WindowResizeService } from '../../services/window-resize-service';\nimport { ResponsiveString } from '../../typings';\nimport { getHydratedClassString } from '../../utils/utils';\nexport type HeroContentPlacementOptions = 'above' | 'below';\n/**\n * @slot background - This slot is usually either a video or image component.\n * @slot content - This slot will usually serve a text block.\n * @slot - Default slot, same as content slot\n */\n@Component({\n tag: 'content-hero-block',\n styleUrl: 'content-hero-block.scss',\n shadow: false,\n})\nexport class ContentHeroBlock {\n @Element() hostElement: HTMLStencilElement;\n @State() hasBackground: boolean = false;\n /**\n * Pipe separated HeroContentPlacementOptions that will determine whether the content sits below the media slot or overlapped above.\n * @type Select\n * @options below\n * @options above\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n contentPosition: ResponsiveString | HeroContentPlacementOptions = 'below|above';\n\n /**\n * @type String\n * @responsive\n */\n @Prop() classes: ResponsiveString;\n @State() classString;\n @State() revealHiddenContent: boolean = false;\n hasHiddenContent: boolean;\n\n componentWillLoad() {\n this.hasBackground = !!this.hostElement.querySelector('[slot=\"background\"]');\n this.hasHiddenContent = !!this.hostElement.querySelector('[slot=\"activatedContent\"]');\n WindowResizeService.registerProp(this.contentPosition).subscribe(newValue => (this.contentPosition = newValue as string));\n WindowResizeService.registerProp(this.classes).subscribe(newValue => (this.classString = newValue as string));\n }\n\n @Listen('contentBlockActivated', { target: 'window' })\n contentBlockActivationHandler(event: CustomEvent<HTMLElement>) {\n if (this.hostElement === event.detail) {\n this.hostElement.setAttribute('activated', 'true');\n }\n }\n\n render() {\n return (\n <Host class={this.classString}>\n {this.hasBackground && (\n <div class=\"content-hero-block__background\">\n <slot name=\"background\"></slot>\n </div>\n )}\n <div class=\"content-hero-block__content\">\n <slot name=\"content\"></slot>\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -4,10 +4,6 @@
4
4
 
5
5
  content-split-block {
6
6
  display: block;
7
- visibility: hidden;
8
- }
9
- content-split-block.hydrated {
10
- visibility: inherit;
11
7
  }
12
8
  content-split-block[reverse=true] content-grid-formatter[type=flex] [slot=column1],
13
9
  content-split-block[reverse=true] content-grid-formatter[type=grid] [slot=column1] {
@@ -11,12 +11,12 @@ export class ContentSplitBlock {
11
11
  this.classes = undefined;
12
12
  this.classString = undefined;
13
13
  }
14
- componentDidLoad() {
14
+ componentWillLoad() {
15
15
  WindowResizeService.registerProp(this.reverse).subscribe(newValue => (this.reverse = newValue));
16
16
  WindowResizeService.registerProp(this.classes).subscribe(newValue => (this.classString = newValue));
17
17
  }
18
18
  render() {
19
- return (h(Host, { class: this.classString, reverse: this.reverse }, h("content-grid-formatter", { type: "flex", "flex-grow": "true", "flex-shrink": "true", columns: this.columns }, h("slot", { name: "column1" }), h("slot", { name: "column2" }))));
19
+ return (h(Host, { class: this.classString, reverse: this.reverse }, h("content-grid-formatter", { type: "none|flex", "flex-grow": "true", "flex-shrink": "true", columns: this.columns }, h("slot", { name: "column1" }), h("slot", { name: "column2" }))));
20
20
  }
21
21
  static get is() { return "content-split-block"; }
22
22
  static get originalStyleUrls() {
@@ -1 +1 @@
1
- {"version":3,"file":"content-split-block.js","sourceRoot":"","sources":["../../../../src/blocks/content-split-block/content-split-block.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAE3E;;;GAGG;AAMH,MAAM,OAAO,iBAAiB;;uBASW,KAAK;uBAKlB,KAAK;;;;IAY/B,gBAAgB;QACd,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,GAAG,QAAkB,CAAC,CAAC,CAAC;QAC1G,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,QAAkB,CAAC,CAAC,CAAC;IAChH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO;YAClD,8BAAwB,IAAI,EAAC,MAAM,eAAW,MAAM,iBAAa,MAAM,EAAC,OAAO,EAAE,IAAI,CAAC,OAAO;gBAC3F,YAAM,IAAI,EAAC,SAAS,GAAQ;gBAC5B,YAAM,IAAI,EAAC,SAAS,GAAQ,CACL,CACpB,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Host, Prop, State } from '@stencil/core';\nimport { WindowResizeService } from '../../services/window-resize-service';\nimport { ResponsiveBoolean, ResponsiveString } from '../../typings';\n/**\n * @slot column1 - This will be column 1.\n * @slot column2 - This will be column 2.\n */\n@Component({\n tag: 'content-split-block',\n styleUrl: 'content-split-block.scss',\n shadow: false,\n})\nexport class ContentSplitBlock {\n /**\n * @type Boolean\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n reverse: ResponsiveBoolean | boolean = false;\n /**\n * @type Number\n * @responsive\n */\n @Prop() columns: string = '1|2';\n /**\n * @type String\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n classes: ResponsiveString;\n @State() classString;\n\n componentDidLoad() {\n WindowResizeService.registerProp(this.reverse).subscribe(newValue => (this.reverse = newValue as string));\n WindowResizeService.registerProp(this.classes).subscribe(newValue => (this.classString = newValue as string));\n }\n\n render() {\n return (\n <Host class={this.classString} reverse={this.reverse}>\n <content-grid-formatter type=\"flex\" flex-grow=\"true\" flex-shrink=\"true\" columns={this.columns}>\n <slot name=\"column1\"></slot>\n <slot name=\"column2\"></slot>\n </content-grid-formatter>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"content-split-block.js","sourceRoot":"","sources":["../../../../src/blocks/content-split-block/content-split-block.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAE3E;;;GAGG;AAMH,MAAM,OAAO,iBAAiB;;uBASW,KAAK;uBAKlB,KAAK;;;;IAY/B,iBAAiB;QACf,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,GAAG,QAAkB,CAAC,CAAC,CAAC;QAC1G,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,QAAkB,CAAC,CAAC,CAAC;IAChH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO;YAClD,8BAAwB,IAAI,EAAC,WAAW,eAAW,MAAM,iBAAa,MAAM,EAAC,OAAO,EAAE,IAAI,CAAC,OAAO;gBAChG,YAAM,IAAI,EAAC,SAAS,GAAQ;gBAC5B,YAAM,IAAI,EAAC,SAAS,GAAQ,CACL,CACpB,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Host, Prop, State } from '@stencil/core';\nimport { WindowResizeService } from '../../services/window-resize-service';\nimport { ResponsiveBoolean, ResponsiveString } from '../../typings';\n/**\n * @slot column1 - This will be column 1.\n * @slot column2 - This will be column 2.\n */\n@Component({\n tag: 'content-split-block',\n styleUrl: 'content-split-block.scss',\n shadow: false,\n})\nexport class ContentSplitBlock {\n /**\n * @type Boolean\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n reverse: ResponsiveBoolean | boolean = false;\n /**\n * @type Number\n * @responsive\n */\n @Prop() columns: string = '1|2';\n /**\n * @type String\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n classes: ResponsiveString;\n @State() classString;\n\n componentWillLoad() {\n WindowResizeService.registerProp(this.reverse).subscribe(newValue => (this.reverse = newValue as string));\n WindowResizeService.registerProp(this.classes).subscribe(newValue => (this.classString = newValue as string));\n }\n\n render() {\n return (\n <Host class={this.classString} reverse={this.reverse}>\n <content-grid-formatter type=\"none|flex\" flex-grow=\"true\" flex-shrink=\"true\" columns={this.columns}>\n <slot name=\"column1\"></slot>\n <slot name=\"column2\"></slot>\n </content-grid-formatter>\n </Host>\n );\n }\n}\n"]}
@@ -6,10 +6,6 @@ content-text-block {
6
6
  display: block;
7
7
  width: 100%;
8
8
  text-align: initial;
9
- visibility: hidden;
10
- }
11
- content-text-block.hydrated {
12
- visibility: inherit;
13
9
  }
14
10
  content-text-block[full-height=true] {
15
11
  height: 100%;
@@ -15,22 +15,22 @@ export class ContentTextBlock {
15
15
  this.textAlign = 'default';
16
16
  this.inlineStyle = {};
17
17
  }
18
- componentDidLoad() {
18
+ componentWillLoad() {
19
19
  if (!!this.hostElement.querySelector('[slot="footer"]')) {
20
20
  this.hostElement.setAttribute('footer', 'true');
21
21
  }
22
22
  WindowResizeService.registerProp(this.minHeight).subscribe(newValue => {
23
23
  this.inlineStyle = Object.assign(Object.assign({}, this.inlineStyle), { 'min-height': isNaN(newValue) ? newValue : newValue + 'px' });
24
24
  });
25
- WindowResizeService.registerProp(this.textAlign).subscribe(newValue => (this.textAlign = newValue)),
26
- WindowResizeService.registerProp(this.fullHeight).subscribe(newValue => {
27
- this.fullHeight = newValue;
28
- });
29
- WindowResizeService.registerProp(this.verticalAlignment).subscribe(newValue => (this.verticalAlignment = newValue));
25
+ WindowResizeService.registerProp(this.textAlign).subscribe(newValue => this.hostElement.setAttribute('text-align', newValue));
26
+ WindowResizeService.registerProp(this.verticalAlignment).subscribe(newValue => this.hostElement.setAttribute('vertical-alignment', newValue));
27
+ WindowResizeService.registerProp(this.fullHeight).subscribe(newValue => {
28
+ this.hostElement.setAttribute('full-height', newValue);
29
+ });
30
30
  WindowResizeService.registerProp(this.classes).subscribe(newValue => (this.classString = newValue));
31
31
  }
32
32
  render() {
33
- return (h(Host, { class: this.classString, "full-height": this.fullHeight, "vertical-alignment": this.verticalAlignment, style: this.inlineStyle, "text-align": this.textAlign }, h("div", { class: "content-text-block__content" }, h("slot", { name: "content" }), h("slot", null)), h("slot", { name: "footer" })));
33
+ return (h(Host, { class: this.classString, style: this.inlineStyle }, h("div", { class: "content-text-block__content" }, h("slot", { name: "content" }), h("slot", null)), h("slot", { name: "footer" })));
34
34
  }
35
35
  static get is() { return "content-text-block"; }
36
36
  static get originalStyleUrls() {
@@ -1 +1 @@
1
- {"version":3,"file":"content-text-block.js","sourceRoot":"","sources":["../../../../src/blocks/content-text-block/content-text-block.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAsB,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAG3E;;;;GAIG;AAMH,MAAM,OAAO,gBAAgB;;;;;iCAgCoB,KAAK;0BAUrB,OAAO;yBAeG,SAAS;2BAEC,EAAE;;IAErD,gBAAgB;QACd,IAAI,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,iBAAiB,CAAC,EAAE;YACvD,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;SACjD;QACD,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE;YACpE,IAAI,CAAC,WAAW,mCAAQ,IAAI,CAAC,WAAW,KAAE,YAAY,EAAE,KAAK,CAAC,QAAe,CAAC,CAAC,CAAC,CAAE,QAAmB,CAAC,CAAC,CAAC,QAAQ,GAAG,IAAI,GAAE,CAAC;QAC5H,CAAC,CAAC,CAAC;QACH,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,QAAuC,CAAC,CAAC;YAChI,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE;gBACrE,IAAI,CAAC,UAAU,GAAG,QAAkB,CAAC;YACvC,CAAC,CAAC,CAAC;QACL,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,iBAAiB,GAAG,QAAqC,CAAC,CAAC,CAAC;QACjJ,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,QAAkB,CAAC,CAAC,CAAC;IAChH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,WAAW,iBAAe,IAAI,CAAC,UAAU,wBAAsB,IAAI,CAAC,iBAAiB,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,gBAAc,IAAI,CAAC,SAAS;YAC1J,WAAK,KAAK,EAAC,6BAA6B;gBACtC,YAAM,IAAI,EAAC,SAAS,GAAQ;gBAC5B,eAAa,CACT;YACN,YAAM,IAAI,EAAC,QAAQ,GAAQ,CACtB,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Host, Element, State } from '@stencil/core';\nimport { HTMLStencilElement, Prop } from '@stencil/core/internal';\nimport { WindowResizeService } from '../../services/window-resize-service';\nimport { ContentVerticalAlignments, ResponsiveString, ContentLineTextAlignOptions } from '../../typings';\n\n/**\n * @slot content - This slot will usually serve a text block.\n * @slot footer - This slot is placed below the content slot\n * @slot - Default slot, same as content slot\n */\n@Component({\n tag: 'content-text-block',\n styleUrl: 'content-text-block.scss',\n shadow: false,\n})\nexport class ContentTextBlock {\n /**\n * This is a pipe separated string representing the style class.\n * @type String\n * @responsive\n */\n @Prop() classes: ResponsiveString;\n @State() classString;\n\n /**\n * This is a pipe separated string representing the minimum height. Units without values default to pixels.\n * @type String\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n minHeight: ResponsiveString;\n\n /**\n * Pipe separated list of ContentVerticalAlignments for text box placement.\n * @type Select\n * @options top\n * @options center\n * @options bottom\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n verticalAlignment: ContentVerticalAlignments = 'top';\n\n /**\n * @type Boolean\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n fullHeight: ResponsiveString = 'false';\n\n /**\n * Pipe separated list of ContentLineTextAlignOptions for text alignment.\n * @type Select\n * @options default\n * @options left\n * @options center\n * @options right\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n textAlign: ContentLineTextAlignOptions = 'default';\n @Element() hostElement: HTMLStencilElement;\n @State() inlineStyle?: { [key: string]: string } = {};\n\n componentDidLoad() {\n if (!!this.hostElement.querySelector('[slot=\"footer\"]')) {\n this.hostElement.setAttribute('footer', 'true');\n }\n WindowResizeService.registerProp(this.minHeight).subscribe(newValue => {\n this.inlineStyle = { ...this.inlineStyle, 'min-height': isNaN(newValue as any) ? (newValue as string) : newValue + 'px' };\n });\n WindowResizeService.registerProp(this.textAlign).subscribe(newValue => (this.textAlign = newValue as ContentLineTextAlignOptions)),\n WindowResizeService.registerProp(this.fullHeight).subscribe(newValue => {\n this.fullHeight = newValue as string;\n });\n WindowResizeService.registerProp(this.verticalAlignment).subscribe(newValue => (this.verticalAlignment = newValue as ContentVerticalAlignments));\n WindowResizeService.registerProp(this.classes).subscribe(newValue => (this.classString = newValue as string));\n }\n\n render() {\n return (\n <Host class={this.classString} full-height={this.fullHeight} vertical-alignment={this.verticalAlignment} style={this.inlineStyle} text-align={this.textAlign}>\n <div class=\"content-text-block__content\">\n <slot name=\"content\"></slot>\n <slot></slot>\n </div>\n <slot name=\"footer\"></slot>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"content-text-block.js","sourceRoot":"","sources":["../../../../src/blocks/content-text-block/content-text-block.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAsB,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAI3E;;;;GAIG;AAMH,MAAM,OAAO,gBAAgB;;;;;iCAgCoB,KAAK;0BAUrB,OAAO;yBAeG,SAAS;2BAEC,EAAE;;IACrD,iBAAiB;QACf,IAAI,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,iBAAiB,CAAC,EAAE,CAAC;YACxD,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAClD,CAAC;QACD,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE;YACpE,IAAI,CAAC,WAAW,mCAAQ,IAAI,CAAC,WAAW,KAAE,YAAY,EAAE,KAAK,CAAC,QAAe,CAAC,CAAC,CAAC,CAAE,QAAmB,CAAC,CAAC,CAAC,QAAQ,GAAG,IAAI,GAAE,CAAC;QAC5H,CAAC,CAAC,CAAC;QACH,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,YAAY,EAAE,QAAuC,CAAC,CAAC,CAAC;QAC7J,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,oBAAoB,EAAE,QAAqC,CAAC,CAAC,CAAC;QAC3K,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE;YACrE,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,aAAa,EAAE,QAAkB,CAAC,CAAC;QACnE,CAAC,CAAC,CAAC;QACH,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,QAAkB,CAAC,CAAC,CAAC;IAChH,CAAC;IACD,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW;YACpD,WAAK,KAAK,EAAC,6BAA6B;gBACtC,YAAM,IAAI,EAAC,SAAS,GAAQ;gBAC5B,eAAa,CACT;YACN,YAAM,IAAI,EAAC,QAAQ,GAAQ,CACtB,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Host, Element, State } from '@stencil/core';\nimport { HTMLStencilElement, Prop } from '@stencil/core/internal';\nimport { WindowResizeService } from '../../services/window-resize-service';\nimport { ContentVerticalAlignments, ResponsiveString, ContentLineTextAlignOptions } from '../../typings';\nimport { objectToCssString } from '../../utils/utils';\n\n/**\n * @slot content - This slot will usually serve a text block.\n * @slot footer - This slot is placed below the content slot\n * @slot - Default slot, same as content slot\n */\n@Component({\n tag: 'content-text-block',\n styleUrl: 'content-text-block.scss',\n shadow: false,\n})\nexport class ContentTextBlock {\n /**\n * This is a pipe separated string representing the style class.\n * @type String\n * @responsive\n */\n @Prop() classes: ResponsiveString;\n @State() classString;\n\n /**\n * This is a pipe separated string representing the minimum height. Units without values default to pixels.\n * @type String\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n minHeight: ResponsiveString;\n\n /**\n * Pipe separated list of ContentVerticalAlignments for text box placement.\n * @type Select\n * @options top\n * @options center\n * @options bottom\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n verticalAlignment: ContentVerticalAlignments = 'top';\n\n /**\n * @type Boolean\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n fullHeight: ResponsiveString = 'false';\n\n /**\n * Pipe separated list of ContentLineTextAlignOptions for text alignment.\n * @type Select\n * @options default\n * @options left\n * @options center\n * @options right\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n textAlign: ContentLineTextAlignOptions = 'default';\n @Element() hostElement: HTMLStencilElement;\n @State() inlineStyle?: { [key: string]: string } = {};\n componentWillLoad() {\n if (!!this.hostElement.querySelector('[slot=\"footer\"]')) {\n this.hostElement.setAttribute('footer', 'true');\n }\n WindowResizeService.registerProp(this.minHeight).subscribe(newValue => {\n this.inlineStyle = { ...this.inlineStyle, 'min-height': isNaN(newValue as any) ? (newValue as string) : newValue + 'px' };\n });\n WindowResizeService.registerProp(this.textAlign).subscribe(newValue => this.hostElement.setAttribute('text-align', newValue as ContentLineTextAlignOptions));\n WindowResizeService.registerProp(this.verticalAlignment).subscribe(newValue => this.hostElement.setAttribute('vertical-alignment', newValue as ContentVerticalAlignments));\n WindowResizeService.registerProp(this.fullHeight).subscribe(newValue => {\n this.hostElement.setAttribute('full-height', newValue as string);\n });\n WindowResizeService.registerProp(this.classes).subscribe(newValue => (this.classString = newValue as string));\n }\n render() {\n return (\n <Host class={this.classString} style={this.inlineStyle}>\n <div class=\"content-text-block__content\">\n <slot name=\"content\"></slot>\n <slot></slot>\n </div>\n <slot name=\"footer\"></slot>\n </Host>\n );\n }\n}\n"]}
@@ -2,12 +2,6 @@
2
2
  box-sizing: border-box;
3
3
  }
4
4
 
5
- content-tout-block {
6
- visibility: hidden;
7
- }
8
- content-tout-block.hydrated {
9
- visibility: inherit;
10
- }
11
5
  content-tout-block .content-tout-block__media {
12
6
  position: relative;
13
7
  }
@@ -15,8 +15,6 @@ export class ContentToutBlock {
15
15
  }
16
16
  componentWillLoad() {
17
17
  this.hasMediaContent = !!this.hostElement.querySelector('[slot="mediaContent"]');
18
- }
19
- componentDidLoad() {
20
18
  WindowResizeService.registerProp(this.hover).subscribe(newValue => (this.hover = newValue));
21
19
  WindowResizeService.registerProp(this.classes).subscribe(newValue => (this.classString = newValue));
22
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"content-tout-block.js","sourceRoot":"","sources":["../../../../src/blocks/content-tout-block/content-tout-block.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAsB,IAAI,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAG3E;;;;;GAKG;AAMH,MAAM,OAAO,gBAAgB;;qBAUA,YAAY;;;+BAYH,KAAK;;IAEzC,iBAAiB;QACf,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,uBAAuB,CAAC,CAAC;IACnF,CAAC;IAED,gBAAgB;QACd,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,QAAkB,CAAC,CAAC,CAAC;QACtG,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,QAAkB,CAAC,CAAC,CAAC;IAChH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW;YAC9C,WAAK,KAAK,EAAC,2BAA2B;gBACpC,YAAM,IAAI,EAAC,OAAO,GAAQ;gBACzB,IAAI,CAAC,eAAe,IAAI,CACvB,WAAK,KAAK,EAAC,mCAAmC;oBAC5C,YAAM,IAAI,EAAC,cAAc,GAAQ,CAC7B,CACP,CACG;YACN,WAAK,KAAK,EAAC,6BAA6B;gBACtC,YAAM,IAAI,EAAC,SAAS,GAAQ;gBAC5B,eAAa,CACT,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Host, Element } from '@stencil/core';\nimport { HTMLStencilElement, Prop, State } from '@stencil/core/internal';\nimport { WindowResizeService } from '../../services/window-resize-service';\nimport { ResponsiveBoolean, ResponsiveString } from '../../typings';\n\n/**\n * @slot media - This slot is usually a video or image component.\n * @slot mediaContent - This is a layer that floats the media layer and is revealed on hover.\n * @slot content - This slot will usually serve a text block.\n * @slot - Default slot, same as content slot.\n */\n@Component({\n tag: 'content-tout-block',\n styleUrl: 'content-tout-block.scss',\n shadow: false,\n})\nexport class ContentToutBlock {\n /**\n * If true, the media content will show only on hover\n * @type Boolean\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n hover: ResponsiveBoolean = 'false|true';\n\n /**\n * @type String\n * @responsive\n */\n @Prop() classes: ResponsiveString;\n @State() classString;\n\n @Element() hostElement: HTMLStencilElement;\n hasMediaContent: boolean;\n\n @State() hasHoverContent: boolean = false;\n\n componentWillLoad() {\n this.hasMediaContent = !!this.hostElement.querySelector('[slot=\"mediaContent\"]');\n }\n\n componentDidLoad() {\n WindowResizeService.registerProp(this.hover).subscribe(newValue => (this.hover = newValue as string));\n WindowResizeService.registerProp(this.classes).subscribe(newValue => (this.classString = newValue as string));\n }\n\n render() {\n return (\n <Host hover={this.hover} class={this.classString}>\n <div class=\"content-tout-block__media\">\n <slot name=\"media\"></slot>\n {this.hasMediaContent && (\n <div class=\"content-tout-block__media-content\">\n <slot name=\"mediaContent\"></slot>\n </div>\n )}\n </div>\n <div class=\"content-tout-block__content\">\n <slot name=\"content\"></slot>\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"content-tout-block.js","sourceRoot":"","sources":["../../../../src/blocks/content-tout-block/content-tout-block.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAsB,IAAI,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAG3E;;;;;GAKG;AAMH,MAAM,OAAO,gBAAgB;;qBAUA,YAAY;;;+BAYH,KAAK;;IAEzC,iBAAiB;QACf,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,uBAAuB,CAAC,CAAC;QACjF,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,QAAkB,CAAC,CAAC,CAAC;QACtG,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,QAAkB,CAAC,CAAC,CAAC;IAChH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW;YAC9C,WAAK,KAAK,EAAC,2BAA2B;gBACpC,YAAM,IAAI,EAAC,OAAO,GAAQ;gBACzB,IAAI,CAAC,eAAe,IAAI,CACvB,WAAK,KAAK,EAAC,mCAAmC;oBAC5C,YAAM,IAAI,EAAC,cAAc,GAAQ,CAC7B,CACP,CACG;YACN,WAAK,KAAK,EAAC,6BAA6B;gBACtC,YAAM,IAAI,EAAC,SAAS,GAAQ;gBAC5B,eAAa,CACT,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Host, Element } from '@stencil/core';\nimport { HTMLStencilElement, Prop, State } from '@stencil/core/internal';\nimport { WindowResizeService } from '../../services/window-resize-service';\nimport { ResponsiveBoolean, ResponsiveString } from '../../typings';\n\n/**\n * @slot media - This slot is usually a video or image component.\n * @slot mediaContent - This is a layer that floats the media layer and is revealed on hover.\n * @slot content - This slot will usually serve a text block.\n * @slot - Default slot, same as content slot.\n */\n@Component({\n tag: 'content-tout-block',\n styleUrl: 'content-tout-block.scss',\n shadow: false,\n})\nexport class ContentToutBlock {\n /**\n * If true, the media content will show only on hover\n * @type Boolean\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n hover: ResponsiveBoolean = 'false|true';\n\n /**\n * @type String\n * @responsive\n */\n @Prop() classes: ResponsiveString;\n @State() classString;\n\n @Element() hostElement: HTMLStencilElement;\n hasMediaContent: boolean;\n\n @State() hasHoverContent: boolean = false;\n\n componentWillLoad() {\n this.hasMediaContent = !!this.hostElement.querySelector('[slot=\"mediaContent\"]');\n WindowResizeService.registerProp(this.hover).subscribe(newValue => (this.hover = newValue as string));\n WindowResizeService.registerProp(this.classes).subscribe(newValue => (this.classString = newValue as string));\n }\n\n render() {\n return (\n <Host hover={this.hover} class={this.classString}>\n <div class=\"content-tout-block__media\">\n <slot name=\"media\"></slot>\n {this.hasMediaContent && (\n <div class=\"content-tout-block__media-content\">\n <slot name=\"mediaContent\"></slot>\n </div>\n )}\n </div>\n <div class=\"content-tout-block__content\">\n <slot name=\"content\"></slot>\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -18,8 +18,8 @@
18
18
  ],
19
19
  "compiler": {
20
20
  "name": "@stencil/core",
21
- "version": "4.9.1",
22
- "typescriptVersion": "5.2.2"
21
+ "version": "4.10.0",
22
+ "typescriptVersion": "5.3.3"
23
23
  },
24
24
  "collections": [],
25
25
  "bundles": []
@@ -10,7 +10,7 @@ export class ContentAccordion {
10
10
  this.open = 'false|true';
11
11
  this.animationStart = 'animation-start';
12
12
  this.animationEnd = 'animation-end';
13
- this.animationTime = 300;
13
+ this.animationTime = 0;
14
14
  this.isOpen = false;
15
15
  this.randomID = '';
16
16
  this.classString = '';
@@ -160,7 +160,7 @@ export class ContentAccordion {
160
160
  },
161
161
  "attribute": "animation-time",
162
162
  "reflect": false,
163
- "defaultValue": "300"
163
+ "defaultValue": "0"
164
164
  }
165
165
  };
166
166
  }
@@ -1 +1 @@
1
- {"version":3,"file":"content-accordion.js","sourceRoot":"","sources":["../../../../src/components/content-accordion/content-accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAe,IAAI,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAGlE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAE3E;;;GAGG;AAMH,MAAM,OAAO,gBAAgB;;;oBASO,YAAY;8BAKrB,iBAAiB;4BAMnB,eAAe;6BAMd,GAAG;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,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;SACzI;IACH,CAAC;IAED,gBAAgB;QACd,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE;YAC/D,IAAI,CAAC,MAAM,GAAG,QAAQ,KAAK,MAAM,CAAC;YAClC,IAAI,IAAI,CAAC,MAAM,EAAE;gBACf,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;aAC7B;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAGD,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,IAAI,CAAC,MAAM;YAClD,cAAQ,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,mBAAiB,IAAI,CAAC,MAAM,mBAAiB,IAAI,CAAC,QAAQ;gBACtG,YAAM,IAAI,EAAC,SAAS,GAAQ,CACrB;YACT,WAAK,EAAE,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAC,uDAAuD;gBACnF,YAAM,IAAI,EAAC,SAAS,GAAQ;gBAC5B,eAAa,CACT,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, h, Host, Element } from '@stencil/core';\nimport { HostElement, Prop, State } from '@stencil/core/internal';\nimport W3DisclosureButton from './libraries/w3_disclosure_button';\nimport { ResponsiveBoolean } from '../../typings';\nimport { WindowResizeService } from '../../services/window-resize-service';\n\n/**\n * @slot content - This slot will usually serve a content button.\n * @slot - Default slot, same as content slot.\n */\n@Component({\n tag: 'content-accordion',\n styleUrl: 'content-accordion.scss',\n shadow: false,\n})\nexport class ContentAccordion {\n @Element() hostElement: HostElement;\n\n @State() revealElement!: HTMLDivElement;\n /**\n * \n * @type Boolean\n * @responsive\n */\n @Prop() open: ResponsiveBoolean = 'false|true';\n /**\n * The starting animation class in case you want to control content styling.\n * @type String\n */\n @Prop() animationStart = 'animation-start';\n\n /**\n * The ending animation class in case you want to control content styling.\n * @type String\n */\n @Prop() animationEnd = 'animation-end';\n\n /**\n * The amount of time in milliseconds to run the closing animation, before the class is removed\n * @type Number\n */\n @Prop() animationTime = 300;\n\n @State() isOpen = false;\n @State() randomID: string = '';\n @State() classString = '';\n\n timeoutHolder;\n handleClickEvent(e: MouseEvent) {\n this.animateAccordion(!this.isOpen);\n }\n\n animateAccordion(open, animationTime = this.animationTime) {\n if (this.timeoutHolder) {\n clearTimeout(this.timeoutHolder);\n }\n if (open) {\n this.isOpen = true;\n this.timeoutHolder = setTimeout(() => {\n this.hostElement.classList.add(this.animationStart);\n }, 0);\n } else {\n this.hostElement.classList.add(this.animationEnd);\n this.timeoutHolder = setTimeout(() => {\n this.hostElement.classList.remove(this.animationStart, this.animationEnd);\n this.isOpen = false;\n }, animationTime);\n }\n }\n\n componentWillLoad() {\n this.revealElement = this.hostElement.querySelector('.js-content-accordion-reveal');\n if (this.hostElement.id) {\n this.randomID = `${this.hostElement.tagName}_${this.hostElement.id}`;\n } else {\n this.randomID = `${this.hostElement.tagName}_${Math.floor(Math.random() * document.querySelectorAll(this.hostElement.tagName).length)}`;\n }\n }\n\n componentDidLoad() {\n WindowResizeService.registerProp(this.open).subscribe(newValue => {\n this.isOpen = newValue === 'true';\n if (this.isOpen) {\n this.animateAccordion(true);\n }\n });\n }\n\n\n render() {\n return (\n <Host class={this.classString} expanded={this.isOpen}>\n <button onClick={e => this.handleClickEvent(e)} aria-expanded={this.isOpen} aria-controls={this.randomID}>\n <slot name=\"trigger\"></slot>\n </button>\n <div id={this.randomID} class=\"js-content-accordion-reveal content-accordion__reveal\">\n <slot name=\"content\"></slot>\n <slot></slot>\n </div>\n </Host>\n );\n }\n\n}\n"]}
1
+ {"version":3,"file":"content-accordion.js","sourceRoot":"","sources":["../../../../src/components/content-accordion/content-accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAe,IAAI,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAGlE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAE3E;;;GAGG;AAMH,MAAM,OAAO,gBAAgB;;;oBASO,YAAY;8BAKrB,iBAAiB;4BAMnB,eAAe;6BAMd,CAAC;sBAEP,KAAK;wBACK,EAAE;2BACP,EAAE;;IAGzB,gBAAgB,CAAC,CAAa;QAC5B,IAAI,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;IAED,gBAAgB,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,CAAC,aAAa;QACvD,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YACvB,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACnC,CAAC;QACD,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;YACnB,IAAI,CAAC,aAAa,GAAG,UAAU,CAAC,GAAG,EAAE;gBACnC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;YACtD,CAAC,EAAE,CAAC,CAAC,CAAC;QACR,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YAClD,IAAI,CAAC,aAAa,GAAG,UAAU,CAAC,GA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AAC,gBAAgB,CAAC,CAAC,CAAC,mBAAiB,IAAI,CAAC,MAAM,mBAAiB,IAAI,CAAC,QAAQ;gBACtG,YAAM,IAAI,EAAC,SAAS,GAAQ,CACrB;YACT,WAAK,EAAE,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAC,uDAAuD;gBACnF,YAAM,IAAI,EAAC,SAAS,GAAQ;gBAC5B,eAAa,CACT,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Host, Element } from '@stencil/core';\nimport { HostElement, Prop, State } from '@stencil/core/internal';\nimport W3DisclosureButton from './libraries/w3_disclosure_button';\nimport { ResponsiveBoolean } from '../../typings';\nimport { WindowResizeService } from '../../services/window-resize-service';\n\n/**\n * @slot content - This slot will usually serve a content button.\n * @slot - Default slot, same as content slot.\n */\n@Component({\n tag: 'content-accordion',\n styleUrl: 'content-accordion.scss',\n shadow: false,\n})\nexport class ContentAccordion {\n @Element() hostElement: HostElement;\n\n @State() revealElement!: HTMLDivElement;\n /**\n *\n * @type Boolean\n * @responsive\n */\n @Prop() open: ResponsiveBoolean = 'false|true';\n /**\n * The starting animation class in case you want to control content styling.\n * @type String\n */\n @Prop() animationStart = 'animation-start';\n\n /**\n * The ending animation class in case you want to control content styling.\n * @type String\n */\n @Prop() animationEnd = 'animation-end';\n\n /**\n * The amount of time in milliseconds to run the closing animation, before the class is removed\n * @type Number\n */\n @Prop() animationTime = 0;\n\n @State() isOpen = false;\n @State() randomID: string = '';\n @State() classString = '';\n\n timeoutHolder;\n handleClickEvent(e: MouseEvent) {\n this.animateAccordion(!this.isOpen);\n }\n\n animateAccordion(open, animationTime = this.animationTime) {\n if (this.timeoutHolder) {\n clearTimeout(this.timeoutHolder);\n }\n if (open) {\n this.isOpen = true;\n this.timeoutHolder = setTimeout(() => {\n this.hostElement.classList.add(this.animationStart);\n }, 0);\n } else {\n this.hostElement.classList.add(this.animationEnd);\n this.timeoutHolder = setTimeout(() => {\n this.hostElement.classList.remove(this.animationStart, this.animationEnd);\n this.isOpen = false;\n }, animationTime);\n }\n }\n\n componentWillLoad() {\n this.revealElement = this.hostElement.querySelector('.js-content-accordion-reveal');\n if (this.hostElement.id) {\n this.randomID = `${this.hostElement.tagName}_${this.hostElement.id}`;\n } else {\n this.randomID = `${this.hostElement.tagName}_${Math.floor(Math.random() * document.querySelectorAll(this.hostElement.tagName).length)}`;\n }\n }\n\n componentDidLoad() {\n WindowResizeService.registerProp(this.open).subscribe(newValue => {\n this.isOpen = newValue === 'true';\n if (this.isOpen) {\n this.animateAccordion(true);\n }\n });\n }\n\n render() {\n return (\n <Host class={this.classString} expanded={this.isOpen}>\n <button onClick={e => this.handleClickEvent(e)} aria-expanded={this.isOpen} aria-controls={this.randomID}>\n <slot name=\"trigger\"></slot>\n </button>\n <div id={this.randomID} class=\"js-content-accordion-reveal content-accordion__reveal\">\n <slot name=\"content\"></slot>\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"w3_disclosure_button.js","sourceRoot":"","sources":["../../../../../src/components/content-accordion/libraries/w3_disclosure_button.ts"],"names":[],"mappings":"AAAA;;;;;;;;EAQE;AAEF;;;;EAIE;AACF,IAAI,YAAY,GAAG,UAAU,OAAO;IAElC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAEvB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;QAC3B,QAAQ,EAAE,EAAE;KACb,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,YAAY,CAAC,SAAS,CAAC,IAAI,GAAG;IAE5B,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;IAE5B,IAAI,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,CA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AAG,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;YACtC,EAAE,CAAC,IAAI,EAAE,CAAC;SACX;IACH,CAAC;CACF","sourcesContent":["/*\n* This content is licensed according to the W3C Software License at\n* https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document\n*\n* File: ButtonExpand.js\n*\n* Desc: Checkbox widget that implements ARIA Authoring Practices\n* for a menu of links\n*/\n\n/*\n* @constructor ButtonExpand\n*\n*\n*/\nvar ButtonExpand = function (domNode) {\n\n this.domNode = domNode;\n\n this.keyCode = Object.freeze({\n 'RETURN': 13\n });\n};\n\nButtonExpand.prototype.init = function () {\n\n this.controlledNode = false;\n\n var id = this.domNode.getAttribute('aria-controls');\n\n if (id) {\n this.controlledNode = document.getElementById(id);\n }\n this.domNode.addEventListener('keydown', this.handleKeydown.bind(this));\n this.domNode.addEventListener('click', this.handleClick.bind(this));\n this.domNode.addEventListener('focus', this.handleFocus.bind(this));\n this.domNode.addEventListener('blur', this.handleBlur.bind(this));\n\n if (this.domNode.getAttribute('aria-expanded') === 'false') {\n this.domNode.setAttribute('aria-expanded', 'false');\n this.hideContent();\n }\n};\n\nButtonExpand.prototype.showContent = function () {\n\n if (this.controlledNode) {\n this.controlledNode.style.display = 'block';\n }\n\n};\n\nButtonExpand.prototype.hideContent = function () {\n\n if (this.controlledNode) {\n this.controlledNode.style.display = 'none';\n }\n\n};\n\nButtonExpand.prototype.toggleExpand = function () {\n if (this.domNode.getAttribute('aria-expanded') === 'true') {\n this.domNode.setAttribute('aria-expanded', 'false');\n this.hideContent();\n }\n else {\n this.domNode.setAttribute('aria-expanded', 'true');\n this.showContent();\n }\n\n};\n\n/* EVENT HANDLERS */\n\nButtonExpand.prototype.handleKeydown = function (event) {\n\n switch (event.keyCode) {\n\n case this.keyCode.RETURN:\n\n this.toggleExpand();\n\n event.stopPropagation();\n event.preventDefault();\n break;\n\n default:\n break;\n }\n\n};\n\nButtonExpand.prototype.handleClick = function (e) {\n e.preventDefault();\n this.toggleExpand();\n};\n\nButtonExpand.prototype.handleFocus = function () {\n this.domNode.classList.add('focus');\n};\n\nButtonExpand.prototype.handleBlur = function () {\n this.domNode.classList.remove('focus');\n};\n\nexport default class W3DisclosureButton {\n constructor(stencilElement: HTMLElement) {\n\n var buttons = stencilElement.querySelectorAll('button[aria-controls], a[role=\"button\"][aria-controls]');\n for (var i = 0; i < buttons.length; i++) {\n var be = new ButtonExpand(buttons[i]);\n be.init();\n }\n }\n}"]}
1
+ {"version":3,"file":"w3_disclosure_button.js","sourceRoot":"","sources":["../../../../../src/components/content-accordion/libraries/w3_disclosure_button.ts"],"names":[],"mappings":"AAAA;;;;;;;;EAQE;AAEF;;;;EAIE;AACF,IAAI,YAAY,GAAG,UAAU,OAAO;IAElC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAEvB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;QAC3B,QAAQ,EAAE,EAAE;KACb,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,YAAY,CAAC,SAAS,CAAC,IAAI,GAAG;IAE5B,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;IAE5B,IAAI,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;IAEpD,IAAI,EAAE,EAAE,CAAC;QACP,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;IACD,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,SAAS,EAAK,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC3E,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,OAAO,EAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACzE,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,OAAO,EAAO,IAAI,CAAC,WAAW,CAAC,IA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,OAAO,EAAE,CAAC;QAEtB,KAAK,IAAI,CAAC,OAAO,CAAC,MAAM;YAEtB,IAAI,CAAC,YAAY,EAAE,CAAC;YAEpB,KAAK,CAAC,eAAe,EAAE,CAAC;YACxB,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,MAAM;QAER;YACE,MAAM;IACV,CAAC;AAEH,CAAC,CAAC;AAEF,YAAY,CAAC,SAAS,CAAC,WAAW,GAAG,UAAU,CAAC;IAC9C,CAAC,CAAC,cAAc,EAAE,CAAC;IACnB,IAAI,CAAC,YAAY,EAAE,CAAC;AACtB,CAAC,CAAC;AAEF,YAAY,CAAC,SAAS,CAAC,WAAW,GAAG;IACnC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACtC,CAAC,CAAC;AAEF,YAAY,CAAC,SAAS,CAAC,UAAU,GAAG;IAClC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACzC,CAAC,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,kBAAkB;IACrC,YAAY,cAA2B;QAErC,IAAI,OAAO,GAAI,cAAc,CAAC,gBAAgB,CAAC,wDAAwD,CAAC,CAAC;QACzG,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACxC,IAAI,EAAE,GAAG,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;YACtC,EAAE,CAAC,IAAI,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;CACF","sourcesContent":["/*\n* This content is licensed according to the W3C Software License at\n* https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document\n*\n* File: ButtonExpand.js\n*\n* Desc: Checkbox widget that implements ARIA Authoring Practices\n* for a menu of links\n*/\n\n/*\n* @constructor ButtonExpand\n*\n*\n*/\nvar ButtonExpand = function (domNode) {\n\n this.domNode = domNode;\n\n this.keyCode = Object.freeze({\n 'RETURN': 13\n });\n};\n\nButtonExpand.prototype.init = function () {\n\n this.controlledNode = false;\n\n var id = this.domNode.getAttribute('aria-controls');\n\n if (id) {\n this.controlledNode = document.getElementById(id);\n }\n this.domNode.addEventListener('keydown', this.handleKeydown.bind(this));\n this.domNode.addEventListener('click', this.handleClick.bind(this));\n this.domNode.addEventListener('focus', this.handleFocus.bind(this));\n this.domNode.addEventListener('blur', this.handleBlur.bind(this));\n\n if (this.domNode.getAttribute('aria-expanded') === 'false') {\n this.domNode.setAttribute('aria-expanded', 'false');\n this.hideContent();\n }\n};\n\nButtonExpand.prototype.showContent = function () {\n\n if (this.controlledNode) {\n this.controlledNode.style.display = 'block';\n }\n\n};\n\nButtonExpand.prototype.hideContent = function () {\n\n if (this.controlledNode) {\n this.controlledNode.style.display = 'none';\n }\n\n};\n\nButtonExpand.prototype.toggleExpand = function () {\n if (this.domNode.getAttribute('aria-expanded') === 'true') {\n this.domNode.setAttribute('aria-expanded', 'false');\n this.hideContent();\n }\n else {\n this.domNode.setAttribute('aria-expanded', 'true');\n this.showContent();\n }\n\n};\n\n/* EVENT HANDLERS */\n\nButtonExpand.prototype.handleKeydown = function (event) {\n\n switch (event.keyCode) {\n\n case this.keyCode.RETURN:\n\n this.toggleExpand();\n\n event.stopPropagation();\n event.preventDefault();\n break;\n\n default:\n break;\n }\n\n};\n\nButtonExpand.prototype.handleClick = function (e) {\n e.preventDefault();\n this.toggleExpand();\n};\n\nButtonExpand.prototype.handleFocus = function () {\n this.domNode.classList.add('focus');\n};\n\nButtonExpand.prototype.handleBlur = function () {\n this.domNode.classList.remove('focus');\n};\n\nexport default class W3DisclosureButton {\n constructor(stencilElement: HTMLElement) {\n\n var buttons = stencilElement.querySelectorAll('button[aria-controls], a[role=\"button\"][aria-controls]');\n for (var i = 0; i < buttons.length; i++) {\n var be = new ButtonExpand(buttons[i]);\n be.init();\n }\n }\n}"]}
@@ -18,8 +18,4 @@
18
18
  content-carousel {
19
19
  display: block;
20
20
  overflow: hidden;
21
- visibility: hidden;
22
- }
23
- content-carousel.hydrated {
24
- visibility: inherit;
25
21
  }
@@ -7,6 +7,7 @@ export class ContentCarousel {
7
7
  this.swiperOptions = '{"slidesPerView": 1, "slidesPerGroup": 1, "autoplay": true, "loop": false}';
8
8
  }
9
9
  getSwiperOptions(newOptions) {
10
+ console.log(this.swiperNextElement);
10
11
  return Object.assign({
11
12
  observer: true,
12
13
  observeParents: true,
@@ -87,7 +88,7 @@ export class ContentCarousel {
87
88
  "references": {
88
89
  "InitMethodType": {
89
90
  "location": "local",
90
- "path": "/Users/shahrukceo/Developer/content-blocks-monorepo/develop/packages/content-blocks-stenciljs/src/components/content-carousel/content-carousel.tsx",
91
+ "path": "/Users/shahrukceo/Developer/content-blocks-monorepo/packages/content-blocks-stenciljs/src/components/content-carousel/content-carousel.tsx",
91
92
  "id": "src/components/content-carousel/content-carousel.tsx::InitMethodType"
92
93
  }
93
94
  }
@@ -1 +1 @@
1
- {"version":3,"file":"content-carousel.js","sourceRoot":"","sources":["../../../../src/components/content-carousel/content-carousel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE1E,OAAO,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAavC,MAAM,OAAO,eAAe;;QAsB1B,eAAU,GAA6B,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;0BAf7B,MAAM;6BAKX,4EAA4E;;IAY5G,gBAAgB,CAAC,UAAkB;QACjC,OAAO,MAAM,CAAC,MAAM,CAAC;YACnB,QAAQ,EAAE,IAAI;YACd,cAAc,EAAE,IAAI;YACpB,UAAU,EAAE;gBACV,EAAE,EAAE,IAAI,CAAC,gBAAgB;aAC1B;YACD,UAAU,EAAE;gBACV,MAAM,EAAE,IAAI,CAAC,iBAAiB;gBAC9B,MAAM,EAAE,IA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AC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, h, Host, Prop, Listen, Element } from '@stencil/core';\nimport { HTMLStencilElement } from '@stencil/core/internal';\nimport { BehaviorSubject } from 'rxjs';\n// import { A11y, Navigation, Pagination } from 'swiper/modules';\n\n/**\n * @slot content - This slot will usually serve a content hero block or image.\n * @slot - Default slot, same as content slot.\n */\nexport type InitMethodType = 'load' | 'event';\n@Component({\n tag: 'content-carousel',\n styleUrl: 'content-carousel.scss',\n shadow: false,\n})\nexport class ContentCarousel {\n @Element() hostElement: HTMLStencilElement;\n /**\n * @type Select\n * @options load\n * @options init\n */\n @Prop() initMethod: InitMethodType = 'load';\n /**\n * @type JSON\n * @schema Swiper Options\n */\n @Prop() swiperOptions: string = '{\"slidesPerView\": 1, \"slidesPerGroup\": 1, \"autoplay\": true, \"loop\": false}';\n public swiperCarousel: any;\n public swiper?: HTMLDivElement;\n public swiperWrapper?: HTMLDivElement;\n public swiperPagination?: HTMLDivElement;\n public swiperPrevElement?: HTMLDivElement;\n public swiperNextElement?: HTMLDivElement;\n public swiperScrollbar?: HTMLDivElement;\n public swiperOptionsFinal;\n\n loadStatus: BehaviorSubject<boolean> = new BehaviorSubject(false);\n\n getSwiperOptions(newOptions: string): string {\n return Object.assign({\n observer: true,\n observeParents: true,\n pagination: {\n el: this.swiperPagination,\n },\n navigation: {\n nextEl: this.swiperNextElement,\n prevEl: this.swiperPrevElement,\n },\n scrollbar: {\n el: this.swiperScrollbar,\n },\n }, newOptions);\n }\n componentDidLoad() {\n if (this.initMethod === 'load') {\n if (this.swiperOptions) {\n this.swiperOptionsFinal = this.getSwiperOptions(JSON.parse(this.swiperOptions as string || ''));\n }\n \n let options = {\n root: null,\n rootMargin: '0px',\n threshold: 0.1,\n }\n \n let observer = new IntersectionObserver((entries) => {\n entries.forEach(async entry => {\n if (entry.isIntersecting && !this.loadStatus.getValue()) {\n await this.initSwiper();\n this.loadStatus.next(true);\n }\n });\n }, options);\n observer.observe(this.hostElement);\n }\n }\n\n @Listen('setSwiperOptions')\n setSwiperOptionsCallback(event: CustomEvent) {\n this.loadStatus.subscribe(async () => {\n let loaded = this.loadStatus.value;\n if (loaded) {\n this.swiperOptionsFinal = this.getSwiperOptions(event.detail);\n await this.initSwiper();\n }\n });\n }\n\n async initSwiper() {\n let Swiper = await import('swiper');\n for (const slide of this.swiperWrapper.children as any) {\n slide.classList.add('swiper-slide');\n }\n // configure Swiper to use modules\n this.swiperCarousel = new Swiper.Swiper(this.swiper, {\n ...this.swiperOptionsFinal, ...{\n // modules: [A11y, Navigation, Pagination]\n }\n });\n }\n\n render() {\n return (\n <Host>\n <div class=\"swiper\" ref={el => this.swiper = el as HTMLDivElement}>\n <div class=\"swiper-wrapper\" ref={el => this.swiperWrapper = el as HTMLDivElement}>\n <slot name=\"content\"></slot>\n <slot></slot>\n </div>\n <div class=\"swiper-pagination\" ref={el => this.swiperPagination = el as HTMLDivElement}></div>\n\n <div class=\"swiper-button-prev\" ref={el => this.swiperPrevElement = el as HTMLDivElement}></div>\n <div class=\"swiper-button-next\" ref={el => this.swiperNextElement = el as HTMLDivElement}></div>\n\n <div class=\"swiper-scrollbar\" ref={el => this.swiperScrollbar = el as HTMLDivElement}></div>\n </div>\n </Host>\n );\n }\n\n}\n"]}
1
+ {"version":3,"file":"content-carousel.js","sourceRoot":"","sources":["../../../../src/components/content-carousel/content-carousel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE1E,OAAO,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAavC,MAAM,OAAO,eAAe;;QAsB1B,eAAU,GAA6B,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;0BAf7B,MAAM;6BAKX,4EAA4E;;IA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,GAAQ;gBAE9F,WAAK,KAAK,EAAC,oBAAoB,EAAC,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,iBAAiB,GAAG,EAAoB,GAAQ;gBAChG,WAAK,KAAK,EAAC,oBAAoB,EAAC,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,iBAAiB,GAAG,EAAoB,GAAQ;gBAEhG,WAAK,KAAK,EAAC,kBAAkB,EAAC,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,eAAe,GAAG,EAAoB,GAAQ,CACxF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, h, Host, Prop, Listen, Element } from '@stencil/core';\nimport { HTMLStencilElement } from '@stencil/core/internal';\nimport { BehaviorSubject } from 'rxjs';\n// import { A11y, Navigation, Pagination } from 'swiper/modules';\n\n/**\n * @slot content - This slot will usually serve a content hero block or image.\n * @slot - Default slot, same as content slot.\n */\nexport type InitMethodType = 'load' | 'event';\n@Component({\n tag: 'content-carousel',\n styleUrl: 'content-carousel.scss',\n shadow: false,\n})\nexport class ContentCarousel {\n @Element() hostElement: HTMLStencilElement;\n /**\n * @type Select\n * @options load\n * @options init\n */\n @Prop() initMethod: InitMethodType = 'load';\n /**\n * @type JSON\n * @schema Swiper Options\n */\n @Prop() swiperOptions: string = '{\"slidesPerView\": 1, \"slidesPerGroup\": 1, \"autoplay\": true, \"loop\": false}';\n public swiperCarousel: any;\n public swiper?: HTMLDivElement;\n public swiperWrapper?: HTMLDivElement;\n public swiperPagination?: HTMLDivElement;\n public swiperPrevElement?: HTMLDivElement;\n public swiperNextElement?: HTMLDivElement;\n public swiperScrollbar?: HTMLDivElement;\n public swiperOptionsFinal;\n\n loadStatus: BehaviorSubject<boolean> = new BehaviorSubject(false);\n\n getSwiperOptions(newOptions: string): string {\n console.log(this.swiperNextElement);\n return Object.assign({\n observer: true,\n observeParents: true,\n pagination: {\n el: this.swiperPagination,\n },\n navigation: {\n nextEl: this.swiperNextElement,\n prevEl: this.swiperPrevElement,\n },\n scrollbar: {\n el: this.swiperScrollbar,\n },\n }, newOptions);\n }\n componentDidLoad() {\n if (this.initMethod === 'load') {\n if (this.swiperOptions) {\n this.swiperOptionsFinal = this.getSwiperOptions(JSON.parse(this.swiperOptions as string || ''));\n }\n \n let options = {\n root: null,\n rootMargin: '0px',\n threshold: 0.1,\n }\n \n let observer = new IntersectionObserver((entries) => {\n entries.forEach(async entry => {\n if (entry.isIntersecting && !this.loadStatus.getValue()) {\n await this.initSwiper();\n this.loadStatus.next(true);\n }\n });\n }, options);\n observer.observe(this.hostElement);\n }\n }\n\n @Listen('setSwiperOptions')\n setSwiperOptionsCallback(event: CustomEvent) {\n this.loadStatus.subscribe(async () => {\n let loaded = this.loadStatus.value;\n if (loaded) {\n this.swiperOptionsFinal = this.getSwiperOptions(event.detail);\n await this.initSwiper();\n }\n });\n }\n\n async initSwiper() {\n let Swiper = await import('swiper');\n for (const slide of this.swiperWrapper.children as any) {\n slide.classList.add('swiper-slide');\n }\n // configure Swiper to use modules\n this.swiperCarousel = new Swiper.Swiper(this.swiper, {\n ...this.swiperOptionsFinal, ...{\n // modules: [A11y, Navigation, Pagination]\n }\n });\n }\n\n render() {\n return (\n <Host>\n <div class=\"swiper\" ref={el => this.swiper = el as HTMLDivElement}>\n <div class=\"swiper-wrapper\" ref={el => this.swiperWrapper = el as HTMLDivElement}>\n <slot name=\"content\"></slot>\n <slot></slot>\n </div>\n <div class=\"swiper-pagination\" ref={el => this.swiperPagination = el as HTMLDivElement}></div>\n\n <div class=\"swiper-button-prev\" ref={el => this.swiperPrevElement = el as HTMLDivElement}></div>\n <div class=\"swiper-button-next\" ref={el => this.swiperNextElement = el as HTMLDivElement}></div>\n\n <div class=\"swiper-scrollbar\" ref={el => this.swiperScrollbar = el as HTMLDivElement}></div>\n </div>\n </Host>\n );\n }\n\n}\n"]}
@@ -6,12 +6,6 @@ body.content-navigation-block-open {
6
6
  overflow: hidden;
7
7
  }
8
8
 
9
- content-navigation-block {
10
- visibility: hidden;
11
- }
12
- content-navigation-block.hydrated {
13
- visibility: inherit;
14
- }
15
9
  content-navigation-block[hamburger=fixed], content-navigation-block[hamburger=absolute], content-navigation-block[hamburger=static] {
16
10
  display: inline-block;
17
11
  }