@content-blocks/js 0.7.6 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +111 -3
- package/THIRD-PARTY-NOTICES.md +21 -0
- package/dist/cjs/{app-globals-3a1e7e63.js → app-globals-V2Kpy_OQ.js} +0 -2
- package/dist/cjs/content-accordion.cjs.entry.js +87 -0
- package/dist/cjs/content-blocks.cjs.js +35 -11
- package/dist/cjs/content-button.cjs.entry.js +113 -0
- package/dist/cjs/content-carousel.cjs.entry.js +153 -47
- package/dist/cjs/content-grid-formatter.cjs.entry.js +102 -0
- package/dist/cjs/content-hero-block.cjs.entry.js +45 -0
- package/dist/cjs/content-image.cjs.entry.js +153 -0
- package/dist/cjs/content-line.cjs.entry.js +61 -0
- package/dist/cjs/content-navigation-block.cjs.entry.js +51 -34
- package/dist/cjs/content-overlay.cjs.entry.js +641 -0
- package/dist/cjs/content-spacer.cjs.entry.js +75 -0
- package/dist/cjs/content-split-block.cjs.entry.js +22 -19
- package/dist/cjs/content-tabs.cjs.entry.js +38 -21
- package/dist/cjs/content-text-block.cjs.entry.js +63 -0
- package/dist/cjs/content-tout-block.cjs.entry.js +34 -0
- package/dist/cjs/{content-accordion_11.cjs.entry.js → content-video.cjs.entry.js} +14560 -12927
- package/dist/cjs/{focus-trap.esm-7bc384a0.js → focus-trap.esm-ZwN-anf1.js} +484 -190
- package/dist/cjs/{index-2e0ce692.js → index-B1U6Gweq.js} +348 -246
- package/dist/cjs/index-ClnpH9XB.js +2170 -0
- package/dist/cjs/index-CyalvZJn.js +1719 -0
- package/dist/cjs/index-DUvWvBDN.js +290 -0
- package/dist/cjs/index-voGY4Tkl.js +4705 -0
- package/dist/cjs/index.cjs.js +2 -5
- package/dist/cjs/loader.cjs.js +3 -8
- package/dist/cjs/responsive-component-C5eJS82z.js +171 -0
- package/dist/cjs/responsive-component-DMdnQIPV.js +171 -0
- package/dist/cjs/swiper-KLYbvU1K.js +3931 -0
- package/dist/cjs/{swiper-8221f4e8.js → swiper-_Z8Y4IJI.js} +269 -236
- package/dist/cjs/utils-BCHaRGm_.js +462 -0
- package/dist/cjs/{utils-df044337.js → utils-C3gXIS2t.js} +51 -49
- package/dist/cjs/utils-DUvWvBDN.js +290 -0
- package/dist/collection/blocks/content-hero-block/content-hero-block.css +1 -1
- package/dist/collection/blocks/content-hero-block/content-hero-block.js +33 -48
- package/dist/collection/blocks/content-split-block/content-split-block.css +16 -5
- package/dist/collection/blocks/content-split-block/content-split-block.js +29 -48
- package/dist/collection/blocks/content-text-block/content-text-block.js +65 -59
- package/dist/collection/blocks/content-tout-block/content-tout-block.css +3 -0
- package/dist/collection/blocks/content-tout-block/content-tout-block.js +22 -47
- package/dist/collection/collection-manifest.json +8 -5
- package/dist/collection/components/content-accordion/content-accordion.css +20 -1
- package/dist/collection/components/content-accordion/content-accordion.js +67 -33
- package/dist/collection/components/content-accordion/libraries/w3_disclosure_button.js +0 -1
- package/dist/collection/components/content-carousel/content-carousel.css +60 -4
- package/dist/collection/components/content-carousel/content-carousel.js +294 -44
- package/dist/collection/components/content-navigation-block/content-navigation-block.css +15 -1
- package/dist/collection/components/content-navigation-block/content-navigation-block.js +86 -42
- package/dist/collection/components/content-overlay/content-overlay.css +36 -5
- package/dist/collection/components/content-overlay/content-overlay.js +181 -120
- package/dist/collection/components/content-overlay/libraries/aria-dialog.js +0 -1
- package/dist/collection/components/content-overlay/libraries/aria-utilities.js +0 -1
- package/dist/collection/components/content-tabs/content-tabs.js +7 -49
- package/dist/collection/components/content-tabs/libraries/w3_tabs.js +0 -1
- package/dist/collection/elements/content-button/content-button.css +8 -7
- package/dist/collection/elements/content-button/content-button.js +103 -84
- package/dist/collection/elements/content-image/content-image.css +3 -1
- package/dist/collection/elements/content-image/content-image.js +176 -95
- package/dist/collection/elements/content-line/content-line.js +63 -54
- package/dist/collection/elements/content-video/content-video.css +1 -1
- package/dist/collection/elements/content-video/content-video.js +165 -92
- package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.css +8 -2
- package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.js +167 -89
- package/dist/collection/formatters/content-spacer/content-spacer.js +86 -209
- package/dist/collection/global/content-blocks-reset.css +77 -0
- package/dist/collection/index.js +1 -1
- package/dist/collection/sass/_mixins.scss +21 -5
- package/dist/collection/sass/_variables.scss +15 -15
- package/dist/collection/setupFiles.js +0 -1
- package/dist/collection/site/site.js +67 -0
- package/dist/collection/utils/breakpoints.js +162 -0
- package/dist/collection/utils/responsive-component.js +249 -0
- package/dist/collection/utils/utils.js +32 -42
- package/dist/components/content-accordion.js +65 -44
- package/dist/components/content-button.js +89 -43
- package/dist/components/content-carousel.js +172 -55
- package/dist/components/content-grid-formatter.js +127 -3
- package/dist/components/content-hero-block.js +33 -26
- package/dist/components/content-image.js +127 -71
- package/dist/components/content-line.js +56 -35
- package/dist/components/content-navigation-block.js +62 -39
- package/dist/components/content-overlay.js +128 -67
- package/dist/components/content-spacer.js +70 -54
- package/dist/components/content-split-block.js +33 -32
- package/dist/components/content-tabs.js +46 -25
- package/dist/components/content-text-block.js +55 -35
- package/dist/components/content-tout-block.js +29 -27
- package/dist/components/content-video.js +14624 -11972
- package/dist/{esm/focus-trap.esm-8fb54175.js → components/focus-trap.esm.js} +484 -190
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +3 -3
- package/dist/components/{p-5a91aa1b.js → index2.js} +348 -246
- package/dist/components/p-BWRCeMvO.js +1 -0
- package/dist/components/p-CYF5GU_q.js +1 -0
- package/dist/components/p-DXUoPIwl.js +10 -0
- package/dist/components/p-D_Ll4QNj.js +1 -0
- package/dist/components/p-DhIoW7H3.js +1 -0
- package/dist/components/responsive-component.js +168 -0
- package/dist/components/{p-e5dc4ea4.js → swiper.js} +268 -235
- package/dist/components/utils.js +4969 -0
- package/dist/{esm/utils-1c9f0ec1.js → components/utils2.js} +51 -50
- package/dist/content-blocks/content-accordion.entry.js +85 -0
- package/dist/content-blocks/content-blocks.esm.js +47 -2
- package/dist/content-blocks/content-button.entry.js +111 -0
- package/dist/content-blocks/content-carousel.entry.js +188 -0
- package/dist/content-blocks/content-grid-formatter.entry.js +100 -0
- package/dist/content-blocks/content-hero-block.entry.js +43 -0
- package/dist/content-blocks/content-image.entry.js +151 -0
- package/dist/content-blocks/content-line.entry.js +59 -0
- package/dist/content-blocks/content-navigation-block.entry.js +105 -0
- package/dist/content-blocks/content-overlay.entry.js +639 -0
- package/dist/content-blocks/content-spacer.entry.js +73 -0
- package/dist/content-blocks/content-split-block.entry.js +34 -0
- package/dist/content-blocks/content-tabs.entry.js +245 -0
- package/dist/content-blocks/content-text-block.entry.js +61 -0
- package/dist/content-blocks/content-tout-block.entry.js +32 -0
- package/dist/{esm/content-accordion_11.entry.js → content-blocks/content-video.entry.js} +14535 -12890
- package/dist/{components/p-a2fedf8a.js → content-blocks/focus-trap.esm-DXUoPIwl.js} +484 -190
- package/dist/content-blocks/global/content-blocks-reset.css +77 -0
- package/dist/content-blocks/index-BFDJMblF.js +4690 -0
- package/dist/{esm/index-f45a9c45.js → content-blocks/index-P1YnSd-O.js} +348 -246
- package/dist/content-blocks/index.esm.js +1 -2
- package/dist/content-blocks/p-008457f0.entry.js +1 -0
- package/dist/content-blocks/p-052692f1.entry.js +1 -0
- package/dist/content-blocks/p-0f71bd32.entry.js +1 -0
- package/dist/content-blocks/p-1f154617.entry.js +1 -0
- package/dist/content-blocks/p-2554ebd8.entry.js +1 -0
- package/dist/content-blocks/p-4afd6511.entry.js +1 -0
- package/dist/content-blocks/p-78d5de9f.entry.js +1 -0
- package/dist/content-blocks/p-7bcf7e7e.entry.js +1 -0
- package/dist/content-blocks/p-9058031c.entry.js +1 -0
- package/dist/content-blocks/p-9c41ac23.entry.js +17 -0
- package/dist/content-blocks/p-CLwOzPEO.js +3 -0
- package/dist/content-blocks/p-CYF5GU_q.js +1 -0
- package/dist/content-blocks/p-CjR_4mPu.js +1 -0
- package/dist/content-blocks/p-DQuL1Twl.js +1 -0
- package/dist/content-blocks/p-DXUoPIwl.js +10 -0
- package/dist/content-blocks/p-D_Ll4QNj.js +1 -0
- package/dist/content-blocks/p-DhIoW7H3.js +1 -0
- package/dist/content-blocks/p-DzYwy_62.js +1 -0
- package/dist/content-blocks/p-b2e6358a.entry.js +1 -0
- package/dist/content-blocks/p-c783bc68.entry.js +1 -0
- package/dist/content-blocks/p-e3d81e15.entry.js +1 -0
- package/dist/content-blocks/p-f23b4aae.entry.js +1 -0
- package/dist/content-blocks/p-f75c9094.entry.js +1 -0
- package/dist/content-blocks/responsive-component-BsLrcKbS.js +169 -0
- package/dist/content-blocks/sass/_mixins.scss +21 -5
- package/dist/content-blocks/sass/_variables.scss +15 -15
- package/dist/{esm/swiper-e9621adb.js → content-blocks/swiper-nBv069TB.js} +268 -235
- package/dist/{components/p-b85cfa86.js → content-blocks/utils--SDsQnWS.js} +51 -50
- package/dist/content-blocks/utils-Bak__24s.js +280 -0
- package/dist/docs.d.ts +480 -0
- package/dist/docs.json +5312 -0
- package/dist/esm/{app-globals-0f993ce5.js → app-globals-DQuL1Twl.js} +0 -2
- package/dist/esm/content-accordion.entry.js +85 -0
- package/dist/esm/content-blocks.js +33 -8
- package/dist/esm/content-button.entry.js +111 -0
- package/dist/esm/content-carousel.entry.js +153 -45
- package/dist/esm/content-grid-formatter.entry.js +100 -0
- package/dist/esm/content-hero-block.entry.js +43 -0
- package/dist/esm/content-image.entry.js +151 -0
- package/dist/esm/content-line.entry.js +59 -0
- package/dist/esm/content-navigation-block.entry.js +51 -32
- package/dist/esm/content-overlay.entry.js +639 -0
- package/dist/esm/content-spacer.entry.js +73 -0
- package/dist/esm/content-split-block.entry.js +22 -17
- package/dist/esm/content-tabs.entry.js +38 -19
- package/dist/esm/content-text-block.entry.js +61 -0
- package/dist/esm/content-tout-block.entry.js +32 -0
- package/dist/esm/content-video.entry.js +72033 -0
- package/dist/esm/focus-trap.esm-DXUoPIwl.js +1801 -0
- package/dist/esm/index-BASCLGuP.js +1713 -0
- package/dist/esm/index-BFDJMblF.js +4690 -0
- package/dist/esm/index-CLwOzPEO.js +2161 -0
- package/dist/esm/index-CjR_4mPu.js +280 -0
- package/dist/esm/index-P1YnSd-O.js +5397 -0
- package/dist/esm/index.js +1 -3
- package/dist/esm/loader.js +3 -6
- package/dist/esm/responsive-component-BsLrcKbS.js +169 -0
- package/dist/esm/responsive-component-D7dJHMp0.js +169 -0
- package/dist/esm/swiper-CtypHPwF.js +3928 -0
- package/dist/esm/swiper-nBv069TB.js +3941 -0
- package/dist/esm/utils--SDsQnWS.js +460 -0
- package/dist/esm/utils-Bak__24s.js +280 -0
- package/dist/esm/utils-CYF5GU_q.js +438 -0
- package/dist/node_modules/video.js/dist/video-js.min.css +1 -0
- package/dist/test/axe.js +60 -0
- package/dist/types/Users/shahrukceo/Developer/content-blocks/packages/js/.stencil/test/axe.d.ts +16 -0
- package/dist/types/blocks/content-hero-block/content-hero-block.d.ts +7 -11
- package/dist/types/blocks/content-split-block/content-split-block.d.ts +5 -9
- package/dist/types/blocks/content-text-block/content-text-block.d.ts +4 -9
- package/dist/types/blocks/content-tout-block/content-tout-block.d.ts +5 -10
- package/dist/types/components/content-accordion/content-accordion.d.ts +4 -3
- package/dist/types/components/content-accordion/libraries/w3_disclosure_button.d.ts +0 -1
- package/dist/types/components/content-carousel/content-carousel.d.ts +44 -7
- package/dist/types/components/content-navigation-block/content-navigation-block.d.ts +14 -8
- package/dist/types/components/content-overlay/content-overlay.d.ts +15 -16
- package/dist/types/components/content-overlay/libraries/aria-dialog.d.ts +0 -1
- package/dist/types/components/content-overlay/libraries/aria-utilities.d.ts +0 -1
- package/dist/types/components/content-tabs/content-tabs.d.ts +4 -10
- package/dist/types/components/content-tabs/libraries/w3_tabs.d.ts +0 -1
- package/dist/types/components.d.ts +900 -196
- package/dist/types/elements/content-button/content-button.d.ts +8 -13
- package/dist/types/elements/content-image/content-image.d.ts +15 -9
- package/dist/types/elements/content-line/content-line.d.ts +5 -12
- package/dist/types/elements/content-video/content-video.d.ts +12 -11
- package/dist/types/formatters/content-grid-formatter/content-grid-formatter.d.ts +14 -9
- package/dist/types/formatters/content-spacer/content-spacer.d.ts +4 -36
- package/dist/types/index.d.ts +3 -1
- package/dist/types/setupFiles.d.ts +0 -1
- package/dist/types/stencil-public-runtime.d.ts +265 -60
- package/dist/types/typings.d.ts +10 -0
- package/dist/types/utils/breakpoints.d.ts +57 -0
- package/dist/types/utils/responsive-component.d.ts +49 -0
- package/dist/types/utils/utils.d.ts +11 -8
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +75 -65
- package/dist/cjs/BehaviorSubject-12116537.js +0 -655
- package/dist/cjs/BehaviorSubject-12116537.js.map +0 -1
- package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
- package/dist/cjs/content-accordion_11.cjs.entry.js.map +0 -1
- package/dist/cjs/content-blocks.cjs.js.map +0 -1
- package/dist/cjs/content-carousel.cjs.entry.js.map +0 -1
- package/dist/cjs/content-navigation-block.cjs.entry.js.map +0 -1
- package/dist/cjs/content-split-block.cjs.entry.js.map +0 -1
- package/dist/cjs/content-tabs.cjs.entry.js.map +0 -1
- package/dist/cjs/focus-trap.esm-7bc384a0.js.map +0 -1
- package/dist/cjs/index-2e0ce692.js.map +0 -1
- package/dist/cjs/index-8af2820a.js +0 -1650
- package/dist/cjs/index-8af2820a.js.map +0 -1
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/cjs/swiper-8221f4e8.js.map +0 -1
- package/dist/cjs/utils-df044337.js.map +0 -1
- package/dist/cjs/utils-f8ccab0a.js +0 -126
- package/dist/cjs/utils-f8ccab0a.js.map +0 -1
- package/dist/cjs/window-resize-service-65a5a370.js +0 -37
- package/dist/cjs/window-resize-service-65a5a370.js.map +0 -1
- package/dist/collection/blocks/content-hero-block/content-hero-block.js.map +0 -1
- package/dist/collection/blocks/content-split-block/content-split-block.js.map +0 -1
- package/dist/collection/blocks/content-text-block/content-text-block.js.map +0 -1
- package/dist/collection/blocks/content-tout-block/content-tout-block.js.map +0 -1
- package/dist/collection/components/content-accordion/content-accordion.js.map +0 -1
- package/dist/collection/components/content-accordion/libraries/w3_disclosure_button.js.map +0 -1
- package/dist/collection/components/content-carousel/content-carousel.js.map +0 -1
- package/dist/collection/components/content-navigation-block/content-navigation-block.js.map +0 -1
- package/dist/collection/components/content-overlay/content-overlay.js.map +0 -1
- package/dist/collection/components/content-overlay/libraries/aria-dialog.js.map +0 -1
- package/dist/collection/components/content-overlay/libraries/aria-utilities.js.map +0 -1
- package/dist/collection/components/content-tabs/content-tabs.js.map +0 -1
- package/dist/collection/components/content-tabs/libraries/w3_tabs.js.map +0 -1
- package/dist/collection/elements/content-button/content-button.js.map +0 -1
- package/dist/collection/elements/content-image/content-image.js.map +0 -1
- package/dist/collection/elements/content-line/content-line.js.map +0 -1
- package/dist/collection/elements/content-video/content-video.js.map +0 -1
- package/dist/collection/formatters/content-grid-formatter/content-grid-formatter.js.map +0 -1
- package/dist/collection/formatters/content-spacer/content-spacer.js.map +0 -1
- package/dist/collection/globalScript.js +0 -15
- package/dist/collection/globalScript.js.map +0 -1
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/services/content-events-service.js +0 -23
- package/dist/collection/services/content-events-service.js.map +0 -1
- package/dist/collection/services/window-resize-service.js +0 -31
- package/dist/collection/services/window-resize-service.js.map +0 -1
- package/dist/collection/setupFiles.js.map +0 -1
- package/dist/collection/stories/ContentHeroBlock.stories.js +0 -51
- package/dist/collection/stories/ContentHeroBlock.stories.js.map +0 -1
- package/dist/collection/stories/ContentNavigationBlock.stories.js +0 -33
- package/dist/collection/stories/ContentNavigationBlock.stories.js.map +0 -1
- package/dist/collection/stories/ContentSpacer.stories.js +0 -20
- package/dist/collection/stories/ContentSpacer.stories.js.map +0 -1
- package/dist/collection/stories/ContentTextBlock.stories.js +0 -17
- package/dist/collection/stories/ContentTextBlock.stories.js.map +0 -1
- package/dist/collection/stories/ContentToutBlock.stories.js +0 -17
- package/dist/collection/stories/ContentToutBlock.stories.js.map +0 -1
- package/dist/collection/stories/FullPageExample.stories.js +0 -432
- package/dist/collection/stories/FullPageExample.stories.js.map +0 -1
- package/dist/collection/stories/assets/accessibility.svg +0 -5
- package/dist/collection/stories/assets/discord.svg +0 -15
- package/dist/collection/stories/assets/github.svg +0 -3
- package/dist/collection/stories/assets/tutorials.svg +0 -12
- package/dist/collection/stories/assets/youtube.svg +0 -4
- package/dist/collection/utils/utils.js.map +0 -1
- package/dist/components/content-accordion.js.map +0 -1
- package/dist/components/content-button.js.map +0 -1
- package/dist/components/content-carousel.js.map +0 -1
- package/dist/components/content-grid-formatter.js.map +0 -1
- package/dist/components/content-hero-block.js.map +0 -1
- package/dist/components/content-image.js.map +0 -1
- package/dist/components/content-line.js.map +0 -1
- package/dist/components/content-navigation-block.js.map +0 -1
- package/dist/components/content-overlay.js.map +0 -1
- package/dist/components/content-spacer.js.map +0 -1
- package/dist/components/content-split-block.js.map +0 -1
- package/dist/components/content-tabs.js.map +0 -1
- package/dist/components/content-text-block.js.map +0 -1
- package/dist/components/content-tout-block.js.map +0 -1
- package/dist/components/content-video.js.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/components/p-26483b46.js +0 -35
- package/dist/components/p-26483b46.js.map +0 -1
- package/dist/components/p-5a91aa1b.js.map +0 -1
- package/dist/components/p-74be971f.js +0 -652
- package/dist/components/p-74be971f.js.map +0 -1
- package/dist/components/p-7a436263.js +0 -122
- package/dist/components/p-7a436263.js.map +0 -1
- package/dist/components/p-a2fedf8a.js.map +0 -1
- package/dist/components/p-b85cfa86.js.map +0 -1
- package/dist/components/p-e28db040.js +0 -1452
- package/dist/components/p-e28db040.js.map +0 -1
- package/dist/components/p-e5dc4ea4.js.map +0 -1
- package/dist/components/p-e9bce2ab.js +0 -88
- package/dist/components/p-e9bce2ab.js.map +0 -1
- package/dist/content-blocks/content-blocks.esm.js.map +0 -1
- package/dist/content-blocks/index.esm.js.map +0 -1
- package/dist/content-blocks/p-13c3cc4f.js +0 -3
- package/dist/content-blocks/p-13c3cc4f.js.map +0 -1
- package/dist/content-blocks/p-5422c25b.entry.js +0 -2
- package/dist/content-blocks/p-5422c25b.entry.js.map +0 -1
- package/dist/content-blocks/p-5a91aa1b.js +0 -2
- package/dist/content-blocks/p-5a91aa1b.js.map +0 -1
- package/dist/content-blocks/p-650d1757.js +0 -2
- package/dist/content-blocks/p-650d1757.js.map +0 -1
- package/dist/content-blocks/p-74be971f.js +0 -2
- package/dist/content-blocks/p-74be971f.js.map +0 -1
- package/dist/content-blocks/p-8deb755c.entry.js +0 -26
- package/dist/content-blocks/p-8deb755c.entry.js.map +0 -1
- package/dist/content-blocks/p-a2fedf8a.js +0 -10
- package/dist/content-blocks/p-a2fedf8a.js.map +0 -1
- package/dist/content-blocks/p-b305392e.entry.js +0 -2
- package/dist/content-blocks/p-b305392e.entry.js.map +0 -1
- package/dist/content-blocks/p-b85cfa86.js +0 -2
- package/dist/content-blocks/p-b85cfa86.js.map +0 -1
- package/dist/content-blocks/p-cc7397cf.js +0 -2
- package/dist/content-blocks/p-cc7397cf.js.map +0 -1
- package/dist/content-blocks/p-d62775d7.entry.js +0 -2
- package/dist/content-blocks/p-d62775d7.entry.js.map +0 -1
- package/dist/content-blocks/p-e1255160.js +0 -2
- package/dist/content-blocks/p-e1255160.js.map +0 -1
- package/dist/content-blocks/p-e5dc4ea4.js +0 -2
- package/dist/content-blocks/p-e5dc4ea4.js.map +0 -1
- package/dist/content-blocks/p-f73f934a.entry.js +0 -2
- package/dist/content-blocks/p-f73f934a.entry.js.map +0 -1
- package/dist/esm/BehaviorSubject-f7a12fd8.js +0 -652
- package/dist/esm/BehaviorSubject-f7a12fd8.js.map +0 -1
- package/dist/esm/app-globals-0f993ce5.js.map +0 -1
- package/dist/esm/content-accordion_11.entry.js.map +0 -1
- package/dist/esm/content-blocks.js.map +0 -1
- package/dist/esm/content-carousel.entry.js.map +0 -1
- package/dist/esm/content-navigation-block.entry.js.map +0 -1
- package/dist/esm/content-split-block.entry.js.map +0 -1
- package/dist/esm/content-tabs.entry.js.map +0 -1
- package/dist/esm/focus-trap.esm-8fb54175.js.map +0 -1
- package/dist/esm/index-ec24af7a.js +0 -1621
- package/dist/esm/index-ec24af7a.js.map +0 -1
- package/dist/esm/index-f45a9c45.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/loader.js.map +0 -1
- package/dist/esm/swiper-e9621adb.js.map +0 -1
- package/dist/esm/utils-1c9f0ec1.js.map +0 -1
- package/dist/esm/utils-9a901aa9.js +0 -122
- package/dist/esm/utils-9a901aa9.js.map +0 -1
- package/dist/esm/window-resize-service-354f2ac5.js +0 -35
- package/dist/esm/window-resize-service-354f2ac5.js.map +0 -1
- package/dist/types/globalScript.d.ts +0 -1
- package/dist/types/old-components.d.ts +0 -1239
- package/dist/types/services/content-events-service.d.ts +0 -11
- package/dist/types/services/window-resize-service.d.ts +0 -11
- package/dist/types/stories/ContentHeroBlock.stories.d.ts +0 -11
- package/dist/types/stories/ContentNavigationBlock.stories.d.ts +0 -9
- package/dist/types/stories/ContentSpacer.stories.d.ts +0 -15
- package/dist/types/stories/ContentTextBlock.stories.d.ts +0 -9
- package/dist/types/stories/ContentToutBlock.stories.d.ts +0 -9
- package/dist/types/stories/FullPageExample.stories.d.ts +0 -10
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as getDocument, t as setInnerHTML, k as createElement, c as elementChildren, s as setCSSProperty, g as getWindow, e as elementParents, u as elementOffset, o as now, n as nextTick, v as makeElementsArray, q as elementIndex, d as elementOuterSize, w as classesToTokens, i as getTranslate, x as elementTransitionEnd, y as isObject, z as getSlideTransformEl, A as getRotateFix } from './utils--SDsQnWS.js';
|
|
2
2
|
|
|
3
|
-
function Virtual(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} = _ref;
|
|
3
|
+
function Virtual({
|
|
4
|
+
swiper,
|
|
5
|
+
extendParams,
|
|
6
|
+
on,
|
|
7
|
+
emit
|
|
8
|
+
}) {
|
|
10
9
|
extendParams({
|
|
11
10
|
virtual: {
|
|
12
11
|
enabled: false,
|
|
13
12
|
slides: [],
|
|
14
13
|
cache: true,
|
|
14
|
+
slidesPerViewAutoSlideSize: 320,
|
|
15
15
|
renderSlide: null,
|
|
16
16
|
renderExternal: null,
|
|
17
17
|
renderExternalUpdate: true,
|
|
@@ -40,7 +40,7 @@ function Virtual(_ref) {
|
|
|
40
40
|
if (params.renderSlide) {
|
|
41
41
|
slideEl = params.renderSlide.call(swiper, slide, index);
|
|
42
42
|
if (typeof slideEl === 'string') {
|
|
43
|
-
tempDOM
|
|
43
|
+
setInnerHTML(tempDOM, slideEl);
|
|
44
44
|
slideEl = tempDOM.children[0];
|
|
45
45
|
}
|
|
46
46
|
} else if (swiper.isElement) {
|
|
@@ -50,18 +50,18 @@ function Virtual(_ref) {
|
|
|
50
50
|
}
|
|
51
51
|
slideEl.setAttribute('data-swiper-slide-index', index);
|
|
52
52
|
if (!params.renderSlide) {
|
|
53
|
-
slideEl
|
|
53
|
+
setInnerHTML(slideEl, slide);
|
|
54
54
|
}
|
|
55
55
|
if (params.cache) {
|
|
56
56
|
swiper.virtual.cache[index] = slideEl;
|
|
57
57
|
}
|
|
58
58
|
return slideEl;
|
|
59
59
|
}
|
|
60
|
-
function update(force, beforeInit) {
|
|
60
|
+
function update(force, beforeInit, forceActiveIndex) {
|
|
61
61
|
const {
|
|
62
|
-
slidesPerView,
|
|
63
62
|
slidesPerGroup,
|
|
64
63
|
centeredSlides,
|
|
64
|
+
slidesPerView,
|
|
65
65
|
loop: isLoop,
|
|
66
66
|
initialSlide
|
|
67
67
|
} = swiper.params;
|
|
@@ -70,7 +70,8 @@ function Virtual(_ref) {
|
|
|
70
70
|
}
|
|
71
71
|
const {
|
|
72
72
|
addSlidesBefore,
|
|
73
|
-
addSlidesAfter
|
|
73
|
+
addSlidesAfter,
|
|
74
|
+
slidesPerViewAutoSlideSize
|
|
74
75
|
} = swiper.params.virtual;
|
|
75
76
|
const {
|
|
76
77
|
from: previousFrom,
|
|
@@ -82,17 +83,31 @@ function Virtual(_ref) {
|
|
|
82
83
|
if (!swiper.params.cssMode) {
|
|
83
84
|
swiper.updateActiveIndex();
|
|
84
85
|
}
|
|
85
|
-
const activeIndex = swiper.activeIndex || 0;
|
|
86
|
+
const activeIndex = typeof forceActiveIndex === 'undefined' ? swiper.activeIndex || 0 : forceActiveIndex;
|
|
86
87
|
let offsetProp;
|
|
87
88
|
if (swiper.rtlTranslate) offsetProp = 'right';else offsetProp = swiper.isHorizontal() ? 'left' : 'top';
|
|
89
|
+
let slidesPerViewNumeric;
|
|
90
|
+
if (slidesPerView === 'auto') {
|
|
91
|
+
if (slidesPerViewAutoSlideSize) {
|
|
92
|
+
let swiperSize = swiper.size;
|
|
93
|
+
if (!swiperSize) {
|
|
94
|
+
swiperSize = swiper.isHorizontal() ? swiper.el.getBoundingClientRect().width : swiper.el.getBoundingClientRect().height;
|
|
95
|
+
}
|
|
96
|
+
slidesPerViewNumeric = Math.max(1, Math.ceil(swiperSize / slidesPerViewAutoSlideSize));
|
|
97
|
+
} else {
|
|
98
|
+
slidesPerViewNumeric = 1;
|
|
99
|
+
}
|
|
100
|
+
} else {
|
|
101
|
+
slidesPerViewNumeric = slidesPerView;
|
|
102
|
+
}
|
|
88
103
|
let slidesAfter;
|
|
89
104
|
let slidesBefore;
|
|
90
105
|
if (centeredSlides) {
|
|
91
|
-
slidesAfter = Math.floor(
|
|
92
|
-
slidesBefore = Math.floor(
|
|
106
|
+
slidesAfter = Math.floor(slidesPerViewNumeric / 2) + slidesPerGroup + addSlidesAfter;
|
|
107
|
+
slidesBefore = Math.floor(slidesPerViewNumeric / 2) + slidesPerGroup + addSlidesBefore;
|
|
93
108
|
} else {
|
|
94
|
-
slidesAfter =
|
|
95
|
-
slidesBefore = (isLoop ?
|
|
109
|
+
slidesAfter = slidesPerViewNumeric + (slidesPerGroup - 1) + addSlidesAfter;
|
|
110
|
+
slidesBefore = (isLoop ? slidesPerViewNumeric : slidesPerGroup) + addSlidesBefore;
|
|
96
111
|
}
|
|
97
112
|
let from = activeIndex - slidesBefore;
|
|
98
113
|
let to = activeIndex + slidesAfter;
|
|
@@ -346,13 +361,12 @@ function Virtual(_ref) {
|
|
|
346
361
|
}
|
|
347
362
|
|
|
348
363
|
/* eslint-disable consistent-return */
|
|
349
|
-
function Keyboard(
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
} = _ref;
|
|
364
|
+
function Keyboard({
|
|
365
|
+
swiper,
|
|
366
|
+
extendParams,
|
|
367
|
+
on,
|
|
368
|
+
emit
|
|
369
|
+
}) {
|
|
356
370
|
const document = getDocument();
|
|
357
371
|
const window = getWindow();
|
|
358
372
|
swiper.keyboard = {
|
|
@@ -362,7 +376,8 @@ function Keyboard(_ref) {
|
|
|
362
376
|
keyboard: {
|
|
363
377
|
enabled: false,
|
|
364
378
|
onlyInViewport: true,
|
|
365
|
-
pageUpDown: true
|
|
379
|
+
pageUpDown: true,
|
|
380
|
+
speed: undefined
|
|
366
381
|
}
|
|
367
382
|
});
|
|
368
383
|
function handle(event) {
|
|
@@ -390,7 +405,7 @@ function Keyboard(_ref) {
|
|
|
390
405
|
if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) {
|
|
391
406
|
return undefined;
|
|
392
407
|
}
|
|
393
|
-
if (document.activeElement && document.activeElement.nodeName && (document.activeElement.nodeName.toLowerCase() === 'input' || document.activeElement.nodeName.toLowerCase() === 'textarea')) {
|
|
408
|
+
if (document.activeElement && (document.activeElement.isContentEditable || document.activeElement.nodeName && (document.activeElement.nodeName.toLowerCase() === 'input' || document.activeElement.nodeName.toLowerCase() === 'textarea'))) {
|
|
394
409
|
return undefined;
|
|
395
410
|
}
|
|
396
411
|
if (swiper.params.keyboard.onlyInViewport && (isPageUp || isPageDown || isArrowLeft || isArrowRight || isArrowUp || isArrowDown)) {
|
|
@@ -416,18 +431,19 @@ function Keyboard(_ref) {
|
|
|
416
431
|
}
|
|
417
432
|
if (!inView) return undefined;
|
|
418
433
|
}
|
|
434
|
+
const speed = swiper.params.keyboard.speed;
|
|
419
435
|
if (swiper.isHorizontal()) {
|
|
420
436
|
if (isPageUp || isPageDown || isArrowLeft || isArrowRight) {
|
|
421
437
|
if (e.preventDefault) e.preventDefault();else e.returnValue = false;
|
|
422
438
|
}
|
|
423
|
-
if ((isPageDown || isArrowRight) && !rtl || (isPageUp || isArrowLeft) && rtl) swiper.slideNext();
|
|
424
|
-
if ((isPageUp || isArrowLeft) && !rtl || (isPageDown || isArrowRight) && rtl) swiper.slidePrev();
|
|
439
|
+
if ((isPageDown || isArrowRight) && !rtl || (isPageUp || isArrowLeft) && rtl) swiper.slideNext(speed);
|
|
440
|
+
if ((isPageUp || isArrowLeft) && !rtl || (isPageDown || isArrowRight) && rtl) swiper.slidePrev(speed);
|
|
425
441
|
} else {
|
|
426
442
|
if (isPageUp || isPageDown || isArrowUp || isArrowDown) {
|
|
427
443
|
if (e.preventDefault) e.preventDefault();else e.returnValue = false;
|
|
428
444
|
}
|
|
429
|
-
if (isPageDown || isArrowDown) swiper.slideNext();
|
|
430
|
-
if (isPageUp || isArrowUp) swiper.slidePrev();
|
|
445
|
+
if (isPageDown || isArrowDown) swiper.slideNext(speed);
|
|
446
|
+
if (isPageUp || isArrowUp) swiper.slidePrev(speed);
|
|
431
447
|
}
|
|
432
448
|
emit('keyPress', kc);
|
|
433
449
|
return undefined;
|
|
@@ -459,13 +475,12 @@ function Keyboard(_ref) {
|
|
|
459
475
|
}
|
|
460
476
|
|
|
461
477
|
/* eslint-disable consistent-return */
|
|
462
|
-
function Mousewheel(
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
} = _ref;
|
|
478
|
+
function Mousewheel({
|
|
479
|
+
swiper,
|
|
480
|
+
extendParams,
|
|
481
|
+
on,
|
|
482
|
+
emit
|
|
483
|
+
}) {
|
|
469
484
|
const window = getWindow();
|
|
470
485
|
extendParams({
|
|
471
486
|
mousewheel: {
|
|
@@ -792,7 +807,7 @@ function Mousewheel(_ref) {
|
|
|
792
807
|
if (!ignoreWheelEvents) emit('scroll', e);
|
|
793
808
|
|
|
794
809
|
// Stop autoplay
|
|
795
|
-
if (swiper.params.autoplay && swiper.params.
|
|
810
|
+
if (swiper.params.autoplay && swiper.params.autoplay.disableOnInteraction) swiper.autoplay.stop();
|
|
796
811
|
// Return page scroll on edge positions
|
|
797
812
|
if (params.releaseOnEdges && (position === swiper.minTranslate() || position === swiper.maxTranslate())) {
|
|
798
813
|
return true;
|
|
@@ -867,17 +882,18 @@ function createElementIfNotDefined(swiper, originalParams, params, checkProps) {
|
|
|
867
882
|
return params;
|
|
868
883
|
}
|
|
869
884
|
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
885
|
+
const arrowSvg = `<svg class="swiper-navigation-icon" width="11" height="20" viewBox="0 0 11 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.38296 20.0762C0.111788 19.805 0.111788 19.3654 0.38296 19.0942L9.19758 10.2796L0.38296 1.46497C0.111788 1.19379 0.111788 0.754138 0.38296 0.482966C0.654131 0.211794 1.09379 0.211794 1.36496 0.482966L10.4341 9.55214C10.8359 9.9539 10.8359 10.6053 10.4341 11.007L1.36496 20.0762C1.09379 20.3474 0.654131 20.3474 0.38296 20.0762Z" fill="currentColor"/></svg>`;
|
|
886
|
+
function Navigation({
|
|
887
|
+
swiper,
|
|
888
|
+
extendParams,
|
|
889
|
+
on,
|
|
890
|
+
emit
|
|
891
|
+
}) {
|
|
877
892
|
extendParams({
|
|
878
893
|
navigation: {
|
|
879
894
|
nextEl: null,
|
|
880
895
|
prevEl: null,
|
|
896
|
+
addIcons: true,
|
|
881
897
|
hideOnClick: false,
|
|
882
898
|
disabledClass: 'swiper-button-disabled',
|
|
883
899
|
hiddenClass: 'swiper-button-hidden',
|
|
@@ -887,12 +903,13 @@ function Navigation(_ref) {
|
|
|
887
903
|
});
|
|
888
904
|
swiper.navigation = {
|
|
889
905
|
nextEl: null,
|
|
890
|
-
prevEl: null
|
|
906
|
+
prevEl: null,
|
|
907
|
+
arrowSvg
|
|
891
908
|
};
|
|
892
909
|
function getEl(el) {
|
|
893
910
|
let res;
|
|
894
911
|
if (el && typeof el === 'string' && swiper.isElement) {
|
|
895
|
-
res = swiper.el.querySelector(el);
|
|
912
|
+
res = swiper.el.querySelector(el) || swiper.hostEl.querySelector(el);
|
|
896
913
|
if (res) return res;
|
|
897
914
|
}
|
|
898
915
|
if (el) {
|
|
@@ -963,6 +980,12 @@ function Navigation(_ref) {
|
|
|
963
980
|
prevEl = makeElementsArray(prevEl);
|
|
964
981
|
const initButton = (el, dir) => {
|
|
965
982
|
if (el) {
|
|
983
|
+
if (params.addIcons && el.matches('.swiper-button-next,.swiper-button-prev') && !el.querySelector('svg')) {
|
|
984
|
+
const tempEl = document.createElement('div');
|
|
985
|
+
setInnerHTML(tempEl, arrowSvg);
|
|
986
|
+
el.appendChild(tempEl.querySelector('svg'));
|
|
987
|
+
tempEl.remove();
|
|
988
|
+
}
|
|
966
989
|
el.addEventListener('click', dir === 'next' ? onNextClick : onPrevClick);
|
|
967
990
|
}
|
|
968
991
|
if (!swiper.enabled && el) {
|
|
@@ -1063,21 +1086,18 @@ function Navigation(_ref) {
|
|
|
1063
1086
|
});
|
|
1064
1087
|
}
|
|
1065
1088
|
|
|
1066
|
-
function classesToSelector(classes) {
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
}
|
|
1070
|
-
return `.${classes.trim().replace(/([\.:!+\/])/g, '\\$1') // eslint-disable-line
|
|
1089
|
+
function classesToSelector(classes = '') {
|
|
1090
|
+
// Escape all CSS selector special characters
|
|
1091
|
+
return `.${classes.trim().replace(/([\.:!+\/()[\]#>~*^$|=,'"@{}\\])/g, '\\$1') // eslint-disable-line
|
|
1071
1092
|
.replace(/ /g, '.')}`;
|
|
1072
1093
|
}
|
|
1073
1094
|
|
|
1074
|
-
function Pagination(
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
} = _ref;
|
|
1095
|
+
function Pagination({
|
|
1096
|
+
swiper,
|
|
1097
|
+
extendParams,
|
|
1098
|
+
on,
|
|
1099
|
+
emit
|
|
1100
|
+
}) {
|
|
1081
1101
|
const pfx = 'swiper-pagination';
|
|
1082
1102
|
extendParams({
|
|
1083
1103
|
pagination: {
|
|
@@ -1295,7 +1315,7 @@ function Pagination(_ref) {
|
|
|
1295
1315
|
});
|
|
1296
1316
|
}
|
|
1297
1317
|
if (params.type === 'custom' && params.renderCustom) {
|
|
1298
|
-
subEl
|
|
1318
|
+
setInnerHTML(subEl, params.renderCustom(swiper, current + 1, total));
|
|
1299
1319
|
if (subElIndex === 0) emit('paginationRender', subEl);
|
|
1300
1320
|
} else {
|
|
1301
1321
|
if (subElIndex === 0) emit('paginationRender', subEl);
|
|
@@ -1345,7 +1365,7 @@ function Pagination(_ref) {
|
|
|
1345
1365
|
swiper.pagination.bullets = [];
|
|
1346
1366
|
el.forEach(subEl => {
|
|
1347
1367
|
if (params.type !== 'custom') {
|
|
1348
|
-
subEl
|
|
1368
|
+
setInnerHTML(subEl, paginationHTML || '');
|
|
1349
1369
|
}
|
|
1350
1370
|
if (params.type === 'bullets') {
|
|
1351
1371
|
swiper.pagination.bullets.push(...subEl.querySelectorAll(classesToSelector(params.bulletClass)));
|
|
@@ -1376,10 +1396,10 @@ function Pagination(_ref) {
|
|
|
1376
1396
|
el = [...swiper.el.querySelectorAll(params.el)];
|
|
1377
1397
|
// check if it belongs to another nested Swiper
|
|
1378
1398
|
if (el.length > 1) {
|
|
1379
|
-
el = el.
|
|
1399
|
+
el = el.find(subEl => {
|
|
1380
1400
|
if (elementParents(subEl, '.swiper')[0] !== swiper.el) return false;
|
|
1381
1401
|
return true;
|
|
1382
|
-
})
|
|
1402
|
+
});
|
|
1383
1403
|
}
|
|
1384
1404
|
}
|
|
1385
1405
|
if (Array.isArray(el) && el.length === 1) el = el[0];
|
|
@@ -1526,13 +1546,12 @@ function Pagination(_ref) {
|
|
|
1526
1546
|
});
|
|
1527
1547
|
}
|
|
1528
1548
|
|
|
1529
|
-
function Scrollbar(
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
} = _ref;
|
|
1549
|
+
function Scrollbar({
|
|
1550
|
+
swiper,
|
|
1551
|
+
extendParams,
|
|
1552
|
+
on,
|
|
1553
|
+
emit
|
|
1554
|
+
}) {
|
|
1536
1555
|
const document = getDocument();
|
|
1537
1556
|
let isTouched = false;
|
|
1538
1557
|
let timeout = null;
|
|
@@ -1886,12 +1905,11 @@ function Scrollbar(_ref) {
|
|
|
1886
1905
|
});
|
|
1887
1906
|
}
|
|
1888
1907
|
|
|
1889
|
-
function Parallax(
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
} = _ref;
|
|
1908
|
+
function Parallax({
|
|
1909
|
+
swiper,
|
|
1910
|
+
extendParams,
|
|
1911
|
+
on
|
|
1912
|
+
}) {
|
|
1895
1913
|
extendParams({
|
|
1896
1914
|
parallax: {
|
|
1897
1915
|
enabled: false
|
|
@@ -1970,10 +1988,7 @@ function Parallax(_ref) {
|
|
|
1970
1988
|
});
|
|
1971
1989
|
});
|
|
1972
1990
|
};
|
|
1973
|
-
const setTransition =
|
|
1974
|
-
if (duration === void 0) {
|
|
1975
|
-
duration = swiper.params.speed;
|
|
1976
|
-
}
|
|
1991
|
+
const setTransition = (duration = swiper.params.speed) => {
|
|
1977
1992
|
const {
|
|
1978
1993
|
el,
|
|
1979
1994
|
hostEl
|
|
@@ -2007,13 +2022,12 @@ function Parallax(_ref) {
|
|
|
2007
2022
|
});
|
|
2008
2023
|
}
|
|
2009
2024
|
|
|
2010
|
-
function Zoom(
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
} = _ref;
|
|
2025
|
+
function Zoom({
|
|
2026
|
+
swiper,
|
|
2027
|
+
extendParams,
|
|
2028
|
+
on,
|
|
2029
|
+
emit
|
|
2030
|
+
}) {
|
|
2017
2031
|
const window = getWindow();
|
|
2018
2032
|
extendParams({
|
|
2019
2033
|
zoom: {
|
|
@@ -2021,6 +2035,7 @@ function Zoom(_ref) {
|
|
|
2021
2035
|
limitToOriginalSize: false,
|
|
2022
2036
|
maxRatio: 3,
|
|
2023
2037
|
minRatio: 1,
|
|
2038
|
+
panOnMouseMove: false,
|
|
2024
2039
|
toggle: true,
|
|
2025
2040
|
containerClass: 'swiper-zoom-container',
|
|
2026
2041
|
zoomedSlideClass: 'swiper-slide-zoomed'
|
|
@@ -2031,6 +2046,12 @@ function Zoom(_ref) {
|
|
|
2031
2046
|
};
|
|
2032
2047
|
let currentScale = 1;
|
|
2033
2048
|
let isScaling = false;
|
|
2049
|
+
let isPanningWithMouse = false;
|
|
2050
|
+
let mousePanStart = {
|
|
2051
|
+
x: 0,
|
|
2052
|
+
y: 0
|
|
2053
|
+
};
|
|
2054
|
+
const mousePanSensitivity = -3; // Negative to invert pan direction
|
|
2034
2055
|
let fakeGestureTouched;
|
|
2035
2056
|
let fakeGestureMoved;
|
|
2036
2057
|
const evCache = [];
|
|
@@ -2225,6 +2246,7 @@ function Zoom(_ref) {
|
|
|
2225
2246
|
clearTimeout(allowTouchMoveTimeout);
|
|
2226
2247
|
swiper.touchEventsData.preventTouchMoveFromPointerMove = true;
|
|
2227
2248
|
allowTouchMoveTimeout = setTimeout(() => {
|
|
2249
|
+
if (swiper.destroyed) return;
|
|
2228
2250
|
allowTouchMove();
|
|
2229
2251
|
});
|
|
2230
2252
|
}
|
|
@@ -2239,6 +2261,8 @@ function Zoom(_ref) {
|
|
|
2239
2261
|
image.touchesStart.y = event.pageY;
|
|
2240
2262
|
}
|
|
2241
2263
|
function onTouchMove(e) {
|
|
2264
|
+
const isMouseEvent = e.pointerType === 'mouse';
|
|
2265
|
+
const isMousePan = isMouseEvent && swiper.params.zoom.panOnMouseMove;
|
|
2242
2266
|
if (!eventWithinSlide(e) || !eventWithinZoomContainer(e)) {
|
|
2243
2267
|
return;
|
|
2244
2268
|
}
|
|
@@ -2247,6 +2271,11 @@ function Zoom(_ref) {
|
|
|
2247
2271
|
return;
|
|
2248
2272
|
}
|
|
2249
2273
|
if (!image.isTouched || !gesture.slideEl) {
|
|
2274
|
+
if (isMousePan) onMouseMove(e);
|
|
2275
|
+
return;
|
|
2276
|
+
}
|
|
2277
|
+
if (isMousePan) {
|
|
2278
|
+
onMouseMove(e);
|
|
2250
2279
|
return;
|
|
2251
2280
|
}
|
|
2252
2281
|
if (!image.isMoved) {
|
|
@@ -2324,6 +2353,7 @@ function Zoom(_ref) {
|
|
|
2324
2353
|
}
|
|
2325
2354
|
function onTouchEnd() {
|
|
2326
2355
|
const zoom = swiper.zoom;
|
|
2356
|
+
evCache.length = 0;
|
|
2327
2357
|
if (!gesture.imageEl) return;
|
|
2328
2358
|
if (!image.isTouched || !image.isMoved) {
|
|
2329
2359
|
image.isTouched = false;
|
|
@@ -2376,6 +2406,45 @@ function Zoom(_ref) {
|
|
|
2376
2406
|
gesture.originY = 0;
|
|
2377
2407
|
}
|
|
2378
2408
|
}
|
|
2409
|
+
function onMouseMove(e) {
|
|
2410
|
+
// Only pan if zoomed in and mouse panning is enabled
|
|
2411
|
+
if (currentScale <= 1 || !gesture.imageWrapEl) return;
|
|
2412
|
+
if (!eventWithinSlide(e) || !eventWithinZoomContainer(e)) return;
|
|
2413
|
+
const currentTransform = window.getComputedStyle(gesture.imageWrapEl).transform;
|
|
2414
|
+
const matrix = new window.DOMMatrix(currentTransform);
|
|
2415
|
+
if (!isPanningWithMouse) {
|
|
2416
|
+
isPanningWithMouse = true;
|
|
2417
|
+
mousePanStart.x = e.clientX;
|
|
2418
|
+
mousePanStart.y = e.clientY;
|
|
2419
|
+
image.startX = matrix.e;
|
|
2420
|
+
image.startY = matrix.f;
|
|
2421
|
+
image.width = gesture.imageEl.offsetWidth || gesture.imageEl.clientWidth;
|
|
2422
|
+
image.height = gesture.imageEl.offsetHeight || gesture.imageEl.clientHeight;
|
|
2423
|
+
gesture.slideWidth = gesture.slideEl.offsetWidth;
|
|
2424
|
+
gesture.slideHeight = gesture.slideEl.offsetHeight;
|
|
2425
|
+
return;
|
|
2426
|
+
}
|
|
2427
|
+
const deltaX = (e.clientX - mousePanStart.x) * mousePanSensitivity;
|
|
2428
|
+
const deltaY = (e.clientY - mousePanStart.y) * mousePanSensitivity;
|
|
2429
|
+
const scaledWidth = image.width * currentScale;
|
|
2430
|
+
const scaledHeight = image.height * currentScale;
|
|
2431
|
+
const slideWidth = gesture.slideWidth;
|
|
2432
|
+
const slideHeight = gesture.slideHeight;
|
|
2433
|
+
const minX = Math.min(slideWidth / 2 - scaledWidth / 2, 0);
|
|
2434
|
+
const maxX = -minX;
|
|
2435
|
+
const minY = Math.min(slideHeight / 2 - scaledHeight / 2, 0);
|
|
2436
|
+
const maxY = -minY;
|
|
2437
|
+
const newX = Math.max(Math.min(image.startX + deltaX, maxX), minX);
|
|
2438
|
+
const newY = Math.max(Math.min(image.startY + deltaY, maxY), minY);
|
|
2439
|
+
gesture.imageWrapEl.style.transitionDuration = '0ms';
|
|
2440
|
+
gesture.imageWrapEl.style.transform = `translate3d(${newX}px, ${newY}px, 0)`;
|
|
2441
|
+
mousePanStart.x = e.clientX;
|
|
2442
|
+
mousePanStart.y = e.clientY;
|
|
2443
|
+
image.startX = newX;
|
|
2444
|
+
image.startY = newY;
|
|
2445
|
+
image.currentX = newX;
|
|
2446
|
+
image.currentY = newY;
|
|
2447
|
+
}
|
|
2379
2448
|
function zoomIn(e) {
|
|
2380
2449
|
const zoom = swiper.zoom;
|
|
2381
2450
|
const params = swiper.params.zoom;
|
|
@@ -2402,6 +2471,7 @@ function Zoom(_ref) {
|
|
|
2402
2471
|
}
|
|
2403
2472
|
}
|
|
2404
2473
|
if (!gesture.imageEl || !gesture.imageWrapEl) return;
|
|
2474
|
+
gesture.maxRatio = getMaxRatio();
|
|
2405
2475
|
if (swiper.params.cssMode) {
|
|
2406
2476
|
swiper.wrapperEl.style.overflow = 'hidden';
|
|
2407
2477
|
swiper.wrapperEl.style.touchAction = 'none';
|
|
@@ -2432,6 +2502,7 @@ function Zoom(_ref) {
|
|
|
2432
2502
|
touchX = image.touchesStart.x;
|
|
2433
2503
|
touchY = image.touchesStart.y;
|
|
2434
2504
|
}
|
|
2505
|
+
const prevScale = currentScale;
|
|
2435
2506
|
const forceZoomRatio = typeof e === 'number' ? e : null;
|
|
2436
2507
|
if (currentScale === 1 && forceZoomRatio) {
|
|
2437
2508
|
touchX = undefined;
|
|
@@ -2457,8 +2528,13 @@ function Zoom(_ref) {
|
|
|
2457
2528
|
translateMinY = Math.min(slideHeight / 2 - scaledHeight / 2, 0);
|
|
2458
2529
|
translateMaxX = -translateMinX;
|
|
2459
2530
|
translateMaxY = -translateMinY;
|
|
2460
|
-
|
|
2461
|
-
|
|
2531
|
+
if (prevScale > 0 && forceZoomRatio && typeof image.currentX === 'number' && typeof image.currentY === 'number') {
|
|
2532
|
+
translateX = image.currentX * zoom.scale / prevScale;
|
|
2533
|
+
translateY = image.currentY * zoom.scale / prevScale;
|
|
2534
|
+
} else {
|
|
2535
|
+
translateX = diffX * zoom.scale;
|
|
2536
|
+
translateY = diffY * zoom.scale;
|
|
2537
|
+
}
|
|
2462
2538
|
if (translateX < translateMinX) {
|
|
2463
2539
|
translateX = translateMinX;
|
|
2464
2540
|
}
|
|
@@ -2479,6 +2555,8 @@ function Zoom(_ref) {
|
|
|
2479
2555
|
gesture.originX = 0;
|
|
2480
2556
|
gesture.originY = 0;
|
|
2481
2557
|
}
|
|
2558
|
+
image.currentX = translateX;
|
|
2559
|
+
image.currentY = translateY;
|
|
2482
2560
|
gesture.imageWrapEl.style.transitionDuration = '300ms';
|
|
2483
2561
|
gesture.imageWrapEl.style.transform = `translate3d(${translateX}px, ${translateY}px,0)`;
|
|
2484
2562
|
gesture.imageEl.style.transitionDuration = '300ms';
|
|
@@ -2505,12 +2583,15 @@ function Zoom(_ref) {
|
|
|
2505
2583
|
}
|
|
2506
2584
|
}
|
|
2507
2585
|
if (!gesture.imageEl || !gesture.imageWrapEl) return;
|
|
2586
|
+
gesture.maxRatio = getMaxRatio();
|
|
2508
2587
|
if (swiper.params.cssMode) {
|
|
2509
2588
|
swiper.wrapperEl.style.overflow = '';
|
|
2510
2589
|
swiper.wrapperEl.style.touchAction = '';
|
|
2511
2590
|
}
|
|
2512
2591
|
zoom.scale = 1;
|
|
2513
2592
|
currentScale = 1;
|
|
2593
|
+
image.currentX = undefined;
|
|
2594
|
+
image.currentY = undefined;
|
|
2514
2595
|
image.touchesStart.x = undefined;
|
|
2515
2596
|
image.touchesStart.y = undefined;
|
|
2516
2597
|
gesture.imageWrapEl.style.transitionDuration = '300ms';
|
|
@@ -2521,6 +2602,17 @@ function Zoom(_ref) {
|
|
|
2521
2602
|
gesture.slideEl = undefined;
|
|
2522
2603
|
gesture.originX = 0;
|
|
2523
2604
|
gesture.originY = 0;
|
|
2605
|
+
if (swiper.params.zoom.panOnMouseMove) {
|
|
2606
|
+
mousePanStart = {
|
|
2607
|
+
x: 0,
|
|
2608
|
+
y: 0
|
|
2609
|
+
};
|
|
2610
|
+
if (isPanningWithMouse) {
|
|
2611
|
+
isPanningWithMouse = false;
|
|
2612
|
+
image.startX = 0;
|
|
2613
|
+
image.startY = 0;
|
|
2614
|
+
}
|
|
2615
|
+
}
|
|
2524
2616
|
}
|
|
2525
2617
|
|
|
2526
2618
|
// Toggle Zoom
|
|
@@ -2629,12 +2721,11 @@ function Zoom(_ref) {
|
|
|
2629
2721
|
}
|
|
2630
2722
|
|
|
2631
2723
|
/* eslint no-bitwise: ["error", { "allow": [">>"] }] */
|
|
2632
|
-
function Controller(
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
} = _ref;
|
|
2724
|
+
function Controller({
|
|
2725
|
+
swiper,
|
|
2726
|
+
extendParams,
|
|
2727
|
+
on
|
|
2728
|
+
}) {
|
|
2638
2729
|
extendParams({
|
|
2639
2730
|
controller: {
|
|
2640
2731
|
control: undefined,
|
|
@@ -2816,12 +2907,11 @@ function Controller(_ref) {
|
|
|
2816
2907
|
});
|
|
2817
2908
|
}
|
|
2818
2909
|
|
|
2819
|
-
function A11y(
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
} = _ref;
|
|
2910
|
+
function A11y({
|
|
2911
|
+
swiper,
|
|
2912
|
+
extendParams,
|
|
2913
|
+
on
|
|
2914
|
+
}) {
|
|
2825
2915
|
extendParams({
|
|
2826
2916
|
a11y: {
|
|
2827
2917
|
enabled: true,
|
|
@@ -2834,10 +2924,12 @@ function A11y(_ref) {
|
|
|
2834
2924
|
slideLabelMessage: '{{index}} / {{slidesLength}}',
|
|
2835
2925
|
containerMessage: null,
|
|
2836
2926
|
containerRoleDescriptionMessage: null,
|
|
2927
|
+
containerRole: null,
|
|
2837
2928
|
itemRoleDescriptionMessage: null,
|
|
2838
2929
|
slideRole: 'group',
|
|
2839
2930
|
id: null,
|
|
2840
|
-
scrollOnFocus: true
|
|
2931
|
+
scrollOnFocus: true,
|
|
2932
|
+
wrapperLiveRegion: true
|
|
2841
2933
|
}
|
|
2842
2934
|
});
|
|
2843
2935
|
swiper.a11y = {
|
|
@@ -2850,13 +2942,9 @@ function A11y(_ref) {
|
|
|
2850
2942
|
function notify(message) {
|
|
2851
2943
|
const notification = liveRegion;
|
|
2852
2944
|
if (notification.length === 0) return;
|
|
2853
|
-
notification
|
|
2854
|
-
notification.innerHTML = message;
|
|
2945
|
+
setInnerHTML(notification, message);
|
|
2855
2946
|
}
|
|
2856
|
-
function getRandomNumber(size) {
|
|
2857
|
-
if (size === void 0) {
|
|
2858
|
-
size = 16;
|
|
2859
|
-
}
|
|
2947
|
+
function getRandomNumber(size = 16) {
|
|
2860
2948
|
const randomChar = () => Math.round(16 * Math.random()).toString(16);
|
|
2861
2949
|
return 'x'.repeat(size).replace(/x/g, randomChar);
|
|
2862
2950
|
}
|
|
@@ -2884,12 +2972,6 @@ function A11y(_ref) {
|
|
|
2884
2972
|
subEl.setAttribute('aria-roledescription', description);
|
|
2885
2973
|
});
|
|
2886
2974
|
}
|
|
2887
|
-
function addElControls(el, controls) {
|
|
2888
|
-
el = makeElementsArray(el);
|
|
2889
|
-
el.forEach(subEl => {
|
|
2890
|
-
subEl.setAttribute('aria-controls', controls);
|
|
2891
|
-
});
|
|
2892
|
-
}
|
|
2893
2975
|
function addElLabel(el, label) {
|
|
2894
2976
|
el = makeElementsArray(el);
|
|
2895
2977
|
el.forEach(subEl => {
|
|
@@ -2917,7 +2999,7 @@ function A11y(_ref) {
|
|
|
2917
2999
|
function enableEl(el) {
|
|
2918
3000
|
el = makeElementsArray(el);
|
|
2919
3001
|
el.forEach(subEl => {
|
|
2920
|
-
subEl.
|
|
3002
|
+
subEl.removeAttribute('aria-disabled');
|
|
2921
3003
|
});
|
|
2922
3004
|
}
|
|
2923
3005
|
function onEnterOrSpaceKey(e) {
|
|
@@ -3011,7 +3093,6 @@ function A11y(_ref) {
|
|
|
3011
3093
|
el.addEventListener('keydown', onEnterOrSpaceKey);
|
|
3012
3094
|
}
|
|
3013
3095
|
addElLabel(el, message);
|
|
3014
|
-
addElControls(el, wrapperId);
|
|
3015
3096
|
};
|
|
3016
3097
|
const handlePointerDown = e => {
|
|
3017
3098
|
if (focusTargetSlideEl && focusTargetSlideEl !== e.target && !focusTargetSlideEl.contains(e.target)) {
|
|
@@ -3038,7 +3119,8 @@ function A11y(_ref) {
|
|
|
3038
3119
|
const slideEl = e.target.closest(`.${swiper.params.slideClass}, swiper-slide`);
|
|
3039
3120
|
if (!slideEl || !swiper.slides.includes(slideEl)) return;
|
|
3040
3121
|
focusTargetSlideEl = slideEl;
|
|
3041
|
-
const
|
|
3122
|
+
const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
|
|
3123
|
+
const isActive = (isVirtual ? parseInt(slideEl.getAttribute('data-swiper-slide-index'), 10) : swiper.slides.indexOf(slideEl)) === swiper.activeIndex;
|
|
3042
3124
|
const isVisible = swiper.params.watchSlidesProgress && swiper.visibleSlides && swiper.visibleSlides.includes(slideEl);
|
|
3043
3125
|
if (isActive || isVisible) return;
|
|
3044
3126
|
if (e.sourceCapabilities && e.sourceCapabilities.firesTouchEvents) return;
|
|
@@ -3050,9 +3132,11 @@ function A11y(_ref) {
|
|
|
3050
3132
|
requestAnimationFrame(() => {
|
|
3051
3133
|
if (preventFocusHandler) return;
|
|
3052
3134
|
if (swiper.params.loop) {
|
|
3053
|
-
swiper.slideToLoop(parseInt(slideEl.getAttribute('data-swiper-slide-index')), 0);
|
|
3135
|
+
swiper.slideToLoop(swiper.getSlideIndexWhenGrid(parseInt(slideEl.getAttribute('data-swiper-slide-index'))), 0);
|
|
3136
|
+
} else if (isVirtual) {
|
|
3137
|
+
swiper.slideTo(swiper.getSlideIndexWhenGrid(parseInt(slideEl.getAttribute('data-swiper-slide-index'), 10)), 0);
|
|
3054
3138
|
} else {
|
|
3055
|
-
swiper.slideTo(swiper.slides.indexOf(slideEl), 0);
|
|
3139
|
+
swiper.slideTo(swiper.getSlideIndexWhenGrid(swiper.slides.indexOf(slideEl)), 0);
|
|
3056
3140
|
}
|
|
3057
3141
|
preventFocusHandler = false;
|
|
3058
3142
|
});
|
|
@@ -3086,13 +3170,18 @@ function A11y(_ref) {
|
|
|
3086
3170
|
if (params.containerMessage) {
|
|
3087
3171
|
addElLabel(containerEl, params.containerMessage);
|
|
3088
3172
|
}
|
|
3173
|
+
if (params.containerRole) {
|
|
3174
|
+
addElRole(containerEl, params.containerRole);
|
|
3175
|
+
}
|
|
3089
3176
|
|
|
3090
3177
|
// Wrapper
|
|
3091
3178
|
const wrapperEl = swiper.wrapperEl;
|
|
3092
3179
|
const wrapperId = params.id || wrapperEl.getAttribute('id') || `swiper-wrapper-${getRandomNumber(16)}`;
|
|
3093
|
-
const live = swiper.params.autoplay && swiper.params.autoplay.enabled ? 'off' : 'polite';
|
|
3094
3180
|
addElId(wrapperEl, wrapperId);
|
|
3095
|
-
|
|
3181
|
+
if (params.wrapperLiveRegion) {
|
|
3182
|
+
const live = swiper.params.autoplay && swiper.params.autoplay.enabled ? 'off' : 'polite';
|
|
3183
|
+
addElLive(wrapperEl, live);
|
|
3184
|
+
}
|
|
3096
3185
|
|
|
3097
3186
|
// Slide
|
|
3098
3187
|
initSlides();
|
|
@@ -3123,7 +3212,6 @@ function A11y(_ref) {
|
|
|
3123
3212
|
const document = getDocument();
|
|
3124
3213
|
document.addEventListener('visibilitychange', onVisibilityChange);
|
|
3125
3214
|
swiper.el.addEventListener('focus', handleFocus, true);
|
|
3126
|
-
swiper.el.addEventListener('focus', handleFocus, true);
|
|
3127
3215
|
swiper.el.addEventListener('pointerdown', handlePointerDown, true);
|
|
3128
3216
|
swiper.el.addEventListener('pointerup', handlePointerUp, true);
|
|
3129
3217
|
};
|
|
@@ -3185,12 +3273,11 @@ function A11y(_ref) {
|
|
|
3185
3273
|
});
|
|
3186
3274
|
}
|
|
3187
3275
|
|
|
3188
|
-
function History(
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
} = _ref;
|
|
3276
|
+
function History({
|
|
3277
|
+
swiper,
|
|
3278
|
+
extendParams,
|
|
3279
|
+
on
|
|
3280
|
+
}) {
|
|
3194
3281
|
extendParams({
|
|
3195
3282
|
history: {
|
|
3196
3283
|
enabled: false,
|
|
@@ -3324,13 +3411,12 @@ function History(_ref) {
|
|
|
3324
3411
|
});
|
|
3325
3412
|
}
|
|
3326
3413
|
|
|
3327
|
-
function HashNavigation(
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
} = _ref;
|
|
3414
|
+
function HashNavigation({
|
|
3415
|
+
swiper,
|
|
3416
|
+
extendParams,
|
|
3417
|
+
emit,
|
|
3418
|
+
on
|
|
3419
|
+
}) {
|
|
3334
3420
|
let initialized = false;
|
|
3335
3421
|
const document = getDocument();
|
|
3336
3422
|
const window = getWindow();
|
|
@@ -3341,7 +3427,7 @@ function HashNavigation(_ref) {
|
|
|
3341
3427
|
watchState: false,
|
|
3342
3428
|
getSlideIndex(_s, hash) {
|
|
3343
3429
|
if (swiper.virtual && swiper.params.virtual.enabled) {
|
|
3344
|
-
const slideWithHash = swiper.slides.
|
|
3430
|
+
const slideWithHash = swiper.slides.find(slideEl => slideEl.getAttribute('data-hash') === hash);
|
|
3345
3431
|
if (!slideWithHash) return 0;
|
|
3346
3432
|
const index = parseInt(slideWithHash.getAttribute('data-swiper-slide-index'), 10);
|
|
3347
3433
|
return index;
|
|
@@ -3415,14 +3501,13 @@ function HashNavigation(_ref) {
|
|
|
3415
3501
|
|
|
3416
3502
|
/* eslint no-underscore-dangle: "off" */
|
|
3417
3503
|
/* eslint no-use-before-define: "off" */
|
|
3418
|
-
function Autoplay(
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
} = _ref;
|
|
3504
|
+
function Autoplay({
|
|
3505
|
+
swiper,
|
|
3506
|
+
extendParams,
|
|
3507
|
+
on,
|
|
3508
|
+
emit,
|
|
3509
|
+
params
|
|
3510
|
+
}) {
|
|
3426
3511
|
swiper.autoplay = {
|
|
3427
3512
|
running: false,
|
|
3428
3513
|
paused: false,
|
|
@@ -3449,7 +3534,6 @@ function Autoplay(_ref) {
|
|
|
3449
3534
|
let isTouched;
|
|
3450
3535
|
let pausedByTouch;
|
|
3451
3536
|
let touchStartTimeout;
|
|
3452
|
-
let slideChanged;
|
|
3453
3537
|
let pausedByInteraction;
|
|
3454
3538
|
let pausedByPointerEnter;
|
|
3455
3539
|
function onTransitionEnd(e) {
|
|
@@ -3479,7 +3563,7 @@ function Autoplay(_ref) {
|
|
|
3479
3563
|
const getSlideDelay = () => {
|
|
3480
3564
|
let activeSlideEl;
|
|
3481
3565
|
if (swiper.virtual && swiper.params.virtual.enabled) {
|
|
3482
|
-
activeSlideEl = swiper.slides.
|
|
3566
|
+
activeSlideEl = swiper.slides.find(slideEl => slideEl.classList.contains('swiper-slide-active'));
|
|
3483
3567
|
} else {
|
|
3484
3568
|
activeSlideEl = swiper.slides[swiper.activeIndex];
|
|
3485
3569
|
}
|
|
@@ -3487,18 +3571,23 @@ function Autoplay(_ref) {
|
|
|
3487
3571
|
const currentSlideDelay = parseInt(activeSlideEl.getAttribute('data-swiper-autoplay'), 10);
|
|
3488
3572
|
return currentSlideDelay;
|
|
3489
3573
|
};
|
|
3574
|
+
const getTotalDelay = () => {
|
|
3575
|
+
let totalDelay = swiper.params.autoplay.delay;
|
|
3576
|
+
const currentSlideDelay = getSlideDelay();
|
|
3577
|
+
if (!Number.isNaN(currentSlideDelay) && currentSlideDelay > 0) {
|
|
3578
|
+
totalDelay = currentSlideDelay;
|
|
3579
|
+
}
|
|
3580
|
+
return totalDelay;
|
|
3581
|
+
};
|
|
3490
3582
|
const run = delayForce => {
|
|
3491
3583
|
if (swiper.destroyed || !swiper.autoplay.running) return;
|
|
3492
3584
|
cancelAnimationFrame(raf);
|
|
3493
3585
|
calcTimeLeft();
|
|
3494
|
-
let delay =
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
delay = currentSlideDelay;
|
|
3500
|
-
autoplayDelayTotal = currentSlideDelay;
|
|
3501
|
-
autoplayDelayCurrent = currentSlideDelay;
|
|
3586
|
+
let delay = delayForce;
|
|
3587
|
+
if (typeof delay === 'undefined') {
|
|
3588
|
+
delay = getTotalDelay();
|
|
3589
|
+
autoplayDelayTotal = delay;
|
|
3590
|
+
autoplayDelayCurrent = delay;
|
|
3502
3591
|
}
|
|
3503
3592
|
autoplayTimeLeft = delay;
|
|
3504
3593
|
const speed = swiper.params.speed;
|
|
@@ -3570,10 +3659,6 @@ function Autoplay(_ref) {
|
|
|
3570
3659
|
};
|
|
3571
3660
|
swiper.autoplay.paused = true;
|
|
3572
3661
|
if (reset) {
|
|
3573
|
-
if (slideChanged) {
|
|
3574
|
-
autoplayTimeLeft = swiper.params.autoplay.delay;
|
|
3575
|
-
}
|
|
3576
|
-
slideChanged = false;
|
|
3577
3662
|
proceed();
|
|
3578
3663
|
return;
|
|
3579
3664
|
}
|
|
@@ -3704,7 +3789,10 @@ function Autoplay(_ref) {
|
|
|
3704
3789
|
});
|
|
3705
3790
|
on('slideChange', () => {
|
|
3706
3791
|
if (swiper.destroyed || !swiper.autoplay.running) return;
|
|
3707
|
-
|
|
3792
|
+
if (swiper.autoplay.paused) {
|
|
3793
|
+
autoplayTimeLeft = getTotalDelay();
|
|
3794
|
+
autoplayDelayTotal = getTotalDelay();
|
|
3795
|
+
}
|
|
3708
3796
|
});
|
|
3709
3797
|
Object.assign(swiper.autoplay, {
|
|
3710
3798
|
start,
|
|
@@ -3714,12 +3802,11 @@ function Autoplay(_ref) {
|
|
|
3714
3802
|
});
|
|
3715
3803
|
}
|
|
3716
3804
|
|
|
3717
|
-
function Thumb(
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
} = _ref;
|
|
3805
|
+
function Thumb({
|
|
3806
|
+
swiper,
|
|
3807
|
+
extendParams,
|
|
3808
|
+
on
|
|
3809
|
+
}) {
|
|
3723
3810
|
extendParams({
|
|
3724
3811
|
thumbs: {
|
|
3725
3812
|
swiper: null,
|
|
@@ -3734,6 +3821,11 @@ function Thumb(_ref) {
|
|
|
3734
3821
|
swiper.thumbs = {
|
|
3735
3822
|
swiper: null
|
|
3736
3823
|
};
|
|
3824
|
+
function isVirtualEnabled() {
|
|
3825
|
+
const thumbsSwiper = swiper.thumbs.swiper;
|
|
3826
|
+
if (!thumbsSwiper || thumbsSwiper.destroyed) return false;
|
|
3827
|
+
return thumbsSwiper.params.virtual && thumbsSwiper.params.virtual.enabled;
|
|
3828
|
+
}
|
|
3737
3829
|
function onThumbClick() {
|
|
3738
3830
|
const thumbsSwiper = swiper.thumbs.swiper;
|
|
3739
3831
|
if (!thumbsSwiper || thumbsSwiper.destroyed) return;
|
|
@@ -3761,6 +3853,10 @@ function Thumb(_ref) {
|
|
|
3761
3853
|
initialized = true;
|
|
3762
3854
|
const SwiperClass = swiper.constructor;
|
|
3763
3855
|
if (thumbsParams.swiper instanceof SwiperClass) {
|
|
3856
|
+
if (thumbsParams.swiper.destroyed) {
|
|
3857
|
+
initialized = false;
|
|
3858
|
+
return false;
|
|
3859
|
+
}
|
|
3764
3860
|
swiper.thumbs.swiper = thumbsParams.swiper;
|
|
3765
3861
|
Object.assign(swiper.thumbs.swiper.originalParams, {
|
|
3766
3862
|
watchSlidesProgress: true,
|
|
@@ -3782,12 +3878,18 @@ function Thumb(_ref) {
|
|
|
3782
3878
|
}
|
|
3783
3879
|
swiper.thumbs.swiper.el.classList.add(swiper.params.thumbs.thumbsContainerClass);
|
|
3784
3880
|
swiper.thumbs.swiper.on('tap', onThumbClick);
|
|
3881
|
+
if (isVirtualEnabled()) {
|
|
3882
|
+
swiper.thumbs.swiper.on('virtualUpdate', () => {
|
|
3883
|
+
update(false, {
|
|
3884
|
+
autoScroll: false
|
|
3885
|
+
});
|
|
3886
|
+
});
|
|
3887
|
+
}
|
|
3785
3888
|
return true;
|
|
3786
3889
|
}
|
|
3787
|
-
function update(initial) {
|
|
3890
|
+
function update(initial, p) {
|
|
3788
3891
|
const thumbsSwiper = swiper.thumbs.swiper;
|
|
3789
3892
|
if (!thumbsSwiper || thumbsSwiper.destroyed) return;
|
|
3790
|
-
const slidesPerView = thumbsSwiper.params.slidesPerView === 'auto' ? thumbsSwiper.slidesPerViewDynamic() : thumbsSwiper.params.slidesPerView;
|
|
3791
3893
|
|
|
3792
3894
|
// Activate thumbs
|
|
3793
3895
|
let thumbsToActivate = 1;
|
|
@@ -3800,7 +3902,7 @@ function Thumb(_ref) {
|
|
|
3800
3902
|
}
|
|
3801
3903
|
thumbsToActivate = Math.floor(thumbsToActivate);
|
|
3802
3904
|
thumbsSwiper.slides.forEach(slideEl => slideEl.classList.remove(thumbActiveClass));
|
|
3803
|
-
if (thumbsSwiper.params.loop ||
|
|
3905
|
+
if (thumbsSwiper.params.loop || isVirtualEnabled()) {
|
|
3804
3906
|
for (let i = 0; i < thumbsToActivate; i += 1) {
|
|
3805
3907
|
elementChildren(thumbsSwiper.slidesEl, `[data-swiper-slide-index="${swiper.realIndex + i}"]`).forEach(slideEl => {
|
|
3806
3908
|
slideEl.classList.add(thumbActiveClass);
|
|
@@ -3813,6 +3915,14 @@ function Thumb(_ref) {
|
|
|
3813
3915
|
}
|
|
3814
3916
|
}
|
|
3815
3917
|
}
|
|
3918
|
+
if (p?.autoScroll ?? true) {
|
|
3919
|
+
autoScroll(initial ? 0 : undefined);
|
|
3920
|
+
}
|
|
3921
|
+
}
|
|
3922
|
+
function autoScroll(slideSpeed) {
|
|
3923
|
+
const thumbsSwiper = swiper.thumbs.swiper;
|
|
3924
|
+
if (!thumbsSwiper || thumbsSwiper.destroyed) return;
|
|
3925
|
+
const slidesPerView = thumbsSwiper.params.slidesPerView === 'auto' ? thumbsSwiper.slidesPerViewDynamic() : thumbsSwiper.params.slidesPerView;
|
|
3816
3926
|
const autoScrollOffset = swiper.params.thumbs.autoScrollOffset;
|
|
3817
3927
|
const useOffset = autoScrollOffset && !thumbsSwiper.params.loop;
|
|
3818
3928
|
if (swiper.realIndex !== thumbsSwiper.realIndex || useOffset) {
|
|
@@ -3820,7 +3930,7 @@ function Thumb(_ref) {
|
|
|
3820
3930
|
let newThumbsIndex;
|
|
3821
3931
|
let direction;
|
|
3822
3932
|
if (thumbsSwiper.params.loop) {
|
|
3823
|
-
const newThumbsSlide = thumbsSwiper.slides.
|
|
3933
|
+
const newThumbsSlide = thumbsSwiper.slides.find(slideEl => slideEl.getAttribute('data-swiper-slide-index') === `${swiper.realIndex}`);
|
|
3824
3934
|
newThumbsIndex = thumbsSwiper.slides.indexOf(newThumbsSlide);
|
|
3825
3935
|
direction = swiper.activeIndex > swiper.previousIndex ? 'next' : 'prev';
|
|
3826
3936
|
} else {
|
|
@@ -3837,8 +3947,8 @@ function Thumb(_ref) {
|
|
|
3837
3947
|
} else {
|
|
3838
3948
|
newThumbsIndex = newThumbsIndex + Math.floor(slidesPerView / 2) - 1;
|
|
3839
3949
|
}
|
|
3840
|
-
}
|
|
3841
|
-
thumbsSwiper.slideTo(newThumbsIndex,
|
|
3950
|
+
} else if (newThumbsIndex > currentThumbsIndex && thumbsSwiper.params.slidesPerGroup === 1) ;
|
|
3951
|
+
thumbsSwiper.slideTo(newThumbsIndex, slideSpeed);
|
|
3842
3952
|
}
|
|
3843
3953
|
}
|
|
3844
3954
|
}
|
|
@@ -3903,13 +4013,12 @@ function Thumb(_ref) {
|
|
|
3903
4013
|
});
|
|
3904
4014
|
}
|
|
3905
4015
|
|
|
3906
|
-
function freeMode(
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
} = _ref;
|
|
4016
|
+
function freeMode({
|
|
4017
|
+
swiper,
|
|
4018
|
+
extendParams,
|
|
4019
|
+
emit,
|
|
4020
|
+
once
|
|
4021
|
+
}) {
|
|
3913
4022
|
extendParams({
|
|
3914
4023
|
freeMode: {
|
|
3915
4024
|
enabled: false,
|
|
@@ -3950,10 +4059,9 @@ function freeMode(_ref) {
|
|
|
3950
4059
|
time: now()
|
|
3951
4060
|
});
|
|
3952
4061
|
}
|
|
3953
|
-
function onTouchEnd(
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
} = _ref2;
|
|
4062
|
+
function onTouchEnd({
|
|
4063
|
+
currentPos
|
|
4064
|
+
}) {
|
|
3957
4065
|
if (swiper.params.cssMode) return;
|
|
3958
4066
|
const {
|
|
3959
4067
|
params,
|
|
@@ -4137,12 +4245,11 @@ function freeMode(_ref) {
|
|
|
4137
4245
|
});
|
|
4138
4246
|
}
|
|
4139
4247
|
|
|
4140
|
-
function Grid(
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
} = _ref;
|
|
4248
|
+
function Grid({
|
|
4249
|
+
swiper,
|
|
4250
|
+
extendParams,
|
|
4251
|
+
on
|
|
4252
|
+
}) {
|
|
4146
4253
|
extendParams({
|
|
4147
4254
|
grid: {
|
|
4148
4255
|
rows: 1,
|
|
@@ -4178,7 +4285,7 @@ function Grid(_ref) {
|
|
|
4178
4285
|
slidesNumberEvenToRows = Math.ceil(slidesLength / rows) * rows;
|
|
4179
4286
|
}
|
|
4180
4287
|
if (slidesPerView !== 'auto' && fill === 'row') {
|
|
4181
|
-
slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, slidesPerView * rows);
|
|
4288
|
+
slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, Math.floor(slidesPerView) * rows);
|
|
4182
4289
|
}
|
|
4183
4290
|
slidesPerRow = slidesNumberEvenToRows / rows;
|
|
4184
4291
|
};
|
|
@@ -4303,9 +4410,9 @@ function appendSlide(slides) {
|
|
|
4303
4410
|
const appendElement = slideEl => {
|
|
4304
4411
|
if (typeof slideEl === 'string') {
|
|
4305
4412
|
const tempDOM = document.createElement('div');
|
|
4306
|
-
tempDOM
|
|
4413
|
+
setInnerHTML(tempDOM, slideEl);
|
|
4307
4414
|
slidesEl.append(tempDOM.children[0]);
|
|
4308
|
-
tempDOM
|
|
4415
|
+
setInnerHTML(tempDOM, '');
|
|
4309
4416
|
} else {
|
|
4310
4417
|
slidesEl.append(slideEl);
|
|
4311
4418
|
}
|
|
@@ -4340,9 +4447,9 @@ function prependSlide(slides) {
|
|
|
4340
4447
|
const prependElement = slideEl => {
|
|
4341
4448
|
if (typeof slideEl === 'string') {
|
|
4342
4449
|
const tempDOM = document.createElement('div');
|
|
4343
|
-
tempDOM
|
|
4450
|
+
setInnerHTML(tempDOM, slideEl);
|
|
4344
4451
|
slidesEl.prepend(tempDOM.children[0]);
|
|
4345
|
-
tempDOM
|
|
4452
|
+
setInnerHTML(tempDOM, '');
|
|
4346
4453
|
} else {
|
|
4347
4454
|
slidesEl.prepend(slideEl);
|
|
4348
4455
|
}
|
|
@@ -4468,10 +4575,9 @@ function removeAllSlides() {
|
|
|
4468
4575
|
swiper.removeSlide(slidesIndexes);
|
|
4469
4576
|
}
|
|
4470
4577
|
|
|
4471
|
-
function Manipulation(
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
} = _ref;
|
|
4578
|
+
function Manipulation({
|
|
4579
|
+
swiper
|
|
4580
|
+
}) {
|
|
4475
4581
|
Object.assign(swiper, {
|
|
4476
4582
|
appendSlide: appendSlide.bind(swiper),
|
|
4477
4583
|
prependSlide: prependSlide.bind(swiper),
|
|
@@ -4503,7 +4609,7 @@ function effectInit(params) {
|
|
|
4503
4609
|
Object.assign(swiper.params, overwriteParamsResult);
|
|
4504
4610
|
Object.assign(swiper.originalParams, overwriteParamsResult);
|
|
4505
4611
|
});
|
|
4506
|
-
on('setTranslate', () => {
|
|
4612
|
+
on('setTranslate _virtualUpdated', () => {
|
|
4507
4613
|
if (swiper.params.effect !== effect) return;
|
|
4508
4614
|
setTranslate();
|
|
4509
4615
|
});
|
|
@@ -4547,20 +4653,19 @@ function effectTarget(effectParams, slideEl) {
|
|
|
4547
4653
|
return transformEl;
|
|
4548
4654
|
}
|
|
4549
4655
|
|
|
4550
|
-
function effectVirtualTransitionEnd(
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
} = _ref;
|
|
4656
|
+
function effectVirtualTransitionEnd({
|
|
4657
|
+
swiper,
|
|
4658
|
+
duration,
|
|
4659
|
+
transformElements,
|
|
4660
|
+
allSlides
|
|
4661
|
+
}) {
|
|
4557
4662
|
const {
|
|
4558
4663
|
activeIndex
|
|
4559
4664
|
} = swiper;
|
|
4560
4665
|
const getSlide = el => {
|
|
4561
4666
|
if (!el.parentElement) {
|
|
4562
4667
|
// assume shadow root
|
|
4563
|
-
const slide = swiper.slides.
|
|
4668
|
+
const slide = swiper.slides.find(slideEl => slideEl.shadowRoot && slideEl.shadowRoot === el.parentNode);
|
|
4564
4669
|
return slide;
|
|
4565
4670
|
}
|
|
4566
4671
|
return el.parentElement;
|
|
@@ -4592,12 +4697,11 @@ function effectVirtualTransitionEnd(_ref) {
|
|
|
4592
4697
|
}
|
|
4593
4698
|
}
|
|
4594
4699
|
|
|
4595
|
-
function EffectFade(
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
} = _ref;
|
|
4700
|
+
function EffectFade({
|
|
4701
|
+
swiper,
|
|
4702
|
+
extendParams,
|
|
4703
|
+
on
|
|
4704
|
+
}) {
|
|
4601
4705
|
extendParams({
|
|
4602
4706
|
fadeEffect: {
|
|
4603
4707
|
crossFade: false
|
|
@@ -4652,12 +4756,11 @@ function EffectFade(_ref) {
|
|
|
4652
4756
|
});
|
|
4653
4757
|
}
|
|
4654
4758
|
|
|
4655
|
-
function EffectCube(
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
} = _ref;
|
|
4759
|
+
function EffectCube({
|
|
4760
|
+
swiper,
|
|
4761
|
+
extendParams,
|
|
4762
|
+
on
|
|
4763
|
+
}) {
|
|
4661
4764
|
extendParams({
|
|
4662
4765
|
cubeEffect: {
|
|
4663
4766
|
slideShadows: true,
|
|
@@ -4833,12 +4936,11 @@ function createShadow(suffix, slideEl, side) {
|
|
|
4833
4936
|
return shadowEl;
|
|
4834
4937
|
}
|
|
4835
4938
|
|
|
4836
|
-
function EffectFlip(
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
} = _ref;
|
|
4939
|
+
function EffectFlip({
|
|
4940
|
+
swiper,
|
|
4941
|
+
extendParams,
|
|
4942
|
+
on
|
|
4943
|
+
}) {
|
|
4842
4944
|
extendParams({
|
|
4843
4945
|
flipEffect: {
|
|
4844
4946
|
slideShadows: true,
|
|
@@ -4858,6 +4960,8 @@ function EffectFlip(_ref) {
|
|
|
4858
4960
|
if (shadowAfter) shadowAfter.style.opacity = Math.max(progress, 0);
|
|
4859
4961
|
};
|
|
4860
4962
|
const recreateShadows = () => {
|
|
4963
|
+
// Set shadows
|
|
4964
|
+
swiper.params.flipEffect;
|
|
4861
4965
|
swiper.slides.forEach(slideEl => {
|
|
4862
4966
|
let progress = slideEl.progress;
|
|
4863
4967
|
if (swiper.params.flipEffect.limitRotation) {
|
|
@@ -4935,12 +5039,11 @@ function EffectFlip(_ref) {
|
|
|
4935
5039
|
});
|
|
4936
5040
|
}
|
|
4937
5041
|
|
|
4938
|
-
function EffectCoverflow(
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
} = _ref;
|
|
5042
|
+
function EffectCoverflow({
|
|
5043
|
+
swiper,
|
|
5044
|
+
extendParams,
|
|
5045
|
+
on
|
|
5046
|
+
}) {
|
|
4944
5047
|
extendParams({
|
|
4945
5048
|
coverflowEffect: {
|
|
4946
5049
|
rotate: 50,
|
|
@@ -5033,12 +5136,11 @@ function EffectCoverflow(_ref) {
|
|
|
5033
5136
|
});
|
|
5034
5137
|
}
|
|
5035
5138
|
|
|
5036
|
-
function EffectCreative(
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
} = _ref;
|
|
5139
|
+
function EffectCreative({
|
|
5140
|
+
swiper,
|
|
5141
|
+
extendParams,
|
|
5142
|
+
on
|
|
5143
|
+
}) {
|
|
5042
5144
|
extendParams({
|
|
5043
5145
|
creativeEffect: {
|
|
5044
5146
|
limitProgress: 1,
|
|
@@ -5172,12 +5274,11 @@ function EffectCreative(_ref) {
|
|
|
5172
5274
|
});
|
|
5173
5275
|
}
|
|
5174
5276
|
|
|
5175
|
-
function EffectCards(
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
} = _ref;
|
|
5277
|
+
function EffectCards({
|
|
5278
|
+
swiper,
|
|
5279
|
+
extendParams,
|
|
5280
|
+
on
|
|
5281
|
+
}) {
|
|
5181
5282
|
extendParams({
|
|
5182
5283
|
cardsEffect: {
|
|
5183
5284
|
slideShadows: true,
|
|
@@ -5223,7 +5324,7 @@ function EffectCards(_ref) {
|
|
|
5223
5324
|
rotate += -28 * progress * subProgress;
|
|
5224
5325
|
scale += -0.5 * subProgress;
|
|
5225
5326
|
tXAdd += 96 * subProgress;
|
|
5226
|
-
tY = `${-25 * subProgress * Math.abs(progress)}%`;
|
|
5327
|
+
tY = `${(params.rotate || swiper.isHorizontal() ? -25 : 0) * subProgress * Math.abs(progress)}%`;
|
|
5227
5328
|
}
|
|
5228
5329
|
if (progress < 0) {
|
|
5229
5330
|
// next
|
|
@@ -5284,12 +5385,13 @@ function EffectCards(_ref) {
|
|
|
5284
5385
|
setTransition,
|
|
5285
5386
|
perspective: () => true,
|
|
5286
5387
|
overwriteParams: () => ({
|
|
5388
|
+
_loopSwapReset: false,
|
|
5287
5389
|
watchSlidesProgress: true,
|
|
5390
|
+
loopAdditionalSlides: swiper.params.cardsEffect.rotate ? 3 : 2,
|
|
5391
|
+
centeredSlides: true,
|
|
5288
5392
|
virtualTranslate: !swiper.params.cssMode
|
|
5289
5393
|
})
|
|
5290
5394
|
});
|
|
5291
5395
|
}
|
|
5292
5396
|
|
|
5293
5397
|
export { A11y, Autoplay, Controller, EffectCards, EffectCoverflow, EffectCreative, EffectCube, EffectFade, EffectFlip, freeMode as FreeMode, Grid, HashNavigation, History, Keyboard, Manipulation, Mousewheel, Navigation, Pagination, Parallax, Scrollbar, Thumb as Thumbs, Virtual, Zoom };
|
|
5294
|
-
|
|
5295
|
-
//# sourceMappingURL=index-f45a9c45.js.map
|