@gravity-ui/page-constructor 7.23.0 → 8.0.0-alpha.1

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.
Files changed (40) hide show
  1. package/build/cjs/_vendor/swiper-modules.js +1309 -0
  2. package/build/cjs/_vendor/swiper-modules.js.map +7 -0
  3. package/build/cjs/_vendor/swiper-react.js +4651 -0
  4. package/build/cjs/_vendor/swiper-react.js.map +7 -0
  5. package/build/cjs/_vendor/swiper.js +3822 -0
  6. package/build/cjs/_vendor/swiper.js.map +7 -0
  7. package/build/cjs/blocks/Slider/Slider.d.ts +6 -4
  8. package/build/cjs/blocks/Slider/Slider.js +7 -7
  9. package/build/cjs/blocks/Slider/Slider.js.map +1 -1
  10. package/build/cjs/blocks/Slider/useSlider.d.ts +1 -2
  11. package/build/cjs/blocks/Slider/useSlider.js +3 -7
  12. package/build/cjs/blocks/Slider/useSlider.js.map +1 -1
  13. package/build/cjs/blocks/Slider/useSliderPagination.d.ts +1 -1
  14. package/build/cjs/blocks/Slider/useSliderPagination.js.map +1 -1
  15. package/build/cjs/blocks/Slider/utils.d.ts +1 -1
  16. package/build/cjs/blocks/Slider/utils.js.map +1 -1
  17. package/build/cjs/node_modules/swiper/modules/a11y.css +9 -0
  18. package/build/cjs/node_modules/swiper/modules/autoplay.css +0 -0
  19. package/build/cjs/node_modules/swiper/modules/index.js +1309 -0
  20. package/build/cjs/node_modules/swiper/modules/pagination.css +181 -0
  21. package/build/cjs/node_modules/swiper/package.json +14 -0
  22. package/build/cjs/node_modules/swiper/swiper-react.d.ts +497 -0
  23. package/build/cjs/node_modules/swiper/swiper-react.js +4651 -0
  24. package/build/cjs/node_modules/swiper/swiper.css +229 -0
  25. package/build/cjs/node_modules/swiper/swiper.d.ts +5 -0
  26. package/build/cjs/node_modules/swiper/swiper.js +3822 -0
  27. package/build/cjs/node_modules/swiper/types/index.d.ts +6 -0
  28. package/build/cjs/node_modules/swiper/types/modules/index.d.ts +53 -0
  29. package/build/esm/blocks/Slider/Slider.d.ts +6 -4
  30. package/build/esm/blocks/Slider/Slider.js +7 -7
  31. package/build/esm/blocks/Slider/Slider.js.map +1 -1
  32. package/build/esm/blocks/Slider/useSlider.d.ts +2 -3
  33. package/build/esm/blocks/Slider/useSlider.js +3 -7
  34. package/build/esm/blocks/Slider/useSlider.js.map +1 -1
  35. package/build/esm/blocks/Slider/useSliderPagination.d.ts +1 -1
  36. package/build/esm/blocks/Slider/useSliderPagination.js.map +1 -1
  37. package/build/esm/blocks/Slider/utils.d.ts +1 -1
  38. package/build/esm/blocks/Slider/utils.js.map +1 -1
  39. package/package.json +4 -2
  40. package/widget/index.js +1 -1
@@ -0,0 +1,181 @@
1
+ :root {
2
+ /*
3
+ --swiper-pagination-color: var(--swiper-theme-color);
4
+ --swiper-pagination-left: auto;
5
+ --swiper-pagination-right: 8px;
6
+ --swiper-pagination-bottom: 8px;
7
+ --swiper-pagination-top: auto;
8
+ --swiper-pagination-fraction-color: inherit;
9
+ --swiper-pagination-progressbar-bg-color: rgba(0,0,0,0.25);
10
+ --swiper-pagination-progressbar-size: 4px;
11
+ --swiper-pagination-bullet-size: 8px;
12
+ --swiper-pagination-bullet-width: 8px;
13
+ --swiper-pagination-bullet-height: 8px;
14
+ --swiper-pagination-bullet-border-radius: 50%;
15
+ --swiper-pagination-bullet-inactive-color: #000;
16
+ --swiper-pagination-bullet-inactive-opacity: 0.2;
17
+ --swiper-pagination-bullet-opacity: 1;
18
+ --swiper-pagination-bullet-horizontal-gap: 4px;
19
+ --swiper-pagination-bullet-vertical-gap: 6px;
20
+ */
21
+ }
22
+ .swiper-pagination {
23
+ position: absolute;
24
+ text-align: center;
25
+ transition: 300ms opacity;
26
+ transform: translate3d(0, 0, 0);
27
+ z-index: 10;
28
+ }
29
+ .swiper-pagination.swiper-pagination-hidden {
30
+ opacity: 0;
31
+ }
32
+ .swiper-pagination-disabled > .swiper-pagination,
33
+ .swiper-pagination.swiper-pagination-disabled {
34
+ display: none !important;
35
+ }
36
+ /* Common Styles */
37
+ .swiper-pagination-fraction,
38
+ .swiper-pagination-custom,
39
+ .swiper-horizontal > .swiper-pagination-bullets,
40
+ .swiper-pagination-bullets.swiper-pagination-horizontal {
41
+ bottom: var(--swiper-pagination-bottom, 8px);
42
+ top: var(--swiper-pagination-top, auto);
43
+ left: 0;
44
+ width: 100%;
45
+ }
46
+ /* Bullets */
47
+ .swiper-pagination-bullets-dynamic {
48
+ overflow: hidden;
49
+ font-size: 0;
50
+ }
51
+ .swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
52
+ transform: scale(0.33);
53
+ position: relative;
54
+ }
55
+ .swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active {
56
+ transform: scale(1);
57
+ }
58
+ .swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main {
59
+ transform: scale(1);
60
+ }
61
+ .swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev {
62
+ transform: scale(0.66);
63
+ }
64
+ .swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev {
65
+ transform: scale(0.33);
66
+ }
67
+ .swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next {
68
+ transform: scale(0.66);
69
+ }
70
+ .swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next {
71
+ transform: scale(0.33);
72
+ }
73
+ .swiper-pagination-bullet {
74
+ width: var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px));
75
+ height: var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px));
76
+ display: inline-block;
77
+ border-radius: var(--swiper-pagination-bullet-border-radius, 50%);
78
+ background: var(--swiper-pagination-bullet-inactive-color, #000);
79
+ opacity: var(--swiper-pagination-bullet-inactive-opacity, 0.2);
80
+ }
81
+ button.swiper-pagination-bullet {
82
+ border: none;
83
+ margin: 0;
84
+ padding: 0;
85
+ box-shadow: none;
86
+ -webkit-appearance: none;
87
+ appearance: none;
88
+ }
89
+ .swiper-pagination-clickable .swiper-pagination-bullet {
90
+ cursor: pointer;
91
+ }
92
+ .swiper-pagination-bullet:only-child {
93
+ display: none !important;
94
+ }
95
+ .swiper-pagination-bullet-active {
96
+ opacity: var(--swiper-pagination-bullet-opacity, 1);
97
+ background: var(--swiper-pagination-color, var(--swiper-theme-color));
98
+ }
99
+ .swiper-vertical > .swiper-pagination-bullets,
100
+ .swiper-pagination-vertical.swiper-pagination-bullets {
101
+ right: var(--swiper-pagination-right, 8px);
102
+ left: var(--swiper-pagination-left, auto);
103
+ top: 50%;
104
+ transform: translate3d(0px, -50%, 0);
105
+ }
106
+ .swiper-vertical > .swiper-pagination-bullets .swiper-pagination-bullet,
107
+ .swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet {
108
+ margin: var(--swiper-pagination-bullet-vertical-gap, 6px) 0;
109
+ display: block;
110
+ }
111
+ .swiper-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic,
112
+ .swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic {
113
+ top: 50%;
114
+ transform: translateY(-50%);
115
+ width: 8px;
116
+ }
117
+ .swiper-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,
118
+ .swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
119
+ display: inline-block;
120
+ transition: 200ms transform, 200ms top;
121
+ }
122
+ .swiper-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet,
123
+ .swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet {
124
+ margin: 0 var(--swiper-pagination-bullet-horizontal-gap, 4px);
125
+ }
126
+ .swiper-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic,
127
+ .swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic {
128
+ left: 50%;
129
+ transform: translateX(-50%);
130
+ white-space: nowrap;
131
+ }
132
+ .swiper-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,
133
+ .swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
134
+ transition: 200ms transform, 200ms left;
135
+ }
136
+ .swiper-horizontal.swiper-rtl > .swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
137
+ transition: 200ms transform, 200ms right;
138
+ }
139
+ /* Fraction */
140
+ .swiper-pagination-fraction {
141
+ color: var(--swiper-pagination-fraction-color, inherit);
142
+ }
143
+ /* Progress */
144
+ .swiper-pagination-progressbar {
145
+ background: var(--swiper-pagination-progressbar-bg-color, rgba(0, 0, 0, 0.25));
146
+ position: absolute;
147
+ }
148
+ .swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
149
+ background: var(--swiper-pagination-color, var(--swiper-theme-color));
150
+ position: absolute;
151
+ left: 0;
152
+ top: 0;
153
+ width: 100%;
154
+ height: 100%;
155
+ transform: scale(0);
156
+ transform-origin: left top;
157
+ }
158
+ .swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
159
+ transform-origin: right top;
160
+ }
161
+ .swiper-horizontal > .swiper-pagination-progressbar,
162
+ .swiper-pagination-progressbar.swiper-pagination-horizontal,
163
+ .swiper-vertical > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,
164
+ .swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite {
165
+ width: 100%;
166
+ height: var(--swiper-pagination-progressbar-size, 4px);
167
+ left: 0;
168
+ top: 0;
169
+ }
170
+ .swiper-vertical > .swiper-pagination-progressbar,
171
+ .swiper-pagination-progressbar.swiper-pagination-vertical,
172
+ .swiper-horizontal > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,
173
+ .swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite {
174
+ width: var(--swiper-pagination-progressbar-size, 4px);
175
+ height: 100%;
176
+ left: 0;
177
+ top: 0;
178
+ }
179
+ .swiper-pagination-lock {
180
+ display: none;
181
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "swiper",
3
+ "version": "10.2.0",
4
+ "type": "commonjs",
5
+ "main": "./swiper.js",
6
+ "exports": {
7
+ ".": "./swiper.js",
8
+ "./react": "./swiper-react.js",
9
+ "./modules": "./modules/index.js",
10
+ "./css": "./swiper.css",
11
+ "./css/a11y": "./modules/a11y.css",
12
+ "./css/pagination": "./modules/pagination.css"
13
+ }
14
+ }
@@ -0,0 +1,497 @@
1
+ import * as React from 'react';
2
+
3
+ import type { SwiperOptions, Swiper as SwiperClass } from './types/index.d.ts';
4
+
5
+ type SwiperProps = Omit<
6
+ React.HTMLAttributes<HTMLElement>,
7
+ | 'onProgress'
8
+ | 'onClick'
9
+ | 'onTouchEnd'
10
+ | 'onTouchMove'
11
+ | 'onTouchStart'
12
+ | 'onTransitionEnd'
13
+ | 'onKeyPress'
14
+ | 'onDoubleClick'
15
+ | 'onScroll'
16
+ | 'onResize'
17
+ > &
18
+ SwiperOptions & {
19
+ /**
20
+ * Swiper container tag
21
+ *
22
+ * @default 'div'
23
+ */
24
+ tag?: string;
25
+
26
+ /**
27
+ * Swiper wrapper tag
28
+ *
29
+ * @default 'div'
30
+ */
31
+ wrapperTag?: string;
32
+
33
+ /**
34
+ * Get Swiper instance
35
+ */
36
+ onSwiper?: (swiper: SwiperClass) => void;
37
+
38
+ /**
39
+ * Event will be fired in when autoplay started
40
+ */
41
+ onAutoplayStart?: (swiper: SwiperClass) => void;
42
+ /**
43
+ * Event will be fired when autoplay stopped
44
+ */
45
+ onAutoplayStop?: (swiper: SwiperClass) => void;
46
+ /**
47
+ * Event will be fired on autoplay pause
48
+ */
49
+ onAutoplayPause?: (swiper: SwiperClass) => void;
50
+ /**
51
+ * Event will be fired on autoplay resume
52
+ */
53
+ onAutoplayResume?: (swiper: SwiperClass) => void;
54
+ /**
55
+ * Event triggers continuously while autoplay is enabled. It contains time left (in ms) before transition to next slide and percentage of that time related to autoplay delay
56
+ */
57
+ onAutoplayTimeLeft?: (swiper: SwiperClass, timeLeft: number, percentage: number) => void;
58
+ /**
59
+ * Event will be fired when slide changed with autoplay
60
+ */
61
+ onAutoplay?: (swiper: SwiperClass) => void;/**
62
+ * Event will be fired on window hash change
63
+ */
64
+ onHashChange?: (swiper: SwiperClass) => void;
65
+ /**
66
+ * Event will be fired when swiper updates the hash
67
+ */
68
+ onHashSet?: (swiper: SwiperClass) => void;/**
69
+ * Event will be fired on key press
70
+ */
71
+ onKeyPress?: (swiper: SwiperClass, keyCode: string) => void;/**
72
+ * Event will be fired on mousewheel scroll
73
+ */
74
+ onScroll?: (swiper: SwiperClass, event: WheelEvent) => void;/**
75
+ * Event will be fired on navigation hide
76
+ */
77
+ onNavigationHide?: (swiper: SwiperClass) => void;
78
+ /**
79
+ * Event will be fired on navigation show
80
+ */
81
+ onNavigationShow?: (swiper: SwiperClass) => void;
82
+ /**
83
+ * Event will be fired on navigation prev button click
84
+ */
85
+ onNavigationPrev?: (swiper: SwiperClass) => void;
86
+ /**
87
+ * Event will be fired on navigation next button click
88
+ */
89
+ onNavigationNext?: (swiper: SwiperClass) => void;/**
90
+ * Event will be fired after pagination rendered
91
+ */
92
+ onPaginationRender?: (swiper: SwiperClass, paginationEl: HTMLElement) => void;
93
+
94
+ /**
95
+ * Event will be fired when pagination updated
96
+ */
97
+ onPaginationUpdate?: (swiper: SwiperClass, paginationEl: HTMLElement) => void;
98
+
99
+ /**
100
+ * Event will be fired on pagination hide
101
+ */
102
+ onPaginationHide?: (swiper: SwiperClass) => void;
103
+
104
+ /**
105
+ * Event will be fired on pagination show
106
+ */
107
+ onPaginationShow?: (swiper: SwiperClass) => void;/**
108
+ * Event will be fired on draggable scrollbar drag start
109
+ */
110
+ onScrollbarDragStart?: (swiper: SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
111
+
112
+ /**
113
+ * Event will be fired on draggable scrollbar drag move
114
+ */
115
+ onScrollbarDragMove?: (swiper: SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
116
+
117
+ /**
118
+ * Event will be fired on draggable scrollbar drag end
119
+ */
120
+ onScrollbarDragEnd?: (swiper: SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;/**
121
+ * Event will be fired on zoom change
122
+ */
123
+ onZoomChange?: (swiper: SwiperClass, scale: number, imageEl: HTMLElement, slideEl: HTMLElement) => void;
124
+
125
+ /**
126
+ * Fired right after Swiper initialization.
127
+ * @note Note that with `swiper.on('init')` syntax it will
128
+ * work only in case you set `init: false` parameter.
129
+ *
130
+ * @example
131
+ * ```js
132
+ * const swiper = new Swiper('.swiper', {
133
+ * init: false,
134
+ * // other parameters
135
+ * });
136
+ * swiper.on('init', function() {
137
+ * // do something
138
+ * });
139
+ * // init Swiper
140
+ * swiper.init();
141
+ * ```
142
+ *
143
+ * @example
144
+ * ```js
145
+ * // Otherwise use it as the parameter:
146
+ * const swiper = new Swiper('.swiper', {
147
+ * // other parameters
148
+ * on: {
149
+ * init: function () {
150
+ * // do something
151
+ * },
152
+ * }
153
+ * });
154
+ * ```
155
+ */
156
+ onInit?: (swiper: SwiperClass) => any;
157
+
158
+ /**
159
+ * Event will be fired right before Swiper destroyed
160
+ */
161
+ onBeforeDestroy?: (swiper: SwiperClass) => void;
162
+
163
+ /**
164
+ * Event will be fired when currently active slide is changed
165
+ */
166
+ onSlideChange?: (swiper: SwiperClass) => void;
167
+
168
+ /**
169
+ * Event will be fired in the beginning of animation to other slide (next or previous).
170
+ */
171
+ onSlideChangeTransitionStart?: (swiper: SwiperClass) => void;
172
+
173
+ /**
174
+ * Event will be fired after animation to other slide (next or previous).
175
+ */
176
+ onSlideChangeTransitionEnd?: (swiper: SwiperClass) => void;
177
+
178
+ /**
179
+ * Same as "slideChangeTransitionStart" but for "forward" direction only
180
+ */
181
+ onSlideNextTransitionStart?: (swiper: SwiperClass) => void;
182
+
183
+ /**
184
+ * Same as "slideChangeTransitionEnd" but for "forward" direction only
185
+ */
186
+ onSlideNextTransitionEnd?: (swiper: SwiperClass) => void;
187
+
188
+ /**
189
+ * Same as "slideChangeTransitionStart" but for "backward" direction only
190
+ */
191
+ onSlidePrevTransitionStart?: (swiper: SwiperClass) => void;
192
+
193
+ /**
194
+ * Same as "slideChangeTransitionEnd" but for "backward" direction only
195
+ */
196
+ onSlidePrevTransitionEnd?: (swiper: SwiperClass) => void;
197
+
198
+ /**
199
+ * Event will be fired in the beginning of transition.
200
+ */
201
+ onTransitionStart?: (swiper: SwiperClass) => void;
202
+
203
+ /**
204
+ * Event will be fired after transition.
205
+ */
206
+ onTransitionEnd?: (swiper: SwiperClass) => void;
207
+
208
+ /**
209
+ * Event will be fired when user touch Swiper. Receives `pointerdown` event as an arguments.
210
+ */
211
+ onTouchStart?: (swiper: SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
212
+
213
+ /**
214
+ * Event will be fired when user touch and move finger over Swiper. Receives `pointermove` event as an arguments.
215
+ */
216
+ onTouchMove?: (swiper: SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
217
+
218
+ /**
219
+ * Event will be fired when user touch and move finger over Swiper in direction opposite to direction parameter. Receives `pointermove` event as an arguments.
220
+ */
221
+ onTouchMoveOpposite?: (swiper: SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
222
+
223
+ /**
224
+ * Event will be fired when user touch and move finger over Swiper and move it. Receives `pointermove` event as an arguments.
225
+ */
226
+ onSliderMove?: (swiper: SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
227
+
228
+ /**
229
+ * Event will be fired when user release Swiper. Receives `pointerup` event as an arguments.
230
+ */
231
+ onTouchEnd?: (swiper: SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
232
+
233
+ /**
234
+ * Event will be fired when user click/tap on Swiper. Receives `pointerup` event as an arguments.
235
+ */
236
+ onClick?: (swiper: SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
237
+
238
+ /**
239
+ * Event will be fired when user click/tap on Swiper. Receives `pointerup` event as an arguments.
240
+ */
241
+ onTap?: (swiper: SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
242
+
243
+ /**
244
+ * Event will be fired when user double tap on Swiper's container. Receives `pointerup` event as an arguments
245
+ */
246
+ onDoubleTap?: (swiper: SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
247
+
248
+ /**
249
+ * Event will be fired when Swiper progress is changed, as an arguments it receives progress that is always from 0 to 1
250
+ */
251
+ onProgress?: (swiper: SwiperClass, progress: number) => void;
252
+
253
+ /**
254
+ * Event will be fired when Swiper reach its beginning (initial position)
255
+ */
256
+ onReachBeginning?: (swiper: SwiperClass) => void;
257
+
258
+ /**
259
+ * Event will be fired when Swiper reach last slide
260
+ */
261
+ onReachEnd?: (swiper: SwiperClass) => void;
262
+
263
+ /**
264
+ * Event will be fired when Swiper goes to beginning or end position
265
+ */
266
+ onToEdge?: (swiper: SwiperClass) => void;
267
+
268
+ /**
269
+ * Event will be fired when Swiper goes from beginning or end position
270
+ */
271
+ onFromEdge?: (swiper: SwiperClass) => void;
272
+
273
+ /**
274
+ * Event will be fired when swiper's wrapper change its position. Receives current translate value as an arguments
275
+ */
276
+ onSetTranslate?: (swiper: SwiperClass, translate: number) => void;
277
+
278
+ /**
279
+ * Event will be fired everytime when swiper starts animation. Receives current transition duration (in ms) as an arguments
280
+ */
281
+ onSetTransition?: (swiper: SwiperClass, transition: number) => void;
282
+
283
+ /**
284
+ * Event will be fired on window resize right before swiper's onresize manipulation
285
+ */
286
+ onResize?: (swiper: SwiperClass) => void;
287
+
288
+ /**
289
+ * Event will be fired if observer is enabled and it detects DOM mutations
290
+ */
291
+ onObserverUpdate?: (swiper: SwiperClass) => void;
292
+
293
+ /**
294
+ * Event will be fired right before "loop fix"
295
+ */
296
+ onBeforeLoopFix?: (swiper: SwiperClass) => void;
297
+
298
+ /**
299
+ * Event will be fired after "loop fix"
300
+ */
301
+ onLoopFix?: (swiper: SwiperClass) => void;
302
+
303
+ /**
304
+ * Event will be fired on breakpoint change
305
+ */
306
+ onBreakpoint?: (swiper: SwiperClass, breakpointParams: SwiperOptions) => void;
307
+
308
+ /**
309
+ * !INTERNAL: Event will fired right before breakpoint change
310
+ */
311
+ _beforeBreakpoint?: (swiper: SwiperClass, breakpointParams: SwiperOptions) => void;
312
+
313
+ /**
314
+ * !INTERNAL: Event will fired after setting CSS classes on swiper container element
315
+ */
316
+ _containerClasses?: (swiper: SwiperClass, classNames: string) => void;
317
+
318
+ /**
319
+ * !INTERNAL: Event will fired after setting CSS classes on swiper slide element
320
+ */
321
+ _slideClass?: (swiper: SwiperClass, slideEl: HTMLElement, classNames: string) => void;
322
+
323
+ /**
324
+ * !INTERNAL: Event will fired after setting CSS classes on all swiper slides
325
+ */
326
+ _slideClasses?: (
327
+ swiper: SwiperClass,
328
+ slides: { slideEl: HTMLElement; classNames: string; index: number }[],
329
+ ) => void;
330
+
331
+ /**
332
+ * !INTERNAL: Event will fired as soon as swiper instance available (before init)
333
+ */
334
+ _swiper?: (swiper: SwiperClass) => void;
335
+
336
+ /**
337
+ * !INTERNAL: Event will be fired on free mode touch end (release) and there will no be momentum
338
+ */
339
+ _freeModeNoMomentumRelease?: (swiper: SwiperClass) => void;
340
+
341
+ /**
342
+ * Event will fired on active index change
343
+ */
344
+ onActiveIndexChange?: (swiper: SwiperClass) => void;
345
+ /**
346
+ * Event will fired on snap index change
347
+ */
348
+ onSnapIndexChange?: (swiper: SwiperClass) => void;
349
+ /**
350
+ * Event will fired on real index change
351
+ */
352
+ onRealIndexChange?: (swiper: SwiperClass) => void;
353
+ /**
354
+ * Event will fired right after initialization
355
+ */
356
+ onAfterInit?: (swiper: SwiperClass) => void;
357
+ /**
358
+ * Event will fired right before initialization
359
+ */
360
+ onBeforeInit?: (swiper: SwiperClass) => void;
361
+ /**
362
+ * Event will fired before resize handler
363
+ */
364
+ onBeforeResize?: (swiper: SwiperClass) => void;
365
+ /**
366
+ * Event will fired before slide change transition start
367
+ */
368
+ onBeforeSlideChangeStart?: (swiper: SwiperClass) => void;
369
+ /**
370
+ * Event will fired before transition start
371
+ */
372
+ onBeforeTransitionStart?: (swiper: SwiperClass, speed: number, internal: any) => void; // what is internal?
373
+ /**
374
+ * Event will fired on direction change
375
+ */
376
+ onChangeDirection?: (swiper: SwiperClass) => void;
377
+ /**
378
+ * Event will be fired when user double click/tap on Swiper
379
+ */
380
+ onDoubleClick?: (swiper: SwiperClass, event: MouseEvent | TouchEvent | PointerEvent) => void;
381
+ /**
382
+ * Event will be fired on swiper destroy
383
+ */
384
+ onDestroy?: (swiper: SwiperClass) => void;
385
+ /**
386
+ * Event will be fired on momentum bounce
387
+ */
388
+ onMomentumBounce?: (swiper: SwiperClass) => void;
389
+ /**
390
+ * Event will be fired on orientation change (e.g. landscape -> portrait)
391
+ */
392
+ onOrientationchange?: (swiper: SwiperClass) => void;
393
+ /**
394
+ * Event will be fired in the beginning of animation of resetting slide to current one
395
+ */
396
+ onSlideResetTransitionStart?: (swiper: SwiperClass) => void;
397
+ /**
398
+ * Event will be fired in the end of animation of resetting slide to current one
399
+ */
400
+ onSlideResetTransitionEnd?: (swiper: SwiperClass) => void;
401
+ /**
402
+ * Event will be fired with first touch/drag move
403
+ */
404
+ onSliderFirstMove?: (swiper: SwiperClass, event: TouchEvent) => void;
405
+ /**
406
+ * Event will be fired when number of slides has changed
407
+ */
408
+ onSlidesLengthChange?: (swiper: SwiperClass) => void;
409
+ /**
410
+ * Event will be fired when slides grid has changed
411
+ */
412
+ onSlidesGridLengthChange?: (swiper: SwiperClass) => void;
413
+ /**
414
+ * Event will be fired when snap grid has changed
415
+ */
416
+ onSnapGridLengthChange?: (swiper: SwiperClass) => void;
417
+ /**
418
+ * Event will be fired after swiper.update() call
419
+ */
420
+ onUpdate?: (swiper: SwiperClass) => void;
421
+ /**
422
+ * Event will be fired when swiper is locked (when `watchOverflow` enabled)
423
+ */
424
+ onLock?: (swiper: SwiperClass) => void;
425
+ /**
426
+ * Event will be fired when swiper is unlocked (when `watchOverflow` enabled)
427
+ */
428
+ onUnlock?: (swiper: SwiperClass) => void;
429
+
430
+ };
431
+
432
+ interface SlideData {
433
+ isActive: boolean;
434
+ isVisible: boolean;
435
+ isPrev: boolean;
436
+ isNext: boolean;
437
+ }
438
+
439
+ type SwiperSlideProps = Omit<React.HTMLAttributes<HTMLElement>, 'children'> & {
440
+ /**
441
+ * Slide tag
442
+ *
443
+ * @default 'div'
444
+ */
445
+ tag?: string;
446
+
447
+ /**
448
+ * Enables additional wrapper required for zoom mode
449
+ *
450
+ * @default false
451
+ */
452
+ zoom?: boolean;
453
+
454
+ /**
455
+ * Adds lazy preloader to the slide
456
+ *
457
+ * @default false
458
+ */
459
+ lazy?: boolean;
460
+
461
+ /**
462
+ * Slide's index in slides array/collection
463
+ *
464
+ * @default false
465
+ */
466
+ virtualIndex?: number;
467
+
468
+ /**
469
+ * Slide's child element or render function
470
+ *
471
+ * @default undefined
472
+ */
473
+ children?: React.ReactNode | ((slideData: SlideData) => React.ReactNode);
474
+ };
475
+
476
+ interface SwiperRef extends React.HTMLAttributes<HTMLElement> {
477
+ swiper: SwiperClass;
478
+ }
479
+
480
+ declare const Swiper: React.FunctionComponent<
481
+ React.RefAttributes<SwiperRef> & React.PropsWithChildren<SwiperProps>
482
+ >;
483
+ declare const SwiperSlide: React.FunctionComponent<SwiperSlideProps>;
484
+
485
+ declare const useSwiper: () => SwiperClass;
486
+ declare const useSwiperSlide: () => SlideData;
487
+
488
+ export {
489
+ Swiper,
490
+ SwiperSlide,
491
+ SwiperProps,
492
+ SwiperSlideProps,
493
+ SwiperRef,
494
+ useSwiper,
495
+ useSwiperSlide,
496
+ SwiperClass,
497
+ };