@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=p-b85cfa86.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,280 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Breakpoints, and how a responsive value is read against them.
|
|
3
|
+
*
|
|
4
|
+
* A responsive value is written in one of two ways:
|
|
5
|
+
*
|
|
6
|
+
* Named: columns="1|tablet=2|desktop=4" or by width: columns="1|640=2"
|
|
7
|
+
* The first value may leave out the name: it is the base, from 0. A value names the breakpoint,
|
|
8
|
+
* or the width in pixels, it starts at, and applies from that width up. A later value without
|
|
9
|
+
* a name starts at the next breakpoint above the one before it: 1|640=2|4 is 4 from tablet up.
|
|
10
|
+
*
|
|
11
|
+
* Positional: columns="1|2|4"
|
|
12
|
+
* One value per breakpoint, smallest first. A breakpoint without a value keeps the one before it.
|
|
13
|
+
*
|
|
14
|
+
* A site sets its own breakpoints, by name, before the components load or at any time after:
|
|
15
|
+
*
|
|
16
|
+
* window.$contentBlocks = { breakpoints: { tablet: 768, desktop: 1024 } };
|
|
17
|
+
* setBreakpoints({ tablet: 768, desktop: 1024 });
|
|
18
|
+
*
|
|
19
|
+
* State lives on window, not in this module: a page can load the library more than once (the lazy loader, the
|
|
20
|
+
* custom elements build and the npm entry each have their own copy of this file), and every copy must agree.
|
|
21
|
+
*/
|
|
22
|
+
// Used when the site sets none
|
|
23
|
+
const defaultBreakpoints = {
|
|
24
|
+
mobile: 0,
|
|
25
|
+
tablet: 768,
|
|
26
|
+
laptop: 1024,
|
|
27
|
+
desktop: 1366,
|
|
28
|
+
wide: 1440,
|
|
29
|
+
ultrawide: 1920,
|
|
30
|
+
};
|
|
31
|
+
// The event setBreakpoints sends, so every copy of the library works its values out again
|
|
32
|
+
const BREAKPOINTS_CHANGED = 'contentblocks:breakpoints';
|
|
33
|
+
// name=value, or width=value with the width in pixels (640= or 640px=). A name starts with a letter and a
|
|
34
|
+
// width is only digits, so values that contain = after other characters, such as an image URL with ?w=600,
|
|
35
|
+
// are never read as named.
|
|
36
|
+
const NAMED = /^([a-z][a-z0-9-]*|\d+(?:px)?)=(.*)$/;
|
|
37
|
+
// Widths written in values, such as 640 in 1|640=2, that are not breakpoints. The components watch them too,
|
|
38
|
+
// so a value switches when the screen crosses one.
|
|
39
|
+
const widths = new Set();
|
|
40
|
+
const widthListeners = new Set();
|
|
41
|
+
/** Widths written in values that are not breakpoints, and a way to hear of new ones. */
|
|
42
|
+
function getValueWidths() {
|
|
43
|
+
return [...widths];
|
|
44
|
+
}
|
|
45
|
+
function onValueWidth(listener) {
|
|
46
|
+
widthListeners.add(listener);
|
|
47
|
+
}
|
|
48
|
+
const warned = new Set();
|
|
49
|
+
function warn(message) {
|
|
50
|
+
if (warned.has(message))
|
|
51
|
+
return;
|
|
52
|
+
warned.add(message);
|
|
53
|
+
console.warn(`Content Blocks: ${message}`);
|
|
54
|
+
}
|
|
55
|
+
// Breakpoints from the site's setting, checked and sorted. Kept until the setting is replaced.
|
|
56
|
+
let cache;
|
|
57
|
+
function fromSetting(source) {
|
|
58
|
+
const list = [];
|
|
59
|
+
const entries = Array.isArray(source) ? source.map(width => ['', width]) : Object.entries(source);
|
|
60
|
+
for (const [name, width] of entries) {
|
|
61
|
+
if (name && !/^[a-z][a-z0-9-]*$/.test(name)) {
|
|
62
|
+
warn(`the breakpoint name "${name}" is left out. Use lowercase letters, numbers and hyphens, starting with a letter.`);
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
if (typeof width !== 'number' || !Number.isInteger(width) || width < 0) {
|
|
66
|
+
warn(`the breakpoint ${name ? `"${name}" ` : ''}is left out: its width must be a whole number of pixels, 0 or more.`);
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
const same = list.find(breakpoint => breakpoint.width === width);
|
|
70
|
+
if (same) {
|
|
71
|
+
warn(`"${name}" and "${same.name}" are both ${width}px. Only "${same.name}" is used.`);
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
list.push({ name, width });
|
|
75
|
+
}
|
|
76
|
+
list.sort((a, b) => a.width - b.width);
|
|
77
|
+
// Every screen is covered: below the smallest breakpoint is the base
|
|
78
|
+
if (list[0]?.width !== 0)
|
|
79
|
+
list.unshift({ name: '', width: 0 });
|
|
80
|
+
return list;
|
|
81
|
+
}
|
|
82
|
+
/** The breakpoints in use, smallest first. The first always starts at 0. */
|
|
83
|
+
function getBreakpoints() {
|
|
84
|
+
const config = typeof window === 'undefined' ? undefined : window.$contentBlocks;
|
|
85
|
+
const source = config?.breakpoints ?? config?.breakpointValues ?? defaultBreakpoints;
|
|
86
|
+
if (cache?.source !== source)
|
|
87
|
+
cache = { source, list: fromSetting(source) };
|
|
88
|
+
return cache.list;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Sets the site's breakpoints, by name and the width in pixels each starts at, replacing the defaults.
|
|
92
|
+
* Components already on the page work their values out again.
|
|
93
|
+
*/
|
|
94
|
+
function setBreakpoints(breakpoints) {
|
|
95
|
+
if (typeof window === 'undefined')
|
|
96
|
+
return;
|
|
97
|
+
window.$contentBlocks = { ...window.$contentBlocks, breakpoints };
|
|
98
|
+
window.dispatchEvent(new CustomEvent(BREAKPOINTS_CHANGED));
|
|
99
|
+
}
|
|
100
|
+
/** Each value in a responsive value and the screen width it starts at, smallest first. */
|
|
101
|
+
function parseResponsiveValue(value) {
|
|
102
|
+
const breakpoints = getBreakpoints();
|
|
103
|
+
const parts = value.split('|').map(part => part.trim());
|
|
104
|
+
// Positional: one value per breakpoint, a blank keeping the one before it
|
|
105
|
+
if (!parts.some(part => NAMED.test(part))) {
|
|
106
|
+
let last = parts[0];
|
|
107
|
+
return breakpoints.map((breakpoint, index) => {
|
|
108
|
+
last = parts[index] || last;
|
|
109
|
+
return { from: breakpoint.width, value: last };
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
// Named. The first value may leave out its name, as the base from 0. A later value without a name starts at
|
|
113
|
+
// the next breakpoint above the value before it, so 1|640=2|4 is 4 from tablet (768) up. A blank one moves on
|
|
114
|
+
// a breakpoint without a value of its own, as in positional values.
|
|
115
|
+
const found = new Map();
|
|
116
|
+
let previous = -1;
|
|
117
|
+
parts.forEach(part => {
|
|
118
|
+
const match = part.match(NAMED);
|
|
119
|
+
if (!match) {
|
|
120
|
+
const next = breakpoints.find(breakpoint => breakpoint.width > previous);
|
|
121
|
+
if (!next) {
|
|
122
|
+
if (part)
|
|
123
|
+
warn(`"${part}" in "${value}" is left out: there is no breakpoint after the value before it.`);
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
if (part)
|
|
127
|
+
found.set(next.width, part);
|
|
128
|
+
previous = next.width;
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
const [, name, named] = match;
|
|
132
|
+
if (/^\d/.test(name)) {
|
|
133
|
+
const width = parseInt(name, 10);
|
|
134
|
+
if (!breakpoints.some(breakpoint => breakpoint.width === width) && !widths.has(width)) {
|
|
135
|
+
widths.add(width);
|
|
136
|
+
widthListeners.forEach(listener => listener(width));
|
|
137
|
+
}
|
|
138
|
+
found.set(width, named.trim());
|
|
139
|
+
previous = width;
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
const breakpoint = breakpoints.find(candidate => candidate.name === name);
|
|
143
|
+
if (!breakpoint) {
|
|
144
|
+
const names = breakpoints.map(candidate => candidate.name).filter(Boolean);
|
|
145
|
+
warn(`"${part}" in "${value}" is left out: there is no breakpoint called "${name}". The breakpoints are ${names.join(', ') || 'unnamed'}.`);
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
// Written last wins, so a later value for the same breakpoint replaces an earlier one
|
|
149
|
+
found.set(breakpoint.width, named.trim());
|
|
150
|
+
previous = breakpoint.width;
|
|
151
|
+
});
|
|
152
|
+
return [...found.entries()].sort(([a], [b]) => a - b).map(([from, named]) => ({ from, value: named }));
|
|
153
|
+
}
|
|
154
|
+
/** A parsed value at a screen width: the value that starts at or below it, else the smallest one. */
|
|
155
|
+
function valueAt(parsed, width) {
|
|
156
|
+
let found = parsed[0]?.value ?? '';
|
|
157
|
+
for (const entry of parsed) {
|
|
158
|
+
if (entry.from <= width)
|
|
159
|
+
found = entry.value;
|
|
160
|
+
}
|
|
161
|
+
return found;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// The default breakpoints' names, labels and widths, smallest first
|
|
165
|
+
const breakpoints = ['mobile', 'tablet', 'laptop', 'desktop', 'wide', 'ultrawide'];
|
|
166
|
+
const breakpointLabels = ['Mobile', 'Tablet', 'Laptop', 'Desktop', 'Wide', 'Ultrawide'];
|
|
167
|
+
const breakpointValues = [0, 768, 1024, 1366, 1440, 1920];
|
|
168
|
+
/** The widths of the breakpoints in use, smallest first. */
|
|
169
|
+
function getBreakpointValues() {
|
|
170
|
+
return getBreakpoints().map(breakpoint => breakpoint.width);
|
|
171
|
+
}
|
|
172
|
+
/** A responsive value's value at each breakpoint in use, smallest first. Named values work too. */
|
|
173
|
+
function generateResponsiveValues(responsiveValue) {
|
|
174
|
+
if (!responsiveValue) {
|
|
175
|
+
return [];
|
|
176
|
+
}
|
|
177
|
+
const parsed = parseResponsiveValue(responsiveValue);
|
|
178
|
+
return getBreakpointValues().map(width => valueAt(parsed, width));
|
|
179
|
+
}
|
|
180
|
+
/** The index of the breakpoint the screen is in. */
|
|
181
|
+
function getCurrentBreakpointIndex() {
|
|
182
|
+
if (typeof window === 'undefined') {
|
|
183
|
+
return 0;
|
|
184
|
+
}
|
|
185
|
+
let activeBreakpointIndex = 0;
|
|
186
|
+
getBreakpointValues().forEach((width, index) => {
|
|
187
|
+
if (window.innerWidth >= width) {
|
|
188
|
+
activeBreakpointIndex = index;
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
return activeBreakpointIndex;
|
|
192
|
+
}
|
|
193
|
+
/** A responsive value's value on the current screen. */
|
|
194
|
+
function getCurrentValue(responsiveValue) {
|
|
195
|
+
if (!responsiveValue) {
|
|
196
|
+
return '';
|
|
197
|
+
}
|
|
198
|
+
const width = typeof window === 'undefined' ? 0 : window.innerWidth;
|
|
199
|
+
return valueAt(parseResponsiveValue(responsiveValue.toString()), width);
|
|
200
|
+
}
|
|
201
|
+
// Unitless numbers get the default unit, anything else passes through. Empty stays empty so the style is removed.
|
|
202
|
+
function withDefaultUnit(value, unit) {
|
|
203
|
+
return value && !isNaN(Number(value)) ? `${value}${unit}` : value;
|
|
204
|
+
}
|
|
205
|
+
/* Below Functions are Deprecated */
|
|
206
|
+
function getValueAtIndex(index, responsiveValue) {
|
|
207
|
+
const responsiveValues = generateResponsiveValues(responsiveValue.toString());
|
|
208
|
+
return responsiveValues[index].trim();
|
|
209
|
+
}
|
|
210
|
+
function getHydratedClassString(classString) {
|
|
211
|
+
const cleanedString = getCurrentValue(classString).trim();
|
|
212
|
+
if (cleanedString.includes('hydrated')) {
|
|
213
|
+
return cleanedString.trim();
|
|
214
|
+
}
|
|
215
|
+
if (cleanedString) {
|
|
216
|
+
return cleanedString.trim() + ' hydrated';
|
|
217
|
+
}
|
|
218
|
+
return 'hydrated';
|
|
219
|
+
}
|
|
220
|
+
function objectToCssString(object) {
|
|
221
|
+
let string = '';
|
|
222
|
+
for (const key in object) {
|
|
223
|
+
if (object[key].length > 0 && !['px', '%'].includes(object[key])) {
|
|
224
|
+
string += `${key}: ${object[key]};`;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return string;
|
|
228
|
+
}
|
|
229
|
+
// The breakpoint names before they were renamed, kept so the class names this makes do not change
|
|
230
|
+
const legacyBreakpointNames = ['mobile', 'tablet-portrait', 'tablet-landscape', 'tablet-pro', 'desktop-large', 'desktop-wide'];
|
|
231
|
+
function generateResponsiveClass(classPrefix, responsiveValue) {
|
|
232
|
+
let index = -1;
|
|
233
|
+
let classString = '';
|
|
234
|
+
responsiveValue.split('|').forEach(value => {
|
|
235
|
+
index++;
|
|
236
|
+
if (!value || value === 'false') {
|
|
237
|
+
return false;
|
|
238
|
+
}
|
|
239
|
+
classString += ` ${classPrefix}-${legacyBreakpointNames[index]}-${value}`;
|
|
240
|
+
});
|
|
241
|
+
return classString;
|
|
242
|
+
}
|
|
243
|
+
function insertCssIntoHead(document, fontCssUrl) {
|
|
244
|
+
let element = document.querySelector(`link[href="${fontCssUrl}"]`);
|
|
245
|
+
// Only inject the element if it's not yet present
|
|
246
|
+
if (!element) {
|
|
247
|
+
element = document.createElement('link');
|
|
248
|
+
element.setAttribute('rel', 'stylesheet');
|
|
249
|
+
element.setAttribute('href', fontCssUrl);
|
|
250
|
+
document.head.prepend(element);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
/** True when the visitor has asked their system for less motion. */
|
|
254
|
+
const prefersReducedMotion = () => typeof window !== 'undefined' && !!window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
255
|
+
|
|
256
|
+
var utils = /*#__PURE__*/Object.freeze({
|
|
257
|
+
__proto__: null,
|
|
258
|
+
breakpointLabels: breakpointLabels,
|
|
259
|
+
breakpointValues: breakpointValues,
|
|
260
|
+
breakpoints: breakpoints,
|
|
261
|
+
defaultBreakpoints: defaultBreakpoints,
|
|
262
|
+
generateResponsiveClass: generateResponsiveClass,
|
|
263
|
+
generateResponsiveValues: generateResponsiveValues,
|
|
264
|
+
getBreakpointValues: getBreakpointValues,
|
|
265
|
+
getBreakpoints: getBreakpoints,
|
|
266
|
+
getCurrentBreakpointIndex: getCurrentBreakpointIndex,
|
|
267
|
+
getCurrentValue: getCurrentValue,
|
|
268
|
+
getHydratedClassString: getHydratedClassString,
|
|
269
|
+
getValueAtIndex: getValueAtIndex,
|
|
270
|
+
getValueWidths: getValueWidths,
|
|
271
|
+
insertCssIntoHead: insertCssIntoHead,
|
|
272
|
+
objectToCssString: objectToCssString,
|
|
273
|
+
parseResponsiveValue: parseResponsiveValue,
|
|
274
|
+
prefersReducedMotion: prefersReducedMotion,
|
|
275
|
+
setBreakpoints: setBreakpoints,
|
|
276
|
+
valueAt: valueAt,
|
|
277
|
+
withDefaultUnit: withDefaultUnit
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
export { BREAKPOINTS_CHANGED as B, getBreakpoints as a, getCurrentBreakpointIndex as b, getValueWidths as c, getCurrentValue as g, onValueWidth as o, prefersReducedMotion as p, setBreakpoints as s, utils as u };
|