@trafilea/afrodita-components 6.43.7 → 6.43.9
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 +2 -1
- package/build/index.esm.js +16 -10
- package/build/index.esm.js.map +1 -1
- package/build/index.js +16 -10
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -4074,7 +4074,8 @@ declare type IMobileGalleryProps = {
|
|
|
4074
4074
|
bottomTag?: JSX.Element;
|
|
4075
4075
|
productImageDataTestId?: string;
|
|
4076
4076
|
borderRadiusVariant?: boolean;
|
|
4077
|
-
|
|
4077
|
+
selectedIndex?: number;
|
|
4078
|
+
selectedValue?: IImage;
|
|
4078
4079
|
itemsOnViewport?: number;
|
|
4079
4080
|
};
|
|
4080
4081
|
declare const ProductGalleryMobileV4: React.FC<IMobileGalleryProps>;
|
package/build/index.esm.js
CHANGED
|
@@ -21538,7 +21538,7 @@ var Container$5 = newStyled.div({
|
|
|
21538
21538
|
width: '100vw',
|
|
21539
21539
|
position: 'fixed',
|
|
21540
21540
|
overflowY: 'scroll',
|
|
21541
|
-
zIndex: '
|
|
21541
|
+
zIndex: '99999999999',
|
|
21542
21542
|
top: 0,
|
|
21543
21543
|
left: 0,
|
|
21544
21544
|
display: 'flex',
|
|
@@ -21609,13 +21609,19 @@ var GalleryDetailed = function (_a) {
|
|
|
21609
21609
|
};
|
|
21610
21610
|
|
|
21611
21611
|
var ProductGalleryMobileV4 = function (_a) {
|
|
21612
|
-
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, _c = _a.
|
|
21612
|
+
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, _c = _a.selectedIndex, selectedIndex = _c === void 0 ? 0 : _c, selectedValue = _a.selectedValue, _d = _a.itemsOnViewport, itemsOnViewport = _d === void 0 ? 1 : _d;
|
|
21613
21613
|
var containerRef = useRef(null);
|
|
21614
|
-
var _e = useState(
|
|
21614
|
+
var _e = useState(selectedIndex), selectedImageIndex = _e[0], setSelectedImageIndex = _e[1];
|
|
21615
21615
|
var _f = useState(false), galleryOpened = _f[0], setGalleryOpened = _f[1];
|
|
21616
21616
|
useEffect(function () {
|
|
21617
|
-
|
|
21618
|
-
|
|
21617
|
+
if (selectedIndex) {
|
|
21618
|
+
setSelectedImageIndex(selectedIndex);
|
|
21619
|
+
}
|
|
21620
|
+
else if (selectedValue) {
|
|
21621
|
+
var actualIndex = images.findIndex(function (el) { return el.key === selectedValue.key; });
|
|
21622
|
+
setSelectedImageIndex(actualIndex);
|
|
21623
|
+
}
|
|
21624
|
+
}, [selectedIndex, selectedValue, images]);
|
|
21619
21625
|
useEffect(function () {
|
|
21620
21626
|
var body = document.querySelector('body');
|
|
21621
21627
|
if (!body) {
|
|
@@ -21888,10 +21894,10 @@ var FlexContainer = newStyled.div(templateObject_1$1 || (templateObject_1$1 = __
|
|
|
21888
21894
|
"\n [data-testid='subscription-frequency'] {\n border: 0;\n padding-left: 0 !important;\n padding-right: 32px !important;\n }\n\n [role='listbox']{\n margin-left: -20px;\n }\n ";
|
|
21889
21895
|
});
|
|
21890
21896
|
var DiscountTag = newStyled.div(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n position: absolute;\n top: -24px;\n right: 18px;\n background-color: ", ";\n color: white;\n padding: 5px 10px;\n font-size: 12px;\n font-weight: bold;\n line-height: 14px;\n border-radius: ", ";\n"], ["\n position: absolute;\n top: -24px;\n right: 18px;\n background-color: ", ";\n color: white;\n padding: 5px 10px;\n font-size: 12px;\n font-weight: bold;\n line-height: 14px;\n border-radius: ", ";\n"])), function (_a) {
|
|
21891
|
-
var theme = _a.theme,
|
|
21892
|
-
return
|
|
21893
|
-
? theme.
|
|
21894
|
-
: theme.
|
|
21897
|
+
var theme = _a.theme, selected = _a.selected;
|
|
21898
|
+
return selected
|
|
21899
|
+
? theme.component.autoship.discountTag.backgroundColor
|
|
21900
|
+
: theme.colors.shades[350].color;
|
|
21895
21901
|
}, function (_a) {
|
|
21896
21902
|
var theme = _a.theme;
|
|
21897
21903
|
return "".concat(theme.component.autoship.discountTag.borderRadius, " \n ").concat(theme.component.autoship.discountTag.borderRadius, " 0 0");
|
|
@@ -22026,7 +22032,7 @@ var SubscriptionPlanSelector = function (_a) {
|
|
|
22026
22032
|
}
|
|
22027
22033
|
return null;
|
|
22028
22034
|
};
|
|
22029
|
-
return (jsxs$1(Container$1, __assign$1({ className: className }, { children: [jsxs$1(SubscriptionContainer, __assign$1({ highlighted: radiosStatuses.subscription.checked, onClick: function () { return handleRadioClicked('subscription'); }, "data-testid": "subscription-purchase-block", disabled: radiosStatuses.subscription.disabled }, { children: [jsx$1(DiscountTag, __assign$1({ className: discountTagClassName,
|
|
22035
|
+
return (jsxs$1(Container$1, __assign$1({ className: className }, { children: [jsxs$1(SubscriptionContainer, __assign$1({ highlighted: radiosStatuses.subscription.checked, onClick: function () { return handleRadioClicked('subscription'); }, "data-testid": "subscription-purchase-block", disabled: radiosStatuses.subscription.disabled }, { children: [jsx$1(DiscountTag, __assign$1({ className: discountTagClassName, selected: radiosStatuses.subscription.checked }, { children: discountLabel !== null && discountLabel !== void 0 ? discountLabel : "".concat(subscriptionPctOverListPriceRounded, "% OFF - SAVE ").concat(currencySymbol).concat(subscriptionSaving.toFixed(2)) }), void 0), jsxs$1(SubscriptionHeader, __assign$1({ showBorder: radiosStatuses.subscription.checked }, { children: [jsxs$1(FlexContainer, __assign$1({ "data-testid": "subscription-block", onClick: function () { return handleRadioClicked('subscription'); } }, { children: [jsx$1(RadioInput, { label: radios.subscription.label, icon: radios.subscription.icon, name: "subscription", id: "subscription", value: "subscription", size: ComponentSize.Medium, style: { marginRight: '10px' }, useV2Style: true, onChange: function () {
|
|
22030
22036
|
setRadiosStatuses(function (prev) { return ({
|
|
22031
22037
|
subscription: __assign$1(__assign$1({}, prev.subscription), { checked: true }),
|
|
22032
22038
|
oneTime: __assign$1(__assign$1({}, prev.oneTime), { checked: false }),
|