@shopgate/pwa-common 7.30.4-beta.1 → 7.30.4-beta.2
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.
|
@@ -67,6 +67,7 @@ const Swiper = ({
|
|
|
67
67
|
paginationType: paginationTypeProp,
|
|
68
68
|
...swiperProps
|
|
69
69
|
}) => {
|
|
70
|
+
const isBulletsBelow = paginationTypeProp === 'bulletsBelow';
|
|
70
71
|
const useFraction = maxIndicators && maxIndicators < children.length;
|
|
71
72
|
const paginationType = useFraction ? 'fraction' : 'bullets';
|
|
72
73
|
const showPagination = indicators && children.length > 1;
|
|
@@ -111,7 +112,7 @@ const Swiper = ({
|
|
|
111
112
|
...(showPagination && {
|
|
112
113
|
pagination: {
|
|
113
114
|
el: undefined,
|
|
114
|
-
type: paginationTypeProp || paginationType,
|
|
115
|
+
type: isBulletsBelow ? 'bullets' : paginationTypeProp || paginationType,
|
|
115
116
|
bulletClass: classNames.bulletClass || 'swiper-pagination-bullet',
|
|
116
117
|
bulletActiveClass: classNames.bulletActiveClass || 'swiper-pagination-bullet-active',
|
|
117
118
|
dynamicBullets: true,
|
|
@@ -122,7 +123,7 @@ const Swiper = ({
|
|
|
122
123
|
allowSlidePrev: !disabled,
|
|
123
124
|
allowSlideNext: !disabled,
|
|
124
125
|
onSlideChange: handleSlideChange
|
|
125
|
-
}), [additionalModules, classNames.container, classNames.bulletClass, classNames.bulletActiveClass, swiperProps, autoPlay, interval, navigation, showPagination, paginationTypeProp, paginationType, indicators, children.length, disabled, handleSlideChange]);
|
|
126
|
+
}), [additionalModules, classNames.container, classNames.bulletClass, classNames.bulletActiveClass, swiperProps, autoPlay, interval, navigation, showPagination, paginationTypeProp, paginationType, indicators, children.length, disabled, handleSlideChange, isBulletsBelow]);
|
|
126
127
|
useEffect(() => {
|
|
127
128
|
if (!internalProps.autoplay && !swiperProps.autoplay) {
|
|
128
129
|
if (swiperRef.current?.swiper?.autoplay) {
|
|
@@ -187,7 +188,9 @@ const Swiper = ({
|
|
|
187
188
|
}
|
|
188
189
|
}, [delay, loopProp, onBreakpoint]);
|
|
189
190
|
return /*#__PURE__*/_jsx("div", {
|
|
190
|
-
className: cls(container, className, 'common__swiper'
|
|
191
|
+
className: cls(container, className, 'common__swiper', {
|
|
192
|
+
'pagination-below': isBulletsBelow
|
|
193
|
+
}),
|
|
191
194
|
"aria-hidden": ariaHidden,
|
|
192
195
|
children: /*#__PURE__*/_jsxs(OriginalSwiper, {
|
|
193
196
|
"aria-live": "off",
|
|
@@ -2,10 +2,15 @@ import { css } from 'glamor';
|
|
|
2
2
|
import { themeColors } from '@shopgate/pwa-common/helpers/config';
|
|
3
3
|
export const container = css({
|
|
4
4
|
position: 'relative',
|
|
5
|
-
maxHeight: '100%'
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
maxHeight: '100%',
|
|
6
|
+
'&.pagination-below': {
|
|
7
|
+
'& .swiper-pagination.swiper-pagination-bullets': {
|
|
8
|
+
'--swiper-pagination-bottom': 0,
|
|
9
|
+
position: 'relative',
|
|
10
|
+
height: 32,
|
|
11
|
+
lineHeight: '40px'
|
|
12
|
+
}
|
|
13
|
+
}
|
|
9
14
|
}).toString();
|
|
10
15
|
export const innerContainer = css({
|
|
11
16
|
overflow: 'hidden',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopgate/pwa-common",
|
|
3
|
-
"version": "7.30.4-beta.
|
|
3
|
+
"version": "7.30.4-beta.2",
|
|
4
4
|
"description": "Common library for the Shopgate Connect PWA.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Shopgate <support@shopgate.com>",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@redux-devtools/extension": "^3.3.0",
|
|
19
19
|
"@sentry/browser": "6.0.1",
|
|
20
|
-
"@shopgate/pwa-benchmark": "7.30.4-beta.
|
|
20
|
+
"@shopgate/pwa-benchmark": "7.30.4-beta.2",
|
|
21
21
|
"@virtuous/conductor": "~2.5.0",
|
|
22
22
|
"@virtuous/react-conductor": "~2.5.0",
|
|
23
23
|
"@virtuous/redux-persister": "1.1.0-beta.7",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"swiper": "12.1.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@shopgate/pwa-core": "7.30.4-beta.
|
|
43
|
+
"@shopgate/pwa-core": "7.30.4-beta.2",
|
|
44
44
|
"@types/react-portal": "^3.0.9",
|
|
45
45
|
"lodash": "^4.17.23",
|
|
46
46
|
"prop-types": "~15.8.1",
|