@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.
- package/LICENSE +1 -1
- package/README.md +111 -3
- package/THIRD-PARTY-NOTICES.md +21 -0
- package/dist/cjs/{app-globals-3a1e7e63.js → app-globals-V2Kpy_OQ.js} +0 -2
- package/dist/cjs/content-accordion.cjs.entry.js +87 -0
- package/dist/cjs/content-blocks.cjs.js +35 -11
- package/dist/cjs/content-button.cjs.entry.js +113 -0
- package/dist/cjs/content-carousel.cjs.entry.js +153 -47
- package/dist/cjs/content-grid-formatter.cjs.entry.js +102 -0
- package/dist/cjs/content-hero-block.cjs.entry.js +45 -0
- package/dist/cjs/content-image.cjs.entry.js +153 -0
- package/dist/cjs/content-line.cjs.entry.js +61 -0
- package/dist/cjs/content-navigation-block.cjs.entry.js +51 -34
- package/dist/cjs/content-overlay.cjs.entry.js +641 -0
- package/dist/cjs/content-spacer.cjs.entry.js +75 -0
- package/dist/cjs/content-split-block.cjs.entry.js +22 -19
- package/dist/cjs/content-tabs.cjs.entry.js +38 -21
- package/dist/cjs/content-text-block.cjs.entry.js +63 -0
- package/dist/cjs/content-tout-block.cjs.entry.js +34 -0
- package/dist/cjs/{content-accordion_11.cjs.entry.js → content-video.cjs.entry.js} +14560 -12927
- package/dist/cjs/{focus-trap.esm-7bc384a0.js → focus-trap.esm-ZwN-anf1.js} +484 -190
- package/dist/cjs/{index-2e0ce692.js → index-B1U6Gweq.js} +348 -246
- package/dist/cjs/index-ClnpH9XB.js +2170 -0
- package/dist/cjs/index-CyalvZJn.js +1719 -0
- package/dist/cjs/index-DUvWvBDN.js +290 -0
- package/dist/cjs/index-voGY4Tkl.js +4705 -0
- package/dist/cjs/index.cjs.js +2 -5
- package/dist/cjs/loader.cjs.js +3 -8
- package/dist/cjs/responsive-component-C5eJS82z.js +171 -0
- package/dist/cjs/responsive-component-DMdnQIPV.js +171 -0
- package/dist/cjs/swiper-KLYbvU1K.js +3931 -0
- package/dist/cjs/{swiper-8221f4e8.js → swiper-_Z8Y4IJI.js} +269 -236
- package/dist/cjs/utils-BCHaRGm_.js +462 -0
- package/dist/cjs/{utils-df044337.js → utils-C3gXIS2t.js} +51 -49
- package/dist/cjs/utils-DUvWvBDN.js +290 -0
- package/dist/collection/blocks/content-hero-block/content-hero-block.css +1 -1
- package/dist/collection/blocks/content-hero-block/content-hero-block.js +33 -48
- package/dist/collection/blocks/content-split-block/content-split-block.css +16 -5
- package/dist/collection/blocks/content-split-block/content-split-block.js +29 -48
- package/dist/collection/blocks/content-text-block/content-text-block.js +65 -59
- package/dist/collection/blocks/content-tout-block/content-tout-block.css +3 -0
- package/dist/collection/blocks/content-tout-block/content-tout-block.js +22 -47
- package/dist/collection/collection-manifest.json +8 -5
- package/dist/collection/components/content-accordion/content-accordion.css +20 -1
- package/dist/collection/components/content-accordion/content-accordion.js +67 -33
- package/dist/collection/components/content-accordion/libraries/w3_disclosure_button.js +0 -1
- package/dist/collection/components/content-carousel/content-carousel.css +60 -4
- package/dist/collection/components/content-carousel/content-carousel.js +294 -44
- package/dist/collection/components/content-navigation-block/content-navigation-block.css +15 -1
- package/dist/collection/components/content-navigation-block/content-navigation-block.js +86 -42
- package/dist/collection/components/content-overlay/content-overlay.css +36 -5
- package/dist/collection/components/content-overlay/content-overlay.js +181 -120
- package/dist/collection/components/content-overlay/libraries/aria-dialog.js +0 -1
- package/dist/collection/components/content-overlay/libraries/aria-utilities.js +0 -1
- package/dist/collection/components/content-tabs/content-tabs.js +7 -49
- package/dist/collection/components/content-tabs/libraries/w3_tabs.js +0 -1
- package/dist/collection/elements/content-button/content-button.css +8 -7
- package/dist/collection/elements/content-button/content-button.js +103 -84
- package/dist/collection/elements/content-image/content-image.css +3 -1
- package/dist/collection/elements/content-image/content-image.js +176 -95
- package/dist/collection/elements/content-line/content-line.js +63 -54
- package/dist/collection/elements/content-video/content-video.css +1 -1
- package/dist/collection/elements/content-video/content-video.js +165 -92
- package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.css +8 -2
- package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.js +167 -89
- package/dist/collection/formatters/content-spacer/content-spacer.js +86 -209
- package/dist/collection/global/content-blocks-reset.css +77 -0
- package/dist/collection/index.js +1 -1
- package/dist/collection/sass/_mixins.scss +21 -5
- package/dist/collection/sass/_variables.scss +15 -15
- package/dist/collection/setupFiles.js +0 -1
- package/dist/collection/site/site.js +67 -0
- package/dist/collection/utils/breakpoints.js +162 -0
- package/dist/collection/utils/responsive-component.js +249 -0
- package/dist/collection/utils/utils.js +32 -42
- package/dist/components/content-accordion.js +65 -44
- package/dist/components/content-button.js +89 -43
- package/dist/components/content-carousel.js +172 -55
- package/dist/components/content-grid-formatter.js +127 -3
- package/dist/components/content-hero-block.js +33 -26
- package/dist/components/content-image.js +127 -71
- package/dist/components/content-line.js +56 -35
- package/dist/components/content-navigation-block.js +62 -39
- package/dist/components/content-overlay.js +128 -67
- package/dist/components/content-spacer.js +70 -54
- package/dist/components/content-split-block.js +33 -32
- package/dist/components/content-tabs.js +46 -25
- package/dist/components/content-text-block.js +55 -35
- package/dist/components/content-tout-block.js +29 -27
- package/dist/components/content-video.js +14624 -11972
- package/dist/{esm/focus-trap.esm-8fb54175.js → components/focus-trap.esm.js} +484 -190
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +3 -3
- package/dist/components/{p-5a91aa1b.js → index2.js} +348 -246
- package/dist/components/p-BWRCeMvO.js +1 -0
- package/dist/components/p-CYF5GU_q.js +1 -0
- package/dist/components/p-DXUoPIwl.js +10 -0
- package/dist/components/p-D_Ll4QNj.js +1 -0
- package/dist/components/p-DhIoW7H3.js +1 -0
- package/dist/components/responsive-component.js +168 -0
- package/dist/components/{p-e5dc4ea4.js → swiper.js} +268 -235
- package/dist/components/utils.js +4969 -0
- package/dist/{esm/utils-1c9f0ec1.js → components/utils2.js} +51 -50
- package/dist/content-blocks/content-accordion.entry.js +85 -0
- package/dist/content-blocks/content-blocks.esm.js +47 -2
- package/dist/content-blocks/content-button.entry.js +111 -0
- package/dist/content-blocks/content-carousel.entry.js +188 -0
- package/dist/content-blocks/content-grid-formatter.entry.js +100 -0
- package/dist/content-blocks/content-hero-block.entry.js +43 -0
- package/dist/content-blocks/content-image.entry.js +151 -0
- package/dist/content-blocks/content-line.entry.js +59 -0
- package/dist/content-blocks/content-navigation-block.entry.js +105 -0
- package/dist/content-blocks/content-overlay.entry.js +639 -0
- package/dist/content-blocks/content-spacer.entry.js +73 -0
- package/dist/content-blocks/content-split-block.entry.js +34 -0
- package/dist/content-blocks/content-tabs.entry.js +245 -0
- package/dist/content-blocks/content-text-block.entry.js +61 -0
- package/dist/content-blocks/content-tout-block.entry.js +32 -0
- package/dist/{esm/content-accordion_11.entry.js → content-blocks/content-video.entry.js} +14535 -12890
- package/dist/{components/p-a2fedf8a.js → content-blocks/focus-trap.esm-DXUoPIwl.js} +484 -190
- package/dist/content-blocks/global/content-blocks-reset.css +77 -0
- package/dist/content-blocks/index-BFDJMblF.js +4690 -0
- package/dist/{esm/index-f45a9c45.js → content-blocks/index-P1YnSd-O.js} +348 -246
- package/dist/content-blocks/index.esm.js +1 -2
- package/dist/content-blocks/p-008457f0.entry.js +1 -0
- package/dist/content-blocks/p-052692f1.entry.js +1 -0
- package/dist/content-blocks/p-0f71bd32.entry.js +1 -0
- package/dist/content-blocks/p-1f154617.entry.js +1 -0
- package/dist/content-blocks/p-2554ebd8.entry.js +1 -0
- package/dist/content-blocks/p-4afd6511.entry.js +1 -0
- package/dist/content-blocks/p-78d5de9f.entry.js +1 -0
- package/dist/content-blocks/p-7bcf7e7e.entry.js +1 -0
- package/dist/content-blocks/p-9058031c.entry.js +1 -0
- package/dist/content-blocks/p-9c41ac23.entry.js +17 -0
- package/dist/content-blocks/p-CLwOzPEO.js +3 -0
- package/dist/content-blocks/p-CYF5GU_q.js +1 -0
- package/dist/content-blocks/p-CjR_4mPu.js +1 -0
- package/dist/content-blocks/p-DQuL1Twl.js +1 -0
- package/dist/content-blocks/p-DXUoPIwl.js +10 -0
- package/dist/content-blocks/p-D_Ll4QNj.js +1 -0
- package/dist/content-blocks/p-DhIoW7H3.js +1 -0
- package/dist/content-blocks/p-DzYwy_62.js +1 -0
- package/dist/content-blocks/p-b2e6358a.entry.js +1 -0
- package/dist/content-blocks/p-c783bc68.entry.js +1 -0
- package/dist/content-blocks/p-e3d81e15.entry.js +1 -0
- package/dist/content-blocks/p-f23b4aae.entry.js +1 -0
- package/dist/content-blocks/p-f75c9094.entry.js +1 -0
- package/dist/content-blocks/responsive-component-BsLrcKbS.js +169 -0
- package/dist/content-blocks/sass/_mixins.scss +21 -5
- package/dist/content-blocks/sass/_variables.scss +15 -15
- package/dist/{esm/swiper-e9621adb.js → content-blocks/swiper-nBv069TB.js} +268 -235
- package/dist/{components/p-b85cfa86.js → content-blocks/utils--SDsQnWS.js} +51 -50
- package/dist/content-blocks/utils-Bak__24s.js +280 -0
- package/dist/docs.d.ts +480 -0
- package/dist/docs.json +5312 -0
- package/dist/esm/{app-globals-0f993ce5.js → app-globals-DQuL1Twl.js} +0 -2
- package/dist/esm/content-accordion.entry.js +85 -0
- package/dist/esm/content-blocks.js +33 -8
- package/dist/esm/content-button.entry.js +111 -0
- package/dist/esm/content-carousel.entry.js +153 -45
- package/dist/esm/content-grid-formatter.entry.js +100 -0
- package/dist/esm/content-hero-block.entry.js +43 -0
- package/dist/esm/content-image.entry.js +151 -0
- package/dist/esm/content-line.entry.js +59 -0
- package/dist/esm/content-navigation-block.entry.js +51 -32
- package/dist/esm/content-overlay.entry.js +639 -0
- package/dist/esm/content-spacer.entry.js +73 -0
- package/dist/esm/content-split-block.entry.js +22 -17
- package/dist/esm/content-tabs.entry.js +38 -19
- package/dist/esm/content-text-block.entry.js +61 -0
- package/dist/esm/content-tout-block.entry.js +32 -0
- package/dist/esm/content-video.entry.js +72033 -0
- package/dist/esm/focus-trap.esm-DXUoPIwl.js +1801 -0
- package/dist/esm/index-BASCLGuP.js +1713 -0
- package/dist/esm/index-BFDJMblF.js +4690 -0
- package/dist/esm/index-CLwOzPEO.js +2161 -0
- package/dist/esm/index-CjR_4mPu.js +280 -0
- package/dist/esm/index-P1YnSd-O.js +5397 -0
- package/dist/esm/index.js +1 -3
- package/dist/esm/loader.js +3 -6
- package/dist/esm/responsive-component-BsLrcKbS.js +169 -0
- package/dist/esm/responsive-component-D7dJHMp0.js +169 -0
- package/dist/esm/swiper-CtypHPwF.js +3928 -0
- package/dist/esm/swiper-nBv069TB.js +3941 -0
- package/dist/esm/utils--SDsQnWS.js +460 -0
- package/dist/esm/utils-Bak__24s.js +280 -0
- package/dist/esm/utils-CYF5GU_q.js +438 -0
- package/dist/node_modules/video.js/dist/video-js.min.css +1 -0
- package/dist/test/axe.js +60 -0
- package/dist/types/Users/shahrukceo/Developer/content-blocks/packages/js/.stencil/test/axe.d.ts +16 -0
- package/dist/types/blocks/content-hero-block/content-hero-block.d.ts +7 -11
- package/dist/types/blocks/content-split-block/content-split-block.d.ts +5 -9
- package/dist/types/blocks/content-text-block/content-text-block.d.ts +4 -9
- package/dist/types/blocks/content-tout-block/content-tout-block.d.ts +5 -10
- package/dist/types/components/content-accordion/content-accordion.d.ts +4 -3
- package/dist/types/components/content-accordion/libraries/w3_disclosure_button.d.ts +0 -1
- package/dist/types/components/content-carousel/content-carousel.d.ts +44 -7
- package/dist/types/components/content-navigation-block/content-navigation-block.d.ts +14 -8
- package/dist/types/components/content-overlay/content-overlay.d.ts +15 -16
- package/dist/types/components/content-overlay/libraries/aria-dialog.d.ts +0 -1
- package/dist/types/components/content-overlay/libraries/aria-utilities.d.ts +0 -1
- package/dist/types/components/content-tabs/content-tabs.d.ts +4 -10
- package/dist/types/components/content-tabs/libraries/w3_tabs.d.ts +0 -1
- package/dist/types/components.d.ts +900 -196
- package/dist/types/elements/content-button/content-button.d.ts +8 -13
- package/dist/types/elements/content-image/content-image.d.ts +15 -9
- package/dist/types/elements/content-line/content-line.d.ts +5 -12
- package/dist/types/elements/content-video/content-video.d.ts +12 -11
- package/dist/types/formatters/content-grid-formatter/content-grid-formatter.d.ts +14 -9
- package/dist/types/formatters/content-spacer/content-spacer.d.ts +4 -36
- package/dist/types/index.d.ts +3 -1
- package/dist/types/setupFiles.d.ts +0 -1
- package/dist/types/stencil-public-runtime.d.ts +265 -60
- package/dist/types/typings.d.ts +10 -0
- package/dist/types/utils/breakpoints.d.ts +57 -0
- package/dist/types/utils/responsive-component.d.ts +49 -0
- package/dist/types/utils/utils.d.ts +11 -8
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +75 -65
- package/dist/cjs/BehaviorSubject-12116537.js +0 -655
- package/dist/cjs/BehaviorSubject-12116537.js.map +0 -1
- package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
- package/dist/cjs/content-accordion_11.cjs.entry.js.map +0 -1
- package/dist/cjs/content-blocks.cjs.js.map +0 -1
- package/dist/cjs/content-carousel.cjs.entry.js.map +0 -1
- package/dist/cjs/content-navigation-block.cjs.entry.js.map +0 -1
- package/dist/cjs/content-split-block.cjs.entry.js.map +0 -1
- package/dist/cjs/content-tabs.cjs.entry.js.map +0 -1
- package/dist/cjs/focus-trap.esm-7bc384a0.js.map +0 -1
- package/dist/cjs/index-2e0ce692.js.map +0 -1
- package/dist/cjs/index-8af2820a.js +0 -1650
- package/dist/cjs/index-8af2820a.js.map +0 -1
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/cjs/swiper-8221f4e8.js.map +0 -1
- package/dist/cjs/utils-df044337.js.map +0 -1
- package/dist/cjs/utils-f8ccab0a.js +0 -126
- package/dist/cjs/utils-f8ccab0a.js.map +0 -1
- package/dist/cjs/window-resize-service-65a5a370.js +0 -37
- package/dist/cjs/window-resize-service-65a5a370.js.map +0 -1
- package/dist/collection/blocks/content-hero-block/content-hero-block.js.map +0 -1
- package/dist/collection/blocks/content-split-block/content-split-block.js.map +0 -1
- package/dist/collection/blocks/content-text-block/content-text-block.js.map +0 -1
- package/dist/collection/blocks/content-tout-block/content-tout-block.js.map +0 -1
- package/dist/collection/components/content-accordion/content-accordion.js.map +0 -1
- package/dist/collection/components/content-accordion/libraries/w3_disclosure_button.js.map +0 -1
- package/dist/collection/components/content-carousel/content-carousel.js.map +0 -1
- package/dist/collection/components/content-navigation-block/content-navigation-block.js.map +0 -1
- package/dist/collection/components/content-overlay/content-overlay.js.map +0 -1
- package/dist/collection/components/content-overlay/libraries/aria-dialog.js.map +0 -1
- package/dist/collection/components/content-overlay/libraries/aria-utilities.js.map +0 -1
- package/dist/collection/components/content-tabs/content-tabs.js.map +0 -1
- package/dist/collection/components/content-tabs/libraries/w3_tabs.js.map +0 -1
- package/dist/collection/elements/content-button/content-button.js.map +0 -1
- package/dist/collection/elements/content-image/content-image.js.map +0 -1
- package/dist/collection/elements/content-line/content-line.js.map +0 -1
- package/dist/collection/elements/content-video/content-video.js.map +0 -1
- package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.js.map +0 -1
- package/dist/collection/formatters/content-spacer/content-spacer.js.map +0 -1
- package/dist/collection/globalScript.js +0 -15
- package/dist/collection/globalScript.js.map +0 -1
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/services/content-events-service.js +0 -23
- package/dist/collection/services/content-events-service.js.map +0 -1
- package/dist/collection/services/window-resize-service.js +0 -31
- package/dist/collection/services/window-resize-service.js.map +0 -1
- package/dist/collection/setupFiles.js.map +0 -1
- package/dist/collection/stories/ContentHeroBlock.stories.js +0 -51
- package/dist/collection/stories/ContentHeroBlock.stories.js.map +0 -1
- package/dist/collection/stories/ContentNavigationBlock.stories.js +0 -33
- package/dist/collection/stories/ContentNavigationBlock.stories.js.map +0 -1
- package/dist/collection/stories/ContentSpacer.stories.js +0 -20
- package/dist/collection/stories/ContentSpacer.stories.js.map +0 -1
- package/dist/collection/stories/ContentTextBlock.stories.js +0 -17
- package/dist/collection/stories/ContentTextBlock.stories.js.map +0 -1
- package/dist/collection/stories/ContentToutBlock.stories.js +0 -17
- package/dist/collection/stories/ContentToutBlock.stories.js.map +0 -1
- package/dist/collection/stories/FullPageExample.stories.js +0 -432
- package/dist/collection/stories/FullPageExample.stories.js.map +0 -1
- package/dist/collection/stories/assets/accessibility.svg +0 -5
- package/dist/collection/stories/assets/discord.svg +0 -15
- package/dist/collection/stories/assets/github.svg +0 -3
- package/dist/collection/stories/assets/tutorials.svg +0 -12
- package/dist/collection/stories/assets/youtube.svg +0 -4
- package/dist/collection/utils/utils.js.map +0 -1
- package/dist/components/content-accordion.js.map +0 -1
- package/dist/components/content-button.js.map +0 -1
- package/dist/components/content-carousel.js.map +0 -1
- package/dist/components/content-grid-formatter.js.map +0 -1
- package/dist/components/content-hero-block.js.map +0 -1
- package/dist/components/content-image.js.map +0 -1
- package/dist/components/content-line.js.map +0 -1
- package/dist/components/content-navigation-block.js.map +0 -1
- package/dist/components/content-overlay.js.map +0 -1
- package/dist/components/content-spacer.js.map +0 -1
- package/dist/components/content-split-block.js.map +0 -1
- package/dist/components/content-tabs.js.map +0 -1
- package/dist/components/content-text-block.js.map +0 -1
- package/dist/components/content-tout-block.js.map +0 -1
- package/dist/components/content-video.js.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/components/p-26483b46.js +0 -35
- package/dist/components/p-26483b46.js.map +0 -1
- package/dist/components/p-5a91aa1b.js.map +0 -1
- package/dist/components/p-74be971f.js +0 -652
- package/dist/components/p-74be971f.js.map +0 -1
- package/dist/components/p-7a436263.js +0 -122
- package/dist/components/p-7a436263.js.map +0 -1
- package/dist/components/p-a2fedf8a.js.map +0 -1
- package/dist/components/p-b85cfa86.js.map +0 -1
- package/dist/components/p-e28db040.js +0 -1452
- package/dist/components/p-e28db040.js.map +0 -1
- package/dist/components/p-e5dc4ea4.js.map +0 -1
- package/dist/components/p-e9bce2ab.js +0 -88
- package/dist/components/p-e9bce2ab.js.map +0 -1
- package/dist/content-blocks/content-blocks.esm.js.map +0 -1
- package/dist/content-blocks/index.esm.js.map +0 -1
- package/dist/content-blocks/p-13c3cc4f.js +0 -3
- package/dist/content-blocks/p-13c3cc4f.js.map +0 -1
- package/dist/content-blocks/p-5422c25b.entry.js +0 -2
- package/dist/content-blocks/p-5422c25b.entry.js.map +0 -1
- package/dist/content-blocks/p-5a91aa1b.js +0 -2
- package/dist/content-blocks/p-5a91aa1b.js.map +0 -1
- package/dist/content-blocks/p-650d1757.js +0 -2
- package/dist/content-blocks/p-650d1757.js.map +0 -1
- package/dist/content-blocks/p-74be971f.js +0 -2
- package/dist/content-blocks/p-74be971f.js.map +0 -1
- package/dist/content-blocks/p-8deb755c.entry.js +0 -26
- package/dist/content-blocks/p-8deb755c.entry.js.map +0 -1
- package/dist/content-blocks/p-a2fedf8a.js +0 -10
- package/dist/content-blocks/p-a2fedf8a.js.map +0 -1
- package/dist/content-blocks/p-b305392e.entry.js +0 -2
- package/dist/content-blocks/p-b305392e.entry.js.map +0 -1
- package/dist/content-blocks/p-b85cfa86.js +0 -2
- package/dist/content-blocks/p-b85cfa86.js.map +0 -1
- package/dist/content-blocks/p-cc7397cf.js +0 -2
- package/dist/content-blocks/p-cc7397cf.js.map +0 -1
- package/dist/content-blocks/p-d62775d7.entry.js +0 -2
- package/dist/content-blocks/p-d62775d7.entry.js.map +0 -1
- package/dist/content-blocks/p-e1255160.js +0 -2
- package/dist/content-blocks/p-e1255160.js.map +0 -1
- package/dist/content-blocks/p-e5dc4ea4.js +0 -2
- package/dist/content-blocks/p-e5dc4ea4.js.map +0 -1
- package/dist/content-blocks/p-f73f934a.entry.js +0 -2
- package/dist/content-blocks/p-f73f934a.entry.js.map +0 -1
- package/dist/esm/BehaviorSubject-f7a12fd8.js +0 -652
- package/dist/esm/BehaviorSubject-f7a12fd8.js.map +0 -1
- package/dist/esm/app-globals-0f993ce5.js.map +0 -1
- package/dist/esm/content-accordion_11.entry.js.map +0 -1
- package/dist/esm/content-blocks.js.map +0 -1
- package/dist/esm/content-carousel.entry.js.map +0 -1
- package/dist/esm/content-navigation-block.entry.js.map +0 -1
- package/dist/esm/content-split-block.entry.js.map +0 -1
- package/dist/esm/content-tabs.entry.js.map +0 -1
- package/dist/esm/focus-trap.esm-8fb54175.js.map +0 -1
- package/dist/esm/index-ec24af7a.js +0 -1621
- package/dist/esm/index-ec24af7a.js.map +0 -1
- package/dist/esm/index-f45a9c45.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/loader.js.map +0 -1
- package/dist/esm/swiper-e9621adb.js.map +0 -1
- package/dist/esm/utils-1c9f0ec1.js.map +0 -1
- package/dist/esm/utils-9a901aa9.js +0 -122
- package/dist/esm/utils-9a901aa9.js.map +0 -1
- package/dist/esm/window-resize-service-354f2ac5.js +0 -35
- package/dist/esm/window-resize-service-354f2ac5.js.map +0 -1
- package/dist/types/globalScript.d.ts +0 -1
- package/dist/types/old-components.d.ts +0 -1239
- package/dist/types/services/content-events-service.d.ts +0 -11
- package/dist/types/services/window-resize-service.d.ts +0 -11
- package/dist/types/stories/ContentHeroBlock.stories.d.ts +0 -11
- package/dist/types/stories/ContentNavigationBlock.stories.d.ts +0 -9
- package/dist/types/stories/ContentSpacer.stories.d.ts +0 -15
- package/dist/types/stories/ContentTextBlock.stories.d.ts +0 -9
- package/dist/types/stories/ContentToutBlock.stories.d.ts +0 -9
- package/dist/types/stories/FullPageExample.stories.d.ts +0 -10
|
@@ -1,63 +1,112 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
-
import {
|
|
3
|
-
import { getCurrentValue } from "../../utils/utils";
|
|
2
|
+
import { ResponsiveComponent } from "../../utils/responsive-component";
|
|
3
|
+
import { getCurrentValue, prefersReducedMotion } from "../../utils/utils";
|
|
4
4
|
/**
|
|
5
|
+
* A responsive image or muted looping video per breakpoint with native lazy loading.
|
|
6
|
+
*
|
|
5
7
|
* @slot mediaContent - Content displayed over media. If you want to reveal content on hover, use a tout block
|
|
6
8
|
*/
|
|
7
|
-
export class ContentImage {
|
|
9
|
+
export class ContentImage extends ResponsiveComponent {
|
|
8
10
|
constructor() {
|
|
9
|
-
|
|
10
|
-
this.lazyLoad = true;
|
|
11
|
-
this.src = undefined;
|
|
12
|
-
this.activeSrc = undefined;
|
|
13
|
-
this.alt = undefined;
|
|
14
|
-
this.width = '16';
|
|
15
|
-
this.height = '9';
|
|
16
|
-
this.aspectRatio = undefined;
|
|
17
|
-
this.type = 'image';
|
|
18
|
-
this.videoType = 'video/mp4';
|
|
19
|
-
this.showContent = 'false|true';
|
|
20
|
-
this.lazyLoadIsComplete = false;
|
|
21
|
-
this.showVideoAsGif = false;
|
|
22
|
-
this.activeLazyLoadClass = '';
|
|
23
|
-
this.classString = '';
|
|
24
|
-
this.inlineStyle = {};
|
|
25
|
-
this.hasMediaContent = false;
|
|
26
|
-
this.pictureImageSrc = undefined;
|
|
27
|
-
}
|
|
28
|
-
preloadImage(src) {
|
|
29
|
-
return new Promise(r => {
|
|
30
|
-
const image = new Image();
|
|
31
|
-
image.onload = r;
|
|
32
|
-
image.onerror = r;
|
|
33
|
-
image.src = src;
|
|
34
|
-
});
|
|
11
|
+
super();
|
|
35
12
|
}
|
|
13
|
+
hostElement;
|
|
14
|
+
/**
|
|
15
|
+
* Images use the browser's native lazy loading. Set to false for images that are visible when the
|
|
16
|
+
* page opens, such as a hero, so they download straight away.
|
|
17
|
+
* @type Boolean
|
|
18
|
+
*/
|
|
19
|
+
lazyLoad = true;
|
|
20
|
+
/**
|
|
21
|
+
* How soon the browser should download the image compared with other files. Use "high" for the
|
|
22
|
+
* main image of the page.
|
|
23
|
+
* @type Select
|
|
24
|
+
* @options auto
|
|
25
|
+
* @options high
|
|
26
|
+
* @options low
|
|
27
|
+
*/
|
|
28
|
+
fetchPriority;
|
|
29
|
+
/**
|
|
30
|
+
* @type Media
|
|
31
|
+
* @responsive
|
|
32
|
+
*/
|
|
33
|
+
src;
|
|
34
|
+
activeSrc;
|
|
35
|
+
/**
|
|
36
|
+
* @type String
|
|
37
|
+
* @responsive
|
|
38
|
+
*/
|
|
39
|
+
alt;
|
|
40
|
+
/**
|
|
41
|
+
* @type Number
|
|
42
|
+
* @responsive
|
|
43
|
+
*/
|
|
44
|
+
width = '16';
|
|
45
|
+
/**
|
|
46
|
+
* @type Number
|
|
47
|
+
* @responsive
|
|
48
|
+
*/
|
|
49
|
+
height = '9';
|
|
50
|
+
/**
|
|
51
|
+
* @type String
|
|
52
|
+
* @responsive
|
|
53
|
+
*/
|
|
54
|
+
aspectRatio;
|
|
55
|
+
/**
|
|
56
|
+
* @type Select
|
|
57
|
+
* @options image
|
|
58
|
+
* @options video
|
|
59
|
+
*/
|
|
60
|
+
type = 'image';
|
|
61
|
+
/**
|
|
62
|
+
* @type Select
|
|
63
|
+
* @options video/mp4
|
|
64
|
+
*/
|
|
65
|
+
videoType = 'video/mp4';
|
|
66
|
+
/**
|
|
67
|
+
* If true, the content in the mediaContent slot will be visible.
|
|
68
|
+
* @type Boolean
|
|
69
|
+
* @responsive
|
|
70
|
+
*/
|
|
71
|
+
showContent = 'false|true';
|
|
72
|
+
lazyLoadIsComplete = false;
|
|
73
|
+
showVideoAsGif = false;
|
|
74
|
+
activeLazyLoadClass = '';
|
|
75
|
+
inlineStyle = {};
|
|
76
|
+
hasMediaContent = false;
|
|
77
|
+
pictureImageSrc;
|
|
36
78
|
componentWillLoad() {
|
|
79
|
+
// Images render straight away and leave lazy loading to the browser (loading="lazy"), so the
|
|
80
|
+
// download starts as soon as the component renders. Videos have no native lazy loading, so they
|
|
81
|
+
// still wait until they are near the screen.
|
|
37
82
|
this.hasMediaContent = !!this.hostElement.querySelector('[slot="mediaContent"]');
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
83
|
+
this.responsive({
|
|
84
|
+
// The source can differ per breakpoint, and is worked out again whenever the page crosses one.
|
|
85
|
+
src: value => {
|
|
86
|
+
this.pictureImageSrc = value;
|
|
87
|
+
this.showVideoAsGif = !!value && (value.indexOf('.mp4') >= 0 || getCurrentValue(this.type) === 'video');
|
|
88
|
+
if (!this.showVideoAsGif) {
|
|
89
|
+
this.lazyLoadIsComplete = true;
|
|
90
|
+
this.activeLazyLoadClass = 'content-image-loaded';
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
alt: true,
|
|
94
|
+
// Resolve width per breakpoint like height. A raw "4|16" on the <img> reads as width 0, so the
|
|
95
|
+
// browser reserved no space for the image and the page jumped when it loaded.
|
|
96
|
+
width: true,
|
|
97
|
+
height: true,
|
|
98
|
+
showContent: true,
|
|
99
|
+
aspectRatio: value => (this.inlineStyle = { ...this.inlineStyle, '--aspect-ratio': `${value}` }),
|
|
52
100
|
});
|
|
53
101
|
}
|
|
54
102
|
componentDidLoad() {
|
|
55
|
-
|
|
103
|
+
if (!this.showVideoAsGif)
|
|
104
|
+
return;
|
|
105
|
+
const observer = new IntersectionObserver(entries => {
|
|
56
106
|
entries.forEach(async (entry) => {
|
|
57
107
|
if (entry.isIntersecting) {
|
|
58
108
|
this.lazyLoadIsComplete = true;
|
|
59
|
-
|
|
60
|
-
this.showVideoAsGif = this.pictureImageSrc.indexOf('.mp4') >= 0 || getCurrentValue(this.type) === 'video';
|
|
109
|
+
observer.disconnect();
|
|
61
110
|
}
|
|
62
111
|
});
|
|
63
112
|
}, {
|
|
@@ -82,7 +131,15 @@ export class ContentImage {
|
|
|
82
131
|
}
|
|
83
132
|
}
|
|
84
133
|
render() {
|
|
85
|
-
return (h(Host, { key: '
|
|
134
|
+
return (h(Host, { key: 'b74c68d0503f4190448bf4281470980ef9bf0f5c', class: `${this.activeLazyLoadClass} ${this.classes ?? ''}`, style: this.inlineStyle, content: this.showContent }, this.hasMediaContent && (h("div", { key: '694c0caf757d6eeaabbb616f83d51229e0ca6754', class: "content-image__media-content" }, h("slot", { key: '8c199b6d1c30ea53160c8b833e6eadb23fe48328', name: "mediaContent" }))), this.showVideoAsGif && (
|
|
135
|
+
// A looping video stands in for an image, so it takes the image's alt text, or is hidden when the
|
|
136
|
+
// alt is empty. It does not play for visitors who ask for reduced motion (WCAG 2.2.2), and shows its
|
|
137
|
+
// first frame instead.
|
|
138
|
+
// The video renders straight away, so it holds its space (its aspect ratio, or width and height)
|
|
139
|
+
// before it loads: the page does not jump, and the lazy load observer has a box to see. Its source
|
|
140
|
+
// is added once it is near the screen, and adding a <source> starts the download.
|
|
141
|
+
// Keyed by source: a video does not load a new <source> on its own, so a new source gets a new video.
|
|
142
|
+
h("video", { key: this.pictureImageSrc, autoplay: !prefersReducedMotion(), muted: true, loop: true, preload: prefersReducedMotion() ? 'metadata' : 'none', playsinline: true, width: this.width, height: this.height, "aria-label": this.alt ? this.alt : null, "aria-hidden": this.alt ? null : 'true' }, this.lazyLoadIsComplete && h("source", { key: 'ad14aa4fad048a5cb2ea9d777154edafa145ff87', src: this.pictureImageSrc, type: this.videoType }))), this.pictureImageSrc && !this.showVideoAsGif && (h("img", { key: '633173dcdc62a71bd4782164f8d3d2d2904d5912', width: this.width, height: this.height, src: this.pictureImageSrc, alt: this.alt, loading: this.lazyLoad ? 'lazy' : 'eager', fetchpriority: this.fetchPriority, decoding: this.lazyLoad ? 'async' : 'auto' }))));
|
|
86
143
|
}
|
|
87
144
|
static get is() { return "content-image"; }
|
|
88
145
|
static get originalStyleUrls() {
|
|
@@ -97,55 +154,59 @@ export class ContentImage {
|
|
|
97
154
|
}
|
|
98
155
|
static get properties() {
|
|
99
156
|
return {
|
|
100
|
-
"
|
|
101
|
-
"type": "
|
|
102
|
-
"mutable":
|
|
157
|
+
"lazyLoad": {
|
|
158
|
+
"type": "boolean",
|
|
159
|
+
"mutable": false,
|
|
103
160
|
"complexType": {
|
|
104
|
-
"original": "
|
|
105
|
-
"resolved": "
|
|
106
|
-
"references": {
|
|
107
|
-
"ResponsiveString": {
|
|
108
|
-
"location": "import",
|
|
109
|
-
"path": "../../typings",
|
|
110
|
-
"id": "src/typings.d.ts::ResponsiveString"
|
|
111
|
-
}
|
|
112
|
-
}
|
|
161
|
+
"original": "boolean",
|
|
162
|
+
"resolved": "boolean",
|
|
163
|
+
"references": {}
|
|
113
164
|
},
|
|
114
165
|
"required": false,
|
|
115
166
|
"optional": false,
|
|
116
167
|
"docs": {
|
|
117
168
|
"tags": [{
|
|
118
169
|
"name": "type",
|
|
119
|
-
"text": "
|
|
120
|
-
}, {
|
|
121
|
-
"name": "responsive",
|
|
122
|
-
"text": undefined
|
|
170
|
+
"text": "Boolean"
|
|
123
171
|
}],
|
|
124
|
-
"text": ""
|
|
172
|
+
"text": "Images use the browser's native lazy loading. Set to false for images that are visible when the\npage opens, such as a hero, so they download straight away."
|
|
125
173
|
},
|
|
126
|
-
"
|
|
127
|
-
"
|
|
174
|
+
"getter": false,
|
|
175
|
+
"setter": false,
|
|
176
|
+
"reflect": true,
|
|
177
|
+
"attribute": "lazy-load",
|
|
178
|
+
"defaultValue": "true"
|
|
128
179
|
},
|
|
129
|
-
"
|
|
130
|
-
"type": "
|
|
180
|
+
"fetchPriority": {
|
|
181
|
+
"type": "string",
|
|
131
182
|
"mutable": false,
|
|
132
183
|
"complexType": {
|
|
133
|
-
"original": "
|
|
134
|
-
"resolved": "
|
|
184
|
+
"original": "'high' | 'low' | 'auto'",
|
|
185
|
+
"resolved": "\"auto\" | \"high\" | \"low\"",
|
|
135
186
|
"references": {}
|
|
136
187
|
},
|
|
137
188
|
"required": false,
|
|
138
|
-
"optional":
|
|
189
|
+
"optional": true,
|
|
139
190
|
"docs": {
|
|
140
191
|
"tags": [{
|
|
141
192
|
"name": "type",
|
|
142
|
-
"text": "
|
|
193
|
+
"text": "Select"
|
|
194
|
+
}, {
|
|
195
|
+
"name": "options",
|
|
196
|
+
"text": "auto"
|
|
197
|
+
}, {
|
|
198
|
+
"name": "options",
|
|
199
|
+
"text": "high"
|
|
200
|
+
}, {
|
|
201
|
+
"name": "options",
|
|
202
|
+
"text": "low"
|
|
143
203
|
}],
|
|
144
|
-
"text": ""
|
|
204
|
+
"text": "How soon the browser should download the image compared with other files. Use \"high\" for the\nmain image of the page."
|
|
145
205
|
},
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
"
|
|
206
|
+
"getter": false,
|
|
207
|
+
"setter": false,
|
|
208
|
+
"reflect": true,
|
|
209
|
+
"attribute": "fetch-priority"
|
|
149
210
|
},
|
|
150
211
|
"src": {
|
|
151
212
|
"type": "string",
|
|
@@ -157,7 +218,8 @@ export class ContentImage {
|
|
|
157
218
|
"ResponsiveString": {
|
|
158
219
|
"location": "import",
|
|
159
220
|
"path": "../../typings",
|
|
160
|
-
"id": "src/typings.d.ts::ResponsiveString"
|
|
221
|
+
"id": "src/typings.d.ts::ResponsiveString",
|
|
222
|
+
"referenceLocation": "ResponsiveString"
|
|
161
223
|
}
|
|
162
224
|
}
|
|
163
225
|
},
|
|
@@ -173,8 +235,10 @@ export class ContentImage {
|
|
|
173
235
|
}],
|
|
174
236
|
"text": ""
|
|
175
237
|
},
|
|
176
|
-
"
|
|
177
|
-
"
|
|
238
|
+
"getter": false,
|
|
239
|
+
"setter": false,
|
|
240
|
+
"reflect": true,
|
|
241
|
+
"attribute": "src"
|
|
178
242
|
},
|
|
179
243
|
"alt": {
|
|
180
244
|
"type": "string",
|
|
@@ -186,7 +250,8 @@ export class ContentImage {
|
|
|
186
250
|
"ResponsiveString": {
|
|
187
251
|
"location": "import",
|
|
188
252
|
"path": "../../typings",
|
|
189
|
-
"id": "src/typings.d.ts::ResponsiveString"
|
|
253
|
+
"id": "src/typings.d.ts::ResponsiveString",
|
|
254
|
+
"referenceLocation": "ResponsiveString"
|
|
190
255
|
}
|
|
191
256
|
}
|
|
192
257
|
},
|
|
@@ -202,8 +267,10 @@ export class ContentImage {
|
|
|
202
267
|
}],
|
|
203
268
|
"text": ""
|
|
204
269
|
},
|
|
205
|
-
"
|
|
206
|
-
"
|
|
270
|
+
"getter": false,
|
|
271
|
+
"setter": false,
|
|
272
|
+
"reflect": true,
|
|
273
|
+
"attribute": "alt"
|
|
207
274
|
},
|
|
208
275
|
"width": {
|
|
209
276
|
"type": "string",
|
|
@@ -215,7 +282,8 @@ export class ContentImage {
|
|
|
215
282
|
"ResponsiveNumber": {
|
|
216
283
|
"location": "import",
|
|
217
284
|
"path": "../../typings",
|
|
218
|
-
"id": "src/typings.d.ts::ResponsiveNumber"
|
|
285
|
+
"id": "src/typings.d.ts::ResponsiveNumber",
|
|
286
|
+
"referenceLocation": "ResponsiveNumber"
|
|
219
287
|
}
|
|
220
288
|
}
|
|
221
289
|
},
|
|
@@ -231,8 +299,10 @@ export class ContentImage {
|
|
|
231
299
|
}],
|
|
232
300
|
"text": ""
|
|
233
301
|
},
|
|
302
|
+
"getter": false,
|
|
303
|
+
"setter": false,
|
|
304
|
+
"reflect": true,
|
|
234
305
|
"attribute": "width",
|
|
235
|
-
"reflect": false,
|
|
236
306
|
"defaultValue": "'16'"
|
|
237
307
|
},
|
|
238
308
|
"height": {
|
|
@@ -245,7 +315,8 @@ export class ContentImage {
|
|
|
245
315
|
"ResponsiveNumber": {
|
|
246
316
|
"location": "import",
|
|
247
317
|
"path": "../../typings",
|
|
248
|
-
"id": "src/typings.d.ts::ResponsiveNumber"
|
|
318
|
+
"id": "src/typings.d.ts::ResponsiveNumber",
|
|
319
|
+
"referenceLocation": "ResponsiveNumber"
|
|
249
320
|
}
|
|
250
321
|
}
|
|
251
322
|
},
|
|
@@ -261,8 +332,10 @@ export class ContentImage {
|
|
|
261
332
|
}],
|
|
262
333
|
"text": ""
|
|
263
334
|
},
|
|
335
|
+
"getter": false,
|
|
336
|
+
"setter": false,
|
|
337
|
+
"reflect": true,
|
|
264
338
|
"attribute": "height",
|
|
265
|
-
"reflect": false,
|
|
266
339
|
"defaultValue": "'9'"
|
|
267
340
|
},
|
|
268
341
|
"aspectRatio": {
|
|
@@ -275,7 +348,8 @@ export class ContentImage {
|
|
|
275
348
|
"ResponsiveString": {
|
|
276
349
|
"location": "import",
|
|
277
350
|
"path": "../../typings",
|
|
278
|
-
"id": "src/typings.d.ts::ResponsiveString"
|
|
351
|
+
"id": "src/typings.d.ts::ResponsiveString",
|
|
352
|
+
"referenceLocation": "ResponsiveString"
|
|
279
353
|
}
|
|
280
354
|
}
|
|
281
355
|
},
|
|
@@ -291,8 +365,10 @@ export class ContentImage {
|
|
|
291
365
|
}],
|
|
292
366
|
"text": ""
|
|
293
367
|
},
|
|
294
|
-
"
|
|
295
|
-
"
|
|
368
|
+
"getter": false,
|
|
369
|
+
"setter": false,
|
|
370
|
+
"reflect": true,
|
|
371
|
+
"attribute": "aspect-ratio"
|
|
296
372
|
},
|
|
297
373
|
"type": {
|
|
298
374
|
"type": "string",
|
|
@@ -317,8 +393,10 @@ export class ContentImage {
|
|
|
317
393
|
}],
|
|
318
394
|
"text": ""
|
|
319
395
|
},
|
|
396
|
+
"getter": false,
|
|
397
|
+
"setter": false,
|
|
398
|
+
"reflect": true,
|
|
320
399
|
"attribute": "type",
|
|
321
|
-
"reflect": false,
|
|
322
400
|
"defaultValue": "'image'"
|
|
323
401
|
},
|
|
324
402
|
"videoType": {
|
|
@@ -341,8 +419,10 @@ export class ContentImage {
|
|
|
341
419
|
}],
|
|
342
420
|
"text": ""
|
|
343
421
|
},
|
|
422
|
+
"getter": false,
|
|
423
|
+
"setter": false,
|
|
424
|
+
"reflect": true,
|
|
344
425
|
"attribute": "video-type",
|
|
345
|
-
"reflect": false,
|
|
346
426
|
"defaultValue": "'video/mp4'"
|
|
347
427
|
},
|
|
348
428
|
"showContent": {
|
|
@@ -355,7 +435,8 @@ export class ContentImage {
|
|
|
355
435
|
"ResponsiveBoolean": {
|
|
356
436
|
"location": "import",
|
|
357
437
|
"path": "../../typings",
|
|
358
|
-
"id": "src/typings.d.ts::ResponsiveBoolean"
|
|
438
|
+
"id": "src/typings.d.ts::ResponsiveBoolean",
|
|
439
|
+
"referenceLocation": "ResponsiveBoolean"
|
|
359
440
|
}
|
|
360
441
|
}
|
|
361
442
|
},
|
|
@@ -371,8 +452,10 @@ export class ContentImage {
|
|
|
371
452
|
}],
|
|
372
453
|
"text": "If true, the content in the mediaContent slot will be visible."
|
|
373
454
|
},
|
|
374
|
-
"
|
|
455
|
+
"getter": false,
|
|
456
|
+
"setter": false,
|
|
375
457
|
"reflect": true,
|
|
458
|
+
"attribute": "show-content",
|
|
376
459
|
"defaultValue": "'false|true'"
|
|
377
460
|
}
|
|
378
461
|
};
|
|
@@ -383,7 +466,6 @@ export class ContentImage {
|
|
|
383
466
|
"lazyLoadIsComplete": {},
|
|
384
467
|
"showVideoAsGif": {},
|
|
385
468
|
"activeLazyLoadClass": {},
|
|
386
|
-
"classString": {},
|
|
387
469
|
"inlineStyle": {},
|
|
388
470
|
"hasMediaContent": {},
|
|
389
471
|
"pictureImageSrc": {}
|
|
@@ -397,4 +479,3 @@ export class ContentImage {
|
|
|
397
479
|
}];
|
|
398
480
|
}
|
|
399
481
|
}
|
|
400
|
-
//# sourceMappingURL=content-image.js.map
|
|
@@ -1,33 +1,58 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
-
import {
|
|
2
|
+
import { ResponsiveComponent } from "../../utils/responsive-component";
|
|
3
3
|
/**
|
|
4
|
+
* One line of text, such as a heading or a paragraph, with its tag, alignment and maximum width set per breakpoint.
|
|
5
|
+
*
|
|
4
6
|
* @slot content - Inner contents of the line, usually plaintext.
|
|
5
7
|
* @slot - Default slot, same as content slot.
|
|
6
8
|
*/
|
|
7
|
-
export class ContentLine {
|
|
9
|
+
export class ContentLine extends ResponsiveComponent {
|
|
8
10
|
constructor() {
|
|
9
|
-
|
|
10
|
-
this.textAlign = 'default';
|
|
11
|
-
this.classes = undefined;
|
|
12
|
-
this.classString = undefined;
|
|
13
|
-
this.maxWidth = '100%';
|
|
14
|
-
this.inlineStyle = {};
|
|
11
|
+
super();
|
|
15
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* The element tag to use.
|
|
15
|
+
* @type Select
|
|
16
|
+
* @options div
|
|
17
|
+
* @options p
|
|
18
|
+
* @options h1
|
|
19
|
+
* @options h2
|
|
20
|
+
* @options h3
|
|
21
|
+
* @options h4
|
|
22
|
+
* @options h5
|
|
23
|
+
* @options h6
|
|
24
|
+
* @options span
|
|
25
|
+
* @options section
|
|
26
|
+
* @options article
|
|
27
|
+
*/
|
|
28
|
+
tag = 'div';
|
|
29
|
+
/**
|
|
30
|
+
* Pipe separated list of ContentLineTextAlignOptions for text alignment.
|
|
31
|
+
* @type Select
|
|
32
|
+
* @options default
|
|
33
|
+
* @options left
|
|
34
|
+
* @options center
|
|
35
|
+
* @options right
|
|
36
|
+
* @responsive
|
|
37
|
+
*/
|
|
38
|
+
textAlign = 'default';
|
|
39
|
+
/**
|
|
40
|
+
* 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.
|
|
41
|
+
* @type String
|
|
42
|
+
* @responsive
|
|
43
|
+
*/
|
|
44
|
+
maxWidth = '100%';
|
|
45
|
+
inlineStyle = {};
|
|
16
46
|
componentWillLoad() {
|
|
17
|
-
|
|
18
|
-
this.inlineStyle =
|
|
19
|
-
|
|
20
|
-
WindowResizeService.registerProp(this.maxWidth).subscribe((newValue) => {
|
|
21
|
-
this.inlineStyle = Object.assign(Object.assign({}, this.inlineStyle), { '--max-width': isNaN(newValue) ? newValue : newValue + '%' });
|
|
22
|
-
});
|
|
23
|
-
WindowResizeService.registerProp(this.classes).subscribe(newValue => {
|
|
24
|
-
this.classString = newValue;
|
|
47
|
+
this.responsive({
|
|
48
|
+
textAlign: value => (this.inlineStyle = { ...this.inlineStyle, '--text-align': value }),
|
|
49
|
+
maxWidth: value => (this.inlineStyle = { ...this.inlineStyle, '--max-width': isNaN(Number(value)) ? value : value + '%' }),
|
|
25
50
|
});
|
|
26
51
|
}
|
|
27
52
|
render() {
|
|
28
53
|
// The capital case in this JSX variable is important
|
|
29
54
|
const ElementTagParsed = `${this.tag}`;
|
|
30
|
-
return (h(Host, { key: '
|
|
55
|
+
return (h(Host, { key: '38f6effa299b99a336aa9a66f02fc3c36ba5062a', class: this.classes, style: this.inlineStyle }, h(ElementTagParsed, { key: '4d7120387974c774b07980276365e3449e958f38', class: "content-line__inner" }, h("slot", { key: '6354ce656a90f1044172c40d48d3f735db93d7af', name: "content" }), h("slot", { key: '1d1503ce61cdda503caecec3ad7e97b34ae27b72' }))));
|
|
31
56
|
}
|
|
32
57
|
static get is() { return "content-line"; }
|
|
33
58
|
static get originalStyleUrls() {
|
|
@@ -50,9 +75,10 @@ export class ContentLine {
|
|
|
50
75
|
"resolved": "\"article\" | \"div\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"p\" | \"section\" | \"span\"",
|
|
51
76
|
"references": {
|
|
52
77
|
"ContentLineTagOptions": {
|
|
53
|
-
"location": "
|
|
54
|
-
"path": "
|
|
55
|
-
"id": "src/
|
|
78
|
+
"location": "import",
|
|
79
|
+
"path": "../../typings",
|
|
80
|
+
"id": "src/typings.d.ts::ContentLineTagOptions",
|
|
81
|
+
"referenceLocation": "ContentLineTagOptions"
|
|
56
82
|
}
|
|
57
83
|
}
|
|
58
84
|
},
|
|
@@ -98,21 +124,24 @@ export class ContentLine {
|
|
|
98
124
|
}],
|
|
99
125
|
"text": "The element tag to use."
|
|
100
126
|
},
|
|
127
|
+
"getter": false,
|
|
128
|
+
"setter": false,
|
|
129
|
+
"reflect": true,
|
|
101
130
|
"attribute": "tag",
|
|
102
|
-
"reflect": false,
|
|
103
131
|
"defaultValue": "'div'"
|
|
104
132
|
},
|
|
105
133
|
"textAlign": {
|
|
106
134
|
"type": "string",
|
|
107
|
-
"mutable":
|
|
135
|
+
"mutable": true,
|
|
108
136
|
"complexType": {
|
|
109
137
|
"original": "ContentLineTextAlignOptions",
|
|
110
138
|
"resolved": "\"center\" | \"default\" | \"left\" | \"right\"",
|
|
111
139
|
"references": {
|
|
112
140
|
"ContentLineTextAlignOptions": {
|
|
113
|
-
"location": "
|
|
114
|
-
"path": "
|
|
115
|
-
"id": "src/
|
|
141
|
+
"location": "import",
|
|
142
|
+
"path": "../../typings",
|
|
143
|
+
"id": "src/typings.d.ts::ContentLineTextAlignOptions",
|
|
144
|
+
"referenceLocation": "ContentLineTextAlignOptions"
|
|
116
145
|
}
|
|
117
146
|
}
|
|
118
147
|
},
|
|
@@ -140,36 +169,15 @@ export class ContentLine {
|
|
|
140
169
|
}],
|
|
141
170
|
"text": "Pipe separated list of ContentLineTextAlignOptions for text alignment."
|
|
142
171
|
},
|
|
172
|
+
"getter": false,
|
|
173
|
+
"setter": false,
|
|
174
|
+
"reflect": true,
|
|
143
175
|
"attribute": "text-align",
|
|
144
|
-
"reflect": false,
|
|
145
176
|
"defaultValue": "'default'"
|
|
146
177
|
},
|
|
147
|
-
"classes": {
|
|
148
|
-
"type": "any",
|
|
149
|
-
"mutable": false,
|
|
150
|
-
"complexType": {
|
|
151
|
-
"original": "any",
|
|
152
|
-
"resolved": "any",
|
|
153
|
-
"references": {}
|
|
154
|
-
},
|
|
155
|
-
"required": false,
|
|
156
|
-
"optional": false,
|
|
157
|
-
"docs": {
|
|
158
|
-
"tags": [{
|
|
159
|
-
"name": "type",
|
|
160
|
-
"text": "String"
|
|
161
|
-
}, {
|
|
162
|
-
"name": "responsive",
|
|
163
|
-
"text": undefined
|
|
164
|
-
}],
|
|
165
|
-
"text": "The font class for the line."
|
|
166
|
-
},
|
|
167
|
-
"attribute": "classes",
|
|
168
|
-
"reflect": false
|
|
169
|
-
},
|
|
170
178
|
"maxWidth": {
|
|
171
179
|
"type": "string",
|
|
172
|
-
"mutable":
|
|
180
|
+
"mutable": true,
|
|
173
181
|
"complexType": {
|
|
174
182
|
"original": "ResponsiveNumber",
|
|
175
183
|
"resolved": "string",
|
|
@@ -177,7 +185,8 @@ export class ContentLine {
|
|
|
177
185
|
"ResponsiveNumber": {
|
|
178
186
|
"location": "import",
|
|
179
187
|
"path": "../../typings",
|
|
180
|
-
"id": "src/typings.d.ts::ResponsiveNumber"
|
|
188
|
+
"id": "src/typings.d.ts::ResponsiveNumber",
|
|
189
|
+
"referenceLocation": "ResponsiveNumber"
|
|
181
190
|
}
|
|
182
191
|
}
|
|
183
192
|
},
|
|
@@ -193,17 +202,17 @@ export class ContentLine {
|
|
|
193
202
|
}],
|
|
194
203
|
"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."
|
|
195
204
|
},
|
|
205
|
+
"getter": false,
|
|
206
|
+
"setter": false,
|
|
207
|
+
"reflect": true,
|
|
196
208
|
"attribute": "max-width",
|
|
197
|
-
"reflect": false,
|
|
198
209
|
"defaultValue": "'100%'"
|
|
199
210
|
}
|
|
200
211
|
};
|
|
201
212
|
}
|
|
202
213
|
static get states() {
|
|
203
214
|
return {
|
|
204
|
-
"classString": {},
|
|
205
215
|
"inlineStyle": {}
|
|
206
216
|
};
|
|
207
217
|
}
|
|
208
218
|
}
|
|
209
|
-
//# sourceMappingURL=content-line.js.map
|