@gem-sdk/components 2.0.0-dev.621 → 2.0.0-dev.623
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/cjs/article/setting/configs/ArticleAuthor/uiV2.js +1 -0
- package/dist/cjs/article/setting/configs/ArticleReadMore/settings.js +0 -1
- package/dist/cjs/article/setting/configs/ArticleReadMore/uiV2.js +1 -0
- package/dist/cjs/banner/setting/presets/heroBanner1Col.js +1 -1
- package/dist/cjs/banner/setting/presets/heroBannerContentLeft.js +2 -4
- package/dist/cjs/banner/setting/presets/heroBannerContentRight.js +2 -5
- package/dist/cjs/banner/setting/presets/heroBannerVideo.js +10 -0
- package/dist/cjs/banner/setting/setting.js +9 -6
- package/dist/cjs/banner/setting/uiV2.js +34 -10
- package/dist/cjs/builder.js +12 -6
- package/dist/cjs/collection/components/collection-banner/components/CollectionBanner.liquid.js +1 -1
- package/dist/cjs/collection/components/collection-paginator/common/index.js +1 -2
- package/dist/cjs/collection/components/collection-paginator/common/styles.js +2 -2
- package/dist/cjs/collection/components/collection-paginator/components/CollectionPaginator.liquid.js +3 -3
- package/dist/cjs/collection/setting/collection-banner/configs/uiV2.js +2 -2
- package/dist/cjs/collection/setting/collection-paginator/configs/settings.js +8 -5
- package/dist/cjs/collection/setting/collection-paginator/configs/uiV2.js +28 -3
- package/dist/cjs/index.js +34 -32
- package/dist/cjs/index.liquid.js +16 -10
- package/dist/cjs/next.js +3 -1
- package/dist/cjs/product/components/ProductImagesV3/common/common.js +360 -0
- package/dist/cjs/product/components/ProductImagesV3/common/getAttr.js +192 -0
- package/dist/cjs/product/components/ProductImagesV3/common/getBorderActiveCss.js +26 -0
- package/dist/cjs/product/components/ProductImagesV3/common/getClasses.js +94 -0
- package/dist/cjs/product/components/ProductImagesV3/common/getStyle.js +303 -0
- package/dist/cjs/product/components/ProductImagesV3/common/hoverAction.js +95 -0
- package/dist/cjs/product/components/ProductImagesV3/common/productFeaturedImage.js +59 -0
- package/dist/cjs/product/components/ProductImagesV3/common/productGallery.js +266 -0
- package/dist/cjs/product/components/ProductImagesV3/components/child/MediaIcon.js +63 -0
- package/dist/cjs/product/components/ProductImagesV3/components/child/ProductFeatureVideo.js +36 -0
- package/dist/cjs/product/components/ProductImagesV3/components/child/ProductFeaturedImageCarousel.js +109 -0
- package/dist/cjs/product/components/ProductImagesV3/components/child/ProductFeaturedImageOnly.js +139 -0
- package/dist/cjs/product/components/ProductImagesV3/components/child/ProductGalleryGrid.js +100 -0
- package/dist/cjs/product/components/ProductImagesV3/components/feature-gallery/FeatureImageWithGallery.js +77 -0
- package/dist/cjs/product/components/ProductImagesV3/components/feature-gallery/FeatureImageWithGallery.liquid.js +300 -0
- package/dist/cjs/product/components/ProductImagesV3/components/feature-only/OnlyFeatureImage.js +44 -0
- package/dist/cjs/product/components/ProductImagesV3/components/gallery-carousel/GalleryCarousel.js +83 -0
- package/dist/cjs/product/components/ProductImagesV3/components/gallery-carousel/GalleryCarousel.liquid.js +182 -0
- package/dist/cjs/product/components/ProductImagesV3/components/gallery-grid/GalleryGrid.js +30 -0
- package/dist/cjs/product/components/ProductImagesV3/components/gallery-grid/GalleryGrid.liquid.js +239 -0
- package/dist/cjs/product/components/ProductImagesV3/components/lightbox/ButtonOpenLightBox.js +28 -0
- package/dist/cjs/product/components/ProductImagesV3/components/lightbox/ProductImagesLightBox.js +144 -0
- package/dist/cjs/product/components/ProductImagesV3/composables/getProductImagesAttr.js +14 -0
- package/dist/cjs/product/components/ProductImagesV3/composables/getProductImagesClassName.js +54 -0
- package/dist/cjs/product/components/ProductImagesV3/composables/getProductImagesStyles.js +53 -0
- package/dist/cjs/product/components/ProductImagesV3/hooks/useFeatureImageWithGallery.js +55 -0
- package/dist/cjs/product/components/ProductImagesV3/hooks/useFilterImagesByVariant.js +41 -0
- package/dist/cjs/product/components/ProductImagesV3/hooks/useGalleryCarousel.js +134 -0
- package/dist/cjs/product/components/ProductImagesV3/hooks/useProductFeaturedImageCarousel.js +203 -0
- package/dist/cjs/product/components/ProductImagesV3/hooks/useProductGalleryGrid.js +87 -0
- package/dist/cjs/product/components/ProductImagesV3/index.js +291 -0
- package/dist/cjs/product/components/ProductImagesV3/index.liquid.js +153 -0
- package/dist/cjs/product/index.js +6 -4
- package/dist/cjs/product/next.js +4 -0
- package/dist/cjs/product/setting/product-image-v3/ProductFeatureImage.js +252 -0
- package/dist/cjs/product/setting/product-image-v3/ProductGalleryImage.js +251 -0
- package/dist/cjs/product/setting/product-image-v3/ProductImages.js +74 -0
- package/dist/cjs/product/setting/product-image-v3/configs/setting-v2/ProductFeatureImage.js +388 -0
- package/dist/cjs/product/setting/product-image-v3/configs/setting-v2/ProductGalleryImage.js +518 -0
- package/dist/cjs/product/setting/product-image-v3/configs/setting-v2/index.js +336 -0
- package/dist/cjs/product/setting/product-image-v3/configs/ui/FeatureNavigation.js +118 -0
- package/dist/cjs/product/setting/product-image-v3/configs/ui/ImageListNavigation.js +119 -0
- package/dist/cjs/product/setting/product-image-v3/configs/uiV1.js +237 -0
- package/dist/cjs/product/setting/product-image-v3/configs/uiV2.js +491 -0
- package/dist/cjs/setting.js +97 -95
- package/dist/cjs/swiper-carousel/arrow/Arrow.js +52 -0
- package/dist/cjs/swiper-carousel/arrow/Arrow.liquid.js +46 -0
- package/dist/cjs/swiper-carousel/arrow/common/common.js +119 -0
- package/dist/cjs/swiper-carousel/arrow/common/getClass.js +50 -0
- package/dist/cjs/swiper-carousel/arrow/common/getStyle.js +84 -0
- package/dist/cjs/swiper-carousel/carousel-item/SwiperItem.js +34 -0
- package/dist/cjs/swiper-carousel/carousel-item/SwiperItem.liquid.js +38 -0
- package/dist/cjs/swiper-carousel/carousel-item/common/getClass.js +29 -0
- package/dist/cjs/swiper-carousel/carousel-item/common/getStyle.js +79 -0
- package/dist/cjs/swiper-carousel/carousel-item/hook/useCarouseItem.js +22 -0
- package/dist/cjs/swiper-carousel/components/common/carousel.js +98 -0
- package/dist/cjs/swiper-carousel/components/const/index.js +5 -0
- package/dist/cjs/swiper-carousel/components/hooks/useTrackPreviewPause.js +34 -0
- package/dist/cjs/swiper-carousel/components/plugins/AnimationPlugin.js +42 -0
- package/dist/cjs/swiper-carousel/components/plugins/AutoPlayPlugin.js +105 -0
- package/dist/cjs/swiper-carousel/components/plugins/FixSliderMoveBackwards.js +15 -0
- package/dist/cjs/swiper-carousel/components/plugins/MutationPlugin.js +45 -0
- package/dist/cjs/swiper-carousel/dots/Dots.js +51 -0
- package/dist/cjs/swiper-carousel/dots/Dots.liquid.js +26 -0
- package/dist/cjs/swiper-carousel/dots/common/common.js +28 -0
- package/dist/cjs/swiper-carousel/dots/common/getClass.js +40 -0
- package/dist/cjs/swiper-carousel/dots/common/getStyle.js +33 -0
- package/dist/cjs/swiper-carousel/dots/hook/useDotsSetting.js +21 -0
- package/dist/cjs/swiper-carousel/index.js +17 -0
- package/dist/cjs/swiper-carousel/next.js +22 -0
- package/dist/cjs/swiper-carousel/root/Swiper.js +128 -0
- package/dist/cjs/swiper-carousel/root/Swiper.liquid.js +104 -0
- package/dist/cjs/swiper-carousel/root/common/getAttr.js +25 -0
- package/dist/cjs/swiper-carousel/root/common/getClass.js +135 -0
- package/dist/cjs/swiper-carousel/root/common/getData.js +56 -0
- package/dist/cjs/swiper-carousel/root/common/getStyle.js +64 -0
- package/dist/cjs/swiper-carousel/root/hook/useCarousel.js +482 -0
- package/dist/cjs/swiper-carousel/setting/Swiper.js +42 -0
- package/dist/cjs/swiper-carousel/setting/SwiperItem.js +40 -0
- package/dist/cjs/swiper-carousel/setting/configs/presets.js +87 -0
- package/dist/cjs/swiper-carousel/setting/configs/settingV2.js +819 -0
- package/dist/cjs/swiper-carousel/setting/configs/uiV2.js +718 -0
- package/dist/esm/article/setting/configs/ArticleAuthor/uiV2.js +1 -0
- package/dist/esm/article/setting/configs/ArticleReadMore/settings.js +0 -1
- package/dist/esm/article/setting/configs/ArticleReadMore/uiV2.js +1 -0
- package/dist/esm/banner/setting/presets/heroBanner1Col.js +1 -1
- package/dist/esm/banner/setting/presets/heroBannerContentLeft.js +2 -4
- package/dist/esm/banner/setting/presets/heroBannerContentRight.js +2 -5
- package/dist/esm/banner/setting/presets/heroBannerVideo.js +10 -0
- package/dist/esm/banner/setting/setting.js +9 -6
- package/dist/esm/banner/setting/uiV2.js +34 -10
- package/dist/esm/builder.js +6 -0
- package/dist/esm/collection/components/collection-banner/components/CollectionBanner.liquid.js +1 -1
- package/dist/esm/collection/components/collection-paginator/common/index.js +1 -2
- package/dist/esm/collection/components/collection-paginator/common/styles.js +2 -2
- package/dist/esm/collection/components/collection-paginator/components/CollectionPaginator.liquid.js +3 -3
- package/dist/esm/collection/setting/collection-banner/configs/uiV2.js +2 -2
- package/dist/esm/collection/setting/collection-paginator/configs/settings.js +8 -5
- package/dist/esm/collection/setting/collection-paginator/configs/uiV2.js +28 -3
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.liquid.js +3 -0
- package/dist/esm/next.js +3 -1
- package/dist/esm/product/components/ProductImagesV3/common/common.js +344 -0
- package/dist/esm/product/components/ProductImagesV3/common/getAttr.js +189 -0
- package/dist/esm/product/components/ProductImagesV3/common/getBorderActiveCss.js +24 -0
- package/dist/esm/product/components/ProductImagesV3/common/getClasses.js +83 -0
- package/dist/esm/product/components/ProductImagesV3/common/getStyle.js +292 -0
- package/dist/esm/product/components/ProductImagesV3/common/hoverAction.js +92 -0
- package/dist/esm/product/components/ProductImagesV3/common/productFeaturedImage.js +53 -0
- package/dist/esm/product/components/ProductImagesV3/common/productGallery.js +251 -0
- package/dist/esm/product/components/ProductImagesV3/components/child/MediaIcon.js +59 -0
- package/dist/esm/product/components/ProductImagesV3/components/child/ProductFeatureVideo.js +32 -0
- package/dist/esm/product/components/ProductImagesV3/components/child/ProductFeaturedImageCarousel.js +105 -0
- package/dist/esm/product/components/ProductImagesV3/components/child/ProductFeaturedImageOnly.js +135 -0
- package/dist/esm/product/components/ProductImagesV3/components/child/ProductGalleryGrid.js +96 -0
- package/dist/esm/product/components/ProductImagesV3/components/feature-gallery/FeatureImageWithGallery.js +73 -0
- package/dist/esm/product/components/ProductImagesV3/components/feature-gallery/FeatureImageWithGallery.liquid.js +296 -0
- package/dist/esm/product/components/ProductImagesV3/components/feature-only/OnlyFeatureImage.js +40 -0
- package/dist/esm/product/components/ProductImagesV3/components/gallery-carousel/GalleryCarousel.js +79 -0
- package/dist/esm/product/components/ProductImagesV3/components/gallery-carousel/GalleryCarousel.liquid.js +178 -0
- package/dist/esm/product/components/ProductImagesV3/components/gallery-grid/GalleryGrid.js +26 -0
- package/dist/esm/product/components/ProductImagesV3/components/gallery-grid/GalleryGrid.liquid.js +235 -0
- package/dist/esm/product/components/ProductImagesV3/components/lightbox/ButtonOpenLightBox.js +24 -0
- package/dist/esm/product/components/ProductImagesV3/components/lightbox/ProductImagesLightBox.js +140 -0
- package/dist/esm/product/components/ProductImagesV3/composables/getProductImagesAttr.js +12 -0
- package/dist/esm/product/components/ProductImagesV3/composables/getProductImagesClassName.js +52 -0
- package/dist/esm/product/components/ProductImagesV3/composables/getProductImagesStyles.js +51 -0
- package/dist/esm/product/components/ProductImagesV3/hooks/useFeatureImageWithGallery.js +53 -0
- package/dist/esm/product/components/ProductImagesV3/hooks/useFilterImagesByVariant.js +39 -0
- package/dist/esm/product/components/ProductImagesV3/hooks/useGalleryCarousel.js +132 -0
- package/dist/esm/product/components/ProductImagesV3/hooks/useProductFeaturedImageCarousel.js +201 -0
- package/dist/esm/product/components/ProductImagesV3/hooks/useProductGalleryGrid.js +85 -0
- package/dist/esm/product/components/ProductImagesV3/index.js +287 -0
- package/dist/esm/product/components/ProductImagesV3/index.liquid.js +149 -0
- package/dist/esm/product/index.js +26 -24
- package/dist/esm/product/next.js +4 -0
- package/dist/esm/product/setting/product-image-v3/ProductFeatureImage.js +248 -0
- package/dist/esm/product/setting/product-image-v3/ProductGalleryImage.js +248 -0
- package/dist/esm/product/setting/product-image-v3/ProductImages.js +70 -0
- package/dist/esm/product/setting/product-image-v3/configs/setting-v2/ProductFeatureImage.js +384 -0
- package/dist/esm/product/setting/product-image-v3/configs/setting-v2/ProductGalleryImage.js +515 -0
- package/dist/esm/product/setting/product-image-v3/configs/setting-v2/index.js +334 -0
- package/dist/esm/product/setting/product-image-v3/configs/ui/FeatureNavigation.js +116 -0
- package/dist/esm/product/setting/product-image-v3/configs/ui/ImageListNavigation.js +117 -0
- package/dist/esm/product/setting/product-image-v3/configs/uiV1.js +235 -0
- package/dist/esm/product/setting/product-image-v3/configs/uiV2.js +489 -0
- package/dist/esm/setting.js +2 -0
- package/dist/esm/swiper-carousel/arrow/Arrow.js +48 -0
- package/dist/esm/swiper-carousel/arrow/Arrow.liquid.js +42 -0
- package/dist/esm/swiper-carousel/arrow/common/common.js +111 -0
- package/dist/esm/swiper-carousel/arrow/common/getClass.js +48 -0
- package/dist/esm/swiper-carousel/arrow/common/getStyle.js +82 -0
- package/dist/esm/swiper-carousel/carousel-item/SwiperItem.js +30 -0
- package/dist/esm/swiper-carousel/carousel-item/SwiperItem.liquid.js +34 -0
- package/dist/esm/swiper-carousel/carousel-item/common/getClass.js +27 -0
- package/dist/esm/swiper-carousel/carousel-item/common/getStyle.js +77 -0
- package/dist/esm/swiper-carousel/carousel-item/hook/useCarouseItem.js +20 -0
- package/dist/esm/swiper-carousel/components/common/carousel.js +93 -0
- package/dist/esm/swiper-carousel/components/const/index.js +3 -0
- package/dist/esm/swiper-carousel/components/hooks/useTrackPreviewPause.js +30 -0
- package/dist/esm/swiper-carousel/components/plugins/AnimationPlugin.js +35 -0
- package/dist/esm/swiper-carousel/components/plugins/AutoPlayPlugin.js +103 -0
- package/dist/esm/swiper-carousel/components/plugins/FixSliderMoveBackwards.js +13 -0
- package/dist/esm/swiper-carousel/components/plugins/MutationPlugin.js +43 -0
- package/dist/esm/swiper-carousel/dots/Dots.js +47 -0
- package/dist/esm/swiper-carousel/dots/Dots.liquid.js +22 -0
- package/dist/esm/swiper-carousel/dots/common/common.js +26 -0
- package/dist/esm/swiper-carousel/dots/common/getClass.js +38 -0
- package/dist/esm/swiper-carousel/dots/common/getStyle.js +31 -0
- package/dist/esm/swiper-carousel/dots/hook/useDotsSetting.js +19 -0
- package/dist/esm/swiper-carousel/index.js +15 -0
- package/dist/esm/swiper-carousel/next.js +18 -0
- package/dist/esm/swiper-carousel/root/Swiper.js +124 -0
- package/dist/esm/swiper-carousel/root/Swiper.liquid.js +100 -0
- package/dist/esm/swiper-carousel/root/common/getAttr.js +23 -0
- package/dist/esm/swiper-carousel/root/common/getClass.js +133 -0
- package/dist/esm/swiper-carousel/root/common/getData.js +54 -0
- package/dist/esm/swiper-carousel/root/common/getStyle.js +62 -0
- package/dist/esm/swiper-carousel/root/hook/useCarousel.js +480 -0
- package/dist/esm/swiper-carousel/setting/Swiper.js +38 -0
- package/dist/esm/swiper-carousel/setting/SwiperItem.js +36 -0
- package/dist/esm/swiper-carousel/setting/configs/presets.js +85 -0
- package/dist/esm/swiper-carousel/setting/configs/settingV2.js +815 -0
- package/dist/esm/swiper-carousel/setting/configs/uiV2.js +713 -0
- package/dist/types/index.d.ts +552 -117
- package/package.json +3 -3
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var dynamic = require('next/dynamic');
|
|
6
|
+
var Loading = require('../common/components/Loading.js');
|
|
7
|
+
require('react/jsx-runtime');
|
|
8
|
+
require('react');
|
|
9
|
+
require('@gem-sdk/core');
|
|
10
|
+
|
|
11
|
+
const SwiperCarousel = dynamic(()=>Promise.resolve().then(function () { return require('./root/Swiper.js'); }), {
|
|
12
|
+
loading: Loading.default
|
|
13
|
+
});
|
|
14
|
+
const SwiperCarouselItem = dynamic(()=>Promise.resolve().then(function () { return require('./carousel-item/SwiperItem.js'); }), {
|
|
15
|
+
loading: Loading.default
|
|
16
|
+
});
|
|
17
|
+
var swiperCarousel = {
|
|
18
|
+
SwiperCarousel,
|
|
19
|
+
SwiperCarouselItem
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
exports.default = swiperCarousel;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var core = require('@gem-sdk/core');
|
|
8
|
+
var React = require('react');
|
|
9
|
+
var Dots = require('../dots/Dots.js');
|
|
10
|
+
var Arrow = require('../arrow/Arrow.js');
|
|
11
|
+
var common = require('../arrow/common/common.js');
|
|
12
|
+
var useCarousel = require('./hook/useCarousel.js');
|
|
13
|
+
var getClass = require('./common/getClass.js');
|
|
14
|
+
var getStyle = require('./common/getStyle.js');
|
|
15
|
+
var getAttr = require('./common/getAttr.js');
|
|
16
|
+
var getData = require('./common/getData.js');
|
|
17
|
+
|
|
18
|
+
const Carousel = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
19
|
+
const { children, builderAttrs, builderProps, styles, isHiddenArrowWhenDisabled = true, hiddenDotWhenOnlyOne, elmRef } = props;
|
|
20
|
+
const setting = common.mappingNavigationCarousel(props.setting);
|
|
21
|
+
const renderData = {
|
|
22
|
+
...props,
|
|
23
|
+
setting
|
|
24
|
+
};
|
|
25
|
+
const { arrowButtonSize, arrowBackgroundColor, arrowGapToEachSide = '16', roundedArrow, arrowIconSize, arrowCustomColor, arrowBorder, arrowShadow, showWhenHover } = setting ?? {};
|
|
26
|
+
const { totalSlideItem, isInfinity, slider, currentSlide, localRef, showNavigation, isRenderDots, handleDotClick, getItemsPerPage, sliderRef, handleNextAndPrevSlide, dispatchEventSelectSlide, getNumberOfFullWidthShow } = useCarousel.useCarousel(renderData, ref);
|
|
27
|
+
const { loopConfig, arrowShowConfig } = getData.getData(renderData);
|
|
28
|
+
const { rootClassRender, wrapperClassRender, wrapperInnerClass, sliderClass } = getClass.getClass(renderData);
|
|
29
|
+
const { rootStyleRender, wrapperStyleRender, wrapperInnerStyle } = getStyle.getStyle(renderData);
|
|
30
|
+
const { rootAttrRender, sliderAttr } = getAttr.getAttr(renderData);
|
|
31
|
+
const currentDevice = core.useCurrentDevice();
|
|
32
|
+
const enabledSneakPeak = setting?.sneakPeak?.[currentDevice];
|
|
33
|
+
const renderArrow = (position)=>{
|
|
34
|
+
const isNext = position === 'next';
|
|
35
|
+
return /*#__PURE__*/ jsxRuntime.jsx(Arrow.default, {
|
|
36
|
+
uid: builderProps?.uid,
|
|
37
|
+
custom: setting?.arrowCustom ?? '',
|
|
38
|
+
showArrow: arrowShowConfig,
|
|
39
|
+
arrowButtonSize: arrowButtonSize || {},
|
|
40
|
+
arrowIconSize: arrowIconSize || {},
|
|
41
|
+
arrowBackgroundColor: arrowBackgroundColor || '',
|
|
42
|
+
arrowCustomColor: arrowCustomColor,
|
|
43
|
+
gapToEachSize: arrowGapToEachSide,
|
|
44
|
+
showWhenHover: showWhenHover,
|
|
45
|
+
arrowBorder: arrowBorder || {},
|
|
46
|
+
arrowCorner: roundedArrow || {},
|
|
47
|
+
arrowShadow: arrowShadow || {},
|
|
48
|
+
onClick: (e)=>{
|
|
49
|
+
e.stopPropagation();
|
|
50
|
+
handleNextAndPrevSlide(position);
|
|
51
|
+
},
|
|
52
|
+
left: !isNext,
|
|
53
|
+
disabled: !isInfinity && slider?.track?.details?.abs === 0,
|
|
54
|
+
vertical: setting?.vertical,
|
|
55
|
+
isHiddenWhenDisabled: isHiddenArrowWhenDisabled,
|
|
56
|
+
rootId: props?.parentClass
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
const renderChildren = ()=>{
|
|
60
|
+
return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
61
|
+
children: core.isEmptyChildren(children) ? /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
62
|
+
children: "No Slider"
|
|
63
|
+
}) : React.Children.map(core.filterToolbarPreview(children), (child, index)=>{
|
|
64
|
+
if (/*#__PURE__*/ React.isValidElement(child)) {
|
|
65
|
+
return /*#__PURE__*/ jsxRuntime.jsx(child.type, {
|
|
66
|
+
...child.props,
|
|
67
|
+
index: index,
|
|
68
|
+
parentSettings: setting,
|
|
69
|
+
parentStyle: styles,
|
|
70
|
+
background: setting?.background,
|
|
71
|
+
parentUid: builderProps?.uid,
|
|
72
|
+
dispatchEventSelectSlide: dispatchEventSelectSlide
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
return null;
|
|
76
|
+
})
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
80
|
+
ref: elmRef,
|
|
81
|
+
...rootAttrRender,
|
|
82
|
+
className: rootClassRender,
|
|
83
|
+
style: rootStyleRender,
|
|
84
|
+
children: /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
85
|
+
ref: localRef,
|
|
86
|
+
...builderAttrs,
|
|
87
|
+
className: wrapperClassRender,
|
|
88
|
+
style: wrapperStyleRender,
|
|
89
|
+
children: [
|
|
90
|
+
/*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
91
|
+
className: wrapperInnerClass,
|
|
92
|
+
style: wrapperInnerStyle,
|
|
93
|
+
children: [
|
|
94
|
+
showNavigation && renderArrow('prev'),
|
|
95
|
+
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
96
|
+
ref: sliderRef,
|
|
97
|
+
...sliderAttr,
|
|
98
|
+
className: sliderClass,
|
|
99
|
+
children: renderChildren()
|
|
100
|
+
}),
|
|
101
|
+
showNavigation && renderArrow('next')
|
|
102
|
+
]
|
|
103
|
+
}),
|
|
104
|
+
isRenderDots && /*#__PURE__*/ jsxRuntime.jsx(Dots.default, {
|
|
105
|
+
showDots: setting?.dot,
|
|
106
|
+
dotStyle: setting?.dotStyle,
|
|
107
|
+
totalSlideItem: totalSlideItem,
|
|
108
|
+
slideItemsPerPage: getItemsPerPage(),
|
|
109
|
+
currentSlide: currentSlide,
|
|
110
|
+
enabledSneakPeak: enabledSneakPeak,
|
|
111
|
+
vertical: setting?.vertical,
|
|
112
|
+
loop: loopConfig,
|
|
113
|
+
dotColor: setting?.dotColor,
|
|
114
|
+
dotGapToCarousel: setting?.dotGapToCarousel,
|
|
115
|
+
dotSize: setting?.dotSize,
|
|
116
|
+
dotActiveColor: setting?.dotActiveColor,
|
|
117
|
+
hiddenWhenOnlyOne: hiddenDotWhenOnlyOne,
|
|
118
|
+
sneakPeakType: setting?.sneakPeakType,
|
|
119
|
+
numberOfFullWidthShow: getNumberOfFullWidthShow(currentDevice),
|
|
120
|
+
onHandleClick: handleDotClick
|
|
121
|
+
}),
|
|
122
|
+
core.filterToolbarPreview(children, true)
|
|
123
|
+
]
|
|
124
|
+
})
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
exports.default = Carousel;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var core = require('@gem-sdk/core');
|
|
6
|
+
var Arrow_liquid = require('../arrow/Arrow.liquid.js');
|
|
7
|
+
var helpers = require('../../helpers.js');
|
|
8
|
+
var Dots_liquid = require('../dots/Dots.liquid.js');
|
|
9
|
+
var common = require('../arrow/common/common.js');
|
|
10
|
+
var getData = require('./common/getData.js');
|
|
11
|
+
var getClass = require('./common/getClass.js');
|
|
12
|
+
var getStyle = require('./common/getStyle.js');
|
|
13
|
+
var getAttr = require('./common/getAttr.js');
|
|
14
|
+
|
|
15
|
+
const Carousel = (props)=>{
|
|
16
|
+
const { children, builderAttrs, builderProps, styles, isHiddenArrowWhenDisabled = true, hiddenDotWhenOnlyOne, rootId, rawChildren, conditionAppendJs } = props;
|
|
17
|
+
const setting = common.mappingNavigationCarousel(props.setting);
|
|
18
|
+
const renderData = {
|
|
19
|
+
...props,
|
|
20
|
+
setting
|
|
21
|
+
};
|
|
22
|
+
const { arrowButtonSize, arrowBackgroundColor, arrowGapToEachSide = '16', roundedArrow, arrowIconSize, arrowCustomColor, arrowBorder, arrowShadow, showWhenHover } = setting ?? {};
|
|
23
|
+
const { uniqueComponentId, loopConfig, arrowShowConfig, stateData } = getData.getData(renderData);
|
|
24
|
+
const { rootClassRender, wrapperClassRender, wrapperInnerClass, sliderClass } = getClass.getClass(renderData);
|
|
25
|
+
const { rootStyleRender, wrapperStyleRender, wrapperInnerStyle, sliderStyle } = getStyle.getStyle(renderData);
|
|
26
|
+
const { rootAttrRender, sliderAttr } = getAttr.getAttr(renderData);
|
|
27
|
+
const renderJS = ()=>{
|
|
28
|
+
return core.RenderIf(core.isLocalEnv, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="{{ 'gp-swiper.js' | asset_url }}" defer="defer"></script>`, `<script ${helpers.getSettingPreloadData('class="gps-link" delay', 'src')}="${core.baseAssetURL}/assets-v2/gp-swiper.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`);
|
|
29
|
+
};
|
|
30
|
+
const renderArrow = (position)=>{
|
|
31
|
+
const isNext = position === 'next';
|
|
32
|
+
return Arrow_liquid.default({
|
|
33
|
+
uid: builderProps?.uid,
|
|
34
|
+
componentId: uniqueComponentId,
|
|
35
|
+
custom: setting?.arrowCustom ?? '',
|
|
36
|
+
showArrow: arrowShowConfig,
|
|
37
|
+
arrowButtonSize: arrowButtonSize || {},
|
|
38
|
+
arrowIconSize: arrowIconSize || {},
|
|
39
|
+
arrowBackgroundColor: arrowBackgroundColor ?? '',
|
|
40
|
+
arrowCustomColor: arrowCustomColor,
|
|
41
|
+
gapToEachSize: arrowGapToEachSide,
|
|
42
|
+
showWhenHover: showWhenHover,
|
|
43
|
+
arrowBorder: arrowBorder || {},
|
|
44
|
+
arrowCorner: roundedArrow || {},
|
|
45
|
+
arrowShadow: arrowShadow || {},
|
|
46
|
+
left: !isNext,
|
|
47
|
+
onClick: (e)=>{
|
|
48
|
+
e.stopPropagation();
|
|
49
|
+
},
|
|
50
|
+
vertical: setting?.vertical,
|
|
51
|
+
isHiddenWhenDisabled: isHiddenArrowWhenDisabled,
|
|
52
|
+
rootId: rootId
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
const renderChildren = ()=>{
|
|
56
|
+
return core.template`
|
|
57
|
+
${rawChildren?.length ? core.WrapRenderChildren({
|
|
58
|
+
uid: builderProps?.uid ?? '',
|
|
59
|
+
customProps: rawChildren[0]?.customProps
|
|
60
|
+
}, rawChildren.map((child, index)=>{
|
|
61
|
+
if (child) {
|
|
62
|
+
return core.template`${core.RenderChildren({
|
|
63
|
+
...child,
|
|
64
|
+
index,
|
|
65
|
+
parentSettings: setting,
|
|
66
|
+
parentStyle: styles,
|
|
67
|
+
background: setting?.background,
|
|
68
|
+
parentUid: builderProps?.uid
|
|
69
|
+
})}`;
|
|
70
|
+
}
|
|
71
|
+
})) : children ?? `<div>${helpers.getStaticLocale('Carousel', 'no_slider')}</div>`}`;
|
|
72
|
+
};
|
|
73
|
+
return core.template /* liquid */ `
|
|
74
|
+
<gp-swiper gp-data='${stateData}' ${rootAttrRender} style="${rootStyleRender}" class="${rootClassRender}">
|
|
75
|
+
<div
|
|
76
|
+
${builderAttrs}
|
|
77
|
+
class="${wrapperClassRender}"
|
|
78
|
+
style="${wrapperStyleRender}"
|
|
79
|
+
>
|
|
80
|
+
<div ${sliderAttr} class="${wrapperInnerClass}" style="${wrapperInnerStyle}">
|
|
81
|
+
${renderArrow('prev')}
|
|
82
|
+
<div class="${sliderClass}" style="${sliderStyle}">
|
|
83
|
+
${renderChildren()}
|
|
84
|
+
</div>
|
|
85
|
+
${renderArrow('next')}
|
|
86
|
+
</div>
|
|
87
|
+
${Dots_liquid.default({
|
|
88
|
+
loop: loopConfig,
|
|
89
|
+
showDots: setting?.dot,
|
|
90
|
+
dotStyle: setting?.dotStyle,
|
|
91
|
+
dotGapToCarousel: setting?.dotGapToCarousel,
|
|
92
|
+
dotSize: setting?.dotSize,
|
|
93
|
+
vertical: setting?.vertical,
|
|
94
|
+
uniqueComponentId: uniqueComponentId,
|
|
95
|
+
hiddenWhenOnlyOne: hiddenDotWhenOnlyOne
|
|
96
|
+
})}
|
|
97
|
+
</div>
|
|
98
|
+
</gp-swiper>
|
|
99
|
+
${conditionAppendJs ? `{% if ${conditionAppendJs} %} ${renderJS()} {% endif %}` : renderJS()}
|
|
100
|
+
|
|
101
|
+
`;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
exports.default = Carousel;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var system = require('@gem-sdk/system');
|
|
4
|
+
var getData = require('./getData.js');
|
|
5
|
+
|
|
6
|
+
const getAttr = (props)=>{
|
|
7
|
+
const { rootAttrs, builderProps, rootId } = props;
|
|
8
|
+
const { uniqueComponentId } = getData.getData(props);
|
|
9
|
+
const rootAttrRender = system.createAttr({
|
|
10
|
+
'data-id': `${builderProps?.uid}`,
|
|
11
|
+
id: `gp-root-carousel-${uniqueComponentId}`,
|
|
12
|
+
...rootAttrs
|
|
13
|
+
});
|
|
14
|
+
const sliderAttr = system.createAttr({
|
|
15
|
+
...(builderProps?.uid || rootId) && {
|
|
16
|
+
id: `gp-swiper-${uniqueComponentId}`
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
return {
|
|
20
|
+
rootAttrRender,
|
|
21
|
+
sliderAttr
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
exports.getAttr = getAttr;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@gem-sdk/core');
|
|
4
|
+
var system = require('@gem-sdk/system');
|
|
5
|
+
var getData = require('./getData.js');
|
|
6
|
+
|
|
7
|
+
const getClass = (props)=>{
|
|
8
|
+
const DEVICES = [
|
|
9
|
+
'mobile',
|
|
10
|
+
'tablet',
|
|
11
|
+
'desktop'
|
|
12
|
+
];
|
|
13
|
+
const { setting, builderProps, wrapperClass, rootClass, advanced, fullHeight, slidesClass } = props;
|
|
14
|
+
const { sliderSelector } = getData.getData(props);
|
|
15
|
+
const getDisplayOfWrapper = ()=>{
|
|
16
|
+
let result = {};
|
|
17
|
+
DEVICES.forEach((device)=>{
|
|
18
|
+
const devicePrefix = device === 'desktop' ? '' : `${device}:`;
|
|
19
|
+
result = {
|
|
20
|
+
...result,
|
|
21
|
+
[`${devicePrefix}gp-flex`]: setting?.vertical?.[device],
|
|
22
|
+
[`${devicePrefix}gp-block`]: !setting?.vertical?.[device]
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
const getWrapperInnerHeight = ()=>{
|
|
28
|
+
let result = {};
|
|
29
|
+
DEVICES.forEach((device)=>{
|
|
30
|
+
const devicePrefix = device === 'desktop' ? '' : `${device}:`;
|
|
31
|
+
result = {
|
|
32
|
+
...result,
|
|
33
|
+
[`${devicePrefix}gp-h-full`]: setting?.vertical?.[device],
|
|
34
|
+
[`${devicePrefix}gp-flex-1`]: setting?.vertical?.[device]
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
return result;
|
|
38
|
+
};
|
|
39
|
+
const makeFlexColClass = ()=>{
|
|
40
|
+
let result = {};
|
|
41
|
+
DEVICES.forEach((device)=>{
|
|
42
|
+
const devicePrefix = device === 'desktop' ? '' : `${device}:`;
|
|
43
|
+
result = {
|
|
44
|
+
...result,
|
|
45
|
+
[`${devicePrefix}!gp-flex-col`]: setting?.vertical?.[device],
|
|
46
|
+
[`${devicePrefix}!gp-flex-row`]: !setting?.vertical?.[device]
|
|
47
|
+
};
|
|
48
|
+
});
|
|
49
|
+
return result;
|
|
50
|
+
};
|
|
51
|
+
const makeVerticalWrapClass = ()=>{
|
|
52
|
+
let result = {};
|
|
53
|
+
DEVICES.forEach((device)=>{
|
|
54
|
+
const devicePrefix = device === 'desktop' ? '' : `${device}:`;
|
|
55
|
+
if (setting?.vertical?.[device]) {
|
|
56
|
+
result = {
|
|
57
|
+
...result,
|
|
58
|
+
[`${devicePrefix}!gp-flex-wrap`]: setting?.vertical?.[device]
|
|
59
|
+
};
|
|
60
|
+
} else {
|
|
61
|
+
result = {
|
|
62
|
+
...result,
|
|
63
|
+
[`${devicePrefix}!gp-flex-nowrap`]: !setting?.vertical?.[device]
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
return result;
|
|
68
|
+
};
|
|
69
|
+
const makeVerticalMinHeightClass = ()=>{
|
|
70
|
+
let result = {};
|
|
71
|
+
DEVICES.forEach((device)=>{
|
|
72
|
+
const devicePrefix = device === 'desktop' ? '' : `${device}:`;
|
|
73
|
+
if (setting?.vertical?.[device]) {
|
|
74
|
+
result = {
|
|
75
|
+
...result,
|
|
76
|
+
[`${devicePrefix}!gp-min-h-0`]: setting?.vertical?.[device]
|
|
77
|
+
};
|
|
78
|
+
} else {
|
|
79
|
+
result = {
|
|
80
|
+
...result,
|
|
81
|
+
[`${devicePrefix}!gp-min-h-full`]: !setting?.vertical?.[device]
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
return result;
|
|
86
|
+
};
|
|
87
|
+
const wrapperClassRender = system.createClass({
|
|
88
|
+
...builderProps?.uid && {
|
|
89
|
+
[builderProps.uid]: true
|
|
90
|
+
},
|
|
91
|
+
...wrapperClass && {
|
|
92
|
+
[wrapperClass]: true
|
|
93
|
+
},
|
|
94
|
+
'gp-relative gp-my-0 tablet:gp-px-0 gp-max-w-full mobile:gp-px-0 gp-carousel-wrapper': true,
|
|
95
|
+
'!gp-flex': core.getResponsiveValueByScreen(setting?.vertical, 'desktop'),
|
|
96
|
+
'tablet:!gp-flex': core.getResponsiveValueByScreen(setting?.vertical, 'tablet'),
|
|
97
|
+
'mobile:!gp-flex': core.getResponsiveValueByScreen(setting?.vertical, 'mobile'),
|
|
98
|
+
...getDisplayOfWrapper()
|
|
99
|
+
});
|
|
100
|
+
const wrapperInnerClass = system.createClass({
|
|
101
|
+
'gp-relative gp-overflow-hidden gp-flex gp-items-center gp-justify-between': true,
|
|
102
|
+
'!gp-h-full': fullHeight,
|
|
103
|
+
...getWrapperInnerHeight(),
|
|
104
|
+
...makeFlexColClass()
|
|
105
|
+
});
|
|
106
|
+
const rootClassRender = system.createClass({
|
|
107
|
+
'gp-group/carousel gp-w-full gp-flex': true,
|
|
108
|
+
'!gp-flex-col': core.getResponsiveValueByScreen(setting?.vertical, 'desktop'),
|
|
109
|
+
'tablet:!flex-col': core.getResponsiveValueByScreen(setting?.vertical, 'tablet'),
|
|
110
|
+
'mobile:!flex-col': core.getResponsiveValueByScreen(setting?.vertical, 'mobile'),
|
|
111
|
+
...rootClass && {
|
|
112
|
+
[rootClass]: true
|
|
113
|
+
},
|
|
114
|
+
...advanced?.cssClass && {
|
|
115
|
+
[advanced.cssClass]: true
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
const sliderClass = system.createClass({
|
|
119
|
+
'gp-swiper-wrapper gp-flex gp-h-full gp-select-none': true,
|
|
120
|
+
[sliderSelector]: true,
|
|
121
|
+
...slidesClass && {
|
|
122
|
+
[slidesClass]: true
|
|
123
|
+
},
|
|
124
|
+
...makeVerticalWrapClass(),
|
|
125
|
+
...makeVerticalMinHeightClass()
|
|
126
|
+
});
|
|
127
|
+
return {
|
|
128
|
+
rootClassRender,
|
|
129
|
+
wrapperClassRender,
|
|
130
|
+
wrapperInnerClass,
|
|
131
|
+
sliderClass
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
exports.getClass = getClass;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@gem-sdk/core');
|
|
4
|
+
var system = require('@gem-sdk/system');
|
|
5
|
+
|
|
6
|
+
const getData = (props)=>{
|
|
7
|
+
const DEVICES = [
|
|
8
|
+
'mobile',
|
|
9
|
+
'tablet',
|
|
10
|
+
'desktop'
|
|
11
|
+
];
|
|
12
|
+
const { setting, rootId, builderProps, styles, moveToIdx, isHiddenArrowWhenDisabled } = props;
|
|
13
|
+
const uniqueComponentId = rootId ?? builderProps?.uid;
|
|
14
|
+
const sliderSelector = `gp-carousel-slider-${builderProps?.uid}`;
|
|
15
|
+
const { enableAction = {
|
|
16
|
+
desktop: true
|
|
17
|
+
}, navigationStyle, navigationEnable = {
|
|
18
|
+
desktop: true
|
|
19
|
+
} } = setting ?? {};
|
|
20
|
+
const getLoopSetting = ()=>{
|
|
21
|
+
let result = setting?.loop;
|
|
22
|
+
DEVICES.forEach((device)=>{
|
|
23
|
+
result = {
|
|
24
|
+
...result,
|
|
25
|
+
[device]: core.getResponsiveValueByScreen(enableAction) ? result?.[device] : false
|
|
26
|
+
};
|
|
27
|
+
});
|
|
28
|
+
return result;
|
|
29
|
+
};
|
|
30
|
+
const getArrowType = ()=>{
|
|
31
|
+
let result = navigationStyle;
|
|
32
|
+
DEVICES.forEach((device)=>{
|
|
33
|
+
result = {
|
|
34
|
+
...result,
|
|
35
|
+
[device]: core.getResponsiveValueByScreen(navigationEnable, device) ? result?.[device] : 'none'
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
const stateData = system.createStateOrContext({
|
|
41
|
+
id: uniqueComponentId,
|
|
42
|
+
moveToIdx,
|
|
43
|
+
isHiddenArrowWhenDisabled,
|
|
44
|
+
setting,
|
|
45
|
+
styles
|
|
46
|
+
});
|
|
47
|
+
return {
|
|
48
|
+
loopConfig: getLoopSetting(),
|
|
49
|
+
stateData: JSON.stringify(stateData).replaceAll("'", '''),
|
|
50
|
+
uniqueComponentId,
|
|
51
|
+
arrowShowConfig: getArrowType(),
|
|
52
|
+
sliderSelector
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
exports.getData = getData;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@gem-sdk/core');
|
|
4
|
+
var system = require('@gem-sdk/system');
|
|
5
|
+
|
|
6
|
+
const getStyle = (props)=>{
|
|
7
|
+
const DEVICES = [
|
|
8
|
+
'mobile',
|
|
9
|
+
'tablet',
|
|
10
|
+
'desktop'
|
|
11
|
+
];
|
|
12
|
+
const { styles, setting, style, rootStyles } = props;
|
|
13
|
+
const { arrowGapToEachSide = '16' } = setting ?? {};
|
|
14
|
+
const styleHeight = core.makeStyleResponsive('h', core.getHeightByShapeGlobalSize(styles?.sizeSetting));
|
|
15
|
+
const styleWidth = core.makeStyleWithDefault('w', core.getWidthByShapeGlobalSize(styles?.sizeSetting, true), {
|
|
16
|
+
desktop: '--g-ct-w',
|
|
17
|
+
tablet: '--g-ct-w',
|
|
18
|
+
mobile: '--g-ct-w'
|
|
19
|
+
});
|
|
20
|
+
const makeSpacing = ()=>{
|
|
21
|
+
let result = {};
|
|
22
|
+
DEVICES.forEach((device)=>{
|
|
23
|
+
const isVertical = core.getResponsiveValueByScreen(setting?.vertical, device);
|
|
24
|
+
const spacing = core.getResponsiveValueByScreen(styles?.spacing, device);
|
|
25
|
+
const key = isVertical ? `--rg${device !== 'desktop' ? `-${device}` : ''}` : `--cg${device !== 'desktop' ? `-${device}` : ''}`;
|
|
26
|
+
result = {
|
|
27
|
+
...result,
|
|
28
|
+
[key]: `${spacing ?? 0}px`
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
return result;
|
|
32
|
+
};
|
|
33
|
+
const wrapperStyleRender = system.createStyle({
|
|
34
|
+
...style,
|
|
35
|
+
...styleHeight,
|
|
36
|
+
...styleWidth,
|
|
37
|
+
...core.getBgByDevice({
|
|
38
|
+
backgroundColor: styles?.backgroundColor,
|
|
39
|
+
backgroundImage: styles?.backgroundImage
|
|
40
|
+
})
|
|
41
|
+
});
|
|
42
|
+
const wrapperInnerStyle = system.createStyle({
|
|
43
|
+
...core.makeContainerWidthOrHeight({
|
|
44
|
+
vertical: setting?.vertical,
|
|
45
|
+
dotStyle: setting?.dotStyle
|
|
46
|
+
}),
|
|
47
|
+
gap: arrowGapToEachSide + 'px'
|
|
48
|
+
});
|
|
49
|
+
const rootStyleRender = system.createStyle({
|
|
50
|
+
...core.makeStyleResponsive('jc', styles?.align),
|
|
51
|
+
...rootStyles
|
|
52
|
+
});
|
|
53
|
+
const sliderStyle = system.createStyle({
|
|
54
|
+
...makeSpacing()
|
|
55
|
+
});
|
|
56
|
+
return {
|
|
57
|
+
rootStyleRender,
|
|
58
|
+
wrapperStyleRender,
|
|
59
|
+
wrapperInnerStyle,
|
|
60
|
+
sliderStyle
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
exports.getStyle = getStyle;
|