@content-blocks/js 0.5.0 → 0.7.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 (136) hide show
  1. package/dist/cjs/content-accordion_11.cjs.entry.js +79 -61
  2. package/dist/cjs/content-accordion_11.cjs.entry.js.map +1 -1
  3. package/dist/cjs/content-blocks.cjs.js +2 -2
  4. package/dist/cjs/content-carousel.cjs.entry.js +2 -1
  5. package/dist/cjs/content-carousel.cjs.entry.js.map +1 -1
  6. package/dist/cjs/content-navigation-block.cjs.entry.js +24 -20
  7. package/dist/cjs/content-navigation-block.cjs.entry.js.map +1 -1
  8. package/dist/cjs/content-split-block.cjs.entry.js +4 -4
  9. package/dist/cjs/content-split-block.cjs.entry.js.map +1 -1
  10. package/dist/cjs/content-tabs.cjs.entry.js +3 -3
  11. package/dist/cjs/{index-072153fb.js → index-9f20d89a.js} +34 -4
  12. package/dist/cjs/index-9f20d89a.js.map +1 -0
  13. package/dist/cjs/index.cjs.js +1 -1
  14. package/dist/cjs/loader.cjs.js +2 -2
  15. package/dist/cjs/{utils-9856e159.js → utils-db61cd70.js} +1 -3
  16. package/dist/cjs/utils-db61cd70.js.map +1 -0
  17. package/dist/cjs/{window-resize-service-77b2c64e.js → window-resize-service-ac5c2012.js} +2 -2
  18. package/dist/cjs/{window-resize-service-77b2c64e.js.map → window-resize-service-ac5c2012.js.map} +1 -1
  19. package/dist/collection/blocks/content-hero-block/content-hero-block.css +6 -0
  20. package/dist/collection/blocks/content-split-block/content-split-block.js +1 -1
  21. package/dist/collection/blocks/content-split-block/content-split-block.js.map +1 -1
  22. package/dist/collection/blocks/content-text-block/content-text-block.css +8 -8
  23. package/dist/collection/blocks/content-text-block/content-text-block.js +4 -4
  24. package/dist/collection/blocks/content-text-block/content-text-block.js.map +1 -1
  25. package/dist/collection/components/content-accordion/content-accordion.js +4 -6
  26. package/dist/collection/components/content-accordion/content-accordion.js.map +1 -1
  27. package/dist/collection/components/content-carousel/content-carousel.js +1 -0
  28. package/dist/collection/components/content-carousel/content-carousel.js.map +1 -1
  29. package/dist/collection/components/content-navigation-block/content-navigation-block.js +21 -17
  30. package/dist/collection/components/content-navigation-block/content-navigation-block.js.map +1 -1
  31. package/dist/collection/components/content-overlay/content-overlay.css +12 -9
  32. package/dist/collection/components/content-overlay/content-overlay.js +32 -17
  33. package/dist/collection/components/content-overlay/content-overlay.js.map +1 -1
  34. package/dist/collection/elements/content-button/content-button.js +2 -6
  35. package/dist/collection/elements/content-button/content-button.js.map +1 -1
  36. package/dist/collection/elements/content-image/content-image.css +4 -7
  37. package/dist/collection/elements/content-image/content-image.js +82 -21
  38. package/dist/collection/elements/content-image/content-image.js.map +1 -1
  39. package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.css +1 -0
  40. package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.js +58 -15
  41. package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.js.map +1 -1
  42. package/dist/collection/formatters/content-spacer/content-spacer.css +16 -3
  43. package/dist/collection/formatters/content-spacer/content-spacer.js +47 -5
  44. package/dist/collection/formatters/content-spacer/content-spacer.js.map +1 -1
  45. package/dist/collection/stories/ContentHeroBlock.stories.js +2 -2
  46. package/dist/collection/stories/ContentHeroBlock.stories.js.map +1 -1
  47. package/dist/collection/stories/FullPageExample.stories.js +11 -11
  48. package/dist/collection/stories/FullPageExample.stories.js.map +1 -1
  49. package/dist/components/content-accordion.js +3 -4
  50. package/dist/components/content-accordion.js.map +1 -1
  51. package/dist/components/content-button.js +3 -6
  52. package/dist/components/content-button.js.map +1 -1
  53. package/dist/components/content-carousel.js +2 -0
  54. package/dist/components/content-carousel.js.map +1 -1
  55. package/dist/components/content-grid-formatter2.js +19 -12
  56. package/dist/components/content-grid-formatter2.js.map +1 -1
  57. package/dist/components/content-hero-block.js +2 -1
  58. package/dist/components/content-hero-block.js.map +1 -1
  59. package/dist/components/content-image.js +30 -22
  60. package/dist/components/content-image.js.map +1 -1
  61. package/dist/components/content-line.js +1 -0
  62. package/dist/components/content-line.js.map +1 -1
  63. package/dist/components/content-navigation-block.js +22 -17
  64. package/dist/components/content-navigation-block.js.map +1 -1
  65. package/dist/components/content-overlay.js +29 -13
  66. package/dist/components/content-overlay.js.map +1 -1
  67. package/dist/components/content-spacer.js +8 -4
  68. package/dist/components/content-spacer.js.map +1 -1
  69. package/dist/components/content-split-block.js +2 -1
  70. package/dist/components/content-split-block.js.map +1 -1
  71. package/dist/components/content-tabs.js +1 -0
  72. package/dist/components/content-tabs.js.map +1 -1
  73. package/dist/components/content-text-block.js +5 -4
  74. package/dist/components/content-text-block.js.map +1 -1
  75. package/dist/components/content-tout-block.js +1 -0
  76. package/dist/components/content-tout-block.js.map +1 -1
  77. package/dist/components/content-video.js +1 -0
  78. package/dist/components/content-video.js.map +1 -1
  79. package/dist/components/utils.js +1 -1
  80. package/dist/components/utils.js.map +1 -1
  81. package/dist/content-blocks/content-blocks.esm.js +1 -1
  82. package/dist/content-blocks/content-blocks.esm.js.map +1 -1
  83. package/dist/content-blocks/index.esm.js +1 -1
  84. package/dist/content-blocks/p-24657e66.entry.js +10 -0
  85. package/dist/content-blocks/p-24657e66.entry.js.map +1 -0
  86. package/dist/content-blocks/{p-30ab003a.entry.js → p-271fb304.entry.js} +2 -2
  87. package/dist/content-blocks/p-271fb304.entry.js.map +1 -0
  88. package/dist/content-blocks/p-288eace9.js +3 -0
  89. package/dist/content-blocks/p-288eace9.js.map +1 -0
  90. package/dist/content-blocks/{p-fd14acd9.entry.js → p-4bfbd7ef.entry.js} +2 -2
  91. package/dist/content-blocks/{p-fd14acd9.entry.js.map → p-4bfbd7ef.entry.js.map} +1 -1
  92. package/dist/content-blocks/{p-ebaee21f.entry.js → p-6a177aef.entry.js} +2 -2
  93. package/dist/content-blocks/{p-ebaee21f.entry.js.map → p-6a177aef.entry.js.map} +1 -1
  94. package/dist/content-blocks/{p-2c515f18.entry.js → p-8cc22c1e.entry.js} +2 -2
  95. package/dist/content-blocks/{p-da2c36ea.js → p-b04fe808.js} +2 -2
  96. package/dist/content-blocks/{p-da2c36ea.js.map → p-b04fe808.js.map} +1 -1
  97. package/dist/content-blocks/{p-3b4b9ad1.js → p-cfb4593f.js} +2 -2
  98. package/dist/esm/content-accordion_11.entry.js +79 -61
  99. package/dist/esm/content-accordion_11.entry.js.map +1 -1
  100. package/dist/esm/content-blocks.js +3 -3
  101. package/dist/esm/content-carousel.entry.js +2 -1
  102. package/dist/esm/content-carousel.entry.js.map +1 -1
  103. package/dist/esm/content-navigation-block.entry.js +24 -20
  104. package/dist/esm/content-navigation-block.entry.js.map +1 -1
  105. package/dist/esm/content-split-block.entry.js +4 -4
  106. package/dist/esm/content-split-block.entry.js.map +1 -1
  107. package/dist/esm/content-tabs.entry.js +3 -3
  108. package/dist/esm/{index-5c31f78b.js → index-e848c048.js} +34 -4
  109. package/dist/esm/index-e848c048.js.map +1 -0
  110. package/dist/esm/index.js +1 -1
  111. package/dist/esm/loader.js +3 -3
  112. package/dist/esm/{utils-4f29a9cf.js → utils-4f78228e.js} +2 -2
  113. package/dist/esm/utils-4f78228e.js.map +1 -0
  114. package/dist/esm/{window-resize-service-332e7420.js → window-resize-service-f40ec51c.js} +2 -2
  115. package/dist/esm/{window-resize-service-332e7420.js.map → window-resize-service-f40ec51c.js.map} +1 -1
  116. package/dist/types/blocks/content-text-block/content-text-block.d.ts +1 -1
  117. package/dist/types/components/content-accordion/content-accordion.d.ts +6 -7
  118. package/dist/types/components/content-overlay/content-overlay.d.ts +6 -4
  119. package/dist/types/components.d.ts +67 -15
  120. package/dist/types/elements/content-button/content-button.d.ts +2 -2
  121. package/dist/types/elements/content-image/content-image.d.ts +13 -0
  122. package/dist/types/formatters/content-grid-formatter/content-grid-formatter.d.ts +10 -4
  123. package/dist/types/formatters/content-spacer/content-spacer.d.ts +11 -2
  124. package/dist/types/typings.d.ts +3 -3
  125. package/package.json +1 -1
  126. package/dist/cjs/index-072153fb.js.map +0 -1
  127. package/dist/cjs/utils-9856e159.js.map +0 -1
  128. package/dist/content-blocks/p-2faf0c78.js +0 -3
  129. package/dist/content-blocks/p-2faf0c78.js.map +0 -1
  130. package/dist/content-blocks/p-30ab003a.entry.js.map +0 -1
  131. package/dist/content-blocks/p-b8009321.entry.js +0 -10
  132. package/dist/content-blocks/p-b8009321.entry.js.map +0 -1
  133. package/dist/esm/index-5c31f78b.js.map +0 -1
  134. package/dist/esm/utils-4f29a9cf.js.map +0 -1
  135. /package/dist/content-blocks/{p-2c515f18.entry.js.map → p-8cc22c1e.entry.js.map} +0 -0
  136. /package/dist/content-blocks/{p-3b4b9ad1.js.map → p-cfb4593f.js.map} +0 -0
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const utils = require('./utils-9856e159.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-072153fb.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],"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],"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],"contentSlot":[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],"horizontal":[1537],"vertical":[1537],"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"],"horizontal":[1537],"vertical":[1537],"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"],"vertical":[1537],"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"],"vertical":[1537],"horizontal":[1537],"columns":[1537],"columnGap":[1537,"column-gap"],"classString":[32],"activeClassString":[32],"inlineStyle":[32]}]]]], options);
10
10
  };
11
11
 
12
12
  exports.setNonce = index.setNonce;
@@ -113,10 +113,8 @@ const utils = /*#__PURE__*/Object.freeze({
113
113
  objectToCssString: objectToCssString
114
114
  });
115
115
 
116
- exports.breakpointValues = breakpointValues;
117
116
  exports.getCurrentBreakpointIndex = getCurrentBreakpointIndex;
118
117
  exports.getCurrentValue = getCurrentValue;
119
- exports.getValueAtIndex = getValueAtIndex;
120
118
  exports.utils = utils;
121
119
 
122
- //# sourceMappingURL=utils-9856e159.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,IAAI,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,cAAc,UAAU,IAAI,CAAC,CAAC;;IAEnE,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QACzC,OAAO,CAAC,YAAY,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;QAC1C,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QACzC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;KAChC;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AAK,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-9856e159.js');
3
+ const utils = require('./utils-db61cd70.js');
4
4
  const BehaviorSubject = require('./BehaviorSubject-771fd78b.js');
5
5
 
6
6
  class WindowResizeController {
@@ -34,4 +34,4 @@ const WindowResizeService = new WindowResizeController();
34
34
 
35
35
  exports.WindowResizeService = WindowResizeService;
36
36
 
37
- //# sourceMappingURL=window-resize-service-77b2c64e.js.map
37
+ //# sourceMappingURL=window-resize-service-ac5c2012.js.map
@@ -1 +1 @@
1
- {"file":"window-resize-service-77b2c64e.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}
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}
@@ -18,6 +18,12 @@ content-hero-block[content-position=above] .content-hero-block__background {
18
18
  height: 100%;
19
19
  overflow: hidden;
20
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
+ }
21
27
  content-hero-block[content-position=above] .content-hero-block__content {
22
28
  display: flex;
23
29
  top: 0;
@@ -16,7 +16,7 @@ export class ContentSplitBlock {
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,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,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 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=\"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"]}
@@ -17,32 +17,32 @@ content-text-block > *[slot=footer] {
17
17
  padding-top: 1rem;
18
18
  height: auto;
19
19
  }
20
- content-text-block[vertical-alignment=bottom] > [slot=footer] {
20
+ content-text-block[vertical=bottom] > [slot=footer] {
21
21
  position: static;
22
22
  height: auto;
23
23
  }
24
- content-text-block[vertical-alignment] {
24
+ content-text-block[vertical] {
25
25
  display: flex;
26
26
  flex-direction: column;
27
27
  }
28
- content-text-block[vertical-alignment=top] {
28
+ content-text-block[vertical=top] {
29
29
  justify-content: flex-start;
30
30
  }
31
- content-text-block[vertical-alignment=center] {
31
+ content-text-block[vertical=center] {
32
32
  justify-content: center;
33
33
  }
34
- content-text-block[vertical-alignment=center][footer=true] .content-text-block__content {
34
+ content-text-block[vertical=center][footer=true] .content-text-block__content {
35
35
  margin-top: auto;
36
36
  margin-bottom: 0;
37
37
  }
38
- content-text-block[vertical-alignment=bottom] {
38
+ content-text-block[vertical=bottom] {
39
39
  justify-content: flex-end;
40
40
  }
41
- content-text-block[vertical-alignment=bottom][footer=true] .content-text-block__content {
41
+ content-text-block[vertical=bottom][footer=true] .content-text-block__content {
42
42
  margin-top: auto;
43
43
  margin-bottom: 0;
44
44
  }
45
- content-text-block[vertical-alignment=bottom][footer=true] > [slot=footer] {
45
+ content-text-block[vertical=bottom][footer=true] > [slot=footer] {
46
46
  margin-top: 0;
47
47
  }
48
48
  content-text-block[text-align=left] {
@@ -10,7 +10,7 @@ export class ContentTextBlock {
10
10
  this.classes = undefined;
11
11
  this.classString = undefined;
12
12
  this.minHeight = undefined;
13
- this.verticalAlignment = 'top';
13
+ this.vertical = 'top';
14
14
  this.fullHeight = 'false';
15
15
  this.textAlign = 'default';
16
16
  this.inlineStyle = {};
@@ -23,7 +23,7 @@ export class ContentTextBlock {
23
23
  this.inlineStyle = Object.assign(Object.assign({}, this.inlineStyle), { 'min-height': isNaN(newValue) ? newValue : newValue + 'px' });
24
24
  });
25
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));
26
+ WindowResizeService.registerProp(this.vertical).subscribe(newValue => this.hostElement.setAttribute('vertical', newValue));
27
27
  WindowResizeService.registerProp(this.fullHeight).subscribe(newValue => {
28
28
  this.hostElement.setAttribute('full-height', newValue);
29
29
  });
@@ -103,7 +103,7 @@ export class ContentTextBlock {
103
103
  "attribute": "min-height",
104
104
  "reflect": true
105
105
  },
106
- "verticalAlignment": {
106
+ "vertical": {
107
107
  "type": "string",
108
108
  "mutable": true,
109
109
  "complexType": {
@@ -138,7 +138,7 @@ export class ContentTextBlock {
138
138
  }],
139
139
  "text": "Pipe separated list of ContentVerticalAlignments for text box placement."
140
140
  },
141
- "attribute": "vertical-alignment",
141
+ "attribute": "vertical",
142
142
  "reflect": true,
143
143
  "defaultValue": "'top'"
144
144
  },
@@ -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,CA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,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"]}
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,I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AAI,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 vertical: 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.vertical).subscribe(newValue => this.hostElement.setAttribute('vertical', 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"]}
@@ -7,10 +7,10 @@ import { WindowResizeService } from "../../services/window-resize-service";
7
7
  export class ContentAccordion {
8
8
  constructor() {
9
9
  this.revealElement = undefined;
10
- this.open = 'false|true';
10
+ this.open = 'false';
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 = '';
@@ -44,8 +44,6 @@ export class ContentAccordion {
44
44
  else {
45
45
  this.randomID = `${this.hostElement.tagName}_${Math.floor(Math.random() * document.querySelectorAll(this.hostElement.tagName).length)}`;
46
46
  }
47
- }
48
- componentDidLoad() {
49
47
  WindowResizeService.registerProp(this.open).subscribe(newValue => {
50
48
  this.isOpen = newValue === 'true';
51
49
  if (this.isOpen) {
@@ -97,7 +95,7 @@ export class ContentAccordion {
97
95
  },
98
96
  "attribute": "open",
99
97
  "reflect": false,
100
- "defaultValue": "'false|true'"
98
+ "defaultValue": "'false'"
101
99
  },
102
100
  "animationStart": {
103
101
  "type": "string",
@@ -160,7 +158,7 @@ export class ContentAccordion {
160
158
  },
161
159
  "attribute": "animation-time",
162
160
  "reflect": false,
163
- "defaultValue": "300"
161
+ "defaultValue": "0"
164
162
  }
165
163
  };
166
164
  }
@@ -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;sBAET,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,aAA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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,CAAC;gBAChB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;YAC9B,CAAC;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"],"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Q;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';\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 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"]}
@@ -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,
@@ -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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EhG,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 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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Q;oBAC5B,eAAa,CACT;gBACN,WAAK,KAAK,EAAC,mBAAmB,EAAC,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,gBAAgB,GAAG,EAAoB,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"]}
@@ -27,26 +27,30 @@ export class ContentNavigationBlock {
27
27
  let openButton = this.hostElement.querySelector('[slot="openButton"]');
28
28
  let closeButton = this.hostElement.querySelector('[slot="closeButton"]');
29
29
  let content = this.hostElement.querySelector('[slot="content"]');
30
- openButton.onclick = () => {
31
- this.ariaExpanded = this.ariaExpanded === 'true' ? 'false' : 'true';
32
- content.setAttribute('hidden', this.ariaExpanded === 'false' ? 'true' : 'false');
33
- if (this.ariaExpanded === 'false') {
30
+ if (openButton) {
31
+ openButton.onclick = () => {
32
+ this.ariaExpanded = this.ariaExpanded === 'true' ? 'false' : 'true';
33
+ content.setAttribute('hidden', this.ariaExpanded === 'false' ? 'true' : 'false');
34
+ if (this.ariaExpanded === 'false') {
35
+ document.body.classList.remove('content-navigation-block-open');
36
+ }
37
+ else if (this.bodyToggle) {
38
+ document.body.classList.add('content-navigation-block-open');
39
+ }
40
+ setTimeout(() => closeButton.focus(), 1);
41
+ };
42
+ }
43
+ if (closeButton) {
44
+ closeButton.onclick = () => {
45
+ this.ariaExpanded = 'false';
46
+ content.setAttribute('hidden', 'true');
34
47
  document.body.classList.remove('content-navigation-block-open');
35
- }
36
- else if (this.bodyToggle) {
37
- document.body.classList.add('content-navigation-block-open');
38
- }
39
- setTimeout(() => closeButton.focus(), 1);
40
- };
41
- closeButton.onclick = () => {
42
- this.ariaExpanded = 'false';
43
- content.setAttribute('hidden', 'true');
44
- document.body.classList.remove('content-navigation-block-open');
45
- setTimeout(() => openButton.focus(), 1);
46
- };
48
+ setTimeout(() => openButton.focus(), 1);
49
+ };
50
+ }
47
51
  }
48
52
  render() {
49
- return (h(Host, { class: this.classString, "aria-expanded": this.ariaExpanded }, h("slot", null), h("slot", { name: "openButton" }), h("slot", { name: "closeButton" }), h("slot", { name: "content" })));
53
+ return (h(Host, { class: this.classString, "aria-expanded": this.ariaExpanded }, h("slot", { name: "openButton" }), h("slot", { name: "closeButton" }), h("div", { class: "content-navigation__menu" }, h("slot", { name: "content" }), h("slot", null))));
50
54
  }
51
55
  static get is() { return "content-navigation-block"; }
52
56
  static get originalStyleUrls() {
@@ -1 +1 @@
1
- {"version":3,"file":"content-navigation-block.js","sourceRoot":"","sources":["../../../../src/components/content-navigation-block/content-navigation-block.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAEzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAG3E;;;;GAIG;AAMH,MAAM,OAAO,sBAAsB;;yBAaH,YAAY;;;4BAaV,OAAO;0BACR,KAAK;;IAEpC,iBAAiB;QACf,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE;YACpE,IAAI,CAAC,SAAS,GAAG,QAAkB,CAAC;YACpC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,KAAK,OAAO,CAAC;YAC7C,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,+BAA+B,CAAC,CAAC;QAClE,CAAC,CAAC,CAAC;QACH,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE;YAClE,IAAI,CAAC,WAAW,GAAG,QAAkB,CAAC;QACxC,CAAC,CAAC,CAAC;IACL,CAAC;IAED,gBAAgB;QACd,IAAI,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,qBAAqB,CAAgB,CAAC;QACtF,IAAI,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,sBAAsB,CA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,EAAC,YAAY,GAAQ;YAC/B,YAAM,IAAI,EAAC,aAAa,GAAQ;YAChC,YAAM,IAAI,EAAC,SAAS,GAAQ,CACvB,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, Host, h, State, Element } from '@stencil/core';\nimport { HTMLStencilElement } from '@stencil/core/internal';\nimport { WindowResizeService } from '../../services/window-resize-service';\nimport { ResponsiveString } from '../../typings';\n\n/**\n * @slot openButton - This slot will expand the navigation when clicked.\n * @slot closeButton - This slot will close the navigation when clicked.\n * @slot content - Default slot\n */\n@Component({\n tag: 'content-navigation-block',\n styleUrl: 'content-navigation-block.scss',\n shadow: false,\n})\nexport class ContentNavigationBlock {\n /**\n * @type Select\n * @responsive\n * @options fixed\n * @options absolute\n * @options static\n * @options none\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n hamburger: ResponsiveString = 'fixed|none';\n\n /**\n * @type String\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n classes: ResponsiveString;\n @State() classString;\n @Element() hostElement: HTMLStencilElement;\n @State() ariaExpanded: string = 'false';\n @State() bodyToggle: boolean = false;\n\n componentWillLoad() {\n WindowResizeService.registerProp(this.hamburger).subscribe(newValue => {\n this.hamburger = newValue as string;\n this.bodyToggle = this.hamburger === 'fixed';\n document.body.classList.remove('content-navigation-block-open');\n });\n WindowResizeService.registerProp(this.classes).subscribe(newValue => {\n this.classString = newValue as string;\n });\n }\n\n componentDidLoad() {\n let openButton = this.hostElement.querySelector('[slot=\"openButton\"]') as HTMLElement;\n let closeButton = this.hostElement.querySelector('[slot=\"closeButton\"]') as HTMLElement;\n let content = this.hostElement.querySelector('[slot=\"content\"]') as HTMLElement;\n\n openButton.onclick = () => {\n this.ariaExpanded = this.ariaExpanded === 'true' ? 'false' : 'true';\n content.setAttribute('hidden', this.ariaExpanded === 'false' ? 'true' : 'false');\n if (this.ariaExpanded === 'false') {\n document.body.classList.remove('content-navigation-block-open');\n } else if (this.bodyToggle) {\n document.body.classList.add('content-navigation-block-open');\n }\n setTimeout(() => closeButton.focus(), 1);\n };\n closeButton.onclick = () => {\n this.ariaExpanded = 'false';\n content.setAttribute('hidden', 'true');\n document.body.classList.remove('content-navigation-block-open');\n setTimeout(() => openButton.focus(), 1);\n };\n }\n\n render() {\n return (\n <Host class={this.classString} aria-expanded={this.ariaExpanded}>\n <slot></slot>\n <slot name=\"openButton\"></slot>\n <slot name=\"closeButton\"></slot>\n <slot name=\"content\"></slot>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"content-navigation-block.js","sourceRoot":"","sources":["../../../../src/components/content-navigation-block/content-navigation-block.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAEzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAG3E;;;;GAIG;AAMH,MAAM,OAAO,sBAAsB;;yBAaH,YAAY;;;4BAaV,OAAO;0BACR,KAAK;;IAEpC,iBAAiB;QACf,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE;YACpE,IAAI,CAAC,SAAS,GAAG,QAAkB,CAAC;YACpC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,KAAK,OAAO,CAAC;YAC7C,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,+BAA+B,CAAC,CAAC;QAClE,CAAC,CAAC,CAAC;QACH,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE;YAClE,IAAI,CAAC,WAAW,GAAG,QAAkB,CAAC;QACxC,CAAC,C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+BAA+B,CAAC,CAAC;gBAChE,UAAU,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;YAC1C,CAAC,CAAC;QACJ,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,WAAW,mBAAiB,IAAI,CAAC,YAAY;YAC7D,YAAM,IAAI,EAAC,YAAY,GAAQ;YAC/B,YAAM,IAAI,EAAC,aAAa,GAAQ;YAChC,WAAK,KAAK,EAAC,0BAA0B;gBACnC,YAAM,IAAI,EAAC,SAAS,GAAQ;gBAC5B,eAAa,CACT,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, Host, h, State, Element } from '@stencil/core';\nimport { HTMLStencilElement } from '@stencil/core/internal';\nimport { WindowResizeService } from '../../services/window-resize-service';\nimport { ResponsiveString } from '../../typings';\n\n/**\n * @slot openButton - This slot will expand the navigation when clicked.\n * @slot closeButton - This slot will close the navigation when clicked.\n * @slot content - Default slot\n */\n@Component({\n tag: 'content-navigation-block',\n styleUrl: 'content-navigation-block.scss',\n shadow: false,\n})\nexport class ContentNavigationBlock {\n /**\n * @type Select\n * @responsive\n * @options fixed\n * @options absolute\n * @options static\n * @options none\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n hamburger: ResponsiveString = 'fixed|none';\n\n /**\n * @type String\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true,\n })\n classes: ResponsiveString;\n @State() classString;\n @Element() hostElement: HTMLStencilElement;\n @State() ariaExpanded: string = 'false';\n @State() bodyToggle: boolean = false;\n\n componentWillLoad() {\n WindowResizeService.registerProp(this.hamburger).subscribe(newValue => {\n this.hamburger = newValue as string;\n this.bodyToggle = this.hamburger === 'fixed';\n document.body.classList.remove('content-navigation-block-open');\n });\n WindowResizeService.registerProp(this.classes).subscribe(newValue => {\n this.classString = newValue as string;\n });\n }\n\n componentDidLoad() {\n let openButton = this.hostElement.querySelector('[slot=\"openButton\"]') as HTMLElement;\n let closeButton = this.hostElement.querySelector('[slot=\"closeButton\"]') as HTMLElement;\n let content = this.hostElement.querySelector('[slot=\"content\"]') as HTMLElement;\n if (openButton) {\n openButton.onclick = () => {\n this.ariaExpanded = this.ariaExpanded === 'true' ? 'false' : 'true';\n content.setAttribute('hidden', this.ariaExpanded === 'false' ? 'true' : 'false');\n if (this.ariaExpanded === 'false') {\n document.body.classList.remove('content-navigation-block-open');\n } else if (this.bodyToggle) {\n document.body.classList.add('content-navigation-block-open');\n }\n setTimeout(() => closeButton.focus(), 1);\n };\n }\n if (closeButton) {\n closeButton.onclick = () => {\n this.ariaExpanded = 'false';\n content.setAttribute('hidden', 'true');\n document.body.classList.remove('content-navigation-block-open');\n setTimeout(() => openButton.focus(), 1);\n };\n }\n }\n\n render() {\n return (\n <Host class={this.classString} aria-expanded={this.ariaExpanded}>\n <slot name=\"openButton\"></slot>\n <slot name=\"closeButton\"></slot>\n <div class=\"content-navigation__menu\">\n <slot name=\"content\"></slot>\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -9,31 +9,33 @@
9
9
  }
10
10
 
11
11
  content-overlay {
12
- display: block;
12
+ display: none;
13
13
  position: relative;
14
+ flex: 0;
14
15
  }
15
16
  content-overlay .content-overlay__content > *[slot=content] {
16
17
  height: 100%;
18
+ overflow: auto;
17
19
  }
18
- content-overlay.content-overlay-inactive {
19
- display: none;
20
+ content-overlay.content-overlay-active {
21
+ display: block;
20
22
  }
21
- content-overlay[vertical-position=left] {
23
+ content-overlay[vertical=left] {
22
24
  align-items: flex-start;
23
25
  }
24
- content-overlay[vertical-position=center] {
26
+ content-overlay[vertical=center] {
25
27
  align-items: center;
26
28
  }
27
- content-overlay[vertical-position=right] {
29
+ content-overlay[vertical=right] {
28
30
  align-items: flex-end;
29
31
  }
30
- content-overlay[vertical-position=top] {
32
+ content-overlay[vertical=top] {
31
33
  justify-content: flex-start;
32
34
  }
33
- content-overlay[vertical-position=center] {
35
+ content-overlay[vertical=center] {
34
36
  justify-content: center;
35
37
  }
36
- content-overlay[vertical-position=bottom] {
38
+ content-overlay[vertical=bottom] {
37
39
  justify-content: flex-end;
38
40
  }
39
41
  content-overlay .content-overlay-background {
@@ -60,6 +62,7 @@ content-overlay .content-overlay__close {
60
62
  appearance: none;
61
63
  background: none;
62
64
  border: none;
65
+ min-width: 16px;
63
66
  }
64
67
  content-overlay.content-overlay--fullscreen .content-overlay-background {
65
68
  position: fixed;