@itcase/ui 1.0.43 → 1.0.45
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/Accordion.js +56 -58
- package/dist/components/Avatar.js +31 -29
- package/dist/components/Background.js +15 -12
- package/dist/components/Badge.js +13 -11
- package/dist/components/Breadcrumbs.js +72 -71
- package/dist/components/Button.js +56 -53
- package/dist/components/Caption.js +11 -8
- package/dist/components/Card.js +22 -20
- package/dist/components/Cell.js +52 -50
- package/dist/components/Checkbox.js +31 -29
- package/dist/components/Chips.js +21 -18
- package/dist/components/Choice.js +43 -49
- package/dist/components/Code.js +260 -105
- package/dist/components/ContextMenu.js +38 -34
- package/dist/components/CookiesWarning.js +26 -27
- package/dist/components/DatePicker.js +64 -67
- package/dist/components/Divider.js +15 -12
- package/dist/components/Dot.js +8 -6
- package/dist/components/Dropdown.js +88 -88
- package/dist/components/Empty.js +21 -19
- package/dist/components/Fader.js +13 -10
- package/dist/components/Flex.js +43 -37
- package/dist/components/FormField.js +77 -66
- package/dist/components/Grid.js +66 -57
- package/dist/components/Group.js +33 -30
- package/dist/components/Icon.js +41 -38
- package/dist/components/Image.js +34 -28
- package/dist/components/Input.js +29 -28
- package/dist/components/InputPassword.js +45 -48
- package/dist/components/Label.js +29 -26
- package/dist/components/LanguageSelector.js +29 -30
- package/dist/components/Link.js +43 -39
- package/dist/components/List.js +35 -29
- package/dist/components/Loader.js +22 -19
- package/dist/components/Logo.js +17 -14
- package/dist/components/Menu.js +20 -19
- package/dist/components/MenuItem.js +55 -52
- package/dist/components/Modal.js +51 -63
- package/dist/components/Notification.js +41 -38
- package/dist/components/Pagination.js +17 -15
- package/dist/components/RadioButton.js +31 -29
- package/dist/components/RangeSlider.js +29 -26
- package/dist/components/Scrollbar.js +6 -4
- package/dist/components/Search.js +66 -61
- package/dist/components/Segmented.js +52 -58
- package/dist/components/Select.js +181 -168
- package/dist/components/SiteMenu.js +34 -28
- package/dist/components/Swiper.js +104 -92
- package/dist/components/Switch.js +11 -9
- package/dist/components/Tab.js +95 -80
- package/dist/components/Text.js +27 -24
- package/dist/components/Textarea.js +23 -21
- package/dist/components/Tile.js +37 -34
- package/dist/components/Title.js +38 -30
- package/dist/components/Tooltip.js +24 -21
- package/dist/components/Video.js +16 -13
- package/dist/components/Wrapper.js +23 -20
- package/dist/constants/componentProps/align.js +1 -1
- package/dist/constants/componentProps/alignDirection.js +1 -1
- package/dist/constants/componentProps/borderColor.js +1 -1
- package/dist/constants/componentProps/borderType.js +1 -1
- package/dist/constants/componentProps/captionPosition.js +1 -1
- package/dist/constants/componentProps/direction.js +1 -1
- package/dist/constants/componentProps/emojiSize.js +1 -1
- package/dist/constants/componentProps/fill.js +1 -1
- package/dist/constants/componentProps/fillGradient.js +1 -1
- package/dist/constants/componentProps/fillType.js +1 -1
- package/dist/constants/componentProps/flexAlign.js +1 -1
- package/dist/constants/componentProps/flexJustifyContent.js +1 -1
- package/dist/constants/componentProps/flexWrap.js +1 -1
- package/dist/constants/componentProps/gridAlign.js +1 -1
- package/dist/constants/componentProps/gridAlignSelf.js +1 -1
- package/dist/constants/componentProps/gridJustifyItems.js +1 -1
- package/dist/constants/componentProps/gridJustifySelf.js +1 -1
- package/dist/constants/componentProps/horizontalContentAlign.js +1 -1
- package/dist/constants/componentProps/horizontalResizeMode.js +1 -1
- package/dist/constants/componentProps/iconSize.js +1 -1
- package/dist/constants/componentProps/position.js +1 -1
- package/dist/constants/componentProps/resizeMode.js +1 -1
- package/dist/constants/componentProps/shape.js +1 -1
- package/dist/constants/componentProps/size.js +1 -1
- package/dist/constants/componentProps/stacking.js +1 -1
- package/dist/constants/componentProps/strokeColor.js +1 -1
- package/dist/constants/componentProps/textAlign.js +1 -1
- package/dist/constants/componentProps/textColor.js +1 -1
- package/dist/constants/componentProps/textColorActive.js +1 -1
- package/dist/constants/componentProps/textColorHover.js +1 -1
- package/dist/constants/componentProps/textGradient.js +1 -1
- package/dist/constants/componentProps/textStyle.js +1 -1
- package/dist/constants/componentProps/textTag.js +1 -1
- package/dist/constants/componentProps/textWeight.js +1 -1
- package/dist/constants/componentProps/titleSize.js +1 -1
- package/dist/constants/componentProps/type.js +1 -1
- package/dist/constants/componentProps/underline.js +1 -1
- package/dist/constants/componentProps/verticalContentAlign.js +1 -1
- package/dist/constants/componentProps/verticalResizeMode.js +1 -1
- package/dist/constants/componentProps/width.js +1 -1
- package/dist/constants/componentProps/wrap.js +1 -1
- package/dist/context/Notifications.js +38 -53
- package/dist/context/UIContext.js +14 -17
- package/dist/css/components/Choice/Choice.css +8 -0
- package/dist/css/components/Code/Code.css +30 -43
- package/dist/css/components/DatePicker/DatePicker.css +39 -0
- package/dist/css/components/Notification/Notification.css +22 -10
- package/dist/css/components/Notification/css/__item/notification__item_set_form.css +15 -0
- package/dist/css/components/Swiper/Swiper.css +6 -3
- package/dist/css/components/Tab/Tab.css +10 -1
- package/dist/css/styles/align/align.css +0 -1
- package/dist/css/styles/align/align_horizontal-reverse.css +6 -6
- package/dist/css/styles/align/align_horizontal.css +9 -9
- package/dist/css/styles/border-color/border-color.css +15 -1
- package/dist/css/styles/column-gap/column-gap.css +3 -1
- package/dist/css/styles/gap/gap.css +3 -1
- package/dist/css/styles/row-gap/row-gap.css +3 -1
- package/dist/hooks/useDeviceTargetClass.js +19 -18
- package/dist/hooks/useMediaQueries.js +7 -10
- package/dist/hooks/useStyles.js +127 -8
- package/package.json +30 -29
- package/dist/useStyles-e4accb53.js +0 -153
|
@@ -15,7 +15,7 @@ require('../constants/componentProps/textWeight.js');
|
|
|
15
15
|
require('../constants/componentProps/titleSize.js');
|
|
16
16
|
require('../constants/componentProps/type.js');
|
|
17
17
|
require('../constants/componentProps/wrap.js');
|
|
18
|
-
require('../useStyles
|
|
18
|
+
require('../hooks/useStyles.js');
|
|
19
19
|
require('lodash/camelCase');
|
|
20
20
|
require('lodash/maxBy');
|
|
21
21
|
require('lodash/upperFirst');
|
|
@@ -1305,7 +1305,10 @@ const processLazyPreloader = (swiper, imageEl) => {
|
|
|
1305
1305
|
const slideSelector = () => swiper.isElement ? `swiper-slide` : `.${swiper.params.slideClass}`;
|
|
1306
1306
|
const slideEl = imageEl.closest(slideSelector());
|
|
1307
1307
|
if (slideEl) {
|
|
1308
|
-
|
|
1308
|
+
let lazyEl = slideEl.querySelector(`.${swiper.params.lazyPreloaderClass}`);
|
|
1309
|
+
if (!lazyEl && swiper.isElement) {
|
|
1310
|
+
lazyEl = slideEl.shadowRoot.querySelector(`.${swiper.params.lazyPreloaderClass}`);
|
|
1311
|
+
}
|
|
1309
1312
|
if (lazyEl) lazyEl.remove();
|
|
1310
1313
|
}
|
|
1311
1314
|
};
|
|
@@ -1662,6 +1665,7 @@ function setTransition(duration, byController) {
|
|
|
1662
1665
|
const swiper = this;
|
|
1663
1666
|
if (!swiper.params.cssMode) {
|
|
1664
1667
|
swiper.wrapperEl.style.transitionDuration = `${duration}ms`;
|
|
1668
|
+
swiper.wrapperEl.style.transitionDelay = duration === 0 ? `0ms` : '';
|
|
1665
1669
|
}
|
|
1666
1670
|
swiper.emit('setTransition', duration, byController);
|
|
1667
1671
|
}
|
|
@@ -2266,7 +2270,6 @@ function loopFix(_temp) {
|
|
|
2266
2270
|
if (swiper.controller && swiper.controller.control && !byController) {
|
|
2267
2271
|
const loopParams = {
|
|
2268
2272
|
slideRealIndex,
|
|
2269
|
-
slideTo: false,
|
|
2270
2273
|
direction,
|
|
2271
2274
|
setTranslate,
|
|
2272
2275
|
activeSlideIndex,
|
|
@@ -2274,10 +2277,16 @@ function loopFix(_temp) {
|
|
|
2274
2277
|
};
|
|
2275
2278
|
if (Array.isArray(swiper.controller.control)) {
|
|
2276
2279
|
swiper.controller.control.forEach(c => {
|
|
2277
|
-
if (!c.destroyed && c.params.loop) c.loopFix(
|
|
2280
|
+
if (!c.destroyed && c.params.loop) c.loopFix({
|
|
2281
|
+
...loopParams,
|
|
2282
|
+
slideTo: c.params.slidesPerView === params.slidesPerView ? slideTo : false
|
|
2283
|
+
});
|
|
2278
2284
|
});
|
|
2279
2285
|
} else if (swiper.controller.control instanceof swiper.constructor && swiper.controller.control.params.loop) {
|
|
2280
|
-
swiper.controller.control.loopFix(
|
|
2286
|
+
swiper.controller.control.loopFix({
|
|
2287
|
+
...loopParams,
|
|
2288
|
+
slideTo: swiper.controller.control.params.slidesPerView === params.slidesPerView ? slideTo : false
|
|
2289
|
+
});
|
|
2281
2290
|
}
|
|
2282
2291
|
}
|
|
2283
2292
|
swiper.emit('loopFix');
|
|
@@ -2709,8 +2718,8 @@ function onTouchEnd(event) {
|
|
|
2709
2718
|
if (pointerIndex >= 0) {
|
|
2710
2719
|
data.evCache.splice(pointerIndex, 1);
|
|
2711
2720
|
}
|
|
2712
|
-
if (['pointercancel', 'pointerout', 'pointerleave'].includes(event.type)) {
|
|
2713
|
-
const proceed = event.type
|
|
2721
|
+
if (['pointercancel', 'pointerout', 'pointerleave', 'contextmenu'].includes(event.type)) {
|
|
2722
|
+
const proceed = ['pointercancel', 'contextmenu'].includes(event.type) && (swiper.browser.isSafari || swiper.browser.isWebView);
|
|
2714
2723
|
if (!proceed) {
|
|
2715
2724
|
return;
|
|
2716
2725
|
}
|
|
@@ -2991,6 +3000,9 @@ const events = (swiper, method) => {
|
|
|
2991
3000
|
document[domMethod]('pointerleave', swiper.onTouchEnd, {
|
|
2992
3001
|
passive: true
|
|
2993
3002
|
});
|
|
3003
|
+
document[domMethod]('contextmenu', swiper.onTouchEnd, {
|
|
3004
|
+
passive: true
|
|
3005
|
+
});
|
|
2994
3006
|
|
|
2995
3007
|
// Prevent Links Clicks
|
|
2996
3008
|
if (params.preventClicks || params.preventClicksPropagation) {
|
|
@@ -3897,7 +3909,11 @@ let Swiper$2 = class Swiper {
|
|
|
3897
3909
|
|
|
3898
3910
|
// Attach events
|
|
3899
3911
|
swiper.attachEvents();
|
|
3900
|
-
[...swiper.el.querySelectorAll('[loading="lazy"]')]
|
|
3912
|
+
const lazyElements = [...swiper.el.querySelectorAll('[loading="lazy"]')];
|
|
3913
|
+
if (swiper.isElement) {
|
|
3914
|
+
lazyElements.push(...swiper.hostEl.querySelectorAll('[loading="lazy"]'));
|
|
3915
|
+
}
|
|
3916
|
+
lazyElements.forEach(imageEl => {
|
|
3901
3917
|
if (imageEl.complete) {
|
|
3902
3918
|
processLazyPreloader(swiper, imageEl);
|
|
3903
3919
|
} else {
|
|
@@ -4171,6 +4187,7 @@ function updateSwiper(_ref) {
|
|
|
4171
4187
|
if (swiper.isElement && (!paginationEl || typeof paginationEl === 'string')) {
|
|
4172
4188
|
paginationEl = document.createElement('div');
|
|
4173
4189
|
paginationEl.classList.add('swiper-pagination');
|
|
4190
|
+
paginationEl.part.add('pagination');
|
|
4174
4191
|
swiper.el.appendChild(paginationEl);
|
|
4175
4192
|
}
|
|
4176
4193
|
if (paginationEl) currentParams.pagination.el = paginationEl;
|
|
@@ -4182,6 +4199,7 @@ function updateSwiper(_ref) {
|
|
|
4182
4199
|
if (swiper.isElement && (!scrollbarEl || typeof scrollbarEl === 'string')) {
|
|
4183
4200
|
scrollbarEl = document.createElement('div');
|
|
4184
4201
|
scrollbarEl.classList.add('swiper-scrollbar');
|
|
4202
|
+
scrollbarEl.part.add('scrollbar');
|
|
4185
4203
|
swiper.el.appendChild(scrollbarEl);
|
|
4186
4204
|
}
|
|
4187
4205
|
if (scrollbarEl) currentParams.scrollbar.el = scrollbarEl;
|
|
@@ -4194,13 +4212,15 @@ function updateSwiper(_ref) {
|
|
|
4194
4212
|
if (!nextEl || typeof nextEl === 'string') {
|
|
4195
4213
|
nextEl = document.createElement('div');
|
|
4196
4214
|
nextEl.classList.add('swiper-button-next');
|
|
4197
|
-
nextEl.innerHTML = swiper.hostEl.nextButtonSvg;
|
|
4215
|
+
nextEl.innerHTML = swiper.hostEl.constructor.nextButtonSvg;
|
|
4216
|
+
nextEl.part.add('button-next');
|
|
4198
4217
|
swiper.el.appendChild(nextEl);
|
|
4199
4218
|
}
|
|
4200
4219
|
if (!prevEl || typeof prevEl === 'string') {
|
|
4201
4220
|
prevEl = document.createElement('div');
|
|
4202
4221
|
prevEl.classList.add('swiper-button-prev');
|
|
4203
|
-
|
|
4222
|
+
prevEl.innerHTML = swiper.hostEl.constructor.prevButtonSvg;
|
|
4223
|
+
prevEl.part.add('button-prev');
|
|
4204
4224
|
swiper.el.appendChild(prevEl);
|
|
4205
4225
|
}
|
|
4206
4226
|
}
|
|
@@ -4354,7 +4374,7 @@ const updateOnVirtualData = swiper => {
|
|
|
4354
4374
|
};
|
|
4355
4375
|
|
|
4356
4376
|
/**
|
|
4357
|
-
* Swiper React 10.
|
|
4377
|
+
* Swiper React 10.2.0
|
|
4358
4378
|
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
|
4359
4379
|
* https://swiperjs.com
|
|
4360
4380
|
*
|
|
@@ -4362,7 +4382,7 @@ const updateOnVirtualData = swiper => {
|
|
|
4362
4382
|
*
|
|
4363
4383
|
* Released under the MIT License
|
|
4364
4384
|
*
|
|
4365
|
-
* Released on: August
|
|
4385
|
+
* Released on: August 17, 2023
|
|
4366
4386
|
*/
|
|
4367
4387
|
|
|
4368
4388
|
|
|
@@ -4737,100 +4757,96 @@ const SwiperSlide = /*#__PURE__*/React.forwardRef(function (_temp, externalRef)
|
|
|
4737
4757
|
SwiperSlide.displayName = 'SwiperSlide';
|
|
4738
4758
|
|
|
4739
4759
|
function Swiper(props) {
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
React.
|
|
4788
|
-
return swiperRef.current;
|
|
4789
|
-
}, []);
|
|
4790
|
-
var onInitSwiper = React.useCallback(function (swiper) {
|
|
4760
|
+
const {
|
|
4761
|
+
activeSlideIndex,
|
|
4762
|
+
allowTouchMove,
|
|
4763
|
+
autoHeight,
|
|
4764
|
+
breakpoints,
|
|
4765
|
+
children,
|
|
4766
|
+
className,
|
|
4767
|
+
direction,
|
|
4768
|
+
disabledButtonClass,
|
|
4769
|
+
forwardedRef,
|
|
4770
|
+
// https://github.com/vercel/next.js/issues/4957
|
|
4771
|
+
freeMode,
|
|
4772
|
+
id,
|
|
4773
|
+
isChangeOnClickSlide,
|
|
4774
|
+
isInit,
|
|
4775
|
+
isNavigation,
|
|
4776
|
+
isPagination,
|
|
4777
|
+
isScrollbar,
|
|
4778
|
+
items,
|
|
4779
|
+
loop,
|
|
4780
|
+
modules,
|
|
4781
|
+
mousewheel,
|
|
4782
|
+
nextButton,
|
|
4783
|
+
normalizeSlideIndex,
|
|
4784
|
+
prevButton,
|
|
4785
|
+
set,
|
|
4786
|
+
setNextBtnDisabled,
|
|
4787
|
+
setPrevBtnDisabled,
|
|
4788
|
+
slidesPerView,
|
|
4789
|
+
spaceBetween,
|
|
4790
|
+
speed,
|
|
4791
|
+
swiperClass,
|
|
4792
|
+
title,
|
|
4793
|
+
titleSize,
|
|
4794
|
+
titleTextColor,
|
|
4795
|
+
titleWeight,
|
|
4796
|
+
titleAfter,
|
|
4797
|
+
onSlideNextTransitionEnd,
|
|
4798
|
+
onSlidePrevTransitionEnd,
|
|
4799
|
+
onSwiper,
|
|
4800
|
+
onUpdate
|
|
4801
|
+
} = props;
|
|
4802
|
+
const swiperRef = React.useRef();
|
|
4803
|
+
const [nextEl, nextRef] = useSwiperRef();
|
|
4804
|
+
const [prevEl, prevRef] = useSwiperRef();
|
|
4805
|
+
const isLoop = loop ?? true;
|
|
4806
|
+
React.useImperativeHandle(forwardedRef, () => swiperRef.current, []);
|
|
4807
|
+
const onInitSwiper = React.useCallback(swiper => {
|
|
4791
4808
|
// Set "disabled" state to navigation buttons on init
|
|
4792
4809
|
if (!isLoop && setPrevBtnDisabled && setNextBtnDisabled) {
|
|
4793
4810
|
setPrevBtnDisabled(swiper.isBeginning);
|
|
4794
4811
|
setNextBtnDisabled(swiper.isEnd);
|
|
4795
4812
|
}
|
|
4796
4813
|
}, [isLoop, setPrevBtnDisabled, setNextBtnDisabled]);
|
|
4797
|
-
|
|
4814
|
+
const onSlideChange = React.useCallback(swiper => {
|
|
4798
4815
|
// Some things with clickedIndex
|
|
4799
4816
|
if (isChangeOnClickSlide) {
|
|
4800
4817
|
swiper.activeIndex = swiper.clickedIndex || activeSlideIndex;
|
|
4801
4818
|
}
|
|
4802
4819
|
}, [isChangeOnClickSlide, activeSlideIndex]);
|
|
4803
|
-
|
|
4820
|
+
const onTransitionStart = React.useCallback(swiper => {
|
|
4804
4821
|
// Set "disabled" state to navigation buttons, when slider move
|
|
4805
4822
|
if (!isLoop && setPrevBtnDisabled && setNextBtnDisabled) {
|
|
4806
4823
|
setPrevBtnDisabled(swiper.isBeginning);
|
|
4807
4824
|
setNextBtnDisabled(swiper.isEnd);
|
|
4808
4825
|
}
|
|
4809
4826
|
}, [isLoop, setPrevBtnDisabled, setNextBtnDisabled]);
|
|
4810
|
-
React.useEffect(
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
swiperInstance
|
|
4814
|
-
swiperInstance == null ? void 0 : swiperInstance.updateSlidesClasses();
|
|
4827
|
+
React.useEffect(() => {
|
|
4828
|
+
const swiperInstance = swiperRef.current?.swiper;
|
|
4829
|
+
swiperInstance?.updateActiveIndex(activeSlideIndex);
|
|
4830
|
+
swiperInstance?.updateSlidesClasses();
|
|
4815
4831
|
}, [activeSlideIndex]);
|
|
4816
|
-
|
|
4832
|
+
const fillClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
4817
4833
|
prefix: 'fill_',
|
|
4818
4834
|
propsKey: 'fill'
|
|
4819
4835
|
});
|
|
4820
|
-
|
|
4836
|
+
const shapeClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
4821
4837
|
prefix: 'swiper_shape_',
|
|
4822
4838
|
propsKey: 'shape'
|
|
4823
4839
|
});
|
|
4824
|
-
|
|
4840
|
+
const alignDirectionClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
4825
4841
|
prefix: 'align_',
|
|
4826
4842
|
propsKey: 'alignDirection'
|
|
4827
4843
|
});
|
|
4828
|
-
|
|
4844
|
+
const alignClass = useDeviceTargetClass.useDeviceTargetClass(props, {
|
|
4829
4845
|
prefix: 'align_',
|
|
4830
4846
|
propsKey: 'align'
|
|
4831
4847
|
});
|
|
4832
4848
|
return /*#__PURE__*/React__default.default.createElement("div", {
|
|
4833
|
-
className: clsx__default.default('swiper-block', slidesPerView === 'auto' && 'swiper-block_type_auto', fillClass, shapeClass, className, set &&
|
|
4849
|
+
className: clsx__default.default('swiper-block', slidesPerView === 'auto' && 'swiper-block_type_auto', fillClass, shapeClass, className, set && `swiper-block_set_${set}`),
|
|
4834
4850
|
id: id
|
|
4835
4851
|
}, (title || prevButton && nextButton) && /*#__PURE__*/React__default.default.createElement("div", {
|
|
4836
4852
|
className: "swiper-block__wrapper"
|
|
@@ -4849,18 +4865,18 @@ function Swiper(props) {
|
|
|
4849
4865
|
ref: nextRef
|
|
4850
4866
|
}, nextButton))), /*#__PURE__*/React__default.default.createElement(Swiper$1, {
|
|
4851
4867
|
allowTouchMove: allowTouchMove,
|
|
4852
|
-
autoHeight: autoHeight
|
|
4868
|
+
autoHeight: autoHeight ?? false,
|
|
4853
4869
|
breakpoints: breakpoints,
|
|
4854
4870
|
className: clsx__default.default('swiper-block__swiper', swiperClass),
|
|
4855
4871
|
direction: direction,
|
|
4856
4872
|
freeMode: freeMode,
|
|
4857
|
-
init: isInit
|
|
4873
|
+
init: isInit ?? true,
|
|
4858
4874
|
loop: isLoop,
|
|
4859
4875
|
modules: modules,
|
|
4860
4876
|
mousewheel: mousewheel,
|
|
4861
4877
|
navigation: isNavigation ? {
|
|
4862
|
-
prevEl
|
|
4863
|
-
nextEl
|
|
4878
|
+
prevEl,
|
|
4879
|
+
nextEl
|
|
4864
4880
|
} : false,
|
|
4865
4881
|
normalizeSlideIndex: normalizeSlideIndex,
|
|
4866
4882
|
pagination: isPagination,
|
|
@@ -4868,7 +4884,7 @@ function Swiper(props) {
|
|
|
4868
4884
|
scrollbar: isScrollbar,
|
|
4869
4885
|
slidesPerView: slidesPerView,
|
|
4870
4886
|
spaceBetween: spaceBetween,
|
|
4871
|
-
speed: speed
|
|
4887
|
+
speed: speed ?? 500,
|
|
4872
4888
|
onInit: onInitSwiper,
|
|
4873
4889
|
onSlideChange: onSlideChange,
|
|
4874
4890
|
onSlideNextTransitionEnd: onSlideNextTransitionEnd,
|
|
@@ -4876,12 +4892,10 @@ function Swiper(props) {
|
|
|
4876
4892
|
onSwiper: onSwiper,
|
|
4877
4893
|
onUpdate: onUpdate,
|
|
4878
4894
|
onTransitionStart: onTransitionStart
|
|
4879
|
-
}, children ||
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
}, item);
|
|
4884
|
-
}))));
|
|
4895
|
+
}, children || items?.map((item, i) => /*#__PURE__*/React__default.default.createElement(SwiperSlide, {
|
|
4896
|
+
className: clsx__default.default(alignDirectionClass, alignClass),
|
|
4897
|
+
key: `swiper-slide_${i}`
|
|
4898
|
+
}, item))));
|
|
4885
4899
|
}
|
|
4886
4900
|
Swiper.propTypes = {
|
|
4887
4901
|
activeSlideIndex: PropTypes__default.default.number,
|
|
@@ -4937,12 +4951,10 @@ Swiper.defaultProps = {
|
|
|
4937
4951
|
};
|
|
4938
4952
|
|
|
4939
4953
|
// https://github.com/nolimits4web/swiper/issues/3855#issuecomment-1050694342
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
var ref = React.useRef(null);
|
|
4945
|
-
React.useEffect(function () {
|
|
4954
|
+
const useSwiperRef = () => {
|
|
4955
|
+
const [wrapper, setWrapper] = React.useState(null);
|
|
4956
|
+
const ref = React.useRef(null);
|
|
4957
|
+
React.useEffect(() => {
|
|
4946
4958
|
if (ref.current) {
|
|
4947
4959
|
setWrapper(ref.current);
|
|
4948
4960
|
}
|
|
@@ -10,16 +10,18 @@ var React__default = /*#__PURE__*/_interopDefault(React);
|
|
|
10
10
|
var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
11
11
|
var clsx__default = /*#__PURE__*/_interopDefault(clsx);
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
const Switch = /*#__PURE__*/React__default.default.forwardRef(function Switch(props, ref) {
|
|
14
|
+
const {
|
|
15
|
+
className,
|
|
16
|
+
set,
|
|
17
|
+
size,
|
|
18
|
+
id,
|
|
19
|
+
checked,
|
|
20
|
+
disabled,
|
|
21
|
+
onChange
|
|
22
|
+
} = props;
|
|
21
23
|
return /*#__PURE__*/React__default.default.createElement("div", {
|
|
22
|
-
className: clsx__default.default('switch', className, size &&
|
|
24
|
+
className: clsx__default.default('switch', className, size && `switch_size_${size}`, set && `switch_set_${set}`)
|
|
23
25
|
}, /*#__PURE__*/React__default.default.createElement("input", {
|
|
24
26
|
checked: checked,
|
|
25
27
|
className: "switch__checkbox",
|