@content-blocks/js 0.7.7 → 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} +14541 -12905
- 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 +123 -73
- 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 +14605 -11951
- 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} +14516 -12868
- 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 +892 -198
- 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 +6 -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 +74 -64
- 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-398760b3.entry.js +0 -26
- package/dist/content-blocks/p-398760b3.entry.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-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,26 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* SSR Window
|
|
2
|
+
* SSR Window 5.0.1
|
|
3
3
|
* Better handling for window object in SSR environment
|
|
4
4
|
* https://github.com/nolimits4web/ssr-window
|
|
5
5
|
*
|
|
6
|
-
* Copyright
|
|
6
|
+
* Copyright 2025, Vladimir Kharlampidi
|
|
7
7
|
*
|
|
8
8
|
* Licensed under MIT
|
|
9
9
|
*
|
|
10
|
-
* Released on:
|
|
10
|
+
* Released on: June 27, 2025
|
|
11
11
|
*/
|
|
12
12
|
/* eslint-disable no-param-reassign */
|
|
13
13
|
function isObject$1(obj) {
|
|
14
14
|
return obj !== null && typeof obj === 'object' && 'constructor' in obj && obj.constructor === Object;
|
|
15
15
|
}
|
|
16
|
-
function extend$1(target, src) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
if (src === void 0) {
|
|
21
|
-
src = {};
|
|
22
|
-
}
|
|
23
|
-
Object.keys(src).forEach(key => {
|
|
16
|
+
function extend$1(target = {}, src = {}) {
|
|
17
|
+
const noExtend = ['__proto__', 'constructor', 'prototype'];
|
|
18
|
+
Object.keys(src).filter(key => noExtend.indexOf(key) < 0).forEach(key => {
|
|
24
19
|
if (typeof target[key] === 'undefined') target[key] = src[key];else if (isObject$1(src[key]) && isObject$1(target[key]) && Object.keys(src[key]).length > 0) {
|
|
25
20
|
extend$1(target[key], src[key]);
|
|
26
21
|
}
|
|
@@ -142,10 +137,7 @@ function getWindow() {
|
|
|
142
137
|
return win;
|
|
143
138
|
}
|
|
144
139
|
|
|
145
|
-
function classesToTokens(classes) {
|
|
146
|
-
if (classes === void 0) {
|
|
147
|
-
classes = '';
|
|
148
|
-
}
|
|
140
|
+
function classesToTokens(classes = '') {
|
|
149
141
|
return classes.trim().split(' ').filter(c => !!c.trim());
|
|
150
142
|
}
|
|
151
143
|
|
|
@@ -164,10 +156,7 @@ function deleteProps(obj) {
|
|
|
164
156
|
}
|
|
165
157
|
});
|
|
166
158
|
}
|
|
167
|
-
function nextTick(callback, delay) {
|
|
168
|
-
if (delay === void 0) {
|
|
169
|
-
delay = 0;
|
|
170
|
-
}
|
|
159
|
+
function nextTick(callback, delay = 0) {
|
|
171
160
|
return setTimeout(callback, delay);
|
|
172
161
|
}
|
|
173
162
|
function now() {
|
|
@@ -187,10 +176,7 @@ function getComputedStyle(el) {
|
|
|
187
176
|
}
|
|
188
177
|
return style;
|
|
189
178
|
}
|
|
190
|
-
function getTranslate(el, axis) {
|
|
191
|
-
if (axis === void 0) {
|
|
192
|
-
axis = 'x';
|
|
193
|
-
}
|
|
179
|
+
function getTranslate(el, axis = 'x') {
|
|
194
180
|
const window = getWindow();
|
|
195
181
|
let matrix;
|
|
196
182
|
let curTransform;
|
|
@@ -236,13 +222,12 @@ function isNode(node) {
|
|
|
236
222
|
}
|
|
237
223
|
return node && (node.nodeType === 1 || node.nodeType === 11);
|
|
238
224
|
}
|
|
239
|
-
function extend() {
|
|
240
|
-
const to = Object(
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
const nextSource = i < 0 || arguments.length <= i ? undefined : arguments[i];
|
|
225
|
+
function extend(...args) {
|
|
226
|
+
const to = Object(args[0]);
|
|
227
|
+
for (let i = 1; i < args.length; i += 1) {
|
|
228
|
+
const nextSource = args[i];
|
|
244
229
|
if (nextSource !== undefined && nextSource !== null && !isNode(nextSource)) {
|
|
245
|
-
const keysArray = Object.keys(Object(nextSource)).filter(key =>
|
|
230
|
+
const keysArray = Object.keys(Object(nextSource)).filter(key => key !== '__proto__' && key !== 'constructor' && key !== 'prototype');
|
|
246
231
|
for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {
|
|
247
232
|
const nextKey = keysArray[nextIndex];
|
|
248
233
|
const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
|
|
@@ -272,12 +257,11 @@ function extend() {
|
|
|
272
257
|
function setCSSProperty(el, varName, varValue) {
|
|
273
258
|
el.style.setProperty(varName, varValue);
|
|
274
259
|
}
|
|
275
|
-
function animateCSSModeScroll(
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
} = _ref;
|
|
260
|
+
function animateCSSModeScroll({
|
|
261
|
+
swiper,
|
|
262
|
+
targetPosition,
|
|
263
|
+
side
|
|
264
|
+
}) {
|
|
281
265
|
const window = getWindow();
|
|
282
266
|
const startPosition = -swiper.translate;
|
|
283
267
|
let startTime = null;
|
|
@@ -322,12 +306,10 @@ function animateCSSModeScroll(_ref) {
|
|
|
322
306
|
function getSlideTransformEl(slideEl) {
|
|
323
307
|
return slideEl.querySelector('.swiper-slide-transform') || slideEl.shadowRoot && slideEl.shadowRoot.querySelector('.swiper-slide-transform') || slideEl;
|
|
324
308
|
}
|
|
325
|
-
function elementChildren(element, selector) {
|
|
326
|
-
|
|
327
|
-
selector = '';
|
|
328
|
-
}
|
|
309
|
+
function elementChildren(element, selector = '') {
|
|
310
|
+
const window = getWindow();
|
|
329
311
|
const children = [...element.children];
|
|
330
|
-
if (element instanceof HTMLSlotElement) {
|
|
312
|
+
if (window.HTMLSlotElement && element instanceof HTMLSlotElement) {
|
|
331
313
|
children.push(...element.assignedElements());
|
|
332
314
|
}
|
|
333
315
|
if (!selector) {
|
|
@@ -335,11 +317,26 @@ function elementChildren(element, selector) {
|
|
|
335
317
|
}
|
|
336
318
|
return children.filter(el => el.matches(selector));
|
|
337
319
|
}
|
|
320
|
+
function elementIsChildOfSlot(el, slot) {
|
|
321
|
+
// Breadth-first search through all parent's children and assigned elements
|
|
322
|
+
const elementsQueue = [slot];
|
|
323
|
+
while (elementsQueue.length > 0) {
|
|
324
|
+
const elementToCheck = elementsQueue.shift();
|
|
325
|
+
if (el === elementToCheck) {
|
|
326
|
+
return true;
|
|
327
|
+
}
|
|
328
|
+
elementsQueue.push(...elementToCheck.children, ...(elementToCheck.shadowRoot ? elementToCheck.shadowRoot.children : []), ...(elementToCheck.assignedElements ? elementToCheck.assignedElements() : []));
|
|
329
|
+
}
|
|
330
|
+
}
|
|
338
331
|
function elementIsChildOf(el, parent) {
|
|
339
|
-
const
|
|
340
|
-
|
|
332
|
+
const window = getWindow();
|
|
333
|
+
let isChild = parent.contains(el);
|
|
334
|
+
if (!isChild && window.HTMLSlotElement && parent instanceof HTMLSlotElement) {
|
|
341
335
|
const children = [...parent.assignedElements()];
|
|
342
|
-
|
|
336
|
+
isChild = children.includes(el);
|
|
337
|
+
if (!isChild) {
|
|
338
|
+
isChild = elementIsChildOfSlot(el, parent);
|
|
339
|
+
}
|
|
343
340
|
}
|
|
344
341
|
return isChild;
|
|
345
342
|
}
|
|
@@ -351,10 +348,7 @@ function showWarning(text) {
|
|
|
351
348
|
// err
|
|
352
349
|
}
|
|
353
350
|
}
|
|
354
|
-
function createElement(tag, classes) {
|
|
355
|
-
if (classes === void 0) {
|
|
356
|
-
classes = [];
|
|
357
|
-
}
|
|
351
|
+
function createElement(tag, classes = []) {
|
|
358
352
|
const el = document.createElement(tag);
|
|
359
353
|
el.classList.add(...(Array.isArray(classes) ? classes : classesToTokens(classes)));
|
|
360
354
|
return el;
|
|
@@ -453,7 +447,14 @@ function getRotateFix(swiper) {
|
|
|
453
447
|
return v;
|
|
454
448
|
};
|
|
455
449
|
}
|
|
450
|
+
function setInnerHTML(el, html = '') {
|
|
451
|
+
if (typeof trustedTypes !== 'undefined') {
|
|
452
|
+
el.innerHTML = trustedTypes.createPolicy('html', {
|
|
453
|
+
createHTML: s => s
|
|
454
|
+
}).createHTML(html);
|
|
455
|
+
} else {
|
|
456
|
+
el.innerHTML = html;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
456
459
|
|
|
457
|
-
export {
|
|
458
|
-
|
|
459
|
-
//# sourceMappingURL=utils-1c9f0ec1.js.map
|
|
460
|
+
export { getRotateFix as A, getDocument as a, elementStyle as b, elementChildren as c, elementOuterSize as d, elementParents as e, elementNextAll as f, getWindow as g, elementPrevAll as h, getTranslate as i, animateCSSModeScroll as j, createElement as k, showWarning as l, elementIsChildOf as m, nextTick as n, now as o, extend as p, elementIndex as q, deleteProps as r, setCSSProperty as s, setInnerHTML as t, elementOffset as u, makeElementsArray as v, classesToTokens as w, elementTransitionEnd as x, isObject as y, getSlideTransformEl as z };
|
|
@@ -0,0 +1,85 @@
|
|
|
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 contentAccordionCss = () => `@charset "UTF-8";*{box-sizing:border-box}content-accordion{display:block}content-accordion>button{display:flex;align-items:center;justify-content:space-between;gap:1rem;width:100%;padding:0;border:none;font:inherit;text-align:left;text-decoration:none;color:inherit;background-color:transparent;cursor:pointer}content-accordion[expanded]>.content-accordion__reveal{display:block}content-accordion>.content-accordion__reveal{display:none}:where(content-accordion>button)::after{flex:none;content:var(--content-accordion-icon, "+")}:where(content-accordion>button[aria-expanded=true])::after{content:var(--content-accordion-icon-open, "−")}`;
|
|
6
|
+
|
|
7
|
+
let accordionCount = 0;
|
|
8
|
+
const ContentAccordion = class extends ResponsiveComponent {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
super();
|
|
11
|
+
registerInstance(this, hostRef);
|
|
12
|
+
}
|
|
13
|
+
get hostElement() { return getElement(this); }
|
|
14
|
+
revealElement;
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @type Boolean
|
|
18
|
+
* @responsive
|
|
19
|
+
*/
|
|
20
|
+
open = 'false';
|
|
21
|
+
/**
|
|
22
|
+
* The starting animation class in case you want to control content styling.
|
|
23
|
+
* @type String
|
|
24
|
+
*/
|
|
25
|
+
animationStart = 'animation-start';
|
|
26
|
+
/**
|
|
27
|
+
* The ending animation class in case you want to control content styling.
|
|
28
|
+
* @type String
|
|
29
|
+
*/
|
|
30
|
+
animationEnd = 'animation-end';
|
|
31
|
+
/**
|
|
32
|
+
* The class to be applied to the trigger button element.
|
|
33
|
+
* @type String
|
|
34
|
+
*/
|
|
35
|
+
triggerClass = '';
|
|
36
|
+
/**
|
|
37
|
+
* The amount of time in milliseconds to run the closing animation, before the class is removed
|
|
38
|
+
* @type Number
|
|
39
|
+
*/
|
|
40
|
+
animationTime = 0;
|
|
41
|
+
isOpen = false;
|
|
42
|
+
randomID = '';
|
|
43
|
+
timeoutHolder;
|
|
44
|
+
handleClickEvent(e) {
|
|
45
|
+
this.animateAccordion(!this.isOpen);
|
|
46
|
+
}
|
|
47
|
+
animateAccordion(open, animationTime = this.animationTime) {
|
|
48
|
+
if (this.timeoutHolder) {
|
|
49
|
+
clearTimeout(this.timeoutHolder);
|
|
50
|
+
}
|
|
51
|
+
if (open) {
|
|
52
|
+
this.isOpen = true;
|
|
53
|
+
this.timeoutHolder = setTimeout(() => {
|
|
54
|
+
this.hostElement.classList.add(this.animationStart);
|
|
55
|
+
}, 0);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
this.hostElement.classList.add(this.animationEnd);
|
|
59
|
+
this.timeoutHolder = setTimeout(() => {
|
|
60
|
+
this.hostElement.classList.remove(this.animationStart, this.animationEnd);
|
|
61
|
+
this.isOpen = false;
|
|
62
|
+
}, animationTime);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
componentWillLoad() {
|
|
66
|
+
this.revealElement = this.hostElement.querySelector('.js-content-accordion-reveal');
|
|
67
|
+
// aria-controls needs an id that is unique on the page. The old random index drew from the number of
|
|
68
|
+
// accordions on the page, so two accordions often got the same id.
|
|
69
|
+
this.randomID = this.hostElement.id ? `content-accordion_${this.hostElement.id}` : `content-accordion_${++accordionCount}`;
|
|
70
|
+
this.responsive({
|
|
71
|
+
open: value => {
|
|
72
|
+
this.isOpen = value === 'true';
|
|
73
|
+
if (this.isOpen) {
|
|
74
|
+
this.animateAccordion(true);
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
render() {
|
|
80
|
+
return (h(Host, { key: 'afed931e898a61d076e7795346805d987ebec15e', class: this.classes, expanded: this.isOpen }, h("button", { key: '4d0c434d7c35e837641b9fd9b4af3c1829d81548', class: this.triggerClass, onClick: e => this.handleClickEvent(e), "aria-expanded": String(this.isOpen), "aria-controls": this.randomID }, h("slot", { key: 'be551c10a3ad2abf54f7c52d2f3bc05863316b77', name: "trigger" })), h("div", { key: 'aab4d02e563ea8e8b135698fff59a6318819f48c', id: this.randomID, class: "js-content-accordion-reveal content-accordion__reveal" }, h("slot", { key: 'f8713ddbcb0069f9324790efeddfd2b0e85c49f4', name: "content" }), h("slot", { key: '8f1ac4ed52789d7be47357ea47b7a91938814bdf' }))));
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
ContentAccordion.style = contentAccordionCss();
|
|
84
|
+
|
|
85
|
+
export { ContentAccordion as content_accordion };
|
|
@@ -1,2 +1,47 @@
|
|
|
1
|
-
import{
|
|
2
|
-
|
|
1
|
+
import { B as BUILD, c as consoleDevInfo, H, w as win, N as NAMESPACE, p as promiseResolve, g as globalScripts, b as bootstrapLazy } from './index-BFDJMblF.js';
|
|
2
|
+
export { s as setNonce } from './index-BFDJMblF.js';
|
|
3
|
+
|
|
4
|
+
/*
|
|
5
|
+
Stencil Client Patch Browser v4.45.2 | MIT Licensed | https://stenciljs.com
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
var patchBrowser = () => {
|
|
9
|
+
if (BUILD.isDev && !BUILD.isTesting) {
|
|
10
|
+
consoleDevInfo("Running in development mode.");
|
|
11
|
+
}
|
|
12
|
+
if (BUILD.cloneNodeFix) {
|
|
13
|
+
patchCloneNodeFix(H.prototype);
|
|
14
|
+
}
|
|
15
|
+
const scriptElm = BUILD.scriptDataOpts ? win.document && Array.from(win.document.querySelectorAll("script")).find(
|
|
16
|
+
(s) => new RegExp(`/${NAMESPACE}(\\.esm)?\\.js($|\\?|#)`).test(s.src) || s.getAttribute("data-stencil-namespace") === NAMESPACE
|
|
17
|
+
) : null;
|
|
18
|
+
const importMeta = import.meta.url;
|
|
19
|
+
const opts = BUILD.scriptDataOpts ? (scriptElm || {})["data-opts"] || {} : {};
|
|
20
|
+
if (importMeta !== "") {
|
|
21
|
+
opts.resourcesUrl = new URL(".", importMeta).href;
|
|
22
|
+
}
|
|
23
|
+
return promiseResolve(opts);
|
|
24
|
+
};
|
|
25
|
+
var patchCloneNodeFix = (HTMLElementPrototype) => {
|
|
26
|
+
const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;
|
|
27
|
+
HTMLElementPrototype.cloneNode = function(deep) {
|
|
28
|
+
if (this.nodeName === "TEMPLATE") {
|
|
29
|
+
return nativeCloneNodeFn.call(this, deep);
|
|
30
|
+
}
|
|
31
|
+
const clonedNode = nativeCloneNodeFn.call(this, false);
|
|
32
|
+
const srcChildNodes = this.childNodes;
|
|
33
|
+
if (deep) {
|
|
34
|
+
for (let i = 0; i < srcChildNodes.length; i++) {
|
|
35
|
+
if (srcChildNodes[i].nodeType !== 2) {
|
|
36
|
+
clonedNode.appendChild(srcChildNodes[i].cloneNode(true));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return clonedNode;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
patchBrowser().then(async (options) => {
|
|
45
|
+
await globalScripts();
|
|
46
|
+
return bootstrapLazy([["content-accordion",[[772,"content-accordion",{"classes":[1537],"padding":[1537],"open":[1537],"animationStart":[513,"animation-start"],"animationEnd":[513,"animation-end"],"triggerClass":[513,"trigger-class"],"animationTime":[514,"animation-time"],"revealElement":[32],"isOpen":[32],"randomID":[32]}]]],["content-button",[[772,"content-button",{"classes":[1537],"padding":[1537],"href":[1537],"target":[513],"expanded":[1537],"controls":[513],"linkLabel":[513,"link-label"],"linkClass":[1537,"link-class"],"hasContentToActivate":[32],"wrapsBlock":[32],"opensOverlay":[32]}]]],["content-carousel",[[772,"content-carousel",{"classes":[1537],"padding":[1537],"initMethod":[513,"init-method"],"swiperOptions":[513,"swiper-options"],"label":[513],"prevLabel":[513,"prev-label"],"nextLabel":[513,"next-label"],"pauseLabel":[513,"pause-label"],"playLabel":[513,"play-label"],"hasAutoplay":[32],"isPlaying":[32]},[[0,"focusin","onFocusIn"],[0,"setSwiperOptions","setSwiperOptionsCallback"]]]]],["content-grid-formatter",[[772,"content-grid-formatter",{"classes":[1537],"padding":[1537],"type":[1537],"flexGrow":[1537,"flex-grow"],"flexShrink":[1537,"flex-shrink"],"vertical":[1537],"horizontal":[1537],"columns":[1537],"direction":[1537],"columnGap":[1537,"column-gap"],"rowGap":[1537,"row-gap"],"activeClassString":[32],"inlineStyle":[32]}]]],["content-hero-block",[[772,"content-hero-block",{"classes":[1537],"padding":[1537],"contentPosition":[1537,"content-position"],"hasBackground":[32],"revealHiddenContent":[32]},[[8,"open","contentBlockActivationHandler"]]]]],["content-image",[[772,"content-image",{"classes":[1537],"padding":[1537],"lazyLoad":[516,"lazy-load"],"fetchPriority":[513,"fetch-priority"],"src":[1537],"alt":[1537],"width":[1537],"height":[1537],"aspectRatio":[1537,"aspect-ratio"],"type":[513],"videoType":[513,"video-type"],"showContent":[1537,"show-content"],"activeSrc":[32],"lazyLoadIsComplete":[32],"showVideoAsGif":[32],"activeLazyLoadClass":[32],"inlineStyle":[32],"hasMediaContent":[32],"pictureImageSrc":[32]},null,{"lazyLoadIsComplete":[{"watchLazyLoadIsComplete":0}]}]]],["content-line",[[772,"content-line",{"classes":[1537],"padding":[1537],"tag":[513],"textAlign":[1537,"text-align"],"maxWidth":[1537,"max-width"],"inlineStyle":[32]}]]],["content-navigation-block",[[772,"content-navigation-block",{"classes":[1537],"padding":[1537],"hamburger":[1537],"openLabel":[513,"open-label"],"closeLabel":[513,"close-label"],"ariaExpanded":[32],"bodyToggle":[32],"skipAccessibilityMessage":[32],"hasOpenButton":[32],"hasCloseButton":[32],"openButton":[32],"closeButton":[32],"contentSlot":[32]}]]],["content-overlay",[[772,"content-overlay",{"classes":[1537],"padding":[1537],"fill":[1537],"open":[1537],"fullScreen":[1537,"full-screen"],"horizontal":[1537],"vertical":[1537],"closeTitle":[513,"close-title"],"label":[513],"headerId":[32],"position":[32],"isActive":[32],"activeClass":[32],"contentSlot":[32],"isFullScreen":[32],"hasCloseButton":[32],"originalMarkup":[32],"openOverlay":[64],"closeOverlay":[64]},[[0,"toggle","onContentBlockToggle"],[0,"open","onContentBlockActivated"],[0,"close","onContentBlockDeactivated"]]]]],["content-spacer",[[772,"content-spacer",{"classes":[1537],"padding":[1537],"maxWidth":[1537,"max-width"],"fullHeight":[1537,"full-height"],"textAlign":[1537,"text-align"],"horizontal":[1537],"vertical":[1537],"inlineStyle":[32]}]]],["content-split-block",[[772,"content-split-block",{"classes":[1537],"padding":[1537],"reverse":[1544],"columns":[1537]}]]],["content-tabs",[[772,"content-tabs",{"classes":[1537],"padding":[1537]}]]],["content-text-block",[[772,"content-text-block",{"classes":[1537],"padding":[1537],"minHeight":[1537,"min-height"],"vertical":[1537],"fullHeight":[1537,"full-height"],"textAlign":[1537,"text-align"],"inlineStyle":[32]}]]],["content-tout-block",[[772,"content-tout-block",{"classes":[1537],"padding":[1537],"hover":[1537]}]]],["content-video",[[772,"content-video",{"classes":[1537],"padding":[1537],"method":[513],"autoplay":[516],"autoplayMute":[516,"autoplay-mute"],"src":[513],"width":[514],"height":[514],"type":[513],"playButtonAriaLabel":[513,"play-button-aria-label"],"controls":[516],"preload":[513],"fitContainer":[1537,"fit-container"],"isLoaded":[32],"hasPoster":[32],"isPlayed":[32]},[[8,"contentOverlayDeactivated","onOverlayClosed"]]]]]], options);
|
|
47
|
+
});
|
|
@@ -0,0 +1,111 @@
|
|
|
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 contentButtonCss = () => `*{box-sizing:border-box}content-button{display:inline-block}content-button>a,content-button>button{display:flex;width:100%;align-items:center;justify-content:center}content-button>button{appearance:none;background:inherit;cursor:pointer}content-button[block=true]{display:block;width:100%;height:100%}content-button[block=true]>a,content-button[block=true]>button{height:100%;width:100%}content-button[block=true]>a>*,content-button[block=true]>button>*{display:block;width:100%}content-button[block=true] .content-button__clickable-content{width:100%;height:100%}`;
|
|
6
|
+
|
|
7
|
+
// Elements that sit inside a line of text. A button whose content is only these, or text, is an ordinary inline
|
|
8
|
+
// button. Anything else, such as a heading, a paragraph or a content block, makes it a clickable block.
|
|
9
|
+
const inlineTags = new Set('a abbr b bdi bdo br cite code data dfn em i img kbd mark picture q s samp small span strong sub sup svg time u var wbr'.split(' '));
|
|
10
|
+
// Read before the first render, while the content is still the element's own children.
|
|
11
|
+
function wrapsBlockContent(host) {
|
|
12
|
+
return Array.from(host.children).some(child => child.getAttribute('slot') !== 'activatedContent' && !inlineTags.has(child.tagName.toLowerCase()));
|
|
13
|
+
}
|
|
14
|
+
const ContentButton = class extends ResponsiveComponent {
|
|
15
|
+
constructor(hostRef) {
|
|
16
|
+
super();
|
|
17
|
+
registerInstance(this, hostRef);
|
|
18
|
+
}
|
|
19
|
+
get hostElement() { return getElement(this); }
|
|
20
|
+
/**
|
|
21
|
+
* @type URL
|
|
22
|
+
*/
|
|
23
|
+
href;
|
|
24
|
+
/**
|
|
25
|
+
* @type String
|
|
26
|
+
*/
|
|
27
|
+
target;
|
|
28
|
+
/**
|
|
29
|
+
* @type Boolean
|
|
30
|
+
*/
|
|
31
|
+
expanded;
|
|
32
|
+
/**
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Aria-controls value
|
|
36
|
+
* @type Target
|
|
37
|
+
*/
|
|
38
|
+
controls;
|
|
39
|
+
/**
|
|
40
|
+
* @type String
|
|
41
|
+
* @responsive
|
|
42
|
+
*/
|
|
43
|
+
linkLabel;
|
|
44
|
+
/**
|
|
45
|
+
* @type String
|
|
46
|
+
* @responsive
|
|
47
|
+
*/
|
|
48
|
+
linkClass;
|
|
49
|
+
hasContentToActivate;
|
|
50
|
+
// True when the button wraps block content, such as a card with an image and headings. The whole area is
|
|
51
|
+
// then the link, laid out as a block that fills its space, and its content is wrapped in a div, not a span.
|
|
52
|
+
wrapsBlock = false;
|
|
53
|
+
// True when href points at a content-overlay on the page. The link then opens a dialog rather than
|
|
54
|
+
// going anywhere, so it is presented and operated as a button.
|
|
55
|
+
opensOverlay = false;
|
|
56
|
+
activatedContent;
|
|
57
|
+
componentWillLoad() {
|
|
58
|
+
this.activatedContent = this.hostElement.querySelector('[slot="activatedContent"]');
|
|
59
|
+
this.hasContentToActivate = !!this.activatedContent;
|
|
60
|
+
this.wrapsBlock = wrapsBlockContent(this.hostElement);
|
|
61
|
+
// If this is a clickable block, forcefully add a # to force an anchor link
|
|
62
|
+
if (!this.href || this.href === '#') {
|
|
63
|
+
this.href = 'javascript:void(0);';
|
|
64
|
+
}
|
|
65
|
+
this.opensOverlay = this.href.startsWith('#') && document.getElementById(this.href.substring(1))?.tagName === 'CONTENT-OVERLAY';
|
|
66
|
+
this.responsive({
|
|
67
|
+
linkClass: true,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
onHandleClickEvent(ev) {
|
|
71
|
+
if (this.hasContentToActivate) {
|
|
72
|
+
ev.preventDefault();
|
|
73
|
+
// ev.stopPropagation();
|
|
74
|
+
this.activatedContent.dispatchEvent(new CustomEvent('open', { detail: this.activatedContent }));
|
|
75
|
+
setTimeout(() => {
|
|
76
|
+
this.activatedContent.scrollIntoView({ behavior: 'smooth' });
|
|
77
|
+
}, 0);
|
|
78
|
+
}
|
|
79
|
+
else if (this.href && this.href.length > 1 && this.href.substring(0, 1) === '#') {
|
|
80
|
+
const element = document.getElementById(this.href.substring(1));
|
|
81
|
+
ev.preventDefault();
|
|
82
|
+
if (element) {
|
|
83
|
+
ev.preventDefault();
|
|
84
|
+
// ev.stopPropagation();
|
|
85
|
+
element.dispatchEvent(new CustomEvent('open', { detail: element }));
|
|
86
|
+
// An overlay shows over the current view, so only scroll to targets that sit in the page.
|
|
87
|
+
if (element.tagName !== 'CONTENT-OVERLAY') {
|
|
88
|
+
setTimeout(() => {
|
|
89
|
+
element.scrollIntoView({ behavior: 'smooth' });
|
|
90
|
+
}, 0);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
// A link only activates on Enter. Once it acts as a button, keyboard users expect Space to work too.
|
|
96
|
+
onHandleKeyDown(ev) {
|
|
97
|
+
if (ev.key === ' ' && this.isButton) {
|
|
98
|
+
ev.preventDefault();
|
|
99
|
+
ev.currentTarget.click();
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
get isButton() {
|
|
103
|
+
return this.href === 'javascript:void(0);' || this.opensOverlay;
|
|
104
|
+
}
|
|
105
|
+
render() {
|
|
106
|
+
return (h(Host, { key: '54a809cf5de95cfc7245dc7534049c5f1097f068', class: this.classes, block: this.wrapsBlock ? 'true' : null }, h("a", { key: '5933780e81252a855c04a08e14b9f389f100129b', "aria-label": this.linkLabel, class: this.linkClass, role: this.isButton ? 'button' : '', "aria-haspopup": this.opensOverlay ? 'dialog' : null, onClick: ev => this.onHandleClickEvent(ev), onKeyDown: ev => this.onHandleKeyDown(ev), "aria-expanded": this.expanded, "aria-controls": this.controls, href: this.href, target: this.target }, !this.wrapsBlock ? (h("span", null, h("slot", { name: "content" }), h("slot", null))) : (h("div", { class: "content-button__clickable-content" }, h("slot", { name: "content" }), h("slot", null)))), h("slot", { key: 'f7e9f4f91aad259deef53f91f7cf44afd9ad2b8b', name: "activatedContent" })));
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
ContentButton.style = contentButtonCss();
|
|
110
|
+
|
|
111
|
+
export { ContentButton as content_button };
|