@content-blocks/js 0.7.6 → 0.8.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 (380) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +111 -3
  3. package/THIRD-PARTY-NOTICES.md +21 -0
  4. package/dist/cjs/{app-globals-3a1e7e63.js → app-globals-V2Kpy_OQ.js} +0 -2
  5. package/dist/cjs/content-accordion.cjs.entry.js +87 -0
  6. package/dist/cjs/content-blocks.cjs.js +35 -11
  7. package/dist/cjs/content-button.cjs.entry.js +113 -0
  8. package/dist/cjs/content-carousel.cjs.entry.js +153 -47
  9. package/dist/cjs/content-grid-formatter.cjs.entry.js +102 -0
  10. package/dist/cjs/content-hero-block.cjs.entry.js +45 -0
  11. package/dist/cjs/content-image.cjs.entry.js +153 -0
  12. package/dist/cjs/content-line.cjs.entry.js +61 -0
  13. package/dist/cjs/content-navigation-block.cjs.entry.js +51 -34
  14. package/dist/cjs/content-overlay.cjs.entry.js +641 -0
  15. package/dist/cjs/content-spacer.cjs.entry.js +75 -0
  16. package/dist/cjs/content-split-block.cjs.entry.js +22 -19
  17. package/dist/cjs/content-tabs.cjs.entry.js +38 -21
  18. package/dist/cjs/content-text-block.cjs.entry.js +63 -0
  19. package/dist/cjs/content-tout-block.cjs.entry.js +34 -0
  20. package/dist/cjs/{content-accordion_11.cjs.entry.js → content-video.cjs.entry.js} +14560 -12927
  21. package/dist/cjs/{focus-trap.esm-7bc384a0.js → focus-trap.esm-ZwN-anf1.js} +484 -190
  22. package/dist/cjs/{index-2e0ce692.js → index-B1U6Gweq.js} +348 -246
  23. package/dist/cjs/index-ClnpH9XB.js +2170 -0
  24. package/dist/cjs/index-CyalvZJn.js +1719 -0
  25. package/dist/cjs/index-DUvWvBDN.js +290 -0
  26. package/dist/cjs/index-voGY4Tkl.js +4705 -0
  27. package/dist/cjs/index.cjs.js +2 -5
  28. package/dist/cjs/loader.cjs.js +3 -8
  29. package/dist/cjs/responsive-component-C5eJS82z.js +171 -0
  30. package/dist/cjs/responsive-component-DMdnQIPV.js +171 -0
  31. package/dist/cjs/swiper-KLYbvU1K.js +3931 -0
  32. package/dist/cjs/{swiper-8221f4e8.js → swiper-_Z8Y4IJI.js} +269 -236
  33. package/dist/cjs/utils-BCHaRGm_.js +462 -0
  34. package/dist/cjs/{utils-df044337.js → utils-C3gXIS2t.js} +51 -49
  35. package/dist/cjs/utils-DUvWvBDN.js +290 -0
  36. package/dist/collection/blocks/content-hero-block/content-hero-block.css +1 -1
  37. package/dist/collection/blocks/content-hero-block/content-hero-block.js +33 -48
  38. package/dist/collection/blocks/content-split-block/content-split-block.css +16 -5
  39. package/dist/collection/blocks/content-split-block/content-split-block.js +29 -48
  40. package/dist/collection/blocks/content-text-block/content-text-block.js +65 -59
  41. package/dist/collection/blocks/content-tout-block/content-tout-block.css +3 -0
  42. package/dist/collection/blocks/content-tout-block/content-tout-block.js +22 -47
  43. package/dist/collection/collection-manifest.json +8 -5
  44. package/dist/collection/components/content-accordion/content-accordion.css +20 -1
  45. package/dist/collection/components/content-accordion/content-accordion.js +67 -33
  46. package/dist/collection/components/content-accordion/libraries/w3_disclosure_button.js +0 -1
  47. package/dist/collection/components/content-carousel/content-carousel.css +60 -4
  48. package/dist/collection/components/content-carousel/content-carousel.js +294 -44
  49. package/dist/collection/components/content-navigation-block/content-navigation-block.css +15 -1
  50. package/dist/collection/components/content-navigation-block/content-navigation-block.js +86 -42
  51. package/dist/collection/components/content-overlay/content-overlay.css +36 -5
  52. package/dist/collection/components/content-overlay/content-overlay.js +181 -120
  53. package/dist/collection/components/content-overlay/libraries/aria-dialog.js +0 -1
  54. package/dist/collection/components/content-overlay/libraries/aria-utilities.js +0 -1
  55. package/dist/collection/components/content-tabs/content-tabs.js +7 -49
  56. package/dist/collection/components/content-tabs/libraries/w3_tabs.js +0 -1
  57. package/dist/collection/elements/content-button/content-button.css +8 -7
  58. package/dist/collection/elements/content-button/content-button.js +103 -84
  59. package/dist/collection/elements/content-image/content-image.css +3 -1
  60. package/dist/collection/elements/content-image/content-image.js +176 -95
  61. package/dist/collection/elements/content-line/content-line.js +63 -54
  62. package/dist/collection/elements/content-video/content-video.css +1 -1
  63. package/dist/collection/elements/content-video/content-video.js +165 -92
  64. package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.css +8 -2
  65. package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.js +167 -89
  66. package/dist/collection/formatters/content-spacer/content-spacer.js +86 -209
  67. package/dist/collection/global/content-blocks-reset.css +77 -0
  68. package/dist/collection/index.js +1 -1
  69. package/dist/collection/sass/_mixins.scss +21 -5
  70. package/dist/collection/sass/_variables.scss +15 -15
  71. package/dist/collection/setupFiles.js +0 -1
  72. package/dist/collection/site/site.js +67 -0
  73. package/dist/collection/utils/breakpoints.js +162 -0
  74. package/dist/collection/utils/responsive-component.js +249 -0
  75. package/dist/collection/utils/utils.js +32 -42
  76. package/dist/components/content-accordion.js +65 -44
  77. package/dist/components/content-button.js +89 -43
  78. package/dist/components/content-carousel.js +172 -55
  79. package/dist/components/content-grid-formatter.js +127 -3
  80. package/dist/components/content-hero-block.js +33 -26
  81. package/dist/components/content-image.js +127 -71
  82. package/dist/components/content-line.js +56 -35
  83. package/dist/components/content-navigation-block.js +62 -39
  84. package/dist/components/content-overlay.js +128 -67
  85. package/dist/components/content-spacer.js +70 -54
  86. package/dist/components/content-split-block.js +33 -32
  87. package/dist/components/content-tabs.js +46 -25
  88. package/dist/components/content-text-block.js +55 -35
  89. package/dist/components/content-tout-block.js +29 -27
  90. package/dist/components/content-video.js +14624 -11972
  91. package/dist/{esm/focus-trap.esm-8fb54175.js → components/focus-trap.esm.js} +484 -190
  92. package/dist/components/index.d.ts +2 -0
  93. package/dist/components/index.js +3 -3
  94. package/dist/components/{p-5a91aa1b.js → index2.js} +348 -246
  95. package/dist/components/p-BWRCeMvO.js +1 -0
  96. package/dist/components/p-CYF5GU_q.js +1 -0
  97. package/dist/components/p-DXUoPIwl.js +10 -0
  98. package/dist/components/p-D_Ll4QNj.js +1 -0
  99. package/dist/components/p-DhIoW7H3.js +1 -0
  100. package/dist/components/responsive-component.js +168 -0
  101. package/dist/components/{p-e5dc4ea4.js → swiper.js} +268 -235
  102. package/dist/components/utils.js +4969 -0
  103. package/dist/{esm/utils-1c9f0ec1.js → components/utils2.js} +51 -50
  104. package/dist/content-blocks/content-accordion.entry.js +85 -0
  105. package/dist/content-blocks/content-blocks.esm.js +47 -2
  106. package/dist/content-blocks/content-button.entry.js +111 -0
  107. package/dist/content-blocks/content-carousel.entry.js +188 -0
  108. package/dist/content-blocks/content-grid-formatter.entry.js +100 -0
  109. package/dist/content-blocks/content-hero-block.entry.js +43 -0
  110. package/dist/content-blocks/content-image.entry.js +151 -0
  111. package/dist/content-blocks/content-line.entry.js +59 -0
  112. package/dist/content-blocks/content-navigation-block.entry.js +105 -0
  113. package/dist/content-blocks/content-overlay.entry.js +639 -0
  114. package/dist/content-blocks/content-spacer.entry.js +73 -0
  115. package/dist/content-blocks/content-split-block.entry.js +34 -0
  116. package/dist/content-blocks/content-tabs.entry.js +245 -0
  117. package/dist/content-blocks/content-text-block.entry.js +61 -0
  118. package/dist/content-blocks/content-tout-block.entry.js +32 -0
  119. package/dist/{esm/content-accordion_11.entry.js → content-blocks/content-video.entry.js} +14535 -12890
  120. package/dist/{components/p-a2fedf8a.js → content-blocks/focus-trap.esm-DXUoPIwl.js} +484 -190
  121. package/dist/content-blocks/global/content-blocks-reset.css +77 -0
  122. package/dist/content-blocks/index-BFDJMblF.js +4690 -0
  123. package/dist/{esm/index-f45a9c45.js → content-blocks/index-P1YnSd-O.js} +348 -246
  124. package/dist/content-blocks/index.esm.js +1 -2
  125. package/dist/content-blocks/p-008457f0.entry.js +1 -0
  126. package/dist/content-blocks/p-052692f1.entry.js +1 -0
  127. package/dist/content-blocks/p-0f71bd32.entry.js +1 -0
  128. package/dist/content-blocks/p-1f154617.entry.js +1 -0
  129. package/dist/content-blocks/p-2554ebd8.entry.js +1 -0
  130. package/dist/content-blocks/p-4afd6511.entry.js +1 -0
  131. package/dist/content-blocks/p-78d5de9f.entry.js +1 -0
  132. package/dist/content-blocks/p-7bcf7e7e.entry.js +1 -0
  133. package/dist/content-blocks/p-9058031c.entry.js +1 -0
  134. package/dist/content-blocks/p-9c41ac23.entry.js +17 -0
  135. package/dist/content-blocks/p-CLwOzPEO.js +3 -0
  136. package/dist/content-blocks/p-CYF5GU_q.js +1 -0
  137. package/dist/content-blocks/p-CjR_4mPu.js +1 -0
  138. package/dist/content-blocks/p-DQuL1Twl.js +1 -0
  139. package/dist/content-blocks/p-DXUoPIwl.js +10 -0
  140. package/dist/content-blocks/p-D_Ll4QNj.js +1 -0
  141. package/dist/content-blocks/p-DhIoW7H3.js +1 -0
  142. package/dist/content-blocks/p-DzYwy_62.js +1 -0
  143. package/dist/content-blocks/p-b2e6358a.entry.js +1 -0
  144. package/dist/content-blocks/p-c783bc68.entry.js +1 -0
  145. package/dist/content-blocks/p-e3d81e15.entry.js +1 -0
  146. package/dist/content-blocks/p-f23b4aae.entry.js +1 -0
  147. package/dist/content-blocks/p-f75c9094.entry.js +1 -0
  148. package/dist/content-blocks/responsive-component-BsLrcKbS.js +169 -0
  149. package/dist/content-blocks/sass/_mixins.scss +21 -5
  150. package/dist/content-blocks/sass/_variables.scss +15 -15
  151. package/dist/{esm/swiper-e9621adb.js → content-blocks/swiper-nBv069TB.js} +268 -235
  152. package/dist/{components/p-b85cfa86.js → content-blocks/utils--SDsQnWS.js} +51 -50
  153. package/dist/content-blocks/utils-Bak__24s.js +280 -0
  154. package/dist/docs.d.ts +480 -0
  155. package/dist/docs.json +5312 -0
  156. package/dist/esm/{app-globals-0f993ce5.js → app-globals-DQuL1Twl.js} +0 -2
  157. package/dist/esm/content-accordion.entry.js +85 -0
  158. package/dist/esm/content-blocks.js +33 -8
  159. package/dist/esm/content-button.entry.js +111 -0
  160. package/dist/esm/content-carousel.entry.js +153 -45
  161. package/dist/esm/content-grid-formatter.entry.js +100 -0
  162. package/dist/esm/content-hero-block.entry.js +43 -0
  163. package/dist/esm/content-image.entry.js +151 -0
  164. package/dist/esm/content-line.entry.js +59 -0
  165. package/dist/esm/content-navigation-block.entry.js +51 -32
  166. package/dist/esm/content-overlay.entry.js +639 -0
  167. package/dist/esm/content-spacer.entry.js +73 -0
  168. package/dist/esm/content-split-block.entry.js +22 -17
  169. package/dist/esm/content-tabs.entry.js +38 -19
  170. package/dist/esm/content-text-block.entry.js +61 -0
  171. package/dist/esm/content-tout-block.entry.js +32 -0
  172. package/dist/esm/content-video.entry.js +72033 -0
  173. package/dist/esm/focus-trap.esm-DXUoPIwl.js +1801 -0
  174. package/dist/esm/index-BASCLGuP.js +1713 -0
  175. package/dist/esm/index-BFDJMblF.js +4690 -0
  176. package/dist/esm/index-CLwOzPEO.js +2161 -0
  177. package/dist/esm/index-CjR_4mPu.js +280 -0
  178. package/dist/esm/index-P1YnSd-O.js +5397 -0
  179. package/dist/esm/index.js +1 -3
  180. package/dist/esm/loader.js +3 -6
  181. package/dist/esm/responsive-component-BsLrcKbS.js +169 -0
  182. package/dist/esm/responsive-component-D7dJHMp0.js +169 -0
  183. package/dist/esm/swiper-CtypHPwF.js +3928 -0
  184. package/dist/esm/swiper-nBv069TB.js +3941 -0
  185. package/dist/esm/utils--SDsQnWS.js +460 -0
  186. package/dist/esm/utils-Bak__24s.js +280 -0
  187. package/dist/esm/utils-CYF5GU_q.js +438 -0
  188. package/dist/node_modules/video.js/dist/video-js.min.css +1 -0
  189. package/dist/test/axe.js +60 -0
  190. package/dist/types/Users/shahrukceo/Developer/content-blocks/packages/js/.stencil/test/axe.d.ts +16 -0
  191. package/dist/types/blocks/content-hero-block/content-hero-block.d.ts +7 -11
  192. package/dist/types/blocks/content-split-block/content-split-block.d.ts +5 -9
  193. package/dist/types/blocks/content-text-block/content-text-block.d.ts +4 -9
  194. package/dist/types/blocks/content-tout-block/content-tout-block.d.ts +5 -10
  195. package/dist/types/components/content-accordion/content-accordion.d.ts +4 -3
  196. package/dist/types/components/content-accordion/libraries/w3_disclosure_button.d.ts +0 -1
  197. package/dist/types/components/content-carousel/content-carousel.d.ts +44 -7
  198. package/dist/types/components/content-navigation-block/content-navigation-block.d.ts +14 -8
  199. package/dist/types/components/content-overlay/content-overlay.d.ts +15 -16
  200. package/dist/types/components/content-overlay/libraries/aria-dialog.d.ts +0 -1
  201. package/dist/types/components/content-overlay/libraries/aria-utilities.d.ts +0 -1
  202. package/dist/types/components/content-tabs/content-tabs.d.ts +4 -10
  203. package/dist/types/components/content-tabs/libraries/w3_tabs.d.ts +0 -1
  204. package/dist/types/components.d.ts +900 -196
  205. package/dist/types/elements/content-button/content-button.d.ts +8 -13
  206. package/dist/types/elements/content-image/content-image.d.ts +15 -9
  207. package/dist/types/elements/content-line/content-line.d.ts +5 -12
  208. package/dist/types/elements/content-video/content-video.d.ts +12 -11
  209. package/dist/types/formatters/content-grid-formatter/content-grid-formatter.d.ts +14 -9
  210. package/dist/types/formatters/content-spacer/content-spacer.d.ts +4 -36
  211. package/dist/types/index.d.ts +3 -1
  212. package/dist/types/setupFiles.d.ts +0 -1
  213. package/dist/types/stencil-public-runtime.d.ts +265 -60
  214. package/dist/types/typings.d.ts +10 -0
  215. package/dist/types/utils/breakpoints.d.ts +57 -0
  216. package/dist/types/utils/responsive-component.d.ts +49 -0
  217. package/dist/types/utils/utils.d.ts +11 -8
  218. package/loader/cdn.js +1 -0
  219. package/loader/index.cjs.js +1 -0
  220. package/loader/index.d.ts +24 -0
  221. package/loader/index.es2017.js +1 -0
  222. package/loader/index.js +2 -0
  223. package/package.json +75 -65
  224. package/dist/cjs/BehaviorSubject-12116537.js +0 -655
  225. package/dist/cjs/BehaviorSubject-12116537.js.map +0 -1
  226. package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
  227. package/dist/cjs/content-accordion_11.cjs.entry.js.map +0 -1
  228. package/dist/cjs/content-blocks.cjs.js.map +0 -1
  229. package/dist/cjs/content-carousel.cjs.entry.js.map +0 -1
  230. package/dist/cjs/content-navigation-block.cjs.entry.js.map +0 -1
  231. package/dist/cjs/content-split-block.cjs.entry.js.map +0 -1
  232. package/dist/cjs/content-tabs.cjs.entry.js.map +0 -1
  233. package/dist/cjs/focus-trap.esm-7bc384a0.js.map +0 -1
  234. package/dist/cjs/index-2e0ce692.js.map +0 -1
  235. package/dist/cjs/index-8af2820a.js +0 -1650
  236. package/dist/cjs/index-8af2820a.js.map +0 -1
  237. package/dist/cjs/index.cjs.js.map +0 -1
  238. package/dist/cjs/loader.cjs.js.map +0 -1
  239. package/dist/cjs/swiper-8221f4e8.js.map +0 -1
  240. package/dist/cjs/utils-df044337.js.map +0 -1
  241. package/dist/cjs/utils-f8ccab0a.js +0 -126
  242. package/dist/cjs/utils-f8ccab0a.js.map +0 -1
  243. package/dist/cjs/window-resize-service-65a5a370.js +0 -37
  244. package/dist/cjs/window-resize-service-65a5a370.js.map +0 -1
  245. package/dist/collection/blocks/content-hero-block/content-hero-block.js.map +0 -1
  246. package/dist/collection/blocks/content-split-block/content-split-block.js.map +0 -1
  247. package/dist/collection/blocks/content-text-block/content-text-block.js.map +0 -1
  248. package/dist/collection/blocks/content-tout-block/content-tout-block.js.map +0 -1
  249. package/dist/collection/components/content-accordion/content-accordion.js.map +0 -1
  250. package/dist/collection/components/content-accordion/libraries/w3_disclosure_button.js.map +0 -1
  251. package/dist/collection/components/content-carousel/content-carousel.js.map +0 -1
  252. package/dist/collection/components/content-navigation-block/content-navigation-block.js.map +0 -1
  253. package/dist/collection/components/content-overlay/content-overlay.js.map +0 -1
  254. package/dist/collection/components/content-overlay/libraries/aria-dialog.js.map +0 -1
  255. package/dist/collection/components/content-overlay/libraries/aria-utilities.js.map +0 -1
  256. package/dist/collection/components/content-tabs/content-tabs.js.map +0 -1
  257. package/dist/collection/components/content-tabs/libraries/w3_tabs.js.map +0 -1
  258. package/dist/collection/elements/content-button/content-button.js.map +0 -1
  259. package/dist/collection/elements/content-image/content-image.js.map +0 -1
  260. package/dist/collection/elements/content-line/content-line.js.map +0 -1
  261. package/dist/collection/elements/content-video/content-video.js.map +0 -1
  262. package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.js.map +0 -1
  263. package/dist/collection/formatters/content-spacer/content-spacer.js.map +0 -1
  264. package/dist/collection/globalScript.js +0 -15
  265. package/dist/collection/globalScript.js.map +0 -1
  266. package/dist/collection/index.js.map +0 -1
  267. package/dist/collection/services/content-events-service.js +0 -23
  268. package/dist/collection/services/content-events-service.js.map +0 -1
  269. package/dist/collection/services/window-resize-service.js +0 -31
  270. package/dist/collection/services/window-resize-service.js.map +0 -1
  271. package/dist/collection/setupFiles.js.map +0 -1
  272. package/dist/collection/stories/ContentHeroBlock.stories.js +0 -51
  273. package/dist/collection/stories/ContentHeroBlock.stories.js.map +0 -1
  274. package/dist/collection/stories/ContentNavigationBlock.stories.js +0 -33
  275. package/dist/collection/stories/ContentNavigationBlock.stories.js.map +0 -1
  276. package/dist/collection/stories/ContentSpacer.stories.js +0 -20
  277. package/dist/collection/stories/ContentSpacer.stories.js.map +0 -1
  278. package/dist/collection/stories/ContentTextBlock.stories.js +0 -17
  279. package/dist/collection/stories/ContentTextBlock.stories.js.map +0 -1
  280. package/dist/collection/stories/ContentToutBlock.stories.js +0 -17
  281. package/dist/collection/stories/ContentToutBlock.stories.js.map +0 -1
  282. package/dist/collection/stories/FullPageExample.stories.js +0 -432
  283. package/dist/collection/stories/FullPageExample.stories.js.map +0 -1
  284. package/dist/collection/stories/assets/accessibility.svg +0 -5
  285. package/dist/collection/stories/assets/discord.svg +0 -15
  286. package/dist/collection/stories/assets/github.svg +0 -3
  287. package/dist/collection/stories/assets/tutorials.svg +0 -12
  288. package/dist/collection/stories/assets/youtube.svg +0 -4
  289. package/dist/collection/utils/utils.js.map +0 -1
  290. package/dist/components/content-accordion.js.map +0 -1
  291. package/dist/components/content-button.js.map +0 -1
  292. package/dist/components/content-carousel.js.map +0 -1
  293. package/dist/components/content-grid-formatter.js.map +0 -1
  294. package/dist/components/content-hero-block.js.map +0 -1
  295. package/dist/components/content-image.js.map +0 -1
  296. package/dist/components/content-line.js.map +0 -1
  297. package/dist/components/content-navigation-block.js.map +0 -1
  298. package/dist/components/content-overlay.js.map +0 -1
  299. package/dist/components/content-spacer.js.map +0 -1
  300. package/dist/components/content-split-block.js.map +0 -1
  301. package/dist/components/content-tabs.js.map +0 -1
  302. package/dist/components/content-text-block.js.map +0 -1
  303. package/dist/components/content-tout-block.js.map +0 -1
  304. package/dist/components/content-video.js.map +0 -1
  305. package/dist/components/index.js.map +0 -1
  306. package/dist/components/p-26483b46.js +0 -35
  307. package/dist/components/p-26483b46.js.map +0 -1
  308. package/dist/components/p-5a91aa1b.js.map +0 -1
  309. package/dist/components/p-74be971f.js +0 -652
  310. package/dist/components/p-74be971f.js.map +0 -1
  311. package/dist/components/p-7a436263.js +0 -122
  312. package/dist/components/p-7a436263.js.map +0 -1
  313. package/dist/components/p-a2fedf8a.js.map +0 -1
  314. package/dist/components/p-b85cfa86.js.map +0 -1
  315. package/dist/components/p-e28db040.js +0 -1452
  316. package/dist/components/p-e28db040.js.map +0 -1
  317. package/dist/components/p-e5dc4ea4.js.map +0 -1
  318. package/dist/components/p-e9bce2ab.js +0 -88
  319. package/dist/components/p-e9bce2ab.js.map +0 -1
  320. package/dist/content-blocks/content-blocks.esm.js.map +0 -1
  321. package/dist/content-blocks/index.esm.js.map +0 -1
  322. package/dist/content-blocks/p-13c3cc4f.js +0 -3
  323. package/dist/content-blocks/p-13c3cc4f.js.map +0 -1
  324. package/dist/content-blocks/p-5422c25b.entry.js +0 -2
  325. package/dist/content-blocks/p-5422c25b.entry.js.map +0 -1
  326. package/dist/content-blocks/p-5a91aa1b.js +0 -2
  327. package/dist/content-blocks/p-5a91aa1b.js.map +0 -1
  328. package/dist/content-blocks/p-650d1757.js +0 -2
  329. package/dist/content-blocks/p-650d1757.js.map +0 -1
  330. package/dist/content-blocks/p-74be971f.js +0 -2
  331. package/dist/content-blocks/p-74be971f.js.map +0 -1
  332. package/dist/content-blocks/p-8deb755c.entry.js +0 -26
  333. package/dist/content-blocks/p-8deb755c.entry.js.map +0 -1
  334. package/dist/content-blocks/p-a2fedf8a.js +0 -10
  335. package/dist/content-blocks/p-a2fedf8a.js.map +0 -1
  336. package/dist/content-blocks/p-b305392e.entry.js +0 -2
  337. package/dist/content-blocks/p-b305392e.entry.js.map +0 -1
  338. package/dist/content-blocks/p-b85cfa86.js +0 -2
  339. package/dist/content-blocks/p-b85cfa86.js.map +0 -1
  340. package/dist/content-blocks/p-cc7397cf.js +0 -2
  341. package/dist/content-blocks/p-cc7397cf.js.map +0 -1
  342. package/dist/content-blocks/p-d62775d7.entry.js +0 -2
  343. package/dist/content-blocks/p-d62775d7.entry.js.map +0 -1
  344. package/dist/content-blocks/p-e1255160.js +0 -2
  345. package/dist/content-blocks/p-e1255160.js.map +0 -1
  346. package/dist/content-blocks/p-e5dc4ea4.js +0 -2
  347. package/dist/content-blocks/p-e5dc4ea4.js.map +0 -1
  348. package/dist/content-blocks/p-f73f934a.entry.js +0 -2
  349. package/dist/content-blocks/p-f73f934a.entry.js.map +0 -1
  350. package/dist/esm/BehaviorSubject-f7a12fd8.js +0 -652
  351. package/dist/esm/BehaviorSubject-f7a12fd8.js.map +0 -1
  352. package/dist/esm/app-globals-0f993ce5.js.map +0 -1
  353. package/dist/esm/content-accordion_11.entry.js.map +0 -1
  354. package/dist/esm/content-blocks.js.map +0 -1
  355. package/dist/esm/content-carousel.entry.js.map +0 -1
  356. package/dist/esm/content-navigation-block.entry.js.map +0 -1
  357. package/dist/esm/content-split-block.entry.js.map +0 -1
  358. package/dist/esm/content-tabs.entry.js.map +0 -1
  359. package/dist/esm/focus-trap.esm-8fb54175.js.map +0 -1
  360. package/dist/esm/index-ec24af7a.js +0 -1621
  361. package/dist/esm/index-ec24af7a.js.map +0 -1
  362. package/dist/esm/index-f45a9c45.js.map +0 -1
  363. package/dist/esm/index.js.map +0 -1
  364. package/dist/esm/loader.js.map +0 -1
  365. package/dist/esm/swiper-e9621adb.js.map +0 -1
  366. package/dist/esm/utils-1c9f0ec1.js.map +0 -1
  367. package/dist/esm/utils-9a901aa9.js +0 -122
  368. package/dist/esm/utils-9a901aa9.js.map +0 -1
  369. package/dist/esm/window-resize-service-354f2ac5.js +0 -35
  370. package/dist/esm/window-resize-service-354f2ac5.js.map +0 -1
  371. package/dist/types/globalScript.d.ts +0 -1
  372. package/dist/types/old-components.d.ts +0 -1239
  373. package/dist/types/services/content-events-service.d.ts +0 -11
  374. package/dist/types/services/window-resize-service.d.ts +0 -11
  375. package/dist/types/stories/ContentHeroBlock.stories.d.ts +0 -11
  376. package/dist/types/stories/ContentNavigationBlock.stories.d.ts +0 -9
  377. package/dist/types/stories/ContentSpacer.stories.d.ts +0 -15
  378. package/dist/types/stories/ContentTextBlock.stories.d.ts +0 -9
  379. package/dist/types/stories/ContentToutBlock.stories.d.ts +0 -9
  380. package/dist/types/stories/FullPageExample.stories.d.ts +0 -10
@@ -0,0 +1,290 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Breakpoints, and how a responsive value is read against them.
5
+ *
6
+ * A responsive value is written in one of two ways:
7
+ *
8
+ * Named: columns="1|tablet=2|desktop=4" or by width: columns="1|640=2"
9
+ * The first value may leave out the name: it is the base, from 0. A value names the breakpoint,
10
+ * or the width in pixels, it starts at, and applies from that width up. A later value without
11
+ * a name starts at the next breakpoint above the one before it: 1|640=2|4 is 4 from tablet up.
12
+ *
13
+ * Positional: columns="1|2|4"
14
+ * One value per breakpoint, smallest first. A breakpoint without a value keeps the one before it.
15
+ *
16
+ * A site sets its own breakpoints, by name, before the components load or at any time after:
17
+ *
18
+ * window.$contentBlocks = { breakpoints: { tablet: 768, desktop: 1024 } };
19
+ * setBreakpoints({ tablet: 768, desktop: 1024 });
20
+ *
21
+ * State lives on window, not in this module: a page can load the library more than once (the lazy loader, the
22
+ * custom elements build and the npm entry each have their own copy of this file), and every copy must agree.
23
+ */
24
+ // Used when the site sets none
25
+ const defaultBreakpoints = {
26
+ mobile: 0,
27
+ tablet: 768,
28
+ laptop: 1024,
29
+ desktop: 1366,
30
+ wide: 1440,
31
+ ultrawide: 1920,
32
+ };
33
+ // The event setBreakpoints sends, so every copy of the library works its values out again
34
+ const BREAKPOINTS_CHANGED = 'contentblocks:breakpoints';
35
+ // name=value, or width=value with the width in pixels (640= or 640px=). A name starts with a letter and a
36
+ // width is only digits, so values that contain = after other characters, such as an image URL with ?w=600,
37
+ // are never read as named.
38
+ const NAMED = /^([a-z][a-z0-9-]*|\d+(?:px)?)=(.*)$/;
39
+ // Widths written in values, such as 640 in 1|640=2, that are not breakpoints. The components watch them too,
40
+ // so a value switches when the screen crosses one.
41
+ const widths = new Set();
42
+ const widthListeners = new Set();
43
+ /** Widths written in values that are not breakpoints, and a way to hear of new ones. */
44
+ function getValueWidths() {
45
+ return [...widths];
46
+ }
47
+ function onValueWidth(listener) {
48
+ widthListeners.add(listener);
49
+ }
50
+ const warned = new Set();
51
+ function warn(message) {
52
+ if (warned.has(message))
53
+ return;
54
+ warned.add(message);
55
+ console.warn(`Content Blocks: ${message}`);
56
+ }
57
+ // Breakpoints from the site's setting, checked and sorted. Kept until the setting is replaced.
58
+ let cache;
59
+ function fromSetting(source) {
60
+ const list = [];
61
+ const entries = Array.isArray(source) ? source.map(width => ['', width]) : Object.entries(source);
62
+ for (const [name, width] of entries) {
63
+ if (name && !/^[a-z][a-z0-9-]*$/.test(name)) {
64
+ warn(`the breakpoint name "${name}" is left out. Use lowercase letters, numbers and hyphens, starting with a letter.`);
65
+ continue;
66
+ }
67
+ if (typeof width !== 'number' || !Number.isInteger(width) || width < 0) {
68
+ warn(`the breakpoint ${name ? `"${name}" ` : ''}is left out: its width must be a whole number of pixels, 0 or more.`);
69
+ continue;
70
+ }
71
+ const same = list.find(breakpoint => breakpoint.width === width);
72
+ if (same) {
73
+ warn(`"${name}" and "${same.name}" are both ${width}px. Only "${same.name}" is used.`);
74
+ continue;
75
+ }
76
+ list.push({ name, width });
77
+ }
78
+ list.sort((a, b) => a.width - b.width);
79
+ // Every screen is covered: below the smallest breakpoint is the base
80
+ if (list[0]?.width !== 0)
81
+ list.unshift({ name: '', width: 0 });
82
+ return list;
83
+ }
84
+ /** The breakpoints in use, smallest first. The first always starts at 0. */
85
+ function getBreakpoints() {
86
+ const config = typeof window === 'undefined' ? undefined : window.$contentBlocks;
87
+ const source = config?.breakpoints ?? config?.breakpointValues ?? defaultBreakpoints;
88
+ if (cache?.source !== source)
89
+ cache = { source, list: fromSetting(source) };
90
+ return cache.list;
91
+ }
92
+ /**
93
+ * Sets the site's breakpoints, by name and the width in pixels each starts at, replacing the defaults.
94
+ * Components already on the page work their values out again.
95
+ */
96
+ function setBreakpoints(breakpoints) {
97
+ if (typeof window === 'undefined')
98
+ return;
99
+ window.$contentBlocks = { ...window.$contentBlocks, breakpoints };
100
+ window.dispatchEvent(new CustomEvent(BREAKPOINTS_CHANGED));
101
+ }
102
+ /** Each value in a responsive value and the screen width it starts at, smallest first. */
103
+ function parseResponsiveValue(value) {
104
+ const breakpoints = getBreakpoints();
105
+ const parts = value.split('|').map(part => part.trim());
106
+ // Positional: one value per breakpoint, a blank keeping the one before it
107
+ if (!parts.some(part => NAMED.test(part))) {
108
+ let last = parts[0];
109
+ return breakpoints.map((breakpoint, index) => {
110
+ last = parts[index] || last;
111
+ return { from: breakpoint.width, value: last };
112
+ });
113
+ }
114
+ // Named. The first value may leave out its name, as the base from 0. A later value without a name starts at
115
+ // the next breakpoint above the value before it, so 1|640=2|4 is 4 from tablet (768) up. A blank one moves on
116
+ // a breakpoint without a value of its own, as in positional values.
117
+ const found = new Map();
118
+ let previous = -1;
119
+ parts.forEach(part => {
120
+ const match = part.match(NAMED);
121
+ if (!match) {
122
+ const next = breakpoints.find(breakpoint => breakpoint.width > previous);
123
+ if (!next) {
124
+ if (part)
125
+ warn(`"${part}" in "${value}" is left out: there is no breakpoint after the value before it.`);
126
+ return;
127
+ }
128
+ if (part)
129
+ found.set(next.width, part);
130
+ previous = next.width;
131
+ return;
132
+ }
133
+ const [, name, named] = match;
134
+ if (/^\d/.test(name)) {
135
+ const width = parseInt(name, 10);
136
+ if (!breakpoints.some(breakpoint => breakpoint.width === width) && !widths.has(width)) {
137
+ widths.add(width);
138
+ widthListeners.forEach(listener => listener(width));
139
+ }
140
+ found.set(width, named.trim());
141
+ previous = width;
142
+ return;
143
+ }
144
+ const breakpoint = breakpoints.find(candidate => candidate.name === name);
145
+ if (!breakpoint) {
146
+ const names = breakpoints.map(candidate => candidate.name).filter(Boolean);
147
+ warn(`"${part}" in "${value}" is left out: there is no breakpoint called "${name}". The breakpoints are ${names.join(', ') || 'unnamed'}.`);
148
+ return;
149
+ }
150
+ // Written last wins, so a later value for the same breakpoint replaces an earlier one
151
+ found.set(breakpoint.width, named.trim());
152
+ previous = breakpoint.width;
153
+ });
154
+ return [...found.entries()].sort(([a], [b]) => a - b).map(([from, named]) => ({ from, value: named }));
155
+ }
156
+ /** A parsed value at a screen width: the value that starts at or below it, else the smallest one. */
157
+ function valueAt(parsed, width) {
158
+ let found = parsed[0]?.value ?? '';
159
+ for (const entry of parsed) {
160
+ if (entry.from <= width)
161
+ found = entry.value;
162
+ }
163
+ return found;
164
+ }
165
+
166
+ // The default breakpoints' names, labels and widths, smallest first
167
+ const breakpoints = ['mobile', 'tablet', 'laptop', 'desktop', 'wide', 'ultrawide'];
168
+ const breakpointLabels = ['Mobile', 'Tablet', 'Laptop', 'Desktop', 'Wide', 'Ultrawide'];
169
+ const breakpointValues = [0, 768, 1024, 1366, 1440, 1920];
170
+ /** The widths of the breakpoints in use, smallest first. */
171
+ function getBreakpointValues() {
172
+ return getBreakpoints().map(breakpoint => breakpoint.width);
173
+ }
174
+ /** A responsive value's value at each breakpoint in use, smallest first. Named values work too. */
175
+ function generateResponsiveValues(responsiveValue) {
176
+ if (!responsiveValue) {
177
+ return [];
178
+ }
179
+ const parsed = parseResponsiveValue(responsiveValue);
180
+ return getBreakpointValues().map(width => valueAt(parsed, width));
181
+ }
182
+ /** The index of the breakpoint the screen is in. */
183
+ function getCurrentBreakpointIndex() {
184
+ if (typeof window === 'undefined') {
185
+ return 0;
186
+ }
187
+ let activeBreakpointIndex = 0;
188
+ getBreakpointValues().forEach((width, index) => {
189
+ if (window.innerWidth >= width) {
190
+ activeBreakpointIndex = index;
191
+ }
192
+ });
193
+ return activeBreakpointIndex;
194
+ }
195
+ /** A responsive value's value on the current screen. */
196
+ function getCurrentValue(responsiveValue) {
197
+ if (!responsiveValue) {
198
+ return '';
199
+ }
200
+ const width = typeof window === 'undefined' ? 0 : window.innerWidth;
201
+ return valueAt(parseResponsiveValue(responsiveValue.toString()), width);
202
+ }
203
+ // Unitless numbers get the default unit, anything else passes through. Empty stays empty so the style is removed.
204
+ function withDefaultUnit(value, unit) {
205
+ return value && !isNaN(Number(value)) ? `${value}${unit}` : value;
206
+ }
207
+ /* Below Functions are Deprecated */
208
+ function getValueAtIndex(index, responsiveValue) {
209
+ const responsiveValues = generateResponsiveValues(responsiveValue.toString());
210
+ return responsiveValues[index].trim();
211
+ }
212
+ function getHydratedClassString(classString) {
213
+ const cleanedString = getCurrentValue(classString).trim();
214
+ if (cleanedString.includes('hydrated')) {
215
+ return cleanedString.trim();
216
+ }
217
+ if (cleanedString) {
218
+ return cleanedString.trim() + ' hydrated';
219
+ }
220
+ return 'hydrated';
221
+ }
222
+ function objectToCssString(object) {
223
+ let string = '';
224
+ for (const key in object) {
225
+ if (object[key].length > 0 && !['px', '%'].includes(object[key])) {
226
+ string += `${key}: ${object[key]};`;
227
+ }
228
+ }
229
+ return string;
230
+ }
231
+ // The breakpoint names before they were renamed, kept so the class names this makes do not change
232
+ const legacyBreakpointNames = ['mobile', 'tablet-portrait', 'tablet-landscape', 'tablet-pro', 'desktop-large', 'desktop-wide'];
233
+ function generateResponsiveClass(classPrefix, responsiveValue) {
234
+ let index = -1;
235
+ let classString = '';
236
+ responsiveValue.split('|').forEach(value => {
237
+ index++;
238
+ if (!value || value === 'false') {
239
+ return false;
240
+ }
241
+ classString += ` ${classPrefix}-${legacyBreakpointNames[index]}-${value}`;
242
+ });
243
+ return classString;
244
+ }
245
+ function insertCssIntoHead(document, fontCssUrl) {
246
+ let element = document.querySelector(`link[href="${fontCssUrl}"]`);
247
+ // Only inject the element if it's not yet present
248
+ if (!element) {
249
+ element = document.createElement('link');
250
+ element.setAttribute('rel', 'stylesheet');
251
+ element.setAttribute('href', fontCssUrl);
252
+ document.head.prepend(element);
253
+ }
254
+ }
255
+ /** True when the visitor has asked their system for less motion. */
256
+ const prefersReducedMotion = () => typeof window !== 'undefined' && !!window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches;
257
+
258
+ var utils = /*#__PURE__*/Object.freeze({
259
+ __proto__: null,
260
+ breakpointLabels: breakpointLabels,
261
+ breakpointValues: breakpointValues,
262
+ breakpoints: breakpoints,
263
+ defaultBreakpoints: defaultBreakpoints,
264
+ generateResponsiveClass: generateResponsiveClass,
265
+ generateResponsiveValues: generateResponsiveValues,
266
+ getBreakpointValues: getBreakpointValues,
267
+ getBreakpoints: getBreakpoints,
268
+ getCurrentBreakpointIndex: getCurrentBreakpointIndex,
269
+ getCurrentValue: getCurrentValue,
270
+ getHydratedClassString: getHydratedClassString,
271
+ getValueAtIndex: getValueAtIndex,
272
+ getValueWidths: getValueWidths,
273
+ insertCssIntoHead: insertCssIntoHead,
274
+ objectToCssString: objectToCssString,
275
+ parseResponsiveValue: parseResponsiveValue,
276
+ prefersReducedMotion: prefersReducedMotion,
277
+ setBreakpoints: setBreakpoints,
278
+ valueAt: valueAt,
279
+ withDefaultUnit: withDefaultUnit
280
+ });
281
+
282
+ exports.BREAKPOINTS_CHANGED = BREAKPOINTS_CHANGED;
283
+ exports.getBreakpoints = getBreakpoints;
284
+ exports.getCurrentBreakpointIndex = getCurrentBreakpointIndex;
285
+ exports.getCurrentValue = getCurrentValue;
286
+ exports.getValueWidths = getValueWidths;
287
+ exports.onValueWidth = onValueWidth;
288
+ exports.prefersReducedMotion = prefersReducedMotion;
289
+ exports.setBreakpoints = setBreakpoints;
290
+ exports.utils = utils;
@@ -7,7 +7,7 @@ content-hero-block {
7
7
  }
8
8
  content-hero-block[content-position=above] {
9
9
  display: grid;
10
- grid-template-columns: 1fr;
10
+ grid-template-columns: minmax(0, 1fr);
11
11
  }
12
12
  content-hero-block[content-position=above] .content-hero-block__background,
13
13
  content-hero-block[content-position=above] .content-hero-block__content {
@@ -1,23 +1,35 @@
1
1
  import { h, Host } from "@stencil/core";
2
- import { WindowResizeService } from "../../services/window-resize-service";
2
+ import { ResponsiveComponent } from "../../utils/responsive-component";
3
3
  /**
4
+ * A full width section with an image or video behind, or above, its text. Usually the first block on a page.
5
+ *
4
6
  * @slot background - This slot is usually either a video or image component.
5
7
  * @slot content - This slot will usually serve a text block.
6
8
  * @slot - Default slot, same as content slot
7
9
  */
8
- export class ContentHeroBlock {
10
+ export class ContentHeroBlock extends ResponsiveComponent {
9
11
  constructor() {
10
- this.hasBackground = false;
11
- this.contentPosition = 'below|above';
12
- this.classes = undefined;
13
- this.classString = undefined;
14
- this.revealHiddenContent = false;
12
+ super();
15
13
  }
14
+ hostElement;
15
+ hasBackground = false;
16
+ /**
17
+ * Where the content sits: above, over the media, or below it. Over the media by default. Use pipes to change
18
+ * it per breakpoint, such as below|above for the text below the media on phones and over it from tablets.
19
+ * @type Select
20
+ * @options below
21
+ * @options above
22
+ * @responsive
23
+ */
24
+ contentPosition = 'above';
25
+ revealHiddenContent = false;
26
+ hasHiddenContent;
16
27
  componentWillLoad() {
17
28
  this.hasBackground = !!this.hostElement.querySelector('[slot="background"]');
18
29
  this.hasHiddenContent = !!this.hostElement.querySelector('[slot="activatedContent"]');
19
- WindowResizeService.registerProp(this.contentPosition).subscribe(newValue => (this.contentPosition = newValue));
20
- WindowResizeService.registerProp(this.classes).subscribe(newValue => (this.classString = newValue));
30
+ this.responsive({
31
+ contentPosition: true,
32
+ });
21
33
  }
22
34
  contentBlockActivationHandler(event) {
23
35
  if (this.hostElement === event.detail) {
@@ -25,7 +37,7 @@ export class ContentHeroBlock {
25
37
  }
26
38
  }
27
39
  render() {
28
- return (h(Host, { key: '453139dde7f5f37fe4b246b65f85c5b4252eb25b', class: this.classString }, this.hasBackground && (h("div", { key: '61af0bcd5932c1678424f8d8d39b9374c848eac5', class: "content-hero-block__background" }, h("slot", { key: '5b565590f57803ab199f847aa37b221df4795b8b', name: "background" }))), h("div", { key: 'c25011a540f9d35d3635d47fca259aeefc1b6ca6', class: "content-hero-block__content" }, h("slot", { key: '8c4e12fcb9a805445b879f8ac642e2894c1a2b31', name: "content" }), h("slot", { key: '75560112753c4b2ab546bf5caf2b32701917e6c6' }))));
40
+ return (h(Host, { key: '8c2b7d29aebcc9a14ad6473b30273271abd31025', class: this.classes }, this.hasBackground && (h("div", { key: 'c83a0e8382b2ea905020c13a3bb833700fae7d8e', class: "content-hero-block__background" }, h("slot", { key: '3f589683a2ecb97daf5e7ebc3837699c20e7a12f', name: "background" }))), h("div", { key: '68aa5b9f8b220d7e0ac6860796f8d0cc888e070a', class: "content-hero-block__content" }, h("slot", { key: 'aa2d963a7a6e593e4aa3d245a20716d7ce99eb8a', name: "content" }), h("slot", { key: 'a5d64639bcd98773f9eddda65e2d91405ffe8336' }))));
29
41
  }
30
42
  static get is() { return "content-hero-block"; }
31
43
  static get originalStyleUrls() {
@@ -50,12 +62,14 @@ export class ContentHeroBlock {
50
62
  "ResponsiveString": {
51
63
  "location": "import",
52
64
  "path": "../../typings",
53
- "id": "src/typings.d.ts::ResponsiveString"
65
+ "id": "src/typings.d.ts::ResponsiveString",
66
+ "referenceLocation": "ResponsiveString"
54
67
  },
55
68
  "HeroContentPlacementOptions": {
56
- "location": "local",
57
- "path": "/Users/shahrukceo/Developer/content-blocks-monorepo/packages/content-blocks-stenciljs/src/blocks/content-hero-block/content-hero-block.tsx",
58
- "id": "src/blocks/content-hero-block/content-hero-block.tsx::HeroContentPlacementOptions"
69
+ "location": "import",
70
+ "path": "../../typings",
71
+ "id": "src/typings.d.ts::HeroContentPlacementOptions",
72
+ "referenceLocation": "HeroContentPlacementOptions"
59
73
  }
60
74
  }
61
75
  },
@@ -75,47 +89,19 @@ export class ContentHeroBlock {
75
89
  "name": "responsive",
76
90
  "text": undefined
77
91
  }],
78
- "text": "Pipe separated HeroContentPlacementOptions that will determine whether the content sits below the media slot or overlapped above."
92
+ "text": "Where the content sits: above, over the media, or below it. Over the media by default. Use pipes to change\nit per breakpoint, such as below|above for the text below the media on phones and over it from tablets."
79
93
  },
80
- "attribute": "content-position",
94
+ "getter": false,
95
+ "setter": false,
81
96
  "reflect": true,
82
- "defaultValue": "'below|above'"
83
- },
84
- "classes": {
85
- "type": "string",
86
- "mutable": false,
87
- "complexType": {
88
- "original": "ResponsiveString",
89
- "resolved": "string",
90
- "references": {
91
- "ResponsiveString": {
92
- "location": "import",
93
- "path": "../../typings",
94
- "id": "src/typings.d.ts::ResponsiveString"
95
- }
96
- }
97
- },
98
- "required": false,
99
- "optional": false,
100
- "docs": {
101
- "tags": [{
102
- "name": "type",
103
- "text": "String"
104
- }, {
105
- "name": "responsive",
106
- "text": undefined
107
- }],
108
- "text": ""
109
- },
110
- "attribute": "classes",
111
- "reflect": false
97
+ "attribute": "content-position",
98
+ "defaultValue": "'above'"
112
99
  }
113
100
  };
114
101
  }
115
102
  static get states() {
116
103
  return {
117
104
  "hasBackground": {},
118
- "classString": {},
119
105
  "revealHiddenContent": {}
120
106
  };
121
107
  }
@@ -130,4 +116,3 @@ export class ContentHeroBlock {
130
116
  }];
131
117
  }
132
118
  }
133
- //# sourceMappingURL=content-hero-block.js.map
@@ -3,13 +3,24 @@
3
3
  }
4
4
 
5
5
  content-split-block {
6
- display: block;
6
+ display: flex;
7
+ flex-wrap: wrap;
7
8
  }
8
- content-split-block[reverse=true] content-grid-formatter [slot=column1],
9
- content-split-block[reverse=true] content-grid-formatter [slot=column1] {
9
+ content-split-block > [slot] {
10
+ min-width: 0;
11
+ flex: 0 0 auto;
12
+ width: calc(100% / var(--columns));
13
+ }
14
+ content-split-block {
15
+ width: 100%;
16
+ }
17
+ content-split-block > [slot] {
18
+ flex-grow: 1;
19
+ flex-shrink: 1;
20
+ }
21
+ content-split-block[reverse=true] > [slot=column1] {
10
22
  order: 2;
11
23
  }
12
- content-split-block[reverse=true] content-grid-formatter [slot=column2],
13
- content-split-block[reverse=true] content-grid-formatter [slot=column2] {
24
+ content-split-block[reverse=true] > [slot=column2] {
14
25
  order: 1;
15
26
  }
@@ -1,22 +1,33 @@
1
1
  import { h, Host } from "@stencil/core";
2
- import { WindowResizeService } from "../../services/window-resize-service";
2
+ import { ResponsiveComponent } from "../../utils/responsive-component";
3
3
  /**
4
+ * Two columns side by side, such as an image next to text, that stack on smaller screens.
5
+ *
4
6
  * @slot column1 - This will be column 1.
5
7
  * @slot column2 - This will be column 2.
6
8
  */
7
- export class ContentSplitBlock {
9
+ export class ContentSplitBlock extends ResponsiveComponent {
8
10
  constructor() {
9
- this.reverse = false;
10
- this.columns = '1|2';
11
- this.classes = undefined;
12
- this.classString = undefined;
11
+ super();
13
12
  }
13
+ /**
14
+ * @type Boolean
15
+ * @responsive
16
+ */
17
+ reverse = false;
18
+ /**
19
+ * @type Number
20
+ * @responsive
21
+ */
22
+ columns = '1|2';
14
23
  componentWillLoad() {
15
- WindowResizeService.registerProp(this.reverse).subscribe(newValue => (this.reverse = newValue));
16
- WindowResizeService.registerProp(this.classes).subscribe(newValue => (this.classString = newValue));
24
+ this.responsive({
25
+ columns: true,
26
+ reverse: true,
27
+ });
17
28
  }
18
29
  render() {
19
- return (h(Host, { key: '07309d1b00b39a34cb02365cfed93068466ded61', class: this.classString, reverse: this.reverse }, h("content-grid-formatter", { key: '55114d699cb714a820d9ee5c7db0f1b674a762e0', type: "flex", "flex-grow": "true", "flex-shrink": "true", columns: this.columns }, h("slot", { key: '155c3babd869c8c8b5b8766b13b68b56188d02d7', name: "column1" }), h("slot", { key: '19ed20dae1df7efe894bf420de4020d1a72a679c', name: "column2" }))));
30
+ return (h(Host, { key: '9e3fefcfbb031aa20922d1865b349e254d066aa0', class: this.classes, reverse: this.reverse, style: { '--columns': this.columns } }, h("slot", { key: '1a3d8b391b6f5623a9e980f40914f748bb88ed01', name: "column1" }), h("slot", { key: 'ba2fcb58ca2819315ecd11d4023a307bcd04a625', name: "column2" })));
20
31
  }
21
32
  static get is() { return "content-split-block"; }
22
33
  static get originalStyleUrls() {
@@ -41,7 +52,8 @@ export class ContentSplitBlock {
41
52
  "ResponsiveBoolean": {
42
53
  "location": "import",
43
54
  "path": "../../typings",
44
- "id": "src/typings.d.ts::ResponsiveBoolean"
55
+ "id": "src/typings.d.ts::ResponsiveBoolean",
56
+ "referenceLocation": "ResponsiveBoolean"
45
57
  }
46
58
  }
47
59
  },
@@ -57,13 +69,15 @@ export class ContentSplitBlock {
57
69
  }],
58
70
  "text": ""
59
71
  },
60
- "attribute": "reverse",
72
+ "getter": false,
73
+ "setter": false,
61
74
  "reflect": true,
75
+ "attribute": "reverse",
62
76
  "defaultValue": "false"
63
77
  },
64
78
  "columns": {
65
79
  "type": "string",
66
- "mutable": false,
80
+ "mutable": true,
67
81
  "complexType": {
68
82
  "original": "string",
69
83
  "resolved": "string",
@@ -81,45 +95,12 @@ export class ContentSplitBlock {
81
95
  }],
82
96
  "text": ""
83
97
  },
98
+ "getter": false,
99
+ "setter": false,
100
+ "reflect": true,
84
101
  "attribute": "columns",
85
- "reflect": false,
86
102
  "defaultValue": "'1|2'"
87
- },
88
- "classes": {
89
- "type": "string",
90
- "mutable": true,
91
- "complexType": {
92
- "original": "ResponsiveString",
93
- "resolved": "string",
94
- "references": {
95
- "ResponsiveString": {
96
- "location": "import",
97
- "path": "../../typings",
98
- "id": "src/typings.d.ts::ResponsiveString"
99
- }
100
- }
101
- },
102
- "required": false,
103
- "optional": false,
104
- "docs": {
105
- "tags": [{
106
- "name": "type",
107
- "text": "String"
108
- }, {
109
- "name": "responsive",
110
- "text": undefined
111
- }],
112
- "text": ""
113
- },
114
- "attribute": "classes",
115
- "reflect": true
116
103
  }
117
104
  };
118
105
  }
119
- static get states() {
120
- return {
121
- "classString": {}
122
- };
123
- }
124
106
  }
125
- //# sourceMappingURL=content-split-block.js.map