@itcase/ui 1.1.5 → 1.1.6
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/dist/components/DadataHintField.js +5 -2
- package/dist/components/DatePicker.js +4981 -125
- package/dist/components/Flex.js +18 -17
- package/dist/components/Grid.js +5 -1
- package/dist/components/Group.js +54 -54
- package/dist/components/Image.js +0 -8
- package/dist/components/MenuItem.js +1 -1
- package/dist/components/Response.js +3 -3
- package/dist/components/ScrollOnDrag.js +18 -1
- package/dist/components/Swiper.js +45 -40
- package/dist/css/components/DatePicker/DatePicker.css +11 -10
- package/dist/css/components/Grid/Grid.css +9 -17
- package/dist/css/components/MenuItem/MenuItem.css +5 -5
- package/dist/css/components/Modal/Modal.css +1 -0
- package/dist/css/components/ScrollOnDrag/ScrollOnDrag.css +11 -1
- package/dist/css/components/Select/Select.css +1 -1
- package/dist/css/components/Select/css/__single-value/select__single-value.css +1 -1
- package/dist/css/components/Swiper/Swiper.css +2 -2
- package/dist/hooks/styleAttributes.js +3 -3
- package/package.json +21 -21
- package/dist/_commonjsHelpers-CFO10eej.js +0 -7
package/dist/components/Flex.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var PropTypes = require('prop-types');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
|
-
var
|
|
6
|
+
var alignDirection = require('../constants/componentProps/alignDirection.js');
|
|
7
7
|
var fill = require('../constants/componentProps/fill.js');
|
|
8
8
|
var flexAlign = require('../constants/componentProps/flexAlign.js');
|
|
9
9
|
var flexJustifyContent = require('../constants/componentProps/flexJustifyContent.js');
|
|
@@ -13,6 +13,7 @@ var width = require('../constants/componentProps/width.js');
|
|
|
13
13
|
var position = require('../constants/componentProps/position.js');
|
|
14
14
|
var useStyles = require('../hooks/useStyles.js');
|
|
15
15
|
var useDeviceTargetClass = require('../hooks/useDeviceTargetClass.js');
|
|
16
|
+
var direction = require('../constants/componentProps/direction.js');
|
|
16
17
|
var horizontalResizeMode = require('../constants/componentProps/horizontalResizeMode.js');
|
|
17
18
|
require('lodash/camelCase');
|
|
18
19
|
require('lodash/maxBy');
|
|
@@ -102,20 +103,20 @@ function Flex(props) {
|
|
|
102
103
|
}
|
|
103
104
|
Flex.propTypes = {
|
|
104
105
|
id: PropTypes__default.default.string,
|
|
105
|
-
alignContent: PropTypes__default.default.oneOf(
|
|
106
|
-
alignContentDesktop: PropTypes__default.default.oneOf(
|
|
107
|
-
alignContentMobile: PropTypes__default.default.oneOf(
|
|
108
|
-
alignContentTablet: PropTypes__default.default.oneOf(
|
|
106
|
+
alignContent: PropTypes__default.default.oneOf(flexJustifyContent.default),
|
|
107
|
+
alignContentDesktop: PropTypes__default.default.oneOf(flexJustifyContent.default),
|
|
108
|
+
alignContentMobile: PropTypes__default.default.oneOf(flexJustifyContent.default),
|
|
109
|
+
alignContentTablet: PropTypes__default.default.oneOf(flexJustifyContent.default),
|
|
109
110
|
alignItems: PropTypes__default.default.oneOf(flexAlign.default),
|
|
110
111
|
alignItemsDesktop: PropTypes__default.default.oneOf(flexAlign.default),
|
|
111
112
|
alignItemsMobile: PropTypes__default.default.oneOf(flexAlign.default),
|
|
112
113
|
alignItemsTablet: PropTypes__default.default.oneOf(flexAlign.default),
|
|
113
114
|
children: PropTypes__default.default.any,
|
|
114
115
|
className: PropTypes__default.default.string,
|
|
115
|
-
direction: PropTypes__default.default.oneOf(
|
|
116
|
-
directionDesktop: PropTypes__default.default.oneOf(
|
|
117
|
-
directionMobile: PropTypes__default.default.oneOf(
|
|
118
|
-
directionTablet: PropTypes__default.default.oneOf(
|
|
116
|
+
direction: PropTypes__default.default.oneOf(alignDirection.default),
|
|
117
|
+
directionDesktop: PropTypes__default.default.oneOf(alignDirection.default),
|
|
118
|
+
directionMobile: PropTypes__default.default.oneOf(alignDirection.default),
|
|
119
|
+
directionTablet: PropTypes__default.default.oneOf(alignDirection.default),
|
|
119
120
|
fill: PropTypes__default.default.oneOf(fill.default),
|
|
120
121
|
fillDesktop: PropTypes__default.default.oneOf(fill.default),
|
|
121
122
|
fillMobile: PropTypes__default.default.oneOf(fill.default),
|
|
@@ -183,7 +184,7 @@ Flex.__docgenInfo = {
|
|
|
183
184
|
"type": {
|
|
184
185
|
"name": "enum",
|
|
185
186
|
"computed": true,
|
|
186
|
-
"value": "
|
|
187
|
+
"value": "flexJustifyContentProps"
|
|
187
188
|
},
|
|
188
189
|
"required": false
|
|
189
190
|
},
|
|
@@ -192,7 +193,7 @@ Flex.__docgenInfo = {
|
|
|
192
193
|
"type": {
|
|
193
194
|
"name": "enum",
|
|
194
195
|
"computed": true,
|
|
195
|
-
"value": "
|
|
196
|
+
"value": "flexJustifyContentProps"
|
|
196
197
|
},
|
|
197
198
|
"required": false
|
|
198
199
|
},
|
|
@@ -201,7 +202,7 @@ Flex.__docgenInfo = {
|
|
|
201
202
|
"type": {
|
|
202
203
|
"name": "enum",
|
|
203
204
|
"computed": true,
|
|
204
|
-
"value": "
|
|
205
|
+
"value": "flexJustifyContentProps"
|
|
205
206
|
},
|
|
206
207
|
"required": false
|
|
207
208
|
},
|
|
@@ -210,7 +211,7 @@ Flex.__docgenInfo = {
|
|
|
210
211
|
"type": {
|
|
211
212
|
"name": "enum",
|
|
212
213
|
"computed": true,
|
|
213
|
-
"value": "
|
|
214
|
+
"value": "flexJustifyContentProps"
|
|
214
215
|
},
|
|
215
216
|
"required": false
|
|
216
217
|
},
|
|
@@ -269,7 +270,7 @@ Flex.__docgenInfo = {
|
|
|
269
270
|
"type": {
|
|
270
271
|
"name": "enum",
|
|
271
272
|
"computed": true,
|
|
272
|
-
"value": "
|
|
273
|
+
"value": "alignDirectionProps"
|
|
273
274
|
},
|
|
274
275
|
"required": false
|
|
275
276
|
},
|
|
@@ -278,7 +279,7 @@ Flex.__docgenInfo = {
|
|
|
278
279
|
"type": {
|
|
279
280
|
"name": "enum",
|
|
280
281
|
"computed": true,
|
|
281
|
-
"value": "
|
|
282
|
+
"value": "alignDirectionProps"
|
|
282
283
|
},
|
|
283
284
|
"required": false
|
|
284
285
|
},
|
|
@@ -287,7 +288,7 @@ Flex.__docgenInfo = {
|
|
|
287
288
|
"type": {
|
|
288
289
|
"name": "enum",
|
|
289
290
|
"computed": true,
|
|
290
|
-
"value": "
|
|
291
|
+
"value": "alignDirectionProps"
|
|
291
292
|
},
|
|
292
293
|
"required": false
|
|
293
294
|
},
|
|
@@ -296,7 +297,7 @@ Flex.__docgenInfo = {
|
|
|
296
297
|
"type": {
|
|
297
298
|
"name": "enum",
|
|
298
299
|
"computed": true,
|
|
299
|
-
"value": "
|
|
300
|
+
"value": "alignDirectionProps"
|
|
300
301
|
},
|
|
301
302
|
"required": false
|
|
302
303
|
},
|
package/dist/components/Grid.js
CHANGED
|
@@ -80,6 +80,10 @@ function Grid(props) {
|
|
|
80
80
|
prefix: 'fill_',
|
|
81
81
|
propsKey: 'fill'
|
|
82
82
|
});
|
|
83
|
+
const borderColorClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
84
|
+
prefix: 'border-color_',
|
|
85
|
+
propsKey: 'borderColor'
|
|
86
|
+
});
|
|
83
87
|
useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
84
88
|
prefix: 'fill_',
|
|
85
89
|
propsKey: 'fillWrapper'
|
|
@@ -102,7 +106,7 @@ function Grid(props) {
|
|
|
102
106
|
gridWrapperInner: gridWrapperInnerStyles
|
|
103
107
|
} = useStyles.useStyles(props);
|
|
104
108
|
return /*#__PURE__*/React__default.default.createElement(Tag, {
|
|
105
|
-
className: clsx__default.default(className, 'grid', useGridSystem && `grid_state_system`, horizontalScroll && `grid_scroll_horizontal`, type && `grid_type_${type}`, columnsClass, rowsClass, rowGapClass, columnGapClass, alignContentClass, alignItemsClass, justifyContentClass, justifyItemsClass, fillClass, horizontalResizing && `grid_horizontal-resizing_${horizontalResizing}`, verticalResizing && `grid_vertical-resizing_${verticalResizing}`),
|
|
109
|
+
className: clsx__default.default(className, 'grid', useGridSystem && `grid_state_system`, horizontalScroll && `grid_scroll_horizontal`, type && `grid_type_${type}`, columnsClass, rowsClass, rowGapClass, columnGapClass, alignContentClass, alignItemsClass, borderColorClass, justifyContentClass, justifyItemsClass, fillClass, horizontalResizing && `grid_horizontal-resizing_${horizontalResizing}`, verticalResizing && `grid_vertical-resizing_${verticalResizing}`),
|
|
106
110
|
"data-tour": dataTour,
|
|
107
111
|
id: id,
|
|
108
112
|
style: gridStyles,
|
package/dist/components/Group.js
CHANGED
|
@@ -135,23 +135,23 @@ function Group(props) {
|
|
|
135
135
|
}, children) : children);
|
|
136
136
|
}
|
|
137
137
|
Group.propTypes = {
|
|
138
|
-
id: PropTypes__default.default.string,
|
|
139
138
|
children: PropTypes__default.default.any,
|
|
140
139
|
className: PropTypes__default.default.string,
|
|
140
|
+
columns: PropTypes__default.default.number,
|
|
141
|
+
contentAlign: PropTypes__default.default.oneOf([null, 'center']),
|
|
141
142
|
direction: PropTypes__default.default.oneOf(direction.default),
|
|
142
143
|
fill: PropTypes__default.default.oneOf(fill.default),
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
horizontalScroll: PropTypes__default.default.bool,
|
|
145
|
+
htmlFor: PropTypes__default.default.oneOfType([PropTypes__default.default.string, PropTypes__default.default.number]),
|
|
146
|
+
id: PropTypes__default.default.string,
|
|
147
|
+
set: PropTypes__default.default.string,
|
|
147
148
|
shape: PropTypes__default.default.oneOf(shape.default),
|
|
148
149
|
spaceBetweenItems: PropTypes__default.default.string,
|
|
150
|
+
stacking: PropTypes__default.default.oneOf(stacking.default),
|
|
151
|
+
tag: PropTypes__default.default.string,
|
|
149
152
|
width: PropTypes__default.default.oneOf(width.default),
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
horizontalScroll: PropTypes__default.default.bool,
|
|
153
|
-
onClick: PropTypes__default.default.func,
|
|
154
|
-
htmlFor: PropTypes__default.default.oneOfType([PropTypes__default.default.string, PropTypes__default.default.number])
|
|
153
|
+
wrap: PropTypes__default.default.oneOf(wrap.default),
|
|
154
|
+
onClick: PropTypes__default.default.func
|
|
155
155
|
};
|
|
156
156
|
Group.defaultProps = {
|
|
157
157
|
tag: 'div'
|
|
@@ -172,24 +172,38 @@ Group.__docgenInfo = {
|
|
|
172
172
|
},
|
|
173
173
|
"required": false
|
|
174
174
|
},
|
|
175
|
-
"
|
|
175
|
+
"children": {
|
|
176
|
+
"description": "",
|
|
177
|
+
"type": {
|
|
178
|
+
"name": "any"
|
|
179
|
+
},
|
|
180
|
+
"required": false
|
|
181
|
+
},
|
|
182
|
+
"className": {
|
|
176
183
|
"description": "",
|
|
177
184
|
"type": {
|
|
178
185
|
"name": "string"
|
|
179
186
|
},
|
|
180
187
|
"required": false
|
|
181
188
|
},
|
|
182
|
-
"
|
|
189
|
+
"columns": {
|
|
183
190
|
"description": "",
|
|
184
191
|
"type": {
|
|
185
|
-
"name": "
|
|
192
|
+
"name": "number"
|
|
186
193
|
},
|
|
187
194
|
"required": false
|
|
188
195
|
},
|
|
189
|
-
"
|
|
196
|
+
"contentAlign": {
|
|
190
197
|
"description": "",
|
|
191
198
|
"type": {
|
|
192
|
-
"name": "
|
|
199
|
+
"name": "enum",
|
|
200
|
+
"value": [{
|
|
201
|
+
"value": "null",
|
|
202
|
+
"computed": false
|
|
203
|
+
}, {
|
|
204
|
+
"value": "'center'",
|
|
205
|
+
"computed": false
|
|
206
|
+
}]
|
|
193
207
|
},
|
|
194
208
|
"required": false
|
|
195
209
|
},
|
|
@@ -211,35 +225,36 @@ Group.__docgenInfo = {
|
|
|
211
225
|
},
|
|
212
226
|
"required": false
|
|
213
227
|
},
|
|
214
|
-
"
|
|
228
|
+
"horizontalScroll": {
|
|
215
229
|
"description": "",
|
|
216
230
|
"type": {
|
|
217
|
-
"name": "
|
|
231
|
+
"name": "bool"
|
|
232
|
+
},
|
|
233
|
+
"required": false
|
|
234
|
+
},
|
|
235
|
+
"htmlFor": {
|
|
236
|
+
"description": "",
|
|
237
|
+
"type": {
|
|
238
|
+
"name": "union",
|
|
218
239
|
"value": [{
|
|
219
|
-
"
|
|
220
|
-
"computed": false
|
|
240
|
+
"name": "string"
|
|
221
241
|
}, {
|
|
222
|
-
"
|
|
223
|
-
"computed": false
|
|
242
|
+
"name": "number"
|
|
224
243
|
}]
|
|
225
244
|
},
|
|
226
245
|
"required": false
|
|
227
246
|
},
|
|
228
|
-
"
|
|
247
|
+
"id": {
|
|
229
248
|
"description": "",
|
|
230
249
|
"type": {
|
|
231
|
-
"name": "
|
|
232
|
-
"computed": true,
|
|
233
|
-
"value": "stackingProps"
|
|
250
|
+
"name": "string"
|
|
234
251
|
},
|
|
235
252
|
"required": false
|
|
236
253
|
},
|
|
237
|
-
"
|
|
254
|
+
"set": {
|
|
238
255
|
"description": "",
|
|
239
256
|
"type": {
|
|
240
|
-
"name": "
|
|
241
|
-
"computed": true,
|
|
242
|
-
"value": "wrapProps"
|
|
257
|
+
"name": "string"
|
|
243
258
|
},
|
|
244
259
|
"required": false
|
|
245
260
|
},
|
|
@@ -259,33 +274,30 @@ Group.__docgenInfo = {
|
|
|
259
274
|
},
|
|
260
275
|
"required": false
|
|
261
276
|
},
|
|
262
|
-
"
|
|
277
|
+
"stacking": {
|
|
263
278
|
"description": "",
|
|
264
279
|
"type": {
|
|
265
280
|
"name": "enum",
|
|
266
281
|
"computed": true,
|
|
267
|
-
"value": "
|
|
268
|
-
},
|
|
269
|
-
"required": false
|
|
270
|
-
},
|
|
271
|
-
"columns": {
|
|
272
|
-
"description": "",
|
|
273
|
-
"type": {
|
|
274
|
-
"name": "number"
|
|
282
|
+
"value": "stackingProps"
|
|
275
283
|
},
|
|
276
284
|
"required": false
|
|
277
285
|
},
|
|
278
|
-
"
|
|
286
|
+
"width": {
|
|
279
287
|
"description": "",
|
|
280
288
|
"type": {
|
|
281
|
-
"name": "
|
|
289
|
+
"name": "enum",
|
|
290
|
+
"computed": true,
|
|
291
|
+
"value": "widthProps"
|
|
282
292
|
},
|
|
283
293
|
"required": false
|
|
284
294
|
},
|
|
285
|
-
"
|
|
295
|
+
"wrap": {
|
|
286
296
|
"description": "",
|
|
287
297
|
"type": {
|
|
288
|
-
"name": "
|
|
298
|
+
"name": "enum",
|
|
299
|
+
"computed": true,
|
|
300
|
+
"value": "wrapProps"
|
|
289
301
|
},
|
|
290
302
|
"required": false
|
|
291
303
|
},
|
|
@@ -295,18 +307,6 @@ Group.__docgenInfo = {
|
|
|
295
307
|
"name": "func"
|
|
296
308
|
},
|
|
297
309
|
"required": false
|
|
298
|
-
},
|
|
299
|
-
"htmlFor": {
|
|
300
|
-
"description": "",
|
|
301
|
-
"type": {
|
|
302
|
-
"name": "union",
|
|
303
|
-
"value": [{
|
|
304
|
-
"name": "string"
|
|
305
|
-
}, {
|
|
306
|
-
"name": "number"
|
|
307
|
-
}]
|
|
308
|
-
},
|
|
309
|
-
"required": false
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
312
|
};
|
package/dist/components/Image.js
CHANGED
|
@@ -139,7 +139,6 @@ Image.propTypes = {
|
|
|
139
139
|
shapeDesktop: PropTypes__default.default.oneOf(shape.default),
|
|
140
140
|
shapeMobile: PropTypes__default.default.oneOf(shape.default),
|
|
141
141
|
shapeTablet: PropTypes__default.default.oneOf(shape.default),
|
|
142
|
-
size: PropTypes__default.default.string,
|
|
143
142
|
src: PropTypes__default.default.string,
|
|
144
143
|
style: PropTypes__default.default.object,
|
|
145
144
|
title: PropTypes__default.default.string,
|
|
@@ -348,13 +347,6 @@ Image.__docgenInfo = {
|
|
|
348
347
|
},
|
|
349
348
|
"required": false
|
|
350
349
|
},
|
|
351
|
-
"size": {
|
|
352
|
-
"description": "",
|
|
353
|
-
"type": {
|
|
354
|
-
"name": "string"
|
|
355
|
-
},
|
|
356
|
-
"required": false
|
|
357
|
-
},
|
|
358
350
|
"src": {
|
|
359
351
|
"description": "",
|
|
360
352
|
"type": {
|
|
@@ -151,7 +151,7 @@ function MenuItem(props) {
|
|
|
151
151
|
size: textSize,
|
|
152
152
|
textColor: textColor || appearance && menuItemConfig.appearance[appearance].textColor.replace(/([A-Z])/g, '-$1').toLowerCase(),
|
|
153
153
|
textColorActive: isActive && (textColorActive || appearance && menuItemConfig.appearance[appearance].textColorActive.replace(/([A-Z])/g, '-$1').toLowerCase()),
|
|
154
|
-
textColorHover: textColorHover || appearance && menuItemConfig.appearance[appearance].
|
|
154
|
+
textColorHover: textColorHover || appearance && menuItemConfig.appearance[appearance].textColorHover.replace(/([A-Z])/g, '-$1').toLowerCase(),
|
|
155
155
|
textGradient: textGradient,
|
|
156
156
|
textStyle: textStyle,
|
|
157
157
|
textWeight: textWeight,
|
|
@@ -162,7 +162,7 @@ function Response(props) {
|
|
|
162
162
|
className: "response__message",
|
|
163
163
|
size: messageTextSize || responseConfig.appearance[appearance]?.messageTextSize || 'xxl',
|
|
164
164
|
textColor: messageTextColor || responseConfig.appearance[appearance]?.messageTextColor
|
|
165
|
-
}, message)), (primaryButtonLabel ||
|
|
165
|
+
}, message)), (primaryButtonLabel || primaryButton || secondaryButtonLabel || secondaryButton || responseConfig.appearance[appearance]) && /*#__PURE__*/React__default.default.createElement(index.Group, {
|
|
166
166
|
className: "response__button",
|
|
167
167
|
width: "fill"
|
|
168
168
|
}, primaryButtonLabel || responseConfig.appearance[appearance].primaryButtonLabel ? /*#__PURE__*/React__default.default.createElement(index$3.Button, {
|
|
@@ -172,7 +172,7 @@ function Response(props) {
|
|
|
172
172
|
className: "response__button-item",
|
|
173
173
|
fill: primaryButtonFill,
|
|
174
174
|
fillHover: primaryButtonFillHover,
|
|
175
|
-
label: primaryButtonLabel || responseConfig.appearance[appearance]
|
|
175
|
+
label: primaryButtonLabel || responseConfig.appearance[appearance]?.primaryButtonLabel,
|
|
176
176
|
labelTextColor: primaryButtonLabelTextColor,
|
|
177
177
|
labelTextSize: primaryButtonLabelTextSize || responseConfig.appearance[appearance]?.primaryButtonLabelTextSize,
|
|
178
178
|
shape: primaryButtonShape || responseConfig.appearance[appearance]?.primaryButtonShape,
|
|
@@ -186,7 +186,7 @@ function Response(props) {
|
|
|
186
186
|
className: "response__button-item",
|
|
187
187
|
fill: secondaryButtonFill,
|
|
188
188
|
fillHover: secondaryButtonFillHover,
|
|
189
|
-
label: secondaryButtonLabel || responseConfig.appearance[appearance]
|
|
189
|
+
label: secondaryButtonLabel || responseConfig.appearance[appearance]?.secondaryButtonLabel,
|
|
190
190
|
labelTextColor: secondaryButtonLabelTextColor,
|
|
191
191
|
labelTextSize: secondaryButtonLabelTextSize || responseConfig.appearance[appearance]?.secondaryButtonLabelTextSize,
|
|
192
192
|
shape: secondaryButtonShape || responseConfig.appearance[appearance]?.secondaryButtonShape,
|
|
@@ -126,6 +126,7 @@ function ScrollOnDrag(props) {
|
|
|
126
126
|
const {
|
|
127
127
|
children,
|
|
128
128
|
className,
|
|
129
|
+
isScrollHidden,
|
|
129
130
|
speed
|
|
130
131
|
} = props;
|
|
131
132
|
const ref = React.useRef(null);
|
|
@@ -175,7 +176,7 @@ function ScrollOnDrag(props) {
|
|
|
175
176
|
styles: groupStyles
|
|
176
177
|
} = useStyles.useStyles(props);
|
|
177
178
|
return /*#__PURE__*/React__default.default.createElement("div", Object.assign({
|
|
178
|
-
className: clsx__default.default(className, 'scrolldrag', borderColorClass, borderTypeClass, borderWidthClass, elevationClass, fillClass, fillHoverClass, heightClass, widthClass)
|
|
179
|
+
className: clsx__default.default(className, 'scrolldrag', isScrollHidden === true && 'scrolldrag_scroll_hidden', borderColorClass, borderTypeClass, borderWidthClass, elevationClass, fillClass, fillHoverClass, heightClass, widthClass)
|
|
179
180
|
}, events, {
|
|
180
181
|
ref: ref,
|
|
181
182
|
style: groupStyles
|
|
@@ -191,6 +192,8 @@ ScrollOnDrag.propTypes = {
|
|
|
191
192
|
fill: PropTypes__default.default.oneOf(fill.default),
|
|
192
193
|
fillHover: PropTypes__default.default.oneOf(fillHover.default),
|
|
193
194
|
height: PropTypes__default.default.oneOf(height.default),
|
|
195
|
+
isScrollHidden: PropTypes__default.default.bool,
|
|
196
|
+
speed: PropTypes__default.default.number,
|
|
194
197
|
width: PropTypes__default.default.oneOf(width.default)
|
|
195
198
|
};
|
|
196
199
|
ScrollOnDrag.__docgenInfo = {
|
|
@@ -275,6 +278,20 @@ ScrollOnDrag.__docgenInfo = {
|
|
|
275
278
|
},
|
|
276
279
|
"required": false
|
|
277
280
|
},
|
|
281
|
+
"isScrollHidden": {
|
|
282
|
+
"description": "",
|
|
283
|
+
"type": {
|
|
284
|
+
"name": "bool"
|
|
285
|
+
},
|
|
286
|
+
"required": false
|
|
287
|
+
},
|
|
288
|
+
"speed": {
|
|
289
|
+
"description": "",
|
|
290
|
+
"type": {
|
|
291
|
+
"name": "number"
|
|
292
|
+
},
|
|
293
|
+
"required": false
|
|
294
|
+
},
|
|
278
295
|
"width": {
|
|
279
296
|
"description": "",
|
|
280
297
|
"type": {
|
|
@@ -1259,6 +1259,13 @@ function updateProgress(translate) {
|
|
|
1259
1259
|
swiper.emit('progress', progress);
|
|
1260
1260
|
}
|
|
1261
1261
|
|
|
1262
|
+
const toggleSlideClasses = (slideEl, condition, className) => {
|
|
1263
|
+
if (condition && !slideEl.classList.contains(className)) {
|
|
1264
|
+
slideEl.classList.add(className);
|
|
1265
|
+
} else if (!condition && slideEl.classList.contains(className)) {
|
|
1266
|
+
slideEl.classList.remove(className);
|
|
1267
|
+
}
|
|
1268
|
+
};
|
|
1262
1269
|
function updateSlidesClasses() {
|
|
1263
1270
|
const swiper = this;
|
|
1264
1271
|
const {
|
|
@@ -1272,9 +1279,6 @@ function updateSlidesClasses() {
|
|
|
1272
1279
|
const getFilteredSlide = selector => {
|
|
1273
1280
|
return elementChildren(slidesEl, `.${params.slideClass}${selector}, swiper-slide${selector}`)[0];
|
|
1274
1281
|
};
|
|
1275
|
-
slides.forEach(slideEl => {
|
|
1276
|
-
slideEl.classList.remove(params.slideActiveClass, params.slideNextClass, params.slidePrevClass);
|
|
1277
|
-
});
|
|
1278
1282
|
let activeSlide;
|
|
1279
1283
|
let prevSlide;
|
|
1280
1284
|
let nextSlide;
|
|
@@ -1297,35 +1301,25 @@ function updateSlidesClasses() {
|
|
|
1297
1301
|
}
|
|
1298
1302
|
}
|
|
1299
1303
|
if (activeSlide) {
|
|
1300
|
-
|
|
1301
|
-
activeSlide.classList.add(params.slideActiveClass);
|
|
1302
|
-
if (gridEnabled) {
|
|
1303
|
-
if (nextSlide) {
|
|
1304
|
-
nextSlide.classList.add(params.slideNextClass);
|
|
1305
|
-
}
|
|
1306
|
-
if (prevSlide) {
|
|
1307
|
-
prevSlide.classList.add(params.slidePrevClass);
|
|
1308
|
-
}
|
|
1309
|
-
} else {
|
|
1304
|
+
if (!gridEnabled) {
|
|
1310
1305
|
// Next Slide
|
|
1311
1306
|
nextSlide = elementNextAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];
|
|
1312
1307
|
if (params.loop && !nextSlide) {
|
|
1313
1308
|
nextSlide = slides[0];
|
|
1314
1309
|
}
|
|
1315
|
-
if (nextSlide) {
|
|
1316
|
-
nextSlide.classList.add(params.slideNextClass);
|
|
1317
|
-
}
|
|
1318
1310
|
|
|
1319
1311
|
// Prev Slide
|
|
1320
1312
|
prevSlide = elementPrevAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];
|
|
1321
1313
|
if (params.loop && !prevSlide === 0) {
|
|
1322
1314
|
prevSlide = slides[slides.length - 1];
|
|
1323
1315
|
}
|
|
1324
|
-
if (prevSlide) {
|
|
1325
|
-
prevSlide.classList.add(params.slidePrevClass);
|
|
1326
|
-
}
|
|
1327
1316
|
}
|
|
1328
1317
|
}
|
|
1318
|
+
slides.forEach(slideEl => {
|
|
1319
|
+
toggleSlideClasses(slideEl, slideEl === activeSlide, params.slideActiveClass);
|
|
1320
|
+
toggleSlideClasses(slideEl, slideEl === nextSlide, params.slideNextClass);
|
|
1321
|
+
toggleSlideClasses(slideEl, slideEl === prevSlide, params.slidePrevClass);
|
|
1322
|
+
});
|
|
1329
1323
|
swiper.emitSlidesClasses();
|
|
1330
1324
|
}
|
|
1331
1325
|
|
|
@@ -1703,6 +1697,7 @@ function translateTo(translate, speed, runCallbacks, translateBounds, internal)
|
|
|
1703
1697
|
swiper.wrapperEl.removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);
|
|
1704
1698
|
swiper.onTranslateToWrapperTransitionEnd = null;
|
|
1705
1699
|
delete swiper.onTranslateToWrapperTransitionEnd;
|
|
1700
|
+
swiper.animating = false;
|
|
1706
1701
|
if (runCallbacks) {
|
|
1707
1702
|
swiper.emit('transitionEnd');
|
|
1708
1703
|
}
|
|
@@ -1810,9 +1805,6 @@ function slideTo(index, speed, runCallbacks, internal, initial) {
|
|
|
1810
1805
|
if (index === void 0) {
|
|
1811
1806
|
index = 0;
|
|
1812
1807
|
}
|
|
1813
|
-
if (speed === void 0) {
|
|
1814
|
-
speed = this.params.speed;
|
|
1815
|
-
}
|
|
1816
1808
|
if (runCallbacks === void 0) {
|
|
1817
1809
|
runCallbacks = true;
|
|
1818
1810
|
}
|
|
@@ -1832,9 +1824,12 @@ function slideTo(index, speed, runCallbacks, internal, initial) {
|
|
|
1832
1824
|
wrapperEl,
|
|
1833
1825
|
enabled
|
|
1834
1826
|
} = swiper;
|
|
1835
|
-
if (
|
|
1827
|
+
if (!enabled && !internal && !initial || swiper.destroyed || swiper.animating && params.preventInteractionOnTransition) {
|
|
1836
1828
|
return false;
|
|
1837
1829
|
}
|
|
1830
|
+
if (typeof speed === 'undefined') {
|
|
1831
|
+
speed = swiper.params.speed;
|
|
1832
|
+
}
|
|
1838
1833
|
const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex);
|
|
1839
1834
|
let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup);
|
|
1840
1835
|
if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;
|
|
@@ -1961,9 +1956,6 @@ function slideToLoop(index, speed, runCallbacks, internal) {
|
|
|
1961
1956
|
if (index === void 0) {
|
|
1962
1957
|
index = 0;
|
|
1963
1958
|
}
|
|
1964
|
-
if (speed === void 0) {
|
|
1965
|
-
speed = this.params.speed;
|
|
1966
|
-
}
|
|
1967
1959
|
if (runCallbacks === void 0) {
|
|
1968
1960
|
runCallbacks = true;
|
|
1969
1961
|
}
|
|
@@ -1973,6 +1965,9 @@ function slideToLoop(index, speed, runCallbacks, internal) {
|
|
|
1973
1965
|
}
|
|
1974
1966
|
const swiper = this;
|
|
1975
1967
|
if (swiper.destroyed) return;
|
|
1968
|
+
if (typeof speed === 'undefined') {
|
|
1969
|
+
speed = swiper.params.speed;
|
|
1970
|
+
}
|
|
1976
1971
|
const gridEnabled = swiper.grid && swiper.params.grid && swiper.params.grid.rows > 1;
|
|
1977
1972
|
let newIndex = index;
|
|
1978
1973
|
if (swiper.params.loop) {
|
|
@@ -2004,6 +1999,9 @@ function slideToLoop(index, speed, runCallbacks, internal) {
|
|
|
2004
1999
|
if (centeredSlides) {
|
|
2005
2000
|
needLoopFix = needLoopFix || targetSlideIndex < Math.ceil(slidesPerView / 2);
|
|
2006
2001
|
}
|
|
2002
|
+
if (internal && centeredSlides && swiper.params.slidesPerView !== 'auto' && !gridEnabled) {
|
|
2003
|
+
needLoopFix = false;
|
|
2004
|
+
}
|
|
2007
2005
|
if (needLoopFix) {
|
|
2008
2006
|
const direction = centeredSlides ? targetSlideIndex < swiper.activeIndex ? 'prev' : 'next' : targetSlideIndex - swiper.activeIndex - 1 < swiper.params.slidesPerView ? 'next' : 'prev';
|
|
2009
2007
|
swiper.loopFix({
|
|
@@ -2029,9 +2027,6 @@ function slideToLoop(index, speed, runCallbacks, internal) {
|
|
|
2029
2027
|
|
|
2030
2028
|
/* eslint no-unused-vars: "off" */
|
|
2031
2029
|
function slideNext(speed, runCallbacks, internal) {
|
|
2032
|
-
if (speed === void 0) {
|
|
2033
|
-
speed = this.params.speed;
|
|
2034
|
-
}
|
|
2035
2030
|
if (runCallbacks === void 0) {
|
|
2036
2031
|
runCallbacks = true;
|
|
2037
2032
|
}
|
|
@@ -2042,6 +2037,9 @@ function slideNext(speed, runCallbacks, internal) {
|
|
|
2042
2037
|
animating
|
|
2043
2038
|
} = swiper;
|
|
2044
2039
|
if (!enabled || swiper.destroyed) return swiper;
|
|
2040
|
+
if (typeof speed === 'undefined') {
|
|
2041
|
+
speed = swiper.params.speed;
|
|
2042
|
+
}
|
|
2045
2043
|
let perGroup = params.slidesPerGroup;
|
|
2046
2044
|
if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {
|
|
2047
2045
|
perGroup = Math.max(swiper.slidesPerViewDynamic('current', true), 1);
|
|
@@ -2070,9 +2068,6 @@ function slideNext(speed, runCallbacks, internal) {
|
|
|
2070
2068
|
|
|
2071
2069
|
/* eslint no-unused-vars: "off" */
|
|
2072
2070
|
function slidePrev(speed, runCallbacks, internal) {
|
|
2073
|
-
if (speed === void 0) {
|
|
2074
|
-
speed = this.params.speed;
|
|
2075
|
-
}
|
|
2076
2071
|
if (runCallbacks === void 0) {
|
|
2077
2072
|
runCallbacks = true;
|
|
2078
2073
|
}
|
|
@@ -2086,6 +2081,9 @@ function slidePrev(speed, runCallbacks, internal) {
|
|
|
2086
2081
|
animating
|
|
2087
2082
|
} = swiper;
|
|
2088
2083
|
if (!enabled || swiper.destroyed) return swiper;
|
|
2084
|
+
if (typeof speed === 'undefined') {
|
|
2085
|
+
speed = swiper.params.speed;
|
|
2086
|
+
}
|
|
2089
2087
|
const isVirtual = swiper.virtual && params.virtual.enabled;
|
|
2090
2088
|
if (params.loop) {
|
|
2091
2089
|
if (animating && !isVirtual && params.loopPreventsSliding) return false;
|
|
@@ -2138,22 +2136,19 @@ function slidePrev(speed, runCallbacks, internal) {
|
|
|
2138
2136
|
|
|
2139
2137
|
/* eslint no-unused-vars: "off" */
|
|
2140
2138
|
function slideReset(speed, runCallbacks, internal) {
|
|
2141
|
-
if (speed === void 0) {
|
|
2142
|
-
speed = this.params.speed;
|
|
2143
|
-
}
|
|
2144
2139
|
if (runCallbacks === void 0) {
|
|
2145
2140
|
runCallbacks = true;
|
|
2146
2141
|
}
|
|
2147
2142
|
const swiper = this;
|
|
2148
2143
|
if (swiper.destroyed) return;
|
|
2144
|
+
if (typeof speed === 'undefined') {
|
|
2145
|
+
speed = swiper.params.speed;
|
|
2146
|
+
}
|
|
2149
2147
|
return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);
|
|
2150
2148
|
}
|
|
2151
2149
|
|
|
2152
2150
|
/* eslint no-unused-vars: "off" */
|
|
2153
2151
|
function slideToClosest(speed, runCallbacks, internal, threshold) {
|
|
2154
|
-
if (speed === void 0) {
|
|
2155
|
-
speed = this.params.speed;
|
|
2156
|
-
}
|
|
2157
2152
|
if (runCallbacks === void 0) {
|
|
2158
2153
|
runCallbacks = true;
|
|
2159
2154
|
}
|
|
@@ -2162,6 +2157,9 @@ function slideToClosest(speed, runCallbacks, internal, threshold) {
|
|
|
2162
2157
|
}
|
|
2163
2158
|
const swiper = this;
|
|
2164
2159
|
if (swiper.destroyed) return;
|
|
2160
|
+
if (typeof speed === 'undefined') {
|
|
2161
|
+
speed = swiper.params.speed;
|
|
2162
|
+
}
|
|
2165
2163
|
let index = swiper.activeIndex;
|
|
2166
2164
|
const skip = Math.min(swiper.params.slidesPerGroupSkip, index);
|
|
2167
2165
|
const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup);
|
|
@@ -3340,6 +3338,8 @@ function setBreakpoint() {
|
|
|
3340
3338
|
const breakpointParams = breakpointOnlyParams || swiper.originalParams;
|
|
3341
3339
|
const wasMultiRow = isGridEnabled(swiper, params);
|
|
3342
3340
|
const isMultiRow = isGridEnabled(swiper, breakpointParams);
|
|
3341
|
+
const wasGrabCursor = swiper.params.grabCursor;
|
|
3342
|
+
const isGrabCursor = breakpointParams.grabCursor;
|
|
3343
3343
|
const wasEnabled = params.enabled;
|
|
3344
3344
|
if (wasMultiRow && !isMultiRow) {
|
|
3345
3345
|
el.classList.remove(`${params.containerModifierClass}grid`, `${params.containerModifierClass}grid-column`);
|
|
@@ -3351,6 +3351,11 @@ function setBreakpoint() {
|
|
|
3351
3351
|
}
|
|
3352
3352
|
swiper.emitContainerClasses();
|
|
3353
3353
|
}
|
|
3354
|
+
if (wasGrabCursor && !isGrabCursor) {
|
|
3355
|
+
swiper.unsetGrabCursor();
|
|
3356
|
+
} else if (!wasGrabCursor && isGrabCursor) {
|
|
3357
|
+
swiper.setGrabCursor();
|
|
3358
|
+
}
|
|
3354
3359
|
|
|
3355
3360
|
// Toggle navigation, pagination, scrollbar
|
|
3356
3361
|
['navigation', 'pagination', 'scrollbar'].forEach(prop => {
|
|
@@ -4676,7 +4681,7 @@ const updateOnVirtualData = swiper => {
|
|
|
4676
4681
|
};
|
|
4677
4682
|
|
|
4678
4683
|
/**
|
|
4679
|
-
* Swiper React 11.0
|
|
4684
|
+
* Swiper React 11.1.0
|
|
4680
4685
|
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
|
4681
4686
|
* https://swiperjs.com
|
|
4682
4687
|
*
|
|
@@ -4684,7 +4689,7 @@ const updateOnVirtualData = swiper => {
|
|
|
4684
4689
|
*
|
|
4685
4690
|
* Released under the MIT License
|
|
4686
4691
|
*
|
|
4687
|
-
* Released on:
|
|
4692
|
+
* Released on: March 28, 2024
|
|
4688
4693
|
*/
|
|
4689
4694
|
|
|
4690
4695
|
|