@trafilea/afrodita-components 6.16.3 → 6.16.5
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/build/index.d.ts +41 -19
- package/build/index.esm.js +59 -22
- package/build/index.esm.js.map +1 -1
- package/build/index.js +59 -22
- package/build/index.js.map +1 -1
- package/build/theme/revel.theme.js +1 -1
- package/build/theme/shapermint.theme.js +1 -1
- package/build/theme/thebodcon.theme.js +1 -1
- package/build/theme/thespadr.theme.js +1 -1
- package/build/theme/truekind.theme.js +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -3534,6 +3534,8 @@ var ChevronLeftVariant = function (props) { return (jsxRuntime.jsx(Icon$1, __ass
|
|
|
3534
3534
|
|
|
3535
3535
|
var ChevronRight = function (props) { return (jsxRuntime.jsx(Icon$1, __assign$1({}, props, { name: "arrows/chevron_right" }), void 0)); };
|
|
3536
3536
|
|
|
3537
|
+
var ChevronRightGrey = function (props) { return (jsxRuntime.jsx(Icon$1, __assign$1({}, props, { name: "arrows/chevron_right_grey" }), void 0)); };
|
|
3538
|
+
|
|
3537
3539
|
var ChevronRightLite = function (props) { return (jsxRuntime.jsx(Icon$1, __assign$1({}, props, { name: "arrows/chevron_right_lite" }), void 0)); };
|
|
3538
3540
|
|
|
3539
3541
|
var ChevronRightVariant = function (props) { return (jsxRuntime.jsx(Icon$1, __assign$1({}, props, { name: "arrows/chevron_right_variant" }), void 0)); };
|
|
@@ -3572,6 +3574,7 @@ var Arrows = /*#__PURE__*/Object.freeze({
|
|
|
3572
3574
|
ChevronLeftLite: ChevronLeftLite,
|
|
3573
3575
|
ChevronLeftVariant: ChevronLeftVariant,
|
|
3574
3576
|
ChevronRight: ChevronRight,
|
|
3577
|
+
ChevronRightGrey: ChevronRightGrey,
|
|
3575
3578
|
ChevronRightLite: ChevronRightLite,
|
|
3576
3579
|
ChevronRightVariant: ChevronRightVariant,
|
|
3577
3580
|
ChevronUp: ChevronUp,
|
|
@@ -3864,6 +3867,8 @@ var ShoppingBagV2 = function (props) { return (jsxRuntime.jsx(Icon$1, __assign$1
|
|
|
3864
3867
|
|
|
3865
3868
|
var ShoppingBagV3 = function (props) { return (jsxRuntime.jsx(Icon$1, __assign$1({}, props, { name: "navigation/shopping_bag_v3" }), void 0)); };
|
|
3866
3869
|
|
|
3870
|
+
var ShoppingBagV4 = function (props) { return (jsxRuntime.jsx(Icon$1, __assign$1({}, props, { name: "navigation/shopping_bag_v4" }), void 0)); };
|
|
3871
|
+
|
|
3867
3872
|
var ShoppingCart = function (props) { return (jsxRuntime.jsx(Icon$1, __assign$1({}, props, { name: "navigation/shopping_cart" }), void 0)); };
|
|
3868
3873
|
|
|
3869
3874
|
var ShoppingCartV2 = function (props) { return (jsxRuntime.jsx(Icon$1, __assign$1({}, props, { name: "navigation/shopping_cart_v2" }), void 0)); };
|
|
@@ -3901,6 +3906,7 @@ var Navigation = /*#__PURE__*/Object.freeze({
|
|
|
3901
3906
|
ShoppingBag: ShoppingBag,
|
|
3902
3907
|
ShoppingBagV2: ShoppingBagV2,
|
|
3903
3908
|
ShoppingBagV3: ShoppingBagV3,
|
|
3909
|
+
ShoppingBagV4: ShoppingBagV4,
|
|
3904
3910
|
ShoppingCart: ShoppingCart,
|
|
3905
3911
|
ShoppingCartV2: ShoppingCartV2,
|
|
3906
3912
|
SlideDot: SlideDot$1,
|
|
@@ -3918,6 +3924,8 @@ var CallUs = function (props) { return jsxRuntime.jsx(Icon$1, __assign$1({}, pro
|
|
|
3918
3924
|
|
|
3919
3925
|
var Chat = function (props) { return jsxRuntime.jsx(Icon$1, __assign$1({}, props, { name: "other/chat" }), void 0); };
|
|
3920
3926
|
|
|
3927
|
+
var Coupons = function (props) { return jsxRuntime.jsx(Icon$1, __assign$1({}, props, { name: "other/coupons" }), void 0); };
|
|
3928
|
+
|
|
3921
3929
|
var Email = function (props) { return jsxRuntime.jsx(Icon$1, __assign$1({}, props, { name: "other/email" }), void 0); };
|
|
3922
3930
|
|
|
3923
3931
|
var ExpressShipping = function (props) { return (jsxRuntime.jsx(Icon$1, __assign$1({}, props, { name: "other/express_shipping" }), void 0)); };
|
|
@@ -3932,6 +3940,8 @@ var GetDiscount = function (props) { return jsxRuntime.jsx(Icon$1, __assign$1({}
|
|
|
3932
3940
|
|
|
3933
3941
|
var HasselFreeReturns = function (props) { return (jsxRuntime.jsx(Icon$1, __assign$1({}, props, { name: "other/hassel_free_returns" }), void 0)); };
|
|
3934
3942
|
|
|
3943
|
+
var HelpCenter = function (props) { return jsxRuntime.jsx(Icon$1, __assign$1({}, props, { name: "other/help_center" }), void 0); };
|
|
3944
|
+
|
|
3935
3945
|
var Loading = function (props) { return (jsxRuntime.jsx(Icon$1, __assign$1({ testId: "Loading" }, props, { name: "other/loading" }), void 0)); };
|
|
3936
3946
|
|
|
3937
3947
|
var McAfee = function (props) { return jsxRuntime.jsx(Icon$1, __assign$1({}, props, { name: "other/mc_afee" }), void 0); };
|
|
@@ -3974,6 +3984,7 @@ var Other = /*#__PURE__*/Object.freeze({
|
|
|
3974
3984
|
BodConMobileLabel: BodConMobileLabel,
|
|
3975
3985
|
CallUs: CallUs,
|
|
3976
3986
|
Chat: Chat,
|
|
3987
|
+
Coupons: Coupons,
|
|
3977
3988
|
Email: Email,
|
|
3978
3989
|
ExpressShipping: ExpressShipping,
|
|
3979
3990
|
FitGuarantee: FitGuarantee$1,
|
|
@@ -3981,6 +3992,7 @@ var Other = /*#__PURE__*/Object.freeze({
|
|
|
3981
3992
|
FreeExchange: FreeExchange,
|
|
3982
3993
|
GetDiscount: GetDiscount,
|
|
3983
3994
|
HasselFreeReturns: HasselFreeReturns,
|
|
3995
|
+
HelpCenter: HelpCenter,
|
|
3984
3996
|
Loading: Loading,
|
|
3985
3997
|
McAfee: McAfee,
|
|
3986
3998
|
Play: Play,
|
|
@@ -4089,29 +4101,32 @@ var PDP = /*#__PURE__*/Object.freeze({
|
|
|
4089
4101
|
TrustBadge: TrustBadge
|
|
4090
4102
|
});
|
|
4091
4103
|
|
|
4092
|
-
var
|
|
4093
|
-
|
|
4094
|
-
var MasterCard = function (props) { return jsxRuntime.jsx(Icon$1, __assign$1({}, props, { name: "payment/master_card" }), void 0); };
|
|
4104
|
+
var Amazon = function (props) { return (jsxRuntime.jsx(Icon$1, __assign$1({ testId: "AmazonIcon" }, props, { name: "payment/amazon" }), void 0)); };
|
|
4095
4105
|
|
|
4096
4106
|
var Amex = function (props) { return jsxRuntime.jsx(Icon$1, __assign$1({}, props, { name: "payment/amex" }), void 0); };
|
|
4097
4107
|
|
|
4098
4108
|
var JCB = function (props) { return jsxRuntime.jsx(Icon$1, __assign$1({}, props, { name: "payment/jcb" }), void 0); };
|
|
4099
4109
|
|
|
4100
|
-
var Paypal = function (props) { return (jsxRuntime.jsx(Icon$1, __assign$1({ testId: "PaypalIcon" }, props, { name: "payment/paypal" }), void 0)); };
|
|
4101
|
-
|
|
4102
4110
|
var Klarna = function (props) { return jsxRuntime.jsx(Icon$1, __assign$1({}, props, { name: "payment/klarna" }), void 0); };
|
|
4103
4111
|
|
|
4104
|
-
var
|
|
4112
|
+
var MasterCard = function (props) { return jsxRuntime.jsx(Icon$1, __assign$1({}, props, { name: "payment/master_card" }), void 0); };
|
|
4113
|
+
|
|
4114
|
+
var PaymentMethods = function (props) { return (jsxRuntime.jsx(Icon$1, __assign$1({}, props, { name: "payment/payment_methods" }), void 0)); };
|
|
4115
|
+
|
|
4116
|
+
var Paypal = function (props) { return (jsxRuntime.jsx(Icon$1, __assign$1({ testId: "PaypalIcon" }, props, { name: "payment/paypal" }), void 0)); };
|
|
4117
|
+
|
|
4118
|
+
var Visa = function (props) { return jsxRuntime.jsx(Icon$1, __assign$1({}, props, { name: "payment/visa" }), void 0); };
|
|
4105
4119
|
|
|
4106
4120
|
var Payment = /*#__PURE__*/Object.freeze({
|
|
4107
4121
|
__proto__: null,
|
|
4108
|
-
|
|
4109
|
-
MasterCard: MasterCard,
|
|
4122
|
+
Amazon: Amazon,
|
|
4110
4123
|
Amex: Amex,
|
|
4111
4124
|
JCB: JCB,
|
|
4112
|
-
Paypal: Paypal,
|
|
4113
4125
|
Klarna: Klarna,
|
|
4114
|
-
|
|
4126
|
+
MasterCard: MasterCard,
|
|
4127
|
+
PaymentMethods: PaymentMethods,
|
|
4128
|
+
Paypal: Paypal,
|
|
4129
|
+
Visa: Visa
|
|
4115
4130
|
});
|
|
4116
4131
|
|
|
4117
4132
|
var SlideDot = function (props) { return jsxRuntime.jsx(Icon$1, __assign$1({}, props, { name: "slidedots/slide_dot" }), void 0); };
|
|
@@ -11875,11 +11890,11 @@ var ImagePreviewList = function (_a) {
|
|
|
11875
11890
|
var element = document.querySelector(".imageListContainer");
|
|
11876
11891
|
element.scrollBy(0, 200);
|
|
11877
11892
|
};
|
|
11878
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Container$L, __assign$1({ "data-testid": dataTestId, position: position, className: hasOverflowArrows ? 'imageListContainer' : position, hasOverflowArrows: hasOverflowArrows }, { children: position == 'horizontal' ? (jsxRuntime.jsx("div", __assign$1({ style: { maxWidth: '360px' } }, { children: jsxRuntime.jsx(SliderNavigation, __assign$1({ speed: 200, infinite: false, arrows: {
|
|
11893
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Container$L, __assign$1({ role: "list", "data-testid": dataTestId, position: position, className: hasOverflowArrows ? 'imageListContainer' : position, hasOverflowArrows: hasOverflowArrows }, { children: position == 'horizontal' ? (jsxRuntime.jsx("div", __assign$1({ style: { maxWidth: '360px' } }, { children: jsxRuntime.jsx(SliderNavigation, __assign$1({ speed: 200, infinite: false, arrows: {
|
|
11879
11894
|
arrowWidth: 0.75,
|
|
11880
11895
|
arrowHeight: 1.25,
|
|
11881
11896
|
arrowPadding: 1.625,
|
|
11882
|
-
}, adaptiveHeight: true, dots: false, slidesToShow: 4 }, { children: images.map(function (item) { return (jsxRuntime.jsx(Button$6, __assign$1({ onClick: function () { return onClick(item); } }, { children: jsxRuntime.jsx(ImageSmallPreview, { imageUrl: (item === null || item === void 0 ? void 0 : item.alt.includes('-video')) ? item === null || item === void 0 ? void 0 : item.thumbnailUrl : item === null || item === void 0 ? void 0 : item.url, alt: item.alt, selected: item.key === selectedImage.key, borderRadiusVariant: borderRadiusVariant, previewImgBorderColor: previewImgBorderColor }, void 0) }), item.key)); }) }), void 0) }), void 0)) : (images.map(function (item) { return (jsxRuntime.jsx(Button$6, __assign$1({ onClick: function () { return onClick(item); } }, { children: jsxRuntime.jsx(ImageSmallPreview, { imageUrl: (item === null || item === void 0 ? void 0 : item.alt.includes('-video')) ? item === null || item === void 0 ? void 0 : item.thumbnailUrl : item === null || item === void 0 ? void 0 : item.url, alt: item.alt, selected: item.key === selectedImage.key, borderRadiusVariant: borderRadiusVariant, previewImgBorderColor: previewImgBorderColor }, void 0) }), item.key)); })) }), void 0), hasOverflowArrows && (jsxRuntime.jsxs(ArrowsContainer, { children: [jsxRuntime.jsx(ArrowPrev, { onClick: handleScrollVerticalPrev }, void 0), jsxRuntime.jsx(ArrowNext, { onClick: handleScrollVerticalNext }, void 0)] }, void 0))] }, void 0));
|
|
11897
|
+
}, adaptiveHeight: true, dots: false, slidesToShow: 4 }, { children: images.map(function (item, index) { return (jsxRuntime.jsx(Button$6, __assign$1({ onClick: function () { return onClick(item, index); } }, { children: jsxRuntime.jsx(ImageSmallPreview, { imageUrl: (item === null || item === void 0 ? void 0 : item.alt.includes('-video')) ? item === null || item === void 0 ? void 0 : item.thumbnailUrl : item === null || item === void 0 ? void 0 : item.url, alt: item.alt, selected: item.key === selectedImage.key, borderRadiusVariant: borderRadiusVariant, previewImgBorderColor: previewImgBorderColor }, void 0) }), item.key)); }) }), void 0) }), void 0)) : (images.map(function (item, index) { return (jsxRuntime.jsx(Button$6, __assign$1({ onClick: function () { return onClick(item, index); } }, { children: jsxRuntime.jsx(ImageSmallPreview, { imageUrl: (item === null || item === void 0 ? void 0 : item.alt.includes('-video')) ? item === null || item === void 0 ? void 0 : item.thumbnailUrl : item === null || item === void 0 ? void 0 : item.url, alt: item.alt, selected: item.key === selectedImage.key, borderRadiusVariant: borderRadiusVariant, previewImgBorderColor: previewImgBorderColor }, void 0) }), item.key)); })) }), void 0), hasOverflowArrows && (jsxRuntime.jsxs(ArrowsContainer, __assign$1({ role: "navigation" }, { children: [jsxRuntime.jsx(ArrowPrev, { onClick: handleScrollVerticalPrev }, void 0), jsxRuntime.jsx(ArrowNext, { onClick: handleScrollVerticalNext }, void 0)] }), void 0))] }, void 0));
|
|
11883
11898
|
};
|
|
11884
11899
|
var templateObject_1$_, templateObject_2$G, templateObject_3$x, templateObject_4$n, templateObject_5$h, templateObject_6$e, templateObject_7$a, templateObject_8$9;
|
|
11885
11900
|
|
|
@@ -13551,17 +13566,34 @@ var ImageProductSlide$1 = function (_a) {
|
|
|
13551
13566
|
};
|
|
13552
13567
|
var templateObject_1$X, templateObject_2$D, templateObject_3$v, templateObject_4$l, templateObject_5$f;
|
|
13553
13568
|
|
|
13569
|
+
var getActiveContent = function (preserveOrder, activeIndex, selectedValue, images) {
|
|
13570
|
+
var initialContent = images === null || images === void 0 ? void 0 : images[0];
|
|
13571
|
+
if (preserveOrder && (images === null || images === void 0 ? void 0 : images[activeIndex])) {
|
|
13572
|
+
initialContent = images === null || images === void 0 ? void 0 : images[activeIndex];
|
|
13573
|
+
}
|
|
13574
|
+
else if (preserveOrder && !(images === null || images === void 0 ? void 0 : images[activeIndex])) {
|
|
13575
|
+
// Fallback in case image does not exist at the index
|
|
13576
|
+
initialContent = images === null || images === void 0 ? void 0 : images[0];
|
|
13577
|
+
}
|
|
13578
|
+
else if (selectedValue && images.includes(selectedValue)) {
|
|
13579
|
+
initialContent = selectedValue;
|
|
13580
|
+
}
|
|
13581
|
+
return initialContent;
|
|
13582
|
+
};
|
|
13583
|
+
|
|
13554
13584
|
var Container$I = newStyled.div(templateObject_1$W || (templateObject_1$W = __makeTemplateObject(["\n display: grid;\n grid-template-columns: minmax(6rem, max-content) 1fr;\n grid-column-gap: 20px;\n max-height: 50rem;\n width: fit-content;\n"], ["\n display: grid;\n grid-template-columns: minmax(6rem, max-content) 1fr;\n grid-column-gap: 20px;\n max-height: 50rem;\n width: fit-content;\n"])));
|
|
13555
13585
|
var ProductGallery = function (_a) {
|
|
13556
|
-
var images = _a.images, selectedValue = _a.selectedValue, topTag = _a.topTag, topRightTag = _a.topRightTag, bottomTag = _a.bottomTag, productImageDataTestId = _a.productImageDataTestId, previewListDataTestId = _a.previewListDataTestId, thumbnailPosition = _a.thumbnailPosition, _b = _a.borderRadiusVariant, borderRadiusVariant = _b === void 0 ? false : _b, previewImgBorderColor = _a.previewImgBorderColor, ctaText = _a.ctaText, ctaAction = _a.ctaAction, _c = _a.hideCTA, hideCTA = _c === void 0 ? false : _c, _d = _a.hasOverflowArrows, hasOverflowArrows = _d === void 0 ? false : _d, _e = _a.withZoom, withZoom = _e === void 0 ? true : _e;
|
|
13557
|
-
var
|
|
13558
|
-
var
|
|
13586
|
+
var images = _a.images, selectedValue = _a.selectedValue, topTag = _a.topTag, topRightTag = _a.topRightTag, bottomTag = _a.bottomTag, productImageDataTestId = _a.productImageDataTestId, previewListDataTestId = _a.previewListDataTestId, thumbnailPosition = _a.thumbnailPosition, _b = _a.borderRadiusVariant, borderRadiusVariant = _b === void 0 ? false : _b, previewImgBorderColor = _a.previewImgBorderColor, ctaText = _a.ctaText, ctaAction = _a.ctaAction, _c = _a.hideCTA, hideCTA = _c === void 0 ? false : _c, _d = _a.hasOverflowArrows, hasOverflowArrows = _d === void 0 ? false : _d, _e = _a.withZoom, withZoom = _e === void 0 ? true : _e, _f = _a.hasToPreserveOrder, hasToPreserveOrder = _f === void 0 ? false : _f;
|
|
13587
|
+
var _g = React$2.useState(0), activeIndex = _g[0], setActiveIndex = _g[1];
|
|
13588
|
+
var _h = React$2.useState(selectedValue !== null && selectedValue !== void 0 ? selectedValue : images === null || images === void 0 ? void 0 : images[0]), selectedImage = _h[0], setSelectedImage = _h[1];
|
|
13589
|
+
var initialValue = getActiveContent(hasToPreserveOrder, activeIndex, selectedImage, images);
|
|
13559
13590
|
React$2.useEffect(function () {
|
|
13560
13591
|
setSelectedImage(initialValue);
|
|
13561
13592
|
}, [initialValue]);
|
|
13562
|
-
|
|
13563
|
-
|
|
13564
|
-
|
|
13593
|
+
var updateActiveContent = function (value, index) {
|
|
13594
|
+
hasToPreserveOrder ? setActiveIndex(index) : setSelectedImage(value);
|
|
13595
|
+
};
|
|
13596
|
+
return (jsxRuntime.jsxs(Container$I, { children: [jsxRuntime.jsx(ImagePreviewList, { images: images, selectedImage: selectedImage, dataTestId: previewListDataTestId, onClick: updateActiveContent, position: thumbnailPosition, borderRadiusVariant: borderRadiusVariant, previewImgBorderColor: previewImgBorderColor, hasOverflowArrows: hasOverflowArrows }, void 0), jsxRuntime.jsx(ImageProductSlide$1, { content: selectedImage, topTag: topTag, topRightTag: topRightTag, bottomTag: bottomTag, testId: productImageDataTestId, position: thumbnailPosition, borderRadiusVariant: borderRadiusVariant, ctaText: ctaText, ctaAction: ctaAction, hideCTA: hideCTA, withZoom: withZoom }, void 0)] }, void 0));
|
|
13565
13597
|
};
|
|
13566
13598
|
var templateObject_1$W;
|
|
13567
13599
|
|
|
@@ -13967,7 +13999,7 @@ var settings$1 = {
|
|
|
13967
13999
|
initialSlide: 0,
|
|
13968
14000
|
};
|
|
13969
14001
|
var ImageProductSlide = function (_a) {
|
|
13970
|
-
var contents = _a.contents, _b = _a.customClick, customClick = _b === void 0 ? false : _b, topTag = _a.topTag, topRightTag = _a.topRightTag, bottomTag = _a.bottomTag, testId = _a.testId, borderRadiusVariant = _a.borderRadiusVariant, selectedValue = _a.selectedValue;
|
|
14002
|
+
var contents = _a.contents, _b = _a.customClick, customClick = _b === void 0 ? false : _b, topTag = _a.topTag, topRightTag = _a.topRightTag, bottomTag = _a.bottomTag, testId = _a.testId, borderRadiusVariant = _a.borderRadiusVariant, selectedValue = _a.selectedValue, onChange = _a.onChange;
|
|
13971
14003
|
var slick = React$2.useRef(null);
|
|
13972
14004
|
var sliderWrapper = React$2.useRef(null);
|
|
13973
14005
|
React$2.useRef(null);
|
|
@@ -14008,6 +14040,7 @@ var ImageProductSlide = function (_a) {
|
|
|
14008
14040
|
// If autoplay is true and iframe is the active slide, play the video
|
|
14009
14041
|
var autoplay = (_a = activeSlide === null || activeSlide === void 0 ? void 0 : activeSlide.url) === null || _a === void 0 ? void 0 : _a.includes('autoplay=1');
|
|
14010
14042
|
autoplay ? _playVideo() : _stopVideo();
|
|
14043
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(e);
|
|
14011
14044
|
} }, settings$1, { nextArrow: jsxRuntime.jsx(NavButtonContainer$2, { children: jsxRuntime.jsx(Button$4, { children: jsxRuntime.jsx(Icon.Arrows.ChevronRight, { height: 2.125, width: 1.25, fill: "#292929" }, void 0) }, void 0) }, void 0), prevArrow: jsxRuntime.jsx(NavButtonContainer$2, { children: jsxRuntime.jsx(Button$4, { children: jsxRuntime.jsx(Icon.Arrows.ChevronLeft, { height: 2.125, width: 1.25, fill: "#292929" }, void 0) }, void 0) }, void 0), ref: slick }, { children: contents.map(function (content) {
|
|
14012
14045
|
var _a;
|
|
14013
14046
|
var source = content === null || content === void 0 ? void 0 : content.url;
|
|
@@ -14019,8 +14052,10 @@ var templateObject_1$M, templateObject_2$w, templateObject_3$r, templateObject_4
|
|
|
14019
14052
|
|
|
14020
14053
|
var Container$A = newStyled.div(templateObject_1$L || (templateObject_1$L = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n height: fit-content;\n position: relative;\n max-width: 450px;\n"], ["\n display: flex;\n flex-direction: column;\n height: fit-content;\n position: relative;\n max-width: 450px;\n"])));
|
|
14021
14054
|
var ProductGalleryMobile = function (_a) {
|
|
14022
|
-
var images = _a.images, customClick = _a.customClick, topTag = _a.topTag, topRightTag = _a.topRightTag, bottomTag = _a.bottomTag, productImageDataTestId = _a.productImageDataTestId, _b = _a.borderRadiusVariant, borderRadiusVariant = _b === void 0 ? false : _b, selectedValue = _a.selectedValue;
|
|
14023
|
-
|
|
14055
|
+
var images = _a.images, customClick = _a.customClick, topTag = _a.topTag, topRightTag = _a.topRightTag, bottomTag = _a.bottomTag, productImageDataTestId = _a.productImageDataTestId, _b = _a.borderRadiusVariant, borderRadiusVariant = _b === void 0 ? false : _b, selectedValue = _a.selectedValue, _c = _a.hasToPreserveOrder, hasToPreserveOrder = _c === void 0 ? false : _c;
|
|
14056
|
+
var _d = React$2.useState(0), activeIndex = _d[0], setActiveIndex = _d[1];
|
|
14057
|
+
var selectedContent = hasToPreserveOrder ? images === null || images === void 0 ? void 0 : images[activeIndex] : selectedValue;
|
|
14058
|
+
return (jsxRuntime.jsx(Container$A, __assign$1({ "data-testid": "product-gallery-mobile-v1" }, { children: jsxRuntime.jsx(ImageProductSlide, { contents: images, customClick: customClick, topTag: topTag, topRightTag: topRightTag, bottomTag: bottomTag, testId: productImageDataTestId, borderRadiusVariant: borderRadiusVariant, selectedValue: selectedContent, onChange: function (index) { return setActiveIndex(index); } }, void 0) }), void 0));
|
|
14024
14059
|
};
|
|
14025
14060
|
var templateObject_1$L;
|
|
14026
14061
|
|
|
@@ -19467,7 +19502,9 @@ var templateObject_1$e, templateObject_2$a;
|
|
|
19467
19502
|
var SizeSelector = function (_a) {
|
|
19468
19503
|
var _b;
|
|
19469
19504
|
var label = _a.label, sizes = _a.sizes, selectedValue = _a.selectedValue, onChange = _a.onChange, onClickSizeTip = _a.onClickSizeTip, _c = _a.inline, inline = _c === void 0 ? false : _c, width = _a.width, _d = _a.hasSizeGuide, hasSizeGuide = _d === void 0 ? false : _d, sizeTipReferences = _a.sizeTipReferences;
|
|
19470
|
-
var activeSizeTip =
|
|
19505
|
+
var activeSizeTip = hasSizeGuide
|
|
19506
|
+
? sizeTipReferences === null || sizeTipReferences === void 0 ? void 0 : sizeTipReferences.find(function (sizeTip) { return (sizeTip === null || sizeTip === void 0 ? void 0 : sizeTip.size) === (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.label); })
|
|
19507
|
+
: null;
|
|
19471
19508
|
return (jsxs("div", __assign$1({ css: {
|
|
19472
19509
|
display: 'flex',
|
|
19473
19510
|
flexDirection: inline ? 'row' : 'column',
|