@gem-sdk/swiper 0.0.7
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 +20 -0
- package/README.md +11 -0
- package/modules/a11y-element.css +9 -0
- package/modules/a11y-element.min.css +1 -0
- package/modules/a11y.css +9 -0
- package/modules/a11y.less +9 -0
- package/modules/a11y.min.css +1 -0
- package/modules/a11y.min.mjs +2 -0
- package/modules/a11y.min.mjs.map +1 -0
- package/modules/a11y.mjs +377 -0
- package/modules/a11y.scss +9 -0
- package/modules/autoplay-element.css +0 -0
- package/modules/autoplay-element.min.css +0 -0
- package/modules/autoplay.css +0 -0
- package/modules/autoplay.less +0 -0
- package/modules/autoplay.min.css +0 -0
- package/modules/autoplay.min.mjs +2 -0
- package/modules/autoplay.min.mjs.map +1 -0
- package/modules/autoplay.mjs +304 -0
- package/modules/autoplay.scss +0 -0
- package/modules/controller-element.css +0 -0
- package/modules/controller-element.min.css +0 -0
- package/modules/controller.css +0 -0
- package/modules/controller.less +0 -0
- package/modules/controller.min.css +0 -0
- package/modules/controller.min.mjs +2 -0
- package/modules/controller.min.mjs.map +1 -0
- package/modules/controller.mjs +191 -0
- package/modules/controller.scss +0 -0
- package/modules/effect-cards-element.css +9 -0
- package/modules/effect-cards-element.min.css +1 -0
- package/modules/effect-cards.css +9 -0
- package/modules/effect-cards.less +10 -0
- package/modules/effect-cards.min.css +1 -0
- package/modules/effect-cards.min.mjs +2 -0
- package/modules/effect-cards.min.mjs.map +1 -0
- package/modules/effect-cards.mjs +128 -0
- package/modules/effect-cards.scss +10 -0
- package/modules/effect-coverflow-element.css +0 -0
- package/modules/effect-coverflow-element.min.css +0 -0
- package/modules/effect-coverflow.css +0 -0
- package/modules/effect-coverflow.less +2 -0
- package/modules/effect-coverflow.min.css +0 -0
- package/modules/effect-coverflow.min.mjs +2 -0
- package/modules/effect-coverflow.min.mjs.map +1 -0
- package/modules/effect-coverflow.mjs +104 -0
- package/modules/effect-coverflow.scss +2 -0
- package/modules/effect-creative-element.css +6 -0
- package/modules/effect-creative-element.min.css +1 -0
- package/modules/effect-creative.css +6 -0
- package/modules/effect-creative.less +7 -0
- package/modules/effect-creative.min.css +1 -0
- package/modules/effect-creative.min.mjs +2 -0
- package/modules/effect-creative.min.mjs.map +1 -0
- package/modules/effect-creative.mjs +146 -0
- package/modules/effect-creative.scss +7 -0
- package/modules/effect-cube-element.css +53 -0
- package/modules/effect-cube-element.min.css +1 -0
- package/modules/effect-cube.css +62 -0
- package/modules/effect-cube.less +71 -0
- package/modules/effect-cube.min.css +1 -0
- package/modules/effect-cube.min.mjs +2 -0
- package/modules/effect-cube.min.mjs.map +1 -0
- package/modules/effect-cube.mjs +174 -0
- package/modules/effect-cube.scss +71 -0
- package/modules/effect-fade-element.css +16 -0
- package/modules/effect-fade-element.min.css +1 -0
- package/modules/effect-fade.css +16 -0
- package/modules/effect-fade.less +20 -0
- package/modules/effect-fade.min.css +1 -0
- package/modules/effect-fade.min.mjs +2 -0
- package/modules/effect-fade.min.mjs.map +1 -0
- package/modules/effect-fade.mjs +66 -0
- package/modules/effect-fade.scss +20 -0
- package/modules/effect-flip-element.css +17 -0
- package/modules/effect-flip-element.min.css +1 -0
- package/modules/effect-flip.css +26 -0
- package/modules/effect-flip.less +30 -0
- package/modules/effect-flip.min.css +1 -0
- package/modules/effect-flip.min.mjs +2 -0
- package/modules/effect-flip.min.mjs.map +1 -0
- package/modules/effect-flip.mjs +111 -0
- package/modules/effect-flip.scss +30 -0
- package/modules/free-mode-element.css +4 -0
- package/modules/free-mode-element.min.css +1 -0
- package/modules/free-mode.css +4 -0
- package/modules/free-mode.less +4 -0
- package/modules/free-mode.min.css +1 -0
- package/modules/free-mode.min.mjs +2 -0
- package/modules/free-mode.min.mjs.map +1 -0
- package/modules/free-mode.mjs +237 -0
- package/modules/free-mode.scss +4 -0
- package/modules/grid-element.css +7 -0
- package/modules/grid-element.min.css +1 -0
- package/modules/grid.css +7 -0
- package/modules/grid.less +7 -0
- package/modules/grid.min.css +1 -0
- package/modules/grid.min.mjs +2 -0
- package/modules/grid.min.mjs.map +1 -0
- package/modules/grid.mjs +155 -0
- package/modules/grid.scss +7 -0
- package/modules/hash-navigation-element.css +0 -0
- package/modules/hash-navigation-element.min.css +0 -0
- package/modules/hash-navigation.css +0 -0
- package/modules/hash-navigation.less +2 -0
- package/modules/hash-navigation.min.css +0 -0
- package/modules/hash-navigation.min.mjs +2 -0
- package/modules/hash-navigation.min.mjs.map +1 -0
- package/modules/hash-navigation.mjs +93 -0
- package/modules/hash-navigation.scss +0 -0
- package/modules/history-element.css +0 -0
- package/modules/history-element.min.css +0 -0
- package/modules/history.css +0 -0
- package/modules/history.less +0 -0
- package/modules/history.min.css +0 -0
- package/modules/history.min.mjs +2 -0
- package/modules/history.min.mjs.map +1 -0
- package/modules/history.mjs +142 -0
- package/modules/history.scss +0 -0
- package/modules/index.min.mjs +2 -0
- package/modules/index.min.mjs.map +1 -0
- package/modules/index.mjs +23 -0
- package/modules/keyboard-element.css +0 -0
- package/modules/keyboard-element.min.css +0 -0
- package/modules/keyboard.css +0 -0
- package/modules/keyboard.less +0 -0
- package/modules/keyboard.min.css +0 -0
- package/modules/keyboard.min.mjs +2 -0
- package/modules/keyboard.min.mjs.map +1 -0
- package/modules/keyboard.mjs +117 -0
- package/modules/keyboard.scss +0 -0
- package/modules/manipulation-element.css +0 -0
- package/modules/manipulation-element.min.css +0 -0
- package/modules/manipulation.css +0 -0
- package/modules/manipulation.less +0 -0
- package/modules/manipulation.min.css +0 -0
- package/modules/manipulation.min.mjs +2 -0
- package/modules/manipulation.min.mjs.map +1 -0
- package/modules/manipulation.mjs +193 -0
- package/modules/manipulation.scss +0 -0
- package/modules/mousewheel-element.css +0 -0
- package/modules/mousewheel-element.min.css +0 -0
- package/modules/mousewheel.css +0 -0
- package/modules/mousewheel.less +0 -0
- package/modules/mousewheel.min.css +0 -0
- package/modules/mousewheel.min.mjs +2 -0
- package/modules/mousewheel.min.mjs.map +1 -0
- package/modules/mousewheel.mjs +395 -0
- package/modules/mousewheel.scss +0 -0
- package/modules/navigation-element.css +63 -0
- package/modules/navigation-element.min.css +1 -0
- package/modules/navigation.css +86 -0
- package/modules/navigation.less +86 -0
- package/modules/navigation.min.css +1 -0
- package/modules/navigation.min.mjs +2 -0
- package/modules/navigation.min.mjs.map +1 -0
- package/modules/navigation.mjs +200 -0
- package/modules/navigation.scss +87 -0
- package/modules/pagination-element.css +184 -0
- package/modules/pagination-element.min.css +1 -0
- package/modules/pagination.css +184 -0
- package/modules/pagination.less +187 -0
- package/modules/pagination.min.css +1 -0
- package/modules/pagination.min.mjs +2 -0
- package/modules/pagination.min.mjs.map +1 -0
- package/modules/pagination.mjs +467 -0
- package/modules/pagination.scss +188 -0
- package/modules/parallax-element.css +0 -0
- package/modules/parallax-element.min.css +0 -0
- package/modules/parallax.css +0 -0
- package/modules/parallax.less +0 -0
- package/modules/parallax.min.css +0 -0
- package/modules/parallax.min.mjs +2 -0
- package/modules/parallax.min.mjs.map +1 -0
- package/modules/parallax.mjs +124 -0
- package/modules/parallax.scss +0 -0
- package/modules/scrollbar-element.css +58 -0
- package/modules/scrollbar-element.min.css +1 -0
- package/modules/scrollbar.css +58 -0
- package/modules/scrollbar.less +59 -0
- package/modules/scrollbar.min.css +1 -0
- package/modules/scrollbar.min.mjs +2 -0
- package/modules/scrollbar.min.mjs.map +1 -0
- package/modules/scrollbar.mjs +366 -0
- package/modules/scrollbar.scss +61 -0
- package/modules/thumbs-element.css +0 -0
- package/modules/thumbs-element.min.css +0 -0
- package/modules/thumbs.css +0 -0
- package/modules/thumbs.less +5 -0
- package/modules/thumbs.min.css +0 -0
- package/modules/thumbs.min.mjs +2 -0
- package/modules/thumbs.min.mjs.map +1 -0
- package/modules/thumbs.mjs +197 -0
- package/modules/thumbs.scss +5 -0
- package/modules/virtual-element.css +19 -0
- package/modules/virtual-element.min.css +1 -0
- package/modules/virtual.css +19 -0
- package/modules/virtual.less +26 -0
- package/modules/virtual.min.css +1 -0
- package/modules/virtual.min.mjs +2 -0
- package/modules/virtual.min.mjs.map +1 -0
- package/modules/virtual.mjs +349 -0
- package/modules/virtual.scss +26 -0
- package/modules/zoom-element.css +5 -0
- package/modules/zoom-element.min.css +1 -0
- package/modules/zoom.css +21 -0
- package/modules/zoom.less +23 -0
- package/modules/zoom.min.css +1 -0
- package/modules/zoom.min.mjs +2 -0
- package/modules/zoom.min.mjs.map +1 -0
- package/modules/zoom.mjs +701 -0
- package/modules/zoom.scss +21 -0
- package/package.json +213 -0
- package/shared/classes-to-selector.min.mjs +2 -0
- package/shared/classes-to-selector.min.mjs.map +1 -0
- package/shared/classes-to-selector.mjs +9 -0
- package/shared/create-element-if-not-defined.min.mjs +2 -0
- package/shared/create-element-if-not-defined.min.mjs.map +1 -0
- package/shared/create-element-if-not-defined.mjs +21 -0
- package/shared/create-shadow.min.mjs +2 -0
- package/shared/create-shadow.min.mjs.map +1 -0
- package/shared/create-shadow.mjs +14 -0
- package/shared/effect-init.min.mjs +2 -0
- package/shared/effect-init.min.mjs.map +1 -0
- package/shared/effect-init.mjs +58 -0
- package/shared/effect-target.min.mjs +2 -0
- package/shared/effect-target.min.mjs.map +1 -0
- package/shared/effect-target.mjs +12 -0
- package/shared/effect-virtual-transition-end.min.mjs +2 -0
- package/shared/effect-virtual-transition-end.min.mjs.map +1 -0
- package/shared/effect-virtual-transition-end.mjs +48 -0
- package/shared/get-element-params.min.mjs +2 -0
- package/shared/get-element-params.min.mjs.map +1 -0
- package/shared/get-element-params.mjs +113 -0
- package/shared/ssr-window.esm.min.mjs +2 -0
- package/shared/ssr-window.esm.min.mjs.map +1 -0
- package/shared/ssr-window.esm.mjs +146 -0
- package/shared/swiper-core.min.mjs +2 -0
- package/shared/swiper-core.min.mjs.map +1 -0
- package/shared/swiper-core.mjs +3969 -0
- package/shared/update-on-virtual-data.min.mjs +2 -0
- package/shared/update-on-virtual-data.min.mjs.map +1 -0
- package/shared/update-on-virtual-data.mjs +131 -0
- package/shared/update-swiper.min.mjs +2 -0
- package/shared/update-swiper.min.mjs.map +1 -0
- package/shared/update-swiper.mjs +238 -0
- package/shared/utils.min.mjs +2 -0
- package/shared/utils.min.mjs.map +1 -0
- package/shared/utils.mjs +343 -0
- package/swiper-bundle.css +735 -0
- package/swiper-bundle.js +9870 -0
- package/swiper-bundle.min.css +13 -0
- package/swiper-bundle.min.js +14 -0
- package/swiper-bundle.min.js.map +1 -0
- package/swiper-bundle.min.mjs +14 -0
- package/swiper-bundle.min.mjs.map +1 -0
- package/swiper-bundle.mjs +42 -0
- package/swiper-effect-utils.d.ts +28 -0
- package/swiper-effect-utils.min.mjs +14 -0
- package/swiper-effect-utils.min.mjs.map +1 -0
- package/swiper-effect-utils.mjs +17 -0
- package/swiper-element-bundle.js +10477 -0
- package/swiper-element-bundle.min.js +14 -0
- package/swiper-element-bundle.min.js.map +1 -0
- package/swiper-element-bundle.min.mjs +14 -0
- package/swiper-element-bundle.min.mjs.map +1 -0
- package/swiper-element-bundle.mjs +288 -0
- package/swiper-element.d.ts +444 -0
- package/swiper-element.js +5037 -0
- package/swiper-element.min.js +14 -0
- package/swiper-element.min.js.map +1 -0
- package/swiper-element.min.mjs +14 -0
- package/swiper-element.min.mjs.map +1 -0
- package/swiper-element.mjs +287 -0
- package/swiper-react.d.ts +501 -0
- package/swiper-react.mjs +394 -0
- package/swiper-vars.less +1 -0
- package/swiper-vars.scss +1 -0
- package/swiper-vue.d.ts +866 -0
- package/swiper-vue.mjs +838 -0
- package/swiper.css +228 -0
- package/swiper.d.ts +5 -0
- package/swiper.js +4418 -0
- package/swiper.less +251 -0
- package/swiper.min.css +13 -0
- package/swiper.min.js +14 -0
- package/swiper.min.js.map +1 -0
- package/swiper.min.mjs +14 -0
- package/swiper.min.mjs.map +1 -0
- package/swiper.mjs +13 -0
- package/swiper.scss +252 -0
- package/types/index.d.ts +6 -0
- package/types/modules/a11y.d.ts +110 -0
- package/types/modules/autoplay.d.ts +133 -0
- package/types/modules/controller.d.ts +35 -0
- package/types/modules/effect-cards.d.ts +33 -0
- package/types/modules/effect-coverflow.d.ts +45 -0
- package/types/modules/effect-creative.d.ts +86 -0
- package/types/modules/effect-cube.d.ts +30 -0
- package/types/modules/effect-fade.d.ts +12 -0
- package/types/modules/effect-flip.d.ts +18 -0
- package/types/modules/free-mode.d.ts +64 -0
- package/types/modules/grid.d.ts +21 -0
- package/types/modules/hash-navigation.d.ts +38 -0
- package/types/modules/history.d.ts +43 -0
- package/types/modules/index.d.ts +51 -0
- package/types/modules/keyboard.d.ts +46 -0
- package/types/modules/manipulation.d.ts +70 -0
- package/types/modules/mousewheel.d.ts +86 -0
- package/types/modules/navigation.d.ts +105 -0
- package/types/modules/pagination.d.ts +307 -0
- package/types/modules/parallax.d.ts +12 -0
- package/types/modules/public-api.d.ts +23 -0
- package/types/modules/scrollbar.d.ts +140 -0
- package/types/modules/thumbs.d.ts +54 -0
- package/types/modules/virtual.d.ts +135 -0
- package/types/modules/zoom.d.ts +91 -0
- package/types/shared.d.ts +13 -0
- package/types/swiper-class.d.ts +522 -0
- package/types/swiper-events.d.ts +359 -0
- package/types/swiper-options.d.ts +1217 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export interface ManipulationMethods {
|
|
2
|
+
/**
|
|
3
|
+
* Add new slides to the end. slides could be
|
|
4
|
+
* HTMLElement or HTML string with new slide or
|
|
5
|
+
* array with such slides, for example:
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```js
|
|
9
|
+
* appendSlide('<div class="swiper-slide">Slide 10"</div>')
|
|
10
|
+
*
|
|
11
|
+
* appendSlide([
|
|
12
|
+
* '<div class="swiper-slide">Slide 10"</div>',
|
|
13
|
+
* '<div class="swiper-slide">Slide 11"</div>'
|
|
14
|
+
* ]);
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
appendSlide(slides: HTMLElement | string | string[] | HTMLElement[]): void;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Add new slides to the beginning. slides could be
|
|
21
|
+
* HTMLElement or HTML string with new slide or array with such slides, for example:
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```js
|
|
25
|
+
* prependSlide('<div class="swiper-slide">Slide 0"</div>')
|
|
26
|
+
*
|
|
27
|
+
* prependSlide([
|
|
28
|
+
* '<div class="swiper-slide">Slide 1"</div>',
|
|
29
|
+
* '<div class="swiper-slide">Slide 2"</div>'
|
|
30
|
+
* ]);
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
prependSlide(slides: HTMLElement | string | string[] | HTMLElement[]): void;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Add new slides to the required index. slides could be HTMLElement or HTML string with new slide or array with such slides, for example:
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```js
|
|
40
|
+
* addSlide(1, '<div class="swiper-slide">Slide 10"</div>')
|
|
41
|
+
*
|
|
42
|
+
* addSlide(1, [
|
|
43
|
+
* '<div class="swiper-slide">Slide 10"</div>',
|
|
44
|
+
* '<div class="swiper-slide">Slide 11"</div>'
|
|
45
|
+
* ]);
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
addSlide(index: number, slides: HTMLElement | string | string[] | HTMLElement[]): void;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Remove selected slides. slideIndex could be a number with slide index to remove or array with indexes.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```js
|
|
55
|
+
* removeSlide(0); // remove first slide
|
|
56
|
+
* removeSlide([0, 1]); // remove first and second slides
|
|
57
|
+
* removeAllSlides(); // Remove all slides
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
removeSlide(slideIndex: number | number[]): void;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Remove all slides
|
|
64
|
+
*/
|
|
65
|
+
removeAllSlides(): void;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface ManipulationEvents {}
|
|
69
|
+
|
|
70
|
+
export interface ManipulationOptions {}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type Swiper from '../swiper-class.d.ts';
|
|
2
|
+
import type { CSSSelector } from '../shared.d.ts';
|
|
3
|
+
|
|
4
|
+
export interface MousewheelMethods {
|
|
5
|
+
/**
|
|
6
|
+
* Whether the mousewheel control is enabled
|
|
7
|
+
*/
|
|
8
|
+
enabled: boolean;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Enable mousewheel control
|
|
12
|
+
*/
|
|
13
|
+
enable(): void;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Disable mousewheel control
|
|
17
|
+
*/
|
|
18
|
+
disable(): void;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface MousewheelEvents {
|
|
22
|
+
/**
|
|
23
|
+
* Event will be fired on mousewheel scroll
|
|
24
|
+
*/
|
|
25
|
+
scroll: (swiper: Swiper, event: WheelEvent) => void;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface MousewheelOptions {
|
|
29
|
+
/**
|
|
30
|
+
* Set to `true` to enable mousewheel control
|
|
31
|
+
*
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
enabled?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Set to `true` to force mousewheel swipes to axis. So in horizontal mode mousewheel will work only with horizontal mousewheel scrolling, and only with vertical scrolling in vertical mode.
|
|
37
|
+
*
|
|
38
|
+
* @default false
|
|
39
|
+
*/
|
|
40
|
+
forceToAxis?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Set to `true` and swiper will release mousewheel event and allow page scrolling when swiper is on edge positions (in the beginning or in the end)
|
|
43
|
+
*
|
|
44
|
+
* @default false
|
|
45
|
+
*/
|
|
46
|
+
releaseOnEdges?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Set to `true` to invert sliding direction
|
|
49
|
+
*
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
52
|
+
invert?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Multiplier of mousewheel data, allows to tweak mouse wheel sensitivity
|
|
55
|
+
*
|
|
56
|
+
* @default 1
|
|
57
|
+
*/
|
|
58
|
+
sensitivity?: number;
|
|
59
|
+
/**
|
|
60
|
+
* String with CSS selector or HTML element of the container accepting mousewheel events. By default it is swiper
|
|
61
|
+
*
|
|
62
|
+
* @default 'container'
|
|
63
|
+
*/
|
|
64
|
+
eventsTarget?: 'container' | 'wrapper' | CSSSelector | HTMLElement;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Minimum mousewheel scroll delta to trigger swiper slide change
|
|
68
|
+
*
|
|
69
|
+
* @default null
|
|
70
|
+
*/
|
|
71
|
+
thresholdDelta?: number | null;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Minimum mousewheel scroll time delta (in ms) to trigger swiper slide change
|
|
75
|
+
*
|
|
76
|
+
* @default null
|
|
77
|
+
*/
|
|
78
|
+
thresholdTime?: number | null;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Scrolling on elements with this class will be ignored
|
|
82
|
+
*
|
|
83
|
+
* @default 'swiper-no-mousewheel'
|
|
84
|
+
*/
|
|
85
|
+
noMousewheelClass?: string;
|
|
86
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import type { CSSSelector } from '../shared.d.ts';
|
|
2
|
+
import type Swiper from '../swiper-class.d.ts';
|
|
3
|
+
|
|
4
|
+
export interface NavigationMethods {
|
|
5
|
+
/**
|
|
6
|
+
* HTMLElement of "next" navigation button
|
|
7
|
+
*/
|
|
8
|
+
nextEl: HTMLElement;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* HTMLElement of "previous" navigation button
|
|
12
|
+
*/
|
|
13
|
+
prevEl: HTMLElement;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Update navigation buttons state (enabled/disabled)
|
|
17
|
+
*/
|
|
18
|
+
update(): void;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Initialize navigation
|
|
22
|
+
*/
|
|
23
|
+
init(): void;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Destroy navigation
|
|
27
|
+
*/
|
|
28
|
+
destroy(): void;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface NavigationEvents {
|
|
32
|
+
/**
|
|
33
|
+
* Event will be fired on navigation hide
|
|
34
|
+
*/
|
|
35
|
+
navigationHide: (swiper: Swiper) => void;
|
|
36
|
+
/**
|
|
37
|
+
* Event will be fired on navigation show
|
|
38
|
+
*/
|
|
39
|
+
navigationShow: (swiper: Swiper) => void;
|
|
40
|
+
/**
|
|
41
|
+
* Event will be fired on navigation prev button click
|
|
42
|
+
*/
|
|
43
|
+
navigationPrev: (swiper: Swiper) => void;
|
|
44
|
+
/**
|
|
45
|
+
* Event will be fired on navigation next button click
|
|
46
|
+
*/
|
|
47
|
+
navigationNext: (swiper: Swiper) => void;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface NavigationOptions {
|
|
51
|
+
/**
|
|
52
|
+
* Boolean property to use with breakpoints to enable/disable navigation on certain breakpoints
|
|
53
|
+
*/
|
|
54
|
+
enabled?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* String with CSS selector or HTML element of the element that will work
|
|
57
|
+
* like "next" button after click on it
|
|
58
|
+
*
|
|
59
|
+
* @default null
|
|
60
|
+
*/
|
|
61
|
+
nextEl?: CSSSelector | HTMLElement | null;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* String with CSS selector or HTML element of the element that will work
|
|
65
|
+
* like "prev" button after click on it
|
|
66
|
+
*
|
|
67
|
+
* @default null
|
|
68
|
+
*/
|
|
69
|
+
prevEl?: CSSSelector | HTMLElement | null;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Toggle navigation buttons visibility after click on Slider's container
|
|
73
|
+
*
|
|
74
|
+
* @default false
|
|
75
|
+
*/
|
|
76
|
+
hideOnClick?: boolean;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* CSS class name added to navigation button when it becomes disabled
|
|
80
|
+
*
|
|
81
|
+
* @default 'swiper-button-disabled'
|
|
82
|
+
*/
|
|
83
|
+
disabledClass?: string;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* CSS class name added to navigation button when it becomes hidden
|
|
87
|
+
*
|
|
88
|
+
* @default 'swiper-button-hidden'
|
|
89
|
+
*/
|
|
90
|
+
hiddenClass?: string;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* CSS class name added to navigation button when it is disabled
|
|
94
|
+
*
|
|
95
|
+
* @default 'swiper-button-lock'
|
|
96
|
+
*/
|
|
97
|
+
lockClass?: string;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* CSS class name added on swiper container when navigation is disabled by breakpoint
|
|
101
|
+
*
|
|
102
|
+
* @default 'swiper-navigation-disabled'
|
|
103
|
+
*/
|
|
104
|
+
navigationDisabledClass?: string;
|
|
105
|
+
}
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import type { CSSSelector } from '../shared.d.ts';
|
|
2
|
+
import type Swiper from '../swiper-class.d.ts';
|
|
3
|
+
|
|
4
|
+
export interface PaginationMethods {
|
|
5
|
+
/**
|
|
6
|
+
* HTMLElement of pagination container element
|
|
7
|
+
*/
|
|
8
|
+
el: HTMLElement;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Array of pagination bullets
|
|
12
|
+
* HTML elements. To get specific slide HTMLElement
|
|
13
|
+
* use `swiper.pagination.bullets[1]`.
|
|
14
|
+
*/
|
|
15
|
+
bullets: HTMLElement[];
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Render pagination layout
|
|
19
|
+
*/
|
|
20
|
+
render(): void;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Update pagination state (enabled/disabled/active)
|
|
24
|
+
*/
|
|
25
|
+
update(): void;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Initialize pagination
|
|
29
|
+
*/
|
|
30
|
+
init(): void;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Destroy pagination
|
|
34
|
+
*/
|
|
35
|
+
destroy(): void;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface PaginationEvents {
|
|
39
|
+
/**
|
|
40
|
+
* Event will be fired after pagination rendered
|
|
41
|
+
*/
|
|
42
|
+
paginationRender: (swiper: Swiper, paginationEl: HTMLElement) => void;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Event will be fired when pagination updated
|
|
46
|
+
*/
|
|
47
|
+
paginationUpdate: (swiper: Swiper, paginationEl: HTMLElement) => void;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Event will be fired on pagination hide
|
|
51
|
+
*/
|
|
52
|
+
paginationHide: (swiper: Swiper) => void;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Event will be fired on pagination show
|
|
56
|
+
*/
|
|
57
|
+
paginationShow: (swiper: Swiper) => void;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface PaginationOptions {
|
|
61
|
+
/**
|
|
62
|
+
* Boolean property to use with breakpoints to enable/disable pagination on certain breakpoints
|
|
63
|
+
*/
|
|
64
|
+
enabled?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* String with CSS selector or HTML element of the container with pagination
|
|
67
|
+
*
|
|
68
|
+
* @default null
|
|
69
|
+
*/
|
|
70
|
+
el?: CSSSelector | HTMLElement | null;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* String with type of pagination. Can be `'bullets'`, `'fraction'`, `'progressbar'` or `'custom'`
|
|
74
|
+
*
|
|
75
|
+
* @default 'bullets'
|
|
76
|
+
*/
|
|
77
|
+
type?: 'bullets' | 'fraction' | 'progressbar' | 'custom';
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Defines which HTML tag will be used to represent single pagination bullet. Only for `'bullets'` pagination type.
|
|
81
|
+
*
|
|
82
|
+
* @default 'span'
|
|
83
|
+
*/
|
|
84
|
+
bulletElement?: string;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Good to enable if you use bullets pagination with a lot of slides. So it will keep only few bullets visible at the same time.
|
|
88
|
+
*
|
|
89
|
+
* @default false
|
|
90
|
+
*/
|
|
91
|
+
dynamicBullets?: boolean;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* The number of main bullets visible when `dynamicBullets` enabled.
|
|
95
|
+
*
|
|
96
|
+
* @default 1
|
|
97
|
+
*/
|
|
98
|
+
dynamicMainBullets?: number;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Toggle (hide/show) pagination container visibility after click on Slider's container
|
|
102
|
+
*
|
|
103
|
+
* @default true
|
|
104
|
+
*/
|
|
105
|
+
hideOnClick?: boolean;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* If `true` then clicking on pagination button will cause transition to appropriate slide. Only for bullets pagination type
|
|
109
|
+
*
|
|
110
|
+
* @default false
|
|
111
|
+
*/
|
|
112
|
+
clickable?: boolean;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Makes pagination progressbar opposite to Swiper's `direction` parameter, means vertical progressbar for horizontal swiper
|
|
116
|
+
* direction and horizontal progressbar for vertical swiper direction
|
|
117
|
+
*
|
|
118
|
+
* @default false
|
|
119
|
+
*/
|
|
120
|
+
progressbarOpposite?: boolean;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* format fraction pagination current number. Function receives current number,
|
|
124
|
+
* and you need to return formatted value
|
|
125
|
+
*/
|
|
126
|
+
formatFractionCurrent?: (number: number) => number | string;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* format fraction pagination total number. Function receives total number, and you
|
|
130
|
+
* need to return formatted value
|
|
131
|
+
*/
|
|
132
|
+
formatFractionTotal?: (number: number) => number | string;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* This parameter allows totally customize pagination bullets, you need to pass here a function that accepts `index` number of
|
|
136
|
+
* pagination bullet and required element class name (`className`). Only for `'bullets'` pagination type
|
|
137
|
+
*
|
|
138
|
+
* @default null
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* ```js
|
|
142
|
+
* const swiper = new Swiper('.swiper', {
|
|
143
|
+
* //...
|
|
144
|
+
* pagination: {
|
|
145
|
+
* //...
|
|
146
|
+
* renderBullet: function (index, className) {
|
|
147
|
+
* return '<span class="' + className + '">' + (index + 1) + '</span>';
|
|
148
|
+
* },
|
|
149
|
+
* },
|
|
150
|
+
* });
|
|
151
|
+
* ```
|
|
152
|
+
*/
|
|
153
|
+
renderBullet?: (index: number, className: string) => string;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* This parameter allows to customize "fraction" pagination html. Only for `'fraction'` pagination type
|
|
157
|
+
*
|
|
158
|
+
* @default null
|
|
159
|
+
*
|
|
160
|
+
* @example
|
|
161
|
+
* ```js
|
|
162
|
+
* const swiper = new Swiper('.swiper', {
|
|
163
|
+
* //...
|
|
164
|
+
* pagination: {
|
|
165
|
+
* //...
|
|
166
|
+
* renderFraction: function (currentClass, totalClass) {
|
|
167
|
+
* return '<span class="' + currentClass + '"></span>' +
|
|
168
|
+
* ' of ' +
|
|
169
|
+
* '<span class="' + totalClass + '"></span>';
|
|
170
|
+
* },
|
|
171
|
+
* },
|
|
172
|
+
* });
|
|
173
|
+
* ```
|
|
174
|
+
*/
|
|
175
|
+
renderFraction?: (currentClass: string, totalClass: string) => string;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* This parameter allows to customize "progress" pagination. Only for `'progress'` pagination type
|
|
179
|
+
*
|
|
180
|
+
* @default null
|
|
181
|
+
*
|
|
182
|
+
* @example
|
|
183
|
+
* ```js
|
|
184
|
+
* const swiper = new Swiper('.swiper', {
|
|
185
|
+
* //...
|
|
186
|
+
* pagination: {
|
|
187
|
+
* //...
|
|
188
|
+
* renderProgressbar: function (progressbarFillClass) {
|
|
189
|
+
* return '<span class="' + progressbarFillClass + '"></span>';
|
|
190
|
+
* },
|
|
191
|
+
* },
|
|
192
|
+
* });
|
|
193
|
+
* ```
|
|
194
|
+
*/
|
|
195
|
+
renderProgressbar?: (progressbarFillClass: string) => string;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* This parameter is required for `'custom'` pagination type where you have to specify
|
|
199
|
+
* how it should be rendered.
|
|
200
|
+
*
|
|
201
|
+
* @default null
|
|
202
|
+
*
|
|
203
|
+
* @example
|
|
204
|
+
* ```js
|
|
205
|
+
* const swiper = new Swiper('.swiper', {
|
|
206
|
+
* //...
|
|
207
|
+
* pagination: {
|
|
208
|
+
* //...
|
|
209
|
+
* renderCustom: function (swiper, current, total) {
|
|
210
|
+
* return current + ' of ' + total;
|
|
211
|
+
* },
|
|
212
|
+
* },
|
|
213
|
+
* });
|
|
214
|
+
* ```
|
|
215
|
+
*/
|
|
216
|
+
renderCustom?: (swiper: Swiper, current: number, total: number) => string;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* CSS class name of single pagination bullet
|
|
220
|
+
*
|
|
221
|
+
* @default 'swiper-pagination-bullet'
|
|
222
|
+
*/
|
|
223
|
+
bulletClass?: string;
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* CSS class name of currently active pagination bullet
|
|
227
|
+
*
|
|
228
|
+
* @default 'swiper-pagination-bullet-active'
|
|
229
|
+
*/
|
|
230
|
+
bulletActiveClass?: string;
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* The beginning of the modifier CSS class name that will be added to pagination depending on parameters
|
|
234
|
+
*
|
|
235
|
+
* @default 'swiper-pagination-'
|
|
236
|
+
*/
|
|
237
|
+
modifierClass?: string;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* CSS class name of the element with currently active index in "fraction" pagination
|
|
241
|
+
*
|
|
242
|
+
* @default 'swiper-pagination-current'
|
|
243
|
+
*/
|
|
244
|
+
currentClass?: string;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* CSS class name of the element with total number of "snaps" in "fraction" pagination
|
|
248
|
+
*
|
|
249
|
+
* @default 'swiper-pagination-total'
|
|
250
|
+
*/
|
|
251
|
+
totalClass?: string;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* CSS class name of pagination when it becomes inactive
|
|
255
|
+
*
|
|
256
|
+
* @default 'swiper-pagination-hidden'
|
|
257
|
+
*/
|
|
258
|
+
hiddenClass?: string;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* CSS class name of pagination progressbar fill element
|
|
262
|
+
*
|
|
263
|
+
* @default 'swiper-pagination-progressbar-fill'
|
|
264
|
+
*/
|
|
265
|
+
progressbarFillClass?: string;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* CSS class name of pagination progressbar opposite
|
|
269
|
+
*
|
|
270
|
+
* @default 'swiper-pagination-progressbar-opposite'
|
|
271
|
+
*/
|
|
272
|
+
progressbarOppositeClass?: string;
|
|
273
|
+
/**
|
|
274
|
+
* CSS class name set to pagination when it is clickable
|
|
275
|
+
*
|
|
276
|
+
* @default 'swiper-pagination-clickable'
|
|
277
|
+
*/
|
|
278
|
+
clickableClass?: string;
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* CSS class name set to pagination when it is disabled
|
|
282
|
+
*
|
|
283
|
+
* @default 'swiper-pagination-lock'
|
|
284
|
+
*/
|
|
285
|
+
lockClass?: string;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* CSS class name set to pagination in horizontal Swiper
|
|
289
|
+
*
|
|
290
|
+
* @default 'swiper-pagination-horizontal'
|
|
291
|
+
*/
|
|
292
|
+
horizontalClass?: string;
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* CSS class name set to pagination in vertical Swiper
|
|
296
|
+
*
|
|
297
|
+
* @default 'swiper-pagination-vertical'
|
|
298
|
+
*/
|
|
299
|
+
verticalClass?: string;
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* CSS class name added on swiper container and pagination element when pagination is disabled by breakpoint
|
|
303
|
+
*
|
|
304
|
+
* @default 'swiper-pagination-disabled'
|
|
305
|
+
*/
|
|
306
|
+
paginationDisabledClass?: string;
|
|
307
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type * from './a11y.d.ts';
|
|
2
|
+
export type * from './autoplay.d.ts';
|
|
3
|
+
export type * from './controller.d.ts';
|
|
4
|
+
export type * from './effect-coverflow.d.ts';
|
|
5
|
+
export type * from './effect-cube.d.ts';
|
|
6
|
+
export type * from './effect-fade.d.ts';
|
|
7
|
+
export type * from './effect-flip.d.ts';
|
|
8
|
+
export type * from './effect-creative.d.ts';
|
|
9
|
+
export type * from './effect-cards.d.ts';
|
|
10
|
+
export type * from './hash-navigation.d.ts';
|
|
11
|
+
export type * from './history.d.ts';
|
|
12
|
+
export type * from './keyboard.d.ts';
|
|
13
|
+
export type * from './mousewheel.d.ts';
|
|
14
|
+
export type * from './navigation.d.ts';
|
|
15
|
+
export type * from './pagination.d.ts';
|
|
16
|
+
export type * from './parallax.d.ts';
|
|
17
|
+
export type * from './scrollbar.d.ts';
|
|
18
|
+
export type * from './thumbs.d.ts';
|
|
19
|
+
export type * from './virtual.d.ts';
|
|
20
|
+
export type * from './zoom.d.ts';
|
|
21
|
+
export type * from './free-mode.d.ts';
|
|
22
|
+
export type * from './grid.d.ts';
|
|
23
|
+
export type * from './manipulation.d.ts';
|