@content-blocks/js 0.3.2
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.
- package/LICENSE +21 -0
- package/README.md +4 -0
- package/dist/cjs/BehaviorSubject-771fd78b.js +640 -0
- package/dist/cjs/BehaviorSubject-771fd78b.js.map +1 -0
- package/dist/cjs/Youtube-41424972.js +807 -0
- package/dist/cjs/Youtube-41424972.js.map +1 -0
- package/dist/cjs/content-accordion.cjs.entry.js +114 -0
- package/dist/cjs/content-accordion.cjs.entry.js.map +1 -0
- package/dist/cjs/content-blocks.cjs.js +25 -0
- package/dist/cjs/content-blocks.cjs.js.map +1 -0
- package/dist/cjs/content-button_4.cjs.entry.js +2165 -0
- package/dist/cjs/content-button_4.cjs.entry.js.map +1 -0
- package/dist/cjs/content-carousel-8b0e8962.js +1488 -0
- package/dist/cjs/content-carousel-8b0e8962.js.map +1 -0
- package/dist/cjs/content-carousel.cjs.entry.js +13 -0
- package/dist/cjs/content-carousel.cjs.entry.js.map +1 -0
- package/dist/cjs/content-grid-formatter.cjs.entry.js +50 -0
- package/dist/cjs/content-grid-formatter.cjs.entry.js.map +1 -0
- package/dist/cjs/content-hero-block.cjs.entry.js +46 -0
- package/dist/cjs/content-hero-block.cjs.entry.js.map +1 -0
- package/dist/cjs/content-image.cjs.entry.js +95 -0
- package/dist/cjs/content-image.cjs.entry.js.map +1 -0
- package/dist/cjs/content-navigation-block.cjs.entry.js +62 -0
- package/dist/cjs/content-navigation-block.cjs.entry.js.map +1 -0
- package/dist/cjs/content-split-block.cjs.entry.js +36 -0
- package/dist/cjs/content-split-block.cjs.entry.js.map +1 -0
- package/dist/cjs/content-tabs.cjs.entry.js +219 -0
- package/dist/cjs/content-tabs.cjs.entry.js.map +1 -0
- package/dist/cjs/content-text-block.cjs.entry.js +48 -0
- package/dist/cjs/content-text-block.cjs.entry.js.map +1 -0
- package/dist/cjs/content-tout-block.cjs.entry.js +32 -0
- package/dist/cjs/content-tout-block.cjs.entry.js.map +1 -0
- package/dist/cjs/content-video.cjs.entry.js +114 -0
- package/dist/cjs/content-video.cjs.entry.js.map +1 -0
- package/dist/cjs/index-a42fb1d0.js +2116 -0
- package/dist/cjs/index-a42fb1d0.js.map +1 -0
- package/dist/cjs/index.cjs.js +11 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/swiper-8c9ab198.js +3612 -0
- package/dist/cjs/swiper-8c9ab198.js.map +1 -0
- package/dist/cjs/utils-6c985f2f.js +113 -0
- package/dist/cjs/utils-6c985f2f.js.map +1 -0
- package/dist/cjs/video.es-7d4d33f5.js +64206 -0
- package/dist/cjs/video.es-7d4d33f5.js.map +1 -0
- package/dist/cjs/window-resize-service-c9766178.js +35 -0
- package/dist/cjs/window-resize-service-c9766178.js.map +1 -0
- package/dist/collection/blocks/content-hero-block/content-hero-block.css +39 -0
- package/dist/collection/blocks/content-hero-block/content-hero-block.js +138 -0
- package/dist/collection/blocks/content-hero-block/content-hero-block.js.map +1 -0
- package/dist/collection/blocks/content-hero-block/test/content-hero-block.e2e.js +10 -0
- package/dist/collection/blocks/content-hero-block/test/content-hero-block.e2e.js.map +1 -0
- package/dist/collection/blocks/content-hero-block/test/content-hero-block.spec.js +18 -0
- package/dist/collection/blocks/content-hero-block/test/content-hero-block.spec.js.map +1 -0
- package/dist/collection/blocks/content-split-block/content-split-block.css +18 -0
- package/dist/collection/blocks/content-split-block/content-split-block.js +125 -0
- package/dist/collection/blocks/content-split-block/content-split-block.js.map +1 -0
- package/dist/collection/blocks/content-split-block/test/content-split-block.e2e.js +10 -0
- package/dist/collection/blocks/content-split-block/test/content-split-block.e2e.js.map +1 -0
- package/dist/collection/blocks/content-split-block/test/content-split-block.spec.js +18 -0
- package/dist/collection/blocks/content-split-block/test/content-split-block.spec.js.map +1 -0
- package/dist/collection/blocks/content-text-block/content-text-block.css +47 -0
- package/dist/collection/blocks/content-text-block/content-text-block.js +192 -0
- package/dist/collection/blocks/content-text-block/content-text-block.js.map +1 -0
- package/dist/collection/blocks/content-text-block/test/content-text-block.e2e.js +10 -0
- package/dist/collection/blocks/content-text-block/test/content-text-block.e2e.js.map +1 -0
- package/dist/collection/blocks/content-text-block/test/content-text-block.spec.js +18 -0
- package/dist/collection/blocks/content-text-block/test/content-text-block.spec.js.map +1 -0
- package/dist/collection/blocks/content-tout-block/content-tout-block.css +35 -0
- package/dist/collection/blocks/content-tout-block/content-tout-block.js +74 -0
- package/dist/collection/blocks/content-tout-block/content-tout-block.js.map +1 -0
- package/dist/collection/blocks/content-tout-block/test/content-tout-block.e2e.js +10 -0
- package/dist/collection/blocks/content-tout-block/test/content-tout-block.e2e.js.map +1 -0
- package/dist/collection/blocks/content-tout-block/test/content-tout-block.spec.js +18 -0
- package/dist/collection/blocks/content-tout-block/test/content-tout-block.spec.js.map +1 -0
- package/dist/collection/collection-manifest.json +27 -0
- package/dist/collection/components/content-accordion/content-accordion.css +11 -0
- package/dist/collection/components/content-accordion/content-accordion.js +33 -0
- package/dist/collection/components/content-accordion/content-accordion.js.map +1 -0
- package/dist/collection/components/content-accordion/libraries/w3_disclosure_button.js +87 -0
- package/dist/collection/components/content-accordion/libraries/w3_disclosure_button.js.map +1 -0
- package/dist/collection/components/content-accordion/test/content-accordion.e2e.js +10 -0
- package/dist/collection/components/content-accordion/test/content-accordion.e2e.js.map +1 -0
- package/dist/collection/components/content-accordion/test/content-accordion.spec.js +18 -0
- package/dist/collection/components/content-accordion/test/content-accordion.spec.js.map +1 -0
- package/dist/collection/components/content-carousel/content-carousel.css +21 -0
- package/dist/collection/components/content-carousel/content-carousel.js +152 -0
- package/dist/collection/components/content-carousel/content-carousel.js.map +1 -0
- package/dist/collection/components/content-carousel/test/content-carousel.e2e.js +10 -0
- package/dist/collection/components/content-carousel/test/content-carousel.e2e.js.map +1 -0
- package/dist/collection/components/content-carousel/test/content-carousel.spec.js +18 -0
- package/dist/collection/components/content-carousel/test/content-carousel.spec.js.map +1 -0
- package/dist/collection/components/content-navigation-block/content-navigation-block.css +51 -0
- package/dist/collection/components/content-navigation-block/content-navigation-block.js +146 -0
- package/dist/collection/components/content-navigation-block/content-navigation-block.js.map +1 -0
- package/dist/collection/components/content-navigation-block/test/content-navigation-block.e2e.js +10 -0
- package/dist/collection/components/content-navigation-block/test/content-navigation-block.e2e.js.map +1 -0
- package/dist/collection/components/content-navigation-block/test/content-navigation-block.spec.js +18 -0
- package/dist/collection/components/content-navigation-block/test/content-navigation-block.spec.js.map +1 -0
- package/dist/collection/components/content-overlay/content-overlay.css +103 -0
- package/dist/collection/components/content-overlay/content-overlay.js +384 -0
- package/dist/collection/components/content-overlay/content-overlay.js.map +1 -0
- package/dist/collection/components/content-overlay/libraries/aria-dialog.js +356 -0
- package/dist/collection/components/content-overlay/libraries/aria-dialog.js.map +1 -0
- package/dist/collection/components/content-overlay/libraries/aria-utilities.js +78 -0
- package/dist/collection/components/content-overlay/libraries/aria-utilities.js.map +1 -0
- package/dist/collection/components/content-overlay/test/content-overlay.e2e.js +10 -0
- package/dist/collection/components/content-overlay/test/content-overlay.e2e.js.map +1 -0
- package/dist/collection/components/content-overlay/test/content-overlay.spec.js +18 -0
- package/dist/collection/components/content-overlay/test/content-overlay.spec.js.map +1 -0
- package/dist/collection/components/content-tabs/content-tabs.css +19 -0
- package/dist/collection/components/content-tabs/content-tabs.js +27 -0
- package/dist/collection/components/content-tabs/content-tabs.js.map +1 -0
- package/dist/collection/components/content-tabs/libraries/w3_tabs.js +223 -0
- package/dist/collection/components/content-tabs/libraries/w3_tabs.js.map +1 -0
- package/dist/collection/components/content-tabs/test/content-tabs.e2e.js +10 -0
- package/dist/collection/components/content-tabs/test/content-tabs.e2e.js.map +1 -0
- package/dist/collection/components/content-tabs/test/content-tabs.spec.js +18 -0
- package/dist/collection/components/content-tabs/test/content-tabs.spec.js.map +1 -0
- package/dist/collection/elements/content-button/content-button.css +37 -0
- package/dist/collection/elements/content-button/content-button.js +257 -0
- package/dist/collection/elements/content-button/content-button.js.map +1 -0
- package/dist/collection/elements/content-button/test/content-button.e2e.js +10 -0
- package/dist/collection/elements/content-button/test/content-button.e2e.js.map +1 -0
- package/dist/collection/elements/content-button/test/content-button.spec.js +18 -0
- package/dist/collection/elements/content-button/test/content-button.spec.js.map +1 -0
- package/dist/collection/elements/content-image/content-image.css +53 -0
- package/dist/collection/elements/content-image/content-image.js +305 -0
- package/dist/collection/elements/content-image/content-image.js.map +1 -0
- package/dist/collection/elements/content-image/test/content-image.e2e.js +10 -0
- package/dist/collection/elements/content-image/test/content-image.e2e.js.map +1 -0
- package/dist/collection/elements/content-image/test/content-image.spec.js +18 -0
- package/dist/collection/elements/content-image/test/content-image.spec.js.map +1 -0
- package/dist/collection/elements/content-line/content-line.css +18 -0
- package/dist/collection/elements/content-line/content-line.e2e.js +10 -0
- package/dist/collection/elements/content-line/content-line.e2e.js.map +1 -0
- package/dist/collection/elements/content-line/content-line.js +229 -0
- package/dist/collection/elements/content-line/content-line.js.map +1 -0
- package/dist/collection/elements/content-video/content-video.css +75 -0
- package/dist/collection/elements/content-video/content-video.js +391 -0
- package/dist/collection/elements/content-video/content-video.js.map +1 -0
- package/dist/collection/elements/content-video/test/content-video.e2e.js +10 -0
- package/dist/collection/elements/content-video/test/content-video.e2e.js.map +1 -0
- package/dist/collection/elements/content-video/test/content-video.spec.js +18 -0
- package/dist/collection/elements/content-video/test/content-video.spec.js.map +1 -0
- package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.css +43 -0
- package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.js +269 -0
- package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.js.map +1 -0
- package/dist/collection/formatters/content-grid-formatter/test/content-grid-formatter.e2e.js +10 -0
- package/dist/collection/formatters/content-grid-formatter/test/content-grid-formatter.e2e.js.map +1 -0
- package/dist/collection/formatters/content-grid-formatter/test/content-grid-formatter.spec.js +18 -0
- package/dist/collection/formatters/content-grid-formatter/test/content-grid-formatter.spec.js.map +1 -0
- package/dist/collection/formatters/content-spacer/content-spacer.css +32 -0
- package/dist/collection/formatters/content-spacer/content-spacer.js +350 -0
- package/dist/collection/formatters/content-spacer/content-spacer.js.map +1 -0
- package/dist/collection/formatters/content-spacer/test/content-spacer.e2e.js +10 -0
- package/dist/collection/formatters/content-spacer/test/content-spacer.e2e.js.map +1 -0
- package/dist/collection/formatters/content-spacer/test/content-spacer.spec.js +18 -0
- package/dist/collection/formatters/content-spacer/test/content-spacer.spec.js.map +1 -0
- package/dist/collection/globalScript.js +15 -0
- package/dist/collection/globalScript.js.map +1 -0
- package/dist/collection/index.js +3 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/sass/_mixins.scss +249 -0
- package/dist/collection/sass/_variables.scss +18 -0
- package/dist/collection/services/content-events-service.js +23 -0
- package/dist/collection/services/content-events-service.js.map +1 -0
- package/dist/collection/services/window-resize-service.js +29 -0
- package/dist/collection/services/window-resize-service.js.map +1 -0
- package/dist/collection/utils/utils.js +88 -0
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/collection/utils/utils.spec.js +1 -0
- package/dist/collection/utils/utils.spec.js.map +1 -0
- package/dist/components/BehaviorSubject.js +637 -0
- package/dist/components/BehaviorSubject.js.map +1 -0
- package/dist/components/Youtube.js +805 -0
- package/dist/components/Youtube.js.map +1 -0
- package/dist/components/content-accordion.d.ts +11 -0
- package/dist/components/content-accordion.js +127 -0
- package/dist/components/content-accordion.js.map +1 -0
- package/dist/components/content-button.d.ts +11 -0
- package/dist/components/content-button.js +88 -0
- package/dist/components/content-button.js.map +1 -0
- package/dist/components/content-carousel.d.ts +11 -0
- package/dist/components/content-carousel.js +1489 -0
- package/dist/components/content-carousel.js.map +1 -0
- package/dist/components/content-grid-formatter.d.ts +11 -0
- package/dist/components/content-grid-formatter.js +8 -0
- package/dist/components/content-grid-formatter.js.map +1 -0
- package/dist/components/content-grid-formatter2.js +68 -0
- package/dist/components/content-grid-formatter2.js.map +1 -0
- package/dist/components/content-hero-block.d.ts +11 -0
- package/dist/components/content-hero-block.js +63 -0
- package/dist/components/content-hero-block.js.map +1 -0
- package/dist/components/content-image.d.ts +11 -0
- package/dist/components/content-image.js +120 -0
- package/dist/components/content-image.js.map +1 -0
- package/dist/components/content-line.d.ts +11 -0
- package/dist/components/content-line.js +70 -0
- package/dist/components/content-line.js.map +1 -0
- package/dist/components/content-navigation-block.d.ts +11 -0
- package/dist/components/content-navigation-block.js +79 -0
- package/dist/components/content-navigation-block.js.map +1 -0
- package/dist/components/content-overlay.d.ts +11 -0
- package/dist/components/content-overlay.js +2048 -0
- package/dist/components/content-overlay.js.map +1 -0
- package/dist/components/content-spacer.d.ts +11 -0
- package/dist/components/content-spacer.js +76 -0
- package/dist/components/content-spacer.js.map +1 -0
- package/dist/components/content-split-block.d.ts +11 -0
- package/dist/components/content-split-block.js +58 -0
- package/dist/components/content-split-block.js.map +1 -0
- package/dist/components/content-tabs.d.ts +11 -0
- package/dist/components/content-tabs.js +232 -0
- package/dist/components/content-tabs.js.map +1 -0
- package/dist/components/content-text-block.d.ts +11 -0
- package/dist/components/content-text-block.js +66 -0
- package/dist/components/content-text-block.js.map +1 -0
- package/dist/components/content-tout-block.d.ts +11 -0
- package/dist/components/content-tout-block.js +46 -0
- package/dist/components/content-tout-block.js.map +1 -0
- package/dist/components/content-video.d.ts +11 -0
- package/dist/components/content-video.js +141 -0
- package/dist/components/content-video.js.map +1 -0
- package/dist/components/index.d.ts +33 -0
- package/dist/components/index.js +4 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/swiper.js +3608 -0
- package/dist/components/swiper.js.map +1 -0
- package/dist/components/utils.js +106 -0
- package/dist/components/utils.js.map +1 -0
- package/dist/components/video.es.js +64201 -0
- package/dist/components/video.es.js.map +1 -0
- package/dist/components/window-resize-service.js +33 -0
- package/dist/components/window-resize-service.js.map +1 -0
- package/dist/content-blocks/content-blocks.esm.js +2 -0
- package/dist/content-blocks/content-blocks.esm.js.map +1 -0
- package/dist/content-blocks/index.esm.js +2 -0
- package/dist/content-blocks/index.esm.js.map +1 -0
- package/dist/content-blocks/p-03ca48aa.js +2 -0
- package/dist/content-blocks/p-03ca48aa.js.map +1 -0
- package/dist/content-blocks/p-0ee5bbb6.entry.js +2 -0
- package/dist/content-blocks/p-0ee5bbb6.entry.js.map +1 -0
- package/dist/content-blocks/p-193fa2c0.entry.js +2 -0
- package/dist/content-blocks/p-193fa2c0.entry.js.map +1 -0
- package/dist/content-blocks/p-1b699607.js +2 -0
- package/dist/content-blocks/p-1b699607.js.map +1 -0
- package/dist/content-blocks/p-1efe0577.entry.js +2 -0
- package/dist/content-blocks/p-1efe0577.entry.js.map +1 -0
- package/dist/content-blocks/p-2357f07a.entry.js +2 -0
- package/dist/content-blocks/p-2357f07a.entry.js.map +1 -0
- package/dist/content-blocks/p-363e8357.entry.js +2 -0
- package/dist/content-blocks/p-363e8357.entry.js.map +1 -0
- package/dist/content-blocks/p-36793013.entry.js +10 -0
- package/dist/content-blocks/p-36793013.entry.js.map +1 -0
- package/dist/content-blocks/p-3a170c2c.entry.js +2 -0
- package/dist/content-blocks/p-3a170c2c.entry.js.map +1 -0
- package/dist/content-blocks/p-43a91cc7.js +29 -0
- package/dist/content-blocks/p-43a91cc7.js.map +1 -0
- package/dist/content-blocks/p-6d43a03c.js +2 -0
- package/dist/content-blocks/p-6d43a03c.js.map +1 -0
- package/dist/content-blocks/p-89fb0d8f.js +2 -0
- package/dist/content-blocks/p-89fb0d8f.js.map +1 -0
- package/dist/content-blocks/p-a7dfb547.entry.js +2 -0
- package/dist/content-blocks/p-a7dfb547.entry.js.map +1 -0
- package/dist/content-blocks/p-b27d54cb.entry.js +2 -0
- package/dist/content-blocks/p-b27d54cb.entry.js.map +1 -0
- package/dist/content-blocks/p-bf1cfb7b.js +3 -0
- package/dist/content-blocks/p-bf1cfb7b.js.map +1 -0
- package/dist/content-blocks/p-c5891e59.js +2 -0
- package/dist/content-blocks/p-c5891e59.js.map +1 -0
- package/dist/content-blocks/p-cd552ce2.js +2 -0
- package/dist/content-blocks/p-cd552ce2.js.map +1 -0
- package/dist/content-blocks/p-ce179781.entry.js +2 -0
- package/dist/content-blocks/p-ce179781.entry.js.map +1 -0
- package/dist/content-blocks/p-d3503dde.entry.js +2 -0
- package/dist/content-blocks/p-d3503dde.entry.js.map +1 -0
- package/dist/content-blocks/p-dca7ab2c.entry.js +2 -0
- package/dist/content-blocks/p-dca7ab2c.entry.js.map +1 -0
- package/dist/content-blocks/sass/_mixins.scss +249 -0
- package/dist/content-blocks/sass/_variables.scss +18 -0
- package/dist/esm/BehaviorSubject-bc7e0e99.js +637 -0
- package/dist/esm/BehaviorSubject-bc7e0e99.js.map +1 -0
- package/dist/esm/Youtube-6c271d8d.js +805 -0
- package/dist/esm/Youtube-6c271d8d.js.map +1 -0
- package/dist/esm/content-accordion.entry.js +110 -0
- package/dist/esm/content-accordion.entry.js.map +1 -0
- package/dist/esm/content-blocks.js +20 -0
- package/dist/esm/content-blocks.js.map +1 -0
- package/dist/esm/content-button_4.entry.js +2158 -0
- package/dist/esm/content-button_4.entry.js.map +1 -0
- package/dist/esm/content-carousel-cf7daf22.js +1469 -0
- package/dist/esm/content-carousel-cf7daf22.js.map +1 -0
- package/dist/esm/content-carousel.entry.js +5 -0
- package/dist/esm/content-carousel.entry.js.map +1 -0
- package/dist/esm/content-grid-formatter.entry.js +46 -0
- package/dist/esm/content-grid-formatter.entry.js.map +1 -0
- package/dist/esm/content-hero-block.entry.js +42 -0
- package/dist/esm/content-hero-block.entry.js.map +1 -0
- package/dist/esm/content-image.entry.js +91 -0
- package/dist/esm/content-image.entry.js.map +1 -0
- package/dist/esm/content-navigation-block.entry.js +58 -0
- package/dist/esm/content-navigation-block.entry.js.map +1 -0
- package/dist/esm/content-split-block.entry.js +32 -0
- package/dist/esm/content-split-block.entry.js.map +1 -0
- package/dist/esm/content-tabs.entry.js +215 -0
- package/dist/esm/content-tabs.entry.js.map +1 -0
- package/dist/esm/content-text-block.entry.js +44 -0
- package/dist/esm/content-text-block.entry.js.map +1 -0
- package/dist/esm/content-tout-block.entry.js +28 -0
- package/dist/esm/content-tout-block.entry.js.map +1 -0
- package/dist/esm/content-video.entry.js +110 -0
- package/dist/esm/content-video.entry.js.map +1 -0
- package/dist/esm/index-6701e2ba.js +2087 -0
- package/dist/esm/index-6701e2ba.js.map +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/swiper-977c310f.js +3610 -0
- package/dist/esm/swiper-977c310f.js.map +1 -0
- package/dist/esm/utils-27374a56.js +106 -0
- package/dist/esm/utils-27374a56.js.map +1 -0
- package/dist/esm/video.es-e4c3f886.js +64201 -0
- package/dist/esm/video.es-e4c3f886.js.map +1 -0
- package/dist/esm/window-resize-service-8a52f08c.js +33 -0
- package/dist/esm/window-resize-service-8a52f08c.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/blocks/content-hero-block/content-hero-block.d.ts +33 -0
- package/dist/types/blocks/content-split-block/content-split-block.d.ts +27 -0
- package/dist/types/blocks/content-text-block/content-text-block.d.ts +44 -0
- package/dist/types/blocks/content-tout-block/content-tout-block.d.ts +22 -0
- package/dist/types/components/content-accordion/content-accordion.d.ts +12 -0
- package/dist/types/components/content-accordion/libraries/w3_disclosure_button.d.ts +4 -0
- package/dist/types/components/content-carousel/content-carousel.d.ts +36 -0
- package/dist/types/components/content-navigation-block/content-navigation-block.d.ts +31 -0
- package/dist/types/components/content-overlay/content-overlay.d.ts +69 -0
- package/dist/types/components/content-overlay/libraries/aria-dialog.d.ts +5 -0
- package/dist/types/components/content-overlay/libraries/aria-utilities.d.ts +5 -0
- package/dist/types/components/content-tabs/content-tabs.d.ts +10 -0
- package/dist/types/components/content-tabs/libraries/w3_tabs.d.ts +4 -0
- package/dist/types/components.d.ts +994 -0
- package/dist/types/elements/content-button/content-button.d.ts +55 -0
- package/dist/types/elements/content-image/content-image.d.ts +56 -0
- package/dist/types/elements/content-line/content-line.d.ts +56 -0
- package/dist/types/elements/content-video/content-video.d.ts +77 -0
- package/dist/types/formatters/content-grid-formatter/content-grid-formatter.d.ts +52 -0
- package/dist/types/formatters/content-spacer/content-spacer.d.ts +73 -0
- package/dist/types/globalScript.d.ts +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/services/content-events-service.d.ts +11 -0
- package/dist/types/services/window-resize-service.d.ts +11 -0
- package/dist/types/stencil-public-runtime.d.ts +1652 -0
- package/dist/types/typings.d.ts +11 -0
- package/dist/types/utils/utils.d.ts +13 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +21 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +11 -0
- package/package.json +65 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
content-image {
|
|
2
|
+
display: block;
|
|
3
|
+
height: auto;
|
|
4
|
+
transition: opacity 0.3s;
|
|
5
|
+
position: relative;
|
|
6
|
+
visibility: hidden;
|
|
7
|
+
}
|
|
8
|
+
content-image.hydrated {
|
|
9
|
+
visibility: inherit;
|
|
10
|
+
}
|
|
11
|
+
content-image.content-image-loading {
|
|
12
|
+
opacity: 0;
|
|
13
|
+
}
|
|
14
|
+
content-image.content-image-loaded {
|
|
15
|
+
opacity: 1;
|
|
16
|
+
}
|
|
17
|
+
content-image img,
|
|
18
|
+
content-image picture,
|
|
19
|
+
content-image video {
|
|
20
|
+
display: block;
|
|
21
|
+
width: 100%;
|
|
22
|
+
height: 100%;
|
|
23
|
+
}
|
|
24
|
+
content-hero-block content-image img, content-grid-formatter content-image img,
|
|
25
|
+
content-hero-block content-image picture,
|
|
26
|
+
content-grid-formatter content-image picture,
|
|
27
|
+
content-hero-block content-image video,
|
|
28
|
+
content-grid-formatter content-image video {
|
|
29
|
+
height: auto;
|
|
30
|
+
}
|
|
31
|
+
content-image .content-image__media-content {
|
|
32
|
+
position: absolute;
|
|
33
|
+
width: 100%;
|
|
34
|
+
height: 100%;
|
|
35
|
+
top: 0;
|
|
36
|
+
left: 0;
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
justify-content: center;
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
}
|
|
42
|
+
content-image .content-image__media-content [slot=mediaContent] {
|
|
43
|
+
height: 100%;
|
|
44
|
+
width: 100%;
|
|
45
|
+
}
|
|
46
|
+
@media (hover: hover) {
|
|
47
|
+
content-image[hover=true] .content-image__media-content {
|
|
48
|
+
opacity: 0;
|
|
49
|
+
}
|
|
50
|
+
content-image[hover=true] .content-image__media-content:hover {
|
|
51
|
+
opacity: 1;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { WindowResizeService } from "../../services/window-resize-service";
|
|
3
|
+
import { breakpointValues, getValueAtIndex } from "../../utils/utils";
|
|
4
|
+
/**
|
|
5
|
+
* @slot mediaContent - Media content that can be revealed on hover
|
|
6
|
+
*/
|
|
7
|
+
export class ContentImage {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.lazyLoad = true;
|
|
10
|
+
this.src = undefined;
|
|
11
|
+
this.alt = undefined;
|
|
12
|
+
this.width = '16';
|
|
13
|
+
this.height = '9';
|
|
14
|
+
this.videoType = 'video/mp4';
|
|
15
|
+
this.hover = 'false|true';
|
|
16
|
+
this.lazyLoadIsComplete = false;
|
|
17
|
+
this.showVideoAsGif = false;
|
|
18
|
+
this.activeLazyLoadClass = '';
|
|
19
|
+
this.inlineStyle = {};
|
|
20
|
+
this.hasMediaContent = false;
|
|
21
|
+
}
|
|
22
|
+
preloadImage(src) {
|
|
23
|
+
return new Promise(r => {
|
|
24
|
+
const image = new Image();
|
|
25
|
+
image.onload = r;
|
|
26
|
+
image.onerror = r;
|
|
27
|
+
image.src = src;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
componentWillLoad() {
|
|
31
|
+
return Promise.allSettled([
|
|
32
|
+
WindowResizeService.registerProp(this.hover).subscribe(newValue => this.hover = newValue),
|
|
33
|
+
WindowResizeService.registerProp(this.src).subscribe(newValue => {
|
|
34
|
+
this.showVideoAsGif = newValue.indexOf('.mp4') >= 0;
|
|
35
|
+
if (!this.lazyLoadIsComplete) {
|
|
36
|
+
this.lazyLoadIsComplete = true;
|
|
37
|
+
}
|
|
38
|
+
this.src = newValue;
|
|
39
|
+
}),
|
|
40
|
+
WindowResizeService.registerProp(this.alt).subscribe(newValue => {
|
|
41
|
+
this.alt = newValue;
|
|
42
|
+
}),
|
|
43
|
+
WindowResizeService.registerProp(this.height).subscribe(newValue => {
|
|
44
|
+
this.height = newValue;
|
|
45
|
+
}),
|
|
46
|
+
]);
|
|
47
|
+
}
|
|
48
|
+
componentDidLoad() {
|
|
49
|
+
this.hasMediaContent = !!this.hostElement.querySelector('[slot="mediaContent"]');
|
|
50
|
+
}
|
|
51
|
+
watchLazyLoadIsComplete(newValue) {
|
|
52
|
+
if (newValue === true) {
|
|
53
|
+
this.activeLazyLoadClass = 'content-image-loaded';
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
if (!this.lazyLoad) {
|
|
57
|
+
this.activeLazyLoadClass = 'content-image-no-lazyload';
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
this.activeLazyLoadClass = 'content-image-loading';
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
render() {
|
|
65
|
+
let pictureSrcSet = '';
|
|
66
|
+
let pictureImageSrc = '';
|
|
67
|
+
if (this.src) {
|
|
68
|
+
breakpointValues.forEach((_bp, index) => {
|
|
69
|
+
if (index === 0) {
|
|
70
|
+
pictureImageSrc = getValueAtIndex(0, this.src);
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
pictureSrcSet += `${getValueAtIndex(index, this.src)} ${breakpointValues[index]}w,`;
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
return (h(Host, { class: this.activeLazyLoadClass, style: this.inlineStyle, hover: this.hover }, this.hasMediaContent &&
|
|
78
|
+
h("div", { class: "content-image__media-content" }, h("slot", { name: "mediaContent" })), this.showVideoAsGif ? (h("video", { autoplay: true, muted: true, loop: true, preload: "none", playsinline: true, width: this.width, height: this.height }, h("source", { src: this.lazyLoadIsComplete ? this.src : null, type: this.videoType }))) : (h("picture", null, h("source", { srcSet: pictureSrcSet }), h("img", { width: this.width, height: this.height, src: pictureImageSrc, alt: this.alt })))));
|
|
79
|
+
}
|
|
80
|
+
static get is() { return "content-image"; }
|
|
81
|
+
static get originalStyleUrls() {
|
|
82
|
+
return {
|
|
83
|
+
"$": ["content-image.scss"]
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
static get styleUrls() {
|
|
87
|
+
return {
|
|
88
|
+
"$": ["content-image.css"]
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
static get properties() {
|
|
92
|
+
return {
|
|
93
|
+
"lazyLoad": {
|
|
94
|
+
"type": "boolean",
|
|
95
|
+
"mutable": false,
|
|
96
|
+
"complexType": {
|
|
97
|
+
"original": "boolean",
|
|
98
|
+
"resolved": "boolean",
|
|
99
|
+
"references": {}
|
|
100
|
+
},
|
|
101
|
+
"required": false,
|
|
102
|
+
"optional": false,
|
|
103
|
+
"docs": {
|
|
104
|
+
"tags": [{
|
|
105
|
+
"name": "type",
|
|
106
|
+
"text": "Boolean"
|
|
107
|
+
}],
|
|
108
|
+
"text": ""
|
|
109
|
+
},
|
|
110
|
+
"attribute": "lazy-load",
|
|
111
|
+
"reflect": false,
|
|
112
|
+
"defaultValue": "true"
|
|
113
|
+
},
|
|
114
|
+
"src": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"mutable": true,
|
|
117
|
+
"complexType": {
|
|
118
|
+
"original": "ResponsiveString",
|
|
119
|
+
"resolved": "string",
|
|
120
|
+
"references": {
|
|
121
|
+
"ResponsiveString": {
|
|
122
|
+
"location": "import",
|
|
123
|
+
"path": "../../typings",
|
|
124
|
+
"id": "src/typings.d.ts::ResponsiveString"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"required": true,
|
|
129
|
+
"optional": false,
|
|
130
|
+
"docs": {
|
|
131
|
+
"tags": [{
|
|
132
|
+
"name": "type",
|
|
133
|
+
"text": "Media"
|
|
134
|
+
}, {
|
|
135
|
+
"name": "responsive",
|
|
136
|
+
"text": undefined
|
|
137
|
+
}],
|
|
138
|
+
"text": ""
|
|
139
|
+
},
|
|
140
|
+
"attribute": "src",
|
|
141
|
+
"reflect": true
|
|
142
|
+
},
|
|
143
|
+
"alt": {
|
|
144
|
+
"type": "string",
|
|
145
|
+
"mutable": true,
|
|
146
|
+
"complexType": {
|
|
147
|
+
"original": "ResponsiveString",
|
|
148
|
+
"resolved": "string",
|
|
149
|
+
"references": {
|
|
150
|
+
"ResponsiveString": {
|
|
151
|
+
"location": "import",
|
|
152
|
+
"path": "../../typings",
|
|
153
|
+
"id": "src/typings.d.ts::ResponsiveString"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"required": false,
|
|
158
|
+
"optional": false,
|
|
159
|
+
"docs": {
|
|
160
|
+
"tags": [{
|
|
161
|
+
"name": "type",
|
|
162
|
+
"text": "String"
|
|
163
|
+
}, {
|
|
164
|
+
"name": "responsive",
|
|
165
|
+
"text": undefined
|
|
166
|
+
}],
|
|
167
|
+
"text": ""
|
|
168
|
+
},
|
|
169
|
+
"attribute": "alt",
|
|
170
|
+
"reflect": true
|
|
171
|
+
},
|
|
172
|
+
"width": {
|
|
173
|
+
"type": "string",
|
|
174
|
+
"mutable": true,
|
|
175
|
+
"complexType": {
|
|
176
|
+
"original": "ResponsiveNumber",
|
|
177
|
+
"resolved": "string",
|
|
178
|
+
"references": {
|
|
179
|
+
"ResponsiveNumber": {
|
|
180
|
+
"location": "import",
|
|
181
|
+
"path": "../../typings",
|
|
182
|
+
"id": "src/typings.d.ts::ResponsiveNumber"
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"required": false,
|
|
187
|
+
"optional": false,
|
|
188
|
+
"docs": {
|
|
189
|
+
"tags": [{
|
|
190
|
+
"name": "type",
|
|
191
|
+
"text": "Number"
|
|
192
|
+
}, {
|
|
193
|
+
"name": "responsive",
|
|
194
|
+
"text": undefined
|
|
195
|
+
}],
|
|
196
|
+
"text": ""
|
|
197
|
+
},
|
|
198
|
+
"attribute": "width",
|
|
199
|
+
"reflect": true,
|
|
200
|
+
"defaultValue": "'16'"
|
|
201
|
+
},
|
|
202
|
+
"height": {
|
|
203
|
+
"type": "string",
|
|
204
|
+
"mutable": true,
|
|
205
|
+
"complexType": {
|
|
206
|
+
"original": "ResponsiveNumber",
|
|
207
|
+
"resolved": "string",
|
|
208
|
+
"references": {
|
|
209
|
+
"ResponsiveNumber": {
|
|
210
|
+
"location": "import",
|
|
211
|
+
"path": "../../typings",
|
|
212
|
+
"id": "src/typings.d.ts::ResponsiveNumber"
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"required": false,
|
|
217
|
+
"optional": false,
|
|
218
|
+
"docs": {
|
|
219
|
+
"tags": [{
|
|
220
|
+
"name": "type",
|
|
221
|
+
"text": "Number"
|
|
222
|
+
}, {
|
|
223
|
+
"name": "responsive",
|
|
224
|
+
"text": undefined
|
|
225
|
+
}],
|
|
226
|
+
"text": ""
|
|
227
|
+
},
|
|
228
|
+
"attribute": "height",
|
|
229
|
+
"reflect": true,
|
|
230
|
+
"defaultValue": "'9'"
|
|
231
|
+
},
|
|
232
|
+
"videoType": {
|
|
233
|
+
"type": "string",
|
|
234
|
+
"mutable": false,
|
|
235
|
+
"complexType": {
|
|
236
|
+
"original": "string",
|
|
237
|
+
"resolved": "string",
|
|
238
|
+
"references": {}
|
|
239
|
+
},
|
|
240
|
+
"required": false,
|
|
241
|
+
"optional": true,
|
|
242
|
+
"docs": {
|
|
243
|
+
"tags": [{
|
|
244
|
+
"name": "type",
|
|
245
|
+
"text": "Select"
|
|
246
|
+
}, {
|
|
247
|
+
"name": "options",
|
|
248
|
+
"text": "video/mp4"
|
|
249
|
+
}],
|
|
250
|
+
"text": ""
|
|
251
|
+
},
|
|
252
|
+
"attribute": "video-type",
|
|
253
|
+
"reflect": false,
|
|
254
|
+
"defaultValue": "'video/mp4'"
|
|
255
|
+
},
|
|
256
|
+
"hover": {
|
|
257
|
+
"type": "string",
|
|
258
|
+
"mutable": true,
|
|
259
|
+
"complexType": {
|
|
260
|
+
"original": "ResponsiveBoolean",
|
|
261
|
+
"resolved": "string",
|
|
262
|
+
"references": {
|
|
263
|
+
"ResponsiveBoolean": {
|
|
264
|
+
"location": "import",
|
|
265
|
+
"path": "../../typings",
|
|
266
|
+
"id": "src/typings.d.ts::ResponsiveBoolean"
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
"required": false,
|
|
271
|
+
"optional": false,
|
|
272
|
+
"docs": {
|
|
273
|
+
"tags": [{
|
|
274
|
+
"name": "type",
|
|
275
|
+
"text": "Boolean"
|
|
276
|
+
}, {
|
|
277
|
+
"name": "responsive",
|
|
278
|
+
"text": undefined
|
|
279
|
+
}],
|
|
280
|
+
"text": "If true, the media content will show only on hover"
|
|
281
|
+
},
|
|
282
|
+
"attribute": "hover",
|
|
283
|
+
"reflect": true,
|
|
284
|
+
"defaultValue": "'false|true'"
|
|
285
|
+
}
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
static get states() {
|
|
289
|
+
return {
|
|
290
|
+
"lazyLoadIsComplete": {},
|
|
291
|
+
"showVideoAsGif": {},
|
|
292
|
+
"activeLazyLoadClass": {},
|
|
293
|
+
"inlineStyle": {},
|
|
294
|
+
"hasMediaContent": {}
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
static get elementRef() { return "hostElement"; }
|
|
298
|
+
static get watchers() {
|
|
299
|
+
return [{
|
|
300
|
+
"propName": "lazyLoadIsComplete",
|
|
301
|
+
"methodName": "watchLazyLoadIsComplete"
|
|
302
|
+
}];
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
//# sourceMappingURL=content-image.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-image.js","sourceRoot":"","sources":["../../../../src/elements/content-image/content-image.tsx"],"names":[],"mappings":"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","sourcesContent":["import { Component, h, Host, Element, Prop, State, Watch } from '@stencil/core';\nimport { HostElement } from '@stencil/core/internal';\nimport { WindowResizeService } from '../../services/window-resize-service';\nimport { ResponsiveBoolean, ResponsiveNumber, ResponsiveString } from '../../typings';\nimport { breakpointValues, getValueAtIndex } from '../../utils/utils';\n\n/**\n * @slot mediaContent - Media content that can be revealed on hover\n */\n@Component({\n tag: 'content-image',\n styleUrl: 'content-image.scss',\n shadow: false,\n})\nexport class ContentImage {\n @Element() hostElement: HostElement;\n /**\n * @type Boolean\n */\n @Prop() lazyLoad: boolean = true;\n /**\n * @type Media\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true\n }) src!: ResponsiveString;\n /**\n * @type String\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true\n }) alt: ResponsiveString;\n /**\n * @type Number\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true\n }) width: ResponsiveNumber = '16';\n /**\n * @type Number\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true\n }) height: ResponsiveNumber = '9';\n /**\n * @type Select\n * @options video/mp4\n */\n @Prop() videoType?: string = 'video/mp4';\n\n /**\n * If true, the media content will show only on hover\n * @type Boolean\n * @responsive\n */\n @Prop({\n mutable: true,\n reflect: true\n }) hover: ResponsiveBoolean = 'false|true';\n\n @State() lazyLoadIsComplete: boolean = false;\n @State() showVideoAsGif: boolean = false;\n @State() activeLazyLoadClass = '';\n @State() inlineStyle?: {[key: string]: string} = {};\n @State() hasMediaContent: boolean = false;\n preloadImage(src) {\n return new Promise(r => {\n const image = new Image()\n image.onload = r\n image.onerror = r\n image.src = src\n });\n }\n\n componentWillLoad() {\n return Promise.allSettled([\n WindowResizeService.registerProp(this.hover).subscribe(newValue => this.hover = newValue as string),\n WindowResizeService.registerProp(this.src).subscribe(newValue => {\n this.showVideoAsGif = (newValue as string).indexOf('.mp4') >= 0;\n if (!this.lazyLoadIsComplete) {\n this.lazyLoadIsComplete = true;\n }\n this.src = newValue as string;\n }),\n WindowResizeService.registerProp(this.alt).subscribe(newValue => {\n this.alt = newValue as string;\n }),\n WindowResizeService.registerProp(this.height).subscribe(newValue => {\n this.height = newValue as string;\n }),\n ])\n }\n \n componentDidLoad() {\n this.hasMediaContent = !!this.hostElement.querySelector('[slot=\"mediaContent\"]');\n }\n\n @Watch('lazyLoadIsComplete')\n watchLazyLoadIsComplete(newValue: boolean) {\n if (newValue === true) {\n this.activeLazyLoadClass = 'content-image-loaded';\n } else {\n if (!this.lazyLoad) {\n this.activeLazyLoadClass = 'content-image-no-lazyload';\n } else {\n this.activeLazyLoadClass = 'content-image-loading';\n }\n }\n }\n\n render() {\n let pictureSrcSet = '';\n let pictureImageSrc = '';\n if (this.src) {\n breakpointValues.forEach((_bp, index) => {\n if (index === 0) {\n pictureImageSrc = getValueAtIndex(0, this.src);\n } else {\n pictureSrcSet += `${getValueAtIndex(index, this.src)} ${breakpointValues[index]}w,`;\n }\n });\n }\n return (\n <Host class={this.activeLazyLoadClass} style={this.inlineStyle} hover={this.hover}>\n { this.hasMediaContent && \n <div class=\"content-image__media-content\">\n <slot name=\"mediaContent\"></slot>\n </div>\n }\n { this.showVideoAsGif ? (\n <video autoplay muted loop preload=\"none\" playsinline width={this.width} height={this.height}>\n <source src={this.lazyLoadIsComplete ? this.src : null } type={this.videoType} />\n </video>\n ) : (\n <picture>\n <source srcSet={pictureSrcSet} />\n <img width={this.width} height={this.height} src={pictureImageSrc} alt={this.alt} />\n </picture>\n )}\n </Host>\n );\n }\n\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
+
describe('content-image', () => {
|
|
3
|
+
it('renders', async () => {
|
|
4
|
+
const page = await newE2EPage();
|
|
5
|
+
await page.setContent('<content-image></content-image>');
|
|
6
|
+
const element = await page.find('content-image');
|
|
7
|
+
expect(element).toHaveClass('hydrated');
|
|
8
|
+
});
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=content-image.e2e.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-image.e2e.js","sourceRoot":"","sources":["../../../../../src/elements/content-image/test/content-image.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;EAC7B,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IACvB,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;IAChC,MAAM,IAAI,CAAC,UAAU,CAAC,iCAAiC,CAAC,CAAC;IAEzD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IACjD,MAAM,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;EAC1C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newE2EPage } from '@stencil/core/testing';\n\ndescribe('content-image', () => {\n it('renders', async () => {\n const page = await newE2EPage();\n await page.setContent('<content-image></content-image>');\n\n const element = await page.find('content-image');\n expect(element).toHaveClass('hydrated');\n });\n});\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
+
import { ContentImage } from "../content-image";
|
|
3
|
+
describe('content-image', () => {
|
|
4
|
+
it('renders', async () => {
|
|
5
|
+
const page = await newSpecPage({
|
|
6
|
+
components: [ContentImage],
|
|
7
|
+
html: `<content-image></content-image>`,
|
|
8
|
+
});
|
|
9
|
+
expect(page.root).toEqualHtml(`
|
|
10
|
+
<content-image>
|
|
11
|
+
<mock:shadow-root>
|
|
12
|
+
<slot></slot>
|
|
13
|
+
</mock:shadow-root>
|
|
14
|
+
</content-image>
|
|
15
|
+
`);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=content-image.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-image.spec.js","sourceRoot":"","sources":["../../../../../src/elements/content-image/test/content-image.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;EAC7B,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;MAC7B,UAAU,EAAE,CAAC,YAAY,CAAC;MAC1B,IAAI,EAAE,iCAAiC;KACxC,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;KAM7B,CAAC,CAAC;EACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { ContentImage } from '../content-image';\n\ndescribe('content-image', () => {\n it('renders', async () => {\n const page = await newSpecPage({\n components: [ContentImage],\n html: `<content-image></content-image>`,\n });\n expect(page.root).toEqualHtml(`\n <content-image>\n <mock:shadow-root>\n <slot></slot>\n </mock:shadow-root>\n </content-image>\n `);\n });\n});\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
content-line {
|
|
2
|
+
display: block;
|
|
3
|
+
word-break: break-word;
|
|
4
|
+
white-space: normal;
|
|
5
|
+
}
|
|
6
|
+
content-line .content-line__inner {
|
|
7
|
+
display: inline-block;
|
|
8
|
+
width: auto;
|
|
9
|
+
}
|
|
10
|
+
content-line[text-align=left] {
|
|
11
|
+
text-align: left;
|
|
12
|
+
}
|
|
13
|
+
content-line[text-align=center] {
|
|
14
|
+
text-align: center;
|
|
15
|
+
}
|
|
16
|
+
content-line[text-align=right] {
|
|
17
|
+
text-align: right;
|
|
18
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
+
describe('content-text', () => {
|
|
3
|
+
it('renders', async () => {
|
|
4
|
+
const page = await newE2EPage();
|
|
5
|
+
await page.setContent('<content-text></content-text>');
|
|
6
|
+
const element = await page.find('content-text');
|
|
7
|
+
expect(element).toHaveClass('hydrated');
|
|
8
|
+
});
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=content-line.e2e.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-line.e2e.js","sourceRoot":"","sources":["../../../../src/elements/content-line/content-line.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;EAC5B,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IACvB,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;IAEhC,MAAM,IAAI,CAAC,UAAU,CAAC,+BAA+B,CAAC,CAAC;IACvD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAChD,MAAM,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;EAC1C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newE2EPage } from '@stencil/core/testing';\n\ndescribe('content-text', () => {\n it('renders', async () => {\n const page = await newE2EPage();\n\n await page.setContent('<content-text></content-text>');\n const element = await page.find('content-text');\n expect(element).toHaveClass('hydrated');\n });\n});\n"]}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { WindowResizeService } from "../../services/window-resize-service";
|
|
3
|
+
import { getHydratedClassString } from "../../utils/utils";
|
|
4
|
+
/**
|
|
5
|
+
* @slot content - Inner contents of the line, usually plaintext.
|
|
6
|
+
* @slot - Default slot, same as content slot.
|
|
7
|
+
*/
|
|
8
|
+
export class ContentBlockLine {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.tag = 'div';
|
|
11
|
+
this.textAlign = 'default';
|
|
12
|
+
this.class = undefined;
|
|
13
|
+
this.maxWidth = '100%';
|
|
14
|
+
this.inlineStyle = {};
|
|
15
|
+
}
|
|
16
|
+
componentWillLoad() {
|
|
17
|
+
let promises = [];
|
|
18
|
+
promises.push(WindowResizeService.registerProp(this.textAlign).subscribe(newValue => this.textAlign = newValue));
|
|
19
|
+
if (this.maxWidth) {
|
|
20
|
+
promises.push(WindowResizeService.registerProp(this.maxWidth).subscribe((newValue) => {
|
|
21
|
+
this.inlineStyle = {
|
|
22
|
+
'max-width': isNaN(newValue) ? newValue : newValue + '%',
|
|
23
|
+
};
|
|
24
|
+
}));
|
|
25
|
+
}
|
|
26
|
+
return Promise.allSettled(promises);
|
|
27
|
+
}
|
|
28
|
+
componentDidLoad() {
|
|
29
|
+
WindowResizeService.registerProp(this.class).subscribe(newValue => setTimeout(() => this.class = getHydratedClassString(newValue), 100));
|
|
30
|
+
}
|
|
31
|
+
render() {
|
|
32
|
+
if (!this.classSubscription$) {
|
|
33
|
+
this.classSubscription$ = WindowResizeService.registerProp(this.class);
|
|
34
|
+
this.classSubscription$.subscribe(newValue => {
|
|
35
|
+
this.class = getHydratedClassString(newValue);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
// The capital case in this JSX variable is important
|
|
39
|
+
const ElementTagParsed = `${this.tag}`;
|
|
40
|
+
return (h(Host, { class: this.class, "text-align": this.textAlign }, h(ElementTagParsed, { class: "content-line__inner", style: this.inlineStyle }, h("slot", { name: "content" }), h("slot", null))));
|
|
41
|
+
}
|
|
42
|
+
static get is() { return "content-line"; }
|
|
43
|
+
static get originalStyleUrls() {
|
|
44
|
+
return {
|
|
45
|
+
"$": ["content-line.scss"]
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
static get styleUrls() {
|
|
49
|
+
return {
|
|
50
|
+
"$": ["content-line.css"]
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
static get properties() {
|
|
54
|
+
return {
|
|
55
|
+
"tag": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"mutable": false,
|
|
58
|
+
"complexType": {
|
|
59
|
+
"original": "ContentLineTagOptions",
|
|
60
|
+
"resolved": "\"article\" | \"div\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"p\" | \"section\" | \"span\"",
|
|
61
|
+
"references": {
|
|
62
|
+
"ContentLineTagOptions": {
|
|
63
|
+
"location": "local",
|
|
64
|
+
"path": "/Users/shahrukceo/Developer/content-blocks-monorepo/develop/packages/content-blocks-stenciljs/src/elements/content-line/content-line.tsx",
|
|
65
|
+
"id": "src/elements/content-line/content-line.tsx::ContentLineTagOptions"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"required": false,
|
|
70
|
+
"optional": false,
|
|
71
|
+
"docs": {
|
|
72
|
+
"tags": [{
|
|
73
|
+
"name": "type",
|
|
74
|
+
"text": "Select"
|
|
75
|
+
}, {
|
|
76
|
+
"name": "options",
|
|
77
|
+
"text": "div"
|
|
78
|
+
}, {
|
|
79
|
+
"name": "options",
|
|
80
|
+
"text": "p"
|
|
81
|
+
}, {
|
|
82
|
+
"name": "options",
|
|
83
|
+
"text": "h1"
|
|
84
|
+
}, {
|
|
85
|
+
"name": "options",
|
|
86
|
+
"text": "h2"
|
|
87
|
+
}, {
|
|
88
|
+
"name": "options",
|
|
89
|
+
"text": "h3"
|
|
90
|
+
}, {
|
|
91
|
+
"name": "options",
|
|
92
|
+
"text": "h4"
|
|
93
|
+
}, {
|
|
94
|
+
"name": "options",
|
|
95
|
+
"text": "h5"
|
|
96
|
+
}, {
|
|
97
|
+
"name": "options",
|
|
98
|
+
"text": "h6"
|
|
99
|
+
}, {
|
|
100
|
+
"name": "options",
|
|
101
|
+
"text": "span"
|
|
102
|
+
}, {
|
|
103
|
+
"name": "options",
|
|
104
|
+
"text": "section"
|
|
105
|
+
}, {
|
|
106
|
+
"name": "options",
|
|
107
|
+
"text": "article"
|
|
108
|
+
}],
|
|
109
|
+
"text": "The element tag to use."
|
|
110
|
+
},
|
|
111
|
+
"attribute": "tag",
|
|
112
|
+
"reflect": false,
|
|
113
|
+
"defaultValue": "'div'"
|
|
114
|
+
},
|
|
115
|
+
"textAlign": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"mutable": true,
|
|
118
|
+
"complexType": {
|
|
119
|
+
"original": "ContentLineTextAlignOptions | ResponsiveString",
|
|
120
|
+
"resolved": "string",
|
|
121
|
+
"references": {
|
|
122
|
+
"ContentLineTextAlignOptions": {
|
|
123
|
+
"location": "local",
|
|
124
|
+
"path": "/Users/shahrukceo/Developer/content-blocks-monorepo/develop/packages/content-blocks-stenciljs/src/elements/content-line/content-line.tsx",
|
|
125
|
+
"id": "src/elements/content-line/content-line.tsx::ContentLineTextAlignOptions"
|
|
126
|
+
},
|
|
127
|
+
"ResponsiveString": {
|
|
128
|
+
"location": "import",
|
|
129
|
+
"path": "../../typings",
|
|
130
|
+
"id": "src/typings.d.ts::ResponsiveString"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"required": false,
|
|
135
|
+
"optional": false,
|
|
136
|
+
"docs": {
|
|
137
|
+
"tags": [{
|
|
138
|
+
"name": "type",
|
|
139
|
+
"text": "Select"
|
|
140
|
+
}, {
|
|
141
|
+
"name": "options",
|
|
142
|
+
"text": "default"
|
|
143
|
+
}, {
|
|
144
|
+
"name": "options",
|
|
145
|
+
"text": "left"
|
|
146
|
+
}, {
|
|
147
|
+
"name": "options",
|
|
148
|
+
"text": "center"
|
|
149
|
+
}, {
|
|
150
|
+
"name": "options",
|
|
151
|
+
"text": "right"
|
|
152
|
+
}, {
|
|
153
|
+
"name": "responsive",
|
|
154
|
+
"text": undefined
|
|
155
|
+
}],
|
|
156
|
+
"text": "Pipe separated list of ContentLineTextAlignOptions for text alignment."
|
|
157
|
+
},
|
|
158
|
+
"attribute": "text-align",
|
|
159
|
+
"reflect": true,
|
|
160
|
+
"defaultValue": "'default'"
|
|
161
|
+
},
|
|
162
|
+
"class": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"mutable": true,
|
|
165
|
+
"complexType": {
|
|
166
|
+
"original": "ResponsiveString",
|
|
167
|
+
"resolved": "string",
|
|
168
|
+
"references": {
|
|
169
|
+
"ResponsiveString": {
|
|
170
|
+
"location": "import",
|
|
171
|
+
"path": "../../typings",
|
|
172
|
+
"id": "src/typings.d.ts::ResponsiveString"
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"required": false,
|
|
177
|
+
"optional": false,
|
|
178
|
+
"docs": {
|
|
179
|
+
"tags": [{
|
|
180
|
+
"name": "type",
|
|
181
|
+
"text": "String"
|
|
182
|
+
}, {
|
|
183
|
+
"name": "responsive",
|
|
184
|
+
"text": undefined
|
|
185
|
+
}],
|
|
186
|
+
"text": "The font class for the line."
|
|
187
|
+
},
|
|
188
|
+
"attribute": "class",
|
|
189
|
+
"reflect": true
|
|
190
|
+
},
|
|
191
|
+
"maxWidth": {
|
|
192
|
+
"type": "string",
|
|
193
|
+
"mutable": false,
|
|
194
|
+
"complexType": {
|
|
195
|
+
"original": "ResponsiveNumber",
|
|
196
|
+
"resolved": "string",
|
|
197
|
+
"references": {
|
|
198
|
+
"ResponsiveNumber": {
|
|
199
|
+
"location": "import",
|
|
200
|
+
"path": "../../typings",
|
|
201
|
+
"id": "src/typings.d.ts::ResponsiveNumber"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"required": false,
|
|
206
|
+
"optional": false,
|
|
207
|
+
"docs": {
|
|
208
|
+
"tags": [{
|
|
209
|
+
"name": "type",
|
|
210
|
+
"text": "String"
|
|
211
|
+
}, {
|
|
212
|
+
"name": "responsive",
|
|
213
|
+
"text": undefined
|
|
214
|
+
}],
|
|
215
|
+
"text": "Pipe separated list of max width numbers. You can also use units such as \"px\" and \"vw\". If no unit is provided, defaults to percentage."
|
|
216
|
+
},
|
|
217
|
+
"attribute": "max-width",
|
|
218
|
+
"reflect": false,
|
|
219
|
+
"defaultValue": "'100%'"
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
static get states() {
|
|
224
|
+
return {
|
|
225
|
+
"inlineStyle": {}
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
//# sourceMappingURL=content-line.js.map
|