@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,66 +1,112 @@
|
|
|
1
|
-
import { p as proxyCustomElement,
|
|
2
|
-
import {
|
|
3
|
-
import { a as getCurrentValue } from './p-7a436263.js';
|
|
1
|
+
import { p as proxyCustomElement, f as getCurrentValue, h, H as Host, e as prefersReducedMotion, t as transformTag } from './utils.js';
|
|
2
|
+
import { R as ResponsiveComponent } from './responsive-component.js';
|
|
4
3
|
|
|
5
|
-
const contentImageCss =
|
|
6
|
-
const ContentImageStyle0 = contentImageCss;
|
|
4
|
+
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}`;
|
|
7
5
|
|
|
8
|
-
const ContentImage$1 = /*@__PURE__*/ proxyCustomElement(class ContentImage extends
|
|
9
|
-
constructor() {
|
|
10
|
-
super();
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
this.src = undefined;
|
|
15
|
-
this.activeSrc = undefined;
|
|
16
|
-
this.alt = undefined;
|
|
17
|
-
this.width = '16';
|
|
18
|
-
this.height = '9';
|
|
19
|
-
this.aspectRatio = undefined;
|
|
20
|
-
this.type = 'image';
|
|
21
|
-
this.videoType = 'video/mp4';
|
|
22
|
-
this.showContent = 'false|true';
|
|
23
|
-
this.lazyLoadIsComplete = false;
|
|
24
|
-
this.showVideoAsGif = false;
|
|
25
|
-
this.activeLazyLoadClass = '';
|
|
26
|
-
this.classString = '';
|
|
27
|
-
this.inlineStyle = {};
|
|
28
|
-
this.hasMediaContent = false;
|
|
29
|
-
this.pictureImageSrc = undefined;
|
|
30
|
-
}
|
|
31
|
-
preloadImage(src) {
|
|
32
|
-
return new Promise(r => {
|
|
33
|
-
const image = new Image();
|
|
34
|
-
image.onload = r;
|
|
35
|
-
image.onerror = r;
|
|
36
|
-
image.src = src;
|
|
37
|
-
});
|
|
6
|
+
const ContentImage$1 = /*@__PURE__*/ proxyCustomElement(class ContentImage extends ResponsiveComponent {
|
|
7
|
+
constructor(registerHost) {
|
|
8
|
+
super(false);
|
|
9
|
+
if (registerHost !== false) {
|
|
10
|
+
this.__registerHost();
|
|
11
|
+
}
|
|
38
12
|
}
|
|
13
|
+
get hostElement() { return this; }
|
|
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;
|
|
39
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.
|
|
40
82
|
this.hasMediaContent = !!this.hostElement.querySelector('[slot="mediaContent"]');
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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}` }),
|
|
55
100
|
});
|
|
56
101
|
}
|
|
57
102
|
componentDidLoad() {
|
|
58
|
-
|
|
103
|
+
if (!this.showVideoAsGif)
|
|
104
|
+
return;
|
|
105
|
+
const observer = new IntersectionObserver(entries => {
|
|
59
106
|
entries.forEach(async (entry) => {
|
|
60
107
|
if (entry.isIntersecting) {
|
|
61
108
|
this.lazyLoadIsComplete = true;
|
|
62
|
-
|
|
63
|
-
this.showVideoAsGif = this.pictureImageSrc.indexOf('.mp4') >= 0 || getCurrentValue(this.type) === 'video';
|
|
109
|
+
observer.disconnect();
|
|
64
110
|
}
|
|
65
111
|
});
|
|
66
112
|
}, {
|
|
@@ -85,34 +131,46 @@ const ContentImage$1 = /*@__PURE__*/ proxyCustomElement(class ContentImage exten
|
|
|
85
131
|
}
|
|
86
132
|
}
|
|
87
133
|
render() {
|
|
88
|
-
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' }))));
|
|
89
143
|
}
|
|
90
|
-
get hostElement() { return this; }
|
|
91
144
|
static get watchers() { return {
|
|
92
|
-
"lazyLoadIsComplete": [
|
|
145
|
+
"lazyLoadIsComplete": [{
|
|
146
|
+
"watchLazyLoadIsComplete": 0
|
|
147
|
+
}]
|
|
93
148
|
}; }
|
|
94
|
-
static get style() { return
|
|
95
|
-
}, [
|
|
149
|
+
static get style() { return contentImageCss(); }
|
|
150
|
+
}, [772, "content-image", {
|
|
96
151
|
"classes": [1537],
|
|
97
|
-
"
|
|
98
|
-
"
|
|
152
|
+
"padding": [1537],
|
|
153
|
+
"lazyLoad": [516, "lazy-load"],
|
|
154
|
+
"fetchPriority": [513, "fetch-priority"],
|
|
155
|
+
"src": [1537],
|
|
99
156
|
"alt": [1537],
|
|
100
|
-
"width": [
|
|
101
|
-
"height": [
|
|
102
|
-
"aspectRatio": [
|
|
103
|
-
"type": [
|
|
104
|
-
"videoType": [
|
|
157
|
+
"width": [1537],
|
|
158
|
+
"height": [1537],
|
|
159
|
+
"aspectRatio": [1537, "aspect-ratio"],
|
|
160
|
+
"type": [513],
|
|
161
|
+
"videoType": [513, "video-type"],
|
|
105
162
|
"showContent": [1537, "show-content"],
|
|
106
163
|
"activeSrc": [32],
|
|
107
164
|
"lazyLoadIsComplete": [32],
|
|
108
165
|
"showVideoAsGif": [32],
|
|
109
166
|
"activeLazyLoadClass": [32],
|
|
110
|
-
"classString": [32],
|
|
111
167
|
"inlineStyle": [32],
|
|
112
168
|
"hasMediaContent": [32],
|
|
113
169
|
"pictureImageSrc": [32]
|
|
114
170
|
}, undefined, {
|
|
115
|
-
"lazyLoadIsComplete": [
|
|
171
|
+
"lazyLoadIsComplete": [{
|
|
172
|
+
"watchLazyLoadIsComplete": 0
|
|
173
|
+
}]
|
|
116
174
|
}]);
|
|
117
175
|
function defineCustomElement$1() {
|
|
118
176
|
if (typeof customElements === "undefined") {
|
|
@@ -121,17 +179,15 @@ function defineCustomElement$1() {
|
|
|
121
179
|
const components = ["content-image"];
|
|
122
180
|
components.forEach(tagName => { switch (tagName) {
|
|
123
181
|
case "content-image":
|
|
124
|
-
if (!customElements.get(tagName)) {
|
|
125
|
-
customElements.define(tagName, ContentImage$1);
|
|
182
|
+
if (!customElements.get(transformTag(tagName))) {
|
|
183
|
+
customElements.define(transformTag(tagName), ContentImage$1);
|
|
126
184
|
}
|
|
127
185
|
break;
|
|
128
186
|
} });
|
|
129
187
|
}
|
|
130
|
-
defineCustomElement$1();
|
|
188
|
+
defineCustomElement$1(ContentImage$1);
|
|
131
189
|
|
|
132
190
|
const ContentImage = ContentImage$1;
|
|
133
191
|
const defineCustomElement = defineCustomElement$1;
|
|
134
192
|
|
|
135
193
|
export { ContentImage, defineCustomElement };
|
|
136
|
-
|
|
137
|
-
//# sourceMappingURL=content-image.js.map
|
|
@@ -1,43 +1,66 @@
|
|
|
1
|
-
import { p as proxyCustomElement,
|
|
2
|
-
import {
|
|
1
|
+
import { p as proxyCustomElement, h, H as Host, t as transformTag } from './utils.js';
|
|
2
|
+
import { R as ResponsiveComponent } from './responsive-component.js';
|
|
3
3
|
|
|
4
|
-
const contentLineCss =
|
|
5
|
-
const ContentLineStyle0 = contentLineCss;
|
|
4
|
+
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
5
|
|
|
7
|
-
const ContentLine$1 = /*@__PURE__*/ proxyCustomElement(class ContentLine extends
|
|
8
|
-
constructor() {
|
|
9
|
-
super();
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
this.classes = undefined;
|
|
14
|
-
this.classString = undefined;
|
|
15
|
-
this.maxWidth = '100%';
|
|
16
|
-
this.inlineStyle = {};
|
|
6
|
+
const ContentLine$1 = /*@__PURE__*/ proxyCustomElement(class ContentLine extends ResponsiveComponent {
|
|
7
|
+
constructor(registerHost) {
|
|
8
|
+
super(false);
|
|
9
|
+
if (registerHost !== false) {
|
|
10
|
+
this.__registerHost();
|
|
11
|
+
}
|
|
17
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 = {};
|
|
18
46
|
componentWillLoad() {
|
|
19
|
-
|
|
20
|
-
this.inlineStyle =
|
|
21
|
-
|
|
22
|
-
WindowResizeService.registerProp(this.maxWidth).subscribe((newValue) => {
|
|
23
|
-
this.inlineStyle = Object.assign(Object.assign({}, this.inlineStyle), { '--max-width': isNaN(newValue) ? newValue : newValue + '%' });
|
|
24
|
-
});
|
|
25
|
-
WindowResizeService.registerProp(this.classes).subscribe(newValue => {
|
|
26
|
-
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 + '%' }),
|
|
27
50
|
});
|
|
28
51
|
}
|
|
29
52
|
render() {
|
|
30
53
|
// The capital case in this JSX variable is important
|
|
31
54
|
const ElementTagParsed = `${this.tag}`;
|
|
32
|
-
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' }))));
|
|
33
56
|
}
|
|
34
|
-
static get style() { return
|
|
35
|
-
}, [
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
57
|
+
static get style() { return contentLineCss(); }
|
|
58
|
+
}, [772, "content-line", {
|
|
59
|
+
"classes": [1537],
|
|
60
|
+
"padding": [1537],
|
|
61
|
+
"tag": [513],
|
|
62
|
+
"textAlign": [1537, "text-align"],
|
|
63
|
+
"maxWidth": [1537, "max-width"],
|
|
41
64
|
"inlineStyle": [32]
|
|
42
65
|
}]);
|
|
43
66
|
function defineCustomElement$1() {
|
|
@@ -47,17 +70,15 @@ function defineCustomElement$1() {
|
|
|
47
70
|
const components = ["content-line"];
|
|
48
71
|
components.forEach(tagName => { switch (tagName) {
|
|
49
72
|
case "content-line":
|
|
50
|
-
if (!customElements.get(tagName)) {
|
|
51
|
-
customElements.define(tagName, ContentLine$1);
|
|
73
|
+
if (!customElements.get(transformTag(tagName))) {
|
|
74
|
+
customElements.define(transformTag(tagName), ContentLine$1);
|
|
52
75
|
}
|
|
53
76
|
break;
|
|
54
77
|
} });
|
|
55
78
|
}
|
|
56
|
-
defineCustomElement$1();
|
|
79
|
+
defineCustomElement$1(ContentLine$1);
|
|
57
80
|
|
|
58
81
|
const ContentLine = ContentLine$1;
|
|
59
82
|
const defineCustomElement = defineCustomElement$1;
|
|
60
83
|
|
|
61
84
|
export { ContentLine, defineCustomElement };
|
|
62
|
-
|
|
63
|
-
//# sourceMappingURL=content-line.js.map
|
|
@@ -1,36 +1,54 @@
|
|
|
1
|
-
import { p as proxyCustomElement,
|
|
2
|
-
import {
|
|
3
|
-
import { c as createFocusTrap } from './
|
|
1
|
+
import { p as proxyCustomElement, h, H as Host, t as transformTag } from './utils.js';
|
|
2
|
+
import { R as ResponsiveComponent } from './responsive-component.js';
|
|
3
|
+
import { c as createFocusTrap } from './focus-trap.esm.js';
|
|
4
4
|
|
|
5
|
-
const contentNavigationBlockCss =
|
|
6
|
-
const ContentNavigationBlockStyle0 = contentNavigationBlockCss;
|
|
5
|
+
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)}`;
|
|
7
6
|
|
|
8
|
-
const ContentNavigationBlock$1 = /*@__PURE__*/ proxyCustomElement(class ContentNavigationBlock extends
|
|
9
|
-
constructor() {
|
|
10
|
-
super();
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
this.classString = undefined;
|
|
15
|
-
this.ariaExpanded = 'false';
|
|
16
|
-
this.bodyToggle = false;
|
|
17
|
-
this.skipAccessibilityMessage = undefined;
|
|
18
|
-
this.hasOpenButton = false;
|
|
19
|
-
this.hasCloseButton = false;
|
|
20
|
-
this.openButton = undefined;
|
|
21
|
-
this.closeButton = undefined;
|
|
22
|
-
this.contentSlot = undefined;
|
|
7
|
+
const ContentNavigationBlock$1 = /*@__PURE__*/ proxyCustomElement(class ContentNavigationBlock extends ResponsiveComponent {
|
|
8
|
+
constructor(registerHost) {
|
|
9
|
+
super(false);
|
|
10
|
+
if (registerHost !== false) {
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
}
|
|
23
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* @type Select
|
|
16
|
+
* @responsive
|
|
17
|
+
* @options fixed
|
|
18
|
+
* @options absolute
|
|
19
|
+
* @options sticky
|
|
20
|
+
* @options static
|
|
21
|
+
* @options none
|
|
22
|
+
*/
|
|
23
|
+
hamburger = 'fixed|none';
|
|
24
|
+
get hostElement() { return this; }
|
|
25
|
+
ariaExpanded = 'false';
|
|
26
|
+
bodyToggle = false;
|
|
27
|
+
skipAccessibilityMessage;
|
|
28
|
+
hasOpenButton = false;
|
|
29
|
+
hasCloseButton = false;
|
|
30
|
+
openButton;
|
|
31
|
+
closeButton;
|
|
32
|
+
contentSlot;
|
|
33
|
+
/**
|
|
34
|
+
* The accessible name of the default menu button.
|
|
35
|
+
* @type String
|
|
36
|
+
*/
|
|
37
|
+
openLabel = 'Open menu';
|
|
38
|
+
/**
|
|
39
|
+
* The accessible name of the default close button.
|
|
40
|
+
* @type String
|
|
41
|
+
*/
|
|
42
|
+
closeLabel = 'Close menu';
|
|
43
|
+
focusTrap;
|
|
24
44
|
componentWillLoad() {
|
|
25
45
|
this.hasOpenButton = !!this.hostElement.querySelector('[slot="openButton"]');
|
|
26
46
|
this.hasCloseButton = !!this.hostElement.querySelector('[slot="closeButton"]');
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
WindowResizeService.registerProp(this.classes).subscribe(newValue => {
|
|
33
|
-
this.classString = newValue;
|
|
47
|
+
this.responsive({
|
|
48
|
+
hamburger: value => {
|
|
49
|
+
this.bodyToggle = value === 'fixed';
|
|
50
|
+
document.body.classList.remove('content-navigation-block-open');
|
|
51
|
+
},
|
|
34
52
|
});
|
|
35
53
|
}
|
|
36
54
|
componentDidLoad() {
|
|
@@ -45,12 +63,18 @@ const ContentNavigationBlock$1 = /*@__PURE__*/ proxyCustomElement(class ContentN
|
|
|
45
63
|
this.ariaExpanded = this.ariaExpanded === 'true' ? 'false' : 'true';
|
|
46
64
|
if (this.ariaExpanded === 'false') {
|
|
47
65
|
document.body.classList.remove('content-navigation-block-open');
|
|
66
|
+
this.closeMenu();
|
|
67
|
+
return;
|
|
48
68
|
}
|
|
49
69
|
else if (this.bodyToggle) {
|
|
50
70
|
document.body.classList.add('content-navigation-block-open');
|
|
51
71
|
}
|
|
72
|
+
// The CSS shows the menu from this attribute. Set it now rather than on the next render, so the menu
|
|
73
|
+
// is visible when the focus trap looks for something to focus.
|
|
74
|
+
this.hostElement.setAttribute('aria-expanded', this.ariaExpanded);
|
|
75
|
+
// Without initialFocus, focus-trap moves focus to the first focusable element in the menu. The content
|
|
76
|
+
// wrapper it pointed at before is not focusable, so focus stayed on the menu button behind the menu.
|
|
52
77
|
this.focusTrap = createFocusTrap(this.contentSlot.parentElement, {
|
|
53
|
-
initialFocus: this.contentSlot,
|
|
54
78
|
fallbackFocus: this.hostElement,
|
|
55
79
|
clickOutsideDeactivates: true,
|
|
56
80
|
onDeactivate: () => {
|
|
@@ -74,14 +98,15 @@ const ContentNavigationBlock$1 = /*@__PURE__*/ proxyCustomElement(class ContentN
|
|
|
74
98
|
}
|
|
75
99
|
}
|
|
76
100
|
render() {
|
|
77
|
-
return (h(Host, { key: '
|
|
101
|
+
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' })))));
|
|
78
102
|
}
|
|
79
|
-
get
|
|
80
|
-
|
|
81
|
-
}, [4, "content-navigation-block", {
|
|
82
|
-
"hamburger": [1537],
|
|
103
|
+
static get style() { return contentNavigationBlockCss(); }
|
|
104
|
+
}, [772, "content-navigation-block", {
|
|
83
105
|
"classes": [1537],
|
|
84
|
-
"
|
|
106
|
+
"padding": [1537],
|
|
107
|
+
"hamburger": [1537],
|
|
108
|
+
"openLabel": [513, "open-label"],
|
|
109
|
+
"closeLabel": [513, "close-label"],
|
|
85
110
|
"ariaExpanded": [32],
|
|
86
111
|
"bodyToggle": [32],
|
|
87
112
|
"skipAccessibilityMessage": [32],
|
|
@@ -98,17 +123,15 @@ function defineCustomElement$1() {
|
|
|
98
123
|
const components = ["content-navigation-block"];
|
|
99
124
|
components.forEach(tagName => { switch (tagName) {
|
|
100
125
|
case "content-navigation-block":
|
|
101
|
-
if (!customElements.get(tagName)) {
|
|
102
|
-
customElements.define(tagName, ContentNavigationBlock$1);
|
|
126
|
+
if (!customElements.get(transformTag(tagName))) {
|
|
127
|
+
customElements.define(transformTag(tagName), ContentNavigationBlock$1);
|
|
103
128
|
}
|
|
104
129
|
break;
|
|
105
130
|
} });
|
|
106
131
|
}
|
|
107
|
-
defineCustomElement$1();
|
|
132
|
+
defineCustomElement$1(ContentNavigationBlock$1);
|
|
108
133
|
|
|
109
134
|
const ContentNavigationBlock = ContentNavigationBlock$1;
|
|
110
135
|
const defineCustomElement = defineCustomElement$1;
|
|
111
136
|
|
|
112
137
|
export { ContentNavigationBlock, defineCustomElement };
|
|
113
|
-
|
|
114
|
-
//# sourceMappingURL=content-navigation-block.js.map
|