pb-sxp-ui 1.0.81 → 1.0.82
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/index.cjs +79 -60
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +4 -4
- package/dist/index.js +79 -60
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +79 -60
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
@@ -3100,7 +3100,7 @@ function Scrollbar(_ref) {
|
|
3100
3100
|
dragEl
|
3101
3101
|
} = scrollbar;
|
3102
3102
|
if (!isTouched) return;
|
3103
|
-
if (e.preventDefault) e.preventDefault();else e.returnValue = false;
|
3103
|
+
if (e.preventDefault && e.cancelable) e.preventDefault();else e.returnValue = false;
|
3104
3104
|
setDragPosition(e);
|
3105
3105
|
wrapperEl.style.transitionDuration = '0ms';
|
3106
3106
|
el.style.transitionDuration = '0ms';
|
@@ -3327,7 +3327,7 @@ function Autoplay(_ref) {
|
|
3327
3327
|
if (!swiper || swiper.destroyed || !swiper.wrapperEl) return;
|
3328
3328
|
if (e.target !== swiper.wrapperEl) return;
|
3329
3329
|
swiper.wrapperEl.removeEventListener('transitionend', onTransitionEnd);
|
3330
|
-
if (pausedByPointerEnter) {
|
3330
|
+
if (pausedByPointerEnter || e.detail && e.detail.bySwiperTouchMove) {
|
3331
3331
|
return;
|
3332
3332
|
}
|
3333
3333
|
resume();
|
@@ -3498,8 +3498,10 @@ function Autoplay(_ref) {
|
|
3498
3498
|
}
|
3499
3499
|
};
|
3500
3500
|
const detachMouseEvents = () => {
|
3501
|
-
swiper.el.
|
3502
|
-
|
3501
|
+
if (swiper.el && typeof swiper.el !== 'string') {
|
3502
|
+
swiper.el.removeEventListener('pointerenter', onPointerEnter);
|
3503
|
+
swiper.el.removeEventListener('pointerleave', onPointerLeave);
|
3504
|
+
}
|
3503
3505
|
};
|
3504
3506
|
const attachDocumentEvents = () => {
|
3505
3507
|
const document = getDocument();
|
@@ -4421,8 +4423,9 @@ function updateSlides() {
|
|
4421
4423
|
allSlidesSize += slideSizeValue + (spaceBetween || 0);
|
4422
4424
|
});
|
4423
4425
|
allSlidesSize -= spaceBetween;
|
4424
|
-
|
4425
|
-
|
4426
|
+
const offsetSize = (params.slidesOffsetBefore || 0) + (params.slidesOffsetAfter || 0);
|
4427
|
+
if (allSlidesSize + offsetSize < swiperSize) {
|
4428
|
+
const allSlidesOffset = (swiperSize - allSlidesSize - offsetSize) / 2;
|
4426
4429
|
snapGrid.forEach((snap, snapIndex) => {
|
4427
4430
|
snapGrid[snapIndex] = snap - allSlidesOffset;
|
4428
4431
|
});
|
@@ -4526,6 +4529,13 @@ function updateSlidesOffset() {
|
|
4526
4529
|
}
|
4527
4530
|
}
|
4528
4531
|
|
4532
|
+
const toggleSlideClasses$1 = (slideEl, condition, className) => {
|
4533
|
+
if (condition && !slideEl.classList.contains(className)) {
|
4534
|
+
slideEl.classList.add(className);
|
4535
|
+
} else if (!condition && slideEl.classList.contains(className)) {
|
4536
|
+
slideEl.classList.remove(className);
|
4537
|
+
}
|
4538
|
+
};
|
4529
4539
|
function updateSlidesProgress(translate) {
|
4530
4540
|
if (translate === void 0) {
|
4531
4541
|
translate = this && this.translate || 0;
|
@@ -4541,11 +4551,6 @@ function updateSlidesProgress(translate) {
|
|
4541
4551
|
if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset();
|
4542
4552
|
let offsetCenter = -translate;
|
4543
4553
|
if (rtl) offsetCenter = translate;
|
4544
|
-
|
4545
|
-
// Visible Slides
|
4546
|
-
slides.forEach(slideEl => {
|
4547
|
-
slideEl.classList.remove(params.slideVisibleClass, params.slideFullyVisibleClass);
|
4548
|
-
});
|
4549
4554
|
swiper.visibleSlidesIndexes = [];
|
4550
4555
|
swiper.visibleSlides = [];
|
4551
4556
|
let spaceBetween = params.spaceBetween;
|
@@ -4569,11 +4574,9 @@ function updateSlidesProgress(translate) {
|
|
4569
4574
|
if (isVisible) {
|
4570
4575
|
swiper.visibleSlides.push(slide);
|
4571
4576
|
swiper.visibleSlidesIndexes.push(i);
|
4572
|
-
slides[i].classList.add(params.slideVisibleClass);
|
4573
|
-
}
|
4574
|
-
if (isFullyVisible) {
|
4575
|
-
slides[i].classList.add(params.slideFullyVisibleClass);
|
4576
4577
|
}
|
4578
|
+
toggleSlideClasses$1(slide, isVisible, params.slideVisibleClass);
|
4579
|
+
toggleSlideClasses$1(slide, isFullyVisible, params.slideFullyVisibleClass);
|
4577
4580
|
slide.progress = rtl ? -slideProgress : slideProgress;
|
4578
4581
|
slide.originalProgress = rtl ? -originalSlideProgress : originalSlideProgress;
|
4579
4582
|
}
|
@@ -4642,6 +4645,13 @@ function updateProgress(translate) {
|
|
4642
4645
|
swiper.emit('progress', progress);
|
4643
4646
|
}
|
4644
4647
|
|
4648
|
+
const toggleSlideClasses = (slideEl, condition, className) => {
|
4649
|
+
if (condition && !slideEl.classList.contains(className)) {
|
4650
|
+
slideEl.classList.add(className);
|
4651
|
+
} else if (!condition && slideEl.classList.contains(className)) {
|
4652
|
+
slideEl.classList.remove(className);
|
4653
|
+
}
|
4654
|
+
};
|
4645
4655
|
function updateSlidesClasses() {
|
4646
4656
|
const swiper = this;
|
4647
4657
|
const {
|
@@ -4655,9 +4665,6 @@ function updateSlidesClasses() {
|
|
4655
4665
|
const getFilteredSlide = selector => {
|
4656
4666
|
return elementChildren(slidesEl, `.${params.slideClass}${selector}, swiper-slide${selector}`)[0];
|
4657
4667
|
};
|
4658
|
-
slides.forEach(slideEl => {
|
4659
|
-
slideEl.classList.remove(params.slideActiveClass, params.slideNextClass, params.slidePrevClass);
|
4660
|
-
});
|
4661
4668
|
let activeSlide;
|
4662
4669
|
let prevSlide;
|
4663
4670
|
let nextSlide;
|
@@ -4680,35 +4687,25 @@ function updateSlidesClasses() {
|
|
4680
4687
|
}
|
4681
4688
|
}
|
4682
4689
|
if (activeSlide) {
|
4683
|
-
|
4684
|
-
activeSlide.classList.add(params.slideActiveClass);
|
4685
|
-
if (gridEnabled) {
|
4686
|
-
if (nextSlide) {
|
4687
|
-
nextSlide.classList.add(params.slideNextClass);
|
4688
|
-
}
|
4689
|
-
if (prevSlide) {
|
4690
|
-
prevSlide.classList.add(params.slidePrevClass);
|
4691
|
-
}
|
4692
|
-
} else {
|
4690
|
+
if (!gridEnabled) {
|
4693
4691
|
// Next Slide
|
4694
4692
|
nextSlide = elementNextAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];
|
4695
4693
|
if (params.loop && !nextSlide) {
|
4696
4694
|
nextSlide = slides[0];
|
4697
4695
|
}
|
4698
|
-
if (nextSlide) {
|
4699
|
-
nextSlide.classList.add(params.slideNextClass);
|
4700
|
-
}
|
4701
4696
|
|
4702
4697
|
// Prev Slide
|
4703
4698
|
prevSlide = elementPrevAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];
|
4704
4699
|
if (params.loop && !prevSlide === 0) {
|
4705
4700
|
prevSlide = slides[slides.length - 1];
|
4706
4701
|
}
|
4707
|
-
if (prevSlide) {
|
4708
|
-
prevSlide.classList.add(params.slidePrevClass);
|
4709
|
-
}
|
4710
4702
|
}
|
4711
4703
|
}
|
4704
|
+
slides.forEach(slideEl => {
|
4705
|
+
toggleSlideClasses(slideEl, slideEl === activeSlide, params.slideActiveClass);
|
4706
|
+
toggleSlideClasses(slideEl, slideEl === nextSlide, params.slideNextClass);
|
4707
|
+
toggleSlideClasses(slideEl, slideEl === prevSlide, params.slidePrevClass);
|
4708
|
+
});
|
4712
4709
|
swiper.emitSlidesClasses();
|
4713
4710
|
}
|
4714
4711
|
|
@@ -5086,6 +5083,7 @@ function translateTo(translate, speed, runCallbacks, translateBounds, internal)
|
|
5086
5083
|
swiper.wrapperEl.removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);
|
5087
5084
|
swiper.onTranslateToWrapperTransitionEnd = null;
|
5088
5085
|
delete swiper.onTranslateToWrapperTransitionEnd;
|
5086
|
+
swiper.animating = false;
|
5089
5087
|
if (runCallbacks) {
|
5090
5088
|
swiper.emit('transitionEnd');
|
5091
5089
|
}
|
@@ -5193,9 +5191,6 @@ function slideTo(index, speed, runCallbacks, internal, initial) {
|
|
5193
5191
|
if (index === void 0) {
|
5194
5192
|
index = 0;
|
5195
5193
|
}
|
5196
|
-
if (speed === void 0) {
|
5197
|
-
speed = this.params.speed;
|
5198
|
-
}
|
5199
5194
|
if (runCallbacks === void 0) {
|
5200
5195
|
runCallbacks = true;
|
5201
5196
|
}
|
@@ -5215,9 +5210,12 @@ function slideTo(index, speed, runCallbacks, internal, initial) {
|
|
5215
5210
|
wrapperEl,
|
5216
5211
|
enabled
|
5217
5212
|
} = swiper;
|
5218
|
-
if (
|
5213
|
+
if (!enabled && !internal && !initial || swiper.destroyed || swiper.animating && params.preventInteractionOnTransition) {
|
5219
5214
|
return false;
|
5220
5215
|
}
|
5216
|
+
if (typeof speed === 'undefined') {
|
5217
|
+
speed = swiper.params.speed;
|
5218
|
+
}
|
5221
5219
|
const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex);
|
5222
5220
|
let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup);
|
5223
5221
|
if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;
|
@@ -5344,9 +5342,6 @@ function slideToLoop(index, speed, runCallbacks, internal) {
|
|
5344
5342
|
if (index === void 0) {
|
5345
5343
|
index = 0;
|
5346
5344
|
}
|
5347
|
-
if (speed === void 0) {
|
5348
|
-
speed = this.params.speed;
|
5349
|
-
}
|
5350
5345
|
if (runCallbacks === void 0) {
|
5351
5346
|
runCallbacks = true;
|
5352
5347
|
}
|
@@ -5356,6 +5351,9 @@ function slideToLoop(index, speed, runCallbacks, internal) {
|
|
5356
5351
|
}
|
5357
5352
|
const swiper = this;
|
5358
5353
|
if (swiper.destroyed) return;
|
5354
|
+
if (typeof speed === 'undefined') {
|
5355
|
+
speed = swiper.params.speed;
|
5356
|
+
}
|
5359
5357
|
const gridEnabled = swiper.grid && swiper.params.grid && swiper.params.grid.rows > 1;
|
5360
5358
|
let newIndex = index;
|
5361
5359
|
if (swiper.params.loop) {
|
@@ -5387,6 +5385,9 @@ function slideToLoop(index, speed, runCallbacks, internal) {
|
|
5387
5385
|
if (centeredSlides) {
|
5388
5386
|
needLoopFix = needLoopFix || targetSlideIndex < Math.ceil(slidesPerView / 2);
|
5389
5387
|
}
|
5388
|
+
if (internal && centeredSlides && swiper.params.slidesPerView !== 'auto' && !gridEnabled) {
|
5389
|
+
needLoopFix = false;
|
5390
|
+
}
|
5390
5391
|
if (needLoopFix) {
|
5391
5392
|
const direction = centeredSlides ? targetSlideIndex < swiper.activeIndex ? 'prev' : 'next' : targetSlideIndex - swiper.activeIndex - 1 < swiper.params.slidesPerView ? 'next' : 'prev';
|
5392
5393
|
swiper.loopFix({
|
@@ -5412,9 +5413,6 @@ function slideToLoop(index, speed, runCallbacks, internal) {
|
|
5412
5413
|
|
5413
5414
|
/* eslint no-unused-vars: "off" */
|
5414
5415
|
function slideNext(speed, runCallbacks, internal) {
|
5415
|
-
if (speed === void 0) {
|
5416
|
-
speed = this.params.speed;
|
5417
|
-
}
|
5418
5416
|
if (runCallbacks === void 0) {
|
5419
5417
|
runCallbacks = true;
|
5420
5418
|
}
|
@@ -5425,6 +5423,9 @@ function slideNext(speed, runCallbacks, internal) {
|
|
5425
5423
|
animating
|
5426
5424
|
} = swiper;
|
5427
5425
|
if (!enabled || swiper.destroyed) return swiper;
|
5426
|
+
if (typeof speed === 'undefined') {
|
5427
|
+
speed = swiper.params.speed;
|
5428
|
+
}
|
5428
5429
|
let perGroup = params.slidesPerGroup;
|
5429
5430
|
if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {
|
5430
5431
|
perGroup = Math.max(swiper.slidesPerViewDynamic('current', true), 1);
|
@@ -5453,9 +5454,6 @@ function slideNext(speed, runCallbacks, internal) {
|
|
5453
5454
|
|
5454
5455
|
/* eslint no-unused-vars: "off" */
|
5455
5456
|
function slidePrev(speed, runCallbacks, internal) {
|
5456
|
-
if (speed === void 0) {
|
5457
|
-
speed = this.params.speed;
|
5458
|
-
}
|
5459
5457
|
if (runCallbacks === void 0) {
|
5460
5458
|
runCallbacks = true;
|
5461
5459
|
}
|
@@ -5469,6 +5467,9 @@ function slidePrev(speed, runCallbacks, internal) {
|
|
5469
5467
|
animating
|
5470
5468
|
} = swiper;
|
5471
5469
|
if (!enabled || swiper.destroyed) return swiper;
|
5470
|
+
if (typeof speed === 'undefined') {
|
5471
|
+
speed = swiper.params.speed;
|
5472
|
+
}
|
5472
5473
|
const isVirtual = swiper.virtual && params.virtual.enabled;
|
5473
5474
|
if (params.loop) {
|
5474
5475
|
if (animating && !isVirtual && params.loopPreventsSliding) return false;
|
@@ -5521,22 +5522,19 @@ function slidePrev(speed, runCallbacks, internal) {
|
|
5521
5522
|
|
5522
5523
|
/* eslint no-unused-vars: "off" */
|
5523
5524
|
function slideReset(speed, runCallbacks, internal) {
|
5524
|
-
if (speed === void 0) {
|
5525
|
-
speed = this.params.speed;
|
5526
|
-
}
|
5527
5525
|
if (runCallbacks === void 0) {
|
5528
5526
|
runCallbacks = true;
|
5529
5527
|
}
|
5530
5528
|
const swiper = this;
|
5531
5529
|
if (swiper.destroyed) return;
|
5530
|
+
if (typeof speed === 'undefined') {
|
5531
|
+
speed = swiper.params.speed;
|
5532
|
+
}
|
5532
5533
|
return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);
|
5533
5534
|
}
|
5534
5535
|
|
5535
5536
|
/* eslint no-unused-vars: "off" */
|
5536
5537
|
function slideToClosest(speed, runCallbacks, internal, threshold) {
|
5537
|
-
if (speed === void 0) {
|
5538
|
-
speed = this.params.speed;
|
5539
|
-
}
|
5540
5538
|
if (runCallbacks === void 0) {
|
5541
5539
|
runCallbacks = true;
|
5542
5540
|
}
|
@@ -5545,6 +5543,9 @@ function slideToClosest(speed, runCallbacks, internal, threshold) {
|
|
5545
5543
|
}
|
5546
5544
|
const swiper = this;
|
5547
5545
|
if (swiper.destroyed) return;
|
5546
|
+
if (typeof speed === 'undefined') {
|
5547
|
+
speed = swiper.params.speed;
|
5548
|
+
}
|
5548
5549
|
let index = swiper.activeIndex;
|
5549
5550
|
const skip = Math.min(swiper.params.slidesPerGroupSkip, index);
|
5550
5551
|
const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup);
|
@@ -6179,7 +6180,7 @@ function onTouchMove(event) {
|
|
6179
6180
|
data.startMoving = true;
|
6180
6181
|
}
|
6181
6182
|
}
|
6182
|
-
if (data.isScrolling) {
|
6183
|
+
if (data.isScrolling || e.type === 'touchmove' && data.preventTouchMoveFromPointerMove) {
|
6183
6184
|
data.isTouched = false;
|
6184
6185
|
return;
|
6185
6186
|
}
|
@@ -6221,7 +6222,10 @@ function onTouchMove(event) {
|
|
6221
6222
|
if (swiper.animating) {
|
6222
6223
|
const evt = new window.CustomEvent('transitionend', {
|
6223
6224
|
bubbles: true,
|
6224
|
-
cancelable: true
|
6225
|
+
cancelable: true,
|
6226
|
+
detail: {
|
6227
|
+
bySwiperTouchMove: true
|
6228
|
+
}
|
6225
6229
|
});
|
6226
6230
|
swiper.wrapperEl.dispatchEvent(evt);
|
6227
6231
|
}
|
@@ -6615,6 +6619,7 @@ const events = (swiper, method) => {
|
|
6615
6619
|
const capture = !!params.nested;
|
6616
6620
|
const domMethod = method === 'on' ? 'addEventListener' : 'removeEventListener';
|
6617
6621
|
const swiperMethod = method;
|
6622
|
+
if (!el || typeof el === 'string') return;
|
6618
6623
|
|
6619
6624
|
// Touch Events
|
6620
6625
|
document[domMethod]('touchstart', swiper.onDocumentTouchStart, {
|
@@ -6723,6 +6728,8 @@ function setBreakpoint() {
|
|
6723
6728
|
const breakpointParams = breakpointOnlyParams || swiper.originalParams;
|
6724
6729
|
const wasMultiRow = isGridEnabled(swiper, params);
|
6725
6730
|
const isMultiRow = isGridEnabled(swiper, breakpointParams);
|
6731
|
+
const wasGrabCursor = swiper.params.grabCursor;
|
6732
|
+
const isGrabCursor = breakpointParams.grabCursor;
|
6726
6733
|
const wasEnabled = params.enabled;
|
6727
6734
|
if (wasMultiRow && !isMultiRow) {
|
6728
6735
|
el.classList.remove(`${params.containerModifierClass}grid`, `${params.containerModifierClass}grid-column`);
|
@@ -6734,6 +6741,11 @@ function setBreakpoint() {
|
|
6734
6741
|
}
|
6735
6742
|
swiper.emitContainerClasses();
|
6736
6743
|
}
|
6744
|
+
if (wasGrabCursor && !isGrabCursor) {
|
6745
|
+
swiper.unsetGrabCursor();
|
6746
|
+
} else if (!wasGrabCursor && isGrabCursor) {
|
6747
|
+
swiper.setGrabCursor();
|
6748
|
+
}
|
6737
6749
|
|
6738
6750
|
// Toggle navigation, pagination, scrollbar
|
6739
6751
|
['navigation', 'pagination', 'scrollbar'].forEach(prop => {
|
@@ -6884,6 +6896,7 @@ function removeClasses() {
|
|
6884
6896
|
el,
|
6885
6897
|
classNames
|
6886
6898
|
} = swiper;
|
6899
|
+
if (!el || typeof el === 'string') return;
|
6887
6900
|
el.classList.remove(...classNames);
|
6888
6901
|
swiper.emitContainerClasses();
|
6889
6902
|
}
|
@@ -7648,8 +7661,12 @@ let Swiper$1 = class Swiper {
|
|
7648
7661
|
// Cleanup styles
|
7649
7662
|
if (cleanStyles) {
|
7650
7663
|
swiper.removeClasses();
|
7651
|
-
el
|
7652
|
-
|
7664
|
+
if (el && typeof el !== 'string') {
|
7665
|
+
el.removeAttribute('style');
|
7666
|
+
}
|
7667
|
+
if (wrapperEl) {
|
7668
|
+
wrapperEl.removeAttribute('style');
|
7669
|
+
}
|
7653
7670
|
if (slides && slides.length) {
|
7654
7671
|
slides.forEach(slideEl => {
|
7655
7672
|
slideEl.classList.remove(params.slideVisibleClass, params.slideFullyVisibleClass, params.slideActiveClass, params.slideNextClass, params.slidePrevClass);
|
@@ -7665,7 +7682,9 @@ let Swiper$1 = class Swiper {
|
|
7665
7682
|
swiper.off(eventName);
|
7666
7683
|
});
|
7667
7684
|
if (deleteInstance !== false) {
|
7668
|
-
swiper.el.
|
7685
|
+
if (swiper.el && typeof swiper.el !== 'string') {
|
7686
|
+
swiper.el.swiper = null;
|
7687
|
+
}
|
7669
7688
|
deleteProps(swiper);
|
7670
7689
|
}
|
7671
7690
|
swiper.destroyed = true;
|
@@ -8059,7 +8078,7 @@ const updateOnVirtualData = swiper => {
|
|
8059
8078
|
};
|
8060
8079
|
|
8061
8080
|
/**
|
8062
|
-
* Swiper React 11.
|
8081
|
+
* Swiper React 11.1.4
|
8063
8082
|
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
8064
8083
|
* https://swiperjs.com
|
8065
8084
|
*
|
@@ -8067,7 +8086,7 @@ const updateOnVirtualData = swiper => {
|
|
8067
8086
|
*
|
8068
8087
|
* Released under the MIT License
|
8069
8088
|
*
|
8070
|
-
* Released on:
|
8089
|
+
* Released on: May 30, 2024
|
8071
8090
|
*/
|
8072
8091
|
|
8073
8092
|
|