@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
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { r as registerInstance, a as getElement, h, d as Host } from './index-BFDJMblF.js';
|
|
2
|
+
import { R as ResponsiveComponent } from './responsive-component-BsLrcKbS.js';
|
|
3
|
+
import './utils-Bak__24s.js';
|
|
4
|
+
|
|
5
|
+
const contentGridFormatterCss = () => `*{box-sizing:border-box}content-grid-formatter{width:100%;align-items:var(--align-items, flex-start);justify-content:var(--justify-content);grid-template-columns:repeat(var(--columns), minmax(0, 1fr));column-gap:var(--column-gap, 0);row-gap:var(--row-gap, 0)}content-grid-formatter *{box-sizing:border-box}content-grid-formatter[type=grid]{display:grid}content-grid-formatter[type=flex]{display:flex;flex-wrap:wrap}content-grid-formatter[type=flex]>*{min-width:0;flex:0 0 auto;width:calc(100% / var(--columns))}content-grid-formatter[type=flex]{flex-direction:var(--flex-direction, row)}content-grid-formatter[columns=auto]>*{width:auto}content-grid-formatter>[flex-shrink=true]{width:auto;flex-shrink:1}content-grid-formatter[flex-shrink=true]>*{flex-shrink:1}content-grid-formatter[flex-grow=true]>*{flex-grow:1}content-grid-formatter>[flex-grow=true]{width:auto;flex-grow:1}`;
|
|
6
|
+
|
|
7
|
+
const ContentGridFormatter = class extends ResponsiveComponent {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
super();
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Flex or grid
|
|
14
|
+
* @type Select
|
|
15
|
+
* @options none
|
|
16
|
+
* @options flex
|
|
17
|
+
* @options grid
|
|
18
|
+
* @responsive
|
|
19
|
+
*/
|
|
20
|
+
type = 'flex';
|
|
21
|
+
/**
|
|
22
|
+
* Setting this true to will grow all children. Alternatively, add the attribute [flex-grow="true"] to a specific grid child and that child will grow.
|
|
23
|
+
* @type Boolean
|
|
24
|
+
* @responsive
|
|
25
|
+
*/
|
|
26
|
+
flexGrow = 'false';
|
|
27
|
+
/**
|
|
28
|
+
* Setting this true to will shrink all children. Alternatively, add the attribute [flex-shrink="true"] to a specific grid child and that child will shrink.
|
|
29
|
+
* @type Boolean
|
|
30
|
+
* @responsive
|
|
31
|
+
*/
|
|
32
|
+
flexShrink = 'false';
|
|
33
|
+
/**
|
|
34
|
+
* Vertical axis alignment
|
|
35
|
+
* @type Select
|
|
36
|
+
* @options flex-start
|
|
37
|
+
* @options space-between
|
|
38
|
+
* @options center
|
|
39
|
+
* @options space-evenly
|
|
40
|
+
* @responsive
|
|
41
|
+
*/
|
|
42
|
+
vertical = 'space-between';
|
|
43
|
+
/**
|
|
44
|
+
* Horizontal axis alignment
|
|
45
|
+
* @type Select
|
|
46
|
+
* @options flex-start
|
|
47
|
+
* @options space-between
|
|
48
|
+
* @options center
|
|
49
|
+
* @options space-evenly
|
|
50
|
+
* @responsive
|
|
51
|
+
*/
|
|
52
|
+
horizontal = 'space-between';
|
|
53
|
+
/**
|
|
54
|
+
* @type Number
|
|
55
|
+
* @responsive
|
|
56
|
+
*/
|
|
57
|
+
columns = '1';
|
|
58
|
+
/**
|
|
59
|
+
* For type flex: lay the children out in a row or a column. With columns="auto", children in a column
|
|
60
|
+
* keep their own width, so a list of links stacks on phones and sits in a row on larger screens.
|
|
61
|
+
* @type Select
|
|
62
|
+
* @options row
|
|
63
|
+
* @options column
|
|
64
|
+
* @responsive
|
|
65
|
+
*/
|
|
66
|
+
direction = 'row';
|
|
67
|
+
/**
|
|
68
|
+
* @type Number
|
|
69
|
+
* @responsive
|
|
70
|
+
*/
|
|
71
|
+
columnGap = '0';
|
|
72
|
+
/**
|
|
73
|
+
* @type Number
|
|
74
|
+
* @responsive
|
|
75
|
+
*/
|
|
76
|
+
rowGap = '0';
|
|
77
|
+
get hostElement() { return getElement(this); }
|
|
78
|
+
activeClassString;
|
|
79
|
+
inlineStyle = {};
|
|
80
|
+
componentWillLoad() {
|
|
81
|
+
const style = (property) => (value) => (this.inlineStyle = { ...this.inlineStyle, [property]: value });
|
|
82
|
+
this.responsive({
|
|
83
|
+
type: true,
|
|
84
|
+
flexGrow: true,
|
|
85
|
+
flexShrink: true,
|
|
86
|
+
vertical: style('--align-items'),
|
|
87
|
+
horizontal: style('--justify-content'),
|
|
88
|
+
columns: style('--columns'),
|
|
89
|
+
direction: style('--flex-direction'),
|
|
90
|
+
columnGap: style('--column-gap'),
|
|
91
|
+
rowGap: style('--row-gap'),
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
render() {
|
|
95
|
+
return (h(Host, { key: '119fb2e499c3b512e4fa8fa65fa5a6b090a799ab', class: this.classes, style: this.inlineStyle }, h("slot", { key: '9a70373969a35fc20ce24b2e812f93118f895c78' })));
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
ContentGridFormatter.style = contentGridFormatterCss();
|
|
99
|
+
|
|
100
|
+
export { ContentGridFormatter as content_grid_formatter };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { r as registerInstance, a as getElement, h, d as Host } from './index-BFDJMblF.js';
|
|
2
|
+
import { R as ResponsiveComponent } from './responsive-component-BsLrcKbS.js';
|
|
3
|
+
import './utils-Bak__24s.js';
|
|
4
|
+
|
|
5
|
+
const contentHeroBlockCss = () => `*{box-sizing:border-box}content-hero-block{position:relative}content-hero-block[content-position=above]{display:grid;grid-template-columns:minmax(0, 1fr)}content-hero-block[content-position=above] .content-hero-block__background,content-hero-block[content-position=above] .content-hero-block__content{grid-row-start:1;grid-column-start:1}content-hero-block[content-position=above] .content-hero-block__background{height:100%;overflow:hidden}content-hero-block[content-position=above] .content-hero-block__background content-image,content-hero-block[content-position=above] .content-hero-block__background content-image picture,content-hero-block[content-position=above] .content-hero-block__background content-image img,content-hero-block[content-position=above] .content-hero-block__background content-image video{height:100%}content-hero-block[content-position=above] .content-hero-block__content{display:flex;top:0;left:0;width:100%;height:100%;grid-row-start:1;grid-column-start:1}content-hero-block[content-position=above] .content-hero-block__content>*{width:100%}content-hero-block[content-position=above] .content-hero-block__content{position:relative;z-index:1}content-hero-block[content-position=below]{display:block}`;
|
|
6
|
+
|
|
7
|
+
const ContentHeroBlock = class extends ResponsiveComponent {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
super();
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
}
|
|
12
|
+
get hostElement() { return getElement(this); }
|
|
13
|
+
hasBackground = false;
|
|
14
|
+
/**
|
|
15
|
+
* Where the content sits: above, over the media, or below it. Over the media by default. Use pipes to change
|
|
16
|
+
* it per breakpoint, such as below|above for the text below the media on phones and over it from tablets.
|
|
17
|
+
* @type Select
|
|
18
|
+
* @options below
|
|
19
|
+
* @options above
|
|
20
|
+
* @responsive
|
|
21
|
+
*/
|
|
22
|
+
contentPosition = 'above';
|
|
23
|
+
revealHiddenContent = false;
|
|
24
|
+
hasHiddenContent;
|
|
25
|
+
componentWillLoad() {
|
|
26
|
+
this.hasBackground = !!this.hostElement.querySelector('[slot="background"]');
|
|
27
|
+
this.hasHiddenContent = !!this.hostElement.querySelector('[slot="activatedContent"]');
|
|
28
|
+
this.responsive({
|
|
29
|
+
contentPosition: true,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
contentBlockActivationHandler(event) {
|
|
33
|
+
if (this.hostElement === event.detail) {
|
|
34
|
+
this.hostElement.setAttribute('activated', 'true');
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
render() {
|
|
38
|
+
return (h(Host, { key: '8c2b7d29aebcc9a14ad6473b30273271abd31025', class: this.classes }, this.hasBackground && (h("div", { key: 'c83a0e8382b2ea905020c13a3bb833700fae7d8e', class: "content-hero-block__background" }, h("slot", { key: '3f589683a2ecb97daf5e7ebc3837699c20e7a12f', name: "background" }))), h("div", { key: '68aa5b9f8b220d7e0ac6860796f8d0cc888e070a', class: "content-hero-block__content" }, h("slot", { key: 'aa2d963a7a6e593e4aa3d245a20716d7ce99eb8a', name: "content" }), h("slot", { key: 'a5d64639bcd98773f9eddda65e2d91405ffe8336' }))));
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
ContentHeroBlock.style = contentHeroBlockCss();
|
|
42
|
+
|
|
43
|
+
export { ContentHeroBlock as content_hero_block };
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { r as registerInstance, a as getElement, h, d as Host } from './index-BFDJMblF.js';
|
|
2
|
+
import { R as ResponsiveComponent } from './responsive-component-BsLrcKbS.js';
|
|
3
|
+
import { g as getCurrentValue, p as prefersReducedMotion } from './utils-Bak__24s.js';
|
|
4
|
+
|
|
5
|
+
const contentImageCss = () => `*{box-sizing:border-box}content-image{display:block;height:auto;transition:opacity 0.3s;position:relative}content-image.content-image-loading{opacity:0}content-image.content-image-loaded{opacity:1}content-image[aspect-ratio] img,content-image[aspect-ratio] picture,content-image[aspect-ratio] video{aspect-ratio:var(--aspect-ratio);object-fit:cover}content-image img,content-image picture,content-image video{display:block;width:100%;height:100%}content-image .content-image__media-content{display:none;position:absolute;width:100%;height:100%;top:0;left:0;align-items:center;justify-content:center;overflow:hidden}content-image .content-image__media-content [slot=mediaContent]{height:100%;width:100%}content-image[content=true] .content-image__media-content{display:flex}`;
|
|
6
|
+
|
|
7
|
+
const ContentImage = class extends ResponsiveComponent {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
super();
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
}
|
|
12
|
+
get hostElement() { return getElement(this); }
|
|
13
|
+
/**
|
|
14
|
+
* Images use the browser's native lazy loading. Set to false for images that are visible when the
|
|
15
|
+
* page opens, such as a hero, so they download straight away.
|
|
16
|
+
* @type Boolean
|
|
17
|
+
*/
|
|
18
|
+
lazyLoad = true;
|
|
19
|
+
/**
|
|
20
|
+
* How soon the browser should download the image compared with other files. Use "high" for the
|
|
21
|
+
* main image of the page.
|
|
22
|
+
* @type Select
|
|
23
|
+
* @options auto
|
|
24
|
+
* @options high
|
|
25
|
+
* @options low
|
|
26
|
+
*/
|
|
27
|
+
fetchPriority;
|
|
28
|
+
/**
|
|
29
|
+
* @type Media
|
|
30
|
+
* @responsive
|
|
31
|
+
*/
|
|
32
|
+
src;
|
|
33
|
+
activeSrc;
|
|
34
|
+
/**
|
|
35
|
+
* @type String
|
|
36
|
+
* @responsive
|
|
37
|
+
*/
|
|
38
|
+
alt;
|
|
39
|
+
/**
|
|
40
|
+
* @type Number
|
|
41
|
+
* @responsive
|
|
42
|
+
*/
|
|
43
|
+
width = '16';
|
|
44
|
+
/**
|
|
45
|
+
* @type Number
|
|
46
|
+
* @responsive
|
|
47
|
+
*/
|
|
48
|
+
height = '9';
|
|
49
|
+
/**
|
|
50
|
+
* @type String
|
|
51
|
+
* @responsive
|
|
52
|
+
*/
|
|
53
|
+
aspectRatio;
|
|
54
|
+
/**
|
|
55
|
+
* @type Select
|
|
56
|
+
* @options image
|
|
57
|
+
* @options video
|
|
58
|
+
*/
|
|
59
|
+
type = 'image';
|
|
60
|
+
/**
|
|
61
|
+
* @type Select
|
|
62
|
+
* @options video/mp4
|
|
63
|
+
*/
|
|
64
|
+
videoType = 'video/mp4';
|
|
65
|
+
/**
|
|
66
|
+
* If true, the content in the mediaContent slot will be visible.
|
|
67
|
+
* @type Boolean
|
|
68
|
+
* @responsive
|
|
69
|
+
*/
|
|
70
|
+
showContent = 'false|true';
|
|
71
|
+
lazyLoadIsComplete = false;
|
|
72
|
+
showVideoAsGif = false;
|
|
73
|
+
activeLazyLoadClass = '';
|
|
74
|
+
inlineStyle = {};
|
|
75
|
+
hasMediaContent = false;
|
|
76
|
+
pictureImageSrc;
|
|
77
|
+
componentWillLoad() {
|
|
78
|
+
// Images render straight away and leave lazy loading to the browser (loading="lazy"), so the
|
|
79
|
+
// download starts as soon as the component renders. Videos have no native lazy loading, so they
|
|
80
|
+
// still wait until they are near the screen.
|
|
81
|
+
this.hasMediaContent = !!this.hostElement.querySelector('[slot="mediaContent"]');
|
|
82
|
+
this.responsive({
|
|
83
|
+
// The source can differ per breakpoint, and is worked out again whenever the page crosses one.
|
|
84
|
+
src: value => {
|
|
85
|
+
this.pictureImageSrc = value;
|
|
86
|
+
this.showVideoAsGif = !!value && (value.indexOf('.mp4') >= 0 || getCurrentValue(this.type) === 'video');
|
|
87
|
+
if (!this.showVideoAsGif) {
|
|
88
|
+
this.lazyLoadIsComplete = true;
|
|
89
|
+
this.activeLazyLoadClass = 'content-image-loaded';
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
alt: true,
|
|
93
|
+
// Resolve width per breakpoint like height. A raw "4|16" on the <img> reads as width 0, so the
|
|
94
|
+
// browser reserved no space for the image and the page jumped when it loaded.
|
|
95
|
+
width: true,
|
|
96
|
+
height: true,
|
|
97
|
+
showContent: true,
|
|
98
|
+
aspectRatio: value => (this.inlineStyle = { ...this.inlineStyle, '--aspect-ratio': `${value}` }),
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
componentDidLoad() {
|
|
102
|
+
if (!this.showVideoAsGif)
|
|
103
|
+
return;
|
|
104
|
+
const observer = new IntersectionObserver(entries => {
|
|
105
|
+
entries.forEach(async (entry) => {
|
|
106
|
+
if (entry.isIntersecting) {
|
|
107
|
+
this.lazyLoadIsComplete = true;
|
|
108
|
+
observer.disconnect();
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
}, {
|
|
112
|
+
root: null,
|
|
113
|
+
rootMargin: `${Math.max(100, window.innerHeight * 1)}px`,
|
|
114
|
+
// rootMargin: `0px`,
|
|
115
|
+
threshold: 0,
|
|
116
|
+
});
|
|
117
|
+
observer.observe(this.hostElement);
|
|
118
|
+
}
|
|
119
|
+
watchLazyLoadIsComplete(newValue) {
|
|
120
|
+
if (newValue === true) {
|
|
121
|
+
this.activeLazyLoadClass = 'content-image-loaded';
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
if (!this.lazyLoad) {
|
|
125
|
+
this.activeLazyLoadClass = 'content-image-no-lazyload';
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
this.activeLazyLoadClass = 'content-image-loading';
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
render() {
|
|
133
|
+
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 && (
|
|
134
|
+
// A looping video stands in for an image, so it takes the image's alt text, or is hidden when the
|
|
135
|
+
// alt is empty. It does not play for visitors who ask for reduced motion (WCAG 2.2.2), and shows its
|
|
136
|
+
// first frame instead.
|
|
137
|
+
// The video renders straight away, so it holds its space (its aspect ratio, or width and height)
|
|
138
|
+
// before it loads: the page does not jump, and the lazy load observer has a box to see. Its source
|
|
139
|
+
// is added once it is near the screen, and adding a <source> starts the download.
|
|
140
|
+
// Keyed by source: a video does not load a new <source> on its own, so a new source gets a new video.
|
|
141
|
+
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' }))));
|
|
142
|
+
}
|
|
143
|
+
static get watchers() { return {
|
|
144
|
+
"lazyLoadIsComplete": [{
|
|
145
|
+
"watchLazyLoadIsComplete": 0
|
|
146
|
+
}]
|
|
147
|
+
}; }
|
|
148
|
+
};
|
|
149
|
+
ContentImage.style = contentImageCss();
|
|
150
|
+
|
|
151
|
+
export { ContentImage as content_image };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { r as registerInstance, h, d as Host } from './index-BFDJMblF.js';
|
|
2
|
+
import { R as ResponsiveComponent } from './responsive-component-BsLrcKbS.js';
|
|
3
|
+
import './utils-Bak__24s.js';
|
|
4
|
+
|
|
5
|
+
const contentLineCss = () => `*{box-sizing:border-box}content-line{--text-align:default;--inner-max-width:100%;display:block;text-align:var(--text-align);word-break:break-word;white-space:normal}content-line .content-line__inner{display:inline-block;width:auto;max-width:var(--max-width)}`;
|
|
6
|
+
|
|
7
|
+
const ContentLine = class extends ResponsiveComponent {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
super();
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The element tag to use.
|
|
14
|
+
* @type Select
|
|
15
|
+
* @options div
|
|
16
|
+
* @options p
|
|
17
|
+
* @options h1
|
|
18
|
+
* @options h2
|
|
19
|
+
* @options h3
|
|
20
|
+
* @options h4
|
|
21
|
+
* @options h5
|
|
22
|
+
* @options h6
|
|
23
|
+
* @options span
|
|
24
|
+
* @options section
|
|
25
|
+
* @options article
|
|
26
|
+
*/
|
|
27
|
+
tag = 'div';
|
|
28
|
+
/**
|
|
29
|
+
* Pipe separated list of ContentLineTextAlignOptions for text alignment.
|
|
30
|
+
* @type Select
|
|
31
|
+
* @options default
|
|
32
|
+
* @options left
|
|
33
|
+
* @options center
|
|
34
|
+
* @options right
|
|
35
|
+
* @responsive
|
|
36
|
+
*/
|
|
37
|
+
textAlign = 'default';
|
|
38
|
+
/**
|
|
39
|
+
* 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.
|
|
40
|
+
* @type String
|
|
41
|
+
* @responsive
|
|
42
|
+
*/
|
|
43
|
+
maxWidth = '100%';
|
|
44
|
+
inlineStyle = {};
|
|
45
|
+
componentWillLoad() {
|
|
46
|
+
this.responsive({
|
|
47
|
+
textAlign: value => (this.inlineStyle = { ...this.inlineStyle, '--text-align': value }),
|
|
48
|
+
maxWidth: value => (this.inlineStyle = { ...this.inlineStyle, '--max-width': isNaN(Number(value)) ? value : value + '%' }),
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
render() {
|
|
52
|
+
// The capital case in this JSX variable is important
|
|
53
|
+
const ElementTagParsed = `${this.tag}`;
|
|
54
|
+
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' }))));
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
ContentLine.style = contentLineCss();
|
|
58
|
+
|
|
59
|
+
export { ContentLine as content_line };
|
|
@@ -1,37 +1,53 @@
|
|
|
1
|
-
import { r as registerInstance,
|
|
2
|
-
import {
|
|
3
|
-
import { c as createFocusTrap } from './focus-trap.esm-
|
|
4
|
-
import './utils-
|
|
5
|
-
import './BehaviorSubject-f7a12fd8.js';
|
|
1
|
+
import { r as registerInstance, a as getElement, h, d as Host } from './index-BFDJMblF.js';
|
|
2
|
+
import { R as ResponsiveComponent } from './responsive-component-BsLrcKbS.js';
|
|
3
|
+
import { c as createFocusTrap } from './focus-trap.esm-DXUoPIwl.js';
|
|
4
|
+
import './utils-Bak__24s.js';
|
|
6
5
|
|
|
7
|
-
const contentNavigationBlockCss =
|
|
8
|
-
const ContentNavigationBlockStyle0 = contentNavigationBlockCss;
|
|
6
|
+
const contentNavigationBlockCss = () => `*{box-sizing:border-box}body.content-navigation-block-open{overflow:hidden}content-navigation-block button{appearance:none;border:none;background:transparent;color:inherit;cursor:pointer}content-navigation-block .content-navigation-block__skip-content a,content-navigation-block .content-navigation-block__skip-content button,content-navigation-block .content-navigation-block__skip-content a:visited,content-navigation-block .content-navigation-block__skip-content button:visited{border:2px solid rgb(0, 0, 0);border-radius:2px;color:purple;cursor:pointer;display:inline-block;font-size:14px;line-height:20px;margin:6px 11px;min-height:32px;text-decoration:underline;text-align:center;width:106px;z-index:1000}content-navigation-block .content-navigation-block__skip-content:not(:focus-within){position:absolute;width:1px;height:1px;clip:rect(1px, 1px, 1px, 1px);clip-path:inset(50%);overflow:hidden;white-space:nowrap;padding:0}content-navigation-block svg.default-icon{display:inline-block;width:32px}content-navigation-block[hamburger=fixed],content-navigation-block[hamburger=absolute],content-navigation-block[hamburger=static]{display:inline-block}content-navigation-block[hamburger=fixed][aria-expanded=false] .content-navigation__close,content-navigation-block[hamburger=absolute][aria-expanded=false] .content-navigation__close,content-navigation-block[hamburger=static][aria-expanded=false] .content-navigation__close{display:none}content-navigation-block[hamburger=fixed] .content-navigation__open,content-navigation-block[hamburger=fixed] .content-navigation__close,content-navigation-block[hamburger=absolute] .content-navigation__open,content-navigation-block[hamburger=absolute] .content-navigation__close,content-navigation-block[hamburger=static] .content-navigation__open,content-navigation-block[hamburger=static] .content-navigation__close{cursor:pointer}content-navigation-block[hamburger=fixed] .content-navigation__content-wrapper,content-navigation-block[hamburger=absolute] .content-navigation__content-wrapper,content-navigation-block[hamburger=static] .content-navigation__content-wrapper{display:none}content-navigation-block[hamburger=fixed] .content-navigation__content-wrapper[hidden=false],content-navigation-block[hamburger=absolute] .content-navigation__content-wrapper[hidden=false],content-navigation-block[hamburger=static] .content-navigation__content-wrapper[hidden=false]{display:block}content-navigation-block[hamburger=fixed] .content-navigation__content-wrapper{position:fixed;left:0;top:0;width:100vw;height:100vh;z-index:100}content-navigation-block[hamburger=sticky] .content-navigation__content-wrapper{position:sticky;left:0;top:0;width:100vw;height:100vh;z-index:100}content-navigation-block[hamburger=absolute] .content-navigation__content-wrapper{position:absolute;z-index:100}content-navigation-block[hamburger=static] .content-navigation__content-wrapper{position:static}content-navigation-block[hamburger=none]{display:block}content-navigation-block[hamburger=none] .content-navigation__open,content-navigation-block[hamburger=none] .content-navigation__close{display:none}content-navigation-block[aria-expanded=true] .content-navigation__content-wrapper{display:block}:where(content-navigation-block[hamburger=fixed],content-navigation-block[hamburger=sticky],content-navigation-block[hamburger=absolute]) .content-navigation__content-wrapper{padding:var(--content-navigation-padding, 1.25rem 6%);text-align:start;background:var(--content-navigation-background, #fff)}`;
|
|
9
7
|
|
|
10
|
-
const ContentNavigationBlock = class {
|
|
8
|
+
const ContentNavigationBlock = class extends ResponsiveComponent {
|
|
11
9
|
constructor(hostRef) {
|
|
10
|
+
super();
|
|
12
11
|
registerInstance(this, hostRef);
|
|
13
|
-
this.hamburger = 'fixed|none';
|
|
14
|
-
this.classes = undefined;
|
|
15
|
-
this.classString = undefined;
|
|
16
|
-
this.ariaExpanded = 'false';
|
|
17
|
-
this.bodyToggle = false;
|
|
18
|
-
this.skipAccessibilityMessage = undefined;
|
|
19
|
-
this.hasOpenButton = false;
|
|
20
|
-
this.hasCloseButton = false;
|
|
21
|
-
this.openButton = undefined;
|
|
22
|
-
this.closeButton = undefined;
|
|
23
|
-
this.contentSlot = undefined;
|
|
24
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* @type Select
|
|
15
|
+
* @responsive
|
|
16
|
+
* @options fixed
|
|
17
|
+
* @options absolute
|
|
18
|
+
* @options sticky
|
|
19
|
+
* @options static
|
|
20
|
+
* @options none
|
|
21
|
+
*/
|
|
22
|
+
hamburger = 'fixed|none';
|
|
23
|
+
get hostElement() { return getElement(this); }
|
|
24
|
+
ariaExpanded = 'false';
|
|
25
|
+
bodyToggle = false;
|
|
26
|
+
skipAccessibilityMessage;
|
|
27
|
+
hasOpenButton = false;
|
|
28
|
+
hasCloseButton = false;
|
|
29
|
+
openButton;
|
|
30
|
+
closeButton;
|
|
31
|
+
contentSlot;
|
|
32
|
+
/**
|
|
33
|
+
* The accessible name of the default menu button.
|
|
34
|
+
* @type String
|
|
35
|
+
*/
|
|
36
|
+
openLabel = 'Open menu';
|
|
37
|
+
/**
|
|
38
|
+
* The accessible name of the default close button.
|
|
39
|
+
* @type String
|
|
40
|
+
*/
|
|
41
|
+
closeLabel = 'Close menu';
|
|
42
|
+
focusTrap;
|
|
25
43
|
componentWillLoad() {
|
|
26
44
|
this.hasOpenButton = !!this.hostElement.querySelector('[slot="openButton"]');
|
|
27
45
|
this.hasCloseButton = !!this.hostElement.querySelector('[slot="closeButton"]');
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
WindowResizeService.registerProp(this.classes).subscribe(newValue => {
|
|
34
|
-
this.classString = newValue;
|
|
46
|
+
this.responsive({
|
|
47
|
+
hamburger: value => {
|
|
48
|
+
this.bodyToggle = value === 'fixed';
|
|
49
|
+
document.body.classList.remove('content-navigation-block-open');
|
|
50
|
+
},
|
|
35
51
|
});
|
|
36
52
|
}
|
|
37
53
|
componentDidLoad() {
|
|
@@ -46,12 +62,18 @@ const ContentNavigationBlock = class {
|
|
|
46
62
|
this.ariaExpanded = this.ariaExpanded === 'true' ? 'false' : 'true';
|
|
47
63
|
if (this.ariaExpanded === 'false') {
|
|
48
64
|
document.body.classList.remove('content-navigation-block-open');
|
|
65
|
+
this.closeMenu();
|
|
66
|
+
return;
|
|
49
67
|
}
|
|
50
68
|
else if (this.bodyToggle) {
|
|
51
69
|
document.body.classList.add('content-navigation-block-open');
|
|
52
70
|
}
|
|
71
|
+
// The CSS shows the menu from this attribute. Set it now rather than on the next render, so the menu
|
|
72
|
+
// is visible when the focus trap looks for something to focus.
|
|
73
|
+
this.hostElement.setAttribute('aria-expanded', this.ariaExpanded);
|
|
74
|
+
// Without initialFocus, focus-trap moves focus to the first focusable element in the menu. The content
|
|
75
|
+
// wrapper it pointed at before is not focusable, so focus stayed on the menu button behind the menu.
|
|
53
76
|
this.focusTrap = createFocusTrap(this.contentSlot.parentElement, {
|
|
54
|
-
initialFocus: this.contentSlot,
|
|
55
77
|
fallbackFocus: this.hostElement,
|
|
56
78
|
clickOutsideDeactivates: true,
|
|
57
79
|
onDeactivate: () => {
|
|
@@ -75,12 +97,9 @@ const ContentNavigationBlock = class {
|
|
|
75
97
|
}
|
|
76
98
|
}
|
|
77
99
|
render() {
|
|
78
|
-
return (h(Host, { key: '
|
|
100
|
+
return (h(Host, { key: 'b6eb66b3dfe42699f9df0538b88c818c95b56c87', class: this.classes, "aria-expanded": this.ariaExpanded }, h("div", { key: 'b48364573699d7fd8841fc1e920cc1ad3c5be457', class: "content-navigation-block__skip-content" }, h("slot", { key: '6dc363f930103bbc456aede2fa853011e45a7ae5', name: "skipContent" })), h("div", { key: 'fb13b0c0eedd6a6498c0ae2c0de03e2e0d383bcb', ref: el => (this.openButton = el), class: "content-navigation__open" }, !this.hasOpenButton && (h("button", { key: '70f46a671ae1e652be66dd7d8f5d0f57f95af280', "aria-label": this.openLabel, "aria-expanded": this.ariaExpanded }, h("svg", { key: '5e2d588cbfe861621315ee705358fb47ad25b255', class: "default-icon", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor" }, h("path", { key: 'a0adaea3899168dcca4742410d034bb04cfc0470', "stroke-linecap": "round", "stroke-linejoin": "round", d: "M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" })))), h("slot", { key: 'bf55378695d94633a648055140f69d3dfe975123', name: "openButton" })), h("div", { key: 'e4669128c42500345ba4ade040d4ad405302163d', class: "content-navigation__content-wrapper" }, h("div", { key: 'ce3d07bbb8f89d2f41ffd44553aa8b9b252d4dd8', ref: el => (this.closeButton = el), class: "content-navigation__close" }, !this.hasCloseButton && (h("button", { key: '5fb774a289d5fa9c0b274d9fd479247650e97d99', "aria-label": this.closeLabel }, h("svg", { key: '964f092682ac0ae5fe6b81c6c00a42d75f7dfbce', class: "default-icon", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor" }, h("path", { key: '33805956058ac793d23a09724a96f9251c86bb3d', "stroke-linecap": "round", "stroke-linejoin": "round", d: "M6 18 18 6M6 6l12 12" })))), h("slot", { key: '707e82984d3928d1eed4d6dfc596ebe1160b6ae4', name: "closeButton" })), h("div", { key: '2230223685f7d068eca4b24f6b46f6b1137529a7', class: "content-navigation__content", ref: el => (this.contentSlot = el) }, h("slot", { key: '3ccce837796fefb42b1124034602c8c7d7cce5af', name: "content" }), h("slot", { key: '51fd9695631ca25d1f49798b4d2f6be51b203896' })))));
|
|
79
101
|
}
|
|
80
|
-
get hostElement() { return getElement(this); }
|
|
81
102
|
};
|
|
82
|
-
ContentNavigationBlock.style =
|
|
103
|
+
ContentNavigationBlock.style = contentNavigationBlockCss();
|
|
83
104
|
|
|
84
105
|
export { ContentNavigationBlock as content_navigation_block };
|
|
85
|
-
|
|
86
|
-
//# sourceMappingURL=content-navigation-block.entry.js.map
|