@gem-sdk/components 4.0.0-staging.1204 → 4.0.0-staging.1205
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/builder.js +1 -1
- package/dist/cjs/carousel/components/arrow/common/classes.js +1 -1
- package/dist/cjs/carousel/components/arrow/common/helpers.js +1 -1
- package/dist/cjs/carousel/components/arrow/common/styles.js +11 -11
- package/dist/cjs/carousel/components/dot/common/helpers.js +1 -1
- package/dist/cjs/carousel/components/item/CarouselItem.js +1 -1
- package/dist/cjs/carousel/components/item/common/styles.js +1 -1
- package/dist/cjs/carousel/components/root/Carousel.js +1 -1
- package/dist/cjs/carousel/components/root/Carousel.liquid.js +6 -8
- package/dist/cjs/carousel/components/root/common/attrs.js +1 -1
- package/dist/cjs/carousel/components/root/common/classes.js +1 -1
- package/dist/cjs/carousel/components/root/common/styles.js +1 -1
- package/dist/cjs/carousel/hooks/useCarousel.js +1 -1
- package/dist/cjs/carousel/hooks/useDotsSetting.js +1 -1
- package/dist/cjs/carousel/index.js +1 -1
- package/dist/cjs/carousel/plugins/animation.js +1 -1
- package/dist/cjs/carousel/plugins/auto-play.js +1 -0
- package/dist/cjs/carousel/plugins/fix-slider-move-backward.js +1 -0
- package/dist/cjs/carousel/plugins/mutation.js +1 -0
- package/dist/cjs/carousel/settings/configs/presets.js +4 -4
- package/dist/cjs/carousel/settings/configs/settings-v2.js +1 -1
- package/dist/cjs/carousel-v3/common/helpers.js +1 -0
- package/dist/cjs/carousel-v3/components/arrow/Arrow.js +10 -0
- package/dist/cjs/carousel-v3/components/arrow/Arrow.liquid.js +26 -0
- package/dist/cjs/carousel-v3/components/arrow/common/classes.js +1 -0
- package/dist/cjs/carousel-v3/components/arrow/common/helpers.js +1 -0
- package/dist/cjs/carousel-v3/components/arrow/common/styles.js +33 -0
- package/dist/cjs/carousel-v3/components/dot/Dots.js +2 -0
- package/dist/cjs/carousel-v3/components/dot/Dots.liquid.js +7 -0
- package/dist/cjs/carousel-v3/components/dot/common/classes.js +1 -0
- package/dist/cjs/carousel-v3/components/dot/common/helpers.js +1 -0
- package/dist/cjs/carousel-v3/components/dot/common/styles.js +1 -0
- package/dist/cjs/carousel-v3/components/item/CarouselItem.js +2 -0
- package/dist/cjs/carousel-v3/components/item/CarouselItem.liquid.js +22 -0
- package/dist/cjs/carousel-v3/components/item/common/classes.js +1 -0
- package/dist/cjs/carousel-v3/components/item/common/styles.js +1 -0
- package/dist/cjs/carousel-v3/components/root/Carousel.js +2 -0
- package/dist/cjs/carousel-v3/components/root/Carousel.liquid.js +23 -0
- package/dist/cjs/carousel-v3/components/root/common/attrs.js +1 -0
- package/dist/cjs/carousel-v3/components/root/common/classes.js +1 -0
- package/dist/cjs/carousel-v3/components/root/common/helpers.js +1 -0
- package/dist/cjs/carousel-v3/components/root/common/styles.js +1 -0
- package/dist/cjs/carousel-v3/components/swiper/Swiper.js +1 -0
- package/dist/cjs/carousel-v3/hooks/useCarouseItem.js +1 -0
- package/dist/cjs/carousel-v3/hooks/useCarousel.js +1 -0
- package/dist/cjs/carousel-v3/hooks/useDotsSetting.js +1 -0
- package/dist/cjs/carousel-v3/hooks/useTrackPreviewPause.js +1 -0
- package/dist/cjs/carousel-v3/index.js +1 -0
- package/dist/cjs/{carousel → carousel-v3}/next.js +1 -1
- package/dist/cjs/carousel-v3/plugins/animation.js +1 -0
- package/dist/cjs/carousel-v3/settings/Carousel.js +5 -0
- package/dist/cjs/carousel-v3/settings/CarouselItem.js +1 -0
- package/dist/cjs/carousel-v3/settings/configs/presets.js +114 -0
- package/dist/cjs/carousel-v3/settings/configs/settings-v2.js +3 -0
- package/dist/cjs/carousel-v3/settings/configs/ui-v1.js +1 -0
- package/dist/cjs/carousel-v3/settings/configs/ui-v2.js +1 -0
- package/dist/cjs/grid/components/row/common/helpers.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.liquid.js +1 -1
- package/dist/cjs/marquee/hooks/useMarqueeScrollToItem.js +1 -1
- package/dist/cjs/marquee/settings/Marquee.js +1 -1
- package/dist/cjs/next.js +1 -1
- package/dist/cjs/product/components/product-images/ProductGalleryCarousel.js +1 -1
- package/dist/cjs/product/components/product-images/ProductGalleryCarousel.liquid.js +1 -1
- package/dist/cjs/product/components/product-images/ProductImagesLightBox.js +1 -1
- package/dist/cjs/product/components/product-images-v2/ProductImagesV2.liquid.js +6 -6
- package/dist/cjs/product/components/product-images-v2/common/attrs.js +1 -1
- package/dist/cjs/product/components/product-images-v2/common/classes.js +1 -1
- package/dist/cjs/product/components/product-images-v2/common/common.js +1 -1
- package/dist/cjs/product/components/product-images-v2/common/getBorderActiveCss.js +1 -5
- package/dist/cjs/product/components/product-images-v2/common/productFeaturedImage.js +1 -1
- package/dist/cjs/product/components/product-images-v2/common/productGallery.js +1 -1
- package/dist/cjs/product/components/product-images-v2/common/styles.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/child/ProductFeaturedImageCarousel.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/child/ProductGalleryGrid.js +2 -2
- package/dist/cjs/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +13 -13
- package/dist/cjs/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +7 -7
- package/dist/cjs/product/components/product-images-v2/components/gallery-grid/GalleryGrid.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +4 -4
- package/dist/cjs/product/components/product-images-v2/components/lightbox/ProductImagesLightBox.js +1 -1
- package/dist/cjs/product/components/product-images-v2/hooks/useProductFeaturedImageCarousel.js +1 -1
- package/dist/cjs/product/components/product-images-v2/hooks/useProductGalleryGrid.js +1 -1
- package/dist/cjs/product/components/product-images-v3/ProductImageV2.js +26 -0
- package/dist/cjs/product/components/product-images-v3/ProductImagesV2.liquid.js +44 -0
- package/dist/cjs/product/components/product-images-v3/common/attrs.js +1 -0
- package/dist/cjs/product/components/product-images-v3/common/classes.js +1 -0
- package/dist/cjs/product/components/product-images-v3/common/common.js +1 -0
- package/dist/cjs/product/components/product-images-v3/common/getBorderActiveCss.js +20 -0
- package/dist/cjs/product/components/product-images-v3/common/hoverAction.js +1 -0
- package/dist/cjs/product/components/product-images-v3/common/productFeaturedImage.js +1 -0
- package/dist/cjs/product/components/product-images-v3/common/productGallery.js +1 -0
- package/dist/cjs/product/components/product-images-v3/common/styles.js +1 -0
- package/dist/cjs/product/components/product-images-v3/components/child/MediaIcon.js +2 -0
- package/dist/cjs/product/components/product-images-v3/components/child/ProductFeatureVideo.js +1 -0
- package/dist/cjs/product/components/product-images-v3/components/child/ProductFeaturedImageCarousel.js +1 -0
- package/dist/cjs/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.js +2 -0
- package/dist/cjs/product/components/product-images-v3/components/child/ProductGalleryGrid.js +2 -0
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.js +1 -0
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +118 -0
- package/dist/cjs/product/components/product-images-v3/components/feature-only/OnlyFeatureImage.js +2 -0
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.js +1 -0
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +46 -0
- package/dist/cjs/product/components/product-images-v3/components/gallery-grid/GalleryGrid.js +2 -0
- package/dist/cjs/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +93 -0
- package/dist/cjs/product/components/product-images-v3/components/lightbox/ButtonOpenLightBox.js +2 -0
- package/dist/cjs/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js +2 -0
- package/dist/cjs/product/components/product-images-v3/composables/getProductImagesAttr.js +1 -0
- package/dist/cjs/product/components/product-images-v3/composables/getProductImagesClassName.js +1 -0
- package/dist/cjs/product/components/product-images-v3/composables/getProductImagesStyles.js +1 -0
- package/dist/cjs/product/components/product-images-v3/hooks/useFeatureImageWithGallery.js +1 -0
- package/dist/cjs/product/components/product-images-v3/hooks/useFilterImagesByVariant.js +1 -0
- package/dist/cjs/product/components/product-images-v3/hooks/useGalleryCarousel.js +1 -0
- package/dist/cjs/product/components/product-images-v3/hooks/useProductFeaturedImageCarousel.js +1 -0
- package/dist/cjs/product/components/product-images-v3/hooks/useProductGalleryGrid.js +1 -0
- package/dist/cjs/product/components/product-list/ProductListCarouselLayout.liquid.js +4 -4
- package/dist/cjs/product/components/product-list-v3/ProductList.js +1 -0
- package/dist/cjs/product/components/product-list-v3/ProductList.liquid.js +205 -0
- package/dist/cjs/product/components/product-list-v3/ProductListCarouselItem.liquid.js +15 -0
- package/dist/cjs/product/components/product-list-v3/ProductListCarouselLayout.js +1 -0
- package/dist/cjs/product/components/product-list-v3/ProductListCarouselLayout.liquid.js +22 -0
- package/dist/cjs/product/components/product-list-v3/ProductListGridItem.liquid.js +19 -0
- package/dist/cjs/product/components/product-list-v3/ProductListGridLayout.js +1 -0
- package/dist/cjs/product/components/product-list-v3/ProductListGridLayout.liquid.js +34 -0
- package/dist/cjs/product/components/product-list-v3/common/attrs.js +1 -0
- package/dist/cjs/product/components/product-list-v3/common/classes.js +1 -0
- package/dist/cjs/product/components/product-list-v3/common/helpers.js +1 -0
- package/dist/cjs/product/components/product-list-v3/common/styles.js +1 -0
- package/dist/cjs/product/index.js +1 -1
- package/dist/cjs/product/next.js +1 -1
- package/dist/cjs/product/settings/ProductListV3.js +8 -0
- package/dist/cjs/product/settings/product/configs/product-presets/product-1-col.js +2 -2
- package/dist/cjs/product/settings/product/configs/product-presets/product-2-col.js +2 -2
- package/dist/cjs/product/settings/product/configs/product-presets/product-default.js +2 -2
- package/dist/cjs/product/settings/product-image-v2/ProductImages.js +2 -2
- package/dist/cjs/product/settings/product-image-v2/configs/setting-v2/ProductFeatureImage.js +1 -1
- package/dist/cjs/product/settings/product-image-v2/configs/setting-v2/ProductGalleryImage.js +3 -2
- package/dist/cjs/product/settings/product-image-v2/configs/ui/FeatureNavigation.js +1 -1
- package/dist/cjs/product/settings/product-image-v2/configs/ui/ImageListNavigation.js +1 -1
- package/dist/cjs/product/settings/product-image-v2/configs/ui-v2.js +1 -1
- package/dist/cjs/product/settings/product-image-v3/ProductFeatureImage.js +1 -0
- package/dist/cjs/product/settings/product-image-v3/ProductGalleryImage.js +1 -0
- package/dist/cjs/product/settings/product-image-v3/ProductImages.js +21 -0
- package/dist/cjs/product/settings/product-image-v3/configs/setting-v2/ProductFeatureImage.js +2 -0
- package/dist/cjs/product/settings/product-image-v3/configs/setting-v2/ProductGalleryImage.js +2 -0
- package/dist/cjs/product/settings/product-image-v3/configs/setting-v2/index.js +1 -0
- package/dist/cjs/product/settings/product-image-v3/configs/ui/FeatureDots.js +1 -0
- package/dist/cjs/product/settings/product-image-v3/configs/ui/FeatureNavigation.js +1 -0
- package/dist/cjs/product/settings/product-image-v3/configs/ui/ImageListNavigation.js +1 -0
- package/dist/cjs/product/settings/product-image-v3/configs/ui-v1.js +1 -0
- package/dist/cjs/product/settings/product-image-v3/configs/ui-v2.js +1 -0
- package/dist/cjs/product/settings/product-list/configs/presets.js +2 -2
- package/dist/cjs/product/settings/product-list/configs/settings-v2.js +1 -1
- package/dist/cjs/product/settings/product-list-v3/configs/presets.js +37 -0
- package/dist/cjs/product/settings/product-list-v3/configs/settings-v2.js +1 -0
- package/dist/cjs/product/settings/product-list-v3/configs/ui-v1.js +1 -0
- package/dist/cjs/product/settings/product-list-v3/configs/ui-v2.js +1 -0
- package/dist/cjs/setting.js +1 -1
- package/dist/cjs/third-party/settings/KoalaBundleQuantityDiscount/index.js +1 -1
- package/dist/esm/builder.js +1 -1
- package/dist/esm/carousel/components/arrow/common/classes.js +1 -1
- package/dist/esm/carousel/components/arrow/common/helpers.js +1 -1
- package/dist/esm/carousel/components/arrow/common/styles.js +8 -8
- package/dist/esm/carousel/components/dot/common/helpers.js +1 -1
- package/dist/esm/carousel/components/item/CarouselItem.js +1 -1
- package/dist/esm/carousel/components/item/common/styles.js +1 -1
- package/dist/esm/carousel/components/root/Carousel.js +1 -1
- package/dist/esm/carousel/components/root/Carousel.liquid.js +7 -9
- package/dist/esm/carousel/components/root/common/attrs.js +1 -1
- package/dist/esm/carousel/components/root/common/classes.js +1 -1
- package/dist/esm/carousel/components/root/common/styles.js +1 -1
- package/dist/esm/carousel/hooks/useCarousel.js +1 -1
- package/dist/esm/carousel/hooks/useDotsSetting.js +1 -1
- package/dist/esm/carousel/index.js +1 -1
- package/dist/esm/carousel/plugins/animation.js +1 -1
- package/dist/esm/carousel/plugins/auto-play.js +1 -0
- package/dist/esm/carousel/plugins/fix-slider-move-backward.js +1 -0
- package/dist/esm/carousel/plugins/mutation.js +1 -0
- package/dist/esm/carousel/settings/configs/presets.js +4 -4
- package/dist/esm/carousel/settings/configs/settings-v2.js +1 -1
- package/dist/esm/carousel-v3/common/helpers.js +1 -0
- package/dist/esm/carousel-v3/components/arrow/Arrow.js +10 -0
- package/dist/esm/carousel-v3/components/arrow/Arrow.liquid.js +26 -0
- package/dist/esm/carousel-v3/components/arrow/common/classes.js +1 -0
- package/dist/esm/carousel-v3/components/arrow/common/helpers.js +1 -0
- package/dist/esm/carousel-v3/components/arrow/common/styles.js +33 -0
- package/dist/esm/carousel-v3/components/dot/Dots.js +2 -0
- package/dist/esm/carousel-v3/components/dot/Dots.liquid.js +7 -0
- package/dist/esm/carousel-v3/components/dot/common/classes.js +1 -0
- package/dist/esm/carousel-v3/components/dot/common/helpers.js +1 -0
- package/dist/esm/carousel-v3/components/dot/common/styles.js +1 -0
- package/dist/esm/carousel-v3/components/item/CarouselItem.js +2 -0
- package/dist/esm/carousel-v3/components/item/CarouselItem.liquid.js +22 -0
- package/dist/esm/carousel-v3/components/item/common/classes.js +1 -0
- package/dist/esm/carousel-v3/components/item/common/styles.js +1 -0
- package/dist/esm/carousel-v3/components/root/Carousel.js +2 -0
- package/dist/esm/carousel-v3/components/root/Carousel.liquid.js +23 -0
- package/dist/esm/carousel-v3/components/root/common/attrs.js +1 -0
- package/dist/esm/carousel-v3/components/root/common/classes.js +1 -0
- package/dist/esm/carousel-v3/components/root/common/helpers.js +1 -0
- package/dist/esm/carousel-v3/components/root/common/styles.js +1 -0
- package/dist/esm/carousel-v3/components/swiper/Swiper.js +1 -0
- package/dist/esm/carousel-v3/hooks/useCarouseItem.js +1 -0
- package/dist/esm/carousel-v3/hooks/useCarousel.js +1 -0
- package/dist/esm/carousel-v3/hooks/useDotsSetting.js +1 -0
- package/dist/esm/carousel-v3/hooks/useTrackPreviewPause.js +1 -0
- package/dist/esm/carousel-v3/index.js +1 -0
- package/dist/esm/{carousel → carousel-v3}/next.js +1 -1
- package/dist/esm/carousel-v3/plugins/animation.js +1 -0
- package/dist/esm/carousel-v3/settings/Carousel.js +5 -0
- package/dist/esm/carousel-v3/settings/CarouselItem.js +1 -0
- package/dist/esm/carousel-v3/settings/configs/presets.js +114 -0
- package/dist/esm/carousel-v3/settings/configs/settings-v2.js +3 -0
- package/dist/esm/carousel-v3/settings/configs/ui-v1.js +1 -0
- package/dist/esm/carousel-v3/settings/configs/ui-v2.js +1 -0
- package/dist/esm/grid/components/row/common/helpers.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.liquid.js +1 -1
- package/dist/esm/marquee/hooks/useMarqueeScrollToItem.js +1 -1
- package/dist/esm/marquee/settings/Marquee.js +1 -1
- package/dist/esm/next.js +1 -1
- package/dist/esm/product/components/product-images/ProductGalleryCarousel.js +1 -1
- package/dist/esm/product/components/product-images/ProductGalleryCarousel.liquid.js +1 -1
- package/dist/esm/product/components/product-images/ProductImagesLightBox.js +1 -1
- package/dist/esm/product/components/product-images-v2/ProductImagesV2.liquid.js +8 -8
- package/dist/esm/product/components/product-images-v2/common/attrs.js +1 -1
- package/dist/esm/product/components/product-images-v2/common/classes.js +1 -1
- package/dist/esm/product/components/product-images-v2/common/common.js +1 -1
- package/dist/esm/product/components/product-images-v2/common/getBorderActiveCss.js +2 -6
- package/dist/esm/product/components/product-images-v2/common/productFeaturedImage.js +1 -1
- package/dist/esm/product/components/product-images-v2/common/productGallery.js +1 -1
- package/dist/esm/product/components/product-images-v2/common/styles.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/child/ProductFeaturedImageCarousel.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/child/ProductGalleryGrid.js +2 -2
- package/dist/esm/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +48 -48
- package/dist/esm/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +14 -14
- package/dist/esm/product/components/product-images-v2/components/gallery-grid/GalleryGrid.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +11 -11
- package/dist/esm/product/components/product-images-v2/components/lightbox/ProductImagesLightBox.js +1 -1
- package/dist/esm/product/components/product-images-v2/hooks/useProductFeaturedImageCarousel.js +1 -1
- package/dist/esm/product/components/product-images-v2/hooks/useProductGalleryGrid.js +1 -1
- package/dist/esm/product/components/product-images-v3/ProductImageV2.js +26 -0
- package/dist/esm/product/components/product-images-v3/ProductImagesV2.liquid.js +44 -0
- package/dist/esm/product/components/product-images-v3/common/attrs.js +1 -0
- package/dist/esm/product/components/product-images-v3/common/classes.js +1 -0
- package/dist/esm/product/components/product-images-v3/common/common.js +1 -0
- package/dist/esm/product/components/product-images-v3/common/getBorderActiveCss.js +20 -0
- package/dist/esm/product/components/product-images-v3/common/hoverAction.js +1 -0
- package/dist/esm/product/components/product-images-v3/common/productFeaturedImage.js +1 -0
- package/dist/esm/product/components/product-images-v3/common/productGallery.js +1 -0
- package/dist/esm/product/components/product-images-v3/common/styles.js +1 -0
- package/dist/esm/product/components/product-images-v3/components/child/MediaIcon.js +2 -0
- package/dist/esm/product/components/product-images-v3/components/child/ProductFeatureVideo.js +1 -0
- package/dist/esm/product/components/product-images-v3/components/child/ProductFeaturedImageCarousel.js +1 -0
- package/dist/esm/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.js +2 -0
- package/dist/esm/product/components/product-images-v3/components/child/ProductGalleryGrid.js +2 -0
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.js +1 -0
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +118 -0
- package/dist/esm/product/components/product-images-v3/components/feature-only/OnlyFeatureImage.js +2 -0
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.js +1 -0
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +46 -0
- package/dist/esm/product/components/product-images-v3/components/gallery-grid/GalleryGrid.js +2 -0
- package/dist/esm/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +93 -0
- package/dist/esm/product/components/product-images-v3/components/lightbox/ButtonOpenLightBox.js +2 -0
- package/dist/esm/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js +2 -0
- package/dist/esm/product/components/product-images-v3/composables/getProductImagesAttr.js +1 -0
- package/dist/esm/product/components/product-images-v3/composables/getProductImagesClassName.js +1 -0
- package/dist/esm/product/components/product-images-v3/composables/getProductImagesStyles.js +1 -0
- package/dist/esm/product/components/product-images-v3/hooks/useFeatureImageWithGallery.js +1 -0
- package/dist/esm/product/components/product-images-v3/hooks/useFilterImagesByVariant.js +1 -0
- package/dist/esm/product/components/product-images-v3/hooks/useGalleryCarousel.js +1 -0
- package/dist/esm/product/components/product-images-v3/hooks/useProductFeaturedImageCarousel.js +1 -0
- package/dist/esm/product/components/product-images-v3/hooks/useProductGalleryGrid.js +1 -0
- package/dist/esm/product/components/product-list/ProductListCarouselLayout.liquid.js +6 -6
- package/dist/esm/product/components/product-list-v3/ProductList.js +1 -0
- package/dist/esm/product/components/product-list-v3/ProductList.liquid.js +205 -0
- package/dist/esm/product/components/product-list-v3/ProductListCarouselItem.liquid.js +15 -0
- package/dist/esm/product/components/product-list-v3/ProductListCarouselLayout.js +1 -0
- package/dist/esm/product/components/product-list-v3/ProductListCarouselLayout.liquid.js +22 -0
- package/dist/esm/product/components/product-list-v3/ProductListGridItem.liquid.js +19 -0
- package/dist/esm/product/components/product-list-v3/ProductListGridLayout.js +1 -0
- package/dist/esm/product/components/product-list-v3/ProductListGridLayout.liquid.js +34 -0
- package/dist/esm/product/components/product-list-v3/common/attrs.js +1 -0
- package/dist/esm/product/components/product-list-v3/common/classes.js +1 -0
- package/dist/esm/product/components/product-list-v3/common/helpers.js +1 -0
- package/dist/esm/product/components/product-list-v3/common/styles.js +1 -0
- package/dist/esm/product/index.js +1 -1
- package/dist/esm/product/next.js +1 -1
- package/dist/esm/product/settings/ProductListV3.js +8 -0
- package/dist/esm/product/settings/product/configs/product-presets/product-1-col.js +2 -2
- package/dist/esm/product/settings/product/configs/product-presets/product-2-col.js +2 -2
- package/dist/esm/product/settings/product/configs/product-presets/product-default.js +2 -2
- package/dist/esm/product/settings/product-image-v2/ProductImages.js +2 -2
- package/dist/esm/product/settings/product-image-v2/configs/setting-v2/ProductFeatureImage.js +1 -1
- package/dist/esm/product/settings/product-image-v2/configs/setting-v2/ProductGalleryImage.js +3 -2
- package/dist/esm/product/settings/product-image-v2/configs/ui/FeatureNavigation.js +1 -1
- package/dist/esm/product/settings/product-image-v2/configs/ui/ImageListNavigation.js +1 -1
- package/dist/esm/product/settings/product-image-v2/configs/ui-v2.js +1 -1
- package/dist/esm/product/settings/product-image-v3/ProductFeatureImage.js +1 -0
- package/dist/esm/product/settings/product-image-v3/ProductGalleryImage.js +1 -0
- package/dist/esm/product/settings/product-image-v3/ProductImages.js +21 -0
- package/dist/esm/product/settings/product-image-v3/configs/setting-v2/ProductFeatureImage.js +2 -0
- package/dist/esm/product/settings/product-image-v3/configs/setting-v2/ProductGalleryImage.js +2 -0
- package/dist/esm/product/settings/product-image-v3/configs/setting-v2/index.js +1 -0
- package/dist/esm/product/settings/product-image-v3/configs/ui/FeatureDots.js +1 -0
- package/dist/esm/product/settings/product-image-v3/configs/ui/FeatureNavigation.js +1 -0
- package/dist/esm/product/settings/product-image-v3/configs/ui/ImageListNavigation.js +1 -0
- package/dist/esm/product/settings/product-image-v3/configs/ui-v1.js +1 -0
- package/dist/esm/product/settings/product-image-v3/configs/ui-v2.js +1 -0
- package/dist/esm/product/settings/product-list/configs/presets.js +2 -2
- package/dist/esm/product/settings/product-list/configs/settings-v2.js +1 -1
- package/dist/esm/product/settings/product-list-v3/configs/presets.js +37 -0
- package/dist/esm/product/settings/product-list-v3/configs/settings-v2.js +1 -0
- package/dist/esm/product/settings/product-list-v3/configs/ui-v1.js +1 -0
- package/dist/esm/product/settings/product-list-v3/configs/ui-v2.js +1 -0
- package/dist/esm/setting.js +1 -1
- package/dist/esm/third-party/settings/KoalaBundleQuantityDiscount/index.js +1 -1
- package/dist/types/index.d.ts +476 -74
- package/package.json +3 -3
- package/dist/cjs/carousel/components/swiper/Swiper.js +0 -1
- package/dist/esm/carousel/components/swiper/Swiper.js +0 -1
- /package/dist/cjs/{carousel → carousel-v3}/components/swiper/SwiperSlide.js +0 -0
- /package/dist/cjs/{carousel → carousel-v3}/components/swiper/common/styles.js +0 -0
- /package/dist/esm/{carousel → carousel-v3}/components/swiper/SwiperSlide.js +0 -0
- /package/dist/esm/{carousel → carousel-v3}/components/swiper/common/styles.js +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import{template as t}from"@gem-sdk/core";import{getClass as o}from"./common/classes.js";import{getStyle as s}from"./common/styles.js";import{getData as r}from"./common/helpers.js";import{If as e}from"@gem-sdk/system";let Arrow=l=>{let{custom:m,left:i}=l,{isRenderCustomIcon:a}=r(l),{buttonClass:p,buttonContentClass:c}=o(l),{buttonStyle:n,buttonContentStyle:w,innerBorderCss:y}=s(l),$=e(a,m??"",`<svg
|
|
2
|
+
height="100%"
|
|
3
|
+
width="100%"
|
|
4
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
viewBox="0 0 24 24"
|
|
6
|
+
fill="currentColor"
|
|
7
|
+
>
|
|
8
|
+
<path d="M5 3l3.057-3 11.943 12-11.943 12-3.057-3 9-9z" />
|
|
9
|
+
</svg>`),d=t`
|
|
10
|
+
<div
|
|
11
|
+
class="${c}"
|
|
12
|
+
style="${w}"
|
|
13
|
+
>
|
|
14
|
+
${$||""}
|
|
15
|
+
</div>
|
|
16
|
+
`;return t`
|
|
17
|
+
<button
|
|
18
|
+
type="button"
|
|
19
|
+
aria-label='Carousel ${i?"Back":"Next"} Arrow'
|
|
20
|
+
class="${p}"
|
|
21
|
+
style="${n}"
|
|
22
|
+
>
|
|
23
|
+
<style type="text/css">${y}</style>
|
|
24
|
+
${d}
|
|
25
|
+
</button>
|
|
26
|
+
`};export{Arrow as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createClass as e}from"@gem-sdk/system";import{getClassArrowDisplay as r,getClassArrowRotate as g,getResponsiveSetting as p}from"./helpers.js";let getClass=t=>{let{className:s,componentId:o,rootId:i,left:l,uid:n,isHiddenWhenDisabled:u,disabled:a,showWhenHover:c,showArrow:f,vertical:m}=t,v="gp-carousel-arrow-"+n,b=p(f||{}),d=l?"gp-carousel-action-back gem-slider-previous":"gp-carousel-action-next gem-slider-next",x=e({"gp-z-1 gp-items-center gp-justify-center gp-overflow-hidden gp-shrink-0 before:gp-left-0 before:gp-top-0":!0,[v]:!0,...s&&{[s]:!0},...o&&{[o]:!0},...i&&{[i]:!0},...d&&{[d]:!0},...{"gp-invisible":u&&a,"gp-cursor-default gp-text-gray-300":a,"gp-cursor-pointer gp-text-gray-500":!a,"!gp-invisible group-hover/carousel:!gp-visible":c,...r(b)}}),h=e({"gp-flex gp-items-center gp-justify-center [&>svg]:gp-h-full [&>svg]:gp-w-full":!0,...g(!!l,m)});return{buttonClass:x,buttonContentClass:h}};export{getClass};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{DEVICES as e,getResponsiveValueByScreen as t}from"@gem-sdk/core";let getResponsiveSetting=e=>{let t=e.desktop,i=e.tablet?e.tablet:t,l=e.mobile?e.mobile:i;return{desktop:t,tablet:i,mobile:l}},getArrowPositionStyle=({vertical:i,arrowType:l,gapToEachSize:o,left:a})=>{let r={};return e.forEach(e=>{let p=t(i,e,!1),g="desktop"===e?"":`-${e}`;p?(r[`top${g}`]="inside"===l[e]&&a?o+"px":"initial",r[`left${g}`]=a?"initial":"",r[`bottom${g}`]="inside"!==l[e]||a?"initial":o+"px",r[`right${g}`]=a?"":"initial"):(a?(r[`left${g}`]="inside"===l[e]?o+"px":"3px",r[`right${g}`]="initial"):(r[`right${g}`]="inside"===l[e]?o+"px":"3px",r[`left${g}`]="initial"),r[`top${g}`]=a?"initial":"",r[`bottom${g}`]=a?"":"initial")}),r},getClassArrowRotate=(i,l)=>{let o={},a={vertical:{left:{desktop:"gp-rotate-[-90deg]",tablet:"tablet:gp-rotate-[-90deg]",mobile:"mobile:gp-rotate-[-90deg]"},right:{desktop:"gp-rotate-90",tablet:"tablet:gp-rotate-90",mobile:"mobile:gp-rotate-90"}},horizontal:{left:{desktop:"gp-rotate-180",tablet:"tablet:gp-rotate-180",mobile:"mobile:gp-rotate-180"},right:{desktop:"gp-rotate-0",tablet:"tablet:gp-rotate-0",mobile:"mobile:gp-rotate-0"}}};return e.forEach(e=>{let r=t(l,e,!1),p=r?"vertical":"horizontal",g=i?"left":"right",s=a[p][g][e];o[s]=!0}),o},getClassArrowDisplay=t=>{let i={inside:{desktop:"!gp-flex !gp-absolute gp-z-2",tablet:"tablet:!gp-flex tablet:!gp-absolute tablet:gp-z-2",mobile:"mobile:!gp-flex mobile:!gp-absolute mobile:gp-z-2"},outside:{desktop:"!gp-flex !gp-relative",tablet:"tablet:!gp-flex tablet:!gp-relative",mobile:"mobile:!gp-flex mobile:!gp-relative"},none:{desktop:"!gp-hidden",tablet:"tablet:!gp-hidden",mobile:"mobile:!gp-hidden"}},l={};return e.forEach(e=>{let o=t[e];o||(o="none");let a=i[o][e];l[a]=!0}),l},getArrowDisplayStyle=i=>{let l={};return e.forEach(e=>{let o=t(i,e,"none");l={...l,[e]:"none"===o?"none":"flex"}}),l},mappingNavigationCarousel=t=>{let i=t=>{let i={...t},l=e.filter(e=>!Object.keys(i).includes(e));return l.forEach(e=>{"tablet"===e&&(i[e]=i.desktop),"mobile"===e&&(i[e]=i.tablet)}),i};if(t?.layout==="vertical"){let{controlOverContent:l,arrow:o}=t,a=i(o),r=i(l),p={};return e.forEach(e=>{a[e]?a[e]&&r[e]?p[e]="inside":p[e]="outside":p[e]="none"}),{...t,navigationStyle:p}}return t},getData=e=>{let t=!!e.custom&&""!==e.custom;return{isRenderCustomIcon:t}},getResponsiveSizeValue=(e,t,i)=>{for(let l of({mobile:["mobile","tablet","desktop"],tablet:["tablet","desktop"],desktop:["desktop"]})[t]){let t=e?.[l]?.[i];if(void 0!==t)return""===t?"auto":t}return"auto"},getResponsiveWidth=e=>({"--w":getResponsiveSizeValue(e,"desktop","width"),"--w-tablet":getResponsiveSizeValue(e,"tablet","width"),"--w-mobile":getResponsiveSizeValue(e,"mobile","width")}),getResponsiveHeight=e=>({"--h":getResponsiveSizeValue(e,"desktop","height"),"--h-tablet":getResponsiveSizeValue(e,"tablet","height"),"--h-mobile":getResponsiveSizeValue(e,"mobile","height")});export{getArrowDisplayStyle,getArrowPositionStyle,getClassArrowDisplay,getClassArrowRotate,getData,getResponsiveHeight,getResponsiveSetting,getResponsiveWidth,mappingNavigationCarousel};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import{createStyleReact as e,createStyle as o}from"@gem-sdk/system";import{makeStyle as r,getSingleColorVariable as t,getResponsiveStyleShadowWithoutState as a,getPaddingGlobalSize as i,makeStyleResponsive as l,composeCornerCss as p,composeBorderCss as d}from"@gem-sdk/core";import{getResponsiveWidth as s,getResponsiveHeight as $,getArrowDisplayStyle as n,getArrowPositionStyle as m,getResponsiveSetting as c}from"./helpers.js";let getStyle=(g,b="liquid")=>{let{uid:w,vertical:h,showArrow:u,gapToEachSize:x,left:f,arrowBackgroundColor:k,arrowButtonSize:y,rootId:S,arrowBorder:q,arrowCorner:v,arrowCustomColor:z,arrowIconSize:j,arrowShadow:E}=g,T=r({bg:t(k)}),A=r({c:t(z)}),B=a(E,"box-shadow",E),C=c(q||{}),D=c(v||{}),F=i(y),G=c(j||{}),H=c(u||{}),I=r({v:"hidden"}),J=s(y),K=$(y),L=l("w",G,"px"),M=l("h",G,"px"),N=l("d",n(H)),O=r(m({vertical:h,arrowType:H,gapToEachSize:x??"",left:!!f})),P={...T,...N,...O,...J,...K,...F,...B,..."liquid"===b?I:{}},Q={...A,...L,...M},R="react"===b?e(P):o(P),U="react"===b?e(Q):o(Q),V=`
|
|
2
|
+
${S?"."+S:""}.gp-carousel-arrow-${w} {
|
|
3
|
+
${p(D.desktop)}
|
|
4
|
+
}
|
|
5
|
+
${S?"."+S:""}.gp-carousel-arrow-${w}::before {
|
|
6
|
+
content: '';
|
|
7
|
+
height: 100%;
|
|
8
|
+
width: 100%;
|
|
9
|
+
position: absolute;
|
|
10
|
+
pointer-events: none;
|
|
11
|
+
z-index: 10;
|
|
12
|
+
${d(C.desktop)}
|
|
13
|
+
${p(D.desktop)}
|
|
14
|
+
}
|
|
15
|
+
@media only screen and (max-width: 1024px) and (min-width: 768px) {
|
|
16
|
+
${S?"."+S:""}.gp-carousel-arrow-${w} {
|
|
17
|
+
${p(D.tablet)}
|
|
18
|
+
}
|
|
19
|
+
${S?"."+S:""}.gp-carousel-arrow-${w}::before {
|
|
20
|
+
${d(C.tablet)}
|
|
21
|
+
${p(D.tablet)}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
@media only screen and (max-width: 768px) {
|
|
25
|
+
${S?"."+S:""}.gp-carousel-arrow-${w} {
|
|
26
|
+
${p(D.mobile)}
|
|
27
|
+
}
|
|
28
|
+
${S?"."+S:""}.gp-carousel-arrow-${w}::before {
|
|
29
|
+
${d(C.mobile)}
|
|
30
|
+
${p(D.mobile)}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
`;return{buttonStyle:R,buttonContentStyle:U,innerBorderCss:V}};export{getStyle};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import{jsx as e,Fragment as o}from"react/jsx-runtime";import{makeStyleResponsiveByScreen as t,getGlobalColorResponsiveStyle as r,cls as s}from"@gem-sdk/core";import{getData as m}from"./common/helpers.js";import{getDotClass as l}from"./common/classes.js";import{getDotStyle as i}from"./common/styles.js";import{useDotsSetting as a}from"../../hooks/useDotsSetting.js";import{If as c}from"@gem-sdk/system";let Dots=p=>{let{onHandleClick:d,dotSize:n,dotActiveColor:g,dotColor:f}=p,{isLoop:u,checkIsActive:h}=a(p),{checkHidden:j,getDotItems:b}=m(p),k=b(u),{dotClass:y}=l(p),{dotStyle:D}=i(p,"react"),v=()=>e(o,{children:k?.map(o=>{let m=h(o);return e("button",{"aria-label":"Dot",onClick:()=>{d&&d(o,u)},style:{...t("w",n,"px"),...m?r("bg",g):r("bg",f)},className:s("gp-aspect-square gp-w-3 gp-rounded-full gp-shadow-md",{"gem-slider-dot-active":m,"gem-slider-dot-inactive":!m})},o)})});return e(o,{children:c(!j(k),e("div",{className:y,style:D,children:v()}))})};export{Dots as default};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{getResponsiveValueByScreen as o,template as s}from"@gem-sdk/core";import{getDotClass as m}from"./common/classes.js";import{getDotStyle as e}from"./common/styles.js";import{If as r}from"@gem-sdk/system";import{getData as t}from"./common/helpers.js";let Dots=l=>{let p=o(l.loop,"desktop",!1),{checkHidden:i,getDotItems:d}=t(l),c=d(p),{dotClass:f}=m(l),{dotStyle:n}=e(l);return s`
|
|
2
|
+
${r(!i(c),s`
|
|
3
|
+
<div class="${f}" style="${n}">
|
|
4
|
+
<!-- item render by js -->
|
|
5
|
+
</div>
|
|
6
|
+
`)}
|
|
7
|
+
`};export{Dots as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{DEVICES as t,getResponsiveValueByScreen as e}from"@gem-sdk/core";import{createClass as l}from"@gem-sdk/system";import{DOT_CONTAINER_SELECTOR as o}from"../../../common/helpers.js";let getDotClass=p=>{let{dotStyle:g,vertical:i,className:b,uniqueComponentId:m}=p,a=()=>{let l={},o={inside:{desktop:"gp-absolute",tablet:"tablet:gp-absolute",mobile:"mobile:gp-absolute"},outside:{desktop:"gp-static",tablet:"tablet:gp-static",mobile:"mobile:gp-static"}},p={vertical:{desktop:"gp-flex-col gp-ml-2 gp-w-fit gp-h-full",tablet:"tablet:gp-flex-col tablet:gp-ml-2 tablet:gp-w-fit tablet:gp-h-full",mobile:"mobile:gp-flex-col mobile:gp-ml-2 mobile:gp-w-fit mobile:gp-h-full"},horizontal:{desktop:"gp-flex-row gp-left-0 gp-right-0",tablet:"tablet:gp-flex-row tablet:gp-left-0 tablet:gp-right-0",mobile:"mobile:gp-flex-row mobile:gp-left-0 mobile:gp-right-0"}};return t.forEach(t=>{let b=e(g,t),m=e(i,t),a="inside"===b?"inside":"outside",r=m?"vertical":"horizontal",s=o[a][t],f=p[r][t];l[s]=!0,l[f]=!0}),l},r=l({[`${o} ${o}-${m}`]:!0,"gp-z-2 gp-flex gp-flex-1 gp-items-center gp-justify-center gp-gap-2 gp-text-center":!0,...b&&{[b]:!0},...a()});return{dotClass:r}};export{getDotClass};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{DEVICES as t,getResponsiveValueByScreen as e}from"@gem-sdk/core";let getData=t=>{let{hiddenWhenOnlyOne:e,slideDuplicated:r}=t,l=e=>{let{enabledSneakPeak:l,totalSlideItem:a=0,numberOfFullWidthShow:o=0,slideItemsPerPage:g=0}=t,n=0;return Array.from({length:n=e?r?a/2:a:l?a-o+1:Math.ceil(a/g)},(t,e)=>e)},a=t=>e&&t?.length<2;return{checkHidden:a,getDotItems:l}},getUpdatedDotStyle=(r,l)=>{let a={};return t.forEach(t=>{let o=e(r,t),g=e(l,t);a={...a,[t]:o?g:"none"}}),a};export{getData,getUpdatedDotStyle};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createStyleReact as e,createStyle as t}from"@gem-sdk/system";import{makeDotGapToCarouselStyle as o,DEVICES as r,getResponsiveValueByScreen as l}from"@gem-sdk/core";let getDotStyle=(m,n)=>{let{dotStyle:d,dotGapToCarousel:g,vertical:s,showDots:f}=m,p="react"===n,y=()=>{let e={};return r.forEach(t=>{let o=l(d,t),r=l(f,t),m="desktop"===t?"":`${t}`;e[`--d${0===m.length?"":"-"+m}`]=o&&"none"!==o&&r?"flex":"none"}),e},c={...o(d,g,s),...y()},k=p?e(c):t(c);return{dotStyle:k}};export{getDotStyle};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import{jsx as e}from"react/jsx-runtime";import{useEditorMode as r,isEmptyChildren as o}from"@gem-sdk/core";import"react";import"@gem-sdk/system";import{SwiperSlide as s}from"../swiper/SwiperSlide.js";import{getStyle as m}from"./common/styles.js";import{getClass as t}from"./common/classes.js";import{useCarouselItem as i}from"../../hooks/useCarouseItem.js";import l from"../../../grid/components/ChildrenDroppable.js";let CarouselItem=a=>{let{children:d,builderAttrs:p,parentSettings:c,builderProps:n}=a,{handleClick:u,handleMouseMove:f,handleMouseOut:j}=i(a),{indexKey:h}=a,k=n?.uid?`${n?.uid}-${h}`:h,y=r(),{carouselItemStyle:C,carouselItemInnerStyle:g}=m(a,y),{carouselItemClass:v,carouselItemInnerClass:I}=t(a);return e(s,{...p,"aria-hidden":!0,className:v,style:C,onClick:u,onMouseMove:f,onMouseLeave:j,dir:c?.rtl?"rtl":"ltr","data-carousel-item-key":k,children:e("div",{className:I,style:g,children:o(d)?e(l,{}):d})})};export{CarouselItem as default};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{template as e}from"@gem-sdk/core";import{getStyle as r}from"./common/styles.js";import{getClass as i}from"./common/classes.js";let CarouselItem=s=>{let{builderAttrs:d,index:m,children:a,id:o}=s,{carouselItemStyle:t,carouselItemInnerStyle:l}=r(s),{carouselItemClass:c,carouselItemInnerClass:u}=i(s);return e`
|
|
2
|
+
<div
|
|
3
|
+
${{...d}}
|
|
4
|
+
id="${o}"
|
|
5
|
+
class="${c}"
|
|
6
|
+
style="${t}"
|
|
7
|
+
data-index="${m}"
|
|
8
|
+
grid-index="{{forloop.index}}"
|
|
9
|
+
external-id="{{media.external_id}}"
|
|
10
|
+
media-type="{{media.media_type}}"
|
|
11
|
+
media-poster="{{media.preview_image.src}}"
|
|
12
|
+
media-source-url="{{media.sources.first.url}}"
|
|
13
|
+
media-last-source-url="{{mediaSourceUrl}}"
|
|
14
|
+
>
|
|
15
|
+
<div
|
|
16
|
+
class="${u}"
|
|
17
|
+
style="${l}"
|
|
18
|
+
>
|
|
19
|
+
${a}
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
`};export{CarouselItem as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createClass as e}from"@gem-sdk/system";let getClass=l=>{let{parentId:t,parentUid:g,builderProps:i,className:m}=l,s=e({"gem-slider-item gp-w-full":!0,[`gem-slider-item-${t||g}`]:!0,...g&&{[`gp-child-item-${g}`]:!0},...i?.uid&&{[i?.uid]:!0},...m&&{[m]:!0}}),r=e({"gp-w-full gp-h-full":!0});return{carouselItemClass:s,carouselItemInnerClass:r}};export{getClass};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{makeGlobalSize as e,DEVICES as t,getResponsiveValueByScreen as r,getStyleBackgroundByDevice as o,getGradientBgrStyleByDevice as a,getStyleShadow as s,makeStyle as n,getSingleColorVariable as d,getRadiusStyleActiveState as i}from"@gem-sdk/core";import{createStyle as l}from"@gem-sdk/system";import{getInitialWidthForCarouselItem as k}from"../../../common/helpers.js";let getStyle=(m,p)=>{let{style:c,contentType:u,parentStyle:f,parentSettings:b,background:g,customStyle:h}=m,w=e(f?.itemPadding),P=t.reduce((e,t)=>{if("edit"===p)return{};let o=b?.rtl,a=o?"ml":"mr",s=r(f?.spacing,t);return{...e,[`--${a}${"desktop"!==t?`-${t}`:""}`]:s+"px"}},{}),y=()=>{let e=["--radius"];return(e.forEach(e=>{delete c?.[e]}),"productImage"===u)?c:{...c,...n({bs:f?.borderContent?.border,bw:f?.borderContent?.width,bc:d(f?.borderContent?.color)}),...i({...f?.roundedContent,active:{...f?.roundedContent||{},radiusType:"custom"}})}},C={...h,...w&&w.padding,...k({spacing:f?.spacing,slidesToShow:b?.itemNumber??b?.slidesToShow,sneakPeak:b?.sneakPeak,sneakPeakType:b?.sneakPeakType,sneakPeakOffsetCenter:b?.sneakPeakOffsetCenter,sneakPeakOffsetForward:b?.sneakPeakOffsetForward,vertical:b?.vertical}),...o(g),...a(g,{desktop:!0,tablet:!0,mobile:!0})},S=l({...s({value:f?.carouselShadow,styleAppliedFor:"box-shadow",isEnableShadow:f?.hasActiveShadow})}),v=l({...C,...y(),...P});return{carouselItemStyle:v,carouselItemInnerStyle:S}};export{getStyle};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import{jsx as e,jsxs as r,Fragment as o}from"react/jsx-runtime";import{forwardRef as t,Children as i,useState as l,useRef as s,useMemo as n,useCallback as a,isValidElement as d,cloneElement as m,createElement as p}from"react";import{filterToolbarPreview as c,useCurrentDevice as u,isEmptyChildren as h}from"@gem-sdk/core";import{mappingNavigationCarousel as S}from"../arrow/common/helpers.js";import{useCarousel as v}from"../../hooks/useCarousel.js";import{getData as w}from"./common/helpers.js";import{getClass as f}from"./common/classes.js";import{getStyle as C}from"./common/styles.js";import{getAttr as k}from"./common/attrs.js";import y from"../arrow/Arrow.js";import g from"../dot/Dots.js";import{Swiper as j}from"../swiper/Swiper.js";import"@gem-sdk/system";let Carousel=t((t,b)=>{let{children:O,builderAttrs:$,builderProps:P,styles:D,isHiddenArrowWhenDisabled:I=!0,hiddenDotWhenOnlyOne:x,elmRef:z,isEnableCheckHasScrollableContent:A,onSwiperReady:T}=t,B=S(t.setting),N={...t,setting:B},R=i.count(c(O))??0,[W,E]=l(null),{arrowButtonSize:H,arrowBackgroundColor:G,arrowGapToEachSide:F="16",roundedArrow:K,arrowIconSize:U,arrowCustomColor:q,arrowBorder:J,arrowShadow:L,showWhenHover:M}=B??{},Q=s({prevOrder:"",prevContent:"",version:0}),V=n(()=>{let e=B?.childItem||[],r=e.join("|"),o=[...e].sort().join("|"),t=Q.current;return t.prevOrder&&t.prevContent&&o===t.prevContent&&r!==t.prevOrder&&t.version++,t.prevOrder=r,t.prevContent=o,`reorder-${t.version}`},[B?.childItem]),{isInfinity:X,localRef:Y,sliderSettings:Z,totalSlideItem:_,currentSlide:ee,isRenderDots:er,showNavigation:eo,isScrollToStart:et,isScrollToEnd:ei,handleDotClick:el,getItemsPerPage:es,handleNextAndPrevSlide:en,dispatchEventSelectSlide:ea,getNumberOfFullWidthShow:ed,setCurrentSlide:em,shouldDuplicateSlides:ep,setIsScrollToStart:ec,setIsScrollToEnd:eu}=v(N,b,W,R),{loopConfig:eh,arrowShowConfig:eS}=w(N),{rootClassRender:ev,wrapperClassRender:ew,wrapperInnerClass:ef,sliderClass:eC}=f(N),{rootStyleRender:ek,wrapperStyleRender:ey,wrapperInnerStyle:eg}=C(N),{rootAttrRender:ej,sliderAttr:eb}=k(N),eO=u(),e$=B?.sneakPeak?.[eO],eP=r=>{let o="next"===r;if(R<=1)return null;let i=o?!X&&W?.isEnd:!X&&W?.isBeginning,l=o?!X&&ei:!X&&et;return e(y,{uid:P?.uid,custom:B?.arrowCustom??"",showArrow:eS,arrowButtonSize:H||{},arrowIconSize:U||{},arrowBackgroundColor:G||"",arrowCustomColor:q,gapToEachSize:F,showWhenHover:M,arrowBorder:J||{},arrowCorner:K||{},arrowShadow:L||{},onClick:e=>{e.stopPropagation(),en(r)},left:!o,disabled:A?l:i,vertical:B?.vertical,isHiddenWhenDisabled:I,rootId:t?.parentClass})},eD=a(e=>{E(e),T?.(e)},[]),eI=a(()=>{t?.isDisableResetSlide||(em(0),ec(!0),eu(!1))},[t?.isDisableResetSlide,em,eu,ec]),ex=i.toArray(c(O)).filter(d),ez=ep(R),eA=ez?2*R:R,eT=n(()=>{if(!ez)return ex;let e=ex.map((e,r)=>{if(!d(e))return e;let o=e.key,t=o?`${o}-duplicate-${r}`:`duplicate-${r}`;return m(e,{...e.props||{},key:t})});return[...ex,...e]},[ez,ex]),eB=n(()=>`${R}-${V}-${eT.length}-${Z?.direction}`,[R,V,eT.length,Z?.direction]);return e("div",{ref:z,...ej,className:ev,style:ek,children:r("div",{ref:Y,...$,className:ew,style:ey,children:[r("div",{className:ef,style:eg,children:[eo&&eP("prev"),p(j,{...eb,...Z,sliderClass:eC,thumbsSwiper:t?.thumbsSwiper,onSwiperReady:eD,totalSlides:_,key:eB,sliderOrder:V,onSwiperReset:eI},h(O)?e("div",{children:"No Slider"}):e(o,{children:eT.map((e,r)=>{if(!d(e))return null;let o=e.props??{};return p(e.type,{...o,key:e.key,indexKey:r.toString(),parentSettings:B,parentStyle:D,background:B?.background,parentUid:P?.uid,dispatchEventSelectSlide:ea})})})),eo&&eP("next")]}),er&&e(g,{dotStyle:B?.dotStyle,dotGapToCarousel:B?.dotGapToCarousel,vertical:B?.vertical,showDots:B?.dot,slideItemsPerPage:es(),enabledSneakPeak:e$,dotColor:B?.dotColor,dotActiveColor:B?.dotActiveColor,dotSize:B?.dotSize,sneakPeakType:B?.sneakPeakType,totalSlideItem:eA,hiddenWhenOnlyOne:x,currentSlide:ee,loop:eh,numberOfFullWidthShow:ed(eO),onHandleClick:el,slideDuplicated:ez}),c(O,!0)]})})});export{Carousel as default};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import{template as o,RenderIf as r,isLocalEnv as e,baseAssetURL as s,WrapRenderChildren as t,RenderChildren as i}from"@gem-sdk/core";import a from"../arrow/Arrow.liquid.js";import l from"../dot/Dots.liquid.js";import{mappingNavigationCarousel as d}from"../arrow/common/helpers.js";import{getData as n}from"./common/helpers.js";import{getClass as p}from"./common/classes.js";import{getStyle as m}from"./common/styles.js";import{getAttr as c}from"./common/attrs.js";import{getSettingPreloadData as u,getStaticLocale as $}from"../../../helpers.js";let Carousel=v=>{let{children:f,builderAttrs:g,builderProps:w,styles:S,isHiddenArrowWhenDisabled:h=!0,hiddenDotWhenOnlyOne:C,rootId:y,rawChildren:j,conditionAppendJs:k}=v,z=d(v.setting),E={...v,setting:z},{arrowButtonSize:I,arrowBackgroundColor:A,arrowGapToEachSide:G="16",roundedArrow:P,arrowIconSize:T,arrowCustomColor:b,arrowBorder:q,arrowShadow:x,showWhenHover:B}=z??{},{uniqueComponentId:D,loopConfig:O,arrowShowConfig:W,stateData:_}=n(E),{rootClassRender:H,wrapperClassRender:M,wrapperInnerClass:N,sliderClass:R}=p(E),{sliderWrapperStyle:U,rootStyleRender:V,wrapperStyleRender:F,wrapperInnerStyle:J}=m(E),{rootAttrRender:K,sliderAttr:L}=c(E),Q=()=>r(e,`<script ${u('class="gps-link" delay',"src")}="{{ 'gp-carousel-v3-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${u('class="gps-link" delay',"src")}="${s}/assets-v2/gp-carousel-v3-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`),X=o=>{let r="next"===o;return a({uid:w?.uid,componentId:D,custom:z?.arrowCustom??"",showArrow:W,arrowButtonSize:I||{},arrowIconSize:T||{},arrowBackgroundColor:A??"",arrowCustomColor:b,gapToEachSize:G,showWhenHover:B,arrowBorder:q||{},arrowCorner:P||{},arrowShadow:x||{},left:!r,onClick:o=>{o.stopPropagation()},vertical:z?.vertical,isHiddenWhenDisabled:h,rootId:y})},Y=()=>o`
|
|
2
|
+
${j?.length?t({uid:w?.uid??"",customProps:j[0]?.customProps},j.map((r,e)=>{if(r)return o`${i({...r,index:e,parentSettings:z,parentStyle:S,background:z?.background,parentUid:w?.uid})}`})):f??`<div>${$("Carousel","no_slider")}</div>`}`;return o`
|
|
3
|
+
<gp-carousel gp-data='${_}' ${K} style="${V}" class="${H}">
|
|
4
|
+
<div
|
|
5
|
+
${g}
|
|
6
|
+
class="${M}"
|
|
7
|
+
style="${F}"
|
|
8
|
+
>
|
|
9
|
+
<div class="${N}" style="${J}">
|
|
10
|
+
${X("prev")}
|
|
11
|
+
<div ${L} style="${U}">
|
|
12
|
+
<div class="${R}">
|
|
13
|
+
${Y()}
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
${X("next")}
|
|
17
|
+
</div>
|
|
18
|
+
${l({loop:O,showDots:z?.dot,dotStyle:z?.dotStyle,dotGapToCarousel:z?.dotGapToCarousel,dotSize:z?.dotSize,vertical:z?.vertical,uniqueComponentId:D,hiddenWhenOnlyOne:C})}
|
|
19
|
+
</div>
|
|
20
|
+
</gp-carousel>
|
|
21
|
+
${k?`{% if ${k} %} ${Q()} {% endif %}`:Q()}
|
|
22
|
+
|
|
23
|
+
`};export{Carousel as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createAttr as t}from"@gem-sdk/system";import{getData as r}from"./helpers.js";let getAttr=e=>{let{rootAttrs:i,builderProps:o,rootId:d}=e,{uniqueComponentId:l}=r(e),s=t({"data-id":`${o?.uid}`,id:`gp-root-carousel-${l}`,...i}),g=t({...(o?.uid||d)&&{id:`gp-carousel-${l}`},dir:e.setting?.rtl?"rtl":"ltr"});return{rootAttrRender:s,sliderAttr:g}};export{getAttr};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getResponsiveValueByScreen as e}from"@gem-sdk/core";import{createClass as l}from"@gem-sdk/system";import{getData as t}from"./helpers.js";let getClass=p=>{let o=["mobile","tablet","desktop"],{setting:a,builderProps:g,wrapperClass:i,rootClass:r,advanced:b,fullHeight:f,slidesClass:m}=p,{sliderSelector:x}=t(p),s=()=>{let e={flex:{desktop:"gp-flex",tablet:"tablet:gp-flex",mobile:"mobile:gp-flex"},block:{desktop:"gp-block",tablet:"tablet:gp-block",mobile:"mobile:gp-block"}},l={};return o.forEach(t=>{let p=a?.vertical?.[t]?"flex":"block",o=e[p][t];l[o]=!0}),l},c=()=>{let e={fullHeight:{desktop:"gp-h-full",tablet:"tablet:gp-h-full",mobile:"mobile:gp-h-full"},flex1:{desktop:"gp-flex-1",tablet:"tablet:gp-flex-1",mobile:"mobile:gp-flex-1"}},l={};return o.forEach(t=>{l[e.fullHeight[t]]=a?.vertical?.[t],l[e.flex1[t]]=a?.vertical?.[t]}),l},n=()=>{let e={flexCol:{desktop:"!gp-flex-col",tablet:"tablet:!gp-flex-col",mobile:"mobile:!gp-flex-col"},flexRow:{desktop:"!gp-flex-row",tablet:"tablet:!gp-flex-row",mobile:"mobile:!gp-flex-row"}},l={};return o.forEach(t=>{let p=a?.vertical?.[t]?"flexCol":"flexRow",o=e[p][t];l[o]=!0}),l},u=()=>{let e={wrap:{desktop:"!gp-flex-wrap",tablet:"tablet:!gp-flex-wrap",mobile:"mobile:!gp-flex-wrap"},nowrap:{desktop:"!gp-flex-nowrap",tablet:"tablet:!gp-flex-nowrap",mobile:"mobile:!gp-flex-nowrap"}},l={};return o.forEach(t=>{let p=a?.vertical?.[t]?"wrap":"nowrap",o=e[p][t];l[o]=!0}),l},h=()=>{let e={minHeightNone:{desktop:"!gp-min-h-0",tablet:"tablet:!gp-min-h-0",mobile:"mobile:!gp-min-h-0"},minHeightFull:{desktop:"!gp-min-h-full",tablet:"tablet:!gp-min-h-full",mobile:"mobile:!gp-min-h-full"}},l={};return o.forEach(t=>{let p=a?.vertical?.[t]?"minHeightNone":"minHeightFull",o=e[p][t];l[o]=!0}),l},w=l({...g?.uid&&{[g.uid]:!0},...i&&{[i]:!0},"gp-relative gp-my-0 tablet:gp-px-0 gp-max-w-full mobile:gp-px-0 gp-carousel-wrapper":!0,"!gp-flex":e(a?.vertical,"desktop"),"tablet:!gp-flex":e(a?.vertical,"tablet"),"mobile:!gp-flex":e(a?.vertical,"mobile"),...s()}),d=l({"gp-relative gp-overflow-hidden gp-flex gp-items-center gp-justify-between":!0,"!gp-h-full":f,...c(),...n()}),k=l({"gp-group/carousel gp-w-full gp-flex":!0,"!gp-flex-col":e(a?.vertical,"desktop"),"tablet:!flex-col":e(a?.vertical,"tablet"),"mobile:!flex-col":e(a?.vertical,"mobile"),...r&&{[r]:!0},...b?.cssClass&&{[b.cssClass]:!0}}),v=l({"gem-slider-wrapper gp-flex gp-content-start gp-h-full gp-select-none":!0,[x]:!0,...m&&{[m]:!0},...u(),...h()});return{rootClassRender:k,wrapperClassRender:w,wrapperInnerClass:d,sliderClass:v}};export{getClass};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getResponsiveValueByScreen as e}from"@gem-sdk/core";import{createStateOrContext as t}from"@gem-sdk/system";let getData=o=>{let r=["mobile","tablet","desktop"],{setting:a,rootId:l,builderProps:i,styles:s,moveToIdx:p,isHiddenArrowWhenDisabled:d}=o,g=l??i?.uid,m=`gp-carousel-slider-${i?.uid}`,{enableAction:n={desktop:!0},navigationStyle:f,navigationEnable:u={desktop:!0}}=a??{},c=()=>{let t=a?.loop;return r.forEach(o=>{t={...t,[o]:!!e(n)&&t?.[o]}}),t},k=()=>{let t=f;return r.forEach(o=>{t={...t,[o]:e(u,o)?e(t,o):"none"}}),t},h=t({id:g,moveToIdx:p,isHiddenArrowWhenDisabled:d,setting:a,styles:s});return{loopConfig:c(),stateData:JSON.stringify(h).replaceAll("'","'"),uniqueComponentId:g,arrowShowConfig:k(),sliderSelector:m}};export{getData};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{makeStyleResponsive as e,getHeightByShapeGlobalSize as t,makeStyleWithDefault as o,getWidthByShapeGlobalSize as g,getBgByDevice as r,makeContainerWidthOrHeight as l}from"@gem-sdk/core";import{createStyle as i}from"@gem-sdk/system";let getStyle=d=>{let{styles:a,setting:c,style:m,rootStyles:n}=d,{arrowGapToEachSide:k="16"}=c??{},s=e("h",t(a?.sizeSetting)),b=o("w",g(a?.sizeSetting,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),p=i({...m,...s,...b,...r({backgroundColor:a?.backgroundColor,backgroundImage:a?.backgroundImage})}),w=i({...l({vertical:c?.vertical,dotStyle:c?.dotStyle}),gap:k+"px"}),S=i({...e("jc",a?.align),...n}),h=i({...b,...s}),u=i({overflow:"hidden",flex:1,width:"100%",height:"100%"});return{rootStyleRender:S,wrapperStyleRender:p,wrapperInnerStyle:w,sliderStyle:h,sliderWrapperStyle:u}};export{getStyle};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useRef as r,useState as t,useMemo as i,useEffect as s}from"react";import{getStyleSwiperContainer as n}from"./common/styles.js";function Swiper(o){let l=r(null),{children:p,totalSlides:c,onSwiperReset:a,onSwiperReady:u,sliderClass:m,sliderOrder:w,thumbsSwiper:d,...f}=o,[y,b]=t(!1),j=i(()=>d?{"thumbs-swiper":d}:{},[d]),g=n(),O="object"==typeof o.autoplay&&null!==o.autoplay?o.autoplay.pauseOnMouseEnter:void 0;return s(()=>{let e=async()=>{let e=await import("@gem-sdk/swiper/element/bundle");e.register(),b(!0)};e()},[]),s(()=>{y&&(Object.assign(l.current,f),l.current.initialize(),u?.(l.current.swiper))},[y]),s(()=>{l.current?.swiper&&(l.current.swiper.destroy(!1,!1),Object.assign(l.current,f),l.current.initialize(),u(l.current.swiper),a())},[f.dir,f.loop,O,f.slidesPerView,u,a,f.spaceBetween,f.slidesOffsetBefore]),s(()=>{let e=l.current;e&&(Object.assign(e,f),e.swiper?.update())},[f]),e("swiper-container",{init:!1,ref:l,class:m,style:{...g,display:y?"block":"none"},...j,children:p})}export{Swiper};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let useCarouselItem=e=>{let{onClickItem:t,onMouseMove:r,onMouseOut:u,dispatchEventSelectSlide:l,index:s=0}=e,o=e=>{t&&t(e),l&&l(s)},a=e=>{r&&r(e)},m=e=>{u&&u(e)};return{handleClick:o,handleMouseMove:a,handleMouseOut:m}};export{useCarouselItem};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useState as e,useRef as t,useMemo as r,useCallback as i,useImperativeHandle as n,useEffect as a}from"react";import{useCurrentDevice as l,useEditorMode as s,useInteraction as o,getResponsiveValueByScreen as u,DEVICES as d}from"@gem-sdk/core";import p from"./useTrackPreviewPause.js";let useCarousel=(f,m,c,k)=>{let h;let{builderProps:b,moveToIdx:y,styles:P,setting:g,isHiddenArrowWhenDisabled:w=!0,elmRef:T,isEnableCheckHasScrollableContent:v,onClickArrow:N,onHandleChangeSlideByInteraction:x,onChangeActive:S}=f,[C,O]=e(!0),[E,L]=e(!0),[M,I]=e(!1),{loop:z,navigationEnable:V={desktop:!0},navigationStyle:B}=g??{},[j,F]=e(k),[H,R]=e(g?.defaultCurrentSlider??0),{isFirstPreviewClicked:$}=p(g?.runPreview),A=t(),D=t(y??0),q=l(),U=s(),{onListener:W,saveToElementInteractionData:G,getInteractionPreviousData:J,trigger:K}=o(),Q=r(()=>u(z,q,!1),[z,q]),X=i(()=>{if(!g?.slidesToShow)return null;let e={};return d.forEach(t=>{let r=u(g?.slidesToShow,t);e[t]=r?"auto"===r?4:Math.floor(r):0}),e},[g?.slidesToShow]),Y=i(()=>{if(!g?.slidesToShow)return null;let e={};return d.forEach(t=>{let r=u(g?.slidesToShow,t);e[t]=r?"auto"===r?4:r:0}),e},[g?.slidesToShow]),Z=r(()=>{let e=Y();if(e)return e;let t={};return d.forEach(e=>{let r=u(g?.sneakPeak,e),i=r?"center"===u(g?.sneakPeakType,e)?u(g?.sneakPeakOffsetCenter,e)??0:u(g?.sneakPeakOffsetForward,e)??0:0,n="center"===u(g?.sneakPeakType,e)?-2:-1,a=u(g?.itemNumber,e);t[e]="number"==typeof a?a+i/100*n:"auto"}),t},[Y,g?.itemNumber,g?.sneakPeak,g?.sneakPeakOffsetCenter,g?.sneakPeakOffsetForward,g?.sneakPeakType]),_=r(()=>{let e=u(Z,q),t=u(z,q,!1);return t&&Number(e??0)>k||!t&&Number(e??0)>=k},[Z,q,z,k]),ee=r(()=>{let e=u(V,q),t=u(B,q);return c&&e&&"none"!==t&&C&&!_},[V,q,B,c,C,_]),et=r(()=>{let e=X();return e||g?.itemNumber},[X,g?.itemNumber]),er=i(e=>{let t="center"===u(g?.sneakPeakType,e)?2:1;return"number"==typeof u(et,e,4)?u(et,e,4)-t:void 0},[g?.sneakPeakType,et]),ei=()=>{let e="auto"===u(Z,q,1)?1:u(Z,q,1);return e??1},en=e=>{let t=e*ei();return t>=j-ei()&&(t=j-ei()),t},ea=e=>{let t="edit"===U?{[e]:!1}:g?.enableDrag;return u(t,e)},el=(e,t)=>{let r=g?.sneakPeak?.[q]?e:t?e:en(e);if(t){if(k<em){c?.slideTo(r);return}if(c?.realIndex===r)return;if(r===Number(c?.realIndex)+1||0===r&&c?.realIndex===k-1)return c?.slideNext();if(r===Number(c?.realIndex)-1||r===k-1&&c?.realIndex===0)return c?.slidePrev();let e="center"===u(g?.sneakPeakType,q)&&"number"==typeof u(g?.itemNumber,q)&&Number(u(g?.itemNumber,q))%2==0;e?c?.slideToLoopCenterSneakPeek(r):c?.slideToLoop(r)}else c?.slideTo(r);D.current=r};n(m,()=>({nextSlideInteraction:ed,previousSlideInteraction:ep,moveToSlideInteraction:ef,getSwiper:()=>c}));let es=e=>{K({event:"gp:rollback:select-slide",selector:`[data-id="${b?.uid}"]`,element:T?.current}),K({event:"gp:select-slide",selector:`[data-id="${b?.uid}"]`,data:e,element:T?.current})},eo=e=>{c?.slideTo(e),x&&x(e)},eu=(e,t)=>{let{key:r,data:i,isRollback:n,element:a}=e,l=Math.max(c?.activeIndex??0,0);if(n&&void 0===i)return;if(n){if("specific"===t){let{previousData:e}=J(a,r);eo(Number(e))}else{let e="next"===t?l-1:l+1;eo(e)}return}let s="specific"===t?Math.max(D.current,0):l;G(a,r,s.toString());let o="specific"===t?Number(i):"next"===t?l+1:l-1;eo(o)},ed=e=>{eu(e,"next")},ep=e=>{eu(e,"previous")},ef=e=>{eu(e,"specific")},em=ei(),ec=r(()=>!!j&&c&&u(g?.dot,q)&&!_&&k>1,[j,c,g?.dot,q,_,k]),ek=u(g?.vertical,q,!1)?"vertical":"horizontal",eh=r(()=>{let e=u(z,q,!1),t=c?.width??0,r={0:"mobile",768:"tablet",1025:"desktop"},i=Number(Object.entries(r).find(([,e])=>e===q)?.[0]??1025),n=Object.entries(r).reduce((r,[i,n])=>{if(!r)return;let a=Number(i),l=u(g?.sneakPeak,n,!1),s=l&&"center"===u(g?.sneakPeakType,n),o=u(g?.itemNumber,n),d=s&&"number"==typeof o,p=ea(n),f=d?(t-t/em*(o-2))/2:0,m=d&&e?j:g?.initialSlide||y||0,c={allowTouchMove:p,slidesOffsetBefore:f,slidesOffsetAfter:f,initialSlide:m};return r[a]=c,r},{}),a="center"===u(g?.sneakPeakType,q)&&"number"==typeof u(g?.itemNumber,q)&&Number(u(g?.itemNumber,q))%2==0;return{speed:P?.playSpeed??500,dir:g?.rtl?"rtl":"ltr",spaceBetween:u(P?.spacing,q)||0,loop:e,slidesPerView:"auto"===u(Z,q,1)?"auto":em,direction:ek,breakpoints:n,isSneakPeekCenter:a,slidesOffsetBefore:n?.[i]?.slidesOffsetBefore,thumbs:{slideThumbActiveClass:"gem-slider-item-active"},loopPreventsSliding:!1,autoplay:{delay:(g?.autoplayTimeout??1)*1e3,pauseOnMouseEnter:g?.pauseOnHover,stopOnLastSlide:!e}}},[P?.playSpeed,g?.rtl,P?.spacing,q,z,em,g?.sneakPeakType,g?.pauseOnHover,g?.autoplayTimeout,c?.width,j]),eb=i(e=>{let t=c&&c.params?.slidesPerView,r=t?c?.slidesPerViewDynamic():1;if(e<=1)return!1;let i="auto"===eh.slidesPerView?r:eh.slidesPerView;if(!Q||e<Number(i)||!C)return!1;let n=u(g?.sneakPeak,q,!1),a=n&&"center"===u(g?.sneakPeakType,q),l=Number.isNaN(Number(i))?1:Math.ceil(Number(i));a&&l%2==0&&(l+=1);let s=a?Math.max(1,Math.ceil(l/2)):1;return e<l+s},[c,eh.slidesPerView,Q,C,g?.sneakPeak,g?.sneakPeakType,q]);a(()=>{let e=`[data-id="${b?.uid}"]`;W({event:"gp:change-next-slide",selector:e,elementRef:A},e=>{let{data:t,isRollback:r,uniqueStorageKey:i}=e||{};ed({element:A.current,data:t,isRollback:r,key:i})}),W({event:"gp:change-previous-slide",selector:e,elementRef:A},e=>{let{data:t,isRollback:r,uniqueStorageKey:i}=e||{};ep({element:A.current,data:t,isRollback:r,key:i})}),W({event:"gp:change-image-step",selector:e,elementRef:A},e=>{let{data:t,isRollback:r,uniqueStorageKey:i}=e||{};ef({element:A.current,data:t,isRollback:r,key:i})}),W({event:"gp:change-index-slide",selector:e},t=>{let r=document.querySelector(e),{data:i,isRollback:n,uniqueStorageKey:a}=t||{};ef({element:r,data:i,isRollback:n,key:a})})},[]),a(()=>{F(k)},[k]);let ey=e=>{"next"===e?c?.slideNext():c?.slidePrev(),N&&(h&&clearTimeout(h),h=setTimeout(()=>N&&N(),500))};return a(()=>{if("number"==typeof y){if(D.current=y,c?.params?.loop){c?.slideToLoop(y);return}c?.slideTo(y)}},[c,y,w]),a(()=>{if(!c)return;let e=()=>{F(c.slides.length)},t=()=>{S&&S(c.realIndex)},r=()=>{R(c.realIndex),L(c?.translate===0),I(c?.translate<=c?.maxTranslate())};return c.on("transitionEnd",r),c.on("slideChange",e),c.on("slideChangeTransitionStart",t),()=>{c?.off("slideChange",e),c?.off("slideChangeTransitionStart",t),c?.off("transitionEnd",r)}},[eh.loop,c]),a(()=>{c?.wrapperEl&&(c.wrapperEl.style.transitionTimingFunction=g?.animationMode??"ease")},[c,g?.animationMode]),a(()=>{if(c&&c.autoplay){let e="edit"===U?!!$&&g?.runPreview&&g?.autoplay:g?.autoplay;e?c.autoplay.start():c.autoplay.stop()}},[c,g?.autoplay,U,$,g?.runPreview]),a(()=>{let e=e=>{if(b?.uid!==e?.detail.componentUid)return;let t=e?.detail.index||0;c?.slideToLoop(t)};return window.addEventListener("move-to-idx",e),()=>window.removeEventListener("move-to-idx",e)},[c,b?.uid]),a(()=>{if(!c)return;let e=c.el;e?.classList?.remove("swiper-horizontal","swiper-vertical");let t=u(g?.vertical,q)?"swiper-vertical":"swiper-horizontal";e?.classList?.add(t),c?.slides?.forEach(e=>{e.style.width="",e.style.height=""}),c?.update()},[q,g?.vertical,c,c?.params]),a(()=>{if(!c||!v)return;let e=()=>{let e=c?.slides?.slice(0,k)||[],t=Number(eh?.spaceBetween||0),r=e.reduce((e,t)=>e+t.offsetHeight,0)+t*(e.length-1),i=e.reduce((e,t)=>e+t.offsetWidth,0)+t*(e.length-1),n=c.params?.direction==="horizontal"?i>(c.width||0):r>(c.height||0);O(n)};return e(),c.on("resize",e),c.on("update",e),c.on("slidesLengthChange",e),c.on("orientationchange",e),()=>{c.off("resize",e),c.off("update",e),c.off("slidesLengthChange",e),c.off("orientationchange",e)}},[c]),{isInfinity:Q,sliderSettings:eh,totalSlideItem:j,currentSlide:H,localRef:A,isRenderDots:ec,showNavigation:ee,isScrollToStart:E,isScrollToEnd:M,handleDotClick:el,getItemsPerPage:ei,handleNextAndPrevSlide:ey,dispatchEventSelectSlide:es,getNumberOfFullWidthShow:er,setCurrentSlide:R,shouldDuplicateSlides:eb,setIsScrollToStart:L,setIsScrollToEnd:I,isHideNavigation:_}};export{useCarousel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useCurrentDevice as t,getResponsiveValueByScreen as e}from"@gem-sdk/core";let useDotsSetting=r=>{let{loop:o,enabledSneakPeak:s,slideItemsPerPage:i=1,currentSlide:l=1,totalSlideItem:n,slideDuplicated:u}=r,g=t(),m=e(o,g,!1),c=t=>{let e=u&&n,r=e?l-n/2:l;return s||m?t===l||t===r:t===Math.ceil(l/i)};return{isLoop:m,checkIsActive:c}};export{useDotsSetting};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useRef as r,useState as e,useEffect as t}from"react";let useTrackPreviewPause=i=>{let u=r(void 0),[a,n]=e(!1);return t(()=>{if(!a){if(!u.current){u.current=JSON.stringify({isFirstPreviewClicked:a,runPreview:i});return}a||u.current===JSON.stringify({isFirstPreviewClicked:a,runPreview:i})||n(!0)}},[a,i]),{isFirstPreviewClicked:a}};export{useTrackPreviewPause as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"react/jsx-runtime";import"react";import"@gem-sdk/core";import"@gem-sdk/system";import"next/link";import t from"./settings/Carousel.js";import e from"./settings/CarouselItem.js";let carouselSettingV3={CarouselV3:t,CarouselItemV3:e};export{carouselSettingV3};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"next/dynamic";import e from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let Carousel=o(()=>import("./components/root/Carousel.js"),{loading:e}),CarouselItem=o(()=>import("./components/item/CarouselItem.js"),{loading:e});var
|
|
1
|
+
import o from"next/dynamic";import e from"../common/components/Loading.js";import"react/jsx-runtime";import"react";import"@gem-sdk/core";let Carousel=o(()=>import("./components/root/Carousel.js"),{loading:e}),CarouselItem=o(()=>import("./components/item/CarouselItem.js"),{loading:e});var carouselV3={Carousel,CarouselItem};export{carouselV3 as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let CAROUSEL_ANIMATION={EASE_IN:{value:"ease-in",formula:a=>a*a*a},EASE_OUT:{value:"ease-out",formula:a=>1-Math.pow(1-a,3)},EASE_IN_OUT:{value:"ease-in-out",formula:a=>a<.5?4*a*a*a:1-Math.pow(-2*a+2,3)/2},DEFAULT:{value:"default",formula:a=>1+--a*a*a*a*a}};export{CAROUSEL_ANIMATION};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{CarouselSettingsV2 as e}from"./configs/settings-v2.js";import{SettingUIV1 as o}from"./configs/ui-v1.js";import{SettingUIV2 as i}from"./configs/ui-v2.js";import{CarouselPreset as s}from"./configs/presets.js";let config={tag:"CarouselV3",label:"Carousel",icon:`
|
|
2
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.96586 7.25C4.96586 6.14543 5.86129 5.25 6.96586 5.25H17.0346C18.1391 5.25 19.0346 6.14543 19.0346 7.25V16.7484C19.0346 17.853 18.1391 18.7484 17.0346 18.7484H6.96586C5.86129 18.7484 4.96586 17.853 4.96586 16.7484V7.25ZM9.36039 6.25H6.96586C6.41357 6.25 5.96586 6.69772 5.96586 7.25V16.7484C5.96586 17.3007 6.41357 17.7484 6.96586 17.7484H9.36039L9.36039 6.25ZM10.3604 17.7484V6.25H14.1455V17.7484H10.3604ZM15.1455 17.7484H17.0346C17.5869 17.7484 18.0346 17.3007 18.0346 16.7484V7.25C18.0346 6.69771 17.5869 6.25 17.0346 6.25H15.1455V17.7484ZM3.31666 10.5447C3.51708 10.7346 3.52555 11.0511 3.33558 11.2515L2.61349 12.0133L3.33449 12.7691C3.52509 12.969 3.51762 13.2854 3.31781 13.4761C3.118 13.6667 2.8015 13.6592 2.6109 13.4594L1.693 12.4971C1.43561 12.2273 1.43493 11.803 1.69148 11.5324L2.60981 10.5636C2.79978 10.3632 3.11625 10.3547 3.31666 10.5447ZM20.6827 10.5458C20.8825 10.3552 21.199 10.3627 21.3896 10.5625L22.3075 11.5247C22.5649 11.7946 22.5656 12.2188 22.309 12.4894L21.3907 13.4583C21.2007 13.6587 20.8843 13.6672 20.6839 13.4772C20.4834 13.2872 20.475 12.9707 20.6649 12.7703L21.387 12.0085L20.666 11.2527C20.4754 11.0529 20.4829 10.7364 20.6827 10.5458ZM21.5839 12.215C21.5838 12.2149 21.584 12.2151 21.5839 12.215V12.215Z" fill="white"/>
|
|
4
|
+
</svg>
|
|
5
|
+
`,settings:e,ui:o,uiV2:i,presets:s,editorConfigs:{slots:{children:!1},placeholder:{notAppendTags:["MarqueeItem","Marquee"]}},locales:{editor:{en:{no_slider:"No Slider"}}}};export{config as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let config={tag:"CarouselItemV3",label:"Carousel Item",settings:[{id:"setting",controls:[]},{id:"style",controls:[]}],editorConfigs:{component:{noSetting:!0,noDelete:!0,noDuplicate:!0,noDragDrop:!0},slots:{children:!0},sideBar:{hide:!0},toolbar:{hide:!0},placeholder:{notAppendBeforeAfter:!0,notAppendLeftRight:!0}}};export{config as default};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
let CarouselPreset=[{id:"carousel",name:{en:"Carousel"},icon:{desktop:`
|
|
2
|
+
<svg width="96" height="48" viewBox="0 0 96 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<rect width="96" height="48" rx="3" fill="#424242"/>
|
|
4
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.8828 18.1302C14.0391 18.3037 14.0391 18.5851 13.8828 18.7587L10.9657 22L13.8828 25.2413C14.0391 25.4149 14.0391 25.6963 13.8828 25.8698C13.7266 26.0434 13.4734 26.0434 13.3172 25.8698L10.1172 22.3143C9.96095 22.1407 9.96095 21.8593 10.1172 21.6857L13.3172 18.1302C13.4734 17.9566 13.7266 17.9566 13.8828 18.1302Z" fill="#F9F9F9"/>
|
|
5
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M82.1172 18.1302C82.2734 17.9566 82.5266 17.9566 82.6828 18.1302L85.8828 21.6857C86.0391 21.8593 86.0391 22.1407 85.8828 22.3143L82.6828 25.8698C82.5266 26.0434 82.2734 26.0434 82.1172 25.8698C81.9609 25.6963 81.9609 25.4149 82.1172 25.2413L85.0343 22L82.1172 18.7587C81.9609 18.5851 81.9609 18.3037 82.1172 18.1302Z" fill="#F9F9F9"/>
|
|
6
|
+
<circle cx="40" cy="38" r="2" fill="#F9F9F9"/>
|
|
7
|
+
<circle cx="48" cy="38" r="2" fill="#757575"/>
|
|
8
|
+
<circle cx="56" cy="38" r="2" fill="#757575"/>
|
|
9
|
+
</svg>
|
|
10
|
+
`},components:[{tag:"CarouselV3",label:"Carousel",settings:{childItem:["Item 1","Item 2","Item 3","Item 4"],itemNumber:{desktop:1,mobile:1}},styles:{sizeSetting:{desktop:{width:"100%"}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}},childrens:[{tag:"CarouselItemV3",label:"Carousel Item",childrens:[]},{tag:"CarouselItemV3",label:"Carousel Item",childrens:[]},{tag:"CarouselItemV3",label:"Carousel Item",childrens:[]},{tag:"CarouselItemV3",label:"Carousel Item",childrens:[]}]}]},{id:"carousel-4-col",name:{en:"Carousel"},icon:{desktop:`
|
|
11
|
+
<svg width="96" height="48" viewBox="0 0 96 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
12
|
+
<rect width="21" height="48" rx="3" fill="#424242"/>
|
|
13
|
+
<rect x="25" width="21" height="48" rx="3" fill="#424242"/>
|
|
14
|
+
<rect x="50" width="21" height="48" rx="3" fill="#424242"/>
|
|
15
|
+
<rect x="75" width="21" height="48" rx="3" fill="#424242"/>
|
|
16
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M86.1172 20.1302C86.2734 19.9566 86.5266 19.9566 86.6828 20.1302L89.8828 23.6857C90.0391 23.8593 90.0391 24.1407 89.8828 24.3143L86.6828 27.8698C86.5266 28.0434 86.2734 28.0434 86.1172 27.8698C85.9609 27.6963 85.9609 27.4149 86.1172 27.2413L89.0343 24L86.1172 20.7587C85.9609 20.5851 85.9609 20.3037 86.1172 20.1302Z" fill="#F9F9F9"/>
|
|
17
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.88284 20.1302C10.0391 20.3037 10.0391 20.5851 9.88284 20.7587L6.96569 24L9.88284 27.2413C10.0391 27.4149 10.0391 27.6963 9.88284 27.8698C9.72663 28.0434 9.47337 28.0434 9.31716 27.8698L6.11716 24.3143C5.96095 24.1407 5.96095 23.8593 6.11716 23.6857L9.31716 20.1302C9.47337 19.9566 9.72663 19.9566 9.88284 20.1302Z" fill="#F9F9F9"/>
|
|
18
|
+
</svg>
|
|
19
|
+
`},components:[{tag:"CarouselV3",label:"Carousel",settings:{childItem:["Item 1","Item 2","Item 3","Item 4"],itemNumber:{desktop:4,tablet:2,mobile:2},navigationStyle:{desktop:"outside"},dotStyle:{desktop:"outside"}},styles:{fullWidth:{desktop:!1,tablet:!1,mobile:!1},sizeSetting:{desktop:{width:"default"}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}},childrens:[{tag:"CarouselItemV3",label:"Carousel Item",childrens:[]},{tag:"CarouselItemV3",label:"Carousel Item",childrens:[]},{tag:"CarouselItemV3",label:"Carousel Item",childrens:[]},{tag:"CarouselItemV3",label:"Carousel Item",childrens:[]}]}]},{id:"carousel-sneak-1-side",name:{en:"Carousel"},icon:{desktop:`
|
|
20
|
+
<svg
|
|
21
|
+
width="118"
|
|
22
|
+
height="52"
|
|
23
|
+
viewBox="0 0 118 52"
|
|
24
|
+
fill="none"
|
|
25
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
26
|
+
>
|
|
27
|
+
<rect width="118" height="52" rx="3" fill="#212121" />
|
|
28
|
+
<rect x="8" y="8" width="70" height="36" rx="3" fill="#4A4A4A" />
|
|
29
|
+
<path
|
|
30
|
+
fill-rule="evenodd"
|
|
31
|
+
clip-rule="evenodd"
|
|
32
|
+
d="M107.665 25.775C107.778 25.8993 107.778 26.1007 107.665 26.225L104.748 29.4068C104.634 29.5311 104.449 29.5311 104.335 29.4068C104.222 29.2825 104.222 29.0811 104.335 28.9568L107.046 26L104.335 23.0432C104.222 22.9189 104.222 22.7175 104.335 22.5932C104.449 22.4689 104.634 22.4689 104.748 22.5932L107.665 25.775Z"
|
|
33
|
+
fill="#F9F9F9"
|
|
34
|
+
/>
|
|
35
|
+
<path
|
|
36
|
+
fill-rule="evenodd"
|
|
37
|
+
clip-rule="evenodd"
|
|
38
|
+
d="M17.3354 26.225C17.2215 26.1007 17.2215 25.8993 17.3354 25.775L20.2521 22.5932C20.366 22.4689 20.5507 22.4689 20.6646 22.5932C20.7785 22.7175 20.7785 22.9189 20.6646 23.0432L17.9541 26L20.6646 28.9568C20.7785 29.0811 20.7785 29.2825 20.6646 29.4068C20.5507 29.5311 20.366 29.5311 20.2521 29.4068L17.3354 26.225Z"
|
|
39
|
+
fill="#F9F9F9"
|
|
40
|
+
/>
|
|
41
|
+
<path
|
|
42
|
+
d="M82 11C82 9.34315 83.3431 8 85 8H117V44H85C83.3431 44 82 42.6569 82 41V11Z"
|
|
43
|
+
fill="url(#paint0_linear_1176_36442)"
|
|
44
|
+
/>
|
|
45
|
+
<defs>
|
|
46
|
+
<linearGradient
|
|
47
|
+
id="paint0_linear_1176_36442"
|
|
48
|
+
x1="82"
|
|
49
|
+
y1="26"
|
|
50
|
+
x2="117"
|
|
51
|
+
y2="26"
|
|
52
|
+
gradientUnits="userSpaceOnUse"
|
|
53
|
+
>
|
|
54
|
+
<stop stop-color="#4A4A4A" />
|
|
55
|
+
<stop offset="1" stop-color="#212121" />
|
|
56
|
+
</linearGradient>
|
|
57
|
+
</defs>
|
|
58
|
+
</svg>
|
|
59
|
+
`},components:[{tag:"CarouselV3",label:"Carousel",settings:{childItem:["Item 1","Item 2"],itemNumber:{desktop:2,tablet:2,mobile:2},sneakPeak:{desktop:!0},sneakPeakType:{desktop:"forward"},dotStyle:{desktop:"outside"}},styles:{fullWidth:{desktop:!1,tablet:!1,mobile:!1},sizeSetting:{desktop:{width:"default"}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}},childrens:[{tag:"CarouselItemV3",label:"Carousel Item",childrens:[]},{tag:"CarouselItemV3",label:"Carousel Item",childrens:[]}]}]},{id:"carousel-sneak-2-side",name:{en:"Carousel"},icon:{desktop:`
|
|
60
|
+
<svg
|
|
61
|
+
width="118"
|
|
62
|
+
height="52"
|
|
63
|
+
viewBox="0 0 118 52"
|
|
64
|
+
fill="none"
|
|
65
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
66
|
+
>
|
|
67
|
+
<rect width="118" height="52" rx="3" fill="#212121" />
|
|
68
|
+
<path
|
|
69
|
+
d="M0 8H30C31.6569 8 33 9.34315 33 11V41C33 42.6569 31.6569 44 30 44H0V8Z"
|
|
70
|
+
fill="url(#paint0_linear_1240_26280)"
|
|
71
|
+
/>
|
|
72
|
+
<rect x="37" y="8" width="44" height="36" rx="3" fill="#4A4A4A" />
|
|
73
|
+
<path
|
|
74
|
+
d="M85 11C85 9.34315 86.3431 8 88 8H118V44H88C86.3431 44 85 42.6569 85 41V11Z"
|
|
75
|
+
fill="url(#paint1_linear_1240_26280)"
|
|
76
|
+
/>
|
|
77
|
+
<path
|
|
78
|
+
fill-rule="evenodd"
|
|
79
|
+
clip-rule="evenodd"
|
|
80
|
+
d="M9.33543 26.225C9.22152 26.1007 9.22152 25.8993 9.33543 25.775L12.2521 22.5932C12.366 22.4689 12.5507 22.4689 12.6646 22.5932C12.7785 22.7175 12.7785 22.9189 12.6646 23.0432L9.95415 26L12.6646 28.9568C12.7785 29.0811 12.7785 29.2825 12.6646 29.4068C12.5507 29.5311 12.366 29.5311 12.2521 29.4068L9.33543 26.225Z"
|
|
81
|
+
fill="#F9F9F9"
|
|
82
|
+
/>
|
|
83
|
+
<path
|
|
84
|
+
fill-rule="evenodd"
|
|
85
|
+
clip-rule="evenodd"
|
|
86
|
+
d="M108.665 25.775C108.778 25.8993 108.778 26.1007 108.665 26.225L105.748 29.4068C105.634 29.5311 105.449 29.5311 105.335 29.4068C105.222 29.2825 105.222 29.0811 105.335 28.9568L108.046 26L105.335 23.0432C105.222 22.9189 105.222 22.7175 105.335 22.5932C105.449 22.4689 105.634 22.4689 105.748 22.5932L108.665 25.775Z"
|
|
87
|
+
fill="#F9F9F9"
|
|
88
|
+
/>
|
|
89
|
+
<defs>
|
|
90
|
+
<linearGradient
|
|
91
|
+
id="paint0_linear_1240_26280"
|
|
92
|
+
x1="33.5103"
|
|
93
|
+
y1="26"
|
|
94
|
+
x2="2.48972e-07"
|
|
95
|
+
y2="26"
|
|
96
|
+
gradientUnits="userSpaceOnUse"
|
|
97
|
+
>
|
|
98
|
+
<stop stop-color="#4A4A4A" />
|
|
99
|
+
<stop offset="1" stop-color="#212121" />
|
|
100
|
+
</linearGradient>
|
|
101
|
+
<linearGradient
|
|
102
|
+
id="paint1_linear_1240_26280"
|
|
103
|
+
x1="84.4898"
|
|
104
|
+
y1="26"
|
|
105
|
+
x2="118"
|
|
106
|
+
y2="26"
|
|
107
|
+
gradientUnits="userSpaceOnUse"
|
|
108
|
+
>
|
|
109
|
+
<stop stop-color="#4A4A4A" />
|
|
110
|
+
<stop offset="1" stop-color="#212121" />
|
|
111
|
+
</linearGradient>
|
|
112
|
+
</defs>
|
|
113
|
+
</svg>
|
|
114
|
+
`},components:[{tag:"CarouselV3",label:"Carousel",settings:{childItem:["Item 1","Item 2","Item 3"],itemNumber:{desktop:3,tablet:2,mobile:2},sneakPeak:{desktop:!0},sneakPeakType:{desktop:"center"},dotStyle:{desktop:"outside"}},styles:{fullWidth:{desktop:!1,tablet:!1,mobile:!1},sizeSetting:{desktop:{width:"default"}}},advanced:{"spacing-setting":{desktop:{margin:{bottom:"var(--g-s-l)"}}}},childrens:[{tag:"CarouselItemV3",label:"Carousel Item",childrens:[]},{tag:"CarouselItemV3",label:"Carousel Item",childrens:[]},{tag:"CarouselItemV3",label:"Carousel Item",childrens:[]}]}]}];export{CarouselPreset};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{CAROUSEL_ANIMATION as e}from"../../plugins/animation.js";let CarouselSettingsV2Setting=[{id:"itemNumber",label:"",type:"carousel-layout-selector",devices:{desktop:{default:4}}},{id:"sneakPeak",label:"Sneak peek",type:"sneak-peak",devices:{desktop:{default:!1}}},{id:"sneakPeakType",label:"",type:"sneak-peak-type",itemPerRow:2,iconViewBox:"0 0 118 52",enableItemBackground:!0,enableTooltip:!0,options:[{value:"forward",type:"sneak-peak-offset"},{value:"center",type:"sneak-peak-offset"}],devices:{desktop:{default:"forward"}}},{id:"sneakPeakOffsetForward",label:"Ratio",type:"input:slider",min:1,max:100,showDefaultUnit:!0,isNumber:!0,units:["%"],devices:{desktop:{default:50}}},{id:"sneakPeakOffsetCenter",label:"Ratio",type:"input:slider",min:1,max:100,showDefaultUnit:!0,isNumber:!0,units:["%"],devices:{desktop:{default:50}}},{id:"childItem",label:"Item management",type:"child-item",default:["Item 1","Item 2","Item 3","Item 4","Item 5","Item 6"]},{id:"vertical",label:"Vertical layout",type:"toggle",devices:{desktop:{default:!1}}},{id:"controlOverContent",label:"Next & previous position",type:"segment",options:[{label:"Inside",value:!0},{label:"Outside",value:!1}],devices:{desktop:{default:!0}}},{id:"dot",label:"Dots",type:"toggle",devices:{desktop:{default:!0}}},{id:"dotStyle",label:"Dot style",type:"option:illustration",iconViewBox:"0 0 77 48",enableItemBackground:!0,enableTooltip:!0,options:[{label:"Inside",value:"inside",type:"carousel-dot",svgName:"gp-carousel-dot-inside"},{label:"Outside",value:"outside",type:"carousel-dot",svgName:"gp-carousel-dot-outside"}],devices:{desktop:{default:"inside"}}},{id:"dotSize",label:"Dots size",type:"input:stepper",min:1,devices:{desktop:{default:12}}},{id:"dotGapToCarousel",label:"Gap to carousel",type:"input:slider",min:0,max:120,ignoreMax:!0,devices:{desktop:{default:16}}},{id:"dotColor",label:"Dot color",type:"color-picker-v2",devices:{desktop:{default:"bg-1"}},compoDefaultValue:{desktop:{default:"bg-1"}}},{id:"dotActiveColor",label:"Dot color active",type:"color-picker-v2",devices:{desktop:{default:"line-3"}},compoDefaultValue:{desktop:{default:"line-3"}}},{id:"navigationEnable",type:"toggle",devices:{desktop:{default:!0}}},{id:"navigationStyle",type:"option:illustration",iconViewBox:"0 0 77 48",enableItemBackground:!0,label:"Navigation style",enableTooltip:!0,options:[{label:"Outside",value:"outside",type:"slide-control",svgName:"gp-slide-control-outside"},{label:"Inside",value:"inside",type:"slide-control",svgName:"gp-slide-control-inside"}],devices:{desktop:{default:"inside"}}},{id:"arrowCustom",type:"icon",isHideClear:!0,default:`<svg height="20" width="20" data-name="caret-right-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508418455613473128">
|
|
2
|
+
<path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"></path></svg>
|
|
3
|
+
`},{id:"arrowCustomColor",label:"Icon color",type:"color-picker-v2",default:"#121212",compoDefaultValue:"#121212"},{id:"arrowIconSize",label:"Number per show",type:"input:stepper",min:1,devices:{desktop:{default:24}}},{id:"arrowButtonSize",type:"size-setting",label:"",devices:{desktop:{default:{shapeValue:"1/1",shapeLinked:!0,width:void 0,height:void 0,padding:{linked:!0,type:"custom",top:"16px",bottom:"16px",left:"16px",right:"16px"}}}},lockShapeValue:!0,hiddenShowMore:!0,hiddenSettings:["gap","proportion","padding"],settingConfig:{width:{name:"Width",units:["px"],displayOptions:["small","medium","large"],sizeConfig:{small:"24px",medium:"32px",large:"40px"}},height:{name:"Height",units:["px"],displayOptions:["small","medium","large","full-height"],sizeConfig:{small:"24px",medium:"32px",large:"40px",full:"100%"}},padding:{paddingConfig:{small:{vertical:"2px",horizontal:"2px"},medium:{vertical:"4px",horizontal:"4px"},large:{vertical:"8px",horizontal:"8px"}}}},sizePaddingInput:"small"},{id:"arrowBackgroundColor",label:"Background Color",type:"color-picker-v2",default:"transparent",compoDefaultValue:"bg-2"},{id:"arrowBorder",type:"border-v2",label:"Border",devices:{desktop:{default:{borderType:"none",border:"none",borderWidth:"1px",width:"1px 1px 1px 1px",isCustom:!0}}},compoDefaultValue:{desktop:{default:{color:"line-3",border:"solid",width:"1px",borderWidth:"1px"}}}},{id:"arrowShadow",type:"shadow-v2",devices:{desktop:{default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!1}}},compoDefaultValue:{desktop:{default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}}},{id:"roundedArrow",type:"corner-v2",label:"Border Radius",devices:{desktop:{default:{btrr:"0px",bblr:"0px",bbrr:"0px",btlr:"0px",radiusType:"none"}}},compoDefaultValue:{desktop:{default:{btrr:"9999px",bblr:"9999px",bbrr:"9999px",btlr:"9999px",radiusType:"circle"}}}},{id:"arrowGapToEachSide",label:"Gap to each side",type:"input:slider",min:0,max:120,ignoreMax:!0,default:"16"},{id:"showWhenHover",label:"Only show when hover",type:"toggle",default:!1},{id:"rtl",label:"Direction",type:"option:value",options:[{value:!1,iconName:"polaris-arrow-left",label:"Right to left"},{value:!0,label:"Left to right",iconName:"polaris-arrow-right"}],default:!1},{id:"autoplay",label:"Autoplay",type:"toggle",default:!1},{id:"autoplayTimeout",label:"Time out",type:"input:slider",min:1,max:4,step:.1,default:2,units:["s"],isNumber:!0,showDefaultUnit:!0,ignoreMax:!0},{id:"pauseOnHover",label:"Pause On Hover",type:"toggle",default:!0,hide:!0},{id:"runPreview",type:"play-pause",hideLabel:!0,default:!1},{id:"enableDrag",label:"Drag to scroll",type:"toggle",devices:{desktop:{default:!0}}},{id:"loop",label:"Infinity loop",type:"toggle",devices:{desktop:{default:!0}}},{id:"animationMode",label:"Animation",type:"select",default:e.EASE_IN.value,options:[{label:"Ease in",value:e.EASE_IN.value},{label:"Ease out",value:e.EASE_OUT.value},{label:"Ease in & out",value:e.EASE_IN_OUT.value}]},{id:"background",type:"background-media-combo",devices:{desktop:{default:{type:"color",color:void 0,image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}},compoDefaultValue:{desktop:{default:{type:"color",color:"bg-2",image:{src:"",width:0,height:0},size:"cover",position:{x:50,y:50},repeat:"no-repeat",attachment:"scroll"}}}},{id:"label",label:"Option Label",type:"toggle",default:!0}],CarouselSettingsV2Style=[{id:"backgroundColor",type:"color-picker-v2",devices:{desktop:{default:void 0}},compoDefaultValue:{desktop:{default:"#DDDDDD"}},enableGradient:!0},{id:"backgroundImage",type:"background-image",devices:{desktop:{default:{}}},compoDefaultValue:{desktop:{default:{image:{src:"https://cdn.shopify.com/s/files/1/2005/9307/files/background_settings.jpg",width:1200,height:480,hiddenSEO:!0},repeat:"no-repeat",size:"cover",position:{x:50,y:50},attachment:"scroll",preload:!1}}}},{id:"playSpeed",label:"Slide speed",type:"input:slider",useOnlyUnitInit:!0,min:100,max:5e3,step:50,units:["ms"],showDefaultUnit:!0,isNumber:!0,default:500},{id:"sizeSetting",type:"size-setting",label:"",devices:{desktop:{default:{shapeLinked:!1,width:"default",height:"auto"}}},settingConfig:{width:{displayOptions:["full","default"],name:"Width"},height:{displayOptions:["auto","small","medium","large"],name:"Height",sizeConfig:{small:"300px",medium:"500px",large:"700px"}}},hiddenSettings:["padding","gap","shape"]},{id:"align",label:"Align",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"center"}}},{id:"borderContent",type:"border-v2",label:"Border",default:{borderType:"none",border:"none",width:"1px 1px 1px 1px",position:"all",borderWidth:"1px",color:"line-3",isCustom:!0},compoDefaultValue:{width:"1px 1px 1px 1px",position:"all",borderWidth:"1px",color:"line-3",border:"solid"}},{id:"roundedContent",type:"corner-v2",label:"Corner",default:{radiusType:"none"}},{id:"hasActiveShadow",type:"toggle",label:"Enable Button Shadow",default:!1},{id:"carouselShadow",type:"shadow-v2",label:"Button Shadow",default:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!1},compoDefaultValue:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}},{id:"spacing",label:"Items spacing",type:"input:slider",fallbackValue:"0",min:0,max:80,ignoreMax:!0,devices:{desktop:{default:16}}},{id:"itemPadding",type:"size-setting",devices:{desktop:{default:{padding:{}}}},hiddenSettings:["shape","gap","width","height"],hiddenShowMore:!0}],CarouselSettingsV2=[{id:"setting",controls:CarouselSettingsV2Setting},{id:"style",controls:CarouselSettingsV2Style}];export{CarouselSettingsV2,CarouselSettingsV2Setting,CarouselSettingsV2Style};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let SettingUIV1=[{type:"group",label:{en:"Display"},controls:[{type:"control",setting:{id:"itemNumber"}},{type:"control",label:{en:"Items spacing"},setting:{id:"spacing"},condition:"itemNumber >= 2"},{type:"control",label:{en:"Sneak peek"},setting:{id:"sneakPeak"},condition:"itemNumber >= 2"},{type:"control",condition:"sneakPeak == true",setting:{id:"sneakPeakType"}},{type:"control",condition:'sneakPeak == true && sneakPeakType == "forward"',setting:{id:"sneakPeakOffsetForward"}},{type:"control",condition:'sneakPeak == true && sneakPeakType == "center"',setting:{id:"sneakPeakOffsetCenter"}}]},{type:"group",label:{en:"Item management"},controls:[{type:"control",layout:"vertical",setting:{id:"childItem"}}]},{type:"group",label:{en:"Navigation"},controls:[{type:"control",setting:{id:"navigationStyle"}},{condition:'navigationStyle !== "none"',type:"control",label:{en:"Icon"},setting:{id:"arrowCustom"}},{condition:'navigationStyle !== "none"',type:"control",label:{en:"Icon size"},setting:{id:"arrowIconSize"}},{condition:'navigationStyle !== "none"',type:"control",label:{en:"Icon color"},setting:{id:"arrowCustomColor"},isMoreSetting:!0},{type:"control",condition:'navigationStyle !== "none"',setting:{id:"arrowButtonSize"},layout:"vertical",isMoreSetting:!0},{type:"control",condition:'navigationStyle !== "none"',label:{en:"Background color"},setting:{id:"arrowBackgroundColor"},isMoreSetting:!0},{type:"control",condition:'navigationStyle !== "none"',options:{labelPosition:"start"},label:{en:"Border"},setting:{id:"arrowBorder"},isMoreSetting:!0},{type:"control",condition:'navigationStyle !== "none"',label:{en:"Corner"},setting:{id:"roundedArrow"},isMoreSetting:!0},{type:"control",condition:'navigationStyle !== "none"',label:{en:"Gap to each side"},setting:{id:"arrowGapToEachSide"},isMoreSetting:!0},{type:"control",condition:'navigationStyle !== "none"',label:{en:"Only show when hover"},setting:{id:"showWhenHover"},isMoreSetting:!0}]},{type:"group",label:{en:"Dots"},controls:[{type:"control",setting:{id:"dotStyle"}},{condition:'dotStyle !== "none"',type:"control",label:{en:"Active color"},setting:{id:"dotActiveColor"}},{condition:'dotStyle !== "none"',type:"control",label:{en:"Inactive color"},setting:{id:"dotColor"}},{condition:'dotStyle !== "none"',type:"control",label:{en:"Dots size"},setting:{id:"dotSize"},isMoreSetting:!0},{condition:'dotStyle !== "none"',type:"control",label:{en:"Gap to carousel"},setting:{id:"dotGapToCarousel"},isMoreSetting:!0}]},{type:"group",label:{en:"Interaction"},controls:[{type:"control",label:{en:"Direction"},setting:{id:"rtl"}},{type:"control",label:{en:"Autoplay"},setting:{id:"autoplay"}},{type:"control",label:{en:"Time out"},setting:{id:"autoplayTimeout"},condition:"autoplay === true"},{type:"control",label:{en:"Pause On Hover"},setting:{id:"pauseOnHover"},condition:"autoplay == true"},{type:"control",setting:{id:"runPreview"},condition:"autoplay === true"},{type:"control",label:{en:"Drag to scroll"},setting:{id:"enableDrag"}},{type:"control",label:{en:"Infinity loop"},setting:{id:"loop"}},{type:"control",label:{en:"Slide speed"},setting:{id:"playSpeed"},isMoreSetting:!0},{type:"control",label:{en:"Animation"},setting:{id:"animationMode"},isMoreSetting:!0}]},{type:"group",label:{en:"Size"},controls:[{type:"control",setting:{id:"sizeSetting"},layout:"vertical"},{type:"control",setting:{id:"itemPadding"},isMoreSetting:!0,options:{noGap:!0}}]},{type:"group",label:{en:"Shape"},controls:[{type:"control",options:{labelPosition:"start"},label:{en:"Border"},setting:{id:"borderContent"}},{type:"control",label:{en:"Corner"},setting:{id:"roundedContent"}},{type:"control",label:{en:"Shadow"},setting:{id:"hasActiveShadow"}},{type:"control",setting:{id:"carouselShadow"},layout:"vertical",condition:"hasActiveShadow === true"}]},{type:"control",label:{en:"Background"},options:{label:"large",styleLabel:{marginBottom:"4px"}},setting:{id:"background"},layout:"vertical"},{type:"control",label:{en:"Align"},setting:{id:"align"},options:{label:"large"}}];export{SettingUIV1};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let carouselNavigationSettings={controls:[{label:{en:"Navigation"},setting:{id:"navigationEnable"},options:{labelVariant:"primary",toggleStyle:"switch"}},{conditionDisplay:"navigationEnable === true",label:{en:"Position"},setting:{id:"navigationStyle"}},{conditionDisplay:"navigationEnable === true",label:{en:"Icon"},setting:{id:"arrowCustom"}},{conditionDisplay:"navigationEnable === true",label:{en:"Icon size"},setting:{id:"arrowIconSize"}},{conditionDisplay:"navigationEnable === true",label:{en:"Icon color"},setting:{id:"arrowCustomColor"}}],moreSettings:{controls:[{type:"combo",conditionDisplay:"navigationEnable === true",label:{en:"Button size"},fixedValue:"Edit",iconName:"polaris-measurement-size",isHideClear:!0,controls:[{setting:{id:"arrowButtonSize"},layout:"vertical"},{label:{en:"Padding"},controlConfig:{id:"arrow-button-padding",type:"padding-v2",linkWithSetting:{name:"arrowButtonSize",field:"padding"},compoDefaultValue:{desktop:{default:{type:"custom",top:"16px",bottom:"16px",left:"16px",right:"16px",linked:!1}}}}}]},{conditionDisplay:"navigationEnable === true",label:{en:"Background"},setting:{id:"arrowBackgroundColor"}},{conditionDisplay:"navigationEnable === true",label:{en:"Border"},setting:{id:"arrowBorder"}},{conditionDisplay:"navigationEnable === true",label:{en:"Corner"},setting:{id:"roundedArrow"}},{conditionDisplay:"navigationEnable === true",label:{en:"Shadow"},setting:{id:"arrowShadow"}},{conditionDisplay:"navigationEnable === true",label:{en:"Gap to edge"},setting:{id:"arrowGapToEachSide"}},{conditionDisplay:"navigationEnable === true",label:{en:"Show on hover"},setting:{id:"showWhenHover"}}]}},carouselDotsSettings={controls:[{label:{en:"Dots"},setting:{id:"dot"},options:{labelVariant:"primary",toggleStyle:"switch"}},{conditionDisplay:"dot === true",label:{en:"Position"},setting:{id:"dotStyle"},options:{hiddenSwitchDeviceIcon:!0}},{conditionDisplay:"dot === true",label:{en:"Active color"},setting:{id:"dotActiveColor"},options:{hiddenSwitchDeviceIcon:!0}},{conditionDisplay:"dot === true",label:{en:"Inactive color"},setting:{id:"dotColor"},options:{hiddenSwitchDeviceIcon:!0}}],moreSettings:{controls:[{conditionDisplay:"dot === true",label:{en:"Dots size"},setting:{id:"dotSize"},options:{hiddenSwitchDeviceIcon:!0}},{conditionDisplay:"dot === true",label:{en:"Gap to edge"},setting:{id:"dotGapToCarousel"},options:{hiddenSwitchDeviceIcon:!0}}]}},carouselEffectsSettings={label:{en:"Slide effect"},controls:[{label:{en:"Autoplay"},setting:{id:"autoplay"}},{label:{en:"Delay"},setting:{id:"autoplayTimeout"},conditionDisplay:"autoplay === true"},{label:{en:"Pause On Hover"},setting:{id:"pauseOnHover"},conditionDisplay:"autoplay == true"},{label:{en:"Slide direction"},setting:{id:"rtl"}},{label:{en:"Infinity loop"},setting:{id:"loop"}},{label:{en:"Drag / swipe"},setting:{id:"enableDrag"}}],moreSettings:{controls:[{label:{en:"Slide speed"},setting:{id:"playSpeed"}},{label:{en:"Animation"},setting:{id:"animationMode"}},{setting:{id:"runPreview"},layout:"vertical",conditionDisplay:"autoplay === true"}]}},SettingUIV2=[{label:{en:"Items per slide"},controls:[{setting:{id:"itemNumber"},layout:"vertical",popoverLabel:{en:"Items per slide"}}]},{label:{en:"Display"},controls:[{label:{en:"Sneak peek"},type:"combo",setting:{id:"sneakPeak"},fixedValue:"Styled",iconName:"gp-sneak-peek-left",conditionEnable:"itemNumber > 1",options:{disableMessage:"Sneak peek doesn't work <br> with 1-column layout"},controls:[{layout:"vertical",label:{en:"style"},setting:{id:"sneakPeakType"}},{conditionDisplay:'sneakPeakType == "forward"',label:{en:"Ratio"},setting:{id:"sneakPeakOffsetForward"}},{conditionDisplay:'sneakPeakType == "center"',label:{en:"Ratio"},setting:{id:"sneakPeakOffsetCenter"}}]}]},{label:{en:"Item management"},controls:[{label:{en:"Order"},setting:{id:"childItem"}}]},{label:{en:"Item spacing"},controls:[{label:{en:"Gap"},setting:{id:"spacing"}}]},{label:{en:"Item style"},controls:[{label:{en:"Padding"},controlConfig:{id:"itemPadding",type:"padding-v2",linkWithSetting:{name:"itemPadding",field:"padding"},compoDefaultValue:{desktop:{default:{type:"custom",top:"16px",bottom:"16px",left:"16px",right:"16px"}}}}},{label:{en:"Background"},setting:{id:"background"}}],moreSettings:{controls:[{label:{en:"Border"},setting:{id:"borderContent"}},{label:{en:"Corner"},setting:{id:"roundedContent"}},{label:{en:"Shadow"},setting:{id:"carouselShadow"},options:{updateFields:[{field:"enable",settingId:"hasActiveShadow"}]},controlChangeTrigger:{settings:[{condition:"carouselShadow.enable === true",source:["carouselShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!0}},{condition:"carouselShadow.enable === false",source:["carouselShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}}]}},carouselNavigationSettings,carouselDotsSettings,carouselEffectsSettings,{label:{en:"Size"},controls:[{id:"Width",label:{en:"Width"},controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,fallbackValue:"Auto",linkWithSetting:{name:"sizeSetting",field:"width"},displayOptions:[{label:"Default",value:"default",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},layout:"horizontal"},{id:"Height",label:{en:"Height"},controlConfig:{id:"height",type:"dropdown:input",label:"height",inputType:"number",units:["px"],hideUnit:!1,fallbackValue:"Auto",linkWithSetting:{name:"sizeSetting",field:"height"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0}]},layout:"horizontal"},{label:{en:"Padding"},conditionDisplay:'pageType != "POST_PURCHASE"',controlConfig:{id:"slider-padding",type:"padding-v2",linkWithSetting:{name:"spacing-setting",field:"padding"}}}]},{label:{en:"Background"},controls:[{label:{en:"Color"},setting:{id:"backgroundColor"}},{label:{en:"Image"},setting:{id:"backgroundImage"}}]},{label:{en:"Shape"},controls:[{label:{en:"Border"},setting:{id:"border",state:"normal"}},{label:{en:"Corner"},setting:{id:"rounded",state:"normal"}},{label:{en:"Shadow"},setting:{id:"boxShadow",state:"normal"},options:{updateFields:[{field:"normal.enable",settingId:"hasBoxShadow",state:"normal"}]},controlChangeTrigger:{settings:[{condition:"boxShadow.normal.enable === true",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!0}},{condition:"boxShadow.normal.enable === false",source:["boxShadow","hasBoxShadow"],action:{controlId:"hasBoxShadow",groupType:"advanced",controlType:"advanced",state:"normal",newValue:!1}}],options:{noRecordHistory:!0}}}]},{controls:[{conditionEnable:'!(parseInt(sizeSetting.width) >= 100 && sizeSetting.width?.includes("%"))',setting:{id:"align"},label:{en:"Align"},options:{labelVariant:"primary",disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];export{SettingUIV2,carouselDotsSettings,carouselEffectsSettings,carouselNavigationSettings};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dataStringify as e,DEVICES as t,getValueByDevice as r}from"@gem-sdk/core";import{createStateOrContext as d}from"@gem-sdk/system";
|
|
1
|
+
import{dataStringify as e,DEVICES as t,getValueByDevice as r}from"@gem-sdk/core";import{createStateOrContext as d}from"@gem-sdk/system";let getResponsiveSetting=e=>{let t=e.desktop,r=e.tablet?e.tablet:t,d=e.mobile?e.mobile:r;return{desktop:t,tablet:r,mobile:d}},defaultWidth={desktop:"1200px",tablet:"100%",mobile:"100%"},getStyleByDevice=(e,t)=>t?.[e]==="100%"?{contentWidth:"100%",wrapperWidth:"100%",wrapperPadding:"var(--g-ct-p)"}:t?.[e]==="default"?{contentWidth:`var(--g-ct-w, ${defaultWidth[e]})`,wrapperWidth:`calc(var(--g-ct-w, ${defaultWidth[e]}) + 2 * var(--g-ct-p, 15px))`,wrapperPadding:"var(--g-ct-p, 15px)"}:t?.[e]!==void 0?{contentWidth:t?.[e],wrapperWidth:`calc(${t?.[e]} + 2 * var(--g-ct-p, 15px))`,wrapperPadding:"var(--g-ct-p, 15px)"}:{contentWidth:void 0,wrapperWidth:`calc(var(--g-ct-w, ${defaultWidth[e]}) + 2 * var(--g-ct-p, 15px))`,wrapperPadding:"var(--g-ct-p, 15px)"},createStyleObject=e=>{let t=getStyleByDevice("desktop",e),r=getStyleByDevice("tablet",e),d=getStyleByDevice("mobile",e);return{content:{desktop:t.contentWidth,tablet:r.contentWidth,mobile:d.contentWidth},wrapper:{desktop:t.wrapperWidth,tablet:r.wrapperWidth,mobile:d.wrapperWidth},padding:{desktop:t.wrapperPadding,tablet:r.wrapperPadding,mobile:d.wrapperPadding}}},getData=t=>{let{styles:r,builderProps:i}=t,o=d({background:r?.background,uid:i?.uid});return{stateData:e(o).replaceAll("'","'")}};function reduceRadiusForState(e,t){if(!e||!t)return{};let r=("string"==typeof e?e.split(" "):[]).map(e=>parseInt(e,10)||0),d=Object.fromEntries(["btrr","bblr","bbrr","btlr"].map((e,d)=>[e,Math.max(0,(parseInt(t[e]??"0",10)||0)-(r[d]||0))+"px"]));return{...d,radiusType:t.radiusType}}function reduceBorderRadiusForDevice(e,t){if(!e||!t)return{};let r={};return["normal","hover","active"].forEach(d=>{let i=e?.[d],o=t?.[d];i&&o&&(r[d]=reduceRadiusForState(i.width,o))}),r}function getInnerRadiusExcludeBorder(e,t){return{desktop:reduceBorderRadiusForDevice(e?.desktop,t?.desktop),tablet:reduceBorderRadiusForDevice(e?.tablet??e?.desktop,t?.tablet??t?.desktop),mobile:reduceBorderRadiusForDevice(e?.mobile??e?.tablet??e?.desktop,t?.mobile??t?.tablet??t?.desktop)}}let checkHasBackgroundVideo=e=>t.some(t=>{let d=r(e,t);return!!d&&(d?.videoType==="html5"&&d?.videoHtml5||d?.videoType==="youtube"&&d?.video)}),isRenderHtmlVideo=e=>{let t=getResponsiveSetting(e||{}),r=t.desktop?.videoType,d=t.tablet?.videoType,i=t.mobile?.videoType;return"html5"==r||"html5"==d||"html5"==i},isRenderYoutubeVideo=e=>{let t=getResponsiveSetting(e||{}),r=t.desktop?.videoType,d=t.tablet?.videoType,i=t.mobile?.videoType;return"youtube"==r||"youtube"==d||"youtube"==i};export{checkHasBackgroundVideo,createStyleObject,getData,getInnerRadiusExcludeBorder,isRenderHtmlVideo,isRenderYoutubeVideo};
|