@gem-sdk/components 2.0.0-dev.369 → 2.0.0-dev.371
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/article/components/ArticleDate.js +0 -1
- package/dist/cjs/article/components/ArticleReadMore.liquid.js +1 -1
- package/dist/cjs/article/setting/configs/ArticleContent/settings.js +1 -1
- package/dist/cjs/article/setting/configs/ArticleContent/uiV2.js +11 -1
- package/dist/cjs/article/setting/configs/ArticleExcerpt/settings.js +1 -1
- package/dist/cjs/article/setting/configs/ArticleImage/settings.js +5 -4
- package/dist/cjs/article/setting/configs/ArticleImage/uiV2.js +48 -4
- package/dist/cjs/article/setting/configs/ArticleReadMore/settings.js +96 -64
- package/dist/cjs/article/setting/configs/ArticleReadMore/uiV2.js +380 -97
- package/dist/cjs/builder.js +2 -2
- package/dist/cjs/button/setting/configs/settings.js +0 -14
- package/dist/cjs/carousel/arrow/Arrow.js +52 -0
- package/dist/cjs/carousel/arrow/Arrow.liquid.js +46 -0
- package/dist/cjs/carousel/{components/common/arrow.js → arrow/common/common.js} +13 -11
- package/dist/cjs/carousel/arrow/common/getClass.js +50 -0
- package/dist/cjs/carousel/arrow/common/getStyle.js +84 -0
- package/dist/cjs/carousel/carousel-item/CarouselItem.js +32 -0
- package/dist/cjs/carousel/carousel-item/CarouselItem.liquid.js +38 -0
- package/dist/cjs/carousel/carousel-item/common/getClass.js +29 -0
- package/dist/cjs/carousel/{components/CarouselItem.liquid.js → carousel-item/common/getStyle.js} +30 -47
- package/dist/cjs/carousel/carousel-item/hook/useCarouseItem.js +14 -0
- package/dist/cjs/carousel/components/const/index.js +5 -0
- package/dist/cjs/carousel/dots/Dots.js +51 -0
- package/dist/cjs/carousel/dots/Dots.liquid.js +26 -0
- package/dist/cjs/carousel/dots/common/common.js +46 -0
- package/dist/cjs/carousel/dots/common/getClass.js +40 -0
- package/dist/cjs/carousel/dots/common/getStyle.js +33 -0
- package/dist/cjs/carousel/dots/hook/useDotsSetting.js +21 -0
- package/dist/cjs/carousel/index.js +1 -2
- package/dist/cjs/carousel/next.js +2 -2
- package/dist/cjs/carousel/root/Carousel.js +129 -0
- package/dist/cjs/carousel/root/Carousel.liquid.js +104 -0
- package/dist/cjs/carousel/root/common/getAttr.js +25 -0
- package/dist/cjs/carousel/root/common/getClass.js +135 -0
- package/dist/cjs/carousel/root/common/getData.js +56 -0
- package/dist/cjs/carousel/root/common/getStyle.js +64 -0
- package/dist/cjs/carousel/{components/Carousel.js → root/hook/useCarousel.js} +153 -321
- package/dist/cjs/carousel/setting/Carousel.js +8 -1555
- package/dist/cjs/carousel/setting/configs/presets.js +380 -0
- package/dist/cjs/carousel/setting/configs/settingV2.js +771 -0
- package/dist/cjs/carousel/setting/configs/uiV1.js +434 -0
- package/dist/cjs/carousel/setting/configs/uiV2.js +627 -0
- package/dist/cjs/common/components/NoDataState.js +5 -5
- package/dist/cjs/grid/row/commons/common.js +3 -3
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.liquid.js +2 -2
- package/dist/cjs/product/components/ProductImages/ProductGalleryCarousel.js +2 -2
- package/dist/cjs/product/components/ProductImages/ProductImagesLightBox.js +2 -2
- package/dist/cjs/product/components/ProductImages/liquid/ProductGalleryCarousel.liquid.js +5 -3
- package/dist/cjs/product/components/ProductImagesV2/common/getAttr.js +1 -0
- package/dist/cjs/product/components/ProductImagesV2/common/productFeaturedImage.js +1 -1
- package/dist/cjs/product/components/ProductImagesV2/common/productGallery.js +1 -1
- package/dist/cjs/product/components/ProductImagesV2/components/child/ProductFeaturedImageCarousel.js +5 -5
- package/dist/cjs/product/components/ProductImagesV2/components/feature-gallery/FeatureImageWithGallery.liquid.js +8 -4
- package/dist/cjs/product/components/ProductImagesV2/components/gallery-carousel/GalleryCarousel.js +2 -2
- package/dist/cjs/product/components/ProductImagesV2/components/gallery-carousel/GalleryCarousel.liquid.js +6 -3
- package/dist/cjs/product/components/ProductImagesV2/components/lightbox/ProductImagesLightBox.js +2 -2
- package/dist/cjs/product/components/ProductImagesV2/hooks/useProductFeaturedImageCarousel.js +3 -3
- package/dist/cjs/product/components/ProductList/ProductListCarouselLayout.js +2 -2
- package/dist/cjs/product/components/ProductList/ProductListCarouselLayout.liquid.js +5 -3
- package/dist/cjs/product/components/ProductList/common/index.js +5 -5
- package/dist/cjs/product/components/ProductVariants/common/main/getAttr.js +1 -1
- package/dist/cjs/text/components/Text.js +3 -3
- package/dist/esm/article/components/ArticleDate.js +0 -1
- package/dist/esm/article/components/ArticleReadMore.liquid.js +1 -1
- package/dist/esm/article/setting/configs/ArticleContent/settings.js +1 -1
- package/dist/esm/article/setting/configs/ArticleContent/uiV2.js +11 -1
- package/dist/esm/article/setting/configs/ArticleExcerpt/settings.js +1 -1
- package/dist/esm/article/setting/configs/ArticleImage/settings.js +5 -4
- package/dist/esm/article/setting/configs/ArticleImage/uiV2.js +48 -4
- package/dist/esm/article/setting/configs/ArticleReadMore/settings.js +96 -64
- package/dist/esm/article/setting/configs/ArticleReadMore/uiV2.js +380 -97
- package/dist/esm/builder.js +2 -2
- package/dist/esm/button/setting/configs/settings.js +0 -14
- package/dist/esm/carousel/arrow/Arrow.js +48 -0
- package/dist/esm/carousel/arrow/Arrow.liquid.js +42 -0
- package/dist/esm/carousel/{components/common/arrow.js → arrow/common/common.js} +12 -10
- package/dist/esm/carousel/arrow/common/getClass.js +48 -0
- package/dist/esm/carousel/arrow/common/getStyle.js +82 -0
- package/dist/esm/carousel/carousel-item/CarouselItem.js +28 -0
- package/dist/esm/carousel/carousel-item/CarouselItem.liquid.js +34 -0
- package/dist/esm/carousel/carousel-item/common/getClass.js +27 -0
- package/dist/esm/carousel/{components/CarouselItem.liquid.js → carousel-item/common/getStyle.js} +31 -46
- package/dist/esm/carousel/carousel-item/hook/useCarouseItem.js +12 -0
- package/dist/esm/carousel/components/const/index.js +3 -0
- package/dist/esm/carousel/dots/Dots.js +47 -0
- package/dist/esm/carousel/dots/Dots.liquid.js +22 -0
- package/dist/esm/carousel/dots/common/common.js +43 -0
- package/dist/esm/carousel/dots/common/getClass.js +38 -0
- package/dist/esm/carousel/dots/common/getStyle.js +31 -0
- package/dist/esm/carousel/dots/hook/useDotsSetting.js +19 -0
- package/dist/esm/carousel/index.js +1 -2
- package/dist/esm/carousel/next.js +2 -2
- package/dist/esm/carousel/root/Carousel.js +125 -0
- package/dist/esm/carousel/root/Carousel.liquid.js +100 -0
- package/dist/esm/carousel/root/common/getAttr.js +23 -0
- package/dist/esm/carousel/root/common/getClass.js +133 -0
- package/dist/esm/carousel/root/common/getData.js +54 -0
- package/dist/esm/carousel/root/common/getStyle.js +62 -0
- package/dist/esm/carousel/{components/Carousel.js → root/hook/useCarousel.js} +150 -316
- package/dist/esm/carousel/setting/Carousel.js +8 -1555
- package/dist/esm/carousel/setting/configs/presets.js +378 -0
- package/dist/esm/carousel/setting/configs/settingV2.js +769 -0
- package/dist/esm/carousel/setting/configs/uiV1.js +432 -0
- package/dist/esm/carousel/setting/configs/uiV2.js +625 -0
- package/dist/esm/common/components/NoDataState.js +6 -6
- package/dist/esm/grid/row/commons/common.js +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.liquid.js +2 -2
- package/dist/esm/product/components/ProductImages/ProductGalleryCarousel.js +2 -2
- package/dist/esm/product/components/ProductImages/ProductImagesLightBox.js +2 -2
- package/dist/esm/product/components/ProductImages/liquid/ProductGalleryCarousel.liquid.js +5 -3
- package/dist/esm/product/components/ProductImagesV2/common/getAttr.js +1 -0
- package/dist/esm/product/components/ProductImagesV2/common/productFeaturedImage.js +1 -1
- package/dist/esm/product/components/ProductImagesV2/common/productGallery.js +1 -1
- package/dist/esm/product/components/ProductImagesV2/components/child/ProductFeaturedImageCarousel.js +5 -5
- package/dist/esm/product/components/ProductImagesV2/components/feature-gallery/FeatureImageWithGallery.liquid.js +8 -4
- package/dist/esm/product/components/ProductImagesV2/components/gallery-carousel/GalleryCarousel.js +2 -2
- package/dist/esm/product/components/ProductImagesV2/components/gallery-carousel/GalleryCarousel.liquid.js +6 -3
- package/dist/esm/product/components/ProductImagesV2/components/lightbox/ProductImagesLightBox.js +2 -2
- package/dist/esm/product/components/ProductImagesV2/hooks/useProductFeaturedImageCarousel.js +3 -3
- package/dist/esm/product/components/ProductList/ProductListCarouselLayout.js +2 -2
- package/dist/esm/product/components/ProductList/ProductListCarouselLayout.liquid.js +5 -3
- package/dist/esm/product/components/ProductList/common/index.js +3 -3
- package/dist/esm/product/components/ProductVariants/common/main/getAttr.js +1 -1
- package/dist/esm/text/components/Text.js +4 -4
- package/dist/types/index.d.ts +165 -68
- package/package.json +3 -3
- package/dist/cjs/carousel/components/Arrow.js +0 -110
- package/dist/cjs/carousel/components/Arrow.liquid.js +0 -103
- package/dist/cjs/carousel/components/Carousel.liquid.js +0 -256
- package/dist/cjs/carousel/components/CarouselItem.js +0 -88
- package/dist/cjs/carousel/components/Dots.js +0 -69
- package/dist/cjs/carousel/components/Dots.liquid.js +0 -23
- package/dist/cjs/carousel/components/common/dots.js +0 -57
- package/dist/esm/carousel/components/Arrow.js +0 -106
- package/dist/esm/carousel/components/Arrow.liquid.js +0 -99
- package/dist/esm/carousel/components/Carousel.liquid.js +0 -252
- package/dist/esm/carousel/components/CarouselItem.js +0 -84
- package/dist/esm/carousel/components/Dots.js +0 -65
- package/dist/esm/carousel/components/Dots.liquid.js +0 -19
- package/dist/esm/carousel/components/common/dots.js +0 -53
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _gem_sdk_core from '@gem-sdk/core';
|
|
2
|
-
import { BaseProps, TypographySettingV2, ObjectDevices as ObjectDevices$1, Background, SizeSettingGlobal, StateProp, ColorValueType as ColorValueType$1, TypographySetting as TypographySetting$1, Border, SizeSetting, CornerRadius, ShadowProps as ShadowProps$1, BasePropsWrap, BackgroundMedia, AlignProp, TransformProp, ResponsiveStateProp, Ratio, PageContext, BackgroundImageValue, ObjectLayoutValue, NameDevices as NameDevices$1, PaddingType, RawChild, PostPurchaseTypo, AlignItemProp, ProductProviderProps, AdvancedType, DotStyle as DotStyle$
|
|
2
|
+
import { BaseProps, TypographySettingV2, ObjectDevices as ObjectDevices$1, Background, SizeSettingGlobal, StateProp, ColorValueType as ColorValueType$1, TypographySetting as TypographySetting$1, Border, SizeSetting, CornerRadius, ShadowProps as ShadowProps$1, BasePropsWrap, BackgroundMedia, AlignProp, TransformProp, ResponsiveStateProp, Ratio, PageContext, BackgroundImageValue, ObjectLayoutValue, NameDevices as NameDevices$1, PaddingType as PaddingType$1, RawChild, PostPurchaseTypo, AlignItemProp, ProductProviderProps, AdvancedType, DotStyle as DotStyle$2, WiserWidgetType, WiserV2WidgetType, AirProductReview, AliReviewsWidgetType, BogosWidgetType, BoldSubscriptionsWidgetType, FastBundleWidgetType, FeraReviewsWidgetType, FeraReviewsV3WidgetType, GrowaveWidgetTypeV2, GrowaveWidgetTypeV1, JudgeMeReviewsWidgetType, LaiProductReviewsWidgetType, LaiProductReviewsAdvancedWidgetType, LooxReviewsWidgetType, LooxReviewsWidgetTypeV2, OmnisendWidgetType, OpinewWidgetType, OpinewDesignWidgetType, PickyStoryWidgetType, PreOrderNowWodWidgetType, ProductReviewsWidgetType, RivyoWidgetType, RyviuWidgetType, StampedWidgetType, StampedWidgetTypeV2, TagShopWidgetType, TrustooWidgetType, TrustooWidgetTypeV2, UltimateSalesBoostWidgetType, VitalsWidgetType, YotpoReviewsWidgetType, InstantJudgeMeReviewsWidgetType, InstantLooxReviewsWidgetType, ComponentSetting } from '@gem-sdk/core';
|
|
3
3
|
import * as csstype from 'csstype';
|
|
4
4
|
import { Property } from 'csstype';
|
|
5
5
|
import * as _gem_sdk_keen_slider from '@gem-sdk/keen-slider';
|
|
@@ -417,7 +417,7 @@ type ArticleDateProps = BaseProps<TextProps['setting'] & {
|
|
|
417
417
|
dateFormat?: string;
|
|
418
418
|
}, TextProps['styles']>;
|
|
419
419
|
type ArticleReadMoreSetting = TextProps['setting'] & ButtonProps['setting'] & {
|
|
420
|
-
readMoreType: 'text' | 'button';
|
|
420
|
+
readMoreType: 'text' | 'button' | 'rounded' | 'outline';
|
|
421
421
|
label: string | React.ReactNode;
|
|
422
422
|
};
|
|
423
423
|
type ArticleReadMoreStyles = TextProps['styles'] & ButtonProps['styles'] & {
|
|
@@ -762,8 +762,6 @@ declare const breadcrumbSetting: {
|
|
|
762
762
|
Breadcrumb: _gem_sdk_core.ComponentSetting<BreadcrumbProps>;
|
|
763
763
|
};
|
|
764
764
|
|
|
765
|
-
type NavigationStyle = 'none' | 'inside' | 'outside';
|
|
766
|
-
|
|
767
765
|
declare const CAROUSEL_ANIMATION: {
|
|
768
766
|
EASE_IN: {
|
|
769
767
|
value: string;
|
|
@@ -783,8 +781,17 @@ declare const CAROUSEL_ANIMATION: {
|
|
|
783
781
|
};
|
|
784
782
|
};
|
|
785
783
|
|
|
786
|
-
type
|
|
787
|
-
type
|
|
784
|
+
type NavigationStyle = 'none' | 'inside' | 'outside';
|
|
785
|
+
type PaddingType = {
|
|
786
|
+
type?: 'small' | 'medium' | 'large' | 'custom';
|
|
787
|
+
top?: string;
|
|
788
|
+
left?: string;
|
|
789
|
+
bottom?: string;
|
|
790
|
+
right?: string;
|
|
791
|
+
linked?: boolean;
|
|
792
|
+
};
|
|
793
|
+
type DotStyle$1 = 'none' | 'inside' | 'outside';
|
|
794
|
+
type CarouselSettings$1 = {
|
|
788
795
|
childItem?: string[];
|
|
789
796
|
slidesToShow?: ObjectDevices$1<number | 'auto'>;
|
|
790
797
|
slidesToScroll?: ObjectDevices$1<number>;
|
|
@@ -796,7 +803,7 @@ type CarouselSettings = {
|
|
|
796
803
|
autoplaySpeed?: number;
|
|
797
804
|
dotColor?: ObjectDevices$1<ColorValueType$1>;
|
|
798
805
|
dotActiveColor?: ObjectDevices$1<ColorValueType$1>;
|
|
799
|
-
dotStyle?: ObjectDevices$1<DotStyle>;
|
|
806
|
+
dotStyle?: ObjectDevices$1<DotStyle$1>;
|
|
800
807
|
dotSize?: ObjectDevices$1<number>;
|
|
801
808
|
dotGapToCarousel?: ObjectDevices$1<number>;
|
|
802
809
|
navigationStyle?: ObjectDevices$1<NavigationStyle>;
|
|
@@ -814,11 +821,12 @@ type CarouselSettings = {
|
|
|
814
821
|
rtl?: boolean;
|
|
815
822
|
arrowBackgroundColor?: string;
|
|
816
823
|
arrowBorder?: ObjectDevices$1<Border>;
|
|
824
|
+
arrowShadow?: ObjectDevices$1<ShadowProps$1>;
|
|
817
825
|
roundedArrow?: ObjectDevices$1<CornerRadius>;
|
|
818
826
|
arrowGapToEachSide?: string;
|
|
819
827
|
showWhenHover?: boolean;
|
|
820
828
|
defaultCurrentSlider?: number;
|
|
821
|
-
background?: ObjectDevices$1<
|
|
829
|
+
background?: ObjectDevices$1<BackgroundMedia>;
|
|
822
830
|
label?: boolean;
|
|
823
831
|
sneakPeak?: ObjectDevices$1<boolean>;
|
|
824
832
|
sneakPeakOffsetForward?: ObjectDevices$1<number>;
|
|
@@ -847,6 +855,113 @@ type CarouselRef = {
|
|
|
847
855
|
previousSlideInteraction: (params: InteractionChangeSlide) => void;
|
|
848
856
|
moveToSlideInteraction: (params: InteractionChangeSlide) => void;
|
|
849
857
|
};
|
|
858
|
+
type CarouselStyles$1 = {
|
|
859
|
+
spacing?: ObjectDevices$1<number>;
|
|
860
|
+
roundedContent?: CornerRadius;
|
|
861
|
+
borderContent?: Border;
|
|
862
|
+
hasActiveShadow?: boolean;
|
|
863
|
+
carouselShadow?: ShadowProps$1;
|
|
864
|
+
align?: ObjectDevices$1<AlignProp | Property.AlignItems>;
|
|
865
|
+
sizeSetting?: ObjectDevices$1<SizeSettingGlobal>;
|
|
866
|
+
playSpeed?: number;
|
|
867
|
+
itemPadding?: ObjectDevices$1<SizeSettingGlobal>;
|
|
868
|
+
backgroundColor?: ObjectDevices$1<ColorValueType$1>;
|
|
869
|
+
backgroundImage?: ObjectDevices$1<BackgroundImageValue>;
|
|
870
|
+
};
|
|
871
|
+
type CarouselProps$1 = BasePropsWrap<CarouselSettings$1, CarouselStyles$1> & {
|
|
872
|
+
children?: React.ReactNode;
|
|
873
|
+
moveToIdx?: number;
|
|
874
|
+
isHiddenArrowWhenDisabled?: boolean;
|
|
875
|
+
hiddenDotWhenOnlyOne?: boolean;
|
|
876
|
+
disableMarginAuto?: boolean;
|
|
877
|
+
onLoaded?: (status: boolean) => void;
|
|
878
|
+
onChangeActive?: (index: number) => void;
|
|
879
|
+
onUpdated?: (slider: KeenSliderInstance) => void;
|
|
880
|
+
onCreated?: (slider: KeenSliderInstance) => void;
|
|
881
|
+
onClickArrow?: () => void;
|
|
882
|
+
onHandleChangeSlideByInteraction?: (index: number) => void;
|
|
883
|
+
elmRef?: React.Ref<HTMLDivElement>;
|
|
884
|
+
rootClass?: string;
|
|
885
|
+
parentClass?: string;
|
|
886
|
+
rootAttrs?: Record<string, string | boolean | number>;
|
|
887
|
+
slidesClass?: string;
|
|
888
|
+
fullHeight?: boolean;
|
|
889
|
+
} & {
|
|
890
|
+
rootId?: string;
|
|
891
|
+
rootClass?: string;
|
|
892
|
+
wrapperClass?: string;
|
|
893
|
+
rootStyles?: React.CSSProperties;
|
|
894
|
+
rawChildren?: any[];
|
|
895
|
+
advanced?: any;
|
|
896
|
+
disableMarginAuto?: boolean;
|
|
897
|
+
slidesClass?: string;
|
|
898
|
+
conditionAppendJs?: string;
|
|
899
|
+
};
|
|
900
|
+
type CarouselItemProps$1 = {
|
|
901
|
+
parentStyle?: CarouselProps$1['styles'];
|
|
902
|
+
customStyle?: React.CSSProperties;
|
|
903
|
+
parentSettings?: CarouselProps$1['setting'];
|
|
904
|
+
background?: Partial<Record<NameDevices$1, Background>> | undefined;
|
|
905
|
+
index?: number;
|
|
906
|
+
contentType?: 'normalItem' | 'productImage';
|
|
907
|
+
onClickItem?: React.MouseEventHandler<any>;
|
|
908
|
+
dispatchEventSelectSlide?: (index: number) => void;
|
|
909
|
+
parentId?: string;
|
|
910
|
+
parentUid?: string;
|
|
911
|
+
} & BasePropsWrap & React.ComponentPropsWithoutRef<'div'>;
|
|
912
|
+
|
|
913
|
+
type DotStyle = 'none' | 'inside' | 'outside';
|
|
914
|
+
type CarouselSettings = {
|
|
915
|
+
childItem?: string[];
|
|
916
|
+
slidesToShow?: ObjectDevices$1<number | 'auto'>;
|
|
917
|
+
slidesToScroll?: ObjectDevices$1<number>;
|
|
918
|
+
vertical?: ObjectDevices$1<boolean>;
|
|
919
|
+
dot?: ObjectDevices$1<boolean>;
|
|
920
|
+
speed?: number;
|
|
921
|
+
arrow?: ObjectDevices$1<boolean>;
|
|
922
|
+
controlOverContent?: ObjectDevices$1<boolean>;
|
|
923
|
+
autoplaySpeed?: number;
|
|
924
|
+
dotColor?: ObjectDevices$1<ColorValueType$1>;
|
|
925
|
+
dotActiveColor?: ObjectDevices$1<ColorValueType$1>;
|
|
926
|
+
dotStyle?: ObjectDevices$1<DotStyle>;
|
|
927
|
+
dotSize?: ObjectDevices$1<number>;
|
|
928
|
+
dotGapToCarousel?: ObjectDevices$1<number>;
|
|
929
|
+
navigationStyle?: ObjectDevices$1<NavigationStyle>;
|
|
930
|
+
navigationEnable?: ObjectDevices$1<boolean>;
|
|
931
|
+
arrowCustomColor?: ColorValueType$1;
|
|
932
|
+
arrowCustom?: string;
|
|
933
|
+
arrowIconSize?: ObjectDevices$1<number>;
|
|
934
|
+
arrowButtonSize?: ObjectDevices$1<{
|
|
935
|
+
shapeLinked?: boolean;
|
|
936
|
+
shapeValue?: string;
|
|
937
|
+
width?: string;
|
|
938
|
+
height?: string;
|
|
939
|
+
padding?: PaddingType$1;
|
|
940
|
+
}>;
|
|
941
|
+
rtl?: boolean;
|
|
942
|
+
arrowBackgroundColor?: string;
|
|
943
|
+
arrowBorder?: ObjectDevices$1<Border>;
|
|
944
|
+
roundedArrow?: ObjectDevices$1<CornerRadius>;
|
|
945
|
+
arrowGapToEachSide?: string;
|
|
946
|
+
showWhenHover?: boolean;
|
|
947
|
+
defaultCurrentSlider?: number;
|
|
948
|
+
background?: ObjectDevices$1<Background>;
|
|
949
|
+
label?: boolean;
|
|
950
|
+
sneakPeak?: ObjectDevices$1<boolean>;
|
|
951
|
+
sneakPeakOffsetForward?: ObjectDevices$1<number>;
|
|
952
|
+
sneakPeakOffsetCenter?: ObjectDevices$1<number>;
|
|
953
|
+
sneakPeakType?: ObjectDevices$1<'center' | 'forward'>;
|
|
954
|
+
itemNumber?: ObjectDevices$1<number | 'auto'>;
|
|
955
|
+
runPreview?: boolean;
|
|
956
|
+
autoplayTimeout?: number;
|
|
957
|
+
pauseOnHover?: boolean;
|
|
958
|
+
autoplay?: boolean;
|
|
959
|
+
enableDrag?: ObjectDevices$1<boolean>;
|
|
960
|
+
loop?: ObjectDevices$1<boolean>;
|
|
961
|
+
animationMode?: keyof typeof CAROUSEL_ANIMATION;
|
|
962
|
+
layout?: 'vertical' | 'hozirontal';
|
|
963
|
+
enableAction?: ObjectDevices$1<boolean>;
|
|
964
|
+
};
|
|
850
965
|
type CarouselStyles = {
|
|
851
966
|
spacing?: ObjectDevices$1<number>;
|
|
852
967
|
roundedContent?: CornerRadius;
|
|
@@ -888,7 +1003,7 @@ type CarouselItemProps = {
|
|
|
888
1003
|
dispatchEventSelectSlide?: (index: number) => void;
|
|
889
1004
|
} & BasePropsWrap & React.ComponentPropsWithoutRef<'div'>;
|
|
890
1005
|
|
|
891
|
-
declare const Carousel$1: React.ForwardRefExoticComponent<_gem_sdk_core.BaseProps<CarouselSettings, CarouselStyles, Record<string, any>> & {
|
|
1006
|
+
declare const Carousel$1: React.ForwardRefExoticComponent<_gem_sdk_core.BaseProps<CarouselSettings$1, CarouselStyles$1, Record<string, any>> & {
|
|
892
1007
|
builderAttrs?: Record<string, any> | undefined;
|
|
893
1008
|
style?: React.CSSProperties | undefined;
|
|
894
1009
|
} & {
|
|
@@ -909,12 +1024,22 @@ declare const Carousel$1: React.ForwardRefExoticComponent<_gem_sdk_core.BaseProp
|
|
|
909
1024
|
rootAttrs?: Record<string, string | number | boolean> | undefined;
|
|
910
1025
|
slidesClass?: string | undefined;
|
|
911
1026
|
fullHeight?: boolean | undefined;
|
|
1027
|
+
} & {
|
|
1028
|
+
rootId?: string | undefined;
|
|
1029
|
+
rootClass?: string | undefined;
|
|
1030
|
+
wrapperClass?: string | undefined;
|
|
1031
|
+
rootStyles?: React.CSSProperties | undefined;
|
|
1032
|
+
rawChildren?: any[] | undefined;
|
|
1033
|
+
advanced?: any;
|
|
1034
|
+
disableMarginAuto?: boolean | undefined;
|
|
1035
|
+
slidesClass?: string | undefined;
|
|
1036
|
+
conditionAppendJs?: string | undefined;
|
|
912
1037
|
} & React.RefAttributes<CarouselRef>>;
|
|
913
1038
|
|
|
914
|
-
declare const CarouselItem$1: React.FC<CarouselItemProps>;
|
|
1039
|
+
declare const CarouselItem$1: React.FC<CarouselItemProps$1>;
|
|
915
1040
|
|
|
916
1041
|
declare const carouselSetting: {
|
|
917
|
-
Carousel: _gem_sdk_core.ComponentSetting<CarouselProps>;
|
|
1042
|
+
Carousel: _gem_sdk_core.ComponentSetting<CarouselProps$1>;
|
|
918
1043
|
CarouselItem: _gem_sdk_core.ComponentSetting<CarouselItemProps>;
|
|
919
1044
|
};
|
|
920
1045
|
|
|
@@ -1835,7 +1960,7 @@ type ImageComparisonSetting = {
|
|
|
1835
1960
|
};
|
|
1836
1961
|
type QualityType$1 = 'finest' | 'high' | 'medium' | 'custom';
|
|
1837
1962
|
type ImageComparisonStyle = {
|
|
1838
|
-
labelPadding?: ObjectDevices$1<PaddingType>;
|
|
1963
|
+
labelPadding?: ObjectDevices$1<PaddingType$1>;
|
|
1839
1964
|
labelTextColor?: ColorValueType$1;
|
|
1840
1965
|
labelBackgroundColor?: ColorValueType$1;
|
|
1841
1966
|
labelBorder?: Border;
|
|
@@ -3673,7 +3798,7 @@ type ProductBadgeProps = BasePropsWrap<{
|
|
|
3673
3798
|
dotData: {
|
|
3674
3799
|
dotSize?: Partial<Record<NameDevices$1, number>>;
|
|
3675
3800
|
dotGapToCarousel?: Partial<Record<NameDevices$1, number | string>>;
|
|
3676
|
-
dotStyle: Partial<Record<NameDevices$1, DotStyle$
|
|
3801
|
+
dotStyle: Partial<Record<NameDevices$1, DotStyle$2>> | undefined;
|
|
3677
3802
|
};
|
|
3678
3803
|
} & {
|
|
3679
3804
|
'bundle-item'?: bundleItem;
|
|
@@ -5742,7 +5867,7 @@ declare const _default$2: {
|
|
|
5742
5867
|
CouponList: React.ComponentType<{}>;
|
|
5743
5868
|
ShopPayButton: React.ComponentType<ShopPayButtonProps>;
|
|
5744
5869
|
CheckoutNow: React.ComponentType<CheckoutNowProps>;
|
|
5745
|
-
Carousel: React.ComponentType<_gem_sdk_core.BaseProps<CarouselSettings, CarouselStyles, Record<string, any>> & {
|
|
5870
|
+
Carousel: React.ComponentType<_gem_sdk_core.BaseProps<CarouselSettings$1, CarouselStyles$1, Record<string, any>> & {
|
|
5746
5871
|
builderAttrs?: Record<string, any> | undefined;
|
|
5747
5872
|
style?: React.CSSProperties | undefined;
|
|
5748
5873
|
} & {
|
|
@@ -5763,8 +5888,18 @@ declare const _default$2: {
|
|
|
5763
5888
|
rootAttrs?: Record<string, string | number | boolean> | undefined;
|
|
5764
5889
|
slidesClass?: string | undefined;
|
|
5765
5890
|
fullHeight?: boolean | undefined;
|
|
5891
|
+
} & {
|
|
5892
|
+
rootId?: string | undefined;
|
|
5893
|
+
rootClass?: string | undefined;
|
|
5894
|
+
wrapperClass?: string | undefined;
|
|
5895
|
+
rootStyles?: React.CSSProperties | undefined;
|
|
5896
|
+
rawChildren?: any[] | undefined;
|
|
5897
|
+
advanced?: any;
|
|
5898
|
+
disableMarginAuto?: boolean | undefined;
|
|
5899
|
+
slidesClass?: string | undefined;
|
|
5900
|
+
conditionAppendJs?: string | undefined;
|
|
5766
5901
|
} & React.RefAttributes<CarouselRef>>;
|
|
5767
|
-
CarouselItem: React.ComponentType<CarouselItemProps>;
|
|
5902
|
+
CarouselItem: React.ComponentType<CarouselItemProps$1>;
|
|
5768
5903
|
Button: React.ComponentType<ButtonProps>;
|
|
5769
5904
|
Breadcrumb: React.ComponentType<BreadcrumbProps>;
|
|
5770
5905
|
HeroBanner: React.ComponentType<HeroBannerProps>;
|
|
@@ -5823,57 +5958,9 @@ declare const Breadcrumb: ({ setting, builderAttrs, style, styles, className, bu
|
|
|
5823
5958
|
|
|
5824
5959
|
declare const Button: (props: ButtonLiquidProps) => string;
|
|
5825
5960
|
|
|
5826
|
-
declare const CarouselItem: (
|
|
5827
|
-
parentStyle?: CarouselStyles | undefined;
|
|
5828
|
-
customStyle?: React.CSSProperties | undefined;
|
|
5829
|
-
parentSettings?: CarouselSettings | undefined;
|
|
5830
|
-
background?: Partial<Record<NameDevices$1, Background>> | undefined;
|
|
5831
|
-
index?: number | undefined;
|
|
5832
|
-
contentType?: "normalItem" | "productImage" | undefined;
|
|
5833
|
-
onClickItem?: React.MouseEventHandler<any> | undefined;
|
|
5834
|
-
dispatchEventSelectSlide?: ((index: number) => void) | undefined;
|
|
5835
|
-
} & _gem_sdk_core.BaseProps<unknown, unknown, Record<string, any>> & {
|
|
5836
|
-
builderAttrs?: Record<string, any> | undefined;
|
|
5837
|
-
style?: React.CSSProperties | undefined;
|
|
5838
|
-
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
5839
|
-
parentId?: string | undefined;
|
|
5840
|
-
parentUid?: string | undefined;
|
|
5841
|
-
background?: Partial<Record<NameDevices$1, Background>> | undefined;
|
|
5842
|
-
}) => string;
|
|
5961
|
+
declare const CarouselItem: (props: CarouselItemProps$1) => string;
|
|
5843
5962
|
|
|
5844
|
-
declare const Carousel: (
|
|
5845
|
-
builderAttrs?: Record<string, any> | undefined;
|
|
5846
|
-
style?: React.CSSProperties | undefined;
|
|
5847
|
-
} & {
|
|
5848
|
-
children?: React.ReactNode;
|
|
5849
|
-
moveToIdx?: number | undefined;
|
|
5850
|
-
isHiddenArrowWhenDisabled?: boolean | undefined;
|
|
5851
|
-
hiddenDotWhenOnlyOne?: boolean | undefined;
|
|
5852
|
-
disableMarginAuto?: boolean | undefined;
|
|
5853
|
-
onLoaded?: ((status: boolean) => void) | undefined;
|
|
5854
|
-
onChangeActive?: ((index: number) => void) | undefined;
|
|
5855
|
-
onUpdated?: ((slider: _gem_sdk_keen_slider.KeenSliderInstance) => void) | undefined;
|
|
5856
|
-
onCreated?: ((slider: _gem_sdk_keen_slider.KeenSliderInstance) => void) | undefined;
|
|
5857
|
-
onClickArrow?: (() => void) | undefined;
|
|
5858
|
-
onHandleChangeSlideByInteraction?: ((index: number) => void) | undefined;
|
|
5859
|
-
elmRef?: React.Ref<HTMLDivElement> | undefined;
|
|
5860
|
-
rootClass?: string | undefined;
|
|
5861
|
-
parentClass?: string | undefined;
|
|
5862
|
-
rootAttrs?: Record<string, string | number | boolean> | undefined;
|
|
5863
|
-
slidesClass?: string | undefined;
|
|
5864
|
-
fullHeight?: boolean | undefined;
|
|
5865
|
-
} & {
|
|
5866
|
-
rootId?: string | undefined;
|
|
5867
|
-
rootAttr?: string | undefined;
|
|
5868
|
-
rootClass?: string | undefined;
|
|
5869
|
-
wrapperClass?: string | undefined;
|
|
5870
|
-
rootStyles?: React.CSSProperties | undefined;
|
|
5871
|
-
rawChildren?: any[] | undefined;
|
|
5872
|
-
advanced?: any;
|
|
5873
|
-
disableMarginAuto?: boolean | undefined;
|
|
5874
|
-
slidesClass?: string | undefined;
|
|
5875
|
-
conditionAppendJs?: string | undefined;
|
|
5876
|
-
}) => string;
|
|
5963
|
+
declare const Carousel: (props: CarouselProps$1) => string;
|
|
5877
5964
|
|
|
5878
5965
|
/**
|
|
5879
5966
|
* The `ShopPayButton` component renders a button that redirects to the Shop Pay checkout.
|
|
@@ -7056,7 +7143,7 @@ declare const _default$1: {
|
|
|
7056
7143
|
HeroBanner: React.FC<HeroBannerProps>;
|
|
7057
7144
|
Breadcrumb: React.FC<BreadcrumbProps>;
|
|
7058
7145
|
Button: React.FC<ButtonProps>;
|
|
7059
|
-
Carousel: React.ForwardRefExoticComponent<_gem_sdk_core.BaseProps<CarouselSettings, CarouselStyles, Record<string, any>> & {
|
|
7146
|
+
Carousel: React.ForwardRefExoticComponent<_gem_sdk_core.BaseProps<CarouselSettings$1, CarouselStyles$1, Record<string, any>> & {
|
|
7060
7147
|
builderAttrs?: Record<string, any> | undefined;
|
|
7061
7148
|
style?: React.CSSProperties | undefined;
|
|
7062
7149
|
} & {
|
|
@@ -7077,8 +7164,18 @@ declare const _default$1: {
|
|
|
7077
7164
|
rootAttrs?: Record<string, string | number | boolean> | undefined;
|
|
7078
7165
|
slidesClass?: string | undefined;
|
|
7079
7166
|
fullHeight?: boolean | undefined;
|
|
7167
|
+
} & {
|
|
7168
|
+
rootId?: string | undefined;
|
|
7169
|
+
rootClass?: string | undefined;
|
|
7170
|
+
wrapperClass?: string | undefined;
|
|
7171
|
+
rootStyles?: React.CSSProperties | undefined;
|
|
7172
|
+
rawChildren?: any[] | undefined;
|
|
7173
|
+
advanced?: any;
|
|
7174
|
+
disableMarginAuto?: boolean | undefined;
|
|
7175
|
+
slidesClass?: string | undefined;
|
|
7176
|
+
conditionAppendJs?: string | undefined;
|
|
7080
7177
|
} & React.RefAttributes<CarouselRef>>;
|
|
7081
|
-
CarouselItem: React.FC<CarouselItemProps>;
|
|
7178
|
+
CarouselItem: React.FC<CarouselItemProps$1>;
|
|
7082
7179
|
Cart: React.FC<CartProps>;
|
|
7083
7180
|
CartList: React.FC<CartListProps>;
|
|
7084
7181
|
CartLinePrice: React.FC<CartLinePriceProps>;
|
|
@@ -7612,7 +7709,7 @@ declare const _default: {
|
|
|
7612
7709
|
CartLineAttribute: _gem_sdk_core.ComponentSetting<CartLineAttributeProps>;
|
|
7613
7710
|
CouponList: _gem_sdk_core.ComponentSetting<CouponListProps>;
|
|
7614
7711
|
ShopPayButton: _gem_sdk_core.ComponentSetting<ShopPayButtonProps>;
|
|
7615
|
-
Carousel: _gem_sdk_core.ComponentSetting<CarouselProps>;
|
|
7712
|
+
Carousel: _gem_sdk_core.ComponentSetting<CarouselProps$1>;
|
|
7616
7713
|
CarouselItem: _gem_sdk_core.ComponentSetting<CarouselItemProps>;
|
|
7617
7714
|
Button: _gem_sdk_core.ComponentSetting<ButtonProps>;
|
|
7618
7715
|
Breadcrumb: _gem_sdk_core.ComponentSetting<BreadcrumbProps>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.371",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"relationship": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/get-control-relationship.js && node ./scripts/get-element-relationship.js"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@gem-sdk/core": "2.0.0-dev.
|
|
25
|
+
"@gem-sdk/core": "2.0.0-dev.371",
|
|
26
26
|
"@gem-sdk/styles": "2.0.0-dev.324",
|
|
27
|
-
"@gem-sdk/system": "2.0.0-dev.
|
|
27
|
+
"@gem-sdk/system": "2.0.0-dev.371",
|
|
28
28
|
"@types/react-transition-group": "^4.4.5"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
-
|
|
6
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
var core = require('@gem-sdk/core');
|
|
8
|
-
var arrow = require('./common/arrow.js');
|
|
9
|
-
|
|
10
|
-
const Arrow = ({ showArrow, left, vertical, disabled, controlOverContent, custom, onClick, className, isHiddenWhenDisabled, arrowCustomColor, arrowButtonSize, arrowIconSize, arrowBackgroundColor, gapToEachSize, showWhenHover, arrowBorder, arrowCorner, uid, rootId, ...passProps })=>{
|
|
11
|
-
const currentDevice = core.useCurrentDevice();
|
|
12
|
-
const iconSize = arrow.getResponsiveSetting(arrowIconSize || {});
|
|
13
|
-
const buttonSize = arrow.getResponsiveSetting(arrowButtonSize || {});
|
|
14
|
-
const arrowType = arrow.getResponsiveSetting(showArrow || {});
|
|
15
|
-
const arrowBorderStyle = arrow.getResponsiveSetting(arrowBorder || {});
|
|
16
|
-
const arrowCornerStyle = arrow.getResponsiveSetting(arrowCorner || {});
|
|
17
|
-
const padding = {
|
|
18
|
-
'--pt': buttonSize[currentDevice]?.padding?.top || '0px',
|
|
19
|
-
'--pb': buttonSize[currentDevice]?.padding?.bottom || '0px',
|
|
20
|
-
'--pl': buttonSize[currentDevice]?.padding?.left || '0px',
|
|
21
|
-
'--pr': buttonSize[currentDevice]?.padding?.right || '0px'
|
|
22
|
-
};
|
|
23
|
-
const innerBorderCss = `
|
|
24
|
-
${rootId ? '.' + rootId : ''}.gp-carousel-arrow-${uid} {
|
|
25
|
-
${core.composeCornerCss(arrowCornerStyle[currentDevice])}
|
|
26
|
-
}
|
|
27
|
-
${rootId ? '.' + rootId : ''}.gp-carousel-arrow-${uid}::before {
|
|
28
|
-
content: "";
|
|
29
|
-
height: 100%;
|
|
30
|
-
width: 100%;
|
|
31
|
-
position: absolute;
|
|
32
|
-
pointer-events: none;
|
|
33
|
-
z-index:10;
|
|
34
|
-
${core.composeBorderCss(arrowBorderStyle[currentDevice])}
|
|
35
|
-
${core.composeCornerCss(arrowCornerStyle[currentDevice])}
|
|
36
|
-
}
|
|
37
|
-
${rootId ? '.' + rootId : ''}.gp-carousel-arrow-${uid}:hover::before {
|
|
38
|
-
${core.composeBorderCss(arrowBorderStyle[currentDevice])}
|
|
39
|
-
${core.composeCornerCss(arrowCornerStyle[currentDevice])}
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
`;
|
|
43
|
-
return /*#__PURE__*/ jsxRuntime.jsxs("button", {
|
|
44
|
-
className: core.cls(`${rootId ? rootId : ''} gp-carousel-arrow-${uid} gp-relative gp-flex gp-shrink-0 gp-items-center gp-justify-center gp-overflow-hidden ${className}`, {
|
|
45
|
-
'!gp-absolute gp-z-2': arrowType[currentDevice] === 'inside',
|
|
46
|
-
'gp-hidden': isHiddenWhenDisabled && disabled && arrowType[currentDevice] !== 'outside',
|
|
47
|
-
'gp-invisible': isHiddenWhenDisabled && disabled && arrowType[currentDevice] === 'outside',
|
|
48
|
-
'gp-cursor-default gp-text-gray-300': disabled,
|
|
49
|
-
'gp-cursor-pointer gp-text-gray-500': !disabled,
|
|
50
|
-
'gp-invisible group-hover/carousel:gp-visible': showWhenHover
|
|
51
|
-
}),
|
|
52
|
-
style: {
|
|
53
|
-
...core.makeStyle({
|
|
54
|
-
h: buttonSize[currentDevice]?.height || '32px',
|
|
55
|
-
w: buttonSize[currentDevice]?.width || '32px',
|
|
56
|
-
...arrow.getClassArrowPosition({
|
|
57
|
-
vertical,
|
|
58
|
-
arrowType,
|
|
59
|
-
gapToEachSize: gapToEachSize || '',
|
|
60
|
-
left: !!left
|
|
61
|
-
})
|
|
62
|
-
}),
|
|
63
|
-
backgroundColor: arrowBackgroundColor,
|
|
64
|
-
...padding
|
|
65
|
-
},
|
|
66
|
-
onClick: onClick,
|
|
67
|
-
...passProps,
|
|
68
|
-
children: [
|
|
69
|
-
/*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
70
|
-
type: "text/css",
|
|
71
|
-
dangerouslySetInnerHTML: {
|
|
72
|
-
__html: innerBorderCss
|
|
73
|
-
}
|
|
74
|
-
}),
|
|
75
|
-
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
76
|
-
className: "gp-z-1 gp-flex gp-h-full gp-items-center",
|
|
77
|
-
children: custom ? /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
78
|
-
className: core.cls('gp-flex gp-items-center gp-justify-center [&>svg]:gp-h-full [&>svg]:gp-w-full', arrow.getArrowRotate(!!left, vertical?.[currentDevice])),
|
|
79
|
-
style: {
|
|
80
|
-
...core.makeStyle({
|
|
81
|
-
c: arrowCustomColor,
|
|
82
|
-
h: iconSize[currentDevice] + 'px',
|
|
83
|
-
w: iconSize[currentDevice] + 'px'
|
|
84
|
-
})
|
|
85
|
-
},
|
|
86
|
-
dangerouslySetInnerHTML: {
|
|
87
|
-
__html: custom ?? ''
|
|
88
|
-
}
|
|
89
|
-
}) : /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
90
|
-
className: core.cls('gp-flex gp-items-center gp-justify-center [&>svg]:gp-h-full [&>svg]:gp-w-full', arrow.getArrowRotate(!!left, vertical?.[currentDevice])),
|
|
91
|
-
children: [
|
|
92
|
-
"`",
|
|
93
|
-
/*#__PURE__*/ jsxRuntime.jsx("svg", {
|
|
94
|
-
height: "100%",
|
|
95
|
-
width: "100%",
|
|
96
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
97
|
-
viewBox: "0 0 24 24",
|
|
98
|
-
fill: "currentColor",
|
|
99
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
100
|
-
d: "M5 3l3.057-3 11.943 12-11.943 12-3.057-3 9-9z"
|
|
101
|
-
})
|
|
102
|
-
})
|
|
103
|
-
]
|
|
104
|
-
})
|
|
105
|
-
})
|
|
106
|
-
]
|
|
107
|
-
});
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
exports.default = Arrow;
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var core = require('@gem-sdk/core');
|
|
6
|
-
var arrow = require('./common/arrow.js');
|
|
7
|
-
|
|
8
|
-
const Arrow = ({ showArrow, left, vertical, disabled, controlOverContent, custom, onClick, className, isHiddenWhenDisabled, arrowCustomColor, arrowButtonSize, arrowIconSize, arrowBackgroundColor, gapToEachSize, showWhenHover, arrowBorder, arrowCorner, componentId, uid, rootId, ...passProps })=>{
|
|
9
|
-
const arrowType = arrow.getResponsiveSetting(showArrow || {});
|
|
10
|
-
const arrowBorderStyle = arrow.getResponsiveSetting(arrowBorder || {});
|
|
11
|
-
const arrowCornerStyle = arrow.getResponsiveSetting(arrowCorner || {});
|
|
12
|
-
const iconSizeResponsive = arrow.getResponsiveSetting(arrowIconSize || {});
|
|
13
|
-
const buttonWidth = core.makeGlobalSizeWidthResponsive(arrowButtonSize);
|
|
14
|
-
const buttonHeight = core.makeGlobalSizeHeightResponsive(arrowButtonSize);
|
|
15
|
-
const iconWidth = core.makeStyleResponsive('w', iconSizeResponsive, 'px');
|
|
16
|
-
const iconHeight = core.makeStyleResponsive('h', iconSizeResponsive, 'px');
|
|
17
|
-
const buttonPadding = core.getPaddingGlobalSize(arrowButtonSize);
|
|
18
|
-
const buttonContent = core.template`<div
|
|
19
|
-
class="${core.cls('gp-flex gp-items-center gp-justify-center [&>svg]:gp-h-full [&>svg]:gp-w-full', {
|
|
20
|
-
...arrow.getClassArrowRotate(Boolean(left), vertical)
|
|
21
|
-
})}"
|
|
22
|
-
style="${{
|
|
23
|
-
...core.makeStyle({
|
|
24
|
-
c: arrowCustomColor
|
|
25
|
-
}),
|
|
26
|
-
...iconWidth,
|
|
27
|
-
...iconHeight
|
|
28
|
-
}}"
|
|
29
|
-
>
|
|
30
|
-
${!!custom && custom !== '' ? custom ?? '' : `<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
31
|
-
<path d="M5 3l3.057-3 11.943 12-11.943 12-3.057-3 9-9z" />
|
|
32
|
-
</svg>`}
|
|
33
|
-
</div>`;
|
|
34
|
-
const classAction = left ? 'gp-carousel-action-back gem-slider-previous' : 'gp-carousel-action-next gem-slider-next';
|
|
35
|
-
const innerBorderCss = `
|
|
36
|
-
${rootId ? '.' + rootId : ''}.gp-carousel-arrow-${uid} {
|
|
37
|
-
${core.composeCornerCss(arrowCornerStyle.desktop)}
|
|
38
|
-
}
|
|
39
|
-
${rootId ? '.' + rootId : ''}.gp-carousel-arrow-${uid}::before {
|
|
40
|
-
content: '';
|
|
41
|
-
height: 100%;
|
|
42
|
-
width: 100%;
|
|
43
|
-
position: absolute;
|
|
44
|
-
pointer-events: none;
|
|
45
|
-
z-index: 10;
|
|
46
|
-
${core.composeBorderCss(arrowBorderStyle.desktop)}
|
|
47
|
-
${core.composeCornerCss(arrowCornerStyle.desktop)}
|
|
48
|
-
}
|
|
49
|
-
@media only screen and (max-width: 1024px) and (min-width: 768px) {
|
|
50
|
-
${rootId ? '.' + rootId : ''}.gp-carousel-arrow-${uid} {
|
|
51
|
-
${core.composeCornerCss(arrowCornerStyle.tablet)}
|
|
52
|
-
}
|
|
53
|
-
${rootId ? '.' + rootId : ''}.gp-carousel-arrow-${uid}::before {
|
|
54
|
-
${core.composeBorderCss(arrowBorderStyle.tablet)}
|
|
55
|
-
${core.composeCornerCss(arrowCornerStyle.tablet)}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
@media only screen and (max-width: 768px) {
|
|
59
|
-
${rootId ? '.' + rootId : ''}.gp-carousel-arrow-${uid} {
|
|
60
|
-
${core.composeCornerCss(arrowCornerStyle.mobile)}
|
|
61
|
-
}
|
|
62
|
-
${rootId ? '.' + rootId : ''}.gp-carousel-arrow-${uid}::before {
|
|
63
|
-
${core.composeBorderCss(arrowBorderStyle.mobile)}
|
|
64
|
-
${core.composeCornerCss(arrowCornerStyle.mobile)}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
`;
|
|
68
|
-
return core.template`
|
|
69
|
-
<button
|
|
70
|
-
type="button"
|
|
71
|
-
aria-label='Carousel ${left ? 'Back' : 'Next'} Arrow'
|
|
72
|
-
class="${core.cls('gp-z-1', rootId ? rootId : '', classAction, className, componentId, 'gp-carousel-arrow-' + uid + ' gp-items-center gp-justify-center gp-overflow-hidden gp-shrink-0 ', {
|
|
73
|
-
hidden: isHiddenWhenDisabled && disabled,
|
|
74
|
-
'gp-cursor-default gp-text-gray-300': disabled,
|
|
75
|
-
'gp-cursor-pointer gp-text-gray-500': !disabled,
|
|
76
|
-
'!gp-invisible group-hover/carousel:!gp-visible': showWhenHover,
|
|
77
|
-
...arrow.getClassArrowDisplay(arrowType, vertical)
|
|
78
|
-
})}"
|
|
79
|
-
style="${{
|
|
80
|
-
...core.makeStyle(arrow.getClassArrowPosition({
|
|
81
|
-
vertical,
|
|
82
|
-
arrowType,
|
|
83
|
-
gapToEachSize: gapToEachSize || '',
|
|
84
|
-
left: Boolean(left)
|
|
85
|
-
})),
|
|
86
|
-
...core.makeStyleResponsive('d', arrow.getArrowDisplayStyle(arrowType)),
|
|
87
|
-
'background-color': arrowBackgroundColor,
|
|
88
|
-
...buttonWidth,
|
|
89
|
-
...buttonHeight,
|
|
90
|
-
...buttonPadding
|
|
91
|
-
}}"
|
|
92
|
-
onClick={onClick}
|
|
93
|
-
${{
|
|
94
|
-
...passProps
|
|
95
|
-
}}
|
|
96
|
-
>
|
|
97
|
-
${buttonContent}
|
|
98
|
-
<style>${innerBorderCss}</style>
|
|
99
|
-
</button>
|
|
100
|
-
`;
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
exports.default = Arrow;
|